Your message dated Mon, 24 Oct 2016 01:10:14 +0000
with message-id <e1bytmi-0007fk...@franck.debian.org>
and subject line Bug#833453: fixed in python-certbot 0.9.3-1
has caused the Debian Bug report #833453,
regarding certbot: Please add systemd service and timer unit
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
833453: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=833453
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: certbot
Version: 0.8.1-2
Severity: wishlist
Tags: patch

Please add a systemd timer and service unit as replacement for cronjob
on systems using systemd.

Attached is a patch that adds these units and adds a check to the cronjob
so it only runs on non-systemd systems.

Thanks,
Daniel

-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (103, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.7.0-rc7-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
>From e0ae543b47eebfd0ac8337bb3f7794ef34f2dbe3 Mon Sep 17 00:00:00 2001
From: Daniel Schaal <daniel@schaal.email>
Date: Thu, 14 Jul 2016 06:33:12 +0200
Subject: [PATCH] Add systemd service and timer units overriding the cron.d
 file

Add a condition to cron.d/certbot to only run the cron entry
when not running under systemd
---
 debian/certbot.cron.d  |  2 +-
 debian/certbot.service |  8 ++++++++
 debian/certbot.timer   | 10 ++++++++++
 debian/control.in      |  1 +
 debian/rules           | 12 +++++++++++-
 5 files changed, 31 insertions(+), 2 deletions(-)
 create mode 100644 debian/certbot.service
 create mode 100644 debian/certbot.timer

diff --git a/debian/certbot.cron.d b/debian/certbot.cron.d
index aef16b2..dc2f28b 100644
--- a/debian/certbot.cron.d
+++ b/debian/certbot.cron.d
@@ -8,4 +8,4 @@
 SHELL=/bin/sh
 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
 
-0 */12 * * * root test -x /usr/bin/certbot && perl -e 'sleep int(rand(3600))' && certbot -q renew
+0 */12 * * * root test -x /usr/bin/certbot -a \! -d /run/systemd/system && perl -e 'sleep int(rand(3600))' && certbot -q renew
diff --git a/debian/certbot.service b/debian/certbot.service
new file mode 100644
index 0000000..256ff83
--- /dev/null
+++ b/debian/certbot.service
@@ -0,0 +1,8 @@
+[Unit]
+Description=Certbot
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/certbot -q renew
+PrivateTmp=true
+
diff --git a/debian/certbot.timer b/debian/certbot.timer
new file mode 100644
index 0000000..dfcf484
--- /dev/null
+++ b/debian/certbot.timer
@@ -0,0 +1,10 @@
+[Unit]
+Description=Run certbot twice daily
+
+[Timer]
+OnCalendar=*-*-* 00,12:00:00
+RandomizedDelaySec=3600
+Persistent=true
+
+[Install]
+WantedBy=timers.target
diff --git a/debian/control.in b/debian/control.in
index fec8664..820c44b 100644
--- a/debian/control.in
+++ b/debian/control.in
@@ -5,6 +5,7 @@ Maintainer: Debian Let's Encrypt <letsencrypt-devel@lists.alioth.debian.org>
 Uploaders: Harlan Lieberman-Berg <hlieber...@debian.org>,
            Francois Marier <franc...@debian.org>
 Build-Depends: debhelper (>= 9~),
+               dh-systemd,
                dh-python,
                dialog,
                python-acme (>= ###UPSTREAM_VERSION###~),
diff --git a/debian/rules b/debian/rules
index 4217c66..16db638 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,7 +5,7 @@ export PYBUILD_NAME = certbot
 include /usr/share/dpkg/pkg-info.mk
 
 %:
-	dh $@ --with python2,sphinxdoc --buildsystem=pybuild
+	dh $@ --with python2,sphinxdoc,systemd --buildsystem=pybuild
 
 override_dh_clean: debian/control
 	dh_clean
@@ -13,6 +13,14 @@ override_dh_clean: debian/control
 debian/control: debian/control.in debian/changelog
 	sed -e 's/###UPSTREAM_VERSION###/$(DEB_VERSION_UPSTREAM)/g' < debian/control.in > debian/control
 
+override_dh_systemd_enable:
+	dh_systemd_enable --package=certbot certbot.timer
+
+override_dh_systemd_start:
+	dh_systemd_start --package=certbot certbot.timer
+
+override_dh_installinit:
+
 override_dh_install:
 	mkdir -p debian/certbot/usr/bin
 	mv debian/python-certbot/usr/bin/* debian/certbot/usr/bin
@@ -24,3 +32,5 @@ override_dh_install:
 		http_proxy='127.0.0.1:9' \
 		sphinx-build -N -bman docs/ build/man
 	chmod -x debian/python-certbot/usr/lib/python2.7/dist-packages/certbot/tests/testdata/sample-renewal*.conf
+
+	install -D --mode=644 --target-directory=debian/certbot/lib/systemd/system debian/certbot.timer
-- 
2.8.1


--- End Message ---
--- Begin Message ---
Source: python-certbot
Source-Version: 0.9.3-1

We believe that the bug you reported is fixed in the latest version of
python-certbot, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 833...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Harlan Lieberman-Berg <hlieber...@debian.org> (supplier of updated 
python-certbot package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Sat, 22 Oct 2016 22:03:06 -0400
Source: python-certbot
Binary: python-certbot certbot python-certbot-doc letsencrypt
Architecture: source
Version: 0.9.3-1
Distribution: unstable
Urgency: medium
Maintainer: Debian Let's Encrypt <letsencrypt-devel@lists.alioth.debian.org>
Changed-By: Harlan Lieberman-Berg <hlieber...@debian.org>
Closes: 833453 840995
Description: 
 certbot    - automatically configure HTTPS using Let's Encrypt
 letsencrypt - transitional dummy package
 python-certbot-doc - client documentation for certbot
 python-certbot - main library for certbot
Changes:
 python-certbot (0.9.3-1) unstable; urgency=medium
 .
   * New upstream version. (Closes: #840995)
   * Add python-psutil to Recommends.
   * Refresh patches.
   * Add support for systemd timers (Closes: #833453)
   * Add Documentation to systemd unit service
Checksums-Sha1: 
 716b6d81ac1f09b4ee738c5eae1f03217bc922f4 2884 python-certbot_0.9.3-1.dsc
 0fabcc33ebc54eabf9cef409e1cce115000c17c6 219893 
python-certbot_0.9.3.orig.tar.gz
 9249335c65404e0f09d4f2cd3790d5529733c391 8636 
python-certbot_0.9.3-1.debian.tar.xz
Checksums-Sha256: 
 8f3dea70ec192ae3905a9098f6264ba31fc1f6e5a0edbe27896a60a43501b07a 2884 
python-certbot_0.9.3-1.dsc
 68149cb8392b29f5d5246e7226d25f913f2b10482bf3bc7368e8c8821d25f3b0 219893 
python-certbot_0.9.3.orig.tar.gz
 af05cdbad7c89a22b3c79676a15a1b96d9f24ebb35791dbbb73c73ba4069269f 8636 
python-certbot_0.9.3-1.debian.tar.xz
Files: 
 9c506a37ef17107e708e2679800aa184 2884 python extra python-certbot_0.9.3-1.dsc
 df58b67f37d3c4ef5126de4ed45c1cea 219893 python extra 
python-certbot_0.9.3.orig.tar.gz
 7fd14957f295216af1fa5717c14ac9a5 8636 python extra 
python-certbot_0.9.3-1.debian.tar.xz

-----BEGIN PGP SIGNATURE-----

iQKTBAEBCgB9BQJYDUrAXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQwQjhGRTA3NDJENTI3OURDNjU1MEUyODk4
NTQwOUVFNEI5OUY4OTYxFhxobGllYmVybWFuQGRlYmlhbi5vcmcACgkQhUCe5Lmf
iWGI0g//f9hYuakc1zvR4lZkXy6AZOwQM/hsHCCHPSDIu1WjHoVOeeCYc/8eQazb
hZVnJRISPPW7m1xJPjmJD3IzyvCvbCrsIe+0pgIciirfCSGsZ/R1fUe6U44b+RK5
OPjSXT6adYjsdSpL/eMcYut5PNalsF1jS8Q96C6lgVUr0e+gyePEB/fQy0Ysheqk
mr80dWyINso9VVMnXvqEWzphfuksf6Mg2ZuKjksw/xrThIy8gjhvzzpA/6nJDF20
JTKio2TdPoi/ZmX+RXq42bHpUu6gfukea/YYrReiJLih0q26k9QmXW/agb982hXb
M8YRP7UtNUCDJ0NSE3q5sytd8ZiKfQhK0v5VImF50JpoH0titsEGF+k2T0JyVB9b
d36ZlvWX04euvCt7nlV5La7ODysmOdUTYVuspfQWLUHGIV3d73JAnENA0Jza889Y
piJ0AZJjgAJlUmJPn+JGwNGw8MWkwEDJkrSFycQMpBXrmLmDkzvPa0tErdnG4LYV
0lkOGOHZCDtVJTQHy1ACphU33ZiXhoTok3zOuKHJzZn/uarp8wXtneVdkWJAxOXI
fckJSN9k5i1WG7H8GBj9FcTcVrw6WdIBoETcgiZmWStP3HuJqKCfM+L8cgjXP4GN
phJYxLIEDg9Q63ZikZ1RUv9jfL9bVBtUKcx1SBzm4Sz7yQBW580=
=+5n7
-----END PGP SIGNATURE-----

--- End Message ---
_______________________________________________
Letsencrypt-devel mailing list
Letsencrypt-devel@lists.alioth.debian.org
https://lists.alioth.debian.org/mailman/listinfo/letsencrypt-devel

Reply via email to