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