all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Simon Tournier <zimon.toutoune@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: Simon Tournier <simon.tournier@inserm.fr>,
	61910@debbugs.gnu.org,
	Valentin Lorentz <valentin.lorentz@inria.fr>
Subject: [bug#61910] [PATCH] git-download: Download a bare Git repository from SWH.
Date: Thu, 02 Mar 2023 11:30:26 +0100	[thread overview]
Message-ID: <877cvzfnst.fsf@gmail.com> (raw)
In-Reply-To: <20230302091233.28226-1-ludo@gnu.org> ("Ludovic Courtès"'s message of "Thu, 2 Mar 2023 10:12:33 +0100")

Hi,

On jeu., 02 mars 2023 at 10:12, Ludovic Courtès <ludo@gnu.org> wrote:

> I don’t 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: <https://sympa.inria.fr/sympa/arc/swh-devel/2023-03/msg00003.html>

--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/0c1yfbxyv877mlgychfgvmk5ha2jqh52-gzip-1.10/bin:/gnu/store/8z1q7vjxylm6l4ibsywd4h6m6jv6zqm4-tar-1.34/bin'
hint: Using 'master' as the name for the initial branch. This default branch 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 <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: 	git branch -m <name>
Initialized empty Git repository in /gnu/store/n6rvypb3z386v0ml6n0xyga2x4q9ij58-hidapi-0.9.0-checkout/.git/
fatal: unable to access 'https://github.com/libusb/hidapi/': Could not resolve host: github.com
Failed to do a shallow fetch; retrying a full fetch...
fatal: unable to access 'https://github.com/libusb/hidapi/': Could not resolve 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/c95078f3645abc050536d3aaf76cb5fb6eb6b288/'
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-f10e443dcb1d90e42a4fb9519c0fc5429ba49ba9.idx
swh:1:rev:7da5cc91fc0d2dbe4df4f08cd31f6ca1a262418f.git/objects/pack/pack-f10e443dcb1d90e42a4fb9519c0fc5429ba49ba9.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-checkout'...
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




  reply	other threads:[~2023-03-02 10:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-02  9:12 [bug#61910] [PATCH] git-download: Download a bare Git repository from SWH Ludovic Courtès
2023-03-02 10:30 ` Simon Tournier [this message]
2023-03-02 12:05 ` [bug#61910] [PATCH v2] git-download: Apply CR/LF to " Simon Tournier
2023-03-02 13:15   ` [bug#61910] [PATCH] git-download: Download a bare " Ludovic Courtès
2023-03-02 13:50     ` Simon Tournier
2023-03-02 17:42       ` Simon Tournier
2023-03-03 11:12       ` Ludovic Courtès
2023-03-03 13:27         ` bug#61910: " Ludovic Courtès
2023-03-03 18:52           ` [bug#61910] " Simon Tournier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877cvzfnst.fsf@gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=61910@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    --cc=simon.tournier@inserm.fr \
    --cc=valentin.lorentz@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.