From: Simon Tournier <zimon.toutoune@gmail.com>
To: "Ludovic Courtès" <ludovic.courtes@inria.fr>
Cc: "Björn Höfling" <bjoern.hoefling@bjoernhoefling.de>,
guix-devel@gnu.org, "Lars-Dominik Braun" <lars@6xq.net>,
"Maxim Cournoyer" <maxim.cournoyer@gmail.com>
Subject: Re: Adding content-addressed URLs to https://guix.gnu.org/sources.json
Date: Tue, 25 Apr 2023 11:59:00 +0200 [thread overview]
Message-ID: <86pm7sb7vf.fsf@gmail.com> (raw)
In-Reply-To: <87cz3t44hi.fsf_-_@inria.fr>
Hi,
On Mon, 24 Apr 2023 at 18:41, Ludovic Courtès <ludovic.courtes@inria.fr> wrote:
> How does that sound?
The patch LGTM.
Cheers,
simon
PS: On a side note, building sources.json fails since ~1 month.
--8<---------------cut here---------------start------------->8---
$ guix repl -- build-package-metadata.scm /tmp/
guix repl: package metadata will be written to '/tmp/'
Backtrace:
[...]
In procedure %origin-patches-real: Wrong type argument: #<<computed-file> name: "ruby-sorbet-runtime-0.5.10610.20230106174520-1fa668010-checkout" gexp: #<gexp (begin (use-modules (guix build utils)) (copy-recursively (string-append #<gexp-input #<origin #<<git-reference> url: "https://github.com/sorbet/sorbet" commit: "0.5.10610.20230106174520-1fa668010" recursive?: #f> #<content-hash sha256:0f21dl06alxwn6xgdxyrkd58plmmsv04z2bcls9ld4cfzsrs5537> () 7fa67b7f6000>:out> "/gems/sorbet-" #<gexp-input "runtime":out>) #<gexp-output out>)) gnu/packages/ruby.scm:14078:5 7fa67b701c90> guile: #f options: (#:local-build? #t)>
--8<---------------cut here---------------end--------------->8---
Somehow, it reveals 3 currently uncovered cases: computed-file appearing
as,
1. ’origin’ in source field (ruby-sorbet-runtime)
2. ’inputs’ (racket-minimal)
3. ’snippet’ in origin in source field (chromium)
And I think we should not try to fix these cases on
build-package-metadata.scm side but instead investigate why they are
needed in the first place.
The regression in build-package-metadata is introduced by commit
7405e0c83f8f4eee5c4c40e809a40f2e4407a38c:
CommitDate: Tue Mar 28 22:22:24 2023 -0400
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
gnu: Add ruby-sorbet-runtime.
* gnu/packages/ruby.scm (ruby-sorbet-runtime): New variable.
(sorbet-version): New variable.
(sorbet-monorepo): New variable.
(make-sorbet-gem-source): New procedure.
(define (make-sorbet-gem-source gem)
"Return the source of GEM, a sub-directory."
(computed-file
(string-append "ruby-sorbet-" gem "-" sorbet-version "-checkout")
(with-imported-modules (source-module-closure '((guix build utils)))
#~(begin
(use-modules (guix build utils))
(copy-recursively (string-append #$sorbet-monorepo
"/gems/sorbet-" #$gem)
#$output)))))
[...]
(define-public ruby-sorbet-runtime
(package
(name "ruby-sorbet-runtime")
(version sorbet-version)
(source (make-sorbet-gem-source "runtime"))
This pattern appears to me wrong. It should use ’snippet’. And if the
point is to have a meaningful path in /gnu/store, as it is the case with
icecat or linux or emacs-company-box, the current way is
’computed-origin-method’ from (guix packages).
For ’ruby-sorbet-runtime’, the fix seems ’computed-origin-method’.
Well, some data behind ’computed-file’ appears in two other places:
./gnu/packages/racket.scm:505: (computed-file
./gnu/packages/chromium.scm:348: (computed-file
For ’chromium’, it appears to me somehow overcomplicated to extract all
the layers of patches; the work does not appears to me worth. Somehow,
I would accept that “our way“ to build Chromium would be lost.
It remains the case of ’racket-minimal’ – which is somehow a corner case
of ’package-direct-sources’,
--8<---------------cut here---------------start------------->8---
scheme@(guix-user)> ,use(gnu packages racket)
scheme@(guix-user)> racket-minimal
$1 = #<package racket-minimal@8.7 gnu/packages/racket.scm:542 7f88dea4b630>
scheme@(guix-user)> (package-direct-sources racket-minimal)
$2 = ()
--8<---------------cut here---------------end--------------->8---
However, the case is indeed covered by the chain:
+ racket-minimal lists the input racket-vm-cs
+ racket-vm-cs inherits from racket-vm-bc
+ racket-vm-bc inherits from racket-vm-cgc
+ racket-vm-cgc has the source %racket-origin
--8<---------------cut here---------------start------------->8---
scheme@(guix-user)> (package-direct-sources (@@ (gnu packages racket) racket-vm-cgc))
$3 = (#<origin #<<git-reference> url: "https://github.com/racket/racket" commit: "v8.7" recursive?: #f> #<content-hash sha256:0agwa1nrv8mizkqg9nffjli00djyx1r9n6y6b6ry7k13pb6i7xnj> ("/gnu/store/g6xlx4ik4skazfdl0a9vbd5r0lmqnnd9-guix-module-union/share/guile/site/3.0/gnu/packages/patches/racket-backport-8.7-pkg-strip.patch" "/gnu/store/g6xlx4ik4skazfdl0a9vbd5r0lmqnnd9-guix-module-union/share/guile/site/3.0/gnu/packages/patches/racket-chez-scheme-bin-sh.patch" "/gnu/store/g6xlx4ik4skazfdl0a9vbd5r0lmqnnd9-guix-module-union/share/guile/site/3.0/gnu/packages/patches/racket-rktio-bin-sh.patch" "/gnu/store/g6xlx4ik4skazfdl0a9vbd5r0lmqnnd9-guix-module-union/share/guile/site/3.0/gnu/packages/patches/racket-zuo-bin-sh.patch") 7f88dea48720>)
--8<---------------cut here---------------end--------------->8---
Therefore the source data of ’racket-minimal’ is correctly archived.
WDYT to modify ’ruby-sorbet-runtime’ and let ’chromium’ uncovered?
Cheers,
simon
next prev parent reply other threads:[~2023-04-25 10:12 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <ZAmrhccMfljep8+i@noor.fritz.box>
[not found] ` <20230312220021.22bfff4f@tangletp>
[not found] ` <878rfwgbng.fsf@gnu.org>
2023-04-03 21:42 ` SWH: extend sources.json and Mercurial (or not Git and not tarball) Simon Tournier
2023-04-24 16:41 ` Adding content-addressed URLs to https://guix.gnu.org/sources.json Ludovic Courtès
2023-04-25 9:59 ` Simon Tournier [this message]
2023-04-25 12:40 ` Ludovic Courtès
2023-04-25 12:59 ` Ludovic Courtès
2023-04-25 13:52 ` Maxim Cournoyer
2023-04-28 13:39 ` Simon Tournier
2023-05-01 0:39 ` Maxim Cournoyer
2023-05-02 7:39 ` Ludovic Courtès
2023-05-02 12:52 ` Maxim Cournoyer
2023-05-02 17:35 ` Simon Tournier
2023-05-04 7:13 ` Ludovic Courtès
2023-05-07 21:25 ` Ludovic Courtès
2023-05-08 1:06 ` Maxim Cournoyer
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=86pm7sb7vf.fsf@gmail.com \
--to=zimon.toutoune@gmail.com \
--cc=bjoern.hoefling@bjoernhoefling.de \
--cc=guix-devel@gnu.org \
--cc=lars@6xq.net \
--cc=ludovic.courtes@inria.fr \
--cc=maxim.cournoyer@gmail.com \
/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).