Search
j0ke.net Open Build Service
>
Projects
>
home:jg
:
projects
:
ha
>
daemontools
> daemontools.spec
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File daemontools.spec of Package daemontools
Summary: A collection of tools for managing UNIX services Name: daemontools Version: 0.76 Release: 7%{org_tag}%{dist} License: Public domain Group: Utilities/System Source: http://cr.yp.to/daemontools/daemontools-%{version}.tar.gz Source1: http://smarden.org/pape/djb/manpages/daemontools-0.76-man.tar.gz Source2: daemontools-svscanboot Patch: daemontools-%version.errno.patch URL: http://cr.yp.to/daemontools.html Buildroot: %_tmppath/%{name}-%{version} %description daemontools is a collection of tools for managing UNIX services. supervise monitors a service. It starts the service and restarts the service if it dies. Setting up a new service is easy: all supervise needs is a directory with a run script that runs the service. multilog saves error messages to one or more logs. It optionally timestamps each line and, for each log, includes or excludes lines matching specified patterns. It automatically rotates logs to limit the amount of disk space used. If the disk fills up, it pauses and tries again, without losing any data. This package installs into /usr (relocatable) instead of djb's /package. It includes Mate Wierdl's errno patch for glibc 2.3.1 (see http://www.qmail.org/moni.csi.hu/pub/glibc-2.3.1). %prep %setup -n admin/%{name}-%{version} #gunzip -c ../../../SOURCES/daemontools-0.76-man.tar.gz | tar xvf - %setup -n admin/daemontools-0.76 -T -D -a 1 cp daemontools-man/README daemontools-man/README.manpages %patch -p1 %build package/compile %install mkdir -p %{buildroot}%{_bindir} %{buildroot}/usr/share/man/man8 for i in `cat package/commands`; do install command/$i %{buildroot}%{_bindir} done %if %{rhel} == 6 mkdir -p %{buildroot}%{_sysconfdir}/init install -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/init/svscanboot.conf %endif mkdir -p %{buildroot}/service cd daemontools-man || exit 1 for i in *.8; do cp -f $i %{buildroot}/usr/share/man/man8 done %post %if %{rhel} < 6 # Add svscanboot to inittab if [ ! -f /etc/inittab ]; then echo "No /etc/inittab found - required svscanboot line not added!" exit 1 elif grep svscanboot /etc/inittab >/dev/null; then echo "svscanboot line found in /etc/inittab - I assume svscan is already running" else rm -f /etc/inittab.rpmnew cp /etc/inittab /etc/inittab.rpmnew || exit 1 echo >> /etc/inittab.rpmnew echo '# Start daemontools svscan' >> /etc/inittab.rpmnew echo 'SV:123456:respawn:/usr/bin/svscanboot' >> /etc/inittab.rpmnew mv -f /etc/inittab.rpmnew /etc/inittab kill -HUP 1 echo "Added svscanboot to /etc/inittab - init should start svscan now." fi %else /sbin/initctl start svscanboot %endif %postun if [ "$1" -eq 0 ]; then %if %{rhel} < 6 # Remove svscanboot entry from inittab if grep svscanboot /etc/inittab >/dev/null; then grep -v svscan /etc/inittab > /etc/inittab.rpmnew mv -f /etc/inittab.rpmnew /etc/inittab kill -HUP 1 echo "Removed svscanboot from /etc/inittab." fi %else /sbin/initctl stop svscanboot %endif fi %files %defattr(-,root,root) %attr(0755,root,root) /usr/bin/* /usr/share/man/man8/* %if %{rhel} == 6 %{_sysconfdir}/init/*conf %endif %dir %attr(0755,root,root) /service %doc package/README %doc src/CHANGES %doc src/TODO %doc daemontools-man/README.manpages %changelog * Fri Dec 02 2011 Gavin Carr <gavin@openfusion.com.au> 0.76-7 - Fixes to init/svscanboot.conf for upstart on CentOS 6. * Mon Aug 08 2011 Gavin Carr <gavin@openfusion.com.au> 0.76-5 - Bump release number again to work around bad postun bug in -3. * Fri Aug 05 2011 Gavin Carr <gavin@openfusion.com.au> 0.76-4 - Update for RHEL/CentOS 6, which uses upstart instead of init. * Sun Aug 05 2007 Gavin Carr <gavin@openfusion.com.au> 0.76-3 - Minor spec file tweaks while rebuilding for CentOS 5. * Thu Apr 24 2003 Gavin Carr <gavin@openfusion.com.au> 0.76-1 - Build based on vanilla daemontools-0.76 tarball and Mate Wierdl's glibc 2.3.1 errno patch.