cronie-vl.spec 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467
  1. %bcond_with selinux
  2. %bcond_without pam
  3. %bcond_without audit
  4. %bcond_without inotify
  5. %define ver 1.5.1
  6. %define rel 1
  7. Summary: Cron daemon for executing programs at set times
  8. Name: cronie
  9. Version: %{ver}
  10. Release: %{rel}%{?_dist_release}
  11. License: MIT and BSD and ISC and GPLv2+
  12. Group: System Environment/Base
  13. URL: https://fedorahosted.org/cronie
  14. Source0: https://fedorahosted.org/releases/c/r/cronie/%{name}-%{version}.tar.gz
  15. # from cronie 1.4.8 tarball
  16. Source1: cronie.init
  17. Patch0: cronie-1.5.1-power.patch
  18. Patch1: cronie-1.5.1-y2038.patch
  19. Requires: dailyjobs
  20. Conflicts: vixie-cron
  21. Vendor: Project Vine
  22. Distribution: Vine Linux
  23. Packager: iwaim
  24. %if %{with selinux}
  25. Requires: libselinux >= 2.0.64
  26. Buildrequires: libselinux-devel >= 2.0.64
  27. %endif
  28. %if %{with pam}
  29. Requires: pam >= 1.0.1
  30. Buildrequires: pam-devel >= 1.0.1
  31. %endif
  32. %if %{with audit}
  33. Buildrequires: audit-libs-devel >= 1.4.1
  34. %endif
  35. Requires(post): coreutils sed
  36. Requires(post): chkconfig
  37. Requires(preun): chkconfig
  38. Obsoletes: vixie-cron <= 3.0.1
  39. %description
  40. Cronie contains the standard UNIX daemon crond that runs specified programs at
  41. scheduled times and related tools. It is a fork of the original vixie-cron and
  42. has security and configuration enhancements like the ability to use pam and
  43. SELinux.
  44. %package anacron
  45. Summary: Utility for running regular jobs
  46. Requires: crontabs
  47. Group: System Environment/Base
  48. Provides: dailyjobs
  49. Provides: anacron = 2.4
  50. Obsoletes: anacron <= 2.3
  51. Requires(post): coreutils
  52. Requires: %{name} = %{version}-%{release}
  53. %description anacron
  54. Anacron is part of cronie that is used for running jobs with regular
  55. periodicity which do not have exact time of day of execution.
  56. The default settings of anacron execute the daily, weekly, and monthly
  57. jobs, but anacron allows setting arbitrary periodicity of jobs.
  58. Using anacron allows running the periodic jobs even if the system is often
  59. powered off and it also allows randomizing the time of the job execution
  60. for better utilization of resources shared among multiple systems.
  61. %package noanacron
  62. Summary: Utility for running simple regular jobs in old cron style
  63. Group: System Environment/Base
  64. Provides: dailyjobs
  65. Requires: crontabs
  66. Requires: %{name} = %{version}-%{release}
  67. %description noanacron
  68. Old style of running {hourly,daily,weekly,monthly}.jobs without anacron. No
  69. extra features.
  70. %prep
  71. %setup -q
  72. %patch0 -p1 -b .power
  73. %patch1 -p1 -b .y2038
  74. %build
  75. %configure \
  76. %if %{with pam}
  77. --with-pam \
  78. %endif
  79. %if %{with selinux}
  80. --with-selinux \
  81. %endif
  82. %if %{with audit}
  83. --with-audit \
  84. %endif
  85. %if %{with inotify}
  86. --with-inotify \
  87. %endif
  88. --enable-anacron \
  89. --enable-pie \
  90. --enable-relro
  91. make %{?_smp_mflags}
  92. %install
  93. make install DESTDIR=$RPM_BUILD_ROOT DESTMAN=$RPM_BUILD_ROOT%{_mandir}
  94. mkdir -pm700 $RPM_BUILD_ROOT%{_localstatedir}/spool/cron
  95. mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/
  96. mkdir -pm755 $RPM_BUILD_ROOT%{_sysconfdir}/cron.d/
  97. %if ! %{with pam}
  98. rm -f $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/crond
  99. %endif
  100. install -m 600 crond.sysconfig $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/crond
  101. touch $RPM_BUILD_ROOT%{_sysconfdir}/cron.deny
  102. install -m 600 contrib/anacrontab $RPM_BUILD_ROOT%{_sysconfdir}/anacrontab
  103. install -c -m755 contrib/0hourly $RPM_BUILD_ROOT%{_sysconfdir}/cron.d/0hourly
  104. mkdir -pm 700 $RPM_BUILD_ROOT%{_sysconfdir}/cron.hourly
  105. install -c -m755 contrib/0anacron $RPM_BUILD_ROOT%{_sysconfdir}/cron.hourly/0anacron
  106. mkdir -p $RPM_BUILD_ROOT/var/spool/anacron
  107. touch $RPM_BUILD_ROOT/var/spool/anacron/cron.daily
  108. touch $RPM_BUILD_ROOT/var/spool/anacron/cron.weekly
  109. touch $RPM_BUILD_ROOT/var/spool/anacron/cron.monthly
  110. # noanacron package
  111. install -m 644 contrib/dailyjobs $RPM_BUILD_ROOT/%{_sysconfdir}/cron.d/dailyjobs
  112. # install initscript
  113. mkdir -p $RPM_BUILD_ROOT%{_initddir}
  114. install -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_initddir}/crond
  115. %post
  116. # run after an installation
  117. /sbin/chkconfig --add crond
  118. %post anacron
  119. [ -e /var/spool/anacron/cron.daily ] || touch /var/spool/anacron/cron.daily
  120. [ -e /var/spool/anacron/cron.weekly ] || touch /var/spool/anacron/cron.weekly
  121. [ -e /var/spool/anacron/cron.monthly ] || touch /var/spool/anacron/cron.monthly
  122. %preun
  123. # run before a package is removed
  124. if [ "$1" -eq 0 ]; then
  125. /sbin/service crond stop >/dev/null 2>&1
  126. /sbin/chkconfig --del crond
  127. fi
  128. %postun
  129. # run after a package is removed
  130. if [ "$1" -ge "1" ]; then
  131. /sbin/service crond condrestart >/dev/null 2>&1 || :
  132. fi
  133. %triggerpostun -- vixie-cron
  134. /sbin/chkconfig --add crond
  135. %files
  136. %doc AUTHORS COPYING INSTALL README ChangeLog
  137. %attr(755,root,root) %{_sbindir}/crond
  138. %attr(4755,root,root) %{_bindir}/crontab
  139. %{_mandir}/man8/crond.*
  140. %{_mandir}/man8/cron.*
  141. %{_mandir}/man5/crontab.*
  142. %{_mandir}/man1/crontab.*
  143. %dir %{_localstatedir}/spool/cron
  144. %dir %{_sysconfdir}/cron.d
  145. %if %{with pam}
  146. %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/pam.d/crond
  147. %endif
  148. %attr(0600,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/crond
  149. %attr(0600,root,root) %config(noreplace) %{_sysconfdir}/cron.deny
  150. %attr(0644,root,root) %{_sysconfdir}/cron.d/0hourly
  151. %attr(0755,root,root) %{_initddir}/crond
  152. %files anacron
  153. %{_sbindir}/anacron
  154. %attr(0755,root,root) %{_sysconfdir}/cron.hourly/0anacron
  155. %attr(0600,root,root) %config(noreplace) %{_sysconfdir}/anacrontab
  156. %dir /var/spool/anacron
  157. %ghost %verify(not md5 size mtime) /var/spool/anacron/cron.daily
  158. %ghost %verify(not md5 size mtime) /var/spool/anacron/cron.weekly
  159. %ghost %verify(not md5 size mtime) /var/spool/anacron/cron.monthly
  160. %{_mandir}/man5/anacrontab.*
  161. %{_mandir}/man8/anacron.*
  162. %files noanacron
  163. %attr(0644,root,root) %{_sysconfdir}/cron.d/dailyjobs
  164. %changelog
  165. * Mon Sep 11 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.5.1-1
  166. - new upstream release.
  167. - dropped Patch0.
  168. - imported Patch0 and Patch1 from rawhide.
  169. * Sat Jul 25 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.5.0-1
  170. - new upstream release.
  171. - dropped all patches.
  172. - imported Patch0 from rawhide.
  173. - added O:vixie-cron.
  174. * Thu Jun 26 2014 IWAI, Masaharu <iwaim.sub@gmail.com> 1.4.11-2
  175. - run chkconfig for vixie-cron in triggerpostun script
  176. * Thu Jun 26 2014 IWAI, Masaharu <iwaim.sub@gmail.com> 1.4.11-1
  177. - initial build for Vine Linux
  178. * Mon Jan 27 2014 Marcela Mašláňová <mmaslano@redhat.com> - 1.4.11-11
  179. - now it's work even on ppc64, all checks working correctly
  180. - Related: rhbz#1031384
  181. * Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 1.4.11-10
  182. - Mass rebuild 2014-01-24
  183. * Wed Jan 22 2014 Marcela Mašláňová <mmaslano@redhat.com> - 1.4.11-9
  184. - fix coverity warnings about dead code. Incorrect checking of values.
  185. - Related: rhbz#1031384
  186. * Mon Jan 20 2014 Marcela Mašláňová <mmaslano@redhat.com> - 1.4.11-8
  187. - anacron do not execute jobs run from command line
  188. - Related: rhbz#1031384
  189. * Wed Jan 08 2014 Marcela Mašláňová <mmaslano@redhat.com> - 1.4.11-7
  190. - anacron segfaults with certain config data
  191. - Resolves: rhbz#1031384
  192. * Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 1.4.11-6
  193. - Mass rebuild 2013-12-27
  194. * Tue Oct 15 2013 Marcela Mašláňová <mmaslano@redhat.com> - 1.4.11-5
  195. - Cronie doesn't work when is executed as stand alone without systemd (for
  196. debuging issues)
  197. - Fix another permission, hopefully all now.
  198. - Resolves: rhbz#1012420, rhbz#1015567
  199. * Fri Sep 13 2013 Marcela Mašláňová <mmaslano@redhat.com> - 1.4.11-4
  200. - fix permission on configuration files, same as rhbz#706979
  201. * Fri Aug 30 2013 Marcela Mašláňová <mmaslano@redhat.com> - 1.4.11-3
  202. - 919290 systemd script use "KillMode=process"
  203. - Fcntl locking has different semantics than flock. Prefer flock.
  204. - 49225e172d156531ca142518d2638350752e373a
  205. - Pull PAM environment variables also from session modules.
  206. - c8e7d1b43c86a85441cb09cf7e08090f3ec1f384
  207. * Mon Jul 22 2013 Marcela Mašláňová <mmaslano@redhat.com> - 1.4.11-2
  208. - scriptlets are not created correctly if systemd is not in BR 986698
  209. - remove sub-package sysvinit, which is not needed anymore
  210. - update license, anacron is under GPLv2+
  211. * Thu Jul 18 2013 Marcela Mašláňová <mmaslano@redhat.com> - 1.4.11-1
  212. - new release 1.4.11 (contains previous bug fixes from 1.4.10-5)
  213. * Tue Jun 11 2013 Tomáš Mráz <tmraz@redhat.com> - 1.4.10-5
  214. - add support for RANDOM_DELAY - delaying job startups
  215. - pass some environment variables to processes (LANG, etc.) (#969761)
  216. - do not use putenv() with string literals (#971516)
  217. * Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.10-4
  218. - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
  219. * Wed Jan 2 2013 Marcela Mašláňová <mmaslano@redhat.com> - 1.4.10-3
  220. - change configuration files to 644
  221. - change 6755 to 4755 for crontab binary
  222. * Tue Nov 27 2012 Marcela Mašláňová <mmaslano@redhat.com> - 1.4.10-1
  223. - New release 1.4.10
  224. * Thu Nov 22 2012 Marcela Mašláňová <mmaslano@redhat.com> - 1.4.9-1
  225. - New release 1.4.9
  226. * Wed Sep 05 2012 Václav Pavlín <vpavlin@redhat.com> - 1.4.8-13
  227. - Scriptlets replaced with new systemd macros (#850070)
  228. * Fri Jul 27 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.8-12
  229. - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
  230. * Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.8-11
  231. - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
  232. * Wed Oct 26 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.8-10
  233. - Rebuilt for glibc bug#747377
  234. * Tue Oct 25 2011 Tomáš Mráz <tmraz@redhat.com> - 1.4.8-9
  235. - make crond run a little bit later in the boot process (#747759)
  236. * Mon Oct 17 2011 Marcela Mašláňová <mmaslano@redhat.com> - 1.4.8-8
  237. - change triggerun to fix 735802 during upgrade
  238. * Wed Jul 27 2011 Karsten Hopp <karsten@redhat.com> 1.4.8-7
  239. - rebuild again, ppc still had the broken rpm in the buildroots
  240. * Thu Jul 21 2011 Rex Dieter <rdieter@fedoraproject.org> 1.4.8-6
  241. - rebuild (broken rpm in buildroot)
  242. * Thu Jul 21 2011 Marcela Mašláňová <mmaslano@redhat.com> - 1.4.8-5
  243. - fix permission of init.d/crond
  244. * Thu Jun 30 2011 Tomáš Mráz <tmraz@redhat.com> - 1.4.8-4
  245. - drop the without systemd build condition
  246. - add the chkconfig readding trigger to the sysvinit subpackage
  247. * Wed Jun 29 2011 Tomáš Mráz <tmraz@redhat.com> - 1.4.8-3
  248. - start crond after auditd
  249. * Wed Jun 29 2011 Tomáš Mráz <tmraz@redhat.com> - 1.4.8-2
  250. - fix inotify support to not leak fds (#717505)
  251. * Tue Jun 28 2011 Marcela Mašláňová <mmaslano@redhat.com> - 1.4.8-1
  252. - update to 1.4.8
  253. - create sub-package sysvinit for initscript
  254. * Mon May 9 2011 Marcela Mašláňová <mmaslano@redhat.com> - 1.4.7-3
  255. - missing requirement on systemd-sysv for scriptlets
  256. * Thu May 05 2011 Tomáš Mráz <tmraz@redhat.com> - 1.4.7-2
  257. - use only systemd units with systemd
  258. - add trigger for restart on glibc, libselinux or pam upgrades (#699189)
  259. * Tue Mar 15 2011 Marcela Mašláňová <mmaslano@redhat.com> - 1.4.7-1
  260. - new release 1.4.7
  261. * Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.6-9
  262. - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
  263. * Mon Jan 17 2011 Marcela Mašláňová <mmaslano@redhat.com> - 1.4.6-8
  264. - enable crond even with systemctl
  265. * Thu Dec 16 2010 Marcela Mašláňová <mmaslano@redhat.com> - 1.4.6-7
  266. - 663193 rewritten selinux support
  267. * Wed Dec 15 2010 Marcela Mašláňová <mmaslano@redhat.com> - 1.4.6-6
  268. - apply selinux patch from dwalsh
  269. * Fri Dec 10 2010 Tomas Mraz <tmraz@redhat.com> - 1.4.6-5
  270. - do not lock jobs that fall out of allowed range - 661966
  271. * Thu Dec 02 2010 Marcela Mašláňová <mmaslano@redhat.com> - 1.4.6-4
  272. - fix post (thanks plautrba for review)
  273. * Tue Nov 30 2010 Marcela Mašláňová <mmaslano@redhat.com> - 1.4.6-3
  274. - systemd init script 617320
  275. * Tue Nov 30 2010 Marcela Mašláňová <mmaslano@redhat.com> - 1.4.6-2
  276. - fix typos in man pages
  277. * Fri Oct 22 2010 Marcela Mašláňová <mmaslano@redhat.com> - 1.4.6-1
  278. - update to 1.4.6
  279. * Fri Aug 13 2010 Marcela Mašláňová <mmaslano@redhat.com> - 1.4.5-4
  280. - 623908 fix fd leak in anacron, which caused denail of prelink
  281. and others
  282. * Mon Aug 9 2010 Marcela Mašláňová <mmaslano@redhat.com> - 1.4.5-2
  283. - remove sendmail from requirements. If it's not installed, it will
  284. log into (r)syslog.
  285. * Mon Aug 2 2010 Marcela Mašláňová <mmaslano@redhat.com> - 1.4.5-1
  286. - update to new release
  287. * Fri Feb 19 2010 Marcela Mašláňová <mmaslano@redhat.com> - 1.4.4-1
  288. - update to new release
  289. * Mon Feb 15 2010 Marcela Mašláňová <mmaslano@redhat.com> - 1.4.3-3
  290. - 564894 FTBFS DSOLinking
  291. * Thu Nov 5 2009 Marcela Mašláňová <mmaslano@redhat.com> - 1.4.3-2
  292. - 533189 pam needs add a line and selinux needs defined one function
  293. * Fri Oct 30 2009 Marcela Mašláňová <mmaslano@redhat.com> - 1.4.3-1
  294. - 531963 and 532482 creating noanacron package
  295. * Mon Oct 19 2009 Marcela Mašláňová <mmaslano@redhat.com> - 1.4.2-2
  296. - 529632 service crond stop returns appropriate value
  297. * Mon Oct 12 2009 Marcela Mašláňová <mmaslano@redhat.com> - 1.4.2-1
  298. - new release
  299. * Fri Aug 21 2009 Tomas Mraz <tmraz@redhat.com> - 1.4.1-3
  300. - rebuilt with new audit
  301. * Fri Aug 14 2009 Tomas Mraz <tmraz@redhat.com> - 1.4.1-2
  302. - create the anacron timestamps in correct post script
  303. * Fri Aug 14 2009 Marcela Mašláňová <mmaslano@redhat.com> - 1.4.1-1
  304. - update to 1.4.1
  305. - create and own /var/spool/anacron/cron.{daily,weekly,monthly} to
  306. remove false warning about non existent files
  307. - Resolves: 517398
  308. * Wed Aug 5 2009 Tomas Mraz <tmraz@redhat.com> - 1.4-4
  309. - 515762 move anacron provides and obsoletes to the anacron subpackage
  310. * Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4-3
  311. - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
  312. * Mon Jul 20 2009 Marcela Mašláňová <mmaslano@redhat.com> - 1.4-2
  313. - merge cronie and anacron in new release of cronie
  314. - obsolete/provide anacron in spec
  315. * Thu Jun 18 2009 Marcela Mašláňová <mmaslano@redhat.com> - 1.3-2
  316. - 506560 check return value of access
  317. * Mon Apr 27 2009 Marcela Mašláňová <mmaslano@redhat.com> - 1.3-1
  318. - new release
  319. * Fri Apr 24 2009 Marcela Mašláňová <mmaslano@redhat.com> - 1.2-8
  320. - 496973 close file descriptors after exec
  321. * Mon Mar 9 2009 Tomas Mraz <tmraz@redhat.com> - 1.2-7
  322. - rebuild
  323. * Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-6
  324. - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
  325. * Tue Dec 23 2008 Marcela Mašláňová <mmaslano@redhat.com> - 1.2-5
  326. - 477100 NO_FOLLOW was removed, reload after change in symlinked
  327. crontab is needed, man updated.
  328. * Fri Oct 24 2008 Marcela Mašláňová <mmaslano@redhat.com> - 1.2-4
  329. - update init script
  330. * Thu Sep 25 2008 Marcela Maslanova <mmaslano@redhat.com> - 1.2-3
  331. - add sendmail file into requirement, cause it's needed some MTA
  332. * Thu Sep 18 2008 Marcela Maslanova <mmaslano@redhat.com> - 1.2-2
  333. - 462252 /etc/sysconfig/crond does not need to be executable
  334. * Thu Jun 26 2008 Marcela Maslanova <mmaslano@redhat.com> - 1.2-1
  335. - update to 1.2
  336. * Tue Jun 17 2008 Tomas Mraz <tmraz@redhat.com> - 1.1-3
  337. - fix setting keycreate context
  338. - unify logging a bit
  339. - cleanup some warnings and fix a typo in TZ code
  340. - 450993 improve and fix inotify support
  341. * Wed Jun 4 2008 Marcela Maslanova <mmaslano@redhat.com> - 1.1-2
  342. - 49864 upgrade/update problem. Syntax error in spec.
  343. * Wed May 28 2008 Marcela Maslanova <mmaslano@redhat.com> - 1.1-1
  344. - release 1.1
  345. * Tue May 20 2008 Marcela Maslanova <mmaslano@redhat.com> - 1.0-6
  346. - 446360 check for lock didn't call chkconfig
  347. * Tue Feb 12 2008 Marcela Maslanova <mmaslano@redhat.com> - 1.0-5
  348. - upgrade from less than cronie-1.0-4 didn't add chkconfig
  349. * Wed Feb 6 2008 Marcela Maslanova <mmaslano@redhat.com> - 1.0-4
  350. - 431366 after reboot wasn't cron in chkconfig
  351. * Tue Feb 5 2008 Marcela Maslanova <mmaslano@redhat.com> - 1.0-3
  352. - 431366 trigger part => after update from vixie-cron on cronie will
  353. be daemon running.
  354. * Wed Jan 30 2008 Marcela Maslanova <mmaslano@redhat.com> - 1.0-2
  355. - change the provides on higher version than obsoletes
  356. * Tue Jan 8 2008 Marcela Maslanova <mmaslano@redhat.com> - 1.0-1
  357. - packaging cronie
  358. - thank's for help with packaging to my reviewers