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
28 Provides: group(crontab)
34 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 Fcron is a periodical command scheduler which aims at replacing Vixie
38 Cron, so it implements most of its functionalities. But fcron does not
39 assume that your system is running neither all the time nor regularly:
40 you can, for instance, tell fcron to execute tasks every x hours y
41 minutes of system up time or to do a job only once in a specified
42 interval of time. You can also set a nice value to a job, run it
43 depending on the system load average and much more !
46 Fcron jest serwerem okresowego uruchamiania poleceñ maj±cym za cel
47 zast±pienie Vixie Crona, posiadaj±cym zaimplementowane wiêkszo¶æ
48 spo¶ród jego funkcji. Jednak¿e fcron nie zak³ada, ¿e system dzia³a
49 ca³y czas, ani ¿e jest uruchamiany regularnie: mo¿na, na przyk³ad,
50 kazaæ fcronowi uruchamiaæ zadanie co ka¿de x godzin y minut od
51 uruchomienia systemu lub wykonywaæ zadanie dok³adnie raz w podanym
52 okresie czasu. Umo¿liwia równie¿ ustawianie warto¶ci nice dla zadania,
53 uruchamianie go w zale¿no¶ci od obci±¿enia systemu i du¿o wiêcej.
60 --with-spooldir=%{_var}/spool/cron \
61 --with-run-non-privileged=no \
62 --with-boot-install=no \
64 --with-username=crontab \
65 --with-groupname=crontab \
72 rm -rf $RPM_BUILD_ROOT
73 install -d $RPM_BUILD_ROOT{/var/{log,spool/cron},%{_mandir}} \
74 $RPM_BUILD_ROOT/etc/{rc.d/init.d,logrotate.d,sysconfig} \
75 $RPM_BUILD_ROOT%{_sysconfdir}/{cron,cron.{d,hourly,daily,weekly,monthly},pam.d}
78 DESTDIR=$RPM_BUILD_ROOT \
79 DESTMAN=$RPM_BUILD_ROOT%{_mandir}
81 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/crond
82 install %{SOURCE2} $RPM_BUILD_ROOT/etc/logrotate.d/cron
83 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/cron
84 install %{SOURCE4} $RPM_BUILD_ROOT/etc/cron.d/crontab
85 install %{SOURCE6} $RPM_BUILD_ROOT/etc/pam.d/cron
87 for a in fi fr id ja ko pl ; do
88 if test -f $a/man1/crontab.1 ; then
89 install -d $RPM_BUILD_ROOT%{_mandir}/$a/man1
90 install $a/man1/crontab.1 $RPM_BUILD_ROOT%{_mandir}/$a/man1
92 if test -f $a/man5/crontab.5 ; then
93 install -d $RPM_BUILD_ROOT%{_mandir}/$a/man5
94 install $a/man5/crontab.5 $RPM_BUILD_ROOT%{_mandir}/$a/man5
96 if test -f $a/man8/cron.8 ; then
97 install -d $RPM_BUILD_ROOT%{_mandir}/$a/man8
98 install $a/man8/cron.8 $RPM_BUILD_ROOT%{_mandir}/$a/man8
99 echo .so cron.8 > $RPM_BUILD_ROOT%{_mandir}/$a/man8/crond.8
103 touch $RPM_BUILD_ROOT/var/log/cron
105 cat > $RPM_BUILD_ROOT%{_sysconfdir}/cron/cron.allow << EOF
106 # cron.allow This file describes the names of the users which are
107 # allowed to use the local cron daemon
111 cat > $RPM_BUILD_ROOT%{_sysconfdir}/cron/cron.deny << EOF2
112 # cron.deny This file describes the names of the users which are
113 # NOT allowed to use the local cron daemon
117 rm -rf $RPM_BUILD_ROOT
120 if [ -n "`/usr/bin/getgid crontab`" ]; then
121 if [ "`/usr/bin/getgid crontab`" != "117" ]; then
122 echo "Error: group crontab doesn't have gid=117. Correct this before installing cron." 1>&2
126 echo "Adding group crontab GID=117."
127 /usr/sbin/groupadd -g 117 -r -f crontab
131 /sbin/chkconfig --add crond
132 if [ -f /var/lock/subsys/crond ]; then
133 /etc/rc.d/init.d/crond restart >&2
135 echo "Run \"/etc/rc.d/init.d/crond start\" to start cron daemon."
139 chgrp crontab /var/log/cron
140 chmod 660 /var/log/cron
143 if [ "$1" = "0" ]; then
144 if [ -f /var/lock/subsys/crond ]; then
145 /etc/rc.d/init.d/crond stop >&2
147 /sbin/chkconfig --del crond
151 if [ "$1" = "0" ]; then
155 %triggerpostun -- vixie-cron <= 3.0.1-85
156 for i in `/bin/ls /var/spool/cron 2>/dev/null`
158 chown ${i} /var/spool/cron/${i} 2>/dev/null || :
160 /bin/chmod 660 /var/log/cron
161 /bin/chgrp crontab /var/log/cron
162 /bin/chmod 640 /etc/cron/cron.*
163 /bin/chgrp crontab /etc/cron/cron.*
165 %triggerpostun -- vixie-cron <= 3.0.1-73
166 if [ -f /etc/cron.d/cron.allow.rpmsave ]; then
167 mv -f /etc/cron.d/cron.allow.rpmsave /etc/cron/cron.allow
169 if [ -f /etc/cron.d/cron.allow ]; then
170 mv -f /etc/cron.d/cron.allow /etc/cron/cron.allow
172 if [ -f /etc/cron.d/cron.deny.rpmsave ]; then
173 mv -f /etc/cron.d/cron.deny.rpmsave /etc/cron/cron.deny
175 if [ -f /etc/cron.d/cron.deny ]; then
176 mv -f /etc/cron.d/cron.deny /etc/cron/cron.deny
179 %triggerpostun -- vixie-cron <= 3.0.1-70
180 if [ -f /etc/cron.allow ]; then
181 mv -f /etc/cron.allow /etc/cron/cron.allow
183 if [ -f /etc/cron.deny ]; then
184 mv -f /etc/cron.deny /etc/cron/cron.deny
187 %triggerpostun -- hc-cron
188 /sbin/chkconfig --del crond
189 /sbin/chkconfig --add crond
191 %triggerpostun -- hc-cron <= 0.14-12
192 for i in `/bin/ls /var/spool/cron 2>/dev/null`
194 chown ${i} /var/spool/cron/${i} 2>/dev/null || :
196 /bin/chmod 660 /var/log/cron
197 /bin/chgrp crontab /var/log/cron
198 /bin/chmod 640 /etc/cron/cron.*
199 /bin/chgrp crontab /etc/cron/cron.*
202 %defattr(644,root,root,755)
203 %doc CHANGES CONVERSION FEATURES MAIL README THANKS
204 %attr(0750,root,crontab) %dir %{_sysconfdir}/cron*
205 %attr(0644,root,crontab) %config(noreplace) /etc/cron.d/crontab
206 %attr(0640,root,crontab) %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/cron/cron.allow
207 %attr(0640,root,crontab) %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/cron/cron.deny
208 %attr(0640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/cron
209 %config(noreplace) %verify(not md5 size mtime) /etc/pam.d/cron
210 %attr(0754,root,root) /etc/rc.d/init.d/crond
211 %config /etc/logrotate.d/cron
212 %attr(0755,root,root) %{_sbindir}/crond
213 %attr(2755,root,crontab) %{_bindir}/crontab
216 %lang(fi) %{_mandir}/fi/man*/*
217 %lang(fr) %{_mandir}/fr/man*/*
218 %lang(id) %{_mandir}/id/man*/*
219 %lang(ja) %{_mandir}/ja/man*/*
220 %lang(ko) %{_mandir}/ko/man*/*
221 %lang(pl) %{_mandir}/pl/man*/*
223 %attr(1730,root,crontab) /var/spool/cron
224 %attr(0660,root,crontab) %ghost /var/log/cron