diff options
author | Helmut Grohne <helmut@subdivi.de> | 2023-09-14 14:22:30 +0200 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2023-09-14 14:22:30 +0200 |
commit | 88afd5041a1739be866f0b0de7814ff505507147 (patch) | |
tree | b02aba7406fc3b594c1fbb6c2ec1babc9e5ae1a5 | |
parent | 370853674fd74d61f54a6fbf5aab4d7309580e75 (diff) | |
parent | f62eaac14ce1a383d1c372acfb1cc284affd7fe8 (diff) | |
download | debvm-88afd5041a1739be866f0b0de7814ff505507147.tar.gz |
Merge fix_ports into main
-rw-r--r-- | .gitlab-ci.yml | 4 | ||||
-rwxr-xr-x | tests/create-and-run.sh | 15 |
2 files changed, 12 insertions, 7 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 95f9d3d..ec5bc48 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -28,7 +28,7 @@ release_test: script: - apt-get update - apt-get dist-upgrade --yes - - apt-get --no-install-recommends --yes install e2fsprogs genext2fs mmdebstrap openssh-client qemu-kvm dpkg-dev + - apt-get --no-install-recommends --yes install curl e2fsprogs genext2fs mmdebstrap openssh-client qemu-kvm dpkg-dev - PATH=$(pwd)/bin:$PATH ./tests/create-and-run.sh $(dpkg --print-architecture) "$RELEASE" arch_test: @@ -47,6 +47,6 @@ arch_test: - test -e /proc/sys/fs/binfmt_misc/status || mount -t binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc - apt-get update - apt-get dist-upgrade --yes - - apt-get --no-install-recommends --yes install e2fsprogs genext2fs mmdebstrap openssh-client qemu-system arch-test qemu-user-static file systemd dpkg-dev + - apt-get --no-install-recommends --yes install curl e2fsprogs genext2fs mmdebstrap openssh-client qemu-system arch-test qemu-user-static file systemd dpkg-dev debian-ports-archive-keyring - /lib/systemd/systemd-binfmt - PATH=$(pwd)/bin:$PATH ./tests/create-and-run.sh "$ARCHITECTURE" sid diff --git a/tests/create-and-run.sh b/tests/create-and-run.sh index 392a691..26fe4f7 100755 --- a/tests/create-and-run.sh +++ b/tests/create-and-run.sh @@ -20,17 +20,22 @@ cleanup() { trap cleanup EXIT INT TERM QUIT ssh-keygen -f "$SSH_KEYPATH" -N '' -case "$ARCHITECTURE" in - # Booting an armel kernel on qemu is next to impossible. - armel) ARCHITECTURE=armel,armhf ;; -esac MIRROR= +if ! curl -s "http://deb.debian.org/debian/dists/$RELEASE/InRelease" | sed -n 's/^Architectures: //p' | grep -qw "$ARCHITECTURE"; then + MIRROR="deb [signed-by=/usr/share/keyrings/debian-ports-archive-keyring.gpg] http://deb.debian.org/debian-ports $RELEASE main" +fi +if test "$ARCHITECTURE" = armel; then + # Booting an armel kernel on qemu is next to impossible. + ARCHITECTURE=armel,armhf +fi case "$RELEASE" in jessie|stretch) MIRROR=http://archive.debian.org/debian ;; esac -debvm-create -k "$SSH_KEYPATH.pub" -o "$IMAGE" -r "$RELEASE" -- --architectures="$ARCHITECTURE" $MIRROR +set -- --architectures="$ARCHITECTURE" +test -n "$MIRROR" && set -- "$@" "$MIRROR" +debvm-create -k "$SSH_KEYPATH.pub" -o "$IMAGE" -r "$RELEASE" -- "$@" SSH_PORT=2222 timeout 300s debvm-run -s "$SSH_PORT" -i "$IMAGE" & |