From e8b16370e5c229685a9e1895c9ce6e0107dcb8350ae29cb3bf4f88be05a9ad04 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Mon, 14 Jul 2014 15:05:04 +0000 Subject: [PATCH] . OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=715 --- 1007-physical-hotplug-cpu-and-memory.patch | 15 +++++++++------ systemd-mini.changes | 8 ++++++++ systemd-mini.spec | 3 +++ systemd-remount-tmpfs | 15 +++++++++++++++ systemd.changes | 8 ++++++++ systemd.spec | 3 +++ 6 files changed, 46 insertions(+), 6 deletions(-) create mode 100644 systemd-remount-tmpfs diff --git a/1007-physical-hotplug-cpu-and-memory.patch b/1007-physical-hotplug-cpu-and-memory.patch index 7daebb20..98500575 100644 --- a/1007-physical-hotplug-cpu-and-memory.patch +++ b/1007-physical-hotplug-cpu-and-memory.patch @@ -1,6 +1,6 @@ ---- /dev/null -+++ systemd-206/rules/80-hotplug-cpu-mem.rules -@@ -0,0 +1,9 @@ +--- systemd-210/rules/80-hotplug-cpu-mem.rules ++++ systemd-210/rules/80-hotplug-cpu-mem.rules 2014-05-21 15:47:01.885605543 +0000 +@@ -0,0 +1,12 @@ +# do not edit this file, it will be overwritten on update + +# Hotplug physical CPU @@ -9,9 +9,12 @@ + +# Hotplug physical memory +SUBSYSTEM=="memory", ACTION=="add", TEST=="state", ATTR{state}=="offline", \ -+ ATTR{state}="online" ---- systemd-206.orig/Makefile.am -+++ systemd-206/Makefile.am ++ ATTR{state}="online", TAG+="tmpfs" ++ ++# ++TAG=="tmpfs", RUN+="/usr/lib/udev/remount-tmpfs" +--- systemd-210/Makefile.am ++++ systemd-210/Makefile.am @@ -2480,6 +2480,10 @@ dist_udevrules_DATA += \ rules/73-seat-numlock.rules diff --git a/systemd-mini.changes b/systemd-mini.changes index ad2309f9..dc195ec5 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon Jul 14 14:53:21 UTC 2014 - werner@suse.de + +- Update patch + 1007-physical-hotplug-cpu-and-memory.patch (bnc#869603) +- Add script systemd-remount-tmpfs (bnc#869603) as helper script + for the rule changed in patch 1007-physical-hotplug-cpu-and-memory.patch + ------------------------------------------------------------------- Mon Jul 14 11:43:12 UTC 2014 - werner@suse.de diff --git a/systemd-mini.spec b/systemd-mini.spec index 1744da66..218906f9 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -182,6 +182,7 @@ Source1061: write_dev_root_rule Source1062: systemd-udev-root-symlink Source1063: udev-generate-peristent-rule.sh Source1064: systemd-sleep-grub +Source1065: systemd-remount-tmpfs # # PATCH-FIX-UPSTREAM avoid-assertion-if-invalid-address-familily-is-passed-to-g.patch lnussel@suse.com bnc#791101 -- avoid assertion if invalid address familily is passed to gethostbyaddr_r @@ -1523,6 +1524,7 @@ sed -ie "s|@@PREFIX@@|%{_prefix}/lib/udev|g" %{S:1062} install -m644 -D %{S:1062} %{buildroot}/%{_prefix}/lib/systemd/system/systemd-udev-root-symlink.service install -m755 -D %{S:1063} %{buildroot}/%{_prefix}/lib/udev/udev-generate-peristent-rule install -m755 -D %{S:1064} %{buildroot}/%{_bindir}/systemd-sleep-grub +install -m755 -D %{S:1065} %{buildroot}/%{_prefix}/lib/udev/remount-tmpfs mkdir -p %{buildroot}/%{_prefix}/lib/systemd/system/basic.target.wants ln -sf ../systemd-udev-root-symlink.service %{buildroot}/%{_prefix}/lib/systemd/system/basic.target.wants rm -rf %{buildroot}%{_sysconfdir}/rpm @@ -2225,6 +2227,7 @@ exit 0 %{_prefix}/lib/udev/write_dev_root_rule %{_prefix}/lib/udev/udev-generate-peristent-rule %{_prefix}/lib/udev/net-set-sriov-names +%{_prefix}/lib/udev/remount-tmpfs %{_prefix}/lib/udev/rule_generator.functions %{_prefix}/lib/udev/write_net_rules %dir %{_prefix}/lib/udev/rules.d/ diff --git a/systemd-remount-tmpfs b/systemd-remount-tmpfs new file mode 100644 index 00000000..2e326469 --- /dev/null +++ b/systemd-remount-tmpfs @@ -0,0 +1,15 @@ +#!/bin/sh + +PATH=/usr/bin:/bin:/usr/sbin:/sbin +DIR=$(sed -rn '/^#/d;\@^[[:graph:]]+[[:space:]]+/[[:graph:]]+[[:space:]]+tmpfs[[:space:]]+.*size=[0-9]+[kmg,[:space:]]@{ s@^[[:graph:]]+[[:space:]]+(/[[:graph:]]+).*@\1@p }' /etc/fstab) + +if [ -n "$DIR" ]; then + for i in $DIR; do + echo $i + mount -o remount "$i" >/dev/null 2>&1 + STATE=$? + if [ "$STATE" -gt 0 ]; then + logger "Remount of $i failed with state $STATE" + fi + done +fi diff --git a/systemd.changes b/systemd.changes index ad2309f9..dc195ec5 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon Jul 14 14:53:21 UTC 2014 - werner@suse.de + +- Update patch + 1007-physical-hotplug-cpu-and-memory.patch (bnc#869603) +- Add script systemd-remount-tmpfs (bnc#869603) as helper script + for the rule changed in patch 1007-physical-hotplug-cpu-and-memory.patch + ------------------------------------------------------------------- Mon Jul 14 11:43:12 UTC 2014 - werner@suse.de diff --git a/systemd.spec b/systemd.spec index 2a5de634..c84d0714 100644 --- a/systemd.spec +++ b/systemd.spec @@ -177,6 +177,7 @@ Source1061: write_dev_root_rule Source1062: systemd-udev-root-symlink Source1063: udev-generate-peristent-rule.sh Source1064: systemd-sleep-grub +Source1065: systemd-remount-tmpfs # # PATCH-FIX-UPSTREAM avoid-assertion-if-invalid-address-familily-is-passed-to-g.patch lnussel@suse.com bnc#791101 -- avoid assertion if invalid address familily is passed to gethostbyaddr_r @@ -1518,6 +1519,7 @@ sed -ie "s|@@PREFIX@@|%{_prefix}/lib/udev|g" %{S:1062} install -m644 -D %{S:1062} %{buildroot}/%{_prefix}/lib/systemd/system/systemd-udev-root-symlink.service install -m755 -D %{S:1063} %{buildroot}/%{_prefix}/lib/udev/udev-generate-peristent-rule install -m755 -D %{S:1064} %{buildroot}/%{_bindir}/systemd-sleep-grub +install -m755 -D %{S:1065} %{buildroot}/%{_prefix}/lib/udev/remount-tmpfs mkdir -p %{buildroot}/%{_prefix}/lib/systemd/system/basic.target.wants ln -sf ../systemd-udev-root-symlink.service %{buildroot}/%{_prefix}/lib/systemd/system/basic.target.wants rm -rf %{buildroot}%{_sysconfdir}/rpm @@ -2220,6 +2222,7 @@ exit 0 %{_prefix}/lib/udev/write_dev_root_rule %{_prefix}/lib/udev/udev-generate-peristent-rule %{_prefix}/lib/udev/net-set-sriov-names +%{_prefix}/lib/udev/remount-tmpfs %{_prefix}/lib/udev/rule_generator.functions %{_prefix}/lib/udev/write_net_rules %dir %{_prefix}/lib/udev/rules.d/