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