GNU bug report logs -
#73494
[PATCH 0/2] tmpfs /run.
Previous Next
To reply to this bug, email your comments to 73494 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Thu, 26 Sep 2024 07:03:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Hilton Chain <hako <at> ultrarare.space>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Thu, 26 Sep 2024 07:03:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hi Guix,
This series adds a tmpfs /run to %base-file-systems and symlinks /var/run to
it.
Mount options are taken from Systemd[1], OpenRC also uses the same ones[2].
(Except no-suid since we have /run/privileged/bin.)
Thanks
[1]: https://github.com/systemd/systemd/blob/v256.6/src/shared/mount-setup.c#L102
[2]: https://github.com/OpenRC/openrc/blob/0.55.1/sh/init.sh.Linux.in#L74
Hilton Chain (2):
file-systems: %base-file-systems: Add tmpfs /run.
services: cleanup: Make /var/run a symlink of /run.
doc/guix.texi | 5 +++++
gnu/services.scm | 6 +-----
gnu/services/dbus.scm | 31 -------------------------------
gnu/system/file-systems.scm | 15 ++++++++++++++-
4 files changed, 20 insertions(+), 37 deletions(-)
base-commit: 8576aaf5f90db9b385ea8cf6dc98bf3c062959dc
--
2.46.0
Information forwarded
to
pelzflorian <at> pelzflorian.de, ludo <at> gnu.org, maxim.cournoyer <at> gmail.com, guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Thu, 26 Sep 2024 07:07:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 73494 <at> debbugs.gnu.org (full text, mbox):
* gnu/system/file-systems (%runtime-variable-data): New variable.
(%base-file-systems): Add it.
* doc/guix.texi (File Systems): Document it.
* gnu/services.scm (cleanup-gexp): Adjust accordingly.
Change-Id: I3a95e49d396fbb2577026aefc247cfe996c5f267
---
doc/guix.texi | 5 +++++
gnu/services.scm | 5 +----
gnu/system/file-systems.scm | 15 ++++++++++++++-
3 files changed, 20 insertions(+), 5 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index 52e36e4354..54edd14d1b 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -17988,6 +17988,11 @@ File Systems
read-write in its own ``name space.''
@end defvar
+@defvar %runtime-variable-data
+This file system is mounted as @file{/run} and contains system
+information data describing the system since it was booted.
+@end defvar
+
@defvar %binary-format-file-system
The @code{binfmt_misc} file system, which allows handling of arbitrary
executable file types to be delegated to user space. This requires the
diff --git a/gnu/services.scm b/gnu/services.scm
index 8a4002e072..ea855ad193 100644
--- a/gnu/services.scm
+++ b/gnu/services.scm
@@ -632,7 +632,7 @@ (define (cleanup-gexp _)
#~(begin
(use-modules (guix build utils))
- ;; Clean out /tmp, /var/run, and /run.
+ ;; Clean out /tmp and /var/run.
;;
;; XXX This needs to happen before service activations, so it
;; has to be here, but this also implicitly assumes that /tmp
@@ -663,15 +663,12 @@ (define (cleanup-gexp _)
(setlocale LC_CTYPE "en_US.utf8")
(delete-file-recursively "/tmp")
(delete-file-recursively "/var/run")
- (delete-file-recursively "/run")
;; Note: The second argument to 'mkdir' is and'ed with umask,
;; hence the 'chmod' calls.
(mkdir "/tmp" #o1777)
(chmod "/tmp" #o1777)
(mkdir "/var/run" #o755)
- (chmod "/var/run" #o755)
- (mkdir "/run" #o755)
(chmod "/var/run" #o755))))))
(define cleanup-service-type
diff --git a/gnu/system/file-systems.scm b/gnu/system/file-systems.scm
index 4ea8237c70..65704d7681 100644
--- a/gnu/system/file-systems.scm
+++ b/gnu/system/file-systems.scm
@@ -82,6 +82,7 @@ (define-module (gnu system file-systems)
%pseudo-terminal-file-system
%tty-gid
%immutable-store
+ %runtime-variable-data
%control-groups
%elogind-file-systems
@@ -448,6 +449,17 @@ (define %immutable-store
(check? #f)
(flags '(read-only bind-mount no-atime))))
+(define %runtime-variable-data
+ (file-system
+ (type "tmpfs")
+ (mount-point "/run")
+ (device "tmpfs")
+ (flags '(no-dev strict-atime))
+ (options "mode=0755,nr_inodes=800k,size=20%")
+ (needed-for-boot? #t)
+ (check? #f)
+ (create-mount-point? #t)))
+
(define %control-groups
;; The cgroup2 file system.
(list (file-system
@@ -497,7 +509,8 @@ (define %base-file-systems
%debug-file-system
%shared-memory-file-system
%efivars-file-system
- %immutable-store))
+ %immutable-store
+ %runtime-variable-data))
(define %base-live-file-systems
;; This is the bare minimum to use live file-systems.
base-commit: 8576aaf5f90db9b385ea8cf6dc98bf3c062959dc
--
2.46.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Thu, 26 Sep 2024 07:07:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 73494 <at> debbugs.gnu.org (full text, mbox):
* gnu/services.scm (cleanup-gexp): Make /var/run a symlink of /run.
* gnu/services/dbus.scm (dbus-activation): Adjust accordingly.
Change-Id: I7b94d3e2fe1bef66f435e84bc77f32311dddd0ce
---
gnu/services.scm | 3 +--
gnu/services/dbus.scm | 31 -------------------------------
2 files changed, 1 insertion(+), 33 deletions(-)
diff --git a/gnu/services.scm b/gnu/services.scm
index ea855ad193..50af5f56b6 100644
--- a/gnu/services.scm
+++ b/gnu/services.scm
@@ -668,8 +668,7 @@ (define (cleanup-gexp _)
;; hence the 'chmod' calls.
(mkdir "/tmp" #o1777)
(chmod "/tmp" #o1777)
- (mkdir "/var/run" #o755)
- (chmod "/var/run" #o755))))))
+ (symlink "/run" "/var/run"))))))
(define cleanup-service-type
;; Service that cleans things up in /tmp and similar.
diff --git a/gnu/services/dbus.scm b/gnu/services/dbus.scm
index 76e04bf221..9292172e01 100644
--- a/gnu/services/dbus.scm
+++ b/gnu/services/dbus.scm
@@ -190,37 +190,6 @@ (define (dbus-activation config)
;; world-readable.
(mkdir-p/perms "/run/dbus" user #o755))
- (catch 'system-error
- (lambda ()
- (symlink "/run/dbus" "/var/run/dbus"))
- (lambda args
- (let ((errno (system-error-errno args)))
- (cond
- ((= errno EEXIST)
- (let ((existing-name
- (false-if-exception
- (readlink "/var/run/dbus"))))
- (unless (equal? existing-name "/run/dbus")
- ;; Move the content of /var/run/dbus to /run/dbus, and
- ;; retry.
- (let ((dir (opendir "/var/run/dbus")))
- (let loop ((next (readdir dir)))
- (cond
- ((eof-object? next) (closedir dir))
- ((member next '("." "..")) (loop (readdir dir)))
- (else
- (begin
- (rename-file (string-append "/var/run/dbus/" next)
- (string-append "/run/dbus/" next))
- (loop (readdir dir)))))))
- (rmdir "/var/run/dbus")
- (symlink "/run/dbus" "/var/run/dbus"))))
- (else
- (format (current-error-port)
- "Failed to symlink /run/dbus to /var/run/dbus: ~s~%"
- (strerror errno))
- (error "cannot create /var/run/dbus"))))))
-
(unless (file-exists? "/etc/machine-id")
(format #t "creating /etc/machine-id...~%")
(invoke (string-append #$(dbus-configuration-dbus config)
--
2.46.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Sun, 29 Sep 2024 03:20:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 73494 <at> debbugs.gnu.org (full text, mbox):
On Thu, 26 Sep 2024 14:44:52 +0800,
Hilton Chain wrote:
>
> Hi Guix,
>
> This series adds a tmpfs /run to %base-file-systems and symlinks /var/run to
> it.
>
> Mount options are taken from Systemd[1], OpenRC also uses the same ones[2].
> (Except no-suid since we have /run/privileged/bin.)
>
> Thanks
>
> [1]: https://github.com/systemd/systemd/blob/v256.6/src/shared/mount-setup.c#L102
> [2]: https://github.com/OpenRC/openrc/blob/0.55.1/sh/init.sh.Linux.in#L74
>
> Hilton Chain (2):
> file-systems: %base-file-systems: Add tmpfs /run.
> services: cleanup: Make /var/run a symlink of /run.
>
> doc/guix.texi | 5 +++++
> gnu/services.scm | 6 +-----
> gnu/services/dbus.scm | 31 -------------------------------
> gnu/system/file-systems.scm | 15 ++++++++++++++-
> 4 files changed, 20 insertions(+), 37 deletions(-)
>
>
> base-commit: 8576aaf5f90db9b385ea8cf6dc98bf3c062959dc
> --
> 2.46.0
As adding mount point to /run requires an immediate reboot after reconfiguring
from a system without it, I'll also add a news entry for the change.
Merging /var/run and /run is the easiest part, since they are supposed to be
cleaned upon booting and nothing will break with the change. However there're
many references to both directories in our codebase. I'm not sure if these
references should be unified as well.
I won't hurry on pushing this change, please leave a comment if you want the
change or there's any concern about it.
Thanks
Information forwarded
to
guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Wed, 30 Oct 2024 06:39:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 73494 <at> debbugs.gnu.org (full text, mbox):
Hi Hilton,
Hilton Chain <hako <at> ultrarare.space> writes:
> On Thu, 26 Sep 2024 14:44:52 +0800,
> Hilton Chain wrote:
>>
>> Hi Guix,
>>
>> This series adds a tmpfs /run to %base-file-systems and symlinks /var/run to
>> it.
>>
>> Mount options are taken from Systemd[1], OpenRC also uses the same ones[2].
>> (Except no-suid since we have /run/privileged/bin.)
>>
>> Thanks
>>
>> [1]: https://github.com/systemd/systemd/blob/v256.6/src/shared/mount-setup.c#L102
>> [2]: https://github.com/OpenRC/openrc/blob/0.55.1/sh/init.sh.Linux.in#L74
>>
>> Hilton Chain (2):
>> file-systems: %base-file-systems: Add tmpfs /run.
>> services: cleanup: Make /var/run a symlink of /run.
>>
>> doc/guix.texi | 5 +++++
>> gnu/services.scm | 6 +-----
>> gnu/services/dbus.scm | 31 -------------------------------
>> gnu/system/file-systems.scm | 15 ++++++++++++++-
>> 4 files changed, 20 insertions(+), 37 deletions(-)
>>
>>
>> base-commit: 8576aaf5f90db9b385ea8cf6dc98bf3c062959dc
>> --
>> 2.46.0
>
> As adding mount point to /run requires an immediate reboot after reconfiguring
> from a system without it, I'll also add a news entry for the change.
>
> Merging /var/run and /run is the easiest part, since they are supposed to be
> cleaned upon booting and nothing will break with the change. However there're
> many references to both directories in our codebase. I'm not sure if these
> references should be unified as well.
>
> I won't hurry on pushing this change, please leave a comment if you want the
> change or there's any concern about it.
I think it's a worthwhile change. It'd be neat to unify every reference
to /var/run to /run in the doc/code too.
I'll be trying this on the build farm as there's an annoying problem
with anonip that creates FIFOs under /run/anonip, and these currently
become plain files upon reboot, breaking the anonip-service services.
--
Thanks,
Maxim
Information forwarded
to
guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Sun, 03 Nov 2024 15:47:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 73494 <at> debbugs.gnu.org (full text, mbox):
Hi Maxim,
On Wed, 30 Oct 2024 14:37:39 +0800,
Maxim Cournoyer wrote:
> I think it's a worthwhile change. It'd be neat to unify every reference
> to /var/run to /run in the doc/code too.
Thank you, I'm now thinking of unifying them without the tmpfs change, since the
tmpfs is not strictly necessary.
> I'll be trying this on the build farm as there's an annoying problem
> with anonip that creates FIFOs under /run/anonip, and these currently
> become plain files upon reboot, breaking the anonip-service services.
Won't these files be deleted (c250033aa69f: services: cleanup: Delete /run upon
boot.) at boot?
Information forwarded
to
guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Mon, 04 Nov 2024 12:14:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 73494 <at> debbugs.gnu.org (full text, mbox):
Hi Hilton,
Hilton Chain <hako <at> ultrarare.space> writes:
> Hi Maxim,
>
> On Wed, 30 Oct 2024 14:37:39 +0800,
> Maxim Cournoyer wrote:
>> I think it's a worthwhile change. It'd be neat to unify every reference
>> to /var/run to /run in the doc/code too.
>
> Thank you, I'm now thinking of unifying them without the tmpfs change, since the
> tmpfs is not strictly necessary.
>
>> I'll be trying this on the build farm as there's an annoying problem
>> with anonip that creates FIFOs under /run/anonip, and these currently
>> become plain files upon reboot, breaking the anonip-service services.
>
> Won't these files be deleted (c250033aa69f: services: cleanup: Delete /run upon
> boot.) at boot?
Yes, they should, but I didn't want to take anything for granted. I've
come up with a reproducer (system tests) and a fix (already pushed) for
it in the series https://issues.guix.gnu.org/74151
--
Thanks,
Maxim
Information forwarded
to
guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Mon, 04 Nov 2024 12:14:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 73494 <at> debbugs.gnu.org (full text, mbox):
Hello,
Hilton Chain <hako <at> ultrarare.space> writes:
> Hi Maxim,
>
> On Wed, 30 Oct 2024 14:37:39 +0800,
> Maxim Cournoyer wrote:
>> I think it's a worthwhile change. It'd be neat to unify every reference
>> to /var/run to /run in the doc/code too.
>
> Thank you, I'm now thinking of unifying them without the tmpfs change, since the
> tmpfs is not strictly necessary.
>
>> I'll be trying this on the build farm as there's an annoying problem
>> with anonip that creates FIFOs under /run/anonip, and these currently
>> become plain files upon reboot, breaking the anonip-service services.
>
> Won't these files be deleted (c250033aa69f: services: cleanup: Delete /run upon
> boot.) at boot?
Another thought; is tmpfs implemented on the Hurd?
--
Thanks,
Maxim
Information forwarded
to
guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Sun, 15 Dec 2024 16:36:01 GMT)
Full text and
rfc822 format available.
Message #29 received at 73494 <at> debbugs.gnu.org (full text, mbox):
Maxim Cournoyer <maxim.cournoyer <at> gmail.com> skribis:
> Another thought; is tmpfs implemented on the Hurd?
Yes, perhaps it’s even older than on Linux, but our file system mounting
code won’t work there (libc does not provide the ‘mount’ function on the
Hurd).
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Mon, 16 Dec 2024 09:15:02 GMT)
Full text and
rfc822 format available.
Message #32 received at 73494 <at> debbugs.gnu.org (full text, mbox):
Hi,
Ludovic Courtès <ludo <at> gnu.org> writes:
> Maxim Cournoyer <maxim.cournoyer <at> gmail.com> skribis:
>
>> Another thought; is tmpfs implemented on the Hurd?
>
> Yes, perhaps it’s even older than on Linux, but our file system mounting
> code won’t work there (libc does not provide the ‘mount’ function on the
> Hurd).
I see; so it's not any more a blocker than the current situation, since
we already have some issue with our current code on Hurd.
Hilton, I think this series is fine to apply. As you previously
mentioned, a news entry will be necessary to let Guix System users to
reboot after a reconfiguration past this change.
--
Thanks,
Maxim
Information forwarded
to
guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Fri, 20 Dec 2024 15:25:01 GMT)
Full text and
rfc822 format available.
Message #35 received at 73494 <at> debbugs.gnu.org (full text, mbox):
On Mon, 16 Dec 2024 17:13:35 +0800,
Maxim Cournoyer wrote:
>
> Hi,
>
> Ludovic Courtès <ludo <at> gnu.org> writes:
>
> > Maxim Cournoyer <maxim.cournoyer <at> gmail.com> skribis:
> >
> >> Another thought; is tmpfs implemented on the Hurd?
> >
> > Yes, perhaps it’s even older than on Linux, but our file system mounting
> > code won’t work there (libc does not provide the ‘mount’ function on the
> > Hurd).
>
> I see; so it's not any more a blocker than the current situation, since
> we already have some issue with our current code on Hurd.
>
> Hilton, I think this series is fine to apply. As you previously
> mentioned, a news entry will be necessary to let Guix System users to
> reboot after a reconfiguration past this change.
Thanks! I tried this change again and now it seems the newly-added filesystem
won't be automatically mounted.
Another concern I have is, with /run and /var/run unified,
‘guix system roll-back’ and ‘guix system switch-generation’ can't finish the
activation stage because of the error handling in dbus-activation from previous
generations.
--8<---------------cut here---------------start------------->8---
$ guix system describe
Generation 7 Dec 20 2024 23:10:05 (current)
[...]
$ sudo guix system roll-back
[...]
switched from generation 7 to 6
[...]
guix system: error: rmdir: Directory not empty
$ guix system describe
Generation 6 Dec 20 2024 22:57:19 (current)
--8<---------------cut here---------------end--------------->8---
Do we have a way to fix this?
Information forwarded
to
guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Fri, 20 Dec 2024 15:42:02 GMT)
Full text and
rfc822 format available.
Message #38 received at 73494 <at> debbugs.gnu.org (full text, mbox):
On Fri, 20 Dec 2024 23:23:29 +0800,
Hilton Chain wrote:
>
> Thanks! I tried this change again and now it seems the newly-added filesystem
> won't be automatically mounted.
won't be automatically mounted so that an immediate reboot is not required*
Information forwarded
to
guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Thu, 02 Jan 2025 15:13:02 GMT)
Full text and
rfc822 format available.
Message #41 received at 73494 <at> debbugs.gnu.org (full text, mbox):
Hi Hilton,
Sorry for the delay.
Hilton Chain <hako <at> ultrarare.space> writes:
[...]
> Another concern I have is, with /run and /var/run unified,
> ‘guix system roll-back’ and ‘guix system switch-generation’ can't finish the
> activation stage because of the error handling in dbus-activation from previous
> generations.
>
> $ guix system describe
> Generation 7 Dec 20 2024 23:10:05 (current)
> [...]
> $ sudo guix system roll-back
> [...]
> switched from generation 7 to 6
> [...]
> guix system: error: rmdir: Directory not empty
> $ guix system describe
> Generation 6 Dec 20 2024 22:57:19 (current)
>
> Do we have a way to fix this?
It's not clear to me where it fails exactly, so I'm not sure, but in the
worst case a fat warning as a NEWS entry could do, perhaps? Would it
break dbus on a reboot (activation runs at reboot too, right?), or just
print this otherwise innocuous error at roll-back/switch-generation
time?
--
Thanks,
Maxim
Information forwarded
to
guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Sat, 04 Jan 2025 15:31:02 GMT)
Full text and
rfc822 format available.
Message #44 received at 73494 <at> debbugs.gnu.org (full text, mbox):
Hi Maxim,
On Thu, 02 Jan 2025 23:11:54 +0800,
Maxim Cournoyer wrote:
>
> Hi Hilton,
>
> Sorry for the delay.
>
> Hilton Chain <hako <at> ultrarare.space> writes:
>
> [...]
>
> > Another concern I have is, with /run and /var/run unified,
> > ‘guix system roll-back’ and ‘guix system switch-generation’ can't finish the
> > activation stage because of the error handling in dbus-activation from previous
> > generations.
> >
> > $ guix system describe
> > Generation 7 Dec 20 2024 23:10:05 (current)
> > [...]
> > $ sudo guix system roll-back
> > [...]
> > switched from generation 7 to 6
> > [...]
> > guix system: error: rmdir: Directory not empty
> > $ guix system describe
> > Generation 6 Dec 20 2024 22:57:19 (current)
> >
> > Do we have a way to fix this?
>
> It's not clear to me where it fails exactly, so I'm not sure, but in the
It comes from error handling code in (@@ (gnu services dbus) dbus-activation),
dbus-activation.
> worst case a fat warning as a NEWS entry could do, perhaps? Would it
> break dbus on a reboot (activation runs at reboot too, right?), or just
> print this otherwise innocuous error at roll-back/switch-generation
> time?
Yes, it only affects roll-back/switch-generation and is harmless to dbus service
since the activation should be done already.
However I'm afraid its failure may break the activation process:
--8<---------------cut here---------------start------------->8---
(for-each primitive-load
'("...-activate-service.scm" ...))
--8<---------------cut here---------------end--------------->8---
Can we run this primitive-load with false-if-exception?
Information forwarded
to
guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Tue, 21 Jan 2025 04:18:02 GMT)
Full text and
rfc822 format available.
Message #47 received at 73494 <at> debbugs.gnu.org (full text, mbox):
Hi Hilton,
Sorry for the delay.
Hilton Chain <hako <at> ultrarare.space> writes:
> Hi Maxim,
> On Thu, 02 Jan 2025 23:11:54 +0800,
> Maxim Cournoyer wrote:
>>
>> Hi Hilton,
>>
>> Sorry for the delay.
>>
>> Hilton Chain <hako <at> ultrarare.space> writes:
>>
>> [...]
>>
>> > Another concern I have is, with /run and /var/run unified,
>> > ‘guix system roll-back’ and ‘guix system switch-generation’ can't finish the
>> > activation stage because of the error handling in dbus-activation from previous
>> > generations.
>> >
>> > $ guix system describe
>> > Generation 7 Dec 20 2024 23:10:05 (current)
>> > [...]
>> > $ sudo guix system roll-back
>> > [...]
>> > switched from generation 7 to 6
>> > [...]
>> > guix system: error: rmdir: Directory not empty
>> > $ guix system describe
>> > Generation 6 Dec 20 2024 22:57:19 (current)
>> >
>> > Do we have a way to fix this?
>>
>> It's not clear to me where it fails exactly, so I'm not sure, but in the
>
> It comes from error handling code in (@@ (gnu services dbus) dbus-activation),
> dbus-activation.
>
>> worst case a fat warning as a NEWS entry could do, perhaps? Would it
>> break dbus on a reboot (activation runs at reboot too, right?), or just
>> print this otherwise innocuous error at roll-back/switch-generation
>> time?
>
> Yes, it only affects roll-back/switch-generation and is harmless to dbus service
> since the activation should be done already.
>
> However I'm afraid its failure may break the activation process:
>
> (for-each primitive-load
> '("...-activate-service.scm" ...))
>
> Can we run this primitive-load with false-if-exception?
I guess we could do that; extra points if the error is caught and logged
(but otherwise neutralized).
--
Thanks,
Maxim
Information forwarded
to
guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Sat, 01 Mar 2025 12:38:02 GMT)
Full text and
rfc822 format available.
Message #50 received at 73494 <at> debbugs.gnu.org (full text, mbox):
On Tue, 21 Jan 2025 12:16:52 +0800,
Maxim Cournoyer wrote:
>
> > However I'm afraid its failure may break the activation process:
> >
> > (for-each primitive-load
> > '("...-activate-service.scm" ...))
> >
> > Can we run this primitive-load with false-if-exception?
>
> I guess we could do that; extra points if the error is caught and logged
> (but otherwise neutralized).
--8<---------------cut here---------------start------------->8---
building /gnu/store/fyn7ymd24k8v4ar2rqvp4yk75qcclv7q-switch-to-system.scm.drv...
making '/var/guix/profiles/system-98-link' the current system...
populating /etc from /gnu/store/svdqdysmfb5sz3s0qvfd2c9hiidrsabs-etc...
setting up privileged programs in '/run/privileged/bin'...
guix system: warning: failed to activate '/gnu/store/mkl7gr24xrdjm9gdr1jhzadc9pksg4f2-activate-service.scm': In procedure rmdir: Directory not empty
The following derivation will be built:
/gnu/store/fgr7dafbxlcfvdh47kcd2bax0dva0yy6-install-bootloader.scm.drv
building /gnu/store/fgr7dafbxlcfvdh47kcd2bax0dva0yy6-install-bootloader.scm.drv...
guix system: bootloader successfully installed on '(/efi)'
--8<---------------cut here---------------end--------------->8---
Does this warning look good to you?
Information forwarded
to
guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Tue, 04 Mar 2025 14:26:02 GMT)
Full text and
rfc822 format available.
Message #53 received at 73494 <at> debbugs.gnu.org (full text, mbox):
Hilton Chain <hako <at> ultrarare.space> skribis:
> On Tue, 21 Jan 2025 12:16:52 +0800,
> Maxim Cournoyer wrote:
>>
>> > However I'm afraid its failure may break the activation process:
>> >
>> > (for-each primitive-load
>> > '("...-activate-service.scm" ...))
>> >
>> > Can we run this primitive-load with false-if-exception?
>>
>> I guess we could do that; extra points if the error is caught and logged
>> (but otherwise neutralized).
>
> building /gnu/store/fyn7ymd24k8v4ar2rqvp4yk75qcclv7q-switch-to-system.scm.drv...
> making '/var/guix/profiles/system-98-link' the current system...
> populating /etc from /gnu/store/svdqdysmfb5sz3s0qvfd2c9hiidrsabs-etc...
> setting up privileged programs in '/run/privileged/bin'...
> guix system: warning: failed to activate '/gnu/store/mkl7gr24xrdjm9gdr1jhzadc9pksg4f2-activate-service.scm': In procedure rmdir: Directory not empty
> The following derivation will be built:
> /gnu/store/fgr7dafbxlcfvdh47kcd2bax0dva0yy6-install-bootloader.scm.drv
>
> building /gnu/store/fgr7dafbxlcfvdh47kcd2bax0dva0yy6-install-bootloader.scm.drv...
> guix system: bootloader successfully installed on '(/efi)'
>
> Does this warning look good to you?
Yes, sounds reasonable.
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Wed, 05 Mar 2025 02:04:02 GMT)
Full text and
rfc822 format available.
Message #56 received at 73494 <at> debbugs.gnu.org (full text, mbox):
Hello,
Ludovic Courtès <ludo <at> gnu.org> writes:
[...]
>>> I guess we could do that; extra points if the error is caught and logged
>>> (but otherwise neutralized).
>>
>> building /gnu/store/fyn7ymd24k8v4ar2rqvp4yk75qcclv7q-switch-to-system.scm.drv...
>> making '/var/guix/profiles/system-98-link' the current system...
>> populating /etc from /gnu/store/svdqdysmfb5sz3s0qvfd2c9hiidrsabs-etc...
>> setting up privileged programs in '/run/privileged/bin'...
>> guix system: warning: failed to activate
>> '/gnu/store/mkl7gr24xrdjm9gdr1jhzadc9pksg4f2-activate-service.scm':
>> In procedure rmdir: Directory not empty
>> The following derivation will be built:
>> /gnu/store/fgr7dafbxlcfvdh47kcd2bax0dva0yy6-install-bootloader.scm.drv
>>
>> building /gnu/store/fgr7dafbxlcfvdh47kcd2bax0dva0yy6-install-bootloader.scm.drv...
>> guix system: bootloader successfully installed on '(/efi)'
>>
>> Does this warning look good to you?
>
> Yes, sounds reasonable.
I wanted to apply this change, but 'make check-system TESTS=jami' now
crashes at boot in gnu/build/activation.scm:
--8<---------------cut here---------------start------------->8---
In gnu/build/activation.scm:
102:9 1 (retry)
In ice-9/boot-9.scm:
1685:16 0 (raise-exception _ #:continuable? _)
In procedure open-fdes-at: Not a directory
[ 0.978773] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000000
[ 0.978994] CPU: 0 UID: 0 PID: 1 Comm: init Not tainted 6.13.5-gnu #1 c188f1cb5be905eaa0f98c5aa10913ea17baaded
[ 0.979289] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2/GNU Guix 04/01/2014
[ 0.979538] Call Trace:
[ 0.979612] <TASK>
[ 0.979677] dump_stack_lvl+0x2b/0xa0
[ 0.979786] dump_stack+0x14/0x20
[ 0.979884] panic+0x364/0x390
[ 0.979974] ? raw_spin_rq_unlock+0x14/0x40
[ 0.980095] do_exit+0x926/0xa90
[ 0.980187] do_group_exit+0x38/0x90
[ 0.980293] __x64_sys_exit_group+0x1c/0x20
[ 0.980407] x64_sys_call+0x10d5/0x26f0
[ 0.980513] do_syscall_64+0x74/0x160
[ 0.980616] entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 0.980754] RIP: 0033:0x572f95
[ 0.980840] Code: ff ff 0f 1f 00 64 41 83 3c 24 02 75 bf eb b8 66 0f 1f 44 00 00 48 c7 c6 b0 ff ff ff ba e7 00 00 00 eb 03 66 90 f4 89 d0 0f 05 <48> 3d 00 f0 ff ff 76 f3 f7 d8 64 89 06 eb ec 66 2e 0f 1f 84 00 00
[ 0.981330] RSP: 002b:00007ffe13646448 EFLAGS: 00000206 ORIG_RAX: 00000000000000e7
[ 0.981539] RAX: ffffffffffffffda RBX: 00000000007b3378 RCX: 0000000000572f95
[ 0.981738] RDX: 00000000000000e7 RSI: ffffffffffffffb0 RDI: 0000000000000000
[ 0.981939] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
[ 0.982138] R10: 0000000000446870 R11: 0000000000000206 R12: 0000000000805768
[ 0.982328] R13: 0000000000511b00 R14: 0000000000000003 R15: 0000000000805780
[ 0.982518] </TASK>
[ 0.982663] Kernel Offset: 0x30000000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)
[ 0.982948] Rebooting in 1 seconds..
--8<---------------cut here---------------end--------------->8---
Hilton, would you mind taking a look?
And because of commit 5074871043 ("build: marionette: Make it possible
to reboot VM during tests.") this causes an infinite reboot loop.
That's a bad fault enough that it shouldn't happen, but I'm wondering if
I shouldn't revert 5074871043 to avoid hanging tests in the odd cases
where this happens?
--
Thanks,
Maxim
Information forwarded
to
guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Wed, 05 Mar 2025 05:36:01 GMT)
Full text and
rfc822 format available.
Message #59 received at 73494 <at> debbugs.gnu.org (full text, mbox):
Hi,
Hilton Chain <hako <at> ultrarare.space> writes:
> * gnu/services.scm (cleanup-gexp): Make /var/run a symlink of /run.
> * gnu/services/dbus.scm (dbus-activation): Adjust accordingly.
I pushed 1/2 but not this one until we figure out how to fix the jami
system test that it breaks.
--
Thanks,
Maxim
Information forwarded
to
guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Wed, 05 Mar 2025 06:59:02 GMT)
Full text and
rfc822 format available.
Message #62 received at 73494 <at> debbugs.gnu.org (full text, mbox):
On Wed, 05 Mar 2025 13:34:42 +0800,
Maxim Cournoyer wrote:
>
> Hi,
>
> Hilton Chain <hako <at> ultrarare.space> writes:
>
> > * gnu/services.scm (cleanup-gexp): Make /var/run a symlink of /run.
> > * gnu/services/dbus.scm (dbus-activation): Adjust accordingly.
>
> I pushed 1/2 but not this one until we figure out how to fix the jami
> system test that it breaks.
Sorry, I have reverted this commit, since without applying 2/2 dbus-service-type
will be broken. 1/2 can't live alone.
Let's reapply it after solving all issues :)
Information forwarded
to
guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Wed, 05 Mar 2025 08:59:01 GMT)
Full text and
rfc822 format available.
Message #65 received at 73494 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
I noticed the commit:
e88018be70ffb8ea35819a4c95d44ec20868ca59
file-systems: %base-file-systems: Add tmpfs /run.
Which was then reverted:
2bb8ecbfbf20efb126670ec92a7cdd88a4805902
Revert "file-systems: %base-file-systems: Add tmpfs /run."
...strangely the patch contained no-suid flags, even though the original
patch submitted intentionally did not have this and was explicitly
mentioned, as it breaks e.g. /run/privleged-programs/bin/sudo ...
+(define %runtime-variable-data
+ (file-system
+ (type "tmpfs")
+ (mount-point "/run")
+ (device "tmpfs")
+ (flags '(no-suid no-dev strict-atime))
^^^^^^^
It might be worth re-testing with the no-suid part removed as originally
intended, as it might be breaking other things too... (e.g. if a service
relies on setuid bits or something?)
I looked forward to tmpfs /run that works! :)
live well,
vagrant
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Wed, 05 Mar 2025 14:08:02 GMT)
Full text and
rfc822 format available.
Message #68 received at 73494 <at> debbugs.gnu.org (full text, mbox):
On Wed, 05 Mar 2025 16:57:38 +0800,
Vagrant Cascadian wrote:
>
> [1 <text/plain (7bit)>]
> I noticed the commit:
>
> e88018be70ffb8ea35819a4c95d44ec20868ca59
> file-systems: %base-file-systems: Add tmpfs /run.
>
> Which was then reverted:
>
> 2bb8ecbfbf20efb126670ec92a7cdd88a4805902
> Revert "file-systems: %base-file-systems: Add tmpfs /run."
>
> ...strangely the patch contained no-suid flags, even though the original
> patch submitted intentionally did not have this and was explicitly
> mentioned, as it breaks e.g. /run/privleged-programs/bin/sudo ...
>
> +(define %runtime-variable-data
> + (file-system
> + (type "tmpfs")
> + (mount-point "/run")
> + (device "tmpfs")
> + (flags '(no-suid no-dev strict-atime))
> ^^^^^^^
>
> It might be worth re-testing with the no-suid part removed as originally
> intended, as it might be breaking other things too... (e.g. if a service
> relies on setuid bits or something?)
>
>
> I looked forward to tmpfs /run that works! :)
:)
I aimed at doing minimum work for this patch series, but we still need to
consider what to do next. I have thought about three options:
1. Change all references of /var/run to /run.
This will be a lot of work and will force all users who have touched the
change to update and reboot.
2. Keep existing references but change new packages / services.
We need to ensure new references are consistent for one package otherwise it
won't work on systems with separate /var/run and /run (older Guix System and
some foreign distros maybe), we can't find such issue easily either after
switching to unified /var/run and /run.
3. Don't change references, use what upstream uses.
Since we are currently using separate /var/run and /run, we don't have to deal
with any issue other than currently encountered ones for finishing this patch
series.
I think I would go for 3, which requires less to no effort :) and is unlikely to
introduce breakage.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Thu, 06 Mar 2025 00:16:02 GMT)
Full text and
rfc822 format available.
Message #71 received at 73494 <at> debbugs.gnu.org (full text, mbox):
Hi Hilton,
Hilton Chain <hako <at> ultrarare.space> writes:
[...]
>> +(define %runtime-variable-data
>> + (file-system
>> + (type "tmpfs")
>> + (mount-point "/run")
>> + (device "tmpfs")
>> + (flags '(no-suid no-dev strict-atime))
>> ^^^^^^^
>>
>> It might be worth re-testing with the no-suid part removed as originally
>> intended, as it might be breaking other things too... (e.g. if a service
>> relies on setuid bits or something?)
Good call! That was me adding this last minute after inspecting how
/run is mounted on a Fedora VM, without giving much thought about our
own /run/privileged binaries, ah.
>> I looked forward to tmpfs /run that works! :)
Me too!
> I aimed at doing minimum work for this patch series, but we still need to
> consider what to do next. I have thought about three options:
>
> 1. Change all references of /var/run to /run.
>
> This will be a lot of work and will force all users who have touched the
> change to update and reboot.
>
> 2. Keep existing references but change new packages / services.
>
> We need to ensure new references are consistent for one package otherwise it
> won't work on systems with separate /var/run and /run (older Guix System and
> some foreign distros maybe), we can't find such issue easily either after
> switching to unified /var/run and /run.
This could be necessary for some containerized services, I think. For
example in jami-service-type, "/var/run/jami" is exposed to the
container. I'm not sure how file-system-mapping handles that, but I
assume it doesn't resolve the link first so wouldn't actually share
/run/jami.
> 3. Don't change references, use what upstream uses.
>
> Since we are currently using separate /var/run and /run, we don't have to deal
> with any issue other than currently encountered ones for finishing this patch
> series.
>
> I think I would go for 3, which requires less to no effort :) and is unlikely to
> introduce breakage.
I think 3., doing required minimum to get this working is the better
path forward; it's already tricky enough :-).
I'll try investigating why 'make check-system TESTS=jami' fails with
patch 2/2 of this series. We should run all system tests and see if
there are other new failures too.
--
Thanks,
Maxim
Information forwarded
to
hako <at> ultrarare.space, maxim.cournoyer <at> gmail.com, ludo <at> gnu.org, vagrant <at> debian.org, guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Thu, 06 Mar 2025 02:40:01 GMT)
Full text and
rfc822 format available.
Message #74 received at 73494 <at> debbugs.gnu.org (full text, mbox):
V1->V2:
- use canonicalized source for file-system-mapping->bind-mount.
I haven't tested yet but this should address service issues we were facing.
- run activation scripts with ‘invoke’.
For backtraces and avoid scripts changing the activation environment.
Hilton Chain (3):
file-systems: %base-file-systems: Add tmpfs /run.
services: cleanup: Make /var/run a symlink of /run.
services: activation: Continue on exceptions.
doc/guix.texi | 8 +++++++
gnu/services.scm | 42 +++++++++++++++++++++++++++----------
gnu/services/dbus.scm | 31 ---------------------------
gnu/system/file-systems.scm | 19 +++++++++++++++--
4 files changed, 56 insertions(+), 44 deletions(-)
base-commit: 18e6031f7405b8b9c38255db1957e1eb064d4632
prerequisite-patch-id: d239751bbc956c6055d0a7c7caf8b3bb3ec6a623
--
2.48.1
Information forwarded
to
hako <at> ultrarare.space, maxim.cournoyer <at> gmail.com, ludo <at> gnu.org, vagrant <at> debian.org, guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Thu, 06 Mar 2025 02:40:02 GMT)
Full text and
rfc822 format available.
Message #77 received at 73494 <at> debbugs.gnu.org (full text, mbox):
* gnu/system/file-systems (%runtime-variable-data): New variable.
(%base-file-systems): Add it.
* doc/guix.texi (File Systems): Document it.
* gnu/services.scm (cleanup-gexp): Adjust accordingly.
Change-Id: I3a95e49d396fbb2577026aefc247cfe996c5f267
Modified-by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
---
doc/guix.texi | 5 +++++
gnu/services.scm | 5 +----
gnu/system/file-systems.scm | 17 ++++++++++++++++-
3 files changed, 22 insertions(+), 5 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index 6844470ce2..70e5db4156 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -18228,6 +18228,11 @@ File Systems
read-write in its own ``name space.''
@end defvar
+@defvar %runtime-variable-data
+This file system is mounted as @file{/run} and contains system
+information data describing the system since it was booted.
+@end defvar
+
@defvar %binary-format-file-system
The @code{binfmt_misc} file system, which allows handling of arbitrary
executable file types to be delegated to user space. This requires the
diff --git a/gnu/services.scm b/gnu/services.scm
index 8a4002e072..ea855ad193 100644
--- a/gnu/services.scm
+++ b/gnu/services.scm
@@ -632,7 +632,7 @@ (define (cleanup-gexp _)
#~(begin
(use-modules (guix build utils))
- ;; Clean out /tmp, /var/run, and /run.
+ ;; Clean out /tmp and /var/run.
;;
;; XXX This needs to happen before service activations, so it
;; has to be here, but this also implicitly assumes that /tmp
@@ -663,15 +663,12 @@ (define (cleanup-gexp _)
(setlocale LC_CTYPE "en_US.utf8")
(delete-file-recursively "/tmp")
(delete-file-recursively "/var/run")
- (delete-file-recursively "/run")
;; Note: The second argument to 'mkdir' is and'ed with umask,
;; hence the 'chmod' calls.
(mkdir "/tmp" #o1777)
(chmod "/tmp" #o1777)
(mkdir "/var/run" #o755)
- (chmod "/var/run" #o755)
- (mkdir "/run" #o755)
(chmod "/var/run" #o755))))))
(define cleanup-service-type
diff --git a/gnu/system/file-systems.scm b/gnu/system/file-systems.scm
index 4ea8237c70..b2766707a3 100644
--- a/gnu/system/file-systems.scm
+++ b/gnu/system/file-systems.scm
@@ -82,6 +82,7 @@ (define-module (gnu system file-systems)
%pseudo-terminal-file-system
%tty-gid
%immutable-store
+ %runtime-variable-data
%control-groups
%elogind-file-systems
@@ -448,6 +449,19 @@ (define %immutable-store
(check? #f)
(flags '(read-only bind-mount no-atime))))
+(define %runtime-variable-data
+ (file-system
+ (type "tmpfs")
+ (mount-point "/run")
+ (device "tmpfs")
+ ;; Don't use no-suid here as /run/privileged/bin may contain SUID
+ ;; executables.
+ (flags '(no-dev strict-atime))
+ (options "mode=0755,nr_inodes=800k,size=20%")
+ (needed-for-boot? #t)
+ (check? #f)
+ (create-mount-point? #t)))
+
(define %control-groups
;; The cgroup2 file system.
(list (file-system
@@ -497,7 +511,8 @@ (define %base-file-systems
%debug-file-system
%shared-memory-file-system
%efivars-file-system
- %immutable-store))
+ %immutable-store
+ %runtime-variable-data))
(define %base-live-file-systems
;; This is the bare minimum to use live file-systems.
--
2.48.1
Information forwarded
to
hako <at> ultrarare.space, maxim.cournoyer <at> gmail.com, ludo <at> gnu.org, vagrant <at> debian.org, guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Thu, 06 Mar 2025 02:40:02 GMT)
Full text and
rfc822 format available.
Message #80 received at 73494 <at> debbugs.gnu.org (full text, mbox):
* gnu/services.scm (cleanup-gexp): Make /var/run a symlink of /run.
* doc/guix.texi (File Systems): Document it.
* gnu/system/file-systems.scm (file-system-mapping->bind-mount): Use
canonicalized source path.
* gnu/services/dbus.scm (dbus-activation): Adjust accordingly.
Change-Id: I7b94d3e2fe1bef66f435e84bc77f32311dddd0ce
---
doc/guix.texi | 3 +++
gnu/services.scm | 5 +++--
gnu/services/dbus.scm | 31 -------------------------------
gnu/system/file-systems.scm | 2 +-
4 files changed, 7 insertions(+), 34 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index 70e5db4156..3cec887591 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -18231,6 +18231,9 @@ File Systems
@defvar %runtime-variable-data
This file system is mounted as @file{/run} and contains system
information data describing the system since it was booted.
+
+Additionally, another directory with same role, @file{/var/run}, is
+implemented as a symlink to @file{/run}.
@end defvar
@defvar %binary-format-file-system
diff --git a/gnu/services.scm b/gnu/services.scm
index ea855ad193..7805cae971 100644
--- a/gnu/services.scm
+++ b/gnu/services.scm
@@ -668,8 +668,9 @@ (define (cleanup-gexp _)
;; hence the 'chmod' calls.
(mkdir "/tmp" #o1777)
(chmod "/tmp" #o1777)
- (mkdir "/var/run" #o755)
- (chmod "/var/run" #o755))))))
+ ;; /run is implemented as tmpfs mounted at early boot.
+ (mkdir-p "/var")
+ (symlink "/run" "/var/run"))))))
(define cleanup-service-type
;; Service that cleans things up in /tmp and similar.
diff --git a/gnu/services/dbus.scm b/gnu/services/dbus.scm
index 76e04bf221..9292172e01 100644
--- a/gnu/services/dbus.scm
+++ b/gnu/services/dbus.scm
@@ -190,37 +190,6 @@ (define (dbus-activation config)
;; world-readable.
(mkdir-p/perms "/run/dbus" user #o755))
- (catch 'system-error
- (lambda ()
- (symlink "/run/dbus" "/var/run/dbus"))
- (lambda args
- (let ((errno (system-error-errno args)))
- (cond
- ((= errno EEXIST)
- (let ((existing-name
- (false-if-exception
- (readlink "/var/run/dbus"))))
- (unless (equal? existing-name "/run/dbus")
- ;; Move the content of /var/run/dbus to /run/dbus, and
- ;; retry.
- (let ((dir (opendir "/var/run/dbus")))
- (let loop ((next (readdir dir)))
- (cond
- ((eof-object? next) (closedir dir))
- ((member next '("." "..")) (loop (readdir dir)))
- (else
- (begin
- (rename-file (string-append "/var/run/dbus/" next)
- (string-append "/run/dbus/" next))
- (loop (readdir dir)))))))
- (rmdir "/var/run/dbus")
- (symlink "/run/dbus" "/var/run/dbus"))))
- (else
- (format (current-error-port)
- "Failed to symlink /run/dbus to /var/run/dbus: ~s~%"
- (strerror errno))
- (error "cannot create /var/run/dbus"))))))
-
(unless (file-exists? "/etc/machine-id")
(format #t "creating /etc/machine-id...~%")
(invoke (string-append #$(dbus-configuration-dbus config)
diff --git a/gnu/system/file-systems.scm b/gnu/system/file-systems.scm
index b2766707a3..8b11489968 100644
--- a/gnu/system/file-systems.scm
+++ b/gnu/system/file-systems.scm
@@ -594,7 +594,7 @@ (define (file-system-mapping->bind-mount mapping)
(($ <file-system-mapping> source target writable?)
(file-system
(mount-point target)
- (device source)
+ (device (canonicalize-path source))
(type "none")
(flags (if writable?
'(bind-mount)
--
2.48.1
Information forwarded
to
hako <at> ultrarare.space, maxim.cournoyer <at> gmail.com, ludo <at> gnu.org, vagrant <at> debian.org, guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Thu, 06 Mar 2025 02:40:03 GMT)
Full text and
rfc822 format available.
Message #83 received at 73494 <at> debbugs.gnu.org (full text, mbox):
Use ‘invoke’ for backtraces and avoid changing environment.
* gnu/services.scm (activation-script): Execute activation scripts in
‘invoke’.
Warn about failed activation scripts.
Change-Id: I89be31433fbb46d0c4a9dc6115ab167910840b6f
---
gnu/services.scm | 32 +++++++++++++++++++++++++++-----
1 file changed, 27 insertions(+), 5 deletions(-)
diff --git a/gnu/services.scm b/gnu/services.scm
index 7805cae971..3a511a42e5 100644
--- a/gnu/services.scm
+++ b/gnu/services.scm
@@ -690,15 +690,28 @@ (define* (activation-service->script service)
(define (activation-script gexps)
"Return the system's activation script, which evaluates GEXPS."
(define actions
- (map (cut program-file "activate-service.scm" <>) gexps))
+ (map (lambda (action)
+ (program-file "activate-service.scm"
+ (with-imported-modules (source-module-closure
+ '((gnu build activation)
+ (guix build utils)))
+ #~(begin
+ (use-modules (gnu build activation)
+ (guix build utils))
+ #$action))))
+ gexps))
(program-file "activate.scm"
(with-imported-modules (source-module-closure
'((gnu build activation)
- (guix build utils)))
+ (guix build utils)
+ (guix diagnostics)
+ (guix i18n)))
#~(begin
(use-modules (gnu build activation)
- (guix build utils))
+ (guix build utils)
+ (guix diagnostics)
+ (guix i18n))
(mkdir-p "/var/run")
;; Make sure the user accounting database exists. If it
@@ -717,8 +730,17 @@ (define (activation-script gexps)
(activate-current-system)
;; Run the services' activation snippets.
- ;; TODO: Use 'load-compiled'.
- (for-each primitive-load '#$actions)))))
+ (for-each (lambda (action)
+ ;; Don't block activation process when one
+ ;; action fails.
+ (catch #t
+ (lambda ()
+ (invoke action))
+ (lambda _
+ (warning
+ (G_ "failed to activate '~a'.~%")
+ action))))
+ '#$actions)))))
(define (gexps->activation-gexp gexps)
"Return a gexp that runs the activation script containing GEXPS."
--
2.48.1
Information forwarded
to
hako <at> ultrarare.space, maxim.cournoyer <at> gmail.com, ludo <at> gnu.org, vagrant <at> debian.org, guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Thu, 06 Mar 2025 06:24:02 GMT)
Full text and
rfc822 format available.
Message #86 received at 73494 <at> debbugs.gnu.org (full text, mbox):
V2 -> V3:
For file-system-mapping->bind-mount, drop the first 4 characters in source
when it's a string starting with "/var/run", instead of using canonicalized
source (as in V2), since the source can't be ensured to exist at evaluation
time.
Hilton Chain (3):
file-systems: %base-file-systems: Add tmpfs /run.
services: cleanup: Make /var/run a symlink of /run.
services: activation: Continue on exceptions.
doc/guix.texi | 8 +++++++
gnu/services.scm | 42 +++++++++++++++++++++++++++----------
gnu/services/dbus.scm | 31 ---------------------------
gnu/system/file-systems.scm | 24 +++++++++++++++++++--
4 files changed, 61 insertions(+), 44 deletions(-)
base-commit: 18e6031f7405b8b9c38255db1957e1eb064d4632
prerequisite-patch-id: d239751bbc956c6055d0a7c7caf8b3bb3ec6a623
--
2.48.1
Information forwarded
to
hako <at> ultrarare.space, maxim.cournoyer <at> gmail.com, ludo <at> gnu.org, vagrant <at> debian.org, guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Thu, 06 Mar 2025 06:24:02 GMT)
Full text and
rfc822 format available.
Message #89 received at 73494 <at> debbugs.gnu.org (full text, mbox):
* gnu/system/file-systems (%runtime-variable-data): New variable.
(%base-file-systems): Add it.
* doc/guix.texi (File Systems): Document it.
* gnu/services.scm (cleanup-gexp): Adjust accordingly.
Change-Id: I3a95e49d396fbb2577026aefc247cfe996c5f267
Modified-by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
---
doc/guix.texi | 5 +++++
gnu/services.scm | 5 +----
gnu/system/file-systems.scm | 17 ++++++++++++++++-
3 files changed, 22 insertions(+), 5 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index 6844470ce2..70e5db4156 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -18228,6 +18228,11 @@ File Systems
read-write in its own ``name space.''
@end defvar
+@defvar %runtime-variable-data
+This file system is mounted as @file{/run} and contains system
+information data describing the system since it was booted.
+@end defvar
+
@defvar %binary-format-file-system
The @code{binfmt_misc} file system, which allows handling of arbitrary
executable file types to be delegated to user space. This requires the
diff --git a/gnu/services.scm b/gnu/services.scm
index 8a4002e072..ea855ad193 100644
--- a/gnu/services.scm
+++ b/gnu/services.scm
@@ -632,7 +632,7 @@ (define (cleanup-gexp _)
#~(begin
(use-modules (guix build utils))
- ;; Clean out /tmp, /var/run, and /run.
+ ;; Clean out /tmp and /var/run.
;;
;; XXX This needs to happen before service activations, so it
;; has to be here, but this also implicitly assumes that /tmp
@@ -663,15 +663,12 @@ (define (cleanup-gexp _)
(setlocale LC_CTYPE "en_US.utf8")
(delete-file-recursively "/tmp")
(delete-file-recursively "/var/run")
- (delete-file-recursively "/run")
;; Note: The second argument to 'mkdir' is and'ed with umask,
;; hence the 'chmod' calls.
(mkdir "/tmp" #o1777)
(chmod "/tmp" #o1777)
(mkdir "/var/run" #o755)
- (chmod "/var/run" #o755)
- (mkdir "/run" #o755)
(chmod "/var/run" #o755))))))
(define cleanup-service-type
diff --git a/gnu/system/file-systems.scm b/gnu/system/file-systems.scm
index 4ea8237c70..b2766707a3 100644
--- a/gnu/system/file-systems.scm
+++ b/gnu/system/file-systems.scm
@@ -82,6 +82,7 @@ (define-module (gnu system file-systems)
%pseudo-terminal-file-system
%tty-gid
%immutable-store
+ %runtime-variable-data
%control-groups
%elogind-file-systems
@@ -448,6 +449,19 @@ (define %immutable-store
(check? #f)
(flags '(read-only bind-mount no-atime))))
+(define %runtime-variable-data
+ (file-system
+ (type "tmpfs")
+ (mount-point "/run")
+ (device "tmpfs")
+ ;; Don't use no-suid here as /run/privileged/bin may contain SUID
+ ;; executables.
+ (flags '(no-dev strict-atime))
+ (options "mode=0755,nr_inodes=800k,size=20%")
+ (needed-for-boot? #t)
+ (check? #f)
+ (create-mount-point? #t)))
+
(define %control-groups
;; The cgroup2 file system.
(list (file-system
@@ -497,7 +511,8 @@ (define %base-file-systems
%debug-file-system
%shared-memory-file-system
%efivars-file-system
- %immutable-store))
+ %immutable-store
+ %runtime-variable-data))
(define %base-live-file-systems
;; This is the bare minimum to use live file-systems.
--
2.48.1
Information forwarded
to
hako <at> ultrarare.space, maxim.cournoyer <at> gmail.com, ludo <at> gnu.org, vagrant <at> debian.org, guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Thu, 06 Mar 2025 06:24:03 GMT)
Full text and
rfc822 format available.
Message #92 received at 73494 <at> debbugs.gnu.org (full text, mbox):
* gnu/services.scm (cleanup-gexp): Make /var/run a symlink of /run.
* doc/guix.texi (File Systems): Document it.
* gnu/system/file-systems.scm (file-system-mapping->bind-mount): Replace
/var/run in source path with /run.
* gnu/services/dbus.scm (dbus-activation): Adjust accordingly.
Change-Id: I7b94d3e2fe1bef66f435e84bc77f32311dddd0ce
---
doc/guix.texi | 3 +++
gnu/services.scm | 5 +++--
gnu/services/dbus.scm | 31 -------------------------------
gnu/system/file-systems.scm | 7 ++++++-
4 files changed, 12 insertions(+), 34 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index 70e5db4156..3cec887591 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -18231,6 +18231,9 @@ File Systems
@defvar %runtime-variable-data
This file system is mounted as @file{/run} and contains system
information data describing the system since it was booted.
+
+Additionally, another directory with same role, @file{/var/run}, is
+implemented as a symlink to @file{/run}.
@end defvar
@defvar %binary-format-file-system
diff --git a/gnu/services.scm b/gnu/services.scm
index ea855ad193..7805cae971 100644
--- a/gnu/services.scm
+++ b/gnu/services.scm
@@ -668,8 +668,9 @@ (define (cleanup-gexp _)
;; hence the 'chmod' calls.
(mkdir "/tmp" #o1777)
(chmod "/tmp" #o1777)
- (mkdir "/var/run" #o755)
- (chmod "/var/run" #o755))))))
+ ;; /run is implemented as tmpfs mounted at early boot.
+ (mkdir-p "/var")
+ (symlink "/run" "/var/run"))))))
(define cleanup-service-type
;; Service that cleans things up in /tmp and similar.
diff --git a/gnu/services/dbus.scm b/gnu/services/dbus.scm
index 76e04bf221..9292172e01 100644
--- a/gnu/services/dbus.scm
+++ b/gnu/services/dbus.scm
@@ -190,37 +190,6 @@ (define (dbus-activation config)
;; world-readable.
(mkdir-p/perms "/run/dbus" user #o755))
- (catch 'system-error
- (lambda ()
- (symlink "/run/dbus" "/var/run/dbus"))
- (lambda args
- (let ((errno (system-error-errno args)))
- (cond
- ((= errno EEXIST)
- (let ((existing-name
- (false-if-exception
- (readlink "/var/run/dbus"))))
- (unless (equal? existing-name "/run/dbus")
- ;; Move the content of /var/run/dbus to /run/dbus, and
- ;; retry.
- (let ((dir (opendir "/var/run/dbus")))
- (let loop ((next (readdir dir)))
- (cond
- ((eof-object? next) (closedir dir))
- ((member next '("." "..")) (loop (readdir dir)))
- (else
- (begin
- (rename-file (string-append "/var/run/dbus/" next)
- (string-append "/run/dbus/" next))
- (loop (readdir dir)))))))
- (rmdir "/var/run/dbus")
- (symlink "/run/dbus" "/var/run/dbus"))))
- (else
- (format (current-error-port)
- "Failed to symlink /run/dbus to /var/run/dbus: ~s~%"
- (strerror errno))
- (error "cannot create /var/run/dbus"))))))
-
(unless (file-exists? "/etc/machine-id")
(format #t "creating /etc/machine-id...~%")
(invoke (string-append #$(dbus-configuration-dbus config)
diff --git a/gnu/system/file-systems.scm b/gnu/system/file-systems.scm
index b2766707a3..697fcf4f82 100644
--- a/gnu/system/file-systems.scm
+++ b/gnu/system/file-systems.scm
@@ -594,7 +594,12 @@ (define (file-system-mapping->bind-mount mapping)
(($ <file-system-mapping> source target writable?)
(file-system
(mount-point target)
- (device source)
+ (device
+ ;; /var/run is implemented as a symlink to /run.
+ (if (and (string? source)
+ (string-prefix? "/var/run" source))
+ (string-drop source 4)
+ source))
(type "none")
(flags (if writable?
'(bind-mount)
--
2.48.1
Information forwarded
to
hako <at> ultrarare.space, maxim.cournoyer <at> gmail.com, ludo <at> gnu.org, vagrant <at> debian.org, guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Thu, 06 Mar 2025 06:24:03 GMT)
Full text and
rfc822 format available.
Message #95 received at 73494 <at> debbugs.gnu.org (full text, mbox):
Use ‘invoke’ for backtraces and avoid changing environment.
* gnu/services.scm (activation-script): Execute activation scripts in
‘invoke’.
Warn about failed activation scripts.
Change-Id: I89be31433fbb46d0c4a9dc6115ab167910840b6f
---
gnu/services.scm | 32 +++++++++++++++++++++++++++-----
1 file changed, 27 insertions(+), 5 deletions(-)
diff --git a/gnu/services.scm b/gnu/services.scm
index 7805cae971..3a511a42e5 100644
--- a/gnu/services.scm
+++ b/gnu/services.scm
@@ -690,15 +690,28 @@ (define* (activation-service->script service)
(define (activation-script gexps)
"Return the system's activation script, which evaluates GEXPS."
(define actions
- (map (cut program-file "activate-service.scm" <>) gexps))
+ (map (lambda (action)
+ (program-file "activate-service.scm"
+ (with-imported-modules (source-module-closure
+ '((gnu build activation)
+ (guix build utils)))
+ #~(begin
+ (use-modules (gnu build activation)
+ (guix build utils))
+ #$action))))
+ gexps))
(program-file "activate.scm"
(with-imported-modules (source-module-closure
'((gnu build activation)
- (guix build utils)))
+ (guix build utils)
+ (guix diagnostics)
+ (guix i18n)))
#~(begin
(use-modules (gnu build activation)
- (guix build utils))
+ (guix build utils)
+ (guix diagnostics)
+ (guix i18n))
(mkdir-p "/var/run")
;; Make sure the user accounting database exists. If it
@@ -717,8 +730,17 @@ (define (activation-script gexps)
(activate-current-system)
;; Run the services' activation snippets.
- ;; TODO: Use 'load-compiled'.
- (for-each primitive-load '#$actions)))))
+ (for-each (lambda (action)
+ ;; Don't block activation process when one
+ ;; action fails.
+ (catch #t
+ (lambda ()
+ (invoke action))
+ (lambda _
+ (warning
+ (G_ "failed to activate '~a'.~%")
+ action))))
+ '#$actions)))))
(define (gexps->activation-gexp gexps)
"Return a gexp that runs the activation script containing GEXPS."
--
2.48.1
Information forwarded
to
guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Sun, 09 Mar 2025 07:36:02 GMT)
Full text and
rfc822 format available.
Message #98 received at 73494 <at> debbugs.gnu.org (full text, mbox):
Hi,
Hilton Chain <hako <at> ultrarare.space> writes:
> V2 -> V3:
>
> For file-system-mapping->bind-mount, drop the first 4 characters in source
> when it's a string starting with "/var/run", instead of using canonicalized
> source (as in V2), since the source can't be ensured to exist at evaluation
> time.
>
> Hilton Chain (3):
> file-systems: %base-file-systems: Add tmpfs /run.
This one looks good to me.
> services: cleanup: Make /var/run a symlink of /run.
This still has the jami system test failing (make check-system
TESTS=jami). This must be resolved before we can merge this.
> services: activation: Continue on exceptions.
I like it, but I think you can't use the i18n or diagnostics user-facing
modules on the build side, as their closure is too big to be reasonably
imported. Most modules intended to be used on the builder side are
namespaced under (guix build ...), but there are a few excptions.
I'll try to understand the jami test failure, but my last experiments
were not successful. Help welcome.
--
Thanks,
Maxim
Information forwarded
to
guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Thu, 13 Mar 2025 02:29:02 GMT)
Full text and
rfc822 format available.
Message #101 received at 73494 <at> debbugs.gnu.org (full text, mbox):
On Sun, 09 Mar 2025 15:34:58 +0800,
Maxim Cournoyer wrote:
>
> Hi,
>
> Hilton Chain <hako <at> ultrarare.space> writes:
>
> > V2 -> V3:
> >
> > For file-system-mapping->bind-mount, drop the first 4 characters in source
> > when it's a string starting with "/var/run", instead of using canonicalized
> > source (as in V2), since the source can't be ensured to exist at evaluation
> > time.
> >
> > Hilton Chain (3):
> > file-systems: %base-file-systems: Add tmpfs /run.
>
> This one looks good to me.
>
> > services: cleanup: Make /var/run a symlink of /run.
>
> This still has the jami system test failing (make check-system
> TESTS=jami). This must be resolved before we can merge this.
>
> > services: activation: Continue on exceptions.
>
> I like it, but I think you can't use the i18n or diagnostics user-facing
> modules on the build side, as their closure is too big to be reasonably
> imported. Most modules intended to be used on the builder side are
> namespaced under (guix build ...), but there are a few excptions.
Just checked, these two modules are already inside (gnu build activation)'s
closure.
> I'll try to understand the jami test failure, but my last experiments
> were not successful. Help welcome.
Did your have a luck with the dbus change you mentioned on IRC?
Information forwarded
to
guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Thu, 13 Mar 2025 12:22:01 GMT)
Full text and
rfc822 format available.
Message #104 received at 73494 <at> debbugs.gnu.org (full text, mbox):
On Thu, 13 Mar 2025 10:06:35 +0800,
Hilton Chain wrote:
>
> > I'll try to understand the jami test failure, but my last experiments
> > were not successful. Help welcome.
>
> Did your have a luck with the dbus change you mentioned on IRC?
Found out it's ‘mkdir-p/perms’ failed, from its docstring: "Additionally, verify
no component of DIRECTORY is a symbolic link".
Changing it to mkdir-p + chown + chmod passes the test.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Thu, 13 Mar 2025 13:22:02 GMT)
Full text and
rfc822 format available.
Message #107 received at 73494 <at> debbugs.gnu.org (full text, mbox):
Hi,
Hilton Chain <hako <at> ultrarare.space> writes:
[...]
>> I like it, but I think you can't use the i18n or diagnostics user-facing
>> modules on the build side, as their closure is too big to be reasonably
>> imported. Most modules intended to be used on the builder side are
>> namespaced under (guix build ...), but there are a few excptions.
>
> Just checked, these two modules are already inside (gnu build activation)'s
> closure.
Oh, indeed:
--8<---------------cut here---------------start------------->8---
scheme@(guile-user)> (set! %load-hook (lambda (filename)
(format #t "Loading ~a ...\n" filename)))
scheme@(guile-user)> ,use (gnu build activation)
Loading /run/current-system/profile/share/guile/site/3.0/gnu/build/activation.scm ...
Loading /run/current-system/profile/share/guile/site/3.0/gnu/system/accounts.scm ...
Loading /run/current-system/profile/share/guile/site/3.0/guix/records.scm ...
Loading /run/current-system/profile/share/guile/site/3.0/gnu/system/privilege.scm ...
Loading /run/current-system/profile/share/guile/site/3.0/gnu/build/accounts.scm ...
Loading /run/current-system/profile/share/guile/site/3.0/guix/combinators.scm ...
Loading /gnu/store/ylwk2vn18dkzkj0nxq2h4vjzhz17bm7c-guile-3.0.9/share/guile/3.0/srfi/srfi-19.scm ...
[...]
Loading /run/current-system/profile/share/guile/site/3.0/gnu/build/file-systems.scm ...
Loading /run/current-system/profile/share/guile/site/3.0/gnu/system/uuid.scm ...
Loading /run/current-system/profile/share/guile/site/3.0/gnu/system/file-systems.scm ...
Loading /gnu/store/ylwk2vn18dkzkj0nxq2h4vjzhz17bm7c-guile-3.0.9/share/guile/3.0/srfi/srfi-2.scm ...
Loading /run/current-system/profile/share/guile/site/3.0/guix/diagnostics.scm ...
Loading /run/current-system/profile/share/guile/site/3.0/guix/colors.scm ...
Loading /run/current-system/profile/share/guile/site/3.0/guix/memoization.scm ...
Loading /run/current-system/profile/share/guile/site/3.0/guix/profiling.scm ...
Loading /run/current-system/profile/share/guile/site/3.0/guix/i18n.scm ...
[...]
--8<---------------cut here---------------end--------------->8---
It comes from (gnu system file-systems), which has in a comment:
--8<---------------cut here---------------start------------->8---
;;; Note: this file system is used both in the Shepherd and on the "host
;;; side", so it must not include (gnu packages …) modules.
--8<---------------cut here---------------end--------------->8---
I guess that's fine then.
>> I'll try to understand the jami test failure, but my last experiments
>> were not successful. Help welcome.
>
> Did your have a luck with the dbus change you mentioned on IRC?
The jami-dbus-session service now runs, but it errors starting the
actual jami service. To be investigated.
--
Thanks,
Maxim
Information forwarded
to
guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Fri, 14 Mar 2025 12:50:02 GMT)
Full text and
rfc822 format available.
Message #110 received at 73494 <at> debbugs.gnu.org (full text, mbox):
On Thu, 13 Mar 2025 21:20:40 +0800,
Maxim Cournoyer wrote:
>
> >> I'll try to understand the jami test failure, but my last experiments
> >> were not successful. Help welcome.
> >
> > Did your have a luck with the dbus change you mentioned on IRC?
>
> The jami-dbus-session service now runs, but it errors starting the
> actual jami service. To be investigated.
I think we can actually get rid of the symlink issue, by using a bind mount.
I actually thought about this even before trying to use a symlink, but it fails
at initrd stage, not sure why.
I just tried to add the bind mount in cleanup-service-type, which is executed
after initrd and before activation, and succeeded :)
Information forwarded
to
guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Sat, 26 Apr 2025 15:05:01 GMT)
Full text and
rfc822 format available.
Message #113 received at 73494 <at> debbugs.gnu.org (full text, mbox):
Hi Hilton,
Hilton Chain <hako <at> ultrarare.space> writes:
> * gnu/services.scm (cleanup-gexp): Make /var/run a symlink of /run.
> * doc/guix.texi (File Systems): Document it.
> * gnu/system/file-systems.scm (file-system-mapping->bind-mount): Replace
> /var/run in source path with /run.
> * gnu/services/dbus.scm (dbus-activation): Adjust accordingly.
[...]
> --- a/gnu/system/file-systems.scm
> +++ b/gnu/system/file-systems.scm
> @@ -594,7 +594,12 @@ (define (file-system-mapping->bind-mount mapping)
> (($ <file-system-mapping> source target writable?)
> (file-system
> (mount-point target)
> - (device source)
> + (device
> + ;; /var/run is implemented as a symlink to /run.
> + (if (and (string? source)
> + (string-prefix? "/var/run" source))
> + (string-drop source 4)
> + source))
> (type "none")
> (flags (if writable?
> '(bind-mount)
I'd really prefer avoiding having to resort to the above hack, even if
that means grafting dbus with a variant that is built to use /run
instead of /var/run.
The jami test still fails with the current v3 too, that still needs
investigation.
It's annoying that I keep running out of steam on this series; if you
can continue pushing it forward, I'll have a look!
--
Thanks,
Maxim
Information forwarded
to
guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Sat, 26 Apr 2025 16:38:02 GMT)
Full text and
rfc822 format available.
Message #116 received at 73494 <at> debbugs.gnu.org (full text, mbox):
On Sat, 26 Apr 2025 23:03:56 +0800,
Maxim Cournoyer wrote:
>
> Hi Hilton,
>
> Hilton Chain <hako <at> ultrarare.space> writes:
>
> > * gnu/services.scm (cleanup-gexp): Make /var/run a symlink of /run.
> > * doc/guix.texi (File Systems): Document it.
> > * gnu/system/file-systems.scm (file-system-mapping->bind-mount): Replace
> > /var/run in source path with /run.
> > * gnu/services/dbus.scm (dbus-activation): Adjust accordingly.
>
> [...]
>
> > --- a/gnu/system/file-systems.scm
> > +++ b/gnu/system/file-systems.scm
> > @@ -594,7 +594,12 @@ (define (file-system-mapping->bind-mount mapping)
> > (($ <file-system-mapping> source target writable?)
> > (file-system
> > (mount-point target)
> > - (device source)
> > + (device
> > + ;; /var/run is implemented as a symlink to /run.
> > + (if (and (string? source)
> > + (string-prefix? "/var/run" source))
> > + (string-drop source 4)
> > + source))
> > (type "none")
> > (flags (if writable?
> > '(bind-mount)
>
> I'd really prefer avoiding having to resort to the above hack, even if
> that means grafting dbus with a variant that is built to use /run
> instead of /var/run.
>
> The jami test still fails with the current v3 too, that still needs
> investigation.
>
> It's annoying that I keep running out of steam on this series; if you
> can continue pushing it forward, I'll have a look!
As said in [1], I have changed to use bind mount instead, currently locally and
available in [2]. This approach should get rid of symlink issues.
---
[1]: https://issues.guix.gnu.org/73494#35
[2]: https://git.boiledscript.com/hako/guix/commit/7e2ea69a2b2d2f2148591484075f56cd44ec62b3
Information forwarded
to
guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Tue, 29 Apr 2025 01:27:07 GMT)
Full text and
rfc822 format available.
Message #119 received at 73494 <at> debbugs.gnu.org (full text, mbox):
Hi Hilton,
Hilton Chain <hako <at> ultrarare.space> writes:
[...]
> As said in [1], I have changed to use bind mount instead, currently locally and
> available in [2]. This approach should get rid of symlink issues.
As mentioned on IRC, I've tried all these, but I'm still left with a
broken 'jami-provisioning' system test. It still needs investigating to
understand what is at cause. I've tried many things such as having our
dbus use /run instead of /var/run (via a graft -- I hope this was in
effect in the system tests, it looks like it should), but the problem
persisted.
--
Thanks,
Maxim
Information forwarded
to
guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Tue, 29 Apr 2025 04:48:02 GMT)
Full text and
rfc822 format available.
Message #122 received at 73494 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:
> Hi Hilton,
>
> Hilton Chain <hako <at> ultrarare.space> writes:
>
> [...]
>
>> As said in [1], I have changed to use bind mount instead, currently
>> locally and
>> available in [2]. This approach should get rid of symlink issues.
>
> As mentioned on IRC, I've tried all these, but I'm still left with a
> broken 'jami-provisioning' system test. It still needs investigating to
> understand what is at cause. I've tried many things such as having our
> dbus use /run instead of /var/run (via a graft -- I hope this was in
> effect in the system tests, it looks like it should), but the problem
> persisted.
mkdir-p/perms does not accept symlinks[1],
adjust mkdir-p/perms to
```
(mkdir-p "/var/run/jami")
(chown "/var/run/jami" (passwd:uid user) (passwd:gid user))
(chmod "/var/run/jami" #o700)
```
can work
and (@@ (gnu tests telephony) make-jami-os) need remove
shepherd-system-log-service-type and add syslog-service-type can
successed.
A rough modification is as follows.
[0001-quickfix.patch (text/x-patch, attachment)]
[Message part 3 (text/plain, inline)]
[1]
https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/build/activation.scm?h=master#n92 and https://issues.guix.gnu.org/47584
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Tue, 29 Apr 2025 06:30:02 GMT)
Full text and
rfc822 format available.
Message #125 received at 73494 <at> debbugs.gnu.org (full text, mbox):
On Tue, 29 Apr 2025 12:47:24 +0800,
Z572 wrote:
>
> [1 <multipart/mixed (7bit)>]
> [1.1 <text/plain (7bit)>]
> Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:
>
> > Hi Hilton,
> >
> > Hilton Chain <hako <at> ultrarare.space> writes:
> >
> > [...]
> >
> >> As said in [1], I have changed to use bind mount instead, currently
> >> locally and
> >> available in [2]. This approach should get rid of symlink issues.
> >
> > As mentioned on IRC, I've tried all these, but I'm still left with a
> > broken 'jami-provisioning' system test. It still needs investigating to
> > understand what is at cause. I've tried many things such as having our
> > dbus use /run instead of /var/run (via a graft -- I hope this was in
> > effect in the system tests, it looks like it should), but the problem
> > persisted.
>
>
> mkdir-p/perms does not accept symlinks[1],
>
> adjust mkdir-p/perms to
>
> ```
> (mkdir-p "/var/run/jami")
> (chown "/var/run/jami" (passwd:uid user) (passwd:gid user))
> (chmod "/var/run/jami" #o700)
> ```
Using a bind mount should get rid of symlink issues, there're more usage of
mkdir-p/perms and mounting /var/run into container currently.
> can work
>
> and (@@ (gnu tests telephony) make-jami-os) need remove
> shepherd-system-log-service-type and add syslog-service-type can
> successed.
Thanks, this does pass the tests. Do you know why this is needed?
Information forwarded
to
guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Tue, 29 Apr 2025 06:50:02 GMT)
Full text and
rfc822 format available.
Message #128 received at 73494 <at> debbugs.gnu.org (full text, mbox):
Hi Zheng,
Z572 <zhengjunjie <at> iscas.ac.cn> writes:
[...]
> and (@@ (gnu tests telephony) make-jami-os) need remove
> shepherd-system-log-service-type and add syslog-service-type can
> successed.
>
> A rough modification is as follows.
Wow, this works! How did you find out? And why is
shepherd-system-log-service-type not a compatible replacement of
syslog-service-type here?
Thank you!
--
Maxim
Information forwarded
to
guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Tue, 29 Apr 2025 07:15:06 GMT)
Full text and
rfc822 format available.
Message #131 received at 73494 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hilton Chain <hako <at> ultrarare.space> writes:
>>
>> and (@@ (gnu tests telephony) make-jami-os) need remove
>> shepherd-system-log-service-type and add syslog-service-type can
>> successed.
>
> Thanks, this does pass the tests. Do you know why this is needed?
I guess it may be that system-log-service-type does not implement some
features of syslogd, or it is inconsistent with some features of
syslogd. This test failed for some time[1], so I think this test failure
should not affect the merge of this patch series.
[1] https://ci.guix.gnu.org/build/9557293/details
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
hako <at> ultrarare.space, maxim.cournoyer <at> gmail.com, ludo <at> gnu.org, vagrant <at> debian.org, zhengjunjie <at> iscas.ac.cn, guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Tue, 29 Apr 2025 07:19:01 GMT)
Full text and
rfc822 format available.
Message #134 received at 73494 <at> debbugs.gnu.org (full text, mbox):
From: Hilton Chain <hako <at> ultrarare.space>
Use ‘invoke’ for backtraces and avoid changing environment.
* gnu/services.scm (activation-script): Execute activation scripts in
‘invoke’.
Warn about failed activation scripts.
Change-Id: I89be31433fbb46d0c4a9dc6115ab167910840b6f
Signed-off-by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
---
gnu/services.scm | 32 +++++++++++++++++++++++++++-----
1 file changed, 27 insertions(+), 5 deletions(-)
diff --git a/gnu/services.scm b/gnu/services.scm
index 8a4002e0724..ed17981ffdd 100644
--- a/gnu/services.scm
+++ b/gnu/services.scm
@@ -692,15 +692,28 @@ (define* (activation-service->script service)
(define (activation-script gexps)
"Return the system's activation script, which evaluates GEXPS."
(define actions
- (map (cut program-file "activate-service.scm" <>) gexps))
+ (map (lambda (action)
+ (program-file "activate-service.scm"
+ (with-imported-modules (source-module-closure
+ '((gnu build activation)
+ (guix build utils)))
+ #~(begin
+ (use-modules (gnu build activation)
+ (guix build utils))
+ #$action))))
+ gexps))
(program-file "activate.scm"
(with-imported-modules (source-module-closure
'((gnu build activation)
- (guix build utils)))
+ (guix build utils)
+ (guix diagnostics)
+ (guix i18n)))
#~(begin
(use-modules (gnu build activation)
- (guix build utils))
+ (guix build utils)
+ (guix diagnostics)
+ (guix i18n))
(mkdir-p "/var/run")
;; Make sure the user accounting database exists. If it
@@ -719,8 +732,17 @@ (define (activation-script gexps)
(activate-current-system)
;; Run the services' activation snippets.
- ;; TODO: Use 'load-compiled'.
- (for-each primitive-load '#$actions)))))
+ (for-each (lambda (action)
+ ;; Don't block activation process when one
+ ;; action fails.
+ (catch #t
+ (lambda ()
+ (invoke action))
+ (lambda _
+ (warning
+ (G_ "failed to activate '~a'.~%")
+ action))))
+ '#$actions)))))
(define (gexps->activation-gexp gexps)
"Return a gexp that runs the activation script containing GEXPS."
base-commit: 2b4680c6c17bd6470f78a1f39d2f7af8b05e279f
--
2.49.0
Information forwarded
to
hako <at> ultrarare.space, maxim.cournoyer <at> gmail.com, ludo <at> gnu.org, vagrant <at> debian.org, zhengjunjie <at> iscas.ac.cn, guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Tue, 29 Apr 2025 07:19:02 GMT)
Full text and
rfc822 format available.
Message #137 received at 73494 <at> debbugs.gnu.org (full text, mbox):
From: Hilton Chain <hako <at> ultrarare.space>
* gnu/system/file-systems.scm (%runtime-variable-data)
(%runtime-variable-data/bind-mount): New variables.
* gnu/system/file-systems.scm (%base-file-systems): Register
%runtime-variable-data.
* gnu/services.scm (cleanup-gexp): Bind mount /var/run to /run. Remove now
extraneous cleanups.
* doc/guix.texi (File Systems): Document it.
Change-Id: Ie462347935569acddfba68441cf58815a5087cff
Modified-by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
---
doc/guix.texi | 7 +++++++
gnu/services.scm | 21 +++++++++++++--------
gnu/services/dbus.scm | 31 -------------------------------
gnu/system/file-systems.scm | 29 +++++++++++++++++++++++++++--
4 files changed, 47 insertions(+), 41 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index 7b418a40892..7c8903dcdf7 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -18379,6 +18379,13 @@ File Systems
read-write in its own ``name space.''
@end defvar
+@defvar %runtime-variable-data
+This file system is mounted as @file{/run} and contains system
+information data describing the system since it was booted.
+@file{/var/run} is bind mounted to @file{/run}, for backward
+compatibility.
+@end defvar
+
@defvar %binary-format-file-system
The @code{binfmt_misc} file system, which allows handling of arbitrary
executable file types to be delegated to user space. This requires the
diff --git a/gnu/services.scm b/gnu/services.scm
index ed17981ffdd..e07b3c24626 100644
--- a/gnu/services.scm
+++ b/gnu/services.scm
@@ -628,9 +628,14 @@ (define (system-provenance system)
(define (cleanup-gexp _)
"Return a gexp to clean up /tmp and similar places upon boot."
- (with-imported-modules '((guix build utils))
+ (with-imported-modules (source-module-closure
+ '((guix build utils)
+ (gnu build file-systems)
+ (gnu system file-systems)))
#~(begin
- (use-modules (guix build utils))
+ (use-modules (guix build utils)
+ (gnu build file-systems)
+ (gnu system file-systems))
;; Clean out /tmp, /var/run, and /run.
;;
@@ -662,17 +667,17 @@ (define (cleanup-gexp _)
"/lib/locale"))
(setlocale LC_CTYPE "en_US.utf8")
(delete-file-recursively "/tmp")
- (delete-file-recursively "/var/run")
- (delete-file-recursively "/run")
;; Note: The second argument to 'mkdir' is and'ed with umask,
;; hence the 'chmod' calls.
(mkdir "/tmp" #o1777)
(chmod "/tmp" #o1777)
- (mkdir "/var/run" #o755)
- (chmod "/var/run" #o755)
- (mkdir "/run" #o755)
- (chmod "/var/run" #o755))))))
+
+ ;; XXX: It'd be cleaner if we could simply register
+ ;; %runtime-variable-data/bind-mount in %base-file-systems, that
+ ;; fails with: 'statfs-raw: No such file or directory' when
+ ;; checking for "/run".
+ (mount-file-system %runtime-variable-data/bind-mount #:root "/"))))))
(define cleanup-service-type
;; Service that cleans things up in /tmp and similar.
diff --git a/gnu/services/dbus.scm b/gnu/services/dbus.scm
index 76e04bf2215..9292172e01a 100644
--- a/gnu/services/dbus.scm
+++ b/gnu/services/dbus.scm
@@ -190,37 +190,6 @@ (define (dbus-activation config)
;; world-readable.
(mkdir-p/perms "/run/dbus" user #o755))
- (catch 'system-error
- (lambda ()
- (symlink "/run/dbus" "/var/run/dbus"))
- (lambda args
- (let ((errno (system-error-errno args)))
- (cond
- ((= errno EEXIST)
- (let ((existing-name
- (false-if-exception
- (readlink "/var/run/dbus"))))
- (unless (equal? existing-name "/run/dbus")
- ;; Move the content of /var/run/dbus to /run/dbus, and
- ;; retry.
- (let ((dir (opendir "/var/run/dbus")))
- (let loop ((next (readdir dir)))
- (cond
- ((eof-object? next) (closedir dir))
- ((member next '("." "..")) (loop (readdir dir)))
- (else
- (begin
- (rename-file (string-append "/var/run/dbus/" next)
- (string-append "/run/dbus/" next))
- (loop (readdir dir)))))))
- (rmdir "/var/run/dbus")
- (symlink "/run/dbus" "/var/run/dbus"))))
- (else
- (format (current-error-port)
- "Failed to symlink /run/dbus to /var/run/dbus: ~s~%"
- (strerror errno))
- (error "cannot create /var/run/dbus"))))))
-
(unless (file-exists? "/etc/machine-id")
(format #t "creating /etc/machine-id...~%")
(invoke (string-append #$(dbus-configuration-dbus config)
diff --git a/gnu/system/file-systems.scm b/gnu/system/file-systems.scm
index 4ea8237c70d..c75ef39377f 100644
--- a/gnu/system/file-systems.scm
+++ b/gnu/system/file-systems.scm
@@ -2,7 +2,7 @@
;;; Copyright © 2013-2022 Ludovic Courtès <ludo <at> gnu.org>
;;; Copyright © 2020 Google LLC
;;; Copyright © 2020 Jakub Kądziołka <kuba <at> kadziolka.net>
-;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
+;;; Copyright © 2020, 2021, 2025 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
;;; Copyright © 2021 Tobias Geerinckx-Rice <me <at> tobias.gr>
;;; Copyright © 2022 Oleg Pykhalov <go.wigust <at> gmail.com>
;;;
@@ -82,6 +82,8 @@ (define-module (gnu system file-systems)
%pseudo-terminal-file-system
%tty-gid
%immutable-store
+ %runtime-variable-data
+ %runtime-variable-data/bind-mount
%control-groups
%elogind-file-systems
@@ -448,6 +450,28 @@ (define %immutable-store
(check? #f)
(flags '(read-only bind-mount no-atime))))
+(define %runtime-variable-data
+ (file-system
+ (type "tmpfs")
+ (mount-point "/run")
+ (device "tmpfs")
+ ;; Don't use no-suid here as /run/privileged/bin may contain SUID
+ ;; executables.
+ (flags '(no-dev strict-atime))
+ (options "mode=0755,nr_inodes=800k,size=20%")
+ (needed-for-boot? #t)
+ (check? #f)
+ (create-mount-point? #t)))
+
+(define %runtime-variable-data/bind-mount
+ (file-system
+ (device "/run")
+ (mount-point "/var/run")
+ (type "tmpfs")
+ (flags '(bind-mount))
+ (check? #f)
+ (create-mount-point? #t)))
+
(define %control-groups
;; The cgroup2 file system.
(list (file-system
@@ -497,7 +521,8 @@ (define %base-file-systems
%debug-file-system
%shared-memory-file-system
%efivars-file-system
- %immutable-store))
+ %immutable-store
+ %runtime-variable-data))
(define %base-live-file-systems
;; This is the bare minimum to use live file-systems.
--
2.49.0
Information forwarded
to
hako <at> ultrarare.space, maxim.cournoyer <at> gmail.com, ludo <at> gnu.org, vagrant <at> debian.org, zhengjunjie <at> iscas.ac.cn, guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Tue, 29 Apr 2025 07:19:02 GMT)
Full text and
rfc822 format available.
Message #140 received at 73494 <at> debbugs.gnu.org (full text, mbox):
From: Zheng Junjie <z572 <at> z572.online>
TODO: Investigate why this is needed. Do not commit.
Change-Id: I6996b5627d732d1c261ae453da5d0916637b0288
Signed-off-by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
---
gnu/tests/telephony.scm | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/gnu/tests/telephony.scm b/gnu/tests/telephony.scm
index f03ea963f7e..219cb421647 100644
--- a/gnu/tests/telephony.scm
+++ b/gnu/tests/telephony.scm
@@ -30,6 +30,7 @@ (define-module (gnu tests telephony)
#:use-module (gnu services telephony)
#:use-module (guix gexp)
#:use-module (guix modules)
+ #:use-module (gnu services shepherd)
#:export (%test-jami
%test-jami-provisioning
%test-jami-provisioning-partial))
@@ -116,7 +117,9 @@ (define* (make-jami-os #:key provisioning? partial?)
(openssh-configuration
(permit-root-login #t)
(allow-empty-passwords? #t)))
- %base-services))
+ (service syslog-service-type)
+ (modify-services %base-services
+ (delete shepherd-system-log-service-type))))
(packages (cons* (specification->package "recutils")
(specification->package "strace")
%base-packages))))
--
2.49.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Tue, 29 Apr 2025 16:21:02 GMT)
Full text and
rfc822 format available.
Message #143 received at 73494 <at> debbugs.gnu.org (full text, mbox):
On Tue, 29 Apr 2025 15:17:43 +0800,
Maxim Cournoyer wrote:
>
> From: Hilton Chain <hako <at> ultrarare.space>
>
> Use ‘invoke’ for backtraces and avoid changing environment.
>
> * gnu/services.scm (activation-script): Execute activation scripts in
> ‘invoke’.
> Warn about failed activation scripts.
>
> Change-Id: I89be31433fbb46d0c4a9dc6115ab167910840b6f
> Signed-off-by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
> ---
> gnu/services.scm | 32 +++++++++++++++++++++++++++-----
> 1 file changed, 27 insertions(+), 5 deletions(-)
I think this patch needs updating for 76698. Will take a look later.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Fri, 02 May 2025 20:14:02 GMT)
Full text and
rfc822 format available.
Message #146 received at 73494 <at> debbugs.gnu.org (full text, mbox):
Hello,
Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:
> From: Hilton Chain <hako <at> ultrarare.space>
>
> Use ‘invoke’ for backtraces and avoid changing environment.
>
> * gnu/services.scm (activation-script): Execute activation scripts in
> ‘invoke’.
> Warn about failed activation scripts.
>
> Change-Id: I89be31433fbb46d0c4a9dc6115ab167910840b6f
> Signed-off-by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
[...]
> ;; Run the services' activation snippets.
> - ;; TODO: Use 'load-compiled'.
> - (for-each primitive-load '#$actions)))))
> + (for-each (lambda (action)
> + ;; Don't block activation process when one
> + ;; action fails.
> + (catch #t
> + (lambda ()
> + (invoke action))
> + (lambda _
> + (warning
> + (G_ "failed to activate '~a'.~%")
> + action))))
> + '#$actions)))))
As I suggested upthread (or elsewhere? I’m lost!), I think it would be
enough to keep loading these files in the main process (as opposed to
spawning one short-lived process for each activation) and simply catch
exceptions:
(for-each (lambda (file)
(guard (c …)
(save-module-excursion
…)))
'#$actions)
I think it would do what we want while avoiding the overhead. I don’t
think it qualifies as “premature optimization” because it’s already in
place and the semantics are well-defined.
Thoughts?
Ludo’.
Information forwarded
to
hako <at> ultrarare.space, maxim.cournoyer <at> gmail.com, ludo <at> gnu.org, vagrant <at> debian.org, zhengjunjie <at> iscas.ac.cn, guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Sat, 03 May 2025 14:24:02 GMT)
Full text and
rfc822 format available.
Message #149 received at 73494 <at> debbugs.gnu.org (full text, mbox):
* gnu/services.scm (activation-script): Restore current module after
execution.
Catch exception and print the error.
Warn about failed activation script.
Change-Id: I89be31433fbb46d0c4a9dc6115ab167910840b6f
---
gnu/services.scm | 26 +++++++++++++++++++++++---
1 file changed, 23 insertions(+), 3 deletions(-)
diff --git a/gnu/services.scm b/gnu/services.scm
index 8a4002e072..6865c7560f 100644
--- a/gnu/services.scm
+++ b/gnu/services.scm
@@ -697,10 +697,15 @@ (define (activation-script gexps)
(program-file "activate.scm"
(with-imported-modules (source-module-closure
'((gnu build activation)
- (guix build utils)))
+ (guix build utils)
+ (guix diagnostics)
+ (guix i18n)))
#~(begin
(use-modules (gnu build activation)
- (guix build utils))
+ (guix build utils)
+ (guix diagnostics)
+ (guix i18n)
+ (srfi srfi-34))
(mkdir-p "/var/run")
;; Make sure the user accounting database exists. If it
@@ -720,7 +725,22 @@ (define (activation-script gexps)
;; Run the services' activation snippets.
;; TODO: Use 'load-compiled'.
- (for-each primitive-load '#$actions)))))
+ (for-each (lambda (action)
+ ;; Don't block activation process when one
+ ;; action fails.
+ (guard (condition
+ (else
+ (format (current-error-port) "~a~%"
+ condition)
+ (warning
+ (G_ "failed to activate '~a'~%")
+ action)))
+ (save-module-excursion
+ (lambda ()
+ (set-current-module
+ (resolve-module '(guile-user)))
+ (primitive-load action)))))
+ '#$actions)))))
(define (gexps->activation-gexp gexps)
"Return a gexp that runs the activation script containing GEXPS."
base-commit: f76b9c4fdf88cbab81e3cac27841a6c56e3e32c9
prerequisite-patch-id: cc1917ae421a9d5e5e737ab0d7d64eafb80c66ea
prerequisite-patch-id: f25b46e1e08ed9a23bafd4547b30559e87aafc83
prerequisite-patch-id: ebfbf78c71e216e14009a9c619502d515bd301e9
prerequisite-patch-id: 4debf0c53a034e80221112c95ed3572f436ed5b6
prerequisite-patch-id: 4e2979d172c82620e1f423201034aa00610ea22f
prerequisite-patch-id: c411a74b430b78540a70d5516623bd92508e1505
prerequisite-patch-id: eb5d2e8f4679f970898c2b0f1a0caf6dc941712a
prerequisite-patch-id: 1ad337c9c9741592793782f97db490bba02d3c4b
prerequisite-patch-id: 9cdff9105c25033e7eabe7e3af945b73a6e27baf
prerequisite-patch-id: 9c9fb5429cf6568ca848ab804448a2149f861dcd
prerequisite-patch-id: a5c937590b38c4fb5c75a5098f15d2d3d0825a1d
prerequisite-patch-id: fc9f5e958c9f6fcd546278cb2682c0eada7fe99c
prerequisite-patch-id: a1f459ba99139e5a6c6948f9ce783f4e2fa96131
prerequisite-patch-id: 663bb408102bcb62ea42fe8d36ef68c1aacf677a
prerequisite-patch-id: 47cad111e0bfc95219c9884929699f8976defa8d
prerequisite-patch-id: 4c10ae2199d139567a4ac6a22826824d009087b2
prerequisite-patch-id: 6622dcd13c5613309b5a13b4afcc409071940e73
prerequisite-patch-id: 56f9b4474c3aed2ce6b70db5dbf2dddc65636e84
prerequisite-patch-id: 22ae8c4ef90cc288ad4708d82fc01eb51ac751c7
prerequisite-patch-id: 425ed1686582d84d0dd9413e1f599a1154a96cf8
prerequisite-patch-id: e04b6297ce6f820e5a85ed4536d031cd3e6ec4eb
prerequisite-patch-id: 0b35242341e3757c7c4bd1ca9f2cdf25e277d14f
prerequisite-patch-id: ce9b1c2e1ae5360fd5251fd07de5ba268ddaef7a
prerequisite-patch-id: b5225a119bad4fdf39d06f5701e3e49ffc066998
prerequisite-patch-id: 6d4f77830ff3ebda5ed6c7f44418d6408b31a37b
prerequisite-patch-id: 5cb39fe4ecd79203f047f28213fba8e02a848c56
prerequisite-patch-id: 387e1203c97c955dfb5401e0aea691728efdc8ec
prerequisite-patch-id: 6b92abaf6d03b37b9c58bb31285976020b8e2660
prerequisite-patch-id: 56445d57ac941146c2072128c1687464e368c3a6
prerequisite-patch-id: 530734d3059fda18c4c451205f9d87f00082311c
prerequisite-patch-id: f3d353c1a0485f92f2a6c4313d81658f221eb1e0
prerequisite-patch-id: 8b69b664302b49b18bd1471896caa8cde85d47aa
prerequisite-patch-id: b6b409d970f76ec2d7e5c7afe8b9cffa098d9ed9
prerequisite-patch-id: c95d325c498d84ccfa0e89d4203f382c96d69e94
prerequisite-patch-id: 392d2d9a75b67487c555ec8ba3a4421e876e439a
prerequisite-patch-id: ba73d2e1125336400aa53df28bba9f8abadf8160
prerequisite-patch-id: daede4456cc6b3762235fb18cf66358fa7753c6c
prerequisite-patch-id: 72156f437e320f38d277a77acc6c01028a9e4478
prerequisite-patch-id: 275225a32b3c0e811f8d29f7553b1e2564bf05c1
prerequisite-patch-id: 5cda15241e08cc131f2a9e2dad6fadf7cb9aa401
prerequisite-patch-id: 35ab532c7ebece8b456f887db0b73d6c4ecf6123
prerequisite-patch-id: 408888e0206e5b48ffe7ee3cdb310cbd60af6c9d
prerequisite-patch-id: 21823b7c985ebd2c8fe851dee70e6ee446d52722
prerequisite-patch-id: 58104871305201643f59467c8099ccb0d81e9b46
prerequisite-patch-id: 5a24da7fc42b031cb7ba6a8e357bc5784eb1eeb8
prerequisite-patch-id: 6cfcc714847ea9f1cdbaa383a4627748e7489c0b
prerequisite-patch-id: c7df92a41a01831efd7d95b768a86792237d27e8
prerequisite-patch-id: 8231dfd1b56d91e60552f1c69eaecfdb80d56d0e
prerequisite-patch-id: 615a0e10ba14ea1ad96e4400c010897969286d4f
prerequisite-patch-id: 7e751f2eea2a12308b31912317f362dca5eedb2d
prerequisite-patch-id: 5ef7b38b8ff16a89acc64aa0b081667e2eab7f59
prerequisite-patch-id: 9f7a85f3af0e0de60a15c53fcc2e7312504b22da
prerequisite-patch-id: 4f54871424a11496b6f22047879b7b1a879cdd0b
prerequisite-patch-id: 5f587eb497b401e4d1cb36ef125a2ad771383d94
prerequisite-patch-id: 3fe2d0a7bec6162ae31bea45170c7a08c74aef03
prerequisite-patch-id: 6822c6afc981afcc328a8038acf108936f3c2ad5
prerequisite-patch-id: aa54cee74f45c3bb993390f27193ded97f1c1ba4
prerequisite-patch-id: c8240934ebb565784a0fc1e71ffad3c4044f6fc0
prerequisite-patch-id: 7b3bb6304aaaec5d1e274a67d974de67235452e6
prerequisite-patch-id: 7d14bd158b6175ca2916a61d766098074b143b86
prerequisite-patch-id: b1e103461e0cde61d52f926bc32a08c17bd17d91
prerequisite-patch-id: 5c21ad1387f40f38112e4338f1a312335bcdcdaa
prerequisite-patch-id: ba2bf871c24b0b3fc05a667e10aedacef9aade39
prerequisite-patch-id: 52ab7ff09e74a4907a71c58c8650d2ae2072507f
prerequisite-patch-id: bbb0491c7dc5558dfcf61ba5915d9ad012603964
prerequisite-patch-id: fc52339c9691de95241ea1e4369b57da5c441305
prerequisite-patch-id: 5beb416f1849eb118a8c93d2d03ac27421f08595
prerequisite-patch-id: 850d5ee576bfe0a0c7748191f8bce69b182563ab
prerequisite-patch-id: 90722f3add5e2fcc1ffc8b4949f05f7177c19df5
prerequisite-patch-id: 71f74cca72acd19e7a376d54b513b449ddf09035
prerequisite-patch-id: 9fca97c11c8f8610c90ec65212415174a5f4d27f
prerequisite-patch-id: 8053b17aa3e33a530e6b0d37badd49ee7a4db2b0
prerequisite-patch-id: f598c9df66d0b752ee63c6730878febbab2a4ab5
prerequisite-patch-id: ae8e3ea6167758962874d9ceefb17cbfc9cd7617
prerequisite-patch-id: 49565ed5626e3cec6c489d1b6fa15a267fd46f03
prerequisite-patch-id: a8ed40466ed7f9e7527af1f10d69618a88169618
prerequisite-patch-id: 106fa00c2c8f69a514960e08701f44040c581844
prerequisite-patch-id: 53ea387ee17ac942f8270920b53033020731f460
prerequisite-patch-id: 14f7b49fc8ec1630c683b5e001b8c2ebf85ce1ba
prerequisite-patch-id: f095ac3675af165fb246161e06589ace2875ff3f
prerequisite-patch-id: dc224dc9c801c3210385e736b2a528f0b68afb45
prerequisite-patch-id: 6e1ab62a449d025fc4818aa99293b3e9156bef85
prerequisite-patch-id: 1f35d1a714a8cd90cbae9e73a7e453202109d9ed
prerequisite-patch-id: 8cb1e632d490cede7604d7257038e1e426a8161f
prerequisite-patch-id: 515e8ecd478fe4c1310b9b216e8ea42afd926755
prerequisite-patch-id: b60a2334fa8f170ea438edb187f4d8be9368207c
prerequisite-patch-id: f0c49685e76400d3f64afedcbfa0b8fb7c45f0ee
prerequisite-patch-id: b057f699ecb836566cf28875aa42295f37f6dbb7
prerequisite-patch-id: e05e6e7a1ed5ab6147c519f3ac36cd8f940a96a7
prerequisite-patch-id: ed0aced460ded457e9cfb41888dbfec3a25ed6d2
prerequisite-patch-id: 831f8c91f388bcecc0a034fede60158c5f1cccc8
prerequisite-patch-id: a5727ce793701715b7d0a4682d05d023d254f360
prerequisite-patch-id: c2b41659d7d020860185d57381e96ba441f2b779
prerequisite-patch-id: 15d4803752c74f543d3b745d61f86d467b89985c
prerequisite-patch-id: 34df6318e5191dec8c1e3f2a0c8f2050e5833f7d
prerequisite-patch-id: a1d9f6e8f6161e30b3cd11daa26a34b38b7b1658
prerequisite-patch-id: 3bb01cdf4161cb014244f345d2aca3a938188eb8
prerequisite-patch-id: 6c902676ca56fb76bbfc1368ad30e483bc2c94b7
prerequisite-patch-id: ad4774cf4068760dd724ed1a0d6742b5509042f2
prerequisite-patch-id: 3788e077c27eb99e1799b9a0c5c408e0f864bf2c
prerequisite-patch-id: bcbaa96fcd93929f76f14ace875131c2bc4dae58
prerequisite-patch-id: 8113d0eea6ce2db54089db233b1de6d3bb5f69b8
prerequisite-patch-id: b5e000ca84ff45d17becf29a255c23270f46cf8e
prerequisite-patch-id: 1be61c03da01808178b244c961536595d68b0b06
prerequisite-patch-id: 482d1be0fcbf2870d1f62dc36541e4c4e1f8b11a
prerequisite-patch-id: e04264a9dd5a997604f738caaaebd72855ea957a
prerequisite-patch-id: 386b738a5326bc9c1bb85cd0749373d8be5ee576
prerequisite-patch-id: aea5ef9868b8f1e5816859411bfc540e34f9f48d
prerequisite-patch-id: f964e86b1b95a9b42399246681a7dadd85b5c187
prerequisite-patch-id: f6dba43ca3b68af313363c6fef72785d457a0667
prerequisite-patch-id: 5aff308e00a975de66f8706a10f76f2c9faa6af8
prerequisite-patch-id: 97b70657b34fe0e82da07aeb5f64957ccfda1442
prerequisite-patch-id: 57ccd7f162b05697106c297f7d76abf0de11e18e
prerequisite-patch-id: 33a8250abf7eeeda92945a647dbea327647e8455
prerequisite-patch-id: 32a51f7bc1baf5cf58397fd0c99bb85b36de9830
prerequisite-patch-id: 3212ab9cf9c4e1dac5c5ced21ce46b126cbfa1cb
prerequisite-patch-id: 211bd0d1a9e6b293f491eced9e4af9843bf3b287
prerequisite-patch-id: 9883bd0d0c6755d6c4e3e3187d89aa072b0b97af
prerequisite-patch-id: d1157e346fb2aabee7d7c169f44f4ab0bf005c4c
prerequisite-patch-id: 43fd2d4ade95aebf0723d0e5015efd26533617d3
prerequisite-patch-id: 5c4cee47c975c28c734dde626519abc41933b195
prerequisite-patch-id: b18bb968707bfadfe1ecc1487c89dfd436479aee
prerequisite-patch-id: e80367a498f5a20eb853973f611d2f69e5ebc5ee
prerequisite-patch-id: c5fd8e7f7f96c87ea0e3827faffa07fa71304728
prerequisite-patch-id: cfc02bc484870a43f2c804fa849abbc3f0512d50
prerequisite-patch-id: 2e03948dc975c98730ac3814ed5702acca7a6fdf
prerequisite-patch-id: 6cd3353026dafeb79460257c2e60703554a447c5
prerequisite-patch-id: 4111053abab6f41ebda2958d4d7d73ea16eb5283
prerequisite-patch-id: be434332d589b9075b1ac1367c3fd3aa98cf767e
prerequisite-patch-id: eb1ad1c2b4bc1ae02ca7a1d1c4935d5c8e7387db
prerequisite-patch-id: be03d391071cf7080a0bd0e306f5bca71171071b
prerequisite-patch-id: 4174704d944afa67dd97270c34eda6e9e3af8a2b
prerequisite-patch-id: 849103845d254fc50290a02e597e76977cc27bc9
prerequisite-patch-id: e34ea950e22895e60f0c6785a61a26c30f5b5b7c
prerequisite-patch-id: 2901b0d5cc3c44b1a2cac1b0389cc905f552ae73
prerequisite-patch-id: 61f4d2df2b695a9a7bca127e8abb406f87f6bcbd
prerequisite-patch-id: 1c0de8f100ef0d2b0c087cacf3e61d426d17355e
prerequisite-patch-id: c0f22ac952516dc9c92767c1b1362d2c7ecde0f8
prerequisite-patch-id: e945542c050b7792775e301930ee4aca13f19ef5
prerequisite-patch-id: dd90058fdafed0cfabe398f2f4685a9c06f48102
prerequisite-patch-id: 55c89258f5b3aab45902904aab1198994012c546
prerequisite-patch-id: 6bae0c4b7d121accaf1b772fc8eef9011f6290cc
prerequisite-patch-id: d8993f4ad264e89c3e3c8417b309798382532bec
prerequisite-patch-id: 13e40673865c0f57e5b8be99047166ed82250e3f
prerequisite-patch-id: 38c9ea11080cc107addf8eb43fed800fec7e650c
prerequisite-patch-id: 43d07afd567e55d35643c2a59bfd27a88c5b8c33
prerequisite-patch-id: 3a87236411d1231ff88579e2049db124dfb13fbc
prerequisite-patch-id: 0d323a6fdd6b3f4d7ff54eeb161d8d1aec5c3095
prerequisite-patch-id: 27c6d434d2ce44528cd18e35a6e35e1519356f4f
prerequisite-patch-id: ca6c92c390a3088479121fe41529bbaa50e696d1
prerequisite-patch-id: 5b60c7f4831891c18dbf65a02cfc3f2128450b23
prerequisite-patch-id: 13158067cff07251a1beee6337a6fda6abd065b7
prerequisite-patch-id: 92fa2a1323787511222459ff6304e1ec89e1dca9
prerequisite-patch-id: a2374551976025342d152f9cb2997c2df43e69d1
prerequisite-patch-id: 372afb9a7bcfbaa7c2db0093b7a9cf68e5b6fefd
prerequisite-patch-id: a3b0542e81db2a78bb0cfa478e2fc350b5cbdf96
prerequisite-patch-id: dd6cfd93eb2401fc7d7855c8d9323d39ab8fe605
prerequisite-patch-id: a585bc3d58dfa3366a71b89d46c9d49ce3ddebb1
prerequisite-patch-id: dd7459c37315f6394c6813673f5447f9f5561dd2
prerequisite-patch-id: cf5d250aaad218c44cc6c83f6fb289754de96602
prerequisite-patch-id: 511b60f1388e57dc1a7fabcba4e79eb0a7ace588
prerequisite-patch-id: 4467b67459fe5bb46df30eabd9488139f2f999be
prerequisite-patch-id: cbad6cb30c3ea52876c2f16cb1602f5cb7d686f4
prerequisite-patch-id: b1a6a2bfda1255caa968436ecc4ba62e2ed0255d
prerequisite-patch-id: 6e17d044199dd8b53d8453df2f41ce2404d4838a
prerequisite-patch-id: 9be0aab247366f6db440d26cdab7579466d1f0bf
prerequisite-patch-id: 93f8e6f53779eaaee1a12472f5bb845e18c74a6a
prerequisite-patch-id: cb3ac50fb870cf197a4e3ed2ccfb45a6a28400f1
prerequisite-patch-id: 2579801cc89f3e3e022074a0425fba3d38bbe1de
prerequisite-patch-id: 7174912f7b05011468bc47b2ba8167b0e617a70b
prerequisite-patch-id: 08fa38ca1e61c773052671339b78799f19fb7f60
prerequisite-patch-id: b68df6ad7528101d3fbb1fd44f94472a9c8f4f0a
prerequisite-patch-id: 58297e005e4ad0988bd5dc73cd0149637d5c7032
prerequisite-patch-id: 2c09773480fbfd323433986ec528fcb8019273f9
prerequisite-patch-id: e2846320c8b391ff3fec09e51c31578ee6057268
prerequisite-patch-id: 538047ea2f029dd135319c02ba569c4aab9af38d
prerequisite-patch-id: 4fb73799b5ea902d69ecf15b72e1fecc9903d0bc
prerequisite-patch-id: a3a0146e6686bf6f7804192e1a383239c118717b
prerequisite-patch-id: 8de6616d86785be0088bc210202d375b6d0cf5eb
prerequisite-patch-id: 2f32dcab8b97a4fd210ab5b29b6ebf327861be36
prerequisite-patch-id: 081be41a50854a1397ad6574d995ba444b927a7f
prerequisite-patch-id: 2a631555713d3b74f953673f94877e579045f99c
prerequisite-patch-id: b3d778b43f667e73692e1bd8b8945eaf69540fda
--
2.49.0
Information forwarded
to
hako <at> ultrarare.space, maxim.cournoyer <at> gmail.com, ludo <at> gnu.org, vagrant <at> debian.org, zhengjunjie <at> iscas.ac.cn, gabriel <at> erlikon.ch, guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Sat, 03 May 2025 14:24:02 GMT)
Full text and
rfc822 format available.
Message #152 received at 73494 <at> debbugs.gnu.org (full text, mbox):
* gnu/system/file-systems.scm (%runtime-variable-data)
(%runtime-variable-data/bind-mount): New variables.
* gnu/system/file-systems.scm (%base-file-systems): Register
%runtime-variable-data.
* gnu/services.scm (cleanup-gexp): Bind mount /var/run to /run. Remove now
extraneous cleanups.
* doc/guix.texi (File Systems): Document it.
Change-Id: Ie462347935569acddfba68441cf58815a5087cff
Modified-by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
---
doc/guix.texi | 7 +++++++
gnu/services.scm | 21 +++++++++++++--------
gnu/services/dbus.scm | 31 -------------------------------
gnu/system/file-systems.scm | 29 +++++++++++++++++++++++++++--
4 files changed, 47 insertions(+), 41 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index 0537cae87d..eb8dd39c89 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -18383,6 +18383,13 @@ File Systems
read-write in its own ``name space.''
@end defvar
+@defvar %runtime-variable-data
+This file system is mounted as @file{/run} and contains system
+information data describing the system since it was booted.
+@file{/var/run} is bind mounted to @file{/run}, for backward
+compatibility.
+@end defvar
+
@defvar %binary-format-file-system
The @code{binfmt_misc} file system, which allows handling of arbitrary
executable file types to be delegated to user space. This requires the
diff --git a/gnu/services.scm b/gnu/services.scm
index 6865c7560f..700966c4c2 100644
--- a/gnu/services.scm
+++ b/gnu/services.scm
@@ -628,9 +628,14 @@ (define (system-provenance system)
(define (cleanup-gexp _)
"Return a gexp to clean up /tmp and similar places upon boot."
- (with-imported-modules '((guix build utils))
+ (with-imported-modules (source-module-closure
+ '((guix build utils)
+ (gnu build file-systems)
+ (gnu system file-systems)))
#~(begin
- (use-modules (guix build utils))
+ (use-modules (guix build utils)
+ (gnu build file-systems)
+ (gnu system file-systems))
;; Clean out /tmp, /var/run, and /run.
;;
@@ -662,17 +667,17 @@ (define (cleanup-gexp _)
"/lib/locale"))
(setlocale LC_CTYPE "en_US.utf8")
(delete-file-recursively "/tmp")
- (delete-file-recursively "/var/run")
- (delete-file-recursively "/run")
;; Note: The second argument to 'mkdir' is and'ed with umask,
;; hence the 'chmod' calls.
(mkdir "/tmp" #o1777)
(chmod "/tmp" #o1777)
- (mkdir "/var/run" #o755)
- (chmod "/var/run" #o755)
- (mkdir "/run" #o755)
- (chmod "/var/run" #o755))))))
+
+ ;; XXX: It'd be cleaner if we could simply register
+ ;; %runtime-variable-data/bind-mount in %base-file-systems, that
+ ;; fails with: 'statfs-raw: No such file or directory' when
+ ;; checking for "/run".
+ (mount-file-system %runtime-variable-data/bind-mount #:root "/"))))))
(define cleanup-service-type
;; Service that cleans things up in /tmp and similar.
diff --git a/gnu/services/dbus.scm b/gnu/services/dbus.scm
index 76e04bf221..9292172e01 100644
--- a/gnu/services/dbus.scm
+++ b/gnu/services/dbus.scm
@@ -190,37 +190,6 @@ (define (dbus-activation config)
;; world-readable.
(mkdir-p/perms "/run/dbus" user #o755))
- (catch 'system-error
- (lambda ()
- (symlink "/run/dbus" "/var/run/dbus"))
- (lambda args
- (let ((errno (system-error-errno args)))
- (cond
- ((= errno EEXIST)
- (let ((existing-name
- (false-if-exception
- (readlink "/var/run/dbus"))))
- (unless (equal? existing-name "/run/dbus")
- ;; Move the content of /var/run/dbus to /run/dbus, and
- ;; retry.
- (let ((dir (opendir "/var/run/dbus")))
- (let loop ((next (readdir dir)))
- (cond
- ((eof-object? next) (closedir dir))
- ((member next '("." "..")) (loop (readdir dir)))
- (else
- (begin
- (rename-file (string-append "/var/run/dbus/" next)
- (string-append "/run/dbus/" next))
- (loop (readdir dir)))))))
- (rmdir "/var/run/dbus")
- (symlink "/run/dbus" "/var/run/dbus"))))
- (else
- (format (current-error-port)
- "Failed to symlink /run/dbus to /var/run/dbus: ~s~%"
- (strerror errno))
- (error "cannot create /var/run/dbus"))))))
-
(unless (file-exists? "/etc/machine-id")
(format #t "creating /etc/machine-id...~%")
(invoke (string-append #$(dbus-configuration-dbus config)
diff --git a/gnu/system/file-systems.scm b/gnu/system/file-systems.scm
index 4ea8237c70..c75ef39377 100644
--- a/gnu/system/file-systems.scm
+++ b/gnu/system/file-systems.scm
@@ -2,7 +2,7 @@
;;; Copyright © 2013-2022 Ludovic Courtès <ludo <at> gnu.org>
;;; Copyright © 2020 Google LLC
;;; Copyright © 2020 Jakub Kądziołka <kuba <at> kadziolka.net>
-;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
+;;; Copyright © 2020, 2021, 2025 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
;;; Copyright © 2021 Tobias Geerinckx-Rice <me <at> tobias.gr>
;;; Copyright © 2022 Oleg Pykhalov <go.wigust <at> gmail.com>
;;;
@@ -82,6 +82,8 @@ (define-module (gnu system file-systems)
%pseudo-terminal-file-system
%tty-gid
%immutable-store
+ %runtime-variable-data
+ %runtime-variable-data/bind-mount
%control-groups
%elogind-file-systems
@@ -448,6 +450,28 @@ (define %immutable-store
(check? #f)
(flags '(read-only bind-mount no-atime))))
+(define %runtime-variable-data
+ (file-system
+ (type "tmpfs")
+ (mount-point "/run")
+ (device "tmpfs")
+ ;; Don't use no-suid here as /run/privileged/bin may contain SUID
+ ;; executables.
+ (flags '(no-dev strict-atime))
+ (options "mode=0755,nr_inodes=800k,size=20%")
+ (needed-for-boot? #t)
+ (check? #f)
+ (create-mount-point? #t)))
+
+(define %runtime-variable-data/bind-mount
+ (file-system
+ (device "/run")
+ (mount-point "/var/run")
+ (type "tmpfs")
+ (flags '(bind-mount))
+ (check? #f)
+ (create-mount-point? #t)))
+
(define %control-groups
;; The cgroup2 file system.
(list (file-system
@@ -497,7 +521,8 @@ (define %base-file-systems
%debug-file-system
%shared-memory-file-system
%efivars-file-system
- %immutable-store))
+ %immutable-store
+ %runtime-variable-data))
(define %base-live-file-systems
;; This is the bare minimum to use live file-systems.
--
2.49.0
Information forwarded
to
hako <at> ultrarare.space, maxim.cournoyer <at> gmail.com, ludo <at> gnu.org, vagrant <at> debian.org, zhengjunjie <at> iscas.ac.cn, guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Sat, 03 May 2025 14:24:03 GMT)
Full text and
rfc822 format available.
Message #155 received at 73494 <at> debbugs.gnu.org (full text, mbox):
From: Zheng Junjie <z572 <at> z572.online>
TODO: Investigate why this is needed. Do not commit.
Change-Id: I6996b5627d732d1c261ae453da5d0916637b0288
Signed-off-by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
---
gnu/tests/telephony.scm | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/gnu/tests/telephony.scm b/gnu/tests/telephony.scm
index f03ea963f7..219cb42164 100644
--- a/gnu/tests/telephony.scm
+++ b/gnu/tests/telephony.scm
@@ -30,6 +30,7 @@ (define-module (gnu tests telephony)
#:use-module (gnu services telephony)
#:use-module (guix gexp)
#:use-module (guix modules)
+ #:use-module (gnu services shepherd)
#:export (%test-jami
%test-jami-provisioning
%test-jami-provisioning-partial))
@@ -116,7 +117,9 @@ (define* (make-jami-os #:key provisioning? partial?)
(openssh-configuration
(permit-root-login #t)
(allow-empty-passwords? #t)))
- %base-services))
+ (service syslog-service-type)
+ (modify-services %base-services
+ (delete shepherd-system-log-service-type))))
(packages (cons* (specification->package "recutils")
(specification->package "strace")
%base-packages))))
--
2.49.0
Information forwarded
to
hako <at> ultrarare.space, maxim.cournoyer <at> gmail.com, ludo <at> gnu.org, vagrant <at> debian.org, zhengjunjie <at> iscas.ac.cn, guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Sat, 03 May 2025 14:40:01 GMT)
Full text and
rfc822 format available.
Message #158 received at 73494 <at> debbugs.gnu.org (full text, mbox):
* gnu/services.scm (activation-script): Reset environment before loading
activation script.
Catch exception and print the error.
Warn about failed activation script.
Change-Id: I89be31433fbb46d0c4a9dc6115ab167910840b6f
---
gnu/services.scm | 39 +++++++++++++++++++++++++++++++++++----
1 file changed, 35 insertions(+), 4 deletions(-)
diff --git a/gnu/services.scm b/gnu/services.scm
index 8a4002e072..af054339fd 100644
--- a/gnu/services.scm
+++ b/gnu/services.scm
@@ -692,15 +692,31 @@ (define* (activation-service->script service)
(define (activation-script gexps)
"Return the system's activation script, which evaluates GEXPS."
(define actions
- (map (cut program-file "activate-service.scm" <>) gexps))
+ ;; TODO: Instead of importing modules here, let users of activation service
+ ;; add them explicitly. See <https://issues.guix.gnu.org/76698>.
+ (map (lambda (action)
+ (program-file "activate-service.scm"
+ (with-imported-modules (source-module-closure
+ '((gnu build activation)
+ (guix build utils)))
+ #~(begin
+ (use-modules (gnu build activation)
+ (guix build utils))
+ #$action))))
+ gexps))
(program-file "activate.scm"
(with-imported-modules (source-module-closure
'((gnu build activation)
- (guix build utils)))
+ (guix build utils)
+ (guix diagnostics)
+ (guix i18n)))
#~(begin
(use-modules (gnu build activation)
- (guix build utils))
+ (guix build utils)
+ (guix diagnostics)
+ (guix i18n)
+ (srfi srfi-34))
(mkdir-p "/var/run")
;; Make sure the user accounting database exists. If it
@@ -720,7 +736,22 @@ (define (activation-script gexps)
;; Run the services' activation snippets.
;; TODO: Use 'load-compiled'.
- (for-each primitive-load '#$actions)))))
+ (for-each (lambda (action)
+ ;; Don't block activation process when one
+ ;; action fails.
+ (guard (condition
+ (else
+ (format (current-error-port) "~a~%"
+ condition)
+ (warning
+ (G_ "failed to activate '~a'~%")
+ action)))
+ (save-module-excursion
+ (lambda ()
+ (set-current-module
+ (make-fresh-user-module))
+ (primitive-load action)))))
+ '#$actions)))))
(define (gexps->activation-gexp gexps)
"Return a gexp that runs the activation script containing GEXPS."
base-commit: 415e3d98d6faf5fd3d1b7b3daa2f20636e4ff822
prerequisite-patch-id: cb3ac50fb870cf197a4e3ed2ccfb45a6a28400f1
prerequisite-patch-id: 2579801cc89f3e3e022074a0425fba3d38bbe1de
prerequisite-patch-id: 7174912f7b05011468bc47b2ba8167b0e617a70b
prerequisite-patch-id: 08fa38ca1e61c773052671339b78799f19fb7f60
prerequisite-patch-id: b68df6ad7528101d3fbb1fd44f94472a9c8f4f0a
prerequisite-patch-id: 58297e005e4ad0988bd5dc73cd0149637d5c7032
prerequisite-patch-id: 2c09773480fbfd323433986ec528fcb8019273f9
prerequisite-patch-id: e2846320c8b391ff3fec09e51c31578ee6057268
prerequisite-patch-id: 538047ea2f029dd135319c02ba569c4aab9af38d
prerequisite-patch-id: 4fb73799b5ea902d69ecf15b72e1fecc9903d0bc
prerequisite-patch-id: a3a0146e6686bf6f7804192e1a383239c118717b
prerequisite-patch-id: 8de6616d86785be0088bc210202d375b6d0cf5eb
prerequisite-patch-id: 2f32dcab8b97a4fd210ab5b29b6ebf327861be36
prerequisite-patch-id: 081be41a50854a1397ad6574d995ba444b927a7f
prerequisite-patch-id: 2a631555713d3b74f953673f94877e579045f99c
prerequisite-patch-id: b3d778b43f667e73692e1bd8b8945eaf69540fda
--
2.49.0
Information forwarded
to
hako <at> ultrarare.space, maxim.cournoyer <at> gmail.com, ludo <at> gnu.org, vagrant <at> debian.org, zhengjunjie <at> iscas.ac.cn, gabriel <at> erlikon.ch, guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Sat, 03 May 2025 14:40:02 GMT)
Full text and
rfc822 format available.
Message #161 received at 73494 <at> debbugs.gnu.org (full text, mbox):
* gnu/system/file-systems.scm (%runtime-variable-data)
(%runtime-variable-data/bind-mount): New variables.
* gnu/system/file-systems.scm (%base-file-systems): Register
%runtime-variable-data.
* gnu/services.scm (cleanup-gexp): Bind mount /var/run to /run. Remove now
extraneous cleanups.
* doc/guix.texi (File Systems): Document it.
Change-Id: Ie462347935569acddfba68441cf58815a5087cff
Modified-by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
---
doc/guix.texi | 7 +++++++
gnu/services.scm | 21 +++++++++++++--------
gnu/services/dbus.scm | 31 -------------------------------
gnu/system/file-systems.scm | 29 +++++++++++++++++++++++++++--
4 files changed, 47 insertions(+), 41 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index 0537cae87d..eb8dd39c89 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -18383,6 +18383,13 @@ File Systems
read-write in its own ``name space.''
@end defvar
+@defvar %runtime-variable-data
+This file system is mounted as @file{/run} and contains system
+information data describing the system since it was booted.
+@file{/var/run} is bind mounted to @file{/run}, for backward
+compatibility.
+@end defvar
+
@defvar %binary-format-file-system
The @code{binfmt_misc} file system, which allows handling of arbitrary
executable file types to be delegated to user space. This requires the
diff --git a/gnu/services.scm b/gnu/services.scm
index af054339fd..09515a467f 100644
--- a/gnu/services.scm
+++ b/gnu/services.scm
@@ -628,9 +628,14 @@ (define (system-provenance system)
(define (cleanup-gexp _)
"Return a gexp to clean up /tmp and similar places upon boot."
- (with-imported-modules '((guix build utils))
+ (with-imported-modules (source-module-closure
+ '((guix build utils)
+ (gnu build file-systems)
+ (gnu system file-systems)))
#~(begin
- (use-modules (guix build utils))
+ (use-modules (guix build utils)
+ (gnu build file-systems)
+ (gnu system file-systems))
;; Clean out /tmp, /var/run, and /run.
;;
@@ -662,17 +667,17 @@ (define (cleanup-gexp _)
"/lib/locale"))
(setlocale LC_CTYPE "en_US.utf8")
(delete-file-recursively "/tmp")
- (delete-file-recursively "/var/run")
- (delete-file-recursively "/run")
;; Note: The second argument to 'mkdir' is and'ed with umask,
;; hence the 'chmod' calls.
(mkdir "/tmp" #o1777)
(chmod "/tmp" #o1777)
- (mkdir "/var/run" #o755)
- (chmod "/var/run" #o755)
- (mkdir "/run" #o755)
- (chmod "/var/run" #o755))))))
+
+ ;; XXX: It'd be cleaner if we could simply register
+ ;; %runtime-variable-data/bind-mount in %base-file-systems, that
+ ;; fails with: 'statfs-raw: No such file or directory' when
+ ;; checking for "/run".
+ (mount-file-system %runtime-variable-data/bind-mount #:root "/"))))))
(define cleanup-service-type
;; Service that cleans things up in /tmp and similar.
diff --git a/gnu/services/dbus.scm b/gnu/services/dbus.scm
index 76e04bf221..9292172e01 100644
--- a/gnu/services/dbus.scm
+++ b/gnu/services/dbus.scm
@@ -190,37 +190,6 @@ (define (dbus-activation config)
;; world-readable.
(mkdir-p/perms "/run/dbus" user #o755))
- (catch 'system-error
- (lambda ()
- (symlink "/run/dbus" "/var/run/dbus"))
- (lambda args
- (let ((errno (system-error-errno args)))
- (cond
- ((= errno EEXIST)
- (let ((existing-name
- (false-if-exception
- (readlink "/var/run/dbus"))))
- (unless (equal? existing-name "/run/dbus")
- ;; Move the content of /var/run/dbus to /run/dbus, and
- ;; retry.
- (let ((dir (opendir "/var/run/dbus")))
- (let loop ((next (readdir dir)))
- (cond
- ((eof-object? next) (closedir dir))
- ((member next '("." "..")) (loop (readdir dir)))
- (else
- (begin
- (rename-file (string-append "/var/run/dbus/" next)
- (string-append "/run/dbus/" next))
- (loop (readdir dir)))))))
- (rmdir "/var/run/dbus")
- (symlink "/run/dbus" "/var/run/dbus"))))
- (else
- (format (current-error-port)
- "Failed to symlink /run/dbus to /var/run/dbus: ~s~%"
- (strerror errno))
- (error "cannot create /var/run/dbus"))))))
-
(unless (file-exists? "/etc/machine-id")
(format #t "creating /etc/machine-id...~%")
(invoke (string-append #$(dbus-configuration-dbus config)
diff --git a/gnu/system/file-systems.scm b/gnu/system/file-systems.scm
index 4ea8237c70..c75ef39377 100644
--- a/gnu/system/file-systems.scm
+++ b/gnu/system/file-systems.scm
@@ -2,7 +2,7 @@
;;; Copyright © 2013-2022 Ludovic Courtès <ludo <at> gnu.org>
;;; Copyright © 2020 Google LLC
;;; Copyright © 2020 Jakub Kądziołka <kuba <at> kadziolka.net>
-;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
+;;; Copyright © 2020, 2021, 2025 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
;;; Copyright © 2021 Tobias Geerinckx-Rice <me <at> tobias.gr>
;;; Copyright © 2022 Oleg Pykhalov <go.wigust <at> gmail.com>
;;;
@@ -82,6 +82,8 @@ (define-module (gnu system file-systems)
%pseudo-terminal-file-system
%tty-gid
%immutable-store
+ %runtime-variable-data
+ %runtime-variable-data/bind-mount
%control-groups
%elogind-file-systems
@@ -448,6 +450,28 @@ (define %immutable-store
(check? #f)
(flags '(read-only bind-mount no-atime))))
+(define %runtime-variable-data
+ (file-system
+ (type "tmpfs")
+ (mount-point "/run")
+ (device "tmpfs")
+ ;; Don't use no-suid here as /run/privileged/bin may contain SUID
+ ;; executables.
+ (flags '(no-dev strict-atime))
+ (options "mode=0755,nr_inodes=800k,size=20%")
+ (needed-for-boot? #t)
+ (check? #f)
+ (create-mount-point? #t)))
+
+(define %runtime-variable-data/bind-mount
+ (file-system
+ (device "/run")
+ (mount-point "/var/run")
+ (type "tmpfs")
+ (flags '(bind-mount))
+ (check? #f)
+ (create-mount-point? #t)))
+
(define %control-groups
;; The cgroup2 file system.
(list (file-system
@@ -497,7 +521,8 @@ (define %base-file-systems
%debug-file-system
%shared-memory-file-system
%efivars-file-system
- %immutable-store))
+ %immutable-store
+ %runtime-variable-data))
(define %base-live-file-systems
;; This is the bare minimum to use live file-systems.
--
2.49.0
Information forwarded
to
hako <at> ultrarare.space, maxim.cournoyer <at> gmail.com, ludo <at> gnu.org, vagrant <at> debian.org, zhengjunjie <at> iscas.ac.cn, guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Sat, 03 May 2025 14:40:02 GMT)
Full text and
rfc822 format available.
Message #164 received at 73494 <at> debbugs.gnu.org (full text, mbox):
From: Zheng Junjie <z572 <at> z572.online>
TODO: Investigate why this is needed. Do not commit.
Change-Id: I6996b5627d732d1c261ae453da5d0916637b0288
Signed-off-by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
---
gnu/tests/telephony.scm | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/gnu/tests/telephony.scm b/gnu/tests/telephony.scm
index f03ea963f7..219cb42164 100644
--- a/gnu/tests/telephony.scm
+++ b/gnu/tests/telephony.scm
@@ -30,6 +30,7 @@ (define-module (gnu tests telephony)
#:use-module (gnu services telephony)
#:use-module (guix gexp)
#:use-module (guix modules)
+ #:use-module (gnu services shepherd)
#:export (%test-jami
%test-jami-provisioning
%test-jami-provisioning-partial))
@@ -116,7 +117,9 @@ (define* (make-jami-os #:key provisioning? partial?)
(openssh-configuration
(permit-root-login #t)
(allow-empty-passwords? #t)))
- %base-services))
+ (service syslog-service-type)
+ (modify-services %base-services
+ (delete shepherd-system-log-service-type))))
(packages (cons* (specification->package "recutils")
(specification->package "strace")
%base-packages))))
--
2.49.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Sat, 03 May 2025 15:04:02 GMT)
Full text and
rfc822 format available.
Message #167 received at 73494 <at> debbugs.gnu.org (full text, mbox):
On Sat, 03 May 2025 00:17:23 +0800,
Ludovic Courtès wrote:
>
> Hello,
>
> Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:
>
> > From: Hilton Chain <hako <at> ultrarare.space>
> >
> > Use ‘invoke’ for backtraces and avoid changing environment.
> >
> > * gnu/services.scm (activation-script): Execute activation scripts in
> > ‘invoke’.
> > Warn about failed activation scripts.
> >
> > Change-Id: I89be31433fbb46d0c4a9dc6115ab167910840b6f
> > Signed-off-by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
>
> [...]
>
> > ;; Run the services' activation snippets.
> > - ;; TODO: Use 'load-compiled'.
> > - (for-each primitive-load '#$actions)))))
> > + (for-each (lambda (action)
> > + ;; Don't block activation process when one
> > + ;; action fails.
> > + (catch #t
> > + (lambda ()
> > + (invoke action))
> > + (lambda _
> > + (warning
> > + (G_ "failed to activate '~a'.~%")
> > + action))))
> > + '#$actions)))))
>
> As I suggested upthread (or elsewhere? I’m lost!), I think it would be
> enough to keep loading these files in the main process (as opposed to
> spawning one short-lived process for each activation) and simply catch
> exceptions:
>
> (for-each (lambda (file)
> (guard (c …)
> (save-module-excursion
> …)))
> '#$actions)
>
> I think it would do what we want while avoiding the overhead. I don’t
> think it qualifies as “premature optimization” because it’s already in
> place and the semantics are well-defined.
Implemented in v6.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Sat, 03 May 2025 16:33:03 GMT)
Full text and
rfc822 format available.
Message #170 received at 73494 <at> debbugs.gnu.org (full text, mbox):
Hilton Chain <hako <at> ultrarare.space> writes:
> * gnu/services.scm (activation-script): Reset environment before loading
> activation script.
> Catch exception and print the error.
> Warn about failed activation script.
>
> Change-Id: I89be31433fbb46d0c4a9dc6115ab167910840b6f
[...]
> + (for-each (lambda (action)
> + ;; Don't block activation process when one
> + ;; action fails.
> + (guard (condition
> + (else
> + (format (current-error-port) "~a~%"
> + condition)
> + (warning
> + (G_ "failed to activate '~a'~%")
> + action)))
> + (save-module-excursion
> + (lambda ()
> + (set-current-module
> + (make-fresh-user-module))
> + (primitive-load action)))))
> + '#$actions)))))
LGTM.
Ludo'.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Sat, 03 May 2025 16:33:03 GMT)
Full text and
rfc822 format available.
Message #173 received at 73494 <at> debbugs.gnu.org (full text, mbox):
Hello,
Hilton Chain <hako <at> ultrarare.space> writes:
> * gnu/system/file-systems.scm (%runtime-variable-data)
> (%runtime-variable-data/bind-mount): New variables.
> * gnu/system/file-systems.scm (%base-file-systems): Register
> %runtime-variable-data.
> * gnu/services.scm (cleanup-gexp): Bind mount /var/run to /run. Remove now
> extraneous cleanups.
> * doc/guix.texi (File Systems): Document it.
>
> Change-Id: Ie462347935569acddfba68441cf58815a5087cff
> Modified-by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
[...]
> @@ -662,17 +667,17 @@ (define (cleanup-gexp _)
> "/lib/locale"))
> (setlocale LC_CTYPE "en_US.utf8")
> (delete-file-recursively "/tmp")
> - (delete-file-recursively "/var/run")
> - (delete-file-recursively "/run")
>
> ;; Note: The second argument to 'mkdir' is and'ed with umask,
> ;; hence the 'chmod' calls.
> (mkdir "/tmp" #o1777)
> (chmod "/tmp" #o1777)
> - (mkdir "/var/run" #o755)
> - (chmod "/var/run" #o755)
> - (mkdir "/run" #o755)
> - (chmod "/var/run" #o755))))))
> +
> + ;; XXX: It'd be cleaner if we could simply register
> + ;; %runtime-variable-data/bind-mount in %base-file-systems, that
> + ;; fails with: 'statfs-raw: No such file or directory' when
> + ;; checking for "/run".
> + (mount-file-system %runtime-variable-data/bind-mount #:root "/"))))))
Could you try to get a backtrace or something?
‘statfs-raw’ is the C primitive used by the statically-linked Guile in
the initrd, so before shepherd is spawned. Normally, upon error, you
get a Guile prompt where you can type “,bt” for a backtrace.
Thanks for working on it!
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Thu, 08 May 2025 05:55:01 GMT)
Full text and
rfc822 format available.
Message #176 received at 73494 <at> debbugs.gnu.org (full text, mbox):
Hi,
Ludovic Courtès <ludo <at> gnu.org> writes:
> Hilton Chain <hako <at> ultrarare.space> writes:
>
>> * gnu/services.scm (activation-script): Reset environment before loading
>> activation script.
>> Catch exception and print the error.
>> Warn about failed activation script.
>>
>> Change-Id: I89be31433fbb46d0c4a9dc6115ab167910840b6f
>
> [...]
>
>> + (for-each (lambda (action)
>> + ;; Don't block activation process when one
>> + ;; action fails.
>> + (guard (condition
>> + (else
>> + (format (current-error-port) "~a~%"
>> + condition)
>> + (warning
>> + (G_ "failed to activate '~a'~%")
>> + action)))
>> + (save-module-excursion
>> + (lambda ()
>> + (set-current-module
>> + (make-fresh-user-module))
>> + (primitive-load action)))))
>> + '#$actions)))))
>
> LGTM.
Thanks. I've pushed just this 1/3 patch so far. We still need to
understand why the use of shepherd-system-log-service hangs the jami
service (dbus daemon), *only* when /run is mounted on a tmpfs (!).
--
Thanks,
Maxim
Information forwarded
to
guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Thu, 08 May 2025 05:59:02 GMT)
Full text and
rfc822 format available.
Message #179 received at 73494 <at> debbugs.gnu.org (full text, mbox):
Hi Ludovic,
Ludovic Courtès <ludo <at> gnu.org> writes:
[...]
>> @@ -662,17 +667,17 @@ (define (cleanup-gexp _)
>> "/lib/locale"))
>> (setlocale LC_CTYPE "en_US.utf8")
>> (delete-file-recursively "/tmp")
>> - (delete-file-recursively "/var/run")
>> - (delete-file-recursively "/run")
>>
>> ;; Note: The second argument to 'mkdir' is and'ed with umask,
>> ;; hence the 'chmod' calls.
>> (mkdir "/tmp" #o1777)
>> (chmod "/tmp" #o1777)
>> - (mkdir "/var/run" #o755)
>> - (chmod "/var/run" #o755)
>> - (mkdir "/run" #o755)
>> - (chmod "/var/run" #o755))))))
>> +
>> + ;; XXX: It'd be cleaner if we could simply register
>> + ;; %runtime-variable-data/bind-mount in %base-file-systems, that
>> + ;; fails with: 'statfs-raw: No such file or directory' when
>> + ;; checking for "/run".
>> + (mount-file-system %runtime-variable-data/bind-mount #:root "/"))))))
>
> Could you try to get a backtrace or something?
>
> ‘statfs-raw’ is the C primitive used by the statically-linked Guile in
> the initrd, so before shepherd is spawned. Normally, upon error, you
> get a Guile prompt where you can type “,bt” for a backtrace.
I think perhaps it could be because the file-system 'dependencies' field
is not honored in the early boot? /run mount be mounted as tmpfs before
we can bind mount /var/run to it.
I'm not sure though, so I'll have to try what you suggest.
--
Thanks,
Maxim
Information forwarded
to
guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Sat, 10 May 2025 13:50:03 GMT)
Full text and
rfc822 format available.
Message #182 received at 73494 <at> debbugs.gnu.org (full text, mbox):
Hello,
Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:
> Thanks. I've pushed just this 1/3 patch so far. We still need to
> understand why the use of shepherd-system-log-service hangs the jami
> service (dbus daemon), *only* when /run is mounted on a tmpfs (!).
I missed that part of the discussion. How do we know
shepherd-system-log-service is at fault? Does Jami log over syslog?
Thanks,
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Sat, 10 May 2025 15:04:02 GMT)
Full text and
rfc822 format available.
Message #185 received at 73494 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Ludovic Courtès <ludo <at> gnu.org> writes:
> Hello,
>
> Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:
>
>> Thanks. I've pushed just this 1/3 patch so far. We still need to
>> understand why the use of shepherd-system-log-service hangs the jami
>> service (dbus daemon), *only* when /run is mounted on a tmpfs (!).
>
> I missed that part of the discussion. How do we know
> shepherd-system-log-service is at fault? Does Jami log over syslog?
I checked the test log on ci and found that the Jami-related test failed
after switching to shepherd-system-log-service by default. After trying
to switch shepherd-system-log-service back to syslog, the test
succeeded.
>
> Thanks,
> Ludo’.
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Mon, 12 May 2025 07:57:02 GMT)
Full text and
rfc822 format available.
Message #188 received at 73494 <at> debbugs.gnu.org (full text, mbox):
Hi Ludovic,
Ludovic Courtès <ludo <at> gnu.org> writes:
> Hello,
>
> Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:
>
>> Thanks. I've pushed just this 1/3 patch so far. We still need to
>> understand why the use of shepherd-system-log-service hangs the jami
>> service (dbus daemon), *only* when /run is mounted on a tmpfs (!).
>
> I missed that part of the discussion. How do we know
> shepherd-system-log-service is at fault? Does Jami log over syslog?
By trial and error (I assume?), Z572 discovered that if we replace
shepherd-system-log-service by shepherd-syslog-service the hang goes
away. See the WIP patch 3/3 of this series that does this replacement
and where the problem disappears.
And yes, the Jami daemon logs to syslog by default with our current
service definition.
--
Thanks,
Maxim
Information forwarded
to
guix-patches <at> gnu.org
:
bug#73494
; Package
guix-patches
.
(Tue, 13 May 2025 04:25:01 GMT)
Full text and
rfc822 format available.
Message #191 received at 73494 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:
> Hi Ludovic,
>
> Ludovic Courtès <ludo <at> gnu.org> writes:
>
>> Hello,
>>
>> Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:
>>
>>> Thanks. I've pushed just this 1/3 patch so far. We still need to
>>> understand why the use of shepherd-system-log-service hangs the jami
>>> service (dbus daemon), *only* when /run is mounted on a tmpfs (!).
>>
>> I missed that part of the discussion. How do we know
>> shepherd-system-log-service is at fault? Does Jami log over syslog?
>
> By trial and error (I assume?), Z572 discovered that if we replace
Thanks to ci.guix.gnu.org. I just checked the corresponding build. Jami
tests failed after switching to shepherd-system-log-service by default.
In the future, we should run system tests when sending patches for
improving services to avoid failures after merging without anyone
noticing
> shepherd-system-log-service by shepherd-syslog-service the hang goes
> away. See the WIP patch 3/3 of this series that does this replacement
> and where the problem disappears.
>
> And yes, the Jami daemon logs to syslog by default with our current
> service definition.
[signature.asc (application/pgp-signature, inline)]
This bug report was last modified 33 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.