From cac0b2a5a753de41dfc4a385def7bf9880c2c800 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 16 Feb 2022 17:48:06 +0100 Subject: [PATCH] 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. --- systemd.spec | 28 +++------------------------- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/systemd.spec b/systemd.spec index 36440f2..f126eec 100644 --- a/systemd.spec +++ b/systemd.spec @@ -254,10 +254,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. @@ -827,27 +823,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 @@ -1032,6 +1007,9 @@ fi %files standalone-sysusers -f .file-list-standalone-sysusers %changelog +* Wed Feb 16 2022 Zbigniew Jędrzejewski-Szmek - 250.3-3 +- Drop scriptlet for handling nobody user upgrades from Fedora <28 + * Thu Feb 10 2022 Zbigniew Jędrzejewski-Szmek - 250.3-3 - Add pam_namespace to systemd-user pam config (rhbz#2053098) - Drop 20-grubby.install plugin for kernel-install (rhbz#2033646)