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

From: Ludovic Courtès <[email-masked]>
Date: Tue, 06 Jun 2023 10:15:54 +0200

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:

--8<---------------cut here---------------start------------->8---
$ 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)
--8<---------------cut here---------------end--------------->8---

Namely, (execl "…/bin/shepherd") comes before the cleanup expressions,
which is why /var/run/shepherd/socket is still around when we boot.

Ludo’.