Subject: [bug#75810] [PATCH v8 00/16] Rootless guix-daemon

From: Ludovic Courtès <[email-masked]>
Date: Sun, 23 Mar 2025 15:24:53 +0100

Hello,

Changes since v7, both in the patch entitled “daemon: Allow
running as non-root […]”:

  • Check “isInStore(drv.builder)” before calling ‘execve’, as
    suggested by Reepca.

  • Add comment in “builder is outside the store” test in
    ‘tests/derivations.scm’.

I believe these were the last outstanding issues.  I’ll merge it
in the coming days if there are no objections.

Thanks,
Ludo’.

Ludovic Courtès (16):
  daemon: Use ‘close_range’ where available.
  daemon: Close the read end of the logging pipe.
  daemon: Bind-mount /etc/nsswitch.conf & co. only if it exists.
  daemon: Bind-mount all the inputs, not just directories.
  daemon: Remount inputs as read-only.
  daemon: Remount root directory as read-only.
  daemon: Allow running as non-root with unprivileged user namespaces.
  daemon: Create /var/guix/profiles/per-user unconditionally.
  daemon: Drop Linux ambient capabilities before executing builder.
  daemon: Move comments where they belong.
  linux-container: ‘unprivileged-user-namespace-supported?’ returns #f
    on non-Linux.
  tests: Add missing derivation inputs.
  tests: Run in a chroot and unprivileged user namespaces.
  etc: systemd services: Run ‘guix-daemon’ as an unprivileged user.
  guix-install.sh: Support the unprivileged daemon where possible.
  DRAFT gnu: guix: Update to c9c7f87.

 build-aux/test-env.in               |  18 +-
 config-daemon.ac                    |   5 +-
 doc/guix.texi                       | 102 ++++++++---
 etc/gnu-store.mount.in              |   3 +-
 etc/guix-daemon.service.in          |  22 ++-
 etc/guix-install.sh                 | 124 ++++++++++---
 gnu/build/linux-container.scm       |   4 +-
 gnu/packages/package-management.scm |   6 +-
 guix/substitutes.scm                |   2 +-
 nix/libstore/build.cc               | 274 ++++++++++++++++++++++------
 nix/libstore/local-store.cc         |  26 ++-
 nix/libutil/util.cc                 |  26 ++-
 tests/derivations.scm               |  38 +++-
 tests/packages.scm                  |  13 +-
 tests/processes.scm                 |   9 +-
 tests/store.scm                     | 247 +++++++++++++++++++++----
 16 files changed, 733 insertions(+), 186 deletions(-)

base-commit: efac1498c15198afc4f9a2bc700408bde1b3b3ed
-- 
2.48.1