Subject: Re: [bug#77288] [PATCH v3 2/8] doc: Document migration to the unprivileged daemon.

From: "pelzflorian (Florian Pelz)" <[email-masked]>
Date: Sat, 19 Apr 2025 22:22:43 +0200

Ludovic Courtès <[email-masked]> writes:
>> except ownerships of /gnu/store/ files are funny when I guix system
>> roll-back to the time before guix-ownership services existed.
>
> Uh, right.  There’s little we can do here, except perhaps adding a
> warning in the doc?

No, I was just trying to provoke an error.  No warning in the doc is
needed.  Because (privileged #t) remains the default for some time and
guix-ownership already exists, wrong ownership will not affect many
users when they do not provoke it.  Also files owned by a user id, group
id that no longer exists can happen on system roll-backs.  And it can
obviously be fixed by following the “Migrating to the Unprivileged
Daemon” docs with root:root.

What I should have written to you is that I want the command

mount -o remount,rw /gnu/store

to come before the chown for the migrating foreign distro users.

> Users are invited to stop the daemon before doing that, which should
> stop ‘gnu-store.mount’ as well.[…]

No.  I set up a Debian VM now with Guix from the install script and guix
pulled as root with this patch series.  “systemctl stop guix-daemon”
does not change the mount command outputting:

“/dev/sda1 on /gnu/store type ext4 (ro,relatime,errors=remount-ro)”,

And the chown from “Migrating to the Unprivileged Daemon” prints lines
like:

chown: changing ownership of '/gnu/store/4ab…-mpfr-4.2.1-builder':
Read-only file system

Above mount command from the examples in Guix manual section on SELinux
Policy makes chown work.

I would just write down the “mount -o remount,rw /gnu/store” command,
even though it is not needed when a user is not on systemd or has not
set up gnu-store.mount.

Another observation; I get errors
guix shell: error: opening global GC lock '/var/guix/gc.lock':
Permission denied

I had to chown guix-daemon:guix-daemon /var/guix/gc.lock as well.

Other than that your docs work well for me.  Thanks again!

Regards,
Florian