Subject: bug#63921: Activation snippets in reverse order, prevent boot

From: Ludovic Courtès <[email-masked]>
Date: Tue, 06 Jun 2023 11:58:40 +0200

Ludovic Courtès <[email-masked]> skribis:

> Booting a system reconfigured from
> eed55a6544d5bda2245ec853e5fa4b28e1865bea fails with shepherd saying:
>
>   error: while opening socket '/var/run/shepherd/socket': Address already in use
>
> The root cause appears to be that the ‘boot’ program has expressions
> reversed:
>
> $ guix gc --references $(guix gc --derivers $(readlink -f /var/guix/profiles/system-236-link)) | grep boot
> /gnu/store/21ldhyrpji6lkkdxi4lgr5k9l5fr2b7l-boot.drv
> $ cat $(guix build /gnu/store/21ldhyrpji6lkkdxi4lgr5k9l5fr2b7l-boot.drv)
>
> Namely, (execl "…/bin/shepherd") comes before the cleanup expressions,
> which is why /var/run/shepherd/socket is still around when we boot.

Fixed in 181951207339508789b28ba7cb914f983319920f.

The regression came from dbbc7e946131ba257728f1d05b96c4339b7ee88b, which
led ‘modify-services’ to change the order of services (something I had
completely overlooked while reviewing, apologies!).  I ended up
rewriting ‘modify-services’.  Good news is we now have tests for this.

Ludo’.