I had to revert this because it broke "type: os" and "type: kernel" builds. Even with some Makefile changes from Oliver to run lb under sudo, the core snap build still failed because snapcraft was unable to stage the result:
make install DESTDIR=/build/core/parts/livebuild/install
Preparing to build hooks
Building hooks
Staging livebuild
[Errno 13] Permission denied: '/build/core/parts/livebuild/install/dev/loop0'
Possible options for a later second attempt:
1) Only run as non-root for "type: app" (or missing) and maybe "type: gadget". (This would require parsing snapcraft.yaml directly in launchpad-buildd, which we've so far been able to avoid doing.)
2) Run "snapcraft stage" and "snapcraft snap" separately, much like we already run "snapcraft pull" separately, and always run them as root.
I had to revert this because it broke "type: os" and "type: kernel" builds. Even with some Makefile changes from Oliver to run lb under sudo, the core snap build still failed because snapcraft was unable to stage the result:
make install DESTDIR= /build/ core/parts/ livebuild/ install core/parts/ livebuild/ install/ dev/loop0'
Preparing to build hooks
Building hooks
Staging livebuild
[Errno 13] Permission denied: '/build/
Possible options for a later second attempt:
1) Only run as non-root for "type: app" (or missing) and maybe "type: gadget". (This would require parsing snapcraft.yaml directly in launchpad-buildd, which we've so far been able to avoid doing.)
2) Run "snapcraft stage" and "snapcraft snap" separately, much like we already run "snapcraft pull" separately, and always run them as root.