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
18 Requires(post,preun): /sbin/chkconfig
19 # make and stat from coreutils are for building tcprules
22 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24 # /etc/service or /var/lib/service? (also in .sysconfig)
25 %define servicedir /service
26 %define tcprules /etc/tcprules.d
29 daemontools is a collection of tools for managing UNIX services.
31 supervise monitors a service. It starts the service and restarts the
32 service if it dies. Setting up a new service is easy: all supervise
33 needs is a directory with a run script that runs the service.
35 multilog saves error messages to one or more logs. It optionally
36 timestamps each line and, for each log, includes or excludes lines
37 matching specified patterns. It automatically rotates logs to limit
38 the amount of disk space used. If the disk fills up, it pauses and
39 tries again, without losing any data.
42 daemontools to zestaw narzêdzi do zarz±dzania us³ugami uniksowymi.
44 supervise monitoruje us³ugi. Startuje us³ugi i restartuje je, gdy
45 umr±. Ustawienie nowej us³ugi jest proste: wszystko czego supervise
46 potrzebuje to katalog ze skryptami startowymi, które startuj± us³ugi.
48 multilog zapisuje komunikaty o b³êdach do jednego lub wiêkszej liczby
49 plików logów. Opcjonalnie oznacza ka¿d± liniê dat± oraz, w ka¿dym
50 logu, do³±cza lub pomija linie pasuj±ce do okre¶lonych wzorców.
51 Automatycznie wykonuje rotacjê logów do limitu miejsca na dysku.
52 Je¿eli dysk jest zape³niony, pauzuje i próbuje ponownie, bez strat
56 %setup -q -n admin -a1
57 cd %{name}-%{version}/src
62 echo "%{__cc} %{rpmcflags} -Wall" >src/conf-cc
63 echo "%{__cc} %{rpmldflags}" >src/conf-ld
68 rm -rf $RPM_BUILD_ROOT
69 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8} \
70 $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} \
71 $RPM_BUILD_ROOT{/var/lib/service,%{servicedir},%{tcprules}}
74 install %{name}-man/*.8* $RPM_BUILD_ROOT%{_mandir}/man8
77 cd %{name}-%{version}/command
78 install envdir envuidgid fghack multilog pgrphack \
79 readproctitle setlock setuidgid softlimit \
80 supervise svc svok svscan svscanboot svstat tai64n tai64nlocal \
81 $RPM_BUILD_ROOT%{_sbindir}
83 # install rc & sysconfig files
84 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/svscan
85 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/svscan
87 install %{SOURCE4} $RPM_BUILD_ROOT%{tcprules}/Makefile
90 rm -rf $RPM_BUILD_ROOT
93 /sbin/chkconfig --add svscan
94 if [ -f /var/lock/subsys/svscan ]; then
95 /etc/rc.d/init.d/svscan restart >&2
97 echo "Execute \"/etc/rc.d/init.d/svscan start\" to start svscan daemon."
101 if [ "$1" = "0" ]; then
102 if [ -f /var/lock/subsys/svscan ]; then
103 /etc/rc.d/init.d/svscan stop >&2
105 /sbin/chkconfig --del svscan
109 %defattr(644,root,root,755)
110 %doc %{name}-%{version}/{package/README,src/{CHANGES,TODO}}
111 %attr(755,root,root) %{_sbindir}/*
112 %attr(700,root,root) %{servicedir}
114 %attr(700,root,root) /var/lib/service
115 %attr(754,root,root) /etc/rc.d/init.d/svscan
116 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/svscan