]> git.pld-linux.org Git - packages/djbdns.git/blob - djbdns.spec
- close bug #764: the subpackages don't require getgid
[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):  /bin/id
95 Requires(pre):  /usr/sbin/groupadd
96 Requires(pre):  /usr/sbin/useradd
97 Requires(postun):       /usr/sbin/userdel
98 Requires(postun):       /usr/sbin/groupdel
99 Requires(post): diffutils
100 Requires(post): fileutils
101 Requires(preun):        daemontools
102 Requires:       daemontools >= 0.70-5
103 Obsoletes:      dnscache
104
105 %description dnscache
106 dnscache is a local DNS cache from the djbdns package. It accepts
107 recursive DNS queries from local clients such as web browsers and mail
108 transfer agents. It collects responses from remote DNS servers. It
109 caches the responses to save time later.
110
111 %description dnscache -l de
112 dnscache ist ein lokaler DNS-Cache aus dem djbdns-Paket. Es empfängt
113 rekursive DNS-Fragen von den lokalen Klienten, zum Beispiel
114 Web-Browsers und Mail-Transfer-Agenten. Es sammelt die Antworten von
115 den Fern-DNS-Servers. Es merkt sich die Antworten, um die Zeit später
116 zu sparen.
117
118 %description dnscache -l pl
119 dnscache jest lokalnym cachem DNS z pakietu djbdns. Przyjmuje on
120 rekursywne zapytania DNS od lokalnych klientów takich, jak
121 przegl±darki WWW i agenci transferu poczty (MTA). Zbiera on odpowiedzi
122 od zdalnych serwerów DNS. Zapamiêtuje on odpowiedzi, ¿eby pó¼niej
123 oszczêdziæ czas.
124
125 %package tinydns
126 Summary:        DJB's DNS server
127 Summary(de):    DJBs DNS-Server
128 Summary(pl):    Serwer DNS od DJB
129 Group:          Networking/Daemons
130 PreReq:         %{name} = %{version}
131 Requires(pre):  /bin/id
132 Requires(pre):  /usr/sbin/groupadd
133 Requires(pre):  /usr/sbin/useradd
134 Requires(postun):       /usr/sbin/userdel
135 Requires(postun):       /usr/sbin/groupdel
136 Requires(post): diffutils
137 Requires(preun):        daemontools
138 Requires:       daemontools >= 0.70-5
139 Requires:       make
140 Obsoletes:      tinydns
141
142 %description tinydns
143 tinydns is a DNS server from the djbdns package. It accepts iterative
144 DNS queries from hosts around the Internet and responds with
145 locally-configured information.
146
147 %description tinydns -l de
148 tinydns ist ein DNS-Server aus dem djbdns-Paket. Es empfängt iterative
149 DNS-Fragen von dem Hosts aus allem Internet und antwortet mit den
150 lokal-konfigurierten Informationen.
151
152 %description tinydns -l pl
153 tinydns jest serwerem DNS z pakietu djbdns. Przyjmuje on iteracyjne
154 zapytania DNS od komputerów z ca³ego Internetu i odpowiada przy u¿yciu
155 lokalnie skonfigurowanych informacji.
156
157 %package tinydns-notify
158 Summary:        DNS NOTIFY sending tool
159 Summary(pl):    Narzêdzie do wysy³ania komunikatów DNS NOTIFY
160 Group:          Networking/Daemons
161 License:        Free to use
162 URL:            http://www.sericyb.com.au/tinydns-notify
163 PreReq:         %{name} = %{version}
164 Requires:       perl-modules
165 Requires:       perl-Net-DNS
166 Obsoletes:      tinydns-notify
167
168 %description tinydns-notify
169 tinydns-notify is a tool written in Perl, which extracts zones
170 and their nameservers from tinydns-data files and sends DNS NOTIFY
171 requests to nameservers listed in notify-list file.
172
173 %description tinydns-notify -l pl
174 tinydns-notify jest napisanym w Perlu narzêdziem, które czyta pliki
175 stref i odpowiadaj±ce im serwery nazw z plików tinydns-data, a
176 nastêpnie wysy³a ¿±dania NOTIFY do serwerów wyspecyfikowanych w pliku
177 notify-list.
178
179 %package pickdns
180 Summary:        DJB's load-balancing DNS server
181 Summary(de):    DJBs Belastung ausgleichender DNS-Server
182 Summary(pl):    Serwer DNS równowa¿±cy obci±¿enie od DJB
183 Group:          Networking/Daemons
184 PreReq:         %{name} = %{version}
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):  /bin/id
221 Requires(pre):  /usr/sbin/groupadd
222 Requires(pre):  /usr/sbin/useradd
223 Requires(postun):       /usr/sbin/userdel
224 Requires(postun):       /usr/sbin/groupdel
225 Requires(post): diffutils
226 Requires(preun):        daemontools
227 Requires:       daemontools >= 0.70-5
228 Obsoletes:      walldns
229
230 %description walldns
231 walldns is a reverse DNS wall from the djbdns package. It accepts
232 iterative DNS queries for in-addr.arpa domains from hosts around the
233 Internet and supplies generic responses that avoid revealing local
234 host information.
235
236 %description walldns -l de
237 walldns ist ein Wand rückgekehrten DNSs aus dem djbdns-Paket. Es
238 empfängt iterative DNS-Fragen für den in-addr.arpa-Domänen von den
239 Hosts aus allem Internet und liefert Antworte, die vermeiden
240 Informationen über die lokalen Hosts zu aufzudecken.
241
242 %description walldns -l pl
243 walldns jest ¶cian± dla odwrotnych zapytañ DNS z pakietu djbdns.
244 Przyjmuje ona iteracyjne zapytania DNS dla domen in-addr.arpa od
245 komputerów z ca³ego Internetu i dostarcza odpowiedzi, które unikaj±
246 ujawniania informacji o lokalnych komputerach.
247
248 %package rbldns
249 Summary:        DJB's IP-address-listing DNS server
250 Summary(de):    DJBs IP-Adressen-Listen-DNS-Server
251 Summary(pl):    Serwer DNS list adresów IP od DJB
252 Group:          Networking/Daemons
253 PreReq:         %{name} = %{version}
254 Requires(pre):  /bin/id
255 Requires(pre):  /usr/sbin/groupadd
256 Requires(pre):  /usr/sbin/useradd
257 Requires(postun):       /usr/sbin/userdel
258 Requires(postun):       /usr/sbin/groupdel
259 Requires(post): diffutils
260 Requires(preun):        daemontools
261 Requires:       daemontools >= 0.70-5
262 Requires:       make
263 Obsoletes:      rbldns
264
265 %description rbldns
266 rbldns is an IP-address-listing DNS server from the djbdns package. It
267 accepts iterative DNS queries from hosts around the Internet asking
268 about various IP addresses. It provides responses showing whether the
269 addresses are on a locally configured list, such as RBL or DUL.
270
271 %description rbldns -l de
272 rbldns ist ein IP-Adressen-Listen-DNS-Server aus dem djbdns-Paket. Es
273 empfängt iterative DNS-Fragen von den Hosts aus allem Internet
274 fragende nach verschiedene IP-Adresse. Es liefert Antworte, die zeugen
275 ob die Adresse sich auf einer lokal-konfigurierten Liste befinden, zum
276 Beispiel RBL oder DUL.
277
278 %description rbldns -l pl
279 rbldns jest serwerem DNS list adresów z pakietu djbdns. Przyjmuje on
280 iteracyjne zapytania DNS od komputerów z ca³ego Internetu pytaj±ce o
281 ró¿ne adresy IP. Dostarcza on odpowiedzi pokazuj±cych, czy adresy te
282 s± na lokalnie skonfigurowanej li¶cie takiej, jak RBL lub DUL.
283
284 %package axfrdns
285 Summary:        DJB's DNS zone-transfer server
286 Summary(de):    DJBs DNS-Zonen-Transfer-Server
287 Summary(pl):    Serwer transferów stref DNS od DJB
288 Group:          Networking/Daemons
289 PreReq:         %{name} = %{version}
290 Requires(pre):  /bin/id
291 Requires(pre):  /usr/sbin/groupadd
292 Requires(pre):  /usr/sbin/useradd
293 Requires(postun):       /usr/sbin/userdel
294 Requires(postun):       /usr/sbin/groupdel
295 Requires(preun):        daemontools
296 Requires:       %{name}-tinydns = %{version}
297 Requires:       daemontools >= 0.70-5
298 Requires:       make
299 Requires:       ucspi-tcp
300 Obsoletes:      axfrdns
301
302 %description axfrdns
303 axfrdns is a DNS zone transfer server from the djbdns package. It
304 reads a zone-transfer request in DNS-over-TCP format from its standard
305 input and responds with locally configured information.
306
307 %description axfrdns -l de
308 axfrdns ist ein DNS-Zonen-Transfer-Server aus dem djbdns-Paket. Es
309 liest ein Zonen-Transfer-Ersuchen im DNS-over-TCP-Format von seinem
310 standarden Eingabe und antwortet mit den lokal-konfigurierten
311 Informationen.
312
313 %description axfrdns -l pl
314 axfrdns jest serwerem transferów stref DNS z pakietu djbdns. Wczytuje
315 on ze standardowego wej¶cia pro¶bê o transfer strefy w formacie
316 DNS-over-TCP i odpowiada przy u¿yciu lokalnie skonfigurowanych
317 informacji.
318
319 %prep
320 %setup -q -a1 -a2
321
322 %patch0 -p1
323 %patch1 -p1
324 %patch2 -p1
325 %patch3 -p1
326 %patch4 -p1
327 %patch5
328 %patch6 -p1
329 %patch7 -p1
330 cd doc
331 ln -s merge/djbdns/* .
332
333 %build
334 echo %{__cc} %{rpmcflags} >conf-cc
335 echo %{_prefix} > conf-home
336 %{__make}
337
338 %install
339 rm -rf $RPM_BUILD_ROOT
340 install -d $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_sysconfdir}}
341 install -d $RPM_BUILD_ROOT%{_mandir}/{man1,man5,man8}
342
343 install %{SOURCE3}      $RPM_BUILD_ROOT%{_bindir}
344
345 install dnsroots.global $RPM_BUILD_ROOT%{_sysconfdir}
346 install axfr-get        $RPM_BUILD_ROOT%{_bindir}
347 install axfrdns         $RPM_BUILD_ROOT%{_bindir}
348 install axfrdns-conf    $RPM_BUILD_ROOT%{_bindir}
349 install cachetest       $RPM_BUILD_ROOT%{_bindir}
350 install dnscache        $RPM_BUILD_ROOT%{_bindir}
351 install dnscache-conf   $RPM_BUILD_ROOT%{_bindir}
352 install dnsfilter       $RPM_BUILD_ROOT%{_bindir}
353 install dnsip           $RPM_BUILD_ROOT%{_bindir}
354 install dnsipq          $RPM_BUILD_ROOT%{_bindir}
355 install dnsmx           $RPM_BUILD_ROOT%{_bindir}
356 install dnsname         $RPM_BUILD_ROOT%{_bindir}
357 install dnsq            $RPM_BUILD_ROOT%{_bindir}
358 install dnsqr           $RPM_BUILD_ROOT%{_bindir}
359 install dnstrace        $RPM_BUILD_ROOT%{_bindir}
360 install dnstxt          $RPM_BUILD_ROOT%{_bindir}
361 install pickdns         $RPM_BUILD_ROOT%{_bindir}
362 install pickdns-conf    $RPM_BUILD_ROOT%{_bindir}
363 install pickdns-data    $RPM_BUILD_ROOT%{_bindir}
364 install random-ip       $RPM_BUILD_ROOT%{_bindir}
365 install rbldns          $RPM_BUILD_ROOT%{_bindir}
366 install rbldns-conf     $RPM_BUILD_ROOT%{_bindir}
367 install rbldns-data     $RPM_BUILD_ROOT%{_bindir}
368 install rts             $RPM_BUILD_ROOT%{_bindir}
369 install tinydns         $RPM_BUILD_ROOT%{_bindir}
370 install tinydns-conf    $RPM_BUILD_ROOT%{_bindir}
371 install tinydns-data    $RPM_BUILD_ROOT%{_bindir}
372 install tinydns-edit    $RPM_BUILD_ROOT%{_bindir}
373 install tinydns-get     $RPM_BUILD_ROOT%{_bindir}
374 install walldns         $RPM_BUILD_ROOT%{_bindir}
375 install walldns-conf    $RPM_BUILD_ROOT%{_bindir}
376 install djbdns-man/*.1  $RPM_BUILD_ROOT%{_mandir}/man1
377 install djbdns-man/*.5  $RPM_BUILD_ROOT%{_mandir}/man5
378 install djbdns-man/*.8  $RPM_BUILD_ROOT%{_mandir}/man8
379
380 ##### DNSCACHE #####
381
382 mkdir $RPM_BUILD_ROOT%{_sysconfdir}/dnscache
383 cd $RPM_BUILD_ROOT%{_sysconfdir}/dnscache
384 mkdir log
385 mkdir log/main
386 touch log/status
387 mkdir env
388 echo %{_sysconfdir}/dnscache/root>env/ROOT
389 echo 127.0.0.1                   >env/IP
390 echo 0.0.0.0                     >env/IPSEND
391 echo 1000000                     >env/CACHESIZE
392 echo 3000000                     >env/DATALIMIT
393 touch env/IGNOREIP
394 cat>run<<___
395 #!/bin/sh
396 exec 2>&1
397 exec <seed
398 exec envdir ./env sh -c '
399   exec envuidgid dnscache softlimit -o250 -d "\$DATALIMIT" %{_bindir}/dnscache
400 '
401 ___
402 cat>log/run<<___
403 #!/bin/sh
404 exec setuidgid dnslog multilog t ./main
405 ___
406 mkdir root
407 mkdir root/ip
408 touch root/ip/127.0.0.1
409 mkdir root/servers
410 ln $RPM_BUILD_ROOT%{_sysconfdir}/dnsroots.global root/servers/\@
411 dd if=/dev/zero of=seed bs=128c count=1
412
413 ##### TINYDNS #####
414
415 mkdir $RPM_BUILD_ROOT%{_sysconfdir}/tinydns
416 cd $RPM_BUILD_ROOT%{_sysconfdir}/tinydns
417 mkdir log
418 mkdir log/main
419 touch log/status
420 cat>log/run<<___
421 #!/bin/sh
422 exec setuidgid dnslog multilog t ./main
423 ___
424 mkdir env
425 echo %{_sysconfdir}/tinydns/root>env/ROOT
426 echo 127.0.0.1                  >env/IP
427 cat>run<<___
428 #!/bin/sh
429 exec 2>&1
430 exec envuidgid tinydns envdir ./env softlimit -d300000 %{_bindir}/tinydns
431 ___
432 mkdir root
433 touch root/data
434 cat>root/add-ns<<___
435 #!/bin/sh
436 exec %{_bindir}/tinydns-edit data data.new add ns \${1+"\$@"}
437 ___
438 cat>root/add-childns<<___
439 #!/bin/sh
440 exec %{_bindir}/tinydns-edit data data.new add childns \${1+"\$@"}
441 ___
442 cat>root/add-host<<___
443 #!/bin/sh
444 exec %{_bindir}/tinydns-edit data data.new add host \${1+"\$@"}
445 ___
446 cat>root/add-host6<<___
447 #!/bin/sh
448 exec %{_bindir}/tinydns-edit data data.new add host6 \${1+"\$@"}
449 ___
450 cat>root/add-alias<<___
451 #!/bin/sh
452 exec %{_bindir}/tinydns-edit data data.new add alias \${1+"\$@"}
453 ___
454 cat>root/add-alias6<<___
455 #!/bin/sh
456 exec %{_bindir}/tinydns-edit data data.new add alias6 \${1+"\$@"}
457 ___
458 cat>root/add-mx<<___
459 #!/bin/sh
460 exec %{_bindir}/tinydns-edit data data.new add mx \${1+"\$@"}
461 ___
462 cat>root/Makefile<<___
463 data.cdb: data
464         %{_bindir}/tinydns-data
465 ___
466
467 ##### PICKDNS #####
468
469 mkdir $RPM_BUILD_ROOT%{_sysconfdir}/pickdns
470 cd $RPM_BUILD_ROOT%{_sysconfdir}/pickdns
471 mkdir log
472 mkdir log/main
473 touch log/status
474 cat>log/run<<___
475 #!/bin/sh
476 exec setuidgid dnslog multilog t ./main
477 ___
478 mkdir env
479 echo %{_sysconfdir}/pickdns/root>env/ROOT
480 echo 127.0.0.1                  >env/IP
481 cat>run<<___
482 #!/bin/sh
483 exec 2>&1
484 exec envuidgid pickdns envdir ./env softlimit -d250000 %{_bindir}/pickdns
485 ___
486 mkdir root
487 touch root/data
488 cat>root/Makefile<<___
489 data.cdb: data
490         %{_bindir}/pickdns-data
491 ___
492
493 ##### WALLDNS #####
494 mkdir $RPM_BUILD_ROOT%{_sysconfdir}/walldns
495 cd $RPM_BUILD_ROOT%{_sysconfdir}/walldns
496 mkdir log
497 mkdir log/main
498 touch log/status
499 cat>log/run<<___
500 #!/bin/sh
501 exec setuidgid dnslog multilog t ./main
502 ___
503 mkdir env
504 echo %{_sysconfdir}/walldns/root>env/ROOT
505 echo 127.0.0.1                  >env/IP
506 cat>run<<___
507 #!/bin/sh
508 exec 2>&1
509 exec envuidgid walldns envdir ./env softlimit -d250000 %{_bindir}/walldns
510 ___
511 mkdir root
512
513 ##### RBLDNS #####
514
515 mkdir $RPM_BUILD_ROOT%{_sysconfdir}/rbldns
516 cd $RPM_BUILD_ROOT%{_sysconfdir}/rbldns
517 mkdir log
518 mkdir log/main
519 touch log/status
520 cat>log/run<<___
521 #!/bin/sh
522 exec setuidgid dnslog multilog t ./main
523 ___
524 mkdir env
525 echo %{_sysconfdir}/rbldns/root>env/ROOT
526 echo 127.0.0.1                 >env/IP
527 echo in-addr.arpa              >env/BASE
528 cat>run<<___
529 #!/bin/sh
530 exec 2>&1
531 exec envuidgid rbldns envdir ./env softlimit -d250000 %{_bindir}/rbldns
532 ___
533 mkdir root
534 touch root/data
535 cat>root/Makefile<<___
536 data.cdb: data
537         %{_bindir}/rbldns-data
538 ___
539 cat>data<<___
540 # example
541 # !10.11.12.13:See http://bad.example.com
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.089075 seconds and 4 git commands to generate.