From 857ace875ec8a1653968464dc4ac65f7fc3571ea Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Sat, 14 Feb 2015 15:24:09 +0100 Subject: [PATCH] cronie: enable anacron support. Closes #969. Patch from @nmeum with minor changes. --- srcpkgs/cronie/files/crontab | 10 ---------- srcpkgs/cronie/template | 17 +++++++++++------ 2 files changed, 11 insertions(+), 16 deletions(-) delete mode 100644 srcpkgs/cronie/files/crontab diff --git a/srcpkgs/cronie/files/crontab b/srcpkgs/cronie/files/crontab deleted file mode 100644 index 836c12de0b..0000000000 --- a/srcpkgs/cronie/files/crontab +++ /dev/null @@ -1,10 +0,0 @@ -SHELL=/bin/sh -PATH=/usr/sbin:/usr/bin -MAILTO="" -HOME=/ - -# run-parts -01 * * * * root run-parts /etc/cron.hourly -02 4 * * * root run-parts /etc/cron.daily -22 4 * * 0 root run-parts /etc/cron.weekly -42 4 1 * * root run-parts /etc/cron.monthly diff --git a/srcpkgs/cronie/template b/srcpkgs/cronie/template index b7ba2e1344..67372478cf 100644 --- a/srcpkgs/cronie/template +++ b/srcpkgs/cronie/template @@ -1,10 +1,10 @@ # Template file for 'cronie' pkgname=cronie version=1.4.12 -revision=3 +revision=4 build_style=gnu-configure configure_args="--with-inotify --without-selinux --with-pam - --disable-anacron --localstatedir=/var --enable-pie --enable-relro" + --enable-anacron --localstatedir=/var --enable-pie --enable-relro" makedepends="pam-devel" depends="run-parts" make_dirs=" @@ -13,9 +13,9 @@ make_dirs=" /etc/cron.daily 0755 root root /etc/cron.weekly 0755 root root /etc/cron.monthly 0755 root root - /etc/cron.yearly 0755 root root - /var/spool/cron 0755 root root" -conf_files="/etc/crontab /etc/pam.d/crond /etc/cron.deny" + /var/spool/cron 0755 root root + /var/spool/anacron 0755 root root" +conf_files="/etc/anacrontab /etc/pam.d/crond /etc/cron.deny" replaces="cron-daemon>=0" provides="cron-daemon-0_1" short_desc="Runs specified programs at scheduled times" @@ -33,12 +33,17 @@ post_install() { vinstall ${FILESDIR}/cronie.service 644 usr/lib/systemd/system fi vsv cronie - vinstall ${FILESDIR}/crontab 644 etc vinstall ${FILESDIR}/crond.pam 644 etc/pam.d crond # Add /etc/cron.deny empty, to allow all users. touch ${DESTDIR}/etc/cron.deny chmod 644 ${DESTDIR}/etc/cron.deny + + # Install anacron related files + vinstall contrib/anacrontab 644 etc + vinstall contrib/0hourly 644 etc/cron.d + vinstall contrib/0anacron 755 etc/cron.hourly + # crontab must be setuid chmod u+s ${DESTDIR}/usr/bin/crontab }