From: "Ludovic Courtès" <ludo@gnu.org>
To: Liliana Marie Prikler <liliana.prikler@gmail.com>
Cc: Mark H Weaver <mhw@netris.org>,
50620@debbugs.gnu.org, zimoun <zimon.toutoune@gmail.com>
Subject: [bug#50620] [PATCH 0/2] Unify 'computed-origin-method' (linux, icecat)
Date: Thu, 30 Sep 2021 10:28:24 +0200 [thread overview]
Message-ID: <87r1d64gd3.fsf_-_@gnu.org> (raw)
In-Reply-To: <09c009ec61b8f9c1746f98916f492b8953b16dcc.camel@gmail.com> (Liliana Marie Prikler's message of "Thu, 30 Sep 2021 01:44:37 +0200")
Hi!
Liliana Marie Prikler <liliana.prikler@gmail.com> skribis:
> I think asking users to supply their own implementation of a 200 line
> long function to be a bit much to only do part of the job. On the
> other hand, the promise for linux-libre takes 400 lines and for icecat
> more than 600, but I think there are some things we ought to factor
> out. Particularly, looking up tools like tar or gzip and even the
> actual packing are always the same.
True, there’s a lot going on there, though that’s partly because it’s
generic.
> What we can't currently control is the top directory name and the
> output name. Both of that could be customized by supplying a "repack-
> name" field, which is used as basis for the directory name and the
> tarball name.
> Another thing we can't easily control are extraneous inputs to the
> patches, although the patch-inputs field *does* exist.
It’s possible to use a gexp as the snippet, where you can refer to
additional things in there (though in practice this is currently
impractical due to snippets not being thunks/promises.)
>> > A combination of the above might make computed origins obsolete for
>> > good, but the question remains whether that is a better
>> > design. What do y'all think?
>>
>> The design goal is to have clearly identified types: <package>,
>> <origin>, <operating-system>. For each of these, we want some
>> flexibility: build system, origin method, etc. However, beyond some
>> level of stretching, it may be clearer to just use the catch-all
>> ‘computed-file’ or to devise a new type. After all, that’s how
>> <origin> came to be (we could have used <package> instead with a
>> suitable build system).
>>
>> There’s a tension between “purely declarative” and “flexible”, and
>> it’s about striking a balance, subjectively.
> To be fair, I did think that "computed-tarball" might be a good
> abstraction in some sense, but on another hand origins are computed
> tarballs with a record interface.
>
> On a somewhat related note, origins have this weird situation going on
> where some things like git or svn checkouts need to be defined through
> them, whereas others may pass unhindered. I feel that this contributes
> to the equation of source = origin, that might have caused "computed-
> origin-method" to exist in the first place.
I’m not sure what you mean by “others may pass unhindered”? You mean
other VCS checkouts?
> What do you think?
I think the situation of IceCat and Linux-libre is unusual: 2 packages
out of 18K. That probably explains why we have a hard time figuring out
how to generalize the issues that ‘computed-origin-method’ addresses.
What you propose (IIUC) sounds interesting: we’d provide a
<computed-tarball> data type, which would make the source URL manifest
(something that’s useful for <https://issues.guix.gnu.org/50515>, for
instance), but the lowering step would be entirely custom, similar to
what it already looks like:
(define-record-type* <computed-tarball> computed-tarball make-computed-tarball
computed-tarball?
this-computed-tarball
(url computed-tarball-url) ;or could be an <origin>
(builder computer-tarball-builder (thunked)) ;gexp
(location computed-tarball-location (innate) (default (current-source-location))))
Is this what you had in mind?
Thanks,
Ludo’.
next prev parent reply other threads:[~2021-09-30 8:29 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-16 11:45 [bug#50620] [PATCH 0/2] Unify 'computed-origin-method' (linux, icecat) zimoun
2021-09-16 11:47 ` [bug#50620] [PATCH 1/2] guix: packages: Document 'computed-origin-method' zimoun
2021-09-16 11:47 ` [bug#50620] [PATCH 2/2] gnu: guix: Update to xxxx zimoun
2021-09-16 15:53 ` [bug#50620] [PATCH 1/2] guix: packages: Document 'computed-origin-method' Liliana Marie Prikler
2021-09-16 23:38 ` Mark H Weaver
2021-09-17 8:41 ` zimoun
2021-09-28 9:36 ` Mark H Weaver
2021-09-28 16:01 ` Liliana Marie Prikler
2021-09-28 16:37 ` zimoun
2021-09-28 17:24 ` Liliana Marie Prikler
2021-09-29 8:32 ` zimoun
2021-09-29 10:10 ` Liliana Marie Prikler
2021-09-29 13:17 ` zimoun
2021-09-29 14:36 ` Liliana Marie Prikler
2021-09-29 17:48 ` zimoun
2021-09-29 19:10 ` Liliana Marie Prikler
2021-09-29 20:15 ` zimoun
2021-09-29 22:13 ` Liliana Marie Prikler
2021-09-29 23:31 ` zimoun
2021-09-29 21:40 ` Mark H Weaver
2021-09-29 22:45 ` zimoun
2021-09-30 7:11 ` Liliana Marie Prikler
2021-09-29 13:16 ` [bug#50620] [PATCH 0/2] Unify 'computed-origin-method' (linux, icecat) Ludovic Courtès
2021-09-29 15:34 ` Liliana Marie Prikler
2021-09-29 21:47 ` Ludovic Courtès
2021-09-29 23:44 ` Liliana Marie Prikler
2021-09-30 8:28 ` Ludovic Courtès [this message]
2021-09-30 14:17 ` Liliana Marie Prikler
2021-09-30 20:09 ` Ludovic Courtès
2021-09-30 21:49 ` Liliana Marie Prikler
2021-09-29 20:42 ` Mark H Weaver
2021-09-29 21:34 ` Ludovic Courtès
2021-09-30 22:17 ` bug#50620: " 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r1d64gd3.fsf_-_@gnu.org \
--to=ludo@gnu.org \
--cc=50620@debbugs.gnu.org \
--cc=liliana.prikler@gmail.com \
--cc=mhw@netris.org \
--cc=zimon.toutoune@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 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.