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