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