use sysusers file to provide radiusd user and group [release 3.2.4-2mamba;Sat Jun 08 2024]
This commit is contained in:
parent
812a50560c
commit
6987b16863
@ -1,11 +1,7 @@
|
||||
%define radiusd_uid 65024
|
||||
%define radiusd_gid 65024
|
||||
|
||||
%define libname libfreeradius
|
||||
|
||||
Name: freeradius-server
|
||||
Version: 3.2.3
|
||||
Release: 1mamba
|
||||
Version: 3.2.4
|
||||
Release: 2mamba
|
||||
Summary: A high performance and highly configurable GPL'd free RADIUS server
|
||||
Group: System/Servers
|
||||
Vendor: openmamba
|
||||
@ -39,6 +35,8 @@ BuildRequires: libiodbc-devel
|
||||
BuildRequires: libjson-c-devel
|
||||
BuildRequires: libkrb5-devel
|
||||
BuildRequires: libmariadb-devel
|
||||
BuildRequires: libmemcached-devel
|
||||
BuildRequires: libmongo-c-driver-devel
|
||||
BuildRequires: libnsl-devel
|
||||
BuildRequires: libodbc-devel
|
||||
BuildRequires: libopenldap-devel
|
||||
@ -55,7 +53,9 @@ BuildRequires: libtalloc-devel
|
||||
BuildRequires: libtermcap-devel
|
||||
BuildRequires: libunbound-devel
|
||||
BuildRequires: libwbclient-devel
|
||||
BuildRequires: libxcrypt-devel
|
||||
BuildRequires: libz-devel
|
||||
BuildRequires: perl-Convert-Base32
|
||||
BuildRequires: perl-DBI
|
||||
BuildRequires: perl-Net-IP
|
||||
BuildRequires: perl-devel
|
||||
@ -65,7 +65,7 @@ BuildRequires: libopenldap-devel >= 2.2.20
|
||||
BuildRequires: libruby-devel >= 3.2.0
|
||||
Provides: freeradius
|
||||
Obsoletes: freeradius < 3.2.1
|
||||
Requires: %{libname} = %{version}
|
||||
Requires: %{libname} = %{version}-%{release}
|
||||
Requires: openldap-servers >= 2.1.22
|
||||
|
||||
%description
|
||||
@ -190,8 +190,8 @@ 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 %{SOURCE6} \
|
||||
%{buildroot}%{_sysusersdir}/freeradius.conf
|
||||
|
||||
install -D -m0644 redhat/freeradius-logrotate \
|
||||
%{buildroot}%{_sysconfdir}/logrotate.d/freeradius
|
||||
@ -224,20 +224,11 @@ rm -f %{buildroot}%{_sysconfdir}/raddb/oraclesql.conf
|
||||
[ "%{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
|
||||
%sysusers_create_compat %{SOURCE6}
|
||||
:
|
||||
|
||||
%preun
|
||||
%systemd_preun freeradius
|
||||
if [ $1 -eq 0 ]; then
|
||||
/usr/sbin/userdel radiusd
|
||||
/usr/sbin/groupdel radiusd
|
||||
fi
|
||||
:
|
||||
|
||||
%postun
|
||||
@ -292,6 +283,7 @@ fi
|
||||
%{_sbindir}/*
|
||||
%{_unitdir}/freeradius.service
|
||||
%{_tmpfilesdir}/freeradius.conf
|
||||
%{_sysusersdir}/freeradius.conf
|
||||
%dir %{_datadir}/freeradius
|
||||
%{_datadir}/freeradius/*
|
||||
%attr(0644,root,root) %{_datadir}/snmp/mibs/*
|
||||
@ -309,10 +301,6 @@ fi
|
||||
|
||||
%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
|
||||
@ -366,6 +354,12 @@ fi
|
||||
%{_libdir}/%{name}/rlm_sql_unixodbc*.la
|
||||
|
||||
%changelog
|
||||
* Sat Jun 08 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 3.2.4-2mamba
|
||||
- use sysusers file to provide radiusd user and group
|
||||
|
||||
* Fri May 31 2024 Automatic Build System <autodist@openmamba.org> 3.2.4-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
* Sat May 27 2023 Automatic Build System <autodist@mambasoft.it> 3.2.3-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
|
@ -1 +1,3 @@
|
||||
u radiusd - "radius daemon" -
|
||||
#Type Name ID GECOS Home directory Shell
|
||||
u radiusd - "radiusd user" /var/lib/radiusd /sbin/nologin
|
||||
g radiusd - - - -
|
||||
|
Loading…
Reference in New Issue
Block a user