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