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 OJJNBt7+wl5VAwAA0tVLHw (envelope-from ) for ; Mon, 18 May 2020 21:32:14 +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 sIw5At7+wl48JAAAB5/wlQ (envelope-from ) for ; Mon, 18 May 2020 21:32:14 +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 9C0279400F4 for ; Mon, 18 May 2020 21:32:13 +0000 (UTC) Received: from localhost ([::1]:53044 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1janMq-0007JO-G2 for larch@yhetil.org; Mon, 18 May 2020 17:32:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38668) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1janMg-0007Iy-6u for guix-patches@gnu.org; Mon, 18 May 2020 17:32:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36902) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1janMf-0000Lk-TU for guix-patches@gnu.org; Mon, 18 May 2020 17:32:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1janMf-0001Vq-QX for guix-patches@gnu.org; Mon, 18 May 2020 17:32:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41382] [PATCH 0/6] Allow for a cryptographic hash function migration Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 18 May 2020 21:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 41382 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 41382@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15898374905775 (code B ref -1); Mon, 18 May 2020 21:32:01 +0000 Received: (at submit) by debbugs.gnu.org; 18 May 2020 21:31:30 +0000 Received: from localhost ([127.0.0.1]:48448 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1janMA-0001V5-7y for submit@debbugs.gnu.org; Mon, 18 May 2020 17:31:30 -0400 Received: from lists.gnu.org ([209.51.188.17]:51708) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1janM8-0001Uw-19 for submit@debbugs.gnu.org; Mon, 18 May 2020 17:31:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38640) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1janM7-00076f-QQ for guix-patches@gnu.org; Mon, 18 May 2020 17:31:27 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:37535) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1janM7-0000HA-0d; Mon, 18 May 2020 17:31:27 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=50956 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1janM5-0003IX-WC; Mon, 18 May 2020 17:31:26 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Mon, 18 May 2020 23:31:16 +0200 Message-Id: <20200518213116.23978-1-ludo@gnu.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -3.3 (---) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: -0.01 X-TUID: 6huahLRgRqkl Hello Guix! This is a first stab at preparing for a possible migration to hash algorithms other than SHA256 (there’s no rush AFAIK, but it’s good to be prepared). The first bits just improve tests and adjust the tools, which doesn’t hurt. The last bit adds a ‘sha512’ field to , which we could eventually provide instead of or in addition to ‘sha256’, possibly as a base64-encoded string so that it’s not too large. Another option would be to create a data type that specifies its algorithm and its value. We’d replace the ‘sha256’ field with a ‘hash’ field of that type (in a backward-compatible way). Thinking about it, this is perhaps the better option. Other bits that would need to be adjusted include importer, updaters, and ‘guix publish’. Thoughts? Ludo’. Ludovic Courtès (6): tests: Test 'add-to-store' with several hash algorithms. tests: Test fixed-output derivations with several hash algorithms. guix hash, guix download: Add '--hash'. guix hash, guix download: Support base64 format. packages: Add 'sha512' optional field to . packages: Add 'base64' macro. doc/guix.texi | 25 +++++++++++++++-- guix/packages.scm | 56 +++++++++++++++++++++++---------------- guix/scripts/download.scm | 26 +++++++++++++----- guix/scripts/hash.scm | 35 +++++++++++++++++------- tests/derivations.scm | 39 ++++++++++++++++----------- tests/guix-hash.sh | 7 ++++- tests/packages.scm | 26 ++++++++++++++++++ tests/store.scm | 12 +++++++++ 8 files changed, 170 insertions(+), 56 deletions(-) -- 2.26.2