]> git.ipfire.org Git - ipfire-3.x.git/commitdiff
Sanitize pdns and pdns-recursor package.
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 20 Oct 2012 10:05:23 +0000 (10:05 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 20 Oct 2012 10:05:23 +0000 (10:05 +0000)
pdns-recursor/pdns-recursor.nm
pdns-recursor/recursor.conf
pdns-recursor/systemd/pdns-recursor.service
pdns/pdns.conf
pdns/pdns.nm
pdns/systemd/pdns.service

index a044e997fa5d1a19840176456bbacceb098f9375..aa22152d539ffaff3aee88284ece3e143d2fae0f 100644 (file)
@@ -5,7 +5,7 @@
 
 name       = pdns-recursor
 version    = 3.3
-release    = 7
+release    = 8
 
 groups     = Networking/DNS
 url        = http://powerdns.com/
@@ -39,16 +39,17 @@ build
 
        install
                make install DESTDIR=%{BUILDROOT} \
-                       CONFIGDIR=/etc/%{name}
+                       CONFIGDIR="%{sysconfdir}/pdns"
 
                # Remove sysvinit file
                rm -rf %{BUILDROOT}/etc/init.d
 
                # Remove shipped config file
-               rm -rf %{BUILDROOT}/etc/%{name}/recursor.conf-dist
+               rm -rf %{BUILDROOT}%{sysconfdir}/pdns/recursor.conf-dist
 
                # Install our default config file
-               cp -vf %{DIR_SOURCE}/recursor.conf %{BUILDROOT}/etc/%{name}/recursor.conf
+               cp -vf %{DIR_SOURCE}/recursor.conf \
+                       %{BUILDROOT}%{sysconfdir}/pdns/recursor.conf
 
                # Create folder for chroot
                mkdir -pv %{BUILDROOT}/var/lib/pdns-recursor
@@ -69,7 +70,7 @@ end
 packages
        package %{name}
                configfiles
-                       /etc/%{name}/recursor.conf
+                       %{sysconfdir}/pdns/recursor.conf
                end
 
                prerequires
index 7ecc30b652b95a1264c8ad12901d360ea517387b..284da990d60b865cd0b66b5c7e516fa66f9a63bc 100644 (file)
@@ -1,7 +1,13 @@
+###############################################################################
+# IPFire.org    - An Open Source Firewall Solution                            #
+# Copyright (C) - IPFire Development Team <info@ipfire.org>                   #
+###############################################################################
 
-# XXX IPv6 listen on :: cannot be created. Says Address is already in use.
-local-address=0.0.0.0 ::1
+# Listen settings
+local-address=::1
+local-port=54
 
+# Socket settings
 socket-dir=/run/pdns-recursor
 socket-group=pdns-recursor
 socket-owner=pdns-recursor
index f0aa1abce1d292598cdf20b6e87bd109a7389190..0d3c99a351237bc149fd79d6490fc700ec8e6cb3 100644 (file)
@@ -1,12 +1,12 @@
 [Unit]
-Description=Power DNS Recursor
+Description=Power DNS Recursor Daemon
 After=network.target
 
 [Service]
 ExecStart=/usr/sbin/pdns_recursor --daemon=no
 ExecStopPost=/bin/rm -f /run/pdns-recursor/pdns_recursor.pid
 ExecStopPost=/bin/rm -f /run/pdns-recursor/pdns_recursor.controlsocket
-Restart=always
+Restart=on-failure
 
 [Install]
 WantedBy=multi-user.target
index 82b67c1aea464b593983452e9cf3e251073aee26..0630ed543aa4b82a2b36e0f9e0568795e3a1fe97 100644 (file)
@@ -1,30 +1,14 @@
 ###############################################################################
-##                                                                             #
-## IPFire.org - A linux based firewall                                         #
-## Copyright (C) 2012  IPFire Development Team                                 #
-##                                                                             #
-## This program is free software: you can redistribute it and/or modify        #
-## it under the terms of the GNU General Public License as published by        #
-## the Free Software Foundation, either version 3 of the License, or           #
-## (at your option) any later version.                                         #
-##                                                                             #
-## This program is distributed in the hope that it will be useful,             #
-## but WITHOUT ANY WARRANTY; without even the implied warranty of              #
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
-## GNU General Public License for more details.                                #
-##                                                                             #
-## You should have received a copy of the GNU General Public License           #
-## along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
-##                                                                             #
-################################################################################
-#
-## These file contains the default configuration for the PowerDNS service.
-#
-# An example configuration file with all provided options can be found on 
-# /etc/pdns/pdns.conf-dist.
-#
-daemon=no
-socket-dir=/run/pdns/
+# IPFire.org    - An Open Source Firewall Solution                            #
+# Copyright (C) - IPFire Development Team <info@ipfire.org>                   #
+###############################################################################
+# This file contains the default configuration for the PowerDNS service.
+socket-dir=/run/pdns
+
+# Listing settings.
+# XXX IPv6 listen on :: cannot be created. Says Address is already in use.
+local-address=0.0.0.0
+local-ipv6=::1
 
 # Run powerdns as the following user and group.
 setuid=pdns
@@ -35,5 +19,6 @@ launch=gsqlite3
 #launch=gsqlite3-dnssec
 gsqlite3-database=/var/lib/pdns/pdns.db
 
-# Enable if you also have installed the pdns-recursor.
-#recursor=127.0.0.1:54
+# All queries that could not be answered by ourself get sent to
+# the local recursor.
+recursor=[::1]:54
index 939e980d32856c3b5b77b75b3c1ba46ea8f178ab..7ff4f77e6e026e0f7b3663b51bc1339ec66be190 100644 (file)
@@ -5,7 +5,7 @@
 
 name       = pdns
 version    = 3.1
-release    = 2
+release    = 3
 
 groups     = Networking/DNS
 url        = http://powerdns.com/
@@ -59,6 +59,7 @@ build
                # Install default configuration.
                install -m 0644 %{DIR_SOURCE}/pdns.conf \
                        %{BUILDROOT}%{sysconfdir}/pdns/pdns.conf
+               rm -vf %{BUILDROOT}%{sysconfdir}/pdns/pdns.conf-dist
 
                # Create empty database file.
                touch %{BUILDROOT}%{sharedstatedir}/pdns/pdns.db
@@ -94,9 +95,13 @@ packages
                        shadow-utils
                        sqlite
                end
+
+               requires
+                       pdns-recursor >= 3.3-8
+               end
  
                configfiles
-                       /etc/pdns/pdns.conf
+                       %{sysconfdir}/pdns/pdns.conf
                end
 
                script prein
index d9877ad7ccb84037c74d0f834adbbdd453a43329..daad29df8b41c56e2d0edc8a6fe3462b025f6d8c 100644 (file)
@@ -1,12 +1,12 @@
 [Unit]
-Description=PDNS DNS Server
-After=syslog.target network.target
+Description=PowerDNS DNS Server Daemon
+After=syslog.target
 
 [Service]
-Type=forking
-ExecStart=/usr/sbin/pdns_server --daemon --guardian=yes
+ExecStart=/usr/sbin/pdns_server --daemon=no
 ExecReload=/usr/bin/pdns_control cycle
 ExecStop=/usr/bin/pdns_control quit
+Restart=on-failure
 
 [Install]
 WantedBy=multi-user.target