Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/certbot/certbot.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/snap
diff options
context:
space:
mode:
authorRobie Basak <robie.basak@canonical.com>2019-09-03 17:41:11 +0300
committerBrad Warren <bmw@eff.org>2020-04-22 02:36:49 +0300
commitb69f5588f4c05d184a5d1e983ffa7898affa0e4d (patch)
tree19960bd035a666e87caad1a138460252438f8829 /snap
parent2c622944ddaa8c4641df33bb2386839a8d74e9ef (diff)
Continued improvements
* Remove legacy Store upload credentials These have not been needed since 5d7969a. * Work around dev part dependency failure case Get pip to install certbot from its VCS repository directly during the build of the nginx and apache plugin parts. This works around issue #12 when it affects the interaction between the apache or nginx plugin and certbot itself. It does not work around the case where the same problem occurs in the interaction between certbot and acme. This looks harder to work around because pip's VCS URL handling doesn't appear to include a facility to install from a subdirectory of a git repository and this is where the acme source is located. * Switch to using lxd for the snapcraft run The Docker image is 16.04 only. Before we can switch to 18.04, we need to remove Docker, which means using the snapcraft snap using Travis' new snap support, and then using the lxd functionality in snapcraft so that it is enabled to build in the appropriate environment. * Switch build to use core 18 Fixes: #14 * Move constraints into a list This seems to be a requirement either either newer snapcraft, snapcraft in lxd or in the move to core18 (it isn't clear to me which). This fixes the error: Failed to load plugin: properties failed to load for certbot: The 'constraints' property does not match the required schema: '$SNAPCRAFT_PART_SRC/constraints.txt' is not of type 'array' * version-script -> snapcraftctl set-version The use of version-script seems to break with either newer snapcraft, snapcraft with lxd or core18 (it's not clear to me which). The breakage is related to "parts/certbot/src" not being found. This can be fixed with $SNAPCRAFT_PART_SRC, but this doesn't seem to be defined at "version-script time". However https://snapcraft.io/docs/deprecation-notices/dn10 deprecates the use of version-script, and if we convert to the recommended new way, then we use override-pull instead and $SNAPCRAFT_PART_SRC is defined there, so this conveniently fixes both problems at once. * Do not explicitly install snapd Since this is now handled by the Travis addon, we do not need to do it explicitly.
Diffstat (limited to 'snap')
-rw-r--r--snap/.snapcraft/travis_snapcraft.cfgbin2448 -> 0 bytes
-rw-r--r--snap/.travis.yml14
-rw-r--r--snap/snapcraft.yaml17
3 files changed, 23 insertions, 8 deletions
diff --git a/snap/.snapcraft/travis_snapcraft.cfg b/snap/.snapcraft/travis_snapcraft.cfg
deleted file mode 100644
index d54f41155..000000000
--- a/snap/.snapcraft/travis_snapcraft.cfg
+++ /dev/null
Binary files differ
diff --git a/snap/.travis.yml b/snap/.travis.yml
index 3c934b7bd..418407558 100644
--- a/snap/.travis.yml
+++ b/snap/.travis.yml
@@ -1,12 +1,15 @@
language: python
before_install:
- - sudo -E apt-get -yq --no-install-suggests --no-install-recommends install nginx-light snapd python3-venv
+ - sudo -E apt-get -yq --no-install-suggests --no-install-recommends install nginx-light python3-venv
- sudo -E /etc/init.d/nginx stop
install:
+ - sudo /snap/bin/lxd.migrate -yes
+ - sudo /snap/bin/lxd waitready
+ - sudo /snap/bin/lxd init --auto
- git clone https://github.com/certbot/certbot.git certbot --branch master
- certbot/tools/strip_hashes.py certbot/letsencrypt-auto-source/pieces/dependency-requirements.txt > certbot/constraints.txt
before_script:
- - docker run -v $(pwd):$(pwd) -t snapcore/snapcraft sh -c "apt-get update -qq && apt-get install -qq git && cd $(pwd) && snapcraft"
+ - sudo snapcraft --use-lxd
script:
- sudo snap install --dangerous --classic *.snap
- sudo bash test.sh
@@ -21,3 +24,10 @@ notifications:
email:
recipients: [robie.basak@canonical.com]
on_failure: change
+addons:
+ snaps:
+ - name: snapcraft
+ channel: stable
+ classic: true
+ - name: lxd
+ channel: stable
diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml
index b7bfab9ca..38d32ed0b 100644
--- a/snap/snapcraft.yaml
+++ b/snap/snapcraft.yaml
@@ -1,6 +1,4 @@
name: certbot
-version: script
-version-script: cd parts/certbot/src && git describe|sed s/^v//
summary: Automatically configure HTTPS using Let's Encrypt
description: |
The objective of Certbot, Let's Encrypt, and the ACME (Automated
@@ -17,6 +15,8 @@ description: |
- Help you revoke the certificate if that ever becomes necessary.
confinement: classic
grade: devel
+base: core18
+adopt-info: certbot
apps:
certbot:
@@ -47,26 +47,31 @@ parts:
plugin: python
source: certbot
source-subdir: acme
- constraints: $SNAPCRAFT_PART_SRC/constraints.txt
+ constraints: [$SNAPCRAFT_PART_SRC/constraints.txt]
python-version: python3
certbot:
plugin: python
source: certbot
- constraints: $SNAPCRAFT_PART_SRC/constraints.txt
+ constraints: [$SNAPCRAFT_PART_SRC/constraints.txt]
python-version: python3
after: [acme]
+ override-pull: |
+ snapcraftctl pull
+ snapcraftctl set-version `cd $SNAPCRAFT_PART_SRC && git describe|sed s/^v//`
certbot-apache:
plugin: python
source: certbot
source-subdir: certbot-apache
- constraints: $SNAPCRAFT_PART_SRC/constraints.txt
+ constraints: [$SNAPCRAFT_PART_SRC/constraints.txt]
python-version: python3
after: [python-augeas, certbot]
stage-packages: [libaugeas0]
+ python-packages: ['git+https://github.com/certbot/certbot.git'] # workaround for #12
certbot-nginx:
plugin: python
source: certbot
source-subdir: certbot-nginx
- constraints: $SNAPCRAFT_PART_SRC/constraints.txt
+ constraints: [$SNAPCRAFT_PART_SRC/constraints.txt]
python-version: python3
after: [certbot]
+ python-packages: ['git+https://github.com/certbot/certbot.git'] # workaround for #12