* [bug#65335] [PATCH 1/4] file-systems: canonicalize-device-name: Ignore the "none" case.
2023-08-16 9:24 [bug#65335] [PATCH 0/4] Allow mounting root on tmpfs for impersistence Nicolas Graves via Guix-patches via
@ 2023-08-16 9:29 ` Nicolas Graves via Guix-patches via
2023-08-16 9:29 ` [bug#65335] [PATCH 2/4] gnu: services: activation-script: Ensure /var/run existence Nicolas Graves via Guix-patches via
` (2 more replies)
2023-08-20 22:15 ` [bug#65335] [PATCH 0/4] Allow mounting root on tmpfs for impersistence Nicolas Graves via Guix-patches via
` (3 subsequent siblings)
4 siblings, 3 replies; 30+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2023-08-16 9:29 UTC (permalink / raw)
To: 65335; +Cc: ngraves
---
gnu/build/file-systems.scm | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/gnu/build/file-systems.scm b/gnu/build/file-systems.scm
index 36a59f5f5c..e39bd31c3b 100644
--- a/gnu/build/file-systems.scm
+++ b/gnu/build/file-systems.scm
@@ -1021,8 +1021,8 @@ (define find-partition-by-luks-uuid
\f
(define (canonicalize-device-spec spec)
"Return the device name corresponding to SPEC, which can be a <uuid>, a
-<file-system-label>, or a string (typically a /dev file name or an nfs-root
-containing ':/')."
+<file-system-label>, the string 'none' or another string (typically a /dev
+file name or an nfs-root containing ':/')."
(define max-trials
;; Number of times we retry partition label resolution, 1 second per
;; trial. Note: somebody reported a delay of 16 seconds (!) before their
@@ -1046,8 +1046,8 @@ (define (canonicalize-device-spec spec)
(match spec
((? string?)
- (if (string-contains spec ":/")
- spec ; do not resolve NFS devices
+ (if (or (string-contains spec ":/") (string=? spec "none"))
+ spec ; do not resolve NFS / tmpfs devices
;; Nothing to do, but wait until SPEC shows up.
(resolve identity spec identity)))
((? file-system-label?)
base-commit: 1a92b3f43c280f143b00f8bb95a173fb85e52664
--
2.41.0
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [bug#65335] [PATCH 2/4] gnu: services: activation-script: Ensure /var/run existence.
2023-08-16 9:29 ` [bug#65335] [PATCH 1/4] file-systems: canonicalize-device-name: Ignore the "none" case Nicolas Graves via Guix-patches via
@ 2023-08-16 9:29 ` Nicolas Graves via Guix-patches via
2023-08-16 9:29 ` [bug#65335] [PATCH 3/4] gnu: build: activate-current-system: Ensure directory existence Nicolas Graves via Guix-patches via
2023-08-16 9:29 ` [bug#65335] [PATCH 4/4] gnu: system: bootable-kernel-arguments: Ignore the "none" root case Nicolas Graves via Guix-patches via
2 siblings, 0 replies; 30+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2023-08-16 9:29 UTC (permalink / raw)
To: 65335; +Cc: ngraves
---
gnu/services.scm | 1 +
1 file changed, 1 insertion(+)
diff --git a/gnu/services.scm b/gnu/services.scm
index 109e050a23..a992800796 100644
--- a/gnu/services.scm
+++ b/gnu/services.scm
@@ -670,6 +670,7 @@ (define (activation-script gexps)
;; Make sure the user accounting database exists. If it
;; does not exist, 'setutxent' does not create it and
;; thus there is no accounting at all.
+ (mkdir-p "/var/run")
(close-port (open-file "/var/run/utmpx" "a0"))
;; Same for 'wtmp', which is populated by mingetty et
--
2.41.0
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [bug#65335] [PATCH 3/4] gnu: build: activate-current-system: Ensure directory existence.
2023-08-16 9:29 ` [bug#65335] [PATCH 1/4] file-systems: canonicalize-device-name: Ignore the "none" case Nicolas Graves via Guix-patches via
2023-08-16 9:29 ` [bug#65335] [PATCH 2/4] gnu: services: activation-script: Ensure /var/run existence Nicolas Graves via Guix-patches via
@ 2023-08-16 9:29 ` Nicolas Graves via Guix-patches via
2023-08-16 9:29 ` [bug#65335] [PATCH 4/4] gnu: system: bootable-kernel-arguments: Ignore the "none" root case Nicolas Graves via Guix-patches via
2 siblings, 0 replies; 30+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2023-08-16 9:29 UTC (permalink / raw)
To: 65335; +Cc: ngraves
---
gnu/build/activation.scm | 1 +
1 file changed, 1 insertion(+)
diff --git a/gnu/build/activation.scm b/gnu/build/activation.scm
index eea2233563..759704ae03 100644
--- a/gnu/build/activation.scm
+++ b/gnu/build/activation.scm
@@ -408,6 +408,7 @@ (define* (activate-current-system
(format #t "making '~a' the current system...~%" system)
+ (mkdir-p "/run")
;; Atomically make SYSTEM current.
(let ((new (string-append %current-system ".new")))
(symlink system new)
--
2.41.0
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [bug#65335] [PATCH 4/4] gnu: system: bootable-kernel-arguments: Ignore the "none" root case.
2023-08-16 9:29 ` [bug#65335] [PATCH 1/4] file-systems: canonicalize-device-name: Ignore the "none" case Nicolas Graves via Guix-patches via
2023-08-16 9:29 ` [bug#65335] [PATCH 2/4] gnu: services: activation-script: Ensure /var/run existence Nicolas Graves via Guix-patches via
2023-08-16 9:29 ` [bug#65335] [PATCH 3/4] gnu: build: activate-current-system: Ensure directory existence Nicolas Graves via Guix-patches via
@ 2023-08-16 9:29 ` Nicolas Graves via Guix-patches via
2 siblings, 0 replies; 30+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2023-08-16 9:29 UTC (permalink / raw)
To: 65335; +Cc: ngraves
---
gnu/system.scm | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/gnu/system.scm b/gnu/system.scm
index 279b9df5c0..0d9e9ee5cf 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -198,15 +198,18 @@ (define* (bootable-kernel-arguments system root-device version)
;; compatibility when producing bootloader configurations for older
;; generations.
(define version>0? (> version 0))
- (list (string-append (if version>0? "root=" "--root=")
- ;; Note: Always use the DCE format because that's what
- ;; (gnu build linux-boot) expects for the 'root'
- ;; kernel command-line option.
- (file-system-device->string root-device
- #:uuid-type 'dce))
- #~(string-append (if #$version>0? "gnu.system=" "--system=") #$system)
- #~(string-append (if #$version>0? "gnu.load=" "--load=")
- #$system "/boot")))
+ (let ((root (file-system-device->string root-device
+ #:uuid-type 'dce)))
+ (append
+ (if (string=? root "none")
+ '() ;; Ignore the case where the root is "none" (typically tmpfs).
+ ;; Note: Always use the DCE format because that's what
+ ;; (gnu build linux-boot) expects for the 'root'
+ ;; kernel command-line option.
+ (list (string-append (if version>0? "root=" "--root=") root)))
+ (list #~(string-append (if #$version>0? "gnu.system=" "--system=") #$system)
+ #~(string-append (if #$version>0? "gnu.load=" "--load=")
+ #$system "/boot")))))
;; System-wide configuration.
--
2.41.0
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [bug#65335] [PATCH 0/4] Allow mounting root on tmpfs for impersistence
2023-08-16 9:24 [bug#65335] [PATCH 0/4] Allow mounting root on tmpfs for impersistence Nicolas Graves via Guix-patches via
2023-08-16 9:29 ` [bug#65335] [PATCH 1/4] file-systems: canonicalize-device-name: Ignore the "none" case Nicolas Graves via Guix-patches via
@ 2023-08-20 22:15 ` Nicolas Graves via Guix-patches via
2023-08-20 22:16 ` [bug#65335] [PATCH v2 1/5] file-systems: canonicalize-device-name: Ignore the "none" case Nicolas Graves via Guix-patches via
` (2 subsequent siblings)
4 siblings, 0 replies; 30+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2023-08-20 22:15 UTC (permalink / raw)
To: 65335
On 2023-08-16 11:24, Nicolas Graves via Guix-patches via wrote:
> This patch series allows the root to be mounted on tmpfs, and ensures directories that are needed are present. Once the persisting directories needed are configured (with btrfs for instance), one can mount root on tmpfs. These persisting directories should be at least /var/log (not needed, but safety requirement), /var/lib, /var/guix, but they are application-dependent (if using NetworkManager, /etc/NetworkManager; if guix offloading daemon is present, /etc/guix; the same goes for Docker...).
>
> Nicolas Graves (4):
> file-systems: canonicalize-device-name: Ignore the "none" case.
> gnu: services: activation-script: Ensure /var/run existence.
> gnu: build: activate-current-system: Ensure directory existence.
> gnu: system: bootable-kernel-arguments: Ignore the "none" root case.
>
> gnu/build/activation.scm | 1 +
> gnu/build/file-systems.scm | 8 ++++----
> gnu/services.scm | 1 +
> gnu/system.scm | 21 ++++++++++++---------
> 4 files changed, 18 insertions(+), 13 deletions(-)
>
A new update with a little addition for the home symlink-manager, in the
same idea of enabling impermanence configurations on guix.
I've experienced a few issues with the home symlink-manager, in the case
where
To explain the use case for this last commit : in the hypothesis in
which we use a dedicated btrfs to save for instance the ~/.ssh or the
~/.local/share directory, when running guix home reconfigure, the
activation script will error before ending with an EBUSY error. This
will make the home reconfiguration fail, while the most sensible action
in this case is to ignore the deletion call and continue, just like when
a configuration directory is not empty.
This is not enough for enabling impermanence home configurations, but it
enables to reconfigure the home with btrfs subvolumes under ~.
--
Best regards,
Nicolas Graves
^ permalink raw reply [flat|nested] 30+ messages in thread
* [bug#65335] [PATCH v2 1/5] file-systems: canonicalize-device-name: Ignore the "none" case.
2023-08-16 9:24 [bug#65335] [PATCH 0/4] Allow mounting root on tmpfs for impersistence Nicolas Graves via Guix-patches via
2023-08-16 9:29 ` [bug#65335] [PATCH 1/4] file-systems: canonicalize-device-name: Ignore the "none" case Nicolas Graves via Guix-patches via
2023-08-20 22:15 ` [bug#65335] [PATCH 0/4] Allow mounting root on tmpfs for impersistence Nicolas Graves via Guix-patches via
@ 2023-08-20 22:16 ` Nicolas Graves via Guix-patches via
2023-08-20 22:16 ` [bug#65335] [PATCH v2 2/5] gnu: services: activation-script: Ensure /var/run existence Nicolas Graves via Guix-patches via
` (4 more replies)
2024-02-04 2:19 ` [bug#65335] [PATCH v3 1/5] gnu: build: file-systems: Extend tmpfs fallback Nicolas Graves via Guix-patches via
2024-03-28 4:25 ` [bug#65335] [PATCH 0/4] Allow mounting root on tmpfs for impersistence Scott Colby
4 siblings, 5 replies; 30+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2023-08-20 22:16 UTC (permalink / raw)
To: 65335; +Cc: ngraves
---
gnu/build/file-systems.scm | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/gnu/build/file-systems.scm b/gnu/build/file-systems.scm
index 36a59f5f5c..e39bd31c3b 100644
--- a/gnu/build/file-systems.scm
+++ b/gnu/build/file-systems.scm
@@ -1021,8 +1021,8 @@ (define find-partition-by-luks-uuid
\f
(define (canonicalize-device-spec spec)
"Return the device name corresponding to SPEC, which can be a <uuid>, a
-<file-system-label>, or a string (typically a /dev file name or an nfs-root
-containing ':/')."
+<file-system-label>, the string 'none' or another string (typically a /dev
+file name or an nfs-root containing ':/')."
(define max-trials
;; Number of times we retry partition label resolution, 1 second per
;; trial. Note: somebody reported a delay of 16 seconds (!) before their
@@ -1046,8 +1046,8 @@ (define (canonicalize-device-spec spec)
(match spec
((? string?)
- (if (string-contains spec ":/")
- spec ; do not resolve NFS devices
+ (if (or (string-contains spec ":/") (string=? spec "none"))
+ spec ; do not resolve NFS / tmpfs devices
;; Nothing to do, but wait until SPEC shows up.
(resolve identity spec identity)))
((? file-system-label?)
base-commit: a0f5885fefd93a3859b6e4b82b18a6db9faeee05
prerequisite-patch-id: cccdad83975cbf04d7bd618c2c1a4b4de6fa7fd2
prerequisite-patch-id: 6f28833d2efa054d55126980f87ba4d2fdd13c6d
prerequisite-patch-id: afc6cadece838372370f7093f863ce8eaae7bc55
prerequisite-patch-id: b9330c12700355319c104aa3b493eafe03cbb619
prerequisite-patch-id: 46fa9c5a48fcc5b13409049b14b6e7314a6d6956
prerequisite-patch-id: 846f8b50b8de749caaa459b874087d06e15e0a80
prerequisite-patch-id: 023101e5a315951ce9786fb8230955c97001dac9
prerequisite-patch-id: d4b0193f128d8236026e079e746ea0cf6c4c0af0
prerequisite-patch-id: d73442d6d7c88e7375e9de0a9cd655cacb7766f9
prerequisite-patch-id: d8a56dd7bc6c1c3ba3ac0f77b2402b9c6469cfb2
prerequisite-patch-id: 3bc2b2eecd799be8d8b0f96b850ef83a6306dab7
prerequisite-patch-id: 798d4a277eff03a59339af4ebe19406682f361ab
prerequisite-patch-id: 3f65e9cdab64edeacfeb5748cd4fb130839b2b30
prerequisite-patch-id: 6f8225b63a1dd1866b05bb91544e49d7c096601c
prerequisite-patch-id: ff71ec9bdf6337390a720db4535268af271e32df
prerequisite-patch-id: c6b40cc38f5bdfab229ac3d7ed4346c5d9f1b2f7
prerequisite-patch-id: 9ab6dade9e641d5e667ba6a61dbfbb3d32c943a6
prerequisite-patch-id: 4fcae29a8f6dd95716669680141da315acaf6e59
prerequisite-patch-id: 0a5a6da0061188dc9be59bc9829db53288307c58
prerequisite-patch-id: 83c4b7d9d831990e4d37ba89c584d773c872ba6b
prerequisite-patch-id: 1c8dddf99041cf399b8836e3ad6721d7bbcebb7c
prerequisite-patch-id: 773df13cc85606b205d1d914e59525b7a6820a1d
prerequisite-patch-id: 6f8974ce8c0a3a25721a41781f9b0dfd61e96cf4
prerequisite-patch-id: d219948d28923c5ccd34b63f988032df33f2f336
prerequisite-patch-id: 0bd75bb28df9ccf3405caf8217d708afc978047d
prerequisite-patch-id: 26476dd782cf8f5e427d4bd36ac85957538a0aa3
prerequisite-patch-id: b5f87c460fd984c41fbb52e7e0dc305c20c46f22
prerequisite-patch-id: 5502b9c6a64abaca6a9921f25cd324869d26aa1e
prerequisite-patch-id: a7e84bb368349566e9a6fdbe49a371fdb464bb1e
prerequisite-patch-id: a84a766ceef6bedd5da3f9512c87a2c2a11ff33f
prerequisite-patch-id: 0175b2b1cbbc15c1c775147821715bca9e3303a3
prerequisite-patch-id: 9c20b408ac8aa275ecba58383d83be5cef7647df
prerequisite-patch-id: 836749cd3bd3b86f64de637c3c2df48a3608f09f
prerequisite-patch-id: 28ea1ddbef32a1bc9e908f3f9c7466953c60f13d
prerequisite-patch-id: 52a78e387e36e6408d7147950195d552e4e41528
prerequisite-patch-id: 87fee01a70d4b8cbfca44cc0a9c9f54471a92d18
prerequisite-patch-id: 8c8cdb345e815fc3332805ca224103f185d4a568
prerequisite-patch-id: 3434c5caf1eba9e9a64c673681e5911d2c1d9232
prerequisite-patch-id: c45bf303726fb3dacee01a66c0ff75105a81164d
prerequisite-patch-id: d44a1adb0404f23522aac21fa8a7f26be7ddabdc
prerequisite-patch-id: e422fe29bbcef80260b190637faa1a4953c3f1cb
prerequisite-patch-id: 285479a1a1e46e6f0f8aba5429edfa400c81b32b
prerequisite-patch-id: 30fcff6f8c9328c71d3fca609cddde0b56973bb7
prerequisite-patch-id: 70bb47ccac3375de893e4e640ce7c59369a05a39
prerequisite-patch-id: cc3d79386ca4a93146dc195cd5732764f1ac447f
prerequisite-patch-id: 2686866ec4bf08c7faa05b17cb84d9e0c13ec12c
prerequisite-patch-id: 369b61e07e3c90151a5414b784513b9ae3d3e978
prerequisite-patch-id: 065651c3a8cee63b725d7f86c080c274b494627e
prerequisite-patch-id: 1ee71844f0c9a0112a456e5b76079239906a7fb8
prerequisite-patch-id: c7b3d9c5bff04c16576781eff50ce37f7c49131c
prerequisite-patch-id: c8b8fe8dc51fea0b8a2626cf7031f01b6000e023
prerequisite-patch-id: 182e25335d4c357001f4f8bed2b3f89b91d9cae5
prerequisite-patch-id: c0ea00d5f4c6a83642a92c9341f0288fbfe3095a
prerequisite-patch-id: 795d31cc33a24a6a57e67af31b65acd8faa8187c
prerequisite-patch-id: 358af8aa7fa71b5cb8fbe6dde29d141bb7c57f1e
prerequisite-patch-id: b9ab3ee98a9d4ca518a4d99042982d64fbce5d05
prerequisite-patch-id: 12b76e9c2751da73ed64c9489b15f74ff17568cf
prerequisite-patch-id: eb618ab7b10483d917c308a38792af98baa517e2
prerequisite-patch-id: c6bbe6026bfcd2c9ff6e06efc5b8424a6943d1bf
prerequisite-patch-id: 1dc9b52f102fa787539119b849a14224ef7b4fa5
prerequisite-patch-id: 5f664cb2fd995a53765c5ffc19a708ac795cc0c4
prerequisite-patch-id: 8e234d0f4d93d2aad499eec8842be3d28da98707
prerequisite-patch-id: 40b6c9f09f27833367a71ec25d77afae4d2a835e
prerequisite-patch-id: 45e65ea00ece53f3496251401acd464081f8ca7a
prerequisite-patch-id: c3bc83367aa2aab9f121fe3bdbbd9e48dee860ea
--
2.41.0
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [bug#65335] [PATCH v2 2/5] gnu: services: activation-script: Ensure /var/run existence.
2023-08-20 22:16 ` [bug#65335] [PATCH v2 1/5] file-systems: canonicalize-device-name: Ignore the "none" case Nicolas Graves via Guix-patches via
@ 2023-08-20 22:16 ` Nicolas Graves via Guix-patches via
2023-08-21 14:09 ` [bug#65335] [PATCH 0/4] Allow mounting root on tmpfs for impersistence Ludovic Courtès
2023-08-20 22:16 ` [bug#65335] [PATCH v2 3/5] gnu: build: activate-current-system: Ensure directory existence Nicolas Graves via Guix-patches via
` (3 subsequent siblings)
4 siblings, 1 reply; 30+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2023-08-20 22:16 UTC (permalink / raw)
To: 65335; +Cc: ngraves
---
gnu/services.scm | 1 +
1 file changed, 1 insertion(+)
diff --git a/gnu/services.scm b/gnu/services.scm
index eb9258977e..73235ac2b8 100644
--- a/gnu/services.scm
+++ b/gnu/services.scm
@@ -674,6 +674,7 @@ (define (activation-script gexps)
;; Make sure the user accounting database exists. If it
;; does not exist, 'setutxent' does not create it and
;; thus there is no accounting at all.
+ (mkdir-p "/var/run")
(close-port (open-file "/var/run/utmpx" "a0"))
;; Same for 'wtmp', which is populated by mingetty et
--
2.41.0
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [bug#65335] [PATCH 0/4] Allow mounting root on tmpfs for impersistence
2023-08-20 22:16 ` [bug#65335] [PATCH v2 2/5] gnu: services: activation-script: Ensure /var/run existence Nicolas Graves via Guix-patches via
@ 2023-08-21 14:09 ` Ludovic Courtès
0 siblings, 0 replies; 30+ messages in thread
From: Ludovic Courtès @ 2023-08-21 14:09 UTC (permalink / raw)
To: Nicolas Graves; +Cc: 65335
Nicolas Graves <ngraves@ngraves.fr> skribis:
> ---
> gnu/services.scm | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/gnu/services.scm b/gnu/services.scm
> index eb9258977e..73235ac2b8 100644
> --- a/gnu/services.scm
> +++ b/gnu/services.scm
> @@ -674,6 +674,7 @@ (define (activation-script gexps)
> ;; Make sure the user accounting database exists. If it
> ;; does not exist, 'setutxent' does not create it and
> ;; thus there is no accounting at all.
> + (mkdir-p "/var/run")
> (close-port (open-file "/var/run/utmpx" "a0"))
Please move it before the comment, which talks about something else.
Should /var/run be removed (in the same commit) from ‘directives’ in
(gnu build install)?
Ludo’.
^ permalink raw reply [flat|nested] 30+ messages in thread
* [bug#65335] [PATCH v2 3/5] gnu: build: activate-current-system: Ensure directory existence.
2023-08-20 22:16 ` [bug#65335] [PATCH v2 1/5] file-systems: canonicalize-device-name: Ignore the "none" case Nicolas Graves via Guix-patches via
2023-08-20 22:16 ` [bug#65335] [PATCH v2 2/5] gnu: services: activation-script: Ensure /var/run existence Nicolas Graves via Guix-patches via
@ 2023-08-20 22:16 ` Nicolas Graves via Guix-patches via
2023-08-21 14:09 ` [bug#65335] [PATCH 0/4] Allow mounting root on tmpfs for impersistence Ludovic Courtès
2023-08-20 22:16 ` [bug#65335] [PATCH v2 4/5] gnu: system: bootable-kernel-arguments: Ignore the "none" root case Nicolas Graves via Guix-patches via
` (2 subsequent siblings)
4 siblings, 1 reply; 30+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2023-08-20 22:16 UTC (permalink / raw)
To: 65335; +Cc: ngraves
---
gnu/build/activation.scm | 1 +
1 file changed, 1 insertion(+)
diff --git a/gnu/build/activation.scm b/gnu/build/activation.scm
index eea2233563..759704ae03 100644
--- a/gnu/build/activation.scm
+++ b/gnu/build/activation.scm
@@ -408,6 +408,7 @@ (define* (activate-current-system
(format #t "making '~a' the current system...~%" system)
+ (mkdir-p "/run")
;; Atomically make SYSTEM current.
(let ((new (string-append %current-system ".new")))
(symlink system new)
--
2.41.0
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [bug#65335] [PATCH v2 4/5] gnu: system: bootable-kernel-arguments: Ignore the "none" root case.
2023-08-20 22:16 ` [bug#65335] [PATCH v2 1/5] file-systems: canonicalize-device-name: Ignore the "none" case Nicolas Graves via Guix-patches via
2023-08-20 22:16 ` [bug#65335] [PATCH v2 2/5] gnu: services: activation-script: Ensure /var/run existence Nicolas Graves via Guix-patches via
2023-08-20 22:16 ` [bug#65335] [PATCH v2 3/5] gnu: build: activate-current-system: Ensure directory existence Nicolas Graves via Guix-patches via
@ 2023-08-20 22:16 ` Nicolas Graves via Guix-patches via
2023-08-21 14:10 ` [bug#65335] [PATCH 0/4] Allow mounting root on tmpfs for impersistence Ludovic Courtès
2023-08-21 14:15 ` Ludovic Courtès
2023-08-20 22:16 ` [bug#65335] [PATCH v2 5/5] gnu: home: symlink-manager: Allow dedicated device skip Nicolas Graves via Guix-patches via
2023-08-21 14:06 ` Ludovic Courtès
4 siblings, 2 replies; 30+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2023-08-20 22:16 UTC (permalink / raw)
To: 65335; +Cc: ngraves
---
gnu/system.scm | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/gnu/system.scm b/gnu/system.scm
index 279b9df5c0..0d9e9ee5cf 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -198,15 +198,18 @@ (define* (bootable-kernel-arguments system root-device version)
;; compatibility when producing bootloader configurations for older
;; generations.
(define version>0? (> version 0))
- (list (string-append (if version>0? "root=" "--root=")
- ;; Note: Always use the DCE format because that's what
- ;; (gnu build linux-boot) expects for the 'root'
- ;; kernel command-line option.
- (file-system-device->string root-device
- #:uuid-type 'dce))
- #~(string-append (if #$version>0? "gnu.system=" "--system=") #$system)
- #~(string-append (if #$version>0? "gnu.load=" "--load=")
- #$system "/boot")))
+ (let ((root (file-system-device->string root-device
+ #:uuid-type 'dce)))
+ (append
+ (if (string=? root "none")
+ '() ;; Ignore the case where the root is "none" (typically tmpfs).
+ ;; Note: Always use the DCE format because that's what
+ ;; (gnu build linux-boot) expects for the 'root'
+ ;; kernel command-line option.
+ (list (string-append (if version>0? "root=" "--root=") root)))
+ (list #~(string-append (if #$version>0? "gnu.system=" "--system=") #$system)
+ #~(string-append (if #$version>0? "gnu.load=" "--load=")
+ #$system "/boot")))))
;; System-wide configuration.
--
2.41.0
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [bug#65335] [PATCH v2 5/5] gnu: home: symlink-manager: Allow dedicated device skip.
2023-08-20 22:16 ` [bug#65335] [PATCH v2 1/5] file-systems: canonicalize-device-name: Ignore the "none" case Nicolas Graves via Guix-patches via
` (2 preceding siblings ...)
2023-08-20 22:16 ` [bug#65335] [PATCH v2 4/5] gnu: system: bootable-kernel-arguments: Ignore the "none" root case Nicolas Graves via Guix-patches via
@ 2023-08-20 22:16 ` Nicolas Graves via Guix-patches via
2023-08-21 14:12 ` [bug#65335] [PATCH 0/4] Allow mounting root on tmpfs for impersistence Ludovic Courtès
2023-08-21 14:06 ` Ludovic Courtès
4 siblings, 1 reply; 30+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2023-08-20 22:16 UTC (permalink / raw)
To: 65335; +Cc: ngraves
---
gnu/home/services/symlink-manager.scm | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/gnu/home/services/symlink-manager.scm b/gnu/home/services/symlink-manager.scm
index e4c931fbee..d3c4d01db4 100644
--- a/gnu/home/services/symlink-manager.scm
+++ b/gnu/home/services/symlink-manager.scm
@@ -157,6 +157,11 @@ (define (update-symlinks-script)
#t
(G_ "Skipping ~a (not an empty directory)... done\n")
directory))
+ ((= EBUSY errno)
+ (format
+ #t
+ (G_ "Skipping ~a (dedicated device)... done\n")
+ directory))
((= ENOENT errno) #t)
((= ENOTDIR errno) #t)
(else
--
2.41.0
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [bug#65335] [PATCH 0/4] Allow mounting root on tmpfs for impersistence
2023-08-20 22:16 ` [bug#65335] [PATCH v2 5/5] gnu: home: symlink-manager: Allow dedicated device skip Nicolas Graves via Guix-patches via
@ 2023-08-21 14:12 ` Ludovic Courtès
2023-09-09 10:47 ` Ludovic Courtès
0 siblings, 1 reply; 30+ messages in thread
From: Ludovic Courtès @ 2023-08-21 14:12 UTC (permalink / raw)
To: Nicolas Graves; +Cc: 65335, Andrew Tropin, paren
Nicolas Graves <ngraves@ngraves.fr> skribis:
> ---
> gnu/home/services/symlink-manager.scm | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/gnu/home/services/symlink-manager.scm b/gnu/home/services/symlink-manager.scm
> index e4c931fbee..d3c4d01db4 100644
> --- a/gnu/home/services/symlink-manager.scm
> +++ b/gnu/home/services/symlink-manager.scm
> @@ -157,6 +157,11 @@ (define (update-symlinks-script)
> #t
> (G_ "Skipping ~a (not an empty directory)... done\n")
> directory))
> + ((= EBUSY errno)
> + (format
> + #t
> + (G_ "Skipping ~a (dedicated device)... done\n")
> + directory))
How does that relate to the rest of the patch series? What does
“dedicate device” mean here?
Maybe add a comment giving some context.
Ludo’.
^ permalink raw reply [flat|nested] 30+ messages in thread
* [bug#65335] [PATCH 0/4] Allow mounting root on tmpfs for impersistence
2023-08-21 14:12 ` [bug#65335] [PATCH 0/4] Allow mounting root on tmpfs for impersistence Ludovic Courtès
@ 2023-09-09 10:47 ` Ludovic Courtès
2023-10-05 13:07 ` Ludovic Courtès
0 siblings, 1 reply; 30+ messages in thread
From: Ludovic Courtès @ 2023-09-09 10:47 UTC (permalink / raw)
To: Nicolas Graves; +Cc: 65335, paren, Andrew Tropin
Hi,
(You forgot to Cc the bug in your reply, so our conversation went off
the record…)
Ludovic Courtès <ludo@gnu.org> skribis:
> Nicolas Graves <ngraves@ngraves.fr> skribis:
>
>> ---
>> gnu/home/services/symlink-manager.scm | 5 +++++
>> 1 file changed, 5 insertions(+)
>>
>> diff --git a/gnu/home/services/symlink-manager.scm b/gnu/home/services/symlink-manager.scm
>> index e4c931fbee..d3c4d01db4 100644
>> --- a/gnu/home/services/symlink-manager.scm
>> +++ b/gnu/home/services/symlink-manager.scm
>> @@ -157,6 +157,11 @@ (define (update-symlinks-script)
>> #t
>> (G_ "Skipping ~a (not an empty directory)... done\n")
>> directory))
>> + ((= EBUSY errno)
>> + (format
>> + #t
>> + (G_ "Skipping ~a (dedicated device)... done\n")
>> + directory))
>
> How does that relate to the rest of the patch series? What does
> “dedicate device” mean here?
Your use case is for when ~/.local (for instance) is a separate mount
point (an uncommon use case because mounting file systems on Linux
usually requires root privileges).
I’d suggested “dedicated device” → “underlying device is busy”, and a
short comment above explaining the kind of situation where this can
occur.
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 30+ messages in thread
* [bug#65335] [PATCH 0/4] Allow mounting root on tmpfs for impersistence
2023-09-09 10:47 ` Ludovic Courtès
@ 2023-10-05 13:07 ` Ludovic Courtès
2023-10-05 14:30 ` Nicolas Graves via Guix-patches via
0 siblings, 1 reply; 30+ messages in thread
From: Ludovic Courtès @ 2023-10-05 13:07 UTC (permalink / raw)
To: Nicolas Graves; +Cc: 65335, Andrew Tropin, paren
Hi Nicolas,
Did you have a chance to work on a revised version of this patch set?
https://issues.guix.gnu.org/65335
Seems to me that little was missing.
Thanks in advance!
Ludo’.
Ludovic Courtès <ludo@gnu.org> skribis:
> Hi,
>
> (You forgot to Cc the bug in your reply, so our conversation went off
> the record…)
>
> Ludovic Courtès <ludo@gnu.org> skribis:
>
>> Nicolas Graves <ngraves@ngraves.fr> skribis:
>>
>>> ---
>>> gnu/home/services/symlink-manager.scm | 5 +++++
>>> 1 file changed, 5 insertions(+)
>>>
>>> diff --git a/gnu/home/services/symlink-manager.scm b/gnu/home/services/symlink-manager.scm
>>> index e4c931fbee..d3c4d01db4 100644
>>> --- a/gnu/home/services/symlink-manager.scm
>>> +++ b/gnu/home/services/symlink-manager.scm
>>> @@ -157,6 +157,11 @@ (define (update-symlinks-script)
>>> #t
>>> (G_ "Skipping ~a (not an empty directory)... done\n")
>>> directory))
>>> + ((= EBUSY errno)
>>> + (format
>>> + #t
>>> + (G_ "Skipping ~a (dedicated device)... done\n")
>>> + directory))
>>
>> How does that relate to the rest of the patch series? What does
>> “dedicate device” mean here?
>
> Your use case is for when ~/.local (for instance) is a separate mount
> point (an uncommon use case because mounting file systems on Linux
> usually requires root privileges).
>
> I’d suggested “dedicated device” → “underlying device is busy”, and a
> short comment above explaining the kind of situation where this can
> occur.
>
> Thanks,
> Ludo’.
^ permalink raw reply [flat|nested] 30+ messages in thread
* [bug#65335] [PATCH 0/4] Allow mounting root on tmpfs for impersistence
2023-10-05 13:07 ` Ludovic Courtès
@ 2023-10-05 14:30 ` Nicolas Graves via Guix-patches via
2023-10-12 6:55 ` Ludovic Courtès
0 siblings, 1 reply; 30+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2023-10-05 14:30 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 65335, Andrew Tropin, paren
On 2023-10-05 15:07, Ludovic Courtès wrote:
> Hi Nicolas,
>
> Did you have a chance to work on a revised version of this patch set?
>
> https://issues.guix.gnu.org/65335
>
> Seems to me that little was missing.
Indeed, I have to finish this among other things. I still use it locally
and it works well for system impermanence.
I couldn't answer your following question :
> Should /var/run be removed (in the same commit) from ‘directives’ in
> (gnu build install)?
Maybe you can help a bit if you have worked on this, so that I
understand correctly if something should be done here or not.
>
> Thanks in advance!
>
> Ludo’.
>
> Ludovic Courtès <ludo@gnu.org> skribis:
>
>> Hi,
>>
>> (You forgot to Cc the bug in your reply, so our conversation went off
>> the record…)
>>
>> Ludovic Courtès <ludo@gnu.org> skribis:
>>
>>> Nicolas Graves <ngraves@ngraves.fr> skribis:
>>>
>>>> ---
>>>> gnu/home/services/symlink-manager.scm | 5 +++++
>>>> 1 file changed, 5 insertions(+)
>>>>
>>>> diff --git a/gnu/home/services/symlink-manager.scm b/gnu/home/services/symlink-manager.scm
>>>> index e4c931fbee..d3c4d01db4 100644
>>>> --- a/gnu/home/services/symlink-manager.scm
>>>> +++ b/gnu/home/services/symlink-manager.scm
>>>> @@ -157,6 +157,11 @@ (define (update-symlinks-script)
>>>> #t
>>>> (G_ "Skipping ~a (not an empty directory)... done\n")
>>>> directory))
>>>> + ((= EBUSY errno)
>>>> + (format
>>>> + #t
>>>> + (G_ "Skipping ~a (dedicated device)... done\n")
>>>> + directory))
>>>
>>> How does that relate to the rest of the patch series? What does
>>> “dedicate device” mean here?
>>
>> Your use case is for when ~/.local (for instance) is a separate mount
>> point (an uncommon use case because mounting file systems on Linux
>> usually requires root privileges).
>>
>> I’d suggested “dedicated device” → “underlying device is busy”, and a
>> short comment above explaining the kind of situation where this can
>> occur.
>>
>> Thanks,
>> Ludo’.
--
Best regards,
Nicolas Graves
^ permalink raw reply [flat|nested] 30+ messages in thread
* [bug#65335] [PATCH 0/4] Allow mounting root on tmpfs for impersistence
2023-10-05 14:30 ` Nicolas Graves via Guix-patches via
@ 2023-10-12 6:55 ` Ludovic Courtès
2024-02-15 11:45 ` Nicolas Graves via Guix-patches via
0 siblings, 1 reply; 30+ messages in thread
From: Ludovic Courtès @ 2023-10-12 6:55 UTC (permalink / raw)
To: Nicolas Graves; +Cc: 65335, Andrew Tropin, paren
Hi,
Nicolas Graves <ngraves@ngraves.fr> skribis:
> On 2023-10-05 15:07, Ludovic Courtès wrote:
[...]
>> Should /var/run be removed (in the same commit) from ‘directives’ in
>> (gnu build install)?
>
> Maybe you can help a bit if you have worked on this, so that I
> understand correctly if something should be done here or not.
The directives in (gnu build install) specify files and directories that
should be created upfront when initializing a system—meaning when
running ‘guix system init’, or when populating a VM image. The
boot/activation code assumes that these files already exist when the
system boots.
If we’re now creating /var/run in an activation snippet, then it no
longer needs to be here.
When doing such changes, I would suggest to at least run:
make check-system TESTS=basic
to detect obvious mistakes, and perhaps run the “installed-os” test as
well (it’s much more expensive, so run it once you’re essentially done).
HTH!
Ludo’.
^ permalink raw reply [flat|nested] 30+ messages in thread
* [bug#65335] [PATCH 0/4] Allow mounting root on tmpfs for impersistence
2023-10-12 6:55 ` Ludovic Courtès
@ 2024-02-15 11:45 ` Nicolas Graves via Guix-patches via
2024-02-19 17:48 ` bug#65335: " Ludovic Courtès
0 siblings, 1 reply; 30+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2024-02-15 11:45 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 65335, paren
Hi Ludo,
Just to tell that the v3 I sent a few weeks ago is indeed fully tested,
and that commit messages are properly written.
Should we also think about a blog post on impermanence like nix did?
Nicolas
On 2023-10-12 08:55, Ludovic Courtès wrote:
> Hi,
>
> Nicolas Graves <ngraves@ngraves.fr> skribis:
>
>> On 2023-10-05 15:07, Ludovic Courtès wrote:
>
> [...]
>
>>> Should /var/run be removed (in the same commit) from ‘directives’ in
>>> (gnu build install)?
>>
>> Maybe you can help a bit if you have worked on this, so that I
>> understand correctly if something should be done here or not.
>
> The directives in (gnu build install) specify files and directories that
> should be created upfront when initializing a system—meaning when
> running ‘guix system init’, or when populating a VM image. The
> boot/activation code assumes that these files already exist when the
> system boots.
>
> If we’re now creating /var/run in an activation snippet, then it no
> longer needs to be here.
>
> When doing such changes, I would suggest to at least run:
>
> make check-system TESTS=basic
>
> to detect obvious mistakes, and perhaps run the “installed-os” test as
> well (it’s much more expensive, so run it once you’re essentially done).
>
> HTH!
>
> Ludo’.
>
>
>
--
Best regards,
Nicolas Graves
^ permalink raw reply [flat|nested] 30+ messages in thread
* bug#65335: [PATCH 0/4] Allow mounting root on tmpfs for impersistence
2024-02-15 11:45 ` Nicolas Graves via Guix-patches via
@ 2024-02-19 17:48 ` Ludovic Courtès
2024-02-19 23:47 ` [bug#65335] " Nicolas Graves via Guix-patches via
0 siblings, 1 reply; 30+ messages in thread
From: Ludovic Courtès @ 2024-02-19 17:48 UTC (permalink / raw)
To: Nicolas Graves; +Cc: paren, 65335-done
Hi Nicolas,
Nicolas Graves <ngraves@ngraves.fr> skribis:
> Just to tell that the v3 I sent a few weeks ago is indeed fully tested,
> and that commit messages are properly written.
Just pushed v3 as b1ec85533a63c10616d9260f90411ca6f362de00!
I did tweak the commit messages but that’s because I’m too picky :-) and
the changes were minor.
> Should we also think about a blog post on impermanence like nix did?
Yes, definitely!
There could also be a section in the manual with a complete OS
definition, to show how one can set up a volatile image.
Last, I realize there’s no system tests. I’m not sure how to do that
(because system tests already run on a tmpfs overlay) but it’d be nice
to make sure “root=none” handling keeps working.
Thoughts?
Thanks for all the work!
Ludo’.
^ permalink raw reply [flat|nested] 30+ messages in thread
* [bug#65335] [PATCH 0/4] Allow mounting root on tmpfs for impersistence
2024-02-19 17:48 ` bug#65335: " Ludovic Courtès
@ 2024-02-19 23:47 ` Nicolas Graves via Guix-patches via
0 siblings, 0 replies; 30+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2024-02-19 23:47 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: paren, 65335-done
On 2024-02-19 18:48, Ludovic Courtès wrote:
> Hi Nicolas,
>
> Nicolas Graves <ngraves@ngraves.fr> skribis:
>
>> Just to tell that the v3 I sent a few weeks ago is indeed fully tested,
>> and that commit messages are properly written.
>
> Just pushed v3 as b1ec85533a63c10616d9260f90411ca6f362de00!
>
> I did tweak the commit messages but that’s because I’m too picky :-) and
> the changes were minor.
>
>> Should we also think about a blog post on impermanence like nix did?
>
> Yes, definitely!
>
> There could also be a section in the manual with a complete OS
> definition, to show how one can set up a volatile image.
On my todo list, though my priority right now is node-build-system to
try and package zotero properly.
>
> Last, I realize there’s no system tests. I’m not sure how to do that
> (because system tests already run on a tmpfs overlay) but it’d be nice
> to make sure “root=none” handling keeps working.
>
> Thoughts?
I don't have a better view on this than you have. Basically I mostly
test it directly since for most changes I can always roll-back. Indeed
here it doesn't seem straightforward to check it fully, we can still
test the function bootable-kernel-arguments, but it's not that useful.
>
> Thanks for all the work!
>
> Ludo’.
--
Best regards,
Nicolas Graves
^ permalink raw reply [flat|nested] 30+ messages in thread
* [bug#65335] [PATCH 0/4] Allow mounting root on tmpfs for impersistence
2023-08-20 22:16 ` [bug#65335] [PATCH v2 1/5] file-systems: canonicalize-device-name: Ignore the "none" case Nicolas Graves via Guix-patches via
` (3 preceding siblings ...)
2023-08-20 22:16 ` [bug#65335] [PATCH v2 5/5] gnu: home: symlink-manager: Allow dedicated device skip Nicolas Graves via Guix-patches via
@ 2023-08-21 14:06 ` Ludovic Courtès
4 siblings, 0 replies; 30+ messages in thread
From: Ludovic Courtès @ 2023-08-21 14:06 UTC (permalink / raw)
To: Nicolas Graves; +Cc: 65335
Hi,
Nicolas Graves <ngraves@ngraves.fr> skribis:
> ---
> gnu/build/file-systems.scm | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/gnu/build/file-systems.scm b/gnu/build/file-systems.scm
> index 36a59f5f5c..e39bd31c3b 100644
> --- a/gnu/build/file-systems.scm
> +++ b/gnu/build/file-systems.scm
> @@ -1021,8 +1021,8 @@ (define find-partition-by-luks-uuid
> \f
> (define (canonicalize-device-spec spec)
> "Return the device name corresponding to SPEC, which can be a <uuid>, a
> -<file-system-label>, or a string (typically a /dev file name or an nfs-root
> -containing ':/')."
> +<file-system-label>, the string 'none' or another string (typically a /dev
> +file name or an nfs-root containing ':/')."
LGTM.
However, my offer to write commit logs on your behalf has expired, so I
kindly invite you to write them. :-)
See ‘C-x v l’ and the manual for details (info "(guix) Submitting
Patches").
TIA!
Ludo’.
^ permalink raw reply [flat|nested] 30+ messages in thread
* [bug#65335] [PATCH v3 1/5] gnu: build: file-systems: Extend tmpfs fallback.
2023-08-16 9:24 [bug#65335] [PATCH 0/4] Allow mounting root on tmpfs for impersistence Nicolas Graves via Guix-patches via
` (2 preceding siblings ...)
2023-08-20 22:16 ` [bug#65335] [PATCH v2 1/5] file-systems: canonicalize-device-name: Ignore the "none" case Nicolas Graves via Guix-patches via
@ 2024-02-04 2:19 ` Nicolas Graves via Guix-patches via
2024-02-04 2:19 ` [bug#65335] [PATCH v3 2/5] gnu: services: Ensure /var/run existence in activation-script Nicolas Graves via Guix-patches via
` (3 more replies)
2024-03-28 4:25 ` [bug#65335] [PATCH 0/4] Allow mounting root on tmpfs for impersistence Scott Colby
4 siblings, 4 replies; 30+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2024-02-04 2:19 UTC (permalink / raw)
To: 65335; +Cc: ludo, ngraves
* gnu/build/file-systems (canonicalize-device-name): Fallback to tmpfs
if spec is "none".
Change-Id: Ia55c715d04c7611ba8c979f23f1ad4a8ed2e75b6
---
gnu/build/file-systems.scm | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/gnu/build/file-systems.scm b/gnu/build/file-systems.scm
index 36a59f5f5c..78d779f398 100644
--- a/gnu/build/file-systems.scm
+++ b/gnu/build/file-systems.scm
@@ -7,6 +7,7 @@
;;; Copyright © 2019 David C. Trudgian <dave@trudgian.net>
;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2022 Oleg Pykhalov <go.wigust@gmail.com>
+;;; Copyright © 2024 Nicolas Graves <ngraves@ngraves.fr>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1021,8 +1022,8 @@ (define find-partition-by-luks-uuid
\f
(define (canonicalize-device-spec spec)
"Return the device name corresponding to SPEC, which can be a <uuid>, a
-<file-system-label>, or a string (typically a /dev file name or an nfs-root
-containing ':/')."
+<file-system-label>, the string 'none' or another string (typically a /dev
+file name or an nfs-root containing ':/')."
(define max-trials
;; Number of times we retry partition label resolution, 1 second per
;; trial. Note: somebody reported a delay of 16 seconds (!) before their
@@ -1046,8 +1047,8 @@ (define (resolve find-partition spec fmt)
(match spec
((? string?)
- (if (string-contains spec ":/")
- spec ; do not resolve NFS devices
+ (if (or (string-contains spec ":/") (string=? spec "none"))
+ spec ; do not resolve NFS / tmpfs devices
;; Nothing to do, but wait until SPEC shows up.
(resolve identity spec identity)))
((? file-system-label?)
--
2.41.0
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [bug#65335] [PATCH v3 2/5] gnu: services: Ensure /var/run existence in activation-script.
2024-02-04 2:19 ` [bug#65335] [PATCH v3 1/5] gnu: build: file-systems: Extend tmpfs fallback Nicolas Graves via Guix-patches via
@ 2024-02-04 2:19 ` Nicolas Graves via Guix-patches via
2024-02-04 2:19 ` [bug#65335] [PATCH v3 3/5] gnu: build: activation: Ensure /run existence Nicolas Graves via Guix-patches via
` (2 subsequent siblings)
3 siblings, 0 replies; 30+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2024-02-04 2:19 UTC (permalink / raw)
To: 65335; +Cc: ludo, ngraves
* gnu/services.scm (activation-script): Ensure /var/run existence.
* gnu/build/install.scm (evaluate-populate-directive)
[directives]: Remove directory /var/run.
Change-Id: I5fb93d33b6b1f045f1e5ba206b9b0b74b5184260
---
gnu/build/install.scm | 2 +-
gnu/services.scm | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/gnu/build/install.scm b/gnu/build/install.scm
index d4982650c1..618a51af8e 100644
--- a/gnu/build/install.scm
+++ b/gnu/build/install.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2013-2020, 2022 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2016 Chris Marusich <cmmarusich@gmail.com>
;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2024 Nicolas Graves <ngraves@ngraves.fr>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -134,7 +135,6 @@ (define (directives store)
(directory "/var/guix/gcroots")
(directory "/var/empty") ; for no-login accounts
(directory "/var/db") ; for dhclient, etc.
- (directory "/var/run")
(directory "/run")
(directory "/mnt")
(directory "/var/guix/profiles/per-user/root" 0 0)
diff --git a/gnu/services.scm b/gnu/services.scm
index 23c3d8a9f4..59481af10f 100644
--- a/gnu/services.scm
+++ b/gnu/services.scm
@@ -7,6 +7,7 @@
;;; Copyright © 2020 Christine Lemmer-Webber <cwebber@dustycloud.org>
;;; Copyright © 2020, 2021 Brice Waegeneire <brice@waegenei.re>
;;; Copyright © 2023 Brian Cully <bjc@spork.org>
+;;; Copyright © 2024 Nicolas Graves <ngraves@ngraves.fr>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -692,6 +693,7 @@ (define actions
(use-modules (gnu build activation)
(guix build utils))
+ (mkdir-p "/var/run")
;; Make sure the user accounting database exists. If it
;; does not exist, 'setutxent' does not create it and
;; thus there is no accounting at all.
--
2.41.0
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [bug#65335] [PATCH v3 3/5] gnu: build: activation: Ensure /run existence.
2024-02-04 2:19 ` [bug#65335] [PATCH v3 1/5] gnu: build: file-systems: Extend tmpfs fallback Nicolas Graves via Guix-patches via
2024-02-04 2:19 ` [bug#65335] [PATCH v3 2/5] gnu: services: Ensure /var/run existence in activation-script Nicolas Graves via Guix-patches via
@ 2024-02-04 2:19 ` Nicolas Graves via Guix-patches via
2024-02-04 2:19 ` [bug#65335] [PATCH v3 4/5] gnu: system: bootable-kernel-arguments: Extend tmpfs fallback Nicolas Graves via Guix-patches via
2024-02-04 2:19 ` [bug#65335] [PATCH v3 5/5] gnu: home: symlink-manager: Allow busy device skip Nicolas Graves via Guix-patches via
3 siblings, 0 replies; 30+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2024-02-04 2:19 UTC (permalink / raw)
To: 65335; +Cc: ludo, ngraves
* gnu/build/activation.scm (activation-script): Ensure /var/run existence.
* gnu/build/install.scm (evaluate-populate-directive)
[directives]: Remove directory /run.
Change-Id: I19ca8e7605c0cff598ab89077a94e20390ba27b0
---
gnu/build/activation.scm | 2 ++
gnu/build/install.scm | 1 -
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/gnu/build/activation.scm b/gnu/build/activation.scm
index eea2233563..d8c0cd22a3 100644
--- a/gnu/build/activation.scm
+++ b/gnu/build/activation.scm
@@ -8,6 +8,7 @@
;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;; Copyright © 2020 Christine Lemmer-Webber <cwebber@dustycloud.org>
;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re>
+;;; Copyright © 2024 Nicolas Graves <ngraves@ngraves.fr>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -408,6 +409,7 @@ (define* (activate-current-system
(format #t "making '~a' the current system...~%" system)
+ (mkdir-p "/run")
;; Atomically make SYSTEM current.
(let ((new (string-append %current-system ".new")))
(symlink system new)
diff --git a/gnu/build/install.scm b/gnu/build/install.scm
index 618a51af8e..0aa227b4d8 100644
--- a/gnu/build/install.scm
+++ b/gnu/build/install.scm
@@ -135,7 +135,6 @@ (define (directives store)
(directory "/var/guix/gcroots")
(directory "/var/empty") ; for no-login accounts
(directory "/var/db") ; for dhclient, etc.
- (directory "/run")
(directory "/mnt")
(directory "/var/guix/profiles/per-user/root" 0 0)
--
2.41.0
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [bug#65335] [PATCH v3 4/5] gnu: system: bootable-kernel-arguments: Extend tmpfs fallback.
2024-02-04 2:19 ` [bug#65335] [PATCH v3 1/5] gnu: build: file-systems: Extend tmpfs fallback Nicolas Graves via Guix-patches via
2024-02-04 2:19 ` [bug#65335] [PATCH v3 2/5] gnu: services: Ensure /var/run existence in activation-script Nicolas Graves via Guix-patches via
2024-02-04 2:19 ` [bug#65335] [PATCH v3 3/5] gnu: build: activation: Ensure /run existence Nicolas Graves via Guix-patches via
@ 2024-02-04 2:19 ` Nicolas Graves via Guix-patches via
2024-02-04 2:19 ` [bug#65335] [PATCH v3 5/5] gnu: home: symlink-manager: Allow busy device skip Nicolas Graves via Guix-patches via
3 siblings, 0 replies; 30+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2024-02-04 2:19 UTC (permalink / raw)
To: 65335; +Cc: ludo, ngraves
* gnu/system.scm (bootable-kernel-arguments): Fallback to tmpfs
if root is "none".
Change-Id: I35a656e71169dc786e5256d98a3c04c65043086d
---
gnu/system.scm | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)
diff --git a/gnu/system.scm b/gnu/system.scm
index 3cd64a5c9f..aede35775e 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -15,6 +15,7 @@
;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;; Copyright © 2021 raid5atemyhomework <raid5atemyhomework@protonmail.com>
;;; Copyright © 2023 Bruno Victal <mirai@makinata.eu>
+;;; Copyright © 2024 Nicolas Graves <ngraves@ngraves.fr>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -197,15 +198,18 @@ (define* (bootable-kernel-arguments system root-device version)
;; compatibility when producing bootloader configurations for older
;; generations.
(define version>0? (> version 0))
- (list (string-append (if version>0? "root=" "--root=")
- ;; Note: Always use the DCE format because that's what
- ;; (gnu build linux-boot) expects for the 'root'
- ;; kernel command-line option.
- (file-system-device->string root-device
- #:uuid-type 'dce))
- #~(string-append (if #$version>0? "gnu.system=" "--system=") #$system)
- #~(string-append (if #$version>0? "gnu.load=" "--load=")
- #$system "/boot")))
+ (let ((root (file-system-device->string root-device
+ #:uuid-type 'dce)))
+ (append
+ (if (string=? root "none")
+ '() ; Ignore the case where the root is "none" (typically tmpfs).
+ ;; Note: Always use the DCE format because that's what
+ ;; (gnu build linux-boot) expects for the 'root'
+ ;; kernel command-line option.
+ (list (string-append (if version>0? "root=" "--root=") root)))
+ (list #~(string-append (if #$version>0? "gnu.system=" "--system=") #$system)
+ #~(string-append (if #$version>0? "gnu.load=" "--load=")
+ #$system "/boot")))))
;; System-wide configuration.
--
2.41.0
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [bug#65335] [PATCH v3 5/5] gnu: home: symlink-manager: Allow busy device skip.
2024-02-04 2:19 ` [bug#65335] [PATCH v3 1/5] gnu: build: file-systems: Extend tmpfs fallback Nicolas Graves via Guix-patches via
` (2 preceding siblings ...)
2024-02-04 2:19 ` [bug#65335] [PATCH v3 4/5] gnu: system: bootable-kernel-arguments: Extend tmpfs fallback Nicolas Graves via Guix-patches via
@ 2024-02-04 2:19 ` Nicolas Graves via Guix-patches via
3 siblings, 0 replies; 30+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2024-02-04 2:19 UTC (permalink / raw)
To: 65335; +Cc: ludo, ngraves
* gnu/home/services/symlink-manager.scm (update-symlinks-script):
Allow busy device skip.
Change-Id: Iff91c8a30309d25c02a8311d8d5ddbf54e90f5ad
---
gnu/home/services/symlink-manager.scm | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/gnu/home/services/symlink-manager.scm b/gnu/home/services/symlink-manager.scm
index e4c931fbee..560e03a839 100644
--- a/gnu/home/services/symlink-manager.scm
+++ b/gnu/home/services/symlink-manager.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2021 Andrew Tropin <andrew@trop.in>
;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
;;; Copyright © 2022 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2024 Nicolas Graves <ngraves@ngraves.fr>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -157,6 +158,12 @@ (define (strip file)
#t
(G_ "Skipping ~a (not an empty directory)... done\n")
directory))
+ ;; This happens when the directory is a mounted device.
+ ((= EBUSY errno)
+ (format
+ #t
+ (G_ "Skipping ~a (underlying device is busy)... done\n")
+ directory))
((= ENOENT errno) #t)
((= ENOTDIR errno) #t)
(else
--
2.41.0
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [bug#65335] [PATCH 0/4] Allow mounting root on tmpfs for impersistence
2023-08-16 9:24 [bug#65335] [PATCH 0/4] Allow mounting root on tmpfs for impersistence Nicolas Graves via Guix-patches via
` (3 preceding siblings ...)
2024-02-04 2:19 ` [bug#65335] [PATCH v3 1/5] gnu: build: file-systems: Extend tmpfs fallback Nicolas Graves via Guix-patches via
@ 2024-03-28 4:25 ` Scott Colby
4 siblings, 0 replies; 30+ messages in thread
From: Scott Colby @ 2024-03-28 4:25 UTC (permalink / raw)
To: 65335
[-- Attachment #1: Type: text/plain, Size: 953 bytes --]
Hello,
I am interested in setting up my installation of Guix with root-on-tmpfs-style
"impermanence," so I was happy to see that these patches were merged.
Unfortunately, I cannot seem to make it work. My approach was to use a main
partition mounted at `/persistent` with directories underneath like
`/persistent/var/{log,lib,guix}` that were bind-mounted on top of the tmpfs at
`/`.
Not mentioned as far as I can see in this thread is what about `/gnu/store`.
Should that also be stored persistently or does it originate from inside
`/var/guix`? Originally I tried having `/gnu` be the persistent filesystem with
subdirectories `/gnu/persistent/var/...` and `/gnu/store`, but this interfered
with the `%immutable-store bind mount`.
Would you be so kind as to share a working configuration snippet using
root-on-tmpfs? (I understand if you're using btrfs subvolumes; it would still be
useful to me I think to see the configuration.)
Thanks,
Scott
[-- Attachment #2: Type: text/html, Size: 1549 bytes --]
^ permalink raw reply [flat|nested] 30+ messages in thread