diff options
| author | Ryan Sundberg <ryan@arctype.co> | 2026-01-10 13:35:31 -0800 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2026-01-12 10:56:38 +0100 |
| commit | 62c28bc6d8c54800b16341d1c93a1d7833fc3328 (patch) | |
| tree | ec56251426e907f2c94094aa37fba77f99757b8e /gnu/system | |
| parent | 35929d5afd0fd9e695b0acbe98e23479db2655cd (diff) | |
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
Diffstat (limited to 'gnu/system')
| -rw-r--r-- | gnu/system/image.scm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gnu/system/image.scm b/gnu/system/image.scm index 73686023a92..ac0706aa0f1 100644 --- a/gnu/system/image.scm +++ b/gnu/system/image.scm @@ -504,7 +504,7 @@ used in the image." initialize-root-partition)) (inputs '#+(cond ((string=? type "btrfs") - (list btrfs-progs fakeroot)) + (list btrfs-progs util-linux)) ((string-prefix? "ext" type) (list e2fsprogs fakeroot)) ((string=? type "f2fs") |
