From patchwork Wed Dec 13 12:48:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Baines X-Patchwork-Id: 57569 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id C2F0827BBE2; Wed, 13 Dec 2023 12:50:29 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 11EE327BBEA for ; Wed, 13 Dec 2023 12:50:27 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rDOgV-0005Rd-Fw; Wed, 13 Dec 2023 07:49:55 -0500 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 1rDOgM-0005R2-La for guix-patches@gnu.org; Wed, 13 Dec 2023 07:49:47 -0500 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 1rDOgM-0005sK-AU for guix-patches@gnu.org; Wed, 13 Dec 2023 07:49:46 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rDOgc-00059S-9M for guix-patches@gnu.org; Wed, 13 Dec 2023 07:50:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#67811] [PATCH 1/3] services: guix: Remove guix-build-coordinator-queue-builds service. References: <87r0jqxohm.fsf@cbaines.net> In-Reply-To: <87r0jqxohm.fsf@cbaines.net> Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 13 Dec 2023 12:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67811 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 67811@debbugs.gnu.org Received: via spool by 67811-submit@debbugs.gnu.org id=B67811.170247175219725 (code B ref 67811); Wed, 13 Dec 2023 12:50:02 +0000 Received: (at 67811) by debbugs.gnu.org; 13 Dec 2023 12:49:12 +0000 Received: from localhost ([127.0.0.1]:58389 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rDOfn-000583-Sv for submit@debbugs.gnu.org; Wed, 13 Dec 2023 07:49:12 -0500 Received: from mira.cbaines.net ([2a01:7e00:e000:2f8:fd4d:b5c7:13fb:3d27]:52403) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rDOfj-00057N-Dt for 67811@debbugs.gnu.org; Wed, 13 Dec 2023 07:49:09 -0500 Received: from localhost (unknown [217.155.61.229]) by mira.cbaines.net (Postfix) with ESMTPSA id E4B1827BBE2 for <67811@debbugs.gnu.org>; Wed, 13 Dec 2023 12:48:50 +0000 (GMT) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id 30c716b5 for <67811@debbugs.gnu.org>; Wed, 13 Dec 2023 12:48:50 +0000 (UTC) From: Christopher Baines Date: Wed, 13 Dec 2023 12:48:47 +0000 Message-ID: <290a4907b4c735ca78a19826000c7f7014d173f5.1702471729.git.mail@cbaines.net> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches This has been effectively replaced by the bffe. * gnu/services/guix.scm (): Remove record type. (guix-build-coordinator-queue-builds-shepherd-services, guix-build-coordinator-queue-builds-activation, guix-build-coordinator-queue-builds-account): Remove procedures (guix-build-coordinator-queue-builds-service-type): Remove service type. Change-Id: I2a233fb10b12cc9bfddebaa35928b25c243f82a2 --- doc/guix.texi | 52 ----------------- gnu/services/guix.scm | 133 ------------------------------------------ 2 files changed, 185 deletions(-) base-commit: 06f25a9a85be1bbe7a709e58ce41c1a834e5f1ae diff --git a/doc/guix.texi b/doc/guix.texi index 7dde9b727b..60a62fa3f0 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -38606,58 +38606,6 @@ Guix Services @end table @end deftp -The Guix Build Coordinator package contains a script to query an -instance of the Guix Data Service for derivations to build, and then -submit builds for those derivations to the coordinator. The service -type below assists in running this script. This is an additional tool -that may be useful when building derivations contained within an -instance of the Guix Data Service. - -@defvar guix-build-coordinator-queue-builds-service-type -Service type for the -guix-build-coordinator-queue-builds-from-guix-data-service script. Its -value must be a @code{guix-build-coordinator-queue-builds-configuration} -object. -@end defvar - -@deftp {Data Type} guix-build-coordinator-queue-builds-configuration -Data type representing the options to the queue builds from guix data -service script. - -@table @asis -@item @code{package} (default: @code{guix-build-coordinator}) -The Guix Build Coordinator package to use. - -@item @code{user} (default: @code{"guix-build-coordinator-queue-builds"}) -The system user to run the service as. - -@item @code{coordinator} (default: @code{"http://localhost:8746"}) -The URI to use when connecting to the coordinator. - -@item @code{systems} (default: @code{#f}) -The systems for which to fetch derivations to build. - -@item @code{systems-and-targets} (default: @code{#f}) -An association list of system and target pairs for which to fetch -derivations to build. - -@item @code{guix-data-service} (default: @code{"https://data.guix.gnu.org"}) -The Guix Data Service instance from which to query to find out about -derivations to build. - -@item @code{guix-data-service-build-server-id} (default: @code{#f}) -The Guix Data Service build server ID corresponding to the builds being -submitted. Providing this speeds up the submitting of builds as -derivations that have already been submitted can be skipped before -asking the coordinator to build them. - -@item @code{processed-commits-file} (default: @code{"/var/cache/guix-build-coordinator-queue-builds/processed-commits"}) -A file to record which commits have been processed, to avoid needlessly -processing them again if the service is restarted. - -@end table -@end deftp - @subsubheading Guix Data Service The @uref{http://data.guix.gnu.org,Guix Data Service} processes, stores and provides data about GNU Guix. This includes information about diff --git a/gnu/services/guix.scm b/gnu/services/guix.scm index 389903451a..ff6cce507e 100644 --- a/gnu/services/guix.scm +++ b/gnu/services/guix.scm @@ -88,19 +88,6 @@ (define-module (gnu services guix) guix-build-coordinator-agent-service-type - guix-build-coordinator-queue-builds-configuration - guix-build-coordinator-queue-builds-configuration? - guix-build-coordinator-queue-builds-configuration-package - guix-build-coordinator-queue-builds-configuration-user - guix-build-coordinator-queue-builds-coordinator - guix-build-coordinator-queue-builds-configuration-systems - guix-build-coordinator-queue-builds-configuration-system-and-targets - guix-build-coordinator-queue-builds-configuration-guix-data-service - guix-build-coordinator-queue-builds-configuration-guix-data-service-build-server-id - guix-build-coordinator-queue-builds-configuration-processed-commits-file - - guix-build-coordinator-queue-builds-service-type - guix-data-service-configuration guix-data-service-configuration? @@ -250,31 +237,6 @@ (define-record-type* (agent-name guix-build-coordinator-agent-dynamic-auth-with-file-agent-name) (token-file guix-build-coordinator-agent-dynamic-auth-with-file-token-file)) -(define-record-type* - guix-build-coordinator-queue-builds-configuration - make-guix-build-coordinator-queue-builds-configuration - guix-build-coordinator-queue-builds-configuration? - (package guix-build-coordinator-queue-builds-configuration-package - (default guix-build-coordinator)) - (user guix-build-coordinator-queue-builds-configuration-user - (default "guix-build-coordinator-queue-builds")) - (coordinator guix-build-coordinator-queue-builds-coordinator - (default "http://localhost:8746")) - (systems guix-build-coordinator-queue-builds-configuration-systems - (default #f)) - (systems-and-targets - guix-build-coordinator-queue-builds-configuration-system-and-targets - (default #f)) - (guix-data-service - guix-build-coordinator-queue-builds-configuration-guix-data-service - (default "https://data.guix.gnu.org")) - (guix-data-service-build-server-id - guix-build-coordinator-queue-builds-configuration-guix-data-service-build-server-id - (default #f)) - (processed-commits-file - guix-build-coordinator-queue-builds-configuration-processed-commits-file - (default "/var/cache/guix-build-coordinator-queue-builds/processed-commits"))) - (define* (make-guix-build-coordinator-start-script database-uri-string allocation-strategy pid-file @@ -559,101 +521,6 @@ (define guix-build-coordinator-agent-service-type (description "Run a Guix Build Coordinator agent."))) -(define (guix-build-coordinator-queue-builds-shepherd-services config) - (match-record config - (package user coordinator systems systems-and-targets - guix-data-service - guix-data-service-build-server-id - processed-commits-file) - (list - (shepherd-service - (documentation "Guix Build Coordinator queue builds from Guix Data Service") - (provision '(guix-build-coordinator-queue-builds)) - (requirement '(networking)) - (start - #~(lambda _ - (parameterize ((%current-logfile-date-format "")) - (fork+exec-command - (list - #$(file-append - package - "/bin/guix-build-coordinator-queue-builds-from-guix-data-service") - #$(string-append "--coordinator=" coordinator) - #$@(map (lambda (system) - (string-append "--system=" system)) - (or systems '())) - #$@(map (match-lambda - ((system . target) - (string-append "--system-and-target=" system "=" target))) - (or systems-and-targets '())) - #$@(if guix-data-service - #~(#$(string-append "--guix-data-service=" guix-data-service)) - #~()) - #$@(if guix-data-service-build-server-id - #~(#$(simple-format - #f - "--guix-data-service-build-server-id=~A" - guix-data-service-build-server-id)) - #~()) - #$@(if processed-commits-file - #~(#$(string-append "--processed-commits-file=" - processed-commits-file)) - #~())) - #:user #$user - #:environment-variables - `(,(string-append - "GUIX_LOCPATH=" - #$(libc-utf8-locales-for-target) "/lib/locale") - "LC_ALL=en_US.utf8") - #:log-file "/var/log/guix-build-coordinator/queue-builds.log")))) - (stop #~(make-kill-destructor)) - (modules - `((shepherd comm) - ,@%default-modules)))))) - -(define (guix-build-coordinator-queue-builds-activation config) - #~(begin - (use-modules (guix build utils)) - - (define %user - (getpw #$(guix-build-coordinator-queue-builds-configuration-user - config))) - - (mkdir-p "/var/log/guix-build-coordinator") - - ;; Allow writing the processed commits file - (mkdir-p "/var/cache/guix-build-coordinator-queue-builds") - (chown "/var/cache/guix-build-coordinator-queue-builds" - (passwd:uid %user) - (passwd:gid %user)))) - -(define (guix-build-coordinator-queue-builds-account config) - (list (user-account - (name (guix-build-coordinator-queue-builds-configuration-user config)) - (group "nogroup") - (system? #t) - (comment "Guix Build Coordinator queue-builds user") - (home-directory "/var/empty") - (shell (file-append shadow "/sbin/nologin"))))) - -(define guix-build-coordinator-queue-builds-service-type - (service-type - (name 'guix-build-coordinator-queue-builds) - (extensions - (list - (service-extension shepherd-root-service-type - guix-build-coordinator-queue-builds-shepherd-services) - (service-extension activation-service-type - guix-build-coordinator-queue-builds-activation) - (service-extension account-service-type - guix-build-coordinator-queue-builds-account))) - (description - "Run the guix-build-coordinator-queue-builds-from-guix-data-service -script. - -This is a script to assist in having the Guix Build Coordinator build -derivations stored in an instance of the Guix Data Service."))) - ;;; ;;; Guix Data Service