]>
Commit | Line | Data |
---|---|---|
bf5d9a42 | 1 | Summary: D. J. Bernstein daemontools |
e1ef3195 | 2 | Summary(pl.UTF-8): daemontools D. J. Bernsteina |
138d8e0d | 3 | Name: daemontools |
fa95fa2b | 4 | Version: 0.76 |
beffaa8a | 5 | Release: 13 |
fcb8bd62 | 6 | License: Public Domain |
138d8e0d | 7 | Group: Networking/Admin |
d644f65c | 8 | Source0: http://cr.yp.to/daemontools/%{name}-%{version}.tar.gz |
d6f4502a | 9 | # Source0-md5: 1871af2453d6e464034968a0fbcb2bfc |
fa95fa2b | 10 | Source1: http://smarden.org/pape/djb/manpages/%{name}-%{version}-man.tar.gz |
d6f4502a | 11 | # Source1-md5: 2d3858a48f293c87202f76cd883438ee |
bf5d9a42 | 12 | Source2: %{name}.sysconfig |
1161fdc2 | 13 | Source3: %{name}.init |
fa95fa2b | 14 | Patch0: %{name}-glibc.patch |
a6c1e848 | 15 | URL: http://cr.yp.to/daemontools.html |
4f58fb3b | 16 | BuildRequires: rpmbuild(macros) >= 1.268 |
15d4ef05 | 17 | Requires(post,preun): /sbin/chkconfig |
af76c7df | 18 | Requires: rc-scripts >= 0.4.3.0 |
03fbf1fb | 19 | Conflicts: ucspi-tcp < 0.88-7 |
3ee6e98e | 20 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
c7e01e96 | 21 | |
15d4ef05 JB |
22 | # /etc/service or /var/lib/service? (also in .sysconfig) |
23 | %define servicedir /service | |
24 | ||
c7e01e96 | 25 | %description |
bf5d9a42 | 26 | daemontools is a collection of tools for managing UNIX services. |
c7e01e96 | 27 | |
f1271f54 | 28 | supervise monitors a service. It starts the service and restarts the |
29 | service if it dies. Setting up a new service is easy: all supervise | |
30 | needs is a directory with a run script that runs the service. | |
c7e01e96 | 31 | |
f1271f54 | 32 | multilog saves error messages to one or more logs. It optionally |
33 | timestamps each line and, for each log, includes or excludes lines | |
34 | matching specified patterns. It automatically rotates logs to limit | |
35 | the amount of disk space used. If the disk fills up, it pauses and | |
bf5d9a42 | 36 | tries again, without losing any data. |
c7e01e96 | 37 | |
7541b19b JR |
38 | %description -l pl.UTF-8 |
39 | daemontools to zestaw narzędzi do zarządzania usługami uniksowymi. | |
cfe6c09b | 40 | |
7541b19b JR |
41 | supervise monitoruje usługi. Startuje usługi i restartuje je, gdy |
42 | umrą. Ustawienie nowej usługi jest proste: wszystko czego supervise | |
43 | potrzebuje to katalog ze skryptami startowymi, które startują usługi. | |
cfe6c09b | 44 | |
7541b19b JR |
45 | multilog zapisuje komunikaty o błędach do jednego lub większej liczby |
46 | plików logów. Opcjonalnie oznacza każdą linię datą oraz, w każdym | |
47 | logu, dołącza lub pomija linie pasujące do określonych wzorców. | |
48 | Automatycznie wykonuje rotację logów do limitu miejsca na dysku. | |
49 | Jeżeli dysk jest zapełniony, pauzuje i próbuje ponownie, bez strat | |
15d4ef05 | 50 | danych. |
fa95fa2b | 51 | |
15d4ef05 | 52 | %prep |
03fbf1fb ER |
53 | %setup -q -c -a1 |
54 | mv admin/daemontools-%{version}/* . | |
55 | cd src | |
15d4ef05 | 56 | %patch0 -p0 |
c7e01e96 | 57 | |
58 | %build | |
03fbf1fb ER |
59 | echo "%{__cc} %{rpmcflags} -Wall" > src/conf-cc |
60 | echo "%{__cc} %{rpmldflags}" > src/conf-ld | |
61 | ./package/compile | |
c7e01e96 | 62 | |
63 | %install | |
64617187 | 64 | rm -rf $RPM_BUILD_ROOT |
f1271f54 | 65 | install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8} \ |
beffaa8a | 66 | $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} \ |
8ce6b092 | 67 | $RPM_BUILD_ROOT%{_sysconfdir}/supervise \ |
03fbf1fb | 68 | $RPM_BUILD_ROOT{/var/lib/service,%{servicedir}} |
15d4ef05 JB |
69 | |
70 | # install manuals | |
0703e576 | 71 | cp -p %{name}-man/*.8* $RPM_BUILD_ROOT%{_mandir}/man8 |
138d8e0d | 72 | |
fa95fa2b | 73 | # install binaries |
03fbf1fb | 74 | cd command |
0239bab0 | 75 | install -p envdir envuidgid fghack multilog pgrphack \ |
fa95fa2b | 76 | readproctitle setlock setuidgid softlimit \ |
77 | supervise svc svok svscan svscanboot svstat tai64n tai64nlocal \ | |
f1271f54 | 78 | $RPM_BUILD_ROOT%{_sbindir} |
fa95fa2b | 79 | |
80 | # install rc & sysconfig files | |
0703e576 ER |
81 | cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/svscan |
82 | install -p %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/svscan | |
bf5d9a42 | 83 | |
c7e01e96 | 84 | %clean |
85 | rm -rf $RPM_BUILD_ROOT | |
bf5d9a42 | 86 | |
87 | %post | |
1e2fa720 | 88 | /sbin/chkconfig --add svscan |
4f58fb3b | 89 | %service svscan restart |
bf5d9a42 | 90 | |
91 | %preun | |
1e2fa720 | 92 | if [ "$1" = "0" ]; then |
4f58fb3b | 93 | %service svscan stop |
1e2fa720 | 94 | /sbin/chkconfig --del svscan |
95 | fi | |
c7e01e96 | 96 | |
97 | %files | |
138d8e0d | 98 | %defattr(644,root,root,755) |
03fbf1fb | 99 | %doc package/README src/{CHANGES,TODO} |
9bfb5da0 ER |
100 | %attr(755,root,root) %{_sbindir}/envdir |
101 | %attr(755,root,root) %{_sbindir}/envuidgid | |
102 | %attr(755,root,root) %{_sbindir}/fghack | |
103 | %attr(755,root,root) %{_sbindir}/multilog | |
104 | %attr(755,root,root) %{_sbindir}/pgrphack | |
105 | %attr(755,root,root) %{_sbindir}/readproctitle | |
106 | %attr(755,root,root) %{_sbindir}/setlock | |
107 | %attr(755,root,root) %{_sbindir}/setuidgid | |
108 | %attr(755,root,root) %{_sbindir}/softlimit | |
109 | %attr(755,root,root) %{_sbindir}/supervise | |
110 | %attr(755,root,root) %{_sbindir}/svc | |
111 | %attr(755,root,root) %{_sbindir}/svok | |
112 | %attr(755,root,root) %{_sbindir}/svscan | |
113 | %attr(755,root,root) %{_sbindir}/svscanboot | |
114 | %attr(755,root,root) %{_sbindir}/svstat | |
115 | %attr(755,root,root) %{_sbindir}/tai64n | |
116 | %attr(755,root,root) %{_sbindir}/tai64nlocal | |
15d4ef05 | 117 | %attr(700,root,root) %{servicedir} |
8ce6b092 | 118 | %dir %{_sysconfdir}/supervise |
bf5d9a42 | 119 | %attr(700,root,root) /var/lib/service |
120 | %attr(754,root,root) /etc/rc.d/init.d/svscan | |
cad0b5e8 | 121 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/svscan |
9bfb5da0 ER |
122 | %{_mandir}/man8/envdir.8* |
123 | %{_mandir}/man8/envuidgid.8* | |
124 | %{_mandir}/man8/fghack.8* | |
125 | %{_mandir}/man8/multilog.8* | |
126 | %{_mandir}/man8/pgrphack.8* | |
127 | %{_mandir}/man8/readproctitle.8* | |
128 | %{_mandir}/man8/setlock.8* | |
129 | %{_mandir}/man8/setuidgid.8* | |
130 | %{_mandir}/man8/softlimit.8* | |
131 | %{_mandir}/man8/supervise.8* | |
132 | %{_mandir}/man8/svc.8* | |
133 | %{_mandir}/man8/svok.8* | |
134 | %{_mandir}/man8/svscan.8* | |
135 | %{_mandir}/man8/svscanboot.8* | |
136 | %{_mandir}/man8/svstat.8* | |
137 | %{_mandir}/man8/tai64n.8* | |
138 | %{_mandir}/man8/tai64nlocal.8* |