Summary: The Vixie cron daemon for executing specified programs at set times.
Summary(ja): Vixie cron デーモン - 指定された時刻に特定のプログラムを実行する
Name: vixie-cron
Version: 3.0.1
Release: 91%{?_dist_release}
License: distributable
Group: System Environment/Base
Source0: ftp://ftp.vix.com/pub/vixie/vixie-cron-3.0.1.tar.gz
Source1: vixie-cron.init
Patch0: vixie-cron-3.0.1-redhat.patch
Patch1: vixie-cron-3.0.1-security.patch
Patch2: vixie-cron-3.0.1-security2.patch
Patch3: vixie-cron-3.0.1-badsig.patch
Patch4: vixie-cron-3.0.1-crontab.patch
Patch5: vixie-cron-3.0.1-sigchld.patch
Patch6: vixie-cron-3.0.1-sprintf.patch
Patch7: vixie-cron-3.0.1-sigchld2.patch
Patch8: vixie-cron-3.0.1-crond.patch
Patch9: vixie-cron-3.0.1-dst.patch
Patch10: vixie-cron-3.0.1-0days.patch
Patch11: vixie-cron-3.0.1-nodot.patch
Patch12: vixie-cron-3.0.1-syslog.patch
Patch13: vixie-cron-3.0.1-crontabloc.patch
Patch14: vixie-cron-3.0.1-name.patch
Patch15: vixie-cron-3.0.1-time.patch
Patch16: vixie-cron-3.0.1-newtime.patch
Patch17: vixie-cron-3.0.1-buffer.patch
Patch18: vixie-cron-3.0.1-timeaftertime.patch
Patch19: vixie-cron-3.0.1-cront_stdin.patch
Patch20: vixie-cron-3.0.1-fprintf.patch
Patch21: vixie-cron-3.0.1-nonstrip.patch
Patch22: vixie-cron-3.0.1-root_-u-85879.patch
Patch24: vixie-cron-3.0.1-vfork-105616.patch
Patch25: vixie-cron-3.0.1-pie.patch
# Vine Patch(es)
Patch100: vixie-cron-3.0.1-linux.patch

Buildroot: %{_tmppath}/%{name}-%{version}-root
Requires: syslog bash >= 2.0
#Requires(pre): /sbin/chkconfig /etc/init.d /sbin/service
Requires(pre): /sbin/chkconfig /sbin/service

Vendor: Project Vine
Distribution: Vine Linux

%description
The vixie-cron package contains the Vixie version of cron.  Cron is a
standard UNIX daemon that runs specified programs at scheduled times.
Vixie cron adds better security and more powerful configuration
options to the standard version of cron.

%description -l ja
vixie-cron パッケージには Vixie 版 cron が収録されています.
cron とは標準的な UNIX のデーモンで,予め指定した時刻に特定の
プログラムを実行するものです.Vixie cron は標準の cron に加え,
セキュリティ面を強化し,設定オプションも豊富に追加されています.


%prep
%setup
%patch0 -p1 -b .norh
%patch1 -p1 -b .nomisc
%patch2 -p1 -b .security2
%patch3 -p1 -b .badsig
%patch4 -p1 -b .crontabhole
%patch5 -p1 -b .sigchld
%patch6 -p1 -b .sprintf
%patch7 -p1 -b .sigchld
%patch8 -p1 -b .crond
%patch9 -p1 -b .dst
%patch10 -p1 -b .0days
%patch11 -p1 -b .nodot
%patch12 -p1 -b .syslog
%patch13 -p1 -b .crontabloc
%patch14 -p1 -b .name
%patch15 -p1 -b .time
%patch16 -p1 -b .newtime
%patch17 -p1 -b .buffer
%patch18 -p1 -b .timeaftertime
%patch19 -p1 -b .cront_stdin
%patch20 -p1 -b .fprintf
%patch21 -p1 -b .nonstrip
%patch22 -p1 -b .root_-u
%patch24 -p1 -b .vfork
%ifnarch alpha
%patch25 -p1 -b .pie
%endif
# Vine Patch(es)
%patch100 -p1 -b .linux


%build
make RPM_OPT_FLAGS="$RPM_OPT_FLAGS"


%install
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/usr/{bin,sbin}
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man{1,5,8}
mkdir -p $RPM_BUILD_ROOT%{_initdir}
make install DESTDIR=$RPM_BUILD_ROOT DESTMAN=$RPM_BUILD_ROOT%{_mandir}
mkdir -p $RPM_BUILD_ROOT/var/spool/cron
chmod 700 $RPM_BUILD_ROOT/var/spool/cron
mkdir -p $RPM_BUILD_ROOT/etc/cron.d
chmod 755 $RPM_BUILD_ROOT/etc/cron.d

install -m755 $RPM_SOURCE_DIR/vixie-cron.init $RPM_BUILD_ROOT%{_initdir}/crond

%clean
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT


%post
/sbin/chkconfig --add crond


%preun
if [ "$1" = 0 ]; then
    [ -f /var/lock/subsys/crond ] && /sbin/service crond stop >/dev/null 2>&1
    /sbin/chkconfig --del crond
fi


%postun
if [ "$1" -ge "1" ]; then
	/sbin/service crond condrestart >/dev/null 2>&1
fi


%triggerpostun -- vixie-cron < 3.0.1-56
/sbin/chkconfig --del crond
/sbin/chkconfig --add crond


%files
%defattr(-,root,root)
/usr/sbin/crond
/usr/bin/crontab
%{_mandir}/man8/crond.*
%{_mandir}/man8/cron.*
%{_mandir}/man5/crontab.*
%{_mandir}/man1/crontab.*

%dir /var/spool/cron
%dir /etc/cron.d

%config %{_initdir}/crond

%changelog
* Sat Dec 28 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.0.1-91
- rebuild with VineSeed environment

* Wed Dec 22 2010 IWAI, Masaharu <iwai@alib.jp> 3.0.1-90
- using Virtual package name for syslog daemon in Requires
 - replace "sysklogd" to "syslog"

* Wed Mar  3 2010 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 3.0.1-89
- fix a trivial typo s/crom/cron/ on the "Happy Dolls Festival" day :-P

* Sun Feb 07 2010 NAKAMURA Kenta <kenta@vinelinux.org> 3.0.1-88
- rebuilt with new toolchain

* Fri Aug 15 2008 Shu KONNO <owa@bg.wakwak.com> 3.0.1-87vl5
- applied new versioning policy, spec in utf-8

* Mon Jul 03 2006 Shu KONNO <owa@bg.wakwak.com> 3.0.1-87vl3
- s/Copylight/License/

* Thu Mar 25 2004 Tomoya TAKA <taka@vinelinux.org> 3.0.1-87vl2
- don't apply vixie-cron-3.0.1-pie.patch on alpha

* Mon Mar 22 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.0.1-87vl1
- rebuild with new toolchains
- based on Fedora development 3.0.1-87
  * Wed Feb 4 2004 Dan Walsh <dwalsh@redhat.com> - 3.0.1-86
  - Add security_getenforce check.
  * Mon Jan 26 2004 Dan Walsh <dwalsh@redhat.com> - 3.0.1-85
  - Fix call to is_selinux_enabled()
  * Mon Dec 8 2003 Dan Walsh <dwalsh@redhat.com> - 3.0.1-84
  - change daemon flag to 1
  * Wed Dec 3 2003 Dan Walsh <dwalsh@redhat.com> - 3.0.1-83
  - Add daemon to make sure child is clean
  * Fri Nov  7 2003 Jens Petersen <petersen@redhat.com> - 3.0.1-82
  - add vixie-cron-3.0.1-pie.patch to build crond as pie (#108414)
    [Ulrich Drepper]
  * Tue Sep 30 2003 Jens Petersen <petersen@redhat.com> - 3.0.1-80
  - add vixie-cron-3.0.1-vfork-105616.patch to use fork instead of vfork
    (#105616) [report and patch from ian@caliban.org]
  - update vixie-cron-3.0.1-redhat.patch not to change DESTMAN redundantly
    (it is overrriden in the spec file anyway)
  * Wed Mar 19 2003 Jens Petersen <petersen@redhat.com> - 3.0.1-75
  - add patch from Valdis Kletnieks to allow root to run "crontab -u <user>"
    even for users that aren't allowed to
  * Wed Feb 19 2003 Jens Petersen <petersen@redhat.com> - 3.0.1-74
  - fix preun script typo (#75137) [reported by Peter Bieringer]
  * Tue Feb 11 2003 Bill Nottingham <notting@redhat.com> 3.0.1-73
  - don't set SIGCHLD to SIG_IGN and then try and wait... (#84046)
  * Fri Feb  7 2003 Nalin Dahyabhai <nalin@redhat.com> 3.0.1-72
  - adjust cron.d patch so that it ignores file with names that begin with '#'
  or end with '~', '.rpmorig', '.rpmsave', or '.rpmnew'
  - merge hunk of buffer overflow patch into the cron.d patch
  * Sat Jul 20 2002 Akira TAGOH <tagoh@redhat.com> 3.0.1-69
  - vixie-cron-3.0.1-nonstrip.patch: applied to fix the stripped binary issue.
  * Mon Jun 10 2002 Bill Huang <bhuang@redhat.com>
  - Fix preun bugs.(#55340)
  - Fix fprintf bugs.(#65209)
  * Mon Apr 15 2002 Bill Huang <bhuang@redhat.com>
  - Fixed #62963.

* Tue Sep 04 2001 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 3.0.1-63vl2
- remove file depend (/etc/init.d)

* Sun Sep 02 2001 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 3.0.1-63vl1
- based on 3.0.1-63 from Rawhide and rebuilt for Vine

* Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com>
- Bump release + rebuild.

* Thu Mar  8 2001 Bill Nottingham <notting@redhat.com>
- add patch from Alan Eldridge <alane@geeksrus.net> to
  fix double execution of jobs (#29868)

* Sun Feb 11 2001 Bill Nottingham <notting@redhat.com>
- fix buffer overflow in crontab

* Wed Feb  7 2001 Trond Eivind Glomsr <teg@redhat.com>
- fix usage string in initscript (#26533)

* Tue Feb  6 2001 Bill Nottingham <notting@redhat.com>
- fix build with new glibc (#25931)

* Tue Jan 23 2001 Bill Nottingham <notting@redhat.com>
- change i18n mechanism

* Fri Jan 19 2001 Bill Nottingham <notting@redhat.com>
- log as 'crond', not 'CROND' (#19410)
- account for shifts in system clock (#23230, patch from <pererik@onedial.se>)
- i18n-ize initscript

* Thu Aug 24 2000 Than Ngo <than@redhat.com>
- fix to set startup position correct at update

* Thu Aug 24 2000 Than Ngo <than@redhat.com>
- add /sbin/service to Prereq
- call /sbin/service instead service
- fix startup position (Bug #13353)

* Mon Aug  7 2000 Bill Nottingham <notting@redhat.com>
- fix crond logging patch (dan@doom.cmc.msu.ru)
- log via syslog (suggestion from jos@xos.nl)
- put system crontab location in crontab(5) (#14842)

* Fri Jul 28 2000 Bill Nottingham <notting@redhat.com>
- fix condrestart

* Fri Jul 21 2000 Bill Nottingham <notting@redhat.com>
- fix reload bug (#14065)

* Fri Jul 14 2000 Bill Nottingham <notting@redhat.com>
- move initscript back

* Thu Jul 13 2000 Prospector <bugzilla@redhat.com>
- automatic rebuild

* Thu Jul  6 2000 Bill Nottingham <notting@redhat.com>
- prereq /etc/init.d

* Mon Jul  3 2000 Bill Nottingham <notting@redhat.com>
- fix %%post; we do condrestart in %%postun

* Thu Jun 29 2000 Bill Nottingham <notting@redhat.com>
- oops, fix init script

* Tue Jun 27 2000 Bill Nottingham <notting@redhat.com>
- require new initscripts, not prereq

* Mon Jun 26 2000 Bill Nottingham <notting@redhat.com>
- initscript hacks

* Wed Jun 14 2000 Nalin Dahyabhai <nalin@redhat.com>
- tweak logrotate config

* Sun Jun 11 2000 Bill Nottingham <notting@redhat.com>
- rebuild in new env.
- FHS fixes
- don't ship chkconfig links

* Fri Mar 31 2000 Bill Nottingham <notting@redhat.com>
- fix non-root builds (#10490)

* Sun Mar 26 2000 Florian La Roche <Florian.LaRoche@redhat.com>
- do not remove log files

* Thu Feb  3 2000 Bill Nottingham <notting@redhat.com>
- handle compressed man pages

* Fri Sep 10 1999 Bill Nottingham <notting@redhat.com>
- chkconfig --del in %preun, not %postun

* Wed Aug 25 1999 Bill Nottingham <notting@redhat.com>
- fix buffer overflow

* Mon Aug 16 1999 Bill Nottingham <notting@redhat.com>
- initscript munging

* Fri Jul 30 1999 Michael K. Johnson <johnsonm@redhat.com>
- dayofmonth and month can't be 0

* Thu Jun  3 1999 Jeff Johnson <jbj@redhat.com>
- in cron.log use "kill -HUP pid" not killall to preserve errors (#2241).

* Wed Apr 14 1999 Michael K. Johnson <johnsonm@redhat.com>
- add note to man page about DST conversion causing strangeness
- documented cron.d patch

* Tue Apr 13 1999 Michael K. Johnson <johnsonm@redhat.com>
- improved cron.d patch

* Mon Apr 12 1999 Erik Troan <ewt@redhat.com>
- added cron.d patch

* Tue Mar 23 1999 Bill Nottingham <notting@redhat.com>
- logrotate changes

* Tue Mar 23 1999 Preston Brown <pbrown@redhat.com>
- clean up log files on deinstallation

* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> 
- auto rebuild in the new build environment (release 28)

* Wed Dec 30 1998 Cristian Gafton <gafton@redhat.com>
- build for glibc 2.1

* Wed Jun 10 1998 Prospector System <bugs@redhat.com>
- translations modified for de

* Wed Jun 10 1998 Jeff Johnson <jbj@redhat.com>
- reset SIGCHLD before grandchild execle (problem #732)

* Sat May 02 1998 Cristian Gafton <gafton@redhat.com>
- enhanced initscript

* Mon Apr 27 1998 Prospector System <bugs@redhat.com>
- translations modified for de, fr, tr

* Thu Dec 11 1997 Cristian Gafton <gafton@redhat.com>
- added a patch to get rid of the dangerous sprintf() calls
- added BuildRoot and Prereq: /sbin/chkconfig

* Sun Nov 09 1997 Michael K. Johnson <johnsonm@redhat.com>
- fixed cron/crond dichotomy in init file.

* Wed Oct 29 1997 Donnie Barnes <djb@redhat.com>
- fixed bad init symlinks

* Thu Oct 23 1997 Erik Troan <ewt@redhat.com>
- force it to use SIGCHLD instead of defunct SIGCLD

* Mon Oct 20 1997 Erik Troan <ewt@redhat.com>
- updated for chkconfig
- added status, restart options to init script

* Tue Jun 17 1997 Erik Troan <ewt@redhat.com>
- built against glibc

* Wed Feb 19 1997 Erik Troan <ewt@redhat.com>
- Switch conditional from "axp" to "alpha"