From debbugs-submit-bounces@debbugs.gnu.org Sat May 18 09:12:14 2024 Received: (at submit) by debbugs.gnu.org; 18 May 2024 13:12:14 +0000 Received: from localhost ([127.0.0.1]:33409 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s8JrC-0003IL-0g for submit@debbugs.gnu.org; Sat, 18 May 2024 09:12:14 -0400 Received: from lists.gnu.org ([209.51.188.17]:53410) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s8JrA-0003IF-Ls for submit@debbugs.gnu.org; Sat, 18 May 2024 09:12:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s8Jr6-0007iC-Qg for guix-patches@gnu.org; Sat, 18 May 2024 09:12:08 -0400 Received: from mira.cbaines.net ([212.71.252.8]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s8Jr0-0003mb-UU for guix-patches@gnu.org; Sat, 18 May 2024 09:12:08 -0400 Received: from localhost (unknown [89.207.171.92]) by mira.cbaines.net (Postfix) with ESMTPSA id 750FE27BBE2 for ; Sat, 18 May 2024 14:12:00 +0100 (BST) Received: from felis (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 4c30137f for ; Sat, 18 May 2024 13:11:56 +0000 (UTC) From: Christopher Baines To: guix-patches@gnu.org Subject: [PATCH 0/2] Enable specifying the available builtin builders. User-Agent: mu4e 1.12.2; emacs 29.3 Date: Sat, 18 May 2024 14:11:56 +0100 Message-ID: <87y187b6xv.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: pass client-ip=212.71.252.8; envelope-from=mail@cbaines.net; helo=mira.cbaines.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable This will enable addressing [11 by having the data service specify '("download") for the builtin builders. 1: https://issues.guix.gnu.org/67250 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 =2D-=20 2.41.0 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----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----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat May 18 09:19:43 2024 Received: (at 71038) by debbugs.gnu.org; 18 May 2024 13:19:44 +0000 Received: from localhost ([127.0.0.1]:33447 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s8JyR-00069r-IK for submit@debbugs.gnu.org; Sat, 18 May 2024 09:19:43 -0400 Received: from mira.cbaines.net ([212.71.252.8]:43556) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s8JyQ-00069f-6r for 71038@debbugs.gnu.org; Sat, 18 May 2024 09:19:42 -0400 Received: from localhost (unknown [89.207.171.92]) by mira.cbaines.net (Postfix) with ESMTPSA id 490D227BBE2 for <71038@debbugs.gnu.org>; Sat, 18 May 2024 14:19:36 +0100 (BST) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id c02c102f for <71038@debbugs.gnu.org>; Sat, 18 May 2024 13:19:35 +0000 (UTC) From: Christopher Baines To: 71038@debbugs.gnu.org Subject: [PATCH 1/2] guix: store: Enable specifying the available builtin builders. Date: Sat, 18 May 2024 14:19:34 +0100 Message-ID: <6b9c634c024b6fd7a50d3b82edc244676a8ca8e8.1716038375.git.mail@cbaines.net> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-Debbugs-Cc: Christopher Baines , Josselin Poiret , Ludovic Courtès , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 71038 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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: . Change-Id: I45d58ab93b6d276d280552858fc81ebc2b58828a --- guix/store.scm | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) 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 From debbugs-submit-bounces@debbugs.gnu.org Sat May 18 09:19:48 2024 Received: (at 71038) by debbugs.gnu.org; 18 May 2024 13:19:48 +0000 Received: from localhost ([127.0.0.1]:33449 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s8JyV-00069y-Um for submit@debbugs.gnu.org; Sat, 18 May 2024 09:19:48 -0400 Received: from mira.cbaines.net ([212.71.252.8]:43558) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s8JyQ-00069g-OB for 71038@debbugs.gnu.org; Sat, 18 May 2024 09:19:43 -0400 Received: from localhost (unknown [89.207.171.92]) by mira.cbaines.net (Postfix) with ESMTPSA id 7257B27BBE9 for <71038@debbugs.gnu.org>; Sat, 18 May 2024 14:19:38 +0100 (BST) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id ba9ae70a for <71038@debbugs.gnu.org>; Sat, 18 May 2024 13:19:36 +0000 (UTC) From: Christopher Baines To: 71038@debbugs.gnu.org Subject: [PATCH 2/2] guix: channels: Enable specifiying available builtin builders. Date: Sat, 18 May 2024 14:19:35 +0100 Message-ID: <3724435f5b2e86be53ffba5bffcbfdf493b48e5c.1716038375.git.mail@cbaines.net> X-Mailer: git-send-email 2.41.0 In-Reply-To: <6b9c634c024b6fd7a50d3b82edc244676a8ca8e8.1716038375.git.mail@cbaines.net> References: <6b9c634c024b6fd7a50d3b82edc244676a8ca8e8.1716038375.git.mail@cbaines.net> MIME-Version: 1.0 X-Debbugs-Cc: Christopher Baines , Josselin Poiret , Ludovic Courtès , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 71038 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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: . * 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(-) 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 From debbugs-submit-bounces@debbugs.gnu.org Wed May 22 11:20:57 2024 Received: (at 71038) by debbugs.gnu.org; 22 May 2024 15:20:57 +0000 Received: from localhost ([127.0.0.1]:56597 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s9nlx-0004Gt-76 for submit@debbugs.gnu.org; Wed, 22 May 2024 11:20:57 -0400 Received: from mail-wr1-f46.google.com ([209.85.221.46]:38745) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s9nls-0004Gi-Nb for 71038@debbugs.gnu.org; Wed, 22 May 2024 11:20:56 -0400 Received: by mail-wr1-f46.google.com with SMTP id ffacd0b85a97d-354ba9ae540so149420f8f.3 for <71038@debbugs.gnu.org>; Wed, 22 May 2024 08:20:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716391181; x=1716995981; darn=debbugs.gnu.org; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=Xjol8P6vZruFFv8LI2MpmiRQjXr1t6SpeMeCykPNSzY=; b=dVthGkHrdxjdunrgD83D7yXncbIcPDaxw3GEPwnQk92Iox+JNITG7ge19XnpdAF7rt kLYJ6aeV7qVCunHPdfPupxzzbpgUQQpgdLOKfEpZ9r7uKdB9N9yJbmZO7dJoZZKbPAbI /Ckn/+YCfTb8FCmM5jy/ZytVkxqodWH1xpTU8qUkvZCsl3bUbvmTBQeKZnMUqN05YMM0 /toDQw+zrtK0L7dePcrrAOjsvUGzDVxemuRzf0Qo893V0ZsKw4CDDWeflNg2hwlVYUxh 4cOlzuKl7rzXwYWXMi9OF7UmXKolxlwEPmFaJYs7MUM0PkV36r7g5lYTt5ECSdsAK7/t 3k+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716391181; x=1716995981; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Xjol8P6vZruFFv8LI2MpmiRQjXr1t6SpeMeCykPNSzY=; b=rZlwV342mQE4KCqZkmXaXFaY2mZYumQEXVxBj/XEmvgyLKf/1SA+npzrU3DdCepMqu fnvsCG6hGhf8ajgXjjcMWJdSMbBC588yVriMsqM8+cSz56tr8I+kj7HmVMa/+xMlscL1 RYnLLeVJfz+7o+ILywwJe7rLuhuAocQY942kOXdxtdDtadvGRu3h+C/Kdzr3WHCmf/5M xhhfqNvdJ10I46gAjZu9mehP30page5Wvc+ITg51230JsAEdV24NJ59I2ubmBijeuSPc BFuaZTXgmCzHxGPVINbgPKXibVQGmzGR/jdHCYA0GwKf2fGAaFfh9gq7uLoGnDLDC91p Us+A== X-Forwarded-Encrypted: i=1; AJvYcCW4VQP7f79CQ6GcB0N1gZ5Qqn2ELrg7/styPFtlWIt0T86pIJMqNWMYUn6Q0Fmt5LBQDBPkLXVKNx+kJIl5HCef7ar3Ilk= X-Gm-Message-State: AOJu0YyZ9lnOVIoCV+RQEWLYyK6bGg7hCbGQpVam6zMHBi4rO43YX/Cj n/d9oAaJR7ptK1No69h4EyMl0a4doz8aITATmadELLf9JLLU1UDc X-Google-Smtp-Source: AGHT+IE0eoTAtu38wzsqei4bfE2bhlcOLMFg7Yi8ZjPglX+bRJakIWFJ0sxcxAIjnCyr4Cazd/BkkQ== X-Received: by 2002:a05:600c:3544:b0:41b:e83e:8bb with SMTP id 5b1f17b1804b1-420fd376c84mr17464795e9.3.1716391181116; Wed, 22 May 2024 08:19:41 -0700 (PDT) Received: from lili ([2a01:e0a:59b:9120:c865:f7ad:a866:6eca]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-420149b1c24sm394437145e9.41.2024.05.22.08.19.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 May 2024 08:19:40 -0700 (PDT) From: Simon Tournier To: Christopher Baines , 71038@debbugs.gnu.org Subject: Re: [bug#71038] [PATCH 1/2] guix: store: Enable specifying the available builtin builders. In-Reply-To: <6b9c634c024b6fd7a50d3b82edc244676a8ca8e8.1716038375.git.mail@cbaines.net> References: <87y187b6xv.fsf@cbaines.net> <6b9c634c024b6fd7a50d3b82edc244676a8ca8e8.1716038375.git.mail@cbaines.net> Date: Wed, 22 May 2024 12:58:12 +0200 Message-ID: <87a5ki3ygr.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 1.1 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi Chris, On sam., 18 mai 2024 at 14:19, Christopher Baines 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-block [...] Content analysis details: (1.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (zimon.toutoune[at]gmail.com) 1.1 DATE_IN_PAST_03_06 Date: is 3 to 6 hours before Received: date -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.221.46 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.221.46 listed in list.dnswl.org] X-Debbugs-Envelope-To: 71038 Cc: Josselin Poiret , Mathieu Othacehe , Ludovic =?utf-8?Q?Court=C3=A8s?= , Tobias Geerinckx-Rice , Ricardo Wurmus , Christopher Baines X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.1 (/) Hi Chris, On sam., 18 mai 2024 at 14:19, Christopher Baines 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. Cheers, simon From debbugs-submit-bounces@debbugs.gnu.org Sun May 26 04:11:22 2024 Received: (at 71038) by debbugs.gnu.org; 26 May 2024 08:11:22 +0000 Received: from localhost ([127.0.0.1]:38288 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sB8yQ-0007jH-EA for submit@debbugs.gnu.org; Sun, 26 May 2024 04:11:22 -0400 Received: from mira.cbaines.net ([212.71.252.8]:43580) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sB8yO-0007j9-Ox for 71038@debbugs.gnu.org; Sun, 26 May 2024 04:11:21 -0400 Received: from localhost (unknown [212.132.255.10]) by mira.cbaines.net (Postfix) with ESMTPSA id 8B5DD27BBE2; Sun, 26 May 2024 09:10:41 +0100 (BST) Received: from felis (localhost.lan [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id badc66fd; Sun, 26 May 2024 08:10:40 +0000 (UTC) From: Christopher Baines To: Simon Tournier Subject: Re: [bug#71038] [PATCH 1/2] guix: store: Enable specifying the available builtin builders. In-Reply-To: <87a5ki3ygr.fsf@gmail.com> (Simon Tournier's message of "Wed, 22 May 2024 12:58:12 +0200") References: <87y187b6xv.fsf@cbaines.net> <6b9c634c024b6fd7a50d3b82edc244676a8ca8e8.1716038375.git.mail@cbaines.net> <87a5ki3ygr.fsf@gmail.com> User-Agent: mu4e 1.12.2; emacs 29.3 Date: Sun, 26 May 2024 09:10:40 +0100 Message-ID: <87sey5f0xr.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 71038 Cc: Josselin Poiret , Mathieu Othacehe , Ludovic =?utf-8?Q?Court=C3=A8s?= , Tobias Geerinckx-Rice , Ricardo Wurmus , Christopher Baines , 71038@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Simon Tournier writes: > On sam., 18 mai 2024 at 14:19, Christopher Baines 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. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----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----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri May 31 12:37:02 2024 Received: (at 71038) by debbugs.gnu.org; 31 May 2024 16:37:02 +0000 Received: from localhost ([127.0.0.1]:55242 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sD5FV-00010k-MI for submit@debbugs.gnu.org; Fri, 31 May 2024 12:37:02 -0400 Received: from mail-wm1-f44.google.com ([209.85.128.44]:38349) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sD5FT-00010P-Tf for 71038@debbugs.gnu.org; Fri, 31 May 2024 12:37:01 -0400 Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-42129d4e7bdso1461785e9.1 for <71038@debbugs.gnu.org>; Fri, 31 May 2024 09:36:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717173343; x=1717778143; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=2s8RGNclctcIBtWJLPB7LaxAbO9RbJk2pOFDn2shwjE=; b=auVVr8ucHPWjd5atrh2wbGW+ft3+DJQnmCxdqYOxCGxpMI1ZJN9WhxGqmgSr0hmspy NwMoCmIORB9uN1IGFW81k3tOeuticIicHpngddPVat+4RyEul5XMIfJdIfyB7IuHok4h rM53dpk0wEkG6+xtn51gWhuIPSSP+S1fLzfOCgoAwLWZzmTh3BMC/k7UZGDQ8GvUFXoN 4UgMSdNORsHKax1eq4JN8BCBwY5AVIXjPS/NNdRxK5BKM3AVv8Jti9rdgHm8tpK9Dxry OTTAJmy5O0UZ9aY9mBDB7rcLA9W94dLW9Og1tGNLiqsg4LFllJlXETIORGUXWdWnrUXe YQ7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717173343; x=1717778143; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2s8RGNclctcIBtWJLPB7LaxAbO9RbJk2pOFDn2shwjE=; b=ZuVtdARrENEFnj3q8KBEWFGTagNjYhzO2QPcrP1JWW5ob4kdDeAtXPH/1XRkjodATS ousuJnanu7umB8IGZKsosW3q13fbFXio5QAf9j/m6Gn5rEfR835MJluG2ZsGy/GwbT/h OGo5j3OV2GVyp3KUlwP1OBysX2c8WuvT65aUyEp6w/R7oRziginYCxIswSVVSegPuq8O xwQQP/h7s6Og0lKombEUCxjcc2mSvFWFl18HywcJcJNeVqtUSwRIv26xkuM9/Usy4cM7 ZqcmBAblGzYCtmM0xR06/uzCldYxJF8EvJ5CkDTjSUUY+HdA/wXaBmanH2clC2/1HvBU CRkA== X-Forwarded-Encrypted: i=1; AJvYcCXpgzmV5wl+SpiXet2wWScnA/sik6jzts4o+gZMT6Yp8K5sSXESMh287MYRFCksdaRap7y8gD8427b68MyF8fO6rCczUR4= X-Gm-Message-State: AOJu0YzSCDZ/AfrqnrhRn/fF4PKdjEpLxgY8mbhHSkXZUtSWvdOG8dnH RUdB2VDGgG4z3yEbhsrKdGxdio2KVlcIjo/6grxmxXbsDaB9o2aoDMq7ww== X-Google-Smtp-Source: AGHT+IEuafFuhtukyUz1PKmxYS8I1MVoDxghEadm976b8JUpu4yDl9KiZ0SH2GPPbc8Xhdkf/6POnA== X-Received: by 2002:adf:f387:0:b0:354:f46f:a5b5 with SMTP id ffacd0b85a97d-35e0f2e0062mr1763568f8f.3.1717173342586; Fri, 31 May 2024 09:35:42 -0700 (PDT) Received: from lili ([81.185.168.12]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-35dd064b5e9sm2194234f8f.96.2024.05.31.09.35.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 09:35:41 -0700 (PDT) From: Simon Tournier To: Christopher Baines Subject: Re: [bug#71038] [PATCH 1/2] guix: store: Enable specifying the available builtin builders. In-Reply-To: <87sey5f0xr.fsf@cbaines.net> References: <87y187b6xv.fsf@cbaines.net> <6b9c634c024b6fd7a50d3b82edc244676a8ca8e8.1716038375.git.mail@cbaines.net> <87a5ki3ygr.fsf@gmail.com> <87sey5f0xr.fsf@cbaines.net> Date: Mon, 27 May 2024 19:19:07 +0200 Message-ID: <875xuz18c4.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 71038 Cc: Josselin Poiret , Mathieu Othacehe , Ludovic =?utf-8?Q?Court=C3=A8s?= , Tobias Geerinckx-Rice , Ricardo Wurmus , Christopher Baines , 71038@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Chris, On Sun, 26 May 2024 at 09:10, Christopher Baines wrote: >>> (define* (open-connection #:optional (uri (%daemon-socket-uri)) >>> #:key port (reserve-space? #t) cpu-affinity >>> - non-blocking?) >>> + non-blocking? assume-available-builtin-build= ers) >> >> 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-ava= ilable-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=E2=80=99s why I am suggesting something like %assume-available-builtin-builders that collects the acceptable values =E2=80=93 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]: --8<---------------cut here---------------start------------->8--- As in: (open-connection #:assume-available-builtin-builders '("download")) --8<---------------cut here---------------end--------------->8--- 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=C3=A8s Wed, 22 Nov 2023 11:19:42 +0100 id:87bkbmm6o1.fsf@gnu.org https://issues.guix.gnu.org/67250 https://issues.guix.gnu.org/msgid/87bkbmm6o1.fsf@gnu.org https://yhetil.org/guix/87bkbmm6o1.fsf@gnu.org Cheers, simon From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 11 15:26:57 2024 Received: (at 71038) by debbugs.gnu.org; 11 Jun 2024 19:26:57 +0000 Received: from localhost ([127.0.0.1]:36256 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sH78z-00018n-BX for submit@debbugs.gnu.org; Tue, 11 Jun 2024 15:26:57 -0400 Received: from mira.cbaines.net ([212.71.252.8]:43832) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sH78x-00018c-Pl for 71038@debbugs.gnu.org; Tue, 11 Jun 2024 15:26:56 -0400 Received: from localhost (unknown [212.132.255.10]) by mira.cbaines.net (Postfix) with ESMTPSA id 1E3DF27BBE2; Tue, 11 Jun 2024 20:26:26 +0100 (BST) Received: from felis (localhost.lan [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id bd40b795; Tue, 11 Jun 2024 19:26:25 +0000 (UTC) From: Christopher Baines To: Simon Tournier Subject: Re: [bug#71038] [PATCH 1/2] guix: store: Enable specifying the available builtin builders. In-Reply-To: <875xuz18c4.fsf@gmail.com> (Simon Tournier's message of "Mon, 27 May 2024 19:19:07 +0200") References: <87y187b6xv.fsf@cbaines.net> <6b9c634c024b6fd7a50d3b82edc244676a8ca8e8.1716038375.git.mail@cbaines.net> <87a5ki3ygr.fsf@gmail.com> <87sey5f0xr.fsf@cbaines.net> <875xuz18c4.fsf@gmail.com> User-Agent: mu4e 1.12.4; emacs 29.3 Date: Tue, 11 Jun 2024 20:26:22 +0100 Message-ID: <87a5jr8en5.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 71038 Cc: Josselin Poiret , Mathieu Othacehe , Ludovic =?utf-8?Q?Court=C3=A8s?= , Tobias Geerinckx-Rice , Ricardo Wurmus , Christopher Baines , 71038@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Simon Tournier writes: > On Sun, 26 May 2024 at 09:10, Christopher Baines wrote: > >>>> (define* (open-connection #:optional (uri (%daemon-socket-uri)) >>>> #:key port (reserve-space? #t) cpu-affinity >>>> - non-blocking?) >>>> + non-blocking? assume-available-builtin-buil= ders) >>> >>> 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-av= ailable-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=E2=80=99s why I am suggesting something like > %assume-available-builtin-builders that collects the acceptable values > =E2=80=93 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. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----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----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 24 09:43:53 2024 Received: (at 71038) by debbugs.gnu.org; 24 Jun 2024 13:43:53 +0000 Received: from localhost ([127.0.0.1]:58539 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sLjz6-0004MO-97 for submit@debbugs.gnu.org; Mon, 24 Jun 2024 09:43:53 -0400 Received: from mira.cbaines.net ([212.71.252.8]:43886) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sLjz3-0004M7-OJ for 71038@debbugs.gnu.org; Mon, 24 Jun 2024 09:43:50 -0400 Received: from localhost (unknown [212.132.255.81]) by mira.cbaines.net (Postfix) with ESMTPSA id 5C07D27BBE9 for <71038@debbugs.gnu.org>; Mon, 24 Jun 2024 14:43:47 +0100 (BST) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id 35e69eb5 for <71038@debbugs.gnu.org>; Mon, 24 Jun 2024 13:43:46 +0000 (UTC) From: Christopher Baines To: 71038@debbugs.gnu.org Subject: [PATCH v2 2/2] guix: channels: Enable specifiying available builtin builders. Date: Mon, 24 Jun 2024 14:43:46 +0100 Message-ID: <319c7822ef542dc412d55af616ecbeb86b005c8b.1719236626.git.mail@cbaines.net> X-Mailer: git-send-email 2.45.1 In-Reply-To: References: MIME-Version: 1.0 X-Debbugs-Cc: Christopher Baines , Josselin Poiret , Ludovic Courtès , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 71038 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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: . * 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(-) 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 From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 24 09:43:53 2024 Received: (at 71038) by debbugs.gnu.org; 24 Jun 2024 13:43:53 +0000 Received: from localhost ([127.0.0.1]:58542 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sLjz7-0004MR-6O for submit@debbugs.gnu.org; Mon, 24 Jun 2024 09:43:53 -0400 Received: from mira.cbaines.net ([212.71.252.8]:43884) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sLjz3-0004M4-Ku for 71038@debbugs.gnu.org; Mon, 24 Jun 2024 09:43:50 -0400 Received: from localhost (unknown [212.132.255.81]) by mira.cbaines.net (Postfix) with ESMTPSA id 4B42B27BBE2 for <71038@debbugs.gnu.org>; Mon, 24 Jun 2024 14:43:47 +0100 (BST) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id 265b217b for <71038@debbugs.gnu.org>; Mon, 24 Jun 2024 13:43:46 +0000 (UTC) From: Christopher Baines To: 71038@debbugs.gnu.org Subject: [PATCH v2 1/2] guix: store: Enable specifying the available builtin builders. Date: Mon, 24 Jun 2024 14:43:45 +0100 Message-ID: X-Mailer: git-send-email 2.45.1 MIME-Version: 1.0 X-Debbugs-Cc: Christopher Baines , Josselin Poiret , Ludovic Courtès , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 71038 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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: . Change-Id: I45d58ab93b6d276d280552858fc81ebc2b58828a --- guix/store.scm | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) 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 From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 04 05:14:25 2024 Received: (at 71038) by debbugs.gnu.org; 4 Jul 2024 09:14:25 +0000 Received: from localhost ([127.0.0.1]:41486 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sPIXp-0007x4-Dr for submit@debbugs.gnu.org; Thu, 04 Jul 2024 05:14:25 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54328) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sPIXn-0007wq-Bf for 71038@debbugs.gnu.org; Thu, 04 Jul 2024 05:14:23 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sPIXe-0005LY-3a; Thu, 04 Jul 2024 05:14:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=dxVaHYSLbvyFn+dlcLi1h+zvkXwUr2BdtNaQe+TqEhA=; b=GYNKWc8ctXRzin3ltMsk M+goNgJEL0wmGRDrwaMlJ+yDZMZsQ8T667SSzNp3J0v3/np7ZFaCLtJfpOdqYrLdRhpMOVeOd0bo1 7uSoI3l3ci0SUPqc8mZ+oyRZWyrWlcVQC4GhKw+ZSh+GbUS7LB9XxoLViZMWBB4y7hVhmFfSVDkSv TtiDzOTiudNqYJhk1h8u8UYuvZ28kss3G94tPtfecs2garX1Pr9/AibpH/PFCV7mQMkaUGoG5J185 9zffp2giCuK1iE2AJjIZkPEK0hQCPw/XSPfr7kAjsEWIfit9bOUd8ogBHOAr4XPNcHWchhC1HGxjJ Y8l15TCRauDXDQ==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Christopher Baines Subject: Re: [bug#71038] [PATCH v2 1/2] guix: store: Enable specifying the available builtin builders. In-Reply-To: (Christopher Baines's message of "Mon, 24 Jun 2024 14:43:45 +0100") References: <87y187b6xv.fsf@cbaines.net> Date: Thu, 04 Jul 2024 11:14:07 +0200 Message-ID: <87msmx7c4g.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 71038 Cc: Josselin Poiret , Simon Tournier , Mathieu Othacehe , Tobias Geerinckx-Rice , Christopher Baines , 71038@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hello! Summarizing our live review session here=E2=80=A6 Christopher Baines skribis: > 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 c= an be > built on other machines, it's useful to control which builtin builders th= ey > depend on. > > * guix/store.scm (open-connection, port->connection): Accept > #:assume-available-builtin-builders and use this instead of > %built-in-builders. > > Fixes: . > > Change-Id: I45d58ab93b6d276d280552858fc81ebc2b58828a This is nice. Nitpick: you can drop =E2=80=9Cguix:=E2=80=9D from the commi= t message subject. > (define* (open-connection #:optional (uri (%daemon-socket-uri)) > #:key port (reserve-space? #t) cpu-affinity > - non-blocking?) > + non-blocking? assume-available-builtin-builder= s) My only suggestion here is to rename =E2=80=98assume-available-builtin-buil= ders=E2=80=99 to just =E2=80=98built-in-builders=E2=80=99 (so that it=E2=80=99s a noun ra= ther than a phrase). Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 04 05:17:22 2024 Received: (at 71038) by debbugs.gnu.org; 4 Jul 2024 09:17:22 +0000 Received: from localhost ([127.0.0.1]:41491 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sPIag-00082M-0P for submit@debbugs.gnu.org; Thu, 04 Jul 2024 05:17:22 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57850) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sPIae-00082A-E7 for 71038@debbugs.gnu.org; Thu, 04 Jul 2024 05:17:21 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sPIaW-0008Kk-P7; Thu, 04 Jul 2024 05:17:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=/6aayhsTyT5/nQNxstbffirMx2e9cq+ACHxm3MrAMTg=; b=GhEt8QwHyoGb99cb0QOJ HvJWUg2R7wUES8pG2D63+WTioYOrfeAUmKV2TI//nNyog43CNCVOJrNEk3wpzHWyU5wFGFBzmVUM4 V9kDux1gNS5oeBRT3/1jPXjDIg6nxYPgyFVd/i1B6liwIVsl1M1fIabLIIeCZuSSKWRy6meDoowSz SFwz+zcm7HATrluLruS9tcAAB9rZm4i3LL3OdtTni6Mjf8A2udykjwyy+5XQ2byLQy1ad+CATUeNh BgKNVLpiio8h92+zAPqvB+6E3I1dOigYjHHlYwLq2NDzQN0rSf2wenkLxVtH7aUcBQ0CFMX0FVn9s eSSdrBomC1YoBw==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Christopher Baines Subject: Re: [bug#71038] [PATCH v2 2/2] guix: channels: Enable specifiying available builtin builders. In-Reply-To: <319c7822ef542dc412d55af616ecbeb86b005c8b.1719236626.git.mail@cbaines.net> (Christopher Baines's message of "Mon, 24 Jun 2024 14:43:46 +0100") References: <319c7822ef542dc412d55af616ecbeb86b005c8b.1719236626.git.mail@cbaines.net> Date: Thu, 04 Jul 2024 11:17:05 +0200 Message-ID: <87ikxl7bzi.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 71038 Cc: Josselin Poiret , Simon Tournier , Mathieu Othacehe , Tobias Geerinckx-Rice , Christopher Baines , 71038@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Christopher Baines skribis: > 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 c= an be > built on other machines, it's useful to control which builtin builders th= ey > depend on. > > Fixes: . > > * 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=E2=80=99s make tricky co= de a bit harder to read, but as you said, it=E2=80=99s a real issue that needs fixing: on build farms or for anyone using offloading and potentially not upgrading all the machines in lockstep. > + #:version proto > + #$@(if assume-available-buil= tin-builders > + #~(#:assume-available= -builtin-builders > + '(#$@assume-availa= ble-builtin-builders)) > + '())) Here (in =E2=80=98build-program=E2=80=99), we can assume we=E2=80=99re usin= g the current (guix store) module, so we can safely pass #:built-in-builders unconditionally. That=E2=80=99s it! The series LGTM with these changes. Thank you! :-) From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 04 07:50:28 2024 Received: (at 71038) by debbugs.gnu.org; 4 Jul 2024 11:50:28 +0000 Received: from localhost ([127.0.0.1]:41684 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sPKyq-0006pl-0i for submit@debbugs.gnu.org; Thu, 04 Jul 2024 07:50:28 -0400 Received: from mira.cbaines.net ([212.71.252.8]:43900) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sPKye-0006pT-Bg for 71038@debbugs.gnu.org; Thu, 04 Jul 2024 07:50:26 -0400 Received: from localhost (nat-inria-guest-32-gw-01-bso.bordeaux.inria.fr [194.199.1.32]) by mira.cbaines.net (Postfix) with ESMTPSA id EB72927BBE9 for <71038@debbugs.gnu.org>; Thu, 4 Jul 2024 12:50:11 +0100 (BST) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id e6d59174 for <71038@debbugs.gnu.org>; Thu, 4 Jul 2024 11:50:10 +0000 (UTC) From: Christopher Baines To: 71038@debbugs.gnu.org Subject: [PATCH v3 2/2] guix: channels: Enable specifiying available builtin builders. Date: Thu, 4 Jul 2024 13:50:09 +0200 Message-ID: <0d2d50291d3c0c7be10c8a535bf64dec49a4f1eb.1720093809.git.mail@cbaines.net> X-Mailer: git-send-email 2.45.2 In-Reply-To: <14fc15bdb8b5fd615fb93e025e86ccf70cf81814.1720093809.git.mail@cbaines.net> References: <14fc15bdb8b5fd615fb93e025e86ccf70cf81814.1720093809.git.mail@cbaines.net> MIME-Version: 1.0 X-Debbugs-Cc: Christopher Baines , Josselin Poiret , Ludovic Courtès , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 71038 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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: . * 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(-) 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 From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 04 07:50:48 2024 Received: (at 71038) by debbugs.gnu.org; 4 Jul 2024 11:50:48 +0000 Received: from localhost ([127.0.0.1]:41687 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sPKz9-0006qI-P2 for submit@debbugs.gnu.org; Thu, 04 Jul 2024 07:50:48 -0400 Received: from mira.cbaines.net ([212.71.252.8]:43904) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sPKz7-0006qA-KQ for 71038@debbugs.gnu.org; Thu, 04 Jul 2024 07:50:46 -0400 Received: from localhost (nat-inria-guest-32-gw-01-bso.bordeaux.inria.fr [194.199.1.32]) by mira.cbaines.net (Postfix) with ESMTPSA id A8F7D27BBE2 for <71038@debbugs.gnu.org>; Thu, 4 Jul 2024 12:50:11 +0100 (BST) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id 9a747b75 for <71038@debbugs.gnu.org>; Thu, 4 Jul 2024 11:50:10 +0000 (UTC) From: Christopher Baines To: 71038@debbugs.gnu.org Subject: [PATCH v3 1/2] guix: store: Enable specifying the builtin builders. Date: Thu, 4 Jul 2024 13:50:08 +0200 Message-ID: <14fc15bdb8b5fd615fb93e025e86ccf70cf81814.1720093809.git.mail@cbaines.net> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 X-Debbugs-Cc: Christopher Baines , Josselin Poiret , Ludovic Courtès , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 71038 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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. Fixes: . Change-Id: I45d58ab93b6d276d280552858fc81ebc2b58828a --- guix/store.scm | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) 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 From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 16 06:06:12 2024 Received: (at 71038) by debbugs.gnu.org; 16 Jul 2024 10:06:12 +0000 Received: from localhost ([127.0.0.1]:32791 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sTf4W-0006MP-0t for submit@debbugs.gnu.org; Tue, 16 Jul 2024 06:06:12 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37438) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sTf4T-0006MA-Cx for 71038@debbugs.gnu.org; Tue, 16 Jul 2024 06:06:10 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sTf4K-0004Gg-IU; Tue, 16 Jul 2024 06:06:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=WYQyu0ieBWIpcqxqhvLazULbX49tDiP3tO+gDacGoD4=; b=CYwGiVMRmvYqxAl8SE3z L4dVOXSnWPpHBbyMv1i6RhtfPvLd7EMR9fC6/1wuFr65h1D2o+N5dnnxbJbslBrE++V/QAjCH+d/n aMQN/MFCmbcKgrp0L/IZ6MNnfUDcIVSPJzv8I89QlNDZ5p9ttKGHAaU/FY4V3yX+Ray68k7hTpfis 3UNodxl7cRzH9bwTyU9HXhXJinRdfSmsmOia6+9ZHxnazpl/6XBZlo1WU+Vx0sLDGqpyazoFF8hr7 Iy49IktM4oZzBGz0hJhSDgvAT62nSITBLQu4WKmRBXzFTNPXq9+1tA4M71j95OE67wH1gzfIUxstM Ws2y/Zs58pCVdA==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Christopher Baines Subject: Re: [bug#71038] [PATCH v3 2/2] guix: channels: Enable specifiying available builtin builders. In-Reply-To: <0d2d50291d3c0c7be10c8a535bf64dec49a4f1eb.1720093809.git.mail@cbaines.net> (Christopher Baines's message of "Thu, 4 Jul 2024 13:50:09 +0200") References: <14fc15bdb8b5fd615fb93e025e86ccf70cf81814.1720093809.git.mail@cbaines.net> <0d2d50291d3c0c7be10c8a535bf64dec49a4f1eb.1720093809.git.mail@cbaines.net> Date: Tue, 16 Jul 2024 12:05:56 +0200 Message-ID: <87wmllzm63.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 71038 Cc: Josselin Poiret , Simon Tournier , Mathieu Othacehe , Tobias Geerinckx-Rice , Christopher Baines , 71038@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hello! v3 LGTM, thanks! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 16 08:48:54 2024 Received: (at 71038) by debbugs.gnu.org; 16 Jul 2024 12:48:54 +0000 Received: from localhost ([127.0.0.1]:32915 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sThbx-0007mr-Qt for submit@debbugs.gnu.org; Tue, 16 Jul 2024 08:48:54 -0400 Received: from mira.cbaines.net ([212.71.252.8]:43956) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sThbv-0007mT-1O for 71038@debbugs.gnu.org; Tue, 16 Jul 2024 08:48:52 -0400 Received: from localhost (82-132-219-126.dab.02.net [82.132.219.126]) by mira.cbaines.net (Postfix) with ESMTPSA id B0EAD27BBE9 for <71038@debbugs.gnu.org>; Tue, 16 Jul 2024 13:48:47 +0100 (BST) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id f6def20c for <71038@debbugs.gnu.org>; Tue, 16 Jul 2024 12:48:37 +0000 (UTC) From: Christopher Baines To: 71038@debbugs.gnu.org Subject: [PATCH v4 2/3] guix: channels: Enable specifiying available builtin builders. Date: Tue, 16 Jul 2024 13:48:35 +0100 Message-ID: X-Mailer: git-send-email 2.45.2 In-Reply-To: <8075bccd0026e76f16f91d51c5b9203b5693b03e.1721134116.git.mail@cbaines.net> References: <8075bccd0026e76f16f91d51c5b9203b5693b03e.1721134116.git.mail@cbaines.net> MIME-Version: 1.0 X-Debbugs-Cc: Christopher Baines , Josselin Poiret , Ludovic Courtès , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 71038 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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: . * 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(-) 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 From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 16 08:48:57 2024 Received: (at 71038) by debbugs.gnu.org; 16 Jul 2024 12:48:57 +0000 Received: from localhost ([127.0.0.1]:32917 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sThc0-0007n2-Jo for submit@debbugs.gnu.org; Tue, 16 Jul 2024 08:48:56 -0400 Received: from mira.cbaines.net ([212.71.252.8]:43958) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sThbv-0007mV-LD for 71038@debbugs.gnu.org; Tue, 16 Jul 2024 08:48:53 -0400 Received: from localhost (82-132-219-126.dab.02.net [82.132.219.126]) by mira.cbaines.net (Postfix) with ESMTPSA id 37EBF27BBEA for <71038@debbugs.gnu.org>; Tue, 16 Jul 2024 13:48:48 +0100 (BST) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id a6cb30a3 for <71038@debbugs.gnu.org>; Tue, 16 Jul 2024 12:48:37 +0000 (UTC) From: Christopher Baines To: 71038@debbugs.gnu.org Subject: [PATCH v4 3/3] inferior: Use the host built-in-builders with inferior. Date: Tue, 16 Jul 2024 13:48:36 +0100 Message-ID: X-Mailer: git-send-email 2.45.2 In-Reply-To: <8075bccd0026e76f16f91d51c5b9203b5693b03e.1721134116.git.mail@cbaines.net> References: <8075bccd0026e76f16f91d51c5b9203b5693b03e.1721134116.git.mail@cbaines.net> MIME-Version: 1.0 X-Debbugs-Cc: Christopher Baines , Josselin Poiret , Ludovic Courtès , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 71038 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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(-) 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 (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 From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 16 08:48:57 2024 Received: (at 71038) by debbugs.gnu.org; 16 Jul 2024 12:48:57 +0000 Received: from localhost ([127.0.0.1]:32919 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sThc1-0007n5-0n for submit@debbugs.gnu.org; Tue, 16 Jul 2024 08:48:57 -0400 Received: from mira.cbaines.net ([212.71.252.8]:43954) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sThbv-0007mS-1P for 71038@debbugs.gnu.org; Tue, 16 Jul 2024 08:48:53 -0400 Received: from localhost (82-132-219-126.dab.02.net [82.132.219.126]) by mira.cbaines.net (Postfix) with ESMTPSA id 4E05927BBE2 for <71038@debbugs.gnu.org>; Tue, 16 Jul 2024 13:48:47 +0100 (BST) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id 0d1a369d for <71038@debbugs.gnu.org>; Tue, 16 Jul 2024 12:48:37 +0000 (UTC) From: Christopher Baines To: 71038@debbugs.gnu.org Subject: [PATCH v4 1/3] guix: store: Enable specifying the builtin builders. Date: Tue, 16 Jul 2024 13:48:34 +0100 Message-ID: <8075bccd0026e76f16f91d51c5b9203b5693b03e.1721134116.git.mail@cbaines.net> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 X-Debbugs-Cc: Christopher Baines , Josselin Poiret , Ludovic Courtès , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 71038 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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. Fixes: . Change-Id: I45d58ab93b6d276d280552858fc81ebc2b58828a --- guix/store.scm | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) 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 From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 16 11:00:18 2024 Received: (at 71038) by debbugs.gnu.org; 16 Jul 2024 15:00:18 +0000 Received: from localhost ([127.0.0.1]:34240 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sTjf7-00037Y-UD for submit@debbugs.gnu.org; Tue, 16 Jul 2024 11:00:18 -0400 Received: from mira.cbaines.net ([212.71.252.8]:43960) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sTjf5-00037N-Il for 71038@debbugs.gnu.org; Tue, 16 Jul 2024 11:00:16 -0400 Received: from localhost (ip233.ip-54-38-212.eu [54.38.212.233]) by mira.cbaines.net (Postfix) with ESMTPSA id CA0AD27BBE2; Tue, 16 Jul 2024 16:00:11 +0100 (BST) Received: from felis (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id f77ec54b; Tue, 16 Jul 2024 13:13:30 +0000 (UTC) From: Christopher Baines To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: [bug#71038] [PATCH v3 2/2] guix: channels: Enable specifiying available builtin builders. In-Reply-To: <87wmllzm63.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Tue, 16 Jul 2024 12:05:56 +0200") References: <14fc15bdb8b5fd615fb93e025e86ccf70cf81814.1720093809.git.mail@cbaines.net> <0d2d50291d3c0c7be10c8a535bf64dec49a4f1eb.1720093809.git.mail@cbaines.net> <87wmllzm63.fsf@gnu.org> User-Agent: mu4e 1.12.4; emacs 29.3 Date: Tue, 16 Jul 2024 14:13:27 +0100 Message-ID: <87a5ih7a4o.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 71038 Cc: 71038@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: > 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. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----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----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 18 05:38:17 2024 Received: (at 71038) by debbugs.gnu.org; 18 Jul 2024 09:38:17 +0000 Received: from localhost ([127.0.0.1]:36945 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sUNab-00021W-Hm for submit@debbugs.gnu.org; Thu, 18 Jul 2024 05:38:17 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48568) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sUNaZ-00021C-8F for 71038@debbugs.gnu.org; Thu, 18 Jul 2024 05:38:15 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sUNYJ-0005AI-Ar; Thu, 18 Jul 2024 05:35:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=xT7PbloMRljB6X0RPsqsNVZb35vffQP4lC3RrzzzF0M=; b=rZFaG8E5iqYsdUKRZqAs RLEpxpdFOp+O/gK+J4RIcgTJcgI77JiPCxNj1sH1jn1OAfxGpocolajACalwqZHxNcNtIVdTe9hgd pr8fIIMSQm3tE30VcrlefkHzN4qCzzgEULU40VN1jfcNJIrFK4IcnvfFmCxV+/+OllpPsaT2D566/ J3Ob6Friky5HpORFiQoYPbu2ZcPK7qaQO2suSRxVxqWZoO8LPPUNZO9pWjTYeTGqzv/gVRMHsfxM1 3BdhgXKjJFLx027ctCYUJBvy3HBwTmTb6fwsg3aR2MaxWlEfX4BFrnHkNaWBsE5jTbaEx4AeB1l1I chFCfKoqn+lnww==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Christopher Baines Subject: Re: [bug#71038] [PATCH v4 3/3] inferior: Use the host built-in-builders with inferior. In-Reply-To: (Christopher Baines's message of "Tue, 16 Jul 2024 13:48:36 +0100") References: <8075bccd0026e76f16f91d51c5b9203b5693b03e.1721134116.git.mail@cbaines.net> Date: Thu, 18 Jul 2024 11:35:49 +0200 Message-ID: <87ed7rvy8a.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 71038 Cc: Josselin Poiret , Simon Tournier , Mathieu Othacehe , Tobias Geerinckx-Rice , Christopher Baines , 71038@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Christopher Baines 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, Ludo'. From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 18 09:09:10 2024 Received: (at 71038-done) by debbugs.gnu.org; 18 Jul 2024 13:09:10 +0000 Received: from localhost ([127.0.0.1]:37149 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sUQsf-0001jP-VS for submit@debbugs.gnu.org; Thu, 18 Jul 2024 09:09:10 -0400 Received: from mira.cbaines.net ([212.71.252.8]:43964) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sUQsd-0001jF-DJ for 71038-done@debbugs.gnu.org; Thu, 18 Jul 2024 09:09:08 -0400 Received: from localhost (unknown [212.132.255.81]) by mira.cbaines.net (Postfix) with ESMTPSA id 5762427BBE2; Thu, 18 Jul 2024 14:09:02 +0100 (BST) Received: from felis (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 23eca46f; Thu, 18 Jul 2024 13:09:01 +0000 (UTC) From: Christopher Baines To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: [bug#71038] [PATCH v4 3/3] inferior: Use the host built-in-builders with inferior. In-Reply-To: <87ed7rvy8a.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Thu, 18 Jul 2024 11:35:49 +0200") References: <8075bccd0026e76f16f91d51c5b9203b5693b03e.1721134116.git.mail@cbaines.net> <87ed7rvy8a.fsf@gnu.org> User-Agent: mu4e 1.12.4; emacs 29.3 Date: Thu, 18 Jul 2024 14:08:59 +0100 Message-ID: <87wmli6e50.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 71038-done Cc: 71038-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: > Christopher Baines skribis: > >> Rather than querying the built-in-builders from the inferior, as using t= he >> 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 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----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----- --=-=-=-- From unknown Sun Aug 17 22:13:16 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 16 Aug 2024 11:24:09 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator