%define radiusd_uid 65024 %define radiusd_gid 65024 %define libname libfreeradius Name: freeradius-server Version: 3.2.1 Release: 2mamba Summary: A high performance and highly configurable GPL'd free RADIUS server Group: System/Servers Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco URL: https://freeradius.org/ Source0: ftp://ftp.freeradius.org/pub/radius/freeradius-server-%{version}.tar.gz Source1: freeradius-RADIUS-LDAPv3.schema Source2: freeradius-initscript Source3: freeradius-pam Source4: freeradius.service Source5: freeradius-tmpfiles.conf Source6: freeradius-sysusers.conf Patch0: freeradius-1.0.5-configure_libgdbm.patch Patch1: freeradius-1.0.0-samba3.patch Patch2: freeradius-2.1.3-qafixes.patch License: GPL ## AUTOBUILDREQ-BEGIN BuildRequires: firebird-devel BuildRequires: glibc-devel BuildRequires: libatomic-devel BuildRequires: libcap-devel BuildRequires: libcurl-devel BuildRequires: libe2fs-devel BuildRequires: libfreetds-devel BuildRequires: libgdbm-devel BuildRequires: libgmp-devel BuildRequires: libhiredis-devel BuildRequires: libidn-devel BuildRequires: libiodbc-devel BuildRequires: libjson-c-devel BuildRequires: libkrb5-devel BuildRequires: libmariadb-devel BuildRequires: libnsl-devel BuildRequires: libodbc-devel BuildRequires: libopenldap-devel BuildRequires: libopenssl-devel BuildRequires: libpam-devel BuildRequires: libpcap-devel BuildRequires: libpcre-devel BuildRequires: libperl BuildRequires: libpostgresql-devel BuildRequires: libreadline-devel BuildRequires: libruby-devel BuildRequires: libsqlite-devel BuildRequires: libtalloc-devel BuildRequires: libtermcap-devel BuildRequires: libunbound-devel BuildRequires: libwbclient-devel BuildRequires: libz-devel BuildRequires: perl-DBI BuildRequires: perl-Net-IP BuildRequires: perl-devel ## AUTOBUILDREQ-END BuildRequires: libhiredis-devel >= 1.0.0-1mamba BuildRequires: libopenldap-devel >= 2.2.20 BuildRequires: libruby-devel >= 3.2.0 Provides: freeradius Obsoletes: freeradius < 3.2.1 Requires: %{libname} = %{version} Requires: openldap-servers >= 2.1.22 %description The FreeRADIUS Server Project is a high performance and highly configurable GPL'd free RADIUS server. The server is similar in some respects to Livingston's 2.0 server. While FreeRADIUS started as a variant of the Cistron RADIUS server, they don't share a lot in common any more. It now has many more features than Cistron or Livingston, and is much more configurable. %package -n %{libname} Summary: Libraries for %{name} Group: System/Libraries %description -n %{libname} The FreeRADIUS Server Project is a high performance and highly configurable GPL'd free RADIUS server. This package contrains the dynamic libraries needed by FreeRADIUS. %package -n %{libname}-devel Summary: Static libraries and headers for %{name} Group: Development/Libraries Requires: %{name} = %{version} Requires: %{libname} = %{version} %description -n %{libname}-devel Development headers and libraries for %{name} %package -n %{libname}-krb5 Summary: The Kerberos module for %{name} Group: System/Servers Requires: libkrb5 Requires: %{name} = %{version} %description -n %{libname}-krb5 The FreeRADIUS server can use Kerberos to authenticate users, and this module is necessary for that. %package -n %{libname}-ldap Summary: The LDAP module for %{name} Group: System/Servers Requires: %{name} = %{version} %description -n %{libname}-ldap The FreeRADIUS server can use LDAP to authenticate users, and this module is necessary for that. %package -n %{libname}-postgresql Summary: The PostgreSQL module for %{name} Group: System/Servers Requires: %{name} = %{version} %description -n %{libname}-postgresql The FreeRADIUS server can use PostgreSQL to authenticate users and do accounting, and this module is necessary for that. %package -n %{libname}-mysql Summary: The MySQL module for %{name} Group: System/Servers Requires: %{name} = %{version} %description -n %{libname}-mysql The FreeRADIUS server can use MySQL to authenticate users and do accounting, and this module is necessary for that. %package -n %{libname}-unixODBC Summary: The unixODBC module for %{name} Group: System/Servers Requires: %{name} = %{version} %description -n %{libname}-unixODBC The FreeRADIUS server can use unixODBC to authenticate users and do accounting, and this module is necessary for that. %prep %setup -q #-D -T #:<< _EOF #%patch0 -p1 -b .libgdbm #%patch1 -p1 -b .samba3 #%patch2 -p1 find -type f -name "configure*" | xargs perl -pi -e "s|/lib\b|/%{_lib}|g" export CFLAGS="%{optflags} -fPIC -DLDAP_DEPRECATED" export CXXFLAGS="%{optflags} -fPIC -DLDAP_DEPRECATED" %build #:<< _EOF #libtoolize --force --copy #autoreconf %configure \ --with-gnu-ld \ --with-threads \ --with-thread-pool \ --libdir=%{_libdir}/%{name} \ --libexecdir=%{_libdir}/%{name} \ --disable-ltdl-install \ --with-ltdl-lib=%{_libdir} \ --with-rlm-dbm-lib-dir=%{_libdir} \ --with-snmp \ --with-experimental-modules \ --with-large-files \ --with-system-libltdl \ --with-system-libtool \ --without-rlm_python \ --without-rlm_python3 \ LIBS="-ltermcap" %make -j1 [ -e doc/README ] && mv -f doc/README doc/README-FreeRadius %install [ "%{buildroot}" != / ] && rm -rf %{buildroot} install -d %{buildroot}%{_libdir}/%{name} %makeinstall R=%{buildroot} sed -i "s|#user = .*|user=radiusd| s|#group = .*|group=radiusd|" \ %{buildroot}%{_sysconfdir}/raddb/radiusd.conf install -D -m0644 %{SOURCE1} \ %{buildroot}%{_sysconfdir}/openldap/schema/radius.schema install -D -m0644 %{SOURCE3} \ %{buildroot}%{_sysconfdir}/pam.d/radiusd install -D -m0644 %{SOURCE4} \ %{buildroot}%{_unitdir}/freeradius.service install -D -m0644 %{SOURCE5} \ %{buildroot}%{_tmpfilesdir}/freeradius.conf #install -D -m0644 %{SOURCE6} \ # %{buildroot}%{_sysusersdir}/freeradius.conf install -D -m0644 redhat/freeradius-logrotate \ %{buildroot}%{_sysconfdir}/logrotate.d/freeradius ## fix the naming of the sql.conf file #mv %{buildroot}%{_sysconfdir}/raddb/sql.conf \ # %{buildroot}%{_sysconfdir}/raddb/mysql.conf # install header files install -d %{buildroot}%{_includedir}/%{name} install -m0644 src/include/*.h %{buildroot}%{_includedir}/%{name}/ # put the mibs in place install -d %{buildroot}%{_datadir}/snmp/mibs install -m0644 mibs/FREERADIUS* mibs/RADIUS* %{buildroot}%{_datadir}/snmp/mibs/ install -d %{buildroot}/var/log/radius/radacct touch %{buildroot}/var/log/radius/radutmp touch %{buildroot}/var/log/radius/radwtmp touch %{buildroot}/var/log/radius/radius.log install -d %{buildroot}/var/run/radiusd # remove unpackages files rm -f %{buildroot}%{_sysconfdir}/raddb/mssql.conf rm -f %{buildroot}%{_sysconfdir}/raddb/oraclesql.conf %clean [ "%{buildroot}" != / ] && rm -rf %{buildroot} %pre if [ $1 -eq 1 ]; then # new install /usr/sbin/groupadd -g %{radiusd_gid} radiusd /usr/sbin/useradd -u %{radiusd_uid} -c radiusd -d /dev/null -g radiusd -s /bin/false radiusd fi %systemd_pre freeradius : %preun %systemd_preun freeradius if [ $1 -eq 0 ]; then /usr/sbin/userdel radiusd /usr/sbin/groupdel radiusd fi : %postun %systemd_postun_with_restart freeradius : %post -n %{libname}-krb5 -p /sbin/ldconfig %postun -n %{libname}-krb5 -p /sbin/ldconfig %post -n %{libname}-ldap -p /sbin/ldconfig %postun -n %{libname}-ldap -p /sbin/ldconfig %post -n %{libname}-postgresql -p /sbin/ldconfig %postun -n %{libname}-postgresql -p /sbin/ldconfig %post -n %{libname}-mysql -p /sbin/ldconfig %postun -n %{libname}-mysql -p /sbin/ldconfig %post -n %{libname}-unixODBC -p /sbin/ldconfig %postun -n %{libname}-unixODBC -p /sbin/ldconfig %files %defattr(-,root,root) %config(noreplace) %{_sysconfdir}/logrotate.d/freeradius %config(noreplace) %{_sysconfdir}/pam.d/radiusd %dir %{_sysconfdir}/raddb %config(noreplace) %attr(-,root,root) %{_sysconfdir}/raddb/certs/* %config(noreplace) %attr(0640,root,root) %{_sysconfdir}/raddb/clients.conf %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/raddb/dictionary %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/raddb/experimental.conf %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/raddb/hints %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/raddb/huntgroups %config(noreplace) %attr(0640,root,root) %{_sysconfdir}/raddb/proxy.conf %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/raddb/radiusd.conf %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/raddb/sites-available %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/raddb/sites-enabled %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/raddb/templates.conf %config(noreplace) %attr(0640,root,radiusd) %{_sysconfdir}/raddb/users %config(noreplace) %attr(0640,root,radiusd) %{_sysconfdir}/raddb/trigger.conf %{_sysconfdir}/raddb/panic.gdb %{_sysconfdir}/raddb/README.rst %dir %{_sysconfdir}/raddb/mods-available %{_sysconfdir}/raddb/mods-available/* %dir %{_sysconfdir}/raddb/mods-config %config(noreplace) %{_sysconfdir}/raddb/mods-config/* %dir %{_sysconfdir}/raddb/mods-enabled %config(noreplace) %{_sysconfdir}/raddb/mods-enabled/* %dir %{_sysconfdir}/raddb/policy.d %{_sysconfdir}/raddb/policy.d/* %{_sysconfdir}/openldap/schema/radius.schema %{_bindir}/* %{_sbindir}/* %{_unitdir}/freeradius.service %{_tmpfilesdir}/freeradius.conf %dir %{_datadir}/freeradius %{_datadir}/freeradius/* %attr(0644,root,root) %{_datadir}/snmp/mibs/* %dir %attr(0755,radiusd,radiusd) /var/log/radius %dir %attr(0755,radiusd,radiusd) /var/log/radius/radacct %dir %attr(0755,radiusd,radiusd) /var/run/radiusd %attr(0644,radiusd,radiusd) %ghost /var/log/radius/radutmp %attr(0644,radiusd,radiusd) %ghost /var/log/radius/radwtmp %attr(0644,radiusd,radiusd) %ghost /var/log/radius/radius.log %{_datadir}/doc/freeradius/* %{_mandir}/man1/* %{_mandir}/man5/* %{_mandir}/man8/* %doc COPYRIGHT CREDITS LICENSE doc/* %files -n %{libname} %defattr(-,root,root) #%{_libdir}/%{name}/libradius*.la #%{_libdir}/%{name}/libradius*.so #%{_libdir}/%{name}/libeap*.la #%{_libdir}/%{name}/libeap*.so %{_libdir}/%{name}/proto_dhcp.la %{_libdir}/%{name}/proto_dhcp.so %{_libdir}/%{name}/proto_vmps.la %{_libdir}/%{name}/proto_vmps.so %{_libdir}/%{name}/rlm_*.la %{_libdir}/%{name}/rlm_*.so %{_libdir}/%{name}/libfreeradius-eap*.la %{_libdir}/%{name}/libfreeradius-eap*.so %{_libdir}/freeradius-server/libfreeradius-dhcp.la %{_libdir}/freeradius-server/libfreeradius-dhcp.so %{_libdir}/%{name}/libfreeradius-radius*.la %{_libdir}/%{name}/libfreeradius-radius*.so %{_libdir}/%{name}/libfreeradius-server*.la %{_libdir}/%{name}/libfreeradius-server*.so %exclude %{_libdir}/%{name}/rlm_sql_mysql* %exclude %{_libdir}/%{name}/rlm_sql_postgresql* %exclude %{_libdir}/%{name}/rlm_sql_unixodbc* %exclude %{_libdir}/%{name}/rlm_ldap* %files -n %{libname}-devel %defattr(-,root,root) %{_libdir}/%{name}/*.a %{_includedir}/%{name} %{_includedir}/freeradius/*.h %files -n %{libname}-krb5 %defattr(-,root,root) #%{_libdir}/%{name}/rlm_krb5-%{version}.so* %files -n %{libname}-ldap %defattr(-,root,root) #%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/raddb/ldap.attrmap %{_libdir}/%{name}/rlm_ldap*.so* %{_libdir}/%{name}/rlm_ldap*.la %files -n %{libname}-postgresql %defattr(-,root,root) #%config(noreplace) %attr(0640,root,root) %{_sysconfdir}/raddb/postgresql.conf %{_libdir}/%{name}/rlm_sql_postgresql*.so* %{_libdir}/%{name}/rlm_sql_postgresql*.la %files -n %{libname}-mysql %defattr(-,root,root) #%config(noreplace) %attr(0640,root,root) %{_sysconfdir}/raddb/mysql.conf %{_libdir}/%{name}/rlm_sql_mysql*.so* %{_libdir}/%{name}/rlm_sql_mysql*.la %files -n %{libname}-unixODBC %defattr(-,root,root) %{_libdir}/%{name}/rlm_sql_unixodbc*.so* %{_libdir}/%{name}/rlm_sql_unixodbc*.la %changelog * Mon Jan 02 2023 Silvan Calarco 3.2.1-2mamba - rebuilt with ruby 3.2.0 * Sun Dec 11 2022 Automatic Build System 3.2.1-1mamba - automatic version update by autodist * Mon Jun 06 2022 Automatic Build System 3.2.0-1mamba - automatic version update by autodist * Sat Aug 22 2020 Silvan Calarco 3.0.21-2mamba - rebuilt by autoport with build requirements: libhiredis-devel>=1.0.0-1mamba--buildreqlibhiredis-devel>=1.0.0-1mamba * Sat May 02 2020 Automatic Build System 3.0.21-1mamba - automatic update by autodist * Sat Nov 18 2017 Automatic Build System 3.0.15-1mamba - automatic update by autodist * Wed May 20 2015 Automatic Build System 3.0.8-1mamba - automatic update by autodist * Wed Mar 18 2015 Automatic Build System 3.0.7-1mamba - automatic update by autodist * Sat Dec 20 2014 Automatic Build System 3.0.6-1mamba - automatic update by autodist * Mon Jun 23 2014 Automatic Build System 3.0.3-1mamba - automatic update by autodist * Thu Sep 19 2013 Automatic Build System 2.2.1-1mamba - automatic update by autodist * Fri Nov 23 2012 Automatic Build System 2.2.0-1mamba - automatic version update by autodist * Tue Jun 22 2010 Automatic Build System 2.1.9-1mamba - automatic update by autodist * Mon Feb 08 2010 Silvan Calarco 2.1.8-2mamba - rebuilt without libshadow * Thu Jan 14 2010 Automatic Build System 2.1.8-1mamba - automatic update by autodist * Sun Sep 20 2009 Automatic Build System 2.1.7-1mamba - automatic update by autodist * Sat May 30 2009 Automatic Build System 2.1.6-1mamba - automatic update by autodist * Fri Apr 03 2009 Silvan Calarco 2.1.4-1mamba - update to 2.1.4 * Fri Apr 03 2009 Silvan Calarco 1.0.5-4mamba - automatic rebuild by autodist * Tue Mar 21 2006 Davide Madrisan 1.0.5-3qilnx - install freeradius mibs and headers files - libraries splitted into several packages - added ghost logging files to main package * Wed Nov 16 2005 Davide Madrisan 1.0.5-2qilnx - fixed test for gdbm library usability in the configure script * Wed Nov 16 2005 Davide Madrisan 1.0.5-1qilnx - update to version 1.0.5 by autospec * Wed Mar 09 2005 Davide Madrisan 1.0.2-1qilnx - update to version 1.0.2 by autospec - also fix security issues QSA-2005-023 (CAN-2004-[0938,0960,0961]) - added missing build requirements * Wed Aug 18 2004 Silvan Calarco 1.0.0-1qilnx - new version build - use radiusd userid from QiLinux database * Tue Apr 13 2004 Silvan Calarco 0.9.3-3qilnx - rebuild with libtool's libltdl fixed (don't install freeradius' own) * Thu Feb 19 2004 Silvan Calarco 0.9.3-2qilnx - fixed initscript chkconfig stuff * Mon Nov 24 2003 Davide Madrisan 0.9.3-1qilnx - rebuilt with version 0.9.3 (security fix) * Tue Sep 23 2003 Silvan Calarco 0.9.1-1qilnx - upgrade to new version * Mon Sep 22 2003 Silvan Calarco 0.8.1-1qilnx - first build