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

Levente Polyak anthraxx at archlinux.org
Fri Oct 21 15:19:42 UTC 2016


    Date: Friday, October 21, 2016 @ 15:19:42
  Author: anthraxx
Revision: 192875

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

Added:
  powerdns-recursor/repos/community-staging-i686/
  powerdns-recursor/repos/community-staging-i686/PKGBUILD
    (from rev 192874, powerdns-recursor/trunk/PKGBUILD)
  powerdns-recursor/repos/community-staging-i686/pdns-recursor-4.0.3-boost-context.patch
    (from rev 192874, powerdns-recursor/trunk/pdns-recursor-4.0.3-boost-context.patch)
  powerdns-recursor/repos/community-staging-x86_64/
  powerdns-recursor/repos/community-staging-x86_64/PKGBUILD
    (from rev 192874, powerdns-recursor/trunk/PKGBUILD)
  powerdns-recursor/repos/community-staging-x86_64/pdns-recursor-4.0.3-boost-context.patch
    (from rev 192874, powerdns-recursor/trunk/pdns-recursor-4.0.3-boost-context.patch)

------------------------------------------------------------------+
 community-staging-i686/PKGBUILD                                  |   49 +++
 community-staging-i686/pdns-recursor-4.0.3-boost-context.patch   |  151 ++++++++++
 community-staging-x86_64/PKGBUILD                                |   49 +++
 community-staging-x86_64/pdns-recursor-4.0.3-boost-context.patch |  151 ++++++++++
 4 files changed, 400 insertions(+)

Copied: powerdns-recursor/repos/community-staging-i686/PKGBUILD (from rev 192874, powerdns-recursor/trunk/PKGBUILD)
===================================================================
--- community-staging-i686/PKGBUILD	                        (rev 0)
+++ community-staging-i686/PKGBUILD	2016-10-21 15:19:42 UTC (rev 192875)
@@ -0,0 +1,49 @@
+# 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: Jan Steffens <heftig at archlinux.org>
+# Contributor: Remi Gacogne <rgacogne[at]archlinux[dot]org>
+
+pkgname=powerdns-recursor
+pkgver=4.0.3
+pkgrel=2
+pkgdesc='Resolving DNS server'
+url='https://www.powerdns.com/'
+arch=('i686' 'x86_64')
+license=('GPL2')
+depends=('gcc-libs' 'boost-libs' 'systemd' 'lua' 'openssl' 'protobuf')
+makedepends=('boost' 'inetutils' 'pkg-config')
+provides=('pdns-recursor')
+conflicts=('pdns-recursor')
+backup=('etc/powerdns/recursor.conf')
+source=(http://downloads.powerdns.com/releases/pdns-recursor-${pkgver}.tar.bz2{,.asc}
+        pdns-recursor-4.0.3-boost-context.patch)
+sha512sums=('03c77cff58851f9802eba434fb674d9cbd19b849620996df84b8dccc97539607895e06c1beb662b1ce08146bbc2b51a72bde2d6d90ef88c929ab645d9b5a33c4'
+            'SKIP'
+            'e28dab595e216416c484bfbf4c597ccb0e327777e5867d05c9f2291d58bbc2835bd5dfdb47cfa7ecc46acc88dbc900bf6257c191703471354e504f4690cf62f1')
+validpgpkeys=('B76CD4671C0968BAA87DE61C5E50715BF2FFE1A7') # Pieter Lexis <pieter.lexis at powerdns.com>
+
+prepare() {
+  cd pdns-recursor-${pkgver}
+  patch -p1 < "${srcdir}/pdns-recursor-4.0.3-boost-context.patch"
+}
+
+build() {
+  cd pdns-recursor-${pkgver}
+  ./configure \
+    --prefix=/usr \
+    --sbindir=/usr/bin \
+    --sysconfdir=/etc/powerdns \
+    --disable-silent-rules \
+    --enable-reproducible \
+    --enable-systemd
+  make
+}
+
+package() {
+  cd pdns-recursor-${pkgver}
+  make DESTDIR="${pkgdir}" install
+  mv "${pkgdir}/etc/powerdns/recursor.conf"{-dist,}
+}
+
+# vim: ts=2 sw=2 et:

Copied: powerdns-recursor/repos/community-staging-i686/pdns-recursor-4.0.3-boost-context.patch (from rev 192874, powerdns-recursor/trunk/pdns-recursor-4.0.3-boost-context.patch)
===================================================================
--- community-staging-i686/pdns-recursor-4.0.3-boost-context.patch	                        (rev 0)
+++ community-staging-i686/pdns-recursor-4.0.3-boost-context.patch	2016-10-21 15:19:42 UTC (rev 192875)
@@ -0,0 +1,151 @@
+diff -ruw pdns-recursor-4.0.3.orig/mtasker_fcontext.cc pdns-recursor-4.0.3/mtasker_fcontext.cc
+--- pdns-recursor-4.0.3.orig/mtasker_fcontext.cc	2016-09-06 14:50:29.000000000 +0200
++++ pdns-recursor-4.0.3/mtasker_fcontext.cc	2016-10-21 14:22:44.838171541 +0200
+@@ -23,14 +23,15 @@
+ #include <exception>
+ #include <cassert>
+ #include <type_traits>
+-#if BOOST_VERSION > 106100
+-#include <boost/context/detail/fcontext.hpp>
+-#else
+-#include <boost/context/fcontext.hpp>
+-#endif
+ #include <boost/version.hpp>
+-
++#if BOOST_VERSION < 106100
++#include <boost/context/fcontext.hpp>
+ using boost::context::make_fcontext;
++#else
++#include <boost/context/detail/fcontext.hpp>
++using boost::context::detail::make_fcontext;
++#endif /* BOOST_VERSION < 106100 */
++
+ 
+ #if BOOST_VERSION < 105600
+ /* Note: This typedef means functions taking fcontext_t*, like jump_fcontext(),
+@@ -61,8 +62,15 @@
+     }
+ }
+ #else
++
++#if BOOST_VERSION < 106100
+ using boost::context::fcontext_t;
+ using boost::context::jump_fcontext;
++#else
++using boost::context::detail::fcontext_t;
++using boost::context::detail::jump_fcontext;
++using boost::context::detail::transfer_t;
++#endif /* BOOST_VERSION < 106100 */
+ 
+ static_assert (std::is_pointer<fcontext_t>::value,
+                "Boost Context has changed the fcontext_t type again :-(");
+@@ -72,7 +80,9 @@
+  * jump. args_t simply provides a way to pass more by reference.
+  */
+ struct args_t {
++#if BOOST_VERSION < 106100
+     fcontext_t prev_ctx = nullptr;
++#endif
+     pdns_ucontext_t* self = nullptr;
+     boost::function<void(void)>* work = nullptr;
+ };
+@@ -80,7 +90,11 @@
+ extern "C" {
+ static
+ void
++#if BOOST_VERSION < 106100
+ threadWrapper (intptr_t const xargs) {
++#else
++threadWrapper (transfer_t const t) {
++#endif
+     /* Access the args passed from pdns_makecontext, and copy them directly from
+      * the calling stack on to ours (we're now using the MThreads stack).
+      * This saves heap allocating an args object, at the cost of an extra
+@@ -90,11 +104,28 @@
+      * the behaviour of the System V implementation, which can inherently only
+      * be passed ints and pointers.
+      */
++#if BOOST_VERSION < 106100
+     auto args = reinterpret_cast<args_t*>(xargs);
++#else
++    auto args = reinterpret_cast<args_t*>(t.data);
++#endif
+     auto ctx = args->self;
+     auto work = args->work;
++    /* we switch back to pdns_makecontext() */
++#if BOOST_VERSION < 106100
+     jump_fcontext (reinterpret_cast<fcontext_t*>(&ctx->uc_mcontext),
+                    static_cast<fcontext_t>(args->prev_ctx), 0);
++#else
++    transfer_t res = jump_fcontext (t.fctx, 0);
++    /* we got switched back from pdns_swapcontext() */
++    if (res.data) {
++      /* if res.data is not a nullptr, it holds a pointer to the context
++         we just switched from, and we need to fill it to be able to
++         switch back to it later. */
++      fcontext_t* ptr = static_cast<fcontext_t*>(res.data);
++      *ptr = res.fctx;
++    }
++#endif
+     args = nullptr;
+ 
+     try {
+@@ -106,9 +137,14 @@
+ 
+     /* Emulate the System V uc_link feature. */
+     auto const next_ctx = ctx->uc_link->uc_mcontext;
++#if BOOST_VERSION < 106100
+     jump_fcontext (reinterpret_cast<fcontext_t*>(&ctx->uc_mcontext),
+                    static_cast<fcontext_t>(next_ctx),
+                    static_cast<bool>(ctx->exception));
++#else
++    jump_fcontext (static_cast<fcontext_t>(next_ctx), 0);
++#endif
++
+ #ifdef NDEBUG
+     __builtin_unreachable();
+ #endif
+@@ -129,10 +165,27 @@
+ void
+ pdns_swapcontext
+ (pdns_ucontext_t& __restrict octx, pdns_ucontext_t const& __restrict ctx) {
++  /* we either switch back to threadwrapper() if it's the first time,
++     or we switch back to pdns_swapcontext(),
++     in both case we will be returning from a call to jump_fcontext(). */
++#if BOOST_VERSION < 106100
+     if (jump_fcontext (reinterpret_cast<fcontext_t*>(&octx.uc_mcontext),
+                        static_cast<fcontext_t>(ctx.uc_mcontext), 0)) {
+         std::rethrow_exception (ctx.exception);
+     }
++#else
++  transfer_t res = jump_fcontext (static_cast<fcontext_t>(ctx.uc_mcontext), &octx.uc_mcontext);
++  if (res.data) {
++    /* if res.data is not a nullptr, it holds a pointer to the context
++       we just switched from, and we need to fill it to be able to
++       switch back to it later. */
++    fcontext_t* ptr = static_cast<fcontext_t*>(res.data);
++    *ptr = res.fctx;
++  }
++  if (ctx.exception) {
++    std::rethrow_exception (ctx.exception);
++  }
++#endif
+ }
+ 
+ void
+@@ -146,7 +199,15 @@
+     args_t args;
+     args.self = &ctx;
+     args.work = &start;
++    /* jumping to threadwrapper */
++#if BOOST_VERSION < 106100
+     jump_fcontext (reinterpret_cast<fcontext_t*>(&args.prev_ctx),
+                    static_cast<fcontext_t>(ctx.uc_mcontext),
+                    reinterpret_cast<intptr_t>(&args));
++#else
++    transfer_t res = jump_fcontext (static_cast<fcontext_t>(ctx.uc_mcontext),
++                                    &args);
++    /* back from threadwrapper, updating the context */
++    ctx.uc_mcontext = res.fctx;
++#endif
+ }

Copied: powerdns-recursor/repos/community-staging-x86_64/PKGBUILD (from rev 192874, powerdns-recursor/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2016-10-21 15:19:42 UTC (rev 192875)
@@ -0,0 +1,49 @@
+# 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: Jan Steffens <heftig at archlinux.org>
+# Contributor: Remi Gacogne <rgacogne[at]archlinux[dot]org>
+
+pkgname=powerdns-recursor
+pkgver=4.0.3
+pkgrel=2
+pkgdesc='Resolving DNS server'
+url='https://www.powerdns.com/'
+arch=('i686' 'x86_64')
+license=('GPL2')
+depends=('gcc-libs' 'boost-libs' 'systemd' 'lua' 'openssl' 'protobuf')
+makedepends=('boost' 'inetutils' 'pkg-config')
+provides=('pdns-recursor')
+conflicts=('pdns-recursor')
+backup=('etc/powerdns/recursor.conf')
+source=(http://downloads.powerdns.com/releases/pdns-recursor-${pkgver}.tar.bz2{,.asc}
+        pdns-recursor-4.0.3-boost-context.patch)
+sha512sums=('03c77cff58851f9802eba434fb674d9cbd19b849620996df84b8dccc97539607895e06c1beb662b1ce08146bbc2b51a72bde2d6d90ef88c929ab645d9b5a33c4'
+            'SKIP'
+            'e28dab595e216416c484bfbf4c597ccb0e327777e5867d05c9f2291d58bbc2835bd5dfdb47cfa7ecc46acc88dbc900bf6257c191703471354e504f4690cf62f1')
+validpgpkeys=('B76CD4671C0968BAA87DE61C5E50715BF2FFE1A7') # Pieter Lexis <pieter.lexis at powerdns.com>
+
+prepare() {
+  cd pdns-recursor-${pkgver}
+  patch -p1 < "${srcdir}/pdns-recursor-4.0.3-boost-context.patch"
+}
+
+build() {
+  cd pdns-recursor-${pkgver}
+  ./configure \
+    --prefix=/usr \
+    --sbindir=/usr/bin \
+    --sysconfdir=/etc/powerdns \
+    --disable-silent-rules \
+    --enable-reproducible \
+    --enable-systemd
+  make
+}
+
+package() {
+  cd pdns-recursor-${pkgver}
+  make DESTDIR="${pkgdir}" install
+  mv "${pkgdir}/etc/powerdns/recursor.conf"{-dist,}
+}
+
+# vim: ts=2 sw=2 et:

Copied: powerdns-recursor/repos/community-staging-x86_64/pdns-recursor-4.0.3-boost-context.patch (from rev 192874, powerdns-recursor/trunk/pdns-recursor-4.0.3-boost-context.patch)
===================================================================
--- community-staging-x86_64/pdns-recursor-4.0.3-boost-context.patch	                        (rev 0)
+++ community-staging-x86_64/pdns-recursor-4.0.3-boost-context.patch	2016-10-21 15:19:42 UTC (rev 192875)
@@ -0,0 +1,151 @@
+diff -ruw pdns-recursor-4.0.3.orig/mtasker_fcontext.cc pdns-recursor-4.0.3/mtasker_fcontext.cc
+--- pdns-recursor-4.0.3.orig/mtasker_fcontext.cc	2016-09-06 14:50:29.000000000 +0200
++++ pdns-recursor-4.0.3/mtasker_fcontext.cc	2016-10-21 14:22:44.838171541 +0200
+@@ -23,14 +23,15 @@
+ #include <exception>
+ #include <cassert>
+ #include <type_traits>
+-#if BOOST_VERSION > 106100
+-#include <boost/context/detail/fcontext.hpp>
+-#else
+-#include <boost/context/fcontext.hpp>
+-#endif
+ #include <boost/version.hpp>
+-
++#if BOOST_VERSION < 106100
++#include <boost/context/fcontext.hpp>
+ using boost::context::make_fcontext;
++#else
++#include <boost/context/detail/fcontext.hpp>
++using boost::context::detail::make_fcontext;
++#endif /* BOOST_VERSION < 106100 */
++
+ 
+ #if BOOST_VERSION < 105600
+ /* Note: This typedef means functions taking fcontext_t*, like jump_fcontext(),
+@@ -61,8 +62,15 @@
+     }
+ }
+ #else
++
++#if BOOST_VERSION < 106100
+ using boost::context::fcontext_t;
+ using boost::context::jump_fcontext;
++#else
++using boost::context::detail::fcontext_t;
++using boost::context::detail::jump_fcontext;
++using boost::context::detail::transfer_t;
++#endif /* BOOST_VERSION < 106100 */
+ 
+ static_assert (std::is_pointer<fcontext_t>::value,
+                "Boost Context has changed the fcontext_t type again :-(");
+@@ -72,7 +80,9 @@
+  * jump. args_t simply provides a way to pass more by reference.
+  */
+ struct args_t {
++#if BOOST_VERSION < 106100
+     fcontext_t prev_ctx = nullptr;
++#endif
+     pdns_ucontext_t* self = nullptr;
+     boost::function<void(void)>* work = nullptr;
+ };
+@@ -80,7 +90,11 @@
+ extern "C" {
+ static
+ void
++#if BOOST_VERSION < 106100
+ threadWrapper (intptr_t const xargs) {
++#else
++threadWrapper (transfer_t const t) {
++#endif
+     /* Access the args passed from pdns_makecontext, and copy them directly from
+      * the calling stack on to ours (we're now using the MThreads stack).
+      * This saves heap allocating an args object, at the cost of an extra
+@@ -90,11 +104,28 @@
+      * the behaviour of the System V implementation, which can inherently only
+      * be passed ints and pointers.
+      */
++#if BOOST_VERSION < 106100
+     auto args = reinterpret_cast<args_t*>(xargs);
++#else
++    auto args = reinterpret_cast<args_t*>(t.data);
++#endif
+     auto ctx = args->self;
+     auto work = args->work;
++    /* we switch back to pdns_makecontext() */
++#if BOOST_VERSION < 106100
+     jump_fcontext (reinterpret_cast<fcontext_t*>(&ctx->uc_mcontext),
+                    static_cast<fcontext_t>(args->prev_ctx), 0);
++#else
++    transfer_t res = jump_fcontext (t.fctx, 0);
++    /* we got switched back from pdns_swapcontext() */
++    if (res.data) {
++      /* if res.data is not a nullptr, it holds a pointer to the context
++         we just switched from, and we need to fill it to be able to
++         switch back to it later. */
++      fcontext_t* ptr = static_cast<fcontext_t*>(res.data);
++      *ptr = res.fctx;
++    }
++#endif
+     args = nullptr;
+ 
+     try {
+@@ -106,9 +137,14 @@
+ 
+     /* Emulate the System V uc_link feature. */
+     auto const next_ctx = ctx->uc_link->uc_mcontext;
++#if BOOST_VERSION < 106100
+     jump_fcontext (reinterpret_cast<fcontext_t*>(&ctx->uc_mcontext),
+                    static_cast<fcontext_t>(next_ctx),
+                    static_cast<bool>(ctx->exception));
++#else
++    jump_fcontext (static_cast<fcontext_t>(next_ctx), 0);
++#endif
++
+ #ifdef NDEBUG
+     __builtin_unreachable();
+ #endif
+@@ -129,10 +165,27 @@
+ void
+ pdns_swapcontext
+ (pdns_ucontext_t& __restrict octx, pdns_ucontext_t const& __restrict ctx) {
++  /* we either switch back to threadwrapper() if it's the first time,
++     or we switch back to pdns_swapcontext(),
++     in both case we will be returning from a call to jump_fcontext(). */
++#if BOOST_VERSION < 106100
+     if (jump_fcontext (reinterpret_cast<fcontext_t*>(&octx.uc_mcontext),
+                        static_cast<fcontext_t>(ctx.uc_mcontext), 0)) {
+         std::rethrow_exception (ctx.exception);
+     }
++#else
++  transfer_t res = jump_fcontext (static_cast<fcontext_t>(ctx.uc_mcontext), &octx.uc_mcontext);
++  if (res.data) {
++    /* if res.data is not a nullptr, it holds a pointer to the context
++       we just switched from, and we need to fill it to be able to
++       switch back to it later. */
++    fcontext_t* ptr = static_cast<fcontext_t*>(res.data);
++    *ptr = res.fctx;
++  }
++  if (ctx.exception) {
++    std::rethrow_exception (ctx.exception);
++  }
++#endif
+ }
+ 
+ void
+@@ -146,7 +199,15 @@
+     args_t args;
+     args.self = &ctx;
+     args.work = &start;
++    /* jumping to threadwrapper */
++#if BOOST_VERSION < 106100
+     jump_fcontext (reinterpret_cast<fcontext_t*>(&args.prev_ctx),
+                    static_cast<fcontext_t>(ctx.uc_mcontext),
+                    reinterpret_cast<intptr_t>(&args));
++#else
++    transfer_t res = jump_fcontext (static_cast<fcontext_t>(ctx.uc_mcontext),
++                                    &args);
++    /* back from threadwrapper, updating the context */
++    ctx.uc_mcontext = res.fctx;
++#endif
+ }



More information about the arch-commits mailing list