repo/gentoo:master commit in: net-dns/dnssec-root/
"Marc Schiffbauer" <[email protected]>
| Newsgroups | gmane.linux.gentoo.cvs |
|---|---|
| Message-ID | <1786014312.a327ce07e723b0c60c6ab693a09465ebf5895a7b.mschiff@gentoo> |
commit: a327ce07e723b0c60c6ab693a09465ebf5895a7b
Author: Marc Schiffbauer <mschiff <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 6 10:41:02 2026 +0000
Commit: Marc Schiffbauer <mschiff <AT> gentoo <DOT> org>
CommitDate: Thu Aug 6 11:05:12 2026 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a327ce07
net-dns/dnssec-root: add 20260528
Signed-off-by: Marc Schiffbauer <mschiff <AT> gentoo.org>
net-dns/dnssec-root/Manifest | 3 +
net-dns/dnssec-root/dnssec-root-20260528.ebuild | 79 +++++++++++++++++++++++++
2 files changed, 82 insertions(+)
diff --git a/net-dns/dnssec-root/Manifest b/net-dns/dnssec-root/Manifest
index 2e8a317c78ff..24cb3a0fb077 100644
--- a/net-dns/dnssec-root/Manifest
+++ b/net-dns/dnssec-root/Manifest
@@ -1,3 +1,6 @@
DIST icannbundle-20210902.pem 1261 BLAKE2B cc21c2066478c3385528a0b4635d324b2033f9d2c939c4d7176bdd42ba6e606a23036326036c82c665db64bec13783347d4ff0830807f431830ccf22ddbc7f58 SHA512 c749bf4649480f2ddaa2ee0622a104c56c858e10e8c8768307ef24ca0000c7afe120837bedc61dee1eda302273040cb61060298dceed8dd6e83904f953e3f3f5
+DIST icannbundle-20260528.pem 3295 BLAKE2B 0c4cb783ba4c1c7583f2cda7c15211b3629f50d162ff08446638cef0901c175b38c586a3a410b733459f905f19585bbb6c2ea5fb270c8581f7fa02794a7a9c44 SHA512 4b8458389d42e153a4b16f63245c122d5c51c08b8ec1720be67cfb1393e3a2bb707d62d5eace31f61a0eb289d61fc17312a2f15cc44870b8e741be3efff6073f
DIST root-anchors-20210902.p7s 2551 BLAKE2B 2a079bf36d77a7cc480c197700bfb3f06bbc67f0cc2937954793fab1f4fee5fff4477ceb028a8796a5cb41c0fb1369df7df45b33410f78b03cb18794ddd564df SHA512 3d57446cc145081841ced6cda3ecff8fba1de5123f116d580cd3ea33011e26ad9dc790281590a06f68e551e22fef45aa2408a4e2ea80e35ec0a642454b45ca0d
DIST root-anchors-20210902.xml 690 BLAKE2B 548fd62073542f527e0b05c09ed1e668baafbb3cf7ca8afd1a32b67dd43d8958cef5005729c1bc11c2b1d0ddea48ca4db69a10b049f2e8a05536b93fff15e911 SHA512 e3adfaa4f8c9751599b8062787f4c3a81d3fa1478411f138f227c0cc972c7262bcf85578d333d36352da3628211b7d8ec4416528814a8937078dc393ce195f32
+DIST root-anchors-20260528.p7s 2523 BLAKE2B 199363571de37c9e85865dcbb1cb17c742448d888ec450036b2bf10dd3cd34904ab5e9d64adffb1bdc7faaba1ba2408711c7b0526f3939d3df855fad4276cfee SHA512 42da2d7da797b6d4ef4f6145b107a382f65ee78c329e41c27008a4e311dd2807765b9c57f3c4088b510d10334c9658844208432da8161c7cc1a404c7f0ef47dc
+DIST root-anchors-20260528.xml 1861 BLAKE2B 52e401c9ef680d41e107ea1f240798600024dbc6e3a79e7d97087b5252a555fa8740feac8e7fddeda636dcb47a08dcd81d9628a0e781013c15c5add3f19d5fc7 SHA512 b3b1e1fed8b36c991ab3dfb584205ca5881271784be8446ce94cfdeb07af71928ff209ae008e9753173699e22c990bbc4cc8dd34e611419eb693d74adb7bbfee
diff --git a/net-dns/dnssec-root/dnssec-root-20260528.ebuild b/net-dns/dnssec-root/dnssec-root-20260528.ebuild
new file mode 100644
index 000000000000..e3c612286c3a
--- /dev/null
+++ b/net-dns/dnssec-root/dnssec-root-20260528.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="8"
+
+DESCRIPTION="The DNSSEC root key(s)"
+HOMEPAGE="https://www.iana.org/dnssec/"
+# check https://data.iana.org/root-anchors/ foro updates!
+SRC_URI="https://data.iana.org/root-anchors/root-anchors.xml -> root-anchors-${PV}.xml
+ https://data.iana.org/root-anchors/root-anchors.p7s -> root-anchors-${PV}.p7s
+ https://data.iana.org/root-anchors/icannbundle.pem -> icannbundle-${PV}.pem"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos"
+
+BDEPEND=">=dev-perl/XML-XPath-1.420.0"
+
+src_unpack() {
+ mkdir "${S}" || die
+
+ cp -t "${S}" "${DISTDIR}"/root-anchors-${PV}.{p7s,xml} "${DISTDIR}"/icannbundle-${PV}.pem || die
+}
+
+src_prepare() {
+ mv root-anchors-${PV}.xml root-anchors.xml || die
+ mv root-anchors-${PV}.p7s root-anchors.p7s || die
+ mv icannbundle-${PV}.pem icannbundle.pem || die
+
+ if has_version "dev-libs/openssl" ; then
+ # Signature validating is optional:
+ # - We are already downloading SRC, signature file & CA from same URI
+ # - We store checksums for distfiles
+ einfo "dev-libs/openssl is available, will validate signature of root-anchors.xml"
+ openssl smime -verify \
+ -content root-anchors.xml \
+ -in root-anchors.p7s -inform der \
+ -CAfile icannbundle.pem \
+ -noverify || die "OpenSSL S/Mime verify failed"
+ else
+ einfo "dev-libs/openssl is not available, skipping optional validation root-anchors.xml"
+ fi
+
+ default
+}
+
+src_compile() {
+ local KEYTAGS="" ALGORITHMS="" DIGESTTYPES="" DIGESTS="" i=1
+
+ KEYTAGS=$(xpath -q -e '/TrustAnchor/KeyDigest/KeyTag/node()' root-anchors.xml)
+ ALGORITHMS=$(xpath -q -e '/TrustAnchor/KeyDigest/Algorithm/node()' root-anchors.xml)
+ DIGESTTYPES=$(xpath -q -e '/TrustAnchor/KeyDigest/DigestType/node()' root-anchors.xml)
+ DIGESTS=$(xpath -q -e '/TrustAnchor/KeyDigest/Digest/node()' root-anchors.xml)
+ while [ 1 ] ; do
+ KEYTAG=$(echo ${KEYTAGS} | cut -d" " -f$i)
+ [[ "${KEYTAG}" != "" ]] || break
+
+ ALGORITHM=$(echo ${ALGORITHMS} | cut -d" " -f$i)
+ [[ "${ALGORITHM}" == "" ]] && die "root-anchors.xml contains invalid key: ${KEYTAG} is missing algorithm"
+
+ DIGESTTYPE=$(echo ${DIGESTTYPES} | cut -d" " -f$i)
+ [[ "${DIGESTTYPE}" == "" ]] && die "root-anchors.xml contains invalid key: ${KEYTAG} is missing digest type"
+
+ DIGEST=$(echo ${DIGESTS} | cut -d" " -f$i)
+ [[ "${DIGEST}" == "" ]] && die "root-anchors.xml contains invalid key: ${KEYTAG} is missing digest"
+
+ echo ". IN DS $KEYTAG $ALGORITHM $DIGESTTYPE $DIGEST" >> root-anchors.txt
+ i=`expr $i + 1`
+ done
+
+ if [[ ! -s "root-anchors.txt" ]] ; then
+ die "Sanity check failed: root-anchors.txt is empty or does not exist!"
+ fi
+}
+
+src_install() {
+ insinto /etc/dnssec
+ doins root-anchors.{p7s,txt,xml} icannbundle.pem
+}