]> git.pld-linux.org Git - packages/djbdns.git/blobdiff - djbdns.spec
- when any of dnscache, pickdns, rbldns, tinydns, walldns have same IP
[packages/djbdns.git] / djbdns.spec
index 90d1581e8136e249a43f506233d8038911957271..abddeec2dfb103b6e81a89563e9289ff1941acf9 100644 (file)
@@ -2,8 +2,8 @@ Summary:        DJB DNS
 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
@@ -12,6 +12,8 @@ Source1:      %{name}-doc.tar.gz
 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)
@@ -70,7 +72,7 @@ Group:                Networking/Daemons
 Group(de):     Netzwerkwesen/Server
 Group(pl):     Sieciowe/Serwery
 Requires:      %{name} = %{version}
-Requires:      daemontools
+Requires:      daemontools >= 0.70-5
 Prereq:                fileutils
 Prereq:                shadow
 
@@ -102,7 +104,7 @@ Group:              Networking/Daemons
 Group(de):     Netzwerkwesen/Server
 Group(pl):     Sieciowe/Serwery
 Requires:      %{name} = %{version}
-Requires:      daemontools
+Requires:      daemontools >= 0.70-5
 Requires:      make
 Prereq:                shadow
 
@@ -129,7 +131,7 @@ Group:              Networking/Daemons
 Group(de):     Netzwerkwesen/Server
 Group(pl):     Sieciowe/Serwery
 Requires:      %{name} = %{version}
-Requires:      daemontools
+Requires:      daemontools >= 0.70-5
 Requires:      make
 Prereq:                shadow
 
@@ -159,7 +161,7 @@ Group:              Networking/Daemons
 Group(de):     Netzwerkwesen/Server
 Group(pl):     Sieciowe/Serwery
 Requires:      %{name} = %{version}
-Requires:      daemontools
+Requires:      daemontools >= 0.70-5
 Prereq:                shadow
 
 %description -n walldns
@@ -188,7 +190,7 @@ Group:              Networking/Daemons
 Group(de):     Netzwerkwesen/Server
 Group(pl):     Sieciowe/Serwery
 Requires:      %{name} = %{version}
-Requires:      daemontools
+Requires:      daemontools >= 0.70-5
 Requires:      make
 Prereq:                shadow
 
@@ -220,7 +222,7 @@ Group(de):  Netzwerkwesen/Server
 Group(pl):     Sieciowe/Serwery
 Requires:      %{name} = %{version}
 Requires:      tinydns = %{version}
-Requires:      daemontools
+Requires:      daemontools >= 0.70-5
 Requires:      ucspi-tcp
 Requires:      make
 Prereq:                shadow
@@ -247,6 +249,7 @@ informacji.
 
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 cd doc
 ln -s merge/djbdns/* .
 
@@ -487,14 +490,14 @@ cat>tcp<<___
 ___
 
 ##### 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
@@ -531,6 +534,33 @@ else
 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
@@ -546,6 +576,33 @@ else
        %{_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
@@ -561,6 +618,33 @@ else
        %{_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
@@ -576,6 +660,33 @@ else
        %{_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
@@ -591,6 +702,33 @@ else
        %{_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
@@ -606,6 +744,11 @@ else
        %{_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
@@ -641,7 +784,7 @@ rm -rf $RPM_BUILD_ROOT
 %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)
@@ -659,7 +802,7 @@ rm -rf $RPM_BUILD_ROOT
 %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)
@@ -676,7 +819,7 @@ rm -rf $RPM_BUILD_ROOT
 %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)
@@ -691,7 +834,7 @@ rm -rf $RPM_BUILD_ROOT
 %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)
@@ -708,7 +851,7 @@ rm -rf $RPM_BUILD_ROOT
 %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)
@@ -724,4 +867,4 @@ rm -rf $RPM_BUILD_ROOT
 %attr(644,root,root) %{_sysconfdir}/axfrdns/Makefile
 %config %attr(644,root,root) %{_sysconfdir}/axfrdns/tcp
 %{_mandir}/man8/axfrdns*
-/var/run/service/axfrdns
+/service/axfrdns
This page took 0.137846 seconds and 4 git commands to generate.