Subject: Re: [bug#73494] [PATCH v3 2/3] services: cleanup: Make /var/run a symlink of /run.

From: Hilton Chain <[email-masked]>
Date: Sun, 27 Apr 2025 00:36:54 +0800

On Sat, 26 Apr 2025 23:03:56 +0800,
Maxim Cournoyer wrote:
>
> Hi Hilton,
>
> Hilton Chain <[email-masked]> 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