[PATCH 0/2] Enable specifying the available builtin builders.

  • Done
  • quality assurance status badge
Details
3 participants
  • Ludovic Courtès
  • Christopher Baines
  • Simon Tournier
Owner
unassigned
Submitted by
Christopher Baines
Severity
normal
C
C
Christopher Baines wrote on 18 May 15:11 +0200
(address . guix-patches@gnu.org)
87y187b6xv.fsf@cbaines.net
This will enable addressing [11 by having the data service specify
'("download") for the builtin builders.



Christopher Baines (2):
guix: store: Enable specifying the available builtin builders.
guix: channels: Enable specifiying available builtin builders.

build-aux/build-self.scm | 28 ++++++++++++++++++--------
guix/channels.scm | 43 +++++++++++++++++++++++++++++-----------
guix/store.scm | 13 ++++++++----
3 files changed, 60 insertions(+), 24 deletions(-)


base-commit: 0846eaecd45783bf40e8dc67b0c16f71068524b7
--
2.41.0
-----BEGIN PGP SIGNATURE-----

iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmZIqRxfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh
aW5lcy5uZXQACgkQXiijOwuE9XdkqhAAiSoK89xGVo8caiP6YdEi+YmUOH08gEmi
C6NajcBASwFCeOI6fHxUpeaK4kCJ4DE7AhTBFcOwEgcfo6xELL/LiIdhEwvWi9hy
P4cGCBP/VyN/Vbthaa2LOsncr81dBqrtyrjBugTi6nmy4Ri2TckzTekN9gZ+XO8E
4vHgDghaKtiBHYR6insGzie9JbGSoziiUCq/2qe49DJy4cZEqzuaZe/5+n5uAlRc
UE062bgBwWjE+SdAJu7UDtu0peiGhxeuoBdqfL92vBQYpP75UtuyRymRCdbX1FBB
r5Quq9lfXjLHNd2nAfkSU7ghrjNfGUSwR+1vr4vPni43nOjoJlm5OEihPU8ZhwIF
dq6fZAzG0RhYbOmWIAjt3KLqg+EgNptIkLerram9fBoPg4+C2BOC/0E0Dt2qheWa
B1fFkdLK/M3Q86b2UsevyXq/Wrsbj0g8KlzNDz86Zu9adIzKplu5cOUUEeG+WPau
Dh9K7+6BZ9HoOov4ckSU7F1P+OkIY/B4MNJpLw7Uy9gLFfL5vAPHnTbuNOlXz0PJ
vvXQfUiTjVs38wg6Fph2UU8+WHGjBONFfsWyQMF9un8xHoRWo1xbLoMqllAguAjZ
Nahn+jWuW25D3o6cXbaeoSoarY6lFs8EKgUgSqMVve0yaXud45YlEXGa03vY6gAS
d5EaryoyYoQ=
=OOIg
-----END PGP SIGNATURE-----

C
C
Christopher Baines wrote on 18 May 15:19 +0200
[PATCH 1/2] guix: store: Enable specifying the available builtin builders.
(address . 71038@debbugs.gnu.org)
6b9c634c024b6fd7a50d3b82edc244676a8ca8e8.1716038375.git.mail@cbaines.net
To open-connection and port->connection. This overrides the discovered
builtin builders that the daemon says it provides.

This is useful when you want to generate compatible derivations that can be
run with a daemon that potentially doesn't support builtin builders that the
daemon you're using to generate the derivations has.

I'm looking at this in particular because I want to use this in the data
service, since it provides substitutes for derivations, and since these can be
built on other machines, it's useful to control which builtin builders they
depend on.

* guix/store.scm (open-connection, port->connection): Accept
#:assume-available-builtin-builders and use this instead of
%built-in-builders.


Change-Id: I45d58ab93b6d276d280552858fc81ebc2b58828a
---
guix/store.scm | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)

Toggle diff (49 lines)
diff --git a/guix/store.scm b/guix/store.scm
index 58ddaa8d15..0c734cdca7 100644
--- a/guix/store.scm
+++ b/guix/store.scm
@@ -571,7 +571,7 @@ (define* (connect-to-daemon uri #:key non-blocking?)
(define* (open-connection #:optional (uri (%daemon-socket-uri))
#:key port (reserve-space? #t) cpu-affinity
- non-blocking?)
+ non-blocking? assume-available-builtin-builders)
"Connect to the daemon at URI (a string), or, if PORT is not #f, use it as
the I/O port over which to communicate to a build daemon.
@@ -616,7 +616,9 @@ (define* (open-connection #:optional (uri (%daemon-socket-uri))
(when (>= (protocol-minor v) 11)
(write-int (if reserve-space? 1 0) port))
(letrec* ((built-in-builders
- (delay (%built-in-builders conn)))
+ (if assume-available-builtin-builders
+ (delay assume-available-builtin-builders)
+ (delay (%built-in-builders conn))))
(caches
(make-vector
(atomic-box-ref %store-connection-caches)
@@ -635,7 +637,8 @@ (define* (open-connection #:optional (uri (%daemon-socket-uri))
conn))))))
(define* (port->connection port
- #:key (version %protocol-version))
+ #:key (version %protocol-version)
+ assume-available-builtin-builders)
"Assimilate PORT, an input/output port, and return a connection to the
daemon, assuming the given protocol VERSION.
@@ -654,7 +657,9 @@ (define* (port->connection port
(make-vector
(atomic-box-ref %store-connection-caches)
vlist-null)
- (delay (%built-in-builders connection))))
+ (if assume-available-builtin-builders
+ (delay assume-available-builtin-builders)
+ (delay (%built-in-builders connection)))))
connection))

base-commit: 0846eaecd45783bf40e8dc67b0c16f71068524b7
--
2.41.0
C
C
Christopher Baines wrote on 18 May 15:19 +0200
[PATCH 2/2] guix: channels: Enable specifiying available builtin builders.
(address . 71038@debbugs.gnu.org)
3724435f5b2e86be53ffba5bffcbfdf493b48e5c.1716038375.git.mail@cbaines.net
When computing channel instance derivations.

This is useful when you want to generate compatible derivations that can be
run with a daemon that potentially doesn't support builtin builders that the
daemon you're using to generate the derivations has.

I'm looking at this in particular because I want to use this in the data
service, since it provides substitutes for derivations, and since these can be
built on other machines, it's useful to control which builtin builders they
depend on.


* build-aux/build-self.scm (build-program): Accept
#:assume-available-builtin-builders and pass along to port->connection or
open-connection as approriate.
(build): Accept and pass on #:assume-available-builtin-builders.
* guix/channels.scm (build-from-source, build-channel-instance,
channel-instance-derivations, channel-instances->manifest,
channel-instances->derivation): Accept and pass on
#:assume-available-builtin-builders.

Change-Id: I315c990de66c6f7dca25a859165a5568abe385ea
---
build-aux/build-self.scm | 28 ++++++++++++++++++--------
guix/channels.scm | 43 +++++++++++++++++++++++++++++-----------
2 files changed, 51 insertions(+), 20 deletions(-)

Toggle diff (174 lines)
diff --git a/build-aux/build-self.scm b/build-aux/build-self.scm
index 02822a2ee8..7afb13c1e4 100644
--- a/build-aux/build-self.scm
+++ b/build-aux/build-self.scm
@@ -241,7 +241,8 @@ (define guile-gcrypt
(define* (build-program source version
#:optional (guile-version (effective-version))
- #:key (pull-version 0) (channel-metadata #f))
+ #:key (pull-version 0) (channel-metadata #f)
+ assume-available-builtin-builders)
"Return a program that computes the derivation to build Guix from SOURCE."
(define select?
;; Select every module but (guix config) and non-Guix modules.
@@ -331,11 +332,20 @@ (define* (build-program source version
;; case, attempt to open a new connection.
(let* ((proto (string->number protocol-version))
(store (if (integer? proto)
- (port->connection (duplicate-port
- (current-input-port)
- "w+0")
- #:version proto)
- (open-connection)))
+ (port->connection
+ (duplicate-port
+ (current-input-port)
+ "w+0")
+ #:version proto
+ #$@(if assume-available-builtin-builders
+ #~(#:assume-available-builtin-builders
+ '(#$@assume-available-builtin-builders))
+ '()))
+ (open-connection
+ #$@(if assume-available-builtin-builders
+ #~(#:assume-available-builtin-builders
+ '(#$@assume-available-builtin-builders))
+ '()))))
(sock (socket AF_UNIX SOCK_STREAM 0)))
;; Connect to BUILD-OUTPUT and send it the raw
;; build output.
@@ -406,7 +416,7 @@ (define* (build source
(guile-version (if (> pull-version 0)
"3.0"
(effective-version)))
-
+ assume-available-builtin-builders
#:allow-other-keys
#:rest rest)
"Return a derivation that unpacks SOURCE into STORE and compiles Scheme
@@ -415,7 +425,9 @@ (define* (build source
;; SOURCE.
(mlet %store-monad ((build (build-program source version guile-version
#:channel-metadata channel-metadata
- #:pull-version pull-version))
+ #:pull-version pull-version
+ #:assume-available-builtin-builders
+ assume-available-builtin-builders))
(system (if system (return system) (current-system)))
(home -> (getenv "HOME"))
diff --git a/guix/channels.scm b/guix/channels.scm
index 0d7bc541cc..6469d08bb9 100644
--- a/guix/channels.scm
+++ b/guix/channels.scm
@@ -704,7 +704,8 @@ (define (with-trivial-build-handler mvalue)
store))))
(define* (build-from-source instance
- #:key core verbose? (dependencies '()) system)
+ #:key core verbose? (dependencies '()) system
+ assume-available-builtin-builders)
"Return a derivation to build Guix from INSTANCE, using the self-build
script contained therein. When CORE is true, build package modules under
SOURCE using CORE, an instance of Guix. By default, build for the current
@@ -750,20 +751,25 @@ (define* (build-from-source instance
#:verbose? verbose? #:version commit
#:system system
#:channel-metadata (channel-instance->sexp instance)
- #:pull-version %pull-version))))
+ #:pull-version %pull-version
+ #:assume-available-builtin-builders
+ assume-available-builtin-builders))))
;; Build a set of modules that extend Guix using the standard method.
(standard-module-derivation name source core dependencies)))
(define* (build-channel-instance instance system
- #:optional core (dependencies '()))
+ #:optional core (dependencies '())
+ #:key assume-available-builtin-builders)
"Return, as a monadic value, the derivation for INSTANCE, a channel
instance, for SYSTEM. DEPENDENCIES is a list of extensions providing Guile
modules that INSTANCE depends on."
(build-from-source instance
#:core core
#:dependencies dependencies
- #:system system))
+ #:system system
+ #:assume-available-builtin-builders
+ assume-available-builtin-builders))
(define (resolve-dependencies instances)
"Return a procedure that, given one of the elements of INSTANCES, returns
@@ -793,7 +799,8 @@ (define (resolve-dependencies instances)
(lambda (instance)
(vhash-foldq* cons '() instance edges)))
-(define* (channel-instance-derivations instances #:key system)
+(define* (channel-instance-derivations instances #:key system
+ assume-available-builtin-builders)
"Return the list of derivations to build INSTANCES, in the same order as
INSTANCES. Build for the current system by default, or SYSTEM if specified."
(define core-instance
@@ -809,11 +816,15 @@ (define* (channel-instance-derivations instances #:key system)
(define (instance->derivation instance)
(mlet %store-monad ((system (if system (return system) (current-system))))
(mcached (if (eq? instance core-instance)
- (build-channel-instance instance system)
+ (build-channel-instance instance system
+ #:assume-available-builtin-builders
+ assume-available-builtin-builders)
(mlet %store-monad ((core (instance->derivation core-instance))
(deps (mapm %store-monad instance->derivation
(edges instance))))
- (build-channel-instance instance system core deps)))
+ (build-channel-instance instance system core deps
+ #:assume-available-builtin-builders
+ assume-available-builtin-builders)))
instance
system)))
@@ -915,7 +926,8 @@ (define (channel-instance->sexp instance)
intro))))))
'()))))
-(define* (channel-instances->manifest instances #:key system)
+(define* (channel-instances->manifest instances #:key system
+ assume-available-builtin-builders)
"Return a profile manifest with entries for all of INSTANCES, a list of
channel instances. By default, build for the current system, or SYSTEM if
specified."
@@ -934,8 +946,11 @@ (define* (channel-instances->manifest instances #:key system)
(properties
`((source ,(channel-instance->sexp instance)))))))
- (mlet* %store-monad ((derivations (channel-instance-derivations instances
- #:system system))
+ (mlet* %store-monad ((derivations (channel-instance-derivations
+ instances
+ #:system system
+ #:assume-available-builtin-builders
+ assume-available-builtin-builders))
(entries -> (map instance->entry instances derivations)))
(return (manifest entries))))
@@ -990,10 +1005,14 @@ (define %channel-profile-hooks
;; The default channel profile hooks.
(cons package-cache-file %default-profile-hooks))
-(define (channel-instances->derivation instances)
+(define* (channel-instances->derivation instances
+ #:key assume-available-builtin-builders)
"Return the derivation of the profile containing INSTANCES, a list of
channel instances."
- (mlet %store-monad ((manifest (channel-instances->manifest instances)))
+ (mlet %store-monad ((manifest (channel-instances->manifest
+ instances
+ #:assume-available-builtin-builders
+ assume-available-builtin-builders)))
;; Emit a profile in format version so that, if INSTANCES denotes an old
;; Guix, it can still read that profile, for instance for the purposes of
;; 'guix describe'.
--
2.41.0
S
S
Simon Tournier wrote on 22 May 12:58 +0200
Re: [bug#71038] [PATCH 1/2] guix: store: Enable specifying the available builtin builders.
87a5ki3ygr.fsf@gmail.com
Hi Chris,

On sam., 18 mai 2024 at 14:19, Christopher Baines <mail@cbaines.net> wrote:

Toggle quote (11 lines)
> diff --git a/guix/store.scm b/guix/store.scm
> index 58ddaa8d15..0c734cdca7 100644
> --- a/guix/store.scm
> +++ b/guix/store.scm
> @@ -571,7 +571,7 @@ (define* (connect-to-daemon uri #:key non-blocking?)
>
> (define* (open-connection #:optional (uri (%daemon-socket-uri))
> #:key port (reserve-space? #t) cpu-affinity
> - non-blocking?)
> + non-blocking? assume-available-builtin-builders)

Why add the variable %assume-available-builtin-builders and default to
it?

Something like:

Toggle snippet (11 lines)
(define %assume-available-builtin-builders
"List of builtin builders supported by the builder Guix daemon."
(list "download" "git-download"))

(define* (open-connection #:optional (uri (%daemon-socket-uri))
#:key port (reserve-space? #t) cpu-affinity
non-blocking?)
non-blocking?
(assume-available-builtin-builders %assume-available-builtin-builders))

And then default to this %assume-available-builtin-builders elsewhere in
[PATCH 2/2]. IMHO, it changes almost nothing but it would help to know
(document) what to pass as argument.

Cheers,
simon
C
C
Christopher Baines wrote on 26 May 10:10 +0200
(name . Simon Tournier)(address . zimon.toutoune@gmail.com)
87sey5f0xr.fsf@cbaines.net
Simon Tournier <zimon.toutoune@gmail.com> writes:

Toggle quote (34 lines)
> On sam., 18 mai 2024 at 14:19, Christopher Baines <mail@cbaines.net> wrote:
>
>> diff --git a/guix/store.scm b/guix/store.scm
>> index 58ddaa8d15..0c734cdca7 100644
>> --- a/guix/store.scm
>> +++ b/guix/store.scm
>> @@ -571,7 +571,7 @@ (define* (connect-to-daemon uri #:key non-blocking?)
>>
>> (define* (open-connection #:optional (uri (%daemon-socket-uri))
>> #:key port (reserve-space? #t) cpu-affinity
>> - non-blocking?)
>> + non-blocking? assume-available-builtin-builders)
>
> Why add the variable %assume-available-builtin-builders and default to
> it?
>
> Something like:
>
> --8<---------------cut here---------------start------------->8---
> (define %assume-available-builtin-builders
> "List of builtin builders supported by the builder Guix daemon."
> (list "download" "git-download"))
>
> (define* (open-connection #:optional (uri (%daemon-socket-uri))
> #:key port (reserve-space? #t) cpu-affinity
> non-blocking?)
> non-blocking?
> (assume-available-builtin-builders %assume-available-builtin-builders))
> --8<---------------cut here---------------end--------------->8---
>
> And then default to this %assume-available-builtin-builders elsewhere in
> [PATCH 2/2]. IMHO, it changes almost nothing but it would help to know
> (document) what to pass as argument.

I think it's sensible to not use a fixed list by default, but check what
the daemon supports.
-----BEGIN PGP SIGNATURE-----

iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmZS7oBfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh
aW5lcy5uZXQACgkQXiijOwuE9Xf++A/+MLo6Soaxrz5sb8pCizVsRG9iCNpHwOZx
pFyDWiOhN2QnbFY5GBn/duq3+a4oDvEhRz15u430jWFw0yolHhv+r/ylydYKvyGF
qyJ1MZ+oACzk7wHF7JcER5TsAoJHrOqhgAUfXwdwFJNxCeKlsTTuF+al3Deyko5G
/nxk/DkXSsTPLA2U7blalytkyICdj9Gu4LOOzRphXNNiw5u1+DDN++ZkrQ+ngGyl
WprBhBnvRxHu9Rk/SQftFXLlpMmoRMLuYC2IWwpwqGB1/BeDv91GhcOHyiuGbajS
tV+10kYigehOknNJhA5V0amtjWTZ61bZ9nzeNdpKBth1gg+phSuGi431s1fz29+A
P3oHQgh3o94Mw5gVkaoIGe9rzChc5PFyAASh/5/1JaPFnAEn7ce3oYyBsNPFBmWs
wvUG1kOt3AQ0r8Eb15k2ROx5rmLxMVVSP9xk2JcN8uA/bpwaXUhNv3IJkQoKpWqd
YwiQ153TV6FvsIdL3gfafOnwNm9ut+6SCD3wwZdcVz6oXn29FDOHoqb3ZWgigs1F
JcRJr7VnSiSSHTmpttw0aJViQUuackrEkQpEFtL7JFYX50z30Q+ezkC0EtH5F1Cv
VbxVZFwH0TyImSVVRd+4rZdJh07uZlv+ZTPaSFyv48HkPsVX6p3IP5sL2xUwWbVK
9XLcduTy2Eg=
=K8Wp
-----END PGP SIGNATURE-----

S
S
Simon Tournier wrote on 27 May 19:19 +0200
(name . Christopher Baines)(address . mail@cbaines.net)
875xuz18c4.fsf@gmail.com
Hi Chris,

On Sun, 26 May 2024 at 09:10, Christopher Baines <mail@cbaines.net> wrote:

Toggle quote (29 lines)
>>> (define* (open-connection #:optional (uri (%daemon-socket-uri))
>>> #:key port (reserve-space? #t) cpu-affinity
>>> - non-blocking?)
>>> + non-blocking? assume-available-builtin-builders)
>>
>> Why add the variable %assume-available-builtin-builders and default to
>> it?
>>
>> Something like:
>>
>> --8<---------------cut here---------------start------------->8---
>> (define %assume-available-builtin-builders
>> "List of builtin builders supported by the builder Guix daemon."
>> (list "download" "git-download"))
>>
>> (define* (open-connection #:optional (uri (%daemon-socket-uri))
>> #:key port (reserve-space? #t) cpu-affinity
>> non-blocking?)
>> non-blocking?
>> (assume-available-builtin-builders %assume-available-builtin-builders))
>> --8<---------------cut here---------------end--------------->8---
>>
>> And then default to this %assume-available-builtin-builders elsewhere in
>> [PATCH 2/2]. IMHO, it changes almost nothing but it would help to know
>> (document) what to pass as argument.
>
> I think it's sensible to not use a fixed list by default, but check what
> the daemon supports.

Do you mean dynamically construct the proposal of
%assume-available-builtin-builders? Why not.

Aside, my point is to provide a default value for the new argument and
not let it free. Because when reading the source code, not knowing its
type, neither any meaningful value make it hard to remember what it use
or how to use it, IMHO. That’s why I am suggesting something like
%assume-available-builtin-builders that collects the acceptable values
– for the most recent daemon, indeed; well it would simplify the
documentation of this new parameter / argument.

Considering your patch, how do I know that I could used it, as [1]:

Toggle snippet (6 lines)
As in:

(open-connection
#:assume-available-builtin-builders '("download"))

Because it is not clear from the docstring. And there is many
procedures that would require some docstring update with this new
procedure argument. :-)


1: bug#67250: builtin:git-download capability detection not working for the bordeaux build farm
Ludovic Courtès <ludo@gnu.org>
Wed, 22 Nov 2023 11:19:42 +0100
id:87bkbmm6o1.fsf@gnu.org

Cheers,
simon
C
C
Christopher Baines wrote on 11 Jun 21:26 +0200
(name . Simon Tournier)(address . zimon.toutoune@gmail.com)
87a5jr8en5.fsf@cbaines.net
Simon Tournier <zimon.toutoune@gmail.com> writes:

Toggle quote (42 lines)
> On Sun, 26 May 2024 at 09:10, Christopher Baines <mail@cbaines.net> wrote:
>
>>>> (define* (open-connection #:optional (uri (%daemon-socket-uri))
>>>> #:key port (reserve-space? #t) cpu-affinity
>>>> - non-blocking?)
>>>> + non-blocking? assume-available-builtin-builders)
>>>
>>> Why add the variable %assume-available-builtin-builders and default to
>>> it?
>>>
>>> Something like:
>>>
>>> --8<---------------cut here---------------start------------->8---
>>> (define %assume-available-builtin-builders
>>> "List of builtin builders supported by the builder Guix daemon."
>>> (list "download" "git-download"))
>>>
>>> (define* (open-connection #:optional (uri (%daemon-socket-uri))
>>> #:key port (reserve-space? #t) cpu-affinity
>>> non-blocking?)
>>> non-blocking?
>>> (assume-available-builtin-builders %assume-available-builtin-builders))
>>> --8<---------------cut here---------------end--------------->8---
>>>
>>> And then default to this %assume-available-builtin-builders elsewhere in
>>> [PATCH 2/2]. IMHO, it changes almost nothing but it would help to know
>>> (document) what to pass as argument.
>>
>> I think it's sensible to not use a fixed list by default, but check what
>> the daemon supports.
>
> Do you mean dynamically construct the proposal of
> %assume-available-builtin-builders? Why not.
>
> Aside, my point is to provide a default value for the new argument and
> not let it free. Because when reading the source code, not knowing its
> type, neither any meaningful value make it hard to remember what it use
> or how to use it, IMHO. That’s why I am suggesting something like
> %assume-available-builtin-builders that collects the acceptable values
> – for the most recent daemon, indeed; well it would simplify the
> documentation of this new parameter / argument.

I'm not sure I follow. I guess open-connection could have a
#:build-in-builders argument that expects a procedure that takes the
store connection, and returns the list of strings. That would allow it
to have the default of %built-in-builders from (guix store).

While this adds the flexibility for users to provide their own way of
setting the builtin builders enabled on a connection, I'm not sure
there's a need for it currently and I don't think it addresses your
concern about not knowing what value to provide.

It sounds easier just to make it clear from the docstrings that you
provide a list of strings, and have it default to #f to indicate to the
daemon's buildin builders.
-----BEGIN PGP SIGNATURE-----

iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmZopN5fFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh
aW5lcy5uZXQACgkQXiijOwuE9Xd4QA//UI6mRApXQdXUzR/9JiF5yeilQ7TKjIlJ
/eajba3vSyzchjKnKiOPhJgpgzSQ3vvppsSJHiXXy3wyhv1z5vNF55GmZtNY720m
VGvF6imjom1TUnIZw2bKsBSA0Pj0ctRbsMDb3U1D1XLPpZHa/om4jclXbpIYzVT5
UJgLatZyayd/3OjVuQ78shmgaeOdV6BLRZPe118mJI8uJI7Kfxdb+MyWMmp/wN3E
bH3P+ajJjWoSv6qClJdrChJ+UlWnCki11EK4UWtJzrA93FAU5iMl7MEYYOwrgL3i
VbsdqXPkgWMypvnzsxhZNKprSXkz2PVcRFVg3MvJSEc8JlLAngTQqnkGGJsyvcBk
4qaannuRp0WS7psZmVH9FCNQGaT189pBUdgrFlb20gJjFJlOLQsCgJaH0YA4BqQQ
nskeVbFj8S4EyvsLobmUXNSNVb89hm9+GisrT7K4qQ8MboKx/WEZtTqchRZO89nX
dmx9jSgAeDhJq/RS7hdzh7SZsTmEt+rcsMgRsFZRiZnrEBEghJi2xb6AjhWozxvA
LPIVAgEnmyMgQrLm1KIkyWhEwXh5hLMx8d6yUFsWjy0ZSe905hF6vKU0dcKactKP
xbGP+OHGP4V4jRGy5KhpYshYNH6cNY/7KEED8PR6o/CvRyOlefopMgTz8g3QSHQX
X1gV4+qnmbI=
=dKYM
-----END PGP SIGNATURE-----

C
C
Christopher Baines wrote on 24 Jun 15:43 +0200
[PATCH v2 2/2] guix: channels: Enable specifiying available builtin builders.
(address . 71038@debbugs.gnu.org)
319c7822ef542dc412d55af616ecbeb86b005c8b.1719236626.git.mail@cbaines.net
When computing channel instance derivations.

This is useful when you want to generate compatible derivations that can be
run with a daemon that potentially doesn't support builtin builders that the
daemon you're using to generate the derivations has.

I'm looking at this in particular because I want to use this in the data
service, since it provides substitutes for derivations, and since these can be
built on other machines, it's useful to control which builtin builders they
depend on.


* build-aux/build-self.scm (build-program): Accept
#:assume-available-builtin-builders and pass along to port->connection or
open-connection as approriate.
(build): Accept and pass on #:assume-available-builtin-builders.
* guix/channels.scm (build-from-source, build-channel-instance,
channel-instance-derivations, channel-instances->manifest,
channel-instances->derivation): Accept and pass on
#:assume-available-builtin-builders.

Change-Id: I315c990de66c6f7dca25a859165a5568abe385ea
---
build-aux/build-self.scm | 33 ++++++++++++++------
guix/channels.scm | 67 ++++++++++++++++++++++++++++++----------
2 files changed, 74 insertions(+), 26 deletions(-)

Toggle diff (207 lines)
diff --git a/build-aux/build-self.scm b/build-aux/build-self.scm
index 02822a2ee8..c14bebd0b1 100644
--- a/build-aux/build-self.scm
+++ b/build-aux/build-self.scm
@@ -241,8 +241,12 @@ (define guile-gcrypt
(define* (build-program source version
#:optional (guile-version (effective-version))
- #:key (pull-version 0) (channel-metadata #f))
- "Return a program that computes the derivation to build Guix from SOURCE."
+ #:key (pull-version 0) (channel-metadata #f)
+ assume-available-builtin-builders)
+ "Return a program that computes the derivation to build Guix from SOURCE.
+If ASSUME-AVAILABLE-BUILTIN-BUILDERS is provided, it should be a list of
+strings and this will be used instead of the builtin builders provided by the
+build daemon, from within the generated build program."
(define select?
;; Select every module but (guix config) and non-Guix modules.
;; Also exclude (guix channels): it is autoloaded by (guix describe), but
@@ -331,11 +335,20 @@ (define* (build-program source version
;; case, attempt to open a new connection.
(let* ((proto (string->number protocol-version))
(store (if (integer? proto)
- (port->connection (duplicate-port
- (current-input-port)
- "w+0")
- #:version proto)
- (open-connection)))
+ (port->connection
+ (duplicate-port
+ (current-input-port)
+ "w+0")
+ #:version proto
+ #$@(if assume-available-builtin-builders
+ #~(#:assume-available-builtin-builders
+ '(#$@assume-available-builtin-builders))
+ '()))
+ (open-connection
+ #$@(if assume-available-builtin-builders
+ #~(#:assume-available-builtin-builders
+ '(#$@assume-available-builtin-builders))
+ '()))))
(sock (socket AF_UNIX SOCK_STREAM 0)))
;; Connect to BUILD-OUTPUT and send it the raw
;; build output.
@@ -406,7 +419,7 @@ (define* (build source
(guile-version (if (> pull-version 0)
"3.0"
(effective-version)))
-
+ assume-available-builtin-builders
#:allow-other-keys
#:rest rest)
"Return a derivation that unpacks SOURCE into STORE and compiles Scheme
@@ -415,7 +428,9 @@ (define* (build source
;; SOURCE.
(mlet %store-monad ((build (build-program source version guile-version
#:channel-metadata channel-metadata
- #:pull-version pull-version))
+ #:pull-version pull-version
+ #:assume-available-builtin-builders
+ assume-available-builtin-builders))
(system (if system (return system) (current-system)))
(home -> (getenv "HOME"))
diff --git a/guix/channels.scm b/guix/channels.scm
index 0d7bc541cc..dfdf6cfe3f 100644
--- a/guix/channels.scm
+++ b/guix/channels.scm
@@ -704,11 +704,15 @@ (define (with-trivial-build-handler mvalue)
store))))
(define* (build-from-source instance
- #:key core verbose? (dependencies '()) system)
+ #:key core verbose? (dependencies '()) system
+ assume-available-builtin-builders)
"Return a derivation to build Guix from INSTANCE, using the self-build
script contained therein. When CORE is true, build package modules under
SOURCE using CORE, an instance of Guix. By default, build for the current
-system, or SYSTEM if specified."
+system, or SYSTEM if specified. If ASSUME-AVAILABLE-BUILTIN-BUILDERS is
+provided, it should be a list of strings and this will be used instead of the
+builtin builders provided by the build daemon for store connections used
+during this process."
(define name
(symbol->string
(channel-name (channel-instance-channel instance))))
@@ -750,20 +754,28 @@ (define* (build-from-source instance
#:verbose? verbose? #:version commit
#:system system
#:channel-metadata (channel-instance->sexp instance)
- #:pull-version %pull-version))))
+ #:pull-version %pull-version
+ #:assume-available-builtin-builders
+ assume-available-builtin-builders))))
;; Build a set of modules that extend Guix using the standard method.
(standard-module-derivation name source core dependencies)))
(define* (build-channel-instance instance system
- #:optional core (dependencies '()))
+ #:optional core (dependencies '())
+ #:key assume-available-builtin-builders)
"Return, as a monadic value, the derivation for INSTANCE, a channel
instance, for SYSTEM. DEPENDENCIES is a list of extensions providing Guile
-modules that INSTANCE depends on."
+modules that INSTANCE depends on. If ASSUME-AVAILABLE-BUILTIN-BUILDERS is
+provided, it should be a list of strings and this will be used instead of the
+builtin builders provided by the build daemon for store connections used
+during this process."
(build-from-source instance
#:core core
#:dependencies dependencies
- #:system system))
+ #:system system
+ #:assume-available-builtin-builders
+ assume-available-builtin-builders))
(define (resolve-dependencies instances)
"Return a procedure that, given one of the elements of INSTANCES, returns
@@ -793,9 +805,13 @@ (define (resolve-dependencies instances)
(lambda (instance)
(vhash-foldq* cons '() instance edges)))
-(define* (channel-instance-derivations instances #:key system)
+(define* (channel-instance-derivations instances #:key system
+ assume-available-builtin-builders)
"Return the list of derivations to build INSTANCES, in the same order as
-INSTANCES. Build for the current system by default, or SYSTEM if specified."
+INSTANCES. Build for the current system by default, or SYSTEM if specified.
+If ASSUME-AVAILABLE-BUILTIN-BUILDERS is provided, it should be a list of
+strings and this will be used instead of the builtin builders provided by the
+build daemon for store connections used during this process."
(define core-instance
;; The 'guix' channel is treated specially: it's an implicit dependency of
;; all the other channels.
@@ -809,11 +825,15 @@ (define* (channel-instance-derivations instances #:key system)
(define (instance->derivation instance)
(mlet %store-monad ((system (if system (return system) (current-system))))
(mcached (if (eq? instance core-instance)
- (build-channel-instance instance system)
+ (build-channel-instance instance system
+ #:assume-available-builtin-builders
+ assume-available-builtin-builders)
(mlet %store-monad ((core (instance->derivation core-instance))
(deps (mapm %store-monad instance->derivation
(edges instance))))
- (build-channel-instance instance system core deps)))
+ (build-channel-instance instance system core deps
+ #:assume-available-builtin-builders
+ assume-available-builtin-builders)))
instance
system)))
@@ -915,10 +935,13 @@ (define (channel-instance->sexp instance)
intro))))))
'()))))
-(define* (channel-instances->manifest instances #:key system)
+(define* (channel-instances->manifest instances #:key system
+ assume-available-builtin-builders)
"Return a profile manifest with entries for all of INSTANCES, a list of
channel instances. By default, build for the current system, or SYSTEM if
-specified."
+specified. If ASSUME-AVAILABLE-BUILTIN-BUILDERS is provided, it should be a
+list of strings and this will be used instead of the builtin builders provided
+by the build daemon for store connections used during this process."
(define (instance->entry instance drv)
(let ((commit (channel-instance-commit instance))
(channel (channel-instance-channel instance)))
@@ -934,8 +957,11 @@ (define* (channel-instances->manifest instances #:key system)
(properties
`((source ,(channel-instance->sexp instance)))))))
- (mlet* %store-monad ((derivations (channel-instance-derivations instances
- #:system system))
+ (mlet* %store-monad ((derivations (channel-instance-derivations
+ instances
+ #:system system
+ #:assume-available-builtin-builders
+ assume-available-builtin-builders))
(entries -> (map instance->entry instances derivations)))
(return (manifest entries))))
@@ -990,10 +1016,17 @@ (define %channel-profile-hooks
;; The default channel profile hooks.
(cons package-cache-file %default-profile-hooks))
-(define (channel-instances->derivation instances)
+(define* (channel-instances->derivation instances
+ #:key assume-available-builtin-builders)
"Return the derivation of the profile containing INSTANCES, a list of
-channel instances."
- (mlet %store-monad ((manifest (channel-instances->manifest instances)))
+channel instances. If ASSUME-AVAILABLE-BUILTIN-BUILDERS is provided, it
+should be a list of strings and this will be used instead of the builtin
+builders provided by the build daemon for store connections used during this
+process."
+ (mlet %store-monad ((manifest (channel-instances->manifest
+ instances
+ #:assume-available-builtin-builders
+ assume-available-builtin-builders)))
;; Emit a profile in format version so that, if INSTANCES denotes an old
;; Guix, it can still read that profile, for instance for the purposes of
;; 'guix describe'.
--
2.45.1
C
C
Christopher Baines wrote on 24 Jun 15:43 +0200
[PATCH v2 1/2] guix: store: Enable specifying the available builtin builders.
(address . 71038@debbugs.gnu.org)
d854d02c05c91c4e5558b0785f4b0a77e3b781f4.1719236626.git.mail@cbaines.net
To open-connection and port->connection. This overrides the discovered
builtin builders that the daemon says it provides.

This is useful when you want to generate compatible derivations that can be
run with a daemon that potentially doesn't support builtin builders that the
daemon you're using to generate the derivations has.

I'm looking at this in particular because I want to use this in the data
service, since it provides substitutes for derivations, and since these can be
built on other machines, it's useful to control which builtin builders they
depend on.

* guix/store.scm (open-connection, port->connection): Accept
#:assume-available-builtin-builders and use this instead of
%built-in-builders.


Change-Id: I45d58ab93b6d276d280552858fc81ebc2b58828a
---
guix/store.scm | 24 +++++++++++++++++-------
1 file changed, 17 insertions(+), 7 deletions(-)

Toggle diff (68 lines)
diff --git a/guix/store.scm b/guix/store.scm
index 58ddaa8d15..8c823a2185 100644
--- a/guix/store.scm
+++ b/guix/store.scm
@@ -571,7 +571,7 @@ (define* (connect-to-daemon uri #:key non-blocking?)
(define* (open-connection #:optional (uri (%daemon-socket-uri))
#:key port (reserve-space? #t) cpu-affinity
- non-blocking?)
+ non-blocking? assume-available-builtin-builders)
"Connect to the daemon at URI (a string), or, if PORT is not #f, use it as
the I/O port over which to communicate to a build daemon.
@@ -580,8 +580,10 @@ (define* (open-connection #:optional (uri (%daemon-socket-uri))
should the disk become full. When CPU-AFFINITY is true, it must be an integer
corresponding to an OS-level CPU number to which the daemon's worker process
for this connection will be pinned. If NON-BLOCKING?, use a non-blocking
-socket when using the file, unix or guix URI schemes. Return a server
-object."
+socket when using the file, unix or guix URI schemes. If
+ASSUME-AVAILABLE-BUILTIN-BUILDERS is provided, it should be a list of strings
+and this will be used instead of the builtin builders provided by the build
+daemon. Return a server object."
(define (handshake-error)
(raise (condition
(&store-connection-error (file (or port uri))
@@ -616,7 +618,9 @@ (define* (open-connection #:optional (uri (%daemon-socket-uri))
(when (>= (protocol-minor v) 11)
(write-int (if reserve-space? 1 0) port))
(letrec* ((built-in-builders
- (delay (%built-in-builders conn)))
+ (if assume-available-builtin-builders
+ (delay assume-available-builtin-builders)
+ (delay (%built-in-builders conn))))
(caches
(make-vector
(atomic-box-ref %store-connection-caches)
@@ -635,9 +639,13 @@ (define* (open-connection #:optional (uri (%daemon-socket-uri))
conn))))))
(define* (port->connection port
- #:key (version %protocol-version))
+ #:key (version %protocol-version)
+ assume-available-builtin-builders)
"Assimilate PORT, an input/output port, and return a connection to the
-daemon, assuming the given protocol VERSION.
+daemon, assuming the given protocol VERSION. If
+ASSUME-AVAILABLE-BUILTIN-BUILDERS is provided, it should be a list of strings
+and this will be used instead of the builtin builders provided by the build
+daemon.
Warning: this procedure assumes that the initial handshake with the daemon has
already taken place on PORT and that we're just continuing on this established
@@ -654,7 +662,9 @@ (define* (port->connection port
(make-vector
(atomic-box-ref %store-connection-caches)
vlist-null)
- (delay (%built-in-builders connection))))
+ (if assume-available-builtin-builders
+ (delay assume-available-builtin-builders)
+ (delay (%built-in-builders connection)))))
connection))

base-commit: 018f2781d5aa301c156c81981f1fd3df56e438b9
--
2.45.1
L
L
Ludovic Courtès wrote on 4 Jul 11:14 +0200
(name . Christopher Baines)(address . mail@cbaines.net)
87msmx7c4g.fsf@gnu.org
Hello!

Summarizing our live review session here…

Christopher Baines <mail@cbaines.net> skribis:

Toggle quote (20 lines)
> To open-connection and port->connection. This overrides the discovered
> builtin builders that the daemon says it provides.
>
> This is useful when you want to generate compatible derivations that can be
> run with a daemon that potentially doesn't support builtin builders that the
> daemon you're using to generate the derivations has.
>
> I'm looking at this in particular because I want to use this in the data
> service, since it provides substitutes for derivations, and since these can be
> built on other machines, it's useful to control which builtin builders they
> depend on.
>
> * guix/store.scm (open-connection, port->connection): Accept
> #:assume-available-builtin-builders and use this instead of
> %built-in-builders.
>
> Fixes: <https://issues.guix.gnu.org/67250>.
>
> Change-Id: I45d58ab93b6d276d280552858fc81ebc2b58828a

This is nice. Nitpick: you can drop “guix:” from the commit message subject.

Toggle quote (5 lines)
> (define* (open-connection #:optional (uri (%daemon-socket-uri))
> #:key port (reserve-space? #t) cpu-affinity
> - non-blocking?)
> + non-blocking? assume-available-builtin-builders)

My only suggestion here is to rename ‘assume-available-builtin-builders’
to just ‘built-in-builders’ (so that it’s a noun rather than a phrase).

Ludo’.
L
L
Ludovic Courtès wrote on 4 Jul 11:17 +0200
Re: [bug#71038] [PATCH v2 2/2] guix: channels: Enable specifiying available builtin builders.
(name . Christopher Baines)(address . mail@cbaines.net)
87ikxl7bzi.fsf@gnu.org
Christopher Baines <mail@cbaines.net> skribis:

Toggle quote (24 lines)
> When computing channel instance derivations.
>
> This is useful when you want to generate compatible derivations that can be
> run with a daemon that potentially doesn't support builtin builders that the
> daemon you're using to generate the derivations has.
>
> I'm looking at this in particular because I want to use this in the data
> service, since it provides substitutes for derivations, and since these can be
> built on other machines, it's useful to control which builtin builders they
> depend on.
>
> Fixes: <https://issues.guix.gnu.org/67250>.
>
> * build-aux/build-self.scm (build-program): Accept
> #:assume-available-builtin-builders and pass along to port->connection or
> open-connection as approriate.
> (build): Accept and pass on #:assume-available-builtin-builders.
> * guix/channels.scm (build-from-source, build-channel-instance,
> channel-instance-derivations, channel-instances->manifest,
> channel-instances->derivation): Accept and pass on
> #:assume-available-builtin-builders.
>
> Change-Id: I315c990de66c6f7dca25a859165a5568abe385ea

I would have hoped we could avoid this, because it’s make tricky code a
bit harder to read, but as you said, it’s a real issue that needs
fixing: on build farms or for anyone using offloading and potentially
not upgrading all the machines in lockstep.

Toggle quote (6 lines)
> + #:version proto
> + #$@(if assume-available-builtin-builders
> + #~(#:assume-available-builtin-builders
> + '(#$@assume-available-builtin-builders))
> + '()))

Here (in ‘build-program’), we can assume we’re using the current (guix
store) module, so we can safely pass #:built-in-builders unconditionally.

That’s it!

The series LGTM with these changes.

Thank you! :-)
C
C
Christopher Baines wrote on 4 Jul 13:50 +0200
[PATCH v3 2/2] guix: channels: Enable specifiying available builtin builders.
(address . 71038@debbugs.gnu.org)
0d2d50291d3c0c7be10c8a535bf64dec49a4f1eb.1720093809.git.mail@cbaines.net
When computing channel instance derivations.

This is useful when you want to generate compatible derivations that can be
run with a daemon that potentially doesn't support builtin builders that the
daemon you're using to generate the derivations has.

I'm looking at this in particular because I want to use this in the data
service, since it provides substitutes for derivations, and since these can be
built on other machines, it's useful to control which builtin builders they
depend on.


* build-aux/build-self.scm (build-program): Accept
#:built-in-builders and pass along to port->connection or
open-connection as approriate.
(build): Accept and pass on #:built-in-builders.
* guix/channels.scm (build-from-source, build-channel-instance,
channel-instance-derivations, channel-instances->manifest,
channel-instances->derivation): Accept and pass on
#:built-in-builders.

Change-Id: I315c990de66c6f7dca25a859165a5568abe385ea
---
build-aux/build-self.scm | 29 +++++++++++------
guix/channels.scm | 67 ++++++++++++++++++++++++++++++----------
2 files changed, 70 insertions(+), 26 deletions(-)

Toggle diff (203 lines)
diff --git a/build-aux/build-self.scm b/build-aux/build-self.scm
index 02822a2ee8..d9299b9af2 100644
--- a/build-aux/build-self.scm
+++ b/build-aux/build-self.scm
@@ -241,8 +241,12 @@ (define guile-gcrypt
(define* (build-program source version
#:optional (guile-version (effective-version))
- #:key (pull-version 0) (channel-metadata #f))
- "Return a program that computes the derivation to build Guix from SOURCE."
+ #:key (pull-version 0) (channel-metadata #f)
+ built-in-builders)
+ "Return a program that computes the derivation to build Guix from SOURCE.
+If BUILT-IN-BUILDERS is provided, it should be a list of
+strings and this will be used instead of the builtin builders provided by the
+build daemon, from within the generated build program."
(define select?
;; Select every module but (guix config) and non-Guix modules.
;; Also exclude (guix channels): it is autoloaded by (guix describe), but
@@ -331,11 +335,16 @@ (define* (build-program source version
;; case, attempt to open a new connection.
(let* ((proto (string->number protocol-version))
(store (if (integer? proto)
- (port->connection (duplicate-port
- (current-input-port)
- "w+0")
- #:version proto)
- (open-connection)))
+ (port->connection
+ (duplicate-port
+ (current-input-port)
+ "w+0")
+ #:version proto
+ #:built-in-builders
+ '#$built-in-builders)
+ (open-connection
+ #:built-in-builders
+ '#$built-in-builders)))
(sock (socket AF_UNIX SOCK_STREAM 0)))
;; Connect to BUILD-OUTPUT and send it the raw
;; build output.
@@ -406,7 +415,7 @@ (define* (build source
(guile-version (if (> pull-version 0)
"3.0"
(effective-version)))
-
+ built-in-builders
#:allow-other-keys
#:rest rest)
"Return a derivation that unpacks SOURCE into STORE and compiles Scheme
@@ -415,7 +424,9 @@ (define* (build source
;; SOURCE.
(mlet %store-monad ((build (build-program source version guile-version
#:channel-metadata channel-metadata
- #:pull-version pull-version))
+ #:pull-version pull-version
+ #:built-in-builders
+ built-in-builders))
(system (if system (return system) (current-system)))
(home -> (getenv "HOME"))
diff --git a/guix/channels.scm b/guix/channels.scm
index 0d7bc541cc..34f63eb833 100644
--- a/guix/channels.scm
+++ b/guix/channels.scm
@@ -704,11 +704,15 @@ (define (with-trivial-build-handler mvalue)
store))))
(define* (build-from-source instance
- #:key core verbose? (dependencies '()) system)
+ #:key core verbose? (dependencies '()) system
+ built-in-builders)
"Return a derivation to build Guix from INSTANCE, using the self-build
script contained therein. When CORE is true, build package modules under
SOURCE using CORE, an instance of Guix. By default, build for the current
-system, or SYSTEM if specified."
+system, or SYSTEM if specified. If BUILT-IN-BUILDERS is
+provided, it should be a list of strings and this will be used instead of the
+builtin builders provided by the build daemon for store connections used
+during this process."
(define name
(symbol->string
(channel-name (channel-instance-channel instance))))
@@ -750,20 +754,28 @@ (define* (build-from-source instance
#:verbose? verbose? #:version commit
#:system system
#:channel-metadata (channel-instance->sexp instance)
- #:pull-version %pull-version))))
+ #:pull-version %pull-version
+ #:built-in-builders
+ built-in-builders))))
;; Build a set of modules that extend Guix using the standard method.
(standard-module-derivation name source core dependencies)))
(define* (build-channel-instance instance system
- #:optional core (dependencies '()))
+ #:optional core (dependencies '())
+ #:key built-in-builders)
"Return, as a monadic value, the derivation for INSTANCE, a channel
instance, for SYSTEM. DEPENDENCIES is a list of extensions providing Guile
-modules that INSTANCE depends on."
+modules that INSTANCE depends on. If BUILT-IN-BUILDERS is
+provided, it should be a list of strings and this will be used instead of the
+builtin builders provided by the build daemon for store connections used
+during this process."
(build-from-source instance
#:core core
#:dependencies dependencies
- #:system system))
+ #:system system
+ #:built-in-builders
+ built-in-builders))
(define (resolve-dependencies instances)
"Return a procedure that, given one of the elements of INSTANCES, returns
@@ -793,9 +805,13 @@ (define (resolve-dependencies instances)
(lambda (instance)
(vhash-foldq* cons '() instance edges)))
-(define* (channel-instance-derivations instances #:key system)
+(define* (channel-instance-derivations instances #:key system
+ built-in-builders)
"Return the list of derivations to build INSTANCES, in the same order as
-INSTANCES. Build for the current system by default, or SYSTEM if specified."
+INSTANCES. Build for the current system by default, or SYSTEM if specified.
+If BUILT-IN-BUILDERS is provided, it should be a list of
+strings and this will be used instead of the builtin builders provided by the
+build daemon for store connections used during this process."
(define core-instance
;; The 'guix' channel is treated specially: it's an implicit dependency of
;; all the other channels.
@@ -809,11 +825,15 @@ (define* (channel-instance-derivations instances #:key system)
(define (instance->derivation instance)
(mlet %store-monad ((system (if system (return system) (current-system))))
(mcached (if (eq? instance core-instance)
- (build-channel-instance instance system)
+ (build-channel-instance instance system
+ #:built-in-builders
+ built-in-builders)
(mlet %store-monad ((core (instance->derivation core-instance))
(deps (mapm %store-monad instance->derivation
(edges instance))))
- (build-channel-instance instance system core deps)))
+ (build-channel-instance instance system core deps
+ #:built-in-builders
+ built-in-builders)))
instance
system)))
@@ -915,10 +935,13 @@ (define (channel-instance->sexp instance)
intro))))))
'()))))
-(define* (channel-instances->manifest instances #:key system)
+(define* (channel-instances->manifest instances #:key system
+ built-in-builders)
"Return a profile manifest with entries for all of INSTANCES, a list of
channel instances. By default, build for the current system, or SYSTEM if
-specified."
+specified. If BUILT-IN-BUILDERS is provided, it should be a
+list of strings and this will be used instead of the builtin builders provided
+by the build daemon for store connections used during this process."
(define (instance->entry instance drv)
(let ((commit (channel-instance-commit instance))
(channel (channel-instance-channel instance)))
@@ -934,8 +957,11 @@ (define* (channel-instances->manifest instances #:key system)
(properties
`((source ,(channel-instance->sexp instance)))))))
- (mlet* %store-monad ((derivations (channel-instance-derivations instances
- #:system system))
+ (mlet* %store-monad ((derivations (channel-instance-derivations
+ instances
+ #:system system
+ #:built-in-builders
+ built-in-builders))
(entries -> (map instance->entry instances derivations)))
(return (manifest entries))))
@@ -990,10 +1016,17 @@ (define %channel-profile-hooks
;; The default channel profile hooks.
(cons package-cache-file %default-profile-hooks))
-(define (channel-instances->derivation instances)
+(define* (channel-instances->derivation instances
+ #:key built-in-builders)
"Return the derivation of the profile containing INSTANCES, a list of
-channel instances."
- (mlet %store-monad ((manifest (channel-instances->manifest instances)))
+channel instances. If BUILT-IN-BUILDERS is provided, it
+should be a list of strings and this will be used instead of the builtin
+builders provided by the build daemon for store connections used during this
+process."
+ (mlet %store-monad ((manifest (channel-instances->manifest
+ instances
+ #:built-in-builders
+ built-in-builders)))
;; Emit a profile in format version so that, if INSTANCES denotes an old
;; Guix, it can still read that profile, for instance for the purposes of
;; 'guix describe'.
--
2.45.2
C
C
Christopher Baines wrote on 4 Jul 13:50 +0200
[PATCH v3 1/2] guix: store: Enable specifying the builtin builders.
(address . 71038@debbugs.gnu.org)
14fc15bdb8b5fd615fb93e025e86ccf70cf81814.1720093809.git.mail@cbaines.net
To open-connection and port->connection. This overrides the discovered
builtin builders that the daemon says it provides.

This is useful when you want to generate compatible derivations that can be
run with a daemon that potentially doesn't support builtin builders that the
daemon you're using to generate the derivations has.

I'm looking at this in particular because I want to use this in the data
service, since it provides substitutes for derivations, and since these can be
built on other machines, it's useful to control which builtin builders they
depend on.

* guix/store.scm (open-connection, port->connection): Accept
#:built-in-builders and use this instead of %built-in-builders.


Change-Id: I45d58ab93b6d276d280552858fc81ebc2b58828a
---
guix/store.scm | 28 +++++++++++++++++++---------
1 file changed, 19 insertions(+), 9 deletions(-)

Toggle diff (77 lines)
diff --git a/guix/store.scm b/guix/store.scm
index 4070b686cb..cf5848e580 100644
--- a/guix/store.scm
+++ b/guix/store.scm
@@ -566,7 +566,7 @@ (define* (connect-to-daemon uri-or-filename #:key non-blocking?)
(define* (open-connection #:optional (uri (%daemon-socket-uri))
#:key port (reserve-space? #t) cpu-affinity
- non-blocking?)
+ non-blocking? built-in-builders)
"Connect to the daemon at URI (a string), or, if PORT is not #f, use it as
the I/O port over which to communicate to a build daemon.
@@ -575,8 +575,10 @@ (define* (open-connection #:optional (uri (%daemon-socket-uri))
should the disk become full. When CPU-AFFINITY is true, it must be an integer
corresponding to an OS-level CPU number to which the daemon's worker process
for this connection will be pinned. If NON-BLOCKING?, use a non-blocking
-socket when using the file, unix or guix URI schemes. Return a server
-object."
+socket when using the file, unix or guix URI schemes. If
+BUILT-IN-BUILDERS is provided, it should be a list of strings
+and this will be used instead of the builtin builders provided by the build
+daemon. Return a server object."
(define (handshake-error)
(raise (condition
(&store-connection-error (file (or port uri))
@@ -610,8 +612,10 @@ (define* (open-connection #:optional (uri (%daemon-socket-uri))
(write-int cpu-affinity port)))
(when (>= (protocol-minor v) 11)
(write-int (if reserve-space? 1 0) port))
- (letrec* ((built-in-builders
- (delay (%built-in-builders conn)))
+ (letrec* ((actual-built-in-builders
+ (if built-in-builders
+ (delay built-in-builders)
+ (delay (%built-in-builders conn))))
(caches
(make-vector
(atomic-box-ref %store-connection-caches)
@@ -624,15 +628,19 @@ (define* (open-connection #:optional (uri (%daemon-socket-uri))
(make-hash-table 100)
(make-hash-table 100)
caches
- built-in-builders)))
+ actual-built-in-builders)))
(let loop ((done? (process-stderr conn)))
(or done? (process-stderr conn)))
conn))))))
(define* (port->connection port
- #:key (version %protocol-version))
+ #:key (version %protocol-version)
+ built-in-builders)
"Assimilate PORT, an input/output port, and return a connection to the
-daemon, assuming the given protocol VERSION.
+daemon, assuming the given protocol VERSION. If
+BUILT-IN-BUILDERS is provided, it should be a list of strings
+and this will be used instead of the builtin builders provided by the build
+daemon.
Warning: this procedure assumes that the initial handshake with the daemon has
already taken place on PORT and that we're just continuing on this established
@@ -649,7 +657,9 @@ (define* (port->connection port
(make-vector
(atomic-box-ref %store-connection-caches)
vlist-null)
- (delay (%built-in-builders connection))))
+ (if built-in-builders
+ (delay built-in-builders)
+ (delay (%built-in-builders connection)))))
connection))

base-commit: 5f1e4e4c0242af6bcba656aedf8b49afbe7247b7
--
2.45.2
L
L
Ludovic Courtès wrote on 16 Jul 12:05 +0200
Re: [bug#71038] [PATCH v3 2/2] guix: channels: Enable specifiying available builtin builders.
(name . Christopher Baines)(address . mail@cbaines.net)
87wmllzm63.fsf@gnu.org
Hello!

v3 LGTM, thanks!

Ludo’.
C
C
Christopher Baines wrote on 16 Jul 14:48 +0200
[PATCH v4 2/3] guix: channels: Enable specifiying available builtin builders.
(address . 71038@debbugs.gnu.org)
bbb56a0c1753076156a72bba2cd6574b6f9c07fe.1721134116.git.mail@cbaines.net
When computing channel instance derivations.

This is useful when you want to generate compatible derivations that can be
run with a daemon that potentially doesn't support builtin builders that the
daemon you're using to generate the derivations has.

I'm looking at this in particular because I want to use this in the data
service, since it provides substitutes for derivations, and since these can be
built on other machines, it's useful to control which builtin builders they
depend on.


* build-aux/build-self.scm (build-program): Accept
#:built-in-builders and pass along to port->connection or
open-connection as approriate.
(build): Accept and pass on #:built-in-builders.
* guix/channels.scm (build-from-source, build-channel-instance,
channel-instance-derivations, channel-instances->manifest,
channel-instances->derivation): Accept and pass on
#:built-in-builders.

Change-Id: I315c990de66c6f7dca25a859165a5568abe385ea
---
build-aux/build-self.scm | 29 +++++++++++------
guix/channels.scm | 67 ++++++++++++++++++++++++++++++----------
2 files changed, 70 insertions(+), 26 deletions(-)

Toggle diff (203 lines)
diff --git a/build-aux/build-self.scm b/build-aux/build-self.scm
index 02822a2ee8..d9299b9af2 100644
--- a/build-aux/build-self.scm
+++ b/build-aux/build-self.scm
@@ -241,8 +241,12 @@ (define guile-gcrypt
(define* (build-program source version
#:optional (guile-version (effective-version))
- #:key (pull-version 0) (channel-metadata #f))
- "Return a program that computes the derivation to build Guix from SOURCE."
+ #:key (pull-version 0) (channel-metadata #f)
+ built-in-builders)
+ "Return a program that computes the derivation to build Guix from SOURCE.
+If BUILT-IN-BUILDERS is provided, it should be a list of
+strings and this will be used instead of the builtin builders provided by the
+build daemon, from within the generated build program."
(define select?
;; Select every module but (guix config) and non-Guix modules.
;; Also exclude (guix channels): it is autoloaded by (guix describe), but
@@ -331,11 +335,16 @@ (define* (build-program source version
;; case, attempt to open a new connection.
(let* ((proto (string->number protocol-version))
(store (if (integer? proto)
- (port->connection (duplicate-port
- (current-input-port)
- "w+0")
- #:version proto)
- (open-connection)))
+ (port->connection
+ (duplicate-port
+ (current-input-port)
+ "w+0")
+ #:version proto
+ #:built-in-builders
+ '#$built-in-builders)
+ (open-connection
+ #:built-in-builders
+ '#$built-in-builders)))
(sock (socket AF_UNIX SOCK_STREAM 0)))
;; Connect to BUILD-OUTPUT and send it the raw
;; build output.
@@ -406,7 +415,7 @@ (define* (build source
(guile-version (if (> pull-version 0)
"3.0"
(effective-version)))
-
+ built-in-builders
#:allow-other-keys
#:rest rest)
"Return a derivation that unpacks SOURCE into STORE and compiles Scheme
@@ -415,7 +424,9 @@ (define* (build source
;; SOURCE.
(mlet %store-monad ((build (build-program source version guile-version
#:channel-metadata channel-metadata
- #:pull-version pull-version))
+ #:pull-version pull-version
+ #:built-in-builders
+ built-in-builders))
(system (if system (return system) (current-system)))
(home -> (getenv "HOME"))
diff --git a/guix/channels.scm b/guix/channels.scm
index 0d7bc541cc..34f63eb833 100644
--- a/guix/channels.scm
+++ b/guix/channels.scm
@@ -704,11 +704,15 @@ (define (with-trivial-build-handler mvalue)
store))))
(define* (build-from-source instance
- #:key core verbose? (dependencies '()) system)
+ #:key core verbose? (dependencies '()) system
+ built-in-builders)
"Return a derivation to build Guix from INSTANCE, using the self-build
script contained therein. When CORE is true, build package modules under
SOURCE using CORE, an instance of Guix. By default, build for the current
-system, or SYSTEM if specified."
+system, or SYSTEM if specified. If BUILT-IN-BUILDERS is
+provided, it should be a list of strings and this will be used instead of the
+builtin builders provided by the build daemon for store connections used
+during this process."
(define name
(symbol->string
(channel-name (channel-instance-channel instance))))
@@ -750,20 +754,28 @@ (define* (build-from-source instance
#:verbose? verbose? #:version commit
#:system system
#:channel-metadata (channel-instance->sexp instance)
- #:pull-version %pull-version))))
+ #:pull-version %pull-version
+ #:built-in-builders
+ built-in-builders))))
;; Build a set of modules that extend Guix using the standard method.
(standard-module-derivation name source core dependencies)))
(define* (build-channel-instance instance system
- #:optional core (dependencies '()))
+ #:optional core (dependencies '())
+ #:key built-in-builders)
"Return, as a monadic value, the derivation for INSTANCE, a channel
instance, for SYSTEM. DEPENDENCIES is a list of extensions providing Guile
-modules that INSTANCE depends on."
+modules that INSTANCE depends on. If BUILT-IN-BUILDERS is
+provided, it should be a list of strings and this will be used instead of the
+builtin builders provided by the build daemon for store connections used
+during this process."
(build-from-source instance
#:core core
#:dependencies dependencies
- #:system system))
+ #:system system
+ #:built-in-builders
+ built-in-builders))
(define (resolve-dependencies instances)
"Return a procedure that, given one of the elements of INSTANCES, returns
@@ -793,9 +805,13 @@ (define (resolve-dependencies instances)
(lambda (instance)
(vhash-foldq* cons '() instance edges)))
-(define* (channel-instance-derivations instances #:key system)
+(define* (channel-instance-derivations instances #:key system
+ built-in-builders)
"Return the list of derivations to build INSTANCES, in the same order as
-INSTANCES. Build for the current system by default, or SYSTEM if specified."
+INSTANCES. Build for the current system by default, or SYSTEM if specified.
+If BUILT-IN-BUILDERS is provided, it should be a list of
+strings and this will be used instead of the builtin builders provided by the
+build daemon for store connections used during this process."
(define core-instance
;; The 'guix' channel is treated specially: it's an implicit dependency of
;; all the other channels.
@@ -809,11 +825,15 @@ (define* (channel-instance-derivations instances #:key system)
(define (instance->derivation instance)
(mlet %store-monad ((system (if system (return system) (current-system))))
(mcached (if (eq? instance core-instance)
- (build-channel-instance instance system)
+ (build-channel-instance instance system
+ #:built-in-builders
+ built-in-builders)
(mlet %store-monad ((core (instance->derivation core-instance))
(deps (mapm %store-monad instance->derivation
(edges instance))))
- (build-channel-instance instance system core deps)))
+ (build-channel-instance instance system core deps
+ #:built-in-builders
+ built-in-builders)))
instance
system)))
@@ -915,10 +935,13 @@ (define (channel-instance->sexp instance)
intro))))))
'()))))
-(define* (channel-instances->manifest instances #:key system)
+(define* (channel-instances->manifest instances #:key system
+ built-in-builders)
"Return a profile manifest with entries for all of INSTANCES, a list of
channel instances. By default, build for the current system, or SYSTEM if
-specified."
+specified. If BUILT-IN-BUILDERS is provided, it should be a
+list of strings and this will be used instead of the builtin builders provided
+by the build daemon for store connections used during this process."
(define (instance->entry instance drv)
(let ((commit (channel-instance-commit instance))
(channel (channel-instance-channel instance)))
@@ -934,8 +957,11 @@ (define* (channel-instances->manifest instances #:key system)
(properties
`((source ,(channel-instance->sexp instance)))))))
- (mlet* %store-monad ((derivations (channel-instance-derivations instances
- #:system system))
+ (mlet* %store-monad ((derivations (channel-instance-derivations
+ instances
+ #:system system
+ #:built-in-builders
+ built-in-builders))
(entries -> (map instance->entry instances derivations)))
(return (manifest entries))))
@@ -990,10 +1016,17 @@ (define %channel-profile-hooks
;; The default channel profile hooks.
(cons package-cache-file %default-profile-hooks))
-(define (channel-instances->derivation instances)
+(define* (channel-instances->derivation instances
+ #:key built-in-builders)
"Return the derivation of the profile containing INSTANCES, a list of
-channel instances."
- (mlet %store-monad ((manifest (channel-instances->manifest instances)))
+channel instances. If BUILT-IN-BUILDERS is provided, it
+should be a list of strings and this will be used instead of the builtin
+builders provided by the build daemon for store connections used during this
+process."
+ (mlet %store-monad ((manifest (channel-instances->manifest
+ instances
+ #:built-in-builders
+ built-in-builders)))
;; Emit a profile in format version so that, if INSTANCES denotes an old
;; Guix, it can still read that profile, for instance for the purposes of
;; 'guix describe'.
--
2.45.2
C
C
Christopher Baines wrote on 16 Jul 14:48 +0200
[PATCH v4 3/3] inferior: Use the host built-in-builders with inferior.
(address . 71038@debbugs.gnu.org)
a85396e292cdbbc044742004c449b52fe59d5362.1721134116.git.mail@cbaines.net
Rather than querying the built-in-builders from the inferior, as using the
host value allows specifying it when opening the connection.

* guix/inferior.scm (port->inferior): Have cached-store-connection take the
built-in-builders.
(inferior-eval-with-store): Call cached-store-connection with the store
connection built-in-builders.

Change-Id: I27c20732355c0c6aa646748a02df39db302cd568
---
guix/inferior.scm | 25 +++++++++++++++++++------
1 file changed, 19 insertions(+), 6 deletions(-)

Toggle diff (55 lines)
diff --git a/guix/inferior.scm b/guix/inferior.scm
index 190ba01b3c..b60bf1ab01 100644
--- a/guix/inferior.scm
+++ b/guix/inferior.scm
@@ -253,7 +253,8 @@ (define* (port->inferior pipe #:optional (close close-port))
result)
(inferior-eval '(begin
(define %store-table (make-hash-table))
- (define (cached-store-connection store-id version)
+ (define (cached-store-connection store-id version
+ built-in-builders)
;; Cache connections to store ID. This ensures that
;; the caches within <store-connection> (in
;; particular the object cache) are reused across
@@ -268,9 +269,19 @@ (define* (port->inferior pipe #:optional (close close-port))
;; risk of talking to the wrong daemon or having
;; our build result reclaimed (XXX).
(let ((store (if (defined? 'port->connection)
- (port->connection %bridge-socket
- #:version
- version)
+ ;; #:built-in-builders was
+ ;; added in 2024
+ (catch 'keyword-argument-error
+ (lambda ()
+ (port->connection %bridge-socket
+ #:version
+ version
+ #:built-in-builders
+ built-in-builders))
+ (lambda _
+ (port->connection %bridge-socket
+ #:version
+ version)))
(open-connection))))
(hashv-set! %store-table store-id store)
store))))
@@ -690,11 +701,13 @@ (define (inferior-eval-with-store inferior store code)
;; The address of STORE itself is not a good identifier because it
;; keeps changing through the use of "functional caches". The
;; address of its socket port makes more sense.
- (store-id (object-address (store-connection-socket store))))
+ (store-id (object-address (store-connection-socket store)))
+ (store-built-in-builders (built-in-builders store)))
(ensure-store-bridge! inferior)
(send-inferior-request
`(let ((proc ,code)
- (store (cached-store-connection ,store-id ,proto)))
+ (store (cached-store-connection ,store-id ,proto
+ ',store-built-in-builders)))
;; Serialize '&store-protocol-error' conditions. The exception
;; serialization mechanism that 'read-repl-response' expects is
;; unsuitable for SRFI-35 error conditions, hence this special case.
--
2.45.2
C
C
Christopher Baines wrote on 16 Jul 14:48 +0200
[PATCH v4 1/3] guix: store: Enable specifying the builtin builders.
(address . 71038@debbugs.gnu.org)
8075bccd0026e76f16f91d51c5b9203b5693b03e.1721134116.git.mail@cbaines.net
To open-connection and port->connection. This overrides the discovered
builtin builders that the daemon says it provides.

This is useful when you want to generate compatible derivations that can be
run with a daemon that potentially doesn't support builtin builders that the
daemon you're using to generate the derivations has.

I'm looking at this in particular because I want to use this in the data
service, since it provides substitutes for derivations, and since these can be
built on other machines, it's useful to control which builtin builders they
depend on.

* guix/store.scm (open-connection, port->connection): Accept
#:built-in-builders and use this instead of %built-in-builders.


Change-Id: I45d58ab93b6d276d280552858fc81ebc2b58828a
---
guix/store.scm | 28 +++++++++++++++++++---------
1 file changed, 19 insertions(+), 9 deletions(-)

Toggle diff (77 lines)
diff --git a/guix/store.scm b/guix/store.scm
index 4070b686cb..cf5848e580 100644
--- a/guix/store.scm
+++ b/guix/store.scm
@@ -566,7 +566,7 @@ (define* (connect-to-daemon uri-or-filename #:key non-blocking?)
(define* (open-connection #:optional (uri (%daemon-socket-uri))
#:key port (reserve-space? #t) cpu-affinity
- non-blocking?)
+ non-blocking? built-in-builders)
"Connect to the daemon at URI (a string), or, if PORT is not #f, use it as
the I/O port over which to communicate to a build daemon.
@@ -575,8 +575,10 @@ (define* (open-connection #:optional (uri (%daemon-socket-uri))
should the disk become full. When CPU-AFFINITY is true, it must be an integer
corresponding to an OS-level CPU number to which the daemon's worker process
for this connection will be pinned. If NON-BLOCKING?, use a non-blocking
-socket when using the file, unix or guix URI schemes. Return a server
-object."
+socket when using the file, unix or guix URI schemes. If
+BUILT-IN-BUILDERS is provided, it should be a list of strings
+and this will be used instead of the builtin builders provided by the build
+daemon. Return a server object."
(define (handshake-error)
(raise (condition
(&store-connection-error (file (or port uri))
@@ -610,8 +612,10 @@ (define* (open-connection #:optional (uri (%daemon-socket-uri))
(write-int cpu-affinity port)))
(when (>= (protocol-minor v) 11)
(write-int (if reserve-space? 1 0) port))
- (letrec* ((built-in-builders
- (delay (%built-in-builders conn)))
+ (letrec* ((actual-built-in-builders
+ (if built-in-builders
+ (delay built-in-builders)
+ (delay (%built-in-builders conn))))
(caches
(make-vector
(atomic-box-ref %store-connection-caches)
@@ -624,15 +628,19 @@ (define* (open-connection #:optional (uri (%daemon-socket-uri))
(make-hash-table 100)
(make-hash-table 100)
caches
- built-in-builders)))
+ actual-built-in-builders)))
(let loop ((done? (process-stderr conn)))
(or done? (process-stderr conn)))
conn))))))
(define* (port->connection port
- #:key (version %protocol-version))
+ #:key (version %protocol-version)
+ built-in-builders)
"Assimilate PORT, an input/output port, and return a connection to the
-daemon, assuming the given protocol VERSION.
+daemon, assuming the given protocol VERSION. If
+BUILT-IN-BUILDERS is provided, it should be a list of strings
+and this will be used instead of the builtin builders provided by the build
+daemon.
Warning: this procedure assumes that the initial handshake with the daemon has
already taken place on PORT and that we're just continuing on this established
@@ -649,7 +657,9 @@ (define* (port->connection port
(make-vector
(atomic-box-ref %store-connection-caches)
vlist-null)
- (delay (%built-in-builders connection))))
+ (if built-in-builders
+ (delay built-in-builders)
+ (delay (%built-in-builders connection)))))
connection))

base-commit: bf6ab0e0f5066d999e027a7eb8ecf05db71123ce
--
2.45.2
C
C
Christopher Baines wrote on 16 Jul 15:13 +0200
Re: [bug#71038] [PATCH v3 2/2] guix: channels: Enable specifiying available builtin builders.
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 71038@debbugs.gnu.org)
87a5ih7a4o.fsf@cbaines.net
Ludovic Courtès <ludo@gnu.org> writes:

Toggle quote (4 lines)
> Hello!
>
> v3 LGTM, thanks!

I was going to push last night, but then I realised that this doesn't
actually go far enough for the data service as the built-in-builders
value needs passing through to port->connection when called in
port->inferior.

I've sent a v4 now which adds an additional commit to address this.
-----BEGIN PGP SIGNATURE-----

iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmaWcfdfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh
aW5lcy5uZXQACgkQXiijOwuE9XdHcxAAlVXyaQZzeUea1T5nJrmFLQclGVLTSLpa
1k2TJPm9EIZt8lnRGsnjIrQrrkwHgbwuURlbYHUU46vy61LqoZQ8kmIgPsR7SOVC
TAdrI/V7SFXPktX7zASVw71vuJE1n+9JmBn7osnxW/q5QFwi9X4JUiOZJMcDzru8
hfsvumF73ddwMYj0XJcXSruxmiEShWaGfeCSZw5yvrAb06mJNn6nDO/6lsu/qXg7
An0HBYFdgycfOIuOzWTNxXdPRu3VNqaQgUHTzKWIY8C5NtzrT7gEYCjz/N/BaCf8
0dgVkwDk+Mu0dRu8NbuU3Lcz+dXknjC9jxzK3hYnvbQdyhV6XX7nvcx8frLFvd3M
r+GSZq/ZTp+uyecG3YGFp5dx5ft0hI8iCZ+HPerOW6dgVTgsFuPmwA2lb/RU96f/
6tK2z4tyHy07JQbvh09IqQs9KiU1eGAj2CcXOadXbzQ/IF8e+rcStjoD2RxAh1AV
MzX5bxpFxrmZVv4quD1wuXwEU+bu45bAqDr2i8hM4VvxhFhaL4btHHXi6GFCT5Oo
Q+oQsthFc6RvkWwvG0p7GF4xA8QeOJqKOU+AGKJQpB2ZAA4b0CaR0jsVzmUKd7is
ZfvSO7C5c5llo4Cun1E9JqUuu+9E5msqgX+bARTGuJmrQS+cmEXLneM4HJB/zQ9Z
Egj/drojinA=
=5yS9
-----END PGP SIGNATURE-----

L
L
Ludovic Courtès wrote on 18 Jul 11:35 +0200
Re: [bug#71038] [PATCH v4 3/3] inferior: Use the host built-in-builders with inferior.
(name . Christopher Baines)(address . mail@cbaines.net)
87ed7rvy8a.fsf@gnu.org
Christopher Baines <mail@cbaines.net> skribis:

Toggle quote (10 lines)
> Rather than querying the built-in-builders from the inferior, as using the
> host value allows specifying it when opening the connection.
>
> * guix/inferior.scm (port->inferior): Have cached-store-connection take the
> built-in-builders.
> (inferior-eval-with-store): Call cached-store-connection with the store
> connection built-in-builders.
>
> Change-Id: I27c20732355c0c6aa646748a02df39db302cd568

LGTM as well!

Thanks,
Ludo'.
C
C
Christopher Baines wrote on 18 Jul 15:08 +0200
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 71038-done@debbugs.gnu.org)
87wmli6e50.fsf@cbaines.net
Ludovic Courtès <ludo@gnu.org> writes:

Toggle quote (14 lines)
> Christopher Baines <mail@cbaines.net> skribis:
>
>> Rather than querying the built-in-builders from the inferior, as using the
>> host value allows specifying it when opening the connection.
>>
>> * guix/inferior.scm (port->inferior): Have cached-store-connection take the
>> built-in-builders.
>> (inferior-eval-with-store): Call cached-store-connection with the store
>> connection built-in-builders.
>>
>> Change-Id: I27c20732355c0c6aa646748a02df39db302cd568
>
> LGTM as well!

Thanks for taking a look, I've pushed this to master as
f3e17f9ff1bf77b4ebddf0de3340e77e2ec8a830.

Chris
-----BEGIN PGP SIGNATURE-----

iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmaZE+tfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh
aW5lcy5uZXQACgkQXiijOwuE9XckYhAAi4UyZAra/7Ceuj+6NKxac4lNNK9t8M3m
qmvktfEIbXqeDmwgA5fkE45JIBMirWW2TczwuXb+QSoq7s5Uk1xJdXS9+qIEu/1I
UN6MgluFKyCHYMGC/OuC/EsVoJDES2j2rYc5nDBB614N3Bjv4zLYkkou5H8N4S8O
XH3uth2pt8fukLU/PQaHCLsTGHK6kUzfUhnOtbqVLIV9Lvjh/qoY+Mk48HwAbhun
8jd93ZW5skRtj9nuo00/9ccKi8+NK4HUxCw8W2BtQL9fhPqpqAfPaxFe+hnZffo7
x+l8W08K3iFoHsaxljrTlRn/CBCT9KgLBeY8Ppu2ER151+V4ICsp7feypGBsW48O
hBWWF2Z7L7ROcJZw8utRWNDq5B7jAN70ep8X9M/WpF9Ud71uDYzXcPOurC3t1Nnl
B7jYtRl6wWhgRd8K9p473Vm4tGTIEBJhB5wUzKwzc/tUkeh/Os3eJlHexy5dSymC
VdZTk3RizD6bbCgdFqpygS/gxKE0L87CaaZ6WdIzCbEe0IX0SRGN5rJHpEZUnfpV
SXN/5r8nCUIFf9XrfqvWshLF8oqVaPZErn82Z4wzWF0auXzZLm/4crPKWHyaYjYV
3W1zO3AZUdsmtXNx0AM4xertatBrK2/gAxh8JTibsXWtKT09WiVAVvncNu7axebF
8fPNm0JqzEc=
=mMtE
-----END PGP SIGNATURE-----

Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 71038@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 71038
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch