aboutsummaryrefslogtreecommitdiffstats
path: root/community/pdns-recursor
diff options
context:
space:
mode:
authortcely <tcely@users.noreply.github.com>2018-01-27 15:03:12 -0500
committerWilliam Pitcock <nenolod@dereferenced.org>2018-01-29 09:08:53 +0000
commitcbb12439ba7cf2af2a88b59237ff6fdb6ea90587 (patch)
tree2faa89c2f292b5f3978fb65ba768856bc6cc3a08 /community/pdns-recursor
parent0ffffb92625c51ff6af8286921f3eaacd8bf3915 (diff)
downloadaports-cbb12439ba7cf2af2a88b59237ff6fdb6ea90587.tar.bz2
aports-cbb12439ba7cf2af2a88b59237ff6fdb6ea90587.tar.xz
community/pdns-recursor: Security Upgrade to 4.1.1
- use pkgname in download URL - add check function - enable unit tests for check - match pkgusers/pkggroups to pre-install - add dependencies configure is seeking - remove obsolete (since 4.0.4) boost-fix.patch - update license - add file for configure script
Diffstat (limited to 'community/pdns-recursor')
-rw-r--r--community/pdns-recursor/APKBUILD22
-rw-r--r--community/pdns-recursor/boost-fix.patch152
2 files changed, 15 insertions, 159 deletions
diff --git a/community/pdns-recursor/APKBUILD b/community/pdns-recursor/APKBUILD
index 3983f0c7af..f02b63afdd 100644
--- a/community/pdns-recursor/APKBUILD
+++ b/community/pdns-recursor/APKBUILD
@@ -1,19 +1,19 @@
# Contributor: Olivier Mauras <olivier@mauras.ch>
pkgname=pdns-recursor
-pkgver=4.0.7
+pkgver=4.1.1
pkgrel=0
pkgdesc="PowerDNS Recursive Server"
url="https://www.powerdns.com/"
arch="all !s390x"
-license="GPL"
+license="GPL-2.0-or-later"
depends=""
depends_dev=""
-makedepends="$depends_dev boost-dev lua-dev libressl-dev"
+makedepends="$depends_dev boost-dev file libressl-dev libsodium-dev lua-dev net-snmp-dev protobuf-dev"
install="$pkgname.pre-install"
subpackages="$pkgname-doc"
-pkgusers="pdns"
-pkggroups="pdns"
-source="http://downloads.powerdns.com/releases/pdns-recursor-$pkgver.tar.bz2
+pkgusers="recursor"
+pkggroups="recursor"
+source="http://downloads.powerdns.com/releases/$pkgname-$pkgver.tar.bz2
pdns-recursor.initd
recursor.conf
"
@@ -21,6 +21,8 @@ source="http://downloads.powerdns.com/releases/pdns-recursor-$pkgver.tar.bz2
builddir="$srcdir/$pkgname-$pkgver"
# secfixes:
+# 4.1.1-r0:
+# - CVE-2018-1000003
# 4.0.7-r0:
# - CVE-2017-15090
# - CVE-2017-15092
@@ -35,10 +37,16 @@ build() {
--infodir=/usr/share/info \
--localstatedir=/var \
--libdir=/usr/lib/pdns \
+ --enable-unit-tests \
--disable-static
make
}
+check() {
+ cd "$builddir"
+ make check
+}
+
package() {
cd "$builddir"
make DESTDIR="$pkgdir" install
@@ -51,6 +59,6 @@ package() {
"$pkgdir"/etc/pdns/recursor.conf
}
-sha512sums="0c8873adcce5ed9b41f161bc71635da23496b4ae48dbffff7dcdf9c5181e720f9aa94e18bd64e0dff9fa03eae8410dc93585a74d13f0c16d38b0d1c0f4146bb2 pdns-recursor-4.0.7.tar.bz2
+sha512sums="a8561bf0688752f30c4c997930f13d55c506b2a2113d22b074443757a51cde9be182ef948e61eb8c4d639bbf8679d8a4139aafb6983f483b3a917e049fa64e45 pdns-recursor-4.1.1.tar.bz2
f23cb30d943e0b0aea09371dc57aa43e55b8f91062a3caa3fac17e3565a8e36dfd304f45eba588f625ca2337cd2ade450ea5ae1776872c006204cdaf912f6651 pdns-recursor.initd
954df537693a202fc195e751011bbfaa605b3f3df42ac386fa82eb809b73c2b987f5e418b5c96bb3b0669497426ce0daa39a719844701e06990b82843a4cf0d4 recursor.conf"
diff --git a/community/pdns-recursor/boost-fix.patch b/community/pdns-recursor/boost-fix.patch
deleted file mode 100644
index c6cd9a3263..0000000000
--- a/community/pdns-recursor/boost-fix.patch
+++ /dev/null
@@ -1,152 +0,0 @@
-diff --git a/mtasker_fcontext.cc b/mtasker_fcontext.cc
-index bc37e76..8d96fa1 100644
---- a/mtasker_fcontext.cc
-+++ b/mtasker_fcontext.cc
-@@ -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 @@ jump_fcontext (fcontext_t* const ofc, fcontext_t const nfc,
- }
- }
- #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 @@ static_assert (std::is_pointer<fcontext_t>::value,
- * 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 @@ struct args_t {
- 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 @@ threadWrapper (intptr_t const xargs) {
- * 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 @@ threadWrapper (intptr_t const xargs) {
-
- /* 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 @@ pdns_ucontext_t::~pdns_ucontext_t
- 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 @@ pdns_makecontext
- 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
- }