[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#61363] [PATCH 2/2] self: Apply grafts to the outputs of the guix de
From: |
Ludovic Courtès |
Subject: |
[bug#61363] [PATCH 2/2] self: Apply grafts to the outputs of the guix derivation. |
Date: |
Wed, 22 Feb 2023 10:16:14 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
Hi,
Christopher Baines <mail@cbaines.net> skribis:
> Rather than having grafts apply to the derivation itself. This moves grafting
> here to work like grafting for packages, where you can think of the grafted
> outputs as a transformed variant of the ungrafted outputs.
Hmm.
> I'm looking at this as it'll allow the Guix Data Service to compute the
> derivations without grafts, and for these to be useful for substitutes
> regardless of whether users are using grafts.
How does it help exactly? By disabling grafts in that context?
> +++ b/guix/self.scm
> @@ -752,7 +752,8 @@ (define* (compiled-guix source #:key
> (gzip (specification->package "gzip"))
> (bzip2 (specification->package "bzip2"))
> (xz (specification->package "xz"))
> - (guix (specification->package "guix")))
> + (guix (specification->package "guix"))
> + (graft? #t))
> "Return a file-like object that contains a compiled Guix."
> (define guile-avahi
> (specification->package "guile-avahi"))
> @@ -802,6 +803,12 @@ (define dependencies
> guile-json guile-semver guile-ssh guile-sqlite3
> guile-lib guile-zlib guile-lzlib guile-zstd)))
>
> + (define packages
> + (cons* gzip
> + bzip2
> + xz
> + dependencies))
> +
[...]
> + (let ((obj (built-modules (lambda (node)
> + (list (node-source node)
> + (node-compiled node))))))
> + (if graft?
> + (explicit-grafting obj packages)
> + obj)))
There are two things I’m not comfortable with:
1. Having <explicit-grafting> in (guix packages); it looks misplaced.
2. More importantly, manually listing packages that might require
grafting looks like a slippery slope (“oops! we’re not getting the
GnuTLS graft for that CVE, too bad”).
I designed and implemented several variants to try and delay grafting.
One of them consisted in carrying graft information in gexps:
https://git.savannah.gnu.org/cgit/guix.git/log?h=wip-gexp-grafts
It’s kinda similar to what you’re proposing in that graft information is
carried as far as possible. The main difference is that it’s automated.
Hmm needs more thought.
Ludo’.
[bug#61363] [PATCH 0/2] self: Apply grafts to the outputs of the guix derivation., Christopher Baines, 2023/02/10
[bug#61363] [PATCH v2 1/3] packages: Export guile-for-grafts., Christopher Baines, 2023/02/28