]> git.pld-linux.org Git - packages/djbdns.git/blame - djbdns.spec
- add -dnscachex package to run secondary (external likely) dnscache
[packages/djbdns.git] / djbdns.spec
CommitLineData
27152db7 1# TODO
27152db7
ER
2# - warning: Installed (but unpackaged) file(s) found:
3# /etc/rbldns/data
4# /usr/bin/random-ip
b313ed36 5Summary: DJB DNS
e6716d07 6Summary(pl.UTF-8): DJB DNS
e201398d 7Name: djbdns
8Version: 1.05
aaad6436 9Release: 23.2
f6fae131
JB
10# http://cr.yp.to/distributors.html
11License: Public Domain
e201398d 12Group: Networking/Daemons
e201398d 13Source0: http://cr.yp.to/djbdns/%{name}-%{version}.tar.gz
8a927a44 14# Source0-md5: 3147c5cd56832aa3b41955c7a51cbeb2
c3bfacc7 15Source1: %{name}-doc.tar.gz
8c85bb6b 16# Source1-md5: 1d6aed1a5d3d3eda3958fa3e7d808fc8
8c969dfe 17Source2: ftp://ftp.innominate.org/gpa/djb/%{name}-%{version}-man.tar.gz
8c85bb6b 18# Source2-md5: 2b4e71fa4592858e4508538f78d50f61
fb47ae15 19Source3: http://www.sericyb.com.au/tinydns-notify
2a5b64f5 20# NoSource3-md5: 2213bdc8c58c10cb8770b7e5b0d67aea
27152db7
ER
21Source4: http://www.sericyb.com.au/tinydns-log
22# NoSource4-md5: a9af7707a7cb7c41e855f441e242e422
003ba763 23Patch0: dnscache-1.05-multiple-ip.patch
8badc80b 24# adds IPv6 support
cb79da0b 25Patch1: http://www.fefe.de/dns/%{name}-1.05-test22.diff.bz2
2fb23191 26Patch3: http://iksz.hu/package/djbdns-conf/%{name}-1.05-multi_tinydns_data.patch
94825c27 27Patch4: %{name}-srv.patch
40df8a87 28Patch5: %{name}-glibc.patch
d4e07401 29# http://www.iecc.com/rbldns-patch.txt
27152db7 30Patch6: %{name}-rbldns_a.patch
58c2947d 31# http://core.segfault.pl/~hobbit/tinydns-include.patch
32Patch8: %{name}-tinydns-include.patch
df2dfdac 33Patch9: %{name}-tinydns-log-ipv6.patch
a453401c
MW
34# http://romana.now.ie/software/djbdns-cachestats.patch
35Patch10: %{name}-cachestats.patch
aaad6436 36Patch11: %{name}-ipv6-incfix.patch
e201398d 37URL: http://cr.yp.to/djbdns.html
5a10cd56 38BuildRequires: rpm-perlprov
5aa5729c 39BuildRequires: rpmbuild(macros) >= 1.202
8361445e
ER
40Requires(postun): /usr/sbin/groupdel
41Requires(postun): /usr/sbin/userdel
7b40c2c2 42Requires(pre): /bin/id
bef00ef1 43Requires(pre): /usr/bin/getgid
7b40c2c2 44Requires(pre): /usr/sbin/groupadd
45Requires(pre): /usr/sbin/useradd
bef00ef1 46Provides: group(djbdns)
c35e9e1a 47Provides: nameserver
bef00ef1 48Provides: user(dnslog)
c35e9e1a 49Obsoletes: caching-nameserver
c3bfacc7 50BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
51
52%description
363edfa3 53This is a set of DNS servers with security in mind. If you find a
54security hole you can get a prize.
55
56This package contains some basic DNS debugging tools and some
57documentation. If you need a DNS server install one of the following
58packages:
59
099fa16f 60 - djbdns-dnscache - a local DNS cache
aaad6436 61 - djbdns-dnscachex - a external DNS cache
099fa16f 62 - djbdns-tinydns - a DNS server
fb47ae15 63 - djbdns-tinydns-notify - a tool to send NOTIFY requests
099fa16f 64 - djbdns-pickdns - a DNS load-balancing server
65 - djbdns-walldns - a reverse DNS wall
66 - djbdns-rbldns - an IP-address-listing DNS server
67 - djbdns-axfrdns - a DNS zone transfer server
363edfa3 68
91ea28f8 69%description -l de.UTF-8
363edfa3 70Dies ist ein Satz von auf Sicherheit zielenden DNS-Servers. Man kriegt
71ein Preis, wenn man ein Sicherheitsloch findet.
72
91ea28f8 73Dieses Paket enthält ein paar DNS-Werkzeugen und etwas Dokumentation.
363edfa3 74Wenn du einen DNS-Server braucht, installe ein von den folgenden
75Paketen:
76
099fa16f 77 - djbdns-dnscache - ein lokaler DNS-Cache
78 - djbdns-tinydns - ein DNS-Server
79 - djbdns-pickdns - ein Belastung ausgleichender DNS-Server
91ea28f8 80 - djbdns-walldns - eine Wand Rückgekehrten DNSs
099fa16f 81 - djbdns-rbldns - ein IP-Adressen-Listen-DNS-Server
82 - djbdns-axfrdns - ein DNS-Zonen-Transfer-Server
c3bfacc7 83
91ea28f8
JR
84%description -l pl.UTF-8
85Jest to alternatywny zestaw serwerów DNS'u, którego głównym celem jest
86bezpieczeństwo. Za znalezienie dziury w tym systemie została
363edfa3 87wyznaczona nawet nagroda.
88
91ea28f8
JR
89Ten pakiet zawiera kilka podstawowych narzędzi DNS oraz trochę
90dokumentacji. Jeśli potrzebujesz serwera DNS zainstaluj jeden z
91następujących pakietów:
363edfa3 92
099fa16f 93 - djbdns-dnscache - lokalny cache DNS
94 - djbdns-tinydns - serwer DNS
91ea28f8
JR
95 - djbdns-tinydns-notify - narzędzie do wysyłania komunikatów NOTIFY
96 - djbdns-pickdns - serwer DNS do równoważenia obciążeń
97 - djbdns-walldns - ściana dla odwrotnych zapytań DNS
98 - djbdns-rbldns - serwer DNS list adresów IP
99 - djbdns-axfrdns - serwer transferów stref DNS
363edfa3 100
37e173ce 101%package dnscache
363edfa3 102Summary: DJB's local DNS cache
e6716d07
ER
103Summary(de.UTF-8): DJBs lokaler DNS-Cache
104Summary(pl.UTF-8): Lokalny cache DNS od DJB
363edfa3 105Group: Networking/Daemons
8361445e
ER
106Requires(post): diffutils
107Requires(post): fileutils
108Requires(postun): /usr/sbin/groupdel
109Requires(postun): /usr/sbin/userdel
7b40c2c2 110Requires(pre): /bin/id
111Requires(pre): /usr/sbin/groupadd
112Requires(pre): /usr/sbin/useradd
37e173ce 113Requires(preun): daemontools
2eeb182e 114Requires: %{name} = %{version}-%{release}
50f1c4d2 115Requires: daemontools >= 0.70-5
bef00ef1 116Provides: user(dnscache)
37e173ce 117Obsoletes: dnscache
363edfa3 118
37e173ce 119%description dnscache
363edfa3 120dnscache is a local DNS cache from the djbdns package. It accepts
121recursive DNS queries from local clients such as web browsers and mail
122transfer agents. It collects responses from remote DNS servers. It
123caches the responses to save time later.
124
91ea28f8
JR
125%description dnscache -l de.UTF-8
126dnscache ist ein lokaler DNS-Cache aus dem djbdns-Paket. Es empfängt
363edfa3 127rekursive DNS-Fragen von den lokalen Klienten, zum Beispiel
128Web-Browsers und Mail-Transfer-Agenten. Es sammelt die Antworten von
91ea28f8 129den Fern-DNS-Servers. Es merkt sich die Antworten, um die Zeit später
363edfa3 130zu sparen.
131
91ea28f8 132%description dnscache -l pl.UTF-8
363edfa3 133dnscache jest lokalnym cachem DNS z pakietu djbdns. Przyjmuje on
91ea28f8
JR
134rekursywne zapytania DNS od lokalnych klientów takich, jak
135przeglądarki WWW i agenci transferu poczty (MTA). Zbiera on odpowiedzi
136od zdalnych serwerów DNS. Zapamiętuje on odpowiedzi, żeby później
137oszczędzić czas.
363edfa3 138
aaad6436
ER
139%package dnscachex
140Summary: DJB's external DNS cache
141Group: Networking/Daemons
142Requires(post): diffutils
143Requires(post): fileutils
144Requires(postun): /usr/sbin/groupdel
145Requires(postun): /usr/sbin/userdel
146Requires(pre): /bin/id
147Requires(pre): /usr/sbin/groupadd
148Requires(pre): /usr/sbin/useradd
149Requires(preun): daemontools
150Requires: %{name}-dnscache = %{version}-%{release}
151
152%description dnscachex
153dnscachex is a external DNS cache from the djbdns package. It accepts
154recursive DNS queries from external clients such as web browsers and
155mail transfer agents. It collects responses from remote DNS servers.
156It caches the responses to save time later.
157
37e173ce 158%package tinydns
363edfa3 159Summary: DJB's DNS server
e6716d07
ER
160Summary(de.UTF-8): DJBs DNS-Server
161Summary(pl.UTF-8): Serwer DNS od DJB
363edfa3 162Group: Networking/Daemons
8361445e
ER
163Requires(post): diffutils
164Requires(postun): /usr/sbin/groupdel
165Requires(postun): /usr/sbin/userdel
7b40c2c2 166Requires(pre): /bin/id
167Requires(pre): /usr/sbin/groupadd
168Requires(pre): /usr/sbin/useradd
37e173ce 169Requires(preun): daemontools
2eeb182e 170Requires: %{name} = %{version}-%{release}
50f1c4d2 171Requires: daemontools >= 0.70-5
363edfa3 172Requires: make
bef00ef1 173Provides: user(tinydns)
37e173ce 174Obsoletes: tinydns
363edfa3 175
37e173ce 176%description tinydns
363edfa3 177tinydns is a DNS server from the djbdns package. It accepts iterative
178DNS queries from hosts around the Internet and responds with
179locally-configured information.
180
91ea28f8
JR
181%description tinydns -l de.UTF-8
182tinydns ist ein DNS-Server aus dem djbdns-Paket. Es empfängt iterative
363edfa3 183DNS-Fragen von dem Hosts aus allem Internet und antwortet mit den
184lokal-konfigurierten Informationen.
185
91ea28f8 186%description tinydns -l pl.UTF-8
363edfa3 187tinydns jest serwerem DNS z pakietu djbdns. Przyjmuje on iteracyjne
91ea28f8 188zapytania DNS od komputerów z całego Internetu i odpowiada przy użyciu
363edfa3 189lokalnie skonfigurowanych informacji.
190
fb47ae15 191%package tinydns-notify
192Summary: DNS NOTIFY sending tool
e6716d07 193Summary(pl.UTF-8): Narzędzie do wysyłania komunikatów DNS NOTIFY
fb47ae15 194License: Free to use
8361445e 195Group: Networking/Daemons
fb47ae15 196URL: http://www.sericyb.com.au/tinydns-notify
2eeb182e 197Requires: %{name} = %{version}-%{release}
fb47ae15 198Requires: perl-Net-DNS
8361445e 199Requires: perl-modules
fb47ae15 200Obsoletes: tinydns-notify
201
202%description tinydns-notify
2fb23191
ER
203tinydns-notify is a tool written in Perl, which extracts zones and
204their nameservers from tinydns-data files and sends DNS NOTIFY
fb47ae15 205requests to nameservers listed in notify-list file.
206
91ea28f8
JR
207%description tinydns-notify -l pl.UTF-8
208tinydns-notify jest napisanym w Perlu narzędziem, które czyta pliki
209stref i odpowiadające im serwery nazw z plików tinydns-data, a
210następnie wysyła żądania NOTIFY do serwerów wyspecyfikowanych w pliku
5a10cd56 211notify-list.
fb47ae15 212
37e173ce 213%package pickdns
363edfa3 214Summary: DJB's load-balancing DNS server
e6716d07
ER
215Summary(de.UTF-8): DJBs Belastung ausgleichender DNS-Server
216Summary(pl.UTF-8): Serwer DNS równoważący obciążenie od DJB
363edfa3 217Group: Networking/Daemons
8361445e
ER
218Requires(post): diffutils
219Requires(postun): /usr/sbin/groupdel
220Requires(postun): /usr/sbin/userdel
7b40c2c2 221Requires(pre): /bin/id
222Requires(pre): /usr/sbin/groupadd
223Requires(pre): /usr/sbin/useradd
37e173ce 224Requires(preun): daemontools
2eeb182e 225Requires: %{name} = %{version}-%{release}
50f1c4d2 226Requires: daemontools >= 0.70-5
363edfa3 227Requires: make
bef00ef1 228Provides: user(pickdns)
37e173ce 229Obsoletes: pickdns
363edfa3 230
37e173ce 231%description pickdns
363edfa3 232pickdns is a DNS load-balancing server from the djbdns package. It
233accepts iterative DNS queries from hosts around the Internet and
234responds with a dynamic selection of locally configured IP addresses
235with 5-second TTLs.
236
91ea28f8 237%description pickdns -l de.UTF-8
363edfa3 238pickdns ist ein Belastung ausgleichender DNS-Server aus dem
91ea28f8 239djbdns-Paket. Es empfängt iterative DNS-Fragen von den Hosts aus allem
363edfa3 240Internet und antwortet mit eine dynamische Auswahl von den
241lokal-konfigurierten IP-Adressen mit 5-Sekunden-TTLs.
242
91ea28f8
JR
243%description pickdns -l pl.UTF-8
244pickdns jest równoważącym obciążenie serwerem DNS z pakietu djbdns.
245Odbiera on iteracyjne zapytania DNS od komputerów z całego internetu i
246odpowiada dynamicznym wyborem lokalnie skonfigurowanych adresów IP z
363edfa3 2475-sekundowymi TTLami.
248
37e173ce 249%package walldns
363edfa3 250Summary: DJB's reverse DNS wall
e6716d07
ER
251Summary(de.UTF-8): DJBs Wand rückgekehrten DNSs
252Summary(pl.UTF-8): Ściana dla odwrotnych zapytań DNS od DJB
363edfa3 253Group: Networking/Daemons
8361445e
ER
254Requires(post): diffutils
255Requires(postun): /usr/sbin/groupdel
256Requires(postun): /usr/sbin/userdel
7b40c2c2 257Requires(pre): /bin/id
258Requires(pre): /usr/sbin/groupadd
259Requires(pre): /usr/sbin/useradd
37e173ce 260Requires(preun): daemontools
2eeb182e 261Requires: %{name} = %{version}-%{release}
50f1c4d2 262Requires: daemontools >= 0.70-5
bef00ef1 263Provides: user(walldns)
37e173ce 264Obsoletes: walldns
363edfa3 265
37e173ce 266%description walldns
363edfa3 267walldns is a reverse DNS wall from the djbdns package. It accepts
268iterative DNS queries for in-addr.arpa domains from hosts around the
269Internet and supplies generic responses that avoid revealing local
270host information.
271
91ea28f8
JR
272%description walldns -l de.UTF-8
273walldns ist ein Wand rückgekehrten DNSs aus dem djbdns-Paket. Es
274empfängt iterative DNS-Fragen für den in-addr.arpa-Domänen von den
363edfa3 275Hosts aus allem Internet und liefert Antworte, die vermeiden
91ea28f8 276Informationen über die lokalen Hosts zu aufzudecken.
363edfa3 277
91ea28f8
JR
278%description walldns -l pl.UTF-8
279walldns jest ścianą dla odwrotnych zapytań DNS z pakietu djbdns.
363edfa3 280Przyjmuje ona iteracyjne zapytania DNS dla domen in-addr.arpa od
91ea28f8 281komputerów z całego Internetu i dostarcza odpowiedzi, które unikają
363edfa3 282ujawniania informacji o lokalnych komputerach.
283
37e173ce 284%package rbldns
363edfa3 285Summary: DJB's IP-address-listing DNS server
e6716d07
ER
286Summary(de.UTF-8): DJBs IP-Adressen-Listen-DNS-Server
287Summary(pl.UTF-8): Serwer DNS list adresów IP od DJB
363edfa3 288Group: Networking/Daemons
8361445e
ER
289Requires(post): diffutils
290Requires(postun): /usr/sbin/groupdel
291Requires(postun): /usr/sbin/userdel
7b40c2c2 292Requires(pre): /bin/id
293Requires(pre): /usr/sbin/groupadd
294Requires(pre): /usr/sbin/useradd
37e173ce 295Requires(preun): daemontools
2eeb182e 296Requires: %{name} = %{version}-%{release}
50f1c4d2 297Requires: daemontools >= 0.70-5
363edfa3 298Requires: make
bef00ef1 299Provides: user(rbldns)
37e173ce 300Obsoletes: rbldns
27152db7 301#Obsoletes: rbldnsd
363edfa3 302
37e173ce 303%description rbldns
363edfa3 304rbldns is an IP-address-listing DNS server from the djbdns package. It
305accepts iterative DNS queries from hosts around the Internet asking
306about various IP addresses. It provides responses showing whether the
307addresses are on a locally configured list, such as RBL or DUL.
308
91ea28f8 309%description rbldns -l de.UTF-8
363edfa3 310rbldns ist ein IP-Adressen-Listen-DNS-Server aus dem djbdns-Paket. Es
91ea28f8 311empfängt iterative DNS-Fragen von den Hosts aus allem Internet
363edfa3 312fragende nach verschiedene IP-Adresse. Es liefert Antworte, die zeugen
313ob die Adresse sich auf einer lokal-konfigurierten Liste befinden, zum
314Beispiel RBL oder DUL.
315
91ea28f8
JR
316%description rbldns -l pl.UTF-8
317rbldns jest serwerem DNS list adresów z pakietu djbdns. Przyjmuje on
318iteracyjne zapytania DNS od komputerów z całego Internetu pytające o
319różne adresy IP. Dostarcza on odpowiedzi pokazujących, czy adresy te
320są na lokalnie skonfigurowanej liście takiej, jak RBL lub DUL.
363edfa3 321
37e173ce 322%package axfrdns
363edfa3 323Summary: DJB's DNS zone-transfer server
e6716d07
ER
324Summary(de.UTF-8): DJBs DNS-Zonen-Transfer-Server
325Summary(pl.UTF-8): Serwer transferów stref DNS od DJB
363edfa3 326Group: Networking/Daemons
8361445e
ER
327Requires(postun): /usr/sbin/groupdel
328Requires(postun): /usr/sbin/userdel
7b40c2c2 329Requires(pre): /bin/id
330Requires(pre): /usr/sbin/groupadd
331Requires(pre): /usr/sbin/useradd
37e173ce 332Requires(preun): daemontools
2eeb182e
ER
333Requires: %{name} = %{version}-%{release}
334Requires: %{name}-tinydns = %{version}-%{release}
50f1c4d2 335Requires: daemontools >= 0.70-5
363edfa3 336Requires: make
37e173ce 337Requires: ucspi-tcp
bef00ef1 338Provides: user(axfrdns)
37e173ce 339Obsoletes: axfrdns
363edfa3 340
37e173ce 341%description axfrdns
363edfa3 342axfrdns is a DNS zone transfer server from the djbdns package. It
343reads a zone-transfer request in DNS-over-TCP format from its standard
344input and responds with locally configured information.
345
91ea28f8 346%description axfrdns -l de.UTF-8
363edfa3 347axfrdns ist ein DNS-Zonen-Transfer-Server aus dem djbdns-Paket. Es
348liest ein Zonen-Transfer-Ersuchen im DNS-over-TCP-Format von seinem
349standarden Eingabe und antwortet mit den lokal-konfigurierten
350Informationen.
351
91ea28f8
JR
352%description axfrdns -l pl.UTF-8
353axfrdns jest serwerem transferów stref DNS z pakietu djbdns. Wczytuje
354on ze standardowego wejścia prośbę o transfer strefy w formacie
355DNS-over-TCP i odpowiada przy użyciu lokalnie skonfigurowanych
363edfa3 356informacji.
c3bfacc7 357
358%prep
b4c80007 359%setup -q -a1 -a2
df2dfdac
ER
360install %{SOURCE3} .
361install %{SOURCE4} .
b4c80007 362
649d2612 363%patch1 -p1
8badc80b 364%patch0 -p1
51523488 365%patch3 -p1
94825c27 366%patch4 -p1
40df8a87 367%patch5
185f3145 368%patch6 -p1
58c2947d 369%patch8 -p1
df2dfdac 370%patch9 -p1
a453401c 371%patch10 -p1
aaad6436 372%patch11 -p1
c3bfacc7 373cd doc
374ln -s merge/djbdns/* .
375
00cebe6a 376%build
e201398d 377echo %{__cc} %{rpmcflags} >conf-cc
e73730dc 378echo %{_prefix} > conf-home
b313ed36 379%{__make}
c3bfacc7 380
381%install
382rm -rf $RPM_BUILD_ROOT
003ba763 383install -d $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_sysconfdir}}
b4c80007 384install -d $RPM_BUILD_ROOT%{_mandir}/{man1,man5,man8}
c3bfacc7 385
df2dfdac
ER
386install tinydns-notify $RPM_BUILD_ROOT%{_bindir}
387install tinydns-log $RPM_BUILD_ROOT%{_bindir}
fb47ae15 388
003ba763 389install dnsroots.global $RPM_BUILD_ROOT%{_sysconfdir}
c3bfacc7 390install axfr-get $RPM_BUILD_ROOT%{_bindir}
391install axfrdns $RPM_BUILD_ROOT%{_bindir}
392install axfrdns-conf $RPM_BUILD_ROOT%{_bindir}
393install cachetest $RPM_BUILD_ROOT%{_bindir}
394install dnscache $RPM_BUILD_ROOT%{_bindir}
395install dnscache-conf $RPM_BUILD_ROOT%{_bindir}
396install dnsfilter $RPM_BUILD_ROOT%{_bindir}
397install dnsip $RPM_BUILD_ROOT%{_bindir}
398install dnsipq $RPM_BUILD_ROOT%{_bindir}
399install dnsmx $RPM_BUILD_ROOT%{_bindir}
400install dnsname $RPM_BUILD_ROOT%{_bindir}
401install dnsq $RPM_BUILD_ROOT%{_bindir}
402install dnsqr $RPM_BUILD_ROOT%{_bindir}
403install dnstrace $RPM_BUILD_ROOT%{_bindir}
404install dnstxt $RPM_BUILD_ROOT%{_bindir}
405install pickdns $RPM_BUILD_ROOT%{_bindir}
406install pickdns-conf $RPM_BUILD_ROOT%{_bindir}
407install pickdns-data $RPM_BUILD_ROOT%{_bindir}
408install random-ip $RPM_BUILD_ROOT%{_bindir}
409install rbldns $RPM_BUILD_ROOT%{_bindir}
410install rbldns-conf $RPM_BUILD_ROOT%{_bindir}
411install rbldns-data $RPM_BUILD_ROOT%{_bindir}
c3bfacc7 412install tinydns $RPM_BUILD_ROOT%{_bindir}
413install tinydns-conf $RPM_BUILD_ROOT%{_bindir}
414install tinydns-data $RPM_BUILD_ROOT%{_bindir}
415install tinydns-edit $RPM_BUILD_ROOT%{_bindir}
416install tinydns-get $RPM_BUILD_ROOT%{_bindir}
417install walldns $RPM_BUILD_ROOT%{_bindir}
418install walldns-conf $RPM_BUILD_ROOT%{_bindir}
b4c80007 419install djbdns-man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
420install djbdns-man/*.5 $RPM_BUILD_ROOT%{_mandir}/man5
421install djbdns-man/*.8 $RPM_BUILD_ROOT%{_mandir}/man8
c3bfacc7 422
a4560ee0
ER
423make_supervise_service() {
424 %{?debug:set -x}
425 local service="$1"
426 local svcdir=$RPM_BUILD_ROOT%{_sysconfdir}/$service
427 local logdir=$RPM_BUILD_ROOT/var/log/djbdns/$service
428
429 install -d $svcdir/supervise $svcdir/log/supervise $logdir
430 touch $logdir/{lock,state}
363edfa3 431
a4560ee0
ER
432 touch $svcdir/log/supervise/{lock,status}
433 mkfifo $svcdir/log/supervise/{control,ok}
434 touch $svcdir/supervise/{lock,status}
435 mkfifo $svcdir/supervise/{control,ok}
436}
437
438##### DNSCACHE #####
439make_supervise_service dnscache
440s=$RPM_BUILD_ROOT%{_sysconfdir}/dnscache
441mkdir $s/env
442echo %{_sysconfdir}/dnscache/root > $s/env/ROOT
443echo 127.0.0.1 > $s/env/IP
444echo 0.0.0.0 > $s/env/IPSEND
445echo 1000000 > $s/env/CACHESIZE
446echo 3000000 > $s/env/DATALIMIT
447touch $s/env/IGNOREIP
448cat>$s/run<<'EOF'
363edfa3 449#!/bin/sh
450exec 2>&1
451exec <seed
452exec envdir ./env sh -c '
49c7d515 453 exec envuidgid dnscache softlimit -o250 -d "$DATALIMIT" %{_bindir}/dnscache
363edfa3 454'
a4560ee0
ER
455EOF
456cat>$s/log/run<<'EOF'
363edfa3 457#!/bin/sh
49c7d515 458exec setuidgid dnslog multilog t /var/log/djbdns/dnscache
a4560ee0
ER
459EOF
460mkdir $s/root
461mkdir $s/root/ip
462touch $s/root/ip/127.0.0.1
463mkdir $s/root/servers
464ln $RPM_BUILD_ROOT%{_sysconfdir}/dnsroots.global $s/root/servers/@
465dd if=/dev/zero of=$s/seed bs=128c count=1
363edfa3 466
aaad6436
ER
467##### DNSCACHEX #####
468make_supervise_service dnscachex
469s=$RPM_BUILD_ROOT%{_sysconfdir}/dnscachex
470mkdir $s/env
471echo %{_sysconfdir}/dnscachex/root > $s/env/ROOT
472echo 127.0.0.1 > $s/env/IP
473echo 0.0.0.0 > $s/env/IPSEND
474echo 1000000 > $s/env/CACHESIZE
475echo 3000000 > $s/env/DATALIMIT
476touch $s/env/IGNOREIP
477cat>$s/run<<'EOF'
478#!/bin/sh
479exec 2>&1
480exec <seed
481exec envdir ./env sh -c '
482 exec envuidgid dnscache softlimit -o250 -d "$DATALIMIT" %{_bindir}/dnscache
483'
484EOF
485cat>$s/log/run<<'EOF'
486#!/bin/sh
487exec setuidgid dnslog multilog t /var/log/djbdns/dnscachex
488EOF
489mkdir $s/root
490mkdir $s/root/ip
491touch $s/root/ip/127.0.0.1
492mkdir $s/root/servers
493ln $RPM_BUILD_ROOT%{_sysconfdir}/dnsroots.global $s/root/servers/@
494dd if=/dev/zero of=$s/seed bs=128c count=1
495
363edfa3 496##### TINYDNS #####
a4560ee0
ER
497make_supervise_service tinydns
498s=$RPM_BUILD_ROOT%{_sysconfdir}/tinydns
499cat>$s/log/run<<EOF
363edfa3 500#!/bin/sh
49c7d515 501exec setuidgid dnslog multilog t /var/log/djbdns/tinydns
a4560ee0
ER
502EOF
503mkdir $s/env
504echo %{_sysconfdir}/tinydns/root > $s/env/ROOT
505echo 127.0.0.1 > $s/env/IP
506cat>$s/run<<EOF
363edfa3 507#!/bin/sh
508exec 2>&1
509exec envuidgid tinydns envdir ./env softlimit -d300000 %{_bindir}/tinydns
a4560ee0
ER
510EOF
511mkdir $s/root
512touch $s/root/data
513cat>$s/root/add-ns<<'EOF'
363edfa3 514#!/bin/sh
49c7d515 515exec %{_bindir}/tinydns-edit data data.new add ns ${1+"$@"}
a4560ee0
ER
516EOF
517cat>$s/root/add-childns<<'EOF'
363edfa3 518#!/bin/sh
49c7d515 519exec %{_bindir}/tinydns-edit data data.new add childns ${1+"$@"}
a4560ee0
ER
520EOF
521cat>$s/root/add-host<<'EOF'
363edfa3 522#!/bin/sh
49c7d515 523exec %{_bindir}/tinydns-edit data data.new add host ${1+"$@"}
a4560ee0
ER
524EOF
525cat>$s/root/add-host6<<'EOF'
b4c80007 526#!/bin/sh
49c7d515 527exec %{_bindir}/tinydns-edit data data.new add host6 ${1+"$@"}
a4560ee0
ER
528EOF
529cat>$s/root/add-alias<<'EOF'
363edfa3 530#!/bin/sh
49c7d515 531exec %{_bindir}/tinydns-edit data data.new add alias ${1+"$@"}
a4560ee0
ER
532EOF
533cat>$s/root/add-alias6<<'EOF'
b4c80007 534#!/bin/sh
49c7d515 535exec %{_bindir}/tinydns-edit data data.new add alias6 ${1+"$@"}
a4560ee0
ER
536EOF
537cat>$s/root/add-mx<<'EOF'
363edfa3 538#!/bin/sh
49c7d515 539exec %{_bindir}/tinydns-edit data data.new add mx ${1+"$@"}
a4560ee0
ER
540EOF
541cat>$s/root/Makefile<<'EOF'
363edfa3 542data.cdb: data
d8bfa25b 543 %{_bindir}/tinydns-data
a4560ee0 544EOF
363edfa3 545
546##### PICKDNS #####
a4560ee0
ER
547make_supervise_service pickdns
548s=$RPM_BUILD_ROOT%{_sysconfdir}/pickdns
549cat>$s/log/run<<EOF
363edfa3 550#!/bin/sh
49c7d515 551exec setuidgid dnslog multilog t /var/log/djbdns/pickdns
a4560ee0
ER
552EOF
553mkdir $s/env
554echo %{_sysconfdir}/pickdns/root > $s/env/ROOT
555echo 127.0.0.1 > $s/env/IP
556cat>$s/run<<EOF
363edfa3 557#!/bin/sh
558exec 2>&1
559exec envuidgid pickdns envdir ./env softlimit -d250000 %{_bindir}/pickdns
a4560ee0
ER
560EOF
561mkdir $s/root
562touch $s/root/data
563cat>$s/root/Makefile<<EOF
363edfa3 564data.cdb: data
d8bfa25b 565 %{_bindir}/pickdns-data
a4560ee0 566EOF
363edfa3 567
568##### WALLDNS #####
a4560ee0
ER
569make_supervise_service walldns
570s=$RPM_BUILD_ROOT%{_sysconfdir}/walldns
571cat>$s/log/run<<EOF
363edfa3 572#!/bin/sh
573exec setuidgid dnslog multilog t ./main
a4560ee0
ER
574EOF
575mkdir $s/env
576echo %{_sysconfdir}/walldns/root > $s/env/ROOT
577echo 127.0.0.1 > $s/env/IP
578cat>$s/run<<EOF
363edfa3 579#!/bin/sh
580exec 2>&1
581exec envuidgid walldns envdir ./env softlimit -d250000 %{_bindir}/walldns
a4560ee0
ER
582EOF
583mkdir $s/root
363edfa3 584
585##### RBLDNS #####
a4560ee0
ER
586make_supervise_service rbldns
587s=$RPM_BUILD_ROOT%{_sysconfdir}/rbldns
588cat>$s/log/run<<EOF
363edfa3 589#!/bin/sh
49c7d515 590exec setuidgid dnslog multilog t /var/log/djbdns/rbldns
a4560ee0
ER
591EOF
592mkdir $s/env
593echo %{_sysconfdir}/rbldns/root > $s/env/ROOT
594echo 127.0.0.1 > $s/env/IP
595echo in-addr.arpa > $s/env/BASE
596cat>$s/run<<EOF
363edfa3 597#!/bin/sh
598exec 2>&1
599exec envuidgid rbldns envdir ./env softlimit -d250000 %{_bindir}/rbldns
a4560ee0
ER
600EOF
601mkdir $s/root
602touch $s/root/data
603cat>$s/root/Makefile<<EOF
363edfa3 604data.cdb: data
d8bfa25b 605 %{_bindir}/rbldns-data
a4560ee0
ER
606EOF
607cat>$s/data<<EOF
e67eacd6 608# example
d4e07401 609# !10.11.12.13:See http://bad.example.com
e4af4f73 610# :127.0.0.2:blacklisted"
611# 1.2.3.0/24
a4560ee0 612EOF
e4af4f73 613
614
363edfa3 615
616##### AXFRDNS #####
a4560ee0
ER
617make_supervise_service axfrdns
618s=$RPM_BUILD_ROOT%{_sysconfdir}/axfrdns
619cat>$s/log/run<<EOF
363edfa3 620#!/bin/sh
49c7d515 621exec setuidgid dnslog multilog t /var/log/djbdns/axfrdns
a4560ee0
ER
622EOF
623mkdir $s/env
624echo %{_sysconfdir}/tinydns/root > $s/env/ROOT
625echo 127.0.0.1 > $s/env/IP
626cat>$s/run<<'EOF'
363edfa3 627#!/bin/sh
628exec 2>&1
629exec envdir ./env sh -c '
49c7d515 630 exec envuidgid axfrdns softlimit -d300000 tcpserver -vDRHl0 -x tcp.cdb -- "$IP" 53 %{_bindir}/axfrdns
363edfa3 631'
a4560ee0
ER
632EOF
633cat>$s/Makefile<<'EOF'
363edfa3 634tcp.cdb: tcp
d8bfa25b 635 tcprules tcp.cdb tcp.tmp < tcp
a4560ee0
ER
636EOF
637cat>$s/tcp<<'EOF'
363edfa3 638# sample line: 1.2.3.4:allow,AXFR="heaven.af.mil/3.2.1.in-addr.arpa"
639:deny
a4560ee0 640EOF
363edfa3 641
642##### daemontools symlinks #####
50f1c4d2 643install -d $RPM_BUILD_ROOT/service
644cd $RPM_BUILD_ROOT/service
645ln -s ..%{_sysconfdir}/dnscache
aaad6436 646ln -s ..%{_sysconfdir}/dnscachex
50f1c4d2 647ln -s ..%{_sysconfdir}/tinydns
648ln -s ..%{_sysconfdir}/pickdns
649ln -s ..%{_sysconfdir}/walldns
650ln -s ..%{_sysconfdir}/rbldns
651ln -s ..%{_sysconfdir}/axfrdns
363edfa3 652
37e173ce
JB
653%clean
654rm -rf $RPM_BUILD_ROOT
655
a0fc175b 656%pre
5aa5729c
ER
657%groupadd -g 32 -r -f djbdns
658%useradd -u 32 -r -d / -s /bin/false -c "djbdns User" -g djbdns dnslog
a0fc175b 659
660%postun
661if [ "$1" = "0" ]; then
bef00ef1 662 %userremove dnslog
663 %groupremove djbdns
a0fc175b 664fi
665
666%pre dnscache
5aa5729c 667%useradd -P %{name}-dnscache -u 33 -r -d /etc/dnscache -s /bin/false -c "djbdns User" -g djbdns dnscache
a0fc175b 668
37e173ce 669%post dnscache
845edd53
ER
670if [ ! -s %{_sysconfdir}/dnscache/seed ]; then
671 dd if=/dev/urandom of=%{_sysconfdir}/dnscache/seed bs=128c count=1
8c969dfe 672fi
845edd53 673if diff -u %{_sysconfdir}/{dnscache,pickdns}/env/IP >/dev/zero 2>&1;then
4e98c456 674 echo "Warning: dnscache and pickdns can't work on the same"
845edd53
ER
675 echo "IP address. You have to edit either %{_sysconfdir}/dnscache/env/IP"
676 echo "or %{_sysconfdir}/pickdns/env/IP."
4e98c456 677fi
aaad6436
ER
678if diff -u %{_sysconfdir}/{dnscache,dnscachex}/env/IP >/dev/zero 2>&1;then
679 echo "Warning: dnscache and dnscachex can't work on the same"
680 echo "IP address. You have to edit either %{_sysconfdir}/dnscache/env/IP"
681 echo "or %{_sysconfdir}/dnscachex/env/IP."
682fi
845edd53 683if diff -u %{_sysconfdir}/{dnscache,rbldns}/env/IP >/dev/zero 2>&1;then
4e98c456 684 echo "Warning: dnscache and rbldns can't work on the same"
845edd53
ER
685 echo "IP address. You have to edit either %{_sysconfdir}/dnscache/env/IP"
686 echo "or %{_sysconfdir}/rbldns/env/IP."
4e98c456 687fi
845edd53 688if diff -u %{_sysconfdir}/{dnscache,tinydns}/env/IP >/dev/zero 2>&1;then
4e98c456 689 echo "Warning: dnscache and tinydns can't work on the same"
845edd53
ER
690 echo "IP address. You have to edit either %{_sysconfdir}/dnscache/env/IP"
691 echo "or %{_sysconfdir}/tinydns/env/IP."
4e98c456 692fi
845edd53 693if diff -u %{_sysconfdir}/{dnscache,walldns}/env/IP >/dev/zero 2>&1;then
4e98c456 694 echo "Warning: dnscache and walldns can't work on the same"
845edd53
ER
695 echo "IP address. You have to edit either %{_sysconfdir}/dnscache/env/IP"
696 echo "or %{_sysconfdir}/walldns/env/IP."
4e98c456 697fi
698
49c7d515
ER
699if [ -f /service/dnscache/supervise/lock ]; then
700 svc -t /service/dnscache{,/log}
701fi
702
37e173ce 703%preun dnscache
4e98c456 704if [ "$1" = "0" ]; then
49c7d515
ER
705 # http://cr.yp.to/daemontools/faq/create.html#remove
706 if [ -f /service/dnscache/supervise/lock ]; then
707 cd /service/dnscache
708 rm /service/dnscache
709 svc -dx . log
710 fi
4e98c456 711fi
712
a0fc175b 713%postun dnscache
714if [ "$1" = "0" ]; then
bef00ef1 715 %userremove dnscache
a0fc175b 716fi
717
aaad6436
ER
718%post dnscachex
719if [ ! -s %{_sysconfdir}/dnscachex/seed ]; then
720 dd if=/dev/urandom of=%{_sysconfdir}/dnscachex/seed bs=128c count=1
721fi
722if diff -u %{_sysconfdir}/{dnscachex,dnscache}/env/IP >/dev/zero 2>&1;then
723 echo "Warning: dnscachex and dnscache can't work on the same"
724 echo "IP address. You have to edit either %{_sysconfdir}/dnscachex/env/IP"
725 echo "or %{_sysconfdir}/dnscache/env/IP."
726fi
727if diff -u %{_sysconfdir}/{dnscachex,pickdns}/env/IP >/dev/zero 2>&1;then
728 echo "Warning: dnscachex and pickdns can't work on the same"
729 echo "IP address. You have to edit either %{_sysconfdir}/dnscachex/env/IP"
730 echo "or %{_sysconfdir}/pickdns/env/IP."
731fi
732if diff -u %{_sysconfdir}/{dnscachex,rbldns}/env/IP >/dev/zero 2>&1;then
733 echo "Warning: dnscachex and rbldns can't work on the same"
734 echo "IP address. You have to edit either %{_sysconfdir}/dnscachex/env/IP"
735 echo "or %{_sysconfdir}/rbldns/env/IP."
736fi
737if diff -u %{_sysconfdir}/{dnscachex,tinydns}/env/IP >/dev/zero 2>&1;then
738 echo "Warning: dnscachex and tinydns can't work on the same"
739 echo "IP address. You have to edit either %{_sysconfdir}/dnscachex/env/IP"
740 echo "or %{_sysconfdir}/tinydns/env/IP."
741fi
742if diff -u %{_sysconfdir}/{dnscachex,walldns}/env/IP >/dev/zero 2>&1;then
743 echo "Warning: dnscachex and walldns can't work on the same"
744 echo "IP address. You have to edit either %{_sysconfdir}/dnscachex/env/IP"
745 echo "or %{_sysconfdir}/walldns/env/IP."
746fi
747
748if [ -f /service/dnscachex/supervise/lock ]; then
749 svc -t /service/dnscachex{,/log}
750fi
751
752%preun dnscachex
753if [ "$1" = "0" ]; then
754 # http://cr.yp.to/daemontools/faq/create.html#remove
755 if [ -f /service/dnscachex/supervise/lock ]; then
756 cd /service/dnscachex
757 rm /service/dnscachex
758 svc -dx . log
759 fi
760fi
761
a0fc175b 762%pre tinydns
5aa5729c 763%useradd -P %{name}-tinydns -u 34 -r -d /etc/tinydns -s /bin/false -c "djbdns User" -g djbdns tinydns
a0fc175b 764
37e173ce 765%post tinydns
845edd53 766if diff -u %{_sysconfdir}/{dnscache,tinydns}/env/IP >/dev/zero 2>&1;then
4e98c456 767 echo "Warning: dnscache and tinydns can't work on the same"
845edd53
ER
768 echo "IP address. You have to edit either %{_sysconfdir}/dnscache/env/IP"
769 echo "or %{_sysconfdir}/tinydns/env/IP."
4e98c456 770fi
aaad6436
ER
771if diff -u %{_sysconfdir}/{dnscachex,tinydns}/env/IP >/dev/zero 2>&1;then
772 echo "Warning: dnscachex and tinydns can't work on the same"
773 echo "IP address. You have to edit either %{_sysconfdir}/dnscachex/env/IP"
774 echo "or %{_sysconfdir}/tinydns/env/IP."
775fi
845edd53 776if diff -u %{_sysconfdir}/{pick,tiny}dns/env/IP >/dev/zero 2>&1;then
4e98c456 777 echo "Warning: pickdns and tinydns can't work on the same"
845edd53
ER
778 echo "IP address. You have to edit either %{_sysconfdir}/pickdns/env/IP"
779 echo "or %{_sysconfdir}/tinydns/env/IP."
4e98c456 780fi
845edd53 781if diff -u %{_sysconfdir}/{rbl,tiny}dns/env/IP >/dev/zero 2>&1;then
4e98c456 782 echo "Warning: rbldns and tinydns can't work on the same"
845edd53
ER
783 echo "IP address. You have to edit either %{_sysconfdir}/rbldns/env/IP"
784 echo "or %{_sysconfdir}/tinydns/env/IP."
4e98c456 785fi
845edd53 786if diff -u %{_sysconfdir}/{tiny,wall}dns/env/IP >/dev/zero 2>&1;then
4e98c456 787 echo "Warning: tinydns and walldns can't work on the same"
845edd53
ER
788 echo "IP address. You have to edit either %{_sysconfdir}/tinydns/env/IP"
789 echo "or %{_sysconfdir}/walldns/env/IP."
4e98c456 790fi
791
49c7d515
ER
792if [ -f /service/tinydns/supervise/lock ]; then
793 svc -t /service/tinydns{,/log}
794fi
795
37e173ce 796%preun tinydns
4e98c456 797if [ "$1" = "0" ]; then
49c7d515
ER
798 # http://cr.yp.to/daemontools/faq/create.html#remove
799 if [ -f /service/tinydns/supervise/lock ]; then
800 cd /service/tinydns
801 rm /service/tinydns
802 svc -dx . log
803 fi
4e98c456 804fi
805
a0fc175b 806%postun tinydns
807if [ "$1" = "0" ]; then
bef00ef1 808 %userremove tinydns
a0fc175b 809fi
810
811%pre pickdns
5aa5729c 812%useradd -P %{name}-pickdns -u 35 -r -d /etc/pickdns -s /bin/false -c "djbdns User" -g djbdns pickdns
a0fc175b 813
37e173ce 814%post pickdns
845edd53 815if diff -u %{_sysconfdir}/{dnscache,pickdns}/env/IP >/dev/zero 2>&1;then
4e98c456 816 echo "Warning: dnscache and pickdns can't work on the same"
845edd53
ER
817 echo "IP address. You have to edit either %{_sysconfdir}/dnscache/env/IP"
818 echo "or %{_sysconfdir}/pickdns/env/IP."
4e98c456 819fi
aaad6436
ER
820if diff -u %{_sysconfdir}/{dnscachex,pickdns}/env/IP >/dev/zero 2>&1;then
821 echo "Warning: dnscachex and pickdns can't work on the same"
822 echo "IP address. You have to edit either %{_sysconfdir}/dnscachex/env/IP"
823 echo "or %{_sysconfdir}/pickdns/env/IP."
824fi
845edd53 825if diff -u %{_sysconfdir}/{pick,rbl}dns/env/IP >/dev/zero 2>&1;then
4e98c456 826 echo "Warning: pickdns and rbldns can't work on the same"
845edd53
ER
827 echo "IP address. You have to edit either %{_sysconfdir}/pickdns/env/IP"
828 echo "or %{_sysconfdir}/rbldns/env/IP."
4e98c456 829fi
845edd53 830if diff -u %{_sysconfdir}/{pick,tiny}dns/env/IP >/dev/zero 2>&1;then
4e98c456 831 echo "Warning: pickdns and tinydns can't work on the same"
845edd53
ER
832 echo "IP address. You have to edit either %{_sysconfdir}/pickdns/env/IP"
833 echo "or %{_sysconfdir}/tinydns/env/IP."
4e98c456 834fi
845edd53 835if diff -u %{_sysconfdir}/{pick,wall}dns/env/IP >/dev/zero 2>&1;then
4e98c456 836 echo "Warning: pickdns and walldns can't work on the same"
845edd53
ER
837 echo "IP address. You have to edit either %{_sysconfdir}/pickdns/env/IP"
838 echo "or %{_sysconfdir}/walldns/env/IP."
4e98c456 839fi
840
49c7d515
ER
841if [ -f /service/pickdns/supervise/lock ]; then
842 svc -t /service/pickdns{,/log}
843fi
844
37e173ce 845%preun pickdns
4e98c456 846if [ "$1" = "0" ]; then
49c7d515
ER
847 # http://cr.yp.to/daemontools/faq/create.html#remove
848 if [ -f /service/pickdns/supervise/lock ]; then
849 cd /service/pickdns
850 rm /service/pickdns
851 svc -dx . log
852 fi
4e98c456 853fi
854
a0fc175b 855%postun pickdns
856if [ "$1" = "0" ]; then
bef00ef1 857 %userremove pickdns
a0fc175b 858fi
859
860%pre walldns
5aa5729c 861%useradd -P %{name}-walldns -u 36 -r -d /etc/walldns -s /bin/false -c "djbdns User" -g djbdns walldns
a0fc175b 862
37e173ce 863%post walldns
845edd53 864if diff -u %{_sysconfdir}/{dnscache,walldns}/env/IP >/dev/zero 2>&1;then
4e98c456 865 echo "Warning: dnscache and walldns can't work on the same"
845edd53
ER
866 echo "IP address. You have to edit either %{_sysconfdir}/dnscache/env/IP"
867 echo "or %{_sysconfdir}/walldns/env/IP."
4e98c456 868fi
aaad6436
ER
869if diff -u %{_sysconfdir}/{dnscachex,walldns}/env/IP >/dev/zero 2>&1;then
870 echo "Warning: dnscachex and walldns can't work on the same"
871 echo "IP address. You have to edit either %{_sysconfdir}/dnscachex/env/IP"
872 echo "or %{_sysconfdir}/walldns/env/IP."
873fi
845edd53 874if diff -u %{_sysconfdir}/{pick,wall}dns/env/IP >/dev/zero 2>&1;then
4e98c456 875 echo "Warning: pickdns and walldns can't work on the same"
845edd53
ER
876 echo "IP address. You have to edit either %{_sysconfdir}/pickdns/env/IP"
877 echo "or %{_sysconfdir}/walldns/env/IP."
4e98c456 878fi
845edd53 879if diff -u %{_sysconfdir}/{rbl,wall}dns/env/IP >/dev/zero 2>&1;then
4e98c456 880 echo "Warning: rbldns and walldns can't work on the same"
845edd53
ER
881 echo "IP address. You have to edit either %{_sysconfdir}/rbldns/env/IP"
882 echo "or %{_sysconfdir}/walldns/env/IP."
4e98c456 883fi
845edd53 884if diff -u %{_sysconfdir}/{tiny,wall}dns/env/IP >/dev/zero 2>&1;then
4e98c456 885 echo "Warning: tinydns and walldns can't work on the same"
845edd53
ER
886 echo "IP address. You have to edit either %{_sysconfdir}/tinydns/env/IP"
887 echo "or %{_sysconfdir}/walldns/env/IP."
4e98c456 888fi
889
49c7d515
ER
890if [ -f /service/walldns/supervise/lock ]; then
891 svc -t /service/walldns{,/log}
892fi
893
37e173ce 894%preun walldns
4e98c456 895if [ "$1" = "0" ]; then
49c7d515
ER
896 # http://cr.yp.to/daemontools/faq/create.html#remove
897 if [ -f /service/walldns/supervise/lock ]; then
898 cd /service/walldns
899 rm /service/walldns
900 svc -dx . log
901 fi
4e98c456 902fi
903
a0fc175b 904%postun walldns
905if [ "$1" = "0" ]; then
bef00ef1 906 %userremove walldns
a0fc175b 907fi
908
909%pre rbldns
5aa5729c 910%useradd -P %{name}-rbldns -u 37 -r -d /etc/rbldns -s /bin/false -c "djbdns User" -g djbdns rbldns
a0fc175b 911
37e173ce 912%post rbldns
845edd53 913if diff -u %{_sysconfdir}/{dnscache,rbldns}/env/IP >/dev/zero 2>&1;then
4e98c456 914 echo "Warning: dnscache and rbldns can't work on the same"
845edd53
ER
915 echo "IP address. You have to edit either %{_sysconfdir}/dnscache/env/IP"
916 echo "or %{_sysconfdir}/rbldns/env/IP."
4e98c456 917fi
aaad6436
ER
918if diff -u %{_sysconfdir}/{dnscachex,rbldns}/env/IP >/dev/zero 2>&1;then
919 echo "Warning: dnscachex and rbldns can't work on the same"
920 echo "IP address. You have to edit either %{_sysconfdir}/dnscachex/env/IP"
921 echo "or %{_sysconfdir}/rbldns/env/IP."
922fi
845edd53 923if diff -u %{_sysconfdir}/{pick,rbl}dns/env/IP >/dev/zero 2>&1;then
4e98c456 924 echo "Warning: pickdns and rbldns can't work on the same"
845edd53
ER
925 echo "IP address. You have to edit either %{_sysconfdir}/pickdns/env/IP"
926 echo "or %{_sysconfdir}/rbldns/env/IP."
4e98c456 927fi
845edd53 928if diff -u %{_sysconfdir}/{rbl,tiny}dns/env/IP >/dev/zero 2>&1;then
4e98c456 929 echo "Warning: rbldns and tinydns can't work on the same"
845edd53
ER
930 echo "IP address. You have to edit either %{_sysconfdir}/rbldns/env/IP"
931 echo "or %{_sysconfdir}/tinydns/env/IP."
4e98c456 932fi
845edd53 933if diff -u %{_sysconfdir}/{rbl,wall}dns/env/IP >/dev/zero 2>&1;then
4e98c456 934 echo "Warning: rbldns and walldns can't work on the same"
845edd53
ER
935 echo "IP address. You have to edit either %{_sysconfdir}/rbldns/env/IP"
936 echo "or %{_sysconfdir}/walldns/env/IP."
4e98c456 937fi
938
49c7d515
ER
939if [ -f /service/rbldns/supervise/lock ]; then
940 svc -t /service/rbldns{,/log}
941fi
942
37e173ce 943%preun rbldns
4e98c456 944if [ "$1" = "0" ]; then
49c7d515
ER
945 # http://cr.yp.to/daemontools/faq/create.html#remove
946 if [ -f /service/rbldns/supervise/lock ]; then
947 cd /service/rbldns
948 rm /service/rbldns
949 svc -dx . log
950 fi
4e98c456 951fi
952
a0fc175b 953%postun rbldns
954if [ "$1" = "0" ]; then
bef00ef1 955 %userremove rbldns
a0fc175b 956fi
957
958%pre axfrdns
5aa5729c 959%useradd -P %{name}-axfrdns -u 38 -r -d /etc/axfrdns -s /bin/false -c "djbdns User" -g djbdns axfrdns
a0fc175b 960
37e173ce 961%preun axfrdns
4e98c456 962if [ "$1" = "0" ]; then
49c7d515
ER
963 # http://cr.yp.to/daemontools/faq/create.html#remove
964 if [ -f /service/axfrdns/supervise/lock ]; then
965 cd /service/axfrdns
966 rm /service/axfrdns
967 svc -dx . log
968 fi
4e98c456 969fi
970
a0fc175b 971%postun axfrdns
972if [ "$1" = "0" ]; then
bef00ef1 973 %userremove axfrdns
a0fc175b 974fi
975
c3bfacc7 976%files
977%defattr(644,root,root,755)
37e173ce 978%doc CHANGES TODO MULTIPLEIP TINYDNS doc/*
363edfa3 979%attr(755,root,root) %{_bindir}/cachetest
980%attr(755,root,root) %{_bindir}/dns[f-t]*
ea210265 981%attr(755,root,root) %{_bindir}/axfr-get
b4c80007 982%{_mandir}/man[15]/*
983%{_mandir}/man8/axfr-get*
49c7d515 984%dir %attr(751,root,root) %dir /var/log/djbdns
363edfa3 985
37e173ce 986%files dnscache
363edfa3 987%defattr(644,root,root,755)
988%attr(755,root,root) %{_bindir}/dnscache*
d0c89c47 989%config %{_sysconfdir}/dnsroots.global
49c7d515
ER
990%dir %attr(1755,root,root) %{_sysconfdir}/dnscache
991%attr(700,root,root) %dir %{_sysconfdir}/dnscache/supervise
992%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %ghost %{_sysconfdir}/dnscache/supervise/*
993
994%dir %attr(1755,root,root) %{_sysconfdir}/dnscache/log
90512735 995%attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dnscache/log/run
49c7d515
ER
996%attr(700,root,root) %dir %{_sysconfdir}/dnscache/log/supervise
997%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %ghost %{_sysconfdir}/dnscache/log/supervise/*
998%attr(751,dnslog,djbdns) %dir /var/log/djbdns/dnscache
999%attr(600,dnslog,djbdns) %ghost /var/log/djbdns/dnscache/lock
1000%attr(640,dnslog,djbdns) %ghost /var/log/djbdns/dnscache/state
1001
363edfa3 1002%dir %attr(2755,root,root) %{_sysconfdir}/dnscache/env
d0c89c47 1003%config %{_sysconfdir}/dnscache/env/*
363edfa3 1004%attr(755,root,root) %{_sysconfdir}/dnscache/run
55a8e62f
ER
1005%dir %{_sysconfdir}/dnscache/root
1006%dir %{_sysconfdir}/dnscache/root/ip
1007%dir %{_sysconfdir}/dnscache/root/servers
363edfa3 1008%config %attr(600,root,root) %{_sysconfdir}/dnscache/root/ip/*
d0c89c47 1009%config %{_sysconfdir}/dnscache/root/servers/*
363edfa3 1010%ghost %attr(600,root,root) %{_sysconfdir}/dnscache/seed
b4c80007 1011%{_mandir}/man8/dnscache*
50f1c4d2 1012/service/dnscache
363edfa3 1013
aaad6436
ER
1014%files dnscachex
1015%defattr(644,root,root,755)
1016%dir %attr(1755,root,root) %{_sysconfdir}/dnscachex
1017%attr(700,root,root) %dir %{_sysconfdir}/dnscachex/supervise
1018%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %ghost %{_sysconfdir}/dnscachex/supervise/*
1019
1020%dir %attr(1755,root,root) %{_sysconfdir}/dnscachex/log
1021%attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dnscachex/log/run
1022%attr(700,root,root) %dir %{_sysconfdir}/dnscachex/log/supervise
1023%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %ghost %{_sysconfdir}/dnscachex/log/supervise/*
1024%attr(751,dnslog,djbdns) %dir /var/log/djbdns/dnscachex
1025%attr(600,dnslog,djbdns) %ghost /var/log/djbdns/dnscachex/lock
1026%attr(640,dnslog,djbdns) %ghost /var/log/djbdns/dnscachex/state
1027
1028%dir %attr(2755,root,root) %{_sysconfdir}/dnscachex/env
1029%config %{_sysconfdir}/dnscachex/env/*
1030%attr(755,root,root) %{_sysconfdir}/dnscachex/run
1031%dir %{_sysconfdir}/dnscachex/root
1032%dir %{_sysconfdir}/dnscachex/root/ip
1033%dir %{_sysconfdir}/dnscachex/root/servers
1034%config %attr(600,root,root) %{_sysconfdir}/dnscachex/root/ip/*
1035%config %{_sysconfdir}/dnscachex/root/servers/*
1036%ghost %attr(600,root,root) %{_sysconfdir}/dnscachex/seed
1037/service/dnscachex
1038
37e173ce 1039%files tinydns
363edfa3 1040%defattr(644,root,root,755)
1041%attr(755,root,root) %{_bindir}/tinydns*
1042%dir %attr(3755,root,root) %{_sysconfdir}/tinydns
49c7d515
ER
1043%attr(700,root,root) %dir %{_sysconfdir}/tinydns/supervise
1044%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %ghost %{_sysconfdir}/tinydns/supervise/*
1045
90512735 1046%attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/tinydns/log/run
49c7d515
ER
1047%dir %attr(1755,root,root) %{_sysconfdir}/tinydns/log
1048%attr(700,root,root) %dir %{_sysconfdir}/tinydns/log/supervise
1049%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %ghost %{_sysconfdir}/tinydns/log/supervise/*
1050%attr(751,dnslog,djbdns) %dir /var/log/djbdns/tinydns
1051%attr(600,dnslog,djbdns) %ghost /var/log/djbdns/tinydns/lock
1052%attr(640,dnslog,djbdns) %ghost /var/log/djbdns/tinydns/state
1053
363edfa3 1054%dir %attr(2755,root,root) %{_sysconfdir}/tinydns/env
d0c89c47 1055%config %{_sysconfdir}/tinydns/env/*
363edfa3 1056%attr(755,root,root) %{_sysconfdir}/tinydns/run
1057%dir %attr(2755,root,root) %{_sysconfdir}/tinydns/root
d0c89c47
ER
1058%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/tinydns/root/Makefile
1059%config %{_sysconfdir}/tinydns/root/data
363edfa3 1060%attr(755,root,root) %{_sysconfdir}/tinydns/root/add-*
b4c80007 1061%{_mandir}/man8/tinydns*
50f1c4d2 1062/service/tinydns
363edfa3 1063
fb47ae15 1064%files tinydns-notify
1065%defattr(644,root,root,755)
1066%attr(755,root,root) %{_bindir}/tinydns-notify
1067
37e173ce 1068%files pickdns
363edfa3 1069%defattr(644,root,root,755)
1070%attr(755,root,root) %{_bindir}/pickdns*
1071%dir %attr(3755,root,root) %{_sysconfdir}/pickdns
49c7d515
ER
1072%attr(700,root,root) %dir %{_sysconfdir}/pickdns/supervise
1073%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %ghost %{_sysconfdir}/pickdns/supervise/*
1074
90512735 1075%attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pickdns/log/run
49c7d515
ER
1076%dir %attr(1755,root,root) %{_sysconfdir}/pickdns/log
1077%attr(700,root,root) %dir %{_sysconfdir}/pickdns/log/supervise
1078%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %ghost %{_sysconfdir}/pickdns/log/supervise/*
1079%attr(751,dnslog,djbdns) %dir /var/log/djbdns/pickdns
1080%attr(600,dnslog,djbdns) %ghost /var/log/djbdns/pickdns/lock
1081%attr(640,dnslog,djbdns) %ghost /var/log/djbdns/pickdns/state
1082
363edfa3 1083%dir %attr(2755,root,root) %{_sysconfdir}/pickdns/env
d0c89c47 1084%config %{_sysconfdir}/pickdns/env/*
363edfa3 1085%attr(755,root,root) %{_sysconfdir}/pickdns/run
1086%dir %attr(2755,root,root) %{_sysconfdir}/pickdns/root
d0c89c47
ER
1087%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pickdns/root/Makefile
1088%config %{_sysconfdir}/pickdns/root/data
b4c80007 1089%{_mandir}/man8/pickdns*
50f1c4d2 1090/service/pickdns
363edfa3 1091
37e173ce 1092%files walldns
363edfa3 1093%defattr(644,root,root,755)
1094%attr(755,root,root) %{_bindir}/walldns*
1095%dir %attr(3755,root,root) %{_sysconfdir}/walldns
49c7d515
ER
1096%attr(700,root,root) %dir %{_sysconfdir}/walldns/supervise
1097%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %ghost %{_sysconfdir}/walldns/supervise/*
1098
90512735 1099%attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/walldns/log/run
49c7d515
ER
1100%dir %attr(1755,root,root) %{_sysconfdir}/walldns/log
1101%attr(700,root,root) %dir %{_sysconfdir}/walldns/log/supervise
1102%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %ghost %{_sysconfdir}/walldns/log/supervise/*
1103%attr(751,dnslog,djbdns) %dir /var/log/djbdns/walldns
1104%attr(600,dnslog,djbdns) %ghost /var/log/djbdns/walldns/lock
1105%attr(640,dnslog,djbdns) %ghost /var/log/djbdns/walldns/state
1106
363edfa3 1107%dir %attr(2755,root,root) %{_sysconfdir}/walldns/env
d0c89c47 1108%config %{_sysconfdir}/walldns/env/*
363edfa3 1109%attr(755,root,root) %{_sysconfdir}/walldns/run
1110%dir %attr(2755,root,root) %{_sysconfdir}/walldns/root
b4c80007 1111%{_mandir}/man8/walldns*
50f1c4d2 1112/service/walldns
363edfa3 1113
37e173ce 1114%files rbldns
363edfa3 1115%defattr(644,root,root,755)
1116%attr(755,root,root) %{_bindir}/rbldns*
1117%dir %attr(3755,root,root) %{_sysconfdir}/rbldns
49c7d515
ER
1118%attr(700,root,root) %dir %{_sysconfdir}/rbldns/supervise
1119%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %ghost %{_sysconfdir}/rbldns/supervise/*
1120
90512735 1121%attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rbldns/log/run
49c7d515
ER
1122%dir %attr(1755,root,root) %{_sysconfdir}/rbldns/log
1123%attr(700,root,root) %dir %{_sysconfdir}/rbldns/log/supervise
1124%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %ghost %{_sysconfdir}/rbldns/log/supervise/*
1125%attr(751,dnslog,djbdns) %dir /var/log/djbdns/rbldns
1126%attr(600,dnslog,djbdns) %ghost /var/log/djbdns/rbldns/lock
1127%attr(640,dnslog,djbdns) %ghost /var/log/djbdns/rbldns/state
1128
363edfa3 1129%dir %attr(2755,root,root) %{_sysconfdir}/rbldns/env
d0c89c47 1130%config %{_sysconfdir}/rbldns/env/*
363edfa3 1131%attr(755,root,root) %{_sysconfdir}/rbldns/run
1132%dir %attr(2755,root,root) %{_sysconfdir}/rbldns/root
d0c89c47
ER
1133%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rbldns/root/Makefile
1134%config %{_sysconfdir}/rbldns/root/data
b4c80007 1135%{_mandir}/man8/rbldns*
50f1c4d2 1136/service/rbldns
363edfa3 1137
37e173ce 1138%files axfrdns
363edfa3 1139%defattr(644,root,root,755)
1140%attr(755,root,root) %{_bindir}/axfrdns*
1141%dir %attr(3755,root,root) %{_sysconfdir}/axfrdns
49c7d515
ER
1142%attr(700,root,root) %dir %{_sysconfdir}/axfrdns/supervise
1143%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %ghost %{_sysconfdir}/axfrdns/supervise/*
1144
90512735 1145%attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/axfrdns/log/run
49c7d515
ER
1146%dir %attr(1755,root,root) %{_sysconfdir}/axfrdns/log
1147%attr(700,root,root) %dir %{_sysconfdir}/axfrdns/log/supervise
1148%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %ghost %{_sysconfdir}/axfrdns/log/supervise/*
1149%attr(751,dnslog,djbdns) %dir /var/log/djbdns/axfrdns
1150%attr(600,dnslog,djbdns) %ghost /var/log/djbdns/axfrdns/lock
1151%attr(640,dnslog,djbdns) %ghost /var/log/djbdns/axfrdns/state
1152
363edfa3 1153%dir %attr(2755,root,root) %{_sysconfdir}/axfrdns/env
d0c89c47 1154%config %{_sysconfdir}/axfrdns/env/*
363edfa3 1155%attr(755,root,root) %{_sysconfdir}/axfrdns/run
d0c89c47
ER
1156%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/axfrdns/Makefile
1157%config %{_sysconfdir}/axfrdns/tcp
b4c80007 1158%{_mandir}/man8/axfrdns*
50f1c4d2 1159/service/axfrdns
This page took 0.254027 seconds and 4 git commands to generate.