From unknown Thu Aug 14 18:36:14 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#50504 <50504@debbugs.gnu.org> To: bug#50504 <50504@debbugs.gnu.org> Subject: Status: [PATCH] home-services: Add Mcron. Reply-To: bug#50504 <50504@debbugs.gnu.org> Date: Fri, 15 Aug 2025 01:36:14 +0000 retitle 50504 [PATCH] home-services: Add Mcron. reassign 50504 guix-patches submitter 50504 Andrew Tropin severity 50504 normal tag 50504 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 10 06:57:04 2021 Received: (at submit) by debbugs.gnu.org; 10 Sep 2021 10:57:04 +0000 Received: from localhost ([127.0.0.1]:36986 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mOeDE-0002hK-D2 for submit@debbugs.gnu.org; Fri, 10 Sep 2021 06:57:04 -0400 Received: from lists.gnu.org ([209.51.188.17]:52714) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mOeDD-0002hD-29 for submit@debbugs.gnu.org; Fri, 10 Sep 2021 06:56:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42262) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mOeDC-0007Yi-Me for guix-patches@gnu.org; Fri, 10 Sep 2021 06:56:50 -0400 Received: from mail-lj1-x230.google.com ([2a00:1450:4864:20::230]:47052) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mOeDA-0000ND-F0 for guix-patches@gnu.org; Fri, 10 Sep 2021 06:56:50 -0400 Received: by mail-lj1-x230.google.com with SMTP id w4so2498042ljh.13 for ; Fri, 10 Sep 2021 03:56:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop-in.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=VbWLr9x6y5tAe0KtS4cpVT23xL+MvFmNjv7AwiwvX1I=; b=EsF3ZO2rutLsNwHclvUXu+kHBGOr9emdCbIZ8GVjMqMF+UvymvCN8D0F6IhWpr1ZpA KkmsRsXWp5v8Z3OsBtzdMus94D31kGDpmklG00Zr0MCB7KPTm5suhAAzYN8LPKRMS+yY mry4/0pE+CKFz2xCwOpvMnvUzc7SUplTrH051yEDt+zo/sVh2s1pN9V8WuykYIKJVuNl 1sSNbVkAZs+hMTVC+fzUbm2NGoK0e9jskWBNhFyndawgOr1F1/BMmp/ydM6CzV22pmZw sVwx8bgxI56cSQuqKF2PgbJW6OFjYfcritxZhZ+AAB1UwLqTR8dJ5SmKWRqou2FxhN7P y8Dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=VbWLr9x6y5tAe0KtS4cpVT23xL+MvFmNjv7AwiwvX1I=; b=5WxWPL8iN3qgytdFC5EYqGmx82mwEs3JBBxIN3Dlrct97qBtKWBjSirs55zhFM6Gpr VZpOR8lrQidMsCOiukneKZH1ELVfSl8SPgbRyAMpWj0Oe3kDO/hnpw8qFYTzh+7aaasM em5VlzEtjCUlwLTJ8GB0xdOm0TWDEFbyrr+rK5AJIIuvbC34xb+hGmC5TunHVF1zeWsb LOyvRHXWhl7dbYusjauPGJNdAvbdCMqptdSUcXxCTPWmy+/ECtHbhGmAB5OuRMAtAgs9 dmaMtHaIGTYCv7a0yUWtMb5aTJZgJnvzTdU2T61p1ZYcqupsFvdJVpKmEPoXbSRH4bkl o/tQ== X-Gm-Message-State: AOAM533s/8VvCCJuyU2ChZxiijB+YKc+yCku9xyoTlGaQS+yg1u4GHFV +Y/pKiqA478Vv3PHaddZShEuEYfZhsUTOQ== X-Google-Smtp-Source: ABdhPJw1lNnhYS5br7uRYfUQN0J8MppA488VGEnCtN3Os3WNpDnKfWCavcC+Fql6dHPME5kzpMT7Vg== X-Received: by 2002:a2e:bc26:: with SMTP id b38mr3682953ljf.497.1631271405510; Fri, 10 Sep 2021 03:56:45 -0700 (PDT) Received: from localhost ([109.252.93.92]) by smtp.gmail.com with ESMTPSA id t12sm539338lfr.190.2021.09.10.03.56.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Sep 2021 03:56:45 -0700 (PDT) From: Andrew Tropin To: guix-patches@gnu.org Subject: [PATCH] home-services: Add Mcron. Date: Fri, 10 Sep 2021 09:26:33 +0300 Message-ID: <8735qc66mt.fsf@trop.in> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: none client-ip=2a00:1450:4864:20::230; envelope-from=andrew@trop.in; helo=mail-lj1-x230.google.com X-Spam_score_int: -2 X-Spam_score: -0.3 X-Spam_bar: / X-Spam_report: (-0.3 / 5.0 requ) BAYES_00=-1.9, DATE_IN_PAST_03_06=1.592, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: submit Cc: Oleg Pykhalov , Ludovic =?utf-8?Q?Court=C3=A8s?= , Xinglu Chen X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.1 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: * gnu/home-services/mcron.scm: New file. * gnu/local.mk: Add this. * doc/guix.texi: Add documentation about Mcron Home Service. --- This is the last of home services I consider "must-have" for wip-guix-home. Content analysis details: (2.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 1.1 DATE_IN_PAST_03_06 Date: is 3 to 6 hours before Received: date 0.0 T_SPF_TEMPERROR SPF: test of record failed (temperror) -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager * gnu/home-services/mcron.scm: New file. * gnu/local.mk: Add this. * doc/guix.texi: Add documentation about Mcron Home Service. --- This is the last of home services I consider "must-have" for wip-guix-home. It reuses two functions from (gnu services mcron) via @@, which can be considered as a hack, the alternative solution is to expose those functions via #:export, I can do it if it's a preffered way or suggest other ideas, please. The discussion on this topic: https://issues.guix.gnu.org/47238 Included Ludovic and Xinglu in CC. I took a brief look at the testing approach, seems the most relevant is guix-system.sh and it is just a shell script, which runs a few guix system subcommand and check if they fail or succeed. Please let me know, what is a preferred way for writing tests and I'll try to provide some tests for Guix Home in the separate patch. doc/guix.texi | 31 +++++++++- gnu/home-services/mcron.scm | 115 ++++++++++++++++++++++++++++++++++++ gnu/local.mk | 1 + 3 files changed, 146 insertions(+), 1 deletion(-) create mode 100644 gnu/home-services/mcron.scm diff --git a/doc/guix.texi b/doc/guix.texi index e546fcc0d2..a7eacad762 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -35685,7 +35685,36 @@ for example). @cindex mcron @cindex scheduling jobs =20 -mcron info here +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 +for home services is that they have to be declared in +@code{home-envirnoment} record instead of @code{operating-system}. + +@defvr {Scheme Variable} home-mcron-service-type +This is the type of the @code{mcron} home service, whose value is an +@code{home-mcron-configuration} object. It allows to manage tasks + +This service type can be the target of a service extension that provides +it additional job specifications (@pxref{Service Composition}). In +other words, it is possible to define services that provide additional +mcron jobs to run. +@end defvr + +@deftp {Data Type} home-mcron-configuration +Data type representing the configuration of mcron. + +@table @asis +@item @code{mcron} (default: @var{mcron}) +The mcron package to use. + +@item @code{jobs} +This is a list of gexps (@pxref{G-Expressions}), where each gexp +corresponds to an mcron job specification (@pxref{Syntax, mcron job +specifications,, mcron, GNU@tie{}mcron}). +@end table +@end deftp =20 @node Shepherd Home Service @subsection Managing User's Daemons diff --git a/gnu/home-services/mcron.scm b/gnu/home-services/mcron.scm new file mode 100644 index 0000000000..fdfde179a5 --- /dev/null +++ b/gnu/home-services/mcron.scm @@ -0,0 +1,115 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright =C2=A9 2021 Andrew Tropin +;;; Copyright =C2=A9 2021 Xinglu Chen +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu home-services mcron) + #:use-module (gnu packages guile-xyz) + #:use-module (gnu home-services) + #:use-module (gnu home-services shepherd) + #:use-module (gnu services shepherd) + #:use-module (guix records) + #:use-module (guix gexp) + #:use-module (srfi srfi-1) + #:use-module (ice-9 match) + + #:export (home-mcron-configuration + home-mcron-service-type)) + +;;; Commentary: +;; +;; Service for the GNU mcron cron job manager. +;; +;; Example configuration, the first job runs mbsync once every ten +;; minutes, the second one writes "Mcron service" to ~/mcron-file once +;; every minute. +;; +;; (service home-mcron-service-type +;; (home-mcron-configuration +;; (jobs (list #~(job '(next-minute +;; (range 0 60 10)) +;; (lambda () +;; (system* "mbsync" "--all"))) +;; #~(job next-minute-from +;; (lambda () +;; (call-with-output-file (string-append = (getenv "HOME") +;; = "/mcron-file") +;; (lambda (port) +;; (display "Mcron service" port)))))= )))) +;; +;;; Code: + +(define-record-type* home-mcron-configuration + make-home-mcron-configuration + home-mcron-configuration? + (package home-mcron-configuration-package ; package + (default mcron)) + (jobs home-mcron-configuration-jobs ; list of jobs + (default '()))) + +(define job-files (@@ (gnu services mcron) job-files)) +(define shepherd-schedule-action + (@@ (gnu services mcron) shepherd-schedule-action)) + +(define home-mcron-shepherd-services + (match-lambda + (($ mcron '()) ; no jobs to run + '()) + (($ mcron jobs) + (let ((files (job-files mcron jobs))) + (list (shepherd-service + (documentation "User cron jobs.") + (provision '(mcron)) + (modules `((srfi srfi-1) + (srfi srfi-26) + (ice-9 popen) ; for the 'schedule' act= ion + (ice-9 rdelim) + (ice-9 match) + ,@%default-modules)) + (start #~(make-forkexec-constructor + (list #$(file-append mcron "/bin/mcron") #$@files) + #:log-file (string-append + (or (getenv "XDG_LOG_HOME") + (format #f "~a/.local/var/log" + (getenv "HOME"))) + "/mcron.log"))) + (stop #~(make-kill-destructor)) + (actions + (list (shepherd-schedule-action mcron files))))))))) + +(define home-mcron-profile (compose list home-mcron-configuration-package)) + +(define (home-mcron-extend config jobs) + (home-mcron-configuration + (inherit config) + (jobs (append (home-mcron-configuration-jobs config) + jobs)))) + +(define home-mcron-service-type + (service-type (name 'home-mcron) + (extensions + (list (service-extension + home-shepherd-service-type + home-mcron-shepherd-services) + (service-extension + home-profile-service-type + home-mcron-profile))) + (compose concatenate) + (extend home-mcron-extend) + (default-value (home-mcron-configuration)) + (description + "Install and configure the GNU mcron cron job manager."))) diff --git a/gnu/local.mk b/gnu/local.mk index 31ad1a43db..8212bc5391 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -80,6 +80,7 @@ GNU_SYSTEM_MODULES =3D \ %D%/home-services/configuration.scm \ %D%/home-services/shells.scm \ %D%/home-services/shepherd.scm \ + %D%/home-services/mcron.scm \ %D%/home-services/utils.scm \ %D%/home-services/xdg.scm \ %D%/image.scm \ --=20 2.33.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 10 14:22:52 2021 Received: (at 50504) by debbugs.gnu.org; 10 Sep 2021 18:22:52 +0000 Received: from localhost ([127.0.0.1]:39192 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mOlAl-0000bG-F0 for submit@debbugs.gnu.org; Fri, 10 Sep 2021 14:22:52 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:39912 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mOlAj-0000b0-L9 for 50504@debbugs.gnu.org; Fri, 10 Sep 2021 14:22:46 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1631298154; bh=h/s/MEziwmxXg4EmOsPklmgTpEfQwYAFt7X4B8wlj4g=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=IGP64Yzp0LHdSFvbm8yGFUycToFSvu9akLXRqnBx5KPQELMGTEqxtRmoMM+r9V8L0 1B3n/9v5NMbf1xOxaEnWnBygy9v6R2fPKHNUGFcnkCCIDo3+AXstZiQ7e1kFmMaj/n PnehisGgURvOVJrVScsloH1PSlUCQnvTgNL5dpg0= To: Andrew Tropin , 50504@debbugs.gnu.org Subject: Re: [bug#50504] [PATCH] home-services: Add Mcron. In-Reply-To: <8735qc66mt.fsf@trop.in> References: <8735qc66mt.fsf@trop.in> Date: Fri, 10 Sep 2021 20:22:30 +0200 Message-ID: <87a6kkxpcp.fsf@yoctocell.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 2.9 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On Fri, Sep 10 2021, Andrew Tropin wrote: > * gnu/home-services/mcron.scm: New file. > * gnu/local.mk: Add this. > * doc/guix.texi: Add documentation about Mcron Home Service. > --- > > This is the last of home services I consider "must-have" [...] Content analysis details: (2.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS 0.0 PDS_RDNS_DYNAMIC_FP RDNS_DYNAMIC with FP steps X-Debbugs-Envelope-To: 50504 Cc: Oleg Pykhalov , Ludovic =?utf-8?Q?Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.9 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On Fri, Sep 10 2021, Andrew Tropin wrote: > * gnu/home-services/mcron.scm: New file. > * gnu/local.mk: Add this. > * doc/guix.texi: Add documentation about Mcron Home Service. > --- > > This is the last of home services I consider "must-have" [...] Content analysis details: (2.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS 1.0 BULK_RE_SUSP_NTLD Precedence bulk and RE: from a suspicious TLD -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager 0.0 PDS_RDNS_DYNAMIC_FP RDNS_DYNAMIC with FP steps --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Fri, Sep 10 2021, Andrew Tropin wrote: > * gnu/home-services/mcron.scm: New file. > * gnu/local.mk: Add this. > * doc/guix.texi: Add documentation about Mcron Home Service. > --- > > This is the last of home services I consider "must-have" for wip-guix-hom= e. > > It reuses two functions from (gnu services mcron) via @@, which can be > considered as a hack, the alternative solution is to expose those functio= ns > via #:export, I can do it if it's a preffered way or suggest other ideas, > please. The discussion on this topic: https://issues.guix.gnu.org/47238 > Included Ludovic and Xinglu in CC. An alternative would be put it the (gnu service mcron) to share more code between system service and home service. This was discussed briefly on rde-devel[1]. It might be worth discussing this issue on guix-devel before we add too many home service. > I took a brief look at the testing approach, seems the most relevant is > guix-system.sh and it is just a shell script, which runs a few guix system > subcommand and check if they fail or succeed. Please let me know, what i= s a > preferred way for writing tests and I'll try to provide some tests for Gu= ix > Home in the separate patch. The =E2=80=98guix-system.sh=E2=80=99 script seems to only test the =E2=80= =98guix system=E2=80=99 command, which doesn=E2=80=99t seem that related to the home services. I g= uess we could check the contents of the generated config files. There is (gnu build marionette) which creates a VM; we could then check that the relevant process is running. Maybe there is a better approach, though. [1]: > doc/guix.texi | 31 +++++++++- > gnu/home-services/mcron.scm | 115 ++++++++++++++++++++++++++++++++++++ > gnu/local.mk | 1 + > 3 files changed, 146 insertions(+), 1 deletion(-) > create mode 100644 gnu/home-services/mcron.scm > > diff --git a/doc/guix.texi b/doc/guix.texi > index e546fcc0d2..a7eacad762 100644 > --- a/doc/guix.texi > +++ b/doc/guix.texi > @@ -35685,7 +35685,36 @@ for example). > @cindex mcron > @cindex scheduling jobs >=20=20 > -mcron info here > +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 > +for home services is that they have to be declared in > +@code{home-envirnoment} record instead of @code{operating-system}. =E2=80=9Cdeclared in a @code{home-environemnt} record instead of a @code{operating-system} record.=E2=80=9D > +@defvr {Scheme Variable} home-mcron-service-type > +This is the type of the @code{mcron} home service, whose value is an Why @code{mcron}? I would use =E2=80=9CMcron=E2=80=9D instead. > +@code{home-mcron-configuration} object. It allows to manage tasks =E2=80=9CIt allows one to manage scheduled tasks.=E2=80=9D > +This service type can be the target of a service extension that provides > +it additional job specifications (@pxref{Service Composition}). In s/it// > +other words, it is possible to define services that provide additional > +mcron jobs to run. > +@end defvr > + > +@deftp {Data Type} home-mcron-configuration > +Data type representing the configuration of mcron. > + > +@table @asis > +@item @code{mcron} (default: @var{mcron}) > +The mcron package to use. > + > +@item @code{jobs} > +This is a list of gexps (@pxref{G-Expressions}), where each gexp > +corresponds to an mcron job specification (@pxref{Syntax, mcron job > +specifications,, mcron, GNU@tie{}mcron}). > +@end table > +@end deftp >=20=20 > @node Shepherd Home Service > @subsection Managing User's Daemons > diff --git a/gnu/home-services/mcron.scm b/gnu/home-services/mcron.scm > new file mode 100644 > index 0000000000..fdfde179a5 > --- /dev/null > +++ b/gnu/home-services/mcron.scm > @@ -0,0 +1,115 @@ > +;;; GNU Guix --- Functional package management for GNU > +;;; Copyright =C2=A9 2021 Andrew Tropin > +;;; Copyright =C2=A9 2021 Xinglu Chen > +;;; > +;;; This file is part of GNU Guix. > +;;; > +;;; GNU Guix is free software; you can redistribute it and/or modify it > +;;; under the terms of the GNU General Public License as published by > +;;; the Free Software Foundation; either version 3 of the License, or (at > +;;; your option) any later version. > +;;; > +;;; GNU Guix is distributed in the hope that it will be useful, but > +;;; WITHOUT ANY WARRANTY; without even the implied warranty of > +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > +;;; GNU General Public License for more details. > +;;; > +;;; You should have received a copy of the GNU General Public License > +;;; along with GNU Guix. If not, see . > + > +(define-module (gnu home-services mcron) > + #:use-module (gnu packages guile-xyz) > + #:use-module (gnu home-services) > + #:use-module (gnu home-services shepherd) > + #:use-module (gnu services shepherd) > + #:use-module (guix records) > + #:use-module (guix gexp) > + #:use-module (srfi srfi-1) > + #:use-module (ice-9 match) > + > + #:export (home-mcron-configuration > + home-mcron-service-type)) > + > +;;; Commentary: > +;; > +;; Service for the GNU mcron cron job manager. > +;; > +;; Example configuration, the first job runs mbsync once every ten > +;; minutes, the second one writes "Mcron service" to ~/mcron-file once > +;; every minute. > +;; > +;; (service home-mcron-service-type > +;; (home-mcron-configuration > +;; (jobs (list #~(job '(next-minute > +;; (range 0 60 10)) > +;; (lambda () > +;; (system* "mbsync" "--all"))) > +;; #~(job next-minute-from > +;; (lambda () > +;; (call-with-output-file (string-appen= d (getenv "HOME") > +;; = "/mcron-file") > +;; (lambda (port) > +;; (display "Mcron service" port)))= )))))) > +;; > +;;; Code: > + > +(define-record-type* home-mcron-configuration > + make-home-mcron-configuration > + home-mcron-configuration? > + (package home-mcron-configuration-package ; package > + (default mcron)) > + (jobs home-mcron-configuration-jobs ; list of jobs > + (default '()))) > + > +(define job-files (@@ (gnu services mcron) job-files)) > +(define shepherd-schedule-action > + (@@ (gnu services mcron) shepherd-schedule-action)) > + > +(define home-mcron-shepherd-services > + (match-lambda > + (($ mcron '()) ; no jobs to run > + '()) > + (($ mcron jobs) > + (let ((files (job-files mcron jobs))) > + (list (shepherd-service > + (documentation "User cron jobs.") > + (provision '(mcron)) > + (modules `((srfi srfi-1) > + (srfi srfi-26) > + (ice-9 popen) ; for the 'schedule' a= ction > + (ice-9 rdelim) > + (ice-9 match) > + ,@%default-modules)) > + (start #~(make-forkexec-constructor > + (list #$(file-append mcron "/bin/mcron") #$@file= s) > + #:log-file (string-append > + (or (getenv "XDG_LOG_HOME") > + (format #f "~a/.local/var/log" > + (getenv "HOME"))) > + "/mcron.log"))) > + (stop #~(make-kill-destructor)) > + (actions > + (list (shepherd-schedule-action mcron files))))))))) > + > +(define home-mcron-profile (compose list home-mcron-configuration-packag= e)) > + > +(define (home-mcron-extend config jobs) > + (home-mcron-configuration > + (inherit config) > + (jobs (append (home-mcron-configuration-jobs config) > + jobs)))) > + > +(define home-mcron-service-type > + (service-type (name 'home-mcron) > + (extensions > + (list (service-extension > + home-shepherd-service-type > + home-mcron-shepherd-services) > + (service-extension > + home-profile-service-type > + home-mcron-profile))) > + (compose concatenate) > + (extend home-mcron-extend) > + (default-value (home-mcron-configuration)) > + (description > + "Install and configure the GNU mcron cron job manager."= ))) > diff --git a/gnu/local.mk b/gnu/local.mk > index 31ad1a43db..8212bc5391 100644 > --- a/gnu/local.mk > +++ b/gnu/local.mk > @@ -80,6 +80,7 @@ GNU_SYSTEM_MODULES =3D \ > %D%/home-services/configuration.scm \ > %D%/home-services/shells.scm \ > %D%/home-services/shepherd.scm \ > + %D%/home-services/mcron.scm \ > %D%/home-services/utils.scm \ > %D%/home-services/xdg.scm \ > %D%/image.scm \ > --=20 > 2.33.0 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmE7omYVHHB1YmxpY0B5 b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5S6AQALZfdGkBjb6TJRy8PJhPwO9WrjdG r8oQiTVp6k8RLG7Pt29TuvnE/djGqPnSw7iHUBlBXFCuNqTKfIxYr4N0ZnVdidCg 5IC9GIcFQtb7mzXYzm4zfW9Bl1MkCzMWxYh6pM9CAKW8OQWqaMPWVAw7OgWeFGj3 O/6IOufKKgmUlrfP5tE5lBTcjyYlIq62ZWQeZoJrKRe5G4PmQ06549WzZ9+gMsDI YU3LbHVmSdbBwzPl9GMcHsn1Zz62Ho0lcWUmFKXg8rxFfRSik/B0wYhtxOXnhGZN mh3rgZPF0cQp3HNeAFWT18Du/CY7JC2e0VcXMxbEOCEv7Z2aRcN2TyBfKVNft00f apZXl3Fsuyt2o4jIV8XEanXT1IQZUwS8Y3mPSvDikXVfTOmNQMQJjREA5KMoVa24 DBeAc6gNT7DKeomrpI7Qig+TXqFs7X0dq/H8wmDC5lnYXXedlgPH/Xmex9Tl7Kxd 8ARoJvvtITR5rsxS9v+KNijccPxZJewG9ebCHDiZPwlqjJQPUUs8AnaURDbjkMoG W6TfbD4NTAzX0WXSOLVPnwQYUSDQWaK0I0VG1sFVQ93Ezb3x7bxG2muxuIKtKksq 8hjXet62cnxEUITLtEBhMq4tBGVflMqMJWDzEszHIYlZ4BHuzkkbz42v9ae2iBRQ U4q5MU+EsmeleqXn =NJzt -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 13 02:44:38 2021 Received: (at 50504) by debbugs.gnu.org; 13 Sep 2021 06:44:38 +0000 Received: from localhost ([127.0.0.1]:43960 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mPfhg-0007Hu-Oe for submit@debbugs.gnu.org; Mon, 13 Sep 2021 02:44:38 -0400 Received: from mail-lj1-f174.google.com ([209.85.208.174]:38501) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mPfhc-0007Hf-WD for 50504@debbugs.gnu.org; Mon, 13 Sep 2021 02:44:31 -0400 Received: by mail-lj1-f174.google.com with SMTP id g14so15337549ljk.5 for <50504@debbugs.gnu.org>; Sun, 12 Sep 2021 23:44:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop-in.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=W+4gAmqxttlVpAv0/usoYQJW7PwfgyXzypcz5BcRn0k=; b=xtOu/f3Ar8bsNjFTHCCkn45nXdtzxY/QY3LFlv1yqa6eh8x4qqsZIyQB94joFve8L4 wlSjLiKzLZtVY7zoUYBMU8l3ODTqFRsDMPsvoW0J91aXsO+lFgwXnsEPtbtoG5gyklXT jRnRzS1dX5bOhMpLFbC5TrIIH0u42wn4zOdFi8BfLbvm3r2q75DVHm9quuAjSirsGBtd XMegwgUrk2zS8SKxcY0nVEkndP7n2fc2edw9X/V1jAnlHRBYl5F3xwhz9nxVKuPPXLiR Mb2zfhHo0/qzTKkxWGU+i7HnV7SGmu/kUcFfTGukXXBzVoWytvysqD8ZFs4SeV8uEzt0 5vTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=W+4gAmqxttlVpAv0/usoYQJW7PwfgyXzypcz5BcRn0k=; b=tWx8OYb9kNgbz5m6SHeDywK1qJUVvntiPKh8ObBhvJIGFzzPM2oA7I7okLr/Y4Pq6S NyDln+JBszOmK2Ii/MAnvFD8j6+290hdLleV8Gk6kllJApkVU+DLr9809Gi9OmakSSvg i34x0Un6UI4yTAiN3U1MNEzbReHOTtpbNi+YviVMo+Z2nRJ+YxraNJ1emNSk1HLiLj9I QHoL+4crTGssgoRerzhouj3WBKVPsMBhQCBrZUeCrDtLRWeGFMlT4B+d3dn/k03naGq/ 4WKf6HpGggDC+l9ffWB6yosesNMkw1dlk2piMBE/HwkUy81O0rOcNF9Trs1RfpnpMdav PULw== X-Gm-Message-State: AOAM530ZeJS0XHCFxzdq1uSfHMEkPx/lymmbqrjAMGuaH0XUcgCphLF+ lzRMKpO8D0OiBWSLkansbdGFzQ== X-Google-Smtp-Source: ABdhPJyBiWKC7Tlxagmx37DXePRplUy9O8GO055JyeV5MBee6N59KLiJ4Zo4LBxDMtD6PDiD3bHtMQ== X-Received: by 2002:a2e:97cf:: with SMTP id m15mr9085935ljj.125.1631515462424; Sun, 12 Sep 2021 23:44:22 -0700 (PDT) Received: from localhost (109-252-93-92.nat.spd-mgts.ru. [109.252.93.92]) by smtp.gmail.com with ESMTPSA id u19sm723972lfl.66.2021.09.12.23.44.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Sep 2021 23:44:21 -0700 (PDT) From: Andrew Tropin To: Xinglu Chen , 50504@debbugs.gnu.org Subject: Re: [bug#50504] [PATCH] home-services: Add Mcron. In-Reply-To: <87a6kkxpcp.fsf@yoctocell.xyz> References: <8735qc66mt.fsf@trop.in> <87a6kkxpcp.fsf@yoctocell.xyz> Date: Mon, 13 Sep 2021 09:44:18 +0300 Message-ID: <87a6khrn3x.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On 2021-09-10 20:22, Xinglu Chen wrote: > On Fri, Sep 10 2021, Andrew Tropin wrote: > >> * gnu/home-services/mcron.scm: New file. >> * gnu/local.mk: Add this. >> * doc/guix.texi: Add documentation about Mcron Home Service. >> --- >> >> This [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_NONE SPF: sender does not publish an SPF Record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.208.174 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.208.174 listed in wl.mailspike.net] X-Debbugs-Envelope-To: 50504 Cc: Oleg Pykhalov , Ludovic =?utf-8?Q?Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2021-09-10 20:22, Xinglu Chen wrote: > On Fri, Sep 10 2021, Andrew Tropin wrote: > >> * gnu/home-services/mcron.scm: New file. >> * gnu/local.mk: Add this. >> * doc/guix.texi: Add documentation about Mcron Home Service. >> --- >> >> This is the last of home services I consider "must-have" for wip-guix-ho= me. >> >> It reuses two functions from (gnu services mcron) via @@, which can be >> considered as a hack, the alternative solution is to expose those functi= ons >> via #:export, I can do it if it's a preffered way or suggest other ideas, >> please. The discussion on this topic: https://issues.guix.gnu.org/47238 >> Included Ludovic and Xinglu in CC. > > An alternative would be put it the (gnu service mcron) to share more > code between system service and home service. This was discussed > briefly on rde-devel[1]. It might be worth discussing this issue on > guix-devel before we add too many home service. > I'll make a thread on possible modules naming for home services later this week and will discuss this thing too. > >> I took a brief look at the testing approach, seems the most relevant is >> guix-system.sh and it is just a shell script, which runs a few guix syst= em >> subcommand and check if they fail or succeed. Please let me know, what = is a >> preferred way for writing tests and I'll try to provide some tests for G= uix >> Home in the separate patch. > > The =E2=80=98guix-system.sh=E2=80=99 script seems to only test the =E2=80= =98guix system=E2=80=99 > command, which doesn=E2=80=99t seem that related to the home services. I= guess > we could check the contents of the generated config files. There is > (gnu build marionette) which creates a VM; we could then check that the > relevant process is running. Maybe there is a better approach, though. > It was a general question about tests for Guix Home, not Mcron home service, sorry for the confusion. >=20 > [1]: > > >> doc/guix.texi | 31 +++++++++- >> gnu/home-services/mcron.scm | 115 ++++++++++++++++++++++++++++++++++++ >> gnu/local.mk | 1 + >> 3 files changed, 146 insertions(+), 1 deletion(-) >> create mode 100644 gnu/home-services/mcron.scm >> >> diff --git a/doc/guix.texi b/doc/guix.texi >> index e546fcc0d2..a7eacad762 100644 >> --- a/doc/guix.texi >> +++ b/doc/guix.texi >> @@ -35685,7 +35685,36 @@ for example). >> @cindex mcron >> @cindex scheduling jobs >>=20=20 >> -mcron info here >> +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 >> +for home services is that they have to be declared in >> +@code{home-envirnoment} record instead of @code{operating-system}. > > =E2=80=9Cdeclared in a @code{home-environemnt} record instead of a > @code{operating-system} record.=E2=80=9D > >> +@defvr {Scheme Variable} home-mcron-service-type >> +This is the type of the @code{mcron} home service, whose value is an > > Why @code{mcron}? I would use =E2=80=9CMcron=E2=80=9D instead. > Good idea, but I sticked with the way it's done in a description of system mcron service. > >> +@code{home-mcron-configuration} object. It allows one to manage tasks > > =E2=80=9CIt allows one to manage scheduled tasks.=E2=80=9D > >> +This service type can be the target of a service extension that provides >> +it additional job specifications (@pxref{Service Composition}). In > > s/it// > >> +other words, it is possible to define services that provide additional >> +mcron jobs to run. >> +@end defvr >> + >> +@deftp {Data Type} home-mcron-configuration >> +Data type representing the configuration of mcron. >> + >> +@table @asis >> +@item @code{mcron} (default: @var{mcron}) >> +The mcron package to use. >> + >> +@item @code{jobs} >> +This is a list of gexps (@pxref{G-Expressions}), where each gexp >> +corresponds to an mcron job specification (@pxref{Syntax, mcron job >> +specifications,, mcron, GNU@tie{}mcron}). >> +@end table >> +@end deftp >>=20=20 >> @node Shepherd Home Service >> @subsection Managing User's Daemons >> diff --git a/gnu/home-services/mcron.scm b/gnu/home-services/mcron.scm >> new file mode 100644 >> index 0000000000..fdfde179a5 >> --- /dev/null >> +++ b/gnu/home-services/mcron.scm >> @@ -0,0 +1,115 @@ >> +;;; GNU Guix --- Functional package management for GNU >> +;;; Copyright =C2=A9 2021 Andrew Tropin >> +;;; Copyright =C2=A9 2021 Xinglu Chen >> +;;; >> +;;; This file is part of GNU Guix. >> +;;; >> +;;; GNU Guix is free software; you can redistribute it and/or modify it >> +;;; under the terms of the GNU General Public License as published by >> +;;; the Free Software Foundation; either version 3 of the License, or (= at >> +;;; your option) any later version. >> +;;; >> +;;; GNU Guix is distributed in the hope that it will be useful, but >> +;;; WITHOUT ANY WARRANTY; without even the implied warranty of >> +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >> +;;; GNU General Public License for more details. >> +;;; >> +;;; You should have received a copy of the GNU General Public License >> +;;; along with GNU Guix. If not, see . >> + >> +(define-module (gnu home-services mcron) >> + #:use-module (gnu packages guile-xyz) >> + #:use-module (gnu home-services) >> + #:use-module (gnu home-services shepherd) >> + #:use-module (gnu services shepherd) >> + #:use-module (guix records) >> + #:use-module (guix gexp) >> + #:use-module (srfi srfi-1) >> + #:use-module (ice-9 match) >> + >> + #:export (home-mcron-configuration >> + home-mcron-service-type)) >> + >> +;;; Commentary: >> +;; >> +;; Service for the GNU mcron cron job manager. >> +;; >> +;; Example configuration, the first job runs mbsync once every ten >> +;; minutes, the second one writes "Mcron service" to ~/mcron-file once >> +;; every minute. >> +;; >> +;; (service home-mcron-service-type >> +;; (home-mcron-configuration >> +;; (jobs (list #~(job '(next-minute >> +;; (range 0 60 10)) >> +;; (lambda () >> +;; (system* "mbsync" "--all"))) >> +;; #~(job next-minute-from >> +;; (lambda () >> +;; (call-with-output-file (string-appe= nd (getenv "HOME") >> +;; = "/mcron-file") >> +;; (lambda (port) >> +;; (display "Mcron service" port))= ))))))) >> +;; >> +;;; Code: >> + >> +(define-record-type* home-mcron-configuration >> + make-home-mcron-configuration >> + home-mcron-configuration? >> + (package home-mcron-configuration-package ; package >> + (default mcron)) >> + (jobs home-mcron-configuration-jobs ; list of jobs >> + (default '()))) >> + >> +(define job-files (@@ (gnu services mcron) job-files)) >> +(define shepherd-schedule-action >> + (@@ (gnu services mcron) shepherd-schedule-action)) >> + >> +(define home-mcron-shepherd-services >> + (match-lambda >> + (($ mcron '()) ; no jobs to run >> + '()) >> + (($ mcron jobs) >> + (let ((files (job-files mcron jobs))) >> + (list (shepherd-service >> + (documentation "User cron jobs.") >> + (provision '(mcron)) >> + (modules `((srfi srfi-1) >> + (srfi srfi-26) >> + (ice-9 popen) ; for the 'schedule' = action >> + (ice-9 rdelim) >> + (ice-9 match) >> + ,@%default-modules)) >> + (start #~(make-forkexec-constructor >> + (list #$(file-append mcron "/bin/mcron") #$@fil= es) >> + #:log-file (string-append >> + (or (getenv "XDG_LOG_HOME") >> + (format #f "~a/.local/var/log" >> + (getenv "HOME"))) >> + "/mcron.log"))) >> + (stop #~(make-kill-destructor)) >> + (actions >> + (list (shepherd-schedule-action mcron files))))))))) >> + >> +(define home-mcron-profile (compose list home-mcron-configuration-packa= ge)) >> + >> +(define (home-mcron-extend config jobs) >> + (home-mcron-configuration >> + (inherit config) >> + (jobs (append (home-mcron-configuration-jobs config) >> + jobs)))) >> + >> +(define home-mcron-service-type >> + (service-type (name 'home-mcron) >> + (extensions >> + (list (service-extension >> + home-shepherd-service-type >> + home-mcron-shepherd-services) >> + (service-extension >> + home-profile-service-type >> + home-mcron-profile))) >> + (compose concatenate) >> + (extend home-mcron-extend) >> + (default-value (home-mcron-configuration)) >> + (description >> + "Install and configure the GNU mcron cron job manager.= "))) >> diff --git a/gnu/local.mk b/gnu/local.mk >> index 31ad1a43db..8212bc5391 100644 >> --- a/gnu/local.mk >> +++ b/gnu/local.mk >> @@ -80,6 +80,7 @@ GNU_SYSTEM_MODULES =3D \ >> %D%/home-services/configuration.scm \ >> %D%/home-services/shells.scm \ >> %D%/home-services/shepherd.scm \ >> + %D%/home-services/mcron.scm \ >> %D%/home-services/utils.scm \ >> %D%/home-services/xdg.scm \ >> %D%/image.scm \ >> --=20 >> 2.33.0 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmE+80IACgkQIgjSCVjB 3rDC8w/+MCgrTMUPOoiYlCS52jGJ7K9kWO6oBUoTz2e9dp0sJwpcTAL9jlHBtt09 d2It3/gZcpotC6dVz1xiaPLXO1OGfLYK+JmxquasTDNHI+/38eTDSkQIEu0reKYc +9jiA6nsBfqmriHHI7Ra0X+nWweHJtQ7O4m1jn8w12oHuU7PmxRQN6EJfi4Ibkfw k12IeFDc1gVUhZaYjj5EwsfK5tPCEKVDgV8knxGcT1io10q86cHZKyGwkzHq/7mT b2zcLhTTrBPBNDD0CRpfbPo2RImrra+tcsoIVXmS5vQaCTB2haY0G6cUZlgLCTCj ovXbnihu0qYk68l2BolYqxTfBtAgO8Guwl6Ib6tG4senGHD70aYLRtTbZvq48nBi PY6kp8aM5bIoK5beipY0es5eirImqoaF7WibrxOKbHef8xFCr/HGwevik9CnnN4/ bFKDm2qhTBnJHES/OE9fIg9nIPYusu0s8+EDiScfM95W6XDFoHfMPDARwHAOQRvA DIFdWxcNsh4p3A4hVIfQrs6mHMMy7XF6F8QLpVp/q0Av6BJP4VhUJasWOWSu/eSO HgedEkj95gjUZRmmPvejkkK8QILxRYe1lPpYt5d/wGofL3J4hCxc281I0l3n8Sek F+QKjwN2xi/WwwcKpqrCSZHzWUkbIha6jMtdEnfNIBnWsxbcyis= =H28z -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 13 02:48:25 2021 Received: (at 50504) by debbugs.gnu.org; 13 Sep 2021 06:48:25 +0000 Received: from localhost ([127.0.0.1]:43964 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mPflQ-0007Nw-Hn for submit@debbugs.gnu.org; Mon, 13 Sep 2021 02:48:25 -0400 Received: from mail-lj1-f175.google.com ([209.85.208.175]:43551) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mPflN-0007Nh-3b for 50504@debbugs.gnu.org; Mon, 13 Sep 2021 02:48:23 -0400 Received: by mail-lj1-f175.google.com with SMTP id j12so15347460ljg.10 for <50504@debbugs.gnu.org>; Sun, 12 Sep 2021 23:48:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop-in.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=R0zFvuxZpICbnKqfXCeSlXGLTy1ZlXoZeQcrsIsP5pg=; b=SDbCpG4L90+n9V0yN/XjLxCNEAmtLjON6GT8aG9Y823wMbThdVtyU1DnKwV7GkYnHc Or8hH623DAb78EflS7e4EVcO1xxdCXqC7SYaHuR9cz36kc9qLlMEGoVM6IcY61cbsZ3r 5guM41SDVDt/MrCW6NZozEBwt5ltOmIx/S33dgMHkGzDKEqezr5WZ9u0tVgnHRaAuT5x TS/grEEHnJ+lxTtHHbEGGAxC9QYyv2VHPMY9Zn7VxhPAKckKBDynBxdtpheSW0LnHR7h VzRs88R1ukIKZM0J3P3aWTYYcb66srlhOeBTSjfUjhLxlpVKG2Qm2J9DM2UK8kyg/Qa0 kCuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=R0zFvuxZpICbnKqfXCeSlXGLTy1ZlXoZeQcrsIsP5pg=; b=PHl0AmWwYzP9O6BvaV53vLHArmSFldAqbBreNDlCH3N0I/SA0UBhpSzMgS5f1xb10T c8IssUKP49wHty+xWKIcM2Hx6EODIO1e+8mqVCOcXniPqjBgTExQA9fbqb71tEPf6Mt9 tLzvpHITOe7bmrZHF1v83Q3LtsQg6rdCEBrqiuN2aWGVh1jUOONhrllLHptvldyq5nGE pnbctTHyJhgJahlbAiMKGMIoS1S8YZj8YA9OIVmxA6Y1+1jheeWvThmVGdd1cQVBSqGK QhCq2HMrg45HzmLpLQ1c8Fp27l+wbx0ncQBLTi9Ufr+zjiVDwj3+DJ4+sHxwXvyXX+x9 yunQ== X-Gm-Message-State: AOAM530Al/0gUxPdVUw6a5w6GQpZXgWjBBkjxh44O57wJCmkKg6V7tDG ht8pft36bK6LzGkAGl3ruUE8Ig== X-Google-Smtp-Source: ABdhPJySwNXgVlZdClVUjsXoqWiq9wDenGUiwepu6pJaPYaDLGrIEamydgOoEuReAgfRuoumJemBgA== X-Received: by 2002:a2e:9e4c:: with SMTP id g12mr8892391ljk.433.1631515694994; Sun, 12 Sep 2021 23:48:14 -0700 (PDT) Received: from localhost (109-252-93-92.nat.spd-mgts.ru. [109.252.93.92]) by smtp.gmail.com with ESMTPSA id j12sm864984ljc.121.2021.09.12.23.48.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Sep 2021 23:48:14 -0700 (PDT) From: Andrew Tropin To: Oleg Pykhalov , 50504@debbugs.gnu.org Subject: [PATCH] fixup! home-services: Add Mcron. In-Reply-To: <87a6kkxpcp.fsf@yoctocell.xyz> References: <8735qc66mt.fsf@trop.in> <87a6kkxpcp.fsf@yoctocell.xyz> Date: Mon, 13 Sep 2021 09:48:11 +0300 Message-ID: <877dflrmxg.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Applied suggestions. From f93bb50483246e3c2c8df669231b13cb85578bfb Mon Sep 17 00:00:00 2001 From: Andrew Tropin Date: Mon, 13 Sep 2021 09:39:18 +0300 Subject: [PATCH] fixup! home-services: Add Mcron. Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_NONE SPF: sender does not publish an SPF Record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.208.175 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.208.175 listed in list.dnswl.org] X-Debbugs-Envelope-To: 50504 Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= , Xinglu Chen X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Applied suggestions. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-fixup-home-services-Add-Mcron.patch Content-Transfer-Encoding: quoted-printable From=20f93bb50483246e3c2c8df669231b13cb85578bfb Mon Sep 17 00:00:00 2001 From: Andrew Tropin Date: Mon, 13 Sep 2021 09:39:18 +0300 Subject: [PATCH] fixup! home-services: Add Mcron. =2D-- doc/guix.texi | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index a7eacad762..419d9429d6 100644 =2D-- a/doc/guix.texi +++ b/doc/guix.texi @@ -16090,9 +16090,9 @@ This is the type of the @code{mcron} service, whose= value is an @code{mcron-configuration} object. =20 This service type can be the target of a service extension that provides =2Dit additional job specifications (@pxref{Service Composition}). In =2Dother words, it is possible to define services that provide additional =2Dmcron jobs to run. +additional job specifications (@pxref{Service Composition}). In other +words, it is possible to define services that provide additional mcron +jobs to run. @end defvr =20 @deftp {Data Type} mcron-configuration @@ -35689,17 +35689,19 @@ The @code{(gnu home-services mcron)} module provi= des 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 =2Dfor home services is that they have to be declared in =2D@code{home-envirnoment} record instead of @code{operating-system}. +for home services is that they have to be declared in a +@code{home-envirnoment} record instead of an @code{operating-system} +record. =20 @defvr {Scheme Variable} home-mcron-service-type This is the type of the @code{mcron} home service, whose value is an =2D@code{home-mcron-configuration} object. It allows to manage tasks +@code{home-mcron-configuration} object. It allows to manage scheduled +tasks. =20 This service type can be the target of a service extension that provides =2Dit additional job specifications (@pxref{Service Composition}). In =2Dother words, it is possible to define services that provide additional =2Dmcron jobs to run. +additional job specifications (@pxref{Service Composition}). In other +words, it is possible to define services that provide additional mcron +jobs to run. @end defvr =20 @deftp {Data Type} home-mcron-configuration =2D-=20 2.33.0 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2021-09-10 20:22, Xinglu Chen wrote: >> doc/guix.texi | 31 +++++++++- >> gnu/home-services/mcron.scm | 115 ++++++++++++++++++++++++++++++++++++ >> gnu/local.mk | 1 + >> 3 files changed, 146 insertions(+), 1 deletion(-) >> create mode 100644 gnu/home-services/mcron.scm >> >> diff --git a/doc/guix.texi b/doc/guix.texi >> index e546fcc0d2..a7eacad762 100644 >> --- a/doc/guix.texi >> +++ b/doc/guix.texi >> @@ -35685,7 +35685,36 @@ for example). >> @cindex mcron >> @cindex scheduling jobs >>=20=20 >> -mcron info here >> +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 >> +for home services is that they have to be declared in >> +@code{home-envirnoment} record instead of @code{operating-system}. > > =E2=80=9Cdeclared in a @code{home-environemnt} record instead of a > @code{operating-system} record.=E2=80=9D > >> +@defvr {Scheme Variable} home-mcron-service-type >> +This is the type of the @code{mcron} home service, whose value is an > > Why @code{mcron}? I would use =E2=80=9CMcron=E2=80=9D instead. > >> +@code{home-mcron-configuration} object. It allows to manage tasks > > =E2=80=9CIt allows one to manage scheduled tasks.=E2=80=9D > >> +This service type can be the target of a service extension that provides >> +it additional job specifications (@pxref{Service Composition}). In > > s/it// > >> +other words, it is possible to define services that provide additional >> +mcron jobs to run. >> +@end defvr >> + >> +@deftp {Data Type} home-mcron-configuration >> +Data type representing the configuration of mcron. >> + >> +@table @asis >> +@item @code{mcron} (default: @var{mcron}) >> +The mcron package to use. >> + >> +@item @code{jobs} >> +This is a list of gexps (@pxref{G-Expressions}), where each gexp >> +corresponds to an mcron job specification (@pxref{Syntax, mcron job >> +specifications,, mcron, GNU@tie{}mcron}). >> +@end table >> +@end deftp >>=20=20 >> @node Shepherd Home Service >> @subsection Managing User's Daemons >> diff --git a/gnu/home-services/mcron.scm b/gnu/home-services/mcron.scm >> new file mode 100644 >> index 0000000000..fdfde179a5 >> --- /dev/null >> +++ b/gnu/home-services/mcron.scm >> @@ -0,0 +1,115 @@ >> +;;; GNU Guix --- Functional package management for GNU >> +;;; Copyright =C2=A9 2021 Andrew Tropin >> +;;; Copyright =C2=A9 2021 Xinglu Chen >> +;;; >> +;;; This file is part of GNU Guix. >> +;;; >> +;;; GNU Guix is free software; you can redistribute it and/or modify it >> +;;; under the terms of the GNU General Public License as published by >> +;;; the Free Software Foundation; either version 3 of the License, or (= at >> +;;; your option) any later version. >> +;;; >> +;;; GNU Guix is distributed in the hope that it will be useful, but >> +;;; WITHOUT ANY WARRANTY; without even the implied warranty of >> +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >> +;;; GNU General Public License for more details. >> +;;; >> +;;; You should have received a copy of the GNU General Public License >> +;;; along with GNU Guix. If not, see . >> + >> +(define-module (gnu home-services mcron) >> + #:use-module (gnu packages guile-xyz) >> + #:use-module (gnu home-services) >> + #:use-module (gnu home-services shepherd) >> + #:use-module (gnu services shepherd) >> + #:use-module (guix records) >> + #:use-module (guix gexp) >> + #:use-module (srfi srfi-1) >> + #:use-module (ice-9 match) >> + >> + #:export (home-mcron-configuration >> + home-mcron-service-type)) >> + >> +;;; Commentary: >> +;; >> +;; Service for the GNU mcron cron job manager. >> +;; >> +;; Example configuration, the first job runs mbsync once every ten >> +;; minutes, the second one writes "Mcron service" to ~/mcron-file once >> +;; every minute. >> +;; >> +;; (service home-mcron-service-type >> +;; (home-mcron-configuration >> +;; (jobs (list #~(job '(next-minute >> +;; (range 0 60 10)) >> +;; (lambda () >> +;; (system* "mbsync" "--all"))) >> +;; #~(job next-minute-from >> +;; (lambda () >> +;; (call-with-output-file (string-appe= nd (getenv "HOME") >> +;; = "/mcron-file") >> +;; (lambda (port) >> +;; (display "Mcron service" port))= ))))))) >> +;; >> +;;; Code: >> + >> +(define-record-type* home-mcron-configuration >> + make-home-mcron-configuration >> + home-mcron-configuration? >> + (package home-mcron-configuration-package ; package >> + (default mcron)) >> + (jobs home-mcron-configuration-jobs ; list of jobs >> + (default '()))) >> + >> +(define job-files (@@ (gnu services mcron) job-files)) >> +(define shepherd-schedule-action >> + (@@ (gnu services mcron) shepherd-schedule-action)) >> + >> +(define home-mcron-shepherd-services >> + (match-lambda >> + (($ mcron '()) ; no jobs to run >> + '()) >> + (($ mcron jobs) >> + (let ((files (job-files mcron jobs))) >> + (list (shepherd-service >> + (documentation "User cron jobs.") >> + (provision '(mcron)) >> + (modules `((srfi srfi-1) >> + (srfi srfi-26) >> + (ice-9 popen) ; for the 'schedule' = action >> + (ice-9 rdelim) >> + (ice-9 match) >> + ,@%default-modules)) >> + (start #~(make-forkexec-constructor >> + (list #$(file-append mcron "/bin/mcron") #$@fil= es) >> + #:log-file (string-append >> + (or (getenv "XDG_LOG_HOME") >> + (format #f "~a/.local/var/log" >> + (getenv "HOME"))) >> + "/mcron.log"))) >> + (stop #~(make-kill-destructor)) >> + (actions >> + (list (shepherd-schedule-action mcron files))))))))) >> + >> +(define home-mcron-profile (compose list home-mcron-configuration-packa= ge)) >> + >> +(define (home-mcron-extend config jobs) >> + (home-mcron-configuration >> + (inherit config) >> + (jobs (append (home-mcron-configuration-jobs config) >> + jobs)))) >> + >> +(define home-mcron-service-type >> + (service-type (name 'home-mcron) >> + (extensions >> + (list (service-extension >> + home-shepherd-service-type >> + home-mcron-shepherd-services) >> + (service-extension >> + home-profile-service-type >> + home-mcron-profile))) >> + (compose concatenate) >> + (extend home-mcron-extend) >> + (default-value (home-mcron-configuration)) >> + (description >> + "Install and configure the GNU mcron cron job manager.= "))) >> diff --git a/gnu/local.mk b/gnu/local.mk >> index 31ad1a43db..8212bc5391 100644 >> --- a/gnu/local.mk >> +++ b/gnu/local.mk >> @@ -80,6 +80,7 @@ GNU_SYSTEM_MODULES =3D \ >> %D%/home-services/configuration.scm \ >> %D%/home-services/shells.scm \ >> %D%/home-services/shepherd.scm \ >> + %D%/home-services/mcron.scm \ >> %D%/home-services/utils.scm \ >> %D%/home-services/xdg.scm \ >> %D%/image.scm \ >> --=20 >> 2.33.0 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmE+9CsACgkQIgjSCVjB 3rC48Q/+Ns/FQzNaZeopRPbhZv/IJM/xsHWJc+RoBMLFoJWw+OJ30lsUpe/UxCht KGCflioz1H2RKRMAHSauu0lUkEPo56bCGuKoAIosVnmR/DmeeWHMU+/lfWM62QEv J5jbQ868zbhUfBaurW3siw+jihlBkwfTZJrtmH+FfJYv2s+7DeRc3PNJZQ8MvMcW QqX/4Ep9GpjYRZZdo7RV2nN1ayYY6QfowdjG474E2OAeIUYSqmv+1nmmO+cpTQpu hq+1axwohOG8LeshQS88EgsndjbvbuTDplelYXpZrX8TcQVu7zncLk9Sus1SK+hy qzaUuSjM/gt9cJsoS4iRdVeaHd2OzGQtBNF1cVtHfq95TQhreZ5wwicOgK+pddWQ yNpVutffsDMHyG60EXh+XgBdRuhM+wLZO2UrwCaeQV7sxsr1Tkpglc+H6t1mOBso 9GPCKJ9/oADay7LF1SvUoBx1Lg1D0nqn640YnZBJyTdUmABIlQf8QCkCrgX0s6Ed C+Hkgqqf1arpEv/wWjJWKA6jw340BChx6nR/tgEPitlFIaPP2LIqOB/wsTL1LqXt CqGEyApP5fGIO2YdSHHfSBa3J8VFoGdIe6D62FgsacYibwK/R5BGldX28shrv2Or Co3OVFIO8D+TLeMHAO65dRBF5RJv5ZBK2BckWId2YRIeMYmb4lI= =W2GK -----END PGP SIGNATURE----- --==-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 13 12:16:46 2021 Received: (at 50504) by debbugs.gnu.org; 13 Sep 2021 16:16:46 +0000 Received: from localhost ([127.0.0.1]:46724 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mPodR-00030S-M2 for submit@debbugs.gnu.org; Mon, 13 Sep 2021 12:16:45 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:52506 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mPodP-00030C-6q for 50504@debbugs.gnu.org; Mon, 13 Sep 2021 12:16:43 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1631549794; bh=9bwKF9gulfZ0szF2PoNt5e/z1tzjDk2zvbnengYO63E=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=YoUL3Luony+LO6oLQ7qmE3eRP1qcfb5N2S7wuPUjyADJ0ig58oN7MdgRCJYbvqyVv ujEX4cGKfehnze0xnv8DJDQ+rwIlN1Od2bsUEskavsWp3r5j3yKcLb74NBYWrEBOQW txk1EOi9SQG4Avs6GRstB04M3AiLJv98MdybtVcA= To: Andrew Tropin , 50504@debbugs.gnu.org Subject: Re: [bug#50504] [PATCH] home-services: Add Mcron. In-Reply-To: <87a6khrn3x.fsf@trop.in> References: <8735qc66mt.fsf@trop.in> <87a6kkxpcp.fsf@yoctocell.xyz> <87a6khrn3x.fsf@trop.in> Date: Mon, 13 Sep 2021 18:16:31 +0200 Message-ID: <87zgsgtpr4.fsf@yoctocell.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 2.9 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On Mon, Sep 13 2021, Andrew Tropin wrote: > On 2021-09-10 20:22, Xinglu Chen wrote: > >> On Fri, Sep 10 2021, Andrew Tropin wrote: >> >>> * gnu/home-services/mcron.scm: New file. >>> * gnu/local.mk: Add this. >>> * doc/guix.texi: Add document [...] Content analysis details: (2.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS 0.0 PDS_RDNS_DYNAMIC_FP RDNS_DYNAMIC with FP steps X-Debbugs-Envelope-To: 50504 Cc: Oleg Pykhalov , Ludovic =?utf-8?Q?Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.9 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On Mon, Sep 13 2021, Andrew Tropin wrote: > On 2021-09-10 20:22, Xinglu Chen wrote: > >> On Fri, Sep 10 2021, Andrew Tropin wrote: >> >>> * gnu/home-services/mcron.scm: New file. >>> * gnu/local.mk: Add this. >>> * doc/guix.texi: Add document [...] Content analysis details: (2.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS 1.0 BULK_RE_SUSP_NTLD Precedence bulk and RE: from a suspicious TLD -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager 0.0 PDS_RDNS_DYNAMIC_FP RDNS_DYNAMIC with FP steps --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Mon, Sep 13 2021, Andrew Tropin wrote: > On 2021-09-10 20:22, Xinglu Chen wrote: > >> On Fri, Sep 10 2021, Andrew Tropin wrote: >> >>> * gnu/home-services/mcron.scm: New file. >>> * gnu/local.mk: Add this. >>> * doc/guix.texi: Add documentation about Mcron Home Service. >>> --- >>> >>> This is the last of home services I consider "must-have" for wip-guix-h= ome. >>> >>> It reuses two functions from (gnu services mcron) via @@, which can be >>> considered as a hack, the alternative solution is to expose those funct= ions >>> via #:export, I can do it if it's a preffered way or suggest other idea= s, >>> please. The discussion on this topic: https://issues.guix.gnu.org/47238 >>> Included Ludovic and Xinglu in CC. >> >> An alternative would be put it the (gnu service mcron) to share more >> code between system service and home service. This was discussed >> briefly on rde-devel[1]. It might be worth discussing this issue on >> guix-devel before we add too many home service. >> > > I'll make a thread on possible modules naming for home services later > this week and will discuss this thing too. Cool! >>> I took a brief look at the testing approach, seems the most relevant is >>> guix-system.sh and it is just a shell script, which runs a few guix sys= tem >>> subcommand and check if they fail or succeed. Please let me know, what= is a >>> preferred way for writing tests and I'll try to provide some tests for = Guix >>> Home in the separate patch. >> >> The =E2=80=98guix-system.sh=E2=80=99 script seems to only test the =E2= =80=98guix system=E2=80=99 >> command, which doesn=E2=80=99t seem that related to the home services. = I guess >> we could check the contents of the generated config files. There is >> (gnu build marionette) which creates a VM; we could then check that the >> relevant process is running. Maybe there is a better approach, though. >> > > It was a general question about tests for Guix Home, not Mcron home > service, sorry for the confusion. No worries! To clarify, you were referring to the =E2=80=98guix home=E2=80= =99 command line utilities when you wrote =E2=80=9CGuix Home=E2=80=9D, right? If so, t= hey could probably be based on the =E2=80=98guix-system.sh=E2=80=99 test. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmE/eV8VHHB1YmxpY0B5 b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5M2MP/jbcyweHCaPOqEjLxDOPGQr/nRsH 9A9Af6CD1ftq4Sar12dhKs6OuECvw3hx0b1ulYutQwl6w9nT/sll7qUpeoyIv0pt U98FYQ284wYxgA31h2tSzgSA91nEZO3NyxZ4W+x2mpBiNuvOARB0zQxmJXUT/Db0 1RMepxmgQ8NwCjIgC5XOAKNFIS1j897b4iKkUQ8aUP5Lt6Azwyu4NoUd87LtobTe Cns5PY/bG7Esu2uNCsWB1BL3ZWMwFTFDqL6vBjaLbBkIKNJnHCDTdNviiIQzekEz ZDPmunSs2WG1IfYNh57P8qBNGxH6gnUZUL0TX3H4gSvtebKyY71R/O066us7TcF1 MmAnFWsJSLnQOj1owD4bg3Ai3uL2nDaku0SAwnJjvZljsPyOyzhyz64Nc86B1G2G yofrhD/Yfw2Dv+xLXAK9Av3F7QvmtO0+CWMl4tRFHLtGSOxpSiGBmI/Me4HCuDsE TxUCAwtvWmPIDorJrZVisvNGwJ5fU0tG/MH0EqghzCltfJ6lQ+JIpbwvb0RV3mGb WH+IwgbOJoivFKAZSilaxPF/Fq5TdClob2fC7qePaIFylu4sHURJIwxvKBrfJVpe 2KlYiidbin0t5RNJhN7CiIMhFrhnB2m9RshEAHkjCxk940FmS96IFtyHqt7Md8Do WHvDc+AYafVIx9Wo =nru6 -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 13 12:17:32 2021 Received: (at 50504) by debbugs.gnu.org; 13 Sep 2021 16:17:32 +0000 Received: from localhost ([127.0.0.1]:46734 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mPoeB-00032J-RK for submit@debbugs.gnu.org; Mon, 13 Sep 2021 12:17:32 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:52538 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mPoe9-00031s-J2 for 50504@debbugs.gnu.org; Mon, 13 Sep 2021 12:17:29 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1631549842; bh=0Grct6Q+Tar0Mf12UrKxiQunZDOcxxuGoOvK+VDY2L8=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=EWL4U604Y5+EJSsZNeGQvcm+p4hiM89yyeIK6rSWEPg3eXuEf7Z09tE9DrG1bavui b2N1qAC1+r6rhlTd4YtXrlCnLhQETbg27JTLRyfBgj495YaE1LNg+S+sQvAFO5oyth yAaBpL96Ti9HW1Acm9gS18alWUL4VF0yIJqRJDqM= To: Andrew Tropin , Oleg Pykhalov , 50504@debbugs.gnu.org Subject: Re: [bug#50504] [PATCH] fixup! home-services: Add Mcron. In-Reply-To: <877dflrmxg.fsf@trop.in> References: <8735qc66mt.fsf@trop.in> <87a6kkxpcp.fsf@yoctocell.xyz> <877dflrmxg.fsf@trop.in> Date: Mon, 13 Sep 2021 18:17:21 +0200 Message-ID: <87wnnktppq.fsf@yoctocell.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 2.9 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On Mon, Sep 13 2021, Andrew Tropin wrote: > Applied suggestions. > > From f93bb50483246e3c2c8df669231b13cb85578bfb Mon Sep 17 00:00:00 2001 > From: Andrew Tropin > Date: Mon, 13 Sep 2021 09:39:18 +0300 > Subject: [PATCH] fixu [...] Content analysis details: (2.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS 0.0 PDS_RDNS_DYNAMIC_FP RDNS_DYNAMIC with FP steps X-Debbugs-Envelope-To: 50504 Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.9 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On Mon, Sep 13 2021, Andrew Tropin wrote: > Applied suggestions. > > From f93bb50483246e3c2c8df669231b13cb85578bfb Mon Sep 17 00:00:00 2001 > From: Andrew Tropin > Date: Mon, 13 Sep 2021 09:39:18 +0300 > Subject: [PATCH] fixu [...] Content analysis details: (2.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS 1.0 BULK_RE_SUSP_NTLD Precedence bulk and RE: from a suspicious TLD -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager 0.0 PDS_RDNS_DYNAMIC_FP RDNS_DYNAMIC with FP steps --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Mon, Sep 13 2021, Andrew Tropin wrote: > Applied suggestions. > > From f93bb50483246e3c2c8df669231b13cb85578bfb Mon Sep 17 00:00:00 2001 > From: Andrew Tropin > Date: Mon, 13 Sep 2021 09:39:18 +0300 > Subject: [PATCH] fixup! home-services: Add Mcron. > > --- > doc/guix.texi | 20 +++++++++++--------- > 1 file changed, 11 insertions(+), 9 deletions(-) > > diff --git a/doc/guix.texi b/doc/guix.texi > index a7eacad762..419d9429d6 100644 > --- a/doc/guix.texi > +++ b/doc/guix.texi > @@ -16090,9 +16090,9 @@ This is the type of the @code{mcron} service, who= se value is an > @code{mcron-configuration} object. >=20=20 > This service type can be the target of a service extension that provides > -it additional job specifications (@pxref{Service Composition}). In > -other words, it is possible to define services that provide additional > -mcron jobs to run. > +additional job specifications (@pxref{Service Composition}). In other > +words, it is possible to define services that provide additional mcron > +jobs to run. > @end defvr >=20=20 > @deftp {Data Type} mcron-configuration > @@ -35689,17 +35689,19 @@ The @code{(gnu home-services mcron)} module pro= vides 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 > -for home services is that they have to be declared in > -@code{home-envirnoment} record instead of @code{operating-system}. > +for home services is that they have to be declared in a > +@code{home-envirnoment} record instead of an @code{operating-system} > +record. >=20=20 > @defvr {Scheme Variable} home-mcron-service-type > This is the type of the @code{mcron} home service, whose value is an > -@code{home-mcron-configuration} object. It allows to manage tasks > +@code{home-mcron-configuration} object. It allows to manage scheduled > +tasks. >=20=20 > This service type can be the target of a service extension that provides > -it additional job specifications (@pxref{Service Composition}). In > -other words, it is possible to define services that provide additional > -mcron jobs to run. > +additional job specifications (@pxref{Service Composition}). In other > +words, it is possible to define services that provide additional mcron > +jobs to run. > @end defvr >=20=20 > @deftp {Data Type} home-mcron-configuration > --=20 > 2.33.0 The updated patch LGTM! --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmE/eZEVHHB1YmxpY0B5 b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5ErUP/jFtslwcEyNaucnObAuAa5MjwuoZ j6vcB8Z5MNnlhxTUQ3fuUr2WebzSt3ox+q9gGNMRi5JSFSFvbgoxnRFhIEAE+i+D yyIA5lFYZvV2Wx2x3Caitkgm0Zf7+23id9DwFht+7t8RNE4PEhNEcHoDyzQbZEBh qPkyHYnLWg4NXZ2Ip4mGBSvFP4Tp9Xv6QLootAhcbfToYywYj8e2aWQZzbWQH9Jc tAIGZ7lfvbK30CDagWacvdiDGtnU4oZ7cqWMTGRnKsQnyN5+sogUBqDK8iqKX9+p 9eIHP0aauDO5pNUgRpQD1gyvD82R51xTvihp/5TDWTAKciis61Lt+S1u5cdTdPts 6lUPXCcXr3AJoOL+nnqKNgNragrE57Ml7OQeucKZ7hxpHO5JfPj4LfP3eBn9daIM MYewkVylqukrFsyHPjsMKjQ27F2kW3oMAs4Yx3T91LgmxS3uUwOdJIu4/b57Ni/g Jpw5ScR0+vGUecUVaBr6RXyUAsWFeJCZph407+763EWa2X9z5uC5fCe+fXvZXajM VRkM2wLt5riNXOpRzr59tJzpb06F20dv1EpVIPokv6eEmYa0YQZKRB+vJHxBEpIB kdA14QYp0i8OijiQAJNlHCN/iDrRNVHR3c+7tKUYc+snRcyV/8VTtcVTQ1NXhEV7 P76qxBVM9k8Z8uVz =FTPr -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 13 16:02:53 2021 Received: (at 50504-done) by debbugs.gnu.org; 13 Sep 2021 20:02:54 +0000 Received: from localhost ([127.0.0.1]:46898 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mPsAH-0008Rb-Nv for submit@debbugs.gnu.org; Mon, 13 Sep 2021 16:02:53 -0400 Received: from mail-lf1-f54.google.com ([209.85.167.54]:42905) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mPsAC-0008R8-2u for 50504-done@debbugs.gnu.org; Mon, 13 Sep 2021 16:02:52 -0400 Received: by mail-lf1-f54.google.com with SMTP id bq5so23539154lfb.9 for <50504-done@debbugs.gnu.org>; Mon, 13 Sep 2021 13:02:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=U2Z4bQ9FKenZ4qmpVCIW+VEvPIEr8U3X7k/OkzbirWc=; b=Rsqy/pjE9fSsgKNIIzHvOy8uk0C2xPogfq17ZBPyHSbVRIssLaJAS6vTY0vkw/PggD E/ohzAtBUdiY6btKtX9lMCdQHHKlwoKifiONF1DdhiU/lgXXTo5tLfE563C3FJw9BnMQ KyHEdmQCLKiLVDYIb6XDZTMvRC9HLxUpJQhCuYRVI/eADb9GNTlBR8PA9stvwsxHyQZF P+USr5yqm3iWgHeX6Pj2RxNjLRiatYfc5xXpTBuu3NZT81waS9CDn4pyIYx5C2RLud86 zypCCI6XdM3tJwW3zu3wXNVJpH6IJCEPN/vunKvVyGDwO2gZYNElz/1u0lq4uAnyXygJ vGfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=U2Z4bQ9FKenZ4qmpVCIW+VEvPIEr8U3X7k/OkzbirWc=; b=jztvTeHw3kfEGR6awKG3kamkfWaxiKq2SnZguGlPQtzST1qFI8v6XiwdQ+cUddrFSn 1IpKWDC4xbs9As3YhGq4tahsBC0b0qWe1h1TUec/8nNbnl9m6EbnfcQ0iy43cG8ZAaj3 jCFVHDbJr0UUEyQAcXUy8InxFzmfOlcD2cASdMY8IhMvjOlya86N8ZLkypFMvRbbZ1jL HpVrgNM8vmWvc4EHvE5Py+8HblztWtD2VY+9Bc1OBBc76iCslOQwAP5zTrRPqZ3W4Ghu fP4u75TAkxZC+OMqtsC3UgmiUM+HZNMlkB9CWIbS5N48U0MuhxhvFMnhzNMWca/zVyF7 yMUA== X-Gm-Message-State: AOAM53035XiQHaf6To/GLsbpdeFGf9O8Sp3beYvLg89vvRunEJ2RVHnc fLEW2NobTGoPaaX0fkhxY8fvSS6WDWc= X-Google-Smtp-Source: ABdhPJxmz24QMASajPcIGgNywEGxGHX5TQplYxUKO6FOkATWPzTEcHCB3GmlhxD052de4JFaqiXftQ== X-Received: by 2002:ac2:5547:: with SMTP id l7mr7184402lfk.458.1631563362047; Mon, 13 Sep 2021 13:02:42 -0700 (PDT) Received: from guixsd ([88.201.161.72]) by smtp.gmail.com with ESMTPSA id k20sm1080614ljc.2.2021.09.13.13.02.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Sep 2021 13:02:41 -0700 (PDT) From: Oleg Pykhalov To: Andrew Tropin Subject: Re: bug#50504: [PATCH] home-services: Add Mcron. References: <8735qc66mt.fsf@trop.in> <87a6kkxpcp.fsf@yoctocell.xyz> <877dflrmxg.fsf@trop.in> Date: Mon, 13 Sep 2021 23:02:37 +0300 In-Reply-To: <877dflrmxg.fsf@trop.in> (Andrew Tropin's message of "Mon, 13 Sep 2021 09:48:11 +0300") Message-ID: <87mtogp7ky.fsf_-_@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) 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: 50504-done Cc: 50504-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Pushed to wip-guix-home. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJIBAEBCgAyFiEEcjhxI46s62NFSFhXFn+OpQAa+pwFAmE/rl0UHGdvLndpZ3Vz dEBnbWFpbC5jb20ACgkQFn+OpQAa+pzeoxAAwcIlPYEr4MUwc7nKX9W9nT4WPdt0 fQ4Iq6RBcoUREsMpY0xkYAiJWWeOojwEVWs3vwYzM0JT/V2H0cS61wPVJrVLE8Aj PYVE148N4XiPmcqlSsDlH/4vL5q0tHiMw1pSat7hizm/8wAZH1aM170KlEBNtpEk PZGfwVCRKwPSvN28n3bUPg7hwM4WAJHgMB4FTcYh1nIZOtMuh5zsDuvmTt8XuUUU A3j/VT4le5pp2f08zNiPdCs32IaLlgaRxQ6+tboZwWuvnzzU28eVDUgHV14VWojQ Qf7iuOy0P9lvT/VKF1tvqZtwOvnWa6qxg/6xevxj6RqmS2qp4tc6lB2QMXUxYaiy +4zeJpnOvdWIo8nqWsgahZp9HZH1WO44eRwDVwS9iG1F/+ObaDz+HK7ZDKOOeG+r q1ZFrvt//00acIZwFvmNHnUDV4ttiRUeYQfKN5RtqYTUUiXOyaH7m0YX3B6TQ+Qo nXbGh+/wl8QTZiM1P1IsaC0N3plZd+1aixv1mWyPfhJEf9RJp4qzsH56Gx02mA1i qRV4KoL7fCweKsc5tw524enzSJjBW5indkbwZZKqnHmCGAQLTgYaIuvN85Z0RGUt xIW0yCciH8nNnNqo2EY5c7Xu1F2ikOV3PpK0zW0nBiecg0G7iTI/3iP+D2vzF1Qw AB7kz7AfMut/Rmc= =DAle -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 14 02:34:57 2021 Received: (at 50504) by debbugs.gnu.org; 14 Sep 2021 06:34:57 +0000 Received: from localhost ([127.0.0.1]:47319 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mQ21w-0006ph-Pq for submit@debbugs.gnu.org; Tue, 14 Sep 2021 02:34:57 -0400 Received: from mail-lf1-f49.google.com ([209.85.167.49]:34791) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mQ21u-0006pS-To for 50504@debbugs.gnu.org; Tue, 14 Sep 2021 02:34:55 -0400 Received: by mail-lf1-f49.google.com with SMTP id l11so26508668lfe.1 for <50504@debbugs.gnu.org>; Mon, 13 Sep 2021 23:34:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop-in.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=+rpJPwi99jGNkQMQqEy1MFC1f8GnkbNgmwk6pTafWUA=; b=MGxVD52Dk+oqnybnIzU23Q8bJoJBvH9+pJ9cZ+TzdvDqZozhtgupbdue10pCNcxcI3 M1Nvext7zOnoCX+YbVky5bmCOzefmr6UoANx1M8Ndl/sdgnNANi76l94FAVEUSgfdfGu IozSfQjDPP4fmvTcO2UZPm6PRuW3W62uiKjy3JEUhphD+q6tT4ZMcy75A3tCDLtZUpSN 2e4JF++vKjAmReviioc3drrKFsxI+HmFyFOz8ipdurWjtQEklDzpiQfUS5Pgdaoyovfh wMdPv/7ikM0GWdGvngej0ZtItvOqBcUZBTI8h0cqn0tlH0mMvQMGisZpF1du56qh34uG E5gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=+rpJPwi99jGNkQMQqEy1MFC1f8GnkbNgmwk6pTafWUA=; b=jIM/yXEtNr51o1sYccPhYMuuzrjqBREDM3UMICCCwkrAz5ZnVYIuy+HLatqnTGPKWn 6iFhBxlFA7Ww2vOYwm/8jJwc0htmcxBP+31obTIeZzWokEh9Wz4i3DJYFRiZ8X+dKJ1A cQED3E5+0kjNI8sbDyskv0eGvkhKzCdkLed8j4f3s5fYwvqxObZuNj0OaFzKJvbWW5f2 fWOFbojT8N70Ar6CNUrkjvPE9w2FFHg1KcX2I1ppOhMZikF1WhOII63GScbGPddJNkrJ ouArnETuTFZ9Z6lMhKcKRAs68ccS1+XhPzvV/H6sfvDwVO8jW5F5X3z8ACiV0p6RiWhe nQiA== X-Gm-Message-State: AOAM5301nUlRDOJbQP5/HfcEr1lGJpIaDK/quXgQD5hpNC+MJ0hMpkwz wBNvXOROzA8CexXAPdKlbP47Ig== X-Google-Smtp-Source: ABdhPJyvvfhjyMm4L/1jNNUGam3jdHSdegNvTZcB+AFl0089YQU6adCq0im3wQEynappX8v8gqOWcA== X-Received: by 2002:a19:8c4c:: with SMTP id i12mr11956647lfj.445.1631601288862; Mon, 13 Sep 2021 23:34:48 -0700 (PDT) Received: from localhost (109-252-93-92.nat.spd-mgts.ru. [109.252.93.92]) by smtp.gmail.com with ESMTPSA id a11sm620360lfo.5.2021.09.13.23.34.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Sep 2021 23:34:48 -0700 (PDT) From: Andrew Tropin To: Xinglu Chen , 50504@debbugs.gnu.org Subject: Re: [bug#50504] [PATCH] home-services: Add Mcron. In-Reply-To: <87zgsgtpr4.fsf@yoctocell.xyz> References: <8735qc66mt.fsf@trop.in> <87a6kkxpcp.fsf@yoctocell.xyz> <87a6khrn3x.fsf@trop.in> <87zgsgtpr4.fsf@yoctocell.xyz> Date: Tue, 14 Sep 2021 09:34:45 +0300 Message-ID: <87fsu7mzqy.fsf@trop.in> 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: 50504 Cc: Oleg Pykhalov , Ludovic =?utf-8?Q?Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2021-09-13 18:16, Xinglu Chen wrote: > On Mon, Sep 13 2021, Andrew Tropin wrote: > >> On 2021-09-10 20:22, Xinglu Chen wrote: >> >>> On Fri, Sep 10 2021, Andrew Tropin wrote: >>> >>>> * gnu/home-services/mcron.scm: New file. >>>> * gnu/local.mk: Add this. >>>> * doc/guix.texi: Add documentation about Mcron Home Service. >>>> --- >>>> >>>> This is the last of home services I consider "must-have" for wip-guix-= home. >>>> >>>> It reuses two functions from (gnu services mcron) via @@, which can be >>>> considered as a hack, the alternative solution is to expose those func= tions >>>> via #:export, I can do it if it's a preffered way or suggest other ide= as, >>>> please. The discussion on this topic: https://issues.guix.gnu.org/472= 38 >>>> Included Ludovic and Xinglu in CC. >>> >>> An alternative would be put it the (gnu service mcron) to share more >>> code between system service and home service. This was discussed >>> briefly on rde-devel[1]. It might be worth discussing this issue on >>> guix-devel before we add too many home service. >>> >> >> I'll make a thread on possible modules naming for home services later >> this week and will discuss this thing too. > > Cool! > >>>> I took a brief look at the testing approach, seems the most relevant is >>>> guix-system.sh and it is just a shell script, which runs a few guix sy= stem >>>> subcommand and check if they fail or succeed. Please let me know, wha= t is a >>>> preferred way for writing tests and I'll try to provide some tests for= Guix >>>> Home in the separate patch. >>> >>> The =E2=80=98guix-system.sh=E2=80=99 script seems to only test the =E2= =80=98guix system=E2=80=99 >>> command, which doesn=E2=80=99t seem that related to the home services. = I guess >>> we could check the contents of the generated config files. There is >>> (gnu build marionette) which creates a VM; we could then check that the >>> relevant process is running. Maybe there is a better approach, though. >>> >> >> It was a general question about tests for Guix Home, not Mcron home >> service, sorry for the confusion. > > No worries! To clarify, you were referring to the =E2=80=98guix home=E2= =80=99 command > line utilities when you wrote =E2=80=9CGuix Home=E2=80=9D, right? If so,= they could > probably be based on the =E2=80=98guix-system.sh=E2=80=99 test. To the whole Guix Home and found `guix-system.sh` to be most relevant, but later I saw that there are some tests for services too, both in tests/services and gnu/tests. Probably I need to look at them more carefully and write some in the same way. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmFAQoUACgkQIgjSCVjB 3rAoTA/+NjLhgnoPMepmFhVYmTXYVgu/TtPSpsA8INHbBGR1V/CTKo5GqIPg/sdR 40Kgj9ugnBnnQKh1KpPDq/qIKSPV3qmKGeB/sNU8sRfedTXYgxpDO6xvWxITQTxb HZNxDDxA2h6tuNOOy3NjvtmLYZYKLhYUeI4ueCPe8DcVGa/FNcDlGUhiVrQmbaez +HP9fV1Cq/dJs3jXjaRQLR2fuGG0K8YQNKiyLYwBsesW6ME/Khpo5ap9UnjMHYgI RtDrBYJIugXcB9TJpvUMbdXu6MuAP6Y6ZFa4rkAFq7Z26ezLfATggksoFHkG7BXA ogyxOEOxcOoT5or9zcpTqukK4d8kqENMIIKPCEVIjrAi0WdKGkXoRNFKzCZt5RZ2 xnPB0vblF1TXVVTrrx5Q5n6KnEcMHK+lsFmPp/GHRRcOCIG/B2nh85NTFrY0/Eno wJYE+h3SZd8onnfBQYXuQgP3Ns+dfO3x50Qkymf59OI4SpL7Owk0LDyg2RrorqH3 mbz2qZDi+MnuZxlyfb8pBP09ergCIsVvVPrzYi6AFZJswExD6CfFelo8nO1q8w8N m1NiI9SvelJQv9oDD183UdzpoypH9jXfpBQLpeDOSONfyegkVbR1T4Ds/1mQkfCw xYHFSwdYM5bhMWeUCisIXhVJIJtCGyeitiAv98HWIJ3GAlHLcKw= =Bd9e -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 14 02:35:40 2021 Received: (at 50504-done) by debbugs.gnu.org; 14 Sep 2021 06:35:40 +0000 Received: from localhost ([127.0.0.1]:47323 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mQ22e-0006r9-4y for submit@debbugs.gnu.org; Tue, 14 Sep 2021 02:35:40 -0400 Received: from mail-lj1-f173.google.com ([209.85.208.173]:36731) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mQ22Z-0006qr-8M for 50504-done@debbugs.gnu.org; Tue, 14 Sep 2021 02:35:39 -0400 Received: by mail-lj1-f173.google.com with SMTP id p15so21813494ljn.3 for <50504-done@debbugs.gnu.org>; Mon, 13 Sep 2021 23:35:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop-in.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=LmE9e69nSnxlQ4t05SCFNCGxZ9jhYqGIJLvNNJ54HGo=; b=zIb55pMyLzbAvKY3w5XCvuLn9Ao4gJUcJr7x52FxODWYktfGfCUWr6C5HMA/1t/5NP 4YxciApqURWpzGlSv7U6XnSyc5sZSpn282gi5zGIKJxquWGBPkScC2t2KSk1vWXEY9Ro Vod/zSyFGbGkffE4PqwHkkaNQigkj3/5cR5UEEwtkp/v/An9Nvboyy8DnMdrV3b6F6D7 wd1fEtHo2d4W6VheyGo8SGVH/4vaMEneiLX/26Mj2iX6dNpi4aKHWTcqDZoXC6ynSyIe JCUpX9pv8iUkzS1A4Te9s2CfPDL2YtT/xMbK1SRrG72nxBX7C7FP4vDYJiktpd/3WF7n qicw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=LmE9e69nSnxlQ4t05SCFNCGxZ9jhYqGIJLvNNJ54HGo=; b=D2BCm/1NsXjKHXrkLP9R0aomfeT7GCXWN+sm1HISi44sAcghRrj5NLqaCAbHPP5aqH LZEzeSV+BgcEBBScyB/Dwrm2Y5PaB/4cMOZxDRicJJCBAqoC2ZOxg4pbg5xvNNzsv7WU MhVyVT8bldPYlpLEiPagvtCW+MPpbltpN9Lyuh1UWePnCL9N1kD/Ny0840rQb/wvROL8 5nmc/RY9xFWHqJGKKitnvSceEN1w5wWYBISGkU7u3o010fs7sf+qLShPl1lZ/CIpl2vz 38XdRQC2GNPtehRWRmsZXW7PKrSLD9WJ6w2AyETzVuIJYpFrptqoVAoKnku7kxkaEzw7 tgWQ== X-Gm-Message-State: AOAM53387/jnQhWcQ9Uuo+nea70DmygucW6z7mpvFd5K/d8Osu32iOt7 LbDf0R3ZkPlHyiyRBvaWQOjerqztlvzpyQ== X-Google-Smtp-Source: ABdhPJxOfm3uh6gZbAcGSFSulUx68XEa8A1I2EE+EDgnDXjn31lsIMjpDTIQTq63Zp1X1fSb1a/+Tw== X-Received: by 2002:a05:651c:225:: with SMTP id z5mr14324351ljn.409.1631601329445; Mon, 13 Sep 2021 23:35:29 -0700 (PDT) Received: from localhost (109-252-93-92.nat.spd-mgts.ru. [109.252.93.92]) by smtp.gmail.com with ESMTPSA id h26sm1032294lfc.261.2021.09.13.23.35.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Sep 2021 23:35:28 -0700 (PDT) From: Andrew Tropin To: Oleg Pykhalov Subject: Re: bug#50504: [PATCH] home-services: Add Mcron. In-Reply-To: <87mtogp7ky.fsf_-_@gmail.com> References: <8735qc66mt.fsf@trop.in> <87a6kkxpcp.fsf@yoctocell.xyz> <877dflrmxg.fsf@trop.in> <87mtogp7ky.fsf_-_@gmail.com> Date: Tue, 14 Sep 2021 09:35:25 +0300 Message-ID: <87czpbmzpu.fsf@trop.in> 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: 50504-done Cc: 50504-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain On 2021-09-13 23:02, Oleg Pykhalov wrote: > Pushed to wip-guix-home. Thanks!) --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmFAQq0ACgkQIgjSCVjB 3rD6txAAhai/C3Y+4YKBAmNS4hTrPAkfPSex49Bqh9PUpa/uM+dzMFOtIKL98Ynl NekpusnjeaZsMSD1CyDk5njYDIlYJSStOnZdYmwHCzOzKwq/WqpPfaDo/5lTejmr TeTL1M0tXzZY2tNS1Mttjm7oypVue/n2djlwcMqNP/bZce+9L/D/KFqFD0Y5VOEd Je7adneHPL3qSR1bKNFcHmbC8OC+YYZC7KTwRnndJSo8q2UVrU7hhrLxo0rXm267 z0CwGxvgPtEZuCwpsALSGUr4ugLUMsRRVyVNA7PgfD6iIlfirF1d1aLf8p0uvhXh dXVjSf9q8IH5BtZn3fO2zZRTOzYWFD56GdwGzSPCwtWK83NPcW0FBw0gcF/8zyoB UYCAwR3M6kSPcZyP9qkx1SRt1L9/2+qX0ngV0RHiGd59K8YFeCmJH+y6r4B1pM8P //sDhtiAJDFr1ftMQSbe/A2MI98Z0H38kNn6D6YjrhBj4NBRJf0IYTTpMmogf7tU xEOGD+2GMwpvL+WB2VoTZvlrEtVgcvDH7+qoKI03C6CSSLlJ+8RDNzQxrsiZLxY3 IBzQyegVTm674/wXUt58XYWmoEovqXkiWeLEZtxJgQ7GoH4LuFkLvJOvPt0N6C9t 7YnnIx7W+/rK+syTFQzlnxizYb8CDAACXuTREo8VH6dUO8IX7nQ= =lX8e -----END PGP SIGNATURE----- --=-=-=-- From unknown Thu Aug 14 18:36:14 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 12 Oct 2021 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator