2 # - write missing files
3 Summary: A periodical command scheduler which aims at replacing Vixie Cron
4 Summary(pl): Serwer okresowego uruchamiania poleceñ zastepuj±cy Vixie Crona
10 Source0: http://fcron.free.fr/archives/%{name}-%{version}.src.tar.gz
11 # Source0-md5: 73042f2666dff27444789d542bbcd607
13 Source2: cron.logrotate
14 Source3: cron.sysconfig
15 Source4: %{name}.crontab
17 URL: http://fcron.free.fr/
18 BuildRequires: libselinux-devel
19 BuildRequires: pam-devel
20 BuildRequires: rpmbuild(macros) >= 1.159
22 Requires(pre): /usr/bin/getgid
23 Requires(pre): /usr/sbin/groupadd
24 Requires(post,preun): /sbin/chkconfig
25 Requires(post): fileutils
26 Requires(postun): /usr/sbin/groupdel
27 Requires: /bin/run-parts
28 Requires: psmisc >= 20.1
29 Provides: crontabs >= 1.7
31 Provides: group(crontab)
37 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40 Fcron is a periodical command scheduler which aims at replacing Vixie
41 Cron, so it implements most of its functionalities. But fcron does not
42 assume that your system is running neither all the time nor regularly:
43 you can, for instance, tell fcron to execute tasks every x hours y
44 minutes of system up time or to do a job only once in a specified
45 interval of time. You can also set a nice value to a job, run it
46 depending on the system load average and much more !
49 Fcron jest serwerem okresowego uruchamiania poleceñ maj±cym za cel
50 zast±pienie Vixie Crona, posiadaj±cym zaimplementowane wiêkszo¶æ
51 spo¶ród jego funkcji. Jednak¿e fcron nie zak³ada, ¿e system dzia³a
52 ca³y czas, ani ¿e jest uruchamiany regularnie: mo¿na, na przyk³ad,
53 kazaæ fcronowi uruchamiaæ zadanie co ka¿de x godzin y minut od
54 uruchomienia systemu lub wykonywaæ zadanie dok³adnie raz w podanym
55 okresie czasu. Umo¿liwia równie¿ ustawianie warto¶ci nice dla zadania,
56 uruchamianie go w zale¿no¶ci od obci±¿enia systemu i du¿o wiêcej.
63 --with-spooldir=%{_var}/spool/cron \
64 --with-run-non-privileged=no \
65 --with-boot-install=no \
67 --with-username=crontab \
68 --with-groupname=crontab \
71 --with-boot-install=no
75 echo "#!/bin/sh" > script/user-group
78 rm -rf $RPM_BUILD_ROOT
79 install -d $RPM_BUILD_ROOT{/var/{log,spool/cron},%{_mandir}} \
80 $RPM_BUILD_ROOT/etc/{rc.d/init.d,logrotate.d,sysconfig} \
81 $RPM_BUILD_ROOT%{_sysconfdir}/{cron,cron.{d,hourly,daily,weekly,monthly},pam.d}
84 DESTDIR=$RPM_BUILD_ROOT \
85 DESTSBIN=$RPM_BUILD_ROOT%{_sbindir} \
86 DESTBIN=$RPM_BUILD_ROOT%{_bindir} \
87 DESTMAN=$RPM_BUILD_ROOT%{_mandir} \
93 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/crond
94 install %{SOURCE2} $RPM_BUILD_ROOT/etc/logrotate.d/cron
95 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/cron
96 install %{SOURCE4} $RPM_BUILD_ROOT/etc/cron.d/crontab
97 install %{SOURCE6} $RPM_BUILD_ROOT/etc/pam.d/cron
99 for a in fi fr id ja ko pl ; do
100 if test -f $a/man1/crontab.1 ; then
101 install -d $RPM_BUILD_ROOT%{_mandir}/$a/man1
102 install $a/man1/crontab.1 $RPM_BUILD_ROOT%{_mandir}/$a/man1
104 if test -f $a/man5/crontab.5 ; then
105 install -d $RPM_BUILD_ROOT%{_mandir}/$a/man5
106 install $a/man5/crontab.5 $RPM_BUILD_ROOT%{_mandir}/$a/man5
108 if test -f $a/man8/cron.8 ; then
109 install -d $RPM_BUILD_ROOT%{_mandir}/$a/man8
110 install $a/man8/cron.8 $RPM_BUILD_ROOT%{_mandir}/$a/man8
111 echo .so cron.8 > $RPM_BUILD_ROOT%{_mandir}/$a/man8/crond.8
115 touch $RPM_BUILD_ROOT/var/log/cron
117 cat > $RPM_BUILD_ROOT%{_sysconfdir}/cron/cron.allow << EOF
118 # cron.allow This file describes the names of the users which are
119 # allowed to use the local cron daemon
123 cat > $RPM_BUILD_ROOT%{_sysconfdir}/cron/cron.deny << EOF2
124 # cron.deny This file describes the names of the users which are
125 # NOT allowed to use the local cron daemon
129 rm -rf $RPM_BUILD_ROOT
132 if [ -n "`/usr/bin/getgid crontab`" ]; then
133 if [ "`/usr/bin/getgid crontab`" != "117" ]; then
134 echo "Error: group crontab doesn't have gid=117. Correct this before installing cron." 1>&2
138 echo "Adding group crontab GID=117."
139 /usr/sbin/groupadd -g 117 -r -f crontab
143 /sbin/chkconfig --add crond
144 if [ -f /var/lock/subsys/crond ]; then
145 /etc/rc.d/init.d/crond restart >&2
147 echo "Run \"/etc/rc.d/init.d/crond start\" to start cron daemon."
151 chgrp crontab /var/log/cron
152 chmod 660 /var/log/cron
155 if [ "$1" = "0" ]; then
156 if [ -f /var/lock/subsys/crond ]; then
157 /etc/rc.d/init.d/crond stop >&2
159 /sbin/chkconfig --del crond
163 if [ "$1" = "0" ]; then
167 %triggerpostun -- vixie-cron <= 3.0.1-85
168 for i in `/bin/ls /var/spool/cron 2>/dev/null`
170 chown ${i} /var/spool/cron/${i} 2>/dev/null || :
172 /bin/chmod 660 /var/log/cron
173 /bin/chgrp crontab /var/log/cron
174 /bin/chmod 640 /etc/cron/cron.*
175 /bin/chgrp crontab /etc/cron/cron.*
177 %triggerpostun -- vixie-cron <= 3.0.1-73
178 if [ -f /etc/cron.d/cron.allow.rpmsave ]; then
179 mv -f /etc/cron.d/cron.allow.rpmsave /etc/cron/cron.allow
181 if [ -f /etc/cron.d/cron.allow ]; then
182 mv -f /etc/cron.d/cron.allow /etc/cron/cron.allow
184 if [ -f /etc/cron.d/cron.deny.rpmsave ]; then
185 mv -f /etc/cron.d/cron.deny.rpmsave /etc/cron/cron.deny
187 if [ -f /etc/cron.d/cron.deny ]; then
188 mv -f /etc/cron.d/cron.deny /etc/cron/cron.deny
191 %triggerpostun -- vixie-cron <= 3.0.1-70
192 if [ -f /etc/cron.allow ]; then
193 mv -f /etc/cron.allow /etc/cron/cron.allow
195 if [ -f /etc/cron.deny ]; then
196 mv -f /etc/cron.deny /etc/cron/cron.deny
199 %triggerpostun -- hc-cron
200 /sbin/chkconfig --del crond
201 /sbin/chkconfig --add crond
203 %triggerpostun -- hc-cron <= 0.14-12
204 for i in `/bin/ls /var/spool/cron 2>/dev/null`
206 chown ${i} /var/spool/cron/${i} 2>/dev/null || :
208 /bin/chmod 660 /var/log/cron
209 /bin/chgrp crontab /var/log/cron
210 /bin/chmod 640 /etc/cron/cron.*
211 /bin/chgrp crontab /etc/cron/cron.*
214 %defattr(644,root,root,755)
215 %doc CHANGES CONVERSION FEATURES MAIL README THANKS
216 %attr(0750,root,crontab) %dir %{_sysconfdir}/cron*
217 %attr(0644,root,crontab) %config(noreplace) /etc/cron.d/crontab
218 %attr(0640,root,crontab) %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/cron/cron.allow
219 %attr(0640,root,crontab) %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/cron/cron.deny
220 %attr(0640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/cron
221 %config(noreplace) %verify(not md5 size mtime) /etc/pam.d/cron
222 %attr(0754,root,root) /etc/rc.d/init.d/crond
223 %config /etc/logrotate.d/cron
224 %attr(0755,root,root) %{_sbindir}/crond
225 %attr(2755,root,crontab) %{_bindir}/crontab
228 %lang(fi) %{_mandir}/fi/man*/*
229 %lang(fr) %{_mandir}/fr/man*/*
230 %lang(id) %{_mandir}/id/man*/*
231 %lang(ja) %{_mandir}/ja/man*/*
232 %lang(ko) %{_mandir}/ko/man*/*
233 %lang(pl) %{_mandir}/pl/man*/*
235 %attr(1730,root,crontab) /var/spool/cron
236 %attr(0660,root,crontab) %ghost /var/log/cron