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