Accepting request 872280 from Base:System
- Don't abort on unbound first argument (forwarded request 872279 from kukuk) OBS-URL: https://build.opensuse.org/request/show/872280 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/sysuser-tools?expand=0&rev=16
This commit is contained in:
commit
b862de009b
@ -7,7 +7,12 @@
|
|||||||
#
|
#
|
||||||
# add %sysusers_requires in the package section
|
# add %sysusers_requires in the package section
|
||||||
#
|
#
|
||||||
# add "%sysusers_generate_pre <source file> <account>" to build section
|
# 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"
|
||||||
|
## <config> is the name of the configuration file as stored in
|
||||||
|
## /usr/lib/sysusers.d/<config>
|
||||||
#
|
#
|
||||||
# add "%pre -f <account>.pre" to spec file
|
# add "%pre -f <account>.pre" to spec file
|
||||||
#
|
#
|
||||||
@ -16,4 +21,4 @@
|
|||||||
%sysusers_requires Requires(pre): sysuser-shadow
|
%sysusers_requires Requires(pre): sysuser-shadow
|
||||||
|
|
||||||
%sysusers_generate_pre() \
|
%sysusers_generate_pre() \
|
||||||
%{_prefix}/lib/rpm/sysusers-generate-pre "%1" > "%2".pre
|
%{_prefix}/lib/rpm/sysusers-generate-pre "%1" "%3" > "%2".pre
|
||||||
|
@ -1,3 +1,50 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Feb 15 07:30:25 UTC 2021 - Thorsten Kukuk <kukuk@suse.com>
|
||||||
|
|
||||||
|
- Don't abort on unbound first argument
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Feb 11 13:54:01 UTC 2021 - Thorsten Kukuk <kukuk@suse.com>
|
||||||
|
|
||||||
|
- Remove sysusers/nscd workaround
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Jan 29 13:36:08 UTC 2021 - Thorsten Kukuk <kukuk@suse.com>
|
||||||
|
|
||||||
|
- Use systemd-sysusers only if /proc is mounted, don't require it
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jan 27 13:02:13 UTC 2021 - Thorsten Kukuk <kukuk@suse.com>
|
||||||
|
|
||||||
|
- Set --replace option for systemd-sysusers
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jan 20 15:06:51 UTC 2021 - Thorsten Kukuk <kukuk@suse.com>
|
||||||
|
|
||||||
|
- Ignore nscd return code
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jan 19 15:15:41 UTC 2021 - Thorsten Kukuk <kukuk@suse.com>
|
||||||
|
|
||||||
|
- If systemd-sysusers is used to create a new user/group, invalidate
|
||||||
|
the nscd passwd and group cache to make the new user/group
|
||||||
|
visible immediately as workaround [bsc#1181121].
|
||||||
|
Needs to be removed after sytemd-sysusers get's fixed, since we
|
||||||
|
invalidate the cache even if the user/group file wasn't changed.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Jan 17 21:16:25 UTC 2021 - Thorsten Kukuk <kukuk@suse.com>
|
||||||
|
|
||||||
|
- An "u" in a sysusers.d file will create an user and a group.
|
||||||
|
Create provides for both, user and group.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jan 14 14:30:20 UTC 2021 - Thorsten Kukuk <kukuk@suse.com>
|
||||||
|
|
||||||
|
- Use systemd-sysusers as default to create and update the user
|
||||||
|
account. Fixes the problem that a modified sysusers config file
|
||||||
|
get's ignored by useradd and adduser [bsc#1180549].
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Dec 4 10:54:00 UTC 2020 - Ludwig Nussel <lnussel@suse.de>
|
Fri Dec 4 10:54:00 UTC 2020 - Ludwig Nussel <lnussel@suse.de>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package sysuser-tools
|
# spec file for package sysuser-tools
|
||||||
#
|
#
|
||||||
# Copyright (c) 2020 SUSE LLC
|
# Copyright (c) 2021 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -38,7 +38,7 @@ Generate auto provides for system users.
|
|||||||
%package -n sysuser-shadow
|
%package -n sysuser-shadow
|
||||||
Summary: Tool to execute sysusers.d with shadow utilities
|
Summary: Tool to execute sysusers.d with shadow utilities
|
||||||
Group: System/Packages
|
Group: System/Packages
|
||||||
PreReq: useradd_or_adduser_dep
|
Requires(pre): (/usr/sbin/useradd or busybox)
|
||||||
# prefer original shadow over busybox by default
|
# prefer original shadow over busybox by default
|
||||||
Suggests: shadow
|
Suggests: shadow
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# pass systemd sysusers config paths as argument to this script.
|
# pass systemd sysusers config paths as argument to this script.
|
||||||
|
|
||||||
echo '/usr/sbin/sysusers2shadow <<"EOF" || [ -f /.buildenv ]'
|
echo "/usr/sbin/sysusers2shadow $3 <<\"EOF\" || [ -f /.buildenv ]"
|
||||||
grep -he '^[ugmr]' "$@"
|
grep -he '^[ugmr]' "$@"
|
||||||
echo 'EOF'
|
echo 'EOF'
|
||||||
|
@ -11,6 +11,7 @@ parse()
|
|||||||
echo "group($2)"
|
echo "group($2)"
|
||||||
elif [ "$1" = 'u' ]; then
|
elif [ "$1" = 'u' ]; then
|
||||||
echo "user($2)"
|
echo "user($2)"
|
||||||
|
echo "group($2)"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -eu
|
set -e
|
||||||
|
|
||||||
# Print the command and run it
|
# Print the command and run it
|
||||||
run() {
|
run() {
|
||||||
@ -7,6 +7,15 @@ run() {
|
|||||||
"$@"
|
"$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if [ -x /usr/bin/systemd-sysusers ] && [ -e /proc/version ]; then
|
||||||
|
|
||||||
|
if [ -n "$1" ]; 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 -
|
||||||
|
else
|
||||||
|
|
||||||
# Absolute path to busybox, if found
|
# Absolute path to busybox, if found
|
||||||
busybox=
|
busybox=
|
||||||
for i in /bin/busybox /usr/bin/busybox; do [ -x "$i" ] && busybox=$i; done
|
for i in /bin/busybox /usr/bin/busybox; do [ -x "$i" ] && busybox=$i; done
|
||||||
@ -89,3 +98,4 @@ do
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user