From d4cc2ae643003e65099846363f2faae4660a04405943ce5fff37f1f8ae30c32c Mon Sep 17 00:00:00 2001 From: Franck Bui Date: Mon, 14 May 2018 09:20:18 +0000 Subject: [PATCH] Accepting request 606967 from home:fbui:systemd:Factory - Slight rewrite of the previous fix - Move 80-container-v[ez].network in systemd-container sub-package OBS-URL: https://build.opensuse.org/request/show/606967 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=1030 --- systemd-mini.changes | 12 ++++++++++++ systemd-mini.spec | 26 +++++++++++++++++--------- systemd.changes | 12 ++++++++++++ systemd.spec | 26 +++++++++++++++++--------- 4 files changed, 58 insertions(+), 18 deletions(-) diff --git a/systemd-mini.changes b/systemd-mini.changes index ddffeda8..927448b9 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,9 +1,21 @@ +------------------------------------------------------------------- +Mon May 14 08:57:44 UTC 2018 - fbui@suse.com + +- Slight rewrite of the previous fix + ------------------------------------------------------------------- Tue May 8 10:33:10 UTC 2018 - Thomas.Blume@suse.com - align permissions of /etc/machine-id to upstream code (bsc#1092269) world writeable machine-id is a security issue +------------------------------------------------------------------- +Mon Apr 23 14:05:37 UTC 2018 - fbui@suse.com + +- Move 80-container-v[ez].network in systemd-container sub-package + +- Move 80-container-host0.network from udev to systemd + ------------------------------------------------------------------- Mon Apr 23 07:45:32 UTC 2018 - fbui@suse.com diff --git a/systemd-mini.spec b/systemd-mini.spec index 87aa79ec..ce81abb0 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -687,10 +687,15 @@ fi # machine ID in all images. if [ $1 -eq 1 ]; then touch %{_sysconfdir}/machine-id + chmod 444 %{_sysconfdir}/machine-id fi -# check if /etc/machine-id is writeable and change it to readonly -[ ! -w %{_sysconfdir}/machine-id ] || chmod 444 %{_sysconfdir}/machine-id +# /etc/machine-id might have been created writeable incorrectly +# (boo#1092269). +if [ -w %{_sysconfdir}/machine-id ]; then + echo "/etc/machine-id shouldn't be writable, fixing..." + chmod 444 %{_sysconfdir}/machine-id || : +fi %if ! 0%{?bootstrap} pam-config --add --systemd || : @@ -1016,15 +1021,17 @@ fi %dir %{_sysconfdir}/sysctl.d %{_sysctldir}/99-sysctl.conf +%if %{with networkd} +%dir %{_sysconfdir}/systemd/network +%{_prefix}/lib/systemd/network/80-container-host0.network +%endif + %dir %{_sysconfdir}/X11/xinit %dir %{_sysconfdir}/X11/xinit/xinitrc.d %dir %{_sysconfdir}/X11/xorg.conf.d %dir %{_sysconfdir}/systemd %dir %{_sysconfdir}/systemd/system %dir %{_sysconfdir}/systemd/user -%if %{with networkd} -%dir %{_sysconfdir}/systemd/network -%endif %dir %{_sysconfdir}/xdg/systemd %{_sysconfdir}/xdg/systemd/user %{_sysconfdir}/X11/xinit/xinitrc.d/50-systemd-user.sh @@ -1230,10 +1237,7 @@ fi %dir %{_unitdir}/sockets.target.wants %{_unitdir}/sockets.target.wants/systemd-udev*.socket %dir %{_prefix}/lib/systemd/network -%{_prefix}/lib/systemd/network/*.link -%if %{with networkd} -%{_prefix}/lib/systemd/network/*.network -%endif +%{_prefix}/lib/systemd/network/99-default.link %{_datadir}/pkgconfig/udev.pc %files -n libsystemd0%{?mini} @@ -1273,6 +1277,10 @@ fi %{_bindir}/systemd-nspawn %{_unitdir}/systemd-nspawn@.service %{_tmpfilesdir}/systemd-nspawn.conf +%if %{with networkd} +%{_prefix}/lib/systemd/network/80-container-ve.network +%{_prefix}/lib/systemd/network/80-container-vz.network +%endif %if %{with machined} %{_bindir}/machinectl %{_prefix}/lib/systemd/systemd-machined diff --git a/systemd.changes b/systemd.changes index ddffeda8..927448b9 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,9 +1,21 @@ +------------------------------------------------------------------- +Mon May 14 08:57:44 UTC 2018 - fbui@suse.com + +- Slight rewrite of the previous fix + ------------------------------------------------------------------- Tue May 8 10:33:10 UTC 2018 - Thomas.Blume@suse.com - align permissions of /etc/machine-id to upstream code (bsc#1092269) world writeable machine-id is a security issue +------------------------------------------------------------------- +Mon Apr 23 14:05:37 UTC 2018 - fbui@suse.com + +- Move 80-container-v[ez].network in systemd-container sub-package + +- Move 80-container-host0.network from udev to systemd + ------------------------------------------------------------------- Mon Apr 23 07:45:32 UTC 2018 - fbui@suse.com diff --git a/systemd.spec b/systemd.spec index 23af17e2..1961bfe8 100644 --- a/systemd.spec +++ b/systemd.spec @@ -685,10 +685,15 @@ fi # machine ID in all images. if [ $1 -eq 1 ]; then touch %{_sysconfdir}/machine-id + chmod 444 %{_sysconfdir}/machine-id fi -# check if /etc/machine-id is writeable and change it to readonly -[ ! -w %{_sysconfdir}/machine-id ] || chmod 444 %{_sysconfdir}/machine-id +# /etc/machine-id might have been created writeable incorrectly +# (boo#1092269). +if [ -w %{_sysconfdir}/machine-id ]; then + echo "/etc/machine-id shouldn't be writable, fixing..." + chmod 444 %{_sysconfdir}/machine-id || : +fi %if ! 0%{?bootstrap} pam-config --add --systemd || : @@ -1014,15 +1019,17 @@ fi %dir %{_sysconfdir}/sysctl.d %{_sysctldir}/99-sysctl.conf +%if %{with networkd} +%dir %{_sysconfdir}/systemd/network +%{_prefix}/lib/systemd/network/80-container-host0.network +%endif + %dir %{_sysconfdir}/X11/xinit %dir %{_sysconfdir}/X11/xinit/xinitrc.d %dir %{_sysconfdir}/X11/xorg.conf.d %dir %{_sysconfdir}/systemd %dir %{_sysconfdir}/systemd/system %dir %{_sysconfdir}/systemd/user -%if %{with networkd} -%dir %{_sysconfdir}/systemd/network -%endif %dir %{_sysconfdir}/xdg/systemd %{_sysconfdir}/xdg/systemd/user %{_sysconfdir}/X11/xinit/xinitrc.d/50-systemd-user.sh @@ -1228,10 +1235,7 @@ fi %dir %{_unitdir}/sockets.target.wants %{_unitdir}/sockets.target.wants/systemd-udev*.socket %dir %{_prefix}/lib/systemd/network -%{_prefix}/lib/systemd/network/*.link -%if %{with networkd} -%{_prefix}/lib/systemd/network/*.network -%endif +%{_prefix}/lib/systemd/network/99-default.link %{_datadir}/pkgconfig/udev.pc %files -n libsystemd0%{?mini} @@ -1271,6 +1275,10 @@ fi %{_bindir}/systemd-nspawn %{_unitdir}/systemd-nspawn@.service %{_tmpfilesdir}/systemd-nspawn.conf +%if %{with networkd} +%{_prefix}/lib/systemd/network/80-container-ve.network +%{_prefix}/lib/systemd/network/80-container-vz.network +%endif %if %{with machined} %{_bindir}/machinectl %{_prefix}/lib/systemd/systemd-machined