Summary: D. J. Bernstein daemontools Summary(pl): daemontools D. J. Bernsteina Name: daemontools Version: 0.76 Release: 2 License: DJB (http://cr.yp.to/distributors.html) Group: Networking/Admin Source0: http://cr.yp.to/%{name}/%{name}-%{version}.tar.gz # Source0-md5: 1871af2453d6e464034968a0fbcb2bfc Source1: http://smarden.org/pape/djb/manpages/%{name}-%{version}-man.tar.gz # Source1-md5: 2d3858a48f293c87202f76cd883438ee Source2: %{name}.sysconfig Source3: %{name}.init Source4: %{name}-tcprules Patch0: %{name}-glibc.patch URL: http://cr.yp.to/daemontools.html Requires(post,preun): /sbin/chkconfig # make and stat from coreutils are for building tcprules Requires: make Requires: coreutils BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) # /etc/service or /var/lib/service? (also in .sysconfig) %define servicedir /service %define tcprules /etc/tcprules.d %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. %description -l pl daemontools to zestaw narzędzi do zarządzania usługami uniksowymi. supervise monitoruje usługi. Startuje usługi i restartuje je, gdy umrą. Ustawienie nowej usługi jest proste: wszystko czego supervise potrzebuje to katalog ze skryptami startowymi, które startują usługi. multilog zapisuje komunikaty o błędach do jednego lub większej liczby plików logów. Opcjonalnie oznacza każdą linię datą oraz, w każdym logu, dołącza lub pomija linie pasujące do określonych wzorców. Automatycznie wykonuje rotację logów do limitu miejsca na dysku. Jeżeli dysk jest zapełniony, pauzuje i próbuje ponownie, bez strat danych. %prep %setup -q -n admin -a1 cd %{name}-%{version}/src %patch0 -p0 %build cd %{name}-%{version} echo "%{__cc} %{rpmcflags} -Wall" >src/conf-cc echo "%{__cc} %{rpmldflags}" >src/conf-ld package/compile %install rm -rf $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8} \ $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} \ $RPM_BUILD_ROOT{/var/lib/service,%{servicedir},%{tcprules}} # install manuals install %{name}-man/*.8* $RPM_BUILD_ROOT%{_mandir}/man8 # install binaries cd %{name}-%{version}/command install envdir envuidgid fghack multilog pgrphack \ readproctitle setlock setuidgid softlimit \ supervise svc svok svscan svscanboot svstat tai64n tai64nlocal \ $RPM_BUILD_ROOT%{_sbindir} # install rc & sysconfig files install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/svscan install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/svscan install %{SOURCE4} $RPM_BUILD_ROOT%{tcprules}/Makefile %clean rm -rf $RPM_BUILD_ROOT %post /sbin/chkconfig --add svscan if [ -f /var/lock/subsys/svscan ]; then /etc/rc.d/init.d/svscan restart >&2 else echo "Execute \"/etc/rc.d/init.d/svscan start\" to start svscan daemon." fi %preun if [ "$1" = "0" ]; then if [ -f /var/lock/subsys/svscan ]; then /etc/rc.d/init.d/svscan stop >&2 fi /sbin/chkconfig --del svscan fi %files %defattr(644,root,root,755) %doc %{name}-%{version}/{package/README,src/{CHANGES,TODO}} %attr(755,root,root) %{_sbindir}/* %attr(700,root,root) %{servicedir} %{tcprules} %attr(700,root,root) /var/lib/service %attr(754,root,root) /etc/rc.d/init.d/svscan %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/svscan %{_mandir}/man8/*