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