Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package sysuser-tools for openSUSE:Factory 
checked in at 2021-07-17 23:36:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/sysuser-tools (Old)
 and      /work/SRC/openSUSE:Factory/.sysuser-tools.new.2632 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "sysuser-tools"

Sat Jul 17 23:36:21 2021 rev:19 rq:906399 version:3.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/sysuser-tools/sysuser-tools.changes      
2021-07-01 07:05:30.699534630 +0200
+++ /work/SRC/openSUSE:Factory/.sysuser-tools.new.2632/sysuser-tools.changes    
2021-07-17 23:36:25.398069367 +0200
@@ -1,0 +2,11 @@
+Thu Jul 15 06:45:15 UTC 2021 - Thorsten Kukuk <ku...@suse.com>
+
+- Use /bin/bash for sysusers-generate-pre
+
+-------------------------------------------------------------------
+Tue Jun 29 13:08:44 UTC 2021 - Dan ??erm??k <dcer...@suse.com>
+
+- Remove usage of grep from sysusers-generate-pre
+- Add a simple test of sysusers-generate-pre to %check
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ sysuser-tools.spec ++++++
--- /var/tmp/diff_new_pack.8ka5VN/_old  2021-07-17 23:36:25.818066129 +0200
+++ /var/tmp/diff_new_pack.8ka5VN/_new  2021-07-17 23:36:25.822066099 +0200
@@ -31,6 +31,7 @@
 Requires:       sysuser-shadow
 #!BuildIgnore:  sysuser-shadow
 #!BuildIgnore:  sysuser-tools
+BuildRequires:  diffutils
 
 %description
 Generate auto provides for system users.
@@ -65,6 +66,30 @@
 install -D -m 644 %{SOURCE3} %{buildroot}%{_rpmmacrodir}/macros.sysusers
 install -D -m 755 %{SOURCE4} %{buildroot}%{_sbindir}/sysusers2shadow
 
+%check
+mkdir -p subdir
+cat <<EOF > subdir/me.conf
+# Type Name       ID     GECOS           [HOME]    Shell
+  u   me   -     "myself" /dev/null
+m   me  nogroup
+# foobar
+  g   asdf
+ z     welp invalid
+EOF
+
+cat <<EOFF > expected-account-pre
+/usr/sbin/sysusers2shadow me.conf <<"EOF" || [ -f /.buildenv ]
+u   me   -     "myself" /dev/null
+m   me  nogroup
+g   asdf
+EOF
+EOFF
+
+# copy pasta from macros.sysusers because the script sysusers-generate-pre is 
not in /usr/lib/rpm yet
+sh %{SOURCE2} $(pwd)/subdir/me.conf me.conf > account.pre
+
+diff account.pre expected-account-pre
+
 %files
 %defattr(-,root,root)
 %{_rpmmacrodir}/macros.sysusers

++++++ sysusers-generate-pre ++++++
--- /var/tmp/diff_new_pack.8ka5VN/_old  2021-07-17 23:36:25.858065821 +0200
+++ /var/tmp/diff_new_pack.8ka5VN/_new  2021-07-17 23:36:25.858065821 +0200
@@ -1,6 +1,6 @@
-#!/bin/sh
+#!/bin/bash
 # pass systemd sysusers config paths as argument to this script.
 
 echo "/usr/sbin/sysusers2shadow $2 <<\"EOF\" || [ -f /.buildenv ]"
-grep -he '^[ugmr]' "$1"
+(while read -r line; do if [[ $line =~ ^\s*[ugmr] ]]; then echo "$line"; fi; 
done) < "$1"
 echo 'EOF'

Reply via email to