Snap plugin

* snap: move snapcraft.yaml to snap directory

Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com>

* snap: use a local plugin to get around the delivered plugin

Add a plugin to the project which behaves as expected until a version
of snapcraft satisfies the project needs.

Additional snapcraft.yaml changes were made to accommodate for the snap
to build.

Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com>

* snap: compile pycache in the last step for the last part

Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com>
This commit is contained in:
Sergio Schvezov
2020-04-21 16:36:49 -07:00
committed by Brad Warren
parent b69f5588f4
commit 193b44a0fa
2 changed files with 517 additions and 8 deletions
-77
View File
@@ -1,77 +0,0 @@
name: certbot
summary: Automatically configure HTTPS using Let's Encrypt
description: |
The objective of Certbot, Let's Encrypt, and the ACME (Automated
Certificate Management Environment) protocol is to make it possible
to set up an HTTPS server and have it automatically obtain a
browser-trusted certificate, without any human intervention. This is
accomplished by running a certificate management agent on the web
server.
This agent is used to:
- Automatically prove to the Let's Encrypt CA that you control the website
- Obtain a browser-trusted certificate and set it up on your web server
- Keep track of when your certificate is going to expire, and renew it
- Help you revoke the certificate if that ever becomes necessary.
confinement: classic
grade: devel
base: core18
adopt-info: certbot
apps:
certbot:
command: certbot
environment:
PATH: "$SNAP/bin:$SNAP/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
AUGEAS_LENS_LIB: "$SNAP/usr/share/augeas/lenses/dist"
LD_LIBRARY_PATH: "$SNAP/usr/lib/x86_64-linux-gnu/:$LD_LIBRARY_PATH"
renew:
command: certbot -q renew
daemon: oneshot
environment:
PATH: "$SNAP/bin:$SNAP/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
AUGEAS_LENS_LIB: $SNAP/usr/share/augeas/lenses/dist
LD_LIBRARY_PATH: "$SNAP/usr/lib/x86_64-linux-gnu/:$LD_LIBRARY_PATH"
passthrough:
# Run approximately twice a day with randomization
timer: 00:00~24:00/2
parts:
python-augeas:
plugin: python
source: git://github.com/basak/python-augeas
source-branch: snap
python-version: python3
build-packages: [libaugeas-dev]
acme:
plugin: python
source: certbot
source-subdir: acme
constraints: [$SNAPCRAFT_PART_SRC/constraints.txt]
python-version: python3
certbot:
plugin: python
source: certbot
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]
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]
python-version: python3
after: [certbot]
python-packages: ['git+https://github.com/certbot/certbot.git'] # workaround for #12