image icon indicating copy to clipboard operation
image copied to clipboard

Converting a SIF image should not require fakeroot

Open kincl opened this issue 1 year ago • 4 comments

When converting a SIF image to run with podman it requires fakeroot but shouldn't we be able to use userns instead?

$ podman run sif:lolcow_1.0.sif
Error: converting rootfs from SquashFS to Tarball: converting image: exec: "fakeroot": executable file not found in $PATH, output:

kincl avatar Nov 11 '23 12:11 kincl

The Linux kernel will not allow mounting of squashfs directly so we need a fuse file system to mount it.

rhatdan avatar Nov 12 '23 13:11 rhatdan

The Linux kernel will not allow mounting of squashfs directly so we need a fuse file system to mount it.

@rhatdan it looks like the first pass at supporting this was to use fakeroot with unsquashfs to avoid the issue of mounting squashfs entirely so I was just thinking of fixing that part of it but I agree that using something like squashfuse is probably the best solution here.

kincl avatar Nov 12 '23 14:11 kincl

SGTM.

rhatdan avatar Nov 13 '23 16:11 rhatdan

In principle, this could be an entirely in-userspace in-memory conversion which does not require any creation of files with different UIDs, nor any mounting.

But that code just doesn’t exist right now, and for a one-time migration aid like this, which shouldn’t be a permanent part of any workflows, it seems to me that it is not worth very much unique investment of this kind.

mtrmac avatar Nov 13 '23 17:11 mtrmac