Bug#864315: unblock: anacron/2.3-24
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock
Please unblock package anacron.
It fixes RC bug #744753.
>From the changelog:
anacron (2.3-24) unstable; urgency=medium
* Team upload.
* Reference anacron and anacrontab man page in anacron.service
* Use native systemd timer unit to trigger anacron periodically.
When running under systemd, use a native timer unit which triggers
anacron.service every hour. If the system was suspended for more then
one hour, the timer will activate immediately on resume. The timer uses
a randomized delay of up to 5 minutes. This helps with not overloading
the system when coming out of suspend.
Drop anacron-resume.service, as this service is no longer necessary.
(Closes: #744753)
-- Michael Biebl <biebl@debian.org> Mon, 29 May 2017 18:36:12 +0200
Full debdiff is attached.
Regards,
Michael
unblock anacron/2.3-24
-- System Information:
Debian Release: 9.0
APT prefers unstable
APT policy: (500, 'unstable'), (200, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.9.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8), LANGUAGE=de_DE.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
diff --git a/debian/anacron.anacron-resume.service b/debian/anacron.anacron-resume.service
deleted file mode 100644
index 21b840a..0000000
--- a/debian/anacron.anacron-resume.service
+++ /dev/null
@@ -1,14 +0,0 @@
-[Unit]
-Description=Run anacron jobs at resume
-After=suspend.target
-After=hibernate.target
-After=hybrid-sleep.target
-
-[Service]
-ExecStart=/bin/systemctl --no-block --fail start anacron.service
-
-[Install]
-WantedBy=suspend.target
-WantedBy=hibernate.target
-WantedBy=hybrid-sleep.target
-
diff --git a/debian/anacron.preinst b/debian/anacron.preinst
new file mode 100644
index 0000000..603d3b4
--- /dev/null
+++ b/debian/anacron.preinst
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+set -e
+
+if dpkg --compare-versions "$2" lt-nl 2.3-24; then
+ deb-systemd-helper purge anacron-resume.service >/dev/null
+ deb-systemd-helper unmask anacron-resume.service >/dev/null
+fi
+
+#DEBHELPER#
diff --git a/debian/anacron.service b/debian/anacron.service
index 77af569..46450c3 100644
--- a/debian/anacron.service
+++ b/debian/anacron.service
@@ -2,6 +2,7 @@
Description=Run anacron jobs
After=time-sync.target
ConditionACPower=true
+Documentation=man:anacron man:anacrontab
[Service]
ExecStart=/usr/sbin/anacron -dsq
diff --git a/debian/anacron.timer b/debian/anacron.timer
new file mode 100644
index 0000000..8a04eb4
--- /dev/null
+++ b/debian/anacron.timer
@@ -0,0 +1,10 @@
+[Unit]
+Description=Trigger anacron every hour
+
+[Timer]
+OnCalendar=hourly
+RandomizedDelaySec=5m
+Persistent=true
+
+[Install]
+WantedBy=timers.target
diff --git a/debian/changelog b/debian/changelog
index 997e12e..f223e76 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,18 @@
+anacron (2.3-24) unstable; urgency=medium
+
+ * Team upload.
+ * Reference anacron and anacrontab man page in anacron.service
+ * Use native systemd timer unit to trigger anacron periodically.
+ When running under systemd, use a native timer unit which triggers
+ anacron.service every hour. If the system was suspended for more then
+ one hour, the timer will activate immediately on resume. The timer uses
+ a randomized delay of up to 5 minutes. This helps with not overloading
+ the system when coming out of suspend.
+ Drop anacron-resume.service, as this service is no longer necessary.
+ (Closes: #744753)
+
+ -- Michael Biebl <biebl@debian.org> Mon, 29 May 2017 18:36:12 +0200
+
anacron (2.3-23) unstable; urgency=medium
* Team upload.
diff --git a/debian/cron.d b/debian/cron.d
index 1691ffe..505b5c7 100644
--- a/debian/cron.d
+++ b/debian/cron.d
@@ -3,4 +3,4 @@
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
-30 7 * * * root test -x /etc/init.d/anacron && /usr/sbin/invoke-rc.d anacron start >/dev/null
+30 7 * * * root [ -x /etc/init.d/anacron ] && if [ ! -d /run/systemd/system ]; then /usr/sbin/invoke-rc.d anacron start >/dev/null; fi
diff --git a/debian/rules b/debian/rules
index 0f161df..5d44cc4 100755
--- a/debian/rules
+++ b/debian/rules
@@ -18,14 +18,11 @@ override_dh_auto_install:
install -D -m 755 debian/apm.d debian/anacron/etc/apm/event.d/anacron
install -D -m 755 debian/pm-utils.power.d debian/anacron/usr/lib/pm-utils/power.d/anacron
install -D -m 755 debian/pm-utils.sleep.d debian/anacron/usr/lib/pm-utils/sleep.d/95anacron
+ install -D -m 644 debian/anacron.timer debian/anacron/lib/systemd/system/anacron.timer
override_dh_installcron:
dh_installcron
dh_installcron --name=0anacron
-override_dh_systemd_enable:
- dh_systemd_enable anacron.service
- dh_systemd_enable --name anacron-resume
-
override_dh_installinit:
dh_installinit --no-start
Reply to: