aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2019-10-14 19:12:53 +0200
committerJakub Jirutka <jakub@jirutka.cz>2019-10-14 19:13:09 +0200
commit77f0d24aa2581de1bd660f179a7e5fa8d554ed32 (patch)
treeb3ce4bd7b3493dcb61b26229b3a6e2f623e4e2bc
parentc1996f126a9c460fb24e16e3df1400d92107a9df (diff)
downloadaports-77f0d24aa2581de1bd660f179a7e5fa8d554ed32.tar.gz
aports-77f0d24aa2581de1bd660f179a7e5fa8d554ed32.tar.bz2
aports-77f0d24aa2581de1bd660f179a7e5fa8d554ed32.tar.xz
community/uacme: backport patch fixing uacme.sh
-rw-r--r--community/uacme/APKBUILD9
-rw-r--r--community/uacme/fix-uacme.sh.patch75
2 files changed, 81 insertions, 3 deletions
diff --git a/community/uacme/APKBUILD b/community/uacme/APKBUILD
index f50ed1ee48..0ec4595798 100644
--- a/community/uacme/APKBUILD
+++ b/community/uacme/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Eivind Uggedal <eu@eju.no>
pkgname=uacme
pkgver=1.0.20
-pkgrel=0
+pkgrel=1
pkgdesc="Lightweight client for the RFC8555 ACMEv2 protocol"
url="https://github.com/ndilieto/uacme"
arch="all"
@@ -10,7 +10,9 @@ license="GPL-3.0-or-later ISC MIT"
makedepends="openssl-dev curl-dev asciidoc"
subpackages="$pkgname-doc"
options="!check" # no test suite
-source="uacme-$pkgver.tar.gz::https://github.com/ndilieto/uacme/archive/v$pkgver.tar.gz"
+source="uacme-$pkgver.tar.gz::https://github.com/ndilieto/uacme/archive/v$pkgver.tar.gz
+ fix-uacme.sh.patch
+ "
build() {
./configure \
@@ -29,4 +31,5 @@ package() {
make DESTDIR="$pkgdir" install
}
-sha512sums="ef93a6fc49c8761cacdd306acda1162281d603efe6970c634d1b92d2a672cc9e8302913e016a99bd7b81972ad8b40776e579dd6da9f7be97d840f2b2de61d866 uacme-1.0.20.tar.gz"
+sha512sums="ef93a6fc49c8761cacdd306acda1162281d603efe6970c634d1b92d2a672cc9e8302913e016a99bd7b81972ad8b40776e579dd6da9f7be97d840f2b2de61d866 uacme-1.0.20.tar.gz
+fec5195296cbd0780987f9768ba3db2acb1c0622a2d801a58f254d4aca39cd39a0be1ac9d4b21757b076a62934bcb4c9f00aa8c2406569fd4efe8aeb253ec28c fix-uacme.sh.patch"
diff --git a/community/uacme/fix-uacme.sh.patch b/community/uacme/fix-uacme.sh.patch
new file mode 100644
index 0000000000..e976c8bbce
--- /dev/null
+++ b/community/uacme/fix-uacme.sh.patch
@@ -0,0 +1,75 @@
+From 52861eab5de20af3d4a0838d7f44af5113a79f23 Mon Sep 17 00:00:00 2001
+From: Jakub Jirutka <jakub@jirutka.cz>
+Date: Mon, 14 Oct 2019 18:43:49 +0200
+Subject: [PATCH 1/2] Fix default value of CHALLENGE_PATH variable in uacme.sh
+
+Single quotes don't work inside parameter expansion as in other places.
+They are not stripped during expansion but become part of the value.
+Thus this will result in:
+
+ CHALLENGE_PATH="'/var/www/.well-known/acme-challenge'"
+
+Since the default path doesn't contain any spaces, it's not needed to
+quote it at all.
+
+This bug was introduced in 8f8b9faddcae58ba250923bfc2febf6229a6ef21.
+
+Patch-Source: https://github.com/ndilieto/uacme/pull/12
+---
+ uacme.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/uacme.sh b/uacme.sh
+index fbcea8d..0a1ff8d 100755
+--- a/uacme.sh
++++ b/uacme.sh
+@@ -16,7 +16,7 @@
+ # You should have received a copy of the GNU General Public License
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+-CHALLENGE_PATH="${UACME_CHALLENGE_PATH:-'/var/www/.well-known/acme-challenge'}"
++CHALLENGE_PATH="${UACME_CHALLENGE_PATH:-/var/www/.well-known/acme-challenge}"
+ ARGS=5
+ E_BADARGS=85
+
+
+From 82cca7aa9fe3b7a016ef31d97f4799f87bba4bfb Mon Sep 17 00:00:00 2001
+From: Jakub Jirutka <jakub@jirutka.cz>
+Date: Mon, 14 Oct 2019 19:06:15 +0200
+Subject: [PATCH 2/2] Quote variables that may contain spaces
+
+---
+ uacme.sh | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/uacme.sh b/uacme.sh
+index 0a1ff8d..e3cfdbc 100755
+--- a/uacme.sh
++++ b/uacme.sh
+@@ -22,7 +22,7 @@ E_BADARGS=85
+
+ if test $# -ne "$ARGS"
+ then
+- echo "Usage: `basename $0` method type ident token auth" 1>&2
++ echo "Usage: $(basename "$0") method type ident token auth" 1>&2
+ exit $E_BADARGS
+ fi
+
+@@ -36,7 +36,7 @@ case "$METHOD" in
+ "begin")
+ case "$TYPE" in
+ http-01)
+- echo -n "${AUTH}" > ${CHALLENGE_PATH}/${TOKEN}
++ echo -n "${AUTH}" > "${CHALLENGE_PATH}/${TOKEN}"
+ exit $?
+ ;;
+ *)
+@@ -48,7 +48,7 @@ case "$METHOD" in
+ "done"|"failed")
+ case "$TYPE" in
+ http-01)
+- rm ${CHALLENGE_PATH}/${TOKEN}
++ rm "${CHALLENGE_PATH}/${TOKEN}"
+ exit $?
+ ;;
+ *)