From patchwork Fri Jan 17 22:19:21 2025 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: 37121 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 6597B27BBEA; Fri, 17 Jan 2025 22:21:27 +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=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable 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 A10C327BBEB for ; Fri, 17 Jan 2025 22:21:21 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYuiB-0006F7-2N; Fri, 17 Jan 2025 17:21:07 -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 1tYui9-0006E3-05 for guix-patches@gnu.org; Fri, 17 Jan 2025 17:21:05 -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 1tYui8-0002gV-EE; Fri, 17 Jan 2025 17:21:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=yT7aNWDnkRmlUk0aoFpJXyl868iZ8OYADbB1ksh1kdo=; b=tU+yd4PcR4xze9iex1nSjzrqBtYq3G6pfsulDhk0yvl4glZX5xC6LiE/WhZvjE41m8Dr8+rjowiI2pTtzH9+h4+w0ATJxibLco3BET7+g6KyfyYM/7jIvyVRF71FVA3dBNxu/PBlvYQWOzXXX/dL3r0rA9wWj1JheF5Tz7YqsxV2STrV0GJrA5v+nsSro/ozzW0oq4khTxYNiwFe7KrIgXH4btxHiizMVjS+e8XwQ/bLYuTdJ9UTBo7A+w24grxMPlV0MzSRuBkphen5OFaiMDIaOP4c006mietoOEIl1Q4omLNe66US9a4QbwTKkVfSGPcZ0saAPSw+0d7ctO61lw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tYui6-0002YT-It; Fri, 17 Jan 2025 17:21:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74997] [PATCH 2/4] services: Add the =?utf-8?b?U2hlcGhlcmQ=?= =?utf-8?b?4oCZcyDigJh0cmFuc2llbnTigJk=?= and =?utf-8?b?4oCYdGltZXLigJk=?= to =?utf-8?b?4oCYJWJhc2Utc2VydmljZXPigJku?= Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: herman@rimm.ee, ludo@gnu.org, guix-patches@gnu.org Resent-Date: Fri, 17 Jan 2025 22:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74997 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74997@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= , Herman Rimm , Ludovic =?utf-8?q?Court=C3=A8s?= X-Debbugs-Original-Xcc: Herman Rimm , Ludovic =?utf-8?q?Cour?= =?utf-8?q?t=C3=A8s?= Received: via spool by 74997-submit@debbugs.gnu.org id=B74997.17371524159692 (code B ref 74997); Fri, 17 Jan 2025 22:21:02 +0000 Received: (at 74997) by debbugs.gnu.org; 17 Jan 2025 22:20:15 +0000 Received: from localhost ([127.0.0.1]:39136 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tYuhL-0002WF-5S for submit@debbugs.gnu.org; Fri, 17 Jan 2025 17:20:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35816) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tYuh8-0002P3-FC for 74997@debbugs.gnu.org; Fri, 17 Jan 2025 17:20:03 -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 1tYuh2-0002LV-Po; Fri, 17 Jan 2025 17:19:56 -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=yT7aNWDnkRmlUk0aoFpJXyl868iZ8OYADbB1ksh1kdo=; b=Fuhg/lDWnD5euccBXUaI I80fE/XXD9Ql0ZLBOWHJXoH6IDLq/nls1TkVdP9JqiQUmxS6nBxVRkKMHulc5nV8brBJjzG9HkwxE FRWnI+lmtsdmG4ecbJHbA5Xg+qqUwt707euValRIOi6qTZBuEKpllx829+bqDR+ZPf2wn+s4clUh6 sTPncEcxndT+OBtkKb0AiTUI1D//qZ/u0ppHrZphRTtM/Y8TtRJhs5SkC1tM3ZLqbQ1GvUxnlr6VQ XKHLOt7zO2oiKnbpx27Kdar89veH+Hkk63ydUC8vvIt9fPMzh26oPJGa0OTdz/2k6Xd6K9YKQpRCV MKEheM6kbcyk0w==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Fri, 17 Jan 2025 23:19:21 +0100 Message-ID: X-Mailer: git-send-email 2.47.1 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/services/base.scm (%base-services): Add instances of ‘shepherd-timer-service-type’ and ‘shepherd-transient-service-type’. Change-Id: I28a35d0dce40b142ee71b330b1cf7a3d222ef6bd Reviewed-by: Maxim Cournoyer --- gnu/services/base.scm | 4 ++++ gnu/services/shepherd.scm | 34 ++++++++++++++++++---------------- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 5967457002..7331c030d7 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -3750,6 +3750,10 @@ (define %base-services (service log-rotation-service-type) + ;; Convenient services brought by the Shepherd. + (service shepherd-timer-service-type) + (service shepherd-transient-service-type) + ;; Periodically delete old build logs. (service log-cleanup-service-type (log-cleanup-configuration diff --git a/gnu/services/shepherd.scm b/gnu/services/shepherd.scm index 5f2625ac20..328bfbedff 100644 --- a/gnu/services/shepherd.scm +++ b/gnu/services/shepherd.scm @@ -678,14 +678,15 @@ (define user-processes-service-type (define shepherd-timer-service-type (shepherd-service-type 'shepherd-timer - (const (shepherd-service - (provision '(timer)) - (requirement '(user-processes)) - (modules '((shepherd service timer))) - (free-form #~(timer-service - '#$provision - #:requirement '#$requirement)))) - #t ;ignored + (lambda (requirement) + (shepherd-service + (provision '(timer)) + (requirement requirement) + (modules '((shepherd service timer))) + (free-form #~(timer-service + '#$provision + #:requirement '#$requirement)))) + '(user-processes) (description "The Shepherd @code{timer} service lets you schedule commands dynamically, similar to the @code{at} command that your grandparents would use on that Slackware they got on a floppy disk. For example, consider this @@ -700,14 +701,15 @@ (define shepherd-timer-service-type (define shepherd-transient-service-type (shepherd-service-type 'shepherd-transient - (const (shepherd-service - (provision '(transient)) - (requirement '(user-processes)) - (modules '((shepherd service transient))) - (free-form #~(transient-service - '#$provision - #:requirement '#$requirement)))) - #t ;ignored + (lambda (requirement) + (shepherd-service + (provision '(transient)) + (requirement requirement) + (modules '((shepherd service transient))) + (free-form #~(transient-service + '#$provision + #:requirement '#$requirement)))) + '(user-processes) (description "The Shepherd @code{transient} service lets you run commands asynchronously, in the background, similar to @command{systemd-run}, as in this example: