Sophie

Sophie

distrib > Fedora > 14 > i386 > by-pkgid > 58a5ede102e1d98b5f21bc2102c4b730 > files > 7

fcron-3.0.5-1.fc14.src.rpm

Name:		fcron
Version:	3.0.5
Release:	1%{?dist}
Summary:	A task scheduler
Summary(fr):	Un ordonnanceur de tâches
Summary(it):	Uno schedulatore di processi

Group:		Applications/System
License:	GPLv2+
URL:		http://fcron.free.fr/
Source0:	http://fcron.free.fr/archives/%{name}-%{version}.src.tar.gz
Source1:	fcron.README
Source2:	fcron.LISEZMOI
Source3:	fcron_watch_config
Source4:	fcron_watch_config.init
Source5:	daemon_fcron_watch_config
Source6:	fcron_config_modified.c
Patch0:		fcron-3.0.4-dist_install.patch
Patch1:		fcron-3.0.2-accept_readable_fcron.conf.patch
BuildRoot: 	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

Requires:	syslog
Requires:	/usr/sbin/sendmail
Requires:	vim-minimal
Requires:       %{_bindir}/setsid

BuildRequires:	pam-devel
BuildRequires:	libselinux-devel
BuildRequires:	/usr/sbin/sendmail
BuildRequires:	vim-minimal

Requires(post):		chkconfig
Requires(preun):	chkconfig, initscripts
Requires(postun):	initscripts

%description
Fcron is a scheduler. It aims at replacing Vixie Cron, so it implements most
of its functionalities.
But contrary to Vixie Cron, fcron does not need your system to be up 7 days
a week, 24 hours a day: it also works well with systems which are
not running neither all the time nor regularly (contrary to anacrontab).
In other words, fcron does both the job of Vixie Cron and anacron, but does
even more and better :)) ...

WARNING: fcron isn't started automatically on boot after installation.
You can use system-config-services to enable automatic fcron startup
on boot, or use chkconfig as explained in the
%{_docdir}/%{name}-%{version}/README.Package file.

%description -l fr
Fcron est un ordonnanceur. Il est destiné à remplacer Vixie Cron. Aussi, il
en possède la plupart des fonctionnalités.
Mais contrairement à Vixie Cron, fcron n'a pas besoin que votre système soit
en fonctionnement 7 jours sur 7, 24 heures sur 24 : il fonctionne aussi
correctement sur des systèmes qui ne fonctionnent ni tout le temps, ni
régulièrement (contrairement à anacrontab).
En d'autres mots, fcron fait le travail de Vixie Cron et anacron, mais en fait
plus et mieux :)) ...

ATTENTION : fcron n'est pas activé automatiquement au démarrage après
l'installation. Pour y remédier, vous pouvez utiliser system-config-services
ou chkconfig comme expliqué dans le fichier
%{_docdir}/%{name}-%{version}/LISEZMOI.Package.

%description -l it
Fcron e' un schedulatore. Il suo obiettivo e' quello di sostituire Vixie Cron,
percio' implementa molte delle sue funzionalita'.
Contrariamente a Vixie Cron, fcron non necessita che il sistema sul quale e'
eseguito resti in funzione 7 giorni su 7 e 24 ore su 24: fcron lavora bene
anche su sistemi che non lavorano regolamente ne costantemente (contrariamente
a anacrontab).
In altre parole, fcron esegue il lavoro di Vixie Cron e anacron, ma lo fa'
molto meglio :)) ...

ATTENZIONE : fcron non viene fatto partire automaticamere al boot dopo
l'installazione. Puoi usare system-config-services per abilitare la partenza
automatica di fcron al boot, oppure puo iusare chkconfig come illustrato nel
file %{_docdir}/%{name}-%{version}/README.Package file.

%prep

%setup -q

%{__install} -pm 644 %{SOURCE1} README.Package
%{__install} -pm 644 %{SOURCE2} LISEZMOI.Package

%patch0 -p1 -b .dist_install
%patch1 -p0 -b .accept_readable_fcron

for file in doc/en/txt/*.txt; do
 iconv -f latin1 -t utf8 < $file > $file.new
 touch -c -r $file $file.new
 mv $file.new $file
done

%build

%configure --with-boot-install=no
make %{?_smp_mflags}

%{__cc} %{SOURCE6} %{optflags} -D SYSCONFDIR='"%{_sysconfdir}"' -o fcron_config_modified

%install
%{__rm} -rf %{buildroot}

cp -a doc/fr/HTML doc/fr/HTML-fr

make install-staged DESTDIR=%{buildroot}

%{__install} -d %{buildroot}%{_initrddir}
# don't start in the default case, and correct paths
%{__sed} \
 -e 's|2345|-|' \
 -e 's|2 3 4 5||' \
 -e 's|SBIN=@@DESTSBIN@|SBIN=%{_sbindir}|' \
 -e 's|/var|%{_localstatedir}|' script/sysVinit-launcher > %{buildroot}%{_initrddir}/fcron

%{__sed} \
 -e 's|/usr/sbin|%{_sbindir}|' \
 -e 's|/var|%{_localstatedir}|' %{SOURCE4} > %{buildroot}%{_initrddir}/fcron_watch_config

%{__chmod} 0755 %{buildroot}%{_initrddir}/fcron*

touch -c -r %{SOURCE4} %{buildroot}%{_initrddir}/fcron_watch_config
touch -c -r script/sysVinit-launcher %{buildroot}%{_initrddir}/fcron

%{__sed} -e 's|/usr/bin|%{_bindir}|' \
 -e 's|/var|%{_localstatedir}|' \
 -e 's|/etc|%{_sysconfdir}|' script/check_system_crontabs > %{buildroot}%{_sbindir}/check_system_crontabs

%{__sed} -e 's|/etc|%{_sysconfdir}|g' %{SOURCE3} > %{buildroot}%{_sbindir}/fcron_watch_config

# fix permissions
%{__chmod} 755 %{buildroot}%{_bindir}/*
%{__chmod} 755 %{buildroot}%{_sbindir}/*

# reset script timestamp
touch -c -r script/check_system_crontabs %{buildroot}%{_sbindir}/check_system_crontabs
touch -c -r %{SOURCE3} %{buildroot}%{_sbindir}/fcron_watch_config

%{__install} -m755 -p debian/fcron-update-crontabs %{buildroot}%{_sbindir}/
%{__install} -m644 -p debian/fcron-update-crontabs.1 %{buildroot}%{_mandir}/man1/

%{__install} -m755 -p %{SOURCE5} %{buildroot}%{_sbindir}/

%{__install} -m755 fcron_config_modified %{buildroot}%{_bindir}

# remove a page that is hold in cron
%{__rm} %{buildroot}%{_mandir}/man3/bitstring.3*
%{__rm} %{buildroot}%{_mandir}/fr/man3/bitstring.3*

for i in %{buildroot}%{_mandir}/man*/*
do
  iconv -f latin1 -t UTF8 < $i > tmp
  touch -c -r $i tmp
  %{__mv} tmp $i
done

for i in %{buildroot}%{_mandir}/fr/man*/*
do
  iconv -f latin1 -t UTF8 < $i > tmp
  touch -c -r $i tmp
  %{__mv} tmp $i
done

# rpmbuild insist that %ghost files exist
%{__install} -d %{buildroot}%{_localstatedir}/run/
touch %{buildroot}%{_localstatedir}/run/fcron.pid


%pre
getent group fcron >/dev/null || groupadd -r fcron
getent passwd fcron >/dev/null || \
useradd -r -g fcron -d  %{_localstatedir}/spool/fcron -s /sbin/nologin \
 -c "Fcron system user" fcron
exit 0

%post
/sbin/chkconfig --add %{name}
/sbin/chkconfig --add %{name}_watch_config

%postun
if [ "$1" -ge "1" ] ; then
    /sbin/service %{name} condrestart >/dev/null 2>&1 || :
fi
if [ "$1" -ge "1" ] ; then
    /sbin/service %{name}_watch_config condrestart >/dev/null 2>&1 || :
fi

%preun
if [ "$1" = "0" ]
then
  /sbin/service %{name} stop >/dev/null 2>&1
  /sbin/chkconfig --del %{name}

  /sbin/service %{name}_watch_config stop >/dev/null 2>&1
  /sbin/chkconfig --del %{name}_watch_config
fi

%clean
%{__rm} -rf %{buildroot}

%files
%defattr(-,root,root,-)
%doc doc/en/HTML/ doc/fr/HTML-fr/ doc/en/txt/*
%doc README.Package LISEZMOI.Package
%{_initrddir}/fcron
%{_initrddir}/fcron_watch_config
%config(noreplace) %{_sysconfdir}/fcron.conf
%config(noreplace) %{_sysconfdir}/fcron.allow
%config(noreplace) %{_sysconfdir}/fcron.deny
%config(noreplace) %{_sysconfdir}/pam.d/fcron
%config(noreplace) %{_sysconfdir}/pam.d/fcrontab
%{_mandir}/man1/*
%{_mandir}/man5/*
%{_mandir}/man8/*
%lang(fr) %{_mandir}/fr/man1/*
%lang(fr) %{_mandir}/fr/man5/*
%lang(fr) %{_mandir}/fr/man8/*
%attr(04754,root,fcron) %{_bindir}/fcronsighup
%{_bindir}/fcrondyn
%{_bindir}/fcron_config_modified
%attr(06755,fcron,fcron) %{_bindir}/fcrontab
%{_sbindir}/fcron
%{_sbindir}/fcron-update-crontabs
%{_sbindir}/check_system_crontabs
%{_sbindir}/fcron_watch_config
%{_sbindir}/daemon_fcron_watch_config
%dir %attr(770,fcron,fcron) %{_localstatedir}/spool/fcron
%ghost %{_localstatedir}/run/fcron.pid
#%dir %{_sysconfdir}/cron.d

%changelog
* Mon Mar 08 2010 Jan Zeleny <jzeleny@redhat.com> - 3.0.5-1
- rebased fcron to 3.0.5 (fixed some race condition bugs, CVE-2010-0792)

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.4-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.4-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Mon Dec  8 2008 Patrice Dumas <pertusus[AT]free[DOT]fr> 3.0.4-5
  - simplify fcron_watch_config.c thanks to watching example in cronie
    and also wait for cron.d instead of erroring
  - dont provide %%{_sysconfdir}/cron.d, since fcron_watch_config may
    not be started

* Fri Dec  5 2008 Patrice Dumas <pertusus[AT]free[DOT]fr> 3.0.4-4
  - instead of using inotifywait use a specific C program to watch config
  - don't try to run anything in the default case and merge the 
    fcron-watch-config subpackage

* Sun Nov 30 2008 Patrice Dumas <pertusus[AT]free[DOT]fr> 3.0.4-3
  - fcron_watch_config really kill its children
  - remove crontabs requires, to be like cronie

* Sun Nov 30 2008 Patrice Dumas <pertusus[AT]free[DOT]fr> 3.0.4-2
  - use newer post scripts
  - use .Package instead of .Dist
  - remove unused patches
  - correct paths in scripts
  - ship check_system_crontabs
  - LSB compliant initscript
  - add scripts that watch config files as daemons and sync fcron files
  - add a subpackage that can be used as a vixie cron replacement

* Thu Sep 18 2008 Patrice Dumas <pertusus[AT]free[DOT]fr> 3.0.4-1
  - update to 3.0.4

* Mon Feb 18 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 3.0.3-4
- Autorebuild for GCC 4.3

* Tue Aug 21 2007 Alain Portal <aportal[AT]univ-montp2[DOT]fr> 3.0.3-3
  - Licence tag clarification

* Mon Jul 23 2007 Alain Portal <aportal[AT]univ-montp2[DOT]fr> 3.0.3-2
  - sysklogd is no more in Fedora, replace by rsyslog #249033.
  So change Requires sysklogd by Requires syslog

* Thu Jul  5 2007 Alain Portal <aportal[AT]univ-montp2[DOT]fr> 3.0.3-1
  - New upstream version
  - Update patch0
  - Remove patch1 & patch2, no more needed

* Thu Apr 12 2007 Alain Portal <aportal[AT]univ-montp2[DOT]fr> 3.0.2-2
  - Replace "smtpdaemon" by "/usr/sbin/sendmail" in Requires and
    BuildRequires statements. Fix #235601.

* Wed Feb  7 2007 Alain Portal <aportal[AT]univ-montp2[DOT]fr> 3.0.2-1
  - New upstream version
  - Update patch3
  - Remove patch4 now applied by upstream

* Fri Oct 12 2006 Alain Portal <aportal[AT]univ-montp2[DOT]fr> 3.0.1-17
  - Don't remove frcon user when erasing package
  - Update doc accordingly
  - Don't ghost fcron.fifo

* Fri Sep  1 2006 Alain Portal <aportal[AT]univ-montp2[DOT]fr> 3.0.1-16
  - FE6 rebuild

* Thu Aug 24 2006 Ville Skyttä <ville.skytta at iki.fi> - 3.0.1-15
  - Fix doc permissions (#200834).

* Thu Jul  6 2006 Alain Portal <aportal[AT]univ-montp2[DOT]fr> 3.0.1-14
  - Add italian description
    Translation from Carlo Alberto Scarpato <cascarpato[AT]k4m[DOT]it>

* Thu Jun 26 2006 Alain Portal <aportal[AT]univ-montp2[DOT]fr> 3.0.1-13
  - Fix typo in description

* Thu Jun 26 2006 Alain Portal <aportal[AT]univ-montp2[DOT]fr> 3.0.1-12
  - Remove bitstring.3 man page.

* Fri Jun 16 2006 Alain Portal <aportal[AT]univ-montp2[DOT]fr> 3.0.1-11
  - Rewording README file.

* Thu Jun 15 2006 Alain Portal <aportal[AT]univ-montp2[DOT]fr> 3.0.1-10
  - Rename and improve README files.
  - Improve description.

* Mon Jun 12 2006 Alain Portal <aportal[AT]univ-montp2[DOT]fr> 3.0.1-9
  - Don't start fcron by default.
  - Add documentation to start fcron by default.
  - Add %%lang(fr) for french man pages.

* Tue Jun  6 2006 Alain Portal <aportal[AT]univ-montp2[DOT]fr> 3.0.1-8
  - Patch to set fcrontab euid to root before calling PAM library.
  - Contribution from upstream maintainer.

* Fri Mar 24 2006 Alain Portal <aportal[AT]univ-montp2[DOT]fr> 3.0.1-7
  - Make fcronsighup readable by everyone.

* Fri Mar 24 2006 Patrice Dumas <pertusus[At]free.fr> 3.0.1-6
  - Update previous patch.
  - Set sgid on fcrontab.

* Thu Mar 23 2006 Patrice Dumas <pertusus[At]free.fr> 3.0.1-5
  - Patch to accept a configuration file with perms root root 644.

* Tue Mar 21 2006 Alain Portal <aportal[AT]univ-montp2[DOT]fr> 3.0.1-4
  - Remove useless %%{_bindir}/convert-fcrontab.

* Sat Mar 18 2006 Patrice Dumas <pertusus[At]free.fr> 3.0.1-3
  - Many cleanings.

* Fri Mar 17 2006 Alain Portal <aportal[AT]univ-montp2[DOT]fr> 3.0.1-2
  - Remove package name from summary.
  - Remove useless management of very old previous version.
  - Use Makefile OPTIM feature.
  - Use %%{_localstatedir} macro instead of hard coded path.
  - Use %%{__chmod}, %%{__install}, %%{__mv}, %%{__rm} and %%{__sed} macros.

* Mon Mar 13 2006 Alain Portal <aportal[AT]univ-montp2[DOT]fr> 3.0.1-1
  - New upstream version.

* Tue Dec  6 2005 Alain Portal <aportal[AT]univ-montp2[DOT]fr> 3.0.0-1
  - Fedorize the Mandriva spec.