From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 6PlkJwDVj18gWgAA0tVLHw (envelope-from ) for ; Wed, 21 Oct 2020 06:28:16 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id QDY5IwDVj1/GYQAAB5/wlQ (envelope-from ) for ; Wed, 21 Oct 2020 06:28:16 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 9AE08940414 for ; Wed, 21 Oct 2020 06:28:15 +0000 (UTC) Received: from localhost ([::1]:35540 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kV7ba-0000Hp-HA for larch@yhetil.org; Wed, 21 Oct 2020 02:28:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38498) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUzEg-0000pT-Em for bug-guix@gnu.org; Tue, 20 Oct 2020 17:32:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:35505) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kUzEg-0006mq-2O for bug-guix@gnu.org; Tue, 20 Oct 2020 17:32:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kUzEf-0007k9-Ue for bug-guix@gnu.org; Tue, 20 Oct 2020 17:32:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#44104: [patch] guix/scripts/publish: share signing key References: <86lfg0br4s.fsf@disroot.org> In-Reply-To: <86lfg0br4s.fsf@disroot.org> Resent-From: "Amar M. Singh" Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 20 Oct 2020 21:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44104 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 44104@debbugs.gnu.org Received: via spool by 44104-submit@debbugs.gnu.org id=B44104.160322951629753 (code B ref 44104); Tue, 20 Oct 2020 21:32:01 +0000 Received: (at 44104) by debbugs.gnu.org; 20 Oct 2020 21:31:56 +0000 Received: from localhost ([127.0.0.1]:47051 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kUzEZ-0007jp-Vu for submit@debbugs.gnu.org; Tue, 20 Oct 2020 17:31:56 -0400 Received: from knopi.disroot.org ([178.21.23.139]:59470) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kUzEX-0007jg-F4 for 44104@debbugs.gnu.org; Tue, 20 Oct 2020 17:31:54 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id D6615535A3 for <44104@debbugs.gnu.org>; Tue, 20 Oct 2020 23:31:51 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EGFarcF62Z4L for <44104@debbugs.gnu.org>; Tue, 20 Oct 2020 23:31:49 +0200 (CEST) From: "Amar M. Singh" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1603229508; bh=73vX2PuFn7/4ULyzlGbZoNlydUtq8WeOQLLaE1Jly1U=; h=From:To:Subject:Date; b=OJ6Z752QKGdPmJMTuUh530FEJOjnQ3tOCFr3DcGOu7ynAGRR8iUVR5roVK1rje6ph gVOBc523BjTKLSYexgi35oqf7kFTs6FRvXfFH2Rwz6kqBEhdW54rHVAiCkRPBy8sS2 fig7xhnmZrborQWFo+kPLNlWRsRI+DM0pX8P4fHDPV76ahliQ2M3irKmXMmfALcJ4+ dWgzvIZYOgkrY0WwamAZFIn9pBKX7xTDrVR9ga+e+4117WrHzTtakB41zhcAkAnhFb 0O3rRBk/Yr/s05wvsOgdOIPsVKL9wTJ+NQlTbQPXCprz8Nav8REp+g65TfRYa1R1tE z+u3k8YBVKVSQ== Date: Wed, 21 Oct 2020 03:01:44 +0530 Message-ID: <86imb4bn3z.fsf@disroot.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) X-Mailman-Approved-At: Wed, 21 Oct 2020 02:27:51 -0400 X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=disroot.org header.s=mail header.b=OJ6Z752Q; dmarc=fail reason="SPF not aligned (relaxed)" header.from=disroot.org (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Spam-Score: 0.59 X-TUID: QjRG8GWA9c7a --=-=-= Content-Type: text/plain Add procedure (render-signing-key) and use it to serve the signing key. Cheers --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=0001-guix-publish-We-provide-signing-key.-Knock-yourselve.patch Content-Transfer-Encoding: quoted-printable Content-Description: A cure for the virus >From 554416649b7400d0bbe440016c6a6a7fed0d870a Mon Sep 17 00:00:00 2001 From: Amar Singh Date: Wed, 21 Oct 2020 02:02:02 +0530 Subject: [PATCH] guix publish: We provide signing key. Knock yourselves out! Best in industry. Signed-off-by: Amar Singh --- guix/scripts/publish.scm | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/guix/scripts/publish.scm b/guix/scripts/publish.scm index 4eaf961ab2..19df6d50ff 100644 --- a/guix/scripts/publish.scm +++ b/guix/scripts/publish.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright =C2=A9 2015 David Thompson +;;; Copyright (C) 2020 by Amar M. Singh ;;; Copyright =C2=A9 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Court=C3= =A8s ;;; ;;; This file is part of GNU Guix. @@ -686,6 +687,13 @@ to compress or decompress the log file; just return it= as-is." (values (response-headers log) log) (not-found request)))) =20 +(define (render-signing-key) + "Render signing key." + (let ((file "/etc/guix/signing-key.pub")) + (values `((content-type . (text/plain (charset . "UTF-8"))) + (x-raw-file . ,file)) + file))) + (define (render-home-page request) "Render the home page." (values `((content-type . (text/html (charset . "UTF-8")))) @@ -699,7 +707,12 @@ to compress or decompress the log file; just return it= as-is." (a (@ (href "https://guix.gnu.org/manual/en/html= _node/Invoking-guix-publish.html")) (tt "guix publish")) - " speaking. Welcome!"))) + " speaking. Welcome!") + (p "Here is the " + (a (@ (href + "signing-key.pub")) + (tt "signing key")) + " for this server. Knock yourselves out!"))) port))))) =20 (define (extract-narinfo-hash str) @@ -918,6 +931,9 @@ methods, return the applicable compression." ;; / ((or () ("index.html")) (render-home-page request)) + ;; guix signing-key + (("signing-key.pub") + (render-signing-key)) ;; /.narinfo (((=3D extract-narinfo-hash (? string? hash))) (if cache --=20 2.28.0 --=-=-=--