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