forked from josch/mmdebstrap
testsuite changes for bookworm release
This commit is contained in:
parent
04950847d3
commit
5a9123aa11
4 changed files with 31 additions and 77 deletions
23
coverage.txt
23
coverage.txt
|
@ -3,21 +3,18 @@ Dists: any
|
|||
Variants: minbase buildd -
|
||||
Needs-Root: true
|
||||
Needs-APT-Config: true
|
||||
Skip-If: variant == "-" and dist == "oldstable" #917773
|
||||
|
||||
Test: check-against-debootstrap-dist
|
||||
Dists: any
|
||||
Variants: minbase buildd -
|
||||
Needs-Root: true
|
||||
Needs-APT-Config: true
|
||||
Skip-If: variant == "-" and dist == "oldstable" #917773
|
||||
|
||||
Test: as-debootstrap-unshare-wrapper
|
||||
Modes: unshare
|
||||
Needs-Root: true
|
||||
Variants: minbase -
|
||||
Needs-APT-Config: true
|
||||
Skip-If: variant == "-" and dist == "oldstable" #917773
|
||||
|
||||
Test: help
|
||||
|
||||
|
@ -65,10 +62,7 @@ Modes: root
|
|||
Formats: tar squashfs ext2
|
||||
Variants: essential apt minbase buildd - standard
|
||||
Skip-If:
|
||||
variant == "standard" and dist in ["oldstable", "stable"] # #864082, #1004557, #1004558
|
||||
variant == "important" and dist == "oldstable" # /var/lib/systemd/catalog/database differs
|
||||
fmt == "squashfs" and dist == "oldstable" # squashfs-tools-ng is not available
|
||||
fmt == "ext2" and dist == "oldstable" # genext2fs does not support SOURCE_DATE_EPOCH
|
||||
variant == "standard" and dist == "oldstable" # #864082, #1004557, #1004558
|
||||
mode == "fakechroot" and variant in ["-", "standard"] # no extended attributes
|
||||
variant == "standard" and hostarch in ["armel", "armhf", "mipsel"] # #1031276
|
||||
|
||||
|
@ -77,16 +71,12 @@ Modes: unshare fakechroot
|
|||
Formats: tar squashfs ext2
|
||||
Variants: essential apt minbase buildd - standard
|
||||
Skip-If:
|
||||
variant == "standard" and dist in ["oldstable", "stable"] # #864082, #1004557, #1004558
|
||||
variant == "important" and dist == "oldstable" # /var/lib/systemd/catalog/database differs
|
||||
fmt == "squashfs" and dist == "oldstable" # squashfs-tools-ng is not available
|
||||
fmt == "ext2" and dist == "oldstable" # genext2fs does not support SOURCE_DATE_EPOCH
|
||||
variant == "standard" and dist == "oldstable" # #864082, #1004557, #1004558
|
||||
mode == "fakechroot" and variant in ["-", "standard"] # no extended attributes
|
||||
variant == "standard" and hostarch in ["armel", "armhf", "mipsel"] # #1031276
|
||||
|
||||
Test: tarfilter-idshift
|
||||
Needs-QEMU: true
|
||||
Skip-If: dist == "oldstable" # python3 tarfile module does not preserve xattrs
|
||||
|
||||
Test: progress-bars-on-fake-tty
|
||||
|
||||
|
@ -321,8 +311,7 @@ Test: compare-output-with-pre-seeded-var-cache-apt-archives
|
|||
Needs-QEMU: true
|
||||
Variants: any
|
||||
Skip-If:
|
||||
variant == "standard" and dist in ["oldstable", "stable"] # #864082, #1004557, #1004558
|
||||
variant == "important" and dist == "oldstable" # /var/lib/systemd/catalog/database differs
|
||||
variant == "standard" and dist == "oldstable" # #864082, #1004557, #1004558
|
||||
|
||||
Test: create-directory-dry-run
|
||||
Modes: root
|
||||
|
@ -346,20 +335,20 @@ Variants: essential
|
|||
Modes: chrootless
|
||||
Needs-Root: true
|
||||
Skip-If:
|
||||
dist in ["oldstable", "stable"]
|
||||
dist == "oldstable"
|
||||
|
||||
Test: chrootless-fakeroot
|
||||
Variants: essential
|
||||
Modes: chrootless
|
||||
Skip-If:
|
||||
dist in ["oldstable", "stable"]
|
||||
dist == "oldstable"
|
||||
hostarch in ["i386", "armel", "armhf", "mipsel"] # #1023286
|
||||
|
||||
Test: chrootless-foreign
|
||||
Variants: essential
|
||||
Modes: chrootless
|
||||
Skip-If:
|
||||
dist in ["oldstable", "stable"]
|
||||
dist == "oldstable"
|
||||
hostarch not in ["amd64", "arm64"]
|
||||
not run_ma_same_tests
|
||||
Needs-QEMU: true
|
||||
|
|
|
@ -56,21 +56,13 @@ deletecache() {
|
|||
fi
|
||||
;;
|
||||
esac
|
||||
case "$dist" in
|
||||
oldstable)
|
||||
if [ -e "$dir/debian-security/dists/$dist/updates" ]; then
|
||||
rm --one-file-system --recursive "$dir/debian-security/dists/$dist/updates"
|
||||
else
|
||||
echo "does not exist: $dir/debian-security/dists/$dist/updates" >&2
|
||||
fi
|
||||
;;
|
||||
stable)
|
||||
if [ -e "$dir/debian-security/dists/$dist-security" ]; then
|
||||
rm --one-file-system --recursive "$dir/debian-security/dists/$dist-security"
|
||||
else
|
||||
echo "does not exist: $dir/debian-security/dists/$dist-security" >&2
|
||||
fi
|
||||
;;
|
||||
case "$dist" in oldstable|stable)
|
||||
if [ -e "$dir/debian-security/dists/$dist-security" ]; then
|
||||
rm --one-file-system --recursive "$dir/debian-security/dists/$dist-security"
|
||||
else
|
||||
echo "does not exist: $dir/debian-security/dists/$dist-security" >&2
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
for f in "$dir/debian-"*.qcow; do
|
||||
|
@ -239,7 +231,7 @@ END
|
|||
# we need usr-is-merged to simulate debootstrap behaviour for all dists
|
||||
# starting from Debian 12 (Bullseye)
|
||||
case "$dist" in
|
||||
oldstable|stable) : ;;
|
||||
oldstable) : ;;
|
||||
*) pkgs="$pkgs usr-is-merged usrmerge" ;;
|
||||
esac
|
||||
|
||||
|
@ -369,16 +361,8 @@ for dist in oldstable stable testing unstable; do
|
|||
echo "deb [arch=$nativearch] $mirror $dist $components" | update_cache "$dist" "$nativearch"
|
||||
# we need to include the base mirror again or otherwise
|
||||
# packages like build-essential will be missing
|
||||
case "$dist" in
|
||||
oldstable)
|
||||
cat << END | update_cache "$dist" "$nativearch"
|
||||
deb [arch=$nativearch] $mirror $dist $components
|
||||
deb [arch=$nativearch] $mirror $dist-updates main
|
||||
deb [arch=$nativearch] $security_mirror $dist/updates main
|
||||
END
|
||||
;;
|
||||
stable)
|
||||
cat << END | update_cache "$dist" "$nativearch"
|
||||
case "$dist" in oldstable|stable)
|
||||
cat << END | update_cache "$dist" "$nativearch"
|
||||
deb [arch=$nativearch] $mirror $dist $components
|
||||
deb [arch=$nativearch] $mirror $dist-updates main
|
||||
deb [arch=$nativearch] $security_mirror $dist-security main
|
||||
|
@ -473,10 +457,7 @@ if [ "$HAVE_QEMU" = "yes" ]; then
|
|||
tmpdir="$(mktemp -d)"
|
||||
trap 'kill "$PROXYPID" || :;cleanuptmpdir; cleanup_newcachedir' EXIT INT TERM
|
||||
|
||||
pkgs=perl-doc,systemd-sysv,perl,arch-test,fakechroot,fakeroot,mount,uidmap,qemu-user-static,binfmt-support,qemu-user,dpkg-dev,mini-httpd,libdevel-cover-perl,libtemplate-perl,debootstrap,procps,apt-cudf,aspcud,python3,libcap2-bin,gpg,debootstrap,distro-info-data,iproute2,ubuntu-keyring,apt-utils,grub-efi
|
||||
if [ "$DEFAULT_DIST" != "oldstable" ]; then
|
||||
pkgs="$pkgs,squashfs-tools-ng,genext2fs"
|
||||
fi
|
||||
pkgs=perl-doc,systemd-sysv,perl,arch-test,fakechroot,fakeroot,mount,uidmap,qemu-user-static,binfmt-support,qemu-user,dpkg-dev,mini-httpd,libdevel-cover-perl,libtemplate-perl,debootstrap,procps,apt-cudf,aspcud,python3,libcap2-bin,gpg,debootstrap,distro-info-data,iproute2,ubuntu-keyring,apt-utils,grub-efi,disorderfs,squashfs-tools-ng,genext2fs
|
||||
if [ ! -e ./mmdebstrap ]; then
|
||||
pkgs="$pkgs,mmdebstrap"
|
||||
fi
|
||||
|
|
|
@ -11,8 +11,8 @@ echo "SOURCE_DATE_EPOCH=$SOURCE_DATE_EPOCH"
|
|||
# https://bugs.debian.org/969631
|
||||
# we cannot use useradd because passwd is not Essential:yes
|
||||
{{ CMD }} --variant={{ VARIANT }} --mode={{ MODE }} \
|
||||
--essential-hook='case {{ DIST }} in oldstable|stable) if [ {{ VARIANT }} = - ]; then echo _apt:*:100:65534::/nonexistent:/usr/sbin/nologin >> "$1"/etc/passwd; fi;; esac' \
|
||||
"$(case {{ DIST }} in oldstable|stable) echo --merged-usr ;; *) echo --hook-dir=./hooks/merged-usr ;; esac)" \
|
||||
--essential-hook='[ {{ DIST }} = oldstable ] && [ {{ VARIANT }} = - ] && echo _apt:*:100:65534::/nonexistent:/usr/sbin/nologin >> "$1"/etc/passwd || :' \
|
||||
"$(if [ {{ DIST }} = oldstable ]; then echo --merged-usr; else echo --hook-dir=./hooks/merged-usr; fi)" \
|
||||
{{ DIST }} /tmp/debian-{{ DIST }}-mm.tar {{ MIRROR }}
|
||||
|
||||
mkdir /tmp/debian-{{ DIST }}-mm
|
||||
|
@ -108,9 +108,6 @@ if [ "{{ VARIANT }}" = "-" ]; then
|
|||
|
||||
cap=$(chroot /tmp/debian-{{ DIST }}-debootstrap /sbin/getcap /bin/ping)
|
||||
expected="/bin/ping cap_net_raw=ep"
|
||||
if [ "{{ DIST }}" = oldstable ]; then
|
||||
expected="/bin/ping = cap_net_raw+ep"
|
||||
fi
|
||||
if [ "$cap" != "$expected" ]; then
|
||||
echo "expected bin/ping to have capabilities $expected" >&2
|
||||
echo "but debootstrap produced: $cap" >&2
|
||||
|
@ -148,14 +145,12 @@ done
|
|||
# Because of unreproducible uids (#969631) we created the _apt user ourselves
|
||||
# and because passwd is not Essential:yes we didn't use useradd. But newer
|
||||
# versions of adduser and shadow will create a different /etc/shadow
|
||||
if [ "{{ VARIANT }}" = "-" ]; then
|
||||
case {{ DIST }} in oldstable|stable)
|
||||
for f in shadow shadow-; do
|
||||
if grep -q '^_apt:!:' /tmp/debian-{{ DIST }}-debootstrap/etc/$f; then
|
||||
sed -i 's/^_apt:\*:\([^:]\+\):0:99999:7:::$/_apt:!:\1::::::/' /tmp/debian-{{ DIST }}-mm/etc/$f
|
||||
fi
|
||||
done;;
|
||||
esac
|
||||
if [ "{{ VARIANT }}" = "-" ] && [ "{{ DIST}}" = oldstable ]; then
|
||||
for f in shadow shadow-; do
|
||||
if grep -q '^_apt:!:' /tmp/debian-{{ DIST }}-debootstrap/etc/$f; then
|
||||
sed -i 's/^_apt:\*:\([^:]\+\):0:99999:7:::$/_apt:!:\1::::::/' /tmp/debian-{{ DIST }}-mm/etc/$f
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
for log in faillog lastlog; do
|
||||
|
@ -171,16 +166,12 @@ done
|
|||
# the order in which systemd and cron get installed differ and thus the order
|
||||
# of lines in /etc/group and /etc/gshadow differs
|
||||
if [ "{{ VARIANT }}" = "-" ]; then
|
||||
case {{ DIST }} in testing|unstable)
|
||||
for f in group group- gshadow gshadow-; do
|
||||
cmp /tmp/debian-{{ DIST }}-mm/etc/$f /tmp/debian-{{ DIST }}-debootstrap/etc/$f 2>/dev/null && exit 1
|
||||
for d in mm debootstrap; do
|
||||
sort /tmp/debian-{{ DIST }}-$d/etc/$f > /tmp/debian-{{ DIST }}-$d/etc/$f.bak
|
||||
mv /tmp/debian-{{ DIST }}-$d/etc/$f.bak /tmp/debian-{{ DIST }}-$d/etc/$f
|
||||
done
|
||||
for f in group group- gshadow gshadow-; do
|
||||
for d in mm debootstrap; do
|
||||
sort /tmp/debian-{{ DIST }}-$d/etc/$f > /tmp/debian-{{ DIST }}-$d/etc/$f.bak
|
||||
mv /tmp/debian-{{ DIST }}-$d/etc/$f.bak /tmp/debian-{{ DIST }}-$d/etc/$f
|
||||
done
|
||||
;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
|
||||
# check if the file content differs
|
||||
|
|
|
@ -5,13 +5,6 @@ export SOURCE_DATE_EPOCH={{ SOURCE_DATE_EPOCH }}
|
|||
|
||||
tmpdir="$(mktemp -d)"
|
||||
chmod 755 "$tmpdir"
|
||||
case "{{ DIST }}" in
|
||||
oldstable|stable)
|
||||
debootstrap --no-merged-usr --variant={{ VARIANT }} {{ DIST }} "$tmpdir" {{ MIRROR }}
|
||||
;;
|
||||
*)
|
||||
debootstrap --merged-usr --variant={{ VARIANT }} {{ DIST }} "$tmpdir" {{ MIRROR }}
|
||||
;;
|
||||
esac
|
||||
debootstrap "$([ "{{ DIST }}" = oldstable ] && echo --no-merged-usr || echo --merged-usr)" --variant={{ VARIANT }} {{ DIST }} "$tmpdir" {{ MIRROR }}
|
||||
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"
|
||||
|
|
Loading…
Reference in a new issue