Drop scriptlet for handling nobody user upgrades from Fedora <28

For https://fedoraproject.org/wiki/Changes/RenameNobodyUser a scriptlet
was introduced with prevents nss-systemd from synthesizing entries for nobody.
Let's remove the scriptlet: very few people upgrade from such old systems,
and even if they do, having a duplicate entry for nobody is annoying
but hardly a big problem.

(The other side of this, support in nss-systemd remains in place.)

This allows deps on the tools used in the scriptlet to be dropped from -libs.

While at it, also drop noop ldconfig scriptlets.

(cherry picked from commit cac0b2a5a7)
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2022-02-16 17:48:06 +01:00
parent f42ae67ed3
commit e65d52fe63
1 changed files with 3 additions and 25 deletions

View File

@ -255,10 +255,6 @@ Obsoletes: systemd-compat-libs < 230
Obsoletes: nss-myhostname < 0.4
Provides: nss-myhostname = 0.4
Provides: nss-myhostname%{_isa} = 0.4
Requires(post): coreutils
Requires(post): sed
Requires(post): grep
Requires(post): /usr/bin/getent
%description libs
Libraries for systemd and udev.
@ -826,27 +822,6 @@ fi
# a different package version.
systemctl --no-reload preset systemd-oomd.service &>/dev/null || :
%post libs
%{?ldconfig}
# check if nobody or nfsnobody is defined
export SYSTEMD_NSS_BYPASS_SYNTHETIC=1
if getent passwd nfsnobody &>/dev/null; then
test -f /etc/systemd/dont-synthesize-nobody || {
echo 'Detected system with nfsnobody defined, creating /etc/systemd/dont-synthesize-nobody'
mkdir -p /etc/systemd || :
: >/etc/systemd/dont-synthesize-nobody || :
}
elif getent passwd nobody 2>/dev/null | grep -v 'nobody:[x*]:65534:65534:.*:/:/sbin/nologin' &>/dev/null; then
test -f /etc/systemd/dont-synthesize-nobody || {
echo 'Detected system with incompatible nobody defined, creating /etc/systemd/dont-synthesize-nobody'
mkdir -p /etc/systemd || :
: >/etc/systemd/dont-synthesize-nobody || :
}
fi
%{?ldconfig:%postun libs -p %ldconfig}
%global udev_services systemd-udev{d,-settle,-trigger}.service systemd-udevd-{control,kernel}.socket systemd-timesyncd.service %{?have_gnu_efi:systemd-boot-update.service}
%post udev
@ -1031,6 +1006,9 @@ fi
%files standalone-sysusers -f .file-list-standalone-sysusers
%changelog
* Wed Feb 16 2022 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 250.3-3
- Drop scriptlet for handling nobody user upgrades from Fedora <28
* Thu Feb 10 2022 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 250.3-3
- Add pam_namespace to systemd-user pam config (rhbz#2053098)