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