Closed dvzrv closed 1 month ago
@dvzrv This is because of https://github.com/anthraxx/linux-hardened/commit/95574b9f01840e512b63d045cc80924c04851741#diff-9c2bed222f3a893e1032fa31590f2296fa2224eef8f82ec46c2166c6a265cf10R128.
Nothing I can do about this in mkosi, we need the unprivileged overlay mounts, you'll have to figure something out on the linux-hardened side.
Turns out we can do something about this for the basic cases
Thanks for still looking into this! (sorry, I only now had the time to try them)
With the added changes I see:
‣ Syncing package manager metadata
Traceback (most recent call last):
File "/home/dave/work/archlinux/mkosi/mkosi/sandbox.py", line 860, in <module>
File "/home/dave/work/archlinux/mkosi/mkosi/sandbox.py", line 825, in main
File "/home/dave/work/archlinux/mkosi/mkosi/sandbox.py", line 631, in execute
File "/home/dave/work/archlinux/mkosi/mkosi/sandbox.py", line 123, in mount
File "/home/dave/work/archlinux/mkosi/mkosi/sandbox.py", line 98, in oserror
PermissionError: [Errno 1] Operation not permitted: 'newroot/var'
‣ "pacman --root=/buildroot --logfile=/dev/null --dbpath=/var/lib/pacman --cachedir=/var/cache/pacman/mkosi --cachedir=/var/cache/pacman/pkg --hookdir=/buildroot/etc/pacman.d/hooks --arch x86_64 --color auto --noconfirm --sync --refresh" returned non-zero exit code 1.
@dvzrv Try with https://github.com/systemd/mkosi/pull/3080
mkosi commit the issue has been seen with
158c2d1fd221e7dd689ea14a1b32617b22764b43
Used host distribution
Arch Linux
Used target distribution
No response
Linux kernel version used
6.10.10-hardened1-1-hardened
CPU architectures issue was seen on
x86_64
Unexpected behaviour you saw
When trying to use this repository's
mkosi
to runmkosi build
on the setup available in this repository, it fails on linux-hardened (user namespaces are enabled usingsysctl kernel.unprivileged_userns_clone=1
).cc @anthraxx
Used mkosi config
mkosi output