Subject: [PATCH v3] community/caddy: upgrade v2.1.1

From: Alex McGrath <[email-masked]>
Date: Sat, 11 Jul 2020 18:17:57 +0100

From: Linux User <[email-masked]>

---
I'm really sorry, I messed it up a second time and didnt commit

 community/caddy/APKBUILD    | 8 ++++----
 community/caddy/caddy.confd | 3 ++-
 community/caddy/caddy.initd | 2 +-
 3 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/community/caddy/APKBUILD b/community/caddy/APKBUILD
index 6b7b028ce8..e18f262cbf 100644
--- a/community/caddy/APKBUILD
+++ b/community/caddy/APKBUILD
@@ -1,8 +1,8 @@
 # Contributor: Carlo Landmeter <[email-masked]>
 # Maintainer: Chloe Kudryavtsev <[email-masked]>
 pkgname=caddy
-pkgver=1.0.4
-pkgrel=3
+pkgver=2.1.1
+pkgrel=0
 pkgdesc="Fast, cross-platform HTTP/2 web server with automatic HTTPS"
 url="https://caddyserver.com/"
 arch="all !s390x"
@@ -37,7 +37,7 @@ prepare() {
 build() {
 	GO111MODULE=on go build -v -o bin/caddy -ldflags \
 		"-X github.com/mholt/caddy/caddy/caddymain.gitTag=$pkgver" \
-		./caddy
+		./cmd/caddy
 }
 
 check() {
@@ -71,7 +71,7 @@ cleanup_srcdir() {
 	default_cleanup_srcdir
 }
 
-sha512sums="49dae9c0965000ba1cf36a6148ff78718383a511d671fb73edc3b08e4219db0a9902fc70e40bcbb13ffa7afaa520fd1e6303ea3776059de04085896c018d9c02  caddy-1.0.4.tar.gz
+sha512sums="4359935f4267ada37e0ab2f3c3daeb30cb1853b03a11f988e0f25716ba385d90237d76334b66a66f914bc21b3b36bbc5112e572f17a9453a865c088013ad4ca6  caddy-2.1.1.tar.gz
 1fbab66fbc913f194a94eee6e60e218fcc762b9467258ff22eed43dc98664692f2f2525226068fe3ca101cfe5b6727f16774c2a49c575abb83782416680f399a  caddy.initd
 7808688e92ab9950403a9b8ad29777f5bd0f75aa8cccc1d49958bb1e5af1b972dfba0c6d31931354f702a3a13933d0a1b8f28b82eed263773d71b79ec95cc15c  caddy.confd
 c24805d17234e6cf40fe1dd102c03f05cf6129d43f58f5567d540a0e4400ce89994820bb0e317f611c65459ae26bcf7110e23a8fecaae11ca78a561892b45d75  caddy.conf"
diff --git a/community/caddy/caddy.confd b/community/caddy/caddy.confd
index 1c17719c61..bfefad6c03 100644
--- a/community/caddy/caddy.confd
+++ b/community/caddy/caddy.confd
@@ -1,2 +1,3 @@
 # caddy options file
-CADDY_OPTS="-conf /etc/caddy/caddy.conf -agree"
+CADDY_CONFIG="/etc/caddy/caddy.conf"
+CADDY_OPTS="run -config $CADDY_CONFIG" 
diff --git a/community/caddy/caddy.initd b/community/caddy/caddy.initd
index 8e4dae22da..d0cd12c524 100644
--- a/community/caddy/caddy.initd
+++ b/community/caddy/caddy.initd
@@ -15,7 +15,7 @@ depend() {
 
 checkconfig() {
 	ebegin "Checking configuration for $RC_SVCNAME"
-	su -s /bin/sh ${command_user%:*} -c "$command $command_args -validate"
+	su -s /bin/sh ${command_user%:*} -c "$command validate -config $CADDY_CONFIG"
 	eend $?
 }
 
-- 
2.27.0

---

From: Kevin Daudt <[email-masked]>
Date: Sat, 11 Jul 2020 19:40:53 +0200

> +++ b/community/caddy/APKBUILD

Hello Alex,

You forgot to update the checksums for the initd / confd files. I'll
squash the following in:

diff --git a/community/caddy/APKBUILD b/community/caddy/APKBUILD
index e18f262cbf..78e13d907b 100644
--- a/community/caddy/APKBUILD
+++ b/community/caddy/APKBUILD
@@ -72,6 +72,6 @@ cleanup_srcdir() {
 }

 sha512sums="4359935f4267ada37e0ab2f3c3daeb30cb1853b03a11f988e0f25716ba385d90237d76334b66a66f914bc21b3b36bbc5112e572f17a9453a865c088013ad4ca6  caddy-2.1.1.tar.gz
-1fbab66fbc913f194a94eee6e60e218fcc762b9467258ff22eed43dc98664692f2f2525226068fe3ca101cfe5b6727f16774c2a49c575abb83782416680f399a  caddy.initd
-7808688e92ab9950403a9b8ad29777f5bd0f75aa8cccc1d49958bb1e5af1b972dfba0c6d31931354f702a3a13933d0a1b8f28b82eed263773d71b79ec95cc15c  caddy.confd
+6a82474c21a897a5779db42040e90495ae1a5e6fb94707f8be7442f27bf0a9fc6d7a8bc8c9f389e6f8550bda74ee2d9db363b2b546bdf1c1d2761126e8c7ef5b  caddy.initd
+e476910971f36bcd096b9727b46a6b7931a4f0141d77efe574d42b448810702ccc4cce21f2ccc771bc0433e2142422bb8d64b9efb08121fe3ea50dc79d93e29c  caddy.confd
 c24805d17234e6cf40fe1dd102c03f05cf6129d43f58f5567d540a0e4400ce89994820bb0e317f611c65459ae26bcf7110e23a8fecaae11ca78a561892b45d75  caddy.conf"

Here you can follow the CI pipelines:

https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/10226/pipelines

Kind regards, Kevin