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

Jelle van der Waa jelle at archlinux.org
Fri Feb 10 21:38:48 UTC 2017


    Date: Friday, February 10, 2017 @ 21:38:48
  Author: jelle
Revision: 211794

db-move: moved powerdns from [community-staging] to [community-testing] (i686, x86_64)

Added:
  powerdns/repos/community-testing-i686/
  powerdns/repos/community-testing-i686/PKGBUILD
    (from rev 211793, powerdns/repos/community-staging-i686/PKGBUILD)
  powerdns/repos/community-testing-i686/fix-4.0.3-tests.patch
    (from rev 211793, powerdns/repos/community-staging-i686/fix-4.0.3-tests.patch)
  powerdns/repos/community-testing-x86_64/
  powerdns/repos/community-testing-x86_64/PKGBUILD
    (from rev 211793, powerdns/repos/community-staging-x86_64/PKGBUILD)
  powerdns/repos/community-testing-x86_64/fix-4.0.3-tests.patch
    (from rev 211793, powerdns/repos/community-staging-x86_64/fix-4.0.3-tests.patch)
Deleted:
  powerdns/repos/community-staging-i686/
  powerdns/repos/community-staging-x86_64/

------------------------------------------------+
 community-testing-i686/PKGBUILD                |   97 ++++++++++++++++++++++
 community-testing-i686/fix-4.0.3-tests.patch   |  100 +++++++++++++++++++++++
 community-testing-x86_64/PKGBUILD              |   97 ++++++++++++++++++++++
 community-testing-x86_64/fix-4.0.3-tests.patch |  100 +++++++++++++++++++++++
 4 files changed, 394 insertions(+)

Copied: powerdns/repos/community-testing-i686/PKGBUILD (from rev 211793, powerdns/repos/community-staging-i686/PKGBUILD)
===================================================================
--- community-testing-i686/PKGBUILD	                        (rev 0)
+++ community-testing-i686/PKGBUILD	2017-02-10 21:38:48 UTC (rev 211794)
@@ -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=2
+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-testing-i686/fix-4.0.3-tests.patch (from rev 211793, powerdns/repos/community-staging-i686/fix-4.0.3-tests.patch)
===================================================================
--- community-testing-i686/fix-4.0.3-tests.patch	                        (rev 0)
+++ community-testing-i686/fix-4.0.3-tests.patch	2017-02-10 21:38:48 UTC (rev 211794)
@@ -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;
+ }

Copied: powerdns/repos/community-testing-x86_64/PKGBUILD (from rev 211793, powerdns/repos/community-staging-x86_64/PKGBUILD)
===================================================================
--- community-testing-x86_64/PKGBUILD	                        (rev 0)
+++ community-testing-x86_64/PKGBUILD	2017-02-10 21:38:48 UTC (rev 211794)
@@ -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=2
+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-testing-x86_64/fix-4.0.3-tests.patch (from rev 211793, powerdns/repos/community-staging-x86_64/fix-4.0.3-tests.patch)
===================================================================
--- community-testing-x86_64/fix-4.0.3-tests.patch	                        (rev 0)
+++ community-testing-x86_64/fix-4.0.3-tests.patch	2017-02-10 21:38:48 UTC (rev 211794)
@@ -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;
+ }



More information about the arch-commits mailing list