summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2016-06-17 02:02:31 (GMT)
committerChristian Pointner <equinox@spreadspace.org>2016-06-17 02:02:31 (GMT)
commitf41c1813063bea2a058b4724fead68cb48c431b2 (patch)
treea9cc863f9ee1b3f93d5ed1b42abd5883752e3e48
parente6c069c28f4e644eac5ba0ac8ec18058b06ded2d (diff)
new upstream release
added support for non-root setup
-rw-r--r--Makefile2
-rwxr-xr-xacmetool-init18
-rw-r--r--debian/acmetool.dirs1
-rw-r--r--debian/acmetool.install2
-rw-r--r--debian/acmetool.lintian-overrides1
-rw-r--r--debian/acmetool.postinst14
-rw-r--r--debian/acmetool.postrm6
-rw-r--r--debian/changelog6
-rw-r--r--debian/control3
-rwxr-xr-xdebian/rules3
10 files changed, 52 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index d5adf80..0c28cac 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-VERSION := 0.0.50
+VERSION := 0.0.51
DEBARCHS := amd64 i386 armhf arm64
EXECUTEABLES := $(DEBARCHS:%=bin/acmetool.%)
GITHUB_BASEURL := "https://github.com/hlandau/acme/releases/download"
diff --git a/acmetool-init b/acmetool-init
new file mode 100755
index 0000000..4f55002
--- /dev/null
+++ b/acmetool-init
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+if [[ $EUID -ne 0 ]]; then
+ echo "This needs to be run as root!" 1>&2
+ exit 1
+fi
+
+mkdir -p /usr/lib/acme/hooks
+chown acme:acme /usr/lib/acme/hooks
+
+sudo -u acme acmetool quickstart
+
+chown -R root:root /usr/lib/acme/hooks
+chmod 755 /usr/lib/acme/hooks
+
+chmod u+s /usr/lib/acme/hooks/*
+
+exit 0
diff --git a/debian/acmetool.dirs b/debian/acmetool.dirs
index e0df475..785b652 100644
--- a/debian/acmetool.dirs
+++ b/debian/acmetool.dirs
@@ -1,2 +1 @@
/usr/lib/acme
-/var/lib/acme
diff --git a/debian/acmetool.install b/debian/acmetool.install
index 404c0b1..ed66ccc 100644
--- a/debian/acmetool.install
+++ b/debian/acmetool.install
@@ -1,2 +1,4 @@
usr/bin/acmetool
+usr/bin/acmetool-init
etc/default/acme-reload
+etc/sudoers.d/acmetool
diff --git a/debian/acmetool.lintian-overrides b/debian/acmetool.lintian-overrides
index 17f7559..f1f7242 100644
--- a/debian/acmetool.lintian-overrides
+++ b/debian/acmetool.lintian-overrides
@@ -1,2 +1,3 @@
acmetool: embedded-library usr/bin/acmetool: libyaml
acmetool: statically-linked-binary usr/bin/acmetool
+acmetool: binary-without-manpage usr/bin/acmetool-init
diff --git a/debian/acmetool.postinst b/debian/acmetool.postinst
new file mode 100644
index 0000000..4e92100
--- /dev/null
+++ b/debian/acmetool.postinst
@@ -0,0 +1,14 @@
+#!/bin/sh
+# postinst script for acmetool
+
+set -e
+
+if [ "$1" = "configure" ]; then
+ adduser --quiet --system --group --home /var/lib/acme acme
+ mkdir -p /var/lib/acme
+ chmod 750 /var/lib/acme
+fi
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/acmetool.postrm b/debian/acmetool.postrm
index d6f4120..3e65bbc 100644
--- a/debian/acmetool.postrm
+++ b/debian/acmetool.postrm
@@ -5,7 +5,7 @@ set -e
if [ "$1" = "purge" ] ; then
if [ -f "/etc/cron.d/acmetool" ]; then
- rm -f /etc/cron.d/acmetool
+ rm -f "/etc/cron.d/acmetool"
if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
invoke-rc.d cron reload || true
else
@@ -13,6 +13,10 @@ if [ "$1" = "purge" ] ; then
fi
fi
+ if [ -f "/var/spool/cron/crontabs/acme" ]; then
+ rm -f "/var/spool/cron/crontabs/acme"
+ fi
+
if [ -d "/usr/lib/acme/hooks/" ]; then
for hook in /usr/lib/acme/hooks/*; do
grep -q '#!acmetool-managed!#' "$hook" && rm -f "$hook" || true
diff --git a/debian/changelog b/debian/changelog
index c384efa..0dac944 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+acmetool (0.0.51-1) unstable; urgency=medium
+
+ * New upstream release.
+
+ -- Christian Pointner <equinox@spreadspace.org> Fri, 17 Jun 2016 03:11:34 +0200
+
acmetool (0.0.50-1) unstable; urgency=medium
* New upstream release.
diff --git a/debian/control b/debian/control
index d252b3f..1689009 100644
--- a/debian/control
+++ b/debian/control
@@ -7,7 +7,8 @@ Build-Depends: debhelper (>= 9), wget, ca-certificates
Package: acmetool
Architecture: amd64 i386 armhf arm64
-Depends: ${misc:Depends}
+Depends: ${misc:Depends}, adduser
+Recommends: sudo
Description: command line tool for automatically acquiring certificates
acmetool is an easy-to-use command line tool for automatically acquiring
certificates from ACME servers (such as Let's Encrypt). Designed to flexibly
diff --git a/debian/rules b/debian/rules
index c80d624..f01d4a8 100755
--- a/debian/rules
+++ b/debian/rules
@@ -10,5 +10,8 @@ override_dh_auto_build:
override_dh_auto_install:
install -d $$(pwd)/debian/tmp/usr/bin/
install -m 755 $$(pwd)/bin/acmetool.$(DEB_BUILD_ARCH) $$(pwd)/debian/tmp/usr/bin/acmetool
+ install -m 755 $$(pwd)/acmetool-init $$(pwd)/debian/tmp/usr/bin/acmetool-init
install -d $$(pwd)/debian/tmp/etc/default/
install -m 644 $$(pwd)/acme-reload.default $$(pwd)/debian/tmp/etc/default/acme-reload
+ install -d $$(pwd)/debian/tmp/etc/sudoers.d/
+ install -m 644 $$(pwd)/acmetool.sudoers $$(pwd)/debian/tmp/etc/sudoers.d/acmetool