From patchwork Sat Mar 15 21:37: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: 40231 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 EC22F27BBE9; Sat, 15 Mar 2025 21:40:25 +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 38FBD27BBE2 for ; Sat, 15 Mar 2025 21:40:25 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ttZEs-0005n7-SN; Sat, 15 Mar 2025 17:40:14 -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 1ttZEq-0005kz-VG for guix-patches@gnu.org; Sat, 15 Mar 2025 17:40:13 -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 1ttZEp-000395-IQ; Sat, 15 Mar 2025 17:40:11 -0400 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=6IMx1UEc5LvSLUjN4SExoS+dfI7V76NXd5h1fVii0BY=; b=D/h1iHMKtq8KNl7hfxQHlLrIkrUe9GaXP7GtFOQlv0ggxONZMNjIzfcKBMO3irQ4HeKemoBw3c8i8Y7gC14VW1DuG5DUHLJbbhw0ZP0rIHU3mREqfHR+3QR3jR5QqFeMex+E3vZNp1q5z8cse8c4LYn3EkeDAH0E6Jb2pgO8OsaC+ONtGtBiTwgNCBCGkRMOfeQSU+8XX56UWNEbZrimHrA4nxTKlu1rqzlBe3X6yhfd0iU8waexVCr/VlTunQmvtlpKxbUns9dcdmEbF6Q2s/af6Y6CfBRisathd78eXuYLdUV+H2VVcHTS5dUugC8F8J/131RoHjTSs2sub8lWXA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ttZEk-0004dm-2I; Sat, 15 Mar 2025 17:40:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77041] [PATCH 15/16] services: mcron: Deprecate. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: andrew@trop.in, janneke@gnu.org, ludo@gnu.org, maxim.cournoyer@gmail.com, tanguy@bioneland.org, guix-patches@gnu.org Resent-Date: Sat, 15 Mar 2025 21:40:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77041 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77041@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= , Andrew Tropin , Janneke Nieuwenhuizen , Ludovic =?utf-8?q?Court=C3=A8s?= , Maxim Cournoyer , Tanguy Le Carrour X-Debbugs-Original-Xcc: Andrew Tropin , Janneke Nieuwenhuizen , Ludovic =?utf-8?q?Court=C3=A8s?= , Maxim Cournoyer , Tanguy Le Carrour Received: via spool by 77041-submit@debbugs.gnu.org id=B77041.174207476317456 (code B ref 77041); Sat, 15 Mar 2025 21:40:05 +0000 Received: (at 77041) by debbugs.gnu.org; 15 Mar 2025 21:39:23 +0000 Received: from localhost ([127.0.0.1]:43886 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ttZE2-0004XL-Iq for submit@debbugs.gnu.org; Sat, 15 Mar 2025 17:39:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50202) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ttZD3-0004PJ-0e for 77041@debbugs.gnu.org; Sat, 15 Mar 2025 17:38: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 1ttZCx-0002j0-Ar; Sat, 15 Mar 2025 17:38:15 -0400 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=6IMx1UEc5LvSLUjN4SExoS+dfI7V76NXd5h1fVii0BY=; b=QMeZnTiaBPvqwoecCYgs W0n+0Z143/b742jKCrYW29/ZMUop5OeP4Ov0zUqb8oGAJwSiaPUwa3KEjlZDnDelM1lpEDLWEgQri QygHuxB5sdokAkCTLJe4oD2p1z9vYlqO6P7ZQfAIkQQnL814BMcHpmCuNk77JO2t3ra+22nrZPQXl RjeoatE6fVLfdLULpG5xg7ih4APMs6ieVq21bpcRA9yYrEgtCPiNHp+nWdOKv0taLzCUtOCSzNS+K Tm5w+drkJcQoiJSunF/8J/nNrWYVoUdAvAD+F9gTl5S5gB5OxansvoXU0J5cS4M7rp7duftGOsSJz r6gYrqFG3xgmGw==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Sat, 15 Mar 2025 22:37:21 +0100 Message-ID: <9c83cf458fc508990a834cecac3f9d8cbd74df87.1742073920.git.ludo@gnu.org> X-Mailer: git-send-email 2.48.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/mcron.scm (mcron-service-type): Mark as deprecated. * gnu/home/services/mcron.scm (home-mcron-service-type): Likewise. * doc/guix.texi (Scheduled Job Execution): Document it. (Mcron Home Service): Likewise. Change-Id: I0329bf1ef5026d6b7d392a5807f0600ff28c3006 --- doc/guix.texi | 18 ++++++++++++++++++ gnu/home/services/mcron.scm | 7 +++++-- gnu/services/mcron.scm | 7 +++++-- 3 files changed, 28 insertions(+), 4 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 35999db9b0..19342c22a3 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -20851,6 +20851,18 @@ Scheduled Job Execution @cindex cron @cindex mcron @cindex scheduling jobs +@quotation Deprecation Warning +This section describes the mcron service, which is deprecated and slated +for removal after 2026-04-01. + +The Shepherd supports running jobs periodically by defining services as +@dfn{timers}. @xref{Shepherd Services} for information on defining +Shepherd services in Guix, and @ref{Timers,,, shepherd, The GNU Shepherd +Manual} for information on Shepherd timers. + +Please use the Shepherd instead mcron. +@end quotation + The @code{(gnu services mcron)} module provides an interface to GNU@tie{}mcron, a daemon to run jobs at scheduled times (@pxref{Top,,, mcron, GNU@tie{}mcron}). GNU@tie{}mcron is similar to the traditional @@ -48514,6 +48526,12 @@ Mcron Home Service @cindex mcron @cindex scheduling jobs +@quotation Deprecation Warning +The @code{home-mcron-service-type} described below is superseded by +Shepherd timers and slated for removal after 2026-04-01. +@xref{Scheduled Job Execution}, for more information. +@end quotation + The @code{(gnu home services mcron)} module provides an interface to GNU@tie{}mcron, a daemon to run jobs at scheduled times (@pxref{Top,,, mcron, GNU@tie{}mcron}). The information about system's mcron is diff --git a/gnu/home/services/mcron.scm b/gnu/home/services/mcron.scm index 23be44ba07..57b92da2eb 100644 --- a/gnu/home/services/mcron.scm +++ b/gnu/home/services/mcron.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2021, 2023 Andrew Tropin ;;; Copyright © 2021 Xinglu Chen ;;; Copyright © 2022 Maxim Cournoyer -;;; Copyright © 2023 Ludovic Courtès +;;; Copyright © 2023, 2025 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -20,6 +20,7 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu home services mcron) + #:use-module (guix deprecation) #:use-module (gnu home services) #:use-module (gnu home services shepherd) #:use-module (gnu services mcron) ;for the service mapping @@ -53,7 +54,9 @@ (define-syntax-rule (home-mcron-configuration fields ...) ;; Macro provided for backward compatibility. (for-home (mcron-configuration fields ...))) -(define home-mcron-service-type +;; TODO: Deprecated; remove sometime after 2026-04-01. +(define-deprecated home-mcron-service-type + home-shepherd-service-type (service-type (inherit (system->home-service-type mcron-service-type)) (default-value (for-home (mcron-configuration))))) diff --git a/gnu/services/mcron.scm b/gnu/services/mcron.scm index 0e0d07d252..0bb0ae7450 100644 --- a/gnu/services/mcron.scm +++ b/gnu/services/mcron.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2016-2020, 2023 Ludovic Courtès +;;; Copyright © 2016-2020, 2023, 2025 Ludovic Courtès ;;; Copyright © 2022 Maxim Cournoyer ;;; Copyright © 2023 Bruno Victal ;;; @@ -22,6 +22,7 @@ (define-module (gnu services mcron) #:use-module (gnu services) #:use-module (gnu services shepherd) #:use-module (gnu packages guile-xyz) + #:use-module (guix deprecation) #:use-module (guix records) #:use-module (guix gexp) #:use-module (srfi srfi-1) @@ -194,7 +195,9 @@ (define (mcron-shepherd-services config) (actions (list (shepherd-schedule-action mcron files))))))))) -(define mcron-service-type +;; TODO: Deprecated; remove sometime after 2026-04-01. +(define-deprecated mcron-service-type + shepherd-root-service-type (service-type (name 'mcron) (description "Run the mcron job scheduling daemon.")