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
This commit is contained in:
Thorsten Kukuk 2021-06-07 13:14:59 +00:00 committed by Git OBS Bridge
parent d60e82f465
commit 1d4aa7fd58
4 changed files with 13 additions and 5 deletions

View File

@ -10,7 +10,7 @@
# add "%sysusers_generate_pre <source file> <account> [<config>]" to build section
#
## <source file> is the source file as defined in the spec file header
## <account> is just a random name, th output file will be "<account>.pre"
## <account> is just a random name, the output file will be "<account>.pre"
## <config> is the name of the configuration file as stored in
## /usr/lib/sysusers.d/<config>
#

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Mon Jun 7 11:11:27 UTC 2021 - Thorsten Kukuk <kukuk@suse.com>
- 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 <gmbr3@opensuse.org>

View File

@ -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'

View File

@ -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