From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id AFTGMGXyEmaqVQEAqHPOHw:P1 (envelope-from ) for ; Sun, 07 Apr 2024 21:22:13 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id AFTGMGXyEmaqVQEAqHPOHw (envelope-from ) for ; Sun, 07 Apr 2024 21:22:13 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=retrospec.tv header.s=fm1 header.b=mAyYw7lK; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm2 header.b=Z5xI8GIA; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1712517733; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=FwlPHCWKs90g9/3tY/YY2bu5QQ1bpcwYzYTTseNV7H0=; b=hZXyJkxSOg2nHGLuwPC36nO0ufCKGXeCkmeoILYVcD8QmSvm6TRK/K+lWmRHeg2/ApA8Xy TbKYQv6kFv7582h0mhlT3OCHhn/oz7m9JKRrvAlv+wFSKoEag/dowGLWyw7pqAxUwy3Iay EElT3AlWRhuD4cZWUVA62clM5bA70jEM3mY7QwJpfaky/BOq6EdPnXXNaTAwAhfNqq4sHb jJzPRchIH8GRoYWRq4qsnE9pveqYaO+EnT9yhXAn0v53MW4R0kfmDA3BaByelPze067kp9 0bFZG1Dsz7P/BwmbaU/FHveKQ/ikrPwil7IIxXKydfNJjZOHpytR5Drc7WvuQQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1712517733; a=rsa-sha256; cv=none; b=CGTsdD7aGglVabaKkVWE+8tpakEn19QyhYqwf953CvSAL8cLo4JPLttu3qjQEQ1nGaoaqR 2FDoB+z9Wt28yyverFbetHPkahW06eogAF1AC1qsg3suHqWD9jATLIdjRZtJbYDrePMese pPqImhI1avsPZP/oI5KbmArqmkc/rRxph5rmKc+kdmD7S7atFJ5va2X6BCGhn6ZHXcg1Ls ljovYsf5RWQDnZ0JVTT9j+Icq84OApLb3OYq9IBYFXkI5t2llpnJh9TDTr7Dl+6UDj9Ukn JE9otAa+EGpIwZNRUQBZ5FY45CrBq4QkWbE1WJyT7BdWBCwhzAF9yh1/fEg95Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=retrospec.tv header.s=fm1 header.b=mAyYw7lK; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm2 header.b=Z5xI8GIA; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 927D555ADC for ; Sun, 7 Apr 2024 21:22:12 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rtY5U-0006dn-Nu; Sun, 07 Apr 2024 15:21:56 -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 1rtY5T-0006dZ-5S for guix-patches@gnu.org; Sun, 07 Apr 2024 15:21:55 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rtY5S-00018N-Tb for guix-patches@gnu.org; Sun, 07 Apr 2024 15:21:54 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rtY5Z-0002nI-QF for guix-patches@gnu.org; Sun, 07 Apr 2024 15:22:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70263] [PATCH] gnu: guix-configuration: Improve offload build-machines. Resent-From: Ian Eure Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 07 Apr 2024 19:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 70263 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70263@debbugs.gnu.org Cc: Ian Eure X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.171251770510673 (code B ref -1); Sun, 07 Apr 2024 19:22:01 +0000 Received: (at submit) by debbugs.gnu.org; 7 Apr 2024 19:21:45 +0000 Received: from localhost ([127.0.0.1]:44681 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rtY5I-0002m3-EO for submit@debbugs.gnu.org; Sun, 07 Apr 2024 15:21:44 -0400 Received: from lists.gnu.org ([2001:470:142::17]:47248) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rtY52-0002k5-94 for submit@debbugs.gnu.org; Sun, 07 Apr 2024 15:21:42 -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 1rtY4n-0006ap-Tv for guix-patches@gnu.org; Sun, 07 Apr 2024 15:21:14 -0400 Received: from wfhigh8-smtp.messagingengine.com ([64.147.123.159]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rtY4l-00014R-3i for guix-patches@gnu.org; Sun, 07 Apr 2024 15:21:13 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailfhigh.west.internal (Postfix) with ESMTP id 9B525180010C; Sun, 7 Apr 2024 15:21:05 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Sun, 07 Apr 2024 15:21:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=retrospec.tv; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:message-id:mime-version:reply-to :subject:subject:to:to; s=fm1; t=1712517665; x=1712604065; bh=Fw lPHCWKs90g9/3tY/YY2bu5QQ1bpcwYzYTTseNV7H0=; b=mAyYw7lKNK/bc6E0aw JhRVTNI+BsaMFZTOySrlfrgvmAz95+UaXI4wP4+scdnJtrkZpMk/O3VOWWR2kdVC t1c4S9aeT1eEr4cqGSaYM2Bj/CioXiVIBXKZ3450NzL8XqKpxbGecVSUcOrq5s+7 uf0gHVWvoNtp0r8S85CEkojDiVbiLOaw1e06D339CWcMYRBmQei9D+HP7ePSlrKf 86nS3Y0EuuAGL68jUKDOX34Nc4K/F8vwa8oaxzdTLOXOjEoo58YI15cynnJqZ01W utz/VQuNBYOJ/FKUZu+gyI9AE/vM/J2d65ZCOImlSKcj9Ae2mISaag7M/FkYYEj3 O07A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:message-id:mime-version:reply-to:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1712517665; x=1712604065; bh=FwlPHCWKs90g9 /3tY/YY2bu5QQ1bpcwYzYTTseNV7H0=; b=Z5xI8GIALFnwegiPhnz0+001FGQ6R Es9a/ra9YBIJmhxrHPtqlJ3Ahr1bPjIjkx2QOf8mRzSP0lluKn3Mc5/Ygphrc0Vi 0gsJT/xdHajqD+h1013Wpcq9Wb6yzm/BYaJ/1dxtDKd4VA0cVCvmUjn0h7NxN3kd W3OuinimhndlfydVUrXD7qbXMQT0BOgSdRCNtmxAvu7Yad95aspx9Oj+OA88/ZVF Cn4KEDAkZz4KswkrjvrPDt527Z5g6icwtMOcHQDF27dCzbgyK9vytQv3gR8a2euD ZDmnsACfvcVsT8ZJsa3fRDYQ6T4yhSfeUZiU88q98ZYcSf9F6/jKStR+w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudeggedgudefhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvvefufffkofggtgfgsehtke ertdertdejnecuhfhrohhmpefkrghnucfguhhrvgcuoehirghnsehrvghtrhhoshhpvggt rdhtvheqnecuggftrfgrthhtvghrnhepgfeukeffjedugfdvveetleetiedtueduudffhf euhfeihfejteeuhffgteetvdetnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghm pehmrghilhhfrhhomhepihgrnhesrhgvthhrohhsphgvtgdrthhv X-ME-Proxy: Feedback-ID: id9014242:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 7 Apr 2024 15:21:04 -0400 (EDT) From: Ian Eure Date: Sun, 7 Apr 2024 12:20:59 -0700 Message-ID: <7d5b40b2df8b68e1aafc881080680824e6655460.1712517547.git.ian@retrospec.tv> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=64.147.123.159; envelope-from=ian@retrospec.tv; helo=wfhigh8-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -4.47 X-Spam-Score: -4.47 X-Migadu-Queue-Id: 927D555ADC X-Migadu-Scanner: mx13.migadu.com X-TUID: OgyAN70EvzpF It’s currently difficult to programmatically add a build-machine, because the `service-extension' mechanism is the only facility which can do that. It relies on the `guix-service-type', ala: (service-extension guix-service-type (guix-extension (build-machines (list ...)))) ...but `guix-service-type' is already instantiated as part of `%base-services', and replacing it may lose other configuration, like substitute servers and authorized keys. Additionally, a default value of `#f' for the build-machines field requires guarding uses of the field with: (or (guix-build-machines config) '()) Changing the default to be the empty list avoids that. One can now add build-machines with code such as: (modify-services %base-services (guix-service-type config => (guix-configuration (inherit config) (authorized-keys (cons %build-machine-key (guix-configuration-authorized-keys config))) (build-machines (cons #~(build-machine ...) (guix-configuration-build-machines config)))))) * gnu/services/base.scm (guix-configuration): Rename `guix-build-machines' to `guix-configuration-build-machines' and export it. Change the default from `#f' to the empty list. * gnu/services/base.scm (guix-activation): Update the build-machines test and reverse the conditions. Change-Id: I6780c6a5579fd9d4b4f22ee2b2bf7ba7a0454407 --- gnu/services/base.scm | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 3f912225a0..5cf6083821 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -212,6 +212,7 @@ (define-module (gnu services base) guix-configuration-guix guix-configuration-build-group guix-configuration-build-accounts + guix-configuration-build-machines guix-configuration-authorize-key? guix-configuration-authorized-keys guix-configuration-use-substitutes? @@ -1848,8 +1849,8 @@ (define-record-type* (default #f)) (tmpdir guix-tmpdir ;string | #f (default #f)) - (build-machines guix-build-machines ;list of gexps | #f - (default #f)) + (build-machines guix-configuration-build-machines ;list of gexps | '() + (default '())) (environment guix-configuration-environment ;list of strings (default '()))) @@ -2044,10 +2045,10 @@ (define (guix-activation config) #$(and channels (install-channels-file channels)) ;; ... and /etc/guix/machines.scm. - #$(if (guix-build-machines config) + #$(if (null? (guix-configuration-build-machines config)) + #~#f (guix-machines-files-installation - #~(list #$@(guix-build-machines config))) - #~#f)))) + #~(list #$@(guix-configuration-build-machines config))))))) (define-record-type* guix-extension make-guix-extension @@ -2093,9 +2094,9 @@ (define guix-service-type (substitute-urls (append (guix-extension-substitute-urls extension) (guix-configuration-substitute-urls config))) (build-machines - (and (or (guix-build-machines config) + (and (or (guix-configuration-build-machines config) (pair? (guix-extension-build-machines extension))) - (append (or (guix-build-machines config) '()) + (append (guix-configuration-build-machines config) (guix-extension-build-machines extension)))) (chroot-directories (append (guix-extension-chroot-directories extension) base-commit: ab3731d255ff1ac8d6874bc0f68ad94f21f08e79 -- 2.41.0