From 6043f05ff8342a47a1612336b3ba4efc8d7a5fda Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Apr 12 2017 10:05:29 +0000 Subject: import systemd-219-30.el7_3.8 --- diff --git a/SOURCES/0419-tmp.mount.hm4-After-swap.target-3087.patch b/SOURCES/0419-tmp.mount.hm4-After-swap.target-3087.patch new file mode 100644 index 0000000..8c8ecb5 --- /dev/null +++ b/SOURCES/0419-tmp.mount.hm4-After-swap.target-3087.patch @@ -0,0 +1,24 @@ +From b52366a2098f7bcef31ef8ad912096949a2d40dd Mon Sep 17 00:00:00 2001 +From: frankheckenbach +Date: Fri, 22 Apr 2016 14:21:30 +0200 +Subject: [PATCH] tmp.mount.hm4: After swap.target (#3087) + +fix issue #2930 +Cherry-picked from: a11fe93e04e775c3ce2ace92be761d5ff9fce2d9 +Resolves: #1298355 +--- + units/tmp.mount | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/units/tmp.mount b/units/tmp.mount +index af0cf4a..8c53a87 100644 +--- a/units/tmp.mount ++++ b/units/tmp.mount +@@ -13,6 +13,7 @@ ConditionPathIsSymbolicLink=!/tmp + DefaultDependencies=no + Conflicts=umount.target + Before=local-fs.target umount.target ++After=swap.target + + [Mount] + What=tmpfs diff --git a/SOURCES/0420-make-sure-all-swap-units-are-ordered-before-the-swap.patch b/SOURCES/0420-make-sure-all-swap-units-are-ordered-before-the-swap.patch new file mode 100644 index 0000000..6287377 --- /dev/null +++ b/SOURCES/0420-make-sure-all-swap-units-are-ordered-before-the-swap.patch @@ -0,0 +1,56 @@ +From fb85550c9fafacbd8c07b611d6f129dc341f9e28 Mon Sep 17 00:00:00 2001 +From: Franck Bui +Date: Mon, 23 Nov 2015 11:14:10 +0100 +Subject: [PATCH] make sure all swap units are ordered before the swap target + +When shutting down the system, the swap devices can be disabled long +time before the swap target is stopped. They're actually the first +units systemd turns off on my system. + +This is incorrect and due to swap devices having multiple associated +swap unit files. The main one is usually created by the fstab +generator and is used to start the swap device. + +Once done, systemd creates some 'alias' units for the same swap +device, one for each swap dev link. But those units are missing an +ordering dependencies which was created by the fstab generator for the +main swap unit. + +Therefore during shutdown those 'alias' units can be stopped at +anytime before unmount.target target. + +This patch makes sure that all swap units are stopped after the +swap.target target. + +Cherry-picked from: 8bf23dc757dacaaf5a8d2c21aabf71aee08d1a04 +Resolves: #1298355 +--- + src/core/swap.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/src/core/swap.c b/src/core/swap.c +index 42f9959..984be2d 100644 +--- a/src/core/swap.c ++++ b/src/core/swap.c +@@ -210,6 +210,8 @@ static int swap_add_device_links(Swap *s) { + } + + static int swap_add_default_dependencies(Swap *s) { ++ int r; ++ + assert(s); + + if (UNIT(s)->manager->running_as != SYSTEMD_SYSTEM) +@@ -218,6 +220,12 @@ static int swap_add_default_dependencies(Swap *s) { + if (detect_container(NULL) > 0) + return 0; + ++ /* swap units generated for the swap dev links are missing the ++ * ordering dep against the swap target. */ ++ r = unit_add_dependency_by_name(UNIT(s), UNIT_BEFORE, SPECIAL_SWAP_TARGET, NULL, true); ++ if (r < 0) ++ return r; ++ + return unit_add_two_dependencies_by_name(UNIT(s), UNIT_BEFORE, UNIT_CONFLICTS, SPECIAL_UMOUNT_TARGET, NULL, true); + } + diff --git a/SPECS/systemd.spec b/SPECS/systemd.spec index cdc2695..0ea46e0 100644 --- a/SPECS/systemd.spec +++ b/SPECS/systemd.spec @@ -7,7 +7,7 @@ Name: systemd Url: http://www.freedesktop.org/wiki/Software/systemd Version: 219 -Release: 30%{?dist}.7 +Release: 30%{?dist}.8 # For a breakdown of the licensing, see README License: LGPLv2+ and MIT and GPLv2+ Summary: A System and Service Manager @@ -453,6 +453,8 @@ Patch0415: 0415-mtd_probe-add-include-for-stdint.patch Patch0416: 0416-virt-add-possibility-to-skip-the-check-for-chroot.patch Patch0417: 0417-load-fragment-fix-parsing-values-in-bytes-and-preven.patch Patch0418: 0418-core-fix-assertion-check.patch +Patch0419: 0419-tmp.mount.hm4-After-swap.target-3087.patch +Patch0420: 0420-make-sure-all-swap-units-are-ordered-before-the-swap.patch %global num_patches %{lua: c=0; for i,p in ipairs(patches) do c=c+1; end; print(c);} @@ -1461,6 +1463,10 @@ fi %{_mandir}/man8/systemd-resolved.* %changelog +* Mon Feb 13 2017 Lukas Nykryn - 219-30.8 +- tmp.mount.hm4: After swap.target (#3087) (#1298355) +- make sure all swap units are ordered before the swap target (#1298355) + * Tue Nov 29 2016 Lukas Nykryn - 219-30.7 - load-fragment: fix parsing values in bytes and prevent returning -ERANGE incorrectly (#1396277) - core: fix assertion check (#1396312)