3
0
forked from pool/sysuser-tools

Compare commits

...

9 Commits

Author SHA256 Message Date
Dominique Leuenberger
289f1c5c9e Accepting request 1232687 from Base:System
- Directly check return value of systemd-sysusers 

- Drop SLE15 support and remove disable-systemd-sysusers.patch

- sysuser-shadow: remove systemd 238 dependency, this does not
  work in a single RPM transaction [bsc#1234277]. Call
  systemd-sysuser instead again without --replace.

OBS-URL: https://build.opensuse.org/request/show/1232687
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/sysuser-tools?expand=0&rev=32
2024-12-20 14:24:36 +00:00
Thorsten Kukuk
a1088879d8 OBS-URL: https://build.opensuse.org/package/show/Base:System/sysuser-tools?expand=0&rev=67 2024-12-19 22:01:11 +00:00
Thorsten Kukuk
a787c1dc95 OBS-URL: https://build.opensuse.org/package/show/Base:System/sysuser-tools?expand=0&rev=66 2024-12-18 09:46:19 +00:00
Thorsten Kukuk
2b47e72f4f - Revert last changes partly, add Conflict for systemd < 238
OBS-URL: https://build.opensuse.org/package/show/Base:System/sysuser-tools?expand=0&rev=65
2024-12-18 09:28:30 +00:00
Thorsten Kukuk
a572aa9c30 - Directly check return value of systemd-sysusers
OBS-URL: https://build.opensuse.org/package/show/Base:System/sysuser-tools?expand=0&rev=64
2024-12-11 11:07:04 +00:00
Thorsten Kukuk
fac252d429 - Drop SLE15 support and remove disable-systemd-sysusers.patch
OBS-URL: https://build.opensuse.org/package/show/Base:System/sysuser-tools?expand=0&rev=63
2024-12-09 06:30:48 +00:00
Thorsten Kukuk
69b475fe74 - sysuser-shadow: remove systemd 238 dependency, this does not
work in a single RPM transaction [bsc#1234277]. Call
  systemd-sysuser instead again without --replace.

OBS-URL: https://build.opensuse.org/package/show/Base:System/sysuser-tools?expand=0&rev=62
2024-12-09 06:28:19 +00:00
Ana Guerrero
b7bd900db3 Accepting request 1204306 from Base:System
OBS-URL: https://build.opensuse.org/request/show/1204306
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/sysuser-tools?expand=0&rev=31
2024-09-29 16:08:58 +00:00
Thorsten Kukuk
3834ccce68 - Remove check for .buildenv to see failures in OBS
OBS-URL: https://build.opensuse.org/package/show/Base:System/sysuser-tools?expand=0&rev=61
2024-09-28 06:58:41 +00:00
5 changed files with 28 additions and 36 deletions

View File

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

View File

@ -1,3 +1,25 @@
-------------------------------------------------------------------
Wed Dec 11 11:05:25 UTC 2024 - Thorsten Kukuk <kukuk@suse.com>
- Directly check return value of systemd-sysusers
-------------------------------------------------------------------
Mon Dec 9 06:30:23 UTC 2024 - Thorsten Kukuk <kukuk@suse.com>
- Drop SLE15 support and remove disable-systemd-sysusers.patch
-------------------------------------------------------------------
Mon Dec 9 05:59:25 UTC 2024 - Thorsten Kukuk <kukuk@suse.com>
- 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 <kukuk@suse.com>
- Remove check for .buildenv to see failures in OBS
-------------------------------------------------------------------
Wed Aug 7 10:04:38 UTC 2024 - Thorsten Kukuk <kukuk@suse.com>

View File

@ -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
@ -82,7 +72,7 @@ m me nogroup
EOF
cat <<EOFF > expected-account-pre
/usr/sbin/sysusers2shadow me.conf <<"EOF" || [ -f /.buildenv ]
/usr/sbin/sysusers2shadow me.conf <<"EOF"
u me - "myself" /dev/null
m me nogroup
g asdf

View File

@ -1,6 +1,6 @@
#!/bin/bash
# pass systemd sysusers config paths as argument to this script.
echo "/usr/sbin/sysusers2shadow $2 <<\"EOF\" || [ -f /.buildenv ]"
echo "/usr/sbin/sysusers2shadow $2 <<\"EOF\""
(while read -r line; do if [[ $line =~ ^\s*[ugmr] ]]; then echo "$line"; fi; done) < "$1"
echo 'EOF'

View File

@ -10,10 +10,12 @@ run() {
if [ -x /usr/bin/systemd-sysusers ] && [ -e /proc/version ]; then
if [ -n "$1" ] && [ "$1" != "%3" ]; then
REPLACE_ARG="--replace=/usr/lib/sysusers.d/$1" ||:
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=