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