From 1d4aa7fd58c2db16489a540d29bd7cff9a161fef788ef08c9c71503beb10e926 Mon Sep 17 00:00:00 2001 From: Thorsten Kukuk Date: Mon, 7 Jun 2021 13:14:59 +0000 Subject: [PATCH] Accepting request 898111 from home:kukuk:container - Support systemd-sysusers --replace=/usr/lib/sysusers.d/ option - sysusers-generate-pre: only use first argument for grep - sysusers2shadow.sh: use "run" prefix for systemd-sysusers call - macros.sysusers: fix typo OBS-URL: https://build.opensuse.org/request/show/898111 OBS-URL: https://build.opensuse.org/package/show/Base:System/sysuser-tools?expand=0&rev=44 --- macros.sysusers | 2 +- sysuser-tools.changes | 8 ++++++++ sysusers-generate-pre | 4 ++-- sysusers2shadow.sh | 4 ++-- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/macros.sysusers b/macros.sysusers index 394c4af..6eaa325 100644 --- a/macros.sysusers +++ b/macros.sysusers @@ -10,7 +10,7 @@ # add "%sysusers_generate_pre []" to build section # ## is the source file as defined in the spec file header -## is just a random name, th output file will be ".pre" +## is just a random name, the output file will be ".pre" ## is the name of the configuration file as stored in ## /usr/lib/sysusers.d/ # diff --git a/sysuser-tools.changes b/sysuser-tools.changes index 98e8d9e..226b8dc 100644 --- a/sysuser-tools.changes +++ b/sysuser-tools.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon Jun 7 11:11:27 UTC 2021 - Thorsten Kukuk + +- Support systemd-sysusers --replace=/usr/lib/sysusers.d/ option +- sysusers-generate-pre: only use first argument for grep +- sysusers2shadow.sh: use "run" prefix for systemd-sysusers call +- macros.sysusers: fix typo + ------------------------------------------------------------------- Sat May 8 13:19:03 UTC 2021 - Callum Farmer diff --git a/sysusers-generate-pre b/sysusers-generate-pre index 9d6897e..d664bcb 100644 --- a/sysusers-generate-pre +++ b/sysusers-generate-pre @@ -1,6 +1,6 @@ #!/bin/sh # pass systemd sysusers config paths as argument to this script. -echo "/usr/sbin/sysusers2shadow $3 <<\"EOF\" || [ -f /.buildenv ]" -grep -he '^[ugmr]' "$@" +echo "/usr/sbin/sysusers2shadow $2 <<\"EOF\" || [ -f /.buildenv ]" +grep -he '^[ugmr]' "$1" echo 'EOF' diff --git a/sysusers2shadow.sh b/sysusers2shadow.sh index 3849f25..4bd4b26 100644 --- a/sysusers2shadow.sh +++ b/sysusers2shadow.sh @@ -9,11 +9,11 @@ run() { if [ -x /usr/bin/systemd-sysusers ] && [ -e /proc/version ]; then - if [ -n "$1" ]; 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 - /usr/bin/systemd-sysusers $REPLACE_ARG - + run /usr/bin/systemd-sysusers $REPLACE_ARG - else # Absolute path to busybox, if found