summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2018-09-14 17:17:39 +0200
committerThomas Deutschmann <whissi@gentoo.org>2018-09-15 00:03:37 +0200
commitd28117231da59bbe0b9cc759d28b88dc06ee1684 (patch)
treeb03844c2f475719d98ca8720093c1fd2a865fb9d /net-dns/unbound
parentnet-wireless/bluez: Drop obsolete files (#664044 by iamnr3) (diff)
downloadgentoo-d28117231da59bbe0b9cc759d28b88dc06ee1684.tar.gz
gentoo-d28117231da59bbe0b9cc759d28b88dc06ee1684.tar.bz2
gentoo-d28117231da59bbe0b9cc759d28b88dc06ee1684.zip
net-dns/unbound: bump EAPI to EAPI=7
Package-Manager: Portage-2.3.49, Repoman-2.3.10
Diffstat (limited to 'net-dns/unbound')
-rw-r--r--net-dns/unbound/files/unbound-1.5.7-trust-anchor-file.patch6
-rw-r--r--net-dns/unbound/unbound-1.7.3-r1.ebuild (renamed from net-dns/unbound/unbound-1.7.3.ebuild)52
-rw-r--r--net-dns/unbound/unbound-1.8.0-r1.ebuild (renamed from net-dns/unbound/unbound-1.8.0.ebuild)52
3 files changed, 70 insertions, 40 deletions
diff --git a/net-dns/unbound/files/unbound-1.5.7-trust-anchor-file.patch b/net-dns/unbound/files/unbound-1.5.7-trust-anchor-file.patch
index c4c0ffa3d6d1..85879db3cf28 100644
--- a/net-dns/unbound/files/unbound-1.5.7-trust-anchor-file.patch
+++ b/net-dns/unbound/files/unbound-1.5.7-trust-anchor-file.patch
@@ -1,3 +1,9 @@
+To avoid below error messages like
+
+ [23109:0] error: Could not open autotrust file for writing, /etc/dnssec/root-anchors.txt: Permission denied
+
+set 'trust-anchor-file' to same value in 'auto-trust-anchor-file'.
+
diff -ur unbound-1.5.7.orig/doc/example.conf.in unbound-1.5.7/doc/example.conf.in
--- unbound-1.5.7.orig/doc/example.conf.in 2015-12-10 08:59:18.000000000 +0100
+++ unbound-1.5.7/doc/example.conf.in 2016-01-05 04:08:01.666760015 +0100
diff --git a/net-dns/unbound/unbound-1.7.3.ebuild b/net-dns/unbound/unbound-1.7.3-r1.ebuild
index 9edf230ed88d..6e815d9ab60a 100644
--- a/net-dns/unbound/unbound-1.7.3.ebuild
+++ b/net-dns/unbound/unbound-1.7.3-r1.ebuild
@@ -1,10 +1,10 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
+EAPI="7"
PYTHON_COMPAT=( python2_7 )
-inherit eutils flag-o-matic multilib-minimal python-single-r1 systemd user
+inherit autotools flag-o-matic multilib-minimal python-single-r1 systemd user
MY_P=${PN}-${PV/_/}
DESCRIPTION="A validating, recursive and caching DNS resolver"
@@ -36,6 +36,8 @@ CDEPEND=">=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}]
)
python? ( ${PYTHON_DEPS} )"
+BDEPEND="virtual/pkgconfig"
+
DEPEND="${CDEPEND}
python? ( dev-lang/swig )
test? (
@@ -43,16 +45,20 @@ DEPEND="${CDEPEND}
dev-util/splint
app-text/wdiff
)
- systemd? ( sys-apps/systemd )
- virtual/pkgconfig"
+ systemd? ( sys-apps/systemd )"
RDEPEND="${CDEPEND}
+ net-dns/dnssec-root
selinux? ( sec-policy/selinux-bind )"
# bug #347415
RDEPEND="${RDEPEND}
net-dns/dnssec-root"
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.5.7-trust-anchor-file.patch
+)
+
S=${WORKDIR}/${MY_P}
pkg_setup() {
@@ -68,11 +74,9 @@ pkg_setup() {
}
src_prepare() {
- # To avoid below error messages, set 'trust-anchor-file' to same value in
- # 'auto-trust-anchor-file'.
- # [23109:0] error: Could not open autotrust file for writing,
- # /etc/dnssec/root-anchors.txt: Permission denied
- epatch "${FILESDIR}"/${PN}-1.5.7-trust-anchor-file.patch
+ default
+
+ eautoreconf
# required for the python part
multilib_copy_sources
@@ -97,11 +101,11 @@ multilib_src_configure() {
$(use_with threads pthreads) \
--disable-flto \
--disable-rpath \
- --with-libevent="${EPREFIX}"/usr \
- --with-pidfile="${EPREFIX}"/var/run/unbound.pid \
- --with-rootkey-file="${EPREFIX}"/etc/dnssec/root-anchors.txt \
- --with-ssl="${EPREFIX}"/usr \
- --with-libexpat="${EPREFIX}"/usr
+ --with-libevent="${EPREFIX%/}"/usr \
+ --with-pidfile="${EPREFIX%/}"/var/run/unbound.pid \
+ --with-rootkey-file="${EPREFIX%/}"/etc/dnssec/root-anchors.txt \
+ --with-ssl="${EPREFIX%/}"/usr \
+ --with-libexpat="${EPREFIX%/}"/usr
# http://unbound.nlnetlabs.nl/pipermail/unbound-users/2011-April/001801.html
# $(use_enable debug lock-checks) \
@@ -111,7 +115,6 @@ multilib_src_configure() {
}
multilib_src_install_all() {
- prune_libtool_files --modules
use python && python_optimize
newinitd "${FILESDIR}"/unbound.initd unbound
@@ -136,20 +139,29 @@ multilib_src_install_all() {
# create space for auto-trust-anchor-file...
keepdir /etc/unbound/var
# ... and point example config to it
- sed -i '/# auto-trust-anchor-file:/s,/etc/dnssec/root-anchors.txt,/etc/unbound/var/root-anchors.txt,' "${ED}/etc/unbound/unbound.conf"
+ sed -i \
+ -e '/# auto-trust-anchor-file:/s,/etc/dnssec/root-anchors.txt,/etc/unbound/var/root-anchors.txt,' \
+ "${ED%/}/etc/unbound/unbound.conf" || \
+ die
+
+ find "${ED}" -name '*.la' -delete || die
+ if ! use static-libs ; then
+ find "${ED}" -name "*.a" -delete || die
+ fi
}
pkg_postinst() {
# make var/ writable by unbound
- if [[ -d "${ROOT}/etc/unbound/var" ]]; then
- chown --no-dereference --from=root unbound: "${ROOT}/etc/unbound/var"
+ if [[ -d "${EROOT%/}/etc/unbound/var" ]]; then
+ chown --no-dereference --from=root unbound: "${EROOT%/}/etc/unbound/var"
fi
+
einfo ""
einfo "If you want unbound to automatically update the root-anchor file for DNSSEC validation"
- einfo "set 'auto-trust-anchor-file: /etc/unbound/var/root-anchors.txt' in /etc/unbound/unbound.conf"
+ einfo "set 'auto-trust-anchor-file: ${EROOT%/}/etc/unbound/var/root-anchors.txt' in ${EROOT%/}/etc/unbound/unbound.conf"
einfo "and run"
einfo ""
- einfo " su -s /bin/sh -c '/usr/sbin/unbound-anchor -a /etc/unbound/var/root-anchors.txt' unbound"
+ einfo " su -s /bin/sh -c '${EROOT%/}/usr/sbin/unbound-anchor -a ${EROOT%/}/etc/unbound/var/root-anchors.txt' unbound"
einfo ""
einfo "as root to create it initially before starting unbound for the first time after enabling this."
einfo ""
diff --git a/net-dns/unbound/unbound-1.8.0.ebuild b/net-dns/unbound/unbound-1.8.0-r1.ebuild
index 3f81f97d29d4..ff0faa9ad65a 100644
--- a/net-dns/unbound/unbound-1.8.0.ebuild
+++ b/net-dns/unbound/unbound-1.8.0-r1.ebuild
@@ -1,10 +1,10 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
+EAPI="7"
PYTHON_COMPAT=( python2_7 )
-inherit eutils flag-o-matic multilib-minimal python-single-r1 systemd user
+inherit autotools flag-o-matic multilib-minimal python-single-r1 systemd user
MY_P=${PN}-${PV/_/}
DESCRIPTION="A validating, recursive and caching DNS resolver"
@@ -36,6 +36,8 @@ CDEPEND=">=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}]
)
python? ( ${PYTHON_DEPS} )"
+BDEPEND="virtual/pkgconfig"
+
DEPEND="${CDEPEND}
python? ( dev-lang/swig )
test? (
@@ -43,16 +45,20 @@ DEPEND="${CDEPEND}
dev-util/splint
app-text/wdiff
)
- systemd? ( sys-apps/systemd )
- virtual/pkgconfig"
+ systemd? ( sys-apps/systemd )"
RDEPEND="${CDEPEND}
+ net-dns/dnssec-root
selinux? ( sec-policy/selinux-bind )"
# bug #347415
RDEPEND="${RDEPEND}
net-dns/dnssec-root"
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.5.7-trust-anchor-file.patch
+)
+
S=${WORKDIR}/${MY_P}
pkg_setup() {
@@ -68,11 +74,9 @@ pkg_setup() {
}
src_prepare() {
- # To avoid below error messages, set 'trust-anchor-file' to same value in
- # 'auto-trust-anchor-file'.
- # [23109:0] error: Could not open autotrust file for writing,
- # /etc/dnssec/root-anchors.txt: Permission denied
- epatch "${FILESDIR}"/${PN}-1.5.7-trust-anchor-file.patch
+ default
+
+ eautoreconf
# required for the python part
multilib_copy_sources
@@ -102,11 +106,11 @@ multilib_src_configure() {
--enable-subnet \
--enable-tfo-client \
--enable-tfo-server \
- --with-libevent="${EPREFIX}"/usr \
- --with-pidfile="${EPREFIX}"/var/run/unbound.pid \
- --with-rootkey-file="${EPREFIX}"/etc/dnssec/root-anchors.txt \
- --with-ssl="${EPREFIX}"/usr \
- --with-libexpat="${EPREFIX}"/usr
+ --with-libevent="${EPREFIX%/}"/usr \
+ --with-pidfile="${EPREFIX%/}"/var/run/unbound.pid \
+ --with-rootkey-file="${EPREFIX%/}"/etc/dnssec/root-anchors.txt \
+ --with-ssl="${EPREFIX%/}"/usr \
+ --with-libexpat="${EPREFIX%/}"/usr
# http://unbound.nlnetlabs.nl/pipermail/unbound-users/2011-April/001801.html
# $(use_enable debug lock-checks) \
@@ -116,7 +120,6 @@ multilib_src_configure() {
}
multilib_src_install_all() {
- prune_libtool_files --modules
use python && python_optimize
newinitd "${FILESDIR}"/unbound.initd unbound
@@ -141,20 +144,29 @@ multilib_src_install_all() {
# create space for auto-trust-anchor-file...
keepdir /etc/unbound/var
# ... and point example config to it
- sed -i '/# auto-trust-anchor-file:/s,/etc/dnssec/root-anchors.txt,/etc/unbound/var/root-anchors.txt,' "${ED}/etc/unbound/unbound.conf"
+ sed -i \
+ -e '/# auto-trust-anchor-file:/s,/etc/dnssec/root-anchors.txt,/etc/unbound/var/root-anchors.txt,' \
+ "${ED%/}/etc/unbound/unbound.conf" || \
+ die
+
+ find "${ED}" -name '*.la' -delete || die
+ if ! use static-libs ; then
+ find "${ED}" -name "*.a" -delete || die
+ fi
}
pkg_postinst() {
# make var/ writable by unbound
- if [[ -d "${ROOT}/etc/unbound/var" ]]; then
- chown --no-dereference --from=root unbound: "${ROOT}/etc/unbound/var"
+ if [[ -d "${EROOT%/}/etc/unbound/var" ]]; then
+ chown --no-dereference --from=root unbound: "${EROOT%/}/etc/unbound/var"
fi
+
einfo ""
einfo "If you want unbound to automatically update the root-anchor file for DNSSEC validation"
- einfo "set 'auto-trust-anchor-file: /etc/unbound/var/root-anchors.txt' in /etc/unbound/unbound.conf"
+ einfo "set 'auto-trust-anchor-file: ${EROOT%/}/etc/unbound/var/root-anchors.txt' in ${EROOT%/}/etc/unbound/unbound.conf"
einfo "and run"
einfo ""
- einfo " su -s /bin/sh -c '/usr/sbin/unbound-anchor -a /etc/unbound/var/root-anchors.txt' unbound"
+ einfo " su -s /bin/sh -c '${EROOT%/}/usr/sbin/unbound-anchor -a ${EROOT%/}/etc/unbound/var/root-anchors.txt' unbound"
einfo ""
einfo "as root to create it initially before starting unbound for the first time after enabling this."
einfo ""