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