mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 23:23:07 +00:00
575fddf25b
systemd v253 changelog/NEWS: https://github.com/systemd/systemd/blob/v253/NEWS NixOS changes: 0007-hostnamed-localed-timedated-disable-methods-that-cha.patch was dropped, because systemd gained support to handle read-only /etc. *-add-rootprefix-to-lookup-dir-paths.patch required some updates too, as src/basic/def.h moved to src/basic/constants.h. systemd/systemd#25771 switched p11kit to become dlopen()'ed, so we need to patch that path. added a note to the 23.05 release notes to recommend `nixos-rebuild boot` Co-authored-by: Florian Klink <flokli@flokli.de>
40 lines
1.4 KiB
Diff
40 lines
1.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
|
|
Date: Fri, 12 Apr 2013 13:16:57 +0200
|
|
Subject: [PATCH] Don't try to unmount /nix or /nix/store
|
|
|
|
They'll still be remounted read-only.
|
|
|
|
https://github.com/NixOS/nixos/issues/126
|
|
---
|
|
src/shared/fstab-util.c | 2 ++
|
|
src/shutdown/umount.c | 2 ++
|
|
2 files changed, 4 insertions(+)
|
|
|
|
diff --git a/src/shared/fstab-util.c b/src/shared/fstab-util.c
|
|
index 164e71a150..68e0766594 100644
|
|
--- a/src/shared/fstab-util.c
|
|
+++ b/src/shared/fstab-util.c
|
|
@@ -41,6 +41,8 @@ bool fstab_is_extrinsic(const char *mount, const char *opts) {
|
|
/* Don't bother with the OS data itself */
|
|
if (PATH_IN_SET(mount,
|
|
"/",
|
|
+ "/nix",
|
|
+ "/nix/store",
|
|
"/usr",
|
|
"/etc"))
|
|
return true;
|
|
diff --git a/src/shutdown/umount.c b/src/shutdown/umount.c
|
|
index 61bd9d2601..a6243da417 100644
|
|
--- a/src/shutdown/umount.c
|
|
+++ b/src/shutdown/umount.c
|
|
@@ -531,6 +531,8 @@ static int delete_md(MountPoint *m) {
|
|
|
|
static bool nonunmountable_path(const char *path) {
|
|
return path_equal(path, "/")
|
|
+ || path_equal(path, "/nix")
|
|
+ || path_equal(path, "/nix/store")
|
|
#if ! HAVE_SPLIT_USR
|
|
|| path_equal(path, "/usr")
|
|
#endif
|