From 9dd5a3a825ce030e081e2a1e6618c416ed8c896cd0dde147d39da23cc76ffe23 Mon Sep 17 00:00:00 2001 From: Franck Bui Date: Thu, 1 Mar 2018 14:26:05 +0000 Subject: [PATCH 1/6] Accepting request 581724 from home:fbui:systemd:Factory - BS forces us to own %{_prefix}/lib/modprobe.d This seems wrong but that's how the SUSE BS works. - Upgrade to v237 (commit 78221ca750a9c266f9f8497dda59d7ee44000a6c) Udev rules 60-ssd-scheduler.rules and 80-hotplug-cpu-mem.rules have been removed from the git repo and are now maintained at the package level. Those rules have been rejected by upstream and are defining some defaults which should maintain by the kernel folks. - Don't call "pam-config --systemd" pam_systemd.so has been integrated directly in the PAM stack since bsc#812462. So there's no need to call pam-config. OBS-URL: https://build.opensuse.org/request/show/581724 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=1017 --- 60-ssd-scheduler.rules | 11 +++++++++++ 80-hotplug-cpu-mem.rules | 12 ++++++++++++ systemd-234.tar.xz | 3 --- systemd-237.tar.xz | 3 +++ systemd-mini.changes | 25 +++++++++++++++++++++++++ systemd-mini.spec | 25 ++++++++++++++----------- systemd.changes | 25 +++++++++++++++++++++++++ systemd.spec | 25 ++++++++++++++----------- 8 files changed, 104 insertions(+), 25 deletions(-) create mode 100644 60-ssd-scheduler.rules create mode 100644 80-hotplug-cpu-mem.rules delete mode 100644 systemd-234.tar.xz create mode 100644 systemd-237.tar.xz diff --git a/60-ssd-scheduler.rules b/60-ssd-scheduler.rules new file mode 100644 index 0000000..43aa8ea --- /dev/null +++ b/60-ssd-scheduler.rules @@ -0,0 +1,11 @@ +# do not edit this file, it will be overwritten on update + +ACTION!="add", GOTO="ssd_scheduler_end" +SUBSYSTEM!="block", GOTO="ssd_scheduler_end" + +IMPORT{cmdline}="elevator" +ENV{elevator}=="*?", GOTO="ssd_scheduler_end" + +KERNEL=="sd*[!0-9]", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="deadline" + +LABEL="ssd_scheduler_end" diff --git a/80-hotplug-cpu-mem.rules b/80-hotplug-cpu-mem.rules new file mode 100644 index 0000000..9a9614d --- /dev/null +++ b/80-hotplug-cpu-mem.rules @@ -0,0 +1,12 @@ +# do not edit this file, it will be overwritten on update + +# Hotplug physical CPU +SUBSYSTEM=="cpu", ACTION=="add", TEST=="online", ATTR{online}=="0", \ + ATTR{online}="1" + +# Hotplug physical memory +SUBSYSTEM=="memory", ACTION=="add", PROGRAM="/usr/bin/systemd-detect-virt", RESULT!="zvm", ATTR{state}=="offline", \ + ATTR{state}="online", TAG+="tmpfs" + +# See bnc#869603 +TAG=="tmpfs", RUN+="/usr/lib/udev/remount-tmpfs" diff --git a/systemd-234.tar.xz b/systemd-234.tar.xz deleted file mode 100644 index c0fdec2..0000000 --- a/systemd-234.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:49daec1195deaa22bd490d70f78aafb7bdc0058ca236125e3c39127688c6db94 -size 3353696 diff --git a/systemd-237.tar.xz b/systemd-237.tar.xz new file mode 100644 index 0000000..7f8d95f --- /dev/null +++ b/systemd-237.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:db6382de9795d96b41a50ab2ac369b54ba49525181bc00a02ff67dfd970c59be +size 4629324 diff --git a/systemd-mini.changes b/systemd-mini.changes index b10856a..0ee0ba3 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,28 @@ +------------------------------------------------------------------- +Thu Mar 1 10:43:09 UTC 2018 - fbui@suse.com + +- BS forces us to own %{_prefix}/lib/modprobe.d + + This seems wrong but that's how the SUSE BS works. + +------------------------------------------------------------------- +Thu Mar 1 10:13:02 UTC 2018 - fbui@suse.com + +- Upgrade to v237 (commit 78221ca750a9c266f9f8497dda59d7ee44000a6c) + + Udev rules 60-ssd-scheduler.rules and 80-hotplug-cpu-mem.rules have + been removed from the git repo and are now maintained at the package + level. Those rules have been rejected by upstream and are defining + some defaults which should maintain by the kernel folks. + +------------------------------------------------------------------- +Tue Feb 27 09:04:32 UTC 2018 - fbui@suse.com + +- Don't call "pam-config --systemd" + + pam_systemd.so has been integrated directly in the PAM stack since + bsc#812462. So there's no need to call pam-config. + ------------------------------------------------------------------- Mon Feb 26 10:47:39 UTC 2018 - fbui@suse.com diff --git a/systemd-mini.spec b/systemd-mini.spec index c627c00..1ab9c03 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -49,7 +49,7 @@ Name: systemd-mini Url: http://www.freedesktop.org/wiki/Software/systemd -Version: 234 +Version: 237 Release: 0 Summary: A System and Session Manager License: LGPL-2.1+ @@ -124,7 +124,6 @@ Recommends: %{name}-bash-completion Requires(post): coreutils Requires(post): findutils Requires(post): systemd-presets-branding -Requires(post): pam-config >= 0.79-5 %endif %if 0%{?bootstrap} @@ -152,7 +151,9 @@ Source101: scripts-systemd-upgrade-from-pre-210.sh Source102: scripts-systemd-migrate-sysconfig-i18n.sh Source200: scripts-udev-convert-lib-udev-path.sh -Source1065: udev-remount-tmpfs +Source1000: 60-ssd-scheduler.rules +Source1001: 80-hotplug-cpu-mem.rules +Source1002: udev-remount-tmpfs # Patches listed in here are put in quarantine. Normally all # changes must go to upstream first and then are cherry-picked in the @@ -492,7 +493,11 @@ mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/migrated install -m0755 -D %{S:3} %{buildroot}/%{_sbindir}/systemd-sysv-convert install -m0755 -D %{S:12} %{buildroot}/%{_prefix}/lib/systemd/systemd-sysv-install -install -m0755 -D %{S:1065} %{buildroot}/%{_prefix}/lib/udev/remount-tmpfs + +# The rules that we shouldn't maintain +install -m0644 -D %{S:1000} %{buildroot}%{_udevrulesdir}/60-ssd-scheduler.rules +install -m0644 -D %{S:1001} %{buildroot}%{_udevrulesdir}/80-hotplug-cpu-mem.rules +install -m0755 -D %{S:1002} %{buildroot}/%{_prefix}/lib/udev/remount-tmpfs # Package the scripts used to fix all packaging issues. Also drop the # "scripts-{systemd/udev}" prefix which is used because osc doesn't @@ -676,9 +681,6 @@ if [ $1 -eq 1 ]; then fi %sysusers_create %{_sysusersdir}/systemd.conf -%if ! 0%{?bootstrap} -pam-config -a --systemd || : -%endif [ -e %{_localstatedir}/lib/random-seed ] && mv %{_localstatedir}/lib/random-seed %{_localstatedir}/lib/systemd/ || : /usr/lib/systemd/systemd-random-seed save || : systemctl daemon-reexec || : @@ -831,7 +833,6 @@ fi %post journal-remote %sysusers_create %{_sysusersdir}/systemd-remote.conf -%tmpfiles_create %{_tmpfilesdir}/systemd-remote.conf %service_add_post systemd-journal-gatewayd.socket systemd-journal-gatewayd.service %service_add_post systemd-journal-remote.socket systemd-journal-remote.service %service_add_post systemd-journal-upload.service @@ -940,8 +941,7 @@ fi %{_unitdir}/*.socket %{_unitdir}/*.wants %{_unitdir}/*.path -%{_userunitdir}/*.target -%{_userunitdir}/*.service +%{_userunitdir}/ %{_prefix}/lib/systemd/systemd-* %{_prefix}/lib/systemd/systemd %{_prefix}/lib/systemd/libsystemd-shared-*.so @@ -1041,6 +1041,10 @@ fi %{_datadir}/dbus-1/system.d/org.freedesktop.resolve1.conf %endif +# FIXME: why should we have to own this dir ? +%dir %{_prefix}/lib/modprobe.d +%{_prefix}/lib/modprobe.d/systemd.conf + # Some files created at runtime. %ghost %config(noreplace) %{_sysconfdir}/X11/xorg.conf.d/00-keyboard.conf %ghost %config(noreplace) %{_sysconfdir}/vconsole.conf @@ -1311,7 +1315,6 @@ fi %{_prefix}/lib/systemd/systemd-journal-remote %{_prefix}/lib/systemd/systemd-journal-upload %{_sysusersdir}/systemd-remote.conf -%{_tmpfilesdir}/systemd-remote.conf %{_mandir}/man8/systemd-journal-gatewayd.* %{_mandir}/man8/systemd-journal-remote.* %{_mandir}/man8/systemd-journal-upload.* diff --git a/systemd.changes b/systemd.changes index b10856a..0ee0ba3 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,28 @@ +------------------------------------------------------------------- +Thu Mar 1 10:43:09 UTC 2018 - fbui@suse.com + +- BS forces us to own %{_prefix}/lib/modprobe.d + + This seems wrong but that's how the SUSE BS works. + +------------------------------------------------------------------- +Thu Mar 1 10:13:02 UTC 2018 - fbui@suse.com + +- Upgrade to v237 (commit 78221ca750a9c266f9f8497dda59d7ee44000a6c) + + Udev rules 60-ssd-scheduler.rules and 80-hotplug-cpu-mem.rules have + been removed from the git repo and are now maintained at the package + level. Those rules have been rejected by upstream and are defining + some defaults which should maintain by the kernel folks. + +------------------------------------------------------------------- +Tue Feb 27 09:04:32 UTC 2018 - fbui@suse.com + +- Don't call "pam-config --systemd" + + pam_systemd.so has been integrated directly in the PAM stack since + bsc#812462. So there's no need to call pam-config. + ------------------------------------------------------------------- Mon Feb 26 10:47:39 UTC 2018 - fbui@suse.com diff --git a/systemd.spec b/systemd.spec index 95da200..d8cebce 100644 --- a/systemd.spec +++ b/systemd.spec @@ -47,7 +47,7 @@ Name: systemd Url: http://www.freedesktop.org/wiki/Software/systemd -Version: 234 +Version: 237 Release: 0 Summary: A System and Session Manager License: LGPL-2.1+ @@ -122,7 +122,6 @@ Recommends: %{name}-bash-completion Requires(post): coreutils Requires(post): findutils Requires(post): systemd-presets-branding -Requires(post): pam-config >= 0.79-5 %endif %if 0%{?bootstrap} @@ -150,7 +149,9 @@ Source101: scripts-systemd-upgrade-from-pre-210.sh Source102: scripts-systemd-migrate-sysconfig-i18n.sh Source200: scripts-udev-convert-lib-udev-path.sh -Source1065: udev-remount-tmpfs +Source1000: 60-ssd-scheduler.rules +Source1001: 80-hotplug-cpu-mem.rules +Source1002: udev-remount-tmpfs # Patches listed in here are put in quarantine. Normally all # changes must go to upstream first and then are cherry-picked in the @@ -490,7 +491,11 @@ mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/migrated install -m0755 -D %{S:3} %{buildroot}/%{_sbindir}/systemd-sysv-convert install -m0755 -D %{S:12} %{buildroot}/%{_prefix}/lib/systemd/systemd-sysv-install -install -m0755 -D %{S:1065} %{buildroot}/%{_prefix}/lib/udev/remount-tmpfs + +# The rules that we shouldn't maintain +install -m0644 -D %{S:1000} %{buildroot}%{_udevrulesdir}/60-ssd-scheduler.rules +install -m0644 -D %{S:1001} %{buildroot}%{_udevrulesdir}/80-hotplug-cpu-mem.rules +install -m0755 -D %{S:1002} %{buildroot}/%{_prefix}/lib/udev/remount-tmpfs # Package the scripts used to fix all packaging issues. Also drop the # "scripts-{systemd/udev}" prefix which is used because osc doesn't @@ -674,9 +679,6 @@ if [ $1 -eq 1 ]; then fi %sysusers_create %{_sysusersdir}/systemd.conf -%if ! 0%{?bootstrap} -pam-config -a --systemd || : -%endif [ -e %{_localstatedir}/lib/random-seed ] && mv %{_localstatedir}/lib/random-seed %{_localstatedir}/lib/systemd/ || : /usr/lib/systemd/systemd-random-seed save || : systemctl daemon-reexec || : @@ -829,7 +831,6 @@ fi %post journal-remote %sysusers_create %{_sysusersdir}/systemd-remote.conf -%tmpfiles_create %{_tmpfilesdir}/systemd-remote.conf %service_add_post systemd-journal-gatewayd.socket systemd-journal-gatewayd.service %service_add_post systemd-journal-remote.socket systemd-journal-remote.service %service_add_post systemd-journal-upload.service @@ -938,8 +939,7 @@ fi %{_unitdir}/*.socket %{_unitdir}/*.wants %{_unitdir}/*.path -%{_userunitdir}/*.target -%{_userunitdir}/*.service +%{_userunitdir}/ %{_prefix}/lib/systemd/systemd-* %{_prefix}/lib/systemd/systemd %{_prefix}/lib/systemd/libsystemd-shared-*.so @@ -1039,6 +1039,10 @@ fi %{_datadir}/dbus-1/system.d/org.freedesktop.resolve1.conf %endif +# FIXME: why should we have to own this dir ? +%dir %{_prefix}/lib/modprobe.d +%{_prefix}/lib/modprobe.d/systemd.conf + # Some files created at runtime. %ghost %config(noreplace) %{_sysconfdir}/X11/xorg.conf.d/00-keyboard.conf %ghost %config(noreplace) %{_sysconfdir}/vconsole.conf @@ -1309,7 +1313,6 @@ fi %{_prefix}/lib/systemd/systemd-journal-remote %{_prefix}/lib/systemd/systemd-journal-upload %{_sysusersdir}/systemd-remote.conf -%{_tmpfilesdir}/systemd-remote.conf %{_mandir}/man8/systemd-journal-gatewayd.* %{_mandir}/man8/systemd-journal-remote.* %{_mandir}/man8/systemd-journal-upload.* From a4ab995ff0969941b0ea8e10fecc327145a72a184a322907e0c54ba341a0fd5c Mon Sep 17 00:00:00 2001 From: Franck Bui Date: Thu, 8 Mar 2018 08:46:25 +0000 Subject: [PATCH 2/6] Accepting request 584202 from home:tsaupe:branches:Base:System:systemd add basic user space support for suspend to idle (fate#323814) OBS-URL: https://build.opensuse.org/request/show/584202 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=1018 --- 99-wakeup-from-idle.rules | 3 +++ systemd-mini.changes | 9 +++++++++ systemd-mini.spec | 6 ++++-- systemd.changes | 9 +++++++++ systemd.spec | 6 ++++-- 5 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 99-wakeup-from-idle.rules diff --git a/99-wakeup-from-idle.rules b/99-wakeup-from-idle.rules new file mode 100644 index 0000000..b463ee7 --- /dev/null +++ b/99-wakeup-from-idle.rules @@ -0,0 +1,3 @@ +# enable usb and standard AT Keyboards as wakeup sources for suspend-to-idle (S2I) fate#323814 +ACTION=="add", ATTR{power/wakeup}=="disabled", SUBSYSTEM=="serio", ATTR{description}=="i8042 KBD port", ATTR{power/wakeup}="enabled" +ACTION=="add", ATTR{power/wakeup}=="disabled", SUBSYSTEM=="hid", ATTRS{bInterfaceProtocol}=="01", ATTR{power/wakeup}="enabled" diff --git a/systemd-mini.changes b/systemd-mini.changes index 0ee0ba3..a560fd1 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -15,6 +15,15 @@ Thu Mar 1 10:13:02 UTC 2018 - fbui@suse.com level. Those rules have been rejected by upstream and are defining some defaults which should maintain by the kernel folks. +------------------------------------------------------------------- +Wed Feb 28 06:53:02 UTC 2018 - Thomas.Blume@suse.com + +- add basic user space support for suspend to idle (fate#323814) + add 99-wakeup-from-idle.rules + Currently this only covers the power button and usb/AT keyboards + as wakeup devices. It is planned to make that configurable in + the future. + ------------------------------------------------------------------- Tue Feb 27 09:04:32 UTC 2018 - fbui@suse.com diff --git a/systemd-mini.spec b/systemd-mini.spec index 1ab9c03..ec34fbf 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -153,7 +153,8 @@ Source200: scripts-udev-convert-lib-udev-path.sh Source1000: 60-ssd-scheduler.rules Source1001: 80-hotplug-cpu-mem.rules -Source1002: udev-remount-tmpfs +Source1002: 99-wakeup-from-idle.rules +Source1003: udev-remount-tmpfs # Patches listed in here are put in quarantine. Normally all # changes must go to upstream first and then are cherry-picked in the @@ -497,7 +498,8 @@ install -m0755 -D %{S:12} %{buildroot}/%{_prefix}/lib/systemd/systemd-sysv-insta # The rules that we shouldn't maintain install -m0644 -D %{S:1000} %{buildroot}%{_udevrulesdir}/60-ssd-scheduler.rules install -m0644 -D %{S:1001} %{buildroot}%{_udevrulesdir}/80-hotplug-cpu-mem.rules -install -m0755 -D %{S:1002} %{buildroot}/%{_prefix}/lib/udev/remount-tmpfs +install -m0644 -D %{S:1002} %{buildroot}%{_udevrulesdir}/99-wakeup-from-idle.rules +install -m0755 -D %{S:1003} %{buildroot}/%{_prefix}/lib/udev/remount-tmpfs # Package the scripts used to fix all packaging issues. Also drop the # "scripts-{systemd/udev}" prefix which is used because osc doesn't diff --git a/systemd.changes b/systemd.changes index 0ee0ba3..a560fd1 100644 --- a/systemd.changes +++ b/systemd.changes @@ -15,6 +15,15 @@ Thu Mar 1 10:13:02 UTC 2018 - fbui@suse.com level. Those rules have been rejected by upstream and are defining some defaults which should maintain by the kernel folks. +------------------------------------------------------------------- +Wed Feb 28 06:53:02 UTC 2018 - Thomas.Blume@suse.com + +- add basic user space support for suspend to idle (fate#323814) + add 99-wakeup-from-idle.rules + Currently this only covers the power button and usb/AT keyboards + as wakeup devices. It is planned to make that configurable in + the future. + ------------------------------------------------------------------- Tue Feb 27 09:04:32 UTC 2018 - fbui@suse.com diff --git a/systemd.spec b/systemd.spec index d8cebce..a68f2b0 100644 --- a/systemd.spec +++ b/systemd.spec @@ -151,7 +151,8 @@ Source200: scripts-udev-convert-lib-udev-path.sh Source1000: 60-ssd-scheduler.rules Source1001: 80-hotplug-cpu-mem.rules -Source1002: udev-remount-tmpfs +Source1002: 99-wakeup-from-idle.rules +Source1003: udev-remount-tmpfs # Patches listed in here are put in quarantine. Normally all # changes must go to upstream first and then are cherry-picked in the @@ -495,7 +496,8 @@ install -m0755 -D %{S:12} %{buildroot}/%{_prefix}/lib/systemd/systemd-sysv-insta # The rules that we shouldn't maintain install -m0644 -D %{S:1000} %{buildroot}%{_udevrulesdir}/60-ssd-scheduler.rules install -m0644 -D %{S:1001} %{buildroot}%{_udevrulesdir}/80-hotplug-cpu-mem.rules -install -m0755 -D %{S:1002} %{buildroot}/%{_prefix}/lib/udev/remount-tmpfs +install -m0644 -D %{S:1002} %{buildroot}%{_udevrulesdir}/99-wakeup-from-idle.rules +install -m0755 -D %{S:1003} %{buildroot}/%{_prefix}/lib/udev/remount-tmpfs # Package the scripts used to fix all packaging issues. Also drop the # "scripts-{systemd/udev}" prefix which is used because osc doesn't From 40f28050404f839190300b624a337acaca2f4676c358eca9f19c89029e4349f9 Mon Sep 17 00:00:00 2001 From: Franck Bui Date: Fri, 9 Mar 2018 09:28:21 +0000 Subject: [PATCH 3/6] Accepting request 584640 from home:fbui:systemd:Factory - Fix hotplug memory in 80-hotplug-cpu-mem.rules - Make sure /var/lib/machines is created when systemd-container is installed OBS-URL: https://build.opensuse.org/request/show/584640 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=1019 --- 80-hotplug-cpu-mem.rules | 28 ++++++++++++++++++++-------- systemd-mini.changes | 27 +++++++++++++++++++++++++-- systemd-mini.spec | 34 ++++++++++++++++------------------ systemd.changes | 27 +++++++++++++++++++++++++-- systemd.spec | 34 ++++++++++++++++------------------ udev-remount-tmpfs | 15 --------------- 6 files changed, 102 insertions(+), 63 deletions(-) delete mode 100644 udev-remount-tmpfs diff --git a/80-hotplug-cpu-mem.rules b/80-hotplug-cpu-mem.rules index 9a9614d..86a6c27 100644 --- a/80-hotplug-cpu-mem.rules +++ b/80-hotplug-cpu-mem.rules @@ -1,12 +1,24 @@ # do not edit this file, it will be overwritten on update +# # Hotplug physical CPU -SUBSYSTEM=="cpu", ACTION=="add", TEST=="online", ATTR{online}=="0", \ - ATTR{online}="1" +# +SUBSYSTEM=="cpu", ACTION=="add", TEST=="online", ATTR{online}=="0", ATTR{online}="1" -# Hotplug physical memory -SUBSYSTEM=="memory", ACTION=="add", PROGRAM="/usr/bin/systemd-detect-virt", RESULT!="zvm", ATTR{state}=="offline", \ - ATTR{state}="online", TAG+="tmpfs" - -# See bnc#869603 -TAG=="tmpfs", RUN+="/usr/lib/udev/remount-tmpfs" +# +# Hotplug physical memory. Instances of tmpfs are remounted so their +# size are recalculated. This might be needed if some sizes were +# specified relative to the total amount of memory (boo#869603). For +# now make it simple and remount all tmpfs regardless of how their +# size are specified. It should be handled by the kernel as it has a +# lot of shortcomings anyways (tmpfs mounted by other processes, mount +# namespaces, ...) +# +SUBSYSTEM=="memory", ACTION=="add", PROGRAM=="/usr/bin/systemd-detect-virt", RESULT!="zvm", ATTR{state}=="offline", \ + ATTR{state}="online", \ + RUN+="/bin/sh -c ' \ + while read src dst fs opts unused; do \ + case $fs in \ + tmpfs) mount -o remount \"$dst\" ;; \ + esac \ + done /dev/null 2>&1 - STATE=$? - if [ "$STATE" -gt 0 ]; then - logger "Remount of $i failed with state $STATE" - fi - done -fi From f995725348228215e15459619babd44345f6cddbb47fbfb3e866185f17b25a6a Mon Sep 17 00:00:00 2001 From: Franck Bui Date: Fri, 9 Mar 2018 09:56:29 +0000 Subject: [PATCH 4/6] Accepting request 584654 from home:fbui:systemd:Factory - Remove dropin that was used to turn delegation off for user instances Upstream now enables "memory" and "pids" controllers only which should have a very limited impact on performance compare to the "cpu" controller. - Import commit 46d6bc9c4f1c05f3b4fcfca754cc59963bd86ce3 2a79f4e78 units: delegate "memory" instead of "cpu" by default for user instances (#8320) (bsc#954765 bnc#953241 fate#320421) 88174ae85 compat-rules: fix syntax errors spotted by test/rule-syntax-check.py OBS-URL: https://build.opensuse.org/request/show/584654 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=1020 --- systemd-237.tar.xz | 4 ++-- systemd-mini.changes | 17 +++++++++++++++++ systemd-mini.spec | 10 ---------- systemd.changes | 17 +++++++++++++++++ systemd.spec | 10 ---------- 5 files changed, 36 insertions(+), 22 deletions(-) diff --git a/systemd-237.tar.xz b/systemd-237.tar.xz index 7f8d95f..23ed377 100644 --- a/systemd-237.tar.xz +++ b/systemd-237.tar.xz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:db6382de9795d96b41a50ab2ac369b54ba49525181bc00a02ff67dfd970c59be -size 4629324 +oid sha256:b420f2ff5841266d03c6691bd8adb705b2c46c391c33610923a23444232633f4 +size 4630076 diff --git a/systemd-mini.changes b/systemd-mini.changes index 792bb19..9cbcfcc 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,20 @@ +------------------------------------------------------------------- +Fri Mar 9 09:35:59 UTC 2018 - fbui@suse.com + +- Remove dropin that was used to turn delegation off for user instances + + Upstream now enables "memory" and "pids" controllers only which + should have a very limited impact on performance compare to the + "cpu" controller. + +------------------------------------------------------------------- +Fri Mar 9 09:30:14 UTC 2018 - fbui@suse.com + +- Import commit 46d6bc9c4f1c05f3b4fcfca754cc59963bd86ce3 + + 2a79f4e78 units: delegate "memory" instead of "cpu" by default for user instances (#8320) (bsc#954765 bnc#953241 fate#320421) + 88174ae85 compat-rules: fix syntax errors spotted by test/rule-syntax-check.py + ------------------------------------------------------------------- Thu Mar 8 15:22:10 UTC 2018 - fbui@suse.com diff --git a/systemd-mini.spec b/systemd-mini.spec index 4c7a162..bcd6534 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -612,14 +612,6 @@ cat << EOF > %{buildroot}%{_unitdir}/getty@tty1.service.d/noclear.conf TTYVTDisallocate=no EOF -# create drop-in to prevent delegate=yes for root user (bsc#954765, -# bnc#953241, fate#320421) -mkdir -p %{buildroot}%{_unitdir}/user@0.service.d/ -cat >%{buildroot}%{_unitdir}/user@0.service.d/nodelagate.conf < %{buildroot}%{_unitdir}/getty@tty1.service.d/noclear.conf TTYVTDisallocate=no EOF -# create drop-in to prevent delegate=yes for root user (bsc#954765, -# bnc#953241, fate#320421) -mkdir -p %{buildroot}%{_unitdir}/user@0.service.d/ -cat >%{buildroot}%{_unitdir}/user@0.service.d/nodelagate.conf < Date: Tue, 13 Mar 2018 15:13:50 +0000 Subject: [PATCH 5/6] Accepting request 586444 from home:fbui:systemd:Factory - Restore (maybe temporarly) "pam_config --add systemd" During its installation pam-config seems to overwrite the defaults shipped by "pam" for "some" reasons (see bsc#1084924) No idea why but since pam_systemd is not part of the "pam-config" defaults, we need to restore pam_systemd in common-session manually... OBS-URL: https://build.opensuse.org/request/show/586444 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=1021 --- systemd-mini.changes | 12 ++++++++++++ systemd-mini.spec | 9 +++++++-- systemd.changes | 12 ++++++++++++ systemd.spec | 9 +++++++-- 4 files changed, 38 insertions(+), 4 deletions(-) diff --git a/systemd-mini.changes b/systemd-mini.changes index 9cbcfcc..3922a25 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Tue Mar 13 15:07:41 UTC 2018 - fbui@suse.com + +- Restore (maybe temporarly) "pam_config --add systemd" + + During its installation pam-config seems to overwrite the defaults + shipped by "pam" for "some" reasons (see bsc#1084924) + + No idea why but since pam_systemd is not part of the "pam-config" + defaults, we need to restore pam_systemd in common-session + manually... + ------------------------------------------------------------------- Fri Mar 9 09:35:59 UTC 2018 - fbui@suse.com diff --git a/systemd-mini.spec b/systemd-mini.spec index bcd6534..50b0231 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -124,6 +124,7 @@ Recommends: %{name}-bash-completion Requires(post): coreutils Requires(post): findutils Requires(post): systemd-presets-branding +Requires(post): pam-config >= 0.79-5 %endif %if 0%{?bootstrap} @@ -668,10 +669,14 @@ fi # especially important for appliance builds to avoid an identical # machine ID in all images. if [ $1 -eq 1 ]; then - touch %{_sysconfdir}/machine-id - chmod 666 %{_sysconfdir}/machine-id + touch %{_sysconfdir}/machine-id + chmod 666 %{_sysconfdir}/machine-id fi +%if ! 0%{?bootstrap} +pam-config --add --systemd || : +%endif + %sysusers_create %{_sysusersdir}/systemd.conf [ -e %{_localstatedir}/lib/random-seed ] && mv %{_localstatedir}/lib/random-seed %{_localstatedir}/lib/systemd/ || : /usr/lib/systemd/systemd-random-seed save || : diff --git a/systemd.changes b/systemd.changes index 9cbcfcc..3922a25 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Tue Mar 13 15:07:41 UTC 2018 - fbui@suse.com + +- Restore (maybe temporarly) "pam_config --add systemd" + + During its installation pam-config seems to overwrite the defaults + shipped by "pam" for "some" reasons (see bsc#1084924) + + No idea why but since pam_systemd is not part of the "pam-config" + defaults, we need to restore pam_systemd in common-session + manually... + ------------------------------------------------------------------- Fri Mar 9 09:35:59 UTC 2018 - fbui@suse.com diff --git a/systemd.spec b/systemd.spec index 3520a0b..9135afa 100644 --- a/systemd.spec +++ b/systemd.spec @@ -122,6 +122,7 @@ Recommends: %{name}-bash-completion Requires(post): coreutils Requires(post): findutils Requires(post): systemd-presets-branding +Requires(post): pam-config >= 0.79-5 %endif %if 0%{?bootstrap} @@ -666,10 +667,14 @@ fi # especially important for appliance builds to avoid an identical # machine ID in all images. if [ $1 -eq 1 ]; then - touch %{_sysconfdir}/machine-id - chmod 666 %{_sysconfdir}/machine-id + touch %{_sysconfdir}/machine-id + chmod 666 %{_sysconfdir}/machine-id fi +%if ! 0%{?bootstrap} +pam-config --add --systemd || : +%endif + %sysusers_create %{_sysusersdir}/systemd.conf [ -e %{_localstatedir}/lib/random-seed ] && mv %{_localstatedir}/lib/random-seed %{_localstatedir}/lib/systemd/ || : /usr/lib/systemd/systemd-random-seed save || : From c3a3edd8e618c55cfa1cafd2dd35c55d39d7135007aed9999a4cafb109a02c72 Mon Sep 17 00:00:00 2001 From: Franck Bui Date: Wed, 14 Mar 2018 17:27:51 +0000 Subject: [PATCH 6/6] Accepting request 587018 from home:fbui:systemd:Factory - Add 0001-basic-macros-rename-noreturn-into-_noreturn_.patch This fix a build error triggered by the introduction of the new version of libgpg-error package. Patch submitted to upsream: https://github.com/systemd/systemd/pull/8456 - Turn off the IP sandboxing for systemd-logind Since v235 logind run inside an IPv4/IPv6 sandbox by default. This creates incompatibilites for systems using NIS. OBS-URL: https://build.opensuse.org/request/show/587018 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=1022 --- ...cros-rename-noreturn-into-_noreturn_.patch | 201 ++++++++++++++++++ systemd-mini.changes | 17 ++ systemd-mini.spec | 24 ++- systemd.changes | 17 ++ systemd.spec | 24 ++- 5 files changed, 273 insertions(+), 10 deletions(-) create mode 100644 0001-basic-macros-rename-noreturn-into-_noreturn_.patch diff --git a/0001-basic-macros-rename-noreturn-into-_noreturn_.patch b/0001-basic-macros-rename-noreturn-into-_noreturn_.patch new file mode 100644 index 0000000..0aaaf25 --- /dev/null +++ b/0001-basic-macros-rename-noreturn-into-_noreturn_.patch @@ -0,0 +1,201 @@ +From 24051a17e8df0976b41180a6d50275e7edf3e461 Mon Sep 17 00:00:00 2001 +From: Franck Bui +Date: Wed, 14 Mar 2018 18:00:24 +0100 +Subject: [PATCH 1/1] basic/macros: rename noreturn into _noreturn_ +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +"noreturn" is reserved and can be used in other header files we include: + + [ 16s] In file included from /usr/include/gcrypt.h:30:0, + [ 16s] from ../src/journal/journal-file.h:26, + [ 16s] from ../src/journal/journal-vacuum.c:31: + [ 16s] /usr/include/gpg-error.h:1544:46: error: expected ‘,’ or ‘;’ before ‘)’ token + [ 16s] void gpgrt_log_bug (const char *fmt, ...) GPGRT_ATTR_NR_PRINTF(1,2); + +Here we include grcrypt.h (which in turns include gpg-error.h) *after* we +"noreturn" was defined in macro.h. +--- + src/basic/log.c | 4 ++-- + src/basic/log.h | 4 ++-- + src/basic/macro.h | 19 +++++++++---------- + src/basic/process-util.c | 2 +- + src/basic/process-util.h | 2 +- + src/core/main.c | 4 ++-- + src/journal/test-journal-interleaving.c | 2 +- + src/shared/pager.c | 2 +- + src/udev/collect/collect.c | 2 +- + 9 files changed, 20 insertions(+), 21 deletions(-) + +diff --git a/src/basic/log.c b/src/basic/log.c +index 7a7f2cbec..16a2431c5 100644 +--- a/src/basic/log.c ++++ b/src/basic/log.c +@@ -814,7 +814,7 @@ static void log_assert( + log_dispatch_internal(level, 0, file, line, func, NULL, NULL, NULL, NULL, buffer); + } + +-noreturn void log_assert_failed_realm( ++_noreturn_ void log_assert_failed_realm( + LogRealm realm, + const char *text, + const char *file, +@@ -826,7 +826,7 @@ noreturn void log_assert_failed_realm( + abort(); + } + +-noreturn void log_assert_failed_unreachable_realm( ++_noreturn_ void log_assert_failed_unreachable_realm( + LogRealm realm, + const char *text, + const char *file, +diff --git a/src/basic/log.h b/src/basic/log.h +index efcf0f1bf..314be128a 100644 +--- a/src/basic/log.h ++++ b/src/basic/log.h +@@ -186,7 +186,7 @@ int log_dump_internal( + char *buffer); + + /* Logging for various assertions */ +-noreturn void log_assert_failed_realm( ++_noreturn_ void log_assert_failed_realm( + LogRealm realm, + const char *text, + const char *file, +@@ -195,7 +195,7 @@ noreturn void log_assert_failed_realm( + #define log_assert_failed(text, ...) \ + log_assert_failed_realm(LOG_REALM, (text), __VA_ARGS__) + +-noreturn void log_assert_failed_unreachable_realm( ++_noreturn_ void log_assert_failed_unreachable_realm( + LogRealm realm, + const char *text, + const char *file, +diff --git a/src/basic/macro.h b/src/basic/macro.h +index 95be63a20..d8a6432f6 100644 +--- a/src/basic/macro.h ++++ b/src/basic/macro.h +@@ -53,6 +53,15 @@ + #else + #define _fallthrough_ + #endif ++/* Define C11 noreturn without and even on older gcc ++ * compiler versions */ ++#ifndef noreturn ++#if __STDC_VERSION__ >= 201112L ++#define _noreturn_ _Noreturn ++#else ++#define _noreturn_ __attribute__((noreturn)) ++#endif ++#endif + + /* Temporarily disable some warnings */ + #define DISABLE_WARNING_DECLARATION_AFTER_STATEMENT \ +@@ -414,16 +423,6 @@ static inline unsigned long ALIGN_POWER2(unsigned long u) { + #endif + #endif + +-/* Define C11 noreturn without and even on older gcc +- * compiler versions */ +-#ifndef noreturn +-#if __STDC_VERSION__ >= 201112L +-#define noreturn _Noreturn +-#else +-#define noreturn __attribute__((noreturn)) +-#endif +-#endif +- + #define DEFINE_TRIVIAL_CLEANUP_FUNC(type, func) \ + static inline void func##p(type *p) { \ + if (*p) \ +diff --git a/src/basic/process-util.c b/src/basic/process-util.c +index aa9846db5..e6120af5b 100644 +--- a/src/basic/process-util.c ++++ b/src/basic/process-util.c +@@ -987,7 +987,7 @@ bool is_main_thread(void) { + return cached > 0; + } + +-noreturn void freeze(void) { ++_noreturn_ void freeze(void) { + + log_close(); + +diff --git a/src/basic/process-util.h b/src/basic/process-util.h +index 93029e36e..5170adec7 100644 +--- a/src/basic/process-util.h ++++ b/src/basic/process-util.h +@@ -91,7 +91,7 @@ int pid_from_same_root_fs(pid_t pid); + + bool is_main_thread(void); + +-noreturn void freeze(void); ++_noreturn_ void freeze(void); + + bool oom_score_adjust_is_valid(int oa); + +diff --git a/src/core/main.c b/src/core/main.c +index 076846a41..4b2d14923 100644 +--- a/src/core/main.c ++++ b/src/core/main.c +@@ -141,7 +141,7 @@ static uint64_t arg_default_tasks_max = UINT64_MAX; + static sd_id128_t arg_machine_id = {}; + static EmergencyAction arg_cad_burst_action = EMERGENCY_ACTION_REBOOT_FORCE; + +-noreturn static void freeze_or_reboot(void) { ++_noreturn_ static void freeze_or_reboot(void) { + + if (arg_crash_reboot) { + log_notice("Rebooting in 10s..."); +@@ -156,7 +156,7 @@ noreturn static void freeze_or_reboot(void) { + freeze(); + } + +-noreturn static void crash(int sig) { ++_noreturn_ static void crash(int sig) { + struct sigaction sa; + pid_t pid; + +diff --git a/src/journal/test-journal-interleaving.c b/src/journal/test-journal-interleaving.c +index 5a88b2774..d87bdbdd3 100644 +--- a/src/journal/test-journal-interleaving.c ++++ b/src/journal/test-journal-interleaving.c +@@ -37,7 +37,7 @@ + + static bool arg_keep = false; + +-noreturn static void log_assert_errno(const char *text, int error, const char *file, int line, const char *func) { ++_noreturn_ static void log_assert_errno(const char *text, int error, const char *file, int line, const char *func) { + log_internal(LOG_CRIT, error, file, line, func, + "'%s' failed at %s:%u (%s): %m", text, file, line, func); + abort(); +diff --git a/src/shared/pager.c b/src/shared/pager.c +index 75db3c985..681af9c40 100644 +--- a/src/shared/pager.c ++++ b/src/shared/pager.c +@@ -47,7 +47,7 @@ static int stored_stderr = -1; + static bool stdout_redirected = false; + static bool stderr_redirected = false; + +-noreturn static void pager_fallback(void) { ++_noreturn_ static void pager_fallback(void) { + int r; + + r = copy_bytes(STDIN_FILENO, STDOUT_FILENO, (uint64_t) -1, 0); +diff --git a/src/udev/collect/collect.c b/src/udev/collect/collect.c +index 2821640e9..c8fa47b3d 100644 +--- a/src/udev/collect/collect.c ++++ b/src/udev/collect/collect.c +@@ -58,7 +58,7 @@ static inline struct _mate *node_to_mate(struct udev_list_node *node) + return container_of(node, struct _mate, node); + } + +-noreturn static void sig_alrm(int signo) ++_noreturn_ static void sig_alrm(int signo) + { + exit(4); + } +-- +2.16.2 + diff --git a/systemd-mini.changes b/systemd-mini.changes index 3922a25..72f79cb 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,20 @@ +------------------------------------------------------------------- +Wed Mar 14 17:22:53 UTC 2018 - fbui@suse.com + +- Add 0001-basic-macros-rename-noreturn-into-_noreturn_.patch + + This fix a build error triggered by the introduction of the new + version of libgpg-error package. Patch submitted to upsream: + https://github.com/systemd/systemd/pull/8456 + +------------------------------------------------------------------- +Wed Mar 14 08:05:07 UTC 2018 - fbui@suse.com + +- Turn off the IP sandboxing for systemd-logind + + Since v235 logind run inside an IPv4/IPv6 sandbox by default. This + creates incompatibilites for systems using NIS. + ------------------------------------------------------------------- Tue Mar 13 15:07:41 UTC 2018 - fbui@suse.com diff --git a/systemd-mini.spec b/systemd-mini.spec index 50b0231..f25ca2e 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -162,6 +162,7 @@ Source1002: 99-wakeup-from-idle.rules # broken in upstream and need an urgent fix. Even in this case, the # patches are temporary and should be removed as soon as a fix is # merged by upstream. +Patch1: 0001-basic-macros-rename-noreturn-into-_noreturn_.patch %description Systemd is a system and service manager, compatible with SysV and LSB @@ -420,7 +421,7 @@ Some systemd commands offer bash completion, but it is an optional dependency. %prep %setup -q -n systemd-%{version} -# %autopatch -p1 +%autopatch -p1 %build opensuse_ntp_servers=({0..3}.opensuse.pool.ntp.org) @@ -606,13 +607,24 @@ mkdir -p %{buildroot}%{_systemd_system_env_generator_dir} mkdir -p %{buildroot}%{_systemd_user_env_generator_dir} # create drop-in to prevent tty1 to be cleared (bnc#804158) -mkdir -p %{buildroot}%{_unitdir}/getty@tty1.service.d/ -cat << EOF > %{buildroot}%{_unitdir}/getty@tty1.service.d/noclear.conf +mkdir %{buildroot}%{_unitdir}/getty@tty1.service.d/ +cat >%{buildroot}%{_unitdir}/getty@tty1.service.d/noclear.conf <%{buildroot}%{_unitdir}/systemd-logind.service.d/nosandbox.conf < %{buildroot}%{_unitdir}/getty@tty1.service.d/noclear.conf +mkdir %{buildroot}%{_unitdir}/getty@tty1.service.d/ +cat >%{buildroot}%{_unitdir}/getty@tty1.service.d/noclear.conf <%{buildroot}%{_unitdir}/systemd-logind.service.d/nosandbox.conf <