public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Conrad Kostecki" <conikost@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-dns/dnssec-validator/files/, net-dns/dnssec-validator/
Date: Fri, 15 Sep 2023 22:48:23 +0000 (UTC)	[thread overview]
Message-ID: <1694818062.2f7374f8b31e0fe9f912ab51936b5419347e60d9.conikost@gentoo> (raw)

commit:     2f7374f8b31e0fe9f912ab51936b5419347e60d9
Author:     Brahmajit Das <brahmajit.xyz <AT> gmail <DOT> com>
AuthorDate: Fri Sep 15 19:26:04 2023 +0000
Commit:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Fri Sep 15 22:47:42 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2f7374f8

net-dns/dnssec-validator: Fix call to undeclared function ns_name_pton

Closes: https://bugs.gentoo.org/897862
Signed-off-by: Brahmajit Das <brahmajit.xyz <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/32816
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>

 .../dnssec-validator-2.2.3-r4.ebuild               | 61 ++++++++++++++++++++++
 .../files/dnssec-validator-2.2.3-musl-fix.patch    | 29 ++++++++++
 2 files changed, 90 insertions(+)

diff --git a/net-dns/dnssec-validator/dnssec-validator-2.2.3-r4.ebuild b/net-dns/dnssec-validator/dnssec-validator-2.2.3-r4.ebuild
new file mode 100644
index 000000000000..e0c2291fabef
--- /dev/null
+++ b/net-dns/dnssec-validator/dnssec-validator-2.2.3-r4.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools
+
+DESCRIPTION="Tools to ease the validation of DNSSEC related technologies"
+HOMEPAGE="https://www.dnssec-tools.org/"
+SRC_URI="https://github.com/DNSSEC-Tools/DNSSEC-Tools/archive/dnssec-tools-${PV}.tar.gz"
+S="${WORKDIR}/DNSSEC-Tools-dnssec-tools-${PV}/dnssec-tools/validator"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+IUSE="dlv +nsec3 static-libs +threads"
+
+RDEPEND=">=dev-libs/openssl-1.1.0:0="
+DEPEND="${RDEPEND}"
+
+# Tests fail due "Cannot create context: -7"
+RESTRICT="test"
+
+PATCHES=(
+	# Users LDFLAGS are not respected
+	# See https://github.com/DNSSEC-Tools/DNSSEC-Tools/pull/9
+	"${FILESDIR}/${P}-ldflags.patch"
+	"${FILESDIR}/${PN}-2.2.3-musl-fix.patch"
+)
+
+src_prepare() {
+	default
+
+	mv configure.in configure.ac || die
+	eautoreconf
+}
+
+src_configure() {
+	local myeconfargs=(
+		$(use_with dlv)
+		$(use_with nsec3)
+		$(use_enable static-libs static)
+		$(use_with threads)
+		--with-dnsval-conf="${EPREFIX}/etc/dnssec-tools/dnsval.conf"
+		--with-ipv6
+		--with-resolv-conf="${EPREFIX}/etc/dnssec-tools/resolv.conf"
+		--with-root-hints="${EPREFIX}/etc/dnssec-tools/root.hints"
+	)
+
+	econf "${myeconfargs[@]}"
+}
+
+src_install() {
+	# Install fails with MAKEOPTS > -j1
+	# See https://github.com/DNSSEC-Tools/DNSSEC-Tools/issues/8
+	emake -j1 DESTDIR="${D}" install
+
+	einstalldocs
+
+	find "${D}" -name '*.la' -delete || die
+}

diff --git a/net-dns/dnssec-validator/files/dnssec-validator-2.2.3-musl-fix.patch b/net-dns/dnssec-validator/files/dnssec-validator-2.2.3-musl-fix.patch
new file mode 100644
index 000000000000..3d22d6a33582
--- /dev/null
+++ b/net-dns/dnssec-validator/files/dnssec-validator-2.2.3-musl-fix.patch
@@ -0,0 +1,29 @@
+https://github.com/DNSSEC-Tools/DNSSEC-Tools/pull/22
+From: Brahmajit Das <brahmajit.xyz@gmail.com>
+Date: Fri, 15 Sep 2023 19:20:12 +0000
+Subject: [PATCH] Fix build on musl libc
+
+Function such as ns_name_pton are glibc specific and are not available
+on other libc's like musl. This patch should make it possible to use
+those internal function. The need for this patch is due to some of the
+structs like __ns_sect are already defined on musl and glibc, thus would
+result in an redefinition error.
+
+First discovered on Gentoo linux.
+
+Bug: https://bugs.gentoo.org/897862
+Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com>
+--- a/include/validator/validator-compat.h
++++ b/include/validator/validator-compat.h
+@@ -896,6 +896,11 @@ typedef enum __ns_flag {
+         (cp) += NS_INT32SZ; \
+ } while (0)
+ 
++#endif /* HAVE_ARPA_NAMESER_H */
++
++/* eabi = android */
++/* OpenBSD has arpa/nameser.h, but it doesn't define ns_msg */
++#if !defined(HAVE_ARPA_NAMESER_H) || defined(eabi) || defined(ANDROID) ||defined(__OpenBSD__) || !defined(__GLIBC__)
+ int	ns_name_uncompress(const u_char *, const u_char *,
+ 		const u_char *, char *, size_t);
+ int	ns_name_compress(const char *, u_char *, size_t,


             reply	other threads:[~2023-09-15 22:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-15 22:48 Conrad Kostecki [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-07-21 21:48 [gentoo-commits] repo/gentoo:master commit in: net-dns/dnssec-validator/files/, net-dns/dnssec-validator/ Andreas Sturmlechner
2017-12-18  8:46 Michael Weber

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=1694818062.2f7374f8b31e0fe9f912ab51936b5419347e60d9.conikost@gentoo \
    --to=conikost@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