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