]>
Commit | Line | Data |
---|---|---|
b9ccfa6e | 1 | # TODO |
ebec51bb JB |
2 | # - teach mcron to use /etc/cron.d |
3 | # - mcron.{init,crontab} not in git | |
4f18be8c | 4 | Summary: Cron daemon |
f9ea83cf ER |
5 | Summary(fr.UTF-8): Démon cron |
6 | Summary(pl.UTF-8): Demon cron | |
4f18be8c | 7 | Name: mcron |
9ebe5bfa | 8 | Version: 1.2.1 |
ebec51bb JB |
9 | Release: 0.1 |
10 | License: GPL v3+ | |
4f18be8c | 11 | Group: Daemons |
ebec51bb | 12 | Source0: https://ftp.gnu.org/gnu/mcron/%{name}-%{version}.tar.gz |
9ebe5bfa | 13 | # Source0-md5: 6fa2659cb026502e6be800a29214662b |
b9ccfa6e | 14 | #Source1: %{name}.init |
14362280 | 15 | Source2: cron.logrotate |
16 | Source3: cron.sysconfig | |
b9ccfa6e | 17 | #Source4: %{name}.crontab |
71d44836 | 18 | Patch0: %{name}-info.patch |
10b2d950 | 19 | URL: http://www.gnu.org/software/mcron/ |
9ebe5bfa | 20 | BuildRequires: autoconf >= 2.69 |
ebec51bb JB |
21 | BuildRequires: automake >= 1:1.11 |
22 | BuildRequires: guile-devel >= 5:2.0 | |
9ebe5bfa | 23 | BuildRequires: guile-devel < 5:3.2 |
ebec51bb JB |
24 | BuildRequires: help2man |
25 | BuildRequires: pkgconfig | |
0324753f | 26 | BuildRequires: rpmbuild(macros) >= 1.268 |
53ae6170 | 27 | BuildRequires: sed >= 4.0 |
10b2d950 | 28 | BuildRequires: texinfo |
0324753f | 29 | Requires(post,preun): /sbin/chkconfig |
6a55b46c ER |
30 | Requires(postun): /usr/sbin/groupdel |
31 | Requires(postun): /usr/sbin/userdel | |
0324753f ER |
32 | Requires(pre): /usr/bin/getgid |
33 | Requires(pre): /usr/sbin/groupadd | |
53ae6170 | 34 | Requires: /bin/run-parts |
0324753f | 35 | Requires: rc-scripts |
4f18be8c | 36 | Provides: crondaemon |
506dd566 | 37 | Provides: crontabs = 1.7 |
92d09d05 | 38 | Provides: group(crontab) |
506dd566 | 39 | Obsoletes: crondaemon |
4f18be8c | 40 | Obsoletes: crontabs |
53ae6170 | 41 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
4f18be8c | 42 | |
43 | %description | |
4f18be8c | 44 | The GNU package mcron (Mellor's cron) is a 100% compatible replacement |
45 | for Vixie cron. It is written in pure Guile, and allows configuration | |
46 | files to be written in scheme (as well as Vixie's original format) for | |
47 | infinite flexibility in specifying when jobs should be run. | |
48 | ||
cce4b411 | 49 | %description -l pl.UTF-8 |
53ae6170 JB |
50 | Pakiet GNU mcron (Mellor's cron) jest w 100% kompatybilnym |
51 | zamiennikiem Vixie crona. Jest napisany w czystym Guile i pozwala na | |
cce4b411 | 52 | pisanie plików konfiguracyjnych w scheme (a także w oryginalnym |
ebec51bb JB |
53 | formacie Vixie), co daje nieskończoną elastyczność w określaniu zadań |
54 | do uruchomienia. | |
53ae6170 | 55 | |
4f18be8c | 56 | %prep |
53ae6170 | 57 | %setup -q |
ebec51bb | 58 | %patch0 -p1 |
ebec51bb JB |
59 | |
60 | # XXX: this is wrong, /etc/cron.d _directory_ should be processed instead of single file! | |
61 | %{__sed} -i -e 's#/etc/crontab#/etc/cron.d/crontab#g' \ | |
62 | src/mcron/scripts/cron.scm \ | |
63 | src/mcron/utils.scm \ | |
64 | src/mcron/vixie-specification.scm \ | |
65 | doc/cron.8 \ | |
66 | doc/mcron.texi | |
4f18be8c | 67 | |
68 | %build | |
01970520 | 69 | %{__aclocal} |
70 | %{__autoconf} | |
71 | %{__automake} | |
10b2d950 | 72 | %configure \ |
ebec51bb | 73 | --disable-silent-rules \ |
10b2d950 | 74 | --with-allow-file=/etc/cron/cron.allow \ |
ebec51bb JB |
75 | --with-deny-file=/etc/cron/cron.deny \ |
76 | --with-sendmail="/usr/lib/sendmail -t" \ | |
77 | --with-socket-file=/var/run/mcron.sock \ | |
78 | --with-spool-dir=/var/spool/cron | |
4f18be8c | 79 | %{__make} |
80 | ||
81 | %install | |
82 | rm -rf $RPM_BUILD_ROOT | |
10b2d950 | 83 | install -d $RPM_BUILD_ROOT/var/{log,spool/cron} \ |
ebec51bb JB |
84 | $RPM_BUILD_ROOT/etc/{cron,cron.{d,hourly,daily,weekly,monthly},rc.d/init.d,logrotate.d,sysconfig} \ |
85 | ||
86 | %{__make} install \ | |
87 | DESTDIR=$RPM_BUILD_ROOT | |
10b2d950 | 88 | |
b7b67b62 | 89 | #install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/crond |
ebec51bb JB |
90 | cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/logrotate.d/cron |
91 | cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/cron | |
b7b67b62 | 92 | #install %{SOURCE4} $RPM_BUILD_ROOT/etc/cron.d/crontab |
10b2d950 | 93 | |
ebec51bb | 94 | cat > $RPM_BUILD_ROOT/etc/cron/cron.allow << 'EOF' |
14362280 | 95 | # cron.allow This file describes the names of the users which are |
96 | # allowed to use the local cron daemon | |
10b2d950 AM |
97 | root |
98 | EOF | |
4f18be8c | 99 | |
ebec51bb | 100 | cat > $RPM_BUILD_ROOT/etc/cron/cron.deny << 'EOF' |
14362280 | 101 | # cron.deny This file describes the names of the users which are |
102 | # NOT allowed to use the local cron daemon | |
0324753f | 103 | EOF |
4f18be8c | 104 | |
53ae6170 JB |
105 | %clean |
106 | rm -rf $RPM_BUILD_ROOT | |
107 | ||
10b2d950 | 108 | %pre |
6a55b46c | 109 | %groupadd -g 117 -r -f crontab |
10b2d950 AM |
110 | |
111 | %post | |
112 | /sbin/chkconfig --add crond | |
0324753f | 113 | %service crond restart "cron daemon" |
10b2d950 AM |
114 | umask 027 |
115 | touch /var/log/cron | |
116 | chgrp crontab /var/log/cron | |
117 | chmod 660 /var/log/cron | |
118 | [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1 | |
119 | ||
120 | %preun | |
121 | if [ "$1" = "0" ]; then | |
0324753f | 122 | %service crond stop |
14362280 | 123 | /sbin/chkconfig --del crond |
10b2d950 AM |
124 | fi |
125 | ||
126 | %postun | |
127 | if [ "$1" = "0" ]; then | |
92d09d05 | 128 | %groupremove crontab |
10b2d950 AM |
129 | fi |
130 | [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1 | |
4f18be8c | 131 | |
4f18be8c | 132 | %files |
133 | %defattr(644,root,root,755) | |
ebec51bb JB |
134 | %doc AUTHORS ChangeLog NEWS README TODO |
135 | %dir /etc/cron | |
136 | %attr(640,root,crontab) %config(noreplace,missingok) %verify(not md5 mtime size) /etc/cron/cron.allow | |
137 | %attr(640,root,crontab) %config(noreplace,missingok) %verify(not md5 mtime size) /etc/cron/cron.deny | |
c146f683 ER |
138 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/cron |
139 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/cron | |
140 | %attr(755,root,root) %{_bindir}/crontab | |
ebec51bb JB |
141 | %attr(755,root,root) %{_bindir}/mcron |
142 | %attr(755,root,root) %{_sbindir}/cron | |
143 | %{_libdir}/guile/2.*/site-ccache/mcron | |
144 | %{_datadir}/guile/site/2.*/mcron | |
c146f683 | 145 | %dir %attr(1730,root,root) /var/spool/cron |
ebec51bb JB |
146 | %{_mandir}/man1/crontab.1* |
147 | %{_mandir}/man1/mcron.1* | |
148 | %{_mandir}/man8/cron.8* | |
ab222db7 | 149 | %{_infodir}/mcron.info* |