public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Thomas Deutschmann" <whissi@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-dns/unbound/, net-dns/unbound/files/
Date: Fri, 14 Sep 2018 22:13:50 +0000 (UTC)	[thread overview]
Message-ID: <1536962617.d28117231da59bbe0b9cc759d28b88dc06ee1684.whissi@gentoo> (raw)

commit:     d28117231da59bbe0b9cc759d28b88dc06ee1684
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 14 15:17:39 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Fri Sep 14 22:03:37 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d2811723

net-dns/unbound: bump EAPI to EAPI=7

Package-Manager: Portage-2.3.49, Repoman-2.3.10

 .../files/unbound-1.5.7-trust-anchor-file.patch    |  6 +++
 ...nbound-1.7.3.ebuild => unbound-1.7.3-r1.ebuild} | 52 +++++++++++++---------
 ...nbound-1.8.0.ebuild => unbound-1.8.0-r1.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 c4c0ffa3d6d..85879db3cf2 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
similarity index 76%
rename from net-dns/unbound/unbound-1.7.3.ebuild
rename to net-dns/unbound/unbound-1.7.3-r1.ebuild
index 9edf230ed88..6e815d9ab60 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
similarity index 77%
rename from net-dns/unbound/unbound-1.8.0.ebuild
rename to net-dns/unbound/unbound-1.8.0-r1.ebuild
index 3f81f97d29d..ff0faa9ad65 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 ""


             reply	other threads:[~2018-09-14 22:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-14 22:13 Thomas Deutschmann [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-06-10  8:59 [gentoo-commits] repo/gentoo:master commit in: net-dns/unbound/, net-dns/unbound/files/ Marc Schiffbauer
2016-01-05  3:12 Marc Schiffbauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1536962617.d28117231da59bbe0b9cc759d28b88dc06ee1684.whissi@gentoo \
    --to=whissi@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox