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