Open smoser opened 1 month ago
I wanted to dump the above from my head, and would have put a PR up with the content, but didn't know where it should go. Let me know where it should go and I will do so.
Thanks @murraybd for pushing on this a bit.
I never restarted apparmor rather I used sudo service apparmor reload
.
I never restarted apparmor rather I used sudo service apparmor reload.
updated. thank you.
AppArmor can't be reloaded so the service helper scripts run restart. Or at least they do on Debian. If you're using systemd it should be restart. If you're using the helper scripts reload will restart.
Problem
Running melange for the first time on a Ubuntu system will often fail. There are a couple hangups.
need to install bubblewrap (
apt-get install bubblewrap
). This actually gives a pretty good error:Current ubuntu systems require application specific configs in order to use unprivileged user namespaces
The failure path in wolfi-dev/os looks like this:
The unprivileged user namespace path is a bit of a rathole. Here is some reading if you're interested:
How to fix
There are at least the following options to fix
disable the apparmor userns restrictions Add
kernel.apparmor_restrict_unprivileged_userns = 0
to a file in/etc/sysctl.d/60-apparmor-namespace.conf
(per apparmor doc)Allow bubblewrap to use unprivileged user namespaces independent of who calls it.
Create the file
/etc/apparmor.d/local-bwrap
with content like below:Then run
sudo systemctl reload apparmor
Allow melange to use unprivileged user namespaces.
Create the file
/etc/apparmor.d/local-melange
with content like below (update '/path/to/your/home/...')Then run
sudo systemctl reload apparmor