net-dns/pdns-recursor: Cleanup

Package-Manager: Portage-2.3.8, Repoman-2.3.4
This commit is contained in:
Sven Wegener
2017-10-30 13:27:37 +00:00
parent ba7f4abd8f
commit ab156804eb
7 changed files with 0 additions and 435 deletions
-2
View File
@@ -1,4 +1,2 @@
DIST pdns-recursor-4.0.4.tar.bz2 1050596 SHA256 2338778f49ccd03401e65f6f4b39047890e691c8ff6d810ecee45321fb4f1e4d SHA512 9473dfe9abc509b2bb953139dd7892de2027ee1508902fa0c2cd30dd9a88878fcf44370b8372d573cbab12de32bb8c604005d3b39ea34db2ef86786e689d36ab WHIRLPOOL b205ff800e49cba87f4796c7c2e4b5835119480dbcf07e404d37f86c65e7f45095fb2a936df0f82f85e6e869a87ec0355b1e5ddc5d29480e07397fc823fb1f6a
DIST pdns-recursor-4.0.5.tar.bz2 1066145 SHA256 ba43ce4280b3a06afebe58c5d63680f51dd525c63d1de7f3b229b380e6b1b7af SHA512 30d41033d4650a496b2a699b03c8cb5adb3e803420330f09159cf7ca2ce1bab4818f4a9c9ce7a99d2676e31b1e30289198af1f049cd1f309b93f6aa1a05d4cb5 WHIRLPOOL e03097c44df5ca5222b33b9477a5f3e67334508a830b13054eed249ffb0cb254d66e7f3c6b302e5450b86cdee48146f12847348ac5e49777caf0094af34ad252
DIST pdns-recursor-4.0.6.tar.bz2 1105423 SHA256 f2182ac644268bb08b865a71351f11d75c5015ac0608a1469eb4c1cd5494d60d SHA512 2203fd96469deded1da677344485da221eec036b1ad9fb418a89cd4477d73f2a6fcf984a39b574561df6946f440ddf1982de20cd39d7204da9c27e74216d1159 WHIRLPOOL a2eece8a6cdfcd6c791cb6fa42053d524b4e54f1431d78345640d7f2d9f3079939c7905767abe65abb977bce45647fb7232d1148dac13737625ee4bfae221da8
DIST pdns-recursor-4.1.0-rc1.tar.bz2 1179746 SHA256 62c601ef0e591aebcae6be09b746f8384680a2b772a75dc23f0d8f4b4e54af77 SHA512 1dd602bf9ca089c94c8a2b76422e4a78ca734b11869e8f0a9d5e6e0c60d84aaf75c93ac2c4c578a6fb3659862b95d187ad13d15a64436b32339f309dcf74f7b1 WHIRLPOOL bf3ac171e0901476cb563ef20006f2a207412d799675313b66cc26aca9bd18810fd04ffe2d4b4abc8bde3589ec051d9604ab1420ebddc1d47ecd7a9329af8551
-27
View File
@@ -1,27 +0,0 @@
#!/sbin/openrc-run
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
extra_started_commands="ping"
depend() {
need net
}
start() {
ebegin "Starting PowerDNS Recursor"
/usr/sbin/pdns_recursor --daemon=yes >/dev/null 2>&1
eend $?
}
stop() {
ebegin "Stopping PowerDNS Recursor"
/usr/bin/rec_control quit >/dev/null 2>&1
eend $?
}
ping() {
ebegin "Pinging PowerDNS Recursor"
/usr/bin/rec_control ping >/dev/null 2>&1
eend $?
}
@@ -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
}
@@ -1,29 +0,0 @@
commit 3d59c6f7d83f54d5c73013de5ab61e9a0ecd1460
Author: Remi Gacogne <remi.gacogne@powerdns.com>
Date: Mon Oct 17 10:07:26 2016 +0200
Fix building with ECDSA support disabled in libcrypto
(cherry picked from commit aa74d164ae29269168d048d2cc8d7e1f984774c4)
diff --git a/opensslsigners.cc b/opensslsigners.cc
index 9e919a0..acf8f08 100644
--- a/opensslsigners.cc
+++ b/opensslsigners.cc
@@ -128,6 +128,7 @@ static inline int RSA_set0_crt_params(RSA* rsakey, BIGNUM* dmp1, BIGNUM* dmq1, B
return 1;
}
+#ifdef HAVE_LIBCRYPTO_ECDSA
static inline void ECDSA_SIG_get0(const ECDSA_SIG* signature, const BIGNUM** pr, const BIGNUM** ps) {
*pr = signature->r;
*ps = signature->s;
@@ -140,6 +141,8 @@ static inline int ECDSA_SIG_set0(ECDSA_SIG* signature, BIGNUM* pr, BIGNUM* ps) {
signature->s = ps;
return 1;
}
+#endif /* HAVE_LIBCRYPTO_ECDSA */
+
#else
void openssl_thread_setup() {}
void openssl_thread_cleanup() {}
@@ -1,75 +0,0 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
inherit toolchain-funcs flag-o-matic eutils versionator
DESCRIPTION="The PowerDNS Recursor"
HOMEPAGE="https://www.powerdns.com/"
SRC_URI="https://downloads.powerdns.com/releases/${P/_/-}.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~arm ~x86"
IUSE="lua luajit protobuf systemd"
REQUIRED_USE="?? ( lua luajit )"
DEPEND="lua? ( >=dev-lang/lua-5.1:= )
luajit? ( dev-lang/luajit:= )
protobuf? (
dev-libs/protobuf
>=dev-libs/boost-1.42
)
systemd? ( sys-apps/systemd:0= )
>=dev-libs/boost-1.35"
RDEPEND="${DEPEND}
!<net-dns/pdns-2.9.20-r1"
DEPEND="${DEPEND}
virtual/pkgconfig"
S="${WORKDIR}"/${P/_/-}
pkg_setup() {
filter-flags -ftree-vectorize
}
src_configure() {
econf \
--sysconfdir=/etc/powerdns \
$(use_enable systemd) \
$(use_with lua) \
$(use_with luajit) \
$(use_with protobuf)
}
src_install() {
default
mv "${D}"/etc/powerdns/recursor.conf{-dist,}
# set defaults: setuid=nobody, setgid=nobody
sed -i \
-e 's/^# set\([ug]\)id=$/set\1id=nobody/' \
-e 's/^# quiet=$/quiet=on/' \
-e 's/^# chroot=$/chroot=\/var\/lib\/powerdns/' \
"${D}"/etc/powerdns/recursor.conf
newinitd "${FILESDIR}"/pdns-recursor-r1 pdns-recursor
keepdir /var/lib/powerdns
}
pkg_postinst() {
local old
for old in ${REPLACING_VERSIONS}; do
version_compare ${old} 4.0.0-r1
[[ $? -eq 1 ]] || continue
ewarn "Starting with 4.0.0-r1 the init script has been renamed from precursor"
ewarn "to pdns-recursor, please update your runlevels accordingly."
break
done
}
@@ -1,75 +0,0 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
inherit toolchain-funcs flag-o-matic eutils versionator
DESCRIPTION="The PowerDNS Recursor"
HOMEPAGE="https://www.powerdns.com/"
SRC_URI="https://downloads.powerdns.com/releases/${P/_/-}.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ~arm x86"
IUSE="lua luajit protobuf systemd"
REQUIRED_USE="?? ( lua luajit )"
DEPEND="lua? ( >=dev-lang/lua-5.1:= )
luajit? ( dev-lang/luajit:= )
protobuf? (
dev-libs/protobuf
>=dev-libs/boost-1.42
)
systemd? ( sys-apps/systemd:0= )
>=dev-libs/boost-1.35"
RDEPEND="${DEPEND}
!<net-dns/pdns-2.9.20-r1"
DEPEND="${DEPEND}
virtual/pkgconfig"
S="${WORKDIR}"/${P/_/-}
pkg_setup() {
filter-flags -ftree-vectorize
}
src_configure() {
econf \
--sysconfdir=/etc/powerdns \
$(use_enable systemd) \
$(use_with lua) \
$(use_with luajit) \
$(use_with protobuf)
}
src_install() {
default
mv "${D}"/etc/powerdns/recursor.conf{-dist,}
# set defaults: setuid=nobody, setgid=nobody
sed -i \
-e 's/^# set\([ug]\)id=$/set\1id=nobody/' \
-e 's/^# quiet=$/quiet=on/' \
-e 's/^# chroot=$/chroot=\/var\/lib\/powerdns/' \
"${D}"/etc/powerdns/recursor.conf
doinitd "${FILESDIR}"/pdns-recursor
keepdir /var/lib/powerdns
}
pkg_postinst() {
local old
for old in ${REPLACING_VERSIONS}; do
version_compare ${old} 4.0.0-r1
[[ $? -eq 1 ]] || continue
ewarn "Starting with 4.0.0-r1 the init script has been renamed from precursor"
ewarn "to pdns-recursor, please update your runlevels accordingly."
break
done
}
@@ -1,75 +0,0 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
inherit toolchain-funcs flag-o-matic eutils versionator
DESCRIPTION="The PowerDNS Recursor"
HOMEPAGE="https://www.powerdns.com/"
SRC_URI="https://downloads.powerdns.com/releases/${P/_/-}.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~arm ~x86"
IUSE="lua luajit protobuf systemd"
REQUIRED_USE="?? ( lua luajit )"
DEPEND="lua? ( >=dev-lang/lua-5.1:= )
luajit? ( dev-lang/luajit:= )
protobuf? (
dev-libs/protobuf
>=dev-libs/boost-1.42
)
systemd? ( sys-apps/systemd:0= )
>=dev-libs/boost-1.35"
RDEPEND="${DEPEND}
!<net-dns/pdns-2.9.20-r1"
DEPEND="${DEPEND}
virtual/pkgconfig"
S="${WORKDIR}"/${P/_/-}
pkg_setup() {
filter-flags -ftree-vectorize
}
src_configure() {
econf \
--sysconfdir=/etc/powerdns \
$(use_enable systemd) \
$(use_with lua) \
$(use_with luajit) \
$(use_with protobuf)
}
src_install() {
default
mv "${D}"/etc/powerdns/recursor.conf{-dist,}
# set defaults: setuid=nobody, setgid=nobody
sed -i \
-e 's/^# set\([ug]\)id=$/set\1id=nobody/' \
-e 's/^# quiet=$/quiet=on/' \
-e 's/^# chroot=$/chroot=\/var\/lib\/powerdns/' \
"${D}"/etc/powerdns/recursor.conf
newinitd "${FILESDIR}"/pdns-recursor-r1 pdns-recursor
keepdir /var/lib/powerdns
}
pkg_postinst() {
local old
for old in ${REPLACING_VERSIONS}; do
version_compare ${old} 4.0.0-r1
[[ $? -eq 1 ]] || continue
ewarn "Starting with 4.0.0-r1 the init script has been renamed from precursor"
ewarn "to pdns-recursor, please update your runlevels accordingly."
break
done
}