X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=fcron.spec;h=791390cf07d70eac9c380f6d1e20ba4f185dd9d8;hb=5f113dcb8f1a3e8095c70f7ac3ca8ab7c5571c6d;hp=863f73ab6e21db1bef2a63ffc16ac90f6a6d9e45;hpb=0ebe5c1d2ac2951ab636d030ccc2bf50d04dadad;p=packages%2Ffcron.git diff --git a/fcron.spec b/fcron.spec index 863f73a..791390c 100644 --- a/fcron.spec +++ b/fcron.spec @@ -1,17 +1,12 @@ -# -# TODO: -# - if not vi editor installed, configure macro doesn't pass correctly. -# We sholud run %%{configure} --with-editor=. Any ideas? -# Summary: A periodical command scheduler which aims at replacing Vixie Cron -Summary(pl): Serwer okresowego uruchamiania poleceñ zastêpuj±cy Vixie Crona +Summary(pl.UTF-8): Serwer okresowego uruchamiania poleceń zastępujący Vixie Crona Name: fcron -Version: 3.0.2 -Release: 1 -License: GPL +Version: 3.1.2 +Release: 2 +License: GPL v2+ Group: Daemons Source0: http://fcron.free.fr/archives/%{name}-%{version}.src.tar.gz -# Source0-md5: f35e6af41d356ebcb38882f86a14fb94 +# Source0-md5: 36bf213e15f3a480f2274f8e46cced0a Source1: %{name}.init Source2: cron.logrotate Source3: cron.sysconfig @@ -20,9 +15,12 @@ Source5: %{name}.pam Source6: %{name}.conf Source7: %{name}tab.pam Source8: %{name}.systab -Patch0: %{name}-mail_output_only_if_there_is_output.patch -Patch1: %{name}-configure.patch +Patch0: %{name}-sendmail.patch +Patch1: %{name}-Makefile.patch +Patch2: %{name}-accept_readable_fcron.conf.patch URL: http://fcron.free.fr/ +# configure tests -x (check can be removed, just like sendmail) +BuildRequires: /bin/vi BuildRequires: autoconf BuildRequires: automake BuildRequires: libselinux-devel @@ -39,12 +37,10 @@ Requires: /bin/run-parts Requires: psmisc >= 20.1 Requires: rc-scripts Provides: crondaemon -Provides: crontabs >= 1.7 +Provides: crontabs = 1.7 Provides: group(crontab) +Obsoletes: crondaemon Obsoletes: crontabs -Obsoletes: hc-cron -Obsoletes: mcron -Obsoletes: vixie-cron BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description @@ -56,20 +52,21 @@ minutes of system up time or to do a job only once in a specified interval of time. You can also set a nice value to a job, run it depending on the system load average and much more ! -%description -l pl -Fcron jest serwerem okresowego uruchamiania poleceñ maj±cym za cel -zast±pienie Vixie Crona, posiadaj±cym zaimplementowane wiêkszo¶æ -spo¶ród jego funkcji. Jednak¿e fcron nie zak³ada, ¿e system dzia³a -ca³y czas, ani ¿e jest uruchamiany regularnie: mo¿na, na przyk³ad, -kazaæ fcronowi uruchamiaæ zadanie co ka¿de x godzin y minut od -uruchomienia systemu lub wykonywaæ zadanie dok³adnie raz w podanym -okresie czasu. Umo¿liwia równie¿ ustawianie warto¶ci nice dla zadania, -uruchamianie go w zale¿no¶ci od obci±¿enia systemu i du¿o wiêcej. +%description -l pl.UTF-8 +Fcron jest serwerem okresowego uruchamiania poleceń mającym za cel +zastąpienie Vixie Crona, posiadającym zaimplementowane większość +spośród jego funkcji. Jednakże fcron nie zakłada, że system działa +cały czas, ani że jest uruchamiany regularnie: można, na przykład, +kazać fcronowi uruchamiać zadanie co każde x godzin y minut od +uruchomienia systemu lub wykonywać zadanie dokładnie raz w podanym +okresie czasu. Umożliwia również ustawianie wartości nice dla zadania, +uruchamianie go w zależności od obciążenia systemu i dużo więcej. %prep %setup -q %patch0 -p1 %patch1 -p1 +%patch2 -p0 %build %{__aclocal} @@ -86,9 +83,10 @@ uruchamianie go w zale --with-pam=yes \ --with-selinux=yes \ --with-boot-install=no \ -# --with-editor=/usr/bin/vim + --with-editor=/bin/vi -%{__make} OPTION="%{rpmcflags}" +%{__make} \ + OPTION="%{rpmcflags}" echo "#!/bin/sh" > script/user-group @@ -98,11 +96,8 @@ install -d $RPM_BUILD_ROOT{/var/{log,spool/cron},%{_mandir}} \ $RPM_BUILD_ROOT/etc/{rc.d/init.d,logrotate.d,sysconfig} \ $RPM_BUILD_ROOT%{_sysconfdir}/{cron,cron.{d,hourly,daily,weekly,monthly},pam.d} -%{__make} install \ +%{__make} install-staged \ DESTDIR=$RPM_BUILD_ROOT \ - DESTSBIN=$RPM_BUILD_ROOT%{_sbindir} \ - DESTBIN=$RPM_BUILD_ROOT%{_bindir} \ - DESTMAN=$RPM_BUILD_ROOT%{_mandir} \ ROOTNAME=$(id -u) \ ROOTGROUP=$(id -g) \ USERNAME=$(id -u) \ @@ -125,16 +120,18 @@ install %{SOURCE8} $RPM_BUILD_ROOT/etc/cron.hourly/fcron.systab touch $RPM_BUILD_ROOT/var/log/cron -cat > $RPM_BUILD_ROOT%{_sysconfdir}/cron/cron.allow << EOF +cat > $RPM_BUILD_ROOT%{_sysconfdir}/cron/cron.allow << 'EOF' # cron.allow This file describes the names of the users which are # allowed to use the local cron daemon root EOF -cat > $RPM_BUILD_ROOT%{_sysconfdir}/cron/cron.deny << EOF2 +cat > $RPM_BUILD_ROOT%{_sysconfdir}/cron/cron.deny << 'EOF' # cron.deny This file describes the names of the users which are # NOT allowed to use the local cron daemon -EOF2 +EOF + +%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %clean rm -rf $RPM_BUILD_ROOT @@ -171,7 +168,7 @@ if [ "$1" = "2" ]; then fi /sbin/chkconfig --add crond -%service crond restart "cron daemon" +%service crond restart "Cron Daemon" umask 027 touch /var/log/cron @@ -193,9 +190,9 @@ if [ "$1" = "0" ]; then chown $USER:crontab /var/spool/cron/$USER >/dev/null 2>&1 chmod 600 /var/spool/cron/$USER >/dev/null 2>&1 done - rm -f /var/spool/cron/rm\.* + rm -f /var/spool/cron/rm.* rm -f /var/spool/cron/fcrontab.sig - rm -f /var/spool/cron/new\.* + rm -f /var/spool/cron/new.* fi %postun @@ -204,54 +201,14 @@ if [ "$1" = "0" ]; then %groupremove crontab fi -%triggerpostun -- vixie-cron <= 3.0.1-85 -for i in `/bin/ls /var/spool/cron 2>/dev/null` -do - chown ${i} /var/spool/cron/${i} 2>/dev/null || : -done -/bin/chmod 660 /var/log/cron -/bin/chgrp crontab /var/log/cron -/bin/chmod 640 /etc/cron/cron.* -/bin/chgrp crontab /etc/cron/cron.* - -%triggerpostun -- vixie-cron <= 3.0.1-73 -if [ -f /etc/cron.d/cron.allow.rpmsave ]; then - mv -f /etc/cron.d/cron.allow.rpmsave /etc/cron/cron.allow -fi -if [ -f /etc/cron.d/cron.allow ]; then - mv -f /etc/cron.d/cron.allow /etc/cron/cron.allow -fi -if [ -f /etc/cron.d/cron.deny.rpmsave ]; then - mv -f /etc/cron.d/cron.deny.rpmsave /etc/cron/cron.deny -fi -if [ -f /etc/cron.d/cron.deny ]; then - mv -f /etc/cron.d/cron.deny /etc/cron/cron.deny -fi - -%triggerpostun -- vixie-cron <= 3.0.1-70 -if [ -f /etc/cron.allow ]; then - mv -f /etc/cron.allow /etc/cron/cron.allow -fi -if [ -f /etc/cron.deny ]; then - mv -f /etc/cron.deny /etc/cron/cron.deny -fi - %triggerpostun -- hc-cron +# reinstall crond init.d links, which could be different /sbin/chkconfig --del crond /sbin/chkconfig --add crond -%triggerpostun -- hc-cron <= 0.14-12 -for i in `/bin/ls /var/spool/cron 2>/dev/null`; do - chown ${i} /var/spool/cron/${i} 2>/dev/null || : -done -/bin/chmod 660 /var/log/cron -/bin/chgrp crontab /var/log/cron -/bin/chmod 640 /etc/cron/cron.* -/bin/chgrp crontab /etc/cron/cron.* - %files %defattr(644,root,root,755) -%doc doc/en/HTML doc/en/txt/{faq.txt,changes.txt,readme.txt,thanks.txt,todo.txt} +%doc doc/en/HTML doc/en/txt/{faq.txt,changes.txt,readme.txt,thanks.txt,todo.txt} %attr(750,root,crontab) %dir %{_sysconfdir}/cron* %attr(750,root,root) %{_sysconfdir}/cron.hourly/%{name}.systab %attr(640,root,crontab) %config(noreplace) /etc/cron.d/crontab @@ -262,8 +219,9 @@ done %attr(644,root,crontab) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/fcrontab %attr(754,root,root) /etc/rc.d/init.d/crond %config(noreplace) %verify(not md5 mtime size) %attr(640,root,root) /etc/logrotate.d/cron -%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fcron.* -%attr(640,root,crontab) %config(noreplace) %{_sysconfdir}/fcron.conf +%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fcron.allow +%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fcron.deny +%attr(640,root,crontab) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fcron.conf %attr(755,root,root) %{_sbindir}/crond %attr(6111,crontab,crontab) %{_bindir}/fcrontab %attr(6111,crontab,crontab) %{_bindir}/crontab