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