summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoel Kuntze2017-02-21 23:31:26 +0100
committerNoel Kuntze2017-02-21 23:31:26 +0100
commitf7a4e70a816eeec0481899f483d34c34f17746dc (patch)
treee1cfb127ae31d744879eb29b9c50387eaf2753ed
parent1a91c6aaed7979d89509c256e63b3411608d1b94 (diff)
downloadaur-f7a4e70a816eeec0481899f483d34c34f17746dc.tar.gz
Bump to 0.0.59, add glibc to dependencies, add systemd timer, unit and
tmpfile for acmetool, keep go dependencies in srcdir to not clutter the system.
-rw-r--r--.SRCINFO13
-rw-r--r--PKGBUILD42
-rw-r--r--acmetool.service21
-rw-r--r--acmetool.timer10
-rw-r--r--acmetool.tmpfile1
5 files changed, 80 insertions, 7 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 2bdce7c70e3..cc6e68e10ab 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,8 @@
# Generated by mksrcinfo v8
-# Fri Aug 26 08:57:03 UTC 2016
+# Tue Feb 21 22:29:59 UTC 2017
pkgbase = acmetool
pkgdesc = Acmetool is an easy-to-use command line tool for automatically acquiring certificates from ACME servers (such as Let's Encrypt)
- pkgver = 0.0.56
+ pkgver = 0.0.59
pkgrel = 1
url = https://github.com/hlandau/acme
arch = i686
@@ -10,6 +10,15 @@ pkgbase = acmetool
arch = armv7h
license = MIT
makedepends = go
+ depends = glibc
+ source = acmetool-0.0.59.tar.gz::https://github.com/hlandau/acme/archive/v0.0.59.tar.gz
+ source = acmetool.service
+ source = acmetool.timer
+ source = acmetool.tmpfile
+ sha256sums = c84bf2d7ab20fdc16b9047ebb3bca48c8e1282f92605fa2eba08f7963ef6c3b4
+ sha256sums = de9d31c97000445e3da4dccca404efa9c23203d5fe345befdd9926bcdb6b36e3
+ sha256sums = 82cd724853507a6d96f7a432aa44c457e76f4d6c0f1ad35142287b7c383d5c0b
+ sha256sums = ae82f90321f60f441f49227e8cc69c3bb1fc80f196bb6070b4617048adf1ca4d
pkgname = acmetool
diff --git a/PKGBUILD b/PKGBUILD
index 4c7a32f2dae..77b6eb3c206 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,19 +1,51 @@
+
# Maintainer: Mikael Eriksson <mikael_eriksson@miffe.org>
pkgname=acmetool
-pkgver=0.0.56
+pkgver=0.0.59
pkgrel=1
pkgdesc="Acmetool is an easy-to-use command line tool for automatically acquiring certificates from ACME servers (such as Let's Encrypt)"
arch=(i686 x86_64 armv7h)
url="https://github.com/hlandau/acme"
license=('MIT')
-depends=()
+depends=(glibc)
makedepends=(go)
+source=(acmetool-$pkgver.tar.gz::https://github.com/hlandau/acme/archive/v$pkgver.tar.gz
+ acmetool.service
+ acmetool.timer
+ acmetool.tmpfile
+ )
+
+sha256sums=('c84bf2d7ab20fdc16b9047ebb3bca48c8e1282f92605fa2eba08f7963ef6c3b4'
+ 'de9d31c97000445e3da4dccca404efa9c23203d5fe345befdd9926bcdb6b36e3'
+ '82cd724853507a6d96f7a432aa44c457e76f4d6c0f1ad35142287b7c383d5c0b'
+ 'ae82f90321f60f441f49227e8cc69c3bb1fc80f196bb6070b4617048adf1ca4d')
+
build() {
- GOPATH="$srcdir" go get -v -x github.com/hlandau/acme/cmd/acmetool
+ GOPATH="${srcdir}/fakegopath"
+ export GOPATH
+ mkdir -p "${GOPATH}/src/github.com/hlandau/acme/"
+ cd "${srcdir}/acme-${pkgver}"
+ for i in `find . -maxdepth 1 -type d`
+ do
+ if [ "${i}" = "." ]
+ then
+ continue
+ fi
+ cp -rf "${i}" "${GOPATH}/src/github.com/hlandau/acme/"
+ done
+ go get -v github.com/hlandau/acme/cmd/acmetool
+ cd "${GOPATH}/src/github.com/hlandau/acme/cmd/acmetool"
+ go build -pkgdir "${pkgdir}"
}
package() {
- install -Dm755 "$srcdir/bin/acmetool" "$pkgdir/usr/bin/acmetool"
-}
+ install -Dm0755 "${srcdir}/fakegopath/bin/acmetool" "${pkgdir}/usr/bin/acmetool"
+ install -Dm644 -t "${pkgdir}/usr/lib/systemd/system" \
+ ${srcdir}/acmetool.service \
+ ${srcdir}/acmetool.timer
+ install -Dm644 -t "${pkgdir}/usr/lib/tmpfiles.d" ${srcdir}/acmetool.tmpfile
+
+ install -Dm644 -t "${pkgdir}/usr/share/doc/${pkgname}" "${srcdir}/acme-${pkgver}/README.md" "${srcdir}/acme-${pkgver}/_doc/"*
+} \ No newline at end of file
diff --git a/acmetool.service b/acmetool.service
new file mode 100644
index 00000000000..90a6e8164a4
--- /dev/null
+++ b/acmetool.service
@@ -0,0 +1,21 @@
+[Unit]
+Description=Reconcile Let's Encrypt certificates
+Documentation=man:acmetool(8)
+After=nss-lookup.target
+After=apache2.service nginx.service
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/acmetool --batch reconcile
+TimeoutStartSec=5min
+CapabilityBoundingSet=CAP_CHOWN CAP_NET_BIND_SERVICE
+NoNewPrivileges=yes
+PrivateTmp=yes
+PrivateDevices=yes
+ProtectSystem=strict
+ReadWritePaths=/var/lib/acme /var/run/acme
+ProtectHome=yes
+ProtectKernelTunables=yes
+ProtectControlGroups=yes
+RestrictRealtime=yes
+RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 \ No newline at end of file
diff --git a/acmetool.timer b/acmetool.timer
new file mode 100644
index 00000000000..ff3da354a17
--- /dev/null
+++ b/acmetool.timer
@@ -0,0 +1,10 @@
+[Unit]
+Description=Reconcile Let's Encrypt certificates twice daily
+
+[Timer]
+OnCalendar=*-*-* 00,12:00:00
+RandomizedDelaySec=1h
+Persistent=yes
+
+[Install]
+WantedBy=timers.target \ No newline at end of file
diff --git a/acmetool.tmpfile b/acmetool.tmpfile
new file mode 100644
index 00000000000..4e6f6c764ab
--- /dev/null
+++ b/acmetool.tmpfile
@@ -0,0 +1 @@
+d /var/run/acme 0755 root root - - \ No newline at end of file