cronie-vl.spec 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465
  1. %bcond_with selinux
  2. %bcond_without pam
  3. %bcond_without audit
  4. %bcond_without inotify
  5. Summary: Cron daemon for executing programs at set times
  6. Name: cronie
  7. Version: 1.5.5
  8. Release: 1%{?_dist_release}
  9. Group: System Environment/Base
  10. Vendor: Project Vine
  11. Distribution: Vine Linux
  12. Packager: iwaim
  13. License: MIT and BSD and ISC and GPLv2+
  14. URL: https://github.com/cronie-crond/cronie
  15. Source0: https://github.com/cronie-crond/cronie/releases/download/%{name}-%{version}/%{name}-%{version}.tar.gz
  16. # from cronie 1.4.8 tarball
  17. Source1: cronie.init
  18. Requires: dailyjobs
  19. Conflicts: vixie-cron
  20. %if %{with selinux}
  21. Requires: libselinux >= 2.0.64
  22. BuildRequires: libselinux-devel >= 2.0.64
  23. %endif
  24. %if %{with pam}
  25. Requires: pam >= 1.0.1
  26. BuildRequires: pam-devel >= 1.0.1
  27. %endif
  28. %if %{with audit}
  29. BuildRequires: audit-libs-devel >= 1.4.1
  30. %endif
  31. Requires(post): coreutils sed
  32. Requires(post): chkconfig
  33. Requires(preun): chkconfig
  34. Obsoletes: vixie-cron <= 3.0.1
  35. %description
  36. Cronie contains the standard UNIX daemon crond that runs specified programs at
  37. scheduled times and related tools. It is a fork of the original vixie-cron and
  38. has security and configuration enhancements like the ability to use pam and
  39. SELinux.
  40. %package anacron
  41. Summary: Utility for running regular jobs
  42. Requires: crontabs
  43. Group: System Environment/Base
  44. Provides: dailyjobs
  45. Provides: anacron = 2.4
  46. Obsoletes: anacron <= 2.3
  47. Requires(post): coreutils
  48. Requires: %{name} = %{version}-%{release}
  49. %description anacron
  50. Anacron is part of cronie that is used for running jobs with regular
  51. periodicity which do not have exact time of day of execution.
  52. The default settings of anacron execute the daily, weekly, and monthly
  53. jobs, but anacron allows setting arbitrary periodicity of jobs.
  54. Using anacron allows running the periodic jobs even if the system is often
  55. powered off and it also allows randomizing the time of the job execution
  56. for better utilization of resources shared among multiple systems.
  57. %package noanacron
  58. Summary: Utility for running simple regular jobs in old cron style
  59. Group: System Environment/Base
  60. Provides: dailyjobs
  61. Requires: crontabs
  62. Requires: %{name} = %{version}-%{release}
  63. %description noanacron
  64. Old style of running {hourly,daily,weekly,monthly}.jobs without anacron. No
  65. extra features.
  66. %prep
  67. %setup -q
  68. %build
  69. %configure \
  70. %if %{with pam}
  71. --with-pam \
  72. %endif
  73. %if %{with selinux}
  74. --with-selinux \
  75. %endif
  76. %if %{with audit}
  77. --with-audit \
  78. %endif
  79. %if %{with inotify}
  80. --with-inotify \
  81. %endif
  82. --enable-anacron \
  83. --enable-pie \
  84. --enable-relro
  85. make %{?_smp_mflags}
  86. %install
  87. make install DESTDIR=$RPM_BUILD_ROOT DESTMAN=$RPM_BUILD_ROOT%{_mandir}
  88. mkdir -pm700 $RPM_BUILD_ROOT%{_localstatedir}/spool/cron
  89. mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/
  90. mkdir -pm755 $RPM_BUILD_ROOT%{_sysconfdir}/cron.d/
  91. %if ! %{with pam}
  92. rm -f $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/crond
  93. %endif
  94. install -m 600 crond.sysconfig $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/crond
  95. touch $RPM_BUILD_ROOT%{_sysconfdir}/cron.deny
  96. install -m 600 contrib/anacrontab $RPM_BUILD_ROOT%{_sysconfdir}/anacrontab
  97. install -c -m755 contrib/0hourly $RPM_BUILD_ROOT%{_sysconfdir}/cron.d/0hourly
  98. mkdir -pm 700 $RPM_BUILD_ROOT%{_sysconfdir}/cron.hourly
  99. install -c -m755 contrib/0anacron $RPM_BUILD_ROOT%{_sysconfdir}/cron.hourly/0anacron
  100. mkdir -p $RPM_BUILD_ROOT/var/spool/anacron
  101. touch $RPM_BUILD_ROOT/var/spool/anacron/cron.daily
  102. touch $RPM_BUILD_ROOT/var/spool/anacron/cron.weekly
  103. touch $RPM_BUILD_ROOT/var/spool/anacron/cron.monthly
  104. # noanacron package
  105. install -m 644 contrib/dailyjobs $RPM_BUILD_ROOT/%{_sysconfdir}/cron.d/dailyjobs
  106. # install initscript
  107. mkdir -p $RPM_BUILD_ROOT%{_initddir}
  108. install -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_initddir}/crond
  109. %post
  110. # run after an installation
  111. /sbin/chkconfig --add crond
  112. %post anacron
  113. [ -e /var/spool/anacron/cron.daily ] || touch /var/spool/anacron/cron.daily
  114. [ -e /var/spool/anacron/cron.weekly ] || touch /var/spool/anacron/cron.weekly
  115. [ -e /var/spool/anacron/cron.monthly ] || touch /var/spool/anacron/cron.monthly
  116. %preun
  117. # run before a package is removed
  118. if [ "$1" -eq 0 ]; then
  119. /sbin/service crond stop >/dev/null 2>&1
  120. /sbin/chkconfig --del crond
  121. fi
  122. %postun
  123. # run after a package is removed
  124. if [ "$1" -ge "1" ]; then
  125. /sbin/service crond condrestart >/dev/null 2>&1 || :
  126. fi
  127. %triggerpostun -- vixie-cron
  128. /sbin/chkconfig --add crond
  129. %files
  130. %license COPYING*
  131. %doc AUTHORS INSTALL README ChangeLog
  132. %attr(755,root,root) %{_sbindir}/crond
  133. %attr(4755,root,root) %{_bindir}/crontab
  134. %attr(755,root,root) %{_bindir}/cronnext
  135. %{_mandir}/man8/crond.*
  136. %{_mandir}/man8/cron.*
  137. %{_mandir}/man5/crontab.*
  138. %{_mandir}/man1/crontab.*
  139. %{_mandir}/man1/cronnext.*
  140. %dir %{_localstatedir}/spool/cron
  141. %dir %{_sysconfdir}/cron.d
  142. %if %{with pam}
  143. %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/pam.d/crond
  144. %endif
  145. %attr(0600,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/crond
  146. %attr(0600,root,root) %config(noreplace) %{_sysconfdir}/cron.deny
  147. %attr(0644,root,root) %{_sysconfdir}/cron.d/0hourly
  148. %attr(0755,root,root) %{_initddir}/crond
  149. %files anacron
  150. %{_sbindir}/anacron
  151. %attr(0755,root,root) %{_sysconfdir}/cron.hourly/0anacron
  152. %attr(0600,root,root) %config(noreplace) %{_sysconfdir}/anacrontab
  153. %dir /var/spool/anacron
  154. %ghost %verify(not md5 size mtime) /var/spool/anacron/cron.daily
  155. %ghost %verify(not md5 size mtime) /var/spool/anacron/cron.weekly
  156. %ghost %verify(not md5 size mtime) /var/spool/anacron/cron.monthly
  157. %{_mandir}/man5/anacrontab.*
  158. %{_mandir}/man8/anacron.*
  159. %files noanacron
  160. %attr(0644,root,root) %{_sysconfdir}/cron.d/dailyjobs
  161. %changelog
  162. * Wed Mar 25 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.5.5-1
  163. - new upstream release.
  164. - dropped all patches.
  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