From ca998c583b0204c9ec3d8ded4e638d84817c08b8 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Apr 06 2022 16:02:27 +0000 Subject: 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. --- diff --git a/systemd.spec b/systemd.spec index afcc8ff..e594f08 100644 --- a/systemd.spec +++ b/systemd.spec @@ -257,7 +257,6 @@ 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. @@ -360,7 +359,6 @@ systemd-importd. Summary: Tools to send journal events over the network Requires: %{name}%{?_isa} = %{version}-%{release} License: LGPLv2+ -Requires(pre): /usr/bin/getent Requires(post): systemd Requires(preun): systemd Requires(postun): systemd @@ -810,8 +808,6 @@ fi systemctl --no-reload preset systemd-oomd.service &>/dev/null || : %post libs -%{?ldconfig} - function mod_nss() { if [ -f "$1" ] ; then # Add nss-systemd to passwd and group @@ -845,24 +841,6 @@ else mod_nss "/etc/authselect/user-nsswitch.conf" fi -# 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 %post udev @@ -1047,6 +1025,7 @@ fi %changelog * Wed Apr 6 2022 Zbigniew Jędrzejewski-Szmek - 249.9-2 - Create /etc/resolv.conf symlink if nothing is present yet (#2032085) +- Drop scriptlet for handling nobody user upgrades from Fedora <28 * Wed Jan 12 2022 Zbigniew Jędrzejewski-Szmek - 249.9-1 - Revert the patches for (#1956022), hopefully fixing (#2039888)