cronie-vl.spec 16 KB

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