diff --git a/disable-systemd-sysusers.patch b/disable-systemd-sysusers.patch deleted file mode 100644 index 5865c2e..0000000 --- a/disable-systemd-sysusers.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- sysusers2shadow.sh.old 2024-07-04 14:24:01.013092683 +0200 -+++ sysusers2shadow.sh 2024-07-04 14:28:06.701540250 +0200 -@@ -7,14 +7,6 @@ - "$@" - } - --if [ -x /usr/bin/systemd-sysusers ] && [ -e /proc/version ]; then -- -- if [ -n "$1" ] && [ "$1" != "%3" ]; then -- REPLACE_ARG="--replace=/usr/lib/sysusers.d/$1" -- fi -- # Use systemd-sysusers and let it read the input directly from stdin -- run /usr/bin/systemd-sysusers $REPLACE_ARG - --else - # Absolute path to busybox, if found - busybox= - for i in /bin/busybox /usr/bin/busybox; do [ -x "$i" ] && busybox=$i; done -@@ -126,4 +118,3 @@ - ;; - esac - done --fi diff --git a/sysuser-tools.changes b/sysuser-tools.changes index a697d9c..8e7d40d 100644 --- a/sysuser-tools.changes +++ b/sysuser-tools.changes @@ -1,3 +1,20 @@ +------------------------------------------------------------------- +Wed Dec 11 11:05:25 UTC 2024 - Thorsten Kukuk + +- Directly check return value of systemd-sysusers + +------------------------------------------------------------------- +Mon Dec 9 06:30:23 UTC 2024 - Thorsten Kukuk + +- Drop SLE15 support and remove disable-systemd-sysusers.patch + +------------------------------------------------------------------- +Mon Dec 9 05:59:25 UTC 2024 - Thorsten Kukuk + +- sysuser-shadow: remove systemd 238 dependency, this does not + work in a single RPM transaction [bsc#1234277]. Call + systemd-sysuser instead again without --replace. + ------------------------------------------------------------------- Wed Aug 7 13:42:07 UTC 2024 - Thorsten Kukuk diff --git a/sysuser-tools.spec b/sysuser-tools.spec index e32d459..35f8a5e 100644 --- a/sysuser-tools.spec +++ b/sysuser-tools.spec @@ -27,7 +27,6 @@ Source1: sysusers.attr Source2: sysusers-generate-pre Source3: macros.sysusers Source4: sysusers2shadow.sh -Patch0: disable-systemd-sysusers.patch BuildArch: noarch Requires: sysuser-shadow #!BuildIgnore: sysuser-shadow @@ -43,12 +42,6 @@ Group: System/Packages Requires(pre): (/usr/sbin/useradd or busybox) # prefer original shadow over busybox by default Suggests: shadow -# sysusers2shdow uses sysusers2shadow uses systemd-sysusers if available. And we might pass --replace to it -# --replace only appeared in systemd 238,so we want to ensure: if we have systemd, it must be recent enough -# the Requires(pre) statement is to ensure we get it at any moment recent enough, not only at the end of -# transactions, otherwise upgrades might randomly fail -Requires(pre): (systemd >= 238 if systemd) -Requires: (systemd >= 238 if systemd) %description -n sysuser-shadow This package contians a tool, which expects as input a sysusers.d @@ -57,9 +50,6 @@ and groups from it like systemd-sysusers would do. %prep %setup -qcT -%if 0%{?suse_version} <= 1500 -patch < %_sourcedir/disable-systemd-sysusers.patch %_sourcedir/sysusers2shadow.sh -%endif %build diff --git a/sysusers2shadow.sh b/sysusers2shadow.sh index d754e7d..bea119e 100644 --- a/sysusers2shadow.sh +++ b/sysusers2shadow.sh @@ -13,7 +13,9 @@ if [ -x /usr/bin/systemd-sysusers ] && [ -e /proc/version ]; then REPLACE_ARG="--replace=/usr/lib/sysusers.d/$1" fi # Use systemd-sysusers and let it read the input directly from stdin - run /usr/bin/systemd-sysusers $REPLACE_ARG - + if ! run /usr/bin/systemd-sysusers $REPLACE_ARG - ; then + run /usr/bin/systemd-sysusers - + fi else # Absolute path to busybox, if found busybox=