anacron-vl.spec 8.1 KB

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