Summary(pl): DJB DNS
Name: djbdns
Version: 1.05
-Release: 6
-License: GPL
+Release: 9
+License: http://cr.yp.to/distributors.html (free to use)
Group: Networking/Daemons
Group(de): Netzwerkwesen/Server
Group(pl): Sieciowe/Serwery
Source2: ftp://ftp.innominate.org/gpa/djb/djbdns-1.05-man.tar.gz
Patch0: dnscache-1.05-multiple-ip.patch
Patch1: http://www.fefe.de/dns/djbdns-1.05-ipv6.diff
+# based on http://www.ohse.de/uwe/patches/djbdns-1.05-multiip.diff
+Patch2: djbdns-1.05-multiip.diff
URL: http://cr.yp.to/djbdns.html
Prereq: shadow
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
Group(de): Netzwerkwesen/Server
Group(pl): Sieciowe/Serwery
Requires: %{name} = %{version}
-Requires: daemontools
+Requires: daemontools >= 0.70-5
Prereq: fileutils
Prereq: shadow
Group(de): Netzwerkwesen/Server
Group(pl): Sieciowe/Serwery
Requires: %{name} = %{version}
-Requires: daemontools
+Requires: daemontools >= 0.70-5
Requires: make
Prereq: shadow
Group(de): Netzwerkwesen/Server
Group(pl): Sieciowe/Serwery
Requires: %{name} = %{version}
-Requires: daemontools
+Requires: daemontools >= 0.70-5
Requires: make
Prereq: shadow
Group(de): Netzwerkwesen/Server
Group(pl): Sieciowe/Serwery
Requires: %{name} = %{version}
-Requires: daemontools
+Requires: daemontools >= 0.70-5
Prereq: shadow
%description -n walldns
Group(de): Netzwerkwesen/Server
Group(pl): Sieciowe/Serwery
Requires: %{name} = %{version}
-Requires: daemontools
+Requires: daemontools >= 0.70-5
Requires: make
Prereq: shadow
Group(pl): Sieciowe/Serwery
Requires: %{name} = %{version}
Requires: tinydns = %{version}
-Requires: daemontools
+Requires: daemontools >= 0.70-5
Requires: ucspi-tcp
Requires: make
Prereq: shadow
%patch0 -p1
%patch1 -p1
+%patch2 -p1
cd doc
ln -s merge/djbdns/* .
___
##### daemontools symlinks #####
-install -d $RPM_BUILD_ROOT/var/run/service
-cd $RPM_BUILD_ROOT/var/run/service
-ln -s ../../..%{_sysconfdir}/dnscache
-ln -s ../../..%{_sysconfdir}/tinydns
-ln -s ../../..%{_sysconfdir}/pickdns
-ln -s ../../..%{_sysconfdir}/walldns
-ln -s ../../..%{_sysconfdir}/rbldns
-ln -s ../../..%{_sysconfdir}/axfrdns
+install -d $RPM_BUILD_ROOT/service
+cd $RPM_BUILD_ROOT/service
+ln -s ..%{_sysconfdir}/dnscache
+ln -s ..%{_sysconfdir}/tinydns
+ln -s ..%{_sysconfdir}/pickdns
+ln -s ..%{_sysconfdir}/walldns
+ln -s ..%{_sysconfdir}/rbldns
+ln -s ..%{_sysconfdir}/axfrdns
%pre
if [ -n "`getgid djbdns`" ]; then
fi
dd if=/dev/urandom of=seed bs=128c count=1
+%post -n dnscache
+if diff -u /etc/{dnscache,pickdns}/env/IP >/dev/zero 2>&1;then
+ echo "Warning: dnscache and pickdns can't work on the same"
+ echo "IP address. You have to edit either /etc/dnscache/env/IP"
+ echo "or /etc/pickdns/env/IP."
+fi
+if diff -u /etc/{dnscache,rbldns}/env/IP >/dev/zero 2>&1;then
+ echo "Warning: dnscache and rbldns can't work on the same"
+ echo "IP address. You have to edit either /etc/dnscache/env/IP"
+ echo "or /etc/rbldns/env/IP."
+fi
+if diff -u /etc/{dnscache,tinydns}/env/IP >/dev/zero 2>&1;then
+ echo "Warning: dnscache and tinydns can't work on the same"
+ echo "IP address. You have to edit either /etc/dnscache/env/IP"
+ echo "or /etc/tinydns/env/IP."
+fi
+if diff -u /etc/{dnscache,walldns}/env/IP >/dev/zero 2>&1;then
+ echo "Warning: dnscache and walldns can't work on the same"
+ echo "IP address. You have to edit either /etc/dnscache/env/IP"
+ echo "or /etc/walldns/env/IP."
+fi
+
+%preun -n dnscache
+if [ "$1" = "0" ]; then
+ svc -d /service/dnscache
+fi
+
%postun -n dnscache
if [ "$1" = "0" ]; then
/usr/sbin/userdel dnscache
%{_sbindir}/useradd -u 34 -r -d /etc/tinydns -s /bin/false -c "djbdns User" -g djbdns tinydns 1>&2
fi
+%post -n tinydns
+if diff -u /etc/{dnscache,tinydns}/env/IP >/dev/zero 2>&1;then
+ echo "Warning: dnscache and tinydns can't work on the same"
+ echo "IP address. You have to edit either /etc/dnscache/env/IP"
+ echo "or /etc/tinydns/env/IP."
+fi
+if diff -u /etc/{pick,tiny}dns/env/IP >/dev/zero 2>&1;then
+ echo "Warning: pickdns and tinydns can't work on the same"
+ echo "IP address. You have to edit either /etc/pickdns/env/IP"
+ echo "or /etc/tinydns/env/IP."
+fi
+if diff -u /etc/{rbl,tiny}dns/env/IP >/dev/zero 2>&1;then
+ echo "Warning: rbldns and tinydns can't work on the same"
+ echo "IP address. You have to edit either /etc/rbldns/env/IP"
+ echo "or /etc/tinydns/env/IP."
+fi
+if diff -u /etc/{tiny,wall}dns/env/IP >/dev/zero 2>&1;then
+ echo "Warning: tinydns and walldns can't work on the same"
+ echo "IP address. You have to edit either /etc/tinydns/env/IP"
+ echo "or /etc/walldns/env/IP."
+fi
+
+%preun -n tinydns
+if [ "$1" = "0" ]; then
+ svc -d /service/tinydns
+fi
+
%postun -n tinydns
if [ "$1" = "0" ]; then
/usr/sbin/userdel tinydns
%{_sbindir}/useradd -u 35 -r -d /etc/pickdns -s /bin/false -c "djbdns User" -g djbdns pickdns 1>&2
fi
+%post -n pickdns
+if diff -u /etc/{dnscache,pickdns}/env/IP >/dev/zero 2>&1;then
+ echo "Warning: dnscache and pickdns can't work on the same"
+ echo "IP address. You have to edit either /etc/dnscache/env/IP"
+ echo "or /etc/pickdns/env/IP."
+fi
+if diff -u /etc/{pick,rbl}dns/env/IP >/dev/zero 2>&1;then
+ echo "Warning: pickdns and rbldns can't work on the same"
+ echo "IP address. You have to edit either /etc/pickdns/env/IP"
+ echo "or /etc/rbldns/env/IP."
+fi
+if diff -u /etc/{pick,tiny}dns/env/IP >/dev/zero 2>&1;then
+ echo "Warning: pickdns and tinydns can't work on the same"
+ echo "IP address. You have to edit either /etc/pickdns/env/IP"
+ echo "or /etc/tinydns/env/IP."
+fi
+if diff -u /etc/{pick,wall}dns/env/IP >/dev/zero 2>&1;then
+ echo "Warning: pickdns and walldns can't work on the same"
+ echo "IP address. You have to edit either /etc/pickdns/env/IP"
+ echo "or /etc/walldns/env/IP."
+fi
+
+%preun -n pickdns
+if [ "$1" = "0" ]; then
+ svc -d /service/pickdns
+fi
+
%postun -n pickdns
if [ "$1" = "0" ]; then
/usr/sbin/userdel pickdns
%{_sbindir}/useradd -u 36 -r -d /etc/walldns -s /bin/false -c "djbdns User" -g djbdns walldns 1>&2
fi
+%post -n walldns
+if diff -u /etc/{dnscache,walldns}/env/IP >/dev/zero 2>&1;then
+ echo "Warning: dnscache and walldns can't work on the same"
+ echo "IP address. You have to edit either /etc/dnscache/env/IP"
+ echo "or /etc/walldns/env/IP."
+fi
+if diff -u /etc/{pick,wall}dns/env/IP >/dev/zero 2>&1;then
+ echo "Warning: pickdns and walldns can't work on the same"
+ echo "IP address. You have to edit either /etc/pickdns/env/IP"
+ echo "or /etc/walldns/env/IP."
+fi
+if diff -u /etc/{rbl,wall}dns/env/IP >/dev/zero 2>&1;then
+ echo "Warning: rbldns and walldns can't work on the same"
+ echo "IP address. You have to edit either /etc/rbldns/env/IP"
+ echo "or /etc/walldns/env/IP."
+fi
+if diff -u /etc/{tiny,wall}dns/env/IP >/dev/zero 2>&1;then
+ echo "Warning: tinydns and walldns can't work on the same"
+ echo "IP address. You have to edit either /etc/tinydns/env/IP"
+ echo "or /etc/walldns/env/IP."
+fi
+
+%preun -n walldns
+if [ "$1" = "0" ]; then
+ svc -d /service/walldns
+fi
+
%postun -n walldns
if [ "$1" = "0" ]; then
/usr/sbin/userdel walldns
%{_sbindir}/useradd -u 37 -r -d /etc/rbldns -s /bin/false -c "djbdns User" -g djbdns rbldns 1>&2
fi
+%post -n rbldns
+if diff -u /etc/{dnscache,rbldns}/env/IP >/dev/zero 2>&1;then
+ echo "Warning: dnscache and rbldns can't work on the same"
+ echo "IP address. You have to edit either /etc/dnscache/env/IP"
+ echo "or /etc/rbldns/env/IP."
+fi
+if diff -u /etc/{pick,rbl}dns/env/IP >/dev/zero 2>&1;then
+ echo "Warning: pickdns and rbldns can't work on the same"
+ echo "IP address. You have to edit either /etc/pickdns/env/IP"
+ echo "or /etc/rbldns/env/IP."
+fi
+if diff -u /etc/{rbl,tiny}dns/env/IP >/dev/zero 2>&1;then
+ echo "Warning: rbldns and tinydns can't work on the same"
+ echo "IP address. You have to edit either /etc/rbldns/env/IP"
+ echo "or /etc/tinydns/env/IP."
+fi
+if diff -u /etc/{rbl,wall}dns/env/IP >/dev/zero 2>&1;then
+ echo "Warning: rbldns and walldns can't work on the same"
+ echo "IP address. You have to edit either /etc/rbldns/env/IP"
+ echo "or /etc/walldns/env/IP."
+fi
+
+%preun -n rbldns
+if [ "$1" = "0" ]; then
+ svc -d /service/rbldns
+fi
+
%postun -n rbldns
if [ "$1" = "0" ]; then
/usr/sbin/userdel rbldns
%{_sbindir}/useradd -u 38 -r -d /etc/axfrdns -s /bin/false -c "djbdns User" -g djbdns axfrdns 1>&2
fi
+%preun -n axfrdns
+if [ "$1" = "0" ]; then
+ svc -d /service/axfrdns
+fi
+
%postun -n axfrdns
if [ "$1" = "0" ]; then
/usr/sbin/userdel axfrdns
%config %attr(644,root,root) %{_sysconfdir}/dnscache/root/servers/*
%ghost %attr(600,root,root) %{_sysconfdir}/dnscache/seed
%{_mandir}/man8/dnscache*
-/var/run/service/dnscache
+/service/dnscache
%files -n tinydns
%defattr(644,root,root,755)
%config %attr(644,root,root) %{_sysconfdir}/tinydns/root/data
%attr(755,root,root) %{_sysconfdir}/tinydns/root/add-*
%{_mandir}/man8/tinydns*
-/var/run/service/tinydns
+/service/tinydns
%files -n pickdns
%defattr(644,root,root,755)
%attr(644,root,root) %{_sysconfdir}/pickdns/root/Makefile
%config %attr(644,root,root) %{_sysconfdir}/pickdns/root/data
%{_mandir}/man8/pickdns*
-/var/run/service/pickdns
+/service/pickdns
%files -n walldns
%defattr(644,root,root,755)
%attr(755,root,root) %{_sysconfdir}/walldns/run
%dir %attr(2755,root,root) %{_sysconfdir}/walldns/root
%{_mandir}/man8/walldns*
-/var/run/service/walldns
+/service/walldns
%files -n rbldns
%defattr(644,root,root,755)
%attr(644,root,root) %{_sysconfdir}/rbldns/root/Makefile
%config %attr(644,root,root) %{_sysconfdir}/rbldns/root/data
%{_mandir}/man8/rbldns*
-/var/run/service/rbldns
+/service/rbldns
%files -n axfrdns
%defattr(644,root,root,755)
%attr(644,root,root) %{_sysconfdir}/axfrdns/Makefile
%config %attr(644,root,root) %{_sysconfdir}/axfrdns/tcp
%{_mandir}/man8/axfrdns*
-/var/run/service/axfrdns
+/service/axfrdns