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