]> git.pld-linux.org Git - packages/fcron.git/blame - fcron.spec
- up to 3.1.2
[packages/fcron.git] / fcron.spec
CommitLineData
5f59e5da 1Summary: A periodical command scheduler which aims at replacing Vixie Cron
5e12e637 2Summary(pl.UTF-8): Serwer okresowego uruchamiania poleceń zastępujący Vixie Crona
5f59e5da 3Name: fcron
7e164612
JR
4Version: 3.1.2
5Release: 1
eee9be33 6License: GPL v2+
5f59e5da 7Group: Daemons
ef65b337 8Source0: http://fcron.free.fr/archives/%{name}-%{version}.src.tar.gz
7e164612 9# Source0-md5: 36bf213e15f3a480f2274f8e46cced0a
5f59e5da
AM
10Source1: %{name}.init
11Source2: cron.logrotate
12Source3: cron.sysconfig
13Source4: %{name}.crontab
14Source5: %{name}.pam
a6d0b5fe 15Source6: %{name}.conf
542b0197 16Source7: %{name}tab.pam
a58c6059 17Source8: %{name}.systab
4bf8e5a7 18Patch1: %{name}-Makefile.patch
67a86a7f 19Patch2: %{name}-accept_readable_fcron.conf.patch
4db6ff6c 20URL: http://fcron.free.fr/
2665b9b3 21# configure tests -x (check can be removed, just like sendmail)
5864f846 22BuildRequires: /bin/vi
6e82b599 23BuildRequires: autoconf
7703e5de 24BuildRequires: automake
c5e6f976 25BuildRequires: libselinux-devel
4db6ff6c 26BuildRequires: pam-devel
7703e5de 27BuildRequires: rpmbuild(macros) >= 1.268
542b0197
ER
28Requires(post): fileutils
29Requires(post,preun): /sbin/chkconfig
30Requires(postun): /usr/sbin/groupdel
23e300cd 31Requires(pre): /bin/id
542b0197 32Requires(pre): /usr/bin/getgid
5f59e5da 33Requires(pre): /usr/sbin/groupadd
23e300cd 34Requires(pre): /usr/sbin/useradd
5f59e5da
AM
35Requires: /bin/run-parts
36Requires: psmisc >= 20.1
7c49a617 37Requires: rc-scripts
5f59e5da 38Provides: crondaemon
8849571a 39Provides: crontabs = 1.7
1ea95bdf 40Provides: group(crontab)
8849571a 41Obsoletes: crondaemon
5f59e5da 42Obsoletes: crontabs
5f59e5da
AM
43BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44
45%description
46Fcron is a periodical command scheduler which aims at replacing Vixie
47Cron, so it implements most of its functionalities. But fcron does not
a436a152 48assume that your system is running neither all the time nor regularly:
49you can, for instance, tell fcron to execute tasks every x hours y
5f59e5da
AM
50minutes of system up time or to do a job only once in a specified
51interval of time. You can also set a nice value to a job, run it
52depending on the system load average and much more !
53
23cad010
JR
54%description -l pl.UTF-8
55Fcron jest serwerem okresowego uruchamiania poleceń mającym za cel
56zastąpienie Vixie Crona, posiadającym zaimplementowane większość
57spośród jego funkcji. Jednakże fcron nie zakłada, że system działa
58cały czas, ani że jest uruchamiany regularnie: można, na przykład,
59kazać fcronowi uruchamiać zadanie co każde x godzin y minut od
60uruchomienia systemu lub wykonywać zadanie dokładnie raz w podanym
61okresie czasu. Umożliwia również ustawianie wartości nice dla zadania,
62uruchamianie go w zależności od obciążenia systemu i dużo więcej.
a436a152 63
5f59e5da
AM
64%prep
65%setup -q
6e82b599 66%patch1 -p1
67a86a7f 67%patch2 -p0
5f59e5da
AM
68
69%build
6e82b599
AM
70%{__aclocal}
71%{__autoconf}
5f59e5da 72%configure \
feca1bdd 73 --with-sendmail=/usr/sbin/sendmail \
65b9ac1d 74 --with-sysfcrontab=systab \
5f59e5da
AM
75 --with-spooldir=%{_var}/spool/cron \
76 --with-run-non-privileged=no \
77 --with-boot-install=no \
78 --with-fcrondyn=yes \
6aa33d9c 79 --with-username=crontab \
5f59e5da
AM
80 --with-groupname=crontab \
81 --with-pam=yes \
c5e6f976 82 --with-selinux=yes \
0ebe5c1d 83 --with-boot-install=no \
5864f846 84 --with-editor=/bin/vi
4db6ff6c 85
2665b9b3
JB
86%{__make} \
87 OPTION="%{rpmcflags}"
5f59e5da 88
ef65b337
AM
89echo "#!/bin/sh" > script/user-group
90
5f59e5da
AM
91%install
92rm -rf $RPM_BUILD_ROOT
93install -d $RPM_BUILD_ROOT{/var/{log,spool/cron},%{_mandir}} \
94 $RPM_BUILD_ROOT/etc/{rc.d/init.d,logrotate.d,sysconfig} \
95 $RPM_BUILD_ROOT%{_sysconfdir}/{cron,cron.{d,hourly,daily,weekly,monthly},pam.d}
96
3ad21387 97%{__make} install-staged \
5f59e5da 98 DESTDIR=$RPM_BUILD_ROOT \
ef65b337
AM
99 ROOTNAME=$(id -u) \
100 ROOTGROUP=$(id -g) \
101 USERNAME=$(id -u) \
102 GROUPNAME=$(id -g)
5f59e5da 103
a6d0b5fe 104#fix premission for rpmbuild
7703e5de 105chmod +rw $RPM_BUILD_ROOT%{_prefix}/*bin/*
a6d0b5fe 106
2702a7d7 107ln -sf %{_bindir}/fcrontab $RPM_BUILD_ROOT%{_bindir}/crontab
108mv -f $RPM_BUILD_ROOT%{_sbindir}/fcron $RPM_BUILD_ROOT%{_sbindir}/crond
109
5f59e5da
AM
110install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/crond
111install %{SOURCE2} $RPM_BUILD_ROOT/etc/logrotate.d/cron
112install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/cron
113install %{SOURCE4} $RPM_BUILD_ROOT/etc/cron.d/crontab
a6d0b5fe 114install %{SOURCE5} $RPM_BUILD_ROOT/etc/pam.d/fcron
542b0197 115install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/fcron.conf
a6d0b5fe 116install %{SOURCE7} $RPM_BUILD_ROOT/etc/pam.d/fcrontab
c10c84f6 117install %{SOURCE8} $RPM_BUILD_ROOT/etc/cron.hourly/fcron.systab
5f59e5da 118
5f59e5da
AM
119touch $RPM_BUILD_ROOT/var/log/cron
120
8b3977c0 121cat > $RPM_BUILD_ROOT%{_sysconfdir}/cron/cron.allow << 'EOF'
9600229d 122# cron.allow This file describes the names of the users which are
123# allowed to use the local cron daemon
5f59e5da
AM
124root
125EOF
126
8b3977c0 127cat > $RPM_BUILD_ROOT%{_sysconfdir}/cron/cron.deny << 'EOF'
9600229d 128# cron.deny This file describes the names of the users which are
129# NOT allowed to use the local cron daemon
8b3977c0 130EOF
5f59e5da 131
7e164612
JR
132%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
133
5f59e5da
AM
134%clean
135rm -rf $RPM_BUILD_ROOT
136
137%pre
23e300cd
ER
138%groupadd -g 117 -r -f crontab
139%useradd -u 134 -r -d /var/spool/cron -s /bin/false -c "crontab User" -g crontab crontab
f995433d 140
5f59e5da 141%post
6aa33d9c 142if [ "$1" = "1" ]; then
8f300fe8 143 if [ -d /var/spool/cron ]; then
c5e6f976 144 FIND=`find /var/spool/cron -type f`
145 for FILE in $FIND; do
8f300fe8 146 mv -f $FILE $FILE.orig
f995433d 147 USER=`basename $FILE`
6970373e 148 chown crontab:crontab $FILE.orig
f995433d 149 chmod 640 $FILE.orig
150 (test ! -z "$USER" && fcrontab -u $USER -z) > /dev/null 2>&1
8f300fe8 151 done
f995433d 152 if [ -f /var/spool/cron/root.orig ]; then
153 chmod 600 /var/spool/cron/root.orig
6970373e 154 chown root:root /var/spool/cron/root.orig
f995433d 155 fi
8f300fe8 156 fi
6aa33d9c 157fi
8f300fe8 158
8f300fe8 159if [ "$1" = "2" ]; then
c5e6f976 160 FIND=`find /var/spool/cron -name \*.orig`
161 for FILE in $FIND; do
8f300fe8 162 BASENAME=`basename $FILE`
f995433d 163 USER=`echo "$BASENAME"| sed 's/.orig//'`
6970373e 164 [ ! -z "$USER" ] && fcrontab -u $USER -z > /dev/null 2>&1
8f300fe8 165 done
6aa33d9c 166fi
a6d0b5fe 167
5f59e5da 168/sbin/chkconfig --add crond
8b3977c0 169%service crond restart "Cron Daemon"
6aa33d9c 170
5f59e5da
AM
171umask 027
172touch /var/log/cron
173chgrp crontab /var/log/cron
174chmod 660 /var/log/cron
175
176%preun
177if [ "$1" = "0" ]; then
7703e5de 178 %service crond stop
5f59e5da 179 /sbin/chkconfig --del crond
5f59e5da 180
7703e5de 181 rm -f /var/spool/cron/systab*
0334340a 182
7703e5de
ER
183 FIND=`find /var/spool/cron -name '*.orig'`
184 for FILE in $FIND; do
185 BASENAME=`basename $FILE`
186 USER="${BASENAME%.orig}"
187 mv -f $FILE /var/spool/cron/$USER >/dev/null 2>&1
188 chown $USER:crontab /var/spool/cron/$USER >/dev/null 2>&1
189 chmod 600 /var/spool/cron/$USER >/dev/null 2>&1
190 done
8b3977c0 191 rm -f /var/spool/cron/rm.*
7703e5de 192 rm -f /var/spool/cron/fcrontab.sig
8b3977c0 193 rm -f /var/spool/cron/new.*
6aa33d9c 194fi
a6d0b5fe 195
5f59e5da
AM
196%postun
197if [ "$1" = "0" ]; then
f995433d 198 %userremove crontab
2702a7d7 199 %groupremove crontab
5f59e5da
AM
200fi
201
277330e7
ER
202%triggerpostun -- hc-cron
203# reinstall crond init.d links, which could be different
5f59e5da
AM
204/sbin/chkconfig --del crond
205/sbin/chkconfig --add crond
206
5f59e5da
AM
207%files
208%defattr(644,root,root,755)
8b3977c0 209%doc doc/en/HTML doc/en/txt/{faq.txt,changes.txt,readme.txt,thanks.txt,todo.txt}
542b0197 210%attr(750,root,crontab) %dir %{_sysconfdir}/cron*
c10c84f6 211%attr(750,root,root) %{_sysconfdir}/cron.hourly/%{name}.systab
542b0197
ER
212%attr(640,root,crontab) %config(noreplace) /etc/cron.d/crontab
213%attr(640,root,crontab) %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/cron/cron.allow
214%attr(640,root,crontab) %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/cron/cron.deny
215%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/cron
216%attr(644,root,crontab) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/fcron
217%attr(644,root,crontab) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/fcrontab
218%attr(754,root,root) /etc/rc.d/init.d/crond
219%config(noreplace) %verify(not md5 mtime size) %attr(640,root,root) /etc/logrotate.d/cron
7e164612
JR
220%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fcron.allow
221%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fcron.deny
222%attr(640,root,crontab) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fcron.conf
542b0197 223%attr(755,root,root) %{_sbindir}/crond
6aa33d9c 224%attr(6111,crontab,crontab) %{_bindir}/fcrontab
f995433d 225%attr(6111,crontab,crontab) %{_bindir}/crontab
6aa33d9c 226%attr(4711,root,root) %{_bindir}/fcronsighup
227%attr(6111,crontab,crontab) %{_bindir}/fcrondyn
fef2f9d3
JB
228%{_mandir}/man1/fcrondyn.1*
229%{_mandir}/man1/fcrontab.1*
3712a1f5 230%{_mandir}/man3/bitstring.3*
c5e6f976 231%{_mandir}/man5/fcron.conf.5*
232%{_mandir}/man5/fcrontab.5*
233%{_mandir}/man8/fcron.8*
3712a1f5 234%lang(fr) %{_mandir}/fr/man1/fcrondyn.1*
235%lang(fr) %{_mandir}/fr/man1/fcrontab.1*
236%lang(fr) %{_mandir}/fr/man3/bitstring.3*
237%lang(fr) %{_mandir}/fr/man5/fcron.conf.5*
238%lang(fr) %{_mandir}/fr/man5/fcrontab.5*
239%lang(fr) %{_mandir}/fr/man8/fcron.8*
5f59e5da 240%attr(1730,root,crontab) /var/spool/cron
542b0197 241%attr(660,root,crontab) %ghost /var/log/cron
This page took 0.151643 seconds and 4 git commands to generate.