From 4f346cd84929d583d278bfa289b57da594ca09ed Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Sat, 7 Mar 2020 22:16:21 +0100 Subject: [PATCH] systemd: drop 0017-Fix-mount-option-x-initrd.mount-handling-35268-16.patch This was simply undoing a hunk from 0008-Don-t-try-to-unmount-nix-or-nix-store.patch, so drop that one from there and omit 0017-Fix-mount-option-x-initrd.mount-handling-35268-16.patch entirely. --- ...on-t-try-to-unmount-nix-or-nix-store.patch | 25 ----------- ...ion-x-initrd.mount-handling-35268-16.patch | 42 ------------------- pkgs/os-specific/linux/systemd/default.nix | 1 - 3 files changed, 68 deletions(-) delete mode 100644 pkgs/os-specific/linux/systemd/0017-Fix-mount-option-x-initrd.mount-handling-35268-16.patch diff --git a/pkgs/os-specific/linux/systemd/0008-Don-t-try-to-unmount-nix-or-nix-store.patch b/pkgs/os-specific/linux/systemd/0008-Don-t-try-to-unmount-nix-or-nix-store.patch index b858f3f7a455..fedaeb796718 100644 --- a/pkgs/os-specific/linux/systemd/0008-Don-t-try-to-unmount-nix-or-nix-store.patch +++ b/pkgs/os-specific/linux/systemd/0008-Don-t-try-to-unmount-nix-or-nix-store.patch @@ -23,31 +23,6 @@ index 959b8fbed2..5e4c4a9767 100644 return true; if (PATH_STARTSWITH_SET(m->where, -@@ -439,10 +441,20 @@ static int mount_add_default_dependencies(Mount *m) { - if (!UNIT(m)->default_dependencies) - return 0; - -- /* We do not add any default dependencies to /, /usr or /run/initramfs/, since they are guaranteed to stay -- * mounted the whole time, since our system is on it. Also, don't bother with anything mounted below virtual -- * file systems, it's also going to be virtual, and hence not worth the effort. */ -- if (mount_is_extrinsic(m)) -+ if (!MANAGER_IS_SYSTEM(UNIT(m)->manager)) -+ return 0; -+ -+ /* We do not add any default dependencies to /, /usr or -+ * /run/initramfs/, since they are guaranteed to stay -+ * mounted the whole time, since our system is on it. -+ * Also, don't bother with anything mounted below virtual -+ * file systems, it's also going to be virtual, and hence -+ * not worth the effort. */ -+ if (PATH_IN_SET(m->where, "/", "/usr", "/nix", "/nix/store") || -+ path_startswith(m->where, "/run/initramfs") || -+ path_startswith(m->where, "/proc") || -+ path_startswith(m->where, "/sys") || -+ path_startswith(m->where, "/dev")) - return 0; - - p = get_mount_parameters(m); -- 2.24.1 diff --git a/pkgs/os-specific/linux/systemd/0017-Fix-mount-option-x-initrd.mount-handling-35268-16.patch b/pkgs/os-specific/linux/systemd/0017-Fix-mount-option-x-initrd.mount-handling-35268-16.patch deleted file mode 100644 index f4508baae31c..000000000000 --- a/pkgs/os-specific/linux/systemd/0017-Fix-mount-option-x-initrd.mount-handling-35268-16.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 39ba82b29fff844f82e745ed7785cbfb397c2908 Mon Sep 17 00:00:00 2001 -From: Timofei Kushnir -Date: Fri, 2 Mar 2018 13:02:53 +0300 -Subject: [PATCH 17/27] Fix mount option `x-initrd.mount` handling (#35268) - (#16) - ---- - src/core/mount.c | 18 ++++-------------- - 1 file changed, 4 insertions(+), 14 deletions(-) - -diff --git a/src/core/mount.c b/src/core/mount.c -index 5e4c4a9767..6bc3569550 100644 ---- a/src/core/mount.c -+++ b/src/core/mount.c -@@ -441,20 +441,10 @@ static int mount_add_default_dependencies(Mount *m) { - if (!UNIT(m)->default_dependencies) - return 0; - -- if (!MANAGER_IS_SYSTEM(UNIT(m)->manager)) -- return 0; -- -- /* We do not add any default dependencies to /, /usr or -- * /run/initramfs/, since they are guaranteed to stay -- * mounted the whole time, since our system is on it. -- * Also, don't bother with anything mounted below virtual -- * file systems, it's also going to be virtual, and hence -- * not worth the effort. */ -- if (PATH_IN_SET(m->where, "/", "/usr", "/nix", "/nix/store") || -- path_startswith(m->where, "/run/initramfs") || -- path_startswith(m->where, "/proc") || -- path_startswith(m->where, "/sys") || -- path_startswith(m->where, "/dev")) -+ /* We do not add any default dependencies to /, /usr or /run/initramfs/, since they are guaranteed to stay -+ * mounted the whole time, since our system is on it. Also, don't bother with anything mounted below virtual -+ * file systems, it's also going to be virtual, and hence not worth the effort. */ -+ if (mount_is_extrinsic(m)) - return 0; - - p = get_mount_parameters(m); --- -2.24.1 - diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index 82c8af30359e..7079e21f3097 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -56,7 +56,6 @@ in stdenv.mkDerivation { ./0012-Change-usr-share-zoneinfo-to-etc-zoneinfo.patch ./0013-localectl-use-etc-X11-xkb-for-list-x11.patch ./0016-build-don-t-create-statedir-and-don-t-touch-prefixdi.patch - ./0017-Fix-mount-option-x-initrd.mount-handling-35268-16.patch ./0018-Install-default-configuration-into-out-share-factory.patch ./0019-inherit-systemd-environment-when-calling-generators.patch ./0020-reintroduce-the-no-such-path-PATH-that-was-dropped-s.patch