guix/gnu
Ryan Sundberg 62c28bc6d8
image: Use unshare to map root user for btrfs
The current version of `mkfs.btrfs` has a regression when combined with
`fakeroot` where it does not detect the faked root uid/gid of files when
building the filesystem. This produces partition images with `/` owned by
the guixbuild user when it should be owned by root.

Using `unshare` rather than `fakeroot` resolves this by doing the uid
mapping at the kernel level rather than overloading the `stat` function.

An equivalent issue was [reported and patched in
NixOS](https://github.com/NixOS/nixpkgs/pull/434122)

* gnu/build/image.scm (system-disk-image): Import `util-linux` instead of
`fakeroot`.
* gnu/system/image.scm (make-btrfs-image): Use `unshare --map-root-user`

Change-Id: Id4eeaf510f3ec5f4a23b4d700a73e2cf46da40b1
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Merges: #5536
2026-01-12 10:56:38 +01:00
..
bootloader
build image: Use unshare to map root user for btrfs 2026-01-12 10:56:38 +01:00
home services: configuration: Generalize 'list-of-packages?' 2026-01-09 15:22:44 +01:00
installer
machine
packages gnu: Add luanti-mineclonia-csm. 2026-01-12 12:01:44 +09:00
services services: radicale: add shepherd configuration action 2026-01-09 15:22:45 +01:00
system image: Use unshare to map root user for btrfs 2026-01-12 10:56:38 +01:00
tests tests: mail: Add Radicale test. 2026-01-09 15:22:45 +01:00
artwork.scm
bootloader.scm
ci.scm
compression.scm
home.scm
image.scm
installer.scm installer: Drop uri from provenance log. 2025-12-22 23:00:46 +01:00
local.mk gnu: jami: Update to 20251212.0. 2026-01-12 11:25:29 +09:00
machine.scm
packages.scm
services.scm
system.scm system: operating-system-etc-service: Unset GUIX_PROFILE. 2026-01-04 12:13:29 +01:00
tests.scm