Open
Description
The need for install to-filesystem|to-disk
to operate privileged has come up in a few contexts, most recently in osbuild/bootc-image-builder#98 (comment)
The mkfs.ext4|xfs|etc
tools support a -d <root>
to create filesystems unprivileged. However...the annoying problem here is that handling things like uid/gid and selinux labels unprivileged gets hard.
One hack I was thinking of here is...maybe we could experiment in with something like using fuse to create a mocked up root. IIRC OpenEmbedded has a LD_PRELOAD
thing to intercept syscalls, which is pretty hacky but probably works.
What'd obviously be nicer is if these tools all took something like a composefs-style dumpfile as input. But I bet the fuse thing would work.