Sanitize pdns and pdns-recursor package.

This commit is contained in:
Michael Tremer 2012-10-20 10:05:23 +00:00
parent 64066d987a
commit 3078b82b80
6 changed files with 40 additions and 43 deletions

View 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

View 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

View 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

View 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

View 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

View 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