Hello community, here is the log from the commit of package sysuser-tools.14527 for openSUSE:Leap:15.1:Update checked in at 2020-10-20 06:20:47 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Leap:15.1:Update/sysuser-tools.14527 (Old) and /work/SRC/openSUSE:Leap:15.1:Update/.sysuser-tools.14527.new.3486 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "sysuser-tools.14527" Tue Oct 20 06:20:47 2020 rev:1 rq:842202 version:2.0 Changes: -------- New Changes file: --- /dev/null 2020-10-12 00:46:48.009358834 +0200 +++ /work/SRC/openSUSE:Leap:15.1:Update/.sysuser-tools.14527.new.3486/sysuser-tools.changes 2020-10-20 06:20:47.786467314 +0200 @@ -0,0 +1,60 @@ +------------------------------------------------------------------- +Mon Oct 9 13:51:42 UTC 2017 - dims...@opensuse.org + +- Furhter enhance sysusers-generate-pre: inside the build + environment, it can be acceptable to be failing to create the + users (e.g when building sysuser-tools or system-user-root, since + those two packages have to be speificallty excluded). Always + return with error code 0 if /.buildenv exists. + +------------------------------------------------------------------- +Wed Sep 27 11:06:52 UTC 2017 - dims...@opensuse.org + +- sysusers2shadow.sh: Exit if one of the useradd/groupadd/usermod + call fails: the resulting system is quite undefined if this + should happen. +- sysusers-generate-pre: exit the pre script with the exit code + of sysusers2shadow.sh. + +------------------------------------------------------------------- +Mon Jun 19 14:07:51 CEST 2017 - ku...@suse.de + +- sysuser-tools needs to require sysuser-shadow + +------------------------------------------------------------------- +Mon Jun 19 13:48:34 CEST 2017 - ku...@suse.de + +- Add requires for shadow to sysuser-shadow + +------------------------------------------------------------------- +Sun Jun 18 18:07:24 CEST 2017 - ku...@suse.de + +- Put helper script into own subpackage + +------------------------------------------------------------------- +Sat Jun 17 09:20:09 CEST 2017 - ku...@suse.de + +- Convert sysusers config file to shadow arguments and use + shadow suite to create user and groups. Fixes [bsc#1041497] and + serveral dependency loops. + +------------------------------------------------------------------- +Tue May 30 10:07:45 CEST 2017 - ku...@suse.de + +- Don't ignore errors of systemd-sysusers [bsc#1039708] + +------------------------------------------------------------------- +Wed Mar 15 14:46:43 CET 2017 - ku...@suse.de + +- Don't remove 'm' and 'r' entries from sysusers configuration + +------------------------------------------------------------------- +Fri Jan 20 13:04:51 CET 2017 - ku...@suse.de + +- Add macros.sysusers + +------------------------------------------------------------------- +Wed Dec 21 16:09:05 UTC 2016 - lnus...@suse.de + +- initial package + New: ---- macros.sysusers sysuser-tools.changes sysuser-tools.spec sysusers-generate-pre sysusers.attr sysusers.prov sysusers2shadow.sh ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ sysuser-tools.spec ++++++ # # spec file for package sysuser-tools # # Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # Name: sysuser-tools Version: 2.0 Release: 0 Summary: Auto provides for system users License: MIT Group: System/Packages Source: sysusers.prov Source1: sysusers.attr Source2: sysusers-generate-pre Source3: macros.sysusers Source4: sysusers2shadow.sh BuildArch: noarch Requires: sysuser-shadow #!BuildIgnore: sysuser-shadow #!BuildIgnore: sysuser-tools %description Generate auto provides for system users. %package -n sysuser-shadow Summary: Tool to execute sysusers.d with shadow utilities Group: System/Packages Requires: shadow %description -n sysuser-shadow This package contians a tool, which expects as input a sysusers.d configuration file and uses the shadow suite to create the users and groups from it like systemd-sysusers would do. %prep %setup -qcT %build %install install -D -m 755 %{SOURCE0} %{buildroot}%{_prefix}/lib/rpm/sysusers.prov install -D -m 644 %{SOURCE1} %{buildroot}%{_prefix}/lib/rpm/fileattrs/sysusers.attr install -D -m 755 %{SOURCE2} %{buildroot}%{_prefix}/lib/rpm/sysusers-generate-pre install -D -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/rpm/macros.sysusers install -D -m 755 %{SOURCE4} %{buildroot}%{_sbindir}/sysusers2shadow %files %defattr(-,root,root) %{_sysconfdir}/rpm/macros.sysusers %{_prefix}/lib/rpm/sysusers.prov %{_prefix}/lib/rpm/fileattrs/sysusers.attr %{_prefix}/lib/rpm/sysusers-generate-pre %files -n sysuser-shadow %defattr(-,root,root) %{_sbindir}/sysusers2shadow %changelog ++++++ macros.sysusers ++++++ # -*- Mode: makefile; indent-tabs-mode: t -*- */ # RPM macros for packages creating system accounts # ### # # When a package creates a system account, it should use the following macros: # # add %sysusers_requires in the package section # # add "%sysusers_generate_pre <source file> <account>" to build section # # add "%pre -f <account>.pre" to spec file # ### # This is for useradd/usermod/groupadd %sysusers_requires Requires(pre): shadow sysuser-shadow %sysusers_generate_pre() \ %{_prefix}/lib/rpm/sysusers-generate-pre "%1" > "%2".pre ++++++ sysusers-generate-pre ++++++ #!/bin/bash # pass systemd sysusers config files a as argument to this script. # It will output a shell script that creates those users by # appending the data to itself. tmpfile=`mktemp -q -t sysusers.XXXXXX` cleanup() { rm -f "$tmpfile" } trap cleanup EXIT for i in "$@"; do grep -e '^[ugmr]' "$i" >> "$tmpfile" done lines=`wc -l < "$tmpfile"` echo '#!/bin/bash' echo "tail -n $lines \$0 | /usr/sbin/sysusers2shadow" echo 'RET=$?' echo 'test -f /.buildenv && exit 0' echo 'exit $RET' echo '######## data below ########' cat "$tmpfile" ++++++ sysusers.attr ++++++ %__sysusers_provides %{_rpmconfigdir}/sysusers.prov %__sysusers_path ^%{_prefix}/lib/sysusers.d/.*\\.conf$ ++++++ sysusers.prov ++++++ #!/bin/bash parse() { while read line; do [ "${line:0:1}" != '#' ] || continue line="${line## *}" [ -n "$line" ] || continue set -- $line if [ "$1" = 'g' ]; then echo "group($2)" elif [ "$1" = 'u' ]; then echo "user($2)" fi done } while read fn; do parse < "$fn" done ++++++ sysusers2shadow.sh ++++++ #!/bin/bash while read LINE do case "$LINE" in \#*|"") ;; g*) eval arr=( $LINE ) ARGUMENTS="${arr[1]}" if [ ! -z "${arr[2]}" -a "${arr[2]}" != "-" ]; then ARGUMENTS="-g ${arr[2]} $ARGUMENTS" fi echo "groupadd -r $ARGUMENTS" /usr/bin/getent group "${arr[1]}" >> /dev/null || /usr/sbin/groupadd -r $ARGUMENTS || exit $? ;; u*) eval arr=( $LINE ) ARGUMENTS="${arr[1]}" if [ ! -z "${arr[2]}" -a "${arr[2]}" != "-" ]; then ARGUMENTS="-u ${arr[2]} $ARGUMENTS" fi if [ ! -z "${arr[4]}" -a "${arr[4]}" != "-" ]; then ARGUMENTS="-d ${arr[4]} $ARGUMENTS" fi /usr/bin/getent group ${arr[1]} >> /dev/null if [ $? -eq 0 ]; then ARGUMENTS="-g ${arr[1]} $ARGUMENTS" else ARGUMENTS="-U $ARGUMENTS" fi echo "useradd -r -s /sbin/nologin -c \"${arr[3]}\" $ARGUMENTS" /usr/bin/getent passwd ${arr[1]} >> /dev/null || /usr/sbin/useradd -r -s /sbin/nologin -c "${arr[3]}" $ARGUMENTS || exit $? ;; m*) eval arr=( $LINE ) echo "usermod -a -G ${arr[2]} ${arr[1]}" /usr/sbin/usermod -a -G ${arr[2]} ${arr[1]} || exit $? ;; r*) echo "range option ignored: \"$LINE\"" ;; *) echo "Syntax Error: \"$LINE\"" exit 1 ;; esac done