X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=daemontools.spec;h=648d2ab7f1540b7be36f34e7a9095431d82824d3;hb=2e0f287b504a7faf5b0623cb77fcb6c4e1cb61d7;hp=fd758d957d1fc88a79b7bac49bb47700615cf597;hpb=138d8e0d0ded044f4d080f9b4e3ccac6ac5fe7ab;p=packages%2Fdaemontools.git diff --git a/daemontools.spec b/daemontools.spec index fd758d9..648d2ab 100644 --- a/daemontools.spec +++ b/daemontools.spec @@ -1,70 +1,108 @@ -# $Revision: 1.2 $ -Summary: DJB daemontools +Summary: D. J. Bernstein daemontools +Summary(pl): daemontools D. J. Bernsteina Name: daemontools -Version: 0.53 +Version: 0.76 Release: 1 -Copyright: D. J. Bernstein +License: DJB (http://cr.yp.to/distributors.html) Group: Networking/Admin -Source: ftp://koobera.math.uic.edu/www/software/daemontools-0.53.tar.gz -Buildroot: /tmp/%{name}-root +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 +Patch0: %{name}-glibc.patch +URL: http://cr.yp.to/daemontools.html +Requires(post,preun): /sbin/chkconfig +BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) + +# /etc/service or /var/lib/service? (also in .sysconfig) +%define servicedir /service %description -supervise monitors a service. It starts the service and restarts the -service if it dies. The companion svc program stops, pauses, or restarts -the service on sysadmin request. The svstat program prints a one-line -status report. +daemontools is a collection of tools for managing UNIX services. -cyclog writes a log to disk. It automatically synchronizes the log every -100KB (by default) to guarantee data integrity after a crash. It -automatically rotates the log to keep it below 1MB (by default). If the -disk fills up, cyclog pauses and then tries again, without losing any -data. +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. -accustamp puts a precise timestamp on each line of input. The timestamp -is a numeric TAI timestamp with microsecond precision. The companion -tailocal program converts TAI timestamps to local time. +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. -usually watches a log for lines that do not match specified patterns, -copying those lines to stderr. The companion errorsto program redirects -stderr to a file. +%description -l pl +daemontools to zestaw narzêdzi do zarz±dzania us³ugami uniksowymi. -setuser runs a program under a user's uid and gid. Unlike su, setuser -does not gain privileges; it does not check passwords, and it cannot be -run except by root. +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 +%setup -q -n admin -a1 +cd %{name}-%{version}/src +%patch0 -p0 %build -echo %{_bindir} >conf-bin -echo %{_mandir} >conf-man +cd %{name}-%{version} +echo "%{__cc} %{rpmcflags} -Wall" >src/conf-cc +echo "%{__cc} %{rpmldflags}" >src/conf-ld -make; make man +package/compile %install -install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1} - -install accustamp $RPM_BUILD_ROOT%{_bindir} -install cyclog $RPM_BUILD_ROOT%{_bindir} -install errorsto $RPM_BUILD_ROOT%{_bindir} -install fifo $RPM_BUILD_ROOT%{_bindir} -install supervise $RPM_BUILD_ROOT%{_bindir} -install svc $RPM_BUILD_ROOT%{_bindir} -install svstat $RPM_BUILD_ROOT%{_bindir} -install tailocal $RPM_BUILD_ROOT%{_bindir} -install testfilelock $RPM_BUILD_ROOT%{_bindir} -install usually $RPM_BUILD_ROOT%{_bindir} -install setuser $RPM_BUILD_ROOT%{_bindir} -install *.1 $RPM_BUILD_ROOT%{_mandir}/man1 - -gzip -9nf BLURB CHANGES INSTALL README THANKS TODO VERSION $RPM_BUILD_ROOT%{_mandir}/man1/*.1 +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}} + +# 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 %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 {BLURB,CHANGES,INSTALL,README,THANKS,TODO,VERSION}.gz -%attr(644,root,root) %{_mandir}/* -%attr(755,root,root) %{_bindir}/* +%doc %{name}-%{version}/{package/README,src/{CHANGES,TODO}} +%attr(755,root,root) %{_sbindir}/* +%attr(700,root,root) %{servicedir} +%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/*