2008-01-30 07:59:43 +00:00
|
|
|
%bcond_without selinux
|
|
|
|
%bcond_without pam
|
|
|
|
%bcond_without audit
|
2008-02-07 14:50:24 +00:00
|
|
|
%bcond_without inotify
|
|
|
|
|
2008-01-30 07:59:43 +00:00
|
|
|
Summary: Cron daemon for executing programs at set times
|
|
|
|
Name: cronie
|
2010-10-22 08:30:04 +00:00
|
|
|
Version: 1.4.6
|
2010-11-30 11:40:13 +00:00
|
|
|
Release: 2%{?dist}
|
2010-02-15 10:13:33 +00:00
|
|
|
License: MIT and BSD and ISC and GPLv2
|
2008-01-30 07:59:43 +00:00
|
|
|
Group: System Environment/Base
|
|
|
|
URL: https://fedorahosted.org/cronie
|
2009-04-27 10:22:22 +00:00
|
|
|
Source0: https://fedorahosted.org/releases/c/r/cronie/%{name}-%{version}.tar.gz
|
2010-11-30 11:40:13 +00:00
|
|
|
Patch0: cronie-1.4.6-manpages.patch
|
2008-01-30 07:59:43 +00:00
|
|
|
|
|
|
|
Requires: syslog, bash >= 2.0
|
|
|
|
Conflicts: sysklogd < 1.4.1
|
2008-01-30 15:25:26 +00:00
|
|
|
Provides: vixie-cron = 4:4.4
|
2008-01-30 07:59:43 +00:00
|
|
|
Obsoletes: vixie-cron <= 4:4.3
|
2009-10-30 16:35:11 +00:00
|
|
|
Requires: dailyjobs
|
2008-01-30 07:59:43 +00:00
|
|
|
|
|
|
|
%if %{with selinux}
|
2008-06-02 08:01:27 +00:00
|
|
|
Requires: libselinux >= 2.0.64
|
|
|
|
Buildrequires: libselinux-devel >= 2.0.64
|
2008-01-30 07:59:43 +00:00
|
|
|
%endif
|
|
|
|
%if %{with pam}
|
2008-06-02 08:01:27 +00:00
|
|
|
Requires: pam >= 1.0.1
|
|
|
|
Buildrequires: pam-devel >= 1.0.1
|
2008-01-30 07:59:43 +00:00
|
|
|
%endif
|
|
|
|
%if %{with audit}
|
|
|
|
Buildrequires: audit-libs-devel >= 1.4.1
|
|
|
|
%endif
|
2010-02-15 10:13:33 +00:00
|
|
|
BuildRequires: automake
|
2008-01-30 07:59:43 +00:00
|
|
|
|
2009-08-14 13:54:42 +00:00
|
|
|
Requires(post): /sbin/chkconfig coreutils sed
|
2008-01-30 07:59:43 +00:00
|
|
|
Requires(postun): /sbin/chkconfig
|
|
|
|
Requires(postun): /sbin/service
|
|
|
|
Requires(preun): /sbin/chkconfig
|
|
|
|
Requires(preun): /sbin/service
|
|
|
|
|
|
|
|
%description
|
|
|
|
Cronie contains the standard UNIX daemon crond that runs specified programs at
|
|
|
|
scheduled times and related tools. It is a fork of the original vixie-cron and
|
|
|
|
has security and configuration enhancements like the ability to use pam and
|
|
|
|
SELinux.
|
|
|
|
|
2009-07-20 18:12:36 +00:00
|
|
|
%package anacron
|
|
|
|
Summary: Utility for running regular jobs
|
|
|
|
Requires: crontabs
|
|
|
|
Group: System Environment/Base
|
2009-10-30 16:35:11 +00:00
|
|
|
Provides: dailyjobs
|
2009-08-05 16:51:09 +00:00
|
|
|
Provides: anacron = 2.4
|
|
|
|
Obsoletes: anacron <= 2.3
|
2009-08-14 13:54:42 +00:00
|
|
|
Requires(post): coreutils
|
2009-11-03 14:20:48 +00:00
|
|
|
Requires: %{name} = %{version}-%{release}
|
2009-07-20 18:12:36 +00:00
|
|
|
|
|
|
|
%description anacron
|
|
|
|
Anacron becames part of cronie. Anacron is used only for running regular jobs.
|
|
|
|
The default settings execute regular jobs by anacron, however this could be
|
|
|
|
overloaded in settings.
|
|
|
|
|
2009-10-30 16:35:11 +00:00
|
|
|
%package noanacron
|
|
|
|
Summary: Utility for running simple regular jobs in old cron style
|
|
|
|
Group: System Environment/Base
|
|
|
|
Provides: dailyjobs
|
|
|
|
Requires: crontabs
|
2009-11-03 14:20:48 +00:00
|
|
|
Requires: %{name} = %{version}-%{release}
|
2009-10-30 16:35:11 +00:00
|
|
|
|
|
|
|
%description noanacron
|
|
|
|
Old style of {hourly,daily,weekly,monthly}.jobs without anacron. No features.
|
|
|
|
|
2008-01-30 07:59:43 +00:00
|
|
|
%prep
|
|
|
|
%setup -q
|
2010-11-30 11:40:13 +00:00
|
|
|
%patch0 -p1
|
2008-01-30 07:59:43 +00:00
|
|
|
|
|
|
|
%build
|
|
|
|
|
|
|
|
%configure \
|
|
|
|
%if %{with pam}
|
|
|
|
--with-pam \
|
|
|
|
%endif
|
|
|
|
%if %{with selinux}
|
|
|
|
--with-selinux \
|
|
|
|
%endif
|
|
|
|
%if %{with audit}
|
2008-02-07 14:50:24 +00:00
|
|
|
--with-audit \
|
|
|
|
%endif
|
|
|
|
%if %{with inotify}
|
2009-07-20 18:12:36 +00:00
|
|
|
--with-inotify \
|
2008-01-30 07:59:43 +00:00
|
|
|
%endif
|
2009-10-12 10:15:28 +00:00
|
|
|
--enable-anacron --enable-pie
|
2009-07-20 18:12:36 +00:00
|
|
|
|
2009-06-18 11:42:28 +00:00
|
|
|
make %{?_smp_mflags}
|
2008-01-30 07:59:43 +00:00
|
|
|
|
|
|
|
%install
|
|
|
|
make install DESTDIR=$RPM_BUILD_ROOT DESTMAN=$RPM_BUILD_ROOT%{_mandir}
|
|
|
|
mkdir -pm700 $RPM_BUILD_ROOT%{_localstatedir}/spool/cron
|
|
|
|
mkdir -pm755 $RPM_BUILD_ROOT%{_initrddir}
|
|
|
|
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/
|
|
|
|
mkdir -pm755 $RPM_BUILD_ROOT%{_sysconfdir}/cron.d/
|
|
|
|
%if ! %{with pam}
|
|
|
|
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/crond
|
|
|
|
%endif
|
|
|
|
install -m 755 cronie.init $RPM_BUILD_ROOT%{_initrddir}/crond
|
2008-09-18 11:08:25 +00:00
|
|
|
install -m 644 crond.sysconfig $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/crond
|
2008-01-30 07:59:43 +00:00
|
|
|
touch $RPM_BUILD_ROOT%{_sysconfdir}/cron.deny
|
2009-08-14 12:47:30 +00:00
|
|
|
install -m 644 contrib/anacrontab $RPM_BUILD_ROOT%{_sysconfdir}/anacrontab
|
2009-07-20 18:12:36 +00:00
|
|
|
install -c -m755 contrib/0hourly $RPM_BUILD_ROOT%{_sysconfdir}/cron.d/0hourly
|
|
|
|
mkdir -pm 755 $RPM_BUILD_ROOT%{_sysconfdir}/cron.hourly
|
|
|
|
install -c -m755 contrib/0anacron $RPM_BUILD_ROOT%{_sysconfdir}/cron.hourly/0anacron
|
2009-08-14 12:47:30 +00:00
|
|
|
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
|
2008-01-30 07:59:43 +00:00
|
|
|
|
2009-10-30 16:35:11 +00:00
|
|
|
# noanacron package
|
2009-11-03 13:50:35 +00:00
|
|
|
install -m 644 contrib/dailyjobs $RPM_BUILD_ROOT/%{_sysconfdir}/cron.d/dailyjobs
|
2009-10-30 16:35:11 +00:00
|
|
|
|
2008-01-30 07:59:43 +00:00
|
|
|
%clean
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
%post
|
2008-06-04 08:05:28 +00:00
|
|
|
/sbin/chkconfig --add crond
|
2009-08-14 13:54:42 +00:00
|
|
|
|
|
|
|
%post anacron
|
2009-08-14 12:47:30 +00:00
|
|
|
[ -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
|
2008-02-05 14:50:39 +00:00
|
|
|
|
2008-01-30 07:59:43 +00:00
|
|
|
%preun
|
2008-02-05 14:50:39 +00:00
|
|
|
if [ "$1" = "0" ]; then
|
|
|
|
service crond stop >/dev/null 2>&1 ||:
|
|
|
|
/sbin/chkconfig --del crond
|
2008-01-30 07:59:43 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
%postun
|
|
|
|
if [ "$1" -ge "1" ]; then
|
2008-02-05 14:50:39 +00:00
|
|
|
service crond condrestart > /dev/null 2>&1 ||:
|
2008-01-30 07:59:43 +00:00
|
|
|
fi
|
|
|
|
|
2009-08-14 12:47:30 +00:00
|
|
|
# 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
|
|
|
|
|
2008-02-07 14:50:24 +00:00
|
|
|
#copy the lock, remove old daemon from chkconfig
|
2008-02-05 14:50:39 +00:00
|
|
|
%triggerun -- vixie-cron
|
|
|
|
cp -a /var/lock/subsys/crond /var/lock/subsys/cronie > /dev/null 2>&1 ||:
|
|
|
|
|
|
|
|
#if the lock exist, then we restart daemon (it was running in the past).
|
2008-06-04 08:05:28 +00:00
|
|
|
#add new daemon into chkconfig everytime, when we upgrade to cronie from vixie-cron
|
2008-02-05 14:50:39 +00:00
|
|
|
%triggerpostun -- vixie-cron
|
2008-06-04 08:05:28 +00:00
|
|
|
/sbin/chkconfig --add crond
|
|
|
|
[ -f /var/lock/subsys/cronie ] && ( rm -f /var/lock/subsys/cronie ; service crond restart ) > /dev/null 2>&1 ||:
|
2008-02-05 14:50:39 +00:00
|
|
|
|
2008-01-30 07:59:43 +00:00
|
|
|
%files
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%doc AUTHORS COPYING INSTALL README ChangeLog
|
|
|
|
%attr(755,root,root) %{_sbindir}/crond
|
|
|
|
%attr(6755,root,root) %{_bindir}/crontab
|
|
|
|
%{_mandir}/man8/crond.*
|
|
|
|
%{_mandir}/man8/cron.*
|
|
|
|
%{_mandir}/man5/crontab.*
|
|
|
|
%{_mandir}/man1/crontab.*
|
|
|
|
%dir %{_localstatedir}/spool/cron
|
|
|
|
%dir %{_sysconfdir}/cron.d
|
|
|
|
%{_initrddir}/crond
|
|
|
|
%if %{with pam}
|
|
|
|
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/pam.d/crond
|
|
|
|
%endif
|
|
|
|
%config(noreplace) %{_sysconfdir}/sysconfig/crond
|
|
|
|
%config(noreplace) %{_sysconfdir}/cron.deny
|
2009-10-30 16:35:11 +00:00
|
|
|
%attr(0644,root,root) %{_sysconfdir}/cron.d/0hourly
|
2009-07-20 18:12:36 +00:00
|
|
|
|
|
|
|
%files anacron
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%{_sbindir}/anacron
|
|
|
|
%attr(0755,root,root) %{_sysconfdir}/cron.hourly/0anacron
|
2009-11-03 13:50:35 +00:00
|
|
|
%config(noreplace) %{_sysconfdir}/anacrontab
|
2009-08-14 12:47:30 +00:00
|
|
|
%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
|
2009-07-20 18:12:36 +00:00
|
|
|
%{_mandir}/man5/anacrontab.*
|
|
|
|
%{_mandir}/man8/anacron.*
|
2008-01-30 07:59:43 +00:00
|
|
|
|
2009-10-30 16:35:11 +00:00
|
|
|
%files noanacron
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%attr(0644,root,root) %{_sysconfdir}/cron.d/dailyjobs
|
|
|
|
|
2008-01-30 07:59:43 +00:00
|
|
|
%changelog
|
2010-11-30 11:40:13 +00:00
|
|
|
* Tue Nov 30 2010 Marcela Mašláňová <mmaslano@redhat.com> - 1.4.6-2
|
|
|
|
- fix typos in man pages
|
|
|
|
|
2010-10-22 08:30:04 +00:00
|
|
|
* Fri Oct 22 2010 Marcela Mašláňová <mmaslano@redhat.com> - 1.4.6-1
|
|
|
|
- update to 1.4.6
|
|
|
|
|
2010-08-13 13:59:38 +00:00
|
|
|
* Fri Aug 13 2010 Marcela Mašláňová <mmaslano@redhat.com> - 1.4.5-4
|
2010-08-13 13:40:59 +00:00
|
|
|
- 623908 fix fd leak in anacron, which caused denail of prelink
|
|
|
|
and others
|
|
|
|
|
2010-08-09 07:31:00 +00:00
|
|
|
* Mon Aug 9 2010 Marcela Mašláňová <mmaslano@redhat.com> - 1.4.5-2
|
|
|
|
- remove sendmail from requirements. If it's not installed, it will
|
|
|
|
log into (r)syslog.
|
|
|
|
|
2010-08-02 13:46:27 +00:00
|
|
|
* Mon Aug 2 2010 Marcela Mašláňová <mmaslano@redhat.com> - 1.4.5-1
|
|
|
|
- update to new release
|
|
|
|
|
2010-02-19 08:32:19 +00:00
|
|
|
* Fri Feb 19 2010 Marcela Mašláňová <mmaslano@redhat.com> - 1.4.4-1
|
|
|
|
- update to new release
|
|
|
|
|
2010-02-15 10:13:33 +00:00
|
|
|
* Mon Feb 15 2010 Marcela Mašláňová <mmaslano@redhat.com> - 1.4.3-3
|
|
|
|
- 564894 FTBFS DSOLinking
|
|
|
|
|
2009-11-05 16:21:57 +00:00
|
|
|
* Thu Nov 5 2009 Marcela Mašláňová <mmaslano@redhat.com> - 1.4.3-2
|
|
|
|
- 533189 pam needs add a line and selinux needs defined one function
|
|
|
|
|
2009-11-03 13:50:35 +00:00
|
|
|
* Fri Oct 30 2009 Marcela Mašláňová <mmaslano@redhat.com> - 1.4.3-1
|
|
|
|
- 531963 and 532482 creating noanacron package
|
2009-10-30 16:35:11 +00:00
|
|
|
|
2009-10-19 10:49:20 +00:00
|
|
|
* Mon Oct 19 2009 Marcela Mašláňová <mmaslano@redhat.com> - 1.4.2-2
|
|
|
|
- 529632 service crond stop returns appropriate value
|
|
|
|
|
2009-10-12 10:15:28 +00:00
|
|
|
* Mon Oct 12 2009 Marcela Mašláňová <mmaslano@redhat.com> - 1.4.2-1
|
|
|
|
- new release
|
|
|
|
|
2009-08-21 10:23:21 +00:00
|
|
|
* Fri Aug 21 2009 Tomas Mraz <tmraz@redhat.com> - 1.4.1-3
|
|
|
|
- rebuilt with new audit
|
|
|
|
|
2009-08-14 13:54:42 +00:00
|
|
|
* Fri Aug 14 2009 Tomas Mraz <tmraz@redhat.com> - 1.4.1-2
|
|
|
|
- create the anacron timestamps in correct post script
|
|
|
|
|
2009-08-14 12:47:30 +00:00
|
|
|
* 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
|
|
|
|
|
2009-08-05 16:51:09 +00:00
|
|
|
* Wed Aug 5 2009 Tomas Mraz <tmraz@redhat.com> - 1.4-4
|
|
|
|
- 515762 move anacron provides and obsoletes to the anacron subpackage
|
|
|
|
|
2009-07-24 19:39:27 +00:00
|
|
|
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4-3
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
|
|
|
|
|
2009-07-20 18:53:47 +00:00
|
|
|
* Mon Jul 20 2009 Marcela Mašláňová <mmaslano@redhat.com> - 1.4-2
|
|
|
|
- merge cronie and anacron in new release of cronie
|
|
|
|
- obsolete/provide anacron in spec
|
2009-07-20 18:12:36 +00:00
|
|
|
|
2009-06-18 11:42:28 +00:00
|
|
|
* Thu Jun 18 2009 Marcela Mašláňová <mmaslano@redhat.com> - 1.3-2
|
|
|
|
- 506560 check return value of access
|
|
|
|
|
2009-04-27 10:22:22 +00:00
|
|
|
* Mon Apr 27 2009 Marcela Mašláňová <mmaslano@redhat.com> - 1.3-1
|
|
|
|
- new release
|
|
|
|
|
|
|
|
* Fri Apr 24 2009 Marcela Mašláňová <mmaslano@redhat.com> - 1.2-8
|
|
|
|
- 496973 close file descriptors after exec
|
|
|
|
|
2009-03-09 08:12:18 +00:00
|
|
|
* Mon Mar 9 2009 Tomas Mraz <tmraz@redhat.com> - 1.2-7
|
|
|
|
- rebuild
|
|
|
|
|
2009-02-24 09:42:53 +00:00
|
|
|
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-6
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
|
|
|
|
|
2008-12-23 09:19:19 +00:00
|
|
|
* Tue Dec 23 2008 Marcela Mašláňová <mmaslano@redhat.com> - 1.2-5
|
|
|
|
- 477100 NO_FOLLOW was removed, reload after change in symlinked
|
|
|
|
crontab is needed, man updated.
|
|
|
|
|
2008-10-24 12:58:41 +00:00
|
|
|
* Fri Oct 24 2008 Marcela Mašláňová <mmaslano@redhat.com> - 1.2-4
|
|
|
|
- update init script
|
|
|
|
|
2008-09-25 12:49:00 +00:00
|
|
|
* Thu Sep 25 2008 Marcela Maslanova <mmaslano@redhat.com> - 1.2-3
|
|
|
|
- add sendmail file into requirement, cause it's needed some MTA
|
|
|
|
|
2008-09-18 11:08:25 +00:00
|
|
|
* Thu Sep 18 2008 Marcela Maslanova <mmaslano@redhat.com> - 1.2-2
|
|
|
|
- 462252 /etc/sysconfig/crond does not need to be executable
|
|
|
|
|
2008-06-26 14:07:20 +00:00
|
|
|
* Thu Jun 26 2008 Marcela Maslanova <mmaslano@redhat.com> - 1.2-1
|
|
|
|
- update to 1.2
|
|
|
|
|
2008-06-18 21:21:24 +00:00
|
|
|
* Tue Jun 17 2008 Tomas Mraz <tmraz@redhat.com> - 1.1-3
|
|
|
|
- fix setting keycreate context
|
|
|
|
- unify logging a bit
|
|
|
|
- cleanup some warnings and fix a typo in TZ code
|
|
|
|
- 450993 improve and fix inotify support
|
|
|
|
|
2008-06-04 08:05:28 +00:00
|
|
|
* Wed Jun 4 2008 Marcela Maslanova <mmaslano@redhat.com> - 1.1-2
|
|
|
|
- 49864 upgrade/update problem. Syntax error in spec.
|
|
|
|
|
2008-06-02 08:01:27 +00:00
|
|
|
* Wed May 28 2008 Marcela Maslanova <mmaslano@redhat.com> - 1.1-1
|
|
|
|
- release 1.1
|
|
|
|
|
2008-05-20 11:53:30 +00:00
|
|
|
* Tue May 20 2008 Marcela Maslanova <mmaslano@redhat.com> - 1.0-6
|
|
|
|
- 446360 check for lock didn't call chkconfig
|
|
|
|
|
2008-02-12 15:13:11 +00:00
|
|
|
* Tue Feb 12 2008 Marcela Maslanova <mmaslano@redhat.com> - 1.0-5
|
|
|
|
- upgrade from less than cronie-1.0-4 didn't add chkconfig
|
|
|
|
|
2008-02-07 14:50:24 +00:00
|
|
|
* Wed Feb 6 2008 Marcela Maslanova <mmaslano@redhat.com> - 1.0-4
|
|
|
|
- 431366 after reboot wasn't cron in chkconfig
|
|
|
|
|
2008-02-05 14:50:39 +00:00
|
|
|
* Tue Feb 5 2008 Marcela Maslanova <mmaslano@redhat.com> - 1.0-3
|
|
|
|
- 431366 trigger part => after update from vixie-cron on cronie will
|
|
|
|
be daemon running.
|
|
|
|
|
2008-01-30 15:25:26 +00:00
|
|
|
* Wed Jan 30 2008 Marcela Maslanova <mmaslano@redhat.com> - 1.0-2
|
|
|
|
- change the provides on higher version than obsoletes
|
|
|
|
|
2008-01-30 07:59:43 +00:00
|
|
|
* Tue Jan 8 2008 Marcela Maslanova <mmaslano@redhat.com> - 1.0-1
|
|
|
|
- packaging cronie
|
|
|
|
- thank's for help with packaging to my reviewers
|