From aff93c9d23b6dd9d22db79b3f99d8b7ba4bfe46924c01c7b9f40626edba7189b Mon Sep 17 00:00:00 2001 From: Thorsten Kukuk Date: Thu, 9 May 2019 13:51:43 +0000 Subject: [PATCH] Accepting request 701787 from home:kukuk:branches:Base:System - Fix default home directory [bsc#1105934] - Use _rpmmacrodir for macro file OBS-URL: https://build.opensuse.org/request/show/701787 OBS-URL: https://build.opensuse.org/package/show/Base:System/sysuser-tools?expand=0&rev=15 --- sysuser-tools.changes | 8 +++++++- sysuser-tools.spec | 8 ++++---- sysusers2shadow.sh | 2 ++ 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/sysuser-tools.changes b/sysuser-tools.changes index 974194d..cbea59f 100644 --- a/sysuser-tools.changes +++ b/sysuser-tools.changes @@ -1,7 +1,13 @@ +------------------------------------------------------------------- +Thu May 9 13:23:56 CEST 2019 - kukuk@suse.de + +- Fix default home directory [bsc#1105934] +- Use _rpmmacrodir for macro file + ------------------------------------------------------------------- Mon Oct 9 13:51:42 UTC 2017 - dimstar@opensuse.org -- Furhter enhance sysusers-generate-pre: inside the build +- Further 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 diff --git a/sysuser-tools.spec b/sysuser-tools.spec index ce8c44d..aed912f 100644 --- a/sysuser-tools.spec +++ b/sysuser-tools.spec @@ -1,7 +1,7 @@ # # spec file for package sysuser-tools # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 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 @@ -12,7 +12,7 @@ # 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/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -54,12 +54,12 @@ and groups from it like systemd-sysusers would do. 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 644 %{SOURCE3} %{buildroot}%{_rpmmacrodir}/macros.sysusers install -D -m 755 %{SOURCE4} %{buildroot}%{_sbindir}/sysusers2shadow %files %defattr(-,root,root) -%{_sysconfdir}/rpm/macros.sysusers +%{_rpmmacrodir}/macros.sysusers %{_prefix}/lib/rpm/sysusers.prov %{_prefix}/lib/rpm/fileattrs/sysusers.attr %{_prefix}/lib/rpm/sysusers-generate-pre diff --git a/sysusers2shadow.sh b/sysusers2shadow.sh index 61d28f0..8a12163 100644 --- a/sysusers2shadow.sh +++ b/sysusers2shadow.sh @@ -22,6 +22,8 @@ do fi if [ ! -z "${arr[4]}" -a "${arr[4]}" != "-" ]; then ARGUMENTS="-d ${arr[4]} $ARGUMENTS" + else + ARGUMENTS="-d / $ARGUMENTS" fi /usr/bin/getent group ${arr[1]} >> /dev/null if [ $? -eq 0 ]; then