Compare commits
3 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f4e8a69284 | ||
|
|
64327fdd89 | ||
|
|
d11c2fdec0 |
1 changed files with 22 additions and 35 deletions
57
rpcbind.spec
57
rpcbind.spec
|
|
@ -18,7 +18,7 @@ Conflicts: man-pages < 2.43-12
|
|||
BuildRequires: make
|
||||
BuildRequires: automake, autoconf, libtool, systemd, systemd-devel
|
||||
BuildRequires: libtirpc-devel, quota-devel
|
||||
Requires(pre): coreutils
|
||||
Requires(pre): coreutils shadow-utils
|
||||
Requires(post): systemd
|
||||
Requires(preun): systemd
|
||||
Requires(postun): systemd coreutils
|
||||
|
|
@ -45,11 +45,6 @@ RPC calls on a server on that machine.
|
|||
%prep
|
||||
%autosetup -p1
|
||||
|
||||
# Create a sysusers.d config file
|
||||
cat >rpcbind.sysusers.conf <<EOF
|
||||
u rpc 32 'Rpcbind Daemon' /var/lib/rpcbind -
|
||||
EOF
|
||||
|
||||
%build
|
||||
autoreconf -fisv
|
||||
%configure \
|
||||
|
|
@ -81,7 +76,19 @@ ln -sf ../bin/rpcbind
|
|||
ln -sf ../bin/rpcinfo
|
||||
%endif
|
||||
|
||||
install -m0644 -D rpcbind.sysusers.conf %{buildroot}%{_sysusersdir}/rpcbind.conf
|
||||
%pre
|
||||
|
||||
# Softly static allocate the rpc uid and gid.
|
||||
getent group rpc >/dev/null || groupadd -f -g 32 -r rpc
|
||||
if ! getent passwd rpc >/dev/null ; then
|
||||
if ! getent passwd 32 >/dev/null ; then
|
||||
useradd -l -c "Rpcbind Daemon" -d /var/lib/rpcbind \
|
||||
-g rpc -M -s /sbin/nologin -o -u 32 rpc > /dev/null 2>&1
|
||||
else
|
||||
useradd -l -c "Rpcbind Daemon" -d /var/lib/rpcbind \
|
||||
-g rpc -M -s /sbin/nologin rpc > /dev/null 2>&1
|
||||
fi
|
||||
fi
|
||||
|
||||
%post
|
||||
%systemd_post rpcbind.service rpcbind.socket
|
||||
|
|
@ -89,16 +96,15 @@ install -m0644 -D rpcbind.sysusers.conf %{buildroot}%{_sysusersdir}/rpcbind.conf
|
|||
%preun
|
||||
%systemd_preun rpcbind.service rpcbind.socket
|
||||
|
||||
# NOTE: We only restart rpcbind.socket in the %postun scriptlet in order to
|
||||
# avoid the race described in:
|
||||
#
|
||||
# https://github.com/systemd/systemd/issues/13271
|
||||
# https://github.com/systemd/systemd/issues/8102
|
||||
#
|
||||
# Restarting rpcbind.socket causes rpcbind.service to be restarted automatically
|
||||
# due to "Requires=rpcbind.socket" in the rpcbind.service unit file.
|
||||
%postun
|
||||
%systemd_postun_with_restart rpcbind.socket
|
||||
%systemd_postun_with_restart rpcbind.service rpcbind.socket
|
||||
|
||||
%triggerin -- rpcbind > 0.2.2-2.0
|
||||
if systemctl -q is-enabled rpcbind.socket
|
||||
then
|
||||
/bin/systemctl reenable rpcbind.socket >/dev/null 2>&1 || :
|
||||
/bin/systemctl restart rpcbind.socket >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
%files
|
||||
%license COPYING
|
||||
|
|
@ -115,30 +121,11 @@ install -m0644 -D rpcbind.sysusers.conf %{buildroot}%{_sysusersdir}/rpcbind.conf
|
|||
%{_unitdir}/%{name}.socket
|
||||
%{_tmpfilesdir}/%{name}.conf
|
||||
%attr(0700, %{rpcbind_user_group}, %{rpcbind_user_group}) %dir %{rpcbind_state_dir}
|
||||
%{_sysusersdir}/rpcbind.conf
|
||||
|
||||
%changelog
|
||||
* Sat Jul 26 2025 Steve Dickson <steved@redhat.com> 1.2.8-0
|
||||
- Updated to latest upstream release: rpcbind-1_2_8 (bz 2300081)
|
||||
|
||||
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.7-2.rc1.1
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
||||
|
||||
* Wed May 7 2025 Scott Mayhew <smayhew@redhat.com> - 1.2.7-2.rc1
|
||||
- Fix rpm scriptlets to remove excessive restarts during upgrade
|
||||
|
||||
* Wed Jan 29 2025 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.2.7-1.rc1.4
|
||||
- Add sysusers.d config file to allow rpm to create users/groups automatically
|
||||
|
||||
* Sat Jan 18 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.7-1.rc1.3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
||||
|
||||
* Tue Jan 14 2025 Panu Matilainen <pmatilai@redhat.com> - 1.2.7-1.rc1.2
|
||||
- Add provides for the manually created rpc user and group
|
||||
|
||||
* Sun Jan 12 2025 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.2.7-1.rc1.1
|
||||
- Rebuilt for the bin-sbin merge (2nd attempt)
|
||||
|
||||
* Mon Sep 9 2024 Steve Dickson <steved@redhat.com> 1.2.8-rc1
|
||||
- Updated to latest upstream RC release: rpcbind-1_2_8-rc1
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue