]> git.ipfire.org Git - people/pmueller/ipfire-3.x.git/blob - cronie/cronie.nm
cronie: Update to 1.5.1
[people/pmueller/ipfire-3.x.git] / cronie / cronie.nm
1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
5
6 name = cronie
7 version = 1.5.1
8 release = 1
9
10 groups = System/Environment/Base
11 url = https://fedorahosted.org/cronie/
12 license = MIT and BSD and ISC and GPLv2
13 summary = Cron daemon for executing programs at set times
14
15 description
16 Cronie contains the standard UNIX daemon crond that runs specified programs at
17 scheduled times and related tools. It is a fork of the
18 original vixie-cron and has security and configuration enhancements like
19 the ability to use pam and SELinux.
20 end
21
22 source_dl = https://fedorahosted.org/releases/c/r/cronie/
23
24 build
25 requires
26 audit-devel
27 bison
28 libcap-devel
29 libedit-devel
30 pam-devel
31 readline-devel
32 systemd-units
33 texinfo
34 end
35
36 configure_options += \
37 --with-pam \
38 --with-audit \
39 --with-inotify \
40 --enable-anacron \
41 --enable-pie \
42 --enable-relro
43
44 test
45 # Cronie does not provide any kind of testsuite.
46 end
47
48 install_cmds
49 mkdir -pv %{BUILDROOT}%{localstatedir}/spool/{ana,}cron
50
51 mkdir -pv %{BUILDROOT}%{sysconfdir}/cron.d
52 touch %{BUILDROOT}%{sysconfdir}/cron.deny
53
54 # Install anacron
55 install -m 644 contrib/anacrontab %{BUILDROOT}%{sysconfdir}/anacrontab
56
57 mkdir -pv %{BUILDROOT}%{sysconfdir}/cron.hourly
58 install -c -m 755 contrib/0anacron %{BUILDROOT}%{sysconfdir}/cron.hourly/0anacron
59 for i in daily weekly monthly; do
60 touch %{BUILDROOT}%{localstatedir}/spool/anacron/cron.${i}
61 done
62
63 install -c -m 755 contrib/0hourly %{BUILDROOT}%{sysconfdir}/cron.d/0hourly
64 end
65 end
66
67 packages
68 package %{name}
69 requires
70 dailyjobs
71 end
72
73 # Just search for new unit files that were just installed.
74 script postin
75 systemctl daemon-reload >/dev/null 2>&1 || :
76
77 # Enable cronie on startup.
78 systemctl enable cronie.service >/dev/null 2>&1 || :
79 end
80
81 # Disable the service that is to be removed and stop it if it is still running.
82 script preun
83 systemctl --no-reload disable cronie.service >/dev/null 2>&1 || :
84 systemctl stop cronie.service >/dev/null 2>&1 || :
85 end
86
87 # Just tell systemd that unitfiles have been removed.
88 script postun
89 systemctl daemon-reload >/dev/null 2>&1 || :
90 end
91
92 # Try to restart the service if it is running.
93 script postup
94 systemctl daemon-reload >/dev/null 2>&1 || :
95 systemctl try-restart cronie.service >/dev/null 2>&1 || :
96 end
97 end
98
99 package anacron
100 summary = Utility for running regular jobs.
101 description
102 Anacron is part of cronie that is used for running jobs with regular
103 periodicity which do not have exact time of day of execution.
104
105 The default settings of anacron execute the daily, weekly, and monthly
106 jobs, but anacron allows setting arbitrary periodicity of jobs.
107
108 Using anacron allows running the periodic jobs even if the system is often
109 powered off and it also allows randomizing the time of the job execution
110 for better utilization of resources shared among multiple systems.
111 end
112 groups = System/Base Base
113
114 provides
115 dailyjobs
116 end
117
118 requires
119 cronie = %{thisver}
120 crontabs
121 end
122
123 files
124 %{sbindir}/anacron
125 %{sysconfdir}/cron.hourly/0anacron
126 %{sysconfdir}/anacrontab
127 %{localstatedir}/spool/anacron
128 %{mandir}/man*/anacron*
129 end
130
131 configfiles
132 %{sysconfdir}/anacrontab
133 end
134
135 datafiles
136 %{localstatedir}/spool/anacron/*
137 end
138 end
139
140 package %{name}-debuginfo
141 template DEBUGINFO
142 end
143 end