1 Summary: A periodical command scheduler which aims at replacing Vixie Cron
2 Summary(pl.UTF-8): Serwer okresowego uruchamiania poleceń zastępujący Vixie Crona
8 Source0: http://fcron.free.fr/archives/%{name}-%{version}.src.tar.gz
9 # Source0-md5: c85e6eecd0564f37658ae250a491fd31
11 Source2: cron.logrotate
12 Source3: cron.sysconfig
13 Source4: %{name}.crontab
16 Source7: %{name}tab.pam
17 Source8: %{name}.systab
18 Patch0: %{name}-mail_output_only_if_there_is_output.patch
19 Patch1: %{name}-configure.patch
20 Patch2: %{name}-Makefile.patch
21 URL: http://fcron.free.fr/
22 # configure tests -x (check can be removed, just like sendmail)
23 BuildRequires: /bin/vi
24 BuildRequires: autoconf
25 BuildRequires: automake
26 BuildRequires: libselinux-devel
27 BuildRequires: pam-devel
28 BuildRequires: rpmbuild(macros) >= 1.268
29 Requires(post): fileutils
30 Requires(post,preun): /sbin/chkconfig
31 Requires(postun): /usr/sbin/groupdel
32 Requires(pre): /bin/id
33 Requires(pre): /usr/bin/getgid
34 Requires(pre): /usr/sbin/groupadd
35 Requires(pre): /usr/sbin/useradd
36 Requires: /bin/run-parts
37 Requires: psmisc >= 20.1
40 Provides: crontabs >= 1.7
41 Provides: group(crontab)
46 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49 Fcron is a periodical command scheduler which aims at replacing Vixie
50 Cron, so it implements most of its functionalities. But fcron does not
51 assume that your system is running neither all the time nor regularly:
52 you can, for instance, tell fcron to execute tasks every x hours y
53 minutes of system up time or to do a job only once in a specified
54 interval of time. You can also set a nice value to a job, run it
55 depending on the system load average and much more !
57 %description -l pl.UTF-8
58 Fcron jest serwerem okresowego uruchamiania poleceń mającym za cel
59 zastąpienie Vixie Crona, posiadającym zaimplementowane większość
60 spośród jego funkcji. Jednakże fcron nie zakłada, że system działa
61 cały czas, ani że jest uruchamiany regularnie: można, na przykład,
62 kazać fcronowi uruchamiać zadanie co każde x godzin y minut od
63 uruchomienia systemu lub wykonywać zadanie dokładnie raz w podanym
64 okresie czasu. Umożliwia również ustawianie wartości nice dla zadania,
65 uruchamianie go w zależności od obciążenia systemu i dużo więcej.
77 --with-sendmail=/usr/sbin/sendmail \
78 --with-sysfcrontab=systab \
79 --with-spooldir=%{_var}/spool/cron \
80 --with-run-non-privileged=no \
81 --with-boot-install=no \
83 --with-username=crontab \
84 --with-groupname=crontab \
87 --with-boot-install=no \
93 echo "#!/bin/sh" > script/user-group
96 rm -rf $RPM_BUILD_ROOT
97 install -d $RPM_BUILD_ROOT{/var/{log,spool/cron},%{_mandir}} \
98 $RPM_BUILD_ROOT/etc/{rc.d/init.d,logrotate.d,sysconfig} \
99 $RPM_BUILD_ROOT%{_sysconfdir}/{cron,cron.{d,hourly,daily,weekly,monthly},pam.d}
102 DESTDIR=$RPM_BUILD_ROOT \
108 #fix premission for rpmbuild
109 chmod +rw $RPM_BUILD_ROOT%{_prefix}/*bin/*
111 ln -sf %{_bindir}/fcrontab $RPM_BUILD_ROOT%{_bindir}/crontab
112 mv -f $RPM_BUILD_ROOT%{_sbindir}/fcron $RPM_BUILD_ROOT%{_sbindir}/crond
114 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/crond
115 install %{SOURCE2} $RPM_BUILD_ROOT/etc/logrotate.d/cron
116 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/cron
117 install %{SOURCE4} $RPM_BUILD_ROOT/etc/cron.d/crontab
118 install %{SOURCE5} $RPM_BUILD_ROOT/etc/pam.d/fcron
119 install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/fcron.conf
120 install %{SOURCE7} $RPM_BUILD_ROOT/etc/pam.d/fcrontab
121 install %{SOURCE8} $RPM_BUILD_ROOT/etc/cron.hourly/fcron.systab
123 touch $RPM_BUILD_ROOT/var/log/cron
125 cat > $RPM_BUILD_ROOT%{_sysconfdir}/cron/cron.allow << EOF
126 # cron.allow This file describes the names of the users which are
127 # allowed to use the local cron daemon
131 cat > $RPM_BUILD_ROOT%{_sysconfdir}/cron/cron.deny << EOF2
132 # cron.deny This file describes the names of the users which are
133 # NOT allowed to use the local cron daemon
137 rm -rf $RPM_BUILD_ROOT
140 %groupadd -g 117 -r -f crontab
141 %useradd -u 134 -r -d /var/spool/cron -s /bin/false -c "crontab User" -g crontab crontab
144 if [ "$1" = "1" ]; then
145 if [ -d /var/spool/cron ]; then
146 FIND=`find /var/spool/cron -type f`
147 for FILE in $FIND; do
148 mv -f $FILE $FILE.orig
149 USER=`basename $FILE`
150 chown crontab:crontab $FILE.orig
152 (test ! -z "$USER" && fcrontab -u $USER -z) > /dev/null 2>&1
154 if [ -f /var/spool/cron/root.orig ]; then
155 chmod 600 /var/spool/cron/root.orig
156 chown root:root /var/spool/cron/root.orig
161 if [ "$1" = "2" ]; then
162 FIND=`find /var/spool/cron -name \*.orig`
163 for FILE in $FIND; do
164 BASENAME=`basename $FILE`
165 USER=`echo "$BASENAME"| sed 's/.orig//'`
166 [ ! -z "$USER" ] && fcrontab -u $USER -z > /dev/null 2>&1
170 /sbin/chkconfig --add crond
171 %service crond restart "cron daemon"
175 chgrp crontab /var/log/cron
176 chmod 660 /var/log/cron
179 if [ "$1" = "0" ]; then
181 /sbin/chkconfig --del crond
183 rm -f /var/spool/cron/systab*
185 FIND=`find /var/spool/cron -name '*.orig'`
186 for FILE in $FIND; do
187 BASENAME=`basename $FILE`
188 USER="${BASENAME%.orig}"
189 mv -f $FILE /var/spool/cron/$USER >/dev/null 2>&1
190 chown $USER:crontab /var/spool/cron/$USER >/dev/null 2>&1
191 chmod 600 /var/spool/cron/$USER >/dev/null 2>&1
193 rm -f /var/spool/cron/rm\.*
194 rm -f /var/spool/cron/fcrontab.sig
195 rm -f /var/spool/cron/new\.*
199 if [ "$1" = "0" ]; then
204 %triggerpostun -- vixie-cron <= 3.0.1-85
205 for i in `/bin/ls /var/spool/cron 2>/dev/null`
207 chown ${i} /var/spool/cron/${i} 2>/dev/null || :
209 /bin/chmod 660 /var/log/cron
210 /bin/chgrp crontab /var/log/cron
211 /bin/chmod 640 /etc/cron/cron.*
212 /bin/chgrp crontab /etc/cron/cron.*
214 %triggerpostun -- vixie-cron <= 3.0.1-73
215 if [ -f /etc/cron.d/cron.allow.rpmsave ]; then
216 mv -f /etc/cron.d/cron.allow.rpmsave /etc/cron/cron.allow
218 if [ -f /etc/cron.d/cron.allow ]; then
219 mv -f /etc/cron.d/cron.allow /etc/cron/cron.allow
221 if [ -f /etc/cron.d/cron.deny.rpmsave ]; then
222 mv -f /etc/cron.d/cron.deny.rpmsave /etc/cron/cron.deny
224 if [ -f /etc/cron.d/cron.deny ]; then
225 mv -f /etc/cron.d/cron.deny /etc/cron/cron.deny
228 %triggerpostun -- vixie-cron <= 3.0.1-70
229 if [ -f /etc/cron.allow ]; then
230 mv -f /etc/cron.allow /etc/cron/cron.allow
232 if [ -f /etc/cron.deny ]; then
233 mv -f /etc/cron.deny /etc/cron/cron.deny
236 %triggerpostun -- hc-cron
237 /sbin/chkconfig --del crond
238 /sbin/chkconfig --add crond
240 %triggerpostun -- hc-cron <= 0.14-12
241 for i in `/bin/ls /var/spool/cron 2>/dev/null`; do
242 chown ${i} /var/spool/cron/${i} 2>/dev/null || :
244 /bin/chmod 660 /var/log/cron
245 /bin/chgrp crontab /var/log/cron
246 /bin/chmod 640 /etc/cron/cron.*
247 /bin/chgrp crontab /etc/cron/cron.*
250 %defattr(644,root,root,755)
251 %doc doc/en/HTML doc/en/txt/{faq.txt,changes.txt,readme.txt,thanks.txt,todo.txt}
252 %attr(750,root,crontab) %dir %{_sysconfdir}/cron*
253 %attr(750,root,root) %{_sysconfdir}/cron.hourly/%{name}.systab
254 %attr(640,root,crontab) %config(noreplace) /etc/cron.d/crontab
255 %attr(640,root,crontab) %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/cron/cron.allow
256 %attr(640,root,crontab) %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/cron/cron.deny
257 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/cron
258 %attr(644,root,crontab) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/fcron
259 %attr(644,root,crontab) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/fcrontab
260 %attr(754,root,root) /etc/rc.d/init.d/crond
261 %config(noreplace) %verify(not md5 mtime size) %attr(640,root,root) /etc/logrotate.d/cron
262 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fcron.*
263 %attr(640,root,crontab) %config(noreplace) %{_sysconfdir}/fcron.conf
264 %attr(755,root,root) %{_sbindir}/crond
265 %attr(6111,crontab,crontab) %{_bindir}/fcrontab
266 %attr(6111,crontab,crontab) %{_bindir}/crontab
267 %attr(4711,root,root) %{_bindir}/fcronsighup
268 %attr(6111,crontab,crontab) %{_bindir}/fcrondyn
269 %{_mandir}/man1/fcrondyn.1*
270 %{_mandir}/man1/fcrontab.1*
271 %{_mandir}/man3/bitstring.3*
272 %{_mandir}/man5/fcron.conf.5*
273 %{_mandir}/man5/fcrontab.5*
274 %{_mandir}/man8/fcron.8*
275 %lang(fr) %{_mandir}/fr/man1/fcrondyn.1*
276 %lang(fr) %{_mandir}/fr/man1/fcrontab.1*
277 %lang(fr) %{_mandir}/fr/man3/bitstring.3*
278 %lang(fr) %{_mandir}/fr/man5/fcron.conf.5*
279 %lang(fr) %{_mandir}/fr/man5/fcrontab.5*
280 %lang(fr) %{_mandir}/fr/man8/fcron.8*
281 %attr(1730,root,crontab) /var/spool/cron
282 %attr(660,root,crontab) %ghost /var/log/cron