From e61dfba9afa09c0c6f864dbd6b4ea1ebaf5fd01b Mon Sep 17 00:00:00 2001 From: Matt Anson Date: Mon, 7 Apr 2025 12:55:04 +0100 Subject: [PATCH] Remove qemu-debootstrap from debootstrap element In Debian/Ubuntu qemu-debootstrap prints a warning that its usage is deprecated in favour of calling deboostrap directly. In EL9 variants, there is no package that provides qemu-debootstrap. Remove use of qemu-debootstrap entirely and use debootstrap directly. Closes-Bug: #2106385 Change-Id: Ife5033458bdf9e53388b052620fe7356272cdaa8 --- .../elements/debootstrap/root.d/08-debootstrap | 10 +--------- .../remove-qemu-debootstrap-f066e85c1ab0617e.yaml | 6 ++++++ 2 files changed, 7 insertions(+), 9 deletions(-) create mode 100644 releasenotes/notes/remove-qemu-debootstrap-f066e85c1ab0617e.yaml diff --git a/diskimage_builder/elements/debootstrap/root.d/08-debootstrap b/diskimage_builder/elements/debootstrap/root.d/08-debootstrap index c4dfe518c..327799027 100755 --- a/diskimage_builder/elements/debootstrap/root.d/08-debootstrap +++ b/diskimage_builder/elements/debootstrap/root.d/08-debootstrap @@ -34,8 +34,6 @@ DEBOOTSTRAP_TARBALL=$DIB_IMAGE_CACHE/debootstrap-${DISTRO_NAME}-${DIB_RELEASE}-$ http_proxy=${http_proxy:-} no_proxy=${no_proxy:-} -DEBOOTSTRAP_QEMU="" - _debootstrap_version=$(debootstrap --version) # could be like "debootstrap 1.0.114~bpo16.04+1" _debootstrap_version=${_debootstrap_version:16:3} @@ -57,13 +55,7 @@ else # Have to --include=sudo for pre-install.d use of sudoers files # Have to --include=busybox because initramfs needs it - if [ $(dpkg --print-architecture) != ${ARCH} ]; then - # Target architecture different from host architecture: - # there is the need to call 'qemu-debootstrap'. - DEBOOTSTRAP_QEMU="qemu-" - fi - - sudo sh -c "http_proxy=$http_proxy no_proxy=$no_proxy ${DEBOOTSTRAP_QEMU}debootstrap --verbose \ + sudo sh -c "http_proxy=$http_proxy no_proxy=$no_proxy debootstrap --verbose \ --variant=minbase \ --components=${DIB_DEBIAN_COMPONENTS} \ --arch=${ARCH} \ diff --git a/releasenotes/notes/remove-qemu-debootstrap-f066e85c1ab0617e.yaml b/releasenotes/notes/remove-qemu-debootstrap-f066e85c1ab0617e.yaml new file mode 100644 index 000000000..24609e24c --- /dev/null +++ b/releasenotes/notes/remove-qemu-debootstrap-f066e85c1ab0617e.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Fix cross-architecture builds that use the debootstrap element by + removing use of deprecated qemu-debootstrap, in favor of using + debootstrap directly.