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