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
This commit is contained in:
Matt Anson
2025-04-07 12:55:04 +01:00
parent e47ad3aa85
commit e61dfba9af
2 changed files with 7 additions and 9 deletions

View File

@ -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} \

View File

@ -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.