|
|
@@ -23,19 +23,17 @@
|
|
|
## SUCH DAMAGE.
|
|
|
##
|
|
|
|
|
|
-# FIXME: mlelstv: JUNK because not well tested and no config
|
|
|
-
|
|
|
# package information
|
|
|
Name: powerdns
|
|
|
Summary: PowerDNS high performance authoritative-only name server
|
|
|
URL: http://www.powerdns.com/products/powerdns/
|
|
|
Vendor: PowerDNS.COM BV
|
|
|
Packager: The OpenPKG Project
|
|
|
-Distribution: OpenPKG [JUNK]
|
|
|
+Distribution: OpenPKG [EVAL]
|
|
|
Group: DNS
|
|
|
License: GPL
|
|
|
Version: 2.9.11
|
|
|
-Release: 20030822
|
|
|
+Release: 20031009
|
|
|
|
|
|
# package options
|
|
|
%option with_fsl yes
|
|
|
@@ -48,6 +46,7 @@ Source0: http://downloads.powerdns.com/releases/pdns-%{version}.tar.gz
|
|
|
Source1: rc.powerdns
|
|
|
Source2: fsl.powerdns
|
|
|
Source3: powerdnssetup
|
|
|
+Patch0: powerdns.patch
|
|
|
|
|
|
# build information
|
|
|
Prefix: %{l_prefix}
|
|
|
@@ -55,8 +54,8 @@ BuildRoot: %{l_buildroot}
|
|
|
BuildPreReq: OpenPKG, openpkg >= 20030718
|
|
|
PreReq: OpenPKG, openpkg >= 20030718
|
|
|
%if "%{with_fsl}" == "yes"
|
|
|
-BuildPreReq: fsl >= 1.2.0
|
|
|
-PreReq: fsl >= 1.2.0
|
|
|
+BuildPreReq: fsl >= 1.3.0
|
|
|
+PreReq: fsl >= 1.3.0
|
|
|
%endif
|
|
|
%if "%{with_mysql}" == "yes"
|
|
|
BuildPreReq: mysql
|
|
|
@@ -71,20 +70,31 @@ AutoReqProv: no
|
|
|
Conflicts: bind, bind8
|
|
|
|
|
|
%description
|
|
|
- The PowerDNS name server is a modern, advanced and high performance
|
|
|
- authoritative-only nameserver. It is written from scratch and
|
|
|
- conforms to all the relevant DNS standards documents. The PowerDNS
|
|
|
- name server utilizes a flexible backend architecture which can
|
|
|
- access DNS information from any data source. This includes file
|
|
|
- formats, Bind zone files, relational databases or LDAP directories.
|
|
|
- By connecting directly to a database, no 'reloading' is needed.
|
|
|
- Changes committed to the database are effective immediately. If you
|
|
|
- have specific needs for your DNS infrastructure then you can use the
|
|
|
- Backend Developers Kit to write the 'glue' between PowerDNS and your
|
|
|
- data or logic.
|
|
|
+ The PowerDNS name server is a modern, advanced and high
|
|
|
+ performance authoritative-only nameserver. It is written
|
|
|
+ from scratch in ISO C++ and conforms to all the relevant
|
|
|
+ DNS standards documents. The PowerDNS name server utilizes
|
|
|
+ a flexible backend architecture which can access DNS
|
|
|
+ information from any data source. This includes many file
|
|
|
+ formats, Bind zone files, or LDAP directories. PowerDNS
|
|
|
+ can connect directly to a relational database as well, and
|
|
|
+ benefit from immediate zone updates on any changes to the
|
|
|
+ database (no traditional reloading is needed). Lastly, a
|
|
|
+ Backend Developers Kit exists to negotiate between
|
|
|
+ PowerDNS and your data or logic.
|
|
|
|
|
|
%prep
|
|
|
%setup -q -n pdns-%{version}
|
|
|
+ %patch -p1
|
|
|
+ %{l_shtool} subst \
|
|
|
+ -e 's;\([^a-zA-Z0-9]\)PC\([^a-zA-Z0-9]\);\1PCa\2;g' \
|
|
|
+ pdns/packethandler.cc \
|
|
|
+ pdns/tcpreceiver.cc \
|
|
|
+ pdns/ueberbackend.cc \
|
|
|
+ pdns/dynhandler.cc \
|
|
|
+ pdns/dnsproxy.cc \
|
|
|
+ pdns/common_startup.cc \
|
|
|
+ pdns/common_startup.hh
|
|
|
|
|
|
%build
|
|
|
MODULES=""
|
|
|
@@ -101,10 +111,9 @@ Conflicts: bind, bind8
|
|
|
CC="%{l_cc}" \
|
|
|
CXX="%{l_cxx}" \
|
|
|
CFLAGS="%{l_cflags -O}" \
|
|
|
- CXXFLAGS="%{l_cxxflags -O} -DDLLIMPORT=" \
|
|
|
- CPPFLAGS="%{l_cppflags} -DDLLIMPORT=" \
|
|
|
- LDFLAGS="%{l_ldflags} %{l_fsl_ldflags}"
|
|
|
- LIBS="%{l_fsl_libs}"
|
|
|
+ CXXFLAGS="%{l_cxxflags -O}" \
|
|
|
+ CPPFLAGS="%{l_cppflags}" \
|
|
|
+ LDFLAGS="%{l_fsl_ldflags}" \
|
|
|
./configure \
|
|
|
--prefix=%{l_prefix} \
|
|
|
--sysconfdir=%{l_prefix}/etc/powerdns \
|
|
|
@@ -125,13 +134,14 @@ Conflicts: bind, bind8
|
|
|
--with-modules="$MODULES" \
|
|
|
--with-dynmodules="" \
|
|
|
--disable-shared
|
|
|
- %{l_make} %{l_mflags -O} \
|
|
|
- CXXFLAGS="%{l_cxxflags -O} -DDLLIMPORT= -DHAVE_NAMESPACE_STD" \
|
|
|
- CPPFLAGS="%{l_cppflags} -DDLLIMPORT= -DHAVE_NAMESPACE_STD"
|
|
|
+ %{l_make} %{l_mflags -O} LDADD="%{l_fsl_libs}"
|
|
|
|
|
|
%install
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
+ %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/var/powerdns
|
|
|
%{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
|
|
|
+ strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
|
|
|
+ strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* >/dev/null 2>&1 || true
|
|
|
|
|
|
# clean up installation
|
|
|
rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib
|
|
|
@@ -142,15 +152,24 @@ Conflicts: bind, bind8
|
|
|
%{l_shtool} subst %{l_value -s -a} \
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/etc/powerdns/pdns.conf
|
|
|
|
|
|
+ # provide some reasonable default configuration values
|
|
|
+ %{l_shtool} subst \
|
|
|
+ -e 's;# \(daemon=\)no;\1yes;' \
|
|
|
+ -e 's;# \(launch=\);\1bind;' \
|
|
|
+ -e 's;# \(local-address=\)0.0.0.0;\1127.0.0.1;' \
|
|
|
+ -e 's;# \(logfile=\)pdns.log;\1%{l_prefix}/var/powerdns/pdns.log;' \
|
|
|
+ -e 's;# \(setgid=\);\1%{l_mgid};' \
|
|
|
+ -e 's;# \(setuid=\);\1%{l_muid};' \
|
|
|
+ -e 's;# \(socket-dir=\)/var/run;\1%{l_prefix}/var/powerdns;' \
|
|
|
+ -e 's;# \(use-logfile=\)no;\1yes;' \
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/etc/powerdns/pdns.conf
|
|
|
+
|
|
|
# install run-command script
|
|
|
- %{l_shtool} mkdir -f -p -m 755 \
|
|
|
- $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
|
|
|
+ %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
|
|
|
%{l_shtool} install -c -m 755 %{l_value -s -a} \
|
|
|
%{SOURCE rc.powerdns} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
|
|
|
|
|
|
# install setup script
|
|
|
- %{l_shtool} mkdir -p -m 755 \
|
|
|
- $RPM_BUILD_ROOT%{l_prefix}/sbin
|
|
|
%{l_shtool} install -c -m 755 \
|
|
|
%{SOURCE powerdnssetup} $RPM_BUILD_ROOT%{l_prefix}/sbin/
|
|
|
|
|
|
@@ -159,18 +178,14 @@ Conflicts: bind, bind8
|
|
|
%{l_shtool} install -c -m 644 %{l_value -s -a} \
|
|
|
%{SOURCE fsl.powerdns} \
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/etc/fsl/
|
|
|
- %{l_shtool} mkdir -f -p -m 755 \
|
|
|
- $RPM_BUILD_ROOT%{l_prefix}/var/powerdns
|
|
|
-
|
|
|
- strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
|
|
|
- strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* >/dev/null 2>&1 || true
|
|
|
|
|
|
# determine installation files
|
|
|
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
|
|
|
%{l_files_std} \
|
|
|
'%not %dir %{l_prefix}/etc/fsl' \
|
|
|
- '%attr(775,%{l_musr},%{l_rgrp}) %{l_prefix}/var/powerdns' \
|
|
|
'%config %{l_prefix}/etc/fsl/fsl.powerdns' \
|
|
|
+ '%dir %attr(0775,%{l_susr},%{l_mgrp}) %{l_prefix}/var/powerdns' \
|
|
|
+ '%dir %attr(0700,%{l_susr},%{l_mgrp}) %{l_prefix}/etc/powerdns' \
|
|
|
'%config %attr(0600,%{l_susr},%{l_mgrp}) %{l_prefix}/etc/powerdns/*'
|
|
|
|
|
|
%files -f files
|
|
|
@@ -178,3 +193,17 @@ Conflicts: bind, bind8
|
|
|
%clean
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
+%post
|
|
|
+ # after upgrade, restart service
|
|
|
+ [ $1 -eq 2 ] || exit 0
|
|
|
+ eval `%{l_rc} powerdns status 2>/dev/null`
|
|
|
+ [ ".$powerdns_active" = .yes ] && %{l_rc} powerdns restart
|
|
|
+ exit 0
|
|
|
+
|
|
|
+%preun
|
|
|
+ # before erase, stop service and remove log files
|
|
|
+ [ $1 -eq 0 ] || exit 0
|
|
|
+ %{l_rc} powerdns stop 2>/dev/null
|
|
|
+ rm -f $RPM_INSTALL_PREFIX/var/powerdns/*.log* >/dev/null 2>&1 || true
|
|
|
+ exit 0
|
|
|
+
|