From 74b0340a13304cfeeb7c4ca5bb3b9ff404a2dcdd Mon Sep 17 00:00:00 2001 From: Adrien Ferrand Date: Tue, 21 Jul 2020 02:17:10 +0200 Subject: [PATCH] Use a specific tag of adferrand/snapcraft to build QEMU snaps and avoid failures (#8158) The latest builds of snapcraft introduced somehow several failures when snaps are built on QEMU for armhf. See https://dev.azure.com/certbot/certbot/_build/results?buildId=2326&view=logs&j=7c548e18-6053-5a42-b366-e6480da09a69&t=a7c7ca26-ae0c-54e6-0355-3bfcd7bab03c for instance. This PR uses a specific tags from `adferrand/snapcraft`, extracted from the last known working `nightly` pipeline, to avoid these failures until a more permanent fix is done. Very likely the fix will be the move to snapcraft remote builds. * Use a specific tag of adferrand/snapcraft to build snaps and avoid an error on QEMU for armhf. * Update tools/snap/build.sh Co-authored-by: Brad Warren * Update tools/snap/build_dns.sh Co-authored-by: Brad Warren Co-authored-by: Brad Warren --- tools/snap/build.sh | 5 ++++- tools/snap/build_dns.sh | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/tools/snap/build.sh b/tools/snap/build.sh index ef34c479a..c9392f909 100755 --- a/tools/snap/build.sh +++ b/tools/snap/build.sh @@ -31,11 +31,14 @@ function cleanup() { trap cleanup EXIT +# NB: We use ARCH-stable-save tag instead of ARCH-stable, because recent versions of snapcraft images +# behave badly on QEMU for arm64 architecture. This should be fixed either by a new version of the +# image that does not have this problem anymore, or the migration to snapcraft remote builds. docker run \ --rm \ --net=host \ -v "${CERTBOT_DIR}:/certbot" \ -w "/certbot" \ -e "PIP_EXTRA_INDEX_URL=http://localhost:8080" \ - "adferrand/snapcraft:${DOCKER_ARCH}-stable" \ + "adferrand/snapcraft:${DOCKER_ARCH}-stable-save" \ bash -c "snapcraft clean && snapcraft" diff --git a/tools/snap/build_dns.sh b/tools/snap/build_dns.sh index aba008d7e..5ebad2969 100755 --- a/tools/snap/build_dns.sh +++ b/tools/snap/build_dns.sh @@ -60,6 +60,9 @@ for DNS_PLUGIN in ${DNS_PLUGINS}; do done EOF +# NB: We use ARCH-stable-save tag instead of ARCH-stable, because recent versions of snapcraft images +# behave badly on QEMU for arm64 architecture. This should be fixed either by a new version of the +# image that does not have this problem anymore, or the migration to snapcraft remote builds. docker run \ --rm \ --net=host \ @@ -69,5 +72,5 @@ docker run \ -w "/certbot" \ -e "DNS_PLUGINS=${DNS_PLUGINS}" \ -e "PIP_EXTRA_INDEX_URL=http://localhost:8080" \ - "adferrand/snapcraft:${DOCKER_ARCH}-stable" \ + "adferrand/snapcraft:${DOCKER_ARCH}-stable-save" \ /script.sh