all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Efraim Flashner <efraim@flashner.co.il>
To: 50772@debbugs.gnu.org
Subject: [bug#50772] [PATCH] gnu: Add debian-ports-archive-keyring: New variable.
Date: Fri, 24 Sep 2021 10:21:30 +0300	[thread overview]
Message-ID: <76ef9bf7be29ef3c6c98e911c9fa2eb37c5b8d95.1632467997.git.efraim@flashner.co.il> (raw)

[-- Attachment #1: Type: text/plain, Size: 3735 bytes --]

* gnu/packages/debian.scm (debian-ports-archive-keyring): New variable.
---
 gnu/packages/debian.scm | 64 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 64 insertions(+)

diff --git a/gnu/packages/debian.scm b/gnu/packages/debian.scm
index a23490f00b..42b0fc8c7b 100644
--- a/gnu/packages/debian.scm
+++ b/gnu/packages/debian.scm
@@ -81,6 +81,70 @@ (define-public debian-archive-keyring
     (license (list license:public-domain ; the keys
                    license:gpl2+)))) ; see debian/copyright
 
+(define-public debian-ports-archive-keyring
+  (package
+    (name "debian-ports-archive-keyring")
+    (version "2020.02.02")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append "mirror://debian/pool/main/d"
+                            "/debian-ports-archive-keyring"
+                            "/debian-ports-archive-keyring_" version ".tar.xz"))
+        (sha256
+         (base32
+          "0746zfc3n4f77wlrd9a9a6r4mahz2cx5wdd9izg65vmn5qwamgza"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:tests? #f              ; No test suite.
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)    ; No configure script.
+         (replace 'build
+           (lambda _
+             ;; gpg options derived from the debian/rules file.
+             (let ((gpg-options (list "--no-options" "--no-default-keyring"
+                                      "--no-auto-check-trustdb" "--no-keyring"
+                                      "--import-options" "import-export"
+                                      "--import")))
+               (with-output-to-file "debian-ports-archive-keyring.gpg"
+                 (lambda _
+                   (apply invoke "gpg"
+                          (append gpg-options (find-files "active-keys")))))
+               (with-output-to-file "debian-ports-archive-keyring-removed.gpg"
+                 (lambda _
+                   (apply invoke "gpg"
+                          (append gpg-options (find-files "removed-keys")))))
+               (mkdir "trusted.gpg")
+               (for-each
+                 (lambda (key)
+                   (with-output-to-file
+                     (string-append "trusted.gpg/" (basename key ".key") ".gpg")
+                     (lambda _
+                       (apply invoke "gpg" (append gpg-options (list key))))))
+                 (find-files "active-keys"))
+               #t)))
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (apt (string-append out "/etc/apt/trusted.gpg.d/"))
+                    (key (string-append out "/share/keyrings/")))
+               (install-file "debian-ports-archive-keyring.gpg" key)
+               (install-file "debian-ports-archive-keyring-removed.gpg" key)
+               (for-each (lambda (file)
+                           (install-file file apt))
+                         (find-files "trusted.gpg" "\\.gpg$")))
+             #t)))))
+    (native-inputs
+     `(("gnupg" ,gnupg)))
+    (home-page "https://tracker.debian.org/pkg/debian-ports-archive-keyring")
+    (synopsis "GnuPG archive keys of the Debian ports archive")
+    (description
+     "The Debian ports-archive digitally signs its Release files.  This package
+contains the archive keys used for that.")
+    ;; "The keys in the keyrings don't fall under any copyright."
+    (license license:public-domain)))
+
 (define-public ubuntu-keyring
   (package
     (name "ubuntu-keyring")

base-commit: c582be4c38596a6a31a39c6799723dcd8b6eb909
-- 
2.33.0


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

             reply	other threads:[~2021-09-24  7:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-24  7:21 Efraim Flashner [this message]
     [not found] ` <handler.50772.B.163246817117443.ack@debbugs.gnu.org>
2021-10-10 13:15   ` bug#50772: Acknowledgement ([PATCH] gnu: Add debian-ports-archive-keyring: New variable.) Efraim Flashner

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=76ef9bf7be29ef3c6c98e911c9fa2eb37c5b8d95.1632467997.git.efraim@flashner.co.il \
    --to=efraim@flashner.co.il \
    --cc=50772@debbugs.gnu.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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.