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 ms5.migadu.com with LMTPS id mJnPCAx7AGTi1gAAbAwnHQ (envelope-from ) for ; Thu, 02 Mar 2023 11:31:40 +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 mPAFCAx7AGTQHAEAG6o9tA (envelope-from ) for ; Thu, 02 Mar 2023 11:31:40 +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 8D29CF603 for ; Thu, 2 Mar 2023 11:31:39 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=lKiR2mxZ; 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"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1677753099; 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=Lx7lUzdo9CScRjn/bTxe9tCAEPi0fopCNYCTtoqg3II=; b=sgd6E12ZVp8pLVHFZ7kUDtyoyBCRg6JYtJ4O0px0biB0o0qMEOpNA60qVw8qn0lfJysJzt A/XsTArnlFIw3DRiu2UE/iaWkxXKP1AltFeBYlms65i07JHJqMJoKxlbktYpfdqsHrdu/f AAIJp9AV+IAiJWC1CNTZEVtH3J9Kpk+q/CNfLrlXK3lBhH3N0JNGFHE/3ksM19dSa6IgSk KAO6NdWKPn3bShUG5Y1l0Uzs8aCjAXcqFYRlLU2Z7k4blfrHlJMqc4F4C+9CICh+5aIwOC N+aNwrtPJfazXwBk0+aM84H+leTmG3aMJYp5Gf+Ceczp+i/W5XB6fUVuYuNcWA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=lKiR2mxZ; 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"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1677753099; a=rsa-sha256; cv=none; b=YfhnaewNjerlzrnK/gEC1GokR9gO+D0fFzqc50EQUx2yMRlwaVNG4ntDYKcyOPgII5MrlY ohMlTZ5gEhnLf0lAF4ET/MnF4CSxqpdFu/4LRmJ0RhQ1JXG+mVXkLGe2pcMML9iX6Ke3l3 AKJIsR++baaTvvFFid7NuCR0DMsidD1370MANPEyNK/FRXyVGhGSp1qIYmGF6G8NyneYpw I7M6I+vo+fJJGj+5RIsUMxxTeZQjHl49ks7tQQhbVwBo2rVCvJv19bJ3I1gfihmrsG8dtL Wa+Jvmp17Pqh+fNVPt3paOcF+2EBfmhNBBzJ/63694WoMtx3lPuZrxKtlICLYQ== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pXgDj-0008Gb-2j; Thu, 02 Mar 2023 05:31:31 -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 1pXgDb-00084p-J8 for guix-patches@gnu.org; Thu, 02 Mar 2023 05:31:24 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pXgDG-0001DY-6z for guix-patches@gnu.org; Thu, 02 Mar 2023 05:31:22 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pXgDF-0000rS-VI for guix-patches@gnu.org; Thu, 02 Mar 2023 05:31:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61910] [PATCH] git-download: Download a bare Git repository from SWH. Resent-From: Simon Tournier Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 02 Mar 2023 10:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61910 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: Simon Tournier , 61910@debbugs.gnu.org, Valentin Lorentz Received: via spool by 61910-submit@debbugs.gnu.org id=B61910.16777530383279 (code B ref 61910); Thu, 02 Mar 2023 10:31:01 +0000 Received: (at 61910) by debbugs.gnu.org; 2 Mar 2023 10:30:38 +0000 Received: from localhost ([127.0.0.1]:55886 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXgCr-0000qn-D3 for submit@debbugs.gnu.org; Thu, 02 Mar 2023 05:30:37 -0500 Received: from mail-wr1-f42.google.com ([209.85.221.42]:36474) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXgCq-0000qZ-3n for 61910@debbugs.gnu.org; Thu, 02 Mar 2023 05:30:36 -0500 Received: by mail-wr1-f42.google.com with SMTP id l25so16031460wrb.3 for <61910@debbugs.gnu.org>; Thu, 02 Mar 2023 02:30:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1677753030; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=Lx7lUzdo9CScRjn/bTxe9tCAEPi0fopCNYCTtoqg3II=; b=lKiR2mxZreh1O2R7oTh6HzwwWqYs5V+fZJypCNfVzCyRuXBfUOKz3Y33UVsv7f3EFF lDJD5KiVxtCSfhL5+wDHLSqzy0e+Vl0u0ZUsVtHR4H0wkUnKYonkR2QnPog1N6ppjI/c 74AuFAPsULLjPLN/yhCBseQ/f27jlMfV0yOk62OE5vOq7htDGJoSqE6GgEQ3JobxRDqC VwlR5SblQb1F82dXrrUQvymVdtFeVxElYwpSQqkXW0oIIidGTrKa8nZTe0gyFAIcz7ZN oHN9lZ6vUjO2vtN087l0Vt2vZ5f3Kjh7LJHpYOR02cLL6VTv1W0HoKilENYtco8aJNlW ZPCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677753030; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Lx7lUzdo9CScRjn/bTxe9tCAEPi0fopCNYCTtoqg3II=; b=R9fMKs5OS782PxZ0XJIBZmLxWOSQB5nj7yEzzBHCgGHsQqLIGgV5vMJOHyLDeBwFkD APMBkPe9nNLJPojqYQLvC5es0AcW+PxoSzLkdeek1LU3SUGWILAjkaeK6LvIDtssUDg8 ajJjifk67XhzHvwsCLAO54dDy/hK5q3MH/TuUWRHNOcCLPfxc8H4lLAkfvvnyBVPAFnG j66VNlCodUqu+IKsh7M6HFSMbfiI3JnBjiNhDYxoTuERS//Nh1tssHSsIi23+sRCluK+ 6+M7GBl1ArrkUfJUVUyrWkrFRYHvpP977lTt7jNQXSNopNZhZapeMomF4tiW2qgGk0bw NXOQ== X-Gm-Message-State: AO0yUKWWiy32K6gT1ZpFRMCfF0Zmip5s1puXnYVo2/cdgIEYseukZuBd rzrDpt095djmrpLFz4JU9G8= X-Google-Smtp-Source: AK7set9Lm80hWZNF+zozQqiQ3uWXl2f7RpZVpbVSQ9hejZAbps/tNMvomoX77jkxseAhwWn/nn6CFQ== X-Received: by 2002:a05:6000:109:b0:2c7:1210:fe61 with SMTP id o9-20020a056000010900b002c71210fe61mr6420624wrx.3.1677753029850; Thu, 02 Mar 2023 02:30:29 -0800 (PST) Received: from pfiuh07 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id l8-20020adff488000000b002c557f82e27sm15003301wro.99.2023.03.02.02.30.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Mar 2023 02:30:29 -0800 (PST) From: Simon Tournier References: <20230302091233.28226-1-ludo@gnu.org> Date: Thu, 02 Mar 2023 11:30:26 +0100 In-Reply-To: <20230302091233.28226-1-ludo@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Thu, 2 Mar 2023 10:12:33 +0100") Message-ID: <877cvzfnst.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: X-Migadu-Spam-Score: -2.59 X-Spam-Score: -2.59 X-Migadu-Scanner: scn0.migadu.com X-Migadu-Queue-Id: 8D29CF603 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-Country: US X-Migadu-Flow: FLOW_IN X-TUID: 28JUZ7Z0yQKo Hi, On jeu., 02 mars 2023 at 10:12, Ludovic Court=C3=A8s wrote: > I don=E2=80=99t know of a repository that has this CRLF problem though, so > we should check that it actually works as advertised on such a repo. Here my test: + disable network and only allow archive.softwareheritage.org, + run, ./pre-inst-env guix build -L /tmp/pkg hidapi@0.9.0 -S --check where /tmp/pkg.test.scm is just the old version of hidapi. The patch fixes the discrepancy but it seems more work on SWH side and this will not scale, as Valentin reported in [1]. Since it is a corner case, it would be best if first let try with the flat method and if it fails, let use git-bare. Well, it would mean add some integrity check in the last resort attempt. WDYT? 1: --8<---------------cut here---------------start------------->8--- $ cat /tmp/pkg/test.scm (define-module (test) #:use-module (guix packages) #:use-module (guix git-download) #:use-module (gnu packages libusb) ) (define-public hidapi-0.9 (package (inherit hidapi) (name "hidapi") (version "0.9.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/libusb/hidapi") (commit (string-append "hidapi-" version)))) (file-name (git-file-name name version)) (sha256 (base32 "1p4g8lgwj4rki6lbn5l6rvwj0xlbn1xfh4d255bg5pvgczmwmc4i")))))) $ ./pre-inst-env guix build -L /tmp/pkg hidapi@0.9.0 -S --check The following derivation will be built: /gnu/store/cg34yy4pd7b246qpi946x5lhcg1x80sw-hidapi-0.9.0-checkout.drv building /gnu/store/cg34yy4pd7b246qpi946x5lhcg1x80sw-hidapi-0.9.0-checkout.= drv... guile: warning: failed to install locale environment variable `PATH' set to `/gnu/store/0c1yfbxyv877mlgychfgvmk5ha2j= qh52-gzip-1.10/bin:/gnu/store/8z1q7vjxylm6l4ibsywd4h6m6jv6zqm4-tar-1.34/bin' hint: Using 'master' as the name for the initial branch. This default branc= h name hint: is subject to change. To configure the initial branch name to use in = all hint: of your new repositories, which will suppress this warning, call: hint: hint: git config --global init.defaultBranch hint: hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and hint: 'development'. The just-created branch can be renamed via this comman= d: hint: hint: git branch -m Initialized empty Git repository in /gnu/store/n6rvypb3z386v0ml6n0xyga2x4q9= ij58-hidapi-0.9.0-checkout/.git/ fatal: unable to access 'https://github.com/libusb/hidapi/': Could not reso= lve host: github.com Failed to do a shallow fetch; retrying a full fetch... fatal: unable to access 'https://github.com/libusb/hidapi/': Could not reso= lve host: github.com git-fetch: '/gnu/store/5qcj54m8smhp9gd0i8zq1y4c08cmrfii-git-minimal-2.39.1/= bin/git fetch origin' failed with exit code 128 Trying content-addressed mirror at berlin.guix.gnu.org... Trying content-addressed mirror at berlin.guix.gnu.org... Trying to download from Software Heritage... SWH: found revision 7da5cc91fc0d2dbe4df4f08cd31f6ca1a262418f with directory= at 'https://archive.softwareheritage.org/api/1/directory/c95078f3645abc050= 536d3aaf76cb5fb6eb6b288/' SWH vault: requested bundle cooking, waiting for completion... SWH vault: Processing... 1334 objects processed Over 403 remaining SWH vault: Processing... 1484 objects processed Over 301 remaining SWH vault: Processing... 1603 objects processed Over 212 remaining SWH vault: Processing... 1712 objects processed Over 115 remaining swh:1:rev:7da5cc91fc0d2dbe4df4f08cd31f6ca1a262418f.git/ swh:1:rev:7da5cc91fc0d2dbe4df4f08cd31f6ca1a262418f.git/HEAD swh:1:rev:7da5cc91fc0d2dbe4df4f08cd31f6ca1a262418f.git/branches/ swh:1:rev:7da5cc91fc0d2dbe4df4f08cd31f6ca1a262418f.git/config swh:1:rev:7da5cc91fc0d2dbe4df4f08cd31f6ca1a262418f.git/description swh:1:rev:7da5cc91fc0d2dbe4df4f08cd31f6ca1a262418f.git/hooks/ swh:1:rev:7da5cc91fc0d2dbe4df4f08cd31f6ca1a262418f.git/info/ swh:1:rev:7da5cc91fc0d2dbe4df4f08cd31f6ca1a262418f.git/info/exclude swh:1:rev:7da5cc91fc0d2dbe4df4f08cd31f6ca1a262418f.git/info/refs swh:1:rev:7da5cc91fc0d2dbe4df4f08cd31f6ca1a262418f.git/objects/ swh:1:rev:7da5cc91fc0d2dbe4df4f08cd31f6ca1a262418f.git/objects/info/ swh:1:rev:7da5cc91fc0d2dbe4df4f08cd31f6ca1a262418f.git/objects/info/packs swh:1:rev:7da5cc91fc0d2dbe4df4f08cd31f6ca1a262418f.git/objects/pack/ swh:1:rev:7da5cc91fc0d2dbe4df4f08cd31f6ca1a262418f.git/objects/pack/pack-f1= 0e443dcb1d90e42a4fb9519c0fc5429ba49ba9.idx swh:1:rev:7da5cc91fc0d2dbe4df4f08cd31f6ca1a262418f.git/objects/pack/pack-f1= 0e443dcb1d90e42a4fb9519c0fc5429ba49ba9.pack swh:1:rev:7da5cc91fc0d2dbe4df4f08cd31f6ca1a262418f.git/refs/ swh:1:rev:7da5cc91fc0d2dbe4df4f08cd31f6ca1a262418f.git/refs/heads/ swh:1:rev:7da5cc91fc0d2dbe4df4f08cd31f6ca1a262418f.git/refs/heads/master swh:1:rev:7da5cc91fc0d2dbe4df4f08cd31f6ca1a262418f.git/refs/tags/ Cloning into '/gnu/store/n6rvypb3z386v0ml6n0xyga2x4q9ij58-hidapi-0.9.0-chec= kout'... done. successfully built /gnu/store/cg34yy4pd7b246qpi946x5lhcg1x80sw-hidapi-0.9.0= -checkout.drv successfully built /gnu/store/cg34yy4pd7b246qpi946x5lhcg1x80sw-hidapi-0.9.0= -checkout.drv /gnu/store/n6rvypb3z386v0ml6n0xyga2x4q9ij58-hidapi-0.9.0-checkout --8<---------------cut here---------------end--------------->8--- Cheers, simon