source: projects/specs/trunk/c/cronie/cronie-vl.spec @ 9677

Revision 9677, 15.5 KB checked in by tomop, 9 years ago (diff)

fixed BTS#2955

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