From 69e47750b58b3df557d36fd484c413c73161d937244f5f89649fab74d95d2eda Mon Sep 17 00:00:00 2001 From: Thorsten Kukuk Date: Wed, 7 Jun 2017 09:57:43 +0000 Subject: [PATCH 1/5] Accepting request 501437 from home:dimstar:Factory - BuildRequire pkgconfig(systemd) instead of systemd: this allows OBS to pick systemd-mini, which is still good enough. And ultimately it helps us break a build cycle (system-users - libssh2_org - curl - systemd - system-users). OBS-URL: https://build.opensuse.org/request/show/501437 OBS-URL: https://build.opensuse.org/package/show/Base:System/system-users?expand=0&rev=17 --- system-users.changes | 8 ++++++++ system-users.spec | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/system-users.changes b/system-users.changes index 01bac9f..4709b14 100644 --- a/system-users.changes +++ b/system-users.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Jun 6 14:52:27 UTC 2017 - dimstar@opensuse.org + +- BuildRequire pkgconfig(systemd) instead of systemd: this allows + OBS to pick systemd-mini, which is still good enough. And + ultimately it helps us break a build cycle + (system-users - libssh2_org - curl - systemd - system-users). + ------------------------------------------------------------------- Wed May 3 11:35:55 CEST 2017 - kukuk@suse.de diff --git a/system-users.spec b/system-users.spec index 745d174..4c29c0c 100644 --- a/system-users.spec +++ b/system-users.spec @@ -38,8 +38,8 @@ Source13: system-user-ftp.conf Source14: system-user-lp.conf Source15: system-user-nobody.conf Source16: system-user-upsd.conf -BuildRequires: systemd BuildRequires: sysuser-tools +BuildRequires: pkgconfig(systemd) BuildArch: noarch %description From 8002a1e16a197be2e0d36df002046d735ccdadfd917620ee57030383e351ddec Mon Sep 17 00:00:00 2001 From: Thorsten Kukuk Date: Wed, 7 Jun 2017 10:15:01 +0000 Subject: [PATCH 2/5] Accepting request 501651 from home:kukuk:sysusers - BuildIgnore group(lock) and group(daemon) for ourselves, needed for bootstrap. OBS-URL: https://build.opensuse.org/request/show/501651 OBS-URL: https://build.opensuse.org/package/show/Base:System/system-users?expand=0&rev=18 --- system-users.changes | 6 ++++++ system-users.spec | 3 +++ 2 files changed, 9 insertions(+) diff --git a/system-users.changes b/system-users.changes index 4709b14..9df7325 100644 --- a/system-users.changes +++ b/system-users.changes @@ -6,6 +6,12 @@ Tue Jun 6 14:52:27 UTC 2017 - dimstar@opensuse.org ultimately it helps us break a build cycle (system-users - libssh2_org - curl - systemd - system-users). +------------------------------------------------------------------- +Tue Jun 6 13:29:49 UTC 2017 - lnussel@suse.de + +- BuildIgnore group(lock) and group(daemon) for ourselves, needed + for bootstrap. + ------------------------------------------------------------------- Wed May 3 11:35:55 CEST 2017 - kukuk@suse.de diff --git a/system-users.spec b/system-users.spec index 4c29c0c..1f9331c 100644 --- a/system-users.spec +++ b/system-users.spec @@ -48,6 +48,7 @@ This package provides various system users and their directories %package -n system-user-bin Summary: System user and group 'bin' #!BuildIgnore: user(daemon) +#!BuildIgnore: user(daemon) Group: System/Fhs Requires(pre): user(daemon) %{sysusers_requires} @@ -85,6 +86,7 @@ and their corresponding directories. %package -n system-user-uucp Summary: System user and group uucp +#!BuildIgnore: group(lock) Group: System/Fhs Requires(pre): group(lock) %{sysusers_requires} @@ -176,6 +178,7 @@ This package provides the system account and group 'nobody'. %package -n system-user-upsd Summary: System user upsd +#!BuildIgnore: group(daemon) Group: System/Fhs Requires(pre): group(daemon) %{sysusers_requires} From 94ecb5f73c88129056b70285fda348cc7593ddef388f17447a828825f9d3c8d4 Mon Sep 17 00:00:00 2001 From: Thorsten Kukuk Date: Wed, 7 Jun 2017 10:19:07 +0000 Subject: [PATCH 3/5] Accepting request 501658 from home:kukuk:sysusers OBS-URL: https://build.opensuse.org/request/show/501658 OBS-URL: https://build.opensuse.org/package/show/Base:System/system-users?expand=0&rev=19 --- system-users.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/system-users.spec b/system-users.spec index 1f9331c..7ed25be 100644 --- a/system-users.spec +++ b/system-users.spec @@ -48,7 +48,6 @@ This package provides various system users and their directories %package -n system-user-bin Summary: System user and group 'bin' #!BuildIgnore: user(daemon) -#!BuildIgnore: user(daemon) Group: System/Fhs Requires(pre): user(daemon) %{sysusers_requires} From 73b672ea935a9a1960c8780e382fbfe32c1e6a3c5a85669e62b1db0b32a0f97e Mon Sep 17 00:00:00 2001 From: Thorsten Kukuk Date: Fri, 9 Jun 2017 10:02:06 +0000 Subject: [PATCH 4/5] Accepting request 502534 from home:kukuk:sysusers - Add utmp to system-group-hardware.conf like systemd has - Create new system-user-root sub-package creating passwd, group and shadow files with root user. OBS-URL: https://build.opensuse.org/request/show/502534 OBS-URL: https://build.opensuse.org/package/show/Base:System/system-users?expand=0&rev=20 --- system-group-hardware.conf | 1 + system-user-root.conf | 11 ++++++++ system-users.changes | 7 ++++++ system-users.spec | 51 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 70 insertions(+) create mode 100644 system-user-root.conf diff --git a/system-group-hardware.conf b/system-group-hardware.conf index 38fab59..ab85b2a 100644 --- a/system-group-hardware.conf +++ b/system-group-hardware.conf @@ -3,6 +3,7 @@ g kmem - - - g lock - - - g tty 5 - - +g utmp - - - # Hardware access groups g audio - - - g cdrom - - - diff --git a/system-user-root.conf b/system-user-root.conf new file mode 100644 index 0000000..19e5705 --- /dev/null +++ b/system-user-root.conf @@ -0,0 +1,11 @@ +# Type Name ID GECOS [HOME] + +# The superuser +g root 0 - - +u root 0 root /root + +# Group owner of /etc/shadow +g shadow 15 - - + +# Default group for normal users +g users 100 - - diff --git a/system-users.changes b/system-users.changes index 9df7325..c8e8a98 100644 --- a/system-users.changes +++ b/system-users.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Jun 9 11:56:50 CEST 2017 - kukuk@suse.de + +- Add utmp to system-group-hardware.conf like systemd has +- Create new system-user-root sub-package creating passwd, group + and shadow files with root user. + ------------------------------------------------------------------- Tue Jun 6 14:52:27 UTC 2017 - dimstar@opensuse.org diff --git a/system-users.spec b/system-users.spec index 7ed25be..0d8e6b3 100644 --- a/system-users.spec +++ b/system-users.spec @@ -38,6 +38,7 @@ Source13: system-user-ftp.conf Source14: system-user-lp.conf Source15: system-user-nobody.conf Source16: system-user-upsd.conf +Source17: system-user-root.conf BuildRequires: sysuser-tools BuildRequires: pkgconfig(systemd) BuildArch: noarch @@ -186,6 +187,25 @@ Requires(pre): group(daemon) This package provides the system account 'upsd'. +# +# system user root is special, since we need user root, +# group root, shadow and users right from the beginning +# before systemd is installable. +# + +%package -n system-user-root +Summary: System user root +Group: System/Fhs +Provides: group(root) +Provides: group(shadow) +Provides: group(users) +Provides: user(root) + +%description -n system-user-root +This package provides the root account including the groups root, +shadow and users. + + %prep %setup -q -c -T @@ -234,6 +254,7 @@ install -m 644 %{SOURCE13} %{buildroot}%{_sysusersdir}/system-user-ftp.conf install -m 644 %{SOURCE14} %{buildroot}%{_sysusersdir}/system-user-lp.conf install -m 644 %{SOURCE15} %{buildroot}%{_sysusersdir}/system-user-nobody.conf install -m 644 %{SOURCE16} %{buildroot}%{_sysusersdir}/system-user-upsd.conf +install -m 644 %{SOURCE17} %{buildroot}%{_sysusersdir}/system-user-root.conf %pre -n system-user-uucp -f uucp.pre %pre -n system-user-games -f games.pre @@ -254,6 +275,36 @@ install -m 644 %{SOURCE16} %{buildroot}%{_sysusersdir}/system-user-upsd.conf %pre -n system-user-upsd -f upsd.pre +%pre -n system-user-root -p +if not posix.access("/etc", "f") then + posix.mkdir("/etc") +end +if not posix.access("/etc/passwd", "f") then + file = io.open("/etc/passwd", "a+") + file:write("root:x:0:0:root:/root:/bin/bash\n") + file:close() + posix.chmod("/etc/passwd", 0644) +end +if not posix.access("/etc/group", "f") then + file = io.open("/etc/group", "a+") + file:write("root:x:0:\nshadow:x:15:\nusers:x:100:\n") + file:close() + posix.chmod("/etc/group", 0644) +end +if not posix.access("/etc/shadow", "f") then + file = io.open("/etc/shadow", "a+") + local date = os.time() + date = math.floor(date / 86400) + file:write("root::", date, "::::::\n") + file:close() + posix.chown("/etc/shadow", 0, 15) + posix.chmod("/etc/shadow", 0640) +end + +%files -n system-user-root +%defattr(-,root,root) +%{_sysusersdir}/system-user-root.conf + %files -n system-user-uucp %defattr(-,root,root) %dir %attr(0750,uucp,uucp) %{_sysconfdir}/uucp From 2a7db287bec7c8d38f4552e5a4bddd1d508f2c3a77c9975a27d71f7011619a4c Mon Sep 17 00:00:00 2001 From: Thorsten Kukuk Date: Tue, 20 Jun 2017 10:45:19 +0000 Subject: [PATCH 5/5] Accepting request 505023 from home:kukuk:sysusers - Move group trusted into system-user-root package [bsc#1044014] - Move system-user-root into own package - Fix syntax of groups in system-user-root.conf OBS-URL: https://build.opensuse.org/request/show/505023 OBS-URL: https://build.opensuse.org/package/show/Base:System/system-users?expand=0&rev=21 --- system-group-hardware.conf | 22 ++++++------ system-group-trusted.conf | 2 -- system-user-root.conf | 11 ------ system-users.changes | 15 ++++++++ system-users.spec | 70 ++------------------------------------ 5 files changed, 28 insertions(+), 92 deletions(-) delete mode 100644 system-group-trusted.conf delete mode 100644 system-user-root.conf diff --git a/system-group-hardware.conf b/system-group-hardware.conf index ab85b2a..f32e664 100644 --- a/system-group-hardware.conf +++ b/system-group-hardware.conf @@ -1,14 +1,14 @@ # Type Name ID GECOS [HOME] # Access to certain kernel and userspace facilities -g kmem - - - -g lock - - - -g tty 5 - - -g utmp - - - +g kmem - - +g lock - - +g tty 5 - +g utmp - - # Hardware access groups -g audio - - - -g cdrom - - - -g dialout - - - -g disk - - - -g input - - - -g tape - - - -g video - - - +g audio - - +g cdrom - - +g dialout - - +g disk - - +g input - - +g tape - - +g video - - diff --git a/system-group-trusted.conf b/system-group-trusted.conf deleted file mode 100644 index 83fc07b..0000000 --- a/system-group-trusted.conf +++ /dev/null @@ -1,2 +0,0 @@ -# Type Name ID GECOS [HOME] -g trusted - diff --git a/system-user-root.conf b/system-user-root.conf deleted file mode 100644 index 19e5705..0000000 --- a/system-user-root.conf +++ /dev/null @@ -1,11 +0,0 @@ -# Type Name ID GECOS [HOME] - -# The superuser -g root 0 - - -u root 0 root /root - -# Group owner of /etc/shadow -g shadow 15 - - - -# Default group for normal users -g users 100 - - diff --git a/system-users.changes b/system-users.changes index c8e8a98..1e76e27 100644 --- a/system-users.changes +++ b/system-users.changes @@ -1,3 +1,18 @@ +------------------------------------------------------------------- +Mon Jun 19 13:18:51 CEST 2017 - kukuk@suse.de + +- Move group trusted into system-user-root package [bsc#1044014] + +------------------------------------------------------------------- +Sat Jun 17 12:39:09 CEST 2017 - kukuk@suse.de + +- Move system-user-root into own package + +------------------------------------------------------------------- +Fri Jun 9 13:49:26 CEST 2017 - kukuk@suse.de + +- Fix syntax of groups in system-user-root.conf + ------------------------------------------------------------------- Fri Jun 9 11:56:50 CEST 2017 - kukuk@suse.de diff --git a/system-users.spec b/system-users.spec index 0d8e6b3..ff8676c 100644 --- a/system-users.spec +++ b/system-users.spec @@ -17,7 +17,7 @@ Name: system-users -Version: 20161020 +Version: 20170617 Release: 0 Summary: Provide system accounts License: MIT @@ -28,7 +28,6 @@ Source3: system-user-bin.conf Source4: system-user-daemon.conf Source5: system-user-man.conf Source6: system-user-news.conf -Source7: system-group-trusted.conf Source8: system-group-obsolete.conf Source9: system-group-hardware.conf Source10: system-group-wheel.conf @@ -38,7 +37,7 @@ Source13: system-user-ftp.conf Source14: system-user-lp.conf Source15: system-user-nobody.conf Source16: system-user-upsd.conf -Source17: system-user-root.conf +BuildRequires: sysuser-shadow BuildRequires: sysuser-tools BuildRequires: pkgconfig(systemd) BuildArch: noarch @@ -103,14 +102,6 @@ Group: System/Fhs %description -n system-user-games This package provides the system account and group 'games'. -%package -n system-group-trusted -Summary: System group 'trusted' -Group: System/Fhs -%{sysusers_requires} - -%description -n system-group-trusted -This package provides the system group 'trusted'. - %package -n system-group-obsolete Summary: Obsolete system groups Group: System/Fhs @@ -187,25 +178,6 @@ Requires(pre): group(daemon) This package provides the system account 'upsd'. -# -# system user root is special, since we need user root, -# group root, shadow and users right from the beginning -# before systemd is installable. -# - -%package -n system-user-root -Summary: System user root -Group: System/Fhs -Provides: group(root) -Provides: group(shadow) -Provides: group(users) -Provides: user(root) - -%description -n system-user-root -This package provides the root account including the groups root, -shadow and users. - - %prep %setup -q -c -T @@ -216,7 +188,6 @@ shadow and users. %sysusers_generate_pre %{SOURCE4} daemon %sysusers_generate_pre %{SOURCE5} man %sysusers_generate_pre %{SOURCE6} news -%sysusers_generate_pre %{SOURCE7} trusted %sysusers_generate_pre %{SOURCE8} obsolete %sysusers_generate_pre %{SOURCE9} hardware %sysusers_generate_pre %{SOURCE10} wheel @@ -244,7 +215,6 @@ install -m 644 %{SOURCE3} %{buildroot}%{_sysusersdir}/system-user-bin.conf install -m 644 %{SOURCE4} %{buildroot}%{_sysusersdir}/system-user-daemon.conf install -m 644 %{SOURCE5} %{buildroot}%{_sysusersdir}/system-user-man.conf install -m 644 %{SOURCE6} %{buildroot}%{_sysusersdir}/system-user-news.conf -install -m 644 %{SOURCE7} %{buildroot}%{_sysusersdir}/system-group-trusted.conf install -m 644 %{SOURCE8} %{buildroot}%{_sysusersdir}/system-group-obsolete.conf install -m 644 %{SOURCE9} %{buildroot}%{_sysusersdir}/system-group-hardware.conf install -m 644 %{SOURCE10} %{buildroot}%{_sysusersdir}/system-group-wheel.conf @@ -254,7 +224,6 @@ install -m 644 %{SOURCE13} %{buildroot}%{_sysusersdir}/system-user-ftp.conf install -m 644 %{SOURCE14} %{buildroot}%{_sysusersdir}/system-user-lp.conf install -m 644 %{SOURCE15} %{buildroot}%{_sysusersdir}/system-user-nobody.conf install -m 644 %{SOURCE16} %{buildroot}%{_sysusersdir}/system-user-upsd.conf -install -m 644 %{SOURCE17} %{buildroot}%{_sysusersdir}/system-user-root.conf %pre -n system-user-uucp -f uucp.pre %pre -n system-user-games -f games.pre @@ -262,7 +231,6 @@ install -m 644 %{SOURCE17} %{buildroot}%{_sysusersdir}/system-user-root.conf %pre -n system-user-daemon -f daemon.pre %pre -n system-user-man -f man.pre %pre -n system-user-news -f news.pre -%pre -n system-group-trusted -f trusted.pre %pre -n system-group-obsolete -f obsolete.pre %pre -n system-group-hardware -f hardware.pre %pre -n system-group-wheel -f wheel.pre @@ -275,36 +243,6 @@ install -m 644 %{SOURCE17} %{buildroot}%{_sysusersdir}/system-user-root.conf %pre -n system-user-upsd -f upsd.pre -%pre -n system-user-root -p -if not posix.access("/etc", "f") then - posix.mkdir("/etc") -end -if not posix.access("/etc/passwd", "f") then - file = io.open("/etc/passwd", "a+") - file:write("root:x:0:0:root:/root:/bin/bash\n") - file:close() - posix.chmod("/etc/passwd", 0644) -end -if not posix.access("/etc/group", "f") then - file = io.open("/etc/group", "a+") - file:write("root:x:0:\nshadow:x:15:\nusers:x:100:\n") - file:close() - posix.chmod("/etc/group", 0644) -end -if not posix.access("/etc/shadow", "f") then - file = io.open("/etc/shadow", "a+") - local date = os.time() - date = math.floor(date / 86400) - file:write("root::", date, "::::::\n") - file:close() - posix.chown("/etc/shadow", 0, 15) - posix.chmod("/etc/shadow", 0640) -end - -%files -n system-user-root -%defattr(-,root,root) -%{_sysusersdir}/system-user-root.conf - %files -n system-user-uucp %defattr(-,root,root) %dir %attr(0750,uucp,uucp) %{_sysconfdir}/uucp @@ -333,10 +271,6 @@ end %dir %attr(0750,news,news) %{_sysconfdir}/news %{_sysusersdir}/system-user-news.conf -%files -n system-group-trusted -%defattr(-,root,root) -%{_sysusersdir}/system-group-trusted.conf - %files -n system-group-obsolete %defattr(-,root,root) %{_sysusersdir}/system-group-obsolete.conf