Subject: [bug#75270] guix system: error: mkdir: File exists: "/run/user"

From: "Timo Wilken" <[email-masked]>
Date: Thu, 06 Feb 2025 16:57:07 +0100

Hi,

Unfortunately, this patch breaks my system activation:

  $ sudo guix system reconfigure -e '(@ (tw system frm) %frm-system)'
  [...]
  activating system...
  making '/var/guix/profiles/system-84-link' the current system...
  populating /etc from /gnu/store/akx5gq0i5ackzzgdghg6a9l5np8kjqyq-etc...
  setting up privileged programs in '/run/privileged/bin'...
  guix system: error: mkdir: File exists: "/run/user"

I'm on the latest Guix:

  $ guix describe
  Generation 74	Feb 06 2025 16:41:14	(current)
    tw 493333f
      repository URL: https://git.twilken.net/dotfiles
      branch: master
      commit: 493333fc4ee5b7c28835268c6f5038d1fef89eea
    guix a62ee28
      repository URL: https://git.savannah.gnu.org/git/guix.git
      branch: master
      commit: a62ee289a59ff67c46dc79d96b8e79c975f71482
    [non-free channels elided]

Tracing through the activation scripts, it looks like the culprit is this
g-exp in gnu/services/base.scm line 3877:

  (define (greetd-run-user-activation config)
    #~(let ((d "/run/user"))
        (mkdir d #o755)
        (chmod d #o755)))

I suppose that should be a `mkdir-p' instead.

Cheers,
Timo