diff options
author | crvv | 2016-12-20 03:37:21 +0000 |
---|---|---|
committer | crvv | 2016-12-20 03:37:21 +0000 |
commit | 7e6c5458a118279df19eb913f42b5b16c382a05e (patch) | |
tree | 81cb49f68c221beee5504dd56ae2566881f811a5 | |
parent | b2a7d45ad903de5b498cb38a3df04de2886333e7 (diff) | |
download | aur-7e6c5458a118279df19eb913f42b5b16c382a05e.tar.gz |
add patch file to source and move binary to /usr/bin
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 14 | ||||
-rw-r--r-- | setcap.patch | 15 | ||||
-rw-r--r-- | systemd-unit-file.patch | 25 |
4 files changed, 37 insertions, 23 deletions
@@ -1,7 +1,7 @@ pkgbase = caddy pkgdesc = A configurable, general-purpose HTTP/2 web server for any platform pkgver = 0.9.3 - pkgrel = 6 + pkgrel = 7 url = https://caddyserver.com install = caddy.install arch = i686 @@ -9,13 +9,15 @@ pkgbase = caddy arch = armv7h arch = aarch64 license = Apache - makedepends = go>=1.6 + makedepends = go>=1.7 makedepends = git conflicts = caddy-all-features conflicts = caddy-git conflicts = caddy-full-bin source = git+https://github.com/mholt/caddy + source = systemd-unit-file.patch md5sums = SKIP + md5sums = 07575b06cc76cf5e0287d6c28f05eb05 pkgname = caddy @@ -1,21 +1,23 @@ pkgname=caddy pkgver=0.9.3 -pkgrel=6 +pkgrel=7 pkgdesc='A configurable, general-purpose HTTP/2 web server for any platform' arch=('i686' 'x86_64' 'armv7h' 'aarch64') url='https://caddyserver.com' license=('Apache') install='caddy.install' -makedepends=('go>=1.6' 'git') +makedepends=('go>=1.7' 'git') conflicts=('caddy-all-features' 'caddy-git' 'caddy-full-bin') gopkgname='github.com/mholt/caddy' -source=("git+https://github.com/mholt/caddy") -md5sums=('SKIP') +source=("git+https://github.com/mholt/caddy" + "systemd-unit-file.patch") +md5sums=('SKIP' + '07575b06cc76cf5e0287d6c28f05eb05') prepare() { cd $srcdir - patch -Np1 < ../setcap.patch + patch -Np1 < systemd-unit-file.patch export GOPATH="$srcdir/build" rm -rf "$GOPATH/src/$gopkgname" mkdir -p "$GOPATH/src/$gopkgname" @@ -33,6 +35,6 @@ build() { package() { builddir="$srcdir/build/src/github.com/mholt/caddy" - install -Dm755 "$builddir/caddy/caddy" "${pkgdir}/usr/local/bin/caddy" + install -Dm755 "$builddir/caddy/caddy" "${pkgdir}/usr/bin/caddy" install -Dm644 "$builddir/dist/init/linux-systemd/caddy.service" "${pkgdir}/usr/lib/systemd/system/caddy.service" } diff --git a/setcap.patch b/setcap.patch deleted file mode 100644 index 5f8f30e097d1..000000000000 --- a/setcap.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- a/caddy/dist/init/linux-systemd/caddy.service 2016-12-04 13:29:37.126666666 +0000 -+++ b/caddy/dist/init/linux-systemd/caddy.service 2016-12-04 13:30:25.119999999 +0000 -@@ -38,9 +38,9 @@ - ; The following additional security directives only work with systemd v229 or later. - ; They further retrict privileges that can be gained by caddy. Uncomment if you like. - ; Note that you may have to add capabilities required by any plugins in use. --;CapabilityBoundingSet=CAP_NET_BIND_SERVICE --;AmbientCapabilities=CAP_NET_BIND_SERVICE --;NoNewPrivileges=true -+CapabilityBoundingSet=CAP_NET_BIND_SERVICE -+AmbientCapabilities=CAP_NET_BIND_SERVICE -+NoNewPrivileges=true - - [Install] - WantedBy=multi-user.target diff --git a/systemd-unit-file.patch b/systemd-unit-file.patch new file mode 100644 index 000000000000..4c9292a44d54 --- /dev/null +++ b/systemd-unit-file.patch @@ -0,0 +1,25 @@ +--- a/caddy/dist/init/linux-systemd/caddy.service ++++ b/caddy/dist/init/linux-systemd/caddy.service +@@ -17,7 +17,7 @@ Group=www-data + Environment=CADDYPATH=/etc/ssl/caddy + + ; Always set "-root" to something safe in case it gets forgotten in the Caddyfile. +-ExecStart=/usr/local/bin/caddy -log stdout -agree=true -conf=/etc/caddy/Caddyfile -root=/var/tmp ++ExecStart=/usr/bin/caddy -log stdout -agree=true -conf=/etc/caddy/Caddyfile -root=/var/tmp + ExecReload=/bin/kill -USR1 $MAINPID + + ; Limit the number of file descriptors; see `man systemd.exec` for more limit settings. +@@ -40,9 +40,9 @@ ReadWriteDirectories=/etc/ssl/caddy + ; The following additional security directives only work with systemd v229 or later. + ; They further retrict privileges that can be gained by caddy. Uncomment if you like. + ; Note that you may have to add capabilities required by any plugins in use. +-;CapabilityBoundingSet=CAP_NET_BIND_SERVICE +-;AmbientCapabilities=CAP_NET_BIND_SERVICE +-;NoNewPrivileges=true ++CapabilityBoundingSet=CAP_NET_BIND_SERVICE ++AmbientCapabilities=CAP_NET_BIND_SERVICE ++NoNewPrivileges=true + + [Install] + WantedBy=multi-user.target + |