Subject: Re: bug#77716: Corrupted store after Guix deploy

From: Ludovic Courtès <[email-masked]>
Date: Mon, 21 Apr 2025 16:47:12 +0200

Hello,

Tomas Volf <[email-masked]> writes:

> The permissions on the very top level directory differ (which one are
> correct?):
>
> Laptop:
>
> --8<---------------cut here---------------start------------->8---
> $ ls -al /gnu/store/ | grep 1bjf1lza4i7fc1jh8qzb1n9xnv3rfi17-wolfsden
> drwxr-xr-x   1 root          root              16 Jan  1  1970 1bjf1lza4i7fc1jh8qzb1n9xnv3rfi17-wolfsden
> --8<---------------cut here---------------end--------------->8---
>
> Remote:
>
> --8<---------------cut here---------------start------------->8---
> $ ls -al /gnu/store/ | grep 1bjf1lza4i7fc1jh8qzb1n9xnv3rfi17-wolfsden
> dr-xr-xr-x  1 root root           16 Jan  1  1970 1bjf1lza4i7fc1jh8qzb1n9xnv3rfi17-wolfsden
> --8<---------------cut here---------------end--------------->8---
>
>
>
> The target of symbolic link in the store item differs.
>
> Laptop:
>
> --8<---------------cut here---------------start------------->8---
> $ ls -l /gnu/store/1bjf1lza4i7fc1jh8qzb1n9xnv3rfi17-wolfsden/share/guile/site/
> total 4
> lrwxrwxrwx 1 root root 61 Jan  1  1970 3.0 -> /gnu/store/rmwi813mcsg8d5ilzq0rxwqd8dp558r5-wolfsden-989d91d/
> --8<---------------cut here---------------end--------------->8---
>
> Remote:
>
> --8<---------------cut here---------------start------------->8---
> $ ls -l /gnu/store/1bjf1lza4i7fc1jh8qzb1n9xnv3rfi17-wolfsden/share/guile/site/
> total 4
> lrwxrwxrwx 1 root root 60 Jan  1  1970 3.0 -> /gnu/store/rmwi813mcsg8d5ilzq0rxwqd8dp558r5-wolfsden-989d91d
> --8<---------------cut here---------------end--------------->8---
>
> Notice that for the Laptop, the target ends in `/', for the Remote it
> does not.

Interesting.

There are several code paths to add a store item to the store.  One is
through (guix store …), use by ‘guix offload’.  One is through ‘guix
substitute’, which restores nars it downloaded.  One is through a build
via guix-daemon (C++ code).

Could you tell how these two differing things were obtained?

On each machine, run ‘guix build --log-file /gnu/store/1bjf1lza4i7fc1jh8qzb1n9xnv3rfi17-wolfsden’.  If
there’s a local log file, it was built locally or offloaded; otherwise
it was substituted.

Could you also report the guix-daemon versions that are running on each
machine?

An interesting puzzle.  :-)

Thanks,
Ludo’.