summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorKlemens Schölhorn2017-06-19 20:19:30 +0200
committerKlemens Schölhorn2017-06-19 20:21:35 +0200
commitaf47302dd106b775269f24ffb837620b9ec88fe4 (patch)
tree4faf33e2927c8fe837faf4355c164ff05c078ba3
parente92816f526a67d744f4851814d2f0cddf67d24e2 (diff)
downloadaur-af47302dd106b775269f24ffb837620b9ec88fe4.tar.gz
Add support for python-acme 0.15.0
See https://github.com/zenhack/simp_le/pull/56.
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD11
-rw-r--r--acme_0.15.patch29
3 files changed, 40 insertions, 2 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 81eee5686e2c..e6cddb285b2a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -18,7 +18,9 @@ pkgbase = simp_le-git
provides = simp_le
conflicts = simp_le
source = simp_le::git+https://github.com/zenhack/simp_le.git
+ source = acme_0.15.patch
md5sums = SKIP
+ md5sums = 718c7d24821a24f92f7fa26401635f8c
pkgname = simp_le-git
diff --git a/PKGBUILD b/PKGBUILD
index a0f8b2fbcae0..c1e2cc7b8443 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -22,14 +22,21 @@ depends=('ca-certificates'
makedepends=('git')
provides=("${_pkgname}")
conflicts=("${_pkgname}")
-source=("${_pkgname}"::"git+https://github.com/zenhack/simp_le.git")
-md5sums=('SKIP')
+source=("${_pkgname}"::"git+https://github.com/zenhack/simp_le.git"
+ 'acme_0.15.patch')
+md5sums=('SKIP'
+ '718c7d24821a24f92f7fa26401635f8c')
pkgver() {
cd "${srcdir}/${_pkgname}"
git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
+prepare() {
+ cd "${srcdir}/${_pkgname}"
+ patch -Np1 -i "${srcdir}/acme_0.15.patch"
+}
+
package() {
cd "${srcdir}/${_pkgname}"
diff --git a/acme_0.15.patch b/acme_0.15.patch
new file mode 100644
index 000000000000..ea1574b26322
--- /dev/null
+++ b/acme_0.15.patch
@@ -0,0 +1,29 @@
+diff --git a/setup.py b/setup.py
+index 7d3a48d..a543bfb 100644
+--- a/setup.py
++++ b/setup.py
+@@ -8,7 +8,7 @@ here = os.path.abspath(os.path.dirname(__file__))
+ readme = codecs.open(os.path.join(here, 'README.rst'), encoding='utf-8').read()
+
+ install_requires = [
+- 'acme>=0.11,<0.12',
++ 'acme>=0.15,<0.16',
+ 'cryptography',
+ 'pyOpenSSL',
+ 'pytz',
+diff --git a/simp_le.py b/simp_le.py
+index 4a6e2af..ecafda8 100755
+--- a/simp_le.py
++++ b/simp_le.py
+@@ -1230,9 +1230,8 @@ def registered_client(args, existing_account_key):
+ new_reg = messages.NewRegistration.from_data(email=args.email)
+ try:
+ regr = client.register(new_reg)
+- except messages.Error as error:
+- if error.detail != 'Registration key is already in use':
+- raise
++ except acme_errors.ConflictError as error:
++ logger.debug('Client already registered: %s', error.location)
+ else:
+ if regr.terms_of_service is not None:
+ tos_hash = sha256_of_uri_contents(regr.terms_of_service)