[arch-commits] Commit in powerdns/repos (8 files)

Levente Polyak anthraxx at archlinux.org
Thu Jan 19 19:04:46 UTC 2017


    Date: Thursday, January 19, 2017 @ 19:04:45
  Author: anthraxx
Revision: 208051

archrelease: copy trunk to community-i686, community-x86_64

Added:
  powerdns/repos/community-i686/PKGBUILD
    (from rev 208050, powerdns/trunk/PKGBUILD)
  powerdns/repos/community-i686/fix-4.0.3-tests.patch
    (from rev 208050, powerdns/trunk/fix-4.0.3-tests.patch)
  powerdns/repos/community-x86_64/PKGBUILD
    (from rev 208050, powerdns/trunk/PKGBUILD)
  powerdns/repos/community-x86_64/fix-4.0.3-tests.patch
    (from rev 208050, powerdns/trunk/fix-4.0.3-tests.patch)
Deleted:
  powerdns/repos/community-i686/PKGBUILD
  powerdns/repos/community-i686/powerdns.install
  powerdns/repos/community-x86_64/PKGBUILD
  powerdns/repos/community-x86_64/powerdns.install

----------------------------------------+
 /PKGBUILD                              |  194 +++++++++++++++++++++++++++++++
 community-i686/PKGBUILD                |   95 ---------------
 community-i686/fix-4.0.3-tests.patch   |  100 +++++++++++++++
 community-i686/powerdns.install        |   10 -
 community-x86_64/PKGBUILD              |   95 ---------------
 community-x86_64/fix-4.0.3-tests.patch |  100 +++++++++++++++
 community-x86_64/powerdns.install      |   10 -
 7 files changed, 394 insertions(+), 210 deletions(-)

Deleted: community-i686/PKGBUILD
===================================================================
--- community-i686/PKGBUILD	2017-01-19 19:02:07 UTC (rev 208050)
+++ community-i686/PKGBUILD	2017-01-19 19:04:45 UTC (rev 208051)
@@ -1,95 +0,0 @@
-# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
-# Contributor: Alexander Rødseth <rodseth at gmail.com>
-# Contributor: Jan de Groot <jgc at archlinux.org>
-# Contributor: Kevin Mihelich <kevin at archlinuxarm.org>
-# Contributor: Remi Gacogne <rgacogne[at]archlinux[dot]org>
-
-pkgname=powerdns
-pkgver=4.0.1
-pkgrel=7
-pkgdesc='Authoritative DNS server'
-url='http://www.powerdns.com/'
-arch=('i686' 'x86_64')
-license=('GPL2')
-depends=('boost-libs' 'libsodium' 'systemd' 'lua' 'openssl' 'protobuf' 'sqlite')
-makedepends=('boost' 'setconf' 'libmariadbclient' 'postgresql-libs' 'lua' 'libldap'
-             'sqlite' 'geoip' 'yaml-cpp' 'pkg-config')
-optdepends=('libmariadbclient: MariaDB/MySQL backend'
-            'postgresql-libs: PostgreSQL backend'
-            'libldap: LDAP backend'
-            'geoip: GeoIP backend'
-            'yaml-cpp: GeoIP backend')
-provides=('pdns')
-conflicts=('pdns')
-backup=('etc/powerdns/pdns.conf')
-install=powerdns.install
-source=(https://downloads.powerdns.com/releases/pdns-${pkgver}.tar.bz2{,.asc})
-sha512sums=('77fce9963a05198afeb569f92fbb0f6a1cb3426c28dd77b0921128189c80d9a72ebdbfc249dfc0b5b89cc7a65a83887a0388d6cc3461453b1e3096e563afdd1e'
-            'SKIP')
-validpgpkeys=('B76CD4671C0968BAA87DE61C5E50715BF2FFE1A7') # Pieter Lexis <pieter.lexis at powerdns.com>
-
-prepare() {
-  cd pdns-${pkgver}
-
-  # Default settings
-  for keyvalue in \
-    allow-recursion=127.0.0.1 \
-    chroot=/var/empty \
-    config-dir=/etc/powerdns \
-    daemon=no \
-    distributor-threads=3 \
-    guardian=no \
-    local-port=53 \
-    loglevel=3 \
-    module-dir=/usr/lib/powerdns \
-    setgid=nobody \
-    setuid=nobody \
-    socket-dir=/var/run \
-    webserver=no
-  do
-    setconf -a pdns.conf "${keyvalue}"
-  done
-
-  # Using simple so we can bind it to a chroot
-  sed 's|notify|simple|' -i pdns/pdns.service.in
-}
-
-build() {
-  cd pdns-${pkgver}
-  ./configure \
-    --prefix=/usr \
-    --sysconfdir=/etc/powerdns \
-    --libexecdir=/usr/lib \
-    --libdir=/usr/lib \
-    --mandir=/usr/share/man \
-    --with-modules='' \
-    --with-dynmodules="bind gmysql geoip gpgsql gsqlite3 ldap lua pipe random remote" \
-    --docdir=/usr/share/doc/powerdns \
-    --sbindir=/usr/bin \
-    --bindir=/usr/bin \
-    --with-sqlite3 \
-    --enable-libsodium \
-    --enable-tools \
-    --disable-dependency-tracking \
-    --disable-silent-rules \
-    --enable-reproducible \
-    --enable-unit-tests \
-    --enable-systemd
-  make
-}
-
-check() {
-  make -C pdns-${pkgver} check
-}
-
-package() {
-  cd pdns-${pkgver}
-  make DESTDIR="${pkgdir}" install
-  # apply defaults to generated pdns.conf
-  mv "${pkgdir}/etc/powerdns/pdns.conf"{-dist,}
-  cat pdns.conf >> "${pkgdir}/etc/powerdns/pdns.conf"
-  # adjust modules dir to match pkgname
-  mv "${pkgdir}/usr/lib/"{pdns,powerdns}
-}
-
-# vim: ts=2 sw=2 et:

Copied: powerdns/repos/community-i686/PKGBUILD (from rev 208050, powerdns/trunk/PKGBUILD)
===================================================================
--- community-i686/PKGBUILD	                        (rev 0)
+++ community-i686/PKGBUILD	2017-01-19 19:04:45 UTC (rev 208051)
@@ -0,0 +1,97 @@
+# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
+# Contributor: Alexander Rødseth <rodseth at gmail.com>
+# Contributor: Jan de Groot <jgc at archlinux.org>
+# Contributor: Kevin Mihelich <kevin at archlinuxarm.org>
+# Contributor: Remi Gacogne <rgacogne[at]archlinux[dot]org>
+
+pkgname=powerdns
+pkgver=4.0.3
+pkgrel=1
+pkgdesc='Authoritative DNS server'
+url='http://www.powerdns.com/'
+arch=('i686' 'x86_64')
+license=('GPL2')
+depends=('boost-libs' 'libsodium' 'systemd' 'lua' 'openssl' 'protobuf' 'sqlite')
+makedepends=('boost' 'setconf' 'libmariadbclient' 'postgresql-libs' 'lua' 'libldap'
+             'sqlite' 'geoip' 'yaml-cpp' 'pkg-config')
+optdepends=('libmariadbclient: MariaDB/MySQL backend'
+            'postgresql-libs: PostgreSQL backend'
+            'libldap: LDAP backend'
+            'geoip: GeoIP backend'
+            'yaml-cpp: GeoIP backend')
+provides=('pdns')
+conflicts=('pdns')
+backup=('etc/powerdns/pdns.conf')
+source=(https://downloads.powerdns.com/releases/pdns-${pkgver}.tar.bz2{,.asc}
+        fix-${pkgver}-tests.patch)
+sha512sums=('58d33ac6cf457a916bae6abd8d2dc17f76fbcd1bd9e649948584dd669f5596b43e3e4d91841700ea1ea2cd1ac102749e503cd9075273540f33a2321e20d8bfc2'
+            'SKIP'
+            '9f6b3d794495c21280f1077b644dd6ecc10112823806c9a4db9b0819445e6450eb1a874c95199e918b7a1ad09e83192cc09d3ecf02d11b7da7488e6e03c3810a')
+validpgpkeys=('B76CD4671C0968BAA87DE61C5E50715BF2FFE1A7') # Pieter Lexis <pieter.lexis at powerdns.com>
+
+prepare() {
+  cd pdns-${pkgver}
+  patch -p1 < "${srcdir}/fix-${pkgver}-tests.patch"
+
+  # Default settings
+  for keyvalue in \
+    allow-recursion=127.0.0.1 \
+    chroot=/var/empty \
+    config-dir=/etc/powerdns \
+    daemon=no \
+    distributor-threads=3 \
+    guardian=no \
+    local-port=53 \
+    loglevel=3 \
+    module-dir=/usr/lib/powerdns \
+    setgid=nobody \
+    setuid=nobody \
+    socket-dir=/var/run \
+    webserver=no
+  do
+    setconf -a pdns.conf "${keyvalue}"
+  done
+
+  # Using simple so we can bind it to a chroot
+  sed 's|notify|simple|' -i pdns/pdns.service.in
+}
+
+build() {
+  cd pdns-${pkgver}
+  ./configure \
+    --prefix=/usr \
+    --sysconfdir=/etc/powerdns \
+    --libexecdir=/usr/lib \
+    --libdir=/usr/lib \
+    --mandir=/usr/share/man \
+    --with-modules='' \
+    --with-dynmodules="bind gmysql geoip gpgsql gsqlite3 ldap lua pipe random remote" \
+    --docdir=/usr/share/doc/powerdns \
+    --sbindir=/usr/bin \
+    --bindir=/usr/bin \
+    --with-sqlite3 \
+    --enable-libsodium \
+    --enable-tools \
+    --disable-dependency-tracking \
+    --disable-silent-rules \
+    --enable-reproducible \
+    --enable-unit-tests \
+    --enable-systemd
+  make
+}
+
+check() {
+  make -C pdns-${pkgver} check
+}
+
+package() {
+  cd pdns-${pkgver}
+  make DESTDIR="${pkgdir}" install
+  # apply defaults to generated pdns.conf
+  mv "${pkgdir}/etc/powerdns/pdns.conf"{-dist,}
+  cat pdns.conf >> "${pkgdir}/etc/powerdns/pdns.conf"
+  # adjust modules dir to match pkgname
+  mv "${pkgdir}/usr/lib/"{pdns,powerdns}
+}
+
+# vim: ts=2 sw=2 et:

Copied: powerdns/repos/community-i686/fix-4.0.3-tests.patch (from rev 208050, powerdns/trunk/fix-4.0.3-tests.patch)
===================================================================
--- community-i686/fix-4.0.3-tests.patch	                        (rev 0)
+++ community-i686/fix-4.0.3-tests.patch	2017-01-19 19:04:45 UTC (rev 208051)
@@ -0,0 +1,100 @@
+From 00c6f2b9f5173c98cc883332f5ecf8b941715abc Mon Sep 17 00:00:00 2001
+From: Remi Gacogne <remi.gacogne at powerdns.com>
+Date: Fri, 13 Jan 2017 14:02:19 +0100
+Subject: [PATCH] Fix AtomicCounter unit tests on 32-bit
+
+---
+ pdns/misc.hh            | 3 ++-
+ pdns/test-statbag_cc.cc | 4 ++--
+ 2 files changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/pdns/misc.hh b/pdns/misc.hh
+index 50e8dca..2e0e65a 100644
+--- a/pdns/misc.hh
++++ b/pdns/misc.hh
+@@ -373,7 +373,8 @@ inline bool pdns_iequals_ch(const char a, const char b)
+ }
+ 
+ 
+-typedef std::atomic<unsigned long> AtomicCounter ;
++typedef unsigned long AtomicCounterInner;
++typedef std::atomic<AtomicCounterInner> AtomicCounter ;
+ 
+ // FIXME400 this should probably go? 
+ struct CIStringCompare: public std::binary_function<string, string, bool>
+diff --git a/pdns/test-statbag_cc.cc b/pdns/test-statbag_cc.cc
+index 3330451..4abbcd0 100644
+--- a/pdns/test-statbag_cc.cc
++++ b/pdns/test-statbag_cc.cc
+@@ -83,7 +83,7 @@ BOOST_AUTO_TEST_CASE(test_StatBagBasic) {
+ 
+ #ifdef UINTPTR_MAX  
+ #if UINTPTR_MAX > 0xffffffffULL
+-    BOOST_CHECK_EQUAL(sizeof(unsigned long), 8);
++    BOOST_CHECK_EQUAL(sizeof(AtomicCounterInner), 8);
+     s.set("c", 1ULL<<33);
+     BOOST_CHECK_EQUAL(s.read("c"), (1ULL<<33) );
+     s.inc("c");
+@@ -94,7 +94,7 @@ BOOST_AUTO_TEST_CASE(test_StatBagBasic) {
+     s.inc("c");
+     BOOST_CHECK_EQUAL(s.read("c"), 0 );
+ #else
+-    BOOST_CHECK_EQUAL(sizeof(AtomicCounter::native_t), 4);
++    BOOST_CHECK_EQUAL(sizeof(AtomicCounterInner), 4);
+     BOOST_CHECK_EQUAL(~0UL, 0xffffffffUL);
+     s.set("c", ~0UL);
+     BOOST_CHECK_EQUAL(s.read("c"), 0xffffffffUL );
+From 6cbfa73b35a5cc7325b58625c0698576fb99601f Mon Sep 17 00:00:00 2001
+From: Remi Gacogne <remi.gacogne at powerdns.com>
+Date: Sun, 15 Jan 2017 21:45:27 +0100
+Subject: [PATCH] Fix negative port detection for IPv6 addresses on 32-bit
+
+On a 32-bit Arch, our `test_ComboAddress` unit test fails because
+`ComboAddress("[::1]:-6")` is considered valid. This is caused by
+`stoul()` not throwing for a negative value and returning an `unsigned
+long` value using unsigned integer wraparound rules. Since we used to
+store the result value in a `signed int` and treat negative values
+as if the port was not set, the test failed.
+---
+ pdns/misc.cc | 12 +++++++-----
+ 1 file changed, 7 insertions(+), 5 deletions(-)
+
+diff --git a/pdns/misc.cc b/pdns/misc.cc
+index 10912ff..c80b4d5 100644
+--- a/pdns/misc.cc
++++ b/pdns/misc.cc
+@@ -710,7 +710,8 @@ int makeIPv6sockaddr(const std::string& addr, struct sockaddr_in6* ret)
+   if(addr.empty())
+     return -1;
+   string ourAddr(addr);
+-  int port = -1;
++  bool portSet = false;
++  unsigned int port;
+   if(addr[0]=='[') { // [::]:53 style address
+     string::size_type pos = addr.find(']');
+     if(pos == string::npos || pos + 2 > addr.size() || addr[pos+1]!=':')
+@@ -718,6 +719,7 @@ int makeIPv6sockaddr(const std::string& addr, struct sockaddr_in6* ret)
+     ourAddr.assign(addr.c_str() + 1, pos-1);
+     try {
+       port = pdns_stou(addr.substr(pos+2));
++      portSet = true;
+     }
+     catch(std::out_of_range) {
+       return -1;
+@@ -744,12 +746,12 @@ int makeIPv6sockaddr(const std::string& addr, struct sockaddr_in6* ret)
+     freeaddrinfo(res);
+   }
+ 
+-  if(port > 65535)
+-    // negative ports are found with the pdns_stou above
+-    return -1;
++  if(portSet) {
++    if(port > 65535)
++      return -1;
+ 
+-  if(port >= 0)
+     ret->sin6_port = htons(port);
++  }
+ 
+   return 0;
+ }

Deleted: community-i686/powerdns.install
===================================================================
--- community-i686/powerdns.install	2017-01-19 19:02:07 UTC (rev 208050)
+++ community-i686/powerdns.install	2017-01-19 19:04:45 UTC (rev 208051)
@@ -1,10 +0,0 @@
-post_upgrade() {
-  echo
-  echo 'See http://doc.powerdns.com/md/authoritative/upgrading/ for'
-  echo 'information about changes when upgrading.'
-  echo
-  echo 'WARNING: powerdns.service has been renamed back to pdns.service.'
-  echo
-}
-
-# vim: ts=2 sw=2 et:

Deleted: community-x86_64/PKGBUILD
===================================================================
--- community-x86_64/PKGBUILD	2017-01-19 19:02:07 UTC (rev 208050)
+++ community-x86_64/PKGBUILD	2017-01-19 19:04:45 UTC (rev 208051)
@@ -1,95 +0,0 @@
-# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
-# Contributor: Alexander Rødseth <rodseth at gmail.com>
-# Contributor: Jan de Groot <jgc at archlinux.org>
-# Contributor: Kevin Mihelich <kevin at archlinuxarm.org>
-# Contributor: Remi Gacogne <rgacogne[at]archlinux[dot]org>
-
-pkgname=powerdns
-pkgver=4.0.1
-pkgrel=7
-pkgdesc='Authoritative DNS server'
-url='http://www.powerdns.com/'
-arch=('i686' 'x86_64')
-license=('GPL2')
-depends=('boost-libs' 'libsodium' 'systemd' 'lua' 'openssl' 'protobuf' 'sqlite')
-makedepends=('boost' 'setconf' 'libmariadbclient' 'postgresql-libs' 'lua' 'libldap'
-             'sqlite' 'geoip' 'yaml-cpp' 'pkg-config')
-optdepends=('libmariadbclient: MariaDB/MySQL backend'
-            'postgresql-libs: PostgreSQL backend'
-            'libldap: LDAP backend'
-            'geoip: GeoIP backend'
-            'yaml-cpp: GeoIP backend')
-provides=('pdns')
-conflicts=('pdns')
-backup=('etc/powerdns/pdns.conf')
-install=powerdns.install
-source=(https://downloads.powerdns.com/releases/pdns-${pkgver}.tar.bz2{,.asc})
-sha512sums=('77fce9963a05198afeb569f92fbb0f6a1cb3426c28dd77b0921128189c80d9a72ebdbfc249dfc0b5b89cc7a65a83887a0388d6cc3461453b1e3096e563afdd1e'
-            'SKIP')
-validpgpkeys=('B76CD4671C0968BAA87DE61C5E50715BF2FFE1A7') # Pieter Lexis <pieter.lexis at powerdns.com>
-
-prepare() {
-  cd pdns-${pkgver}
-
-  # Default settings
-  for keyvalue in \
-    allow-recursion=127.0.0.1 \
-    chroot=/var/empty \
-    config-dir=/etc/powerdns \
-    daemon=no \
-    distributor-threads=3 \
-    guardian=no \
-    local-port=53 \
-    loglevel=3 \
-    module-dir=/usr/lib/powerdns \
-    setgid=nobody \
-    setuid=nobody \
-    socket-dir=/var/run \
-    webserver=no
-  do
-    setconf -a pdns.conf "${keyvalue}"
-  done
-
-  # Using simple so we can bind it to a chroot
-  sed 's|notify|simple|' -i pdns/pdns.service.in
-}
-
-build() {
-  cd pdns-${pkgver}
-  ./configure \
-    --prefix=/usr \
-    --sysconfdir=/etc/powerdns \
-    --libexecdir=/usr/lib \
-    --libdir=/usr/lib \
-    --mandir=/usr/share/man \
-    --with-modules='' \
-    --with-dynmodules="bind gmysql geoip gpgsql gsqlite3 ldap lua pipe random remote" \
-    --docdir=/usr/share/doc/powerdns \
-    --sbindir=/usr/bin \
-    --bindir=/usr/bin \
-    --with-sqlite3 \
-    --enable-libsodium \
-    --enable-tools \
-    --disable-dependency-tracking \
-    --disable-silent-rules \
-    --enable-reproducible \
-    --enable-unit-tests \
-    --enable-systemd
-  make
-}
-
-check() {
-  make -C pdns-${pkgver} check
-}
-
-package() {
-  cd pdns-${pkgver}
-  make DESTDIR="${pkgdir}" install
-  # apply defaults to generated pdns.conf
-  mv "${pkgdir}/etc/powerdns/pdns.conf"{-dist,}
-  cat pdns.conf >> "${pkgdir}/etc/powerdns/pdns.conf"
-  # adjust modules dir to match pkgname
-  mv "${pkgdir}/usr/lib/"{pdns,powerdns}
-}
-
-# vim: ts=2 sw=2 et:

Copied: powerdns/repos/community-x86_64/PKGBUILD (from rev 208050, powerdns/trunk/PKGBUILD)
===================================================================
--- community-x86_64/PKGBUILD	                        (rev 0)
+++ community-x86_64/PKGBUILD	2017-01-19 19:04:45 UTC (rev 208051)
@@ -0,0 +1,97 @@
+# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
+# Contributor: Alexander Rødseth <rodseth at gmail.com>
+# Contributor: Jan de Groot <jgc at archlinux.org>
+# Contributor: Kevin Mihelich <kevin at archlinuxarm.org>
+# Contributor: Remi Gacogne <rgacogne[at]archlinux[dot]org>
+
+pkgname=powerdns
+pkgver=4.0.3
+pkgrel=1
+pkgdesc='Authoritative DNS server'
+url='http://www.powerdns.com/'
+arch=('i686' 'x86_64')
+license=('GPL2')
+depends=('boost-libs' 'libsodium' 'systemd' 'lua' 'openssl' 'protobuf' 'sqlite')
+makedepends=('boost' 'setconf' 'libmariadbclient' 'postgresql-libs' 'lua' 'libldap'
+             'sqlite' 'geoip' 'yaml-cpp' 'pkg-config')
+optdepends=('libmariadbclient: MariaDB/MySQL backend'
+            'postgresql-libs: PostgreSQL backend'
+            'libldap: LDAP backend'
+            'geoip: GeoIP backend'
+            'yaml-cpp: GeoIP backend')
+provides=('pdns')
+conflicts=('pdns')
+backup=('etc/powerdns/pdns.conf')
+source=(https://downloads.powerdns.com/releases/pdns-${pkgver}.tar.bz2{,.asc}
+        fix-${pkgver}-tests.patch)
+sha512sums=('58d33ac6cf457a916bae6abd8d2dc17f76fbcd1bd9e649948584dd669f5596b43e3e4d91841700ea1ea2cd1ac102749e503cd9075273540f33a2321e20d8bfc2'
+            'SKIP'
+            '9f6b3d794495c21280f1077b644dd6ecc10112823806c9a4db9b0819445e6450eb1a874c95199e918b7a1ad09e83192cc09d3ecf02d11b7da7488e6e03c3810a')
+validpgpkeys=('B76CD4671C0968BAA87DE61C5E50715BF2FFE1A7') # Pieter Lexis <pieter.lexis at powerdns.com>
+
+prepare() {
+  cd pdns-${pkgver}
+  patch -p1 < "${srcdir}/fix-${pkgver}-tests.patch"
+
+  # Default settings
+  for keyvalue in \
+    allow-recursion=127.0.0.1 \
+    chroot=/var/empty \
+    config-dir=/etc/powerdns \
+    daemon=no \
+    distributor-threads=3 \
+    guardian=no \
+    local-port=53 \
+    loglevel=3 \
+    module-dir=/usr/lib/powerdns \
+    setgid=nobody \
+    setuid=nobody \
+    socket-dir=/var/run \
+    webserver=no
+  do
+    setconf -a pdns.conf "${keyvalue}"
+  done
+
+  # Using simple so we can bind it to a chroot
+  sed 's|notify|simple|' -i pdns/pdns.service.in
+}
+
+build() {
+  cd pdns-${pkgver}
+  ./configure \
+    --prefix=/usr \
+    --sysconfdir=/etc/powerdns \
+    --libexecdir=/usr/lib \
+    --libdir=/usr/lib \
+    --mandir=/usr/share/man \
+    --with-modules='' \
+    --with-dynmodules="bind gmysql geoip gpgsql gsqlite3 ldap lua pipe random remote" \
+    --docdir=/usr/share/doc/powerdns \
+    --sbindir=/usr/bin \
+    --bindir=/usr/bin \
+    --with-sqlite3 \
+    --enable-libsodium \
+    --enable-tools \
+    --disable-dependency-tracking \
+    --disable-silent-rules \
+    --enable-reproducible \
+    --enable-unit-tests \
+    --enable-systemd
+  make
+}
+
+check() {
+  make -C pdns-${pkgver} check
+}
+
+package() {
+  cd pdns-${pkgver}
+  make DESTDIR="${pkgdir}" install
+  # apply defaults to generated pdns.conf
+  mv "${pkgdir}/etc/powerdns/pdns.conf"{-dist,}
+  cat pdns.conf >> "${pkgdir}/etc/powerdns/pdns.conf"
+  # adjust modules dir to match pkgname
+  mv "${pkgdir}/usr/lib/"{pdns,powerdns}
+}
+
+# vim: ts=2 sw=2 et:

Copied: powerdns/repos/community-x86_64/fix-4.0.3-tests.patch (from rev 208050, powerdns/trunk/fix-4.0.3-tests.patch)
===================================================================
--- community-x86_64/fix-4.0.3-tests.patch	                        (rev 0)
+++ community-x86_64/fix-4.0.3-tests.patch	2017-01-19 19:04:45 UTC (rev 208051)
@@ -0,0 +1,100 @@
+From 00c6f2b9f5173c98cc883332f5ecf8b941715abc Mon Sep 17 00:00:00 2001
+From: Remi Gacogne <remi.gacogne at powerdns.com>
+Date: Fri, 13 Jan 2017 14:02:19 +0100
+Subject: [PATCH] Fix AtomicCounter unit tests on 32-bit
+
+---
+ pdns/misc.hh            | 3 ++-
+ pdns/test-statbag_cc.cc | 4 ++--
+ 2 files changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/pdns/misc.hh b/pdns/misc.hh
+index 50e8dca..2e0e65a 100644
+--- a/pdns/misc.hh
++++ b/pdns/misc.hh
+@@ -373,7 +373,8 @@ inline bool pdns_iequals_ch(const char a, const char b)
+ }
+ 
+ 
+-typedef std::atomic<unsigned long> AtomicCounter ;
++typedef unsigned long AtomicCounterInner;
++typedef std::atomic<AtomicCounterInner> AtomicCounter ;
+ 
+ // FIXME400 this should probably go? 
+ struct CIStringCompare: public std::binary_function<string, string, bool>
+diff --git a/pdns/test-statbag_cc.cc b/pdns/test-statbag_cc.cc
+index 3330451..4abbcd0 100644
+--- a/pdns/test-statbag_cc.cc
++++ b/pdns/test-statbag_cc.cc
+@@ -83,7 +83,7 @@ BOOST_AUTO_TEST_CASE(test_StatBagBasic) {
+ 
+ #ifdef UINTPTR_MAX  
+ #if UINTPTR_MAX > 0xffffffffULL
+-    BOOST_CHECK_EQUAL(sizeof(unsigned long), 8);
++    BOOST_CHECK_EQUAL(sizeof(AtomicCounterInner), 8);
+     s.set("c", 1ULL<<33);
+     BOOST_CHECK_EQUAL(s.read("c"), (1ULL<<33) );
+     s.inc("c");
+@@ -94,7 +94,7 @@ BOOST_AUTO_TEST_CASE(test_StatBagBasic) {
+     s.inc("c");
+     BOOST_CHECK_EQUAL(s.read("c"), 0 );
+ #else
+-    BOOST_CHECK_EQUAL(sizeof(AtomicCounter::native_t), 4);
++    BOOST_CHECK_EQUAL(sizeof(AtomicCounterInner), 4);
+     BOOST_CHECK_EQUAL(~0UL, 0xffffffffUL);
+     s.set("c", ~0UL);
+     BOOST_CHECK_EQUAL(s.read("c"), 0xffffffffUL );
+From 6cbfa73b35a5cc7325b58625c0698576fb99601f Mon Sep 17 00:00:00 2001
+From: Remi Gacogne <remi.gacogne at powerdns.com>
+Date: Sun, 15 Jan 2017 21:45:27 +0100
+Subject: [PATCH] Fix negative port detection for IPv6 addresses on 32-bit
+
+On a 32-bit Arch, our `test_ComboAddress` unit test fails because
+`ComboAddress("[::1]:-6")` is considered valid. This is caused by
+`stoul()` not throwing for a negative value and returning an `unsigned
+long` value using unsigned integer wraparound rules. Since we used to
+store the result value in a `signed int` and treat negative values
+as if the port was not set, the test failed.
+---
+ pdns/misc.cc | 12 +++++++-----
+ 1 file changed, 7 insertions(+), 5 deletions(-)
+
+diff --git a/pdns/misc.cc b/pdns/misc.cc
+index 10912ff..c80b4d5 100644
+--- a/pdns/misc.cc
++++ b/pdns/misc.cc
+@@ -710,7 +710,8 @@ int makeIPv6sockaddr(const std::string& addr, struct sockaddr_in6* ret)
+   if(addr.empty())
+     return -1;
+   string ourAddr(addr);
+-  int port = -1;
++  bool portSet = false;
++  unsigned int port;
+   if(addr[0]=='[') { // [::]:53 style address
+     string::size_type pos = addr.find(']');
+     if(pos == string::npos || pos + 2 > addr.size() || addr[pos+1]!=':')
+@@ -718,6 +719,7 @@ int makeIPv6sockaddr(const std::string& addr, struct sockaddr_in6* ret)
+     ourAddr.assign(addr.c_str() + 1, pos-1);
+     try {
+       port = pdns_stou(addr.substr(pos+2));
++      portSet = true;
+     }
+     catch(std::out_of_range) {
+       return -1;
+@@ -744,12 +746,12 @@ int makeIPv6sockaddr(const std::string& addr, struct sockaddr_in6* ret)
+     freeaddrinfo(res);
+   }
+ 
+-  if(port > 65535)
+-    // negative ports are found with the pdns_stou above
+-    return -1;
++  if(portSet) {
++    if(port > 65535)
++      return -1;
+ 
+-  if(port >= 0)
+     ret->sin6_port = htons(port);
++  }
+ 
+   return 0;
+ }

Deleted: community-x86_64/powerdns.install
===================================================================
--- community-x86_64/powerdns.install	2017-01-19 19:02:07 UTC (rev 208050)
+++ community-x86_64/powerdns.install	2017-01-19 19:04:45 UTC (rev 208051)
@@ -1,10 +0,0 @@
-post_upgrade() {
-  echo
-  echo 'See http://doc.powerdns.com/md/authoritative/upgrading/ for'
-  echo 'information about changes when upgrading.'
-  echo
-  echo 'WARNING: powerdns.service has been renamed back to pdns.service.'
-  echo
-}
-
-# vim: ts=2 sw=2 et:



More information about the arch-commits mailing list