10 Commits

Author SHA256 Message Date
071977fd44 Accepting request 1301825 from Base:System
- Fallback to useradd if systemd is older than v257 [bsc#1248855]

OBS-URL: https://build.opensuse.org/request/show/1301825
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/sysuser-tools?expand=0&rev=36
2025-09-09 18:28:59 +00:00
3d5e218c8a OBS-URL: https://build.opensuse.org/package/show/Base:System/sysuser-tools?expand=0&rev=77 2025-08-28 16:00:53 +00:00
67e57c9e28 OBS-URL: https://build.opensuse.org/package/show/Base:System/sysuser-tools?expand=0&rev=76 2025-08-28 15:33:41 +00:00
04a3e5eebe OBS-URL: https://build.opensuse.org/package/show/Base:System/sysuser-tools?expand=0&rev=75 2025-08-28 15:28:52 +00:00
236b67f108 - Fallback to useradd if systemd is older than v257 [bsc#1248855]
OBS-URL: https://build.opensuse.org/package/show/Base:System/sysuser-tools?expand=0&rev=74
2025-08-28 15:21:11 +00:00
e76575c74c Accepting request 1301527 from Base:System
- Don't set TZ=UTC for chage to avoid dependency on env.

- Use run macro for chage for log files/debugging.

- Generate provides for "u!".

OBS-URL: https://build.opensuse.org/request/show/1301527
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/sysuser-tools?expand=0&rev=35
2025-08-27 19:34:12 +00:00
e6ce448d04 - Don't set TZ=UTC for chage to avoid dependency on env.
OBS-URL: https://build.opensuse.org/package/show/Base:System/sysuser-tools?expand=0&rev=73
2025-08-27 06:58:02 +00:00
d38ba0510d - Use run macro for chage for log files/debugging.
OBS-URL: https://build.opensuse.org/package/show/Base:System/sysuser-tools?expand=0&rev=72
2025-08-26 09:45:34 +00:00
585cbae300 - Generate provides for "u!".
OBS-URL: https://build.opensuse.org/package/show/Base:System/sysuser-tools?expand=0&rev=71
2025-08-25 07:17:57 +00:00
c2853cc7a5 sysusers.prov: support "u!"
OBS-URL: https://build.opensuse.org/package/show/Base:System/sysuser-tools?expand=0&rev=70
2025-08-25 06:19:22 +00:00
4 changed files with 30 additions and 6 deletions

View File

@@ -1,3 +1,23 @@
-------------------------------------------------------------------
Thu Aug 28 15:16:04 UTC 2025 - Thorsten Kukuk <kukuk@suse.com>
- Fallback to useradd if systemd is older than v257 [bsc#1248855]
-------------------------------------------------------------------
Wed Aug 27 06:56:02 UTC 2025 - Thorsten Kukuk <kukuk@suse.com>
- Don't set TZ=UTC for chage to avoid dependency on env.
-------------------------------------------------------------------
Tue Aug 26 09:45:05 UTC 2025 - Thorsten Kukuk <kukuk@suse.com>
- Use run macro for chage for log files/debugging.
-------------------------------------------------------------------
Mon Aug 25 07:17:30 UTC 2025 - Thorsten Kukuk <kukuk@suse.com>
- Generate provides for "u!".
-------------------------------------------------------------------
Wed Jul 23 18:28:04 UTC 2025 - Marcus Meissner <meissner@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package sysuser-tools
#
# Copyright (c) 2025 SUSE LLC
# Copyright (c) 2025 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed

View File

@@ -9,7 +9,7 @@ parse()
set -- $line
if [ "$1" = 'g' ]; then
echo "group($2)"
elif [ "$1" = 'u' ]; then
elif [ "$1" = 'u' ] || [ "$1" = 'u!' ] ; then
echo "user($2)"
echo "group($2)"
fi

View File

@@ -7,15 +7,19 @@ run() {
"$@"
}
SYSTEMD_VERSION=0
if [ -x /usr/bin/systemd-sysusers ] && [ -e /proc/version ]; then
SYSTEMD_VERSION=$(systemd-sysusers --version | head -n1 | sed 's|systemd \([0-9]\+\).*|\1|g')
fi
# "u!" is only supported with systemd-sysusers v257 or newer
if [ -x /usr/bin/systemd-sysusers ] && [ -e /proc/version ] && [ $SYSTEMD_VERSION -ge 257 ]; 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
if ! run /usr/bin/systemd-sysusers $REPLACE_ARG - ; then
run /usr/bin/systemd-sysusers -
fi
run /usr/bin/systemd-sysusers $REPLACE_ARG -
else
# Absolute path to busybox, if found
busybox=
@@ -94,7 +98,7 @@ else
run /usr/sbin/useradd -r -c "$3" -d "${homedir}" $ARGUMENTS
if [ -n "$EXPIRE_DATE" ]; then
TZ=UTC chage -E "$EXPIRE_DATE" "$1"
run chage -E "$EXPIRE_DATE" "$1"
fi
elif [ -x "$busybox" ]; then
if [ -n "$GROUP_ID" ] && [ "$GROUP_ID" != "-" ]; then