]> git.ipfire.org Git - thirdparty/mkosi.git/commit
Simplify apivfs_cmd() and chroot_cmd()
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 8 Jan 2024 22:31:37 +0000 (23:31 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 9 Jan 2024 09:29:20 +0000 (10:29 +0100)
commite8adfc422fc2891d33eb9aa4848bb4afa7bc9c0a
tree6e759bcc752e8ced9a3e1ea3e9ee71f05950e169
parentdf045a3feddbba245e5664f64cf40edcd1bd3879
Simplify apivfs_cmd() and chroot_cmd()

We move the setpgid logic to run(), avoiding the need to pass a tools
argument to chroot_cmd() and apivfs_cmd().

We also try to remove as much logic from these functions as possible.
Since we can't really assume that any logic we execute during the
function will still hold true in the sandbox, so it's best to delay
any logic execution until we're already in the sandbox (using the
--ro-bind-try options of bubblewrap).

We also rework the /etc/resolv.conf handling to simply make sure that
/run/systemd/resolve exists in the chroot since if /etc/resolv.conf
points to /run it'll almost certainly be to
/run/systemd/resolv/stub-resolv.conf.
mkosi/__init__.py
mkosi/distributions/gentoo.py
mkosi/installer/__init__.py
mkosi/installer/apt.py
mkosi/installer/dnf.py
mkosi/installer/pacman.py
mkosi/installer/zypper.py
mkosi/run.py
mkosi/sandbox.py