]> git.pld-linux.org Git - packages/djbdns.git/blob - djbdns.spec
- mass commit: cosmetics (removed trailing white spaces)
[packages/djbdns.git] / djbdns.spec
1 Summary:        DJB DNS
2 Summary(pl):    DJB DNS
3 Name:           djbdns
4 Version:        1.05
5 Release:        13
6 License:        http://cr.yp.to/distributors.html (free to use)
7 Group:          Networking/Daemons
8 Source0:        http://cr.yp.to/djbdns/%{name}-%{version}.tar.gz
9 # Source0-md5:  3147c5cd56832aa3b41955c7a51cbeb2
10 Source1:        %{name}-doc.tar.gz
11 # Source1-md5:  1d6aed1a5d3d3eda3958fa3e7d808fc8
12 Source2:        ftp://ftp.innominate.org/gpa/djb/%{name}-%{version}-man.tar.gz
13 # Source2-md5:  2b4e71fa4592858e4508538f78d50f61
14 Patch0:         dnscache-1.05-multiple-ip.patch
15 Patch1:         http://www.fefe.de/dns/%{name}-1.05-ipv6.diff
16 #               based on http://www.ohse.de/uwe/patches/djbdns-1.05-multiip.diff
17 Patch2:         %{name}-1.05-multiip.diff
18 Patch3:         http://iksz.hu/package/djbdns-conf/djbdns-1.05-multi_tinydns_data.patch
19 Patch4:         %{name}-srv.patch
20 Patch5:         %{name}-glibc.patch
21 URL:            http://cr.yp.to/djbdns.html
22 Requires(pre):  /usr/bin/getgid
23 Requires(pre):  /bin/id
24 Requires(pre):  /usr/sbin/groupadd
25 Requires(pre):  /usr/sbin/useradd
26 Requires(postun):       /usr/sbin/userdel
27 Requires(postun):       /usr/sbin/groupdel
28 Provides:       nameserver
29 Obsoletes:      caching-nameserver
30 Obsoletes:      nameserver
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %description
34 This is a set of DNS servers with security in mind. If you find a
35 security hole you can get a prize.
36
37 This package contains some basic DNS debugging tools and some
38 documentation. If you need a DNS server install one of the following
39 packages:
40
41  - djbdns-dnscache - a local DNS cache
42  - djbdns-tinydns - a DNS server
43  - djbdns-pickdns - a DNS load-balancing server
44  - djbdns-walldns - a reverse DNS wall
45  - djbdns-rbldns - an IP-address-listing DNS server
46  - djbdns-axfrdns - a DNS zone transfer server
47
48 %description -l de
49 Dies ist ein Satz von auf Sicherheit zielenden DNS-Servers. Man kriegt
50 ein Preis, wenn man ein Sicherheitsloch findet.
51
52 Dieses Paket enthält ein paar DNS-Werkzeugen und etwas Dokumentation.
53 Wenn du einen DNS-Server braucht, installe ein von den folgenden
54 Paketen:
55
56  - djbdns-dnscache - ein lokaler DNS-Cache
57  - djbdns-tinydns - ein DNS-Server
58  - djbdns-pickdns - ein Belastung ausgleichender DNS-Server
59  - djbdns-walldns - eine Wand Rückgekehrten DNSs
60  - djbdns-rbldns - ein IP-Adressen-Listen-DNS-Server
61  - djbdns-axfrdns - ein DNS-Zonen-Transfer-Server
62
63 %description -l pl
64 Jest to alternatywny zestaw serwerów DNS'u, którego g³ównym celem jest
65 bezpieczeñstwo. Za znalezienie dziury w tym systemie zosta³a
66 wyznaczona nawet nagroda.
67
68 Ten pakiet zawiera kilka podstawowych narzêdzi DNS oraz trochê
69 dokumentacji. Je¶li potrzebujesz serwera DNS zainstaluj jeden z
70 nastêpuj±cych pakietów:
71
72  - djbdns-dnscache - lokalny cache DNS
73  - djbdns-tinydns - serwer DNS
74  - djbdns-pickdns - serwer DNS do równowa¿enia obci±¿eñ
75  - djbdns-walldns - ¶ciana dla odwrotnych zapytañ DNS
76  - djbdns-rbldns - serwer DNS list adresów IP
77  - djbdns-axfrdns - serwer transferów stref DNS
78
79 %package dnscache
80 Summary:        DJB's local DNS cache
81 Summary(de):    DJBs lokaler DNS-Cache
82 Summary(pl):    Lokalny cache DNS od DJB
83 Group:          Networking/Daemons
84 PreReq:         %{name} = %{version}
85 Requires(pre):  /usr/bin/getgid
86 Requires(pre):  /bin/id
87 Requires(pre):  /usr/sbin/groupadd
88 Requires(pre):  /usr/sbin/useradd
89 Requires(postun):       /usr/sbin/userdel
90 Requires(postun):       /usr/sbin/groupdel
91 Requires(post): diffutils
92 Requires(post): fileutils
93 Requires(preun):        daemontools
94 Requires:       daemontools >= 0.70-5
95 Obsoletes:      dnscache
96
97 %description dnscache
98 dnscache is a local DNS cache from the djbdns package. It accepts
99 recursive DNS queries from local clients such as web browsers and mail
100 transfer agents. It collects responses from remote DNS servers. It
101 caches the responses to save time later.
102
103 %description dnscache -l de
104 dnscache ist ein lokaler DNS-Cache aus dem djbdns-Paket. Es empfängt
105 rekursive DNS-Fragen von den lokalen Klienten, zum Beispiel
106 Web-Browsers und Mail-Transfer-Agenten. Es sammelt die Antworten von
107 den Fern-DNS-Servers. Es merkt sich die Antworten, um die Zeit später
108 zu sparen.
109
110 %description dnscache -l pl
111 dnscache jest lokalnym cachem DNS z pakietu djbdns. Przyjmuje on
112 rekursywne zapytania DNS od lokalnych klientów takich, jak
113 przegl±darki WWW i agenci transferu poczty (MTA). Zbiera on odpowiedzi
114 od zdalnych serwerów DNS. Zapamiêtuje on odpowiedzi, ¿eby pó¼niej
115 oszczêdziæ czas.
116
117 %package tinydns
118 Summary:        DJB's DNS server
119 Summary(de):    DJBs DNS-Server
120 Summary(pl):    Serwer DNS od DJB
121 Group:          Networking/Daemons
122 PreReq:         %{name} = %{version}
123 Requires(pre):  /usr/bin/getgid
124 Requires(pre):  /bin/id
125 Requires(pre):  /usr/sbin/groupadd
126 Requires(pre):  /usr/sbin/useradd
127 Requires(postun):       /usr/sbin/userdel
128 Requires(postun):       /usr/sbin/groupdel
129 Requires(post): diffutils
130 Requires(preun):        daemontools
131 Requires:       daemontools >= 0.70-5
132 Requires:       make
133 Obsoletes:      tinydns
134
135 %description tinydns
136 tinydns is a DNS server from the djbdns package. It accepts iterative
137 DNS queries from hosts around the Internet and responds with
138 locally-configured information.
139
140 %description tinydns -l de
141 tinydns ist ein DNS-Server aus dem djbdns-Paket. Es empfängt iterative
142 DNS-Fragen von dem Hosts aus allem Internet und antwortet mit den
143 lokal-konfigurierten Informationen.
144
145 %description tinydns -l pl
146 tinydns jest serwerem DNS z pakietu djbdns. Przyjmuje on iteracyjne
147 zapytania DNS od komputerów z ca³ego Internetu i odpowiada przy u¿yciu
148 lokalnie skonfigurowanych informacji.
149
150 %package pickdns
151 Summary:        DJB's load-balancing DNS server
152 Summary(de):    DJBs Belastung ausgleichender DNS-Server
153 Summary(pl):    Serwer DNS równowa¿±cy obci±¿enie od DJB
154 Group:          Networking/Daemons
155 PreReq:         %{name} = %{version}
156 Requires(pre):  /usr/bin/getgid
157 Requires(pre):  /bin/id
158 Requires(pre):  /usr/sbin/groupadd
159 Requires(pre):  /usr/sbin/useradd
160 Requires(postun):       /usr/sbin/userdel
161 Requires(postun):       /usr/sbin/groupdel
162 Requires(post): diffutils
163 Requires(preun):        daemontools
164 Requires:       daemontools >= 0.70-5
165 Requires:       make
166 Obsoletes:      pickdns
167
168 %description pickdns
169 pickdns is a DNS load-balancing server from the djbdns package. It
170 accepts iterative DNS queries from hosts around the Internet and
171 responds with a dynamic selection of locally configured IP addresses
172 with 5-second TTLs.
173
174 %description pickdns -l de
175 pickdns ist ein Belastung ausgleichender DNS-Server aus dem
176 djbdns-Paket. Es empfängt iterative DNS-Fragen von den Hosts aus allem
177 Internet und antwortet mit eine dynamische Auswahl von den
178 lokal-konfigurierten IP-Adressen mit 5-Sekunden-TTLs.
179
180 %description pickdns -l pl
181 pickdns jest równowa¿±cym obci±¿enie serwerem DNS z pakietu djbdns.
182 Odbiera on iteracyjne zapytania DNS od komputerów z ca³ego internetu i
183 odpowiada dynamicznym wyborem lokalnie skonfigurowanych adresów IP z
184 5-sekundowymi TTLami.
185
186 %package walldns
187 Summary:        DJB's reverse DNS wall
188 Summary(de):    DJBs Wand rückgekehrten DNSs
189 Summary(pl):    ¦ciana dla odwrotnych zapytañ DNS od DJB
190 Group:          Networking/Daemons
191 PreReq:         %{name} = %{version}
192 Requires(pre):  /usr/bin/getgid
193 Requires(pre):  /bin/id
194 Requires(pre):  /usr/sbin/groupadd
195 Requires(pre):  /usr/sbin/useradd
196 Requires(postun):       /usr/sbin/userdel
197 Requires(postun):       /usr/sbin/groupdel
198 Requires(post): diffutils
199 Requires(preun):        daemontools
200 Requires:       daemontools >= 0.70-5
201 Obsoletes:      walldns
202
203 %description walldns
204 walldns is a reverse DNS wall from the djbdns package. It accepts
205 iterative DNS queries for in-addr.arpa domains from hosts around the
206 Internet and supplies generic responses that avoid revealing local
207 host information.
208
209 %description walldns -l de
210 walldns ist ein Wand rückgekehrten DNSs aus dem djbdns-Paket. Es
211 empfängt iterative DNS-Fragen für den in-addr.arpa-Domänen von den
212 Hosts aus allem Internet und liefert Antworte, die vermeiden
213 Informationen über die lokalen Hosts zu aufzudecken.
214
215 %description walldns -l pl
216 walldns jest ¶cian± dla odwrotnych zapytañ DNS z pakietu djbdns.
217 Przyjmuje ona iteracyjne zapytania DNS dla domen in-addr.arpa od
218 komputerów z ca³ego Internetu i dostarcza odpowiedzi, które unikaj±
219 ujawniania informacji o lokalnych komputerach.
220
221 %package rbldns
222 Summary:        DJB's IP-address-listing DNS server
223 Summary(de):    DJBs IP-Adressen-Listen-DNS-Server
224 Summary(pl):    Serwer DNS list adresów IP od DJB
225 Group:          Networking/Daemons
226 PreReq:         %{name} = %{version}
227 Requires(pre):  /usr/bin/getgid
228 Requires(pre):  /bin/id
229 Requires(pre):  /usr/sbin/groupadd
230 Requires(pre):  /usr/sbin/useradd
231 Requires(postun):       /usr/sbin/userdel
232 Requires(postun):       /usr/sbin/groupdel
233 Requires(post): diffutils
234 Requires(preun):        daemontools
235 Requires:       daemontools >= 0.70-5
236 Requires:       make
237 Obsoletes:      rbldns
238
239 %description rbldns
240 rbldns is an IP-address-listing DNS server from the djbdns package. It
241 accepts iterative DNS queries from hosts around the Internet asking
242 about various IP addresses. It provides responses showing whether the
243 addresses are on a locally configured list, such as RBL or DUL.
244
245 %description rbldns -l de
246 rbldns ist ein IP-Adressen-Listen-DNS-Server aus dem djbdns-Paket. Es
247 empfängt iterative DNS-Fragen von den Hosts aus allem Internet
248 fragende nach verschiedene IP-Adresse. Es liefert Antworte, die zeugen
249 ob die Adresse sich auf einer lokal-konfigurierten Liste befinden, zum
250 Beispiel RBL oder DUL.
251
252 %description rbldns -l pl
253 rbldns jest serwerem DNS list adresów z pakietu djbdns. Przyjmuje on
254 iteracyjne zapytania DNS od komputerów z ca³ego Internetu pytaj±ce o
255 ró¿ne adresy IP. Dostarcza on odpowiedzi pokazuj±cych, czy adresy te
256 s± na lokalnie skonfigurowanej li¶cie takiej, jak RBL lub DUL.
257
258 %package axfrdns
259 Summary:        DJB's DNS zone-transfer server
260 Summary(de):    DJBs DNS-Zonen-Transfer-Server
261 Summary(pl):    Serwer transferów stref DNS od DJB
262 Group:          Networking/Daemons
263 PreReq:         %{name} = %{version}
264 Requires(pre):  /usr/bin/getgid
265 Requires(pre):  /bin/id
266 Requires(pre):  /usr/sbin/groupadd
267 Requires(pre):  /usr/sbin/useradd
268 Requires(postun):       /usr/sbin/userdel
269 Requires(postun):       /usr/sbin/groupdel
270 Requires(preun):        daemontools
271 Requires:       %{name}-tinydns = %{version}
272 Requires:       daemontools >= 0.70-5
273 Requires:       make
274 Requires:       ucspi-tcp
275 Obsoletes:      axfrdns
276
277 %description axfrdns
278 axfrdns is a DNS zone transfer server from the djbdns package. It
279 reads a zone-transfer request in DNS-over-TCP format from its standard
280 input and responds with locally configured information.
281
282 %description axfrdns -l de
283 axfrdns ist ein DNS-Zonen-Transfer-Server aus dem djbdns-Paket. Es
284 liest ein Zonen-Transfer-Ersuchen im DNS-over-TCP-Format von seinem
285 standarden Eingabe und antwortet mit den lokal-konfigurierten
286 Informationen.
287
288 %description axfrdns -l pl
289 axfrdns jest serwerem transferów stref DNS z pakietu djbdns. Wczytuje
290 on ze standardowego wej¶cia pro¶bê o transfer strefy w formacie
291 DNS-over-TCP i odpowiada przy u¿yciu lokalnie skonfigurowanych
292 informacji.
293
294 %prep
295 %setup -q -a1 -a2
296
297 %patch0 -p1
298 %patch1 -p1
299 %patch2 -p1
300 %patch3 -p1
301 %patch4 -p1
302 %patch5
303 cd doc
304 ln -s merge/djbdns/* .
305
306 %build
307 echo %{__cc} %{rpmcflags} >conf-cc
308 echo %{_prefix} > conf-home
309 %{__make}
310
311 %install
312 rm -rf $RPM_BUILD_ROOT
313 install -d $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_sysconfdir}}
314 install -d $RPM_BUILD_ROOT%{_mandir}/{man1,man5,man8}
315
316 install dnsroots.global $RPM_BUILD_ROOT%{_sysconfdir}
317 install axfr-get        $RPM_BUILD_ROOT%{_bindir}
318 install axfrdns         $RPM_BUILD_ROOT%{_bindir}
319 install axfrdns-conf    $RPM_BUILD_ROOT%{_bindir}
320 install cachetest       $RPM_BUILD_ROOT%{_bindir}
321 install dnscache        $RPM_BUILD_ROOT%{_bindir}
322 install dnscache-conf   $RPM_BUILD_ROOT%{_bindir}
323 install dnsfilter       $RPM_BUILD_ROOT%{_bindir}
324 install dnsip           $RPM_BUILD_ROOT%{_bindir}
325 install dnsipq          $RPM_BUILD_ROOT%{_bindir}
326 install dnsmx           $RPM_BUILD_ROOT%{_bindir}
327 install dnsname         $RPM_BUILD_ROOT%{_bindir}
328 install dnsq            $RPM_BUILD_ROOT%{_bindir}
329 install dnsqr           $RPM_BUILD_ROOT%{_bindir}
330 install dnstrace        $RPM_BUILD_ROOT%{_bindir}
331 install dnstxt          $RPM_BUILD_ROOT%{_bindir}
332 install pickdns         $RPM_BUILD_ROOT%{_bindir}
333 install pickdns-conf    $RPM_BUILD_ROOT%{_bindir}
334 install pickdns-data    $RPM_BUILD_ROOT%{_bindir}
335 install random-ip       $RPM_BUILD_ROOT%{_bindir}
336 install rbldns          $RPM_BUILD_ROOT%{_bindir}
337 install rbldns-conf     $RPM_BUILD_ROOT%{_bindir}
338 install rbldns-data     $RPM_BUILD_ROOT%{_bindir}
339 install rts             $RPM_BUILD_ROOT%{_bindir}
340 install tinydns         $RPM_BUILD_ROOT%{_bindir}
341 install tinydns-conf    $RPM_BUILD_ROOT%{_bindir}
342 install tinydns-data    $RPM_BUILD_ROOT%{_bindir}
343 install tinydns-edit    $RPM_BUILD_ROOT%{_bindir}
344 install tinydns-get     $RPM_BUILD_ROOT%{_bindir}
345 install walldns         $RPM_BUILD_ROOT%{_bindir}
346 install walldns-conf    $RPM_BUILD_ROOT%{_bindir}
347 install djbdns-man/*.1  $RPM_BUILD_ROOT%{_mandir}/man1
348 install djbdns-man/*.5  $RPM_BUILD_ROOT%{_mandir}/man5
349 install djbdns-man/*.8  $RPM_BUILD_ROOT%{_mandir}/man8
350
351 ##### DNSCACHE #####
352
353 mkdir $RPM_BUILD_ROOT%{_sysconfdir}/dnscache
354 cd $RPM_BUILD_ROOT%{_sysconfdir}/dnscache
355 mkdir log
356 mkdir log/main
357 touch log/status
358 mkdir env
359 echo %{_sysconfdir}/dnscache/root>env/ROOT
360 echo 127.0.0.1                   >env/IP
361 echo 0.0.0.0                     >env/IPSEND
362 echo 1000000                     >env/CACHESIZE
363 echo 3000000                     >env/DATALIMIT
364 cat>run<<___
365 #!/bin/sh
366 exec 2>&1
367 exec <seed
368 exec envdir ./env sh -c '
369   exec envuidgid dnscache softlimit -o250 -d "\$DATALIMIT" %{_bindir}/dnscache
370 '
371 ___
372 cat>log/run<<___
373 #!/bin/sh
374 exec setuidgid dnslog multilog t ./main
375 ___
376 mkdir root
377 mkdir root/ip
378 touch root/ip/127.0.0.1
379 mkdir root/servers
380 ln $RPM_BUILD_ROOT%{_sysconfdir}/dnsroots.global root/servers/\@
381 dd if=/dev/zero of=seed bs=128c count=1
382
383 ##### TINYDNS #####
384
385 mkdir $RPM_BUILD_ROOT%{_sysconfdir}/tinydns
386 cd $RPM_BUILD_ROOT%{_sysconfdir}/tinydns
387 mkdir log
388 mkdir log/main
389 touch log/status
390 cat>log/run<<___
391 #!/bin/sh
392 exec setuidgid dnslog multilog t ./main
393 ___
394 mkdir env
395 echo %{_sysconfdir}/tinydns/root>env/ROOT
396 echo 127.0.0.1                  >env/IP
397 cat>run<<___
398 #!/bin/sh
399 exec 2>&1
400 exec envuidgid tinydns envdir ./env softlimit -d300000 %{_bindir}/tinydns
401 ___
402 mkdir root
403 touch root/data
404 cat>root/add-ns<<___
405 #!/bin/sh
406 exec %{_bindir}/tinydns-edit data data.new add ns \${1+"\$@"}
407 ___
408 cat>root/add-childns<<___
409 #!/bin/sh
410 exec %{_bindir}/tinydns-edit data data.new add childns \${1+"\$@"}
411 ___
412 cat>root/add-host<<___
413 #!/bin/sh
414 exec %{_bindir}/tinydns-edit data data.new add host \${1+"\$@"}
415 ___
416 cat>root/add-host6<<___
417 #!/bin/sh
418 exec %{_bindir}/tinydns-edit data data.new add host6 \${1+"\$@"}
419 ___
420 cat>root/add-alias<<___
421 #!/bin/sh
422 exec %{_bindir}/tinydns-edit data data.new add alias \${1+"\$@"}
423 ___
424 cat>root/add-alias6<<___
425 #!/bin/sh
426 exec %{_bindir}/tinydns-edit data data.new add alias6 \${1+"\$@"}
427 ___
428 cat>root/add-mx<<___
429 #!/bin/sh
430 exec %{_bindir}/tinydns-edit data data.new add mx \${1+"\$@"}
431 ___
432 cat>root/Makefile<<___
433 data.cdb: data
434         %{_bindir}/tinydns-data
435 ___
436
437 ##### PICKDNS #####
438
439 mkdir $RPM_BUILD_ROOT%{_sysconfdir}/pickdns
440 cd $RPM_BUILD_ROOT%{_sysconfdir}/pickdns
441 mkdir log
442 mkdir log/main
443 touch log/status
444 cat>log/run<<___
445 #!/bin/sh
446 exec setuidgid dnslog multilog t ./main
447 ___
448 mkdir env
449 echo %{_sysconfdir}/pickdns/root>env/ROOT
450 echo 127.0.0.1                  >env/IP
451 cat>run<<___
452 #!/bin/sh
453 exec 2>&1
454 exec envuidgid pickdns envdir ./env softlimit -d250000 %{_bindir}/pickdns
455 ___
456 mkdir root
457 touch root/data
458 cat>root/Makefile<<___
459 data.cdb: data
460         %{_bindir}/pickdns-data
461 ___
462
463 ##### WALLDNS #####
464 mkdir $RPM_BUILD_ROOT%{_sysconfdir}/walldns
465 cd $RPM_BUILD_ROOT%{_sysconfdir}/walldns
466 mkdir log
467 mkdir log/main
468 touch log/status
469 cat>log/run<<___
470 #!/bin/sh
471 exec setuidgid dnslog multilog t ./main
472 ___
473 mkdir env
474 echo %{_sysconfdir}/walldns/root>env/ROOT
475 echo 127.0.0.1                  >env/IP
476 cat>run<<___
477 #!/bin/sh
478 exec 2>&1
479 exec envuidgid walldns envdir ./env softlimit -d250000 %{_bindir}/walldns
480 ___
481 mkdir root
482
483 ##### RBLDNS #####
484
485 mkdir $RPM_BUILD_ROOT%{_sysconfdir}/rbldns
486 cd $RPM_BUILD_ROOT%{_sysconfdir}/rbldns
487 mkdir log
488 mkdir log/main
489 touch log/status
490 cat>log/run<<___
491 #!/bin/sh
492 exec setuidgid dnslog multilog t ./main
493 ___
494 mkdir env
495 echo %{_sysconfdir}/rbldns/root>env/ROOT
496 echo 127.0.0.1                 >env/IP
497 echo in-addr.arpa              >env/BASE
498 cat>run<<___
499 #!/bin/sh
500 exec 2>&1
501 exec envuidgid rbldns envdir ./env softlimit -d250000 %{_bindir}/rbldns
502 ___
503 mkdir root
504 touch root/data
505 cat>root/Makefile<<___
506 data.cdb: data
507         %{_bindir}/rbldns-data
508 ___
509 cat>data<<___
510 # example
511 # :127.0.0.2:blacklisted"
512 # 1.2.3.0/24
513 ___
514
515
516
517 ##### AXFRDNS #####
518
519 mkdir $RPM_BUILD_ROOT%{_sysconfdir}/axfrdns
520 cd $RPM_BUILD_ROOT%{_sysconfdir}/axfrdns
521 mkdir log
522 mkdir log/main
523 touch log/status
524 cat>log/run<<___
525 #!/bin/sh
526 exec setuidgid dnslog multilog t ./main
527 ___
528 mkdir env
529 echo %{_sysconfdir}/tinydns/root>env/ROOT
530 echo 127.0.0.1                  >env/IP
531 cat>run<<___
532 #!/bin/sh
533 exec 2>&1
534 exec envdir ./env sh -c '
535   exec envuidgid axfrdns softlimit -d300000 tcpserver -vDRHl0 -x tcp.cdb -- "\$IP" 53 %{_bindir}/axfrdns
536 '
537 ___
538 cat>Makefile<<___
539 tcp.cdb: tcp
540         tcprules tcp.cdb tcp.tmp < tcp
541 ___
542 cat>tcp<<___
543 # sample line:  1.2.3.4:allow,AXFR="heaven.af.mil/3.2.1.in-addr.arpa"
544 :deny
545 ___
546
547 ##### daemontools symlinks #####
548 install -d $RPM_BUILD_ROOT/service
549 cd $RPM_BUILD_ROOT/service
550 ln -s ..%{_sysconfdir}/dnscache
551 ln -s ..%{_sysconfdir}/tinydns
552 ln -s ..%{_sysconfdir}/pickdns
553 ln -s ..%{_sysconfdir}/walldns
554 ln -s ..%{_sysconfdir}/rbldns
555 ln -s ..%{_sysconfdir}/axfrdns
556
557 %clean
558 rm -rf $RPM_BUILD_ROOT
559
560 %pre
561 if [ -n "`getgid djbdns`" ]; then
562         if [ "`getgid djbdns`" != "32" ]; then
563                 echo "Error: group djbdns doesn't have gid=32. Correct this before installing djbdns." 1>&2
564                 exit 1
565         fi
566 else
567         /usr/sbin/groupadd -g 32 -r -f djbdns
568 fi
569 if [ -n "`id -u dnslog 2>/dev/null`" ]; then
570         if [ "`id -u dnslog`" != "32" ]; then
571                 echo "Error: user dnslog doesn't have uid=32. Correct this before installing djbdns." 1>&2
572                 exit 1
573         fi
574 else
575         /usr/sbin/useradd -u 32 -r -d / -s /bin/false -c "djbdns User" -g djbdns dnslog 1>&2
576 fi
577
578 %postun
579 if [ "$1" = "0" ]; then
580         /usr/sbin/userdel dnslog
581         /usr/sbin/groupdel djbdns
582 fi
583
584 %pre dnscache
585 if [ -n "`id -u dnscache 2>/dev/null`" ]; then
586         if [ "`id -u dnscache`" != "33" ]; then
587                 echo "Error: user dnscache doesn't have uid=33. Correct this before installing djbdns-dnscache." 1>&2
588                 exit 1
589         fi
590 else
591         /usr/sbin/useradd -u 33 -r -d /etc/dnscache -s /bin/false -c "djbdns User" -g djbdns dnscache 1>&2
592 fi
593
594 %post dnscache
595 if [ \! -s /etc/dnscache/seed ]; then
596         dd if=/dev/urandom of=/etc/dnscache/seed bs=128c count=1
597 fi
598 if diff -u /etc/{dnscache,pickdns}/env/IP >/dev/zero 2>&1;then
599         echo "Warning: dnscache and pickdns can't work on the same"
600         echo "IP address. You have to edit either /etc/dnscache/env/IP"
601         echo "or /etc/pickdns/env/IP."
602 fi
603 if diff -u /etc/{dnscache,rbldns}/env/IP >/dev/zero 2>&1;then
604         echo "Warning: dnscache and rbldns can't work on the same"
605         echo "IP address. You have to edit either /etc/dnscache/env/IP"
606         echo "or /etc/rbldns/env/IP."
607 fi
608 if diff -u /etc/{dnscache,tinydns}/env/IP >/dev/zero 2>&1;then
609         echo "Warning: dnscache and tinydns can't work on the same"
610         echo "IP address. You have to edit either /etc/dnscache/env/IP"
611         echo "or /etc/tinydns/env/IP."
612 fi
613 if diff -u /etc/{dnscache,walldns}/env/IP >/dev/zero 2>&1;then
614         echo "Warning: dnscache and walldns can't work on the same"
615         echo "IP address. You have to edit either /etc/dnscache/env/IP"
616         echo "or /etc/walldns/env/IP."
617 fi
618
619 %preun dnscache
620 if [ "$1" = "0" ]; then
621         svc -d /service/dnscache
622 fi
623
624 %postun dnscache
625 if [ "$1" = "0" ]; then
626         /usr/sbin/userdel dnscache
627 fi
628
629 %pre tinydns
630 if [ -n "`id -u tinydns 2>/dev/null`" ]; then
631         if [ "`id -u tinydns`" != "34" ]; then
632                 echo "Error: user tinydns doesn't have uid=34. Correct this before installing djbdns-tinydns." 1>&2
633                 exit 1
634         fi
635 else
636         /usr/sbin/useradd -u 34 -r -d /etc/tinydns -s /bin/false -c "djbdns User" -g djbdns tinydns 1>&2
637 fi
638
639 %post tinydns
640 if diff -u /etc/{dnscache,tinydns}/env/IP >/dev/zero 2>&1;then
641         echo "Warning: dnscache and tinydns can't work on the same"
642         echo "IP address. You have to edit either /etc/dnscache/env/IP"
643         echo "or /etc/tinydns/env/IP."
644 fi
645 if diff -u /etc/{pick,tiny}dns/env/IP >/dev/zero 2>&1;then
646         echo "Warning: pickdns and tinydns can't work on the same"
647         echo "IP address. You have to edit either /etc/pickdns/env/IP"
648         echo "or /etc/tinydns/env/IP."
649 fi
650 if diff -u /etc/{rbl,tiny}dns/env/IP >/dev/zero 2>&1;then
651         echo "Warning: rbldns and tinydns can't work on the same"
652         echo "IP address. You have to edit either /etc/rbldns/env/IP"
653         echo "or /etc/tinydns/env/IP."
654 fi
655 if diff -u /etc/{tiny,wall}dns/env/IP >/dev/zero 2>&1;then
656         echo "Warning: tinydns and walldns can't work on the same"
657         echo "IP address. You have to edit either /etc/tinydns/env/IP"
658         echo "or /etc/walldns/env/IP."
659 fi
660
661 %preun tinydns
662 if [ "$1" = "0" ]; then
663         svc -d /service/tinydns
664 fi
665
666 %postun tinydns
667 if [ "$1" = "0" ]; then
668         /usr/sbin/userdel tinydns
669 fi
670
671 %pre pickdns
672 if [ -n "`id -u pickdns 2>/dev/null`" ]; then
673         if [ "`id -u pickdns`" != "35" ]; then
674                 echo "Error: user pickdns doesn't have uid=35. Correct this before installing djbdns-pickdns." 1>&2
675                 exit 1
676         fi
677 else
678         /usr/sbin/useradd -u 35 -r -d /etc/pickdns -s /bin/false -c "djbdns User" -g djbdns pickdns 1>&2
679 fi
680
681 %post pickdns
682 if diff -u /etc/{dnscache,pickdns}/env/IP >/dev/zero 2>&1;then
683         echo "Warning: dnscache and pickdns can't work on the same"
684         echo "IP address. You have to edit either /etc/dnscache/env/IP"
685         echo "or /etc/pickdns/env/IP."
686 fi
687 if diff -u /etc/{pick,rbl}dns/env/IP >/dev/zero 2>&1;then
688         echo "Warning: pickdns and rbldns can't work on the same"
689         echo "IP address. You have to edit either /etc/pickdns/env/IP"
690         echo "or /etc/rbldns/env/IP."
691 fi
692 if diff -u /etc/{pick,tiny}dns/env/IP >/dev/zero 2>&1;then
693         echo "Warning: pickdns and tinydns can't work on the same"
694         echo "IP address. You have to edit either /etc/pickdns/env/IP"
695         echo "or /etc/tinydns/env/IP."
696 fi
697 if diff -u /etc/{pick,wall}dns/env/IP >/dev/zero 2>&1;then
698         echo "Warning: pickdns and walldns can't work on the same"
699         echo "IP address. You have to edit either /etc/pickdns/env/IP"
700         echo "or /etc/walldns/env/IP."
701 fi
702
703 %preun pickdns
704 if [ "$1" = "0" ]; then
705         svc -d /service/pickdns
706 fi
707
708 %postun pickdns
709 if [ "$1" = "0" ]; then
710         /usr/sbin/userdel pickdns
711 fi
712
713 %pre walldns
714 if [ -n "`id -u walldns 2>/dev/null`" ]; then
715         if [ "`id -u walldns`" != "36" ]; then
716                 echo "Error: user walldns doesn't have uid=36. Correct this before installing djbdns-walldns." 1>&2
717                 exit 1
718         fi
719 else
720         /usr/sbin/useradd -u 36 -r -d /etc/walldns -s /bin/false -c "djbdns User" -g djbdns walldns 1>&2
721 fi
722
723 %post walldns
724 if diff -u /etc/{dnscache,walldns}/env/IP >/dev/zero 2>&1;then
725         echo "Warning: dnscache and walldns can't work on the same"
726         echo "IP address. You have to edit either /etc/dnscache/env/IP"
727         echo "or /etc/walldns/env/IP."
728 fi
729 if diff -u /etc/{pick,wall}dns/env/IP >/dev/zero 2>&1;then
730         echo "Warning: pickdns and walldns can't work on the same"
731         echo "IP address. You have to edit either /etc/pickdns/env/IP"
732         echo "or /etc/walldns/env/IP."
733 fi
734 if diff -u /etc/{rbl,wall}dns/env/IP >/dev/zero 2>&1;then
735         echo "Warning: rbldns and walldns can't work on the same"
736         echo "IP address. You have to edit either /etc/rbldns/env/IP"
737         echo "or /etc/walldns/env/IP."
738 fi
739 if diff -u /etc/{tiny,wall}dns/env/IP >/dev/zero 2>&1;then
740         echo "Warning: tinydns and walldns can't work on the same"
741         echo "IP address. You have to edit either /etc/tinydns/env/IP"
742         echo "or /etc/walldns/env/IP."
743 fi
744
745 %preun walldns
746 if [ "$1" = "0" ]; then
747         svc -d /service/walldns
748 fi
749
750 %postun walldns
751 if [ "$1" = "0" ]; then
752         /usr/sbin/userdel walldns
753 fi
754
755 %pre rbldns
756 if [ -n "`id -u rbldns 2>/dev/null`" ]; then
757         if [ "`id -u rbldns`" != "37" ]; then
758                 echo "Error: user rbldns doesn't have uid=37. Correct this before installing djbdns-rbldns." 1>&2
759                 exit 1
760         fi
761 else
762         /usr/sbin/useradd -u 37 -r -d /etc/rbldns -s /bin/false -c "djbdns User" -g djbdns rbldns 1>&2
763 fi
764
765 %post rbldns
766 if diff -u /etc/{dnscache,rbldns}/env/IP >/dev/zero 2>&1;then
767         echo "Warning: dnscache and rbldns can't work on the same"
768         echo "IP address. You have to edit either /etc/dnscache/env/IP"
769         echo "or /etc/rbldns/env/IP."
770 fi
771 if diff -u /etc/{pick,rbl}dns/env/IP >/dev/zero 2>&1;then
772         echo "Warning: pickdns and rbldns can't work on the same"
773         echo "IP address. You have to edit either /etc/pickdns/env/IP"
774         echo "or /etc/rbldns/env/IP."
775 fi
776 if diff -u /etc/{rbl,tiny}dns/env/IP >/dev/zero 2>&1;then
777         echo "Warning: rbldns and tinydns can't work on the same"
778         echo "IP address. You have to edit either /etc/rbldns/env/IP"
779         echo "or /etc/tinydns/env/IP."
780 fi
781 if diff -u /etc/{rbl,wall}dns/env/IP >/dev/zero 2>&1;then
782         echo "Warning: rbldns and walldns can't work on the same"
783         echo "IP address. You have to edit either /etc/rbldns/env/IP"
784         echo "or /etc/walldns/env/IP."
785 fi
786
787 %preun rbldns
788 if [ "$1" = "0" ]; then
789         svc -d /service/rbldns
790 fi
791
792 %postun rbldns
793 if [ "$1" = "0" ]; then
794         /usr/sbin/userdel rbldns
795 fi
796
797 %pre axfrdns
798 if [ -n "`id -u axfrdns 2>/dev/null`" ]; then
799         if [ "`id -u axfrdns`" != "38" ]; then
800                 echo "Error: user axfrdns doesn't have uid=38. Correct this before installing djbdns-axfrdns." 1>&2
801                 exit 1
802         fi
803 else
804         /usr/sbin/useradd -u 38 -r -d /etc/axfrdns -s /bin/false -c "djbdns User" -g djbdns axfrdns 1>&2
805 fi
806
807 %preun axfrdns
808 if [ "$1" = "0" ]; then
809         svc -d /service/axfrdns
810 fi
811
812 %postun axfrdns
813 if [ "$1" = "0" ]; then
814         /usr/sbin/userdel axfrdns
815 fi
816
817 %files
818 %defattr(644,root,root,755)
819 %doc CHANGES TODO MULTIPLEIP TINYDNS doc/*
820 %attr(755,root,root) %{_bindir}/cachetest
821 %attr(755,root,root) %{_bindir}/dns[f-t]*
822 %attr(755,root,root) %{_bindir}/axfr-get
823 %{_mandir}/man[15]/*
824 %{_mandir}/man8/axfr-get*
825
826 %files dnscache
827 %defattr(644,root,root,755)
828 %attr(755,root,root) %{_bindir}/dnscache*
829 %config %attr(644,root,root) %{_sysconfdir}/dnsroots.global
830 %dir %attr(3755,root,root) %{_sysconfdir}/dnscache
831 %dir %attr(2755,root,root) %{_sysconfdir}/dnscache/log
832 %dir %attr(2755,dnslog,djbdns) %{_sysconfdir}/dnscache/log/main
833 %attr(644,dnslog,djbdns) %{_sysconfdir}/dnscache/log/status
834 %dir %attr(2755,root,root) %{_sysconfdir}/dnscache/env
835 %config %attr(644,root,root) %{_sysconfdir}/dnscache/env/*
836 %attr(755,root,root) %{_sysconfdir}/dnscache/run
837 %attr(755,root,root) %{_sysconfdir}/dnscache/log/run
838 %dir %attr(2755,root,root) %{_sysconfdir}/dnscache/root
839 %dir %attr(2755,root,root) %{_sysconfdir}/dnscache/root/*
840 %config %attr(600,root,root) %{_sysconfdir}/dnscache/root/ip/*
841 %config %attr(644,root,root) %{_sysconfdir}/dnscache/root/servers/*
842 %ghost %attr(600,root,root) %{_sysconfdir}/dnscache/seed
843 %{_mandir}/man8/dnscache*
844 /service/dnscache
845
846 %files tinydns
847 %defattr(644,root,root,755)
848 %attr(755,root,root) %{_bindir}/tinydns*
849 %dir %attr(3755,root,root) %{_sysconfdir}/tinydns
850 %dir %attr(2755,root,root) %{_sysconfdir}/tinydns/log
851 %dir %attr(2755,dnslog,djbdns) %{_sysconfdir}/tinydns/log/main
852 %attr(644,dnslog,djbdns) %{_sysconfdir}/tinydns/log/status
853 %attr(755,root,root) %{_sysconfdir}/tinydns/log/run
854 %dir %attr(2755,root,root) %{_sysconfdir}/tinydns/env
855 %config %attr(644,root,root) %{_sysconfdir}/tinydns/env/*
856 %attr(755,root,root) %{_sysconfdir}/tinydns/run
857 %dir %attr(2755,root,root) %{_sysconfdir}/tinydns/root
858 %attr(644,root,root) %{_sysconfdir}/tinydns/root/Makefile
859 %config %attr(644,root,root) %{_sysconfdir}/tinydns/root/data
860 %attr(755,root,root) %{_sysconfdir}/tinydns/root/add-*
861 %{_mandir}/man8/tinydns*
862 /service/tinydns
863
864 %files pickdns
865 %defattr(644,root,root,755)
866 %attr(755,root,root) %{_bindir}/pickdns*
867 %dir %attr(3755,root,root) %{_sysconfdir}/pickdns
868 %dir %attr(2755,root,root) %{_sysconfdir}/pickdns/log
869 %dir %attr(2755,dnslog,djbdns) %{_sysconfdir}/pickdns/log/main
870 %attr(644,dnslog,djbdns) %{_sysconfdir}/pickdns/log/status
871 %attr(755,root,root) %{_sysconfdir}/pickdns/log/run
872 %dir %attr(2755,root,root) %{_sysconfdir}/pickdns/env
873 %config %attr(644,root,root) %{_sysconfdir}/pickdns/env/*
874 %attr(755,root,root) %{_sysconfdir}/pickdns/run
875 %dir %attr(2755,root,root) %{_sysconfdir}/pickdns/root
876 %attr(644,root,root) %{_sysconfdir}/pickdns/root/Makefile
877 %config %attr(644,root,root) %{_sysconfdir}/pickdns/root/data
878 %{_mandir}/man8/pickdns*
879 /service/pickdns
880
881 %files walldns
882 %defattr(644,root,root,755)
883 %attr(755,root,root) %{_bindir}/walldns*
884 %dir %attr(3755,root,root) %{_sysconfdir}/walldns
885 %dir %attr(2755,root,root) %{_sysconfdir}/walldns/log
886 %dir %attr(2755,dnslog,djbdns) %{_sysconfdir}/walldns/log/main
887 %attr(644,dnslog,djbdns) %{_sysconfdir}/walldns/log/status
888 %attr(755,root,root) %{_sysconfdir}/walldns/log/run
889 %dir %attr(2755,root,root) %{_sysconfdir}/walldns/env
890 %config %attr(644,root,root) %{_sysconfdir}/walldns/env/*
891 %attr(755,root,root) %{_sysconfdir}/walldns/run
892 %dir %attr(2755,root,root) %{_sysconfdir}/walldns/root
893 %{_mandir}/man8/walldns*
894 /service/walldns
895
896 %files rbldns
897 %defattr(644,root,root,755)
898 %attr(755,root,root) %{_bindir}/rbldns*
899 %dir %attr(3755,root,root) %{_sysconfdir}/rbldns
900 %dir %attr(2755,root,root) %{_sysconfdir}/rbldns/log
901 %dir %attr(2755,dnslog,djbdns) %{_sysconfdir}/rbldns/log/main
902 %attr(644,dnslog,djbdns) %{_sysconfdir}/rbldns/log/status
903 %attr(755,root,root) %{_sysconfdir}/rbldns/log/run
904 %dir %attr(2755,root,root) %{_sysconfdir}/rbldns/env
905 %config %attr(644,root,root) %{_sysconfdir}/rbldns/env/*
906 %attr(755,root,root) %{_sysconfdir}/rbldns/run
907 %dir %attr(2755,root,root) %{_sysconfdir}/rbldns/root
908 %attr(644,root,root) %{_sysconfdir}/rbldns/root/Makefile
909 %config %attr(644,root,root) %{_sysconfdir}/rbldns/root/data
910 %{_mandir}/man8/rbldns*
911 /service/rbldns
912
913 %files axfrdns
914 %defattr(644,root,root,755)
915 %attr(755,root,root) %{_bindir}/axfrdns*
916 %dir %attr(3755,root,root) %{_sysconfdir}/axfrdns
917 %dir %attr(2755,root,root) %{_sysconfdir}/axfrdns/log
918 %dir %attr(2755,dnslog,djbdns) %{_sysconfdir}/axfrdns/log/main
919 %attr(644,dnslog,djbdns) %{_sysconfdir}/axfrdns/log/status
920 %attr(755,root,root) %{_sysconfdir}/axfrdns/log/run
921 %dir %attr(2755,root,root) %{_sysconfdir}/axfrdns/env
922 %config %attr(644,root,root) %{_sysconfdir}/axfrdns/env/*
923 %attr(755,root,root) %{_sysconfdir}/axfrdns/run
924 %attr(644,root,root) %{_sysconfdir}/axfrdns/Makefile
925 %config %attr(644,root,root) %{_sysconfdir}/axfrdns/tcp
926 %{_mandir}/man8/axfrdns*
927 /service/axfrdns
This page took 0.106505 seconds and 4 git commands to generate.