From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id ILdPJMc4qmWAMgEAqHPOHw:P1 (envelope-from ) for ; Fri, 19 Jan 2024 09:54:31 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id ILdPJMc4qmWAMgEAqHPOHw (envelope-from ) for ; Fri, 19 Jan 2024 09:54:31 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=inria.fr header.s=dc header.b=RmJOb5gf; dmarc=fail reason="SPF not aligned (relaxed)" header.from=inria.fr (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1705654471; 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=ndD69BxGdMZZgIOho0ujkhjqD1uTuQ4lUCbNLxbSdNg=; b=AfFTejg6qrKAgUbEfYfmxvKN15DR3a+MEMnKq8SH8lQU+pPlXbR4SBsQOIJwdQmHXTv/g3 1WJShPR0bZUtgFFQM5w6PiLPtns839CvLmmBok/7s1yPiIQBRpTgbfJXSiTQWZ8Enl0SId v0TgTXbEbbj2t4uCid6vIDa/vpC73aI39hsfWNbOq9rW9QF6XSwWbyuJTs13Y45lYZpVY1 Z32+KKawKmLiXCchyzaZwl+1iJed1sKevPsYeVRZ2BMP8besPIhaLdl6klYOuDlEvOu60W uvOZcieWLJs1HAVELjTCquOQJLNafF9ejF+dxBzeaIu63Kp/YkJTCCPg/ZmrgA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=inria.fr header.s=dc header.b=RmJOb5gf; dmarc=fail reason="SPF not aligned (relaxed)" header.from=inria.fr (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1705654471; a=rsa-sha256; cv=none; b=Jt+KtKEuIdVx+Qrsxp6FT37C1J8+ybK/Gm6cTYeZvvVCa1PwqQSfNrp/2y6TQ72Nwt+rMe RurcApn6nPOLOltV71+sJm61VhbCe8N0Q9gZDRJ/Ff+Qo9hSwYnMrrlcUwtTzdN29m9fO+ 0v42jokyy6tQYHEl03T98fPT9fiul/BR5la9aVrgjh+qoCzmKih7b3JWDSS9ZlkLFGANUp Syz099Gla5oQj5cHFWWloKtD1o/wu3NBGaetFELItidmLB/WU2OmfwDlThl36Qk4zH/Kfd ChfMKo1yIBKih3HTkdozgwXWM5XIOy9Q5ba99eKqSs8AGtZIvje8UudNZ/r35g== 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 3611923BB0 for ; Fri, 19 Jan 2024 09:54:30 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rQkdY-0003Ij-QU; Fri, 19 Jan 2024 03:54:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rQkdU-0003IK-Tl for guix-patches@gnu.org; Fri, 19 Jan 2024 03:54:02 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rQkdU-0004WH-LH for guix-patches@gnu.org; Fri, 19 Jan 2024 03:54:00 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rQkdW-0006y1-Dm for guix-patches@gnu.org; Fri, 19 Jan 2024 03:54:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68405] [PATCH v2] guix: download: Add support for git repositories. Resent-From: Romain Garbage Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 19 Jan 2024 08:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68405 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxim Cournoyer Cc: 68405@debbugs.gnu.org, Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 68405-submit@debbugs.gnu.org id=B68405.170565441526742 (code B ref 68405); Fri, 19 Jan 2024 08:54:02 +0000 Received: (at 68405) by debbugs.gnu.org; 19 Jan 2024 08:53:35 +0000 Received: from localhost ([127.0.0.1]:57465 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rQkd5-0006xG-4N for submit@debbugs.gnu.org; Fri, 19 Jan 2024 03:53:35 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:20383) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rQkd1-0006x1-R6 for 68405@debbugs.gnu.org; Fri, 19 Jan 2024 03:53:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=date:from:to:cc:message-id:in-reply-to:references: subject:mime-version:content-transfer-encoding; bh=ndD69BxGdMZZgIOho0ujkhjqD1uTuQ4lUCbNLxbSdNg=; b=RmJOb5gfGz8+0JwWrfyTXi9TbZgpyz9lqgEDsvFV5WxYI2gi0pe9A6eb YOO7Us9c/tPUvJgfeT4lmelEacWneMQ93VWE8A4Wu27YTNfKcfH1X0ukK zK2mNeDR+YmghPQfbhJicq7rSKKP9eKtEe5U+EC5izcE3zFKp/2m+FwPd Y=; Received-SPF: Pass (mail2-relais-roc.national.inria.fr: domain of romain.garbage@inria.fr designates 128.93.142.32 as permitted sender) identity=mailfrom; client-ip=128.93.142.32; receiver=mail2-relais-roc.national.inria.fr; envelope-from="romain.garbage@inria.fr"; x-sender="romain.garbage@inria.fr"; x-conformance=spf_only; x-record-type="v=spf1"; x-record-text="v=spf1 include:mailout.safebrands.com a:basic-mail.safebrands.com a:basic-mail01.safebrands.com a:basic-mail02.safebrands.com ip4:128.93.142.0/24 ip4:192.134.164.0/24 ip4:128.93.162.160 ip4:89.107.174.7 mx ~all" Received-SPF: None (mail2-relais-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@zcs-store5.inria.fr) identity=helo; client-ip=128.93.142.32; receiver=mail2-relais-roc.national.inria.fr; envelope-from="romain.garbage@inria.fr"; x-sender="postmaster@zcs-store5.inria.fr"; x-conformance=spf_only X-IronPort-AV: E=Sophos;i="6.05,204,1701126000"; d="scan'208";a="147528175" X-MGA-submission: MDGteFqhghlwCbLmUtkHW6QUieLXm5j2j4hXx5Gbb94vOmh9hezeIAH+/xGgMT67HA/ATboEQrXXIxts7yZEI2GK8y5e8Tm8BbMFjOqucqrBBZQTw81i745X3UoeWGEzmvmf2VqVX7b0qAaAFlePLAU0ESfnGYt2TKLgVauAgm39tA== Received: from zcs-store5.inria.fr ([128.93.142.32]) by mail2-relais-roc.national.inria.fr with ESMTP; 19 Jan 2024 09:53:23 +0100 Date: Fri, 19 Jan 2024 09:53:23 +0100 (CET) From: Romain Garbage Message-ID: <1558292173.14259694.1705654403237.JavaMail.zimbra@inria.fr> In-Reply-To: <87jzo6j6tx.fsf@gmail.com> References: <20240112151411.22470-2-romain.garbage@inria.fr> <87jzo6j6tx.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [193.50.110.153] X-Mailer: Zimbra 8.8.15_GA_4581 (ZimbraWebClient - FF115 (Linux)/8.8.15_GA_4581) Thread-Topic: bug#68405: [PATCH v2] guix: download: Add support for git repositories. Thread-Index: edmRLhNKdSNTvmR1+gEErvpsUs1oLg== 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: 2.11 X-Spam-Score: 2.11 X-Migadu-Queue-Id: 3611923BB0 X-Migadu-Scanner: mx12.migadu.com X-TUID: YhDMWRpubqz5 ----- Mail original ----- > De: "Maxim Cournoyer" > =C0: "Romain Garbage" > Cc: 68405@debbugs.gnu.org, "Ludovic Court=E8s" > Envoy=E9: Vendredi 19 Janvier 2024 04:16:42 > Objet: Re: bug#68405: [PATCH v2] guix: download: Add support for git repo= sitories. > Hello, Hi Maxim, Thank you very much for your review.=20 I actually pushed a v3 of this patch last Tuesday, somehow the issues have = not been merged together. The new patch is available here: https://issues.guix.gnu.org/68499 I will address your comments below. > Romain GARBAGE writes: >=20 >> Added `--recursive' option. >=20 > I still see a TODO about supporting recursive repos in the code. Is > that still the case? It was removed in v3. =20 >> Removed `pk' call. >> >> * guix/scripts/download.scm (git-download-to-store*): Add new variable. >> (copy-recursively-without-dot-git): New variable. >> (git-download-to-file): Add new variable. >> (show-help): Add 'git', 'commit', 'branch' and 'recursive'options >> help message. >> (%default-options): Add default value for 'git-reference' and >> 'recursive' options. >> (%options): Add 'git', 'commit', 'branch' and 'recursive' command >> line options. >> (guix-download) [hash]: Compute hash with 'file-hash*' instead of >> 'port-hash' from (gcrypt hash) module. This allows us to compute >> hashes for directories. >> * doc/guix.texi (Invoking guix-download): Add @item entries for >> `git', `commit', `branch' and `recursive' options. Add a paragraph in >> the introduction. >> * tests/guix-download.sh: New tests. >=20 > This sounds good and is something that I'm many many of us have wanted > for some time. Thank you for working on it! >=20 > Nitpick about the commit message: the convention seems to be to not use > a hanging indent when writing GNU ChangeLog messages. I'll remove it then :) =20 [...] >> +;; This is a simplified version of 'copy-recursively'. >> +;; It allows us to filter out the ".git" subfolder. >> +;; TODO: Remove when 'copy-recursively' supports '#:select?'. >=20 > Is a #:select? planned for copy-recursively? (in the works?) For the record, it is the issue #68406 (thanks for reviewing it too!) [...] =20 > Some lines look like > 80 chars here. Please break long lines > accordingly. Will fix. [...] > Here also there are some too long lines in the above hunks; please break > long lines so they fit within the 80 characters limit. Ditto. =20 >> (fmt (assq-ref opts 'format))) >> (format #t "~a~%~a~%" path (fmt hash)) >> #t))) >> diff --git a/tests/guix-download.sh b/tests/guix-download.sh >> index f4cb335eef..3bf63c4b12 100644 >> --- a/tests/guix-download.sh >> +++ b/tests/guix-download.sh >> @@ -45,4 +45,46 @@ cmp "$output" "$abs_top_srcdir/README" >> # This one should fail. >> guix download "file:///does-not-exist" "file://$abs_top_srcdir/README" = && false >> >> +# Test git support with local repository >=20 > Nitpick: please punctuate standalone comments (here, a missing period). Will do. >> +test_directory=3D"$(mktemp -d)" >> +trap 'chmod -Rf +w "$test_directory"; rm -rf "$test_directory" ; rm -f >> "$output"' EXIT >=20 > the 'chmod' doesn't seem to be useful; since we force removing with -f ? I copied it from another test :) I will remove it. > And where did the $output variable come from? It comes from L39 and is used in an already existing test. [...] >> +# Same but download to file instead of store >> +tmpdir=3D"t-archive-dir-$$" >> +trap 'chmod -Rf +w "$test_directory"; rm -rf "$test_directory" ; rm -f >> "$output" ; rm -rf "$tmpdir"' EXIT >=20 > It'd look nicer if there was a single global trap call at the top of > these tests. Don't forget to punctuate your comments :-). Ok, so I'll move all the temporary file/directory creation/definition to th= e top together with the trap call definition. I'll submit a v4 with these changes. Thanks again for reviewing. --=20 Romain