Overview

Request 1194997 accepted

- Create new subpackage mkosi-initrd-tukit.
* This package adds a special mkosi-initrd wrapper to support creating initrds
on transactional systems. I.e., with transactional-update, a transaction
runs on a chroot, but mkosi requires bubblewrap, which uses pivot_root, and
that is known to fail on a chroot environment.
- Do not install 50-mkosi.install kernel-install script.
* Although kernel-install is provided in openSUSE, it is not run when a kernel
is installed or removed (this work is done by suse-module-tools). Also, even
calling it manually, it does not support the custom systemd-boot integration
in openSUSE.

Loading...

Sebastian Wagner's avatar

+%posttrans initrd-tukit +mv %{_bindir}/mkosi-initrd %{_prefix}/libexec/mkosi-initrd +ln -s %{_prefix}/libexec/mkosi-initrd/mkosi-initrd-chroot.sh %{_bindir}/mkosi-initrd

Why is that workaround necessary?


Antonio Feijoo's avatar
author source maintainer

mkosi runs in a sandbox, and for that purpose it relies on bubblewrap. The problem is transactional-update chroots to a snapshot, and bubblewrap does not work there because it requires pivot_root: https://github.com/containers/bubblewrap/issues/135

The issue is quite old, there is even a PR trying to fall back to chroot if pivot_root fails (https://github.com/containers/bubblewrap/pull/595), but apparently bubblewrap upstream is not trying to fix this.

The workaround implemented on mkosi-initrd-chroot.sh was proposed by the main mkosi upstream maintainer: https://github.com/containers/bubblewrap/issues/592#issuecomment-2243087731


Sebastian Wagner's avatar

Can you please add that explanation to the specfile in the %posttrans section, so that this is clear when reading the specfile?

The description of the initrd-tukit subpackage could also be a bit more informative.


Request History
Antonio Feijoo's avatar

afeijoo created request

- Create new subpackage mkosi-initrd-tukit.
* This package adds a special mkosi-initrd wrapper to support creating initrds
on transactional systems. I.e., with transactional-update, a transaction
runs on a chroot, but mkosi requires bubblewrap, which uses pivot_root, and
that is known to fail on a chroot environment.
- Do not install 50-mkosi.install kernel-install script.
* Although kernel-install is provided in openSUSE, it is not run when a kernel
is installed or removed (this work is done by suse-module-tools). Also, even
calling it manually, it does not support the custom systemd-boot integration
in openSUSE.


Sebastian Wagner's avatar

sebix accepted request

openSUSE Build Service is sponsored by