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