- update to 1.4.1

- create and own /var/spool/anacron/cron.{daily,weekly,monthly} to remove
    false warning about non existent files
- Resolves: 517398
This commit is contained in:
Marcela Mašláňová 2009-08-14 12:47:30 +00:00
parent 6c2b71681f
commit cb36306037
5 changed files with 32 additions and 88 deletions

View File

@ -1 +1 @@
cronie-1.4.tar.gz cronie-1.4.1.tar.gz

View File

@ -1,69 +0,0 @@
From 07ed1e70e6bf64c815baccde938702084036db78 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Marcela=20Ma=C5=A1l=C3=A1=C5=88ov=C3=A1?= <mmaslano@redhat.com>
Date: Mon, 22 Dec 2008 16:22:14 +0100
Subject: [PATCH] Update manual for symlink.
---
man/cron.8 | 17 +++++++++--------
man/crontab.5 | 17 +++++++++--------
2 files changed, 18 insertions(+), 16 deletions(-)
diff --git a/man/cron.8 b/man/cron.8
index 731896b..a80101a 100644
--- a/man/cron.8
+++ b/man/cron.8
@@ -137,14 +137,15 @@ log file. This is useful in scripts which rotate and age log files.
Naturally this is not relevant if cron was built to use
.IR syslog (3).
.SH CAVEATS
-In this version of
-.BR cron
-, without the \fB-p\fP option,
-.I /etc/crontab
-must not be writable by any user other than root,
-no crontab files may be links, or linked to by any other file,
-and no crontab files may be executable, or be writable by any
-user other than their owner.
+The
+.BR crontab
+files have to be regular files or symlinks to regular files, they must not be executable
+or writable by anyone else than the owner.
+This requirement can be overridden by using the \fB-p\fP option on the crond command line.
+If inotify support is in use changes in the symlinked crontabs are not automatically
+noticed by the cron daemon. The cron daemon must receive a SIGHUP to reload the crontabs.
+This is a limitation of inotify API.
+
.SH "SEE ALSO"
.IR crontab (1),
.IR crontab (5),
diff --git a/man/crontab.5 b/man/crontab.5
index 098b3b0..208daca 100644
--- a/man/crontab.5
+++ b/man/crontab.5
@@ -272,14 +272,15 @@ the 5 initial time and date fields, and are prefixed by the '@' character:
@hourly : Run once an hour, ie. "0 * * * *".
.fi
.SH CAVEATS
-In this version of
-.I cron
-,
-.I /etc/crontab
-must not be writable by any user other than root.
-No crontab files may be links, or linked to by any other file.
-No crontab files may be executable, or be writable by any user
-other than their owner.
+The
+.BR crontab
+files have to be regular files or symlinks to regular files, they must not be executable
+or writable by anyone else than the owner.
+This requirement can be overridden by using the \fB-p\fP option on the crond command line.
+If inotify support is in use changes in the symlinked crontabs are not automatically
+noticed by the cron daemon. The cron daemon must receive a SIGHUP to reload the crontabs.
+This is a limitation of inotify API.
+
.SH AUTHOR
.nf
Paul Vixie <vixie@isc.org>
--
1.6.0.6

View File

@ -5,8 +5,8 @@
Summary: Cron daemon for executing programs at set times Summary: Cron daemon for executing programs at set times
Name: cronie Name: cronie
Version: 1.4 Version: 1.4.1
Release: 4%{?dist} Release: 1%{?dist}
License: MIT and BSD and GPLv2 License: MIT and BSD and GPLv2
Group: System Environment/Base Group: System Environment/Base
URL: https://fedorahosted.org/cronie URL: https://fedorahosted.org/cronie
@ -90,16 +90,23 @@ mkdir -pm755 $RPM_BUILD_ROOT%{_sysconfdir}/cron.d/
install -m 755 cronie.init $RPM_BUILD_ROOT%{_initrddir}/crond install -m 755 cronie.init $RPM_BUILD_ROOT%{_initrddir}/crond
install -m 644 crond.sysconfig $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/crond install -m 644 crond.sysconfig $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/crond
touch $RPM_BUILD_ROOT%{_sysconfdir}/cron.deny touch $RPM_BUILD_ROOT%{_sysconfdir}/cron.deny
install -m 644 contrib/regularly-jobs $RPM_BUILD_ROOT%{_sysconfdir}/regularly-jobs install -m 644 contrib/anacrontab $RPM_BUILD_ROOT%{_sysconfdir}/anacrontab
install -c -m755 contrib/0hourly $RPM_BUILD_ROOT%{_sysconfdir}/cron.d/0hourly install -c -m755 contrib/0hourly $RPM_BUILD_ROOT%{_sysconfdir}/cron.d/0hourly
mkdir -pm 755 $RPM_BUILD_ROOT%{_sysconfdir}/cron.hourly mkdir -pm 755 $RPM_BUILD_ROOT%{_sysconfdir}/cron.hourly
install -c -m755 contrib/0anacron $RPM_BUILD_ROOT%{_sysconfdir}/cron.hourly/0anacron install -c -m755 contrib/0anacron $RPM_BUILD_ROOT%{_sysconfdir}/cron.hourly/0anacron
mkdir -p $RPM_BUILD_ROOT/var/spool/anacron
touch $RPM_BUILD_ROOT/var/spool/anacron/cron.daily
touch $RPM_BUILD_ROOT/var/spool/anacron/cron.weekly
touch $RPM_BUILD_ROOT/var/spool/anacron/cron.monthly
%clean %clean
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
%post %post
/sbin/chkconfig --add crond /sbin/chkconfig --add crond
[ -e /var/spool/anacron/cron.daily ] || touch /var/spool/anacron/cron.daily
[ -e /var/spool/anacron/cron.weekly ] || touch /var/spool/anacron/cron.weekly
[ -e /var/spool/anacron/cron.monthly ] || touch /var/spool/anacron/cron.monthly
%preun %preun
if [ "$1" = "0" ]; then if [ "$1" = "0" ]; then
@ -112,6 +119,15 @@ if [ "$1" -ge "1" ]; then
service crond condrestart > /dev/null 2>&1 ||: service crond condrestart > /dev/null 2>&1 ||:
fi fi
# empty /etc/crontab in case there are only old regular jobs
%triggerun -- cronie < 1.4.1
cp -a /etc/crontab /etc/crontab.rpmsave
sed -e '/^01 \* \* \* \* root run-parts \/etc\/cron\.hourly/d'\
-e '/^02 4 \* \* \* root run-parts \/etc\/cron\.daily/d'\
-e '/^22 4 \* \* 0 root run-parts \/etc\/cron\.weekly/d'\
-e '/^42 4 1 \* \* root run-parts \/etc\/cron\.monthly/d' /etc/crontab.rpmsave > /etc/crontab
exit 0
#copy the lock, remove old daemon from chkconfig #copy the lock, remove old daemon from chkconfig
%triggerun -- vixie-cron %triggerun -- vixie-cron
cp -a /var/lock/subsys/crond /var/lock/subsys/cronie > /dev/null 2>&1 ||: cp -a /var/lock/subsys/crond /var/lock/subsys/cronie > /dev/null 2>&1 ||:
@ -139,18 +155,27 @@ cp -a /var/lock/subsys/crond /var/lock/subsys/cronie > /dev/null 2>&1 ||:
%endif %endif
%config(noreplace) %{_sysconfdir}/sysconfig/crond %config(noreplace) %{_sysconfdir}/sysconfig/crond
%config(noreplace) %{_sysconfdir}/cron.deny %config(noreplace) %{_sysconfdir}/cron.deny
%config(noreplace) %{_sysconfdir}/regularly-jobs %config(noreplace) %{_sysconfdir}/anacrontab
%files anacron %files anacron
%defattr(-,root,root,-) %defattr(-,root,root,-)
%{_sbindir}/anacron %{_sbindir}/anacron
%attr(0644,root,root) %{_sysconfdir}/cron.d/0hourly %attr(0644,root,root) %{_sysconfdir}/cron.d/0hourly
%attr(0755,root,root) %{_sysconfdir}/cron.hourly/0anacron %attr(0755,root,root) %{_sysconfdir}/cron.hourly/0anacron
%{_mandir}/man5/regularly-jobs.* %dir /var/spool/anacron
%ghost %verify(not md5 size mtime) /var/spool/anacron/cron.daily
%ghost %verify(not md5 size mtime) /var/spool/anacron/cron.weekly
%ghost %verify(not md5 size mtime) /var/spool/anacron/cron.monthly
%{_mandir}/man5/anacrontab.* %{_mandir}/man5/anacrontab.*
%{_mandir}/man8/anacron.* %{_mandir}/man8/anacron.*
%changelog %changelog
* Fri Aug 14 2009 Marcela Mašláňová <mmaslano@redhat.com> - 1.4.1-1
- update to 1.4.1
- create and own /var/spool/anacron/cron.{daily,weekly,monthly} to
remove false warning about non existent files
- Resolves: 517398
* Wed Aug 5 2009 Tomas Mraz <tmraz@redhat.com> - 1.4-4 * Wed Aug 5 2009 Tomas Mraz <tmraz@redhat.com> - 1.4-4
- 515762 move anacron provides and obsoletes to the anacron subpackage - 515762 move anacron provides and obsoletes to the anacron subpackage

View File

@ -1,12 +0,0 @@
diff -up cronie-1.3/src/cron.c.old cronie-1.3/src/cron.c
--- cronie-1.3/src/cron.c.old 2009-05-22 08:16:34.000000000 +0200
+++ cronie-1.3/src/cron.c 2009-06-18 13:38:53.375571259 +0200
@@ -399,7 +399,7 @@ run_reboot_jobs(cron_db *db) {
pid_t pid = getpid();
/* lock exist - skip reboot jobs */
- if (access(REBOOT_LOCK, F_OK)) {
+ if (access(REBOOT_LOCK, F_OK) == 0) {
log_it("CRON", pid, "INFO", "@reboot jobs will be run at computer's startup.", 0);
return;
}

View File

@ -1 +1 @@
10728a81af9f5995a39bf541aaf14422 cronie-1.4.tar.gz 9c089d2035b9fa8263bc71da3eb31cdd cronie-1.4.1.tar.gz