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