###############################################################################
name = cronie
-version = 1.4.8
+version = 1.4.9
release = 1
groups = System/Environment/Base
libselinux-devel
pam-devel
readline-devel
+ systemd-units
texinfo
end
configure_options += \
--with-pam \
--with-audit \
- --with-selinux
+ --with-selinux \
+ --with-inotify \
+ --enable-anacron \
+ --enable-pie \
+ --enable-relro
install_cmds
- mkdir -pv %{BUILDROOT}%{localstatedir}/spool/cron
+ mkdir -pv %{BUILDROOT}%{localstatedir}/spool/{ana,}cron
+
+ mkdir -pv %{BUILDROOT}%{sysconfdir}/cron.d
+ touch %{BUILDROOT}%{sysconfdir}/cron.deny
+
+ # Install anacron
+ install -m 644 contrib/anacrontab %{BUILDROOT}%{sysconfdir}/anacrontab
+
+ mkdir -pv %{BUILDROOT}%{sysconfdir}/cron.hourly
+ install -c -m 755 contrib/0anacron %{BUILDROOT}%{sysconfdir}/cron.hourly/0anacron
+ for i in daily weekly monthly; do
+ touch %{BUILDROOT}%{localstatedir}/spool/anacron/cron.${i}
+ done
+
+ install -c -m 755 contrib/0hourly %{BUILDROOT}%{sysconfdir}/cron.d/0hourly
end
end
packages
package %{name}
+ requires
+ dailyjobs
+ end
+
# Just search for new unit files that were just installed.
script postin
systemctl daemon-reload >/dev/null 2>&1 || :
end
end
+ package anacron
+ summary = Utility for running regular jobs.
+ description
+ Anacron is part of cronie that is used for running jobs with regular
+ periodicity which do not have exact time of day of execution.
+
+ The default settings of anacron execute the daily, weekly, and monthly
+ jobs, but anacron allows setting arbitrary periodicity of jobs.
+
+ Using anacron allows running the periodic jobs even if the system is often
+ powered off and it also allows randomizing the time of the job execution
+ for better utilization of resources shared among multiple systems.
+ end
+ groups = System/Base Base
+
+ provides
+ dailyjobs
+ end
+
+ requires
+ cronie = %{thisver}
+ crontabs
+ end
+
+ files
+ %{sbindir}/anacron
+ %{sysconfdir}/cron.hourly/0anacron
+ %{sysconfdir}/anacrontab
+ %{localstatedir}/spool/anacron
+ %{mandir}/man*/anacron*
+ end
+
+ configfiles
+ %{sysconfdir}/anacrontab
+ end
+
+ datafiles
+ %{localstatedir}/spool/anacron/*
+ end
+ end
+
package %{name}-debuginfo
template DEBUGINFO
end
--- /dev/null
+From 5ac31751adfa31c5e5e316afc2f800037bd1cdca Mon Sep 17 00:00:00 2001
+From: Tomas Mraz <tmraz@fedoraproject.org>
+Date: Thu, 6 Jun 2013 20:13:26 +0200
+Subject: [PATCH] Do not use putenv with string literal.
+
+---
+ src/cron.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/cron.c b/src/cron.c
+index 9974887..08d0812 100644
+--- a/src/cron.c
++++ b/src/cron.c
+@@ -244,8 +244,8 @@ int main(int argc, char *argv[]) {
+ check_spool_dir();
+
+ if (ChangePath) {
+- if (putenv("PATH=" _PATH_DEFPATH) < 0) {
+- log_it("CRON", pid, "DEATH", "can't putenv PATH",
++ if (setenv("PATH", _PATH_DEFPATH, 1) < 0) {
++ log_it("CRON", pid, "DEATH", "can't setenv PATH",
+ errno);
+ exit(1);
+ }
+--
+1.7.7.6
+