1
0

- remove python2 build

- drop references to SLE11

OBS-URL: https://build.opensuse.org/package/show/network/freeradius-server?expand=0&rev=148
This commit is contained in:
Adam Majer 2021-10-07 16:11:57 +00:00 committed by Git OBS Bridge
parent 09dea27b0a
commit 79ab8ece2d
2 changed files with 7 additions and 76 deletions

View File

@ -53,7 +53,8 @@ Thu Oct 7 15:02:11 UTC 2021 - Adam Majer <adam.majer@suse.de>
* Fix EAP-FAST PAC lifetime calculation.
* Print correct encoded packet length when debugging.
- disable python2 build
- remove python2 build
- drop references to SLE11
- freeradius-server-radiusd-logrotate.patch: upstreamed
-------------------------------------------------------------------

View File

@ -21,26 +21,12 @@ Name: freeradius-server
Version: 3.0.24
Release: 0
%if 0%{?suse_version} > 1140
%bcond_without systemd
%bcond_without libjson
%define runpath /run
%else
%bcond_with systemd
%bcond_with libjson
%define runpath /var/run
%endif
# Disable FreeTDS on SLE12. We never shipped it enabled with FreeTDS.
%if 0%{?suse_version} > 1330 || ( 0%{?suse_version} > 1140 && 0%{?is_opensuse} )
%bcond_without freetds
%else
%bcond_with freetds
%endif
%if 0%{?suse_version} > 1330 || 0%{?is_opensuse}
%bcond_without freetds
%bcond_without memcached
%else
%bcond_with freetds
%bcond_with memcached
%endif
@ -64,9 +50,6 @@ Patch8: freeradius-server-enable-python3.patch
BuildRequires: apache2-devel
BuildRequires: cyrus-sasl-devel
BuildRequires: db-devel
%if 0%{?suse_version} > 0 && 0%{?suse_version} <= 1110
BuildRequires: libdb-5_1-devel
%endif
%if %{with freetds}
BuildRequires: freetds-devel
%endif
@ -78,9 +61,7 @@ BuildRequires: krb5-devel
BuildRequires: libcom_err-devel
BuildRequires: libcurl-devel
BuildRequires: libidn-devel
%if %{with json}
BuildRequires: libjson-devel
%endif
%if %{with memcached}
BuildRequires: libmemcached-devel
%endif
@ -98,14 +79,7 @@ BuildRequires: postgresql-devel
BuildRequires: python3-devel
BuildRequires: sqlite3-devel
BuildRequires: unixODBC-devel
%if 0%{?suse_version} > 1110
BuildRequires: pkgconfig(apr-1)
%else
BuildRequires: libapr1-devel
%endif
%if !%{with systemd}
Requires: %insserv_prereq
%endif
Requires: %{name}-libs = %{version}
Requires: coreutils
Requires: pwdutils
@ -117,10 +91,8 @@ Provides: radiusd
Obsoletes: freeradius < %{version}
%{?libperl_requires}
Conflicts: radiusd-livingston radiusd-cistron icradius
%if %{with systemd}
BuildRequires: pkgconfig(systemd)
%{?systemd_requires}
%endif
#bsc#1055679 - freeradius-server does not provide winbind/AD auth
BuildRequires: libwbclient-devel
@ -272,9 +244,6 @@ export LDFLAGS="-pie"
%endif
%if ! %{with freetds}
--without-rlm_sql_freetds \
%endif
%if ! %{with json}
--without-rlm_rest \
%endif
--disable-silent-rules \
--disable-openssl-version-check
@ -299,19 +268,13 @@ install -d %{buildroot}%{_sysconfdir}/pam.d
install -d %{buildroot}%{_sysconfdir}/logrotate.d
install -m 644 suse/radiusd-pam %{buildroot}%{_sysconfdir}/pam.d/radiusd
install -m 644 suse/radiusd-logrotate %{buildroot}%{_sysconfdir}/logrotate.d/radiusd
%if %{with systemd}
mkdir -p %{buildroot}%{_tmpfilesdir}
install -m 0644 %{SOURCE2} %{buildroot}%{_tmpfilesdir}/%{unitname}.conf
install -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{unitname}.service
# name the rc script according to the systemd unit
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcradiusd
%else
install -d -m 755 %{buildroot}%{_sysconfdir}/init.d
install -m 744 suse/rcradiusd %{buildroot}%{_sysconfdir}/init.d/freeradius
ln -sf %{_sysconfdir}/init.d/freeradius %{buildroot}%{_sbindir}/rcfreeradius
%endif
cp -al %{buildroot}%{_sbindir}/radiusd %{buildroot}%{_sbindir}/radrelay
install -D -d -m 0710 %{buildroot}%{runpath}/radiusd
install -D -d -m 0710 %{buildroot}%{_rundir}/radiusd
mv -v doc/README doc/README.doc
# remove unneeded stuff
rm %{buildroot}%{_sysconfdir}/raddb/certs/*.crl
@ -336,9 +299,7 @@ rm -r %{buildroot}%{_sysconfdir}/raddb/mods-config/sql/dhcp/oracle
rm -r %{buildroot}%{_sysconfdir}/raddb/mods-config/sql/main/oracle
rm -r %{buildroot}%{_sysconfdir}/raddb/mods-config/sql/ippool/oracle
rm -r %{buildroot}%{_sysconfdir}/raddb/mods-config/sql/ippool-dhcp/oracle
%if ! %{with json}
rm %{buildroot}%{_sysconfdir}/raddb/mods-available/rest
%endif
rm -r %{buildroot}%{_sysconfdir}/raddb/mods-available/python
rm %{buildroot}%{_sysconfdir}/raddb/mods-config/sql/ippool/mongo/queries.conf
rm %{buildroot}%{_sysconfdir}/raddb/mods-config/sql/main/mongo/queries.conf
rm %{buildroot}%{_sysconfdir}/raddb/sites-available/coa-relay
@ -354,39 +315,19 @@ getent passwd radiusd >/dev/null || %{_sbindir}/useradd -r -g radiusd \
%{_bindir}/getent group winbind >/dev/null \
|| %{_sbindir}/groupadd -r winbind
# add radiusd to winbind group
%if 0%{?suse_version} > 0 && 0%{?suse_version} < 1140
%{_sbindir}/groupmod -A radiusd winbind
%else
%{_bindir}/gpasswd -a radiusd winbind
%endif
%if %{with systemd}
%service_add_pre %{unitname}.service
%endif
%post
%if %{with systemd}
%service_add_post %{unitname}.service
systemd-tmpfiles --create %{_tmpfilesdir}/%{unitname}.conf
%else
%fillup_and_insserv freeradius
%endif
%preun
%if %{with systemd}
%service_del_preun %{unitname}.service
%else
%insserv_cleanup
%restart_on_update freeradius
%endif
%postun
%if %{with systemd}
%service_del_postun %{unitname}.service
%else
%insserv_cleanup
%restart_on_update freeradius
%endif
%files doc
%defattr(-,root,root)
@ -401,12 +342,7 @@ systemd-tmpfiles --create %{_tmpfilesdir}/%{unitname}.conf
# SUSE
%config %{_sysconfdir}/pam.d/radiusd
%config %{_sysconfdir}/logrotate.d/radiusd
%if %{with systemd}
%{_sbindir}/rcradiusd
%else
%config %{_sysconfdir}/init.d/freeradius
%{_sbindir}/rcfreeradius
%endif
%dir %attr(755,radiusd,radiusd) %{_localstatedir}/lib/radiusd
# configs
%dir %attr(750,root,radiusd) %{_sysconfdir}/raddb
@ -428,10 +364,8 @@ systemd-tmpfiles --create %{_tmpfilesdir}/%{unitname}.conf
%{_sysconfdir}/raddb/panic.gdb
%attr(640,root,radiusd) %config(noreplace) %{_sysconfdir}/raddb/certs/*.cnf
%attr(750,root,radiusd) %{_sysconfdir}/raddb/certs/bootstrap
%if %{with systemd}
%{_tmpfilesdir}/%{unitname}.conf
%{_unitdir}/%{unitname}.service
%endif
# mods-config
%dir %attr(750,root,radiusd) %{_sysconfdir}/raddb/mods-config
@ -549,9 +483,7 @@ systemd-tmpfiles --create %{_tmpfilesdir}/%{unitname}.conf
%attr(640,root,radiusd) %config(noreplace) %{_sysconfdir}/raddb/mods-available/redis
%attr(640,root,radiusd) %config(noreplace) %{_sysconfdir}/raddb/mods-available/rediswho
%attr(640,root,radiusd) %config(noreplace) %{_sysconfdir}/raddb/mods-available/replicate
%if %{with json}
%attr(640,root,radiusd) %config(noreplace) %{_sysconfdir}/raddb/mods-available/rest
%endif
%attr(640,root,radiusd) %config(noreplace) %{_sysconfdir}/raddb/mods-available/smbpasswd
%attr(640,root,radiusd) %config(noreplace) %{_sysconfdir}/raddb/mods-available/smsotp
%attr(640,root,radiusd) %config(noreplace) %{_sysconfdir}/raddb/mods-available/soh
@ -623,7 +555,7 @@ systemd-tmpfiles --create %{_tmpfilesdir}/%{unitname}.conf
%config(noreplace) %{_sysconfdir}/raddb/users
%attr(640,root,radiusd) %config(noreplace) %{_sysconfdir}/raddb/templates.conf
%attr(710,radiusd,radiusd) %dir %ghost %{runpath}/radiusd
%attr(710,radiusd,radiusd) %dir %ghost %{_rundir}/radiusd
# binaries
%defattr(-,root,root)
%{_sbindir}/checkrad
@ -684,9 +616,7 @@ systemd-tmpfiles --create %{_tmpfilesdir}/%{unitname}.conf
%{_libdir}/freeradius/rlm_radutmp.so
%{_libdir}/freeradius/rlm_realm.so
%{_libdir}/freeradius/rlm_replicate.so
%if %{with json}
%{_libdir}/freeradius/rlm_rest.so
%endif
%{_libdir}/freeradius/rlm_soh.so
%{_libdir}/freeradius/rlm_sometimes.so
%{_libdir}/freeradius/rlm_sql.so