From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id gJE6Niq01GFfIQAAgWs5BA (envelope-from ) for ; Tue, 04 Jan 2022 21:55:06 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id kBADLyq01GG6cgAAG6o9tA (envelope-from ) for ; Tue, 04 Jan 2022 21:55:06 +0100 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 1F72342C2E for ; Tue, 4 Jan 2022 21:55:04 +0100 (CET) Received: from localhost ([::1]:54410 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n4qpj-0002JK-3a for larch@yhetil.org; Tue, 04 Jan 2022 15:55:03 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49014) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n4qpY-0002J9-9r for help-guix@gnu.org; Tue, 04 Jan 2022 15:54:52 -0500 Received: from [2a00:1450:4864:20::330] (port=34427 helo=mail-wm1-x330.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n4qpW-0007Lt-Jt for help-guix@gnu.org; Tue, 04 Jan 2022 15:54:51 -0500 Received: by mail-wm1-x330.google.com with SMTP id bg19-20020a05600c3c9300b0034565e837b6so1266071wmb.1 for ; Tue, 04 Jan 2022 12:54:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=UPi69tEhBq7pq4a3mMrKNAMxx4UR0MhXm/EAKYnhTcE=; b=ay99LzLqFoEu1zpotPRZFas/0XSMESGrqeBOmPwck7tWplhz3Cd0vtiUuaf3OBrZ1s PqE3to5XLAOhAIhVMRPH12F9QPflocRin5gWCRrRcXB9m81cof62yWP3dbBy6+jiHyh3 MURiuiGGigd+xlhCCOUqxJCreMAdjqmUXBgqyM0Kxl9YHi4xt90iX3ScWpGXCafQsc6O ixWKyiHC8XL7QKHSKqm6dW0wINyg85XXwelT+JYlTNYs/p3AKfYt3juVhPO8Hr6+hX3v Bc/HEkrRIACOtnAgCYvbe1XEoOMURhtF0+ElfHk50S7+dWo8ZjsmwedxoJrM5qna2kiT fKEA== 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:in-reply-to:references:date :message-id:mime-version; bh=UPi69tEhBq7pq4a3mMrKNAMxx4UR0MhXm/EAKYnhTcE=; b=C/B5/mCGqhauo30SPyQQBzBIvb4+2W/MTNRE9fTE+yqSK7nv3jORhQ9EDVzfBympbU /KXy3Q4gwUSZP5vcR/0TP3RWcUvhBNj1RTQfk+W0UN/lL5CgW9TwHgduFf8oJsTUErme VR8rWJMAcJDNXlczSap71Am6sU1M+UgxXTsj+lk15zAWL2vrJmM276tAR8NAspUgvOhS zvcVRsem93uuJ+joxlXtwt1xzmMiKUvME0ILimJaZNspRHr82975v4R5kxmLYulIxs1b AjYT189sPBwh+WE2zNGW0tqoQzB2d+0IpCpC2BlDoYep0X43C0k9d855shUIaRk/1asD xMsg== X-Gm-Message-State: AOAM532bIiFyhqQfqe6DUco5SBpLxCe0b26Blj/+Jk8QzOOFJlIPmhwy 449K6gwwFZate6LCrbHSnM5HSN+Rcck= X-Google-Smtp-Source: ABdhPJz7ImBwvXOKJmlJn0ZUKwpLQtPghNdHKTA28OSRtYRu8vuIY0RVD/+ybq7PAWLURLXBjSaWoQ== X-Received: by 2002:a05:600c:3ba7:: with SMTP id n39mr125914wms.88.1641329689179; Tue, 04 Jan 2022 12:54:49 -0800 (PST) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id d11sm42735460wri.101.2022.01.04.12.54.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jan 2022 12:54:48 -0800 (PST) From: zimoun To: Timothy Sample Subject: Re: How to use guix hash --serializer? In-Reply-To: <87k0ff1foz.fsf@ngyro.com> References: <87k0ff1foz.fsf@ngyro.com> Date: Tue, 04 Jan 2022 21:54:43 +0100 Message-ID: <86h7ajcjcc.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::330 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=zimon.toutoune@gmail.com; helo=mail-wm1-x330.google.com X-Spam_score_int: 6 X-Spam_score: 0.6 X-Spam_bar: / X-Spam_report: (0.6 / 5.0 requ) DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mortimer Cladwell , help-guix Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1641329704; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=YZjVQgHuRH229e8O07PDF9IVw1Ur6v+9Jiquqf8b7Vs=; b=QpJZs4bDDfJpZX3OAw6ejb2xcj/DkdNKniLmn2Qc6Mom0Z1E2R+HG3wwzOajEx5oW2oro+ UeRv8z6Ui9H1jC1p6DYYZb7AacNE7KrYxPexrKzAMPJCPDRrlaNdyQe9HNwWs4+lm1Zjqa NB2Ja5l5h10RgEMtXgpwJfMrxHg/l/TZE7VwFOFUqlmxYaTQMgalkIil3qr9dhF2uBVo+L PqXZPR73qMPkyT38repZIB2Wj/dJsr3WeIYuOGGRIOUlFG2cN0PHtCYsPg5bWp9naiQCbO S62QuVrdkhqIb61NEcUAB/5q0zxCw+7IH0uw1oIDlhjAJUWDhQGe5i3ZAsPC1A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1641329704; a=rsa-sha256; cv=none; b=Tvd0/T/O4TxFMZgscO6eDdrIHz5doM+y1nRyMRq+E8NiOUgr9Mx2B1AlrSrlLp0LR1eE8D p1TM+ov4kityOksXBpplYPLuSwwDklRFlPmZBjNkCFqQYpU1U39vVHF1UcVM8E2T2xQiOQ hNPeFOW6yuY61sJpdy+yB36MS1jZhPXiAZ1W3f6pcQwk7Zsx9dhuosWOwShc5wgKzgKB7C nj2Ga4cpRi5CTG2JCfJKQRwStYFHTtxbSJwflkvmMmWzcm+SJaY+HYymYK3mr31XFla+Ug Z8QQaW3MUbsGYAbN5MsJNor24O0uW2/3TCyQAs7/ux08DEWgJn7b7I9xZIARwg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20210112 header.b=ay99LzLq; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -0.99 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20210112 header.b=ay99LzLq; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 1F72342C2E X-Spam-Score: -0.99 X-Migadu-Scanner: scn1.migadu.com X-TUID: jNMdKKoc0qQT --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Timothy, On Tue, 04 Jan 2022 at 14:09, Timothy Sample wrote: > I=E2=80=99m pretty sure it=E2=80=99s a bug. Fortunately, with Disarchive= 0.4.0, the > following (untested) patch should fix it: Yep! The tests require a minor adjustment adjusted too. See attached patch. Feel free to adjust with your commit name and push. :-) (I do not have commit rights.) Cheers, simon --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-guix-hash-Allow-exclude-vcs-option-using-git-seriali.patch Content-Description: fix.patch >From 6cc3b3b93912041112570d840f86f8c52467d316 Mon Sep 17 00:00:00 2001 From: zimoun Date: Tue, 4 Jan 2022 21:47:15 +0100 Subject: [PATCH] guix hash: Allow '--exclude-vcs' option using 'git' serializer. * guix/scripts/hash.scm (git-hash): Use '#:select?' with 'git-hash-directory'. * tests/guix-hash.sh: Adjust accordingly. --- guix/scripts/hash.scm | 2 +- tests/guix-hash.sh | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/guix/scripts/hash.scm b/guix/scripts/hash.scm index d73e3d13dd..c44a4de9a4 100644 --- a/guix/scripts/hash.scm +++ b/guix/scripts/hash.scm @@ -69,7 +69,7 @@ (define directory? ((directory) #t) (else #f))) (if directory? - (git-hash-directory file algorithm) + (git-hash-directory file algorithm #:select? select?) (git-hash-file file algorithm))) diff --git a/tests/guix-hash.sh b/tests/guix-hash.sh index 854c493514..8b03c7985d 100644 --- a/tests/guix-hash.sh +++ b/tests/guix-hash.sh @@ -53,6 +53,7 @@ mkdir "$tmpdir/subdir" test `guix hash -S nar "$tmpdir"` = 10k1lw41wyrjf9mxydi0is5nkpynlsvgslinics4ppir13g7d74p test `guix hash -S nar "$tmpdir" -H sha512` = 301ra58c2vahczzxiyfin41mpyb0ljh4dh9zn3ijvwviaw1j40sfzw5skh9x945da88n3785ggifzig7acd6k72h0mpsc20m1f66m9n +test `guix hash -S git "$tmpdir"` = 1m9yxz99g7askm88h6hzyv4g2bfv57rp5wvwp3iq5ypsplq1xkkk test `guix hash -S git "$tmpdir" -H sha512` = 158b10d1bsdk4pm8ym9cg9ckfak1b0cgpw7365cl6s341ir380mh2f4ylicyh8khyrfnwq5cn9766d7m8fbfwwl94ndkv456v6a8knr # Deprecated --recursive option @@ -76,7 +77,7 @@ test `guix hash -S git $tmpdir` = 0ghlpca9xaswa1ay1g55dknwd9q899mi3ahfr43pq083v8 # ...but remains the same when using `-x' test `guix hash -S nar $tmpdir -x` = 10k1lw41wyrjf9mxydi0is5nkpynlsvgslinics4ppir13g7d74p -test `guix hash -S git $tmpdir -x` = 0ghlpca9xaswa1ay1g55dknwd9q899mi3ahfr43pq083v8wisjc7 +test `guix hash -S git $tmpdir -x` = 1m9yxz99g7askm88h6hzyv4g2bfv57rp5wvwp3iq5ypsplq1xkkk # Without '-r', this should fail. ! guix hash "$tmpdir" base-commit: 4c812db049d5c9f2c438748e180f9486ad221b0a -- 2.32.0 --=-=-=--