GNU bug report logs - #64545
[PATCH] gnu: Add get-trust-anchor.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Bruno Victal <mirai@HIDDEN>; Keywords: patch; dated Sun, 9 Jul 2023 18:23:02 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

Message received at 64545 <at> debbugs.gnu.org:


Received: (at 64545) by debbugs.gnu.org; 7 Aug 2024 21:45:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 07 17:45:33 2024
Received: from localhost ([127.0.0.1]:35171 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sboTM-0003c3-QN
	for submit <at> debbugs.gnu.org; Wed, 07 Aug 2024 17:45:33 -0400
Received: from mail-ua1-f44.google.com ([209.85.222.44]:60879)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <josesnchz420@HIDDEN>) id 1sblWj-0007CP-4Y
 for 64545 <at> debbugs.gnu.org; Wed, 07 Aug 2024 14:36:49 -0400
Received: by mail-ua1-f44.google.com with SMTP id
 a1e0cc1a2514c-827113c1fb4so52637241.1
 for <64545 <at> debbugs.gnu.org>; Wed, 07 Aug 2024 11:36:23 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1723055718; x=1723660518; darn=debbugs.gnu.org;
 h=to:subject:message-id:date:from:mime-version:from:to:cc:subject
 :date:message-id:reply-to;
 bh=bTJImucJ83t5TYcOSOwidr7ZSF1SZAyb/Lo2LUc66GQ=;
 b=WUfKmWIPGpByMPE5I8o5tpMaMniYJ9bOouM3eskQDHO2d8AECse9aT4CQtomm/ONhw
 AgtjmNfIYCMlk0z9xkpQqeqKYeoPYmfFFpvc3YCfDjuCGhiiUdkNcrsPCoFX5NevvoWI
 VvOtXrSQMTGHd9IB2Q4Y289Tn2P2Cx1861+0lA87yJ5yK/j04xsFXh9dn1SShyL3ybBm
 b71uKjSzh6cNeo/YamFuKV1EKBFxKdTwF3wvFubk7qi3y/xwt3FnyO8CinYZkwVYLwzL
 /VmvWzOXSRL21wV/r6mZUgl9rizVsjP2odaE8bPyK3wXjVDf0lOrtLgt+lPGlyPUj1Gi
 P+7Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1723055718; x=1723660518;
 h=to:subject:message-id:date:from:mime-version:x-gm-message-state
 :from:to:cc:subject:date:message-id:reply-to;
 bh=bTJImucJ83t5TYcOSOwidr7ZSF1SZAyb/Lo2LUc66GQ=;
 b=UF1/D2FndvTm6DNVvhsXK03MB+U2gxqS1ficFRcmlPn0OkSE035fs2QlwCaAvh72kw
 DWfLFllvqL7irMsye0x1vJKfk5egaWQViPdBS/1b9w2WvC8P0oVabnk14mh8Qe5UZCjR
 4Y92xkfjqfa4BSDO+L5+2AOJYni5wJmDWHCFvWm87ngn0m0mrOHmFn2bfAalCzpm+F9Y
 fuXQ+eytlxGJe99YaGBcRepBRsgVUWW1LXP2saqcERqc/8AZYKlnpKwe0HU2GfvLU+ks
 7nR09BdoWEYd/Jbprm7Bj0fiIzzULe1f4xZP80knNP/YoEumdBkoRXUE74NZ7SrzTfew
 HYyw==
X-Gm-Message-State: AOJu0Yy6chCicyU/LBkFP003FtLbWOBcJzMJdAE6AfnllD0dJwkGUgT5
 x0og8lrhalEzYfa3luxrzTEaKWAtbyQDJxsu81KKPhv/xbDlRvLgaI4u1oYCEqxlhSg+5pX7PSi
 g20nwBMquwRAyfNgybzFbZQ2EAskevELV
X-Google-Smtp-Source: AGHT+IGVyosEiwGBzFJVd188XF0ZeXO4ijcp2TWP9cxCFRryksnvcajVrhsQIH8A2L79sW5mRqaKh5yRpwweeBrsHBU=
X-Received: by 2002:a05:6102:6d6:b0:48f:42c8:e0a9 with SMTP id
 ada2fe7eead31-4945bf2f114mr22657247137.26.1723055717718; Wed, 07 Aug 2024
 11:35:17 -0700 (PDT)
MIME-Version: 1.0
From: =?UTF-8?Q?Jos=C3=A9_Sanchez?= <josesnchz420@HIDDEN>
Date: Wed, 7 Aug 2024 12:35:06 -0600
Message-ID: <CAAfPXqFRHzTgsjiqhuQmgVLYvAFL1J3nvyg-x04HYNSCiGhDKQ@HIDDEN>
Subject: [PATCH] gnu: Add get-trust-anchor.
To: 64545 <at> debbugs.gnu.org
Content-Type: multipart/alternative; boundary="000000000000fba3ee061f1c2b16"
X-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: 64545
X-Mailman-Approved-At: Wed, 07 Aug 2024 17:45:31 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

--000000000000fba3ee061f1c2b16
Content-Type: text/plain; charset="UTF-8"



--000000000000fba3ee061f1c2b16
Content-Type: text/html; charset="UTF-8"



--000000000000fba3ee061f1c2b16--




Information forwarded to guix-patches@HIDDEN:
bug#64545; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 9 Jul 2023 18:22:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jul 09 14:22:18 2023
Received: from localhost ([127.0.0.1]:47149 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qIZ34-0007HR-3a
	for submit <at> debbugs.gnu.org; Sun, 09 Jul 2023 14:22:18 -0400
Received: from lists.gnu.org ([209.51.188.17]:33602)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mirai@HIDDEN>) id 1qIZ31-0007HJ-BN
 for submit <at> debbugs.gnu.org; Sun, 09 Jul 2023 14:22:16 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <mirai@HIDDEN>) id 1qIZ31-0007JA-26
 for guix-patches@HIDDEN; Sun, 09 Jul 2023 14:22:15 -0400
Received: from smtpmciv4.myservices.hosting ([185.26.107.240])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <mirai@HIDDEN>) id 1qIZ2z-00071U-0f
 for guix-patches@HIDDEN; Sun, 09 Jul 2023 14:22:14 -0400
Received: from mail1.netim.hosting (unknown [185.26.106.173])
 by smtpmciv4.myservices.hosting (Postfix) with ESMTP id 0FBD220817
 for <guix-patches@HIDDEN>; Sun,  9 Jul 2023 20:22:03 +0200 (CEST)
Received: from localhost (localhost [127.0.0.1])
 by mail1.netim.hosting (Postfix) with ESMTP id 8F16A80097;
 Sun,  9 Jul 2023 20:16:06 +0200 (CEST)
X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting
Received: from mail1.netim.hosting ([127.0.0.1])
 by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id GuXIGEegINwq; Sun,  9 Jul 2023 20:16:06 +0200 (CEST)
Received: from guix-nuc.home.arpa (unknown [10.192.1.83])
 (Authenticated sender: lumen@HIDDEN)
 by mail1.netim.hosting (Postfix) with ESMTPSA id DABAB80060;
 Sun,  9 Jul 2023 20:16:05 +0200 (CEST)
From: Bruno Victal <mirai@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH] gnu: Add get-trust-anchor.
Date: Sun,  9 Jul 2023 19:15:55 +0100
Message-Id: <9e371eab576e76ee438c39746ddbe4be103231a7.1688926431.git.mirai@HIDDEN>
X-Mailer: git-send-email 2.40.1
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Received-SPF: pass client-ip=185.26.107.240; envelope-from=mirai@HIDDEN;
 helo=smtpmciv4.myservices.hosting
X-Spam_score_int: -18
X-Spam_score: -1.9
X-Spam_bar: -
X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
Cc: Bruno Victal <mirai@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

* gnu/packages/dns.scm (get-trust-anchor): New variable.
* gnu/packages/patches/get-trust-anchor-setuptools.patch: New file.
* gnu/local.mk: Register it.
---

Notes:
* Patch sent upstream: <https://github.com/iana-org/get-trust-anchor/pull/7>

 gnu/local.mk                                  |  1 +
 gnu/packages/dns.scm                          | 49 +++++++++++++++++++
 .../patches/get-trust-anchor-setuptools.patch | 48 ++++++++++++++++++
 3 files changed, 98 insertions(+)
 create mode 100644 gnu/packages/patches/get-trust-anchor-setuptools.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 96f4594835..1f40cf8fa9 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1228,6 +1228,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/genimage-mke2fs-test.patch		\
   %D%/packages/patches/geoclue-config.patch			\
   %D%/packages/patches/gettext-libunicode-update.patch		\
+  %D%/packages/patches/get-trust-anchor-setuptools.patch	\
   %D%/packages/patches/ghc-8.0-fall-back-to-madv_dontneed.patch	\
   %D%/packages/patches/ghc-9.2-glibc-2.33-link-order.patch \
   %D%/packages/patches/ghc-9.2-grep-warnings.patch \
diff --git a/gnu/packages/dns.scm b/gnu/packages/dns.scm
index a34e4ced89..f375c608a6 100644
--- a/gnu/packages/dns.scm
+++ b/gnu/packages/dns.scm
@@ -92,8 +92,57 @@ (define-module (gnu packages dns)
   #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system meson)
+  #:use-module (guix build-system python)
   #:use-module (guix build-system trivial))
 
+;; Manually test by running (requires online connectivity):
+;; $ guix shell --container --network --no-cwd \
+;;     get-trust-anchor nss-certs -- get-trust-anchor
+(define-public get-trust-anchor
+  (let ((commit "a149f31483a647af09f1b4c99871a07f7614e08f")
+        (revision "0"))  ; no releases
+    (package
+      (name "get-trust-anchor")
+      (version (git-version "0.0.0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/iana-org/get-trust-anchor")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "05dsqykyqfxy90s264a6wk1xxpnv31gzil7fgcccbxi64zpx8zq4"))
+         (patches (search-patches "get-trust-anchor-setuptools.patch"))))
+      (build-system python-build-system)
+      (arguments
+       (list
+        #:tests? #f ; tests require online connectivity
+        #:modules '((guix build python-build-system)
+                    (guix build utils)
+                    (srfi srfi-1))
+        #:phases
+        #~(modify-phases %standard-phases
+            (add-before 'wrap 'wrap-path
+              (lambda* (#:key inputs #:allow-other-keys)
+                (let ((prog (string-append #$output "/bin/get-trust-anchor"))
+                      (path (map (lambda (f)
+                                   (dirname (search-input-file inputs f)))
+                                 '("/bin/openssl" "/bin/which"))))
+                  (wrap-program prog
+                    `("PATH" = ,path))))))))
+      (inputs (list openssl which))
+      (native-search-paths
+       (list $SSL_CERT_DIR $SSL_CERT_FILE))
+      (synopsis "Tool for fetching IANA's DNS Root Trust Anchors")
+      (description "This package provides the @command{get-trust-anchor}
+command, a tool that fetches the current DNSSEC trust anchor from IANA
+and the root @acronym{KSK, Key Signing Key} from Google Public DNS
+via @acronym{DoH, DNS over HTTPS} or by downloading the root zone file.")
+      (home-page "https://www.iana.org/dnssec/files")
+      (license license:bsd-2))))
+
 (define-public cloudflare-cli
   (let ((commit "2d986d3ec1b0e3158c4bd40e8918947cb74aa392")
         (revision "1"))
diff --git a/gnu/packages/patches/get-trust-anchor-setuptools.patch b/gnu/packages/patches/get-trust-anchor-setuptools.patch
new file mode 100644
index 0000000000..f3de9b1ae3
--- /dev/null
+++ b/gnu/packages/patches/get-trust-anchor-setuptools.patch
@@ -0,0 +1,48 @@
+From fcc6daa582400a68d9cbc9e834c018a8c90650c4 Mon Sep 17 00:00:00 2001
+Message-Id: <fcc6daa582400a68d9cbc9e834c018a8c90650c4.1688921926.git.mirai@HIDDEN>
+From: Bruno Victal <mirai@HIDDEN>
+Date: Sun, 9 Jul 2023 17:31:37 +0100
+Subject: [PATCH] setuptools: use entry_points.
+
+---
+ get_trust_anchor.py => get_trust_anchor/__main__.py | 2 +-
+ setup.py                                            | 9 ++++++---
+ 2 files changed, 7 insertions(+), 4 deletions(-)
+ rename get_trust_anchor.py => get_trust_anchor/__main__.py (99%)
+
+diff --git a/get_trust_anchor.py b/get_trust_anchor/__main__.py
+similarity index 99%
+rename from get_trust_anchor.py
+rename to get_trust_anchor/__main__.py
+index 42bd041..369ce54 100644
+--- a/get_trust_anchor.py
++++ b/get_trust_anchor/__main__.py
+@@ -474,4 +474,4 @@ def main():
+                     print("Could not delete {}: '{}'. Continuing".format(this_file, this_exception))
+ 
+ if __name__ == "__main__":
+-    main()
++    sys.exit(main())
+diff --git a/setup.py b/setup.py
+index 491c832..7900037 100644
+--- a/setup.py
++++ b/setup.py
+@@ -12,7 +12,10 @@ setup(
+         'Programming Language :: Python :: 3'
+     ],
+     url='https://github.com/iana-org/get_trust_anchor/',
+-    scripts=[
+-        'get_trust_anchor.py'
+-    ]
++    packages=['get_trust_anchor'],
++    entry_points={
++        'console_scripts': [
++            'get-trust-anchor = get_trust_anchor.__main__:main'
++        ]
++    }
+ )
+
+base-commit: a149f31483a647af09f1b4c99871a07f7614e08f
+-- 
+2.40.1
+

base-commit: 2ba2e80ee6e19f6ab710035445d8e234f100e25d
-- 
2.40.1





Acknowledgement sent to Bruno Victal <mirai@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#64545; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 12 Jan 2025 05:45:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.