diff -Nru flash-kernel-3.106ubuntu2/debian/changelog flash-kernel-3.106ubuntu3/debian/changelog --- flash-kernel-3.106ubuntu2/debian/changelog 2022-07-06 12:25:53.000000000 +0200 +++ flash-kernel-3.106ubuntu3/debian/changelog 2022-07-07 10:50:47.000000000 +0200 @@ -1,3 +1,10 @@ +flash-kernel (3.106ubuntu3) kinetic; urgency=medium + + * Allow to bypass container exit test by introducing FK_FORCE_CONTAINER + for RISC-V images build to run flash-kernel in a container (LP: #1980929) + + -- Alexandre Ghiti Thu, 07 Jul 2022 10:50:47 +0200 + flash-kernel (3.106ubuntu2) kinetic; urgency=medium * db/all.db: add dummy entry for RISC-V under QEMU (LP: #1980519) diff -Nru flash-kernel-3.106ubuntu2/functions flash-kernel-3.106ubuntu3/functions --- flash-kernel-3.106ubuntu2/functions 2022-06-15 16:21:33.000000000 +0200 +++ flash-kernel-3.106ubuntu3/functions 2022-07-07 10:50:47.000000000 +0200 @@ -903,9 +903,11 @@ } main() { -# Do not run inside an LXC container -if systemd-detect-virt --quiet --container; then - exit 0 +# Do not run inside an LXC container unless explicitly asked +if [ "$FK_FORCE_CONTAINER" != "yes" ]; then + if systemd-detect-virt --quiet --container; then + exit 0 + fi fi force="no" diff -Nru flash-kernel-3.106ubuntu2/initramfs-tools/hooks/flash_kernel_set_root flash-kernel-3.106ubuntu3/initramfs-tools/hooks/flash_kernel_set_root --- flash-kernel-3.106ubuntu2/initramfs-tools/hooks/flash_kernel_set_root 2022-05-17 16:12:20.000000000 +0200 +++ flash-kernel-3.106ubuntu3/initramfs-tools/hooks/flash_kernel_set_root 2022-07-07 10:50:47.000000000 +0200 @@ -65,9 +65,11 @@ exit 0 fi -# Do not run inside an LXC container -if systemd-detect-virt --quiet --container; then - exit 0 +# Do not run inside an LXC container unless explicitly asked +if [ "$FK_FORCE_CONTAINER" != "yes" ]; then + if systemd-detect-virt --quiet --container; then + exit 0 + fi fi # Record the root filesystem device for use during boot