From 15f988f43fe39afb02253a9e6fdf6dbea18dc70a Mon Sep 17 00:00:00 2001 From: Morten Stevens Date: Oct 26 2012 17:22:09 +0000 Subject: Update to latest upstream release 3.1 --- diff --git a/pdns-default-config.patch b/pdns-default-config.patch index 8025627..c26fe2c 100644 --- a/pdns-default-config.patch +++ b/pdns-default-config.patch @@ -1,5 +1,5 @@ ---- pdns-2.9.22.6/pdns/pdns.conf-dist.orig 2012-01-16 09:30:30.000000000 +0100 -+++ pdns-2.9.22.6/pdns/pdns.conf-dist 2012-10-20 16:49:35.282964083 +0200 +--- pdns-3.1/pdns/pdns.conf-dist.orig 2012-05-04 12:13:23.000000000 +0200 ++++ pdns-3.1/pdns/pdns.conf-dist 2012-10-18 23:07:42.614876259 +0200 @@ -1,3 +1,6 @@ +setuid=pdns +setgid=pdns diff --git a/pdns-fix-crash-on-sigstop.patch b/pdns-fix-crash-on-sigstop.patch deleted file mode 100644 index 56e543d..0000000 --- a/pdns-fix-crash-on-sigstop.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -ur pdns-2.9.22.orig/pdns/unix_semaphore.cc pdns-2.9.22/pdns/unix_semaphore.cc ---- pdns-2.9.22.orig/pdns/unix_semaphore.cc 2010-12-14 17:18:02.667000233 +0100 -+++ pdns-2.9.22/pdns/unix_semaphore.cc 2010-12-14 17:18:08.138000485 +0100 -@@ -156,7 +156,11 @@ - - int Semaphore::wait() - { -- return sem_wait(m_pSemaphore); -+ int ret; -+ do -+ ret = sem_wait(m_pSemaphore); -+ while (ret == -1 && errno == EINTR); -+ return ret; - } - int Semaphore::tryWait() - { diff --git a/pdns-fix-postgres-detection.patch b/pdns-fix-postgres-detection.patch deleted file mode 100644 index 3c8cc45..0000000 --- a/pdns-fix-postgres-detection.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff --git a/configure b/configure -index 60df456..8bf578d 100755 ---- a/configure -+++ b/configure -@@ -16644,7 +16644,7 @@ if test "${with_pgsql+set}" = set; then : - withval=$with_pgsql; PGSQL_lib_check="$withval/lib/pgsql $with_pgsql/lib" - PGSQL_inc_check="$withval/include/pgsql" - else -- PGSQL_lib_check="/usr/local/pgsql/lib/pgsql /usr/local/lib/pgsql /opt/pgsql/lib/pgsql /usr/lib/pgsql /usr/local/pgsql/lib /usr/local/lib /opt/pgsql/lib /usr/lib" -+ PGSQL_lib_check="/usr/local/pgsql/lib/pgsql /usr/local/lib/pgsql /opt/pgsql/lib/pgsql /usr/lib/pgsql /usr/local/pgsql/lib /usr/local/lib /opt/pgsql/lib /usr/lib /usr/lib64" - PGSQL_inc_check="/usr/local/pgsql/include/pgsql /usr/include /usr/local/include/postgresql/ /usr/local/include /opt/pgsql/include/pgsql /opt/pgsql/include /usr/include/pgsql/ /usr/include/postgresql" - fi - -@@ -16664,8 +16664,7 @@ fi - $as_echo_n "checking for PgSQL library directory... " >&6; } - PGSQL_libdir= - for m in $PGSQL_lib_check; do -- if test -d "$m" && \ -- (test -f "$m/libpq.a" || test -f "$m/libpq++.a") -+ if test -d "$m" && test -f "$m/libpq.so" - then - PGSQL_libdir=$m - break diff --git a/pdns-fixinit.patch b/pdns-fixinit.patch index 93ee93f..10ce827 100644 --- a/pdns-fixinit.patch +++ b/pdns-fixinit.patch @@ -1,7 +1,15 @@ -diff -up pdns-2.9.22-rc2/pdns/pdns.in.fixinit pdns-2.9.22-rc2/pdns/pdns.in ---- pdns-2.9.22-rc2/pdns/pdns.in.fixinit 2008-02-03 13:14:00.000000000 +0100 -+++ pdns-2.9.22-rc2/pdns/pdns.in 2008-12-03 04:07:26.000000000 +0100 -@@ -47,6 +47,7 @@ case "$1" in +--- pdns-3.1/pdns/pdns.in.orig 2012-05-04 12:13:23.000000000 +0200 ++++ pdns-3.1/pdns/pdns.in 2012-10-26 17:25:09.000000000 +0200 +@@ -8,7 +8,7 @@ + # Required-Stop: $remote_fs $network $syslog + # Should-Start: $all + # Should-Stop: $all +-# Default-Start: 2 3 4 5 ++# Default-Start: + # Default-Stop: 0 1 6 + # Short-Description: Start/stop PowerDNS authoritative server + # Description: Start/stop PowerDNS authoritative server +@@ -62,6 +62,7 @@ case "$1" in if test "$NOTRUNNING" = "0" then doPC quit @@ -9,7 +17,7 @@ diff -up pdns-2.9.22-rc2/pdns/pdns.in.fixinit pdns-2.9.22-rc2/pdns/pdns.in echo $ret else echo "not running" -@@ -57,6 +58,7 @@ case "$1" in +@@ -72,6 +73,7 @@ case "$1" in force-stop) echo -n "Stopping PowerDNS authoritative nameserver: " killall -v -9 pdns_server @@ -17,11 +25,35 @@ diff -up pdns-2.9.22-rc2/pdns/pdns.in.fixinit pdns-2.9.22-rc2/pdns/pdns.in echo "killed" ;; -@@ -69,6 +71,7 @@ case "$1" in - $pdns_server --daemon --guardian=yes - if test "$?" = "0" +@@ -83,11 +85,22 @@ case "$1" in + else + if $pdns_server --daemon --guardian=yes then + touch /var/lock/subsys/pdns echo "started" fi fi + ;; + ++ condrestart) ++ if [ -f /var/lock/subsys/pdns ]; ++ then ++ echo "running, restarting" ++ $0 restart ++ else ++ echo "not running" ++ fi ++ ;; ++ + force-reload | restart) + echo -n "Restarting PowerDNS authoritative nameserver: " + if test "$NOTRUNNING" = "1" +@@ -190,7 +203,7 @@ case "$1" in + + + *) +- echo pdns [start\|stop\|force-reload\|reload\|restart\|status\|dump\|show\|mrtg\|cricket\|monitor] ++ echo pdns [start\|stop\|condrestart\|force-reload\|reload\|restart\|status\|dump\|show\|mrtg\|cricket\|monitor] + + ;; + esac diff --git a/pdns-gcc44.patch b/pdns-gcc44.patch deleted file mode 100644 index cba5412..0000000 --- a/pdns-gcc44.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up pdns-2.9.22/pdns/misc.hh.orig pdns-2.9.22/pdns/misc.hh ---- pdns-2.9.22/pdns/misc.hh.orig 2009-02-26 17:09:41.000000000 +0100 -+++ pdns-2.9.22/pdns/misc.hh 2009-02-26 17:09:54.000000000 +0100 -@@ -20,6 +20,7 @@ - #define MISC_HH - #include - #include -+#include - - #if 0 - #include diff --git a/pdns.spec b/pdns.spec index fd38bf8..f17fc36 100644 --- a/pdns.spec +++ b/pdns.spec @@ -1,7 +1,9 @@ +%global backends %{nil} + Summary: A modern, advanced and high performance authoritative-only nameserver Name: pdns -Version: 2.9.22.6 -Release: 2%{?dist} +Version: 3.1 +Release: 1%{?dist} License: GPLv2 Group: System Environment/Daemons URL: http://powerdns.com @@ -11,15 +13,16 @@ Source0: http://downloads.powerdns.com/releases/%{name}-%{version}.tar.gz Patch0: pdns-default-config.patch Patch1: pdns-fixinit.patch -Patch2: pdns-fix-postgres-detection.patch -Patch3: pdns-fix-crash-on-sigstop.patch Requires(post): %{_sbindir}/useradd, /sbin/chkconfig Requires(preun): /sbin/service, /sbin/chkconfig +Requires(postun): /sbin/service BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: boost-devel BuildRequires: chrpath +BuildRequires: boost-devel +BuildRequires: lua-devel +BuildRequires: cryptopp-devel Provides: powerdns = %{version}-%{release} %description @@ -31,36 +34,42 @@ Furthermore, PowerDNS interfaces with almost any database. %package backend-mysql Summary: MySQL backend for %{name} Group: System Environment/Daemons -Requires: %{name} = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} BuildRequires: mysql-devel +%global backends %{backends} gmysql %package backend-postgresql Summary: PostgreSQL backend for %{name} Group: System Environment/Daemons -Requires: %{name} = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} BuildRequires: postgresql-devel +%global backends %{backends} gpgsql %package backend-pipe Summary: Pipe backend for %{name} Group: System Environment/Daemons -Requires: %{name} = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} +%global backends %{backends} pipe %package backend-geo Summary: Geo backend for %{name} Group: System Environment/Daemons -Requires: %{name} = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} +%global backends %{backends} geo %package backend-ldap Summary: LDAP backend for %{name} Group: System Environment/Daemons -Requires: %{name} = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} BuildRequires: openldap-devel +%global backends %{backends} ldap %package backend-sqlite Summary: SQLite backend for %{name} Group: System Environment/Daemons -Requires: %{name} = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} BuildRequires: sqlite-devel +%global backends %{backends} gsqlite3 %description backend-mysql This package contains the gmysql backend for %{name} @@ -87,8 +96,6 @@ This package contains the SQLite backend for %{name} %setup -q %patch0 -p1 -b .default-config-patch %patch1 -p1 -b .fixinit -%patch2 -p1 -b .postgres -%patch3 -p1 -b .sigstop %build export CPPFLAGS="-DLDAP_DEPRECATED %{optflags}" @@ -98,14 +105,16 @@ export CPPFLAGS="-DLDAP_DEPRECATED %{optflags}" --libdir=%{_libdir}/%{name} \ --disable-static \ --with-modules='' \ - --with-dynmodules='pipe gmysql gpgsql geo ldap gsqlite3' \ - --with-mysql-lib=%{_libdir}/mysql \ - --with-sqlite3-lib=%{_libdir} + --with-lua \ + --with-dynmodules='%{backends}' \ + --enable-cryptopp + +sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool +sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool make %{?_smp_mflags} %install -%{__rm} -rf %{buildroot} make install DESTDIR=%{buildroot} %{__rm} -f %{buildroot}%{_libdir}/%{name}/*.la @@ -129,19 +138,27 @@ if [ $1 -eq 1 ]; then %{_sbindir}/useradd -c "PowerDNS user" -s /sbin/nologin -r -d / pdns > /dev/null || : fi fi + %preun if [ $1 -eq 0 ]; then /sbin/service pdns stop >/dev/null 2>&1 || : /sbin/chkconfig --del pdns fi +%postun +if [ $1 -ge 1 ]; then + /sbin/service pdns condrestart >/dev/null 2>&1 || : +fi + %clean %{__rm} -rf %{buildroot} %files %defattr(-,root,root,-) -%doc ChangeLog TODO pdns/COPYING +%doc COPYING README +%{_bindir}/dnsreplay %{_bindir}/pdns_control +%{_bindir}/pdnssec %{_bindir}/zone2ldap %{_bindir}/zone2sql %{_sbindir}/pdns_server @@ -155,36 +172,37 @@ fi %files backend-mysql %defattr(-,root,root,-) -%doc pdns/COPYING %{_libdir}/%{name}/libgmysqlbackend.so %files backend-postgresql %defattr(-,root,root,-) -%doc pdns/COPYING %{_libdir}/%{name}/libgpgsqlbackend.so %files backend-pipe %defattr(-,root,root,-) -%doc pdns/COPYING %{_libdir}/%{name}/libpipebackend.so %files backend-geo %defattr(-,root,root,-) -%doc pdns/COPYING modules/geobackend/README +%doc modules/geobackend/README %{_libdir}/%{name}/libgeobackend.so %files backend-ldap %defattr(-,root,root,-) -%doc pdns/COPYING %{_libdir}/%{name}/libldapbackend.so %files backend-sqlite %defattr(-,root,root,-) -%doc pdns/COPYING %{_libdir}/%{name}/libgsqlite3backend.so %changelog +* Fri Oct 26 2012 Morten Stevens - 3.1-1 +- Update to latest upstream release 3.1 +- DNSSEC improvements +- several bugs fixed since 2.9.22 +- Added condrestart option + * Sat Oct 20 2012 Morten Stevens - 2.9.22.6-2 - Fixed permissions of pdns.conf file (rhbz#646510) - Set bind as default backend diff --git a/sources b/sources index cb6bc9d..e5b69e7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ff97ba980b322adb61c3e9c9e9c4adef pdns-2.9.22.6.tar.gz +7dedae65403b31a795b2d53a512947fd pdns-3.1.tar.gz