From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id cHlOE3qclWGaPwAAgWs5BA (envelope-from ) for ; Thu, 18 Nov 2021 01:21:14 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id KKAjD3qclWHnIQAAbx9fmQ (envelope-from ) for ; Thu, 18 Nov 2021 00:21: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 06D04DC7B for ; Thu, 18 Nov 2021 01:21:14 +0100 (CET) Received: from localhost ([::1]:51132 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mnVAv-0003iJ-6K for larch@yhetil.org; Wed, 17 Nov 2021 19:21:13 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45198) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mnVAm-0003gt-5R for guix-patches@gnu.org; Wed, 17 Nov 2021 19:21:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:50833) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mnVAl-00088g-7Q for guix-patches@gnu.org; Wed, 17 Nov 2021 19:21:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mnVAl-00070p-1Y for guix-patches@gnu.org; Wed, 17 Nov 2021 19:21:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#51307] [PATCH v2 0/3] scripts: hash: Several files and serializer. References: <20211020165020.3358311-1-zimon.toutoune@gmail.com> In-Reply-To: <20211020165020.3358311-1-zimon.toutoune@gmail.com> Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 18 Nov 2021 00:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51307 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 51307@debbugs.gnu.org Cc: ludo@gnu.org, zimoun Received: via spool by 51307-submit@debbugs.gnu.org id=B51307.163719485026892 (code B ref 51307); Thu, 18 Nov 2021 00:21:02 +0000 Received: (at 51307) by debbugs.gnu.org; 18 Nov 2021 00:20:50 +0000 Received: from localhost ([127.0.0.1]:34143 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mnVAY-0006za-8F for submit@debbugs.gnu.org; Wed, 17 Nov 2021 19:20:50 -0500 Received: from mail-wm1-f47.google.com ([209.85.128.47]:42664) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mnVAR-0006ye-JB for 51307@debbugs.gnu.org; Wed, 17 Nov 2021 19:20:46 -0500 Received: by mail-wm1-f47.google.com with SMTP id d72-20020a1c1d4b000000b00331140f3dc8so3432093wmd.1 for <51307@debbugs.gnu.org>; Wed, 17 Nov 2021 16:20:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=SkLuijJtpBFl/qiMya1Ql+54TgeCVACqYRotMjEpqzs=; b=B0JyTPnNnd9I50ehtlDLLSV/auSjb+LVJqSMG7WOSBySoSP8EZq5a8xt4q17NI8LO+ 4gDJ4K5TPLQCpTCEB56jkzTRUCGnR9X+ipVaAAf7xPFiPZemr3XzHx/51wHPg58qUD7t fp9skwcUOHPHVQbOqVFDHwmmRg/54djYB2z9sX06dW0P5GCMFbGXIQFceitqoT2So5cd 1HPp/lxvnqYexLkbCTsjcoQuVdevJPF3pqc7uElMnl0G8CnK1phnCKoqxyzMrmO9bKdy q9st9uE7txminVOsFM6hO3VMbTGnn74B7VFN0RntELapiXe7D0c9SB0VNuZBN0wzN8hK R6Ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=SkLuijJtpBFl/qiMya1Ql+54TgeCVACqYRotMjEpqzs=; b=fcylANMKW4T7so/MUyDJoP1qQfjZEiu0EHnOEXAVaCZnojE6I9AWnNR2InX62yCU4N PIsA3es4i5vqi91yKvFDtDwvgAjJ1C2VkznCD0VH1HygUs1fhkF97o+G2eidoyCWq9ts tzd7Z/AKUSYREjpHIwD5q7Zbb+1tIJ4T88S0G2PWMWc0NtYN+4Rl6tzKTR472ReXel81 YwpMro7X/zFnLWj29OP4S0MgSs6NwYd3hf70J5hO/gcCvyXGj4/fLbN9ScjqS8CbnCFD QB3xc0e5vArhdXADwexdF1w983LNiJJvLjC633EUlkMn+z5ePi1AYHmfRhl0WfL2gTQ+ eWcA== X-Gm-Message-State: AOAM531Y6IrUCYGOKtDTGqQJ0h8qFmbgOBtKbMr0/gOUpM5aRGP3mdF3 kdK5pJNfFR+KkNG+paE7mxxn6RnW/Xo= X-Google-Smtp-Source: ABdhPJzGhMVX45mNeaeXI+hPHAYXwQ/WFVETMugM/8xcz2JcCPjDTBt+kDlWjcUrC3fL+HtQ21Gm6w== X-Received: by 2002:a05:600c:a49:: with SMTP id c9mr4761221wmq.172.1637194837791; Wed, 17 Nov 2021 16:20:37 -0800 (PST) Received: from localhost.localdomain ([193.48.40.117]) by smtp.gmail.com with ESMTPSA id y7sm1255927wrw.55.2021.11.17.16.20.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Nov 2021 16:20:37 -0800 (PST) From: zimoun Date: Thu, 18 Nov 2021 01:20:20 +0100 Message-Id: <20211118002023.3323307-1-zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.33.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1637194874; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=SkLuijJtpBFl/qiMya1Ql+54TgeCVACqYRotMjEpqzs=; b=qEck6ZLhvbM/rBoZf/pbSsIR1YW2ji5cMohHiEeOI7/pn3E976j8i2MJ27fKYiylREIo9Y q/EzwPzk4Acu2WhzSBJ9wdwAODC7DqtBTbDGyqZaKgLqFx0IdcQRsSmlhSIBMh11T5wyxA H+nlxrEwQOKVeu6vgrCPZ2NIS7QJ6NLL0UMBOmrcr5sfZQ4Z7fLMSNXtJh1eJsaVdNSmRo i32LmUgmE6H/BGG8RcFUMF7B47pgEV+sd49O3KR9p8mJ6riX1uJ/DlmFV50l+hwGjVIk9k qAdkVYgx/yzN27VM49+UWL22DV0faLUH7SDqnQFV7hzX7uf7mrBio/hZWzf6cA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1637194874; a=rsa-sha256; cv=none; b=lBsXrWN9Cuo1FTFD+KRhoDNokL5tzJZ0CfRjve2vyBYv7v8DMqGeYiC9U6Z2hBgrZZOklr TNBEBcNHRzkCVhxEsYzx0igvModeCQKhn2IkmwO0r4kVujAAcnWtGtUrWcEc6FuLB7bE4d 9NgOvyx2Zc0b5NDhkyaSB+8HrZ3faahaRD8jVOxqaDtERtw9ylLQuHOsOs2Af7pHqYG0+5 VILno4zvuTg0mvwxD4tzOuNwtLR1HW/WNYEE/rU6sXgWCvKh+Y3Nk3+NBJ6rWP20pJOeeJ agKggzYeoZ1szamK+5yNZbZJ8QlTE6IvcKV1scq8X5VanITb01Y1e/C7GArjvQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=B0JyTPnN; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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-Migadu-Spam-Score: -1.76 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=B0JyTPnN; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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-Migadu-Queue-Id: 06D04DC7B X-Spam-Score: -1.76 X-Migadu-Scanner: scn1.migadu.com X-TUID: 03uBgMd8b9dY Hi, The first patch is the one which already made consensus. Minor suggestions by [1] has been added. The 2 following ones add UI presented there [2]. Basically, it allows: guix hash foo # similar as -S none guix hash foo -S nar # similar as -r guix hash foo -S git Especially, compare: $ cat /tmp/foo.txt | git hash-object --stdin 557db03de997c86a4a028e1ebd3a1ceb225be238 $ ./pre-inst-env guix hash -S git -H sha1 -f hex /tmp/foo.txt 557db03de997c86a4a028e1ebd3a1ceb225be238 Two remarks: 1. « #:use-module (disarchive) » is added. Elsewhere (guix download), the module is "conditionally" loaded, as if disarchive is an optional dependency. What should be done? 2. The SWH serializer is not added yet. Cheers, simon 1: 2: zimoun (3): scripts: hash: Support several files. scripts: hash: Add 'serializer' option. scripts: hash: Add git serializer. doc/guix.texi | 27 +++++++---- guix/scripts/hash.scm | 108 ++++++++++++++++++++++++++++++------------ tests/guix-hash.sh | 20 ++++++-- 3 files changed, 112 insertions(+), 43 deletions(-) base-commit: 99084abd80d7c81e83263ffc6fd3699aeb8899c5 -- 2.33.1