From 95433251c530f83dd3f3d95a57dd6dbd36f9430c Mon Sep 17 00:00:00 2001 From: Erica Portnoy Date: Tue, 16 Jun 2020 17:00:00 -0700 Subject: [PATCH 1/7] pretty sure we don't actually need wheel. let's try removing it! --- snap/snapcraft.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 5a51ce0f1..7f17e0461 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -42,21 +42,17 @@ parts: source: git://github.com/basak/python-augeas source-branch: snap build-packages: [libaugeas-dev] - python-packages: - - wheel stage: - -pyvenv.cfg - -**/__pycache__ - -bin - -**/RECORD - - -**/wheel - -lib64 certbot: plugin: python source: . constraints: [$SNAPCRAFT_PART_SRC/snap-constraints.txt] python-packages: - - wheel - ./acme - ./certbot - ./certbot-apache From 34ba5a698bd76b3177c0b66c0da57e0d9463b5e4 Mon Sep 17 00:00:00 2001 From: Erica Portnoy Date: Tue, 16 Jun 2020 17:17:16 -0700 Subject: [PATCH 2/7] remove python-augeas, since we have it pinned to an older version in cb-auto that might work --- snap/snapcraft.yaml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 7f17e0461..4f47e4a01 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -37,17 +37,6 @@ apps: parts: - python-augeas: - plugin: python - source: git://github.com/basak/python-augeas - source-branch: snap - build-packages: [libaugeas-dev] - stage: - - -pyvenv.cfg - - -**/__pycache__ - - -bin - - -**/RECORD - - -lib64 certbot: plugin: python source: . @@ -80,7 +69,6 @@ parts: override-pull: | snapcraftctl pull snapcraftctl set-version `cd $SNAPCRAFT_PART_SRC/certbot && git describe|sed s/^v//` - after: [python-augeas] wrappers: plugin: dump From 89ff65ee31c3009e9fbfea81fd1f274fb2ff684d Mon Sep 17 00:00:00 2001 From: Erica Portnoy Date: Tue, 16 Jun 2020 17:26:18 -0700 Subject: [PATCH 3/7] stage augeas --- snap/snapcraft.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 4f47e4a01..78b3d82e7 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -48,8 +48,6 @@ parts: - ./certbot-nginx stage: - -usr/lib/python3.8/sitecustomize.py # maybe unnecessary - # Prefer cffi - - -lib/python3.8/site-packages/augeas.py # maybe unnecessary stage-packages: - libaugeas0 # added to stage python: From a22be8cf651efd3f33071a539d2422cc67eea953 Mon Sep 17 00:00:00 2001 From: Erica Portnoy Date: Tue, 16 Jun 2020 17:31:50 -0700 Subject: [PATCH 4/7] still need libaugeas-dev --- snap/snapcraft.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 78b3d82e7..41c80cfd2 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -63,7 +63,7 @@ parts: - python3-pkg-resources - python3.8-minimal # To build cryptography and cffi if needed - build-packages: [libffi-dev, libssl-dev, git] + build-packages: [libffi-dev, libssl-dev, git, libaugeas-dev] override-pull: | snapcraftctl pull snapcraftctl set-version `cd $SNAPCRAFT_PART_SRC/certbot && git describe|sed s/^v//` From bdeec26a92cd673f81abfb28139b69151fdb553d Mon Sep 17 00:00:00 2001 From: Erica Portnoy Date: Tue, 16 Jun 2020 17:48:43 -0700 Subject: [PATCH 5/7] ok let's try building --- snap/snapcraft.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 41c80cfd2..745adafb5 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -42,12 +42,15 @@ parts: source: . constraints: [$SNAPCRAFT_PART_SRC/snap-constraints.txt] python-packages: + - git+https://github.com/basak/python-augeas.git@snap - ./acme - ./certbot - ./certbot-apache - ./certbot-nginx stage: - -usr/lib/python3.8/sitecustomize.py # maybe unnecessary + # Prefer cffi + - -lib/python3.8/site-packages/augeas.py # maybe unnecessary stage-packages: - libaugeas0 # added to stage python: From 7929c5b959b6cce510a9199b87dc08ffe2491161 Mon Sep 17 00:00:00 2001 From: Erica Portnoy Date: Tue, 16 Jun 2020 17:57:04 -0700 Subject: [PATCH 6/7] combining into one part works! just make sure to unpin python-augeas when generating snap-constraints.txt --- snap/snapcraft.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 745adafb5..c3af77e49 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -50,7 +50,7 @@ parts: stage: - -usr/lib/python3.8/sitecustomize.py # maybe unnecessary # Prefer cffi - - -lib/python3.8/site-packages/augeas.py # maybe unnecessary + - -lib/python3.8/site-packages/augeas.py stage-packages: - libaugeas0 # added to stage python: From c33090781bd4e9da05dcbe51dec381339b738e22 Mon Sep 17 00:00:00 2001 From: Erica Portnoy Date: Tue, 16 Jun 2020 17:59:57 -0700 Subject: [PATCH 7/7] change our scripts to unpin python-augeas --- snap/local/build_and_install.sh | 3 ++- snap/local/compile_native_wheels.sh | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/snap/local/build_and_install.sh b/snap/local/build_and_install.sh index b5883bc8a..f3b83a24e 100755 --- a/snap/local/build_and_install.sh +++ b/snap/local/build_and_install.sh @@ -26,7 +26,8 @@ source "${DIR}/common.sh" RegisterQemuHandlers ResolveArch "${SNAP_ARCH}" -tools/strip_hashes.py letsencrypt-auto-source/pieces/dependency-requirements.txt > snap-constraints.txt +tools/strip_hashes.py letsencrypt-auto-source/pieces/dependency-requirements.txt \ + | grep -v python-augeas > snap-constraints.txt pushd "${DIR}/packages" "${CERTBOT_DIR}/tools/simple_http_server.py" 8080 >/dev/null 2>&1 & diff --git a/snap/local/compile_native_wheels.sh b/snap/local/compile_native_wheels.sh index 5dbb0f5d6..a93795a27 100755 --- a/snap/local/compile_native_wheels.sh +++ b/snap/local/compile_native_wheels.sh @@ -14,7 +14,8 @@ source "${DIR}/common.sh" RegisterQemuHandlers -tools/strip_hashes.py letsencrypt-auto-source/pieces/dependency-requirements.txt > "${DIR}/snap-constraints.txt" +tools/strip_hashes.py letsencrypt-auto-source/pieces/dependency-requirements.txt \ + | grep -v python-augeas > "${DIR}/snap-constraints.txt" for SNAP_ARCH in ${TARGET_ARCHS}; do ResolveArch "${SNAP_ARCH}" DownloadQemuStatic "${QEMU_ARCH}" "${DIR}"