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