From: zimoun <zimon.toutoune@gmail.com>
To: 42286@debbugs.gnu.org
Subject: bug#42286: SWH fallback fails (git-fetch)
Date: Thu, 09 Jul 2020 02:36:55 +0200 [thread overview]
Message-ID: <86imexcymw.fsf@gmail.com> (raw)
Dear,
I think the fallback with SWH is broken. Here an example to reproduce.
--8<---------------cut here---------------start------------->8---
cd /tmp/
tar -xvf $(guix build -S hello)
cd hello-2.10
git init
git add *
git commit -m 'init'
--8<---------------cut here---------------end--------------->8---
Then I push this fresh repo to my own GitHub account. Because it is
easy to switch between public and private state option, which mimics
upstream loss.
Let create the well-known "hello" recipe, which is simply a copy/paste
of (gnu packages base).
--8<---------------cut here---------------start------------->8---
(define-module (hello)
#:use-module (guix packages)
#:use-module (guix build-system gnu)
#:use-module (guix git-download)
#:use-module (guix licenses))
(define-public hi
(package
(name "hi")
(version "2.10")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/zimoun/hello-example.git")
(commit "e1eefd033b8a2c4c81babc6fde08ebb116c6abb8")))
(sha256
(base32
"1im1gglfm4k10bh4mdaqzmx3lm3kivnsmxrvl6vyvmfqqzljq75l"))))
(build-system gnu-build-system)
(synopsis "Hello, GNU world: An example GNU package")
(description
"GNU Hello prints the message \"Hello, world!\" and then exits. It
serves as an example of standard GNU coding practices. As such, it supports
command-line arguments, multiple languages, and so on.")
(home-page "https://www.gnu.org/software/hello/")
(license gpl3+)))
--8<---------------cut here---------------end--------------->8---
For the sanity of the test, "guix build -L . hi" builds correctly and
returns the item: /gnu/store/jn8d031zx4znxy7s5zhj4dbr6xjsfq9v-hi-2.10
with Guix b7249aa.
The upstream source is archived on SWH with:
guix lint -L . hi -c archival
see
https://archive.softwareheritage.org/browse/origin/directory/?origin_url=https://github.com/zimoun/hello-example.git
and the logs in https://archive.softwareheritage.org/save/#requests
Note that running again "lint -c archival" returns nothing, which means
that the linter finds it on SWH, I guess. Well, I have not checked what
'lookup-content' returns yet. However, I filtered the first ~2000+
'packages-with-sources' with 'lookup-content' and all the 'git-fetch'
sources are returned #f, and some 'url-fetch' not. Another story,
another thread. :-)
Let clean the previous builds and downloads:
guix gc -D $(guix gc --list-dead | grep -E '(hi-2|git-checkout)')
And now let turn off upstream and so the maybe bug:
--8<---------------cut here---------------start------------->8---
guix build -L . hi
The following derivations will be built:
/gnu/store/x5vwhv8sn3l49vysq98j7h2rqqlff5zp-hi-2.10.drv
/gnu/store/jn6f86hg9zyyhms1vn56hviv4m9yjm8j-git-checkout.drv
building /gnu/store/jn6f86hg9zyyhms1vn56hviv4m9yjm8j-git-checkout.drv...
guile: warning: failed to install locale
environment variable `PATH' set to `/gnu/store/378zjf2kgajcfd7mfr98jn5xyc5wa3qv-gzip-1.10/bin:/gnu/store/sf3rbvb6iqcphgm1afbplcs72hsywg25-tar-1.32/bin'
Initialized empty Git repository in /gnu/store/884nsva9r8wkp40kbqyvpj1ad57jc5dd-git-checkout/.git/
fatal: could not read Username for 'https://github.com': No such device or address
Failed to do a shallow fetch; retrying a full fetch...
fatal: could not read Username for 'https://github.com': No such device or address
git-fetch: '/gnu/store/i2pkspl2vjvas0q85hw46y2li06rcmcg-git-minimal-2.26.2/bin/git fetch origin' failed with exit code 128
Trying content-addressed mirror at berlin.guixsd.org...
Trying content-addressed mirror at berlin.guixsd.org...
Trying to download from Software Heritage...
Backtrace:
4 (primitive-load "/gnu/store/s56y8npabah6jc1bqrhsac6wqb1?")
In ./guix/swh.scm:
573:13 3 (swh-download "https://github.com/zimoun/hello-example?" ?)
224:22 2 (call "https://archive.softwareheritage.org/api/1/revi?" ?)
In web/client.scm:
563:0 1 (http-get "https://archive.softwareheritage.org/api/1/?" ?)
231:6 0 (tls-wrap #<closed: file 7ffff5f1b690> _ # _)
web/client.scm:231:6: In procedure tls-wrap:
Error while printing exception.
builder for `/gnu/store/jn6f86hg9zyyhms1vn56hviv4m9yjm8j-git-checkout.drv' failed with exit code 1
build of /gnu/store/jn6f86hg9zyyhms1vn56hviv4m9yjm8j-git-checkout.drv failed
View build log at '/var/log/guix/drvs/jn/6f86hg9zyyhms1vn56hviv4m9yjm8j-git-checkout.drv.bz2'.
cannot build derivation `/gnu/store/x5vwhv8sn3l49vysq98j7h2rqqlff5zp-hi-2.10.drv': 1 dependencies couldn't be built
guix build: error: build of `/gnu/store/x5vwhv8sn3l49vysq98j7h2rqqlff5zp-hi-2.10.drv' failed
--8<---------------cut here---------------end--------------->8---
Let me know if moreinfo are required.
All the best,
simon
next reply other threads:[~2020-07-09 0:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-09 0:36 zimoun [this message]
2020-07-09 1:52 ` bug#42286: swh-download with https->http zimoun
2020-07-09 18:20 ` bug#42286: SWH fallback fails (git-fetch) zimoun
2020-07-09 22:24 ` Ludovic Courtès
2020-07-10 3:18 ` zimoun
2020-07-10 8:07 ` Ludovic Courtès
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86imexcymw.fsf@gmail.com \
--to=zimon.toutoune@gmail.com \
--cc=42286@debbugs.gnu.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).