anacron-vl.spec 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  1. Summary: A cron-like program that can run jobs lost during downtime.
  2. Name: anacron
  3. Version: 2.3
  4. Release: 29%{?_dist_release}
  5. License: GPL
  6. Group: System Environment/Base
  7. Source: ftp://ftp.debian.org/debian/pool/main/a/anacron/%{name}_%{version}.orig.tar.gz
  8. Source1: anacrontab
  9. Source2: anacron.init
  10. Patch0: anacron-2.3-mk-incl.patch
  11. Patch1: anacron-2.3-mail-content-type-77108.patch
  12. Patch2: anacron-2.3-gregor.patch
  13. Requires: /bin/sh
  14. Requires: crontabs
  15. Prereq: /sbin/chkconfig
  16. BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
  17. %description
  18. Anacron (like `anac(h)ronistic') is a periodic command scheduler. It
  19. executes commands at intervals specified in days. Unlike cron, it
  20. does not assume that the system is running continuously. It can
  21. therefore be used to control the execution of daily, weekly and
  22. monthly jobs (or anything with a period of n days), on systems that
  23. don't run 24 hours a day. When installed and configured properly,
  24. Anacron will make sure that the commands are run at the specified
  25. intervals as closely as machine-uptime permits.
  26. This package is pre-configured to execute the daily jobs of the Red
  27. Hat Linux system. You should install this program if your system isn't
  28. powered on 24 hours a day to make sure the maintenance jobs of other
  29. Red Hat Linux packages are executed each day.
  30. %prep
  31. %setup -q
  32. %patch0 -p1 -b .incl
  33. %patch1 -p1 -b .charset
  34. %patch2 -p1 -b .gregor
  35. %build
  36. make CFLAGS="$RPM_OPT_FLAGS"
  37. %install
  38. mkdir -p $RPM_BUILD_ROOT/{etc/,usr/sbin/,%{_mandir}/man5,%{_mandir}/man8/}
  39. mkdir -p $RPM_BUILD_ROOT/var/spool/anacron/
  40. #
  41. cp anacron $RPM_BUILD_ROOT/usr/sbin
  42. cp anacron.8 $RPM_BUILD_ROOT/%{_mandir}/man8/
  43. cp anacrontab.5 $RPM_BUILD_ROOT/%{_mandir}/man5/
  44. cp %SOURCE1 $RPM_BUILD_ROOT/etc
  45. for i in cron.daily cron.weekly cron.monthly;do
  46. mkdir -p $RPM_BUILD_ROOT/etc/$i/
  47. cat << EOF > $RPM_BUILD_ROOT/etc/$i/0anacron
  48. #!/bin/sh
  49. #
  50. # anacron's cron script
  51. #
  52. # This script updates anacron time stamps. It is called through run-parts
  53. # either by anacron itself or by cron.
  54. #
  55. # The script is called "0anacron" to assure that it will be executed
  56. # _before_ all other scripts.
  57. anacron -u $i
  58. EOF
  59. chmod +x $RPM_BUILD_ROOT/etc/$i/0anacron
  60. done
  61. #
  62. #for i in `find $RPM_BUILD_ROOT/ -type 'f' -perm '+a=x'`;do
  63. # file $i|grep -q "not stripped" && strip $i
  64. #done
  65. mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d/
  66. install -c -m755 %SOURCE2 $RPM_BUILD_ROOT/etc/rc.d/init.d/anacron
  67. %clean
  68. rm -rf $RPM_BUILD_ROOT
  69. %post
  70. /sbin/chkconfig --add anacron
  71. %preun
  72. if [ "$1" = "0" ]; then
  73. service anacron stop >/dev/null 2>&1
  74. /sbin/chkconfig --del anacron
  75. fi
  76. %postun
  77. if [ "$1" -ge "1" ]; then
  78. service anacron condrestart >/dev/null 2>&1
  79. fi
  80. %files
  81. %defattr(-,root,root,0755)
  82. %doc COPYING README
  83. %config /etc/anacrontab
  84. %dir /var/spool/anacron/
  85. %config /etc/rc.d/init.d/*
  86. /%{_mandir}/man5/*
  87. /%{_mandir}/man8/*
  88. /usr/sbin/anacron
  89. %config /etc/cron.daily/0anacron
  90. %config /etc/cron.monthly/0anacron
  91. %config /etc/cron.weekly/0anacron
  92. %changelog
  93. * Fri Aug 15 2008 Shu KONNO <owa@bg.wakwak.com> 2.3-29vl5
  94. - applied new versioning policy
  95. * Sat Jul 08 2006 Shu KONNO <owa@bg.wakwak.com> 2.3-29vl2
  96. - added anacron-2.3-gregor.patch
  97. * Wed Jul 23 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.3-29vl1
  98. - rebuild for Vine Linux
  99. * Thu Jul 10 2003 Jens Petersen <petersen@redhat.com> - 2.3-29
  100. - don't require vixie-cron (#21176) [reported by Gerald Teschl]
  101. - in init script don't remove /var/lock/subsys/anacron when stopping (#58462)
  102. - exit init script with actual exit status (#44600) [reported by Enrico Scholz]
  103. * Thu Jul 10 2003 Jens Petersen <petersen@redhat.com> - 2.3-28
  104. - add a Content-Type header to mails giving the charset encoding (#77108)
  105. * Thu Jul 10 2003 Jens Petersen <petersen@redhat.com> - 2.3-27
  106. - in init script do not touch /var/lock/subsys/anacron when starting (#58462)
  107. - require crontabs (#21176)
  108. - update source url
  109. * Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com>
  110. - rebuilt
  111. * Wed Jan 22 2003 Tim Powers <timp@redhat.com>
  112. - rebuilt
  113. * Wed Dec 11 2002 Tim Powers <timp@redhat.com> 2.3-24
  114. - rebuild on all arches
  115. * Fri Aug 23 2002 Jens Petersen <petersen@redhat.com> 2.3-23
  116. - delay the start of anacron by 60min to make startup more pleasant (#68304)
  117. - at startup run jobs serially and nice 19 to reduce load (#65870, #68304)
  118. - spec file now in utf-8
  119. - dont install non-existant NEWS file
  120. - silence make include warnings
  121. * Fri Jul 19 2002 Akira TAGOH <tagoh@redhat.com> 2.3-22
  122. - fix the stripped binary issue.
  123. * Mon Jul 08 2002 Bill Huang <bhuang@redhat.com>
  124. - Update "Copyright" to "License" in spec file
  125. * Fri Jun 21 2002 Tim Powers <timp@redhat.com>
  126. - automated rebuild
  127. * Thu May 23 2002 Tim Powers <timp@redhat.com>
  128. - automated rebuild
  129. * Wed Jan 09 2002 Tim Powers <timp@redhat.com>
  130. - automated rebuild
  131. * Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com>
  132. - Bump release + rebuild.
  133. * Tue Apr 3 2001 Crutcher Dunnavant <crutcher@redhat.com>
  134. - add dependancy to vixie-cron (for /usr/bin/run-parts)
  135. * Tue Feb 13 2001 Tim Waugh <twaugh@redhat.com>
  136. - killproc is a shell function and can't be passed as a parameter
  137. (bug #27150).
  138. * Mon Feb 5 2001 Bernhard Rosenkraenzer <bero@redhat.com>
  139. - Fix i18n in initscript ("Stopping anacron" wasn't translated)
  140. (#26076)
  141. * Fri Feb 2 2001 Trond Eivind Glomsrød <teg@redhat.com>
  142. - i18nize initscript
  143. * Thu Dec 7 2000 Crutcher Dunnavant <crutcher@redhat.com>
  144. - rebuild in rebuild cycle.
  145. * Mon Oct 30 2000 Matt Wilson <msw@redhat.com>
  146. - touch /var/lock/subsys/anacron to prevent excess startage during
  147. init level change
  148. * Wed Aug 30 2000 Bernhard Rosenkraenzer <bero@redhat.com>
  149. - Shut down earlier to prevent NFS mounted /usr filesystems from causing
  150. problems (Bug #16257)
  151. * Fri Aug 4 2000 Bernhard Rosenkraenzer <bero@redhat.com>
  152. - Start it later so services some cron scripts may depend on are running
  153. (Bug #15335)
  154. * Thu Aug 3 2000 Bernhard Rosenkraenzer <bero@redhat.com>
  155. - Fix up initscript (Bug #15123 and an unreported bug)
  156. * Sat Jul 15 2000 Bill Nottingham <notting@redhat.com>
  157. - move initscript back
  158. * Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
  159. - automatic rebuild
  160. * Mon Jul 10 2000 Bernhard Rosenkraenzer <bero@redhat.com>
  161. - Fix up initscripts (Bug #13625)
  162. * Tue Jul 4 2000 Matt Wilson <msw@redhat.com>
  163. - Prereq: /sbin/chkconfig
  164. * Mon Jun 26 2000 Preston Brown <pbrown@redhat.com>
  165. - move initscript to /etc/init.d, fix up post/preun/postun scripts.
  166. * Sun Jun 26 2000 Bernhard Rosenkraenzer <bero@redhat.com>
  167. - 2.3
  168. * Sun Jun 18 2000 Matt Wilson <msw@redhat.com>
  169. - use %%{_mandir}
  170. * Fri Mar 03 2000 Tim Powers <timp@redhat.com>
  171. - fixed startup script so that it doesn't put stuff in /var/lock/subsys.
  172. Complains since anacronda turns itself off when it is run, and the file in
  173. /var/lock/subsys isn't removed.
  174. * Mon Feb 28 2000 Tim Powers <timp@redhat.com>
  175. - fixed startup script, now it actually stops, gives status and restarts.
  176. Fixes bug #9835
  177. * Mon Feb 7 2000 Bill Nottingham <notting@redhat.com>
  178. - handle compressed manpages
  179. * Fri Feb 4 2000 Bernhard Rosenkraenzer <bero@redhat.com>
  180. - rebuild to get compressed man pages
  181. - mark /etc/cron.daily/... as config files
  182. * Wed Feb 02 2000 Cristian Gafton <gafton@redhat.com>
  183. - fix annoying defines
  184. - rebuild to update description and group
  185. * Thu Jan 6 2000 Bernhard Rosenkränzer <bero@redhat.com>
  186. - initial Red Hat package
  187. * Wed Dec 29 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>
  188. - Remove cron.hourly check (unusefull).
  189. * Wed Nov 10 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>
  190. - 2.1 from debian.
  191. - Fix typo in initscripts.
  192. * Thu Jul 22 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>
  193. - Fix wrong entries in anacrontab.
  194. - Add a /etc/rc.sysinit/ script
  195. * Tue Apr 27 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>
  196. - Fix bug with /var/spool/anacron/
  197. * Sat Apr 10 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>
  198. - First version mainly inspired from the Debian package.