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