1 Summary: A periodical command scheduler which aims at replacing Vixie Cron
2 Summary(pl): Serwer okresowego uruchamiania poleceñ zastepuj±cy Vixie Crona
8 Source0: http://fcron.free.fr/%{name}-%{version}.src.tar.gz
9 # Source0-md5: 4bfcff1002a7231f374591511bacadb2
11 Source2: cron.logrotate
12 Source3: cron.sysconfig
13 Source4: %{name}.crontab
15 URL: http://fcron.free.fr/
16 BuildRequires: libselinux-devel
17 BuildRequires: pam-devel
19 Requires(pre): /usr/bin/getgid
20 Requires(pre): /usr/sbin/groupadd
21 Requires(post,preun): /sbin/chkconfig
22 Requires(post): fileutils
23 Requires(postun): /usr/sbin/groupdel
24 Requires: /bin/run-parts
25 Requires: psmisc >= 20.1
26 Provides: crontabs >= 1.7
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 Fcron is a periodical command scheduler which aims at replacing Vixie
35 Cron, so it implements most of its functionalities. But fcron does not
36 assume that your system is running neither all the time nor regularly:
37 you can, for instance, tell fcron to execute tasks every x hours y
38 minutes of system up time or to do a job only once in a specified
39 interval of time. You can also set a nice value to a job, run it
40 depending on the system load average and much more !
43 Fcron jest serwerem okresowego uruchamiania poleceñ maj±cym za cel
44 zast±pienie Vixie Crona, posiadaj±cym zaimplementowane wiêkszo¶æ
45 spo¶ród jego funkcji. Jednak¿e fcron nie zak³ada, ¿e system dzia³a
46 ca³y czas, ani ¿e jest uruchamiany regularnie: mo¿na, na przyk³ad,
47 kazaæ fcronowi uruchamiaæ zadanie co ka¿de x godzin y minut od
48 uruchomienia systemu lub wykonywaæ zadanie dok³adnie raz w podanym
49 okresie czasu. Umo¿liwia równie¿ ustawianie warto¶ci nice dla zadania,
50 uruchamianie go w zale¿no¶ci od obci±¿enia systemu i du¿o wiêcej.
57 --with-spooldir=%{_var}/spool/cron \
58 --with-run-non-privileged=no \
59 --with-boot-install=no \
61 --with-username=crontab \
62 --with-groupname=crontab \
69 rm -rf $RPM_BUILD_ROOT
70 install -d $RPM_BUILD_ROOT{/var/{log,spool/cron},%{_mandir}} \
71 $RPM_BUILD_ROOT/etc/{rc.d/init.d,logrotate.d,sysconfig} \
72 $RPM_BUILD_ROOT%{_sysconfdir}/{cron,cron.{d,hourly,daily,weekly,monthly},pam.d}
75 DESTDIR=$RPM_BUILD_ROOT \
76 DESTMAN=$RPM_BUILD_ROOT%{_mandir}
78 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/crond
79 install %{SOURCE2} $RPM_BUILD_ROOT/etc/logrotate.d/cron
80 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/cron
81 install %{SOURCE4} $RPM_BUILD_ROOT/etc/cron.d/crontab
82 install %{SOURCE6} $RPM_BUILD_ROOT/etc/pam.d/cron
84 for a in fi fr id ja ko pl ; do
85 if test -f $a/man1/crontab.1 ; then
86 install -d $RPM_BUILD_ROOT%{_mandir}/$a/man1
87 install $a/man1/crontab.1 $RPM_BUILD_ROOT%{_mandir}/$a/man1
89 if test -f $a/man5/crontab.5 ; then
90 install -d $RPM_BUILD_ROOT%{_mandir}/$a/man5
91 install $a/man5/crontab.5 $RPM_BUILD_ROOT%{_mandir}/$a/man5
93 if test -f $a/man8/cron.8 ; then
94 install -d $RPM_BUILD_ROOT%{_mandir}/$a/man8
95 install $a/man8/cron.8 $RPM_BUILD_ROOT%{_mandir}/$a/man8
96 echo .so cron.8 > $RPM_BUILD_ROOT%{_mandir}/$a/man8/crond.8
100 touch $RPM_BUILD_ROOT/var/log/cron
102 cat > $RPM_BUILD_ROOT%{_sysconfdir}/cron/cron.allow << EOF
103 # cron.allow This file describes the names of the users which are
104 # allowed to use the local cron daemon
108 cat > $RPM_BUILD_ROOT%{_sysconfdir}/cron/cron.deny << EOF2
109 # cron.deny This file describes the names of the users which are
110 # NOT allowed to use the local cron daemon
114 rm -rf $RPM_BUILD_ROOT
117 if [ -n "`/usr/bin/getgid crontab`" ]; then
118 if [ "`/usr/bin/getgid crontab`" != "117" ]; then
119 echo "Error: group crontab doesn't have gid=117. Correct this before installing cron." 1>&2
123 echo "Adding group crontab GID=117."
124 /usr/sbin/groupadd -g 117 -r -f crontab
128 /sbin/chkconfig --add crond
129 if [ -f /var/lock/subsys/crond ]; then
130 /etc/rc.d/init.d/crond restart >&2
132 echo "Run \"/etc/rc.d/init.d/crond start\" to start cron daemon."
136 chgrp crontab /var/log/cron
137 chmod 660 /var/log/cron
140 if [ "$1" = "0" ]; then
141 if [ -f /var/lock/subsys/crond ]; then
142 /etc/rc.d/init.d/crond stop >&2
144 /sbin/chkconfig --del crond
148 if [ "$1" = "0" ]; then
149 echo "Removing group crontab."
150 /usr/sbin/groupdel crontab
153 %triggerpostun -- vixie-cron <= 3.0.1-85
154 for i in `/bin/ls /var/spool/cron 2>/dev/null`
156 chown ${i} /var/spool/cron/${i} 2>/dev/null || :
158 /bin/chmod 660 /var/log/cron
159 /bin/chgrp crontab /var/log/cron
160 /bin/chmod 640 /etc/cron/cron.*
161 /bin/chgrp crontab /etc/cron/cron.*
163 %triggerpostun -- vixie-cron <= 3.0.1-73
164 if [ -f /etc/cron.d/cron.allow.rpmsave ]; then
165 mv -f /etc/cron.d/cron.allow.rpmsave /etc/cron/cron.allow
167 if [ -f /etc/cron.d/cron.allow ]; then
168 mv -f /etc/cron.d/cron.allow /etc/cron/cron.allow
170 if [ -f /etc/cron.d/cron.deny.rpmsave ]; then
171 mv -f /etc/cron.d/cron.deny.rpmsave /etc/cron/cron.deny
173 if [ -f /etc/cron.d/cron.deny ]; then
174 mv -f /etc/cron.d/cron.deny /etc/cron/cron.deny
177 %triggerpostun -- vixie-cron <= 3.0.1-70
178 if [ -f /etc/cron.allow ]; then
179 mv -f /etc/cron.allow /etc/cron/cron.allow
181 if [ -f /etc/cron.deny ]; then
182 mv -f /etc/cron.deny /etc/cron/cron.deny
185 %triggerpostun -- hc-cron
186 /sbin/chkconfig --del crond
187 /sbin/chkconfig --add crond
189 %triggerpostun -- hc-cron <= 0.14-12
190 for i in `/bin/ls /var/spool/cron 2>/dev/null`
192 chown ${i} /var/spool/cron/${i} 2>/dev/null || :
194 /bin/chmod 660 /var/log/cron
195 /bin/chgrp crontab /var/log/cron
196 /bin/chmod 640 /etc/cron/cron.*
197 /bin/chgrp crontab /etc/cron/cron.*
200 %defattr(644,root,root,755)
201 %doc CHANGES CONVERSION FEATURES MAIL README THANKS
202 %attr(0750,root,crontab) %dir %{_sysconfdir}/cron*
203 %attr(0644,root,crontab) %config(noreplace) /etc/cron.d/crontab
204 %attr(0640,root,crontab) %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/cron/cron.allow
205 %attr(0640,root,crontab) %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/cron/cron.deny
206 %attr(0640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/cron
207 %config(noreplace) %verify(not md5 size mtime) /etc/pam.d/cron
208 %attr(0754,root,root) /etc/rc.d/init.d/crond
209 %config /etc/logrotate.d/cron
210 %attr(0755,root,root) %{_sbindir}/crond
211 %attr(2755,root,crontab) %{_bindir}/crontab
214 %lang(fi) %{_mandir}/fi/man*/*
215 %lang(fr) %{_mandir}/fr/man*/*
216 %lang(id) %{_mandir}/id/man*/*
217 %lang(ja) %{_mandir}/ja/man*/*
218 %lang(ko) %{_mandir}/ko/man*/*
219 %lang(pl) %{_mandir}/pl/man*/*
221 %attr(1730,root,crontab) /var/spool/cron
222 %attr(0660,root,crontab) %ghost /var/log/cron