anacron-vl.spec 8.0 KB

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