Compare commits

...

3 commits

Author SHA1 Message Date
Colin Watson
bda207af63
mmdebstrap-autopkgtest-build-qemu: selects wrong kernel package for armhf
Package: mmdebstrap
Version: 1.5.0-2
Severity: normal
Tags: patch

With --architecture=armhf, mmdebstrap-autopkgtest-build-qemu fails with
"E: Unable to locate package linux-image-armhf".  The following patch
fixes that.

i386 has a similar problem, and I included a fix for that in this patch
too, though I haven't tested that.

After this, armhf still fails with:

  arm-linux-gnueabihf-objdump: /usr/lib/systemd/boot/efi/linuxarm.efi.stub: file format not recognized
  failed to discover the alignment of the efi stub

... but that's a separate problem.
2024-06-17 13:57:21 +02:00
d0c30c70bd
tests/debootstrap: dump $tmpdir/debootstrap/debootstrap.log on failure 2024-06-12 11:41:17 +02:00
1a4bb39aad
check if libarchive is available for ext4 format 2024-06-12 11:40:39 +02:00
3 changed files with 16 additions and 2 deletions

View file

@ -5737,6 +5737,9 @@ sub main() {
if (!can_execute 'mke2fs', '-V') { if (!can_execute 'mke2fs', '-V') {
error "need mke2fs for ext4 format"; error "need mke2fs for ext4 format";
} }
require DynaLoader;
my $libarchive = DynaLoader::dl_load_file("libarchive.so.13", 0)
or error "need libarchive for ext4 format";
$blocksize = 4096; $blocksize = 4096;
} elsif ($options->{format} eq 'squashfs') { } elsif ($options->{format} eq 'squashfs') {
if (!can_execute 'tar2sqfs') { if (!can_execute 'tar2sqfs') {

View file

@ -235,26 +235,31 @@ case "$ARCHITECTURE" in
EFIIMG=bootx64.efi EFIIMG=bootx64.efi
QEMUARCH=x86_64 QEMUARCH=x86_64
VMFPKG=ovmf VMFPKG=ovmf
LINUXIMAGE=linux-image-amd64
;; ;;
arm64) arm64)
EFIIMG=bootaa64.efi EFIIMG=bootaa64.efi
QEMUARCH=aarch64 QEMUARCH=aarch64
VMFPKG=qemu-efi-aarch64 VMFPKG=qemu-efi-aarch64
LINUXIMAGE=linux-image-arm64
;; ;;
armhf) armhf)
EFIIMG=bootarm.efi EFIIMG=bootarm.efi
QEMUARCH=arm QEMUARCH=arm
VMFPKG=qemu-efi-arm VMFPKG=qemu-efi-arm
LINUXIMAGE=linux-image-armmp
;; ;;
i386) i386)
EFIIMG=bootia32.efi EFIIMG=bootia32.efi
QEMUARCH=i386 QEMUARCH=i386
VMFPKG=ovmf-ia32 VMFPKG=ovmf-ia32
LINUXIMAGE=linux-image-686-pae
;; ;;
riscv64) riscv64)
EFIIMG=bootriscv64.efi EFIIMG=bootriscv64.efi
QEMUARCH=riscv64 QEMUARCH=riscv64
VMFPKG= VMFPKG=
LINUXIMAGE=linux-image-riscv64
;; ;;
*) *)
die "unsupported architecture: $ARCHITECTURE" die "unsupported architecture: $ARCHITECTURE"
@ -344,7 +349,7 @@ test "$RELEASE" = jessie &&
set -- "$@" --hook-dir=/usr/share/mmdebstrap/hooks/jessie-or-older set -- "$@" --hook-dir=/usr/share/mmdebstrap/hooks/jessie-or-older
set -- "$@" \ set -- "$@" \
"--include=init,linux-image-$ARCHITECTURE,python3" \ "--include=init,$LINUXIMAGE,python3" \
'--customize-hook=echo host >"$1/etc/hostname"' \ '--customize-hook=echo host >"$1/etc/hostname"' \
'--customize-hook=echo 127.0.0.1 localhost host >"$1/etc/hosts"' \ '--customize-hook=echo 127.0.0.1 localhost host >"$1/etc/hosts"' \
'--customize-hook=passwd --root "$1" --delete root' \ '--customize-hook=passwd --root "$1" --delete root' \

View file

@ -5,6 +5,12 @@ export SOURCE_DATE_EPOCH={{ SOURCE_DATE_EPOCH }}
tmpdir="$(mktemp -d)" tmpdir="$(mktemp -d)"
chmod 755 "$tmpdir" chmod 755 "$tmpdir"
debootstrap "$([ "{{ DIST }}" = oldstable ] && echo --no-merged-usr || echo --merged-usr)" --variant={{ VARIANT }} {{ DIST }} "$tmpdir" {{ MIRROR }} ret=0
debootstrap "$([ "{{ DIST }}" = oldstable ] && echo --no-merged-usr || echo --merged-usr)" --variant={{ VARIANT }} {{ DIST }} "$tmpdir" {{ MIRROR }} || ret=$?
if [ "$ret" -ne 0 ]; then
echo "E: debootstrap failed, dumping $tmpdir/debootstrap/debootstrap.log"
cat "$tmpdir/debootstrap/debootstrap.log"
exit 1
fi
tar --sort=name --mtime=@$SOURCE_DATE_EPOCH --clamp-mtime --numeric-owner --one-file-system --xattrs -C "$tmpdir" -c . > "./cache/debian-{{ DIST }}-{{ VARIANT }}.tar" tar --sort=name --mtime=@$SOURCE_DATE_EPOCH --clamp-mtime --numeric-owner --one-file-system --xattrs -C "$tmpdir" -c . > "./cache/debian-{{ DIST }}-{{ VARIANT }}.tar"
rm -r "$tmpdir" rm -r "$tmpdir"