GNU bug report logs - #77041
[PATCH 00/16] Replacing mcron jobs by Shepherd timers

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Ludovic Courtès <ludo@HIDDEN>; Keywords: patch; Done: Ludovic Courtès <ludo@HIDDEN>; Maintainer for guix-patches is guix-patches@HIDDEN.
bug closed, send any further explanations to 77041 <at> debbugs.gnu.org and Ludovic Courtès <ludo@HIDDEN> Request was from Ludovic Courtès <ludo@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 77041 <at> debbugs.gnu.org:


Received: (at 77041) by debbugs.gnu.org; 23 Mar 2025 18:54:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 23 14:54:17 2025
Received: from localhost ([127.0.0.1]:52653 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1twQSf-0004Pq-FK
	for submit <at> debbugs.gnu.org; Sun, 23 Mar 2025 14:54:17 -0400
Received: from hera.aquilenet.fr ([185.233.100.1]:53888)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1twQSd-0004PX-9k
 for 77041 <at> debbugs.gnu.org; Sun, 23 Mar 2025 14:54:15 -0400
Received: from localhost (localhost [127.0.0.1])
 by hera.aquilenet.fr (Postfix) with ESMTP id 8EEDFA7D;
 Sun, 23 Mar 2025 19:54:07 +0100 (CET)
Authentication-Results: hera.aquilenet.fr;
	none
X-Virus-Scanned: Debian amavis at hera.aquilenet.fr
Received: from hera.aquilenet.fr ([127.0.0.1])
 by localhost (hera.aquilenet.fr [127.0.0.1]) (amavis, port 10024) with ESMTP
 id NpZEuYdDxojs; Sun, 23 Mar 2025 19:54:07 +0100 (CET)
Received: from ribbon (91-160-117-201.subs.proxad.net [91.160.117.201])
 by hera.aquilenet.fr (Postfix) with ESMTPSA id B37678FA;
 Sun, 23 Mar 2025 19:54:05 +0100 (CET)
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Subject: Re: [bug#77041] [PATCH v2 00/16] Replacing mcron jobs by Shepherd
 timers
In-Reply-To: <87frj5i7s7.fsf@HIDDEN> (Maxim Cournoyer's message of "Sat, 22
 Mar 2025 21:12:08 +0900")
References: <cover.1742073920.git.ludo@HIDDEN>
 <cover.1742642743.git.ludo@HIDDEN> <87frj5i7s7.fsf@HIDDEN>
Date: Sun, 23 Mar 2025 19:54:04 +0100
Message-ID: <87ecyn37eb.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Rspamd-Queue-Id: 8EEDFA7D
X-Spamd-Result: default: False [-6.10 / 15.00]; NEURAL_HAM(-3.00)[-1.000];
 BAYES_HAM(-3.00)[99.99%]; MIME_GOOD(-0.10)[text/plain];
 FREEMAIL_TO(0.00)[gmail.com]; RCPT_COUNT_TWO(0.00)[2];
 FROM_EQ_ENVFROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2];
 MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[];
 TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[];
 TAGGED_RCPT(0.00)[]; FROM_HAS_DN(0.00)[];
 FREEMAIL_ENVRCPT(0.00)[gmail.com]; TO_DN_SOME(0.00)[];
 MID_RHS_MATCH_FROM(0.00)[]
X-Rspamd-Action: no action
X-Spamd-Bar: ------
X-Rspamd-Server: hera
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 77041
Cc: 77041 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

Hi,

Maxim Cournoyer <maxim.cournoyer@HIDDEN> skribis:

> If you apply this series to master with 'b4 shazam
> cover.1742073920.git.ludo@HIDDEN',  it should automatically add the
> 'Reviewed-by:' git trailers to every of these 15 commits.

Impressive, didn=E2=80=99t know about it.  However it added a sign-off from=
 me,
but not a =E2=80=98Reviewed-by=E2=80=99 tag, so I ended up doing that manua=
lly.

Pushed as 60e4012dfcbe0df5c7e60f097ae2b11d92f982ff.

Thanks everyone!

Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#77041; Package guix-patches. Full text available.

Message received at 77041 <at> debbugs.gnu.org:


Received: (at 77041) by debbugs.gnu.org; 23 Mar 2025 18:28:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 23 14:28:58 2025
Received: from localhost ([127.0.0.1]:52594 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1twQ4A-00038x-00
	for submit <at> debbugs.gnu.org; Sun, 23 Mar 2025 14:28:58 -0400
Received: from hera.aquilenet.fr ([185.233.100.1]:40350)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1twQ47-00038Y-Ky
 for 77041 <at> debbugs.gnu.org; Sun, 23 Mar 2025 14:28:56 -0400
Received: from localhost (localhost [127.0.0.1])
 by hera.aquilenet.fr (Postfix) with ESMTP id 517E7718;
 Sun, 23 Mar 2025 19:28:48 +0100 (CET)
Authentication-Results: hera.aquilenet.fr;
	none
X-Virus-Scanned: Debian amavis at hera.aquilenet.fr
Received: from hera.aquilenet.fr ([127.0.0.1])
 by localhost (hera.aquilenet.fr [127.0.0.1]) (amavis, port 10024) with ESMTP
 id R-wvVGjEuLX8; Sun, 23 Mar 2025 19:28:47 +0100 (CET)
Received: from ribbon (91-160-117-201.subs.proxad.net [91.160.117.201])
 by hera.aquilenet.fr (Postfix) with ESMTPSA id 4B5BB5D3;
 Sun, 23 Mar 2025 19:28:47 +0100 (CET)
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: "pelzflorian (Florian Pelz)" <pelzflorian@HIDDEN>
Subject: Re: [bug#77041] [PATCH v2 05/16] services: fstrim: Turn into a
 Shepherd timer.
In-Reply-To: <877c4hmc3v.fsf@HIDDEN> (pelzflorian@HIDDEN's
 message of "Sat, 22 Mar 2025 14:25:08 +0100")
References: <cover.1742642743.git.ludo@HIDDEN>
 <3e855021731ed7877824270ff0faed6a523965ca.1742642743.git.ludo@HIDDEN>
 <877c4hmc3v.fsf@HIDDEN>
Date: Sun, 23 Mar 2025 19:28:44 +0100
Message-ID: <87jz8f38kj.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Rspamd-Queue-Id: 517E7718
X-Spamd-Result: default: False [-6.10 / 15.00]; BAYES_HAM(-3.00)[99.99%];
 NEURAL_HAM(-3.00)[-1.000]; MIME_GOOD(-0.10)[text/plain];
 FROM_EQ_ENVFROM(0.00)[]; TO_DN_SOME(0.00)[];
 MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[];
 RCVD_COUNT_TWO(0.00)[2]; MID_RHS_MATCH_FROM(0.00)[];
 ARC_NA(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[];
 RCVD_VIA_SMTP_AUTH(0.00)[]; TAGGED_RCPT(0.00)[];
 FROM_HAS_DN(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com];
 RCPT_COUNT_THREE(0.00)[3];
 FREEMAIL_CC(0.00)[debbugs.gnu.org,gmail.com]
X-Rspamd-Action: no action
X-Spamd-Bar: ------
X-Rspamd-Server: hera
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 77041
Cc: 77041 <at> debbugs.gnu.org, Maxim Cournoyer <maxim.cournoyer@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

Hi,

"pelzflorian (Florian Pelz)" <pelzflorian@HIDDEN> skribis:

> Ludovic Court=C3=A8s <ludo@HIDDEN> writes:
>> +@item @code{schedule} (default: @code{"0 0 * * 0"}) (type: shepherd-cal=
endar-event)
>> +Schedule for launching @command{fstrim}, expressed as a string in
>> +traditional cron syntax or as a gexp evaluating to a Shepherd calendar
>> +event (@pxref{Timers,,, shepherd,The GNU Shepherd Manual}).  By default
>> +this is set to run weekly on Sunday at 00:00.
>
> Florian Pelz <pelzflorian@HIDDEN> writes:
>> For fstrim doc/guix.texi,
>> (type: shepherd-calendar-event) in the documentation might be better
>> expressed as =E2=80=9Ctype: Shepherd calendar event=E2=80=9D, as there i=
s no
>> shepherd-calendar-event.
>
> I still would prefer the type in the docs to be different.  Maybe just
> calendar-event?  Because there is no shepherd-calendar-event.

Oh right, I made this change.  Unfortunately it will be undoed next time
somebody generates the doc.

Thanks for your feedback,
Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#77041; Package guix-patches. Full text available.

Message received at 77041 <at> debbugs.gnu.org:


Received: (at 77041) by debbugs.gnu.org; 22 Mar 2025 13:24:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 22 09:24:53 2025
Received: from localhost ([127.0.0.1]:41549 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tvyqL-0005Jp-1j
	for submit <at> debbugs.gnu.org; Sat, 22 Mar 2025 09:24:53 -0400
Received: from relay.yourmailgateway.de ([185.244.194.184]:39855)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <pelzflorian@HIDDEN>)
 id 1tvyqH-0005Jf-JV
 for 77041 <at> debbugs.gnu.org; Sat, 22 Mar 2025 09:24:50 -0400
Received: from relay01-mors.netcup.net (localhost [127.0.0.1])
 by relay01-mors.netcup.net (Postfix) with ESMTPS id 4ZKg5p62lgz8xrl;
 Sat, 22 Mar 2025 14:24:46 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=pelzflorian.de;
 s=key2; t=1742649886;
 bh=FXEZ7sYTV7xsq2Tzes6yLnClkVVlahCDFW482IrtnEA=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=bb5C5A8P2Jyr/uXHAB8C6SXnUE0brAGJqEAe1qjCwTMastx3VZqFScpcaJfyyn+4K
 +GqldnnPK6UQqRuXMF/Q7gClJ+w1X/qLowoR85dXD82dEDfD4rDeblLKwYC55rw1c9
 g8h2Tbgm4tuWvkDC4hwWwSanINFK1w9BX6nqjRDV5rsBPVRW7/SVCZyW0Rzi9vBC7K
 iOYdMyUq8bUTBq5wQoHRiovkcmXH5xxulwKliPP6qmkgUIfpPrlf147TO5wqQqttt1
 ZB2pr+lNBuMbPSBxKiRg2EOIs8PtI8vNIB2CjcK4kD65K3CaNJhjE+eZeaPgiogNyg
 YqOlZH+rJBnZA==
Received: from policy01-mors.netcup.net (unknown [46.38.225.35])
 by relay01-mors.netcup.net (Postfix) with ESMTPS id 4ZKg5p5Mqhz7vPv;
 Sat, 22 Mar 2025 14:24:46 +0100 (CET)
X-Virus-Scanned: Debian amavisd-new at policy01-mors.netcup.net
X-Spam-Flag: NO
X-Spam-Score: -2.897
X-Spam-Level: 
X-Spam-Status: No, score=-2.897 required=6.31 tests=[ALL_TRUSTED=-1,
 BAYES_00=-1.9, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001,
 URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Received: from mxe217.netcup.net (unknown [10.243.12.53])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by policy01-mors.netcup.net (Postfix) with ESMTPS id 4ZKg5n12Y2z8scN;
 Sat, 22 Mar 2025 14:24:44 +0100 (CET)
Received: from florianhp (ipb21a5dbf.dynamic.kabel-deutschland.de
 [178.26.93.191])
 by mxe217.netcup.net (Postfix) with ESMTPSA id 8A44683F50;
 Sat, 22 Mar 2025 14:24:37 +0100 (CET)
From: "pelzflorian (Florian Pelz)" <pelzflorian@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: [bug#77041] [PATCH v2 05/16] services: fstrim: Turn into a
 Shepherd timer.
In-Reply-To: <3e855021731ed7877824270ff0faed6a523965ca.1742642743.git.ludo@HIDDEN>
 ("Ludovic =?utf-8?Q?Court=C3=A8s=22's?= message of "Sat, 22 Mar 2025
 12:36:42 +0100")
References: <cover.1742642743.git.ludo@HIDDEN>
 <3e855021731ed7877824270ff0faed6a523965ca.1742642743.git.ludo@HIDDEN>
Date: Sat, 22 Mar 2025 14:25:08 +0100
Message-ID: <877c4hmc3v.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Rspamd-Server: rspamd-worker-8404
X-Rspamd-Queue-Id: 8A44683F50
X-NC-CID: Q1dv4VA3jQfIjPzspYHMmvHR7Napm/PM18wOskWSc3JrjqitDtaAKiV7
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 77041
Cc: 77041 <at> debbugs.gnu.org, Maxim Cournoyer <maxim.cournoyer@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Ludovic Court=C3=A8s <ludo@HIDDEN> writes:
> +@item @code{schedule} (default: @code{"0 0 * * 0"}) (type: shepherd-cale=
ndar-event)
> +Schedule for launching @command{fstrim}, expressed as a string in
> +traditional cron syntax or as a gexp evaluating to a Shepherd calendar
> +event (@pxref{Timers,,, shepherd,The GNU Shepherd Manual}).  By default
> +this is set to run weekly on Sunday at 00:00.

Florian Pelz <pelzflorian@HIDDEN> writes:
> For fstrim doc/guix.texi,
> (type: shepherd-calendar-event) in the documentation might be better
> expressed as =E2=80=9Ctype: Shepherd calendar event=E2=80=9D, as there is=
 no
> shepherd-calendar-event.

I still would prefer the type in the docs to be different.  Maybe just
calendar-event?  Because there is no shepherd-calendar-event.

This detail aside, this is a great and welcome patch series
(nonetheless, I haven=E2=80=99t tested it).  Thank you for addressing every=
one=E2=80=99s
comments and writing documentation.

Regards,
Florian




Information forwarded to guix-patches@HIDDEN:
bug#77041; Package guix-patches. Full text available.

Message received at 77041 <at> debbugs.gnu.org:


Received: (at 77041) by debbugs.gnu.org; 22 Mar 2025 12:12:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 22 08:12:34 2025
Received: from localhost ([127.0.0.1]:41349 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tvxiL-0001o0-LG
	for submit <at> debbugs.gnu.org; Sat, 22 Mar 2025 08:12:33 -0400
Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]:54598)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>)
 id 1tvxiJ-0001ne-3j
 for 77041 <at> debbugs.gnu.org; Sat, 22 Mar 2025 08:12:31 -0400
Received: by mail-pl1-x630.google.com with SMTP id
 d9443c01a7336-2241053582dso26815935ad.1
 for <77041 <at> debbugs.gnu.org>; Sat, 22 Mar 2025 05:12:31 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1742645544; x=1743250344; darn=debbugs.gnu.org;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to;
 bh=0Mh9o6DSjMnrMUbVZXd6BqZXTNpHlGgGDAmXa5vX13g=;
 b=Y68wBw50l/ZMU/d8dOHizUxL2kxz++UYgp5mguqk8gDeVyNODgReHc0+JscrUFQePF
 QJuuESH/OHdLS+RcIX6Fv3eYV+jUG97la6A0JgBCpzZQvPor1HdJosKI/87LH+mFDuSB
 94LTX3ezO+fqd7VO07DD9WoJEXayvLn+5qzn9BHkrcOTtNsO7oSm4Suy2ZJdmOC5MQmk
 zCstaC0JCBELz2M0Kuiy5um7l498pOX8cWHXlfCKbF4qmCxA5/jrMUv53n7KaymsZreb
 uw7jOEUs6kBL5+gWpwkyNKIMT744jR7NJVgNT1qsE97z/i/XsF4Kb6qsAvojY2fagH3r
 y28A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1742645544; x=1743250344;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date
 :message-id:reply-to;
 bh=0Mh9o6DSjMnrMUbVZXd6BqZXTNpHlGgGDAmXa5vX13g=;
 b=uC+8alRHFTMusOM9tp+hHUE+zoGhqqIP0MXPM1v/y18MeSJ5vpJMvk0ATWHuTACwDE
 e8MnXz4/XEdVSlaRN9kuBzgNzgJZSfP3Q8c4zCIAZgOLXuQiGiUqB1RoAex1EG1mSVe5
 oKUABr8AY6V24b7jBc5Qd7H0KBj7VKBn+eOpRzG1OkekVybx2OOYVUHD+B/ckIqdmHtU
 ZDZMcA614w9z9Xc5SrcR2L+Puhjm7X1B8DAr2VnTfhrRlIn1xO249euyl1uE06eT/yca
 UQ5cTjrlgnURXFmmtF3yEc0wl3cVfNBQM4I8SKr4rYMX80PIimr1JZX0s+BpmrCKrh2L
 VRtQ==
X-Gm-Message-State: AOJu0YweqEdoCPXFL/ZbNjE9lni+nxzBxACZnTTWYlFY9iC6Klv5YUb4
 zpmcv7Xfp1G7dSAQtDkeFO7ZpbERRXZA6sk21kIEL61239uaKSiTYvYADQ==
X-Gm-Gg: ASbGncuTZ/zbEoyAxSO68SzYFREK3baDVPSfb6z2/np3vrNbGODQ5xie8eiw7lC0VZb
 zsxVTWUSsCyoPG5M8UystnCRlxpXK/YVgq3efWvLRNGQYFEe3ZLP98gJf2f5zQUR9s3SdD9qoK7
 lyZj7189NmMtsh2HoVXqai5My6w1RdOmEIEJjgb7o4+yakOm5hmY6KrFQV1KjZrITo0eYJdBMOe
 T1U+FES+2FfzEXCcagQ8Gr7HxrAtAfLfa7XqGZ4EGe7nuao9AetZLVKZfx4li85C1yzEhQj8lyX
 rzVmP8YHlpryVtOyFAjFpbNMNO1bBDyuSIgqrRAj6YAJk9vsFdteow==
X-Google-Smtp-Source: AGHT+IG1Z8FOFldGLV2w5fHkxNGOTNg+e1EqiNe0SVXAXhy6ueElmVxJqEbbIhS+bpUsYY3uleY3Xw==
X-Received: by 2002:a17:902:d48f:b0:220:c86d:d7eb with SMTP id
 d9443c01a7336-22780e15340mr110436865ad.36.1742645543751; 
 Sat, 22 Mar 2025 05:12:23 -0700 (PDT)
Received: from terra ([2405:6586:be0:0:83c8:d31d:2cec:f542])
 by smtp.gmail.com with ESMTPSA id
 d9443c01a7336-227811f9a00sm34330805ad.240.2025.03.22.05.12.22
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sat, 22 Mar 2025 05:12:23 -0700 (PDT)
From: Maxim Cournoyer <maxim.cournoyer@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: [bug#77041] [PATCH v2 00/16] Replacing mcron jobs by Shepherd
 timers
In-Reply-To: <cover.1742642743.git.ludo@HIDDEN> ("Ludovic =?utf-8?Q?Court?=
 =?utf-8?Q?=C3=A8s=22's?= message
 of "Sat, 22 Mar 2025 12:36:37 +0100")
References: <cover.1742073920.git.ludo@HIDDEN>
 <cover.1742642743.git.ludo@HIDDEN>
Date: Sat, 22 Mar 2025 21:12:08 +0900
Message-ID: <87frj5i7s7.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 77041
Cc: 77041 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi,

Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail>

If you apply this series to master with 'b4 shazam
cover.1742073920.git.ludo@HIDDEN',  it should automatically add the
'Reviewed-by:' git trailers to every of these 15 commits.

Note that I haven't locally tested it, just reviewed the diffs, but I
trust your self-test/QA hygiene.

-- 
Thanks,
Maxim




Information forwarded to guix-patches@HIDDEN:
bug#77041; Package guix-patches. Full text available.

Message received at 77041 <at> debbugs.gnu.org:


Received: (at 77041) by debbugs.gnu.org; 22 Mar 2025 11:38:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 22 07:38:40 2025
Received: from localhost ([127.0.0.1]:41229 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tvxBX-0002aq-IW
	for submit <at> debbugs.gnu.org; Sat, 22 Mar 2025 07:38:40 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:54296)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1tvxAe-0002Vd-HO
 for 77041 <at> debbugs.gnu.org; Sat, 22 Mar 2025 07:37:45 -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 <ludo@HIDDEN>)
 id 1tvxAZ-0008WG-8O; Sat, 22 Mar 2025 07:37:39 -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=OwNCHcL/DSCY43ZGkUxSOWTuVU8NwUZzlF7xn5EKudY=; b=ddhPlVasILnirU4Kq804
 gh8GSdqJX1j3sdil++aSRNh7oipal6Pv/wvSNLe1BdllMMCsWD2U68XtpjA+NrUk5gPyAtASqb0G8
 BXppOZA49WdUSyLOMZVfG62djXQEmkDMVG1uBFNjUys765MXeIvi6UyEo0qslviusogMaEUy1VEMg
 B1HfHt/Iquxky/F3+zOwp55DKQvNQ6bpP6q1zuyHZbUhw/hKDZQmTO1sGk1znsSgooDyCns2bmDCJ
 GNa+PtaCXC2wCcUOoTfa4LjKDx6gjPihxwYmaQd+slubw0FY1J5qbzF9rqN8ItAsRm/llBlb3/GJn
 okqv6qxyWDYJMA==;
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 77041 <at> debbugs.gnu.org
Subject: [PATCH v2 16/16] doc: Document Shepherd timers and recommend against
 mcron.
Date: Sat, 22 Mar 2025 12:36:53 +0100
Message-ID: <521517bc62856586343fd55dad508a32cc3a29d1.1742642743.git.ludo@HIDDEN>
X-Mailer: git-send-email 2.48.1
In-Reply-To: <cover.1742642743.git.ludo@HIDDEN>
References: <cover.1742642743.git.ludo@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
X-Debbugs-Cc: Ludovic Courtès <ludo@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 77041
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

* doc/guix.texi (Scheduled Job Execution): Add intro.  Add “Shepherd
Timers” subsection; move previous documentation to “Mcron” subsection.
Recommend use of Shepherd timers.
(Mcron Home Service): Recommend Shepherd timers.
(Shepherd Home Service): Document timers.

Change-Id: I9dba68a0d062f5aeeae29ff725e1161f2bd3b291
---
 doc/guix.texi | 168 +++++++++++++++++++++++++++++++++++++++++++++++---
 1 file changed, 159 insertions(+), 9 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 12eef9aa40..4592523f81 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -20849,14 +20849,123 @@ Scheduled Job Execution
 @subsection Scheduled Job Execution
 
 @cindex cron
-@cindex mcron
 @cindex scheduling jobs
-The @code{(gnu services mcron)} module provides an interface to
+It is often useful to have system tasks run periodically.  This can be
+achieved by defining Shepherd @dfn{timers} or by using the historical
+and somewhat less flexible mcron service.
+
+@subsubsection Shepherd Timers
+
+@cindex timers, Shepherd
+@cindex Shepherd timers
+The Shepherd supports running jobs periodically by defining
+@dfn{timers}, a special kind of service.  A Shepherd timer can be
+defined like another Shepherd service, but with specific @code{start}
+and @code{stop} methods (@pxref{Shepherd Services}):
+
+@lisp
+;; Defining a timer, verbosely.
+(shepherd-service
+ (provision '(updatedb))
+ (requirement '(user-processes))
+ (modules '((shepherd service timer)))
+ (start #~(make-timer-constructor
+           ;; Everyday at 3AM (using Vixie cron syntax).
+           (cron-string->calendar-event "0 3 * * *")
+           (command '(#$(file-append findutils "/bin/updatedb")))
+           #:wait-for-termination? #t))
+ (stop #~(make-timer-destructor))
+ (documentation "Periodically run 'updatedb'.")
+ (actions (list shepherd-trigger-action)))
+@end lisp
+
+This is quite some boilerplate so you can instead use this equivalent
+shorthand notation:
+
+@lisp
+;; Equivalent timer definition, but shorter.
+(shepherd-timer '(updatedb) "0 3 * * *"
+                #~(#$(file-append findutils "/bin/updatedb"))
+                #:requirement '(user-processes))
+@end lisp
+
+This procedure is defined as follows.
+
+@anchor{shepherd-timer-procedure}
+@deffn {Procedure} shepherd-timer @var{provision} @var{schedule} @
+         @var{command} [#:requirement '()] @
+         [#:documentation %default-timer-documentation]
+Return a Shepherd service with the given @var{provision} periodically
+running @var{command}, a list-valued gexp, according to @var{schedule},
+a string in Vixie cron syntax or a gexp providing a Shepherd calendar
+event.  @var{documentation} is the string that appears when running
+@code{herd doc @var{service}}.
+@end deffn
+
+The example below shows how to define a timer and to add it to your
+operating system configuration.
+
+@lisp
+(use-modules (gnu))
+(use-service-modules shepherd)
+(use-package-modules base)
+
+(define updatedb-timer
+  ;; Run 'updatedb' at 3AM everyday.
+  (shepherd-timer '(updatedb)
+                  "0 3 * * *"  ;Vixie cron syntax
+                  #~(#$(file-append findutils "/bin/updatedb")
+                     "--prunepaths=/tmp /var/tmp /gnu/store")
+                  #:requirement '(user-processes)))
+
+(define garbage-collection-timer
+  ;; Run 'guix gc' everyday at 5AM.
+  (shepherd-timer '(garbage-collection)
+                  #~(calendar-event #:hours '(5) #:minutes '(0))
+                  #~("/run/current-system/profile/bin/guix"
+                     "gc" "-F" "10G")
+                  #:requirement '(guix-daemon)))
+
+(operating-system
+  ;; @dots{}
+
+  ;; Extend the Shepherd service with additional timers
+  ;; using 'simple-service'.
+  (services (cons (simple-service 'my-timers
+                                   shepherd-root-service-type
+                                   (list garbage-collection-timer
+                                         updatedb-timer))
+                  %base-services)))
+@end lisp
+
+The resulting system contains these two services, which can be inspected
+with @command{herd status}.  They can also be triggered manually:
+
+@example
+herd trigger garbage-collection
+@end example
+
+@ref{Timers,,, shepherd, The GNU Shepherd Manual} for more information
+on Shepherd timers.
+
+@anchor{mcron-service}
+@subsubsection Mcron
+
+@cindex mcron
+Alternatively,
+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
 Unix @command{cron} daemon; the main difference is that it is
-implemented in Guile Scheme, which provides a lot of flexibility when
-specifying the scheduling of jobs and their actions.
+implemented in Guile Scheme.  It is overall less convenient than
+Shepherd timers: individual jobs cannot depend on specific Shepherd
+services, logging is coarse-grain (one file for all the jobs), jobs may
+not be inspected, updated, or triggered manually.
+
+@quotation Note
+For the reasons given above, we recommend using Shepherd timers rather
+than mcron for your periodic tasks.
+@end quotation
 
 The example below defines an operating system that runs the
 @command{updatedb} (@pxref{Invoking updatedb,,, find, Finding Files})
@@ -48610,18 +48719,23 @@ Shells Home Services
 @node Mcron Home Service
 @subsection Scheduled User's Job Execution
 
-@cindex cron
-@cindex mcron
-@cindex scheduling jobs
-
+@cindex cron, per-user
+@cindex mcron, per-user
+@cindex scheduling jobs per-user
 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
-applicable here (@pxref{Scheduled Job Execution}), the only difference
+applicable here (@pxref{mcron-service, mcron reference}), the only difference
 for home services is that they have to be declared in a
 @code{home-environment} record instead of an @code{operating-system}
 record.
 
+@quotation Note
+We recommend defining periodic tasks as Shepherd timers, which provide
+more flexibility than mcron.  @xref{Shepherd Home Service}, for more
+info.
+@end quotation
+
 @defvar home-mcron-service-type
 This is the type of the @code{mcron} home service, whose value is a
 @code{home-mcron-configuration} object.  It allows to manage scheduled
@@ -48784,6 +48898,42 @@ Shepherd Home Service
 @end table
 @end deftp
 
+@cindex timers, per-user
+The Shepherd allows you to define @dfn{timers}, a special type of
+service that performs a given task periodically.  Just like you can
+define timers at the system level (@pxref{Scheduled Job Execution}), you
+can do so in your home environment.
+
+The example below defines a home environment where a Shepherd timer runs
+the @command{mkid} command twice per day (@pxref{mkid invocation,,,
+idutils, ID Database Utilities}).  It does so by extending
+@code{home-shepherd-service-type} with @code{simple-service}; the
+Shepherd timer itself is produced by the @code{shepherd-timer} procedure
+(@pxref{shepherd-timer-procedure, @code{shepherd-timer}}), which is
+given the service name, a gexp specifying its schedule, and a gexp
+specifying the command to run.
+
+@lisp
+(use-modules (gnu) (guix)
+             (gnu home services shepherd)
+             (gnu packages idutils))
+
+(define idutils-service
+  ;; Index my 'doc' directory everyday at 12:15PM and 7:15PM.
+  (simple-service
+   'update-idutils-database home-shepherd-service-type
+   (list (shepherd-timer '(update-idutils-database)
+                         #~(calendar-event #:hours '(12 19)
+                                           #:minutes '(15))
+                         #~(#$(file-append idutils "/bin/mkid")
+                            "doc")))))
+
+(home-environment
+  ;; @dots{}
+  (services (append (list idutils-service)
+                    %base-home-services)))
+@end lisp
+
 @cindex log rotation, for user services
 The Shepherd also comes with a @dfn{log rotation service}, which
 compresses and then deletes old log files produced by services and
-- 
2.48.1





Information forwarded to ludo@HIDDEN, maxim.cournoyer@HIDDEN, guix-patches@HIDDEN:
bug#77041; Package guix-patches. Full text available.

Message received at 77041 <at> debbugs.gnu.org:


Received: (at 77041) by debbugs.gnu.org; 22 Mar 2025 11:37:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 22 07:37:49 2025
Received: from localhost ([127.0.0.1]:41201 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tvxAi-0002XM-Sq
	for submit <at> debbugs.gnu.org; Sat, 22 Mar 2025 07:37:49 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:54284)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1tvxAd-0002VW-MM
 for 77041 <at> debbugs.gnu.org; Sat, 22 Mar 2025 07:37:44 -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 <ludo@HIDDEN>)
 id 1tvxAY-0008Vr-55; Sat, 22 Mar 2025 07:37:38 -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=R+pLjTM5mgdfIeQiOCzWOw88mhx3xEQaNcOS0HOnIWA=; b=LXhI9AS+6LtfgN5RD6zm
 DKpT9BZetwsOLMgVWHXGdURXh/TIzb+Rp6S7/YKatqfV0BoC7B9Qkp5HMgHkuaT8nrx9e5QRH7/PC
 7Z6sRu8a1TRgWDs0uQM8Pc6aLPkyVEmCza+zuhML9aprGPI6rEaXZPzPFdKOGT1YJcHQVe4g4ZSIM
 WVrEfAAdGCBuv3z8CWdcJ9H1WXUVQ4fFrSy22da6xEI09fLg6yqXyLysQ0xnaGTrJ/CjzPIXtUzry
 lV1A8KLfolIU8GigrSPvlHhJ6TUaFaHAxZFJLEgZZ2dOlBVTn3wzZOTXPCNMTaOZO2Qx2rlnqjMBw
 2hIfnSwuEfcVqA==;
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 77041 <at> debbugs.gnu.org
Subject: [PATCH v2 15/16] =?UTF-8?q?services:=20shepherd:=20Add=20?=
 =?UTF-8?q?=E2=80=98shepherd-timer=E2=80=99.?=
Date: Sat, 22 Mar 2025 12:36:52 +0100
Message-ID: <ac038d5730103ac1ea3f8af9cd15937d7b9d34d8.1742642743.git.ludo@HIDDEN>
X-Mailer: git-send-email 2.48.1
In-Reply-To: <cover.1742642743.git.ludo@HIDDEN>
References: <cover.1742642743.git.ludo@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
X-Debbugs-Cc: Andrew Tropin <andrew@HIDDEN>, Janneke Nieuwenhuizen <janneke@HIDDEN>, Ludovic Courtès <ludo@HIDDEN>, Tanguy Le Carrour <tanguy@HIDDEN>
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 77041
Cc: Luis Guilherme Coelho <lgcoelho@HIDDEN>,
 =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

* gnu/services/shepherd.scm (shepherd-timer): New procedure.
* gnu/home/services/shepherd.scm: Re-export it.

Suggested-by: Luis Guilherme Coelho <lgcoelho@HIDDEN>
Change-Id: I5f702d4119eee47381a7a1ac650b8ad3fc5e6cdd
---
 gnu/home/services/shepherd.scm |  3 ++-
 gnu/services/shepherd.scm      | 26 ++++++++++++++++++++++++++
 2 files changed, 28 insertions(+), 1 deletion(-)

diff --git a/gnu/home/services/shepherd.scm b/gnu/home/services/shepherd.scm
index 25f1641b32..b4d826f6bb 100644
--- a/gnu/home/services/shepherd.scm
+++ b/gnu/home/services/shepherd.scm
@@ -53,7 +53,8 @@ (define-module (gnu home services shepherd)
 
                shepherd-action
                shepherd-configuration-action
-               shepherd-trigger-action))
+               shepherd-trigger-action
+               shepherd-timer))
 
 (define-record-type* <home-shepherd-configuration>
   home-shepherd-configuration make-home-shepherd-configuration
diff --git a/gnu/services/shepherd.scm b/gnu/services/shepherd.scm
index e7e414b920..c8e01c9d83 100644
--- a/gnu/services/shepherd.scm
+++ b/gnu/services/shepherd.scm
@@ -72,6 +72,7 @@ (define-module (gnu services shepherd)
             shepherd-action-procedure
 
             shepherd-configuration-action
+            shepherd-timer
             shepherd-trigger-action
 
             %default-modules
@@ -257,6 +258,31 @@ (define (shepherd-service-canonical-name service)
   "Return the 'canonical name' of SERVICE."
   (first (shepherd-service-provision service)))
 
+(define %default-timer-documentation
+  "Periodically run a command.") ;no i18n since it gets in the shepherd process
+
+(define* (shepherd-timer provision schedule command
+                         #:key
+                         (requirement '())
+                         (documentation %default-timer-documentation))
+  "Return a Shepherd service with the given PROVISION periodically running
+COMMAND, a list-valued gexp, according to SCHEDULE, a string in Vixie cron
+syntax or a gexp providing a Shepherd calendar event.  DOCUMENTATION is the
+string that appears when running 'herd doc SERVICE'."
+  (shepherd-service
+   (provision provision)
+   (requirement requirement)
+   (modules '((shepherd service timer)))
+   (start #~(make-timer-constructor
+             #$(if (string? schedule)
+                   #~(cron-string->calendar-event #$schedule)
+                   schedule)
+             (command '(#$@command))
+             #:wait-for-termination? #t))
+   (stop #~(make-timer-destructor))
+   (documentation documentation)
+   (actions (list shepherd-trigger-action))))
+
 (define (assert-valid-graph services)
   "Raise an error if SERVICES does not define a valid shepherd service graph,
 for instance if a service requires a nonexistent service, or if more than one
-- 
2.48.1





Information forwarded to andrew@HIDDEN, janneke@HIDDEN, ludo@HIDDEN, tanguy@HIDDEN, guix-patches@HIDDEN:
bug#77041; Package guix-patches. Full text available.

Message received at 77041 <at> debbugs.gnu.org:


Received: (at 77041) by debbugs.gnu.org; 22 Mar 2025 11:37:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 22 07:37:48 2025
Received: from localhost ([127.0.0.1]:41199 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tvxAi-0002XK-IB
	for submit <at> debbugs.gnu.org; Sat, 22 Mar 2025 07:37:48 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:54272)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1tvxAc-0002VP-Af
 for 77041 <at> debbugs.gnu.org; Sat, 22 Mar 2025 07:37:42 -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 <ludo@HIDDEN>)
 id 1tvxAX-0008Ve-22; Sat, 22 Mar 2025 07:37:37 -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=1/8Zv4QX9VLRAfckrNt6hj0Ne4v3y5mtwwjSEHnjsnk=; b=akxcP05LrAu1Y9m65vC0
 1HIikwXLPgQvxHIRltIUwy89Cn//IkiMGve1MtCtMfWU88byIfsljFc6X43RbwLG7yhNz23GiVXrw
 NMMP6nosSfJZsVgzd+YiCodF6zrs44mKJ9N2ob8yoV+aVFdqZ4eV+Ka7iwfWWvDDvigglNM9c7ytS
 e29uM64Q1zYVJm5iA6XDsop+VgkhKokyqnnlRmcZIE4b1rG21KpzJNoHl9RaFuHf7AQh0lHh5SkqM
 lm+kRLZxs4FM4p8ITmsz4siVX14Zkg/Dq5j8W/eyooEurEiOjJ81gXURYvnjPfoXuaxLhtPV3Ku4c
 3dTY6xptKDiP/w==;
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 77041 <at> debbugs.gnu.org
Subject: [PATCH v2 14/16] services: virtual-build-machine: Turn GC job into a
 Shepherd timer.
Date: Sat, 22 Mar 2025 12:36:51 +0100
Message-ID: <a479ab8f793ea3414ad5e8ba172a932d7fadafbe.1742642743.git.ludo@HIDDEN>
X-Mailer: git-send-email 2.48.1
In-Reply-To: <cover.1742642743.git.ludo@HIDDEN>
References: <cover.1742642743.git.ludo@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 77041
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

* gnu/services/virtualization.scm (gc-service-type): New variable.
(%virtual-build-machine-operating-system): Use instead of extending
‘mcron-service-type’.

Change-Id: I56d7f9293f582269e5a34d91bf4f3edddfa844e0
---
 gnu/services/virtualization.scm | 22 ++++++++++++++++++----
 1 file changed, 18 insertions(+), 4 deletions(-)

diff --git a/gnu/services/virtualization.scm b/gnu/services/virtualization.scm
index 555c0be55e..90a0265a59 100644
--- a/gnu/services/virtualization.scm
+++ b/gnu/services/virtualization.scm
@@ -40,7 +40,6 @@ (define-module (gnu services virtualization)
   #:use-module (gnu services base)
   #:use-module (gnu services configuration)
   #:use-module (gnu services dbus)
-  #:use-module (gnu services mcron)
   #:use-module (gnu services shepherd)
   #:use-module (gnu services ssh)
   #:use-module (gnu services)
@@ -1353,6 +1352,23 @@ (define %system-log-message-destination
             (else
              '("/dev/console")))))
 
+(define gc-service-type                           ;TODO: Factorize.
+  (shepherd-service-type
+   'garbage-collection
+   (lambda _
+     (shepherd-service
+      (provision '(gc))
+      (requirement '(user-processes guix-daemon))
+      (start #~(make-timer-constructor
+                (calendar-event #:minutes '(12))
+                (command
+                 '("/run/current-system/profile/bin/guix" "gc" "-F2G"))
+                #:wait-for-termination? #t))
+      (stop #~(make-timer-constructor))
+      (actions (list shepherd-trigger-action))))
+   #t
+   (description "Periodically collect garbage.")))
+
 (define %virtual-build-machine-operating-system
   (operating-system
     (host-name "build-machine")
@@ -1385,9 +1401,7 @@ (define %virtual-build-machine-operating-system
                                (openssh openssh-sans-x)))
 
                      ;; Run GC once per hour.
-                     (simple-service 'perdiodic-gc mcron-service-type
-                                     (list #~(job "12 * * * *"
-                                                  "guix gc -F 2G")))
+                     (service gc-service-type)
 
                      (modify-services %base-services
                        ;; By default, the secret service introduces a
-- 
2.48.1





Information forwarded to guix-patches@HIDDEN:
bug#77041; Package guix-patches. Full text available.

Message received at 77041 <at> debbugs.gnu.org:


Received: (at 77041) by debbugs.gnu.org; 22 Mar 2025 11:37:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 22 07:37:48 2025
Received: from localhost ([127.0.0.1]:41197 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tvxAh-0002X9-Ls
	for submit <at> debbugs.gnu.org; Sat, 22 Mar 2025 07:37:48 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:54270)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1tvxAb-0002VN-BX
 for 77041 <at> debbugs.gnu.org; Sat, 22 Mar 2025 07:37:42 -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 <ludo@HIDDEN>)
 id 1tvxAW-0008VT-2I; Sat, 22 Mar 2025 07:37:36 -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=7v4wK2ppVQQ0rqCCLFhkZf8uHpvsjkFIbxXih6HV3HA=; b=kfPQWuYP+Hb1sbYlNWIf
 CflY7riFA5Q17fT09E86145JBzvaxv6XN7+w3rbQfdHttlSrwHU17AZUMU4Z1mwWmPzHDjQ6YnPwQ
 v8Ncpa02jPgRnFLMICetS69NIyNoEG6/x8BDjEeUKCeQhmwkEdDLcFdDgVLHW5XFIQyAMio4bciga
 1EH+sf7gUm+VfRX4kQITel9DyQm3jhzeX39BgzbHeS+XsEGEp8CWXx27ayQcl2UAXyfXmZyTEHQVi
 yylCa8GkCIIrNh5A23j3GWj8XAkN4TOM7bZoE0RqYCsfkVVTAX890hQU2LjzM1MkDaduFyv47HT98
 k1pbveC/xyfO8A==;
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 77041 <at> debbugs.gnu.org
Subject: [PATCH v2 13/16] services: ganeti: Produce Shepherd timers instead of
 mcron jobs.
Date: Sat, 22 Mar 2025 12:36:50 +0100
Message-ID: <796377dee641cd4e4499d0afd4ed35abce4d799d.1742642743.git.ludo@HIDDEN>
X-Mailer: git-send-email 2.48.1
In-Reply-To: <cover.1742642743.git.ludo@HIDDEN>
References: <cover.1742642743.git.ludo@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
X-Debbugs-Cc: Ludovic Courtès <ludo@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 77041
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

* gnu/services/ganeti.scm (<ganeti-watcher-configuration>)[schedule]:
Change default value to a cron string.
(ganeti-timer): New procedure.
(ganeti-watcher-jobs): Rename to…
(ganeti-watcher-service): … this.  Return Shepherd services.
(ganeti-watcher-service-type)[extensions]: Adjust accordingly.
(ganeti-cleaner-jobs): Rename to…
(ganeti-cleaner-service): … this.  Return Shepherd services.
(ganeti-cleaner-service-type)[extensions]: Adjust accordingly.
(ganeti-shepherd-services): Include the watcher and cleaner services.
(ganeti-mcron-jobs): Remove.
(ganeti-service-type)[extensions]: Adjust accordingly.
* doc/guix.texi (Virtualization Services): Update ‘schedule’
documentation.

Change-Id: Id209a3c50271203dc7190c4c6d0c0ffdf6c10875
---
 doc/guix.texi           |   7 ++-
 gnu/services/ganeti.scm | 116 +++++++++++++++++++---------------------
 2 files changed, 59 insertions(+), 64 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index df5378bce5..12eef9aa40 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -39874,8 +39874,11 @@ Virtualization Services
 @item @code{ganeti} (default: @code{ganeti})
 The @code{ganeti} package to use for this service.
 
-@item @code{schedule} (default: @code{'(next-second-from (next-minute (range 0 60 5)))})
-How often to run the script.  The default is every five minutes.
+@item @code{schedule} (default: @code{"*/5 * * * *"})
+When to run the script, expressed either as a string in traditional cron
+syntax or as a gexp representing a Shepherd calendar event
+(@pxref{Timers,,, shepherd, The GNU Shepherd Manual}).  The default is
+every five minutes.
 
 @item @code{rapi-ip} (default: @code{#f})
 This option needs to be specified only if the RAPI daemon is configured to use
diff --git a/gnu/services/ganeti.scm b/gnu/services/ganeti.scm
index f905ab8395..9cab6c110a 100644
--- a/gnu/services/ganeti.scm
+++ b/gnu/services/ganeti.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2020, 2022 Marius Bakke <marius@HIDDEN>
+;;; Copyright © 2025 Ludovic Courtès <ludo@HIDDEN>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -19,14 +20,11 @@
 (define-module (gnu services ganeti)
   #:use-module (gnu packages virtualization)
   #:use-module (gnu services)
-  #:use-module (gnu services mcron)
   #:use-module (gnu services shepherd)
   #:use-module (guix gexp)
   #:use-module (guix records)
-
   #:use-module (srfi srfi-1)
   #:use-module (ice-9 match)
-
   #:export (ganeti-noded-configuration
             ganeti-noded-configuration?
             ganeti-noded-configuration-ganeti
@@ -644,9 +642,8 @@ (define-record-type* <ganeti-watcher-configuration>
   (ganeti        ganeti-watcher-configuration-ganeti        ;file-like
                  (default ganeti))
   (schedule      ganeti-watcher-configuration-schedule      ;list | string
-                 (default '(next-second-from
-                            ;; Run every five minutes.
-                            (next-minute (range 0 60 5)))))
+                 ;; Run every 5 minutes.
+                 (default "*/5 * * * *"))
   (rapi-ip       ganeti-watcher-configuration-rapi-ip       ;#f | string
                  (default #f))
   (job-age       ganeti-watcher-configuration-job-age       ;integer
@@ -660,36 +657,47 @@ (define ganeti-watcher-command
   (match-lambda
     (($ <ganeti-watcher-configuration> ganeti _ rapi-ip job-age verify-disks?
                                        debug?)
-     #~(lambda ()
-         (system* #$(file-append ganeti "/sbin/ganeti-watcher")
-                  #$@(if rapi-ip
-                         #~((string-append "--rapi-ip=" #$rapi-ip))
-                         #~())
-                  #$(string-append "--job-age=" (number->string job-age))
-                  #$@(if verify-disks?
-                         #~()
-                         #~("--no-verify-disks"))
-                  #$@(if debug?
-                         #~("--debug")
-                         #~()))))))
+     #~(#$(file-append ganeti "/sbin/ganeti-watcher")
+        #$@(if rapi-ip
+               #~((string-append "--rapi-ip=" #$rapi-ip))
+               #~())
+        #$(string-append "--job-age=" (number->string job-age))
+        #$@(if verify-disks?
+               #~()
+               #~("--no-verify-disks"))
+        #$@(if debug?
+               #~("--debug")
+               #~())))))
 
-(define (ganeti-watcher-jobs config)
+(define (ganeti-timer name schedule command)
+  "Return a Shepherd timer providing NAME and running COMMAND, a list-valued
+gexp."
+  (shepherd-service
+   (provision (list name))
+   (requirement '(user-processes))
+   (modules '((shepherd service timer)))
+   (start #~(make-timer-constructor
+             #$(if (string? schedule)
+                   #~(cron-string->calendar-event #$schedule)
+                   schedule)
+             (command '(#$@command))
+             #:wait-for-termination? #t))
+   (stop #~(make-timer-destructor))
+   (documentation "Periodically run a Ganeti maintenance job.")
+   (actions (list shepherd-trigger-action))))
+
+(define (ganeti-watcher-service config)
   (match config
     (($ <ganeti-watcher-configuration> _ schedule)
-     (list
-      #~(job #$@(match schedule
-                  ((? string?)
-                   #~(#$schedule))
-                  ((? list?)
-                   #~('#$schedule)))
-             #$(ganeti-watcher-command config)
-             "ganeti-watcher")))))
+     (list (ganeti-timer 'ganeti-watcher
+                         schedule
+                         (ganeti-watcher-command config))))))
 
 (define ganeti-watcher-service-type
   (service-type (name 'ganeti-watcher)
                 (extensions
-                 (list (service-extension mcron-service-type
-                                          ganeti-watcher-jobs)))
+                 (list (service-extension shepherd-root-service-type
+                                          ganeti-watcher-service)))
                 (default-value (ganeti-watcher-configuration))
                 (description
                  "@command{ganeti-watcher} is a periodically run script that
@@ -714,34 +722,23 @@ (define-record-type* <ganeti-cleaner-configuration>
                    ;; Run the node cleaner at 02:45 every day.
                    (default "45 2 * * *")))
 
-(define ganeti-cleaner-jobs
+(define ganeti-cleaner-service
   (match-lambda
     (($ <ganeti-cleaner-configuration> ganeti master-schedule node-schedule)
-     (list
-      #~(job #$@(match master-schedule
-                  ((? string?)
-                   #~(#$master-schedule))
-                  ((? list?)
-                   #~('#$master-schedule)))
-             (lambda ()
-              (system* #$(file-append ganeti "/sbin/ganeti-cleaner")
-                       "master"))
-             "ganeti master cleaner")
-      #~(job #$@(match node-schedule
-                  ((? string?)
-                   #~(#$node-schedule))
-                  ((? list?)
-                   #~('#$node-schedule)))
-             (lambda ()
-               (system* #$(file-append ganeti "/sbin/ganeti-cleaner")
-                        "node"))
-             "ganeti node cleaner")))))
+     (list (ganeti-timer 'ganeti-master-cleaner
+                         master-schedule
+                         #~(#$(file-append ganeti "/sbin/ganeti-cleaner")
+                            "master"))
+           (ganeti-timer 'ganeti-node-cleaner
+                         node-schedule
+                         #~(#$(file-append ganeti "/sbin/ganeti-cleaner")
+                            "node"))))))
 
 (define ganeti-cleaner-service-type
   (service-type (name 'ganeti-cleaner)
                 (extensions
-                 (list (service-extension mcron-service-type
-                                          ganeti-cleaner-jobs)))
+                 (list (service-extension shepherd-root-service-type
+                                          ganeti-cleaner-service)))
                 (default-value (ganeti-cleaner-configuration))
                 (description
                  "@command{ganeti-cleaner} is a script that removes old files
@@ -804,7 +801,8 @@ (define (ganeti-activation config)
 
 (define ganeti-shepherd-services
   (match-lambda
-    (($ <ganeti-configuration> _ noded confd wconfd luxid rapi kvmd mond metad)
+    (($ <ganeti-configuration> _ noded confd wconfd luxid rapi kvmd mond metad
+                               watcher cleaner)
      (append (ganeti-noded-service noded)
              (ganeti-confd-service confd)
              (ganeti-wconfd-service wconfd)
@@ -812,13 +810,9 @@ (define ganeti-shepherd-services
              (ganeti-rapi-service rapi)
              (ganeti-kvmd-service kvmd)
              (ganeti-mond-service mond)
-             (ganeti-metad-service metad)))))
-
-(define ganeti-mcron-jobs
-  (match-lambda
-    (($ <ganeti-configuration> _ _ _ _ _ _ _ _ _ watcher cleaner)
-     (append (ganeti-watcher-jobs watcher)
-             (ganeti-cleaner-jobs cleaner)))))
+             (ganeti-metad-service metad)
+             (ganeti-watcher-service watcher)
+             (ganeti-cleaner-service cleaner)))))
 
 (define-record-type* <ganeti-os>
   ganeti-os make-ganeti-os ganeti-os?
@@ -1122,9 +1116,7 @@ (define ganeti-service-type
                        (service-extension etc-service-type
                                           ganeti-etc-service)
                        (service-extension profile-service-type
-                                          (compose list ganeti-configuration-ganeti))
-                       (service-extension mcron-service-type
-                                          ganeti-mcron-jobs)))
+                                          (compose list ganeti-configuration-ganeti))))
                 (default-value (ganeti-configuration (os %default-ganeti-os)))
                 (description
                  "Ganeti is a family of services that are designed to run
-- 
2.48.1





Information forwarded to ludo@HIDDEN, maxim.cournoyer@HIDDEN, guix-patches@HIDDEN:
bug#77041; Package guix-patches. Full text available.

Message received at 77041 <at> debbugs.gnu.org:


Received: (at 77041) by debbugs.gnu.org; 22 Mar 2025 11:37:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 22 07:37:47 2025
Received: from localhost ([127.0.0.1]:41195 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tvxAh-0002X0-7u
	for submit <at> debbugs.gnu.org; Sat, 22 Mar 2025 07:37:47 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:54254)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1tvxAZ-0002VL-Kq
 for 77041 <at> debbugs.gnu.org; Sat, 22 Mar 2025 07:37:39 -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 <ludo@HIDDEN>)
 id 1tvxAU-0008VG-Bp; Sat, 22 Mar 2025 07:37:34 -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=KZ7oLLkXmt5hqfPyIHODxWcEeiUl8Vy7AV/4viyIeEc=; b=EkigGbN6InrDFs9FLYVl
 tzfTEpV4Ng0pZMz4N4kTONHicV57+CdXhCcd5HttVMUI3oK2+7Aafxmw/2DSLfAgia4NPi3pNCvJo
 L554PCh0B2ps6oEHUAed6U6x3cZZ/4sVYVXyZF5k42kger/st1eDaqHN/W8S6pXPOLsecMyS3yzxu
 t4QWo5izpgXnhoZ2ztRS8GP2D9Wxx2GKZXoWXCCHvurSdcKWYpLeBojgFSzME2mwMaHDHtj3H8WfL
 4p9m3+pBdkXuvMboI+2I8oz6/aFrwGsWU44tt42VkltT+/58AbaQbf+SOEaz0U//5Sl9Rguxn37af
 9qTp51tXM7mhcw==;
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 77041 <at> debbugs.gnu.org
Subject: [PATCH v2 12/16] services: ganeti: Update to Shepherd 1.0 interface.
Date: Sat, 22 Mar 2025 12:36:49 +0100
Message-ID: <2a37b6eecb6d9137fde541da20aacc24bd380dd3.1742642743.git.ludo@HIDDEN>
X-Mailer: git-send-email 2.48.1
In-Reply-To: <cover.1742642743.git.ludo@HIDDEN>
References: <cover.1742642743.git.ludo@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 77041
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

* gnu/services/ganeti.scm (shepherd-wconfd-force-start-action)[procedure]:
Use ‘enable-service’ and ‘perform-service-action’ instead of ‘action’,
which was deprecated in 0.10.x and replaced in 1.0.

Change-Id: I2ba7d973b95f17f6ce093185fec7b246cf427be9
---
 gnu/services/ganeti.scm | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/gnu/services/ganeti.scm b/gnu/services/ganeti.scm
index ee72946c88..f905ab8395 100644
--- a/gnu/services/ganeti.scm
+++ b/gnu/services/ganeti.scm
@@ -329,18 +329,17 @@ (define shepherd-wconfd-force-start-action
     "Forcefully start wconfd even on non-master nodes (dangerous!).")
    (procedure #~(lambda _
                   (format #t "Forcefully starting the wconfd daemon...~%")
-                  (action 'ganeti-wconfd 'enable)
-                  (dynamic-wind
-                    (lambda ()
-                      (false-if-exception
-                       (call-with-output-file #$%wconfd-force-node-hint
-                         (lambda (port)
-                           (const #t)))))
-                    (lambda ()
-                      (action 'ganeti-wconfd 'restart))
+                  (enable-service (lookup-service 'ganeti-wconfd))
+                  (call-with-output-file #$%wconfd-force-node-hint
+                    (const #t))
+                  (catch #t
                     (lambda ()
+                      (perform-service-action (lookup-service 'ganeti-wconfd)
+                                              'restart)
+                      (delete-file #$%wconfd-force-node-hint))
+                    (lambda _
                       (delete-file #$%wconfd-force-node-hint)))
-                    #t))))
+                  #t))))
 
 (define ganeti-wconfd-service
   (match-lambda
-- 
2.48.1





Information forwarded to guix-patches@HIDDEN:
bug#77041; Package guix-patches. Full text available.

Message received at 77041 <at> debbugs.gnu.org:


Received: (at 77041) by debbugs.gnu.org; 22 Mar 2025 11:37:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 22 07:37:47 2025
Received: from localhost ([127.0.0.1]:41193 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tvxAg-0002Wt-Sd
	for submit <at> debbugs.gnu.org; Sat, 22 Mar 2025 07:37:47 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:54238)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1tvxAY-0002V6-Ky
 for 77041 <at> debbugs.gnu.org; Sat, 22 Mar 2025 07:37:38 -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 <ludo@HIDDEN>)
 id 1tvxAT-0008V2-Cj; Sat, 22 Mar 2025 07:37:33 -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=f578GIeB3CRy8TTnsIafTl4hBoKgVU+hOI0dI2zxvuE=; b=gC1rbquhXX6sy5hyRKaf
 FN7YnMafEekq0NM77rvR4zl6HG5eSpzA2LEmFbiJb9teOZLJ5DUncFu9RqB038qVwW0xBj4msXR1K
 LiYgLcfWm8hmH0Zof1NcAF7JItn7jO2dIJ2VbgJ7kEqzDwc4UW4l/Z4JvRFX86OUDx3JfHWpb0gkh
 HYb+RluxCtWeVljS0agH3waO7JzOlPh7XvzPnKR3QpELCaK2FfQgM15tuKvhexpZd3NJoIvEn3tzU
 2MHPwsiM0L69LX2+UsEtySZbLpMIKthv+95QEsdv3EH9a1cpekfbaMOreak/xdQ/AvsfYPpzYfL3D
 2KRtltSnt88j5A==;
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 77041 <at> debbugs.gnu.org
Subject: [PATCH v2 11/16] tests: ganeti: Increase VM memory size.
Date: Sat, 22 Mar 2025 12:36:48 +0100
Message-ID: <ca35d634a00be2d05da2704eb5831b03b2e3f2ce.1742642743.git.ludo@HIDDEN>
X-Mailer: git-send-email 2.48.1
In-Reply-To: <cover.1742642743.git.ludo@HIDDEN>
References: <cover.1742642743.git.ludo@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 77041
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

* gnu/tests/ganeti.scm (run-ganeti-test): Pass ‘-m 1024’ to
‘make-marionette’.

Change-Id: I82c8a0eb37c16079f1affe793afc0d8a773c62c8
---
 gnu/tests/ganeti.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/tests/ganeti.scm b/gnu/tests/ganeti.scm
index 42ed58d977..140950776e 100644
--- a/gnu/tests/ganeti.scm
+++ b/gnu/tests/ganeti.scm
@@ -117,7 +117,7 @@ (define* (run-ganeti-test hypervisor #:key
                        (gnu build marionette))
 
           (define marionette
-            (make-marionette (list #$vm)))
+            (make-marionette (list #$vm "-m" "1024")))
 
           (test-runner-current (system-test-runner #$output))
           (test-begin "ganeti")
-- 
2.48.1





Information forwarded to guix-patches@HIDDEN:
bug#77041; Package guix-patches. Full text available.

Message received at 77041 <at> debbugs.gnu.org:


Received: (at 77041) by debbugs.gnu.org; 22 Mar 2025 11:37:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 22 07:37:46 2025
Received: from localhost ([127.0.0.1]:41191 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tvxAg-0002Wl-CQ
	for submit <at> debbugs.gnu.org; Sat, 22 Mar 2025 07:37:46 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:54226)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1tvxAX-0002V3-9C
 for 77041 <at> debbugs.gnu.org; Sat, 22 Mar 2025 07:37:37 -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 <ludo@HIDDEN>)
 id 1tvxAS-0008Uv-18; Sat, 22 Mar 2025 07:37:32 -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=S+IKs4pr1pR4iSgRs+HL5omwv7CnO337JSiYV4uwBkc=; b=p8f+dxhyxcDEjlkviB3T
 jnslJOmO7vb62yVSCg1AN3b0bWA2Oia25DyNqyno1i+5ePv5U6OB83/kct8cV/V3GUgR98kXAcqo3
 glcWeIACjnjxCbWwxBga+VeO+I99ioL2tZ6+lOXtvDHxFOWTVVf0TqMnBxlDNZnxkLi3CBR2QzjYu
 suksm3n0qKuoaRwPkB5ZyaTOLm8xpdYlG4cOh0EAHkyJdhGXDFRR6FyIMQ9DArgmsNWGdKW8MwOYF
 wVcgLHGkDTu2tJQEM+S5HlIrVgas5HNankyBPGlc6l5qHSWzbYIV8N8jke5V6i16VBjX4yTXzxgYV
 tGKn89Ia2i3Opw==;
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 77041 <at> debbugs.gnu.org
Subject: [PATCH v2 10/16] tests: ganeti: Write system log to /dev/console.
Date: Sat, 22 Mar 2025 12:36:47 +0100
Message-ID: <bcd0ad2bfcb906e650c03a136a1bd6be9a3d88bd.1742642743.git.ludo@HIDDEN>
X-Mailer: git-send-email 2.48.1
In-Reply-To: <cover.1742642743.git.ludo@HIDDEN>
References: <cover.1742642743.git.ludo@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 77041
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

* gnu/tests/ganeti.scm (%ganeti-os): Wrap in
‘operating-system-with-console-syslog’.

Change-Id: Ie86ad640ad6a7c154f5768ac4250acdd0e8940af
---
 gnu/tests/ganeti.scm | 87 ++++++++++++++++++++++----------------------
 1 file changed, 44 insertions(+), 43 deletions(-)

diff --git a/gnu/tests/ganeti.scm b/gnu/tests/ganeti.scm
index ce55c8e04f..42ed58d977 100644
--- a/gnu/tests/ganeti.scm
+++ b/gnu/tests/ganeti.scm
@@ -33,54 +33,55 @@ (define-module (gnu tests ganeti)
   #:export (%test-ganeti-kvm %test-ganeti-lxc))
 
 (define %ganeti-os
-  (operating-system
-    (host-name "gnt1")
-    (timezone "Etc/UTC")
-    (locale "en_US.UTF-8")
+  (operating-system-with-console-syslog
+   (operating-system
+     (host-name "gnt1")
+     (timezone "Etc/UTC")
+     (locale "en_US.UTF-8")
 
-    (bootloader (bootloader-configuration
-                 (bootloader grub-bootloader)
-                 (targets '("/dev/vda"))))
-    (file-systems (cons (file-system
-                          (device (file-system-label "my-root"))
-                          (mount-point "/")
-                          (type "ext4"))
-                        %base-file-systems))
-    (firmware '())
+     (bootloader (bootloader-configuration
+                  (bootloader grub-bootloader)
+                  (targets '("/dev/vda"))))
+     (file-systems (cons (file-system
+                           (device (file-system-label "my-root"))
+                           (mount-point "/")
+                           (type "ext4"))
+                         %base-file-systems))
+     (firmware '())
 
-    (packages (append (list ganeti-instance-debootstrap ganeti-instance-guix)
-                      %base-packages))
+     (packages (append (list ganeti-instance-debootstrap ganeti-instance-guix)
+                       %base-packages))
 
-    ;; The hosts file must contain a nonlocal IP for host-name.
-    (essential-services
-     (modify-services (operating-system-default-essential-services this-operating-system)
-       (hosts-service-type config => (list
-                                      (host "127.0.0.1" "localhost")
-                                      (host "::1"       "localhost")))))
-    (services
-     (append (list (service static-networking-service-type
-                            (list %qemu-static-networking))
-                   (service openssh-service-type
-                            (openssh-configuration
-                             (permit-root-login 'prohibit-password)))
+     ;; The hosts file must contain a nonlocal IP for host-name.
+     (essential-services
+      (modify-services (operating-system-default-essential-services this-operating-system)
+        (hosts-service-type config => (list
+                                       (host "127.0.0.1" "localhost")
+                                       (host "::1"       "localhost")))))
+     (services
+      (append (list (service static-networking-service-type
+                             (list %qemu-static-networking))
+                    (service openssh-service-type
+                             (openssh-configuration
+                              (permit-root-login 'prohibit-password)))
 
-                   ;; In addition, the cluster name must resolve to an IP address that
-                   ;; is not currently provisioned.
-                   (simple-service 'ganeti-host-entries hosts-service-type
-                                   (list
-                                    (host "10.0.2.15" "gnt1.example.com" '("gnt1"))
-                                    (host "192.168.254.254" "ganeti.example.com")))
+                    ;; In addition, the cluster name must resolve to an IP address that
+                    ;; is not currently provisioned.
+                    (simple-service 'ganeti-host-entries hosts-service-type
+                                    (list
+                                     (host "10.0.2.15" "gnt1.example.com" '("gnt1"))
+                                     (host "192.168.254.254" "ganeti.example.com")))
 
-                   (service ganeti-service-type
-                            (ganeti-configuration
-                             (file-storage-paths '("/srv/ganeti/file-storage"))
-                             (rapi-configuration
-                              (ganeti-rapi-configuration
-                               ;; Disable TLS so we can test the RAPI without
-                               ;; pulling in GnuTLS.
-                               (ssl? #f)))
-                             (os %default-ganeti-os))))
-             %base-services))))
+                    (service ganeti-service-type
+                             (ganeti-configuration
+                              (file-storage-paths '("/srv/ganeti/file-storage"))
+                              (rapi-configuration
+                               (ganeti-rapi-configuration
+                                ;; Disable TLS so we can test the RAPI without
+                                ;; pulling in GnuTLS.
+                                (ssl? #f)))
+                              (os %default-ganeti-os))))
+              %base-services)))))
 
 (define* (run-ganeti-test hypervisor #:key
                           (master-netdev "eth0")
-- 
2.48.1





Information forwarded to guix-patches@HIDDEN:
bug#77041; Package guix-patches. Full text available.

Message received at 77041 <at> debbugs.gnu.org:


Received: (at 77041) by debbugs.gnu.org; 22 Mar 2025 11:37:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 22 07:37:46 2025
Received: from localhost ([127.0.0.1]:41189 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tvxAf-0002Wi-UM
	for submit <at> debbugs.gnu.org; Sat, 22 Mar 2025 07:37:46 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:44774)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1tvxAT-0002Uc-9p
 for 77041 <at> debbugs.gnu.org; Sat, 22 Mar 2025 07:37:33 -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 <ludo@HIDDEN>)
 id 1tvxAO-0008UU-0J; Sat, 22 Mar 2025 07:37:28 -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=ASZ5k0dIb4ZYdG0mMlz81k+mQPqwvtTufBnDwD19o1Y=; b=KKPz6NolyhO1eh1Khojp
 NpriUNVng1w5xySP9QyCSX6Ix6GTv1xuErPwvU8CEJGKaDV8UPcXS+cDzdJn5pdtkcOiUkJ9Y+rGp
 Q2wlodkRZSaELXStvz3JGtQfAXJDz0mfiEgjU/I5dyVIOTcYFVVWfM/vDqcpePmM2wu+ps6KbS+gB
 hULisgTPf1fPaEdnztNT+9A8skA0WV6rBieYZFGDiaJbjZ69ALr81t6SBR2vaF3UsqA9YAlBshYQd
 IqE/gRe75Lm9MxVXbf0UkNrIymytd6aDyUlVxHm1ICal1NlPa1uj7e6ZXWXHg3nbhrgek4FSsT6Uz
 dhRMzt5L1MGugQ==;
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 77041 <at> debbugs.gnu.org
Subject: [PATCH v2 09/16] =?UTF-8?q?tests:=20ganeti:=20Remove=20unnecessar?=
 =?UTF-8?q?y=20=E2=80=98begin=E2=80=99.?=
Date: Sat, 22 Mar 2025 12:36:46 +0100
Message-ID: <3a213dd818bf1bbd1a302162de8c2625fbfea96f.1742642743.git.ludo@HIDDEN>
X-Mailer: git-send-email 2.48.1
In-Reply-To: <cover.1742642743.git.ludo@HIDDEN>
References: <cover.1742642743.git.ludo@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 77041
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

* gnu/tests/ganeti.scm (run-ganeti-test): Remove ‘begin’ where
unnecessary.

Change-Id: I3a36fffdc797c9187b5ffa406f7a06985f18d29c
---
 gnu/tests/ganeti.scm | 31 ++++++++++++-------------------
 1 file changed, 12 insertions(+), 19 deletions(-)

diff --git a/gnu/tests/ganeti.scm b/gnu/tests/ganeti.scm
index 29eb354044..ce55c8e04f 100644
--- a/gnu/tests/ganeti.scm
+++ b/gnu/tests/ganeti.scm
@@ -154,9 +154,8 @@ (define* (run-ganeti-test hypervisor #:key
           (test-eq "watcher pause"
             0
             (marionette-eval
-             '(begin
-                (system* #$(file-append ganeti "/sbin/gnt-cluster")
-                         "watcher" "pause" "1h"))
+             '(system* #$(file-append ganeti "/sbin/gnt-cluster")
+                       "watcher" "pause" "1h")
              marionette))
 
           (test-assert "force-start wconfd"
@@ -174,8 +173,7 @@ (define* (run-ganeti-test hypervisor #:key
           (test-eq "gnt-cluster verify 1"
             0
             (marionette-eval
-             '(begin
-                (system* #$(file-append ganeti "/sbin/gnt-cluster") "verify"))
+             '(system* #$(file-append ganeti "/sbin/gnt-cluster") "verify")
              marionette))
 
           ;; Try stopping and starting daemons with daemon-util like
@@ -183,33 +181,29 @@ (define* (run-ganeti-test hypervisor #:key
           (test-eq "daemon-util stop-all"
             0
             (marionette-eval
-             '(begin
-                (system* #$(file-append ganeti "/lib/ganeti/daemon-util")
-                         "stop-all"))
+             '(system* #$(file-append ganeti "/lib/ganeti/daemon-util")
+                       "stop-all")
              marionette))
 
           (test-eq "daemon-util start-all"
             0
             (marionette-eval
-             '(begin
-                (system* #$(file-append ganeti "/lib/ganeti/daemon-util")
-                         "start-all"))
+             '(system* #$(file-append ganeti "/lib/ganeti/daemon-util")
+                       "start-all")
              marionette))
 
           ;; Check that the cluster is still healthy after the daemon restarts.
           (test-eq "gnt-cluster verify 2"
             0
             (marionette-eval
-             '(begin
-                (system* #$(file-append ganeti "/sbin/gnt-cluster") "verify"))
+             '(system* #$(file-append ganeti "/sbin/gnt-cluster") "verify")
              marionette))
 
           (test-eq "watcher continue"
             0
             (marionette-eval
-             '(begin
-                (system* #$(file-append ganeti "/sbin/gnt-cluster")
-                         "watcher" "continue"))
+             '(system* #$(file-append ganeti "/sbin/gnt-cluster")
+                       "watcher" "continue")
              marionette))
 
           ;; Try accessing the RAPI.
@@ -244,9 +238,8 @@ (define* (run-ganeti-test hypervisor #:key
           (test-eq "gnt-cluster destroy"
             0
             (marionette-eval
-             '(begin
-                (system* #$(file-append ganeti "/sbin/gnt-cluster")
-                         "destroy" "--yes-do-it"))
+             '(system* #$(file-append ganeti "/sbin/gnt-cluster")
+                       "destroy" "--yes-do-it")
              marionette))
 
           (test-end))))
-- 
2.48.1





Information forwarded to guix-patches@HIDDEN:
bug#77041; Package guix-patches. Full text available.

Message received at 77041 <at> debbugs.gnu.org:


Received: (at 77041) by debbugs.gnu.org; 22 Mar 2025 11:37:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 22 07:37:45 2025
Received: from localhost ([127.0.0.1]:41187 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tvxAf-0002WW-DP
	for submit <at> debbugs.gnu.org; Sat, 22 Mar 2025 07:37:45 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:44770)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1tvxAT-0002Ub-2H
 for 77041 <at> debbugs.gnu.org; Sat, 22 Mar 2025 07:37:33 -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 <ludo@HIDDEN>)
 id 1tvxAM-0008UD-1t; Sat, 22 Mar 2025 07:37:27 -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=J86d6wlJyiG/xFreO7hCsXLBQMr+goEI4lMG2ZhkdWs=; b=fdATpzERg3aPfMP15dJo
 HgCk4xd/uTH6ikrwRsLo8D65LfPYe/wQn15d7DNV3g+HuNjJIUR0hFJLC024PGo/J0oRr4FtDdOdu
 dIU5maZ3htAiVgC01kN7bywSQU+8WJ1cjaIwqq47DD8O9N/QKyfGhkXprDAFiuZOxucOMUCtmt0Pd
 nLsD8e95fweH2rGTp+BwDHjCsqLPkMsN//pQ6dGbxprhIMO76xYLC8fnv5aGl7NOzMILgjH5vBGEX
 P2c56OaNuD7vlTMez4ORmtuUrayTdfM3x/t9so+SLzQLUi4lnr4+wEt8l0n9ZZheUqarWr2GthRBz
 zxq8xbTvNaGKRg==;
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 77041 <at> debbugs.gnu.org
Subject: [PATCH v2 08/16] =?UTF-8?q?tests:=20Make=20=E2=80=98operating-sys?=
 =?UTF-8?q?tem-with-console-syslog=E2=80=99=20public.?=
Date: Sat, 22 Mar 2025 12:36:45 +0100
Message-ID: <0dbd5aaedd936891d115aae44dcbd4152f4a9546.1742642743.git.ludo@HIDDEN>
X-Mailer: git-send-email 2.48.1
In-Reply-To: <cover.1742642743.git.ludo@HIDDEN>
References: <cover.1742642743.git.ludo@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 77041
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

* gnu/tests/install.scm (operating-system-with-console-syslog): Move to…
* gnu/tests.scm (operating-system-with-console-syslog): … here.  New
procedure.

Change-Id: I015e24525140365d09f22127d366107fdc9ca902
---
 gnu/tests.scm         | 21 +++++++++++++++++++++
 gnu/tests/install.scm | 20 --------------------
 2 files changed, 21 insertions(+), 20 deletions(-)

diff --git a/gnu/tests.scm b/gnu/tests.scm
index 84298de448..abb7076208 100644
--- a/gnu/tests.scm
+++ b/gnu/tests.scm
@@ -53,6 +53,7 @@ (define-module (gnu tests)
 
             %simple-os
             simple-operating-system
+            operating-system-with-console-syslog
 
             system-test
             system-test?
@@ -268,6 +269,26 @@ (define-syntax-rule (simple-operating-system user-services ...)
                     (services (cons* user-services ... %base-services))))
 
 
+(define (operating-system-with-console-syslog os)
+  "Return OS with a system log service that writes to /dev/console."
+  (operating-system
+    (inherit os)
+    (services
+     (modify-services (operating-system-user-services os)
+       (shepherd-system-log-service-type
+        config
+        =>
+        (system-log-configuration
+         (inherit config)
+         (message-destination
+          #~(lambda (message)
+              (let ((destinations ((default-message-destination-procedure)
+                                   message)))
+                (if (<= (system-log-message-priority message)
+                        (system-log-priority info))
+                    (cons "/dev/console" destinations)
+                    destinations))))))))))
+
 
 ;;;
 ;;; Tests.
diff --git a/gnu/tests/install.scm b/gnu/tests/install.scm
index a837637b18..8293296339 100644
--- a/gnu/tests/install.scm
+++ b/gnu/tests/install.scm
@@ -1784,26 +1784,6 @@ (define %test-xfs-root-os
 ;;; Installation through the graphical interface.
 ;;;
 
-(define (operating-system-with-console-syslog os)
-  "Return OS with a syslog service that writes to /dev/console."
-  (operating-system
-    (inherit os)
-    (services
-     (modify-services (operating-system-user-services os)
-       (shepherd-system-log-service-type
-        config
-        =>
-        (system-log-configuration
-         (inherit config)
-         (message-destination
-          #~(lambda (message)
-              (let ((destinations ((default-message-destination-procedure)
-                                   message)))
-                (if (<= (system-log-message-priority message)
-                        (system-log-priority info))
-                    (cons "/dev/console" destinations)
-                    destinations))))))))))
-
 (define %root-password "foo")
 
 (define* (gui-test-program marionette
-- 
2.48.1





Information forwarded to guix-patches@HIDDEN:
bug#77041; Package guix-patches. Full text available.

Message received at 77041 <at> debbugs.gnu.org:


Received: (at 77041) by debbugs.gnu.org; 22 Mar 2025 11:37:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 22 07:37:45 2025
Received: from localhost ([127.0.0.1]:41183 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tvxAe-0002WK-HO
	for submit <at> debbugs.gnu.org; Sat, 22 Mar 2025 07:37:45 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:44764)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1tvxAP-0002U3-AC
 for 77041 <at> debbugs.gnu.org; Sat, 22 Mar 2025 07:37:30 -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 <ludo@HIDDEN>)
 id 1tvxAK-0008Tu-0Q; Sat, 22 Mar 2025 07:37:24 -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=Vzal9oLBSriYCLr+1tEFaevFSXuwUjZ8YKNNEjjU8ik=; b=l5E1KqcmH2VBAkh8huoX
 BM0V5wcdJvmnq9UJaW5LrlDo6fkVv6vERUrgJOufpz2xS+vP4QeEHfMBe7DCv8P8ZjpalAJxrqELM
 nuTYZEtvsRD6xTUp+jvlRQjeebOvyW5DGK8q3xapxAUWn/G6aOslpD/8nU+5gnrWJrXP+S2sSggAN
 BBaD5HLzzWPD6ghs+55xsDyAngAbhpOhqjJdTmfFw4I4nrQTK6YTU1XqEiz2WmWHd/28LL5eBlDoM
 8Oab5yjFW9jDPDCzZEqSQz2dEuxTEN1ZhPGM1sG5CL5xj05Ivvml5/dLvLmY0RSzHjkyxLrcr0mSo
 UybnTvr6t4YdYw==;
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 77041 <at> debbugs.gnu.org
Subject: [PATCH v2 07/16] services: wireguard: Turn monitoring into a Shepherd
 timer.
Date: Sat, 22 Mar 2025 12:36:44 +0100
Message-ID: <7543d6be7e2f254f824af0a2823bf2160f301670.1742642743.git.ludo@HIDDEN>
X-Mailer: git-send-email 2.48.1
In-Reply-To: <cover.1742642743.git.ludo@HIDDEN>
References: <cover.1742642743.git.ludo@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
X-Debbugs-Cc: Ludovic Courtès <ludo@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Content-Transfer-Encoding: 8bit
X-Spam-Score: -1.6 (-)
X-Debbugs-Envelope-To: 77041
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.6 (--)

* gnu/services/vpn.scm (<wireguard-configuration>)[schedule]: Change
default value.
(wireguard-monitoring-program): New procedure, with code taken from…
(wireguard-monitoring-jobs): … here.  Remove.
(wireguard-shepherd-services): New procedure, with code taken from…
(wireguard-shepherd-service): … here.  Remove.
* doc/guix.texi (VPN Services): Update.

Change-Id: I6851ddf1eb9480bdc9e6c6c6b88958ab2e6225d7
---
 doc/guix.texi        |   7 +-
 gnu/services/vpn.scm | 199 ++++++++++++++++++++++---------------------
 2 files changed, 108 insertions(+), 98 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index e194919a9d..df5378bce5 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -35749,9 +35749,10 @@ VPN Services
 name.  Set this to @code{#t} if one or more endpoints use host names
 provided by a dynamic DNS service to keep the sessions alive.
 
-@item @code{monitor-ips-interval} (default: @code{'(next-minute (range 0 60 5))})
-The time interval at which the IP monitoring job should run, provided as
-an mcron time specification (@pxref{Guile Syntax,,,mcron}).
+@item @code{monitor-ips-interval} (default: @code{"*/5 * * * *"})
+This is the monitoring schedule, expressed as a string in traditional
+cron syntax or as a gexp evaluating to a Shepherd calendar event
+(@pxref{Timers,,, shepherd, The GNU Shepherd Manual}).
 
 @item @code{private-key} (default: @code{"/etc/wireguard/private.key"})
 The private key file for the interface.  It is automatically generated
diff --git a/gnu/services/vpn.scm b/gnu/services/vpn.scm
index 3f1f8661d8..f97cbac7bb 100644
--- a/gnu/services/vpn.scm
+++ b/gnu/services/vpn.scm
@@ -34,7 +34,6 @@ (define-module (gnu services vpn)
   #:use-module (gnu services)
   #:use-module (gnu services configuration)
   #:use-module (gnu services dbus)
-  #:use-module (gnu services mcron)
   #:use-module (gnu services shepherd)
   #:use-module (gnu system shadow)
   #:use-module (gnu packages admin)
@@ -43,6 +42,7 @@ (define-module (gnu services vpn)
   #:use-module (guix packages)
   #:use-module (guix records)
   #:use-module (guix gexp)
+  #:use-module (guix diagnostics)
   #:use-module (guix i18n)
   #:use-module (guix deprecation)
   #:use-module (srfi srfi-1)
@@ -757,7 +757,7 @@ (define-record-type* <wireguard-configuration>
   (monitor-ips?           wireguard-configuration-monitor-ips? ;boolean
                           (default #f))
   (monitor-ips-interval   wireguard-configuration-monitor-ips-interval
-                          (default '(next-minute (range 0 60 5)))) ;string | list
+                          (default "*/5 * * * *"))       ;string | list
   (pre-up                 wireguard-configuration-pre-up ;list of strings
                           (default '()))
   (post-up                wireguard-configuration-post-up ;list of strings
@@ -919,117 +919,126 @@ (define (endpoint-host-names peers)
          '()
          peers)))
 
-(define (wireguard-shepherd-service config)
+(define (wireguard-monitoring-program config)
   (match-record config <wireguard-configuration>
-    (wireguard interface shepherd-requirement)
+    (interface monitor-ips-interval peers)
+    (let ((host-names (endpoint-host-names peers)))
+      (when (null? host-names)
+        (warning (G_ "'monitor-ips?' is #t but no host name to monitor~%")))
+
+      ;; Loosely based on WireGuard's own 'reresolve-dns.sh' shell script
+      ;; (see: https://raw.githubusercontent.com/WireGuard/wireguard-tools/
+      ;; master/contrib/reresolve-dns/reresolve-dns.sh).
+      (program-file
+       (format #f "wireguard-~a-monitoring" interface)
+       (with-imported-modules (source-module-closure
+                               '((gnu services herd)
+                                 (guix build utils)))
+         #~(begin
+             (use-modules (gnu services herd)
+                          (guix build utils)
+                          (ice-9 popen)
+                          (ice-9 match)
+                          (ice-9 textual-ports)
+                          (srfi srfi-1)
+                          (srfi srfi-26))
+
+             (define (resolve-host name)
+               "Return the IP address resolved from NAME."
+               (let* ((ai (car (getaddrinfo name)))
+                      (sa (addrinfo:addr ai)))
+                 (inet-ntop (sockaddr:fam sa)
+                            (sockaddr:addr sa))))
+
+             (define wg #$(file-append wireguard-tools "/bin/wg"))
+
+             #$(procedure-source strip-port/maybe)
+
+             (define service-name
+               '#$(wireguard-service-name interface))
+
+             (when (live-service-running
+                    (current-service service-name))
+               (let* ((pipe (open-pipe* OPEN_READ wg "show"
+                                        #$interface "endpoints"))
+                      (lines (string-split (get-string-all pipe)
+                                           #\newline))
+                      ;; IPS is an association list mapping
+                      ;; public keys to IP addresses.
+                      (ips (map (match-lambda
+                                  ((public-key ip)
+                                   (cons public-key
+                                         (strip-port/maybe ip))))
+                                (map (cut string-split <> #\tab)
+                                     (remove string-null?
+                                             lines)))))
+                 (close-pipe pipe)
+                 (for-each
+                  (match-lambda
+                    ((key . host-name)
+                     (let ((resolved-ip (resolve-host
+                                         (strip-port/maybe
+                                          host-name)))
+                           (current-ip (assoc-ref ips key)))
+                       (unless (string=? resolved-ip current-ip)
+                         (format #t "resetting `~a' peer \
+endpoint to `~a' due to stale IP (`~a' instead of `~a')~%"
+                                 key host-name
+                                 current-ip resolved-ip)
+                         (invoke wg "set" #$interface "peer" key
+                                 "endpoint" host-name)))))
+                  '#$host-names)))))))))
+
+(define (wireguard-shepherd-services config)
+  (match-record config <wireguard-configuration>
+    (wireguard interface monitor-ips? monitor-ips-interval shepherd-requirement)
     (let ((wg-quick (file-append wireguard "/bin/wg-quick"))
           (auto-start? (wireguard-configuration-auto-start? config))
-          (config (wireguard-configuration-file config)))
-      (list (shepherd-service
+          (config-file (wireguard-configuration-file config)))
+      (define monitoring-service
+        (and monitor-ips?
+             (shepherd-service
+              (provision (list (symbol-append
+                                (wireguard-service-name interface)
+                                '-monitoring)))
+              (requirement (list 'user-processes
+                                 (wireguard-service-name interface)))
+              (modules '((shepherd service timer)))
+              (start #~(make-timer-constructor
+                        #$(if (string? monitor-ips-interval)
+                              #~(cron-string->calendar-event
+                                 #$monitor-ips-interval)
+                              monitor-ips-interval)
+                        (command '(#$(wireguard-monitoring-program config)))
+                        #:wait-for-termination? #t))
+              (stop #~(make-timer-destructor))
+              (documentation "Monitor the Wireguard VPN tunnel.")
+              (actions (list shepherd-trigger-action)))))
+
+      (cons (shepherd-service
              (requirement `(networking user-processes ,@shepherd-requirement))
              (provision (list (wireguard-service-name interface)))
              (start #~(lambda _
-                       (invoke #$wg-quick "up" #$config)))
+                        (invoke #$wg-quick "up" #$config-file)))
              (stop #~(lambda _
-                       (invoke #$wg-quick "down" #$config)
+                       (invoke #$wg-quick "down" #$config-file)
                        #f))                       ;stopped!
-             (actions (list (shepherd-configuration-action config)))
+             (actions (list (shepherd-configuration-action config-file)))
              (auto-start? auto-start?)
-             (documentation "Run the Wireguard VPN tunnel"))))))
-
-(define (wireguard-monitoring-jobs config)
-  ;; Loosely based on WireGuard's own 'reresolve-dns.sh' shell script (see:
-  ;; https://raw.githubusercontent.com/WireGuard/wireguard-tools/
-  ;; master/contrib/reresolve-dns/reresolve-dns.sh).
-  (match-record config <wireguard-configuration>
-    (interface monitor-ips? monitor-ips-interval peers)
-    (let ((host-names (endpoint-host-names peers)))
-      (if monitor-ips?
-          (if (null? host-names)
-              (begin
-                (warn "monitor-ips? is #t but no host name to monitor")
-                '())
-              ;; The mcron monitor job may be a string or a list; ungexp strips
-              ;; one quote level, which must be added back when a list is
-              ;; provided.
-              (list
-               #~(job
-                  (if (string? #$monitor-ips-interval)
-                      #$monitor-ips-interval
-                      '#$monitor-ips-interval)
-                  #$(program-file
-                     (format #f "wireguard-~a-monitoring" interface)
-                     (with-imported-modules (source-module-closure
-                                             '((gnu services herd)
-                                               (guix build utils)))
-                       #~(begin
-                           (use-modules (gnu services herd)
-                                        (guix build utils)
-                                        (ice-9 popen)
-                                        (ice-9 match)
-                                        (ice-9 textual-ports)
-                                        (srfi srfi-1)
-                                        (srfi srfi-26))
-
-                           (define (resolve-host name)
-                             "Return the IP address resolved from NAME."
-                             (let* ((ai (car (getaddrinfo name)))
-                                    (sa (addrinfo:addr ai)))
-                               (inet-ntop (sockaddr:fam sa)
-                                          (sockaddr:addr sa))))
-
-                           (define wg #$(file-append wireguard-tools "/bin/wg"))
-
-                           #$(procedure-source strip-port/maybe)
-
-                           (define service-name '#$(wireguard-service-name
-                                                    interface))
-
-                           (when (live-service-running
-                                  (current-service service-name))
-                             (let* ((pipe (open-pipe* OPEN_READ wg "show"
-                                                      #$interface "endpoints"))
-                                    (lines (string-split (get-string-all pipe)
-                                                         #\newline))
-                                    ;; IPS is an association list mapping
-                                    ;; public keys to IP addresses.
-                                    (ips (map (match-lambda
-                                                ((public-key ip)
-                                                 (cons public-key
-                                                       (strip-port/maybe ip))))
-                                              (map (cut string-split <> #\tab)
-                                                   (remove string-null?
-                                                           lines)))))
-                               (close-pipe pipe)
-                               (for-each
-                                (match-lambda
-                                  ((key . host-name)
-                                   (let ((resolved-ip (resolve-host
-                                                       (strip-port/maybe
-                                                        host-name)))
-                                         (current-ip (assoc-ref ips key)))
-                                     (unless (string=? resolved-ip current-ip)
-                                       (format #t "resetting `~a' peer \
-endpoint to `~a' due to stale IP (`~a' instead of `~a')~%"
-                                               key host-name
-                                               current-ip resolved-ip)
-                                       (invoke wg "set" #$interface "peer" key
-                                               "endpoint" host-name)))))
-                                '#$host-names)))))))))
-          '()))))                     ;monitor-ips? is #f
+             (documentation "Run the Wireguard VPN tunnel"))
+            (or (and=> monitoring-service list)
+                '())))))
 
 (define wireguard-service-type
   (service-type
    (name 'wireguard)
    (extensions
     (list (service-extension shepherd-root-service-type
-                             wireguard-shepherd-service)
+                             wireguard-shepherd-services)
           (service-extension activation-service-type
                              wireguard-activation)
           (service-extension profile-service-type
                              (compose list
-                                      wireguard-configuration-wireguard))
-          (service-extension mcron-service-type
-                             wireguard-monitoring-jobs)))
+                                      wireguard-configuration-wireguard))))
    (description "Set up Wireguard @acronym{VPN, Virtual Private Network}
 tunnels.")))
-- 
2.48.1





Information forwarded to ludo@HIDDEN, maxim.cournoyer@HIDDEN, guix-patches@HIDDEN:
bug#77041; Package guix-patches. Full text available.

Message received at 77041 <at> debbugs.gnu.org:


Received: (at 77041) by debbugs.gnu.org; 22 Mar 2025 11:37:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 22 07:37:44 2025
Received: from localhost ([127.0.0.1]:41181 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tvxAd-0002W8-U8
	for submit <at> debbugs.gnu.org; Sat, 22 Mar 2025 07:37:44 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:44750)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1tvxAO-0002Tw-3g
 for 77041 <at> debbugs.gnu.org; Sat, 22 Mar 2025 07:37:29 -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 <ludo@HIDDEN>)
 id 1tvxAI-0008Tn-Pl; Sat, 22 Mar 2025 07:37:22 -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=CPnZxR/pohpAunTFKidIoJ7AjLUZeZDa/uHrJIQ6+gA=; b=kDneFVJOF8MzhFaHwP4t
 uukz7VeLE4gflQIKEmvXiNiIhLFcve3TiX15DEOZ8qK8ysAFjXaueYVFniRJs1Xb8I9amZAvlWeVi
 MPFDRJFlVnmxtVmDwYygSZynRBRFfvDLkjFygSfLmPDz/mSTAGptpcO2hdEG1Izta7tWLPxOwdgmY
 PxcoONj+wUNneWiDJPZWcVgNGrkxoYy3vHtX1VibCBHSCU2S8yQ43svHjCDT8kEDZaJCHdeiAp2DG
 1WTrhpXlN8GrXsfmTttR2U2o6vHPqbgV6jKhcsqMPwD33/yBB5u5GAFvb3srxAZwtj73UdXuTQddW
 F/2N3G/9lmhX+g==;
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 77041 <at> debbugs.gnu.org
Subject: [PATCH v2 06/16] services: certbot: Turn into a Shepherd timer.
Date: Sat, 22 Mar 2025 12:36:43 +0100
Message-ID: <d2560e3b7b5df04de25ab85e6c8516b8b3551f1b.1742642743.git.ludo@HIDDEN>
X-Mailer: git-send-email 2.48.1
In-Reply-To: <cover.1742642743.git.ludo@HIDDEN>
References: <cover.1742642743.git.ludo@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 77041
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

* gnu/services/certbot.scm (certbot-renewal-jobs): Rename to…
(certbot-renewal-shepherd-services): … this.  Return a list of Shepherd
services, including ‘renew-certbot-certificates’, formally defined…
(certbot-renewal-one-shot): … here.  Remove.
(certbot-service-type): Adjust accordingly.

Change-Id: I25ad9fc1277f4f6f948ab5fce7c6626f22591d10
---
 gnu/services/certbot.scm | 93 +++++++++++++++++++++-------------------
 1 file changed, 50 insertions(+), 43 deletions(-)

diff --git a/gnu/services/certbot.scm b/gnu/services/certbot.scm
index b276c49e0f..d6c7d175ff 100644
--- a/gnu/services/certbot.scm
+++ b/gnu/services/certbot.scm
@@ -27,7 +27,6 @@ (define-module (gnu services certbot)
   #:use-module (gnu services)
   #:use-module (gnu services base)
   #:use-module (gnu services shepherd)
-  #:use-module (gnu services mcron)
   #:use-module (gnu services web)
   #:use-module (gnu system shadow)
   #:use-module (gnu packages tls)
@@ -220,46 +219,56 @@ (define certbot-command
                '#$commands)
               (exit script-code))))))))
 
-(define (certbot-renewal-jobs config)
-  (list
-   ;; Attempt to renew the certificates twice per day, at a random minute
-   ;; within the hour.  See https://eff-certbot.readthedocs.io/.
-   #~(job '(next-minute-from (next-hour '(0 12)) (list (random 60)))
-          #$(certbot-command config))))
+(define (certbot-renewal-shepherd-services config)
+  (list (shepherd-service
+         (provision '(certbot-certificate-renewal))
+         (requirement '(user-processes nginx))
+         (modules '((shepherd service timer)))
+         (start #~(make-timer-constructor
+                   ;; Attempt to renew the certificates twice per day.  See
+                   ;; https://eff-certbot.readthedocs.io/.
+                   (calendar-event #:minutes '(22) #:hours '(0 12))
+                   (command '(#$(certbot-command config)))
+                   #:wait-for-termination? #t))
+         (stop #~(make-timer-destructor))
+         (documentation "Periodically run the 'certbot' command to renew X.509
+certificates.")
+         (actions
+          (list shepherd-trigger-action
+                (shepherd-configuration-action (certbot-command config)))))
 
-(define (certbot-renewal-one-shot config)
-  (list
-   ;; Renew certificates when the system first starts. This is a one-shot
-   ;; service, because the mcron configuration will take care of running this
-   ;; periodically. This is most useful the very first time the system starts,
-   ;; to overwrite our self-signed certificates as soon as possible without
-   ;; user intervention.
-   (shepherd-service
-    (provision '(renew-certbot-certificates))
-    (requirement '(nginx))
-    (one-shot? #t)
-    (start #~(lambda _
-               ;; This needs the network, but there's no reliable way to know
-               ;; if the network is up other than trying. If we fail due to a
-               ;; connection error we retry a number of times in the hope that
-               ;; the network comes up soon.
-               (let loop ((attempt 0))
-                 (let ((code (status:exit-val
-                              (system* #$(certbot-command config)))))
-                   (cond
-                    ((and (= code 2)      ; Exit code 2 means connection error
-                          (< attempt 12)) ; Arbitrarily chosen max attempts
-                     (sleep 10)           ; Arbitrarily chosen retry delay
-                     (loop (1+ attempt)))
-                    ((zero? code)
-                     ;; Success!
-                     #t)
-                    (else
-                     ;; Failure.
-                     #f))))))
-    (auto-start? #t)
-    (documentation "Call certbot to renew certificates.")
-    (actions (list (shepherd-configuration-action (certbot-command config)))))))
+        ;; Renew certificates when the system first starts. This is a one-shot
+        ;; service, because the timer above takes care of running this
+        ;; periodically.  This is most useful the very first time the system
+        ;; starts, to overwrite our self-signed certificates as soon as
+        ;; possible without user intervention.
+        (shepherd-service
+         (provision '(renew-certbot-certificates))
+         (requirement '(user-processes nginx))
+         (one-shot? #t)
+         (start #~(lambda _
+                    ;; This needs the network, but there's no reliable way to know
+                    ;; if the network is up other than trying. If we fail due to a
+                    ;; connection error we retry a number of times in the hope that
+                    ;; the network comes up soon.
+                    (let loop ((attempt 0))
+                      (let ((code (status:exit-val
+                                   (system* #$(certbot-command config)))))
+                        (cond
+                         ((and (= code 2) ; Exit code 2 means connection error
+                               (< attempt 12)) ; Arbitrarily chosen max attempts
+                          (sleep 10)          ; Arbitrarily chosen retry delay
+                          (loop (1+ attempt)))
+                         ((zero? code)
+                          ;; Success!
+                          #t)
+                         (else
+                          ;; Failure.
+                          #f))))))
+         (auto-start? #t)
+         (documentation "Run 'certbot' to renew certificates at boot time.")
+         (actions
+          (list (shepherd-configuration-action (certbot-command config)))))))
 
 (define (generate-certificate-gexp certbot-cert-directory rsa-key-size)
   (match-lambda
@@ -354,10 +363,8 @@ (define certbot-service-type
                                           (compose list certbot-configuration-package))
                        (service-extension activation-service-type
                                           certbot-activation)
-                       (service-extension mcron-service-type
-                                          certbot-renewal-jobs)
                        (service-extension shepherd-root-service-type
-                                          certbot-renewal-one-shot)))
+                                          certbot-renewal-shepherd-services)))
                 (compose concatenate)
                 (extend (lambda (config additional-certificates)
                           (certbot-configuration
-- 
2.48.1





Information forwarded to guix-patches@HIDDEN:
bug#77041; Package guix-patches. Full text available.

Message received at 77041 <at> debbugs.gnu.org:


Received: (at 77041) by debbugs.gnu.org; 22 Mar 2025 11:37:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 22 07:37:43 2025
Received: from localhost ([127.0.0.1]:41177 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tvxAd-0002Vz-AZ
	for submit <at> debbugs.gnu.org; Sat, 22 Mar 2025 07:37:43 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:44734)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1tvxAM-0002Tu-V6
 for 77041 <at> debbugs.gnu.org; Sat, 22 Mar 2025 07:37:27 -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 <ludo@HIDDEN>)
 id 1tvxAH-0008TS-Kl; Sat, 22 Mar 2025 07:37:21 -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=aZzbLgwecY8nnMYdKCGfSNoCUaCBO/u+0cJBIinqz0o=; b=I3R62rzVhH5G5wIr7POJ
 z3pInFmiT4pYH5z+sF8EVLnHB9OQMmnb0Y+yHbavqELpPyUMqaE1L94vzy+QpysJzSZS8PQMiy5va
 FmyKXAAa8fwxsLF6vDz1282rsDNB199kuIjqktejjEgSm6rwxD4raWts3LkWcJDWE/eqqRa3OtL5o
 8n3k8sgM79FTrOglBUzd/37kS65Ky0aUoSFz06XdeRFTn0niF2YcQBHI3aPVnqdwDiXN28E77atUD
 Uj7lQ1HmWYx4CytAM2DUXCqIhFPQP/QoqZj+pUd8hzW1tVgV86BhhvngD7ff2lg2lIdyOGEPEIlhQ
 j75O2lhpZ8FnKw==;
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 77041 <at> debbugs.gnu.org
Subject: [PATCH v2 05/16] services: fstrim: Turn into a Shepherd timer.
Date: Sat, 22 Mar 2025 12:36:42 +0100
Message-ID: <3e855021731ed7877824270ff0faed6a523965ca.1742642743.git.ludo@HIDDEN>
X-Mailer: git-send-email 2.48.1
In-Reply-To: <cover.1742642743.git.ludo@HIDDEN>
References: <cover.1742642743.git.ludo@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
X-Debbugs-Cc: Ludovic Courtès <ludo@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 77041
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

* gnu/services/linux.scm (mcron-time?): Remove.
(shepherd-calendar-event?): New procedure.
(fstrim-configuration)[schedule]: Change type to
‘shepherd-calendar-event’ and update docstring.
(fstrim-mcron-job): Rename to…
(fstrim-shepherd-services): … this.  Return a list of Shepherd services.
(fstrim-service-type): Adjust accordingly.
* doc/guix.texi (Linux Services): Update.

Change-Id: I9a7433cb15a1f4600470a915769d612e6e644dd8
---
 doc/guix.texi          | 14 +++++++-----
 gnu/services/linux.scm | 50 +++++++++++++++++++++++-------------------
 2 files changed, 36 insertions(+), 28 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index eb0a18eff4..e194919a9d 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -42118,6 +42118,7 @@ Linux Services
 @end defvar
 
 @c %start of fragment
+
 @deftp {Data Type} fstrim-configuration
 Available @code{fstrim-configuration} fields are:
 
@@ -42125,11 +42126,11 @@ Linux Services
 @item @code{package} (default: @code{util-linux}) (type: file-like)
 The package providing the @command{fstrim} command.
 
-@item @code{schedule} (default: @code{"0 0 * * 0"}) (type: mcron-time)
-Schedule for launching @command{fstrim}.  This can be a procedure, a
-list or a string.  For additional information, see @ref{Guile
-Syntax,,Job specification,mcron,the mcron manual}.  By default this is
-set to run weekly on Sunday at 00:00.
+@item @code{schedule} (default: @code{"0 0 * * 0"}) (type: shepherd-calendar-event)
+Schedule for launching @command{fstrim}, expressed as a string in
+traditional cron syntax or as a gexp evaluating to a Shepherd calendar
+event (@pxref{Timers,,, shepherd,The GNU Shepherd Manual}).  By default
+this is set to run weekly on Sunday at 00:00.
 
 @item @code{listed-in} (default: @code{'("/etc/fstab" "/proc/self/mountinfo")}) (type: maybe-list-of-strings)
 List of files in fstab or kernel mountinfo format.  All missing or empty
@@ -42148,7 +42149,10 @@ Linux Services
 more information).
 
 @end table
+
 @end deftp
+
+
 @c %end of fragment
 
 @cindex modprobe
diff --git a/gnu/services/linux.scm b/gnu/services/linux.scm
index b22dbeefa0..d7aee1b82e 100644
--- a/gnu/services/linux.scm
+++ b/gnu/services/linux.scm
@@ -34,7 +34,6 @@ (define-module (gnu services linux)
   #:use-module (gnu services admin)
   #:use-module (gnu services base)
   #:use-module (gnu services configuration)
-  #:use-module (gnu services mcron)
   #:use-module (gnu services shepherd)
   #:use-module (gnu packages linux)
   #:use-module (srfi srfi-1)
@@ -196,8 +195,8 @@ (define earlyoom-service-type
 ;;; fstrim
 ;;;
 
-(define (mcron-time? x)
-  (or (procedure? x) (string? x) (list? x)))
+(define (shepherd-calendar-event? x)
+  (or (string? x) (gexp? x)))
 
 (define-maybe list-of-strings (prefix fstrim-))
 
@@ -216,11 +215,11 @@ (define-configuration fstrim-configuration
     "The package providing the @command{fstrim} command."
     empty-serializer)
   (schedule
-   (mcron-time "0 0 * * 0")
-   "Schedule for launching @command{fstrim}.  This can be a procedure, a list
-or a string.  For additional information, see @ref{Guile Syntax,,
-Job specification, mcron, the mcron manual}.  By default this is set to run
-weekly on Sunday at 00:00."
+   (shepherd-calendar-event "0 0 * * 0")
+   "Schedule for launching @command{fstrim}, expressed as a string in
+traditional cron syntax or as a gexp evaluating to a Shepherd calendar
+event (@pxref{Timers,,, shepherd, The GNU Shepherd Manual}).  By default this
+is set to run weekly on Sunday at 00:00."
    empty-serializer)
   ;; The following are fstrim-related options.
   (listed-in
@@ -251,26 +250,31 @@ (define (serialize-fstrim-configuration config)
                   rcons
                   fstrim-configuration-fields))
 
-(define (fstrim-mcron-job config)
-  (match-record config <fstrim-configuration> (package schedule)
-    #~(job
-       ;; Note: The “if” below is to ensure that
-       ;; lists are ungexp'd correctly since @var{schedule}
-       ;; can be either a procedure, a string or a list.
-       #$(if (list? schedule)
-             #~'(#$@schedule)
-             schedule)
-       (lambda ()
-         (system* #$(file-append package "/sbin/fstrim")
-                  #$@(serialize-fstrim-configuration config)))
-       "fstrim")))
+(define (fstrim-shepherd-services config)
+  (match-record config <fstrim-configuration>
+    (package schedule)
+    (list (shepherd-service
+           (provision '(fstrim))
+           (requirement '(user-processes))
+           (modules '((shepherd service timer)))
+           (start #~(make-timer-constructor
+                     #$(if (string? schedule)
+                           #~(cron-string->calendar-event #$schedule)
+                           schedule)
+                     (command
+                      (list #$(file-append package "/sbin/fstrim")
+                            #$@(serialize-fstrim-configuration config)))
+                     #:wait-for-termination? #t))
+           (stop #~(make-timer-destructor))
+           (documentation "Periodically run the 'fstrim' command.")
+           (actions (list shepherd-trigger-action))))))
 
 (define fstrim-service-type
   (service-type
    (name 'fstrim)
    (extensions
-    (list (service-extension mcron-service-type
-                             (compose list fstrim-mcron-job))))
+    (list (service-extension shepherd-root-service-type
+                             fstrim-shepherd-services)))
    (description "Discard unused blocks from file systems.")
    (default-value (fstrim-configuration))))
 
-- 
2.48.1





Information forwarded to ludo@HIDDEN, maxim.cournoyer@HIDDEN, guix-patches@HIDDEN:
bug#77041; Package guix-patches. Full text available.

Message received at 77041 <at> debbugs.gnu.org:


Received: (at 77041) by debbugs.gnu.org; 22 Mar 2025 11:37:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 22 07:37:43 2025
Received: from localhost ([127.0.0.1]:41175 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tvxAc-0002Vx-QX
	for submit <at> debbugs.gnu.org; Sat, 22 Mar 2025 07:37:43 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:44726)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1tvxAL-0002Tr-Sg
 for 77041 <at> debbugs.gnu.org; Sat, 22 Mar 2025 07:37:26 -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 <ludo@HIDDEN>)
 id 1tvxAG-0008TJ-K9; Sat, 22 Mar 2025 07:37:20 -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=PgbqXgtoTexWfVBvbRDW/xq0s5T6dJftZNFqA/+l6bY=; b=HJsjDl3H5Wvc/vTcJuTy
 m0qgGkp1z0hct6fdn+v9wTkq1/68yeXKdXPY5QzItH9+Pu8vzdrQyBlNP7MmfLQuRTw0/k699yQMD
 8DIfK95J3pV87PxF1ECiDewUJphWRXbdg/9tevHs1+/l5bRikvK83HyCUW+NI7vbvG8tBWte1yMUy
 zvwj2cM20ncnDzf/s8JMU/X0keyANLOjOAPB20e2DVeBqRs1bStfAelTG7CfoT62GRPFPop+G3vaC
 yZk6Y0mXHmjL+PmHYgsrmPL14I9Dv2QzPEr2JoNAcxrx/oaBdGM59rEHDrXAB05UR5RlCTo1mFJIf
 YCF9AlXrPble+A==;
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 77041 <at> debbugs.gnu.org
Subject: [PATCH v2 04/16] services: package-database: Turn into a Shepherd
 timer.
Date: Sat, 22 Mar 2025 12:36:41 +0100
Message-ID: <6cc6ca8950931518bab8c779466cd41770abbbdf.1742642743.git.ludo@HIDDEN>
X-Mailer: git-send-email 2.48.1
In-Reply-To: <cover.1742642743.git.ludo@HIDDEN>
References: <cover.1742642743.git.ludo@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
X-Debbugs-Cc: Ludovic Courtès <ludo@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 77041
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

* gnu/services/admin.scm (package-database-mcron-jobs): Rename to…
(package-database-shepherd-services): … this.  Return a shepherd
service.
(package-database-service-type): Update accordingly.
* doc/guix.texi (File Search Services): Update documentation of the
‘schedule’ field.

Change-Id: Id7b4c5cff95a7117dca7d95af37db7389bb5ca92
---
 doc/guix.texi          |  7 ++++---
 gnu/services/admin.scm | 34 ++++++++++++++++++++++++----------
 2 files changed, 28 insertions(+), 13 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 9e3b452577..eb0a18eff4 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -27204,9 +27204,10 @@ File Search Services
 The Guix package to use.
 
 @item @code{schedule} (default: @code{%default-package-database-update-schedule})
-String or G-exp denoting an mcron schedule for the periodic
-@command{guix locate --update} job (@pxref{Guile Syntax,,, mcron,
-GNU@tie{}mcron}).
+This is the schedule of the periodic @command{guix locate --update} job,
+expressed as a string in traditional cron syntax or as a gexp evaluating
+to a Shepherd calendar event (@pxref{Timers,,, shepherd, The GNU
+Shepherd Manual}).
 
 @item @code{method} (default: @code{'store})
 Indexing method for @command{guix locate}.  The default value,
diff --git a/gnu/services/admin.scm b/gnu/services/admin.scm
index b73accc4af..e473794043 100644
--- a/gnu/services/admin.scm
+++ b/gnu/services/admin.scm
@@ -529,23 +529,37 @@ (define-configuration/no-serialization package-database-configuration
             "G-exp denoting the channels to use when updating the database
 (@pxref{Channels})."))
 
-(define (package-database-mcron-jobs configuration)
+(define (package-database-shepherd-services configuration)
   (match-record configuration <package-database-configuration>
     (package schedule method channels)
     (let ((channels (scheme-file "channels.scm" channels)))
-      (list #~(job #$schedule
-                   ;; XXX: The whole thing's running as "root" just because it
-                   ;; needs write access to /var/cache/guix/locate.
-                   (string-append #$(file-append package "/bin/guix")
-                                  " time-machine -C " #$channels
-                                  " -- locate --update --method="
-                                  #$(symbol->string method)))))))
+      (list (shepherd-service
+             (provision '(package-database-update))
+             (requirement '(user-processes guix-daemon))
+             (modules '((shepherd service timer)))
+             ;; XXX: The whole thing's running as "root" just because it needs
+             ;; write access to /var/cache/guix/locate.
+             (start #~(make-timer-constructor
+                       #$(if (string? schedule)
+                             #~(cron-string->calendar-event #$schedule)
+                             schedule)
+                       (command '(#$(file-append package "/bin/guix")
+                                  "time-machine" "-C" #$channels
+                                  "--" "locate" "--update"
+                                  #$(string-append
+                                     "--method=" (symbol->string method))))
+                       #:wait-for-termination? #t))
+             (stop #~(make-timer-destructor))
+             (documentation
+              "Periodically update the system-wide package database that can
+be queried by the 'guix locate' command.")
+             (actions (list shepherd-trigger-action)))))))
 
 (define package-database-service-type
   (service-type
    (name 'package-database)
-   (extensions (list (service-extension mcron-service-type
-                                        package-database-mcron-jobs)))
+   (extensions (list (service-extension shepherd-root-service-type
+                                        package-database-shepherd-services)))
    (description
     "Periodically update the package database used by the @code{guix locate} command,
 which lets you search for packages that provide a given file.")
-- 
2.48.1





Information forwarded to ludo@HIDDEN, maxim.cournoyer@HIDDEN, guix-patches@HIDDEN:
bug#77041; Package guix-patches. Full text available.

Message received at 77041 <at> debbugs.gnu.org:


Received: (at 77041) by debbugs.gnu.org; 22 Mar 2025 11:37:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 22 07:37:28 2025
Received: from localhost ([127.0.0.1]:41157 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tvxAO-0002Ue-9P
	for submit <at> debbugs.gnu.org; Sat, 22 Mar 2025 07:37:28 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:33540)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1tvxAK-0002Te-QH
 for 77041 <at> debbugs.gnu.org; Sat, 22 Mar 2025 07:37:25 -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 <ludo@HIDDEN>)
 id 1tvxAF-0008TB-HQ; Sat, 22 Mar 2025 07:37:19 -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=9eL9AEjaF2tnAIBILCGkih41DWt5i+SsLqMRM5LtqxM=; b=VBpHsXQiL60hu6oiOR5J
 IYPonU6bHoN7Tsww9yZK025Tc63YHOC4eVBRJ9AbbZUXWC7O7Jpec6VAu0zcP1fyZq0hRC5WMtn2L
 K3eF8Hqj8BVBE3zSjJx0QGhE00FabuexBMVeK5UhFaFvGQX4dqqkuJBb1CjBvhepVaWMM1LVzmPdP
 KbPRmrZqiRy9CSkLsldm/P1SMHL20O+Vj5A9JHYYh+fRxn1LcXFgoFY8i0pL8WfdAVuBNEzg4/22v
 akCnHO+3Aa9gTCT+532c2VyWHwT+dNoM+zyXM6K3ar8jNqgVJexc5L3IHWbSqXHQ21AXEzVz1U/2s
 DY8WjYnN9pK3PA==;
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 77041 <at> debbugs.gnu.org
Subject: [PATCH v2 03/16] services: file-database: Exclude /dev by default.
Date: Sat, 22 Mar 2025 12:36:40 +0100
Message-ID: <f15dde90cc9ae3293051c0f2e9c6fc7e43c3496f.1742642743.git.ludo@HIDDEN>
X-Mailer: git-send-email 2.48.1
In-Reply-To: <cover.1742642743.git.ludo@HIDDEN>
References: <cover.1742642743.git.ludo@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 77041
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

* gnu/services/admin.scm (%default-file-database-excluded-directories):
Add “/dev’.

Change-Id: I06af6621cd363e140a6fc49e1cee97d15b365b89
---
 gnu/services/admin.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/services/admin.scm b/gnu/services/admin.scm
index 5f5b76ffbb..b73accc4af 100644
--- a/gnu/services/admin.scm
+++ b/gnu/services/admin.scm
@@ -430,7 +430,7 @@ (define %default-file-database-excluded-directories
   ;; Regexps of directories excluded from the 'locate' database.
   (list (%store-prefix)
         "/tmp" "/var/tmp" "/var/cache" ".*/\\.cache"
-        "/run/udev"))
+        "/run/udev" "/dev"))
 
 (define (string-or-gexp? obj)
   (or (string? obj) (gexp? obj)))
-- 
2.48.1





Information forwarded to guix-patches@HIDDEN:
bug#77041; Package guix-patches. Full text available.

Message received at 77041 <at> debbugs.gnu.org:


Received: (at 77041) by debbugs.gnu.org; 22 Mar 2025 11:37:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 22 07:37:28 2025
Received: from localhost ([127.0.0.1]:41153 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tvxAN-0002UN-Ip
	for submit <at> debbugs.gnu.org; Sat, 22 Mar 2025 07:37:28 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:33528)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1tvxAJ-0002TX-My
 for 77041 <at> debbugs.gnu.org; Sat, 22 Mar 2025 07:37:24 -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 <ludo@HIDDEN>)
 id 1tvxAE-0008T3-EQ; Sat, 22 Mar 2025 07:37:18 -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=A9CsfCmB1L872i5JSIhAgCXZn/rLv0CIkxfwiPoFeOE=; b=TudasvZpViYcOlBZ6RmQ
 CDnQ9jiWFFTdstUKAxD49nnluX6PznLMt3EUyzPKFDYAdNtKbjq3bY6YgCIFds67LEn7HSmuDFQxT
 jINQ3n7679vPsNkSoy3zRErHvnCZVyHqvSL2btILKT/KUMLemjyEiPvKxw6Q2zFkapdjZh79zySyq
 Hm1C8/JeENWc5fdOfO6hIQQsTDsbzM5zUPYwpXG3ZcOuZcV4BPeA4ruk1xJoLf2dQ5cw66jeGF+OR
 M5yxurl0fvG4dplpB0YdP28FMMSMt/DWoa0pw2bXcTDdIJZq/RJ0cVurkfTuO98keN6FT891nmxow
 T5+mzmKas7S+9g==;
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 77041 <at> debbugs.gnu.org
Subject: [PATCH v2 02/16] services: file-database: Turn into a Shepherd timer.
Date: Sat, 22 Mar 2025 12:36:39 +0100
Message-ID: <3652998fa2af326e775f7aa7f63356e73e2ff6fa.1742642743.git.ludo@HIDDEN>
X-Mailer: git-send-email 2.48.1
In-Reply-To: <cover.1742642743.git.ludo@HIDDEN>
References: <cover.1742642743.git.ludo@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
X-Debbugs-Cc: Ludovic Courtès <ludo@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 77041
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

* gnu/services/admin.scm (file-database-mcron-jobs): Rename to…
(file-database-shepherd-services): … this.  Return a list of Shepherd
services.
(file-database-service-type): Adjust accordingly.
* doc/guix.texi (File Search Services): Update documentation of
‘schedule’.

Change-Id: I5734c629b113e54057694d2ec480abd26b7815db
---
 doc/guix.texi          |  5 +++--
 gnu/services/admin.scm | 22 ++++++++++++++++++----
 2 files changed, 21 insertions(+), 6 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 0adc6f8c65..9e3b452577 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -27162,8 +27162,9 @@ File Search Services
 is taken.
 
 @item @code{schedule} (default: @code{%default-file-database-update-schedule})
-String or G-exp denoting an mcron schedule for the periodic
-@command{updatedb} job (@pxref{Guile Syntax,,, mcron, GNU@tie{}mcron}).
+This is the schedule of database updates, expressed as a string in
+traditional cron syntax or as a gexp evaluating to a Shepherd calendar
+event (@pxref{Timers,,, shepherd, The GNU Shepherd Manual}).
 
 @item @code{excluded-directories} (default @code{%default-file-database-excluded-directories})
 List of regular expressions of directories to ignore when building the
diff --git a/gnu/services/admin.scm b/gnu/services/admin.scm
index 726ca5f918..5f5b76ffbb 100644
--- a/gnu/services/admin.scm
+++ b/gnu/services/admin.scm
@@ -462,7 +462,7 @@ (define-configuration/no-serialization file-database-configuration
 guix locate}).  This list is passed to the @option{--prunepaths} option of
 @command{updatedb} (@pxref{Invoking updatedb,,, find, GNU@tie{}Findutils})."))
 
-(define (file-database-mcron-jobs configuration)
+(define (file-database-shepherd-services configuration)
   (match-record configuration <file-database-configuration>
     (package schedule excluded-directories)
     (let ((updatedb (program-file
@@ -481,13 +481,27 @@ (define (file-database-mcron-jobs configuration)
                                 #$(string-append "--prunepaths="
                                                  (string-join
                                                   excluded-directories)))))))
-      (list #~(job #$schedule #$updatedb)))))
+      (list (shepherd-service
+             (provision '(file-database-update))
+             (requirement '(user-processes))
+             (modules '((shepherd service timer)))
+             (start #~(make-timer-constructor
+                       #$(if (string? schedule)
+                             #~(cron-string->calendar-event #$schedule)
+                             schedule)
+                       (command '(#$updatedb))
+                       #:wait-for-termination? #t))
+             (stop #~(make-timer-destructor))
+             (documentation
+              "Periodically update the system-wide file database that can be
+queried by the 'locate' command.")
+             (actions (list shepherd-trigger-action)))))))
 
 (define file-database-service-type
   (service-type
    (name 'file-database)
-   (extensions (list (service-extension mcron-service-type
-                                        file-database-mcron-jobs)))
+   (extensions (list (service-extension shepherd-root-service-type
+                                        file-database-shepherd-services)))
    (description
     "Periodically update the file database used by the @command{locate} command,
 which lets you search for files by name.  The database is created by running
-- 
2.48.1





Information forwarded to ludo@HIDDEN, maxim.cournoyer@HIDDEN, guix-patches@HIDDEN:
bug#77041; Package guix-patches. Full text available.

Message received at 77041 <at> debbugs.gnu.org:


Received: (at 77041) by debbugs.gnu.org; 22 Mar 2025 11:37:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 22 07:37:27 2025
Received: from localhost ([127.0.0.1]:41149 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tvxAM-0002UL-Sv
	for submit <at> debbugs.gnu.org; Sat, 22 Mar 2025 07:37:27 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:33524)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1tvxAF-0002TS-S5
 for 77041 <at> debbugs.gnu.org; Sat, 22 Mar 2025 07:37:20 -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 <ludo@HIDDEN>)
 id 1tvxAA-0008Sv-Cz; Sat, 22 Mar 2025 07:37:14 -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=kKFwC/YhTb7T7zwFlaAjiepVG764iIJVG4MkOXfEuV8=; b=FZhOE8tjeGKfyiyEx2Sc
 tDHiLTf4m+W5B4kNQNIQhEU1wt8p7GF+GYVQFGQmjq3Uru28xsGQ1TfwyD6xdRb1BXLzHUCGTiukQ
 tqyevyuhjuvI/+6FWe9aB6HOJ7ogdrC6M1BQnWQ9BBapS+tHnX6TsMuyVClH7nwzvtwECKJ9nBjCB
 qO3sBQ/d3K58a5i9bnmt3B9MzN37T/LEtcJojDL/H4mHOkP9diCuUoSyWAzi1lPXZyzpNaQ1X85hQ
 KtZsn019cIqRM5yTzCdkMFJVev1NOw49y+iKpZKxcfGuDdBQ5ybTw8cIVgn2H4RU1xV9SaDfC4DG+
 64yzxhHjEbf4bQ==;
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 77041 <at> debbugs.gnu.org
Subject: [PATCH v2 01/16] =?UTF-8?q?services:=20shepherd:=20Factorize=20?=
 =?UTF-8?q?=E2=80=98trigger=E2=80=99=20action.?=
Date: Sat, 22 Mar 2025 12:36:38 +0100
Message-ID: <3aa2a59b21ca35f4821768248914c85f77ab4868.1742642743.git.ludo@HIDDEN>
X-Mailer: git-send-email 2.48.1
In-Reply-To: <cover.1742642743.git.ludo@HIDDEN>
References: <cover.1742642743.git.ludo@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
X-Debbugs-Cc: Andrew Tropin <andrew@HIDDEN>, Janneke Nieuwenhuizen <janneke@HIDDEN>, Ludovic Courtès <ludo@HIDDEN>, Tanguy Le Carrour <tanguy@HIDDEN>
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 77041
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

* gnu/services/shepherd.scm (shepherd-trigger-action): New variable.
* gnu/services/admin.scm (log-cleanup-shepherd-services)
(unattended-upgrade-shepherd-services): Use it.
* gnu/services/backup.scm (restic-backup-job->shepherd-service): Use it.
* gnu/home/services/shepherd.scm: Re-export ‘shepherd-trigger-action’.

Change-Id: I834b5b9b61c78f012ee9306df6cf4fd8a93dd6d2
---
 gnu/home/services/shepherd.scm |  3 ++-
 gnu/services/admin.scm         | 10 ++--------
 gnu/services/backup.scm        |  6 +-----
 gnu/services/shepherd.scm      |  8 ++++++++
 4 files changed, 13 insertions(+), 14 deletions(-)

diff --git a/gnu/home/services/shepherd.scm b/gnu/home/services/shepherd.scm
index b2b141d4de..25f1641b32 100644
--- a/gnu/home/services/shepherd.scm
+++ b/gnu/home/services/shepherd.scm
@@ -52,7 +52,8 @@ (define-module (gnu home services shepherd)
                shepherd-service-modules
 
                shepherd-action
-               shepherd-configuration-action))
+               shepherd-configuration-action
+               shepherd-trigger-action))
 
 (define-record-type* <home-shepherd-configuration>
   home-shepherd-configuration make-home-shepherd-configuration
diff --git a/gnu/services/admin.scm b/gnu/services/admin.scm
index 2a11a4f4f1..726ca5f918 100644
--- a/gnu/services/admin.scm
+++ b/gnu/services/admin.scm
@@ -404,10 +404,7 @@ (define (log-cleanup-shepherd-services configuration)
                              schedule)
                        (command '(#$program))))
              (stop #~(make-timer-destructor))
-             (actions (list (shepherd-action
-                             (name 'trigger)
-                             (documentation "Trigger log cleanup.")
-                             (procedure #~trigger-timer))))
+             (actions (list shepherd-trigger-action))
              (documentation "Periodically delete old log files."))))))
 
 (define log-cleanup-service-type
@@ -671,10 +668,7 @@ (define (unattended-upgrade-shepherd-services config)
                    ;; again.
                    #:wait-for-termination? #t))
          (stop #~(make-timer-destructor))
-         (actions (list (shepherd-action
-                         (name 'trigger)
-                         (documentation "Trigger unattended system upgrade.")
-                         (procedure #~trigger-timer)))))))
+         (actions (list shepherd-trigger-action)))))
 
 (define unattended-upgrade-service-type
   (service-type
diff --git a/gnu/services/backup.scm b/gnu/services/backup.scm
index 4d8cf167f0..6e066bd3d6 100644
--- a/gnu/services/backup.scm
+++ b/gnu/services/backup.scm
@@ -255,11 +255,7 @@ (define (restic-backup-job->shepherd-service config)
                                                 max-duration)))
                       (stop
                        #~(make-timer-destructor))
-                      (actions (list (shepherd-action
-                                      (name 'trigger)
-                                      (documentation "Manually trigger a backup,
-without waiting for the scheduled time.")
-                                      (procedure #~trigger-timer)))))))
+                      (actions (list shepherd-trigger-action)))))
 
 (define (restic-guix-wrapper-package jobs)
   (package
diff --git a/gnu/services/shepherd.scm b/gnu/services/shepherd.scm
index 65c49b9c59..e7e414b920 100644
--- a/gnu/services/shepherd.scm
+++ b/gnu/services/shepherd.scm
@@ -72,6 +72,7 @@ (define-module (gnu services shepherd)
             shepherd-action-procedure
 
             shepherd-configuration-action
+            shepherd-trigger-action
 
             %default-modules
 
@@ -404,6 +405,13 @@ (define (shepherd-configuration-action file)
                   (format #t "~a~%" #$file)
                   #$file))))
 
+(define shepherd-trigger-action
+  ;; Action to trigger a timer.
+  (shepherd-action
+   (name 'trigger)
+   (documentation "Trigger immediate execution of this timer.")
+   (procedure #~trigger-timer)))
+
 (define (shepherd-configuration-file services shepherd)
   "Return the shepherd configuration file for SERVICES.  SHEPHERD is used
 as shepherd package."
-- 
2.48.1





Information forwarded to andrew@HIDDEN, janneke@HIDDEN, ludo@HIDDEN, tanguy@HIDDEN, guix-patches@HIDDEN:
bug#77041; Package guix-patches. Full text available.

Message received at 77041 <at> debbugs.gnu.org:


Received: (at 77041) by debbugs.gnu.org; 22 Mar 2025 11:37:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 22 07:37:20 2025
Received: from localhost ([127.0.0.1]:41141 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tvxAG-0002Tg-As
	for submit <at> debbugs.gnu.org; Sat, 22 Mar 2025 07:37:20 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:33510)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1tvxAE-0002TQ-Gr
 for 77041 <at> debbugs.gnu.org; Sat, 22 Mar 2025 07:37:19 -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 <ludo@HIDDEN>)
 id 1tvxA8-0008Sk-4c; Sat, 22 Mar 2025 07:37:12 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to:
 references; bh=GvFqGssZzp7JkI8ZZRs3Aa70mAxUy8Nyc/7MRKQrgqk=; b=JHcKWGprSL+fW0
 fssKspUKufIOTjhv8I7uxnmDcMPA8DB0cnA0B/0W0WpKhsReta7Kb1m+KwgpuVznXcdgp+rz7Ywlx
 o2L4vV0tsPr4KDedG2D20DOYYYQWCzwmOcHcZ27jeGH7POcpTc+D4zrSivAzca2B4eM2YWKSWgcvO
 IXQTuIJgJzQLGCxBWFghD4/pzmq9gfqXqWnzssBeL4DjC5td4NUm9lRwuSSo7goR0HAFvAhXXuW1v
 mKcGBFx0m3rZLdR1hHx9ijbo0a3QgavWX/7+lvEbyJR+8L2qvi6vraaBGZhqKWYqyXRCXsgrD9oTG
 CZozA1D8EbXpL38Ll4UQ==;
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 77041 <at> debbugs.gnu.org
Subject: [PATCH v2 00/16] Replacing mcron jobs by Shepherd timers
Date: Sat, 22 Mar 2025 12:36:37 +0100
Message-ID: <cover.1742642743.git.ludo@HIDDEN>
X-Mailer: git-send-email 2.48.1
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
X-Debbugs-Cc: Ludovic Courtès <ludo@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 77041
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hello Guix,

Here are the changes since v1:

  • Remove mcron deprecation and associated news entry.

  • Document timers and give examples under “Scheduled Job
    Execution” and “Shepherd Home Service”.  Recommend use
    of Shepherd timers rather than mcron.

  • Add ‘shepherd-timer’ procedure to reduce boilerplate, as
    suggested by Luis Guilherme Coelho.

  • Reintroduce missing quote in fstrim documentation.

Thoughts?

Ludo’.

Ludovic Courtès (16):
  services: shepherd: Factorize ‘trigger’ action.
  services: file-database: Turn into a Shepherd timer.
  services: file-database: Exclude /dev by default.
  services: package-database: Turn into a Shepherd timer.
  services: fstrim: Turn into a Shepherd timer.
  services: certbot: Turn into a Shepherd timer.
  services: wireguard: Turn monitoring into a Shepherd timer.
  tests: Make ‘operating-system-with-console-syslog’ public.
  tests: ganeti: Remove unnecessary ‘begin’.
  tests: ganeti: Write system log to /dev/console.
  tests: ganeti: Increase VM memory size.
  services: ganeti: Update to Shepherd 1.0 interface.
  services: ganeti: Produce Shepherd timers instead of mcron jobs.
  services: virtual-build-machine: Turn GC job into a Shepherd timer.
  services: shepherd: Add ‘shepherd-timer’.
  doc: Document Shepherd timers and recommend against mcron.

 doc/guix.texi                   | 208 ++++++++++++++++++++++++++++----
 gnu/home/services/shepherd.scm  |   4 +-
 gnu/services/admin.scm          |  68 +++++++----
 gnu/services/backup.scm         |   6 +-
 gnu/services/certbot.scm        |  93 +++++++-------
 gnu/services/ganeti.scm         | 135 ++++++++++-----------
 gnu/services/linux.scm          |  50 ++++----
 gnu/services/shepherd.scm       |  34 ++++++
 gnu/services/virtualization.scm |  22 +++-
 gnu/services/vpn.scm            | 199 +++++++++++++++---------------
 gnu/tests.scm                   |  21 ++++
 gnu/tests/ganeti.scm            | 120 +++++++++---------
 gnu/tests/install.scm           |  20 ---
 13 files changed, 607 insertions(+), 373 deletions(-)


base-commit: efac1498c15198afc4f9a2bc700408bde1b3b3ed
-- 
2.48.1





Information forwarded to ludo@HIDDEN, maxim.cournoyer@HIDDEN, guix-patches@HIDDEN:
bug#77041; Package guix-patches. Full text available.

Message received at 77041 <at> debbugs.gnu.org:


Received: (at 77041) by debbugs.gnu.org; 17 Mar 2025 08:18:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 17 04:18:45 2025
Received: from localhost ([127.0.0.1]:55028 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tu5gL-0005Tg-4o
	for submit <at> debbugs.gnu.org; Mon, 17 Mar 2025 04:18:45 -0400
Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]:48197)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <sarg@HIDDEN>) id 1tu5gI-0005Sa-E6
 for 77041 <at> debbugs.gnu.org; Mon, 17 Mar 2025 04:18:43 -0400
Received: by mail-ej1-x62e.google.com with SMTP id
 a640c23a62f3a-abec8b750ebso754705766b.0
 for <77041 <at> debbugs.gnu.org>; Mon, 17 Mar 2025 01:18:42 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=sarg.org.ru; s=google; t=1742199516; x=1742804316; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:message-id:date:user-agent
 :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to;
 bh=te45ojA0IBnR6XB9vnROTX+h2c2igf2jn61vtBBhCeI=;
 b=hiWB6VVc6CdPNAEUe8TuTdjDP+4qDRir2py/qIbFzdTugzKVdB/qvtXEB24dUsyqHV
 oCj4zquhmxlJGGpivUnDfVOx+bwpeEYCZi5JE9YOB2VzJmsF2ZdYGCdsEfS4/lt9QUFO
 KHDAyzdXgNLZsX4mp0jbPpITpvBIQ0p7nPhOkJ2akXZEJZGUYGIihKpo0uQjb9XrIvD7
 6hKnHFil1wBEf3F+PVkEvGMqS9asiGd7bvSrdWaNLgru4TuXx/twerLVT/M+OZtrrbG9
 cjn6/+bjhrRmdUk8KmDWjbc62dvrZOIn6TWKi29soGUqrPUuacK7kJA+5pJ2l7suEFQi
 svdQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1742199516; x=1742804316;
 h=content-transfer-encoding:mime-version:message-id:date:user-agent
 :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date
 :message-id:reply-to;
 bh=te45ojA0IBnR6XB9vnROTX+h2c2igf2jn61vtBBhCeI=;
 b=qDXoObWvUmSJDq9lVlek9/IKffCOvd7GHFFgyNLOIrppfTVAY6aXrKErjhK8U2zL2w
 2NQsyuAUj/5G5I/CfbqJiGLtn9s57zYo69eh6UWCswDW0hi64RTpFLk2QPTlj0Tc7iz8
 EB44LjVmOFMf9lCwiMGimmekZ/9yjxwgVsTz/wyazU3+qMhvBHuAtQYWGSkPakC/f1pR
 nrPqb8s7LkoJEhEQLbXjzrvCyxcPPNKCmd/KPhm/+CKkz/cyxC7+djLaHM9KOg59l9hv
 CZFrP4fcyjH92SI0a1QJowucdUZNOuU9U3qs2tQxkvy2x34viPMCoz7aJmgf8t8gm8p3
 CTFA==
X-Gm-Message-State: AOJu0Ywkac9roO4SGS3bPDxYcrEjg3BBdHvkOu2odpS0FWIkkCxY9mzj
 6QuW19thZLYVUq9XBCAk534GihFGZOkAr3gDO+rsWJqKjmyvM93vtW7J1ckuCrU=
X-Gm-Gg: ASbGncthKwMPk2fbpgGxr6mWAyWFjj4TxSSf8bjdhSHiDFjkN+9driVXMbWwmp9TRuY
 gKhnuopS2k2nsYPJK1yxZqIXJLjocZIQHIGFYnkDcl2019m4hfTrjEep4gxt6+oEeLEofpem0Ys
 /ZyPRNLhkrBSR6e6Iuy4VlDuJe51dOgTjWakn+CGG4+pYct5RWRWdsicWevVHMLuCLBbNAjDJs1
 6NYC0BPlm9s/+sJEXcewU3i639RyNQNfTR0z7V2mK+Ub8d5FGEj9b/c72N/9jHPdfumkuEZNp99
 RBCUa/yMk0EyrcMpvpBYoOx5glm8AQE4yZeWt4Rk
X-Google-Smtp-Source: AGHT+IFj2kDyZYK6KZUNgvhUl1n4dqrKZeUx1PEqSjq3etANiCOaybEnrN+1Q32Krwqj3nWbgNndcA==
X-Received: by 2002:a17:907:7241:b0:ac1:f162:fb0d with SMTP id
 a640c23a62f3a-ac3303b6deemr1297588866b.37.1742199516045; 
 Mon, 17 Mar 2025 01:18:36 -0700 (PDT)
Received: from thinkpad ([2a02:2454:a0a5:2400:a64e:31ff:fe38:fd6c])
 by smtp.gmail.com with ESMTPSA id
 4fb4d7f45d1cf-5e8169b04e5sm5733473a12.35.2025.03.17.01.18.35
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 17 Mar 2025 01:18:35 -0700 (PDT)
From: Sergey Trofimov <sarg@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: [bug#77041] [PATCH 00/16] Replacing mcron jobs by Shepherd timers
User-Agent: mu4e 1.12.9; emacs 30.0.92
Date: Mon, 17 Mar 2025 09:18:34 +0100
Message-ID: <87tt7sxe79.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.7 (/)
X-Debbugs-Envelope-To: 77041
Cc: Julien Lepiller <julien@HIDDEN>, 77041 <at> debbugs.gnu.org,
 Florian Pelz <pelzflorian@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.3 (/)

Hi Ludovic,

Ludovic Courtès <ludo@HIDDEN> writes:

> Hello,
>
> This is the last step of the Shepherd 1.0 transition, leading
> to the deprecation of mcron, superseded by Shepherd timers.
>
> Thoughts?
>

Chiming in unrelated to the proposed changes. Neither mcron nor shepherd
timers work correctly on machines that spend time asleep (e.g. laptops).
It makes backup / fstrim / log rotation schedules unreliable and
therefore forces the user to look for alternatives. I currently use
`supercron` - https://github.com/igankevich/supercron.




Information forwarded to guix-patches@HIDDEN:
bug#77041; Package guix-patches. Full text available.

Message received at 77041 <at> debbugs.gnu.org:


Received: (at 77041) by debbugs.gnu.org; 17 Mar 2025 03:43:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 16 23:43:55 2025
Received: from localhost ([127.0.0.1]:52721 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tu1OM-0005rd-Df
	for submit <at> debbugs.gnu.org; Sun, 16 Mar 2025 23:43:55 -0400
Received: from smtpmciv3.myservices.hosting ([185.26.107.239]:50994)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <mirai@HIDDEN>) id 1tu1OI-0005qw-WC
 for 77041 <at> debbugs.gnu.org; Sun, 16 Mar 2025 23:43:51 -0400
Received: from mail1.netim.hosting (unknown [185.26.106.172])
 by smtpmciv3.myservices.hosting (Postfix) with ESMTP id 63C91208DE;
 Mon, 17 Mar 2025 04:43:48 +0100 (CET)
Received: from localhost (localhost [127.0.0.1])
 by mail1.netim.hosting (Postfix) with ESMTP id A91FE80097;
 Mon, 17 Mar 2025 04:43:47 +0100 (CET)
X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting
Received: from mail1.netim.hosting ([127.0.0.1])
 by localhost (mail1-1.netim.hosting [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id p08pX4eXI_WH; Mon, 17 Mar 2025 04:43:47 +0100 (CET)
Received: from [192.168.1.239] (unknown [10.192.1.83])
 (Authenticated sender: lumen@HIDDEN)
 by mail1.netim.hosting (Postfix) with ESMTPSA id 03ECE80094;
 Mon, 17 Mar 2025 04:43:46 +0100 (CET)
Message-ID: <2e961821-d36b-4737-8894-b9b95d9fde77@HIDDEN>
Date: Mon, 17 Mar 2025 03:43:46 +0000
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [bug#77041] [PATCH 16/16] DRAFT news: Add entry for mcron
 deprecation.
To: =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>,
 "pelzflorian (Florian Pelz)" <pelzflorian@HIDDEN>
References: <cover.1742073920.git.ludo@HIDDEN>
 <218d5ad8274680771591e5d940dcc7b7e7c0aafd.1742073920.git.ludo@HIDDEN>
 <87y0x5jp99.fsf@HIDDEN> <87o6y0oq7h.fsf@HIDDEN>
Content-Language: en-US
From: Bruno Victal <mirai@HIDDEN>
In-Reply-To: <87o6y0oq7h.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 77041
Cc: Julien Lepiller <julien@HIDDEN>, 77041 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi Ludo=E2=80=99,

On 2025-03-16 17:11, Ludovic Court=C3=A8s wrote:
> "pelzflorian (Florian Pelz)" <pelzflorian@HIDDEN> skribis:
>>
>> For fstrim, you also removed the quoting ' of lists:
>> -@item @code{listed-in} (default: @code{'("/etc/fstab" "/proc/self/mou=
ntinfo")}) (type: maybe-list-of-strings)
>> +@item @code{listed-in} (default: @code{("/etc/fstab" "/proc/self/moun=
tinfo")}) (type: maybe-list-of-strings)
>=20
> This was generated by:
>=20
>   (configuration->documentation 'fstrim-configuration)
>=20
> I was surprised also by the lack of quote but I suspected this had been=

> discussed before and implemented in =E2=80=98define-configuration=E2=80=
=99.  If not, we
> should report a bug for that.

You didn't do anything wrong, this is a current bug/limitation of
configuration->documentation, I added those quotes manually when I
generated the documentation for that service.

--=20
Cheers,
Bruno.





Information forwarded to guix-patches@HIDDEN:
bug#77041; Package guix-patches. Full text available.

Message received at 77041 <at> debbugs.gnu.org:


Received: (at 77041) by debbugs.gnu.org; 16 Mar 2025 21:24:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 16 17:24:39 2025
Received: from localhost ([127.0.0.1]:51021 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ttvTK-0004A3-DZ
	for submit <at> debbugs.gnu.org; Sun, 16 Mar 2025 17:24:39 -0400
Received: from wolfsden.cz ([37.205.8.62]:58862)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1ttvT5-00048D-6c
 for 77041 <at> debbugs.gnu.org; Sun, 16 Mar 2025 17:24:25 -0400
Received: by wolfsden.cz (Postfix, from userid 104)
 id 336FF37B1D6; Sun, 16 Mar 2025 21:24:22 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail;
 t=1742160262; bh=k16xLn/9BfBMq8nH568oX31ZyVVjlzg99X8wzrxxCOY=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=EeYw0I6V2LSQ+Lxmk8Gj6jif/V/uRO/MqAwdM/qePhCyvusRcd0uo8oXazfSzVzKD
 dZvelGQHDJGen3j+Mb3ZiPKHRktLz1gh4AJF2LDoUF+hN7p9Wa0ll1CGabMPC2WyQW
 hCYBANfBSxGclZjwV5qvAltIJvfr9GdjBDb2ga1wxiQ7KPPiOJJ1rD84coLYURyXsr
 AvxO6imiAkogttJ3TJC6LhVjc8Dbis7mkSHiXxcxwsUfbA/QFGAYVLc5e94cqbr+Al
 7TticznZH3Z0T3G8g1fhpHGXjmfiZLHWSibhoQOaHjX0VKTpxm/N3gKXvwee1A26i/
 eChQHpoXEjoSFIGD5zH79Qte13zgQguh4wNf89kOeQSANbxMw325zN+4x8HZsbNDsK
 l3tOwssZE9RDKZkaGkC2ysqw5pi/MnD0bug1DsfMhpKh3mH5JbS2d4v8jLzf3OLv0O
 jVJyJsHhUKc6E6pY7MKguCAz4fSsiDnxTsk+kMvseuoOZLHn0c10b7U3zPob0lODmp
 jHNihoBc3cWfOajf4kJFEESzDRUpWGILRivnuDKn3MKjnvczpR7PQjxKamQpdK9xKS
 z117cy/FAIKh7i7eMWbc3Zx1ziV95LPWwan9FtA4Eo2UB7EMi/k+sykM6HeRhP+ulU
 Hv7z8I8eTBqOkMvuZUYDa9SI=
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on wolfsden
X-Spam-Level: 
X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,BAYES_00,
 DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_BLOCKED
 autolearn=unavailable autolearn_force=no version=3.4.6
Received: from localhost (unknown [128.0.188.242])
 by wolfsden.cz (Postfix) with ESMTPSA id 64BAA37B829;
 Sun, 16 Mar 2025 21:24:20 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail;
 t=1742160260; bh=k16xLn/9BfBMq8nH568oX31ZyVVjlzg99X8wzrxxCOY=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=NPB+B1MGsuB+oQbo3p8Qs2zIa7FI5ZsH5A3Y/UkdCzMQbaou+Ot9h4PeLBA69M8sv
 jglnOxXy11VSiqdx0f0q3/CHWYbBOq/z7EewriZ+MRHuoYmHtN9uzLEFOl/yz9YJYK
 FxC0GO947n1zTODFWLeQhmQgNBKt/9v+9aX4U8WCj7191e9qo6xNETduQlDzKLmGQA
 yh7LjYMsPQ57lC0ADOU1gxbCg2rXEN1XecY5nDUSlyyVfh+QFGk7DJPDZRdEHSSDbb
 XU2XtFD/uAMROzWxnogcMH8mQMaP/NPispxTcpi6F75uYa13vv4AAc5nH9YWM/y2yR
 krplco5i+twb1KaPaNU0+k1/AHT3JNZefl722nc98TU3sMRM1qQNBPC9ru8WrMn/W6
 FIn1SB1LBUslOvQd6W36ykmaQ8bumRETdJZItek2gTDCLwSPhOKujlE9nNHhr/urkd
 4CU2FNhgNDIjH6EFOvrHpoc4UfsToP3fYjP8Htzxn79vbUapKBDPajXbSrY3YgA+Y+
 2A45FHsWWBTDjVLsUytarSqAFTIm0Kvpb/f6FGzk7NoX9888Wx/DwDihxJ5WaLwD0x
 uhEdQLHYFsJh3br14zWCtlD2DQ0a75aIdwSsKLii3JZWd/Uy61qyzHK4Je1J0lEU6G
 zfS+WM4YRQ+D5MBtLZZnqFvU=
From: Tomas Volf <~@wolfsden.cz>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: [bug#77041] [PATCH 15/16] services: mcron: Deprecate.
In-Reply-To: <87zfhknb58.fsf@HIDDEN> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?=
 =?utf-8?Q?s?= message of "Sun, 16 Mar 2025 18:22:27 +0100")
References: <cover.1742073920.git.ludo@HIDDEN>
 <9c83cf458fc508990a834cecac3f9d8cbd74df87.1742073920.git.ludo@HIDDEN>
 <87o6y1uiee.fsf@HIDDEN> <87zfhknb58.fsf@HIDDEN>
Date: Sun, 16 Mar 2025 22:24:20 +0100
Message-ID: <875xk8vfcr.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 77041
Cc: 77041 <at> debbugs.gnu.org, Andrew Tropin <andrew@HIDDEN>,
 Tanguy Le Carrour <tanguy@HIDDEN>,
 Maxim Cournoyer <maxim.cournoyer@HIDDEN>,
 Janneke Nieuwenhuizen <janneke@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Ludovic Court=C3=A8s <ludo@HIDDEN> writes:

> Tomas Volf <~@wolfsden.cz> skribis:
>
>> Ludovic Court=C3=A8s <ludo@HIDDEN> writes:
>>
>>> +@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
>>> +
>>
>> Currently timers lack the ability to send email with the cron output,
>> something mcron can do.  Is that something you plan to address
>
> No.  :-)
>
> I think it=E2=80=99s more convenient, more flexible, and safer to impleme=
nt as a
> higher-level mechanism, like you did in your personal services IIRC.
>
> WDYT?

Yeah, I think that is a reasonable approach. ^_^

Tomas

=2D-=20
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQJCBAEBCgAsFiEEt4NJs4wUfTYpiGikL7/ufbZ/wakFAmfXQYQOHH5Ad29sZnNk
ZW4uY3oACgkQL7/ufbZ/wakEeA//Q6lWn+QRI4viy3GuSILTKN8xqrXsVIn+Ls1b
fOmcs3DaXE2CGxMNomap4l0jG2gXP8sfLAKpieVYZdIdF/ktrRC19vwF5MDEQ6Vt
RSyVJRqbqHx5fjNymOdWJmSR6mjMaI1meVM6YsUa+Oa5IJf0g2YZZQDTstVok/5E
ptYHqPvXrzLMcXWBnKN3pnzAJ9q85bmMzgVMeyom3au/kUHDM2TrNw1UOYq0w914
L06NPf9y6pEDw4B0vXEAehM/HKAcQTF3oE1uOonyEYY4STiY2MOszfljFYWcDI6d
VThz3yGwKRgaFwK0s+cynyOpLKvf8QZP7BUr3yhOMCancBiHvLqt1/NwMTOawN8+
gdB6kYQ6V/CacPu2VX6q9qCy8axI4yjUR1VDsRP0ah5WCxFpxv2iKZsY8GDJ/dgU
nXi6WBGor1MwxynyIwt21DqVSpTe0d5PLJzLaykIyeKGWKQkewQNWpCCtR4LtBmB
8WE4QJ5T1MYzLYpJzpr/9kyf7rQLMJ0kyRYJ+SZgT5z6YlYDP5Ut6JF9ctkO6t4B
iQ+OYzbtvRUoZqayrGlw9i8pLrW/H4WRBS9lSVOwP+VkfSn1AqL78yYpXKeM0/ai
5GBGgVdOx6SkAYtFlV4T9/9/lA2aM3VoYZpKb6dhmD0uXYBHG6wD1AhjC0XM/7/W
LH1nZk8=
=fmgp
-----END PGP SIGNATURE-----
--=-=-=--




Information forwarded to guix-patches@HIDDEN:
bug#77041; Package guix-patches. Full text available.

Message received at 77041 <at> debbugs.gnu.org:


Received: (at 77041) by debbugs.gnu.org; 16 Mar 2025 17:22:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 16 13:22:40 2025
Received: from localhost ([127.0.0.1]:50587 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ttrhA-0004Zc-9h
	for submit <at> debbugs.gnu.org; Sun, 16 Mar 2025 13:22:40 -0400
Received: from hera.aquilenet.fr ([185.233.100.1]:58712)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1ttrh7-0004Yy-1M
 for 77041 <at> debbugs.gnu.org; Sun, 16 Mar 2025 13:22:37 -0400
Received: from localhost (localhost [127.0.0.1])
 by hera.aquilenet.fr (Postfix) with ESMTP id 1C0247E;
 Sun, 16 Mar 2025 18:22:30 +0100 (CET)
Authentication-Results: hera.aquilenet.fr;
	none
X-Virus-Scanned: Debian amavis at hera.aquilenet.fr
Received: from hera.aquilenet.fr ([127.0.0.1])
 by localhost (hera.aquilenet.fr [127.0.0.1]) (amavis, port 10024) with ESMTP
 id epERLL80aqZM; Sun, 16 Mar 2025 18:22:29 +0100 (CET)
Received: from ribbon (91-160-117-201.subs.proxad.net [91.160.117.201])
 by hera.aquilenet.fr (Postfix) with ESMTPSA id 0731A3C9;
 Sun, 16 Mar 2025 18:22:28 +0100 (CET)
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Tomas Volf <~@wolfsden.cz>
Subject: Re: [bug#77041] [PATCH 15/16] services: mcron: Deprecate.
In-Reply-To: <87o6y1uiee.fsf@HIDDEN> (Tomas Volf's message of "Sun, 16
 Mar 2025 16:03:53 +0100")
References: <cover.1742073920.git.ludo@HIDDEN>
 <9c83cf458fc508990a834cecac3f9d8cbd74df87.1742073920.git.ludo@HIDDEN>
 <87o6y1uiee.fsf@HIDDEN>
Date: Sun, 16 Mar 2025 18:22:27 +0100
Message-ID: <87zfhknb58.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Rspamd-Queue-Id: 1C0247E
X-Spamd-Result: default: False [-4.60 / 15.00]; NEURAL_HAM(-3.00)[-1.000];
 BAYES_HAM(-3.00)[99.98%]; SUSPICIOUS_RECIPS(1.50)[];
 MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_FIVE(0.00)[6];
 RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[];
 FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+];
 TAGGED_RCPT(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[];
 FREEMAIL_CC(0.00)[bioneland.org,gnu.org,debbugs.gnu.org,gmail.com,trop.in];
 RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[];
 FROM_HAS_DN(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com];
 TO_DN_SOME(0.00)[]; ARC_NA(0.00)[]
X-Rspamd-Action: no action
X-Spamd-Bar: ----
X-Rspamd-Server: hera
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 77041
Cc: 77041 <at> debbugs.gnu.org, Andrew Tropin <andrew@HIDDEN>,
 Tanguy Le Carrour <tanguy@HIDDEN>,
 Maxim Cournoyer <maxim.cournoyer@HIDDEN>,
 Janneke Nieuwenhuizen <janneke@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

Tomas Volf <~@wolfsden.cz> skribis:

> Ludovic Court=C3=A8s <ludo@HIDDEN> writes:
>
>> +@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
>> +
>
> Currently timers lack the ability to send email with the cron output,
> something mcron can do.  Is that something you plan to address

No.  :-)

I think it=E2=80=99s more convenient, more flexible, and safer to implement=
 as a
higher-level mechanism, like you did in your personal services IIRC.

WDYT?

Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#77041; Package guix-patches. Full text available.

Message received at 77041 <at> debbugs.gnu.org:


Received: (at 77041) by debbugs.gnu.org; 16 Mar 2025 17:20:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 16 13:20:26 2025
Received: from localhost ([127.0.0.1]:50583 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ttrf0-0004SM-F6
	for submit <at> debbugs.gnu.org; Sun, 16 Mar 2025 13:20:26 -0400
Received: from hera.aquilenet.fr ([185.233.100.1]:60704)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1ttrex-0004Rp-RR
 for 77041 <at> debbugs.gnu.org; Sun, 16 Mar 2025 13:20:24 -0400
Received: from localhost (localhost [127.0.0.1])
 by hera.aquilenet.fr (Postfix) with ESMTP id 593E27E;
 Sun, 16 Mar 2025 18:20:16 +0100 (CET)
Authentication-Results: hera.aquilenet.fr;
	none
X-Virus-Scanned: Debian amavis at hera.aquilenet.fr
Received: from hera.aquilenet.fr ([127.0.0.1])
 by localhost (hera.aquilenet.fr [127.0.0.1]) (amavis, port 10024) with ESMTP
 id lNgRnhzoltS3; Sun, 16 Mar 2025 18:20:15 +0100 (CET)
Received: from ribbon (91-160-117-201.subs.proxad.net [91.160.117.201])
 by hera.aquilenet.fr (Postfix) with ESMTPSA id 7238B3C9;
 Sun, 16 Mar 2025 18:20:13 +0100 (CET)
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: "Luis Guilherme Coelho" <lgcoelho@HIDDEN>
Subject: Re: [bug#77041] [PATCH 15/16] services: mcron: Deprecate.
In-Reply-To: <D8HPV5FYPXTM.4XD3QWPNVVSE@HIDDEN> (Luis Guilherme Coelho's
 message of "Sun, 16 Mar 2025 10:15:05 -0300")
References: <cover.1742073920.git.ludo@HIDDEN>
 <9c83cf458fc508990a834cecac3f9d8cbd74df87.1742073920.git.ludo@HIDDEN>
 <87iko919hf.fsf@HIDDEN> <D8HPV5FYPXTM.4XD3QWPNVVSE@HIDDEN>
Date: Sun, 16 Mar 2025 18:20:12 +0100
Message-ID: <87cyegoptf.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Rspamd-Queue-Id: 593E27E
X-Spamd-Result: default: False [-4.60 / 15.00]; BAYES_HAM(-3.00)[100.00%];
 NEURAL_HAM(-3.00)[-1.000]; SUSPICIOUS_RECIPS(1.50)[];
 MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_FIVE(0.00)[6];
 RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[];
 FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+];
 TAGGED_RCPT(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[];
 FREEMAIL_CC(0.00)[gmail.com,debbugs.gnu.org,trop.in,bioneland.org,gnu.org];
 RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[];
 FROM_HAS_DN(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com];
 TO_DN_SOME(0.00)[]; ARC_NA(0.00)[]
X-Rspamd-Action: no action
X-Spamd-Bar: ----
X-Rspamd-Server: hera
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 77041
Cc: Tanguy Le Carrour <tanguy@HIDDEN>,
 Janneke Nieuwenhuizen <janneke@HIDDEN>, 77041 <at> debbugs.gnu.org,
 Maxim Cournoyer <maxim.cournoyer@HIDDEN>, Andrew Tropin <andrew@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

Hello,

"Luis Guilherme Coelho" <lgcoelho@HIDDEN> skribis:

>> While I think some documentation to mention that Shepherd timers can be
>> used instead of mcron for most cases, I do not see this as a reason to
>> deprecate nor remove the mcron service itself, just like we do not
>> remove system services when new, perhaps more modern alternatives get
>> added.
>
> +1 on this.

To be honest, I also wondered about deprecation: I do value internal
consistency (I think services provided by Guix itself should all use the
same tool), but I think it=E2=80=99s OK if people want to keep using mcron.

So yes, some sort of =E2=80=9Csoft deprecation=E2=80=9D as Maxim wrote soun=
ds
reasonable to me.

Thoughts?

> Also, in the current state, while timers can be used in most places a
> mcron service would be used normally, defining timer services is
> somewhat more verbose. For example, defining an alarm service with mcron
> is as simple as (1):

[...]

> I guess we could make it more succint by defining a
> `home-shepherd-timer-service-type` (this name is already in use, but I
> don't know a better one) for these timers services to extend, as I do
> here:
>
> https://codeberg.org/anemofilia/radix/src/branch/main/radix/services/shep=
herd.scm

Yes, I was going to suggest something like this.

Could something similar to the =E2=80=98ganeti-timer=E2=80=99 procedure int=
roduced in
this patch series?

  (define (ganeti-timer name schedule command)
    "Return a Shepherd timer providing NAME and running COMMAND, a list-val=
ued
  gexp."
    (shepherd-service
     (provision (list name))
     (requirement '(user-processes))
     (modules '((shepherd service timer)))
     (start #~(make-timer-constructor
               #$(if (string? schedule)
                     #~(cron-string->calendar-event #$schedule)
                     schedule)
               (command '(#$@command))
               #:wait-for-termination? #t))
     (stop #~(make-timer-destructor))
     (documentation "Periodically run a Ganeti maintenance job.")
   (actions (list shepherd-trigger-action))))

Or maybe something higher-level that would extend
=E2=80=98shepherd-root-service-type=E2=80=99?

Perhaps this should be done independently of this patch series though.

Thanks,
Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#77041; Package guix-patches. Full text available.

Message received at 77041 <at> debbugs.gnu.org:


Received: (at 77041) by debbugs.gnu.org; 16 Mar 2025 17:11:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 16 13:11:59 2025
Received: from localhost ([127.0.0.1]:50530 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ttrWo-0003mH-Ut
	for submit <at> debbugs.gnu.org; Sun, 16 Mar 2025 13:11:59 -0400
Received: from hera.aquilenet.fr ([185.233.100.1]:43588)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1ttrWl-0003lW-E4
 for 77041 <at> debbugs.gnu.org; Sun, 16 Mar 2025 13:11:56 -0400
Received: from localhost (localhost [127.0.0.1])
 by hera.aquilenet.fr (Postfix) with ESMTP id 7CF8B25A;
 Sun, 16 Mar 2025 18:11:48 +0100 (CET)
Authentication-Results: hera.aquilenet.fr;
	none
X-Virus-Scanned: Debian amavis at hera.aquilenet.fr
Received: from hera.aquilenet.fr ([127.0.0.1])
 by localhost (hera.aquilenet.fr [127.0.0.1]) (amavis, port 10024) with ESMTP
 id zFDHOSYbTriV; Sun, 16 Mar 2025 18:11:47 +0100 (CET)
Received: from ribbon (91-160-117-201.subs.proxad.net [91.160.117.201])
 by hera.aquilenet.fr (Postfix) with ESMTPSA id B27D4126;
 Sun, 16 Mar 2025 18:11:46 +0100 (CET)
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: "pelzflorian (Florian Pelz)" <pelzflorian@HIDDEN>
Subject: Re: [bug#77041] [PATCH 16/16] DRAFT news: Add entry for mcron
 deprecation.
In-Reply-To: <87y0x5jp99.fsf@HIDDEN> (pelzflorian@HIDDEN's
 message of "Sun, 16 Mar 2025 10:31:14 +0100")
References: <cover.1742073920.git.ludo@HIDDEN>
 <218d5ad8274680771591e5d940dcc7b7e7c0aafd.1742073920.git.ludo@HIDDEN>
 <87y0x5jp99.fsf@HIDDEN>
Date: Sun, 16 Mar 2025 18:11:46 +0100
Message-ID: <87o6y0oq7h.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Rspamd-Queue-Id: 7CF8B25A
X-Spamd-Result: default: False [-6.10 / 15.00]; BAYES_HAM(-3.00)[99.99%];
 NEURAL_HAM(-3.00)[-1.000]; MIME_GOOD(-0.10)[text/plain];
 FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+];
 RCVD_COUNT_TWO(0.00)[2]; ARC_NA(0.00)[];
 TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_SOME(0.00)[];
 RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[];
 FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3];
 MID_RHS_MATCH_FROM(0.00)[]
X-Rspamd-Action: no action
X-Spamd-Bar: ------
X-Rspamd-Server: hera
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 77041
Cc: Julien Lepiller <julien@HIDDEN>, 77041 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

Hi Florian,

"pelzflorian (Florian Pelz)" <pelzflorian@HIDDEN> skribis:

> Thank you Ludo for not only transitioning Guix but also for
> cleanups/refactoring here in this patch series.  Looks good to me mostly
> but have not tested nor carefully checked the Scheme code.

Thanks!

> For fstrim doc/guix.texi,
> (type: shepherd-calendar-event) in the documentation might be better
> expressed as =E2=80=9Ctype: Shepherd calendar event=E2=80=9D, as there is=
 no
> shepherd-calendar-event.
>
> For fstrim, you also removed the quoting ' of lists:
> -@item @code{listed-in} (default: @code{'("/etc/fstab" "/proc/self/mounti=
nfo")}) (type: maybe-list-of-strings)
> +@item @code{listed-in} (default: @code{("/etc/fstab" "/proc/self/mountin=
fo")}) (type: maybe-list-of-strings)

This was generated by:

  (configuration->documentation 'fstrim-configuration)

I was surprised also by the lack of quote but I suspected this had been
discussed before and implemented in =E2=80=98define-configuration=E2=80=99.=
  If not, we
should report a bug for that.

I took note of the other issues you reported and will fix them for v2.

Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#77041; Package guix-patches. Full text available.

Message received at 77041 <at> debbugs.gnu.org:


Received: (at 77041) by debbugs.gnu.org; 16 Mar 2025 15:04:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 16 11:04:01 2025
Received: from localhost ([127.0.0.1]:50325 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ttpWy-0005RG-KU
	for submit <at> debbugs.gnu.org; Sun, 16 Mar 2025 11:04:01 -0400
Received: from wolfsden.cz ([37.205.8.62]:42954)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1ttpWv-0005Qu-4Z
 for 77041 <at> debbugs.gnu.org; Sun, 16 Mar 2025 11:03:58 -0400
Received: by wolfsden.cz (Postfix, from userid 104)
 id C3C3337A294; Sun, 16 Mar 2025 15:03:55 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail;
 t=1742137435; bh=DMXtCPOGhn4PRy4gXEOT5ORRa5LNRhKtFAbJl1i533U=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=f6UeZSToLRa2VDL4FEWfZgB9XzuvFLAAcSwFCb5tX25PPOjwKCNh1z1mkWR44oDTt
 uDVE4j5kHGNcKyPOby9paMGhzODriE7rTefRh+tJjzbu2WAoz9dwnWOk4soPTOo3Qm
 P6c1uS8+xc2OKULlr6kZ2Q+YogkvrfSnZBF6G/O9Tt92JXXxv76yYWRvEjRwX/q8TQ
 z1wt51F9dAdNxZPUKTrMjJeIhEm+mnSwwFiPfnDgIWir2tLOaUGgnZpEQz4uj77vfK
 vmL/vXfY/BkNItpseIsPV/vkZZa+yRFVBkAXJA/RilRHpqffxc/XtyeqJOVlpv/aBE
 et67etFruMg6cVRN/VKuB8CXt5/fgWlGeV0lLBdtvAUb+R1TN757b1Ui2EUjLwgXVO
 j931QrtcOfb7HZcKAJpL9NQ5tQto4NdhXXr2pRRgvpLTn18GYLtgGhY9A4cORsxIHd
 RXJ4wJF99H8Eqbs5nZG13pwHwLgpxCV9B9Wp2ZqPwuOjOGrVDPh7cDNL5sRZXAuWJy
 7pXK+r59DToBajMnX74wxnkbTJ3bdBDdjWASFf7+VKYnkGaVcpjvSQ7sg3kJcl95JY
 +V5B3V1MWQTNZe28gW8hLoVPrLrhdmCW6jP/QouLGRWw0WWID/PT4to1CIPEF5aNo2
 tN7q5tY21z1SYQaetZEzEEqI=
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on wolfsden
X-Spam-Level: 
X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,BAYES_00,
 DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_BLOCKED
 autolearn=unavailable autolearn_force=no version=3.4.6
Received: from localhost (unknown [128.0.188.242])
 by wolfsden.cz (Postfix) with ESMTPSA id 1A968317EF4;
 Sun, 16 Mar 2025 15:03:54 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail;
 t=1742137434; bh=DMXtCPOGhn4PRy4gXEOT5ORRa5LNRhKtFAbJl1i533U=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=QsG088JkLoVIEIYGIlrBOYSqiQT36Fqbn6mxPr2aveEvJxnuG5IHK+/xoT8m1NjrR
 bDLb2I4JvkUhnwxqek57Hhetiply30GZNbnkM1U3PH3RBv8yVj2gIRHYE5pvCdSnEL
 o3KrBG1zl5bnNVTPUlKj+3Uujk9K61NFYOJz+iKvYSgBtRSD6OUqCIia63zKCu605V
 KRbub4wfBvCfwkxaBilUTr34Oi89/lOcuimjyLtUvziij1nU6N77NTBU63cOmIHVby
 IwKz2lvhsCqYgaF88E+DKM/mgBVuAikTW8wS2ogsUQnY90iYzIzVMF+xXdIM3lLUCW
 acdQssgFqNRbDZpOCr1tN0793HvIXKJ8dUMeihs/DMSmM69cqeJBrucdVHXyIZrlKK
 zJovvAu1VgIQsgwoqNqNFJKuh0FmlotdGA0IXWgVdbp3MgL5WgPIOqqb8meCzpbUx0
 qAL66/yPEDSljlF405yoHwdjEI13o9n+HvK++OZK3DesS57nLQ2V8IGxY+f8X3Hptb
 i/7JSSReZjK+QGZAuzBG7VBZ+IoAWSeyZgkRxkC2ZPkrf7s6Cbp/+VXjX+MCjj6KHs
 GH5ekKY1QMRVQWciEUK+orlDRBouFTu8opXhmrGIU8VvEhLCRzTfSmoqRk2QqwxLsr
 BY/N8L9xsg1HJ7vh4ctcGMi0=
From: Tomas Volf <~@wolfsden.cz>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: [bug#77041] [PATCH 15/16] services: mcron: Deprecate.
In-Reply-To: <9c83cf458fc508990a834cecac3f9d8cbd74df87.1742073920.git.ludo@HIDDEN>
 ("Ludovic =?utf-8?Q?Court=C3=A8s=22's?= message of "Sat, 15 Mar 2025
 22:37:21 +0100")
References: <cover.1742073920.git.ludo@HIDDEN>
 <9c83cf458fc508990a834cecac3f9d8cbd74df87.1742073920.git.ludo@HIDDEN>
Date: Sun, 16 Mar 2025 16:03:53 +0100
Message-ID: <87o6y1uiee.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 77041
Cc: Tanguy Le Carrour <tanguy@HIDDEN>,
 Janneke Nieuwenhuizen <janneke@HIDDEN>, 77041 <at> debbugs.gnu.org,
 Maxim Cournoyer <maxim.cournoyer@HIDDEN>, Andrew Tropin <andrew@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Ludovic Court=C3=A8s <ludo@HIDDEN> writes:

> +@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
> +

Currently timers lack the ability to send email with the cron output,
something mcron can do.  Is that something you plan to address before
removing the mcron-service-type?

(Albeit saying "no" would probably be justified, the email sending was
broken for a long time and no one noticed, so I am unsure whether people
actually use it.)

Tomas

--=20
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.




Information forwarded to guix-patches@HIDDEN:
bug#77041; Package guix-patches. Full text available.

Message received at 77041 <at> debbugs.gnu.org:


Received: (at 77041) by debbugs.gnu.org; 16 Mar 2025 14:59:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 16 10:59:24 2025
Received: from localhost ([127.0.0.1]:50297 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ttpSV-0004ij-Tx
	for submit <at> debbugs.gnu.org; Sun, 16 Mar 2025 10:59:24 -0400
Received: from wolfsden.cz ([37.205.8.62]:47904)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1ttpSR-0004iC-Rn
 for 77041 <at> debbugs.gnu.org; Sun, 16 Mar 2025 10:59:21 -0400
Received: by wolfsden.cz (Postfix, from userid 104)
 id C4C9937A795; Sun, 16 Mar 2025 14:59:17 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail;
 t=1742137157; bh=dxMaSAMUPlOTTF9/Wt6EQI+OiOVnA9cHDKVsOeJ18zo=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=r0AP7zNi7+9UPzvI2UNP4Z2gpt5w2LUxDUtPX82q5v13hDK7C4sRAnMsPuhY//z8d
 DwFQBuYYeDLIkh1bwgkM52eygmBZ1EgzzcBINSHGc82qsZ8kAZ+geS84/TV9rNAQ0T
 RIIXViyBpmrbkNgh8jnkA2hgUtLB818F2BSEMNrUmNMZLX1rt00yFN7hoUWIYzNnhg
 Q8PC8YmNAc1kjrAUTqo/X215K7i4Q/GNjIlOJ8XdWCRYrFti4fifPEJcYXBjaJDxDc
 +rEgkyJk1f9LbCiZdxnHoFRqhYA8NKNiM5Q9I3Q7gPh01cAMHFOugHsM6plLsUPHfc
 hSnGfrbmr6gDp44aqaZovtP3o4tUO9ihNCofobEBZLn5UCGoJroCvbKxDAgVEMHjGO
 Z40RviZeHdOcK6VgaqQDksTBPfY+9YRRPQid88wvRha0B3AfEb19imhdT61Cv9mjt6
 TNM1wOaUrQur3wLfUdxSlucIxQTyzL4hcDjEEJDBIInmsy+2tkRnAI4tUAq+kxtcH9
 qC9HYyLoTBjOna4KAYGlr/SDIcUYfI09yTkfkXkITyIHvje/e7HX/B+rzyt//4USnF
 5gyNJ5Wn7NyYXOIbQS+Gt4ELUkg2biAAbX7gxVH5MQ0UqbDyYGlbl8RwRDPWhGL3xk
 85jQ9lfL5BlgCR4aPH+nyDUM=
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on wolfsden
X-Spam-Level: 
X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,BAYES_00,
 DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_BLOCKED
 autolearn=ham autolearn_force=no version=3.4.6
Received: from localhost (unknown [128.0.188.242])
 by wolfsden.cz (Postfix) with ESMTPSA id 6E8E6378FF3;
 Sun, 16 Mar 2025 14:59:17 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail;
 t=1742137157; bh=dxMaSAMUPlOTTF9/Wt6EQI+OiOVnA9cHDKVsOeJ18zo=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=r0AP7zNi7+9UPzvI2UNP4Z2gpt5w2LUxDUtPX82q5v13hDK7C4sRAnMsPuhY//z8d
 DwFQBuYYeDLIkh1bwgkM52eygmBZ1EgzzcBINSHGc82qsZ8kAZ+geS84/TV9rNAQ0T
 RIIXViyBpmrbkNgh8jnkA2hgUtLB818F2BSEMNrUmNMZLX1rt00yFN7hoUWIYzNnhg
 Q8PC8YmNAc1kjrAUTqo/X215K7i4Q/GNjIlOJ8XdWCRYrFti4fifPEJcYXBjaJDxDc
 +rEgkyJk1f9LbCiZdxnHoFRqhYA8NKNiM5Q9I3Q7gPh01cAMHFOugHsM6plLsUPHfc
 hSnGfrbmr6gDp44aqaZovtP3o4tUO9ihNCofobEBZLn5UCGoJroCvbKxDAgVEMHjGO
 Z40RviZeHdOcK6VgaqQDksTBPfY+9YRRPQid88wvRha0B3AfEb19imhdT61Cv9mjt6
 TNM1wOaUrQur3wLfUdxSlucIxQTyzL4hcDjEEJDBIInmsy+2tkRnAI4tUAq+kxtcH9
 qC9HYyLoTBjOna4KAYGlr/SDIcUYfI09yTkfkXkITyIHvje/e7HX/B+rzyt//4USnF
 5gyNJ5Wn7NyYXOIbQS+Gt4ELUkg2biAAbX7gxVH5MQ0UqbDyYGlbl8RwRDPWhGL3xk
 85jQ9lfL5BlgCR4aPH+nyDUM=
From: Tomas Volf <~@wolfsden.cz>
To: Luis Guilherme Coelho via Guix-patches via <guix-patches@HIDDEN>
Subject: Re: [bug#77041] [PATCH 15/16] services: mcron: Deprecate.
In-Reply-To: <D8HPV5FYPXTM.4XD3QWPNVVSE@HIDDEN> (Luis Guilherme Coelho
 via Guix-patches via's message of "Sun, 16 Mar 2025 10:15:05 -0300")
References: <cover.1742073920.git.ludo@HIDDEN>
 <9c83cf458fc508990a834cecac3f9d8cbd74df87.1742073920.git.ludo@HIDDEN>
 <87iko919hf.fsf@HIDDEN> <D8HPV5FYPXTM.4XD3QWPNVVSE@HIDDEN>
Mail-Followup-To: Luis Guilherme Coelho via Guix-patches via
 <guix-patches@HIDDEN>, "Maxim Cournoyer" <maxim.cournoyer@HIDDEN>,
 Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Luis Guilherme Coelho
 <lgcoelho@HIDDEN>, 77041 <at> debbugs.gnu.org, Andrew Tropin
 <andrew@HIDDEN>, Tanguy Le Carrour <tanguy@HIDDEN>, Janneke
 Nieuwenhuizen <janneke@HIDDEN>
Date: Sun, 16 Mar 2025 15:59:17 +0100
Message-ID: <87senduim2.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 77041
Cc: Luis Guilherme Coelho <lgcoelho@HIDDEN>,
 Tanguy Le Carrour <tanguy@HIDDEN>,
 Maxim Cournoyer <maxim.cournoyer@HIDDEN>,
 Ludovic =?utf-8?Q?Cour?= =?utf-8?Q?t=C3=A8s?= <ludo@HIDDEN>,
 Andrew Tropin <andrew@HIDDEN>, 77041 <at> debbugs.gnu.org,
 Janneke Nieuwenhuizen <janneke@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Luis Guilherme Coelho via Guix-patches via <guix-patches@HIDDEN>
writes:

>> While I think some documentation to mention that Shepherd timers can be
>> used instead of mcron for most cases, I do not see this as a reason to
>> deprecate nor remove the mcron service itself, just like we do not
>> remove system services when new, perhaps more modern alternatives get
>> added.
>
> +1 on this.
>
> Also, in the current state, while timers can be used in most places a
> mcron service would be used normally, defining timer services is
> somewhat more verbose.
>
> [..]
>
> Which is only two lines longer than (1), while (2) is six lines longer.
> I think the various services that provide shepherd timers would also
> benefit from these definitions.

In my own configuration I went as far as:

--8<---------------cut here---------------start------------->8---
(services
  (cron-timer 'cron-btrfs-scrub-raid
              "0 4 1,15 * *"
              (script/btrfs-scrub "/raid"))
  ...)
--8<---------------cut here---------------end--------------->8---

And it even sends emails with the output, as crons should.

I am not saying Guix proper needs to go as far as I did, but I agree
that currently defining Shepherd timers is bit too verbose.

Tomas

-- 
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.




Information forwarded to guix-patches@HIDDEN:
bug#77041; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 16 Mar 2025 14:59:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 16 10:59:53 2025
Received: from localhost ([127.0.0.1]:50302 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ttpSx-0004mP-Mu
	for submit <at> debbugs.gnu.org; Sun, 16 Mar 2025 10:59:53 -0400
Received: from lists.gnu.org ([2001:470:142::17]:35318)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1ttpSv-0004jt-9Z
 for submit <at> debbugs.gnu.org; Sun, 16 Mar 2025 10:59:49 -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 <~@wolfsden.cz>) id 1ttpSW-0007je-Eb
 for guix-patches@HIDDEN; Sun, 16 Mar 2025 10:59:25 -0400
Received: from wolfsden.cz ([37.205.8.62])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <~@wolfsden.cz>)
 id 1ttpSU-00058s-Jj; Sun, 16 Mar 2025 10:59:24 -0400
Received: by wolfsden.cz (Postfix, from userid 104)
 id 51AEC37993B; Sun, 16 Mar 2025 14:59:18 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail;
 t=1742137158; bh=dxMaSAMUPlOTTF9/Wt6EQI+OiOVnA9cHDKVsOeJ18zo=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=tTmA+Mtnc8iCUNuuMfpegRHLGEpdyrmOsBGQGxSeuCb7XIebaAHukvT8r64mZ/zcv
 2F3aq8W4TAdnEIi8YlsbGFwvSck1ABe0zlT9fnb7+OZbKWlCLvuRFp6/caSY6x1niw
 LWhXllWRjUeBbdLTvPixP4iZt2iuqypUh7SefQ5GqzTxBhXj1chq82k4+ExfgU0fsJ
 bm+9vrNfFLG2XwF5XEuAvTLCaWEDURZh2/RURcKh7Uvj88aKYnhMQvkgv7qtAgLl3b
 fjpsid5fRq8chSBoR+FFR8E47Xlyu5ibe/VEgH9xDligExjsLoV9kObzA9LwTrCsnF
 9jzxn9Kx4c199CPiX/7sha0I7e4R++4ctJ5xPK6ZMx+ykhescb1Oe6C9RnIyG3zcmY
 czIs9l54AncYQcWvhdUA6FePmOEr7ExDad5wDNL8Jm/6ifwhNzlOGLtyZK3PV+FOlg
 uCn0AiqxWN03vvmcOOoQ+roZlLVA+IPuhhPBOlair4a/OlT4O+oRNHIeCdINH1XOCD
 JBZ+pX/rJeNukmWNGRPqjXQN8I/sFaiLlv4MIaNiQKI0EYloLK/SJMavBp7jcJowZt
 lZQzU8qceYfaSaeRrS2EIUuhjY2UpbPP1fZj9ORy6GAK1DIMqqNiBZp7Zs3WkC8NVr
 KcHaMr5NTFkm1fol3z5AgUUc=
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on wolfsden
X-Spam-Level: 
X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,BAYES_00,
 DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_BLOCKED
 autolearn=unavailable autolearn_force=no version=3.4.6
Received: from localhost (unknown [128.0.188.242])
 by wolfsden.cz (Postfix) with ESMTPSA id 6E8E6378FF3;
 Sun, 16 Mar 2025 14:59:17 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail;
 t=1742137157; bh=dxMaSAMUPlOTTF9/Wt6EQI+OiOVnA9cHDKVsOeJ18zo=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=r0AP7zNi7+9UPzvI2UNP4Z2gpt5w2LUxDUtPX82q5v13hDK7C4sRAnMsPuhY//z8d
 DwFQBuYYeDLIkh1bwgkM52eygmBZ1EgzzcBINSHGc82qsZ8kAZ+geS84/TV9rNAQ0T
 RIIXViyBpmrbkNgh8jnkA2hgUtLB818F2BSEMNrUmNMZLX1rt00yFN7hoUWIYzNnhg
 Q8PC8YmNAc1kjrAUTqo/X215K7i4Q/GNjIlOJ8XdWCRYrFti4fifPEJcYXBjaJDxDc
 +rEgkyJk1f9LbCiZdxnHoFRqhYA8NKNiM5Q9I3Q7gPh01cAMHFOugHsM6plLsUPHfc
 hSnGfrbmr6gDp44aqaZovtP3o4tUO9ihNCofobEBZLn5UCGoJroCvbKxDAgVEMHjGO
 Z40RviZeHdOcK6VgaqQDksTBPfY+9YRRPQid88wvRha0B3AfEb19imhdT61Cv9mjt6
 TNM1wOaUrQur3wLfUdxSlucIxQTyzL4hcDjEEJDBIInmsy+2tkRnAI4tUAq+kxtcH9
 qC9HYyLoTBjOna4KAYGlr/SDIcUYfI09yTkfkXkITyIHvje/e7HX/B+rzyt//4USnF
 5gyNJ5Wn7NyYXOIbQS+Gt4ELUkg2biAAbX7gxVH5MQ0UqbDyYGlbl8RwRDPWhGL3xk
 85jQ9lfL5BlgCR4aPH+nyDUM=
From: Tomas Volf <~@wolfsden.cz>
To: Luis Guilherme Coelho via Guix-patches via <guix-patches@HIDDEN>
Subject: Re: [bug#77041] [PATCH 15/16] services: mcron: Deprecate.
In-Reply-To: <D8HPV5FYPXTM.4XD3QWPNVVSE@HIDDEN> (Luis Guilherme Coelho
 via Guix-patches via's message of "Sun, 16 Mar 2025 10:15:05 -0300")
References: <cover.1742073920.git.ludo@HIDDEN>
 <9c83cf458fc508990a834cecac3f9d8cbd74df87.1742073920.git.ludo@HIDDEN>
 <87iko919hf.fsf@HIDDEN> <D8HPV5FYPXTM.4XD3QWPNVVSE@HIDDEN>
Mail-Followup-To: Luis Guilherme Coelho via Guix-patches via
 <guix-patches@HIDDEN>, "Maxim Cournoyer" <maxim.cournoyer@HIDDEN>,
 Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Luis Guilherme Coelho
 <lgcoelho@HIDDEN>, 77041 <at> debbugs.gnu.org, Andrew Tropin
 <andrew@HIDDEN>, Tanguy Le Carrour <tanguy@HIDDEN>, Janneke
 Nieuwenhuizen <janneke@HIDDEN>
Date: Sun, 16 Mar 2025 15:59:17 +0100
Message-ID: <87senduim2.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=37.205.8.62; envelope-from=~@wolfsden.cz;
 helo=wolfsden.cz
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 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_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001,
 SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: submit
Cc: Luis Guilherme Coelho <lgcoelho@HIDDEN>,
 Tanguy Le Carrour <tanguy@HIDDEN>,
 Maxim Cournoyer <maxim.cournoyer@HIDDEN>,
 Ludovic =?utf-8?Q?Cour?= =?utf-8?Q?t=C3=A8s?= <ludo@HIDDEN>,
 Andrew Tropin <andrew@HIDDEN>, 77041 <at> debbugs.gnu.org,
 Janneke Nieuwenhuizen <janneke@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

Luis Guilherme Coelho via Guix-patches via <guix-patches@HIDDEN>
writes:

>> While I think some documentation to mention that Shepherd timers can be
>> used instead of mcron for most cases, I do not see this as a reason to
>> deprecate nor remove the mcron service itself, just like we do not
>> remove system services when new, perhaps more modern alternatives get
>> added.
>
> +1 on this.
>
> Also, in the current state, while timers can be used in most places a
> mcron service would be used normally, defining timer services is
> somewhat more verbose.
>
> [..]
>
> Which is only two lines longer than (1), while (2) is six lines longer.
> I think the various services that provide shepherd timers would also
> benefit from these definitions.

In my own configuration I went as far as:

--8<---------------cut here---------------start------------->8---
(services
  (cron-timer 'cron-btrfs-scrub-raid
              "0 4 1,15 * *"
              (script/btrfs-scrub "/raid"))
  ...)
--8<---------------cut here---------------end--------------->8---

And it even sends emails with the output, as crons should.

I am not saying Guix proper needs to go as far as I did, but I agree
that currently defining Shepherd timers is bit too verbose.

Tomas

-- 
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.




Information forwarded to guix-patches@HIDDEN:
bug#77041; Package guix-patches. Full text available.

Message received at 77041 <at> debbugs.gnu.org:


Received: (at 77041) by debbugs.gnu.org; 16 Mar 2025 13:15:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 16 09:15:42 2025
Received: from localhost ([127.0.0.1]:46092 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ttnq8-00027E-Bl
	for submit <at> debbugs.gnu.org; Sun, 16 Mar 2025 09:15:41 -0400
Received: from layka.disroot.org ([178.21.23.139]:41862)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <lgcoelho@HIDDEN>)
 id 1ttnpv-00025Z-1l
 for 77041 <at> debbugs.gnu.org; Sun, 16 Mar 2025 09:15:28 -0400
Received: from mail01.disroot.lan (localhost [127.0.0.1])
 by disroot.org (Postfix) with ESMTP id B958825C8E;
 Sun, 16 Mar 2025 14:15:25 +0100 (CET)
X-Virus-Scanned: SPAM Filter at disroot.org
Received: from layka.disroot.org ([127.0.0.1])
 by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP
 id BlpXvBRxUKTH; Sun, 16 Mar 2025 14:15:21 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail;
 t=1742130910; bh=rZ9Y5S4W6rF52QarFn0UO1JnEYwxPQIk3EwESAU87Tg=;
 h=Date:Cc:Subject:From:To:References:In-Reply-To;
 b=a9EeyKXDwW0hI7oTtja+2YRUVncii0Yt498EvMwT1Qxo/dQ1GwUp6i3B3khMCGmVK
 cXFEjCaTkVKyZDNTWBHoUn8g8Bs4wg8vYy+ucyc9IPBliA3AXHFjw5nJ+HvgwoCsLB
 tFQgxxNAqOP+JlWx+xlLFywaUJLUXnt5BUeL1ow2qH0cg/6SvVZXoBM68gcwjznqk6
 AZER7bT6UTpCB9tObSQzeQwUyT5WLd3YEO7FTNH0lxOqRwrhYcAUODaMLAC1hvjnXM
 heLqHokYKroUVo/oLfjVbdclAbCatz2YEgbPxL5VXEttiB1jrev1nou5R2Idv0ByIt
 a0/OW/9LCzS4Q==
Mime-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=UTF-8
Date: Sun, 16 Mar 2025 10:15:05 -0300
Message-Id: <D8HPV5FYPXTM.4XD3QWPNVVSE@HIDDEN>
Subject: Re: [bug#77041] [PATCH 15/16] services: mcron: Deprecate.
From: "Luis Guilherme Coelho" <lgcoelho@HIDDEN>
To: "Maxim Cournoyer" <maxim.cournoyer@HIDDEN>,
 =?utf-8?q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
References: <cover.1742073920.git.ludo@HIDDEN>
 <9c83cf458fc508990a834cecac3f9d8cbd74df87.1742073920.git.ludo@HIDDEN>
 <87iko919hf.fsf@HIDDEN>
In-Reply-To: <87iko919hf.fsf@HIDDEN>
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 77041
Cc: 77041 <at> debbugs.gnu.org, Andrew Tropin <andrew@HIDDEN>,
 Tanguy Le Carrour <tanguy@HIDDEN>,
 Janneke Nieuwenhuizen <janneke@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> While I think some documentation to mention that Shepherd timers can be
> used instead of mcron for most cases, I do not see this as a reason to
> deprecate nor remove the mcron service itself, just like we do not
> remove system services when new, perhaps more modern alternatives get
> added.

+1 on this.

Also, in the current state, while timers can be used in most places a
mcron service would be used normally, defining timer services is
somewhat more verbose. For example, defining an alarm service with mcron
is as simple as (1):

(simple-service 'home-alarm-service
                home-mcron-service-type
                (home-mcron-configuration
                 (jobs (list #~(job "0 6 * * *"
                                    "mpv --shuffle ~/media/music")))))

While doing it with shepherd would be something like (2):

(simple-service 'home-alarm-service
                home-shepherd-service-type
                (list (shepherd-service
                        (provision '(alarm))
                        (modules '((shepherd service timer)))
                        (start #~(make-timer-constructor
                                   (calendar-event #:hours '(6)
                                                   #:minutes '(0))
                                   (command '("mpv" "--shuffle" "~/media/mu=
sic"))))
                        (stop #~(make-timer-destructor))
                        (actions (list shepherd-trigger-action)))))

I guess we could make it more succint by defining a
`home-shepherd-timer-service-type` (this name is already in use, but I
don't know a better one) for these timers services to extend, as I do
here:

https://codeberg.org/anemofilia/radix/src/branch/main/radix/services/shephe=
rd.scm

With these definitions, the alarm service could be written, using
shepherd timers as (3):

(simple-service 'home-alarm-service
                home-shepherd-timer-service-type
                (list (shepherd-timer
                        (name 'alarm)
                        (event #~(calendar-event #:hours '(6)
                                                 #:minutes '(0)))
                        (action #~(command '("mpv" "--shuffle" "~/media/mus=
ic"))))))

Which is only two lines longer than (1), while (2) is six lines longer.
I think the various services that provide shepherd timers would also
benefit from these definitions.

WDYT?

PS. I've sent this mail before but by mistake it was sent only to
Maxim, please disregard.




Information forwarded to guix-patches@HIDDEN:
bug#77041; Package guix-patches. Full text available.

Message received at 77041 <at> debbugs.gnu.org:


Received: (at 77041) by debbugs.gnu.org; 16 Mar 2025 12:13:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 16 08:13:03 2025
Received: from localhost ([127.0.0.1]:45933 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ttmrV-0001B2-G6
	for submit <at> debbugs.gnu.org; Sun, 16 Mar 2025 08:13:02 -0400
Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]:48383)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>)
 id 1ttmrT-0001AA-5m
 for 77041 <at> debbugs.gnu.org; Sun, 16 Mar 2025 08:12:59 -0400
Received: by mail-pl1-x62e.google.com with SMTP id
 d9443c01a7336-2243803b776so12257985ad.0
 for <77041 <at> debbugs.gnu.org>; Sun, 16 Mar 2025 05:12:59 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1742127173; x=1742731973; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=7bIB3mptcRHxhlZdT1RL6hbFqY4FqOTOCAuNUV4c79I=;
 b=MFFW7xbh36W6UnKr5Ce1D7SxcKco0y2B6PZe4UM9vDvhZPbIJR9mhmLmKrZhq0hXjx
 2/ys63j/oHwoUdjsWUD3WOd2XXVaUtbQrQm2JvTKEcmluyT3nmEtJ0jXK8ld5jWMuxTG
 FpIEOsfGApvrXty2G34DBqMUjCSvtA7/+12cqJX8BxSkfjP9VQaoHdEWGAR8EmFR3iDT
 5XRGSMY1uklKIKk4QmrxA+AHsQuNh5LPKe9zJS0EsOj1oN1Km7mWkGk/w3CcXvtDN2J/
 c4s2LMQZSQTBP8FDd3o8PTzFUqxYhL+zhzrVx+RM27niHbl7C6ZGdNGn0XXvMsOagnPW
 OTcw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1742127173; x=1742731973;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from
 :to:cc:subject:date:message-id:reply-to;
 bh=7bIB3mptcRHxhlZdT1RL6hbFqY4FqOTOCAuNUV4c79I=;
 b=plnEre5KLCL4dQmcdFh4l48Jk+f8XwQp1s1itPpgGemnqDmaEEPqjlx1puFuiaz5xp
 VcXcuUft3/qYB3oEE7SgIbU3S7ZCSYe+RBj/p3MMV1ojSGrtU651V2foh5E72rbLooWs
 gG+U6Hp+/Ce5rLOORlnpQP14ZVE7TIV4cUu+AAoP3ufIN1RRcv/upeJVR4vy59xdDPCv
 qf4KHBW3fxhqz6VhHAclaMhkmtphOJaTKLAq8jdMz/BxoR/1Nis9TqndXmaa7tWiA/FE
 3yMbYJk7cWiPpFxEjQ+UG70r5NvM35srkog0dYHTw3SYoLY9B9hsavsUzU1FxsPkFauP
 yMlw==
X-Gm-Message-State: AOJu0YzBgKjQDXFlGSxAivTNsrM33JNA2TK5vSfHd5lNw0ByUMD99cjH
 fDRYOULhreDjsOp9BrO4w7Wk0Rd96TYOP/5TLq4x4ys7CPBjW8A3
X-Gm-Gg: ASbGncsS0+bAz9FFilLjXqWZTaGRnERq7Xmb4KoGAhbQuKEqYAlwmDYuwylWA/hf0/V
 IKtHIwDMtatuebULTqxi2cMY/HLH9iJaXc+0WgxlNgD4Oq8hfUwtECm1hH7/5h1aZDyxtSz2gHG
 HEczCgTCMDdDk1I/fnsTD68xa83AvLV9NoMi0SOJEwEN2K0WHQTInF1TaRbOokHus/zHhIIqLft
 YwD/y4YXfVu8YP/W3lVVd/FLed5BjhfBmdBeT6FQtxrExaLpKMSDRaLBq1bOG2eSNw9DTNfr7s2
 z9qOuv985257ykVeCdIp23pvL115l2l/sPKfcvADMV8=
X-Google-Smtp-Source: AGHT+IE3bUZ1VP7Z8eCKsC+ayw7HIyVBSiQDPlLs6uWa+T/8/sYrZxNfV+7RrWtGDnfi0vk3XND6Zw==
X-Received: by 2002:a17:902:d4ca:b0:220:e896:54e1 with SMTP id
 d9443c01a7336-225e0a89b9bmr116118885ad.26.1742127173201; 
 Sun, 16 Mar 2025 05:12:53 -0700 (PDT)
Received: from terra ([2405:6586:be0:0:83c8:d31d:2cec:f542])
 by smtp.gmail.com with ESMTPSA id
 d2e1a72fcca58-7371167e08dsm5886468b3a.102.2025.03.16.05.12.51
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sun, 16 Mar 2025 05:12:52 -0700 (PDT)
From: Maxim Cournoyer <maxim.cournoyer@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: [bug#77041] [PATCH 00/16] Replacing mcron jobs by Shepherd timers
In-Reply-To: <cover.1742073920.git.ludo@HIDDEN> ("Ludovic =?utf-8?Q?Court?=
 =?utf-8?Q?=C3=A8s=22's?= message
 of "Sat, 15 Mar 2025 22:27:24 +0100")
References: <cover.1742073920.git.ludo@HIDDEN>
Date: Sun, 16 Mar 2025 21:12:37 +0900
Message-ID: <875xk918ei.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 77041
Cc: Julien Lepiller <julien@HIDDEN>, 77041 <at> debbugs.gnu.org,
 Florian Pelz <pelzflorian@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi,

Ludovic Court=C3=A8s <ludo@HIDDEN> writes:

> Hello,
>
> This is the last step of the Shepherd 1.0 transition, leading
> to the deprecation of mcron, superseded by Shepherd timers.
>
> Thoughts?

Like Florian, I've read the diffs only, haven't applied nor built nor
test, but it looks reasonable to me, except the hard deprecation and
removal, which is unnecessary.

With the hard deprecation turned into a soft deprecation, it'd LGTM.

Reviewed-by: Maxim Cournoyer <maxim.cournoyer@HIDDEN>

--
Thanks,
Maxim




Information forwarded to guix-patches@HIDDEN:
bug#77041; Package guix-patches. Full text available.

Message received at 77041 <at> debbugs.gnu.org:


Received: (at 77041) by debbugs.gnu.org; 16 Mar 2025 12:11:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 16 08:11:35 2025
Received: from localhost ([127.0.0.1]:45925 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ttmq7-0000yw-5s
	for submit <at> debbugs.gnu.org; Sun, 16 Mar 2025 08:11:35 -0400
Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]:51294)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>)
 id 1ttmq3-0000xk-Ab
 for 77041 <at> debbugs.gnu.org; Sun, 16 Mar 2025 08:11:32 -0400
Received: by mail-pl1-x634.google.com with SMTP id
 d9443c01a7336-223594b3c6dso68338895ad.2
 for <77041 <at> debbugs.gnu.org>; Sun, 16 Mar 2025 05:11:31 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1742127085; x=1742731885; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=VNt6SdXgokagME4N+szC3iozQWYuWf8PGlg7LDVfsKQ=;
 b=AGDeuIbMB/UYeOvhGhbE8mvv2RFGVdEDuqZxlfH1EKZWqEOdu8i5i9eGidTkqUbLq0
 Mb2bUTdso3iKFDwCdMUzBMbZfwq6oNVYC48LA69+uwMqmNe0Cim0zUB0UOVopweGZ0YW
 fUGnVZiC2jMf/tvAJrty+P6dp4cROED+c7pe7HL8+EqKU5p1PbO+UGtUprNOzlwkJZb+
 KmGt44TbmmpX6C5timK89OOvt51SaFobYrT1qPmWJ1VM4J8J0E6X2MR8lIVHmYBVVw28
 nnJ070lI7fl5CnNZJFydrMZMYjhdurntxFZTuLUiKI2gQgjXOz8lpjNGFKpL5Kby2YuO
 lqVg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1742127085; x=1742731885;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from
 :to:cc:subject:date:message-id:reply-to;
 bh=VNt6SdXgokagME4N+szC3iozQWYuWf8PGlg7LDVfsKQ=;
 b=vgbyAbGcxwSqCxLzSzXsTiUa/76aL/0774bFBGBm6Ko++4uq+wtMEwlTMER/MvH4/y
 M9N1cpXRD64HVpA6LUpxwG2NdLBd5VHhofxNXoPrkZkNR8YPMNuxvWZyXngwQ4GgPUDF
 yncuXJHMFHRiDx/NWpnV8VN3bqnnIJzEwAdvETZxPmWc6Iws2p5GRbMXGhmXS9ubKYBM
 ADw7Wnn7F6c/F0nX4uhlBOEPuNJzGeP61/yIh9AZ4r+nmuaRPtX8r2/DSb2mU9IStjur
 bI7WvY42PGvRMtJceB1bx7O2V2cIDhMNPOOtJIDhIkKg1z+GnJYoDdtFAVw1dnnbaqSV
 GJjg==
X-Gm-Message-State: AOJu0YwsPi5rIJJ3VfNvRmNeC/yy6mBtV7QVACibQmjol1nj8kq0bDEi
 vIwkKKhLOgkTlwAWbd3cLs7wr0pC+WnLTJuewUqlNIQlMoRYkzYEg61S7Fuj
X-Gm-Gg: ASbGncu171g9aJ7RKm7/5W3GrbnWK0XeVnE1LvdqpxAPoeZcyqG7vqBs45PDetrVD+x
 ODKu53HOoXgqpJ6mCYag9DqYS0R0DYDfW3Drkx+X0yPW0eiqhRG9+EwAu487gkC/B4ToCSzDtgj
 G5rfcHOwX35azG7wzdkzxzk1EO94mP1DxjYle88i9cRp9S1rRAZwZHXYgr3cNFHUNGCgNsjcowk
 Ke4cZRV25thBJxZbP7sRktdpy/y8OWtyRc3BMK9aTfRPTOcDCmunC/Dn4tB5/BLpXSymYipWEz2
 E3MgT8unV7NTlq6Yzy5ND0yfLAiFoqfHBMvsjv/UUx0=
X-Google-Smtp-Source: AGHT+IGHpJMk4e1k8rmBKRtKuTU98+Fi2e8S8owoGRTgMRlgDi0kSc9Db10LAaQeaE7xXuiEg5smsw==
X-Received: by 2002:a05:6a21:4a8c:b0:1f0:e42e:fb1d with SMTP id
 adf61e73a8af0-1f5c1326a41mr14327765637.36.1742127085016; 
 Sun, 16 Mar 2025 05:11:25 -0700 (PDT)
Received: from terra ([2405:6586:be0:0:83c8:d31d:2cec:f542])
 by smtp.gmail.com with ESMTPSA id
 d2e1a72fcca58-73711529531sm5730799b3a.2.2025.03.16.05.11.23
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sun, 16 Mar 2025 05:11:24 -0700 (PDT)
From: Maxim Cournoyer <maxim.cournoyer@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: [bug#77041] [PATCH 16/16] DRAFT news: Add entry for mcron
 deprecation.
In-Reply-To: <218d5ad8274680771591e5d940dcc7b7e7c0aafd.1742073920.git.ludo@HIDDEN>
 ("Ludovic =?utf-8?Q?Court=C3=A8s=22's?= message of "Sat, 15 Mar 2025
 22:37:22 +0100")
References: <cover.1742073920.git.ludo@HIDDEN>
 <218d5ad8274680771591e5d940dcc7b7e7c0aafd.1742073920.git.ludo@HIDDEN>
Date: Sun, 16 Mar 2025 21:11:09 +0900
Message-ID: <87a59l18gy.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 77041
Cc: Julien Lepiller <julien@HIDDEN>, 77041 <at> debbugs.gnu.org,
 Florian Pelz <pelzflorian@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi Ludovic,

Ludovic Court=C3=A8s <ludo@HIDDEN> writes:

> * etc/news.scm: Add entry.
>
> Change-Id: I7e096a8f137e20487f5dac5fca4ae5b05754f5cd
> ---
>  etc/news.scm | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
>
> diff --git a/etc/news.scm b/etc/news.scm
> index 8e37bc8bec..368bdb567a 100644
> --- a/etc/news.scm
> +++ b/etc/news.scm
> @@ -37,6 +37,19 @@
>  (channel-news
>   (version 0)
>=20=20
> + (entry (commit "XXX")
> +        (title
> +         (en "Scheduled job execution with mcron superseded by Shepherd
> +timers"))
> +        (body
> +         (en "On Guix System and Guix Home, scheduled job execution with=
 the
> +mcron package is deprecated; @code{mcron-service-type} and
> +@code{home-mcron-service-type} are slated for removal after 2026-04-01.
> +
> +As a replacement for mcron jobs, you can use Shepherd timers---a feature=
 that
> +appeared in version 1.0 of the Shepherd.  Run @command{info \"(guix) Sch=
eduled
> +Job Execution\"} for more information on how to transition.")))
> +

I'd turn this into a soft-deprecation: document Shepherd timers as the
preferred alternative to use in most scenarios such as when authoring
Guix System or home services,, but leave otherwise leave the
mcron-service-type and home-mcron-service-type services be.

--=20
Thanks,
Maxim




Information forwarded to guix-patches@HIDDEN:
bug#77041; Package guix-patches. Full text available.

Message received at 77041 <at> debbugs.gnu.org:


Received: (at 77041) by debbugs.gnu.org; 16 Mar 2025 11:49:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 16 07:49:40 2025
Received: from localhost ([127.0.0.1]:45843 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ttmUt-0005yy-Tc
	for submit <at> debbugs.gnu.org; Sun, 16 Mar 2025 07:49:40 -0400
Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]:49405)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>)
 id 1ttmUs-0005yC-9P
 for 77041 <at> debbugs.gnu.org; Sun, 16 Mar 2025 07:49:38 -0400
Received: by mail-pl1-x62a.google.com with SMTP id
 d9443c01a7336-22113560c57so8227385ad.2
 for <77041 <at> debbugs.gnu.org>; Sun, 16 Mar 2025 04:49:38 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1742125772; x=1742730572; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=z2KmmcKz/uyGES0sdy8KF50Q+9ajF9TJeo5MerQvN7Q=;
 b=OuUFFTiSzgOql6S60/7UWEfS1euaLHA3ol4NmiHoESq+ACpofMtiEpGPmY1PfFwi0q
 DKu4br95SIg4X3GOvzJPEk1JxQYoIKqrHMtY8RzqAQw4H5QtRkHSeda9hOpJWupog5W2
 thwcZw7pXwNMGHr5kJDXt4u2pHR7mvFSXBy1yCg9iE5DECg1XBf9IUynMA0BygHjSCTZ
 t9eYauibc87XEzG7FwxLvSa+z9/Q+Z/mK1Ee9J3oKKgpnxgILZcEprYjwf95tJjahxJM
 34gm2o9ATAJl5AB2vEbc4aXAOMRRb8b8nDTPBMtvm/+yrZsgUm7+FdS1qtJXV3M+p+je
 d+Og==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1742125772; x=1742730572;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from
 :to:cc:subject:date:message-id:reply-to;
 bh=z2KmmcKz/uyGES0sdy8KF50Q+9ajF9TJeo5MerQvN7Q=;
 b=ocImyEWpIvWYdhYmmCm+hoECwZy7yFM8yvqmtlJKvL6EA6UNPttWnA60GTu00ORe7f
 NDCMp/RtmGuLpZtdCGHUMG3SH8393UKmTZKEeNwdyn0cLeoFoibcR7uCyAUZJoQU0nJV
 E7WQC9TUQm6z+EEEi7XkCYbLJSmWUhyC+0ENKu57xxvsZ5cKzlb5LxfK8YBl6dwL597L
 Ec+sAmtViha2EKkF5cY7KSr77w1lyrRYfa7HCwxA4M3lfqvfwLFjAUttF7OtXR0uqwzT
 PjnralFdHJ0DyOCiGlNTQnsVH7wgt62I3Mrjkfh/qaTtxLo27nFrP05eNBEJSjrNUqRo
 w0Dg==
X-Gm-Message-State: AOJu0Yw3R4wValqArr9n/LOq2G6m3j4I5MCd7jYkmwxFSqmp3HuDRU33
 5aYLZjCF/kdgfBeb1BjYjzhAc19GupVoNAlM5nlRQKenilRsKJBbEr+00FOq
X-Gm-Gg: ASbGncuQXoUwfNATYKvQw15nzxCP/DQ0A7+y+itim5oN9dOhyxwxnuHbb7EiGIa26ZJ
 0uT6E2LblWX2xN3UGgbaLUnSqu/jyeqcItBSgeZd6Qj0BV4gg/N+VEH+Xlr4+BKRdUQLEjTd6aI
 XB2gqDeCp9oQfxFrnnuxhfSg4EGj5hbG7aYWyEMoOODqfdTdWeXXHAmGQrQ23KgC+Ot6VmUbieW
 AG0HwumzFSanrsEjJ/j8lAyX6dbLlmfSxb9s8VykNqNP/Mco+dRXLSwD5r1SktYuU/VRGpvNw1n
 guUohTSJyYzzBtFMLGD7/e+R7pXJ5Af9vX1MYcpLqu8=
X-Google-Smtp-Source: AGHT+IEFrdrFf2OKcCUSqMbFp5SuxvqpiHED/yDPciXPBYPtlfAApBHZff3e7uxg5xDmRShnkIKahg==
X-Received: by 2002:a05:6a00:1413:b0:736:5822:74b4 with SMTP id
 d2e1a72fcca58-737223e8d81mr11065313b3a.21.1742125772282; 
 Sun, 16 Mar 2025 04:49:32 -0700 (PDT)
Received: from terra ([2405:6586:be0:0:83c8:d31d:2cec:f542])
 by smtp.gmail.com with ESMTPSA id
 d2e1a72fcca58-73711695ad4sm5867172b3a.132.2025.03.16.04.49.30
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sun, 16 Mar 2025 04:49:31 -0700 (PDT)
From: Maxim Cournoyer <maxim.cournoyer@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: [bug#77041] [PATCH 15/16] services: mcron: Deprecate.
In-Reply-To: <9c83cf458fc508990a834cecac3f9d8cbd74df87.1742073920.git.ludo@HIDDEN>
 ("Ludovic =?utf-8?Q?Court=C3=A8s=22's?= message of "Sat, 15 Mar 2025
 22:37:21 +0100")
References: <cover.1742073920.git.ludo@HIDDEN>
 <9c83cf458fc508990a834cecac3f9d8cbd74df87.1742073920.git.ludo@HIDDEN>
Date: Sun, 16 Mar 2025 20:49:16 +0900
Message-ID: <87iko919hf.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 77041
Cc: Tanguy Le Carrour <tanguy@HIDDEN>,
 Janneke Nieuwenhuizen <janneke@HIDDEN>, 77041 <at> debbugs.gnu.org,
 Andrew Tropin <andrew@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi,

Ludovic Court=C3=A8s <ludo@HIDDEN> writes:

> * 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.

While I think some documentation to mention that Shepherd timers can be
used instead of mcron for most cases, I do not see this as a reason to
deprecate nor remove the mcron service itself, just like we do not
remove system services when new, perhaps more modern alternatives get
added.

--=20
Thanks,
Maxim




Information forwarded to guix-patches@HIDDEN:
bug#77041; Package guix-patches. Full text available.

Message received at 77041 <at> debbugs.gnu.org:


Received: (at 77041) by debbugs.gnu.org; 16 Mar 2025 09:31:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 16 05:31:01 2025
Received: from localhost ([127.0.0.1]:45451 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ttkKh-00006p-Q0
	for submit <at> debbugs.gnu.org; Sun, 16 Mar 2025 05:31:01 -0400
Received: from relay.yourmailgateway.de ([185.244.194.184]:53971)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <pelzflorian@HIDDEN>)
 id 1ttkKd-00005f-Kv
 for 77041 <at> debbugs.gnu.org; Sun, 16 Mar 2025 05:30:57 -0400
Received: from relay01-mors.netcup.net (localhost [127.0.0.1])
 by relay01-mors.netcup.net (Postfix) with ESMTPS id 4ZFtBj0Lvxz92H7;
 Sun, 16 Mar 2025 10:30:53 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=pelzflorian.de;
 s=key2; t=1742117453;
 bh=4wdV6SD/hJGqh4sITWKPBfCnaKA8Toh9T1n3tTlMJGA=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=jOx5GobzixNO4tV2CJFQxcRO14dQbDDndl2IeeIYHHblcSz9Lr/0Dkk3/dzcBIAEp
 G/aG9gvfJa+56EjPyIMokZ+CF4faQL/i8o+AiXqAZspmpwjNqsXo21w3U/3O01VIvc
 aEA4l75EiQ1WMdbf9ww/Yofe//DjWgMClXK+vL9fXRbwLbuIzVda5m3bk9ufxOrnXy
 MmnkNJItT0B5CmevS3qHYGNkRiqzko4um//kyHUMok9IvxsrS1xZ2Zy8S3O0fIcVHR
 SbXBP0HPjKiCGmXIXl6uQdiOrNj9LvvjwCN5duDe+6dGHya6l4GGfYGJGNpEbwEJSx
 gQtkHT8si4CrA==
Received: from policy02-mors.netcup.net (unknown [46.38.225.35])
 by relay01-mors.netcup.net (Postfix) with ESMTPS id 4ZFtBh6nctz7v45;
 Sun, 16 Mar 2025 10:30:52 +0100 (CET)
Received: from mxe217.netcup.net (unknown [10.243.12.53])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by policy02-mors.netcup.net (Postfix) with ESMTPS id 4ZFtBh48Btz8sb0;
 Sun, 16 Mar 2025 10:30:52 +0100 (CET)
Received: from florianhp (ipb21a5dbf.dynamic.kabel-deutschland.de
 [178.26.93.191])
 by mxe217.netcup.net (Postfix) with ESMTPSA id DD40D84737;
 Sun, 16 Mar 2025 10:30:45 +0100 (CET)
From: "pelzflorian (Florian Pelz)" <pelzflorian@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: [bug#77041] [PATCH 16/16] DRAFT news: Add entry for mcron
 deprecation.
In-Reply-To: <218d5ad8274680771591e5d940dcc7b7e7c0aafd.1742073920.git.ludo@HIDDEN>
 ("Ludovic =?utf-8?Q?Court=C3=A8s=22's?= message of "Sat, 15 Mar 2025
 22:37:22 +0100")
References: <cover.1742073920.git.ludo@HIDDEN>
 <218d5ad8274680771591e5d940dcc7b7e7c0aafd.1742073920.git.ludo@HIDDEN>
Date: Sun, 16 Mar 2025 10:31:14 +0100
Message-ID: <87y0x5jp99.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Rspamd-Server: rspamd-worker-8404
X-Rspamd-Queue-Id: DD40D84737
X-NC-CID: RFvqAMghusYHDMs5t1lGPHJ9spuFqF+r9Q5NyABlGHdgqYxvIxvgmQ56
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 77041
Cc: Julien Lepiller <julien@HIDDEN>, 77041 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Thank you Ludo for not only transitioning Guix but also for
cleanups/refactoring here in this patch series.  Looks good to me mostly
but have not tested nor carefully checked the Scheme code.

For fstrim doc/guix.texi,
(type: shepherd-calendar-event) in the documentation might be better
expressed as =E2=80=9Ctype: Shepherd calendar event=E2=80=9D, as there is no
shepherd-calendar-event.

For fstrim, you also removed the quoting ' of lists:
-@item @code{listed-in} (default: @code{'("/etc/fstab" "/proc/self/mountinf=
o")}) (type: maybe-list-of-strings)
+@item @code{listed-in} (default: @code{("/etc/fstab" "/proc/self/mountinfo=
")}) (type: maybe-list-of-strings)

I still prefer quoting, as users need the quote in their configuration
files.

For [PATCH 15/16] services: mcron: Deprecate.
I spot one typo=C2=A0/ missing =E2=80=9Cinstead of=E2=80=9D in doc/guix.tex=
i:
+Please use the Shepherd instead mcron.

Could you add the following German translation:


--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline; filename=german-news-mcron-supersede.scm
Content-Transfer-Encoding: quoted-printable

 (entry (commit "XXX")
        (title
         (en "Scheduled job execution with mcron superseded by Shepherd
timers")
         (de "Geplante Auftragsausf=C3=BChrung mit mcron abgel=C3=B6st durch
Shepherd-Timer"))
        (body
         (en "On Guix System and Guix Home, scheduled job execution with the
mcron package is deprecated; @code{mcron-service-type} and
@code{home-mcron-service-type} are slated for removal after 2026-04-01.

As a replacement for mcron jobs, you can use Shepherd timers---a feature th=
at
appeared in version 1.0 of the Shepherd.  Run @command{info \"(guix) Schedu=
led
Job Execution\"} for more information on how to transition.")
         (de "Auf Guix System und Guix Home gilt geplante Auftragsausf=C3=
=BChrung
mit dem mcron-Paket als veraltet.  Es ist vorgesehen, @code{mcron-service-t=
ype}
und @code{home-mcron-service-type} nach dem 01.04.2026 zu entfernen.

Als Ersatz f=C3=BCr mcron-Auftr=C3=A4ge k=C3=B6nnen Sie auf Shepherd-Timer =
umsteigen=C2=A0=E2=80=93 diese
Funktion ist seit Shepherds Version 1.0 verf=C3=BCgbar.  F=C3=BChren Sie
@command{info \"(guix.de) Geplante Auftragsausf=C3=BChrung\"} aus, um weite=
re
Informationen zum Umstieg zu bekommen.")))

--=-=-=
Content-Type: text/plain


Regards,
Florian

--=-=-=--




Information forwarded to guix-patches@HIDDEN:
bug#77041; Package guix-patches. Full text available.

Message received at 77041 <at> debbugs.gnu.org:


Received: (at 77041) by debbugs.gnu.org; 15 Mar 2025 21:39:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 15 17:39:23 2025
Received: from localhost ([127.0.0.1]:43886 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ttZE2-0004XL-Iq
	for submit <at> 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 <ludo@HIDDEN>) id 1ttZD3-0004PJ-0e
 for 77041 <at> 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 <ludo@HIDDEN>)
 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: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 77041 <at> debbugs.gnu.org
Subject: [PATCH 15/16] services: mcron: Deprecate.
Date: Sat, 15 Mar 2025 22:37:21 +0100
Message-ID: <9c83cf458fc508990a834cecac3f9d8cbd74df87.1742073920.git.ludo@HIDDEN>
X-Mailer: git-send-email 2.48.1
In-Reply-To: <cover.1742073920.git.ludo@HIDDEN>
References: <cover.1742073920.git.ludo@HIDDEN>
MIME-Version: 1.0
X-Debbugs-Cc: Andrew Tropin <andrew@HIDDEN>, Janneke Nieuwenhuizen <janneke@HIDDEN>, Ludovic Courtès <ludo@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>, Tanguy Le Carrour <tanguy@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -1.4 (-)
X-Debbugs-Envelope-To: 77041
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)

* 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 <andrew@HIDDEN>
 ;;; Copyright © 2021 Xinglu Chen <public@HIDDEN>
 ;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@HIDDEN>
-;;; Copyright © 2023 Ludovic Courtès <ludo@HIDDEN>
+;;; Copyright © 2023, 2025 Ludovic Courtès <ludo@HIDDEN>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -20,6 +20,7 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (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 <ludo@HIDDEN>
+;;; Copyright © 2016-2020, 2023, 2025 Ludovic Courtès <ludo@HIDDEN>
 ;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@HIDDEN>
 ;;; Copyright © 2023 Bruno Victal <mirai@HIDDEN>
 ;;;
@@ -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.")
-- 
2.48.1





Information forwarded to andrew@HIDDEN, janneke@HIDDEN, ludo@HIDDEN, maxim.cournoyer@HIDDEN, tanguy@HIDDEN, guix-patches@HIDDEN:
bug#77041; Package guix-patches. Full text available.

Message received at 77041 <at> debbugs.gnu.org:


Received: (at 77041) by debbugs.gnu.org; 15 Mar 2025 21:39:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 15 17:39:22 2025
Received: from localhost ([127.0.0.1]:43884 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ttZE2-0004XC-4y
	for submit <at> debbugs.gnu.org; Sat, 15 Mar 2025 17:39:22 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:50218)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1ttZD3-0004PY-VU
 for 77041 <at> 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 <ludo@HIDDEN>)
 id 1ttZCy-0002jE-FN; Sat, 15 Mar 2025 17:38:16 -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=Cv1jyZhj5WsmAPH1TjhOCm8CArfONTontknGhfeI63s=; b=eUHgSKstOzKymvZw0XXG
 DONYT/d2jgZPLAUPZbLinODakCbojMyJgHAFJYYAlqvxvMppiOe8kw9ELu9s/TLMGjxTkqgpnbqVP
 3fjnpuTgOKi7V2aydxXqN2l4FIJBmju88F51lw9qWE+vRewIC2y7EObAYp9m0n2sA46Loewtg72io
 L76VeJDXtWk/c58TlL2GgwEnMebSsfVYoHZZmlW+plIKAH8q2b/f6RlFU5abpWXWdHY/2vHquql4H
 ni9fpMBQXhJkrtLRFw66bJ4hxgDms0yBJaa9Yxs/LE4U5W75wfCbnInoiqrI126pl15F4U86NtaRE
 lImCsTJX5wPhzg==;
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 77041 <at> debbugs.gnu.org
Subject: [PATCH 16/16] DRAFT news: Add entry for mcron deprecation.
Date: Sat, 15 Mar 2025 22:37:22 +0100
Message-ID: <218d5ad8274680771591e5d940dcc7b7e7c0aafd.1742073920.git.ludo@HIDDEN>
X-Mailer: git-send-email 2.48.1
In-Reply-To: <cover.1742073920.git.ludo@HIDDEN>
References: <cover.1742073920.git.ludo@HIDDEN>
MIME-Version: 1.0
X-Debbugs-Cc: Florian Pelz <pelzflorian@HIDDEN>,
 Julien Lepiller <julien@HIDDEN>
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 77041
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

* etc/news.scm: Add entry.

Change-Id: I7e096a8f137e20487f5dac5fca4ae5b05754f5cd
---
 etc/news.scm | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/etc/news.scm b/etc/news.scm
index 8e37bc8bec..368bdb567a 100644
--- a/etc/news.scm
+++ b/etc/news.scm
@@ -37,6 +37,19 @@
 (channel-news
  (version 0)
 
+ (entry (commit "XXX")
+        (title
+         (en "Scheduled job execution with mcron superseded by Shepherd
+timers"))
+        (body
+         (en "On Guix System and Guix Home, scheduled job execution with the
+mcron package is deprecated; @code{mcron-service-type} and
+@code{home-mcron-service-type} are slated for removal after 2026-04-01.
+
+As a replacement for mcron jobs, you can use Shepherd timers---a feature that
+appeared in version 1.0 of the Shepherd.  Run @command{info \"(guix) Scheduled
+Job Execution\"} for more information on how to transition.")))
+
  (entry (commit "41e62cb10c3049610dc854f1d3e9b91aebd73aed")
         (title
          (en "Removable devices now mount under @file{/run/media/$USER} instead of @file{/media}")
-- 
2.48.1





Information forwarded to pelzflorian@HIDDEN, julien@HIDDEN, guix-patches@HIDDEN:
bug#77041; Package guix-patches. Full text available.

Message received at 77041 <at> debbugs.gnu.org:


Received: (at 77041) by debbugs.gnu.org; 15 Mar 2025 21:39:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 15 17:39:22 2025
Received: from localhost ([127.0.0.1]:43882 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ttZE1-0004X4-92
	for submit <at> debbugs.gnu.org; Sat, 15 Mar 2025 17:39:21 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:55800)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1ttZCv-0004Ny-RN
 for 77041 <at> debbugs.gnu.org; Sat, 15 Mar 2025 17:38:21 -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 <ludo@HIDDEN>)
 id 1ttZCq-0002iT-Cs; Sat, 15 Mar 2025 17:38:08 -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=hfTt1YgA2yjcU7Sbmn2lFztd4qGuDA7xv+W30rWckgQ=; b=qsfihLuRmWtXWVXD8ya3
 2MfpJlHIUxiV6kBY6xasNdybKl4BKkXjhzV+X8AApg6QGowiH6bURVLYO3AhNskdPRPWU5AmtcZzP
 ATOshMD7W5qcPdAignAGSoOcdrW0U8xR+TrlxZUqsz9XG81NOukCnpcPLNuVWKOYO5gM2NE9bxf7b
 3l1Ocfyw2x2HSi/hkigTTJ0AmRqY8GEk0vCmw5T7ro1eeYqufb+nnGHOL7Dx5AQhFX+noJ5iYNCIH
 1SZqfUB/r50vcuIxpILsT2Q5GV9FdmQ91ja21PLfvVMdL++4ZIM12c6uB564gBuQQu5HN/tFqaY5W
 6eRI0HdZhN1i1w==;
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 77041 <at> debbugs.gnu.org
Subject: [PATCH 13/16] services: ganeti: Produce Shepherd timers instead of
 mcron jobs.
Date: Sat, 15 Mar 2025 22:37:19 +0100
Message-ID: <062c86dcff350447488f600a445202a35915ad10.1742073920.git.ludo@HIDDEN>
X-Mailer: git-send-email 2.48.1
In-Reply-To: <cover.1742073920.git.ludo@HIDDEN>
References: <cover.1742073920.git.ludo@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
X-Debbugs-Cc: Ludovic Courtès <ludo@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 77041
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

* gnu/services/ganeti.scm (<ganeti-watcher-configuration>)[schedule]:
Change default value to a cron string.
(ganeti-timer): New procedure.
(ganeti-watcher-jobs): Rename to…
(ganeti-watcher-service): … this.  Return Shepherd services.
(ganeti-watcher-service-type)[extensions]: Adjust accordingly.
(ganeti-cleaner-jobs): Rename to…
(ganeti-cleaner-service): … this.  Return Shepherd services.
(ganeti-cleaner-service-type)[extensions]: Adjust accordingly.
(ganeti-shepherd-services): Include the watcher and cleaner services.
(ganeti-mcron-jobs): Remove.
(ganeti-service-type)[extensions]: Adjust accordingly.
* doc/guix.texi (Virtualization Services): Update ‘schedule’
documentation.

Change-Id: Id209a3c50271203dc7190c4c6d0c0ffdf6c10875
---
 doc/guix.texi           |   7 ++-
 gnu/services/ganeti.scm | 116 +++++++++++++++++++---------------------
 2 files changed, 59 insertions(+), 64 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 7f3a7ca82a..35999db9b0 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -39775,8 +39775,11 @@ Virtualization Services
 @item @code{ganeti} (default: @code{ganeti})
 The @code{ganeti} package to use for this service.
 
-@item @code{schedule} (default: @code{'(next-second-from (next-minute (range 0 60 5)))})
-How often to run the script.  The default is every five minutes.
+@item @code{schedule} (default: @code{"*/5 * * * *"})
+When to run the script, expressed either as a string in traditional cron
+syntax or as a gexp representing a Shepherd calendar event
+(@pxref{Timers,,, shepherd, The GNU Shepherd Manual}).  The default is
+every five minutes.
 
 @item @code{rapi-ip} (default: @code{#f})
 This option needs to be specified only if the RAPI daemon is configured to use
diff --git a/gnu/services/ganeti.scm b/gnu/services/ganeti.scm
index f905ab8395..9cab6c110a 100644
--- a/gnu/services/ganeti.scm
+++ b/gnu/services/ganeti.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2020, 2022 Marius Bakke <marius@HIDDEN>
+;;; Copyright © 2025 Ludovic Courtès <ludo@HIDDEN>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -19,14 +20,11 @@
 (define-module (gnu services ganeti)
   #:use-module (gnu packages virtualization)
   #:use-module (gnu services)
-  #:use-module (gnu services mcron)
   #:use-module (gnu services shepherd)
   #:use-module (guix gexp)
   #:use-module (guix records)
-
   #:use-module (srfi srfi-1)
   #:use-module (ice-9 match)
-
   #:export (ganeti-noded-configuration
             ganeti-noded-configuration?
             ganeti-noded-configuration-ganeti
@@ -644,9 +642,8 @@ (define-record-type* <ganeti-watcher-configuration>
   (ganeti        ganeti-watcher-configuration-ganeti        ;file-like
                  (default ganeti))
   (schedule      ganeti-watcher-configuration-schedule      ;list | string
-                 (default '(next-second-from
-                            ;; Run every five minutes.
-                            (next-minute (range 0 60 5)))))
+                 ;; Run every 5 minutes.
+                 (default "*/5 * * * *"))
   (rapi-ip       ganeti-watcher-configuration-rapi-ip       ;#f | string
                  (default #f))
   (job-age       ganeti-watcher-configuration-job-age       ;integer
@@ -660,36 +657,47 @@ (define ganeti-watcher-command
   (match-lambda
     (($ <ganeti-watcher-configuration> ganeti _ rapi-ip job-age verify-disks?
                                        debug?)
-     #~(lambda ()
-         (system* #$(file-append ganeti "/sbin/ganeti-watcher")
-                  #$@(if rapi-ip
-                         #~((string-append "--rapi-ip=" #$rapi-ip))
-                         #~())
-                  #$(string-append "--job-age=" (number->string job-age))
-                  #$@(if verify-disks?
-                         #~()
-                         #~("--no-verify-disks"))
-                  #$@(if debug?
-                         #~("--debug")
-                         #~()))))))
+     #~(#$(file-append ganeti "/sbin/ganeti-watcher")
+        #$@(if rapi-ip
+               #~((string-append "--rapi-ip=" #$rapi-ip))
+               #~())
+        #$(string-append "--job-age=" (number->string job-age))
+        #$@(if verify-disks?
+               #~()
+               #~("--no-verify-disks"))
+        #$@(if debug?
+               #~("--debug")
+               #~())))))
 
-(define (ganeti-watcher-jobs config)
+(define (ganeti-timer name schedule command)
+  "Return a Shepherd timer providing NAME and running COMMAND, a list-valued
+gexp."
+  (shepherd-service
+   (provision (list name))
+   (requirement '(user-processes))
+   (modules '((shepherd service timer)))
+   (start #~(make-timer-constructor
+             #$(if (string? schedule)
+                   #~(cron-string->calendar-event #$schedule)
+                   schedule)
+             (command '(#$@command))
+             #:wait-for-termination? #t))
+   (stop #~(make-timer-destructor))
+   (documentation "Periodically run a Ganeti maintenance job.")
+   (actions (list shepherd-trigger-action))))
+
+(define (ganeti-watcher-service config)
   (match config
     (($ <ganeti-watcher-configuration> _ schedule)
-     (list
-      #~(job #$@(match schedule
-                  ((? string?)
-                   #~(#$schedule))
-                  ((? list?)
-                   #~('#$schedule)))
-             #$(ganeti-watcher-command config)
-             "ganeti-watcher")))))
+     (list (ganeti-timer 'ganeti-watcher
+                         schedule
+                         (ganeti-watcher-command config))))))
 
 (define ganeti-watcher-service-type
   (service-type (name 'ganeti-watcher)
                 (extensions
-                 (list (service-extension mcron-service-type
-                                          ganeti-watcher-jobs)))
+                 (list (service-extension shepherd-root-service-type
+                                          ganeti-watcher-service)))
                 (default-value (ganeti-watcher-configuration))
                 (description
                  "@command{ganeti-watcher} is a periodically run script that
@@ -714,34 +722,23 @@ (define-record-type* <ganeti-cleaner-configuration>
                    ;; Run the node cleaner at 02:45 every day.
                    (default "45 2 * * *")))
 
-(define ganeti-cleaner-jobs
+(define ganeti-cleaner-service
   (match-lambda
     (($ <ganeti-cleaner-configuration> ganeti master-schedule node-schedule)
-     (list
-      #~(job #$@(match master-schedule
-                  ((? string?)
-                   #~(#$master-schedule))
-                  ((? list?)
-                   #~('#$master-schedule)))
-             (lambda ()
-              (system* #$(file-append ganeti "/sbin/ganeti-cleaner")
-                       "master"))
-             "ganeti master cleaner")
-      #~(job #$@(match node-schedule
-                  ((? string?)
-                   #~(#$node-schedule))
-                  ((? list?)
-                   #~('#$node-schedule)))
-             (lambda ()
-               (system* #$(file-append ganeti "/sbin/ganeti-cleaner")
-                        "node"))
-             "ganeti node cleaner")))))
+     (list (ganeti-timer 'ganeti-master-cleaner
+                         master-schedule
+                         #~(#$(file-append ganeti "/sbin/ganeti-cleaner")
+                            "master"))
+           (ganeti-timer 'ganeti-node-cleaner
+                         node-schedule
+                         #~(#$(file-append ganeti "/sbin/ganeti-cleaner")
+                            "node"))))))
 
 (define ganeti-cleaner-service-type
   (service-type (name 'ganeti-cleaner)
                 (extensions
-                 (list (service-extension mcron-service-type
-                                          ganeti-cleaner-jobs)))
+                 (list (service-extension shepherd-root-service-type
+                                          ganeti-cleaner-service)))
                 (default-value (ganeti-cleaner-configuration))
                 (description
                  "@command{ganeti-cleaner} is a script that removes old files
@@ -804,7 +801,8 @@ (define (ganeti-activation config)
 
 (define ganeti-shepherd-services
   (match-lambda
-    (($ <ganeti-configuration> _ noded confd wconfd luxid rapi kvmd mond metad)
+    (($ <ganeti-configuration> _ noded confd wconfd luxid rapi kvmd mond metad
+                               watcher cleaner)
      (append (ganeti-noded-service noded)
              (ganeti-confd-service confd)
              (ganeti-wconfd-service wconfd)
@@ -812,13 +810,9 @@ (define ganeti-shepherd-services
              (ganeti-rapi-service rapi)
              (ganeti-kvmd-service kvmd)
              (ganeti-mond-service mond)
-             (ganeti-metad-service metad)))))
-
-(define ganeti-mcron-jobs
-  (match-lambda
-    (($ <ganeti-configuration> _ _ _ _ _ _ _ _ _ watcher cleaner)
-     (append (ganeti-watcher-jobs watcher)
-             (ganeti-cleaner-jobs cleaner)))))
+             (ganeti-metad-service metad)
+             (ganeti-watcher-service watcher)
+             (ganeti-cleaner-service cleaner)))))
 
 (define-record-type* <ganeti-os>
   ganeti-os make-ganeti-os ganeti-os?
@@ -1122,9 +1116,7 @@ (define ganeti-service-type
                        (service-extension etc-service-type
                                           ganeti-etc-service)
                        (service-extension profile-service-type
-                                          (compose list ganeti-configuration-ganeti))
-                       (service-extension mcron-service-type
-                                          ganeti-mcron-jobs)))
+                                          (compose list ganeti-configuration-ganeti))))
                 (default-value (ganeti-configuration (os %default-ganeti-os)))
                 (description
                  "Ganeti is a family of services that are designed to run
-- 
2.48.1





Information forwarded to ludo@HIDDEN, maxim.cournoyer@HIDDEN, guix-patches@HIDDEN:
bug#77041; Package guix-patches. Full text available.

Message received at 77041 <at> debbugs.gnu.org:


Received: (at 77041) by debbugs.gnu.org; 15 Mar 2025 21:39:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 15 17:39:21 2025
Received: from localhost ([127.0.0.1]:43880 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ttZE0-0004X2-P4
	for submit <at> debbugs.gnu.org; Sat, 15 Mar 2025 17:39:21 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:55776)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1ttZCr-0004Nc-HG
 for 77041 <at> debbugs.gnu.org; Sat, 15 Mar 2025 17:38:09 -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 <ludo@HIDDEN>)
 id 1ttZCm-0002hn-6D; Sat, 15 Mar 2025 17:38:04 -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=ASZ5k0dIb4ZYdG0mMlz81k+mQPqwvtTufBnDwD19o1Y=; b=W4E4tPIT86Tlj06XD/ty
 F4nofEvzVztQGJ3egSSYD36ctNp32Cdn/vSBOOZQeAjiP96MpWlqx6Rc7CHHXUN4mbvt7heVuqAVd
 R6s2XHL7eW58rt7HNlZCnCeNP4FrECuDr2fvQFwOuIayQvnbGsLlV9oAbeHw9BosS//Hnm6OrDB/K
 evf7eUzQdNQzxbYjCLzqQVHdehAkSj+teyw2zX9yMVSG6pHmTwzvh50CTaXHX2/p1qiJqmX2CWzs+
 wUUOr+6xouNG81DG5X96pn8vqzIzTU4XCICH2jZhAjDJcF8MSZd60dW3m95MB9jA+kP9fEpbO8K0R
 uJhvWh/RvqYtKA==;
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 77041 <at> debbugs.gnu.org
Subject: [PATCH 09/16] =?UTF-8?q?tests:=20ganeti:=20Remove=20unnecessary?=
 =?UTF-8?q?=20=E2=80=98begin=E2=80=99.?=
Date: Sat, 15 Mar 2025 22:37:15 +0100
Message-ID: <05bc1b0ed65b4456d6e563373deb485e15d7c22d.1742073920.git.ludo@HIDDEN>
X-Mailer: git-send-email 2.48.1
In-Reply-To: <cover.1742073920.git.ludo@HIDDEN>
References: <cover.1742073920.git.ludo@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 77041
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

* gnu/tests/ganeti.scm (run-ganeti-test): Remove ‘begin’ where
unnecessary.

Change-Id: I3a36fffdc797c9187b5ffa406f7a06985f18d29c
---
 gnu/tests/ganeti.scm | 31 ++++++++++++-------------------
 1 file changed, 12 insertions(+), 19 deletions(-)

diff --git a/gnu/tests/ganeti.scm b/gnu/tests/ganeti.scm
index 29eb354044..ce55c8e04f 100644
--- a/gnu/tests/ganeti.scm
+++ b/gnu/tests/ganeti.scm
@@ -154,9 +154,8 @@ (define* (run-ganeti-test hypervisor #:key
           (test-eq "watcher pause"
             0
             (marionette-eval
-             '(begin
-                (system* #$(file-append ganeti "/sbin/gnt-cluster")
-                         "watcher" "pause" "1h"))
+             '(system* #$(file-append ganeti "/sbin/gnt-cluster")
+                       "watcher" "pause" "1h")
              marionette))
 
           (test-assert "force-start wconfd"
@@ -174,8 +173,7 @@ (define* (run-ganeti-test hypervisor #:key
           (test-eq "gnt-cluster verify 1"
             0
             (marionette-eval
-             '(begin
-                (system* #$(file-append ganeti "/sbin/gnt-cluster") "verify"))
+             '(system* #$(file-append ganeti "/sbin/gnt-cluster") "verify")
              marionette))
 
           ;; Try stopping and starting daemons with daemon-util like
@@ -183,33 +181,29 @@ (define* (run-ganeti-test hypervisor #:key
           (test-eq "daemon-util stop-all"
             0
             (marionette-eval
-             '(begin
-                (system* #$(file-append ganeti "/lib/ganeti/daemon-util")
-                         "stop-all"))
+             '(system* #$(file-append ganeti "/lib/ganeti/daemon-util")
+                       "stop-all")
              marionette))
 
           (test-eq "daemon-util start-all"
             0
             (marionette-eval
-             '(begin
-                (system* #$(file-append ganeti "/lib/ganeti/daemon-util")
-                         "start-all"))
+             '(system* #$(file-append ganeti "/lib/ganeti/daemon-util")
+                       "start-all")
              marionette))
 
           ;; Check that the cluster is still healthy after the daemon restarts.
           (test-eq "gnt-cluster verify 2"
             0
             (marionette-eval
-             '(begin
-                (system* #$(file-append ganeti "/sbin/gnt-cluster") "verify"))
+             '(system* #$(file-append ganeti "/sbin/gnt-cluster") "verify")
              marionette))
 
           (test-eq "watcher continue"
             0
             (marionette-eval
-             '(begin
-                (system* #$(file-append ganeti "/sbin/gnt-cluster")
-                         "watcher" "continue"))
+             '(system* #$(file-append ganeti "/sbin/gnt-cluster")
+                       "watcher" "continue")
              marionette))
 
           ;; Try accessing the RAPI.
@@ -244,9 +238,8 @@ (define* (run-ganeti-test hypervisor #:key
           (test-eq "gnt-cluster destroy"
             0
             (marionette-eval
-             '(begin
-                (system* #$(file-append ganeti "/sbin/gnt-cluster")
-                         "destroy" "--yes-do-it"))
+             '(system* #$(file-append ganeti "/sbin/gnt-cluster")
+                       "destroy" "--yes-do-it")
              marionette))
 
           (test-end))))
-- 
2.48.1





Information forwarded to guix-patches@HIDDEN:
bug#77041; Package guix-patches. Full text available.

Message received at 77041 <at> debbugs.gnu.org:


Received: (at 77041) by debbugs.gnu.org; 15 Mar 2025 21:38:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 15 17:38:58 2025
Received: from localhost ([127.0.0.1]:43865 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ttZDe-0004UD-Cp
	for submit <at> debbugs.gnu.org; Sat, 15 Mar 2025 17:38:58 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:50186)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1ttZD0-0004Od-49
 for 77041 <at> debbugs.gnu.org; Sat, 15 Mar 2025 17:38:20 -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 <ludo@HIDDEN>)
 id 1ttZCu-0002io-HN; Sat, 15 Mar 2025 17:38:12 -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=kGF3ySIRxAtAsDKeidexjYNbV1CuYNkwsh7fxqP0cqs=; b=HcI/J+sROmGCnhRGUAsA
 QeHa1wB6/90UWzE254XF/VgYRrNPhm7HchtIba7kHu+iwYMScGuzKrTq/2Y8e58cQf4yjuM9ygSdg
 I6YxapXWZYlEwlA/icYBSCbMLD8uaJCnXtarNAR1+2pwnWIjiHSkb2jLNjKEh6989kMbMbQ4pZpb7
 v/y/20JJznCtVVk3b8pWLh7/4RMKt0NAoXqZ21T9QuERZV4K9mMCZ6fdC/tNohEEfDG9+FBpJIKSk
 zaI5tsl/nOAIng6kHDfStTsMv4v7c2aBcukFAySp5wOpOZOSmmaf0LiAiomhc3cA2WJQM7mi6JafI
 d7t3z3SIBg7Gqw==;
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 77041 <at> debbugs.gnu.org
Subject: [PATCH 14/16] services: virtual-build-machine: Turn GC job into a
 Shepherd timer.
Date: Sat, 15 Mar 2025 22:37:20 +0100
Message-ID: <134eeae955e072d41a212d5b0a41c43fed4edd4b.1742073920.git.ludo@HIDDEN>
X-Mailer: git-send-email 2.48.1
In-Reply-To: <cover.1742073920.git.ludo@HIDDEN>
References: <cover.1742073920.git.ludo@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 77041
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

* gnu/services/virtualization.scm (gc-service-type): New variable.
(%virtual-build-machine-operating-system): Use instead of extending
‘mcron-service-type’.

Change-Id: I56d7f9293f582269e5a34d91bf4f3edddfa844e0
---
 gnu/services/virtualization.scm | 22 ++++++++++++++++++----
 1 file changed, 18 insertions(+), 4 deletions(-)

diff --git a/gnu/services/virtualization.scm b/gnu/services/virtualization.scm
index 796b9bf86f..171915d62d 100644
--- a/gnu/services/virtualization.scm
+++ b/gnu/services/virtualization.scm
@@ -40,7 +40,6 @@ (define-module (gnu services virtualization)
   #:use-module (gnu services base)
   #:use-module (gnu services configuration)
   #:use-module (gnu services dbus)
-  #:use-module (gnu services mcron)
   #:use-module (gnu services shepherd)
   #:use-module (gnu services ssh)
   #:use-module (gnu services)
@@ -1304,6 +1303,23 @@ (define %system-log-message-destination
             (else
              '("/dev/console")))))
 
+(define gc-service-type                           ;TODO: Factorize.
+  (shepherd-service-type
+   'garbage-collection
+   (lambda _
+     (shepherd-service
+      (provision '(gc))
+      (requirement '(user-processes guix-daemon))
+      (start #~(make-timer-constructor
+                (calendar-event #:minutes '(12))
+                (command
+                 '("/run/current-system/profile/bin/guix" "gc" "-F2G"))
+                #:wait-for-termination? #t))
+      (stop #~(make-timer-constructor))
+      (actions (list shepherd-trigger-action))))
+   #t
+   (description "Periodically collect garbage.")))
+
 (define %virtual-build-machine-operating-system
   (operating-system
     (host-name "build-machine")
@@ -1336,9 +1352,7 @@ (define %virtual-build-machine-operating-system
                                (openssh openssh-sans-x)))
 
                      ;; Run GC once per hour.
-                     (simple-service 'perdiodic-gc mcron-service-type
-                                     (list #~(job "12 * * * *"
-                                                  "guix gc -F 2G")))
+                     (service gc-service-type)
 
                      (modify-services %base-services
                        ;; By default, the secret service introduces a
-- 
2.48.1





Information forwarded to guix-patches@HIDDEN:
bug#77041; Package guix-patches. Full text available.

Message received at 77041 <at> debbugs.gnu.org:


Received: (at 77041) by debbugs.gnu.org; 15 Mar 2025 21:38:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 15 17:38:58 2025
Received: from localhost ([127.0.0.1]:43863 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ttZDd-0004U6-Vq
	for submit <at> debbugs.gnu.org; Sat, 15 Mar 2025 17:38:58 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:55816)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1ttZCv-0004Nz-TL
 for 77041 <at> debbugs.gnu.org; Sat, 15 Mar 2025 17:38:19 -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 <ludo@HIDDEN>)
 id 1ttZCp-0002iK-Dg; Sat, 15 Mar 2025 17:38:07 -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=KZ7oLLkXmt5hqfPyIHODxWcEeiUl8Vy7AV/4viyIeEc=; b=IeI5z1i6FlXXm3qWypwZ
 4o9M4KSxIBSVdsSXkJ330dPIMgbImcLaVb1II/ztBt008E0K+V/TYdZlo039X8rIwxkbuwvdrGf0G
 wmYEFcYYvxtAUNO9VhBH99hLWlwy1c9OLhyyjhyjigi1SSPgaZdJlkx0nfcd3pc3ccH16FMZYIOsM
 fnzyy0JszDWiuolZlQfbnTnerCrwFSHBANIIPrZCHzsDOWHmk4xO41LFj5BhOD/0s5nkT3GHL4IwM
 N5TOgunikF7bk605zkP1dyJBMjTkfyUfz0CrWrWl8N5Efpl5HKizRc4Yvs3ZTf08uKCKwrA+bBNdl
 10JaK503ZE4LqA==;
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 77041 <at> debbugs.gnu.org
Subject: [PATCH 12/16] services: ganeti: Update to Shepherd 1.0 interface.
Date: Sat, 15 Mar 2025 22:37:18 +0100
Message-ID: <8719086cc46a85760d78bf1515b2b0684462bcb9.1742073920.git.ludo@HIDDEN>
X-Mailer: git-send-email 2.48.1
In-Reply-To: <cover.1742073920.git.ludo@HIDDEN>
References: <cover.1742073920.git.ludo@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 77041
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

* gnu/services/ganeti.scm (shepherd-wconfd-force-start-action)[procedure]:
Use ‘enable-service’ and ‘perform-service-action’ instead of ‘action’,
which was deprecated in 0.10.x and replaced in 1.0.

Change-Id: I2ba7d973b95f17f6ce093185fec7b246cf427be9
---
 gnu/services/ganeti.scm | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/gnu/services/ganeti.scm b/gnu/services/ganeti.scm
index ee72946c88..f905ab8395 100644
--- a/gnu/services/ganeti.scm
+++ b/gnu/services/ganeti.scm
@@ -329,18 +329,17 @@ (define shepherd-wconfd-force-start-action
     "Forcefully start wconfd even on non-master nodes (dangerous!).")
    (procedure #~(lambda _
                   (format #t "Forcefully starting the wconfd daemon...~%")
-                  (action 'ganeti-wconfd 'enable)
-                  (dynamic-wind
-                    (lambda ()
-                      (false-if-exception
-                       (call-with-output-file #$%wconfd-force-node-hint
-                         (lambda (port)
-                           (const #t)))))
-                    (lambda ()
-                      (action 'ganeti-wconfd 'restart))
+                  (enable-service (lookup-service 'ganeti-wconfd))
+                  (call-with-output-file #$%wconfd-force-node-hint
+                    (const #t))
+                  (catch #t
                     (lambda ()
+                      (perform-service-action (lookup-service 'ganeti-wconfd)
+                                              'restart)
+                      (delete-file #$%wconfd-force-node-hint))
+                    (lambda _
                       (delete-file #$%wconfd-force-node-hint)))
-                    #t))))
+                  #t))))
 
 (define ganeti-wconfd-service
   (match-lambda
-- 
2.48.1





Information forwarded to guix-patches@HIDDEN:
bug#77041; Package guix-patches. Full text available.

Message received at 77041 <at> debbugs.gnu.org:


Received: (at 77041) by debbugs.gnu.org; 15 Mar 2025 21:38:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 15 17:38:58 2025
Received: from localhost ([127.0.0.1]:43861 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ttZDd-0004Ty-GF
	for submit <at> debbugs.gnu.org; Sat, 15 Mar 2025 17:38:57 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:55794)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1ttZCu-0004Nl-OG
 for 77041 <at> debbugs.gnu.org; Sat, 15 Mar 2025 17:38:14 -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 <ludo@HIDDEN>)
 id 1ttZCo-0002iC-BA; Sat, 15 Mar 2025 17:38:06 -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=f578GIeB3CRy8TTnsIafTl4hBoKgVU+hOI0dI2zxvuE=; b=H6b9iBkxxyl8EG/8h6wD
 c0FSpERFrF7U7ZXOBDhbazROWpNIxz9Ze93dyKSQvKeTElhC7zYM7ugZE1SGl7/Jv4kzp2+tVMIQ5
 Cpuc3aBpzC717VKuDy6GcUBK+bDj+TkTC+xm1zXsl/lR2C4/ZSFQ/v74h0PbNc9tpdKBGsD/pH4LS
 6erm7b9rfpOY51XB6IlAUVgvWUK1XbQaXhbrUQhvKJjLK6Pa7oQAzPe7WRrJLVr3l1ZpCX0qwt6BA
 CSttI7hMVEujU/J+EC/iLjs5OAr8JA87alD5FUbwr46mEoSJiLqiz85AN8WnXXglNJ6c/DSiL6xA3
 2kl6cKlt/nTiqw==;
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 77041 <at> debbugs.gnu.org
Subject: [PATCH 11/16] tests: ganeti: Increase VM memory size.
Date: Sat, 15 Mar 2025 22:37:17 +0100
Message-ID: <56f9dea90aa68cb053ae44d598b92c47144b973f.1742073920.git.ludo@HIDDEN>
X-Mailer: git-send-email 2.48.1
In-Reply-To: <cover.1742073920.git.ludo@HIDDEN>
References: <cover.1742073920.git.ludo@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 77041
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

* gnu/tests/ganeti.scm (run-ganeti-test): Pass ‘-m 1024’ to
‘make-marionette’.

Change-Id: I82c8a0eb37c16079f1affe793afc0d8a773c62c8
---
 gnu/tests/ganeti.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/tests/ganeti.scm b/gnu/tests/ganeti.scm
index 42ed58d977..140950776e 100644
--- a/gnu/tests/ganeti.scm
+++ b/gnu/tests/ganeti.scm
@@ -117,7 +117,7 @@ (define* (run-ganeti-test hypervisor #:key
                        (gnu build marionette))
 
           (define marionette
-            (make-marionette (list #$vm)))
+            (make-marionette (list #$vm "-m" "1024")))
 
           (test-runner-current (system-test-runner #$output))
           (test-begin "ganeti")
-- 
2.48.1





Information forwarded to guix-patches@HIDDEN:
bug#77041; Package guix-patches. Full text available.

Message received at 77041 <at> debbugs.gnu.org:


Received: (at 77041) by debbugs.gnu.org; 15 Mar 2025 21:38:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 15 17:38:57 2025
Received: from localhost ([127.0.0.1]:43859 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ttZDc-0004Tt-S5
	for submit <at> debbugs.gnu.org; Sat, 15 Mar 2025 17:38:57 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:55780)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1ttZCs-0004Ng-TG
 for 77041 <at> debbugs.gnu.org; Sat, 15 Mar 2025 17:38:11 -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 <ludo@HIDDEN>)
 id 1ttZCn-0002i3-GA; Sat, 15 Mar 2025 17:38:05 -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=S+IKs4pr1pR4iSgRs+HL5omwv7CnO337JSiYV4uwBkc=; b=nU1lxllXdqPZCeapYGCp
 Ukr2+InJ3/jaZJDPiflDfa6grLCOeZG8DVYdZYOukG+mQRj5vZRbQqiRgjCGdx+0cknhw8aPrTvR3
 2F3jh8jw7mElFQkO8q1t+U5o6taOQxFDOsgd/efAtlZsNCGquLNbGMqNSJ+1MsHoDSVWI7glgeMnY
 X0QR5m/N1C5PjW6iZZ2cHivGkzw3iy2Ho8uRK4vqs5MQ8i2Jupf8xXccOJ74m4n8quyFQMGbdnQgX
 yECMYXQLp83L4lKb/DCY6zq1SYUqqDXL09OpmW9m5oW7ly4Vpu0rEqQxI+atOxujfKS0R7xFuQ36W
 FmVLo9tGUe4G2w==;
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 77041 <at> debbugs.gnu.org
Subject: [PATCH 10/16] tests: ganeti: Write system log to /dev/console.
Date: Sat, 15 Mar 2025 22:37:16 +0100
Message-ID: <20e0f3fd05f4ec2a2b62cd25c050b72ac98dba38.1742073920.git.ludo@HIDDEN>
X-Mailer: git-send-email 2.48.1
In-Reply-To: <cover.1742073920.git.ludo@HIDDEN>
References: <cover.1742073920.git.ludo@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 77041
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

* gnu/tests/ganeti.scm (%ganeti-os): Wrap in
‘operating-system-with-console-syslog’.

Change-Id: Ie86ad640ad6a7c154f5768ac4250acdd0e8940af
---
 gnu/tests/ganeti.scm | 87 ++++++++++++++++++++++----------------------
 1 file changed, 44 insertions(+), 43 deletions(-)

diff --git a/gnu/tests/ganeti.scm b/gnu/tests/ganeti.scm
index ce55c8e04f..42ed58d977 100644
--- a/gnu/tests/ganeti.scm
+++ b/gnu/tests/ganeti.scm
@@ -33,54 +33,55 @@ (define-module (gnu tests ganeti)
   #:export (%test-ganeti-kvm %test-ganeti-lxc))
 
 (define %ganeti-os
-  (operating-system
-    (host-name "gnt1")
-    (timezone "Etc/UTC")
-    (locale "en_US.UTF-8")
+  (operating-system-with-console-syslog
+   (operating-system
+     (host-name "gnt1")
+     (timezone "Etc/UTC")
+     (locale "en_US.UTF-8")
 
-    (bootloader (bootloader-configuration
-                 (bootloader grub-bootloader)
-                 (targets '("/dev/vda"))))
-    (file-systems (cons (file-system
-                          (device (file-system-label "my-root"))
-                          (mount-point "/")
-                          (type "ext4"))
-                        %base-file-systems))
-    (firmware '())
+     (bootloader (bootloader-configuration
+                  (bootloader grub-bootloader)
+                  (targets '("/dev/vda"))))
+     (file-systems (cons (file-system
+                           (device (file-system-label "my-root"))
+                           (mount-point "/")
+                           (type "ext4"))
+                         %base-file-systems))
+     (firmware '())
 
-    (packages (append (list ganeti-instance-debootstrap ganeti-instance-guix)
-                      %base-packages))
+     (packages (append (list ganeti-instance-debootstrap ganeti-instance-guix)
+                       %base-packages))
 
-    ;; The hosts file must contain a nonlocal IP for host-name.
-    (essential-services
-     (modify-services (operating-system-default-essential-services this-operating-system)
-       (hosts-service-type config => (list
-                                      (host "127.0.0.1" "localhost")
-                                      (host "::1"       "localhost")))))
-    (services
-     (append (list (service static-networking-service-type
-                            (list %qemu-static-networking))
-                   (service openssh-service-type
-                            (openssh-configuration
-                             (permit-root-login 'prohibit-password)))
+     ;; The hosts file must contain a nonlocal IP for host-name.
+     (essential-services
+      (modify-services (operating-system-default-essential-services this-operating-system)
+        (hosts-service-type config => (list
+                                       (host "127.0.0.1" "localhost")
+                                       (host "::1"       "localhost")))))
+     (services
+      (append (list (service static-networking-service-type
+                             (list %qemu-static-networking))
+                    (service openssh-service-type
+                             (openssh-configuration
+                              (permit-root-login 'prohibit-password)))
 
-                   ;; In addition, the cluster name must resolve to an IP address that
-                   ;; is not currently provisioned.
-                   (simple-service 'ganeti-host-entries hosts-service-type
-                                   (list
-                                    (host "10.0.2.15" "gnt1.example.com" '("gnt1"))
-                                    (host "192.168.254.254" "ganeti.example.com")))
+                    ;; In addition, the cluster name must resolve to an IP address that
+                    ;; is not currently provisioned.
+                    (simple-service 'ganeti-host-entries hosts-service-type
+                                    (list
+                                     (host "10.0.2.15" "gnt1.example.com" '("gnt1"))
+                                     (host "192.168.254.254" "ganeti.example.com")))
 
-                   (service ganeti-service-type
-                            (ganeti-configuration
-                             (file-storage-paths '("/srv/ganeti/file-storage"))
-                             (rapi-configuration
-                              (ganeti-rapi-configuration
-                               ;; Disable TLS so we can test the RAPI without
-                               ;; pulling in GnuTLS.
-                               (ssl? #f)))
-                             (os %default-ganeti-os))))
-             %base-services))))
+                    (service ganeti-service-type
+                             (ganeti-configuration
+                              (file-storage-paths '("/srv/ganeti/file-storage"))
+                              (rapi-configuration
+                               (ganeti-rapi-configuration
+                                ;; Disable TLS so we can test the RAPI without
+                                ;; pulling in GnuTLS.
+                                (ssl? #f)))
+                              (os %default-ganeti-os))))
+              %base-services)))))
 
 (define* (run-ganeti-test hypervisor #:key
                           (master-netdev "eth0")
-- 
2.48.1





Information forwarded to guix-patches@HIDDEN:
bug#77041; Package guix-patches. Full text available.

Message received at 77041 <at> debbugs.gnu.org:


Received: (at 77041) by debbugs.gnu.org; 15 Mar 2025 21:38:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 15 17:38:41 2025
Received: from localhost ([127.0.0.1]:43857 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ttZDM-0004S5-RC
	for submit <at> debbugs.gnu.org; Sat, 15 Mar 2025 17:38:41 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:55768)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1ttZCr-0004Nb-8q
 for 77041 <at> debbugs.gnu.org; Sat, 15 Mar 2025 17:38:09 -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 <ludo@HIDDEN>)
 id 1ttZCl-0002hZ-0E; Sat, 15 Mar 2025 17:38:03 -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=J86d6wlJyiG/xFreO7hCsXLBQMr+goEI4lMG2ZhkdWs=; b=BDnAPrh+CeL7DutLNHnc
 h7YTN0V3C86uNtJt2eUu4jX6c3NAFbknPhvO9n0ByUWGt0fPTjYF8ETHRrYh7Su3GoxFMhlBoX5Kg
 ZGg56q8oj/LBK0kNkaprz0a4t0RrD42YWW+PP0UDtLtCs7QVtR/xSii2BX3EFetdatOjmD6gHx2Gh
 NN/opgh9xpSVff+34JKEoUucd83J1gr15p2qnOkiYeYL3C3BnluBy1Hq4RtIhdjZDWlnn1z1/AV2X
 Sc/OjNqxRfu2ZmlSVR1j/qloyBRbp2MsvIpojOWGb4cUFC8efyY/y1LZ9OZO3YyhdIK7CLn2o74Yo
 9T80kys+Iak7bQ==;
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 77041 <at> debbugs.gnu.org
Subject: [PATCH 08/16] =?UTF-8?q?tests:=20Make=20=E2=80=98operating-system?=
 =?UTF-8?q?-with-console-syslog=E2=80=99=20public.?=
Date: Sat, 15 Mar 2025 22:37:14 +0100
Message-ID: <18ee01c05e82b666726f3709cad6fabafff9ae98.1742073920.git.ludo@HIDDEN>
X-Mailer: git-send-email 2.48.1
In-Reply-To: <cover.1742073920.git.ludo@HIDDEN>
References: <cover.1742073920.git.ludo@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 77041
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

* gnu/tests/install.scm (operating-system-with-console-syslog): Move to…
* gnu/tests.scm (operating-system-with-console-syslog): … here.  New
procedure.

Change-Id: I015e24525140365d09f22127d366107fdc9ca902
---
 gnu/tests.scm         | 21 +++++++++++++++++++++
 gnu/tests/install.scm | 20 --------------------
 2 files changed, 21 insertions(+), 20 deletions(-)

diff --git a/gnu/tests.scm b/gnu/tests.scm
index 84298de448..abb7076208 100644
--- a/gnu/tests.scm
+++ b/gnu/tests.scm
@@ -53,6 +53,7 @@ (define-module (gnu tests)
 
             %simple-os
             simple-operating-system
+            operating-system-with-console-syslog
 
             system-test
             system-test?
@@ -268,6 +269,26 @@ (define-syntax-rule (simple-operating-system user-services ...)
                     (services (cons* user-services ... %base-services))))
 
 
+(define (operating-system-with-console-syslog os)
+  "Return OS with a system log service that writes to /dev/console."
+  (operating-system
+    (inherit os)
+    (services
+     (modify-services (operating-system-user-services os)
+       (shepherd-system-log-service-type
+        config
+        =>
+        (system-log-configuration
+         (inherit config)
+         (message-destination
+          #~(lambda (message)
+              (let ((destinations ((default-message-destination-procedure)
+                                   message)))
+                (if (<= (system-log-message-priority message)
+                        (system-log-priority info))
+                    (cons "/dev/console" destinations)
+                    destinations))))))))))
+
 
 ;;;
 ;;; Tests.
diff --git a/gnu/tests/install.scm b/gnu/tests/install.scm
index a837637b18..8293296339 100644
--- a/gnu/tests/install.scm
+++ b/gnu/tests/install.scm
@@ -1784,26 +1784,6 @@ (define %test-xfs-root-os
 ;;; Installation through the graphical interface.
 ;;;
 
-(define (operating-system-with-console-syslog os)
-  "Return OS with a syslog service that writes to /dev/console."
-  (operating-system
-    (inherit os)
-    (services
-     (modify-services (operating-system-user-services os)
-       (shepherd-system-log-service-type
-        config
-        =>
-        (system-log-configuration
-         (inherit config)
-         (message-destination
-          #~(lambda (message)
-              (let ((destinations ((default-message-destination-procedure)
-                                   message)))
-                (if (<= (system-log-message-priority message)
-                        (system-log-priority info))
-                    (cons "/dev/console" destinations)
-                    destinations))))))))))
-
 (define %root-password "foo")
 
 (define* (gui-test-program marionette
-- 
2.48.1





Information forwarded to guix-patches@HIDDEN:
bug#77041; Package guix-patches. Full text available.

Message received at 77041 <at> debbugs.gnu.org:


Received: (at 77041) by debbugs.gnu.org; 15 Mar 2025 21:38:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 15 17:38:40 2025
Received: from localhost ([127.0.0.1]:43855 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ttZDL-0004Rr-Gb
	for submit <at> debbugs.gnu.org; Sat, 15 Mar 2025 17:38:40 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:55752)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1ttZCp-0004N0-1A
 for 77041 <at> debbugs.gnu.org; Sat, 15 Mar 2025 17:38:08 -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 <ludo@HIDDEN>)
 id 1ttZCj-0002hJ-LB; Sat, 15 Mar 2025 17:38:01 -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=5HHc/6QaCav1JRlY25M6kGMpnpvNEh7+jyVZyIqrDnQ=; b=klfn7GQ8FFZq2oDDaCN3
 031f+VT9Tpn544VB1xjhBCP1LcovSR4Bu5mSc+LatooN9+d+EsZGQFaT2cWlWUNQgy6+l+5pOqI2B
 UrMTYY12d/zrK/qyvjeoJtr9W44G+wP74BY6LtzqkehTIJ1aZ757IiMMX2io2rI966iUN9aApSO5D
 RA8TsN5xL5ZaqwE1zUUzLzeGSkGK4m3u9wuYABPQlgfDvnAu+khZOOo+ftGifIqs8UJmiCWpsa0zK
 MnXfsNTio5ArnCx/E4oJXon9LJNfm3rwO93Knvy2yNe1in6V4/gywoDZ9XOnkAJbMtxAf7xkutwgC
 vKfLYXD9MSbh6g==;
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 77041 <at> debbugs.gnu.org
Subject: [PATCH 07/16] services: wireguard: Turn monitoring into a Shepherd
 timer.
Date: Sat, 15 Mar 2025 22:37:13 +0100
Message-ID: <c8c1a15f77ffa40cec9fbb1fb735e26c2be2971f.1742073920.git.ludo@HIDDEN>
X-Mailer: git-send-email 2.48.1
In-Reply-To: <cover.1742073920.git.ludo@HIDDEN>
References: <cover.1742073920.git.ludo@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
X-Debbugs-Cc: Ludovic Courtès <ludo@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Content-Transfer-Encoding: 8bit
X-Spam-Score: -1.6 (-)
X-Debbugs-Envelope-To: 77041
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.6 (--)

* gnu/services/vpn.scm (<wireguard-configuration>)[schedule]: Change
default value.
(wireguard-monitoring-program): New procedure, with code taken from…
(wireguard-monitoring-jobs): … here.  Remove.
(wireguard-shepherd-services): New procedure, with code taken from…
(wireguard-shepherd-service): … here.  Remove.
* doc/guix.texi (VPN Services): Update.

Change-Id: I6851ddf1eb9480bdc9e6c6c6b88958ab2e6225d7
---
 doc/guix.texi        |   7 +-
 gnu/services/vpn.scm | 201 ++++++++++++++++++++++---------------------
 2 files changed, 109 insertions(+), 99 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index da1c4adc0c..7f3a7ca82a 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -35654,9 +35654,10 @@ VPN Services
 name.  Set this to @code{#t} if one or more endpoints use host names
 provided by a dynamic DNS service to keep the sessions alive.
 
-@item @code{monitor-ips-interval} (default: @code{'(next-minute (range 0 60 5))})
-The time interval at which the IP monitoring job should run, provided as
-an mcron time specification (@pxref{Guile Syntax,,,mcron}).
+@item @code{monitor-ips-interval} (default: @code{"*/5 * * * *"})
+This is the monitoring schedule, expressed as a string in traditional
+cron syntax or as a gexp evaluating to a Shepherd calendar event
+(@pxref{Timers,,, shepherd, The GNU Shepherd Manual}).
 
 @item @code{private-key} (default: @code{"/etc/wireguard/private.key"})
 The private key file for the interface.  It is automatically generated
diff --git a/gnu/services/vpn.scm b/gnu/services/vpn.scm
index 478a0d543e..e788ebef2e 100644
--- a/gnu/services/vpn.scm
+++ b/gnu/services/vpn.scm
@@ -34,7 +34,6 @@ (define-module (gnu services vpn)
   #:use-module (gnu services)
   #:use-module (gnu services configuration)
   #:use-module (gnu services dbus)
-  #:use-module (gnu services mcron)
   #:use-module (gnu services shepherd)
   #:use-module (gnu system shadow)
   #:use-module (gnu packages admin)
@@ -43,6 +42,7 @@ (define-module (gnu services vpn)
   #:use-module (guix packages)
   #:use-module (guix records)
   #:use-module (guix gexp)
+  #:use-module (guix diagnostics)
   #:use-module (guix i18n)
   #:use-module (guix deprecation)
   #:use-module (srfi srfi-1)
@@ -756,7 +756,7 @@ (define-record-type* <wireguard-configuration>
   (monitor-ips?           wireguard-configuration-monitor-ips? ;boolean
                           (default #f))
   (monitor-ips-interval   wireguard-configuration-monitor-ips-interval
-                          (default '(next-minute (range 0 60 5)))) ;string | list
+                          (default "*/5 * * * *"))       ;string | list
   (pre-up                 wireguard-configuration-pre-up ;list of strings
                           (default '()))
   (post-up                wireguard-configuration-post-up ;list of strings
@@ -916,117 +916,126 @@ (define (endpoint-host-names peers)
          '()
          peers)))
 
-(define (wireguard-shepherd-service config)
+(define (wireguard-monitoring-program config)
   (match-record config <wireguard-configuration>
-    (wireguard interface)
+    (interface monitor-ips-interval peers)
+    (let ((host-names (endpoint-host-names peers)))
+      (when (null? host-names)
+        (warning (G_ "'monitor-ips?' is #t but no host name to monitor~%")))
+
+      ;; Loosely based on WireGuard's own 'reresolve-dns.sh' shell script
+      ;; (see: https://raw.githubusercontent.com/WireGuard/wireguard-tools/
+      ;; master/contrib/reresolve-dns/reresolve-dns.sh).
+      (program-file
+       (format #f "wireguard-~a-monitoring" interface)
+       (with-imported-modules (source-module-closure
+                               '((gnu services herd)
+                                 (guix build utils)))
+         #~(begin
+             (use-modules (gnu services herd)
+                          (guix build utils)
+                          (ice-9 popen)
+                          (ice-9 match)
+                          (ice-9 textual-ports)
+                          (srfi srfi-1)
+                          (srfi srfi-26))
+
+             (define (resolve-host name)
+               "Return the IP address resolved from NAME."
+               (let* ((ai (car (getaddrinfo name)))
+                      (sa (addrinfo:addr ai)))
+                 (inet-ntop (sockaddr:fam sa)
+                            (sockaddr:addr sa))))
+
+             (define wg #$(file-append wireguard-tools "/bin/wg"))
+
+             #$(procedure-source strip-port/maybe)
+
+             (define service-name
+               '#$(wireguard-service-name interface))
+
+             (when (live-service-running
+                    (current-service service-name))
+               (let* ((pipe (open-pipe* OPEN_READ wg "show"
+                                        #$interface "endpoints"))
+                      (lines (string-split (get-string-all pipe)
+                                           #\newline))
+                      ;; IPS is an association list mapping
+                      ;; public keys to IP addresses.
+                      (ips (map (match-lambda
+                                  ((public-key ip)
+                                   (cons public-key
+                                         (strip-port/maybe ip))))
+                                (map (cut string-split <> #\tab)
+                                     (remove string-null?
+                                             lines)))))
+                 (close-pipe pipe)
+                 (for-each
+                  (match-lambda
+                    ((key . host-name)
+                     (let ((resolved-ip (resolve-host
+                                         (strip-port/maybe
+                                          host-name)))
+                           (current-ip (assoc-ref ips key)))
+                       (unless (string=? resolved-ip current-ip)
+                         (format #t "resetting `~a' peer \
+endpoint to `~a' due to stale IP (`~a' instead of `~a')~%"
+                                 key host-name
+                                 current-ip resolved-ip)
+                         (invoke wg "set" #$interface "peer" key
+                                 "endpoint" host-name)))))
+                  '#$host-names)))))))))
+
+(define (wireguard-shepherd-services config)
+  (match-record config <wireguard-configuration>
+    (wireguard interface monitor-ips? monitor-ips-interval)
     (let ((wg-quick (file-append wireguard "/bin/wg-quick"))
           (auto-start? (wireguard-configuration-auto-start? config))
-          (config (wireguard-configuration-file config)))
-      (list (shepherd-service
-             (requirement '(networking))
+          (config-file (wireguard-configuration-file config)))
+      (define monitoring-service
+        (and monitor-ips?
+             (shepherd-service
+              (provision (list (symbol-append
+                                (wireguard-service-name interface)
+                                '-monitoring)))
+              (requirement (list 'user-processes
+                                 (wireguard-service-name interface)))
+              (modules '((shepherd service timer)))
+              (start #~(make-timer-constructor
+                        #$(if (string? monitor-ips-interval)
+                              #~(cron-string->calendar-event
+                                 #$monitor-ips-interval)
+                              monitor-ips-interval)
+                        (command '(#$(wireguard-monitoring-program config)))
+                        #:wait-for-termination? #t))
+              (stop #~(make-timer-destructor))
+              (documentation "Monitor the Wireguard VPN tunnel.")
+              (actions (list shepherd-trigger-action)))))
+
+      (cons (shepherd-service
+             (requirement '(networking user-processes))
              (provision (list (wireguard-service-name interface)))
              (start #~(lambda _
-                       (invoke #$wg-quick "up" #$config)))
+                        (invoke #$wg-quick "up" #$config-file)))
              (stop #~(lambda _
-                       (invoke #$wg-quick "down" #$config)
+                       (invoke #$wg-quick "down" #$config-file)
                        #f))                       ;stopped!
-             (actions (list (shepherd-configuration-action config)))
+             (actions (list (shepherd-configuration-action config-file)))
              (auto-start? auto-start?)
-             (documentation "Run the Wireguard VPN tunnel"))))))
-
-(define (wireguard-monitoring-jobs config)
-  ;; Loosely based on WireGuard's own 'reresolve-dns.sh' shell script (see:
-  ;; https://raw.githubusercontent.com/WireGuard/wireguard-tools/
-  ;; master/contrib/reresolve-dns/reresolve-dns.sh).
-  (match-record config <wireguard-configuration>
-    (interface monitor-ips? monitor-ips-interval peers)
-    (let ((host-names (endpoint-host-names peers)))
-      (if monitor-ips?
-          (if (null? host-names)
-              (begin
-                (warn "monitor-ips? is #t but no host name to monitor")
-                '())
-              ;; The mcron monitor job may be a string or a list; ungexp strips
-              ;; one quote level, which must be added back when a list is
-              ;; provided.
-              (list
-               #~(job
-                  (if (string? #$monitor-ips-interval)
-                      #$monitor-ips-interval
-                      '#$monitor-ips-interval)
-                  #$(program-file
-                     (format #f "wireguard-~a-monitoring" interface)
-                     (with-imported-modules (source-module-closure
-                                             '((gnu services herd)
-                                               (guix build utils)))
-                       #~(begin
-                           (use-modules (gnu services herd)
-                                        (guix build utils)
-                                        (ice-9 popen)
-                                        (ice-9 match)
-                                        (ice-9 textual-ports)
-                                        (srfi srfi-1)
-                                        (srfi srfi-26))
-
-                           (define (resolve-host name)
-                             "Return the IP address resolved from NAME."
-                             (let* ((ai (car (getaddrinfo name)))
-                                    (sa (addrinfo:addr ai)))
-                               (inet-ntop (sockaddr:fam sa)
-                                          (sockaddr:addr sa))))
-
-                           (define wg #$(file-append wireguard-tools "/bin/wg"))
-
-                           #$(procedure-source strip-port/maybe)
-
-                           (define service-name '#$(wireguard-service-name
-                                                    interface))
-
-                           (when (live-service-running
-                                  (current-service service-name))
-                             (let* ((pipe (open-pipe* OPEN_READ wg "show"
-                                                      #$interface "endpoints"))
-                                    (lines (string-split (get-string-all pipe)
-                                                         #\newline))
-                                    ;; IPS is an association list mapping
-                                    ;; public keys to IP addresses.
-                                    (ips (map (match-lambda
-                                                ((public-key ip)
-                                                 (cons public-key
-                                                       (strip-port/maybe ip))))
-                                              (map (cut string-split <> #\tab)
-                                                   (remove string-null?
-                                                           lines)))))
-                               (close-pipe pipe)
-                               (for-each
-                                (match-lambda
-                                  ((key . host-name)
-                                   (let ((resolved-ip (resolve-host
-                                                       (strip-port/maybe
-                                                        host-name)))
-                                         (current-ip (assoc-ref ips key)))
-                                     (unless (string=? resolved-ip current-ip)
-                                       (format #t "resetting `~a' peer \
-endpoint to `~a' due to stale IP (`~a' instead of `~a')~%"
-                                               key host-name
-                                               current-ip resolved-ip)
-                                       (invoke wg "set" #$interface "peer" key
-                                               "endpoint" host-name)))))
-                                '#$host-names)))))))))
-          '()))))                     ;monitor-ips? is #f
+             (documentation "Run the Wireguard VPN tunnel"))
+            (or (and=> monitoring-service list)
+                '())))))
 
 (define wireguard-service-type
   (service-type
    (name 'wireguard)
    (extensions
     (list (service-extension shepherd-root-service-type
-                             wireguard-shepherd-service)
+                             wireguard-shepherd-services)
           (service-extension activation-service-type
                              wireguard-activation)
           (service-extension profile-service-type
                              (compose list
-                                      wireguard-configuration-wireguard))
-          (service-extension mcron-service-type
-                             wireguard-monitoring-jobs)))
+                                      wireguard-configuration-wireguard))))
    (description "Set up Wireguard @acronym{VPN, Virtual Private Network}
 tunnels.")))
-- 
2.48.1





Information forwarded to ludo@HIDDEN, maxim.cournoyer@HIDDEN, guix-patches@HIDDEN:
bug#77041; Package guix-patches. Full text available.

Message received at 77041 <at> debbugs.gnu.org:


Received: (at 77041) by debbugs.gnu.org; 15 Mar 2025 21:38:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 15 17:38:39 2025
Received: from localhost ([127.0.0.1]:43853 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ttZDK-0004Rk-RO
	for submit <at> debbugs.gnu.org; Sat, 15 Mar 2025 17:38:39 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:55764)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1ttZCp-0004N1-2r
 for 77041 <at> debbugs.gnu.org; Sat, 15 Mar 2025 17:38:07 -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 <ludo@HIDDEN>)
 id 1ttZCi-0002hA-Lj; Sat, 15 Mar 2025 17:38:00 -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=CPnZxR/pohpAunTFKidIoJ7AjLUZeZDa/uHrJIQ6+gA=; b=r/HdSTKbPowD796gtBE7
 hQJksK/Ig0gRiVeuY1XLauNkOuFSDzIkcVQOFl3Tu+XX+gGdpX8bEDlVIlBUgxoWuHQcdpJITacIL
 kpZGCiYd+1PEii+z+vFwJfiB8ukjtUZLScd6EpvK3KVrRzmfED9nvU5SWGx+HKFWXLSXbn9YIzsZA
 ZOrKdTkaRbq9jZ5ImC9yFYTuvHKnDVyUxanXxIswmKrZO8DHr8pO4TskohVb1UlFRN62IqDC0xz2m
 vTPD+0RVCLBwHQfMdIyzYBFdUwj5hXKH7LfaLbmQVWecy9m7FuY8DP9C65lErDYAh+uTVzF4bXtB5
 Zzs5++mV+ShQlg==;
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 77041 <at> debbugs.gnu.org
Subject: [PATCH 06/16] services: certbot: Turn into a Shepherd timer.
Date: Sat, 15 Mar 2025 22:37:12 +0100
Message-ID: <52a1dd45cb6686b3d13f8b143a0d8bcbf2b6aaab.1742073920.git.ludo@HIDDEN>
X-Mailer: git-send-email 2.48.1
In-Reply-To: <cover.1742073920.git.ludo@HIDDEN>
References: <cover.1742073920.git.ludo@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 77041
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

* gnu/services/certbot.scm (certbot-renewal-jobs): Rename to…
(certbot-renewal-shepherd-services): … this.  Return a list of Shepherd
services, including ‘renew-certbot-certificates’, formally defined…
(certbot-renewal-one-shot): … here.  Remove.
(certbot-service-type): Adjust accordingly.

Change-Id: I25ad9fc1277f4f6f948ab5fce7c6626f22591d10
---
 gnu/services/certbot.scm | 93 +++++++++++++++++++++-------------------
 1 file changed, 50 insertions(+), 43 deletions(-)

diff --git a/gnu/services/certbot.scm b/gnu/services/certbot.scm
index b276c49e0f..d6c7d175ff 100644
--- a/gnu/services/certbot.scm
+++ b/gnu/services/certbot.scm
@@ -27,7 +27,6 @@ (define-module (gnu services certbot)
   #:use-module (gnu services)
   #:use-module (gnu services base)
   #:use-module (gnu services shepherd)
-  #:use-module (gnu services mcron)
   #:use-module (gnu services web)
   #:use-module (gnu system shadow)
   #:use-module (gnu packages tls)
@@ -220,46 +219,56 @@ (define certbot-command
                '#$commands)
               (exit script-code))))))))
 
-(define (certbot-renewal-jobs config)
-  (list
-   ;; Attempt to renew the certificates twice per day, at a random minute
-   ;; within the hour.  See https://eff-certbot.readthedocs.io/.
-   #~(job '(next-minute-from (next-hour '(0 12)) (list (random 60)))
-          #$(certbot-command config))))
+(define (certbot-renewal-shepherd-services config)
+  (list (shepherd-service
+         (provision '(certbot-certificate-renewal))
+         (requirement '(user-processes nginx))
+         (modules '((shepherd service timer)))
+         (start #~(make-timer-constructor
+                   ;; Attempt to renew the certificates twice per day.  See
+                   ;; https://eff-certbot.readthedocs.io/.
+                   (calendar-event #:minutes '(22) #:hours '(0 12))
+                   (command '(#$(certbot-command config)))
+                   #:wait-for-termination? #t))
+         (stop #~(make-timer-destructor))
+         (documentation "Periodically run the 'certbot' command to renew X.509
+certificates.")
+         (actions
+          (list shepherd-trigger-action
+                (shepherd-configuration-action (certbot-command config)))))
 
-(define (certbot-renewal-one-shot config)
-  (list
-   ;; Renew certificates when the system first starts. This is a one-shot
-   ;; service, because the mcron configuration will take care of running this
-   ;; periodically. This is most useful the very first time the system starts,
-   ;; to overwrite our self-signed certificates as soon as possible without
-   ;; user intervention.
-   (shepherd-service
-    (provision '(renew-certbot-certificates))
-    (requirement '(nginx))
-    (one-shot? #t)
-    (start #~(lambda _
-               ;; This needs the network, but there's no reliable way to know
-               ;; if the network is up other than trying. If we fail due to a
-               ;; connection error we retry a number of times in the hope that
-               ;; the network comes up soon.
-               (let loop ((attempt 0))
-                 (let ((code (status:exit-val
-                              (system* #$(certbot-command config)))))
-                   (cond
-                    ((and (= code 2)      ; Exit code 2 means connection error
-                          (< attempt 12)) ; Arbitrarily chosen max attempts
-                     (sleep 10)           ; Arbitrarily chosen retry delay
-                     (loop (1+ attempt)))
-                    ((zero? code)
-                     ;; Success!
-                     #t)
-                    (else
-                     ;; Failure.
-                     #f))))))
-    (auto-start? #t)
-    (documentation "Call certbot to renew certificates.")
-    (actions (list (shepherd-configuration-action (certbot-command config)))))))
+        ;; Renew certificates when the system first starts. This is a one-shot
+        ;; service, because the timer above takes care of running this
+        ;; periodically.  This is most useful the very first time the system
+        ;; starts, to overwrite our self-signed certificates as soon as
+        ;; possible without user intervention.
+        (shepherd-service
+         (provision '(renew-certbot-certificates))
+         (requirement '(user-processes nginx))
+         (one-shot? #t)
+         (start #~(lambda _
+                    ;; This needs the network, but there's no reliable way to know
+                    ;; if the network is up other than trying. If we fail due to a
+                    ;; connection error we retry a number of times in the hope that
+                    ;; the network comes up soon.
+                    (let loop ((attempt 0))
+                      (let ((code (status:exit-val
+                                   (system* #$(certbot-command config)))))
+                        (cond
+                         ((and (= code 2) ; Exit code 2 means connection error
+                               (< attempt 12)) ; Arbitrarily chosen max attempts
+                          (sleep 10)          ; Arbitrarily chosen retry delay
+                          (loop (1+ attempt)))
+                         ((zero? code)
+                          ;; Success!
+                          #t)
+                         (else
+                          ;; Failure.
+                          #f))))))
+         (auto-start? #t)
+         (documentation "Run 'certbot' to renew certificates at boot time.")
+         (actions
+          (list (shepherd-configuration-action (certbot-command config)))))))
 
 (define (generate-certificate-gexp certbot-cert-directory rsa-key-size)
   (match-lambda
@@ -354,10 +363,8 @@ (define certbot-service-type
                                           (compose list certbot-configuration-package))
                        (service-extension activation-service-type
                                           certbot-activation)
-                       (service-extension mcron-service-type
-                                          certbot-renewal-jobs)
                        (service-extension shepherd-root-service-type
-                                          certbot-renewal-one-shot)))
+                                          certbot-renewal-shepherd-services)))
                 (compose concatenate)
                 (extend (lambda (config additional-certificates)
                           (certbot-configuration
-- 
2.48.1





Information forwarded to guix-patches@HIDDEN:
bug#77041; Package guix-patches. Full text available.

Message received at 77041 <at> debbugs.gnu.org:


Received: (at 77041) by debbugs.gnu.org; 15 Mar 2025 21:38:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 15 17:38:24 2025
Received: from localhost ([127.0.0.1]:43847 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ttZD3-0004Q7-3W
	for submit <at> debbugs.gnu.org; Sat, 15 Mar 2025 17:38:24 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:53296)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1ttZCk-0004M3-MR
 for 77041 <at> debbugs.gnu.org; Sat, 15 Mar 2025 17:38:03 -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 <ludo@HIDDEN>)
 id 1ttZCf-0002gb-B0; Sat, 15 Mar 2025 17:37:57 -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=4n7zwMmIzO/RMLdlHaCsGGJZjAAD0aks+n0PHo6TS5s=; b=IhCCzPy1aHSMgBot1fiK
 bdrarpNIxre/Txlq2yfx1FGfeBFhuHeWkD1FmscpSWUUZtg0FJOdPUAgkxvJhtQspzRHSPpwr9rtg
 6fR8pLPDPsHfIuWl1W8yMNbiDj6+cw27i2VaKVeiJFEtRjQx1pOOMTdxIaqouptpzNZhSvk8Mtni7
 HE3S0ebOxdjRN9Gh6hsD1SrRJfWVuXW4AFsEW2KTkL/mtB4hHjBWCjUNwYZN9R6Tj4AGGK+jnbYxc
 bunjLn/hn4fs2XvV4TXUZkeGgF9Ha/OQ+5WDMz49JelXofpmTHf0zhUy9DOBhU14CWoCV8bh3Mf1p
 WXtqfE46UKzlgQ==;
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 77041 <at> debbugs.gnu.org
Subject: [PATCH 05/16] services: fstrim: Turn into a Shepherd timer.
Date: Sat, 15 Mar 2025 22:37:11 +0100
Message-ID: <3fa51ca5c51d0cd271420d7387202770541f6078.1742073920.git.ludo@HIDDEN>
X-Mailer: git-send-email 2.48.1
In-Reply-To: <cover.1742073920.git.ludo@HIDDEN>
References: <cover.1742073920.git.ludo@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
X-Debbugs-Cc: Ludovic Courtès <ludo@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 77041
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

* gnu/services/linux.scm (mcron-time?): Remove.
(shepherd-calendar-event?): New procedure.
(fstrim-configuration)[schedule]: Change type to
‘shepherd-calendar-event’ and update docstring.
(fstrim-mcron-job): Rename to…
(fstrim-shepherd-services): … this.  Return a list of Shepherd services.
(fstrim-service-type): Adjust accordingly.
* doc/guix.texi (Linux Services): Update.

Change-Id: I9a7433cb15a1f4600470a915769d612e6e644dd8
---
 doc/guix.texi          | 16 +++++++++-----
 gnu/services/linux.scm | 50 +++++++++++++++++++++++-------------------
 2 files changed, 37 insertions(+), 29 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index e45e8a9979..da1c4adc0c 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -42019,6 +42019,7 @@ Linux Services
 @end defvar
 
 @c %start of fragment
+
 @deftp {Data Type} fstrim-configuration
 Available @code{fstrim-configuration} fields are:
 
@@ -42026,13 +42027,13 @@ Linux Services
 @item @code{package} (default: @code{util-linux}) (type: file-like)
 The package providing the @command{fstrim} command.
 
-@item @code{schedule} (default: @code{"0 0 * * 0"}) (type: mcron-time)
-Schedule for launching @command{fstrim}.  This can be a procedure, a
-list or a string.  For additional information, see @ref{Guile
-Syntax,,Job specification,mcron,the mcron manual}.  By default this is
-set to run weekly on Sunday at 00:00.
+@item @code{schedule} (default: @code{"0 0 * * 0"}) (type: shepherd-calendar-event)
+Schedule for launching @command{fstrim}, expressed as a string in
+traditional cron syntax or as a gexp evaluating to a Shepherd calendar
+event (@pxref{Timers,,, shepherd,The GNU Shepherd Manual}).  By default
+this is set to run weekly on Sunday at 00:00.
 
-@item @code{listed-in} (default: @code{'("/etc/fstab" "/proc/self/mountinfo")}) (type: maybe-list-of-strings)
+@item @code{listed-in} (default: @code{("/etc/fstab" "/proc/self/mountinfo")}) (type: maybe-list-of-strings)
 List of files in fstab or kernel mountinfo format.  All missing or empty
 files are silently ignored.  The evaluation of the list @emph{stops}
 after the first non-empty file.  File systems with
@@ -42049,7 +42050,10 @@ Linux Services
 more information).
 
 @end table
+
 @end deftp
+
+
 @c %end of fragment
 
 @cindex modprobe
diff --git a/gnu/services/linux.scm b/gnu/services/linux.scm
index b22dbeefa0..d7aee1b82e 100644
--- a/gnu/services/linux.scm
+++ b/gnu/services/linux.scm
@@ -34,7 +34,6 @@ (define-module (gnu services linux)
   #:use-module (gnu services admin)
   #:use-module (gnu services base)
   #:use-module (gnu services configuration)
-  #:use-module (gnu services mcron)
   #:use-module (gnu services shepherd)
   #:use-module (gnu packages linux)
   #:use-module (srfi srfi-1)
@@ -196,8 +195,8 @@ (define earlyoom-service-type
 ;;; fstrim
 ;;;
 
-(define (mcron-time? x)
-  (or (procedure? x) (string? x) (list? x)))
+(define (shepherd-calendar-event? x)
+  (or (string? x) (gexp? x)))
 
 (define-maybe list-of-strings (prefix fstrim-))
 
@@ -216,11 +215,11 @@ (define-configuration fstrim-configuration
     "The package providing the @command{fstrim} command."
     empty-serializer)
   (schedule
-   (mcron-time "0 0 * * 0")
-   "Schedule for launching @command{fstrim}.  This can be a procedure, a list
-or a string.  For additional information, see @ref{Guile Syntax,,
-Job specification, mcron, the mcron manual}.  By default this is set to run
-weekly on Sunday at 00:00."
+   (shepherd-calendar-event "0 0 * * 0")
+   "Schedule for launching @command{fstrim}, expressed as a string in
+traditional cron syntax or as a gexp evaluating to a Shepherd calendar
+event (@pxref{Timers,,, shepherd, The GNU Shepherd Manual}).  By default this
+is set to run weekly on Sunday at 00:00."
    empty-serializer)
   ;; The following are fstrim-related options.
   (listed-in
@@ -251,26 +250,31 @@ (define (serialize-fstrim-configuration config)
                   rcons
                   fstrim-configuration-fields))
 
-(define (fstrim-mcron-job config)
-  (match-record config <fstrim-configuration> (package schedule)
-    #~(job
-       ;; Note: The “if” below is to ensure that
-       ;; lists are ungexp'd correctly since @var{schedule}
-       ;; can be either a procedure, a string or a list.
-       #$(if (list? schedule)
-             #~'(#$@schedule)
-             schedule)
-       (lambda ()
-         (system* #$(file-append package "/sbin/fstrim")
-                  #$@(serialize-fstrim-configuration config)))
-       "fstrim")))
+(define (fstrim-shepherd-services config)
+  (match-record config <fstrim-configuration>
+    (package schedule)
+    (list (shepherd-service
+           (provision '(fstrim))
+           (requirement '(user-processes))
+           (modules '((shepherd service timer)))
+           (start #~(make-timer-constructor
+                     #$(if (string? schedule)
+                           #~(cron-string->calendar-event #$schedule)
+                           schedule)
+                     (command
+                      (list #$(file-append package "/sbin/fstrim")
+                            #$@(serialize-fstrim-configuration config)))
+                     #:wait-for-termination? #t))
+           (stop #~(make-timer-destructor))
+           (documentation "Periodically run the 'fstrim' command.")
+           (actions (list shepherd-trigger-action))))))
 
 (define fstrim-service-type
   (service-type
    (name 'fstrim)
    (extensions
-    (list (service-extension mcron-service-type
-                             (compose list fstrim-mcron-job))))
+    (list (service-extension shepherd-root-service-type
+                             fstrim-shepherd-services)))
    (description "Discard unused blocks from file systems.")
    (default-value (fstrim-configuration))))
 
-- 
2.48.1





Information forwarded to ludo@HIDDEN, maxim.cournoyer@HIDDEN, guix-patches@HIDDEN:
bug#77041; Package guix-patches. Full text available.

Message received at 77041 <at> debbugs.gnu.org:


Received: (at 77041) by debbugs.gnu.org; 15 Mar 2025 21:38:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 15 17:38:21 2025
Received: from localhost ([127.0.0.1]:43843 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ttZCy-0004PQ-4f
	for submit <at> debbugs.gnu.org; Sat, 15 Mar 2025 17:38:20 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:53280)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1ttZCj-0004Lo-2h
 for 77041 <at> debbugs.gnu.org; Sat, 15 Mar 2025 17:38:01 -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 <ludo@HIDDEN>)
 id 1ttZCd-0002gQ-Ko; Sat, 15 Mar 2025 17:37:55 -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=l4JVBgpTFUvjF2wVzspUV72xkD12SP8VYV0Bj+Bh2kA=; b=hBQT0Z2oXjrC2/ZdyjC/
 jA/sznHLXGCDhLsOTT6/72/qQ54tTvg0GVqFxYEGi493ttzJFozrQLRwFbAFJ3XxU4+Xa+hY/ujb0
 drVG+2+tJU46dKxHDAA9avTd1Li7G1dgL2CJlcm5JEU/E0rq4rf7L11mF/nHCxy7LMppL40Pdxu2p
 D2ao/LDrdZYpSGjOfly9OsVfgCfQ3aYD4xBe0k7RbXh+HNn9SBDyuJdcVn5uISmzl4Akee5OJtzDE
 xjVCad/m3qLsM/2ME2PeMjN0WRNuXcbReanvPxNF6uWVDhmW2aioAdkwY1jDImWVHY5uemzE2ucHg
 HF4eH2XhodsP3A==;
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 77041 <at> debbugs.gnu.org
Subject: [PATCH 04/16] services: package-database: Turn into a Shepherd timer.
Date: Sat, 15 Mar 2025 22:37:10 +0100
Message-ID: <1344bace2389f90a2aa26834ab4b0528e55e2c30.1742073920.git.ludo@HIDDEN>
X-Mailer: git-send-email 2.48.1
In-Reply-To: <cover.1742073920.git.ludo@HIDDEN>
References: <cover.1742073920.git.ludo@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
X-Debbugs-Cc: Ludovic Courtès <ludo@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 77041
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

* gnu/services/admin.scm (package-database-mcron-jobs): Rename to…
(package-database-shepherd-services): … this.  Return a shepherd
service.
(package-database-service-type): Update accordingly.
* doc/guix.texi (File Search Services): Update documentation of the
‘schedule’ field.

Change-Id: Id7b4c5cff95a7117dca7d95af37db7389bb5ca92
---
 doc/guix.texi          |  7 ++++---
 gnu/services/admin.scm | 34 ++++++++++++++++++++++++----------
 2 files changed, 28 insertions(+), 13 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index ae7b08ad23..e45e8a9979 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -27194,9 +27194,10 @@ File Search Services
 The Guix package to use.
 
 @item @code{schedule} (default: @code{%default-package-database-update-schedule})
-String or G-exp denoting an mcron schedule for the periodic
-@command{guix locate --update} job (@pxref{Guile Syntax,,, mcron,
-GNU@tie{}mcron}).
+This is the schedule of the periodic @command{guix locate --update} job,
+expressed as a string in traditional cron syntax or as a gexp evaluating
+to a Shepherd calendar event (@pxref{Timers,,, shepherd, The GNU
+Shepherd Manual}).
 
 @item @code{method} (default: @code{'store})
 Indexing method for @command{guix locate}.  The default value,
diff --git a/gnu/services/admin.scm b/gnu/services/admin.scm
index b73accc4af..e473794043 100644
--- a/gnu/services/admin.scm
+++ b/gnu/services/admin.scm
@@ -529,23 +529,37 @@ (define-configuration/no-serialization package-database-configuration
             "G-exp denoting the channels to use when updating the database
 (@pxref{Channels})."))
 
-(define (package-database-mcron-jobs configuration)
+(define (package-database-shepherd-services configuration)
   (match-record configuration <package-database-configuration>
     (package schedule method channels)
     (let ((channels (scheme-file "channels.scm" channels)))
-      (list #~(job #$schedule
-                   ;; XXX: The whole thing's running as "root" just because it
-                   ;; needs write access to /var/cache/guix/locate.
-                   (string-append #$(file-append package "/bin/guix")
-                                  " time-machine -C " #$channels
-                                  " -- locate --update --method="
-                                  #$(symbol->string method)))))))
+      (list (shepherd-service
+             (provision '(package-database-update))
+             (requirement '(user-processes guix-daemon))
+             (modules '((shepherd service timer)))
+             ;; XXX: The whole thing's running as "root" just because it needs
+             ;; write access to /var/cache/guix/locate.
+             (start #~(make-timer-constructor
+                       #$(if (string? schedule)
+                             #~(cron-string->calendar-event #$schedule)
+                             schedule)
+                       (command '(#$(file-append package "/bin/guix")
+                                  "time-machine" "-C" #$channels
+                                  "--" "locate" "--update"
+                                  #$(string-append
+                                     "--method=" (symbol->string method))))
+                       #:wait-for-termination? #t))
+             (stop #~(make-timer-destructor))
+             (documentation
+              "Periodically update the system-wide package database that can
+be queried by the 'guix locate' command.")
+             (actions (list shepherd-trigger-action)))))))
 
 (define package-database-service-type
   (service-type
    (name 'package-database)
-   (extensions (list (service-extension mcron-service-type
-                                        package-database-mcron-jobs)))
+   (extensions (list (service-extension shepherd-root-service-type
+                                        package-database-shepherd-services)))
    (description
     "Periodically update the package database used by the @code{guix locate} command,
 which lets you search for packages that provide a given file.")
-- 
2.48.1





Information forwarded to ludo@HIDDEN, maxim.cournoyer@HIDDEN, guix-patches@HIDDEN:
bug#77041; Package guix-patches. Full text available.

Message received at 77041 <at> debbugs.gnu.org:


Received: (at 77041) by debbugs.gnu.org; 15 Mar 2025 21:38:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 15 17:38:16 2025
Received: from localhost ([127.0.0.1]:43837 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ttZCv-0004Ol-FS
	for submit <at> debbugs.gnu.org; Sat, 15 Mar 2025 17:38:15 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:53264)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1ttZCi-0004Lj-LD
 for 77041 <at> debbugs.gnu.org; Sat, 15 Mar 2025 17:38:00 -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 <ludo@HIDDEN>)
 id 1ttZCc-0002gH-Pf; Sat, 15 Mar 2025 17:37:54 -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=9eL9AEjaF2tnAIBILCGkih41DWt5i+SsLqMRM5LtqxM=; b=e8ZqZaJpyQgQF9gz+gs0
 1TLJkkdluknonxJyP/Y+TgVbqoVJAL13QLqb0Mad7IC8hcYAkaoYp6SwdBzmAJS1/YSI/6h6haIFk
 vIScVRroSSOoVgGRLWVul+9J0u7dKBrdlSr5kvc/cTJA40qeHeeYliGhm6P1eQvZ/oMCVVlm8tkoG
 nX+1xqT2mQv8mXkmcynZSGzaXQ0pH0M0WGuawh1h3J9S9u8U2V+NANedFb2DFZ+Aj7mAdSwvCRKA/
 BZXUJpbNQe+VFKk/qynRnudD1DoTPOT6ZYtaGrVqdb3QncGAJMZlBSLb87ro6leJlWAS23eZyIfcd
 rMTH59g+ofOmVQ==;
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 77041 <at> debbugs.gnu.org
Subject: [PATCH 03/16] services: file-database: Exclude /dev by default.
Date: Sat, 15 Mar 2025 22:37:09 +0100
Message-ID: <198fd0abf3a0d64f44b1fae7eae99b721fb8d38f.1742073920.git.ludo@HIDDEN>
X-Mailer: git-send-email 2.48.1
In-Reply-To: <cover.1742073920.git.ludo@HIDDEN>
References: <cover.1742073920.git.ludo@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 77041
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

* gnu/services/admin.scm (%default-file-database-excluded-directories):
Add “/dev’.

Change-Id: I06af6621cd363e140a6fc49e1cee97d15b365b89
---
 gnu/services/admin.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/services/admin.scm b/gnu/services/admin.scm
index 5f5b76ffbb..b73accc4af 100644
--- a/gnu/services/admin.scm
+++ b/gnu/services/admin.scm
@@ -430,7 +430,7 @@ (define %default-file-database-excluded-directories
   ;; Regexps of directories excluded from the 'locate' database.
   (list (%store-prefix)
         "/tmp" "/var/tmp" "/var/cache" ".*/\\.cache"
-        "/run/udev"))
+        "/run/udev" "/dev"))
 
 (define (string-or-gexp? obj)
   (or (string? obj) (gexp? obj)))
-- 
2.48.1





Information forwarded to guix-patches@HIDDEN:
bug#77041; Package guix-patches. Full text available.

Message received at 77041 <at> debbugs.gnu.org:


Received: (at 77041) by debbugs.gnu.org; 15 Mar 2025 21:38:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 15 17:38:01 2025
Received: from localhost ([127.0.0.1]:43814 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ttZCi-0004MZ-Mk
	for submit <at> debbugs.gnu.org; Sat, 15 Mar 2025 17:38:01 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:53250)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1ttZCf-0004LN-Vg
 for 77041 <at> debbugs.gnu.org; Sat, 15 Mar 2025 17:37:59 -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 <ludo@HIDDEN>)
 id 1ttZCa-0002g2-LE; Sat, 15 Mar 2025 17:37:52 -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=FfeSNCX34H322dFDzxetgcIGQ2v4iDzjZmbUHzviTHg=; b=L6D8b74f1Gu7ZoQzJS0K
 EHZCI1P2C6+3+bl8Dgn5u3C1PVr4yCmTXIhH1Lkk6VSMEYTuqa+JSl6dbuWg0B39d3A5CmXrElizk
 a/rkWPPOVS/ANbczR0wlL8yLZHJ4sNqtWOwMV2zLwU+sxXDZNs9320ome0mLTRrCHe7EUtafyJFZL
 9kYMqR4GEIvzWFgJnDFxwmcVC/SKld7TK3yg63ReFqa5+wL/iVorv+eCzyA5lY8EV6dS+VVbBsk4/
 nuvqzWOXjZGbG9wKRpGxj2vTKPFqvHnvsi7DEY0MJHIZ/hONdhsLyGBIUNisujwf2t2gZmFZebItx
 3Donzf9y1K7idw==;
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 77041 <at> debbugs.gnu.org
Subject: [PATCH 02/16] services: file-database: Turn into a Shepherd timer.
Date: Sat, 15 Mar 2025 22:37:08 +0100
Message-ID: <7e1843fdb5c8d0ebe4f3002ea7beb041f0622f5a.1742073920.git.ludo@HIDDEN>
X-Mailer: git-send-email 2.48.1
In-Reply-To: <cover.1742073920.git.ludo@HIDDEN>
References: <cover.1742073920.git.ludo@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
X-Debbugs-Cc: Ludovic Courtès <ludo@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 77041
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

* gnu/services/admin.scm (file-database-mcron-jobs): Rename to…
(file-database-shepherd-services): … this.  Return a list of Shepherd
services.
(file-database-service-type): Adjust accordingly.
* doc/guix.texi (File Search Services): Update documentation of
‘schedule’.

Change-Id: I5734c629b113e54057694d2ec480abd26b7815db
---
 doc/guix.texi          |  5 +++--
 gnu/services/admin.scm | 22 ++++++++++++++++++----
 2 files changed, 21 insertions(+), 6 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index d109877a32..ae7b08ad23 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -27152,8 +27152,9 @@ File Search Services
 is taken.
 
 @item @code{schedule} (default: @code{%default-file-database-update-schedule})
-String or G-exp denoting an mcron schedule for the periodic
-@command{updatedb} job (@pxref{Guile Syntax,,, mcron, GNU@tie{}mcron}).
+This is the schedule of database updates, expressed as a string in
+traditional cron syntax or as a gexp evaluating to a Shepherd calendar
+event (@pxref{Timers,,, shepherd, The GNU Shepherd Manual}).
 
 @item @code{excluded-directories} (default @code{%default-file-database-excluded-directories})
 List of regular expressions of directories to ignore when building the
diff --git a/gnu/services/admin.scm b/gnu/services/admin.scm
index 726ca5f918..5f5b76ffbb 100644
--- a/gnu/services/admin.scm
+++ b/gnu/services/admin.scm
@@ -462,7 +462,7 @@ (define-configuration/no-serialization file-database-configuration
 guix locate}).  This list is passed to the @option{--prunepaths} option of
 @command{updatedb} (@pxref{Invoking updatedb,,, find, GNU@tie{}Findutils})."))
 
-(define (file-database-mcron-jobs configuration)
+(define (file-database-shepherd-services configuration)
   (match-record configuration <file-database-configuration>
     (package schedule excluded-directories)
     (let ((updatedb (program-file
@@ -481,13 +481,27 @@ (define (file-database-mcron-jobs configuration)
                                 #$(string-append "--prunepaths="
                                                  (string-join
                                                   excluded-directories)))))))
-      (list #~(job #$schedule #$updatedb)))))
+      (list (shepherd-service
+             (provision '(file-database-update))
+             (requirement '(user-processes))
+             (modules '((shepherd service timer)))
+             (start #~(make-timer-constructor
+                       #$(if (string? schedule)
+                             #~(cron-string->calendar-event #$schedule)
+                             schedule)
+                       (command '(#$updatedb))
+                       #:wait-for-termination? #t))
+             (stop #~(make-timer-destructor))
+             (documentation
+              "Periodically update the system-wide file database that can be
+queried by the 'locate' command.")
+             (actions (list shepherd-trigger-action)))))))
 
 (define file-database-service-type
   (service-type
    (name 'file-database)
-   (extensions (list (service-extension mcron-service-type
-                                        file-database-mcron-jobs)))
+   (extensions (list (service-extension shepherd-root-service-type
+                                        file-database-shepherd-services)))
    (description
     "Periodically update the file database used by the @command{locate} command,
 which lets you search for files by name.  The database is created by running
-- 
2.48.1





Information forwarded to ludo@HIDDEN, maxim.cournoyer@HIDDEN, guix-patches@HIDDEN:
bug#77041; Package guix-patches. Full text available.

Message received at 77041 <at> debbugs.gnu.org:


Received: (at 77041) by debbugs.gnu.org; 15 Mar 2025 21:38:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 15 17:38:00 2025
Received: from localhost ([127.0.0.1]:43812 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ttZCi-0004MS-6O
	for submit <at> debbugs.gnu.org; Sat, 15 Mar 2025 17:38:00 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:53234)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1ttZCf-0004LH-1L
 for 77041 <at> debbugs.gnu.org; Sat, 15 Mar 2025 17:37:58 -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 <ludo@HIDDEN>)
 id 1ttZCZ-0002fi-GQ; Sat, 15 Mar 2025 17:37:51 -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=FbUeOlvz3y9CaSJr/qoT34k83YuGWxyvCpr7QLU5eMQ=; b=r8klLKIXG8zokZ3fXgMt
 UNGOfVq0cEoLINCd+LsGSCGnoPctBcOHMxl1gmXTcP+bF88yunXfzK9GItQyl1t2Lolv0KqDJm8uF
 OwmTZKx4r98K1Sr5N6pmop+Qrg8VEDTJCDrc7uUqAYkhifPhn5duktpA3p+jifdZjM4QhnyAehe8F
 S4v7XNCJFQPFSogDoFqp7E0xkAIn8AaEgOhicDEif8BPpSWZLX+G3tOlhsoZskGOo8i6s4FuoLXhh
 gJO/qPBzAWnncQOVuqCK/yofInXt9HZin4fLMMpI4hRsPGAXIIDthUIeARZZ11tSOlydJBW90iIKL
 zcX9izkjUfOCAw==;
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 77041 <at> debbugs.gnu.org
Subject: [PATCH 01/16] =?UTF-8?q?services:=20shepherd:=20Factorize=20?=
 =?UTF-8?q?=E2=80=98trigger=E2=80=99=20action.?=
Date: Sat, 15 Mar 2025 22:37:07 +0100
Message-ID: <8849153c52dfe2ceec61a2cdbf3c07cb3363ff7d.1742073920.git.ludo@HIDDEN>
X-Mailer: git-send-email 2.48.1
In-Reply-To: <cover.1742073920.git.ludo@HIDDEN>
References: <cover.1742073920.git.ludo@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 77041
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

* gnu/services/shepherd.scm (shepherd-trigger-action): New variable.
* gnu/services/admin.scm (log-cleanup-shepherd-services)
(unattended-upgrade-shepherd-services): Use it.
* gnu/services/backup.scm (restic-backup-job->shepherd-service): Use it.

Change-Id: I834b5b9b61c78f012ee9306df6cf4fd8a93dd6d2
---
 gnu/services/admin.scm    | 10 ++--------
 gnu/services/backup.scm   |  6 +-----
 gnu/services/shepherd.scm |  8 ++++++++
 3 files changed, 11 insertions(+), 13 deletions(-)

diff --git a/gnu/services/admin.scm b/gnu/services/admin.scm
index 2a11a4f4f1..726ca5f918 100644
--- a/gnu/services/admin.scm
+++ b/gnu/services/admin.scm
@@ -404,10 +404,7 @@ (define (log-cleanup-shepherd-services configuration)
                              schedule)
                        (command '(#$program))))
              (stop #~(make-timer-destructor))
-             (actions (list (shepherd-action
-                             (name 'trigger)
-                             (documentation "Trigger log cleanup.")
-                             (procedure #~trigger-timer))))
+             (actions (list shepherd-trigger-action))
              (documentation "Periodically delete old log files."))))))
 
 (define log-cleanup-service-type
@@ -671,10 +668,7 @@ (define (unattended-upgrade-shepherd-services config)
                    ;; again.
                    #:wait-for-termination? #t))
          (stop #~(make-timer-destructor))
-         (actions (list (shepherd-action
-                         (name 'trigger)
-                         (documentation "Trigger unattended system upgrade.")
-                         (procedure #~trigger-timer)))))))
+         (actions (list shepherd-trigger-action)))))
 
 (define unattended-upgrade-service-type
   (service-type
diff --git a/gnu/services/backup.scm b/gnu/services/backup.scm
index 4d8cf167f0..6e066bd3d6 100644
--- a/gnu/services/backup.scm
+++ b/gnu/services/backup.scm
@@ -255,11 +255,7 @@ (define (restic-backup-job->shepherd-service config)
                                                 max-duration)))
                       (stop
                        #~(make-timer-destructor))
-                      (actions (list (shepherd-action
-                                      (name 'trigger)
-                                      (documentation "Manually trigger a backup,
-without waiting for the scheduled time.")
-                                      (procedure #~trigger-timer)))))))
+                      (actions (list shepherd-trigger-action)))))
 
 (define (restic-guix-wrapper-package jobs)
   (package
diff --git a/gnu/services/shepherd.scm b/gnu/services/shepherd.scm
index 65c49b9c59..e7e414b920 100644
--- a/gnu/services/shepherd.scm
+++ b/gnu/services/shepherd.scm
@@ -72,6 +72,7 @@ (define-module (gnu services shepherd)
             shepherd-action-procedure
 
             shepherd-configuration-action
+            shepherd-trigger-action
 
             %default-modules
 
@@ -404,6 +405,13 @@ (define (shepherd-configuration-action file)
                   (format #t "~a~%" #$file)
                   #$file))))
 
+(define shepherd-trigger-action
+  ;; Action to trigger a timer.
+  (shepherd-action
+   (name 'trigger)
+   (documentation "Trigger immediate execution of this timer.")
+   (procedure #~trigger-timer)))
+
 (define (shepherd-configuration-file services shepherd)
   "Return the shepherd configuration file for SERVICES.  SHEPHERD is used
 as shepherd package."
-- 
2.48.1





Information forwarded to guix-patches@HIDDEN:
bug#77041; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 15 Mar 2025 21:28:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 15 17:28:08 2025
Received: from localhost ([127.0.0.1]:43791 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ttZ39-0003Eu-PR
	for submit <at> debbugs.gnu.org; Sat, 15 Mar 2025 17:28:08 -0400
Received: from lists.gnu.org ([2001:470:142::17]:60648)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1ttZ35-0003Dy-Kd
 for submit <at> debbugs.gnu.org; Sat, 15 Mar 2025 17:28:05 -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 <ludo@HIDDEN>) id 1ttZ2t-00032w-7q
 for guix-patches@HIDDEN; Sat, 15 Mar 2025 17:27:51 -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 <ludo@HIDDEN>)
 id 1ttZ2q-0001eu-S1; Sat, 15 Mar 2025 17:27:48 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to:
 references; bh=zFQrOc2UDjQtD9zi0EWAcx17eXRY02g4p7Q5kVduq7I=; b=P9Rm7ITrMVHamE
 KikJREQwKIPqI2V/FXJ9zeOZwWPKFnZCOzeVfxKGlaj7Z7/3aoLbkg7Q9Sv0knlJQVrEkTL3wQqva
 B/xX7hz/tvRvkdBm8YJ0zv0PZPouoxgXd2AS7imH3Ht9RmsB+bexjkrzPGWbI57AdFXlvHvG51KCV
 we2VEuDVHJAUZmj/LqXbmHgOC2rBo/6hrUxJkZymulzoXLOC6sHljYn7q+uRoVndQnBjftTM2v4qY
 ryGfbyDwRrAAGpiaJOee+SciILSxZ8APZLC98xvKtEMEzKQ6co/oIVYcPhjbYkipO+7nef7CZaYdv
 jurZwGLbR/243hEsjeXQ==;
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH 00/16] Replacing mcron jobs by Shepherd timers
Date: Sat, 15 Mar 2025 22:27:24 +0100
Message-ID: <cover.1742073920.git.ludo@HIDDEN>
X-Mailer: git-send-email 2.48.1
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
X-Debbugs-Cc: Florian Pelz <pelzflorian@HIDDEN>,
 Julien Lepiller <julien@HIDDEN>
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: submit
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello,

This is the last step of the Shepherd 1.0 transition, leading
to the deprecation of mcron, superseded by Shepherd timers.

Thoughts?

Ludo'.

Ludovic Courtès (16):
  services: shepherd: Factorize ‘trigger’ action.
  services: file-database: Turn into a Shepherd timer.
  services: file-database: Exclude /dev by default.
  services: package-database: Turn into a Shepherd timer.
  services: fstrim: Turn into a Shepherd timer.
  services: certbot: Turn into a Shepherd timer.
  services: wireguard: Turn monitoring into a Shepherd timer.
  tests: Make ‘operating-system-with-console-syslog’ public.
  tests: ganeti: Remove unnecessary ‘begin’.
  tests: ganeti: Write system log to /dev/console.
  tests: ganeti: Increase VM memory size.
  services: ganeti: Update to Shepherd 1.0 interface.
  services: ganeti: Produce Shepherd timers instead of mcron jobs.
  services: virtual-build-machine: Turn GC job into a Shepherd timer.
  services: mcron: Deprecate.
  DRAFT news: Add entry for mcron deprecation.

 doc/guix.texi                   |  60 +++++++---
 etc/news.scm                    |  13 +++
 gnu/home/services/mcron.scm     |   7 +-
 gnu/services/admin.scm          |  68 +++++++----
 gnu/services/backup.scm         |   6 +-
 gnu/services/certbot.scm        |  93 ++++++++-------
 gnu/services/ganeti.scm         | 135 ++++++++++-----------
 gnu/services/linux.scm          |  50 ++++----
 gnu/services/mcron.scm          |   7 +-
 gnu/services/shepherd.scm       |   8 ++
 gnu/services/virtualization.scm |  22 +++-
 gnu/services/vpn.scm            | 201 +++++++++++++++++---------------
 gnu/tests.scm                   |  21 ++++
 gnu/tests/ganeti.scm            | 120 +++++++++----------
 gnu/tests/install.scm           |  20 ----
 15 files changed, 462 insertions(+), 369 deletions(-)


base-commit: 0c497c87ac47206b3e8c6dfa2e1e9b5f3e452292
-- 
2.48.1





Acknowledgement sent to Ludovic Courtès <ludo@HIDDEN>:
New bug report received and forwarded. Copy sent to pelzflorian@HIDDEN, julien@HIDDEN, guix-patches@HIDDEN. Full text available.
Report forwarded to pelzflorian@HIDDEN, julien@HIDDEN, guix-patches@HIDDEN:
bug#77041; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 23 Mar 2025 19:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.