1 Summary: D. J. Bernstein daemontools
2 Summary(pl): daemontools D. J. Bernsteina
6 License: DJB (http://cr.yp.to/distributors.html)
7 Group: Networking/Admin
8 Source0: http://cr.yp.to/daemontools/%{name}-%{version}.tar.gz
9 # Source0-md5: 1871af2453d6e464034968a0fbcb2bfc
10 Source1: http://smarden.org/pape/djb/manpages/%{name}-%{version}-man.tar.gz
11 # Source1-md5: 2d3858a48f293c87202f76cd883438ee
12 Source2: %{name}.sysconfig
14 Source4: %{name}-tcprules
15 Patch0: %{name}-glibc.patch
16 URL: http://cr.yp.to/daemontools.html
17 BuildRequires: rpmbuild(macros) >= 1.268
18 Requires(post,preun): /sbin/chkconfig
19 Requires: /sbin/chkconfig
21 # make and stat from coreutils are for building tcprules
24 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26 # /etc/service or /var/lib/service? (also in .sysconfig)
27 %define servicedir /service
28 %define tcprules /etc/tcprules.d
31 daemontools is a collection of tools for managing UNIX services.
33 supervise monitors a service. It starts the service and restarts the
34 service if it dies. Setting up a new service is easy: all supervise
35 needs is a directory with a run script that runs the service.
37 multilog saves error messages to one or more logs. It optionally
38 timestamps each line and, for each log, includes or excludes lines
39 matching specified patterns. It automatically rotates logs to limit
40 the amount of disk space used. If the disk fills up, it pauses and
41 tries again, without losing any data.
44 daemontools to zestaw narzêdzi do zarz±dzania us³ugami uniksowymi.
46 supervise monitoruje us³ugi. Startuje us³ugi i restartuje je, gdy
47 umr±. Ustawienie nowej us³ugi jest proste: wszystko czego supervise
48 potrzebuje to katalog ze skryptami startowymi, które startuj± us³ugi.
50 multilog zapisuje komunikaty o b³êdach do jednego lub wiêkszej liczby
51 plików logów. Opcjonalnie oznacza ka¿d± liniê dat± oraz, w ka¿dym
52 logu, do³±cza lub pomija linie pasuj±ce do okre¶lonych wzorców.
53 Automatycznie wykonuje rotacjê logów do limitu miejsca na dysku.
54 Je¿eli dysk jest zape³niony, pauzuje i próbuje ponownie, bez strat
58 %setup -q -n admin -a1
59 cd %{name}-%{version}/src
64 echo "%{__cc} %{rpmcflags} -Wall" >src/conf-cc
65 echo "%{__cc} %{rpmldflags}" >src/conf-ld
70 rm -rf $RPM_BUILD_ROOT
71 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8} \
72 $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} \
73 $RPM_BUILD_ROOT%{_sysconfdir}/supervise \
74 $RPM_BUILD_ROOT{/var/lib/service,%{servicedir},%{tcprules}}
77 install %{name}-man/*.8* $RPM_BUILD_ROOT%{_mandir}/man8
80 cd %{name}-%{version}/command
81 install envdir envuidgid fghack multilog pgrphack \
82 readproctitle setlock setuidgid softlimit \
83 supervise svc svok svscan svscanboot svstat tai64n tai64nlocal \
84 $RPM_BUILD_ROOT%{_sbindir}
86 # install rc & sysconfig files
87 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/svscan
88 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/svscan
90 install %{SOURCE4} $RPM_BUILD_ROOT%{tcprules}/Makefile
93 rm -rf $RPM_BUILD_ROOT
96 /sbin/chkconfig --add svscan
97 %service svscan restart
100 if [ "$1" = "0" ]; then
102 /sbin/chkconfig --del svscan
106 %defattr(644,root,root,755)
107 %doc %{name}-%{version}/{package/README,src/{CHANGES,TODO}}
108 %attr(755,root,root) %{_sbindir}/*
109 %attr(700,root,root) %{servicedir}
110 %dir %{_sysconfdir}/supervise
112 %attr(700,root,root) /var/lib/service
113 %attr(754,root,root) /etc/rc.d/init.d/svscan
114 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/svscan