1
0
mirror of https://github.com/certbot/certbot.git synced 2026-01-26 07:41:33 +03:00

Fix finding Augeas in the ARM snaps (#8230)

* Find Augeas on all architectures.

* Add changelog entry.

* add comment
This commit is contained in:
Brad Warren
2020-08-26 14:03:15 -07:00
committed by GitHub
parent 2a047eb526
commit e8518bf206
3 changed files with 35 additions and 5 deletions

View File

@@ -1,5 +1,36 @@
#!/bin/bash
set -e
# This code is based on snapcraft's own patch to work around this problem at
# https://github.com/snapcore/snapcraft/blob/a97fb5c7ea553a1bd20f4887a7c3393e75761890/patches/ctypes_init.diff.
# We may not build the Certbot snap for all of these architectures (and as of
# writing this we do not), but we keep the code for them to avoid having to
# solve this problem again in the future if we add support for new
# architectures.
case "${SNAP_ARCH}" in
'arm64')
ARCH_TRIPLET='aarch64-linux-gnu';;
'armhf')
ARCH_TRIPLET='arm-linux-gnueabihf';;
'i386')
ARCH_TRIPLET='i386-linux-gnu';;
'ppc64el')
ARCH_TRIPLET='powerpc64le-linux-gnu';;
'powerpc')
ARCH_TRIPLET='powerpc-linux-gnu';;
'amd64')
ARCH_TRIPLET='x86_64-linux-gnu';;
's390x')
ARCH_TRIPLET='s390x-linux-gnu';;
*)
echo "Unrecongized value of SNAP_ARCH: ${SNAP_ARCH}" >&2
exit 1
esac
PARTIAL_LIBRARY_PATH="${SNAP}/usr/lib/${ARCH_TRIPLET}/"
export LD_LIBRARY_PATH="${PARTIAL_LIBRARY_PATH}:${LD_LIBRARY_PATH}"
export CERTBOT_AUGEAS_PATH="${PARTIAL_LIBRARY_PATH}libaugeas.so.0"
join() {
sep=$1
first=$2

View File

@@ -14,7 +14,8 @@ Certbot adheres to [Semantic Versioning](https://semver.org/).
### Fixed
*
* The problem causing the Apache plugin in the Certbot snap on ARM systems to
fail to load the Augeas library it depends on has been fixed.
More details about these changes can be found on our GitHub repo.

View File

@@ -24,7 +24,6 @@ apps:
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"
CERTBOT_SNAPPED: "True"
renew:
command: certbot.wrapper -q renew
@@ -32,7 +31,6 @@ apps:
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"
CERTBOT_SNAPPED: "True"
# Run approximately twice a day with randomization
timer: 00:00~24:00/2
@@ -44,7 +42,7 @@ parts:
source: .
constraints: [$SNAPCRAFT_PART_SRC/snap-constraints.txt]
python-packages:
- git+https://github.com/basak/python-augeas.git@snap
- git+https://github.com/certbot/python-augeas.git@certbot-patched
- ./acme
- ./certbot
- ./certbot-apache
@@ -54,7 +52,7 @@ parts:
# Old versions of this file used to unstage
# lib/python3.8/site-packages/augeas.py to avoid conflicts between
# python-augeas 0.5.0 which was pinned in snap-constraints.txt and
# Robie's python-augeas fork which creates an auto-generated cffi file at
# our python-augeas fork which creates an auto-generated cffi file at
# the same path. Since we've combined things in one part and removed the
# python-augeas pinning, unstaging this file had a different, unintended
# effect so we now stage the file to keep the auto-generated cffi file.