343 lines
11 KiB
RPMSpec
343 lines
11 KiB
RPMSpec
Summary: A cron-like program that can run jobs lost during downtime
|
|
Name: anacron
|
|
Version: 2.3
|
|
Release: 47%{?dist}
|
|
License: GPL
|
|
Group: System Environment/Base
|
|
URL: http://packages.debian.org/stable/source/anacron
|
|
Source: http://ftp.debian.org/debian/pool/main/a/anacron/%{name}_%{version}.orig.tar.gz
|
|
Source1: anacrontab
|
|
Source2: anacron.init
|
|
Patch0: anacron-2.3-mk-incl.patch
|
|
Patch1: anacron-2.3-mail-content-type-77108.patch
|
|
Patch2: anacron-2.3-noconst.patch
|
|
Patch3: anacron-2.3-mailto.patch
|
|
Patch4: anacron-2.3-lock-files.patch
|
|
Patch5: anacron-2.3-fdclose.patch
|
|
Patch6: anacron-2.3-hostname.patch
|
|
#Patch7: anacron-2.3-pie.patch
|
|
#Patch8: anacron-2.3-memoryleak.patch
|
|
Patch9: anacron-2.3-pic.patch
|
|
Patch10: anacron-2.3-memleaking.patch
|
|
Requires: /bin/sh
|
|
Requires: crontabs
|
|
Requires: initscripts
|
|
Requires(post): /sbin/chkconfig
|
|
Requires(preun): /sbin/chkconfig
|
|
Requires(postun): /sbin/service
|
|
Requires(preun): /sbin/service
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
|
|
|
|
%description
|
|
Anacron (like `anac(h)ronistic') is a periodic command scheduler.
|
|
It executes commands at intervals specified in days. Unlike cron, it
|
|
does not assume that the system is running continuously. It can
|
|
therefore be used to control the execution of daily, weekly and
|
|
monthly jobs (or anything with a period of n days), on systems that
|
|
don't run 24 hours a day. When installed and configured properly,
|
|
Anacron will make sure that the commands are run at the specified
|
|
intervals as closely as machine-uptime permits.
|
|
|
|
This package is pre-configured to execute the daily jobs of the Red
|
|
Hat Linux (Fedora Core) system. You should install this program if your
|
|
system isn't powered on 24 hours a day to make sure the maintenance
|
|
jobs of other Red Hat Linux (Fedora Core) packages are executed each day.
|
|
|
|
%prep
|
|
%setup -q
|
|
%patch0 -p1 -b .incl
|
|
%patch1 -p1 -b .charset
|
|
%patch2 -p1 -b .noconst
|
|
%patch3 -p1 -b .mailto
|
|
%patch4 -p1 -b .lock-files
|
|
%patch5 -p1 -b .fdclose
|
|
%patch6 -p1 -b .hostname
|
|
#%patch7 -p1 -b .pie
|
|
#%patch8 -p1 -b .memoryleak
|
|
%patch9 -p1 -b .pic
|
|
%patch10 -p1 -b .memleaking
|
|
|
|
%build
|
|
make CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags}
|
|
|
|
%install
|
|
rm -rf $RPM_BUILD_ROOT
|
|
mkdir -p $RPM_BUILD_ROOT/{etc/,usr/sbin/,%{_mandir}/man5,%{_mandir}/man8/}
|
|
mkdir -p $RPM_BUILD_ROOT/var/spool/anacron/
|
|
|
|
#
|
|
cp anacron $RPM_BUILD_ROOT/usr/sbin
|
|
cp anacron.8 $RPM_BUILD_ROOT/%{_mandir}/man8/
|
|
cp anacrontab.5 $RPM_BUILD_ROOT/%{_mandir}/man5/
|
|
cp %SOURCE1 $RPM_BUILD_ROOT/etc
|
|
|
|
for i in cron.daily cron.weekly cron.monthly;do
|
|
mkdir -p $RPM_BUILD_ROOT/etc/$i/
|
|
cat << EOF > $RPM_BUILD_ROOT/etc/$i/0anacron
|
|
#!/bin/sh
|
|
#
|
|
# anacron's cron script
|
|
#
|
|
# This script updates anacron time stamps. It is called through run-parts
|
|
# either by anacron itself or by cron.
|
|
#
|
|
# The script is called "0anacron" to assure that it will be executed
|
|
# _before_ all other scripts.
|
|
|
|
# Don't run anacron if this script is called by anacron.
|
|
if [ ! -e /var/run/anacron.pid ]; then
|
|
anacron -u $i
|
|
fi
|
|
|
|
EOF
|
|
chmod +x $RPM_BUILD_ROOT/etc/$i/0anacron
|
|
done
|
|
|
|
#
|
|
#for i in `find $RPM_BUILD_ROOT/ -type 'f' -perm '+a=x'`;do
|
|
# file $i|grep -q "not stripped" && strip $i
|
|
#done
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d/
|
|
install -c -m755 %SOURCE2 $RPM_BUILD_ROOT/etc/rc.d/init.d/anacron
|
|
|
|
%clean
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
%post
|
|
/sbin/chkconfig --add anacron
|
|
|
|
%preun
|
|
if [ "$1" = "0" ]; then
|
|
service anacron stop >/dev/null 2>&1
|
|
/sbin/chkconfig --del anacron
|
|
fi
|
|
|
|
%postun
|
|
if [ "$1" -ge "1" ]; then
|
|
service anacron condrestart >/dev/null 2>&1
|
|
fi
|
|
|
|
%files
|
|
%defattr(-,root,root,0755)
|
|
%doc COPYING README
|
|
%config(noreplace) /etc/anacrontab
|
|
%dir /var/spool/anacron/
|
|
%config(noreplace) /etc/rc.d/init.d/*
|
|
/%{_mandir}/man5/*
|
|
/%{_mandir}/man8/*
|
|
/usr/sbin/anacron
|
|
##%config(noreplace) /etc/cron.daily/0anacron
|
|
%attr(755,root,root) %dir /etc/cron.daily/0anacron
|
|
%attr(755,root,root) %dir /etc/cron.monthly/0anacron
|
|
%attr(755,root,root) %dir /etc/cron.weekly/0anacron
|
|
|
|
%changelog
|
|
* Tue Feb 6 2007 Marcela Maslanova <mmaslano@redhat.com> 2.3-47
|
|
- thanks for review from Jef Spaleta
|
|
- rhbz#225247, rhbz#211309
|
|
|
|
* Mon Dec 04 2006 Marcela Maslanova <mmaslano@redhat.com> 2.3-45
|
|
- rebuilt with pie insted pic
|
|
|
|
* Tue Oct 10 2006 Marcela Maslanova <mmaslano@redhat.com> 2.3-44
|
|
- fix memory leaking (both #210020)
|
|
- PIE(PIC) executable
|
|
|
|
* Tue Oct 2 2006 Marcela Maslanova <mmaslano@redhat.com> 2.3-42
|
|
- hostname added to mail (#208914)
|
|
|
|
* Fri Sep 29 2006 Marcela Maslanova <mmaslano@redhat.com> 2.3-41
|
|
- change spec file - patch from Orion Poplawski (#191410)
|
|
|
|
* Mon Sep 11 2006 Dan Walsh <dwalsh@redhat.com> 2.3-40
|
|
- Grab the fdclose patch from FC4
|
|
- fix bug 185973: allow use of sendmail under selinux-policy-strict:
|
|
apply patch contributed by Ted Rule<ejtr@layer3.co.uk>
|
|
|
|
* Wed Aug 30 2006 Jitka Kudrnacova <jkudrnac@redhat.com> - 2.3-39
|
|
- modified PATH in /etc/anacrontab file to make the same as in /etc/crontab (#61891)
|
|
|
|
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 2.3-38.FC6.1
|
|
- rebuild
|
|
|
|
* Thu Apr 13 2006 Jason Vas Dias <jvdias@redhat.com> - 2.3-38.1
|
|
- fix bug 188403: anacron SysVinit locking:
|
|
Since anacron just exits when it has no more work to do, the
|
|
initscript cannot do normal /var/lock/subsys/anacron lock file
|
|
creation, else messages such as 'anacron dead but subsys locked'
|
|
will appear when changing init levels.
|
|
|
|
Now, the anacron process itself creates its own
|
|
/var/lock/subsys/anacron SysVinit lock file and
|
|
/var/run/anacron.pid pid file to co-operate more
|
|
gracefully with the initscript system.
|
|
|
|
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 2.3-36.1
|
|
- bump again for double-long bug on ppc(64)
|
|
|
|
* Tue Feb 07 2006 Jason Vas Dias <jvdias@redhat.com> - 2.3-36
|
|
- rebuild for new gcc, glibc, glibc-kernheaders
|
|
|
|
* Wed Jan 11 2006 Peter Jones <pjones@redhat.com> 2.3-35
|
|
- Fix initscript so changing runlevel shuts it down correctly
|
|
|
|
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
|
|
- rebuilt
|
|
|
|
* Wed Mar 16 2005 Jason Vas Dias <jvdias@redhat.com> 2.3-34
|
|
- Rebuild with gcc4 in FC4.
|
|
|
|
* Mon Feb 21 2005 Jason Vas Dias <jvdias@redhat.com> 2.3-33
|
|
- Rebuild for FC4 .
|
|
|
|
* Tue Sep 28 2004 Rik van Riel <riel@redhat.com> 2.3-32
|
|
- add MAILTO option, like vixie cron has (bz#127924)
|
|
|
|
* Fri Jul 2 2004 Elliot Lee <sopwith@redhat.com>
|
|
- rebuilt
|
|
- Add noconst patch to fix invalid C
|
|
|
|
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
|
|
- rebuilt
|
|
|
|
* Thu Jul 10 2003 Jens Petersen <petersen@redhat.com> - 2.3-29
|
|
- don't require vixie-cron (#21176) [reported by Gerald Teschl]
|
|
- in init script don't remove /var/lock/subsys/anacron when stopping (#58462)
|
|
- exit init script with actual exit status (#44600) [reported by Enrico Scholz]
|
|
|
|
* Thu Jul 10 2003 Jens Petersen <petersen@redhat.com> - 2.3-28
|
|
- add a Content-Type header to mails giving the charset encoding (#77108)
|
|
|
|
* Thu Jul 10 2003 Jens Petersen <petersen@redhat.com> - 2.3-27
|
|
- in init script do not touch /var/lock/subsys/anacron when starting (#58462)
|
|
- require crontabs (#21176)
|
|
- update source url
|
|
|
|
* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com>
|
|
- rebuilt
|
|
|
|
* Wed Jan 22 2003 Tim Powers <timp@redhat.com>
|
|
- rebuilt
|
|
|
|
* Wed Dec 11 2002 Tim Powers <timp@redhat.com> 2.3-24
|
|
- rebuild on all arches
|
|
|
|
* Fri Aug 23 2002 Jens Petersen <petersen@redhat.com> 2.3-23
|
|
- delay the start of anacron by 60min to make startup more pleasant (#68304)
|
|
- at startup run jobs serially and nice 19 to reduce load (#65870, #68304)
|
|
- spec file now in utf-8
|
|
- dont install non-existant NEWS file
|
|
- silence make include warnings
|
|
|
|
* Fri Jul 19 2002 Akira TAGOH <tagoh@redhat.com> 2.3-22
|
|
- fix the stripped binary issue.
|
|
|
|
* Mon Jul 08 2002 Bill Huang <bhuang@redhat.com>
|
|
- Update "Copyright" to "License" in spec file
|
|
|
|
* Fri Jun 21 2002 Tim Powers <timp@redhat.com>
|
|
- automated rebuild
|
|
|
|
* Thu May 23 2002 Tim Powers <timp@redhat.com>
|
|
- automated rebuild
|
|
|
|
* Wed Jan 09 2002 Tim Powers <timp@redhat.com>
|
|
- automated rebuild
|
|
|
|
* Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com>
|
|
- Bump release + rebuild.
|
|
|
|
* Tue Apr 3 2001 Crutcher Dunnavant <crutcher@redhat.com>
|
|
- add dependancy to vixie-cron (for /usr/bin/run-parts)
|
|
|
|
* Tue Feb 13 2001 Tim Waugh <twaugh@redhat.com>
|
|
- killproc is a shell function and can't be passed as a parameter
|
|
(bug #27150).
|
|
|
|
* Mon Feb 5 2001 Bernhard Rosenkraenzer <bero@redhat.com>
|
|
- Fix i18n in initscript ("Stopping anacron" wasn't translated)
|
|
(#26076)
|
|
|
|
* Fri Feb 2 2001 Trond Eivind Glomsrød <teg@redhat.com>
|
|
- i18nize initscript
|
|
|
|
* Thu Dec 7 2000 Crutcher Dunnavant <crutcher@redhat.com>
|
|
- rebuild in rebuild cycle.
|
|
|
|
* Mon Oct 30 2000 Matt Wilson <msw@redhat.com>
|
|
- touch /var/lock/subsys/anacron to prevent excess startage during
|
|
init level change
|
|
|
|
* Wed Aug 30 2000 Bernhard Rosenkraenzer <bero@redhat.com>
|
|
- Shut down earlier to prevent NFS mounted /usr filesystems from causing
|
|
problems (Bug #16257)
|
|
|
|
* Fri Aug 4 2000 Bernhard Rosenkraenzer <bero@redhat.com>
|
|
- Start it later so services some cron scripts may depend on are running
|
|
(Bug #15335)
|
|
|
|
* Thu Aug 3 2000 Bernhard Rosenkraenzer <bero@redhat.com>
|
|
- Fix up initscript (Bug #15123 and an unreported bug)
|
|
|
|
* Sat Jul 15 2000 Bill Nottingham <notting@redhat.com>
|
|
- move initscript back
|
|
|
|
* Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
|
|
- automatic rebuild
|
|
|
|
* Mon Jul 10 2000 Bernhard Rosenkraenzer <bero@redhat.com>
|
|
- Fix up initscripts (Bug #13625)
|
|
|
|
* Tue Jul 4 2000 Matt Wilson <msw@redhat.com>
|
|
- Prereq: /sbin/chkconfig
|
|
|
|
* Mon Jun 26 2000 Preston Brown <pbrown@redhat.com>
|
|
- move initscript to /etc/init.d, fix up post/preun/postun scripts.
|
|
|
|
* Sun Jun 26 2000 Bernhard Rosenkraenzer <bero@redhat.com>
|
|
- 2.3
|
|
|
|
* Sun Jun 18 2000 Matt Wilson <msw@redhat.com>
|
|
- use %%{_mandir}
|
|
|
|
* Fri Mar 03 2000 Tim Powers <timp@redhat.com>
|
|
- fixed startup script so that it doesn't put stuff in /var/lock/subsys.
|
|
Complains since anacronda turns itself off when it is run, and the file in
|
|
/var/lock/subsys isn't removed.
|
|
|
|
* Mon Feb 28 2000 Tim Powers <timp@redhat.com>
|
|
- fixed startup script, now it actually stops, gives status and restarts.
|
|
Fixes bug #9835
|
|
|
|
* Mon Feb 7 2000 Bill Nottingham <notting@redhat.com>
|
|
- handle compressed manpages
|
|
|
|
* Fri Feb 4 2000 Bernhard Rosenkraenzer <bero@redhat.com>
|
|
- rebuild to get compressed man pages
|
|
- mark /etc/cron.daily/... as config files
|
|
|
|
* Wed Feb 02 2000 Cristian Gafton <gafton@redhat.com>
|
|
- fix annoying defines
|
|
- rebuild to update description and group
|
|
|
|
* Thu Jan 6 2000 Bernhard Rosenkränzer <bero@redhat.com>
|
|
- initial Red Hat package
|
|
|
|
* Wed Dec 29 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>
|
|
- Remove cron.hourly check (unusefull).
|
|
|
|
* Wed Nov 10 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>
|
|
- 2.1 from debian.
|
|
- Fix typo in initscripts.
|
|
|
|
* Thu Jul 22 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>
|
|
- Fix wrong entries in anacrontab.
|
|
- Add a /etc/rc.sysinit/ script
|
|
|
|
* Tue Apr 27 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>
|
|
- Fix bug with /var/spool/anacron/
|
|
|
|
* Sat Apr 10 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>
|
|
- First version mainly inspired from the Debian package.
|