OpenXT / openxt

Base OpenXT build scripts
48 stars 39 forks source link

do_build.sh: Use mtools instead of fuse for UEFI #292

Closed jandryuk closed 6 years ago

jandryuk commented 6 years ago

fuse doesn't play nicely in a container environment since it wants to load modules and do other privileged operations. Instead use mtools which can just be run as the user.

OXT-1280

Signed-off-by: Jason Andryuk jandryuk@gmail.com

I only tested the do_build.sh changes since I don't use the build-scripts/build.sh setup. But I made the changes to keep the two implementations in sync.

jean-edouard commented 6 years ago

@tklengyel / @crogers1 could you please review this? Thanks

rneilturner commented 6 years ago

An lxc container should inherit the fuse module from the host if its loaded properly. One problem you would have is exposing the dev node to the container. This can be alleviated by creating the node within your lxc: mknod -m 666 /dev/fuse c 10 229

tklengyel commented 6 years ago

I think I tried mtools before and it was not reliable but I don't remember exactly what was the issue. If it now works reliably for this purpose it should be fine.

jandryuk commented 6 years ago

Thanks, @rneilturner . Yes, creating the device node lets the fuse tools run in an lxc container.

@tklengyel I tested and mtools worked for me. I have not noticed any reliability issues, but I also haven't run many builds either.

tklengyel commented 6 years ago

@jandryuk I remembered that the issue I had was creating the folders with mtools within the image, I didn't use mmd -i as you do in this patch. So this switch looks good to me and probably switching in the other build script would be fine too.

rneilturner commented 6 years ago

Tested and works well. +1

jean-edouard commented 6 years ago

Built here: http://openxt-builder.ainfosec.com:8010/builders/openxt/builds/1451 LGTM, merging soon.

eric-ch commented 6 years ago

@jandryuk Could you PR against stable-8 as well please?