Resolves: #2095404 - frr use systemd-sysusers
This commit is contained in:
parent
9e42da4fec
commit
fc9c8e6add
4
frr-sysusers.conf
Normal file
4
frr-sysusers.conf
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#Type Name ID GECOS Home directory Shell
|
||||||
|
g frrvty -
|
||||||
|
u frr - "FRRouting routing suite" /var/run/frr /sbin/nologin
|
||||||
|
m frr frrvty
|
16
frr.spec
16
frr.spec
@ -5,12 +5,13 @@
|
|||||||
|
|
||||||
Name: frr
|
Name: frr
|
||||||
Version: 8.2.2
|
Version: 8.2.2
|
||||||
Release: 3%{?checkout}%{?dist}
|
Release: 4%{?checkout}%{?dist}
|
||||||
Summary: Routing daemon
|
Summary: Routing daemon
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
URL: http://www.frrouting.org
|
URL: http://www.frrouting.org
|
||||||
Source0: https://github.com/FRRouting/frr/releases/download/%{name}-%{version}/%{name}-%{version}.tar.gz
|
Source0: https://github.com/FRRouting/frr/releases/download/%{name}-%{version}/%{name}-%{version}.tar.gz
|
||||||
Source1: %{name}-tmpfiles.conf
|
Source1: %{name}-tmpfiles.conf
|
||||||
|
Source2: frr-sysusers.conf
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
BuildRequires: bison >= 2.7
|
BuildRequires: bison >= 2.7
|
||||||
@ -126,6 +127,8 @@ install -p -m 644 redhat/frr.logrotate %{buildroot}/etc/logrotate.d/frr
|
|||||||
install -p -m 644 redhat/frr.pam %{buildroot}/etc/pam.d/frr
|
install -p -m 644 redhat/frr.pam %{buildroot}/etc/pam.d/frr
|
||||||
install -d -m 775 %{buildroot}/run/frr
|
install -d -m 775 %{buildroot}/run/frr
|
||||||
|
|
||||||
|
install -p -D -m 0644 %{SOURCE2} ${RPM_BUILD_ROOT}/%{_sysusersdir}/frr.conf
|
||||||
|
|
||||||
# Delete libtool archives
|
# Delete libtool archives
|
||||||
find %{buildroot} -type f -name "*.la" -delete -print
|
find %{buildroot} -type f -name "*.la" -delete -print
|
||||||
|
|
||||||
@ -134,11 +137,8 @@ rm %{buildroot}%{_libdir}/frr/*.so
|
|||||||
rm -r %{buildroot}%{_includedir}/frr/
|
rm -r %{buildroot}%{_includedir}/frr/
|
||||||
|
|
||||||
%pre
|
%pre
|
||||||
getent group frrvty >/dev/null 2>&1 || groupadd -r frrvty >/dev/null 2>&1 || :
|
%sysusers_create_compat %{SOURCE2}
|
||||||
getent group frr >/dev/null 2>&1 || groupadd -r frr >/dev/null 2>&1 || :
|
exit 0
|
||||||
getent passwd frr >/dev/null 2>&1 || useradd -M -r -g frr -s /sbin/nologin \
|
|
||||||
-c "FRRouting routing suite" -d %{_localstatedir}/run/frr frr || :
|
|
||||||
usermod -aG frrvty frr
|
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%systemd_post frr.service
|
%systemd_post frr.service
|
||||||
@ -205,8 +205,12 @@ make check PYTHON=%{__python3}
|
|||||||
%dir /usr/share/yang
|
%dir /usr/share/yang
|
||||||
/usr/share/yang/*.yang
|
/usr/share/yang/*.yang
|
||||||
%{_tmpfilesdir}/%{name}.conf
|
%{_tmpfilesdir}/%{name}.conf
|
||||||
|
%{_sysusersdir}/frr.conf
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jun 14 2022 Michal Ruprich - 8.2.2-4
|
||||||
|
- Resolves: #2095404 - frr use systemd-sysusers
|
||||||
|
|
||||||
* Tue May 24 2022 Michal Ruprich <mruprich@redhat.com> - 8.2.2-3
|
* Tue May 24 2022 Michal Ruprich <mruprich@redhat.com> - 8.2.2-3
|
||||||
- Resolves: #2081304 - Enhanced TMT testing for centos-stream
|
- Resolves: #2081304 - Enhanced TMT testing for centos-stream
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user