From patchwork Fri Jan 5 10:59:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 58369 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 CAE9F27BBEA; Fri, 5 Jan 2024 11:01:32 +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.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 3947B27BBE2 for ; Fri, 5 Jan 2024 11:01:32 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rLhwn-000547-C5; Fri, 05 Jan 2024 06:01:05 -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 1rLhwh-0004xb-Sg for guix-patches@gnu.org; Fri, 05 Jan 2024 06:01:00 -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 1rLhwh-00055p-Jf for guix-patches@gnu.org; Fri, 05 Jan 2024 06:00:59 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rLhwl-0004Fe-Qr for guix-patches@gnu.org; Fri, 05 Jan 2024 06:01:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68258] [PATCH 6/7] home: services: shepherd: Use the 0.10.x interface. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: , guix-patches@gnu.org Resent-Date: Fri, 05 Jan 2024 11:01:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68258 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 68258@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= , ( , Andrew Tropin , Ludovic =?utf-8?q?Court=C3=A8s?= X-Debbugs-Original-Xcc: ( , Andrew Tropin , Ludovic =?utf-8?q?Court=C3=A8s?= Received: via spool by 68258-submit@debbugs.gnu.org id=B68258.170445241210253 (code B ref 68258); Fri, 05 Jan 2024 11:01:03 +0000 Received: (at 68258) by debbugs.gnu.org; 5 Jan 2024 11:00:12 +0000 Received: from localhost ([127.0.0.1]:56477 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rLhvw-0002eZ-B6 for submit@debbugs.gnu.org; Fri, 05 Jan 2024 06:00:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44750) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rLhvr-0002HJ-94 for 68258@debbugs.gnu.org; Fri, 05 Jan 2024 06:00:08 -0500 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 1rLhvh-0004h4-O1; Fri, 05 Jan 2024 05:59:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=i6PJGg6e8XpPz2KWf9m7OTn+QkMgOuEj2ZrzfsQUCb0=; b=F1siMQbsTWOHgYrN5dCE FYvdgHoP/O9i8xY+92VDPKaeeFVGqDXYdOJJxUpDWE0eGcjHUqyjuvjxx/3QWstF4Wm/gk4L8yNTS dSFlw53jVlJo0gr3PGxFA2HnoBF7iKgwtrI37rlyFkWTuf67sNRKzFfUoKppCX5F7XOobohms/JIb AbaV/loZbCmU/WvRvxdanCIvd3OUqLXnHSOoadt2Z78X6BsbrQx3OZlSCjkrKHVqdbiDiYOpN2rc9 u3Y6q51nQmejKcggE5w+w7++EjmmjyY+qujp4XoRNGtBuwEYwokBZIrk0VFA2xbS+L2WZlUNSC+fa KMX2lOOGm1ur+g==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Fri, 5 Jan 2024 11:59:33 +0100 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: 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 * gnu/home/services/shepherd.scm (home-shepherd-configuration-file): Pass ‘register-services’ a list. Call ‘start-in-the-background’ unconditionally. Change-Id: Id7ba005949653a9ac065c47eddb425df4f4792aa --- gnu/home/services/shepherd.scm | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/gnu/home/services/shepherd.scm b/gnu/home/services/shepherd.scm index bd068c37fc..176f4575cb 100644 --- a/gnu/home/services/shepherd.scm +++ b/gnu/home/services/shepherd.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2021, 2023 Andrew Tropin ;;; Copyright © 2021 Xinglu Chen +;;; Copyright © 2024 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -75,11 +76,8 @@ (define (home-shepherd-configuration-file config) #~(begin (use-modules (srfi srfi-34) (system repl error-handling)) - (apply - register-services - (map - (lambda (file) (load file)) - '#$files)) + + (register-services (map load '#$files)) #$@(if daemonize? `((action 'root 'daemonize)) @@ -90,9 +88,7 @@ (define (home-shepherd-configuration-file config) '#$(append-map shepherd-service-provision (filter shepherd-service-auto-start? services)))) - (if (defined? 'start-in-the-background) - (start-in-the-background services-to-start) - (for-each start services-to-start)) + (start-in-the-background services-to-start) (redirect-port (open-input-file "/dev/null") (current-input-port)))))