diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 15:21:59 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 15:21:59 +0000 |
commit | 59010db2e74061a361a54ba7d3a7e0710e01ee46 (patch) | |
tree | d91ba2aceedf86ec13e6030dc582f074676bb171 /debian/tests/unsorted-packages-files | |
parent | Adding upstream version 1.0.128+nmu2+deb12u1. (diff) | |
download | debootstrap-59010db2e74061a361a54ba7d3a7e0710e01ee46.tar.xz debootstrap-59010db2e74061a361a54ba7d3a7e0710e01ee46.zip |
Adding debian version 1.0.128+nmu2+deb12u1.debian/1.0.128+nmu2+deb12u1debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-x | debian/tests/unsorted-packages-files | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/debian/tests/unsorted-packages-files b/debian/tests/unsorted-packages-files new file mode 100755 index 0000000..f039690 --- /dev/null +++ b/debian/tests/unsorted-packages-files @@ -0,0 +1,33 @@ +#!/bin/sh + +# This test runs the mitm.py Flask app which debootstrap is then pointed at. +# mitm.py will return a Packages file which has an additional `apt` stanza +# prepended, with the Version and Filename adjusted to point at a lower, +# non-existent version. Versions of debootstrap which process _all_ Packages +# files entries will find the original stanza later in the file (and +# succesfully fetch the corresponding package file): versions that don't will +# find the prepended stanza and fail (with a 404 of the nonexistent package +# file). + +export FLASK_ARCH="$(dpkg --print-architecture)" +export FLASK_DIST=testing +export FLASK_DISTRO=debian +export FLASK_MIRROR=http://deb.debian.org +export PATH=$PATH:/usr/sbin + +# Launch our MitM "mirror" server, ensure that request logging is sent to stdout +PYTHONDONTWRITEBYTECODE=true FLASK_APP=debian/tests/mitm.py flask run 2>&1 & +flask_pid=$! + +# Give Flask time to come up +sleep 2 + +tempdir=$(mktemp -d) +# Run debootstrap against our MitM "mirror", ignoring the inevitable GPG errors +debootstrap --download-only --variant minbase --no-check-gpg ${FLASK_DIST} $tempdir http://127.0.0.1:5000/${FLASK_DISTRO}/ +rc=$? + +rm -rf $tempdir +kill $flask_pid + +exit $rc |