diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index b3f1349e0..88a884c6d 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -80,6 +80,10 @@ parts: - python3-dev - cargo build-environment: + # We set this environment variable while building to try and increase the + # stability of fetching the rust crates needed to build the cryptography + # library. + - CARGO_NET_GIT_FETCH_WITH_CLI: "true" - SNAPCRAFT_PYTHON_VENV_ARGS: --upgrade # Constraints are passed through the environment variable PIP_CONSTRAINTS instead of using the # parts.[part_name].constraints option available in snapcraft.yaml when the Python plugin is diff --git a/tools/docker/core/Dockerfile b/tools/docker/core/Dockerfile index 14bd3323a..fc0912752 100644 --- a/tools/docker/core/Dockerfile +++ b/tools/docker/core/Dockerfile @@ -26,6 +26,10 @@ RUN apk add --no-cache --virtual .certbot-deps \ ca-certificates \ binutils +# We set this environment variable and install git while building to try and +# increase the stability of fetching the rust crates needed to build the +# cryptography library +ARG CARGO_NET_GIT_FETCH_WITH_CLI=true # Install certbot from sources RUN apk add --no-cache --virtual .build-deps \ gcc \ @@ -35,6 +39,7 @@ RUN apk add --no-cache --virtual .build-deps \ libffi-dev \ python3-dev \ cargo \ + git \ && python tools/pipstrap.py \ && python tools/pip_install.py --no-cache-dir \ --editable src/acme \ diff --git a/tools/snap/generate_dnsplugins_snapcraft.sh b/tools/snap/generate_dnsplugins_snapcraft.sh index 139c8b0d3..efa647366 100755 --- a/tools/snap/generate_dnsplugins_snapcraft.sh +++ b/tools/snap/generate_dnsplugins_snapcraft.sh @@ -27,6 +27,10 @@ parts: snapcraftctl pull snapcraftctl set-version \`grep ^version \$SNAPCRAFT_PART_SRC/setup.py | cut -f2 -d= | tr -d "'[:space:]"\` build-environment: + # We set this environment variable while building to try and increase the + # stability of fetching the rust crates needed to build the cryptography + # library. + - CARGO_NET_GIT_FETCH_WITH_CLI: "true" # Constraints are passed through the environment variable PIP_CONSTRAINTS instead of using the # parts.[part_name].constraints option available in snapcraft.yaml when the Python plugin is # used. This is done to let these constraints be applied not only on the certbot package