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