From patchwork Sat Oct 29 04:16:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 44179 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 5B67F27BBEA; Sat, 29 Oct 2022 06:34:41 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 7B4D627BBE9 for ; Sat, 29 Oct 2022 06:34:38 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ooeU9-0002ei-1I; Sat, 29 Oct 2022 01:34:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oodIV-0008Di-8S for guix-patches@gnu.org; Sat, 29 Oct 2022 00:18:15 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oodII-0006rC-HE for guix-patches@gnu.org; Sat, 29 Oct 2022 00:18:14 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oodII-0005FG-CB for guix-patches@gnu.org; Sat, 29 Oct 2022 00:18:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58855] [PATCH 1/5] services: configuration: Re-order generated record fields. References: <20221029034716.11125-1-maxim.cournoyer@gmail.com> In-Reply-To: <20221029034716.11125-1-maxim.cournoyer@gmail.com> Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 29 Oct 2022 04:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58855 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58855@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 58855-submit@debbugs.gnu.org id=B58855.166701702720041 (code B ref 58855); Sat, 29 Oct 2022 04:18:02 +0000 Received: (at 58855) by debbugs.gnu.org; 29 Oct 2022 04:17:07 +0000 Received: from localhost ([127.0.0.1]:34734 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oodHO-0005DA-Ow for submit@debbugs.gnu.org; Sat, 29 Oct 2022 00:17:07 -0400 Received: from mail-qk1-f180.google.com ([209.85.222.180]:44879) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oodHJ-0005CW-NN for 58855@debbugs.gnu.org; Sat, 29 Oct 2022 00:17:05 -0400 Received: by mail-qk1-f180.google.com with SMTP id l9so4706705qkk.11 for <58855@debbugs.gnu.org>; Fri, 28 Oct 2022 21:17:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=2C9hOJj2tRvBloRpZ4NQJiF6+IdxNnN8DPs0tCRk2Pg=; b=OflZRA8zL/YB4PdFNvflSn07TRcKj1jU8FIE2aHJTpd1M6ojo1JkdEpLg02o5xMwqG agcjdAMtPELXp60jJhM7X0Mp+1DvoLHLqbWPnm2LDa8ySykwrcVrHMXj68VDl44RqHaL BMaPb2Fz3C+CUEfkxDJyOxREzPur4/9dCVLkO7vNAG16//1eZ07MvjDzgoypyGY3ejBr fmq6jX8ymOig1Ylf/flEpzAcpWiVBjXR55z51eaeFDMyqmgSCFYe+6G7CrF+jMqbqYJA Z30xTITgSOTdHAyZjZTgQ2xoa8IjTpOTm2bE8+AMNVMMyMoTdxYNVVfTGq1y36AW7WCL Adcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=2C9hOJj2tRvBloRpZ4NQJiF6+IdxNnN8DPs0tCRk2Pg=; b=oNS+OPqtUDSCMykWgbjE6KrQYehyjEqsJyr4FsNwBzI1zfflktuYbCwLj7t3L9qQyg oVQ5ooaeMyxaDhgn7yUEdI4Ql58SavvoQEgZWTqjDqgWtftboKkvWDh8kdcgmPlEl+Do CI1lI2jpUuFpRei5ETO0zVwzSQalhcBx0tfencLNi+UW8IG9PC6LU3Ln3QBdwBlIvDsy NvyEfH72MDu3GBtb9N/YTlMgOfs70Bk9VX0D5Wc0hwckRmSnKeMJ7sH/GkpUcK1LwDYg ITSxEyRdNZXANH2Unl68Gtg7WYvAVIPUuaz+4ElMIpCeWmEW1E/tA7WdWU9dB6CnXCU+ qN9A== X-Gm-Message-State: ACrzQf0I5JvDbc9IvYo1WlCVGtdZ2cXdENk68meg3geLU/KnLvDgcU7v eZAm027ee0lXNn3rlNqB/2nL+8vAacA= X-Google-Smtp-Source: AMsMyM60edVVmS8A+t/ke3X0IKQU4dvtSF7Nh0O3/aUZL2dIKIPheMsvPRCMqTgpTCh9nxnurCzt3Q== X-Received: by 2002:a05:620a:4606:b0:6ee:e73b:aecb with SMTP id br6-20020a05620a460600b006eee73baecbmr1774091qkb.681.1667017015902; Fri, 28 Oct 2022 21:16:55 -0700 (PDT) Received: from localhost.localdomain (dsl-152-179.b2b2c.ca. [66.158.152.179]) by smtp.gmail.com with ESMTPSA id do28-20020a05620a2b1c00b006f87d28ea3asm391514qkb.54.2022.10.28.21.16.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Oct 2022 21:16:55 -0700 (PDT) From: Maxim Cournoyer Date: Sat, 29 Oct 2022 00:16:45 -0400 Message-Id: <20221029041649.12144-1-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Guix-patches" Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches This is so that the first field of the generated record matches the first one declared, which makes 'define-configuration' record API compatible with define-record-type* ones. * gnu/services/configuration.scm (define-configuration-helper): Move the %location field below the ones declared by the user. * gnu/services/monitoring.scm (zabbix-front-end-config): Adjust match pattern accordingly. --- gnu/services/configuration.scm | 10 +++++----- gnu/services/monitoring.scm | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/gnu/services/configuration.scm b/gnu/services/configuration.scm index 636c49ccba..dacfc52ba9 100644 --- a/gnu/services/configuration.scm +++ b/gnu/services/configuration.scm @@ -242,17 +242,17 @@ (define-record-type* #,(id #'stem #'< #'stem #'>) stem #,(id #'stem #'make- #'stem) #,(id #'stem #'stem #'?) - (%location #,(id #'stem #'stem #'-location) - (default (and=> (current-source-location) - source-properties->location)) - (innate)) #,@(map (lambda (name getter def) #`(#,name #,getter (default #,def) (sanitize #,(id #'stem #'validate- #'stem #'- name)))) #'(field ...) #'(field-getter ...) - #'(field-default ...))) + #'(field-default ...)) + (%location #,(id #'stem #'stem #'-location) + (default (and=> (current-source-location) + source-properties->location)) + (innate))) (define #,(id #'stem #'stem #'-fields) (list (configuration-field diff --git a/gnu/services/monitoring.scm b/gnu/services/monitoring.scm index 9c8704092c..b19c6c9f18 100644 --- a/gnu/services/monitoring.scm +++ b/gnu/services/monitoring.scm @@ -622,8 +622,8 @@ (define-configuration zabbix-front-end-configuration (define (zabbix-front-end-config config) (match-record config - (%location db-host db-port db-name db-user db-password db-secret-file - zabbix-host zabbix-port) + (db-host db-port db-name db-user db-password db-secret-file + zabbix-host zabbix-port %location) (mixed-text-file "zabbix.conf.php" "\ X-Patchwork-Id: 44181 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id E0CA027BBEA; Sat, 29 Oct 2022 06:38:28 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id DEB0027BBE9 for ; Sat, 29 Oct 2022 06:38:27 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ooeU9-0002eo-Bl; Sat, 29 Oct 2022 01:34:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oodIV-0008Dk-9M for guix-patches@gnu.org; Sat, 29 Oct 2022 00:18:15 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oodIJ-0006rD-2A for guix-patches@gnu.org; Sat, 29 Oct 2022 00:18:14 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oodII-0005FO-Sk for guix-patches@gnu.org; Sat, 29 Oct 2022 00:18:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58855] [PATCH 2/5] services: mcron: Add log? and log-format fields to mcron-configuration. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 29 Oct 2022 04:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58855 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58855@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 58855-submit@debbugs.gnu.org id=B58855.166701703320080 (code B ref 58855); Sat, 29 Oct 2022 04:18:02 +0000 Received: (at 58855) by debbugs.gnu.org; 29 Oct 2022 04:17:13 +0000 Received: from localhost ([127.0.0.1]:34740 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oodHU-0005Dl-4C for submit@debbugs.gnu.org; Sat, 29 Oct 2022 00:17:12 -0400 Received: from mail-qt1-f177.google.com ([209.85.160.177]:43791) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oodHP-0005Cn-G5 for 58855@debbugs.gnu.org; Sat, 29 Oct 2022 00:17:08 -0400 Received: by mail-qt1-f177.google.com with SMTP id a27so1385108qtw.10 for <58855@debbugs.gnu.org>; Fri, 28 Oct 2022 21:17:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=mfLfv0n5b4qfsecN3nfs5Ac9lGRa+9tMqTXsP6XusRE=; b=ccq1Opq/ECHz9/8ml1mccr6z0kY/iwhBrN8OXseSFbuumYR2QPovi6R7bB0iT+zbgg m37mF5u+Vli1JKOygGCLo1BjnoH4IgmGsMO6Dv0x5qqRQYHECTS7TN4SkdPBdOYjbkUQ QZJiMd1nBFayj6dfG2MohsOpSEDFnciJNRWsAR14yuOujJq7UzpaPuFt+Ry2zclEmyUL p9x40r4UkDzNY/sWdsXmCygLgCKrvssaslweJiR49AOVWrVp9kMELcPZWQYPe7H+/EEl A6PuDk8k5cFM68M5SwR4wofXetS8S2msQJ0YUYsJaVbFfZNqqCkc8f5DM3f0NMahIkAk 4Rmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mfLfv0n5b4qfsecN3nfs5Ac9lGRa+9tMqTXsP6XusRE=; b=ikyvVnlf8c5bKCEqS0UctFCiJO9GQDNZG8vzxGl2O3U7Xiv9+FqJUZaxq66g5NfZN4 EobyJ9ESOvK2AElMgITutRCYQxrG9Gl/a7fG7jARN0u/4HMwQsn/+YQyzgdCjI+pVpud tBsuFlNNm6lTB4bYbvKTgEVx8TRjoFtuBj/5YsEudMJCk/Tk5VM+zIjCpTteiR1CpqVE 9jzhRJGhccEQmL7gK+IuzBzx2yE1LIEEOA2JZtc1M7c7Mbn6X4D3+mVqU2k3EGN0muFt evOlKcry0nPlHR5Z4y2RUjhyVWRWgpmMwZ3BpVFhIR15IntaKB8GaVbvWokmx/Rskgap YyYw== X-Gm-Message-State: ACrzQf3oMTmyEzuPDbve3DKlLkW2WFAflOvAJT55cC+dcYFoVvscfHwP Dp5+9E9ZqRvy9pITA5EgTP7SWgnsjO8= X-Google-Smtp-Source: AMsMyM5gwUkF7yUY27Hku42A1b0i0k3iWQDWpSU3kPd7Og9dZ2wSFQGh7Fie2msqsEdi6MlQam8ALQ== X-Received: by 2002:a05:622a:13ce:b0:39c:c82a:4584 with SMTP id p14-20020a05622a13ce00b0039cc82a4584mr2340902qtk.150.1667017021711; Fri, 28 Oct 2022 21:17:01 -0700 (PDT) Received: from localhost.localdomain (dsl-152-179.b2b2c.ca. [66.158.152.179]) by smtp.gmail.com with ESMTPSA id do28-20020a05620a2b1c00b006f87d28ea3asm391514qkb.54.2022.10.28.21.17.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Oct 2022 21:17:01 -0700 (PDT) From: Maxim Cournoyer Date: Sat, 29 Oct 2022 00:16:46 -0400 Message-Id: <20221029041649.12144-2-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221029041649.12144-1-maxim.cournoyer@gmail.com> References: <20221029041649.12144-1-maxim.cournoyer@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Guix-patches" Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/services/mcron.scm (list-of-gexps?): New predicate. (mcron-configuration): Rewrite using define-configuration. [log?, log-format]: New fields. (mcron-shepherd-services): Invoke mcron with the --log and --log-format arguments when log? is #t, (generate-doc): New procedure. * doc/guix.texi (Scheduled Job Execution): Update doc. (Mcron Home Service): Likewise. * gnu/home/services/mcron.scm: Keep in sync with the above changes to gnu/services/mcron.scm. --- doc/guix.texi | 45 ++++++++++++++++++++++++++++------- gnu/home/services/mcron.scm | 47 ++++++++++++++++++++++++++++--------- gnu/services/mcron.scm | 47 ++++++++++++++++++++++++++++--------- 3 files changed, 108 insertions(+), 31 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 80fb3bc47f..aadd16dd53 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -18994,20 +18994,33 @@ words, it is possible to define services that provide additional mcron jobs to run. @end defvr +@c Generated via (generate-documentation) at the bottom of (gnu services +@c mcron). +@c %start of fragment @deftp {Data Type} mcron-configuration -Data type representing the configuration of mcron. +Available @code{mcron-configuration} fields are: @table @asis -@item @code{mcron} (default: @var{mcron}) +@item @code{mcron} (default: @code{mcron}) (type: file-like) The mcron package to use. -@item @code{jobs} +@item @code{jobs} (default: @code{()}) (type: list-of-gexps) 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}). +specifications,, mcron,GNU@tie{}mcron}). + +@item @code{log?} (default: @code{#t}) (type: boolean) +Log messages to standard output. + +@item @code{log-format} (default: @code{"~1@@*~a ~a: ~a~%"}) (type: string) +@code{(ice-9 format)} format string for log messages. The default value +produces messages like "@samp{@var{pid} @var{name}: @var{message}"} +(@pxref{Invoking mcron, Invoking,, mcron,GNU@tie{}mcron}). Each message +is also prefixed by a timestamp by GNU Shepherd. + @end table @end deftp - +@c %end of fragment @node Log Rotation @subsection Log Rotation @@ -41015,18 +41028,32 @@ jobs to run. @end defvr @deftp {Data Type} home-mcron-configuration -Data type representing the configuration of mcron. +Available @code{home-mcron-configuration} fields are: +@c Auto-generated with (gnu home services mcron)'s +@c generate-documentation procedure. +@c %start of fragment @table @asis -@item @code{mcron} (default: @var{mcron}) +@item @code{mcron} (default: @code{mcron}) (type: file-like) The mcron package to use. -@item @code{jobs} +@item @code{jobs} (default: @code{()}) (type: list-of-gexps) 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}). +specifications,, mcron,GNU@tie{}mcron}). + +@item @code{log?} (default: @code{#t}) (type: boolean) +Log messages to standard output. + +@item @code{log-format} (default: @code{"~1@@*~a ~a: ~a~%"}) (type: string) +@code{(ice-9 format)} format string for log messages. The default value +produces messages like "@samp{@var{pid} @var{name}: @var{message}"} +(@pxref{Invoking mcron, Invoking,, mcron,GNU@tie{}mcron}). Each message +is also prefixed by a timestamp by GNU Shepherd. + @end table @end deftp +@c %end of fragment @node Power Management Home Services @subsection Power Management Home Services diff --git a/gnu/home/services/mcron.scm b/gnu/home/services/mcron.scm index 0b3dbb810b..1d294a997c 100644 --- a/gnu/home/services/mcron.scm +++ b/gnu/home/services/mcron.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2021 Andrew Tropin ;;; Copyright © 2021 Xinglu Chen +;;; Copyright © 2022 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -20,6 +21,7 @@ (define-module (gnu home services mcron) #:use-module (gnu packages guile-xyz) #:use-module (gnu home services) + #:use-module (gnu services configuration) #:use-module (gnu services shepherd) #:use-module (gnu home services shepherd) #:use-module (guix records) @@ -53,13 +55,23 @@ (define-module (gnu home services mcron) ;; ;;; 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 list-of-gexps? + (list-of gexp?)) + +(define-configuration/no-serialization home-mcron-configuration + (mcron (file-like mcron) "The mcron package to use.") + (jobs + (list-of-gexps '()) + "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}).") + (log? (boolean #t) "Log messages to standard output.") + (log-format + (string "~1@*~a ~a: ~a~%") + "@code{(ice-9 format)} format string for log messages. The default value +produces messages like \"@samp{@var{pid} @var{name}: +@var{message}\"} (@pxref{Invoking mcron, Invoking,, mcron, GNU@tie{}mcron}). +Each message is also prefixed by a timestamp by GNU Shepherd.")) (define job-files (@@ (gnu services mcron) job-files)) (define shepherd-schedule-action @@ -69,19 +81,23 @@ (define home-mcron-shepherd-services (match-lambda (($ mcron '()) ; no jobs to run '()) - (($ mcron jobs) + (($ mcron jobs log? log-format) (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 popen) ; for the 'schedule' action (ice-9 rdelim) (ice-9 match) ,@%default-modules)) (start #~(make-forkexec-constructor - (list #$(file-append mcron "/bin/mcron") #$@files) + (list (string-append #$mcron "/bin/mcron") + #$@(if log? + #~("--log" "--log-format" #$log-format) + #~()) + #$@files) #:log-file (string-append (or (getenv "XDG_LOG_HOME") (format #f "~a/.local/var/log" @@ -91,7 +107,7 @@ (define home-mcron-shepherd-services (actions (list (shepherd-schedule-action mcron files))))))))) -(define home-mcron-profile (compose list home-mcron-configuration-package)) +(define home-mcron-profile (compose list home-mcron-configuration-mcron)) (define (home-mcron-extend config jobs) (home-mcron-configuration @@ -113,3 +129,12 @@ (define home-mcron-service-type (default-value (home-mcron-configuration)) (description "Install and configure the GNU mcron cron job manager."))) + + +;;; +;;; Generate documentation. +;;; +(define (generate-doc) + (configuration->documentation 'home-mcron-configuration)) + +;;; mcron.scm ends here diff --git a/gnu/services/mcron.scm b/gnu/services/mcron.scm index 23760ebda4..52332d6123 100644 --- a/gnu/services/mcron.scm +++ b/gnu/services/mcron.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Ludovic Courtès +;;; Copyright © 2022 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -18,6 +19,7 @@ (define-module (gnu services mcron) #:use-module (gnu services) + #:use-module (gnu services configuration) #:use-module (gnu services shepherd) #:use-module (gnu packages guile-xyz) #:use-module (guix deprecation) @@ -30,6 +32,8 @@ (define-module (gnu services mcron) mcron-configuration? mcron-configuration-mcron mcron-configuration-jobs + mcron-configuration-log? + mcron-configuration-log-format mcron-service-type)) @@ -48,13 +52,23 @@ (define-module (gnu services mcron) ;;; ;;; Code: -(define-record-type* mcron-configuration - make-mcron-configuration - mcron-configuration? - (mcron mcron-configuration-mcron ;file-like - (default mcron)) - (jobs mcron-configuration-jobs ;list of - (default '()))) +(define list-of-gexps? + (list-of gexp?)) + +(define-configuration/no-serialization mcron-configuration + (mcron (file-like mcron) "The mcron package to use.") + (jobs + (list-of-gexps '()) + "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}).") + (log? (boolean #t) "Log messages to standard output.") + (log-format + (string "~1@*~a ~a: ~a~%") + "@code{(ice-9 format)} format string for log messages. The default value +produces messages like \"@samp{@var{pid} @var{name}: +@var{message}\"} (@pxref{Invoking mcron, Invoking,, mcron, GNU@tie{}mcron}). +Each message is also prefixed by a timestamp by GNU Shepherd.")) (define (job-files mcron jobs) "Return a list of file-like object for JOBS, a list of gexps." @@ -124,21 +138,25 @@ (define (shepherd-schedule-action mcron files) (define mcron-shepherd-services (match-lambda - (($ mcron ()) ;nothing to do! + (($ mcron ()) ;nothing to do! '()) - (($ mcron jobs) + (($ mcron jobs log? log-format) (let ((files (job-files mcron jobs))) (list (shepherd-service (provision '(mcron)) (requirement '(user-processes)) (modules `((srfi srfi-1) (srfi srfi-26) - (ice-9 popen) ;for the 'schedule' action + (ice-9 popen) ;for the 'schedule' action (ice-9 rdelim) (ice-9 match) ,@%default-modules)) (start #~(make-forkexec-constructor - (list (string-append #$mcron "/bin/mcron") #$@files) + (list (string-append #$mcron "/bin/mcron") + #$@(if log? + #~("--log" "--log-format" #$log-format) + #~()) + #$@files) ;; Disable auto-compilation of the job files and set a ;; sane value for 'PATH'. @@ -172,4 +190,11 @@ (define mcron-service-type jobs))))) (default-value (mcron-configuration)))) ;empty job list + +;;; +;;; Generate documentation. +;;; +(define (generate-doc) + (configuration->documentation 'mcron-configuration)) + ;;; mcron.scm ends here From patchwork Sat Oct 29 04:16:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 44180 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id EF82D27BBEB; Sat, 29 Oct 2022 06:38:07 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 6ADB027BBE9 for ; Sat, 29 Oct 2022 06:38:05 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ooeU8-0002e3-7O; Sat, 29 Oct 2022 01:34:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oodIV-0008Dg-7M for guix-patches@gnu.org; Sat, 29 Oct 2022 00:18:15 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oodIJ-0006rE-Mv for guix-patches@gnu.org; Sat, 29 Oct 2022 00:18:13 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oodIJ-0005FV-DI for guix-patches@gnu.org; Sat, 29 Oct 2022 00:18:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58855] [PATCH 3/5] gnu: mcron: Use gexps and strip trailing #t. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 29 Oct 2022 04:18:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58855 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58855@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 58855-submit@debbugs.gnu.org id=B58855.166701703520089 (code B ref 58855); Sat, 29 Oct 2022 04:18:03 +0000 Received: (at 58855) by debbugs.gnu.org; 29 Oct 2022 04:17:15 +0000 Received: from localhost ([127.0.0.1]:34742 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oodHU-0005Dq-Sr for submit@debbugs.gnu.org; Sat, 29 Oct 2022 00:17:15 -0400 Received: from mail-qk1-f175.google.com ([209.85.222.175]:38821) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oodHQ-0005Cz-4Z for 58855@debbugs.gnu.org; Sat, 29 Oct 2022 00:17:09 -0400 Received: by mail-qk1-f175.google.com with SMTP id d13so4731521qko.5 for <58855@debbugs.gnu.org>; Fri, 28 Oct 2022 21:17:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=0Uo1FgLYBWm6yjJPX2YItGA9ufSQU+Vyct+l0/k15lY=; b=noqg/7N2fvQ4vmhhSAQTY1wkR3jCGLm9sELWOiA/OhIZEJLnj5OQMaWltMvlpkQdmb +N+4JqJbhMABzRin25ip1Boj5OKxqtgsxB0nBZyDXE5zxJ902GjvCPNx8E/3sesET1OG 4LANkAJ472OerdSf2DbwkDOhip78JiehuqzHrq+hv/Dy18jEWE8Uc6ykmcByp/8dQJN/ vQxaicEQuh0Jd1wScw/nhSIUN2H+b1XoiVJ6BaJ1isnf6Sk0qhrDagfHNjc34R+fF2o3 6kYVgbkr9nrlTZUlWDUxaWmwhzCWIlcdvKmES/92ccoqsRCPR+qSiqfY3oLdBchuistW VtXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0Uo1FgLYBWm6yjJPX2YItGA9ufSQU+Vyct+l0/k15lY=; b=16c1Dj7o6Vj1O6FY4FA+V6xCfS7U9qP9s4KPXts24GlROhwDxmrgt/iiCJE1dUETkF I6c5zAoxRmP3O4pkMqxcS+A2f9f0ISgQUgbP1txu3usCiumUVoxuU2Af+H28T4reAYQi ZwPt3tW1wbC7wnP9kCEav4AibQYH8qAScNsoXxv+QiwW355xek/rzIrlnRWYdJH084gk god7BscSmMdBodAzVKuZnrTzA+Zwlg14+JfW9WtMyW8UB1zaYn6JlJtDfGemxCQvps58 B+292SLWRCh0jXnqUNGARC3M+JKO5dsFqvF6n8QRfP2rciw2F8ujCl1qG3AKKhRBDA6t ntsA== X-Gm-Message-State: ACrzQf1vMm6E0uMhZO4i5XPowG17BPiB70mJ08xIhIAvGbdSJ6dvY3Yt X3cB4ebXsW7oXADchgN7lYWPxDvRCzg= X-Google-Smtp-Source: AMsMyM6tiky4/B26a1MvtvQqNV2z7D5PtTCfuAkQk0ridkH/vMyLD2FqyW/Ok6avM/PlOiIspb3+iA== X-Received: by 2002:a05:620a:cf0:b0:6f9:7ee1:2cc3 with SMTP id c16-20020a05620a0cf000b006f97ee12cc3mr1865821qkj.362.1667017022578; Fri, 28 Oct 2022 21:17:02 -0700 (PDT) Received: from localhost.localdomain (dsl-152-179.b2b2c.ca. [66.158.152.179]) by smtp.gmail.com with ESMTPSA id do28-20020a05620a2b1c00b006f87d28ea3asm391514qkb.54.2022.10.28.21.17.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Oct 2022 21:17:02 -0700 (PDT) From: Maxim Cournoyer Date: Sat, 29 Oct 2022 00:16:47 -0400 Message-Id: <20221029041649.12144-3-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221029041649.12144-1-maxim.cournoyer@gmail.com> References: <20221029041649.12144-1-maxim.cournoyer@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Guix-patches" Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/guile-xyz.scm (mcron) [phases]: Use gexps and strip trailing #t. --- gnu/packages/guile-xyz.scm | 41 +++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm index 209ba694d7..1b41eb24af 100644 --- a/gnu/packages/guile-xyz.scm +++ b/gnu/packages/guile-xyz.scm @@ -2667,27 +2667,26 @@ (define-public mcron "0bkn235g2ia4f7ispr9d55c7bc18282r3qd8ldhh5q2kiin75zi0")))) (build-system gnu-build-system) (arguments - '(#:phases (modify-phases %standard-phases - (add-before 'check 'adjust-tests - (lambda _ - (substitute* "tests/job-specifier.scm" - ;; (getpw) fails with "entry not found" in the build - ;; environment, so pass an argument. - (("\\(getpw\\)") - "(getpwnam (getuid))") - ;; The build environment lacks an entry for root in - ;; /etc/passwd. - (("\\(getpw 0\\)") - "(getpwnam \"nobody\")") - - ;; FIXME: Skip the 4 faulty tests (see above). - (("\\(test-equal \"next-year\"" all) - (string-append "(test-skip 4)\n" all))) - #t))))) - (native-inputs `(("pkg-config" ,pkg-config) - ("tzdata" ,tzdata-for-tests) - ("guile-native" ;for 'guild compile' - ,@(assoc-ref (package-inputs this-package) "guile")))) + (list + #:phases #~(modify-phases %standard-phases + (add-before 'check 'adjust-tests + (lambda _ + (substitute* "tests/job-specifier.scm" + ;; (getpw) fails with "entry not found" in the build + ;; environment, so pass an argument. + (("\\(getpw\\)") + "(getpwnam (getuid))") + ;; The build environment lacks an entry for root in + ;; /etc/passwd. + (("\\(getpw 0\\)") + "(getpwnam \"nobody\")") + ;; FIXME: Skip the 4 faulty tests (see above). + (("\\(test-equal \"next-year\"" all) + (string-append "(test-skip 4)\n" all)))))))) + (native-inputs (list guile-3.0 ;for 'guild compile' + pkg-config + tzdata-for-tests)) + (inputs (list guile-3.0)) (home-page "https://www.gnu.org/software/mcron/") (synopsis "Run jobs at scheduled times") From patchwork Sat Oct 29 04:16:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 44178 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 2F9E227BBEB; Sat, 29 Oct 2022 06:34:41 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 8352127BBEA for ; Sat, 29 Oct 2022 06:34:38 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ooeU7-0002dV-Tk; Sat, 29 Oct 2022 01:34:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oodIV-0008Dj-90 for guix-patches@gnu.org; Sat, 29 Oct 2022 00:18:15 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oodIK-0006rF-0x for guix-patches@gnu.org; Sat, 29 Oct 2022 00:18:14 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oodIJ-0005Fc-Rq for guix-patches@gnu.org; Sat, 29 Oct 2022 00:18:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58855] [PATCH 4/5] gnu: Remove guile2.2-mcron. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 29 Oct 2022 04:18:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58855 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58855@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 58855-submit@debbugs.gnu.org id=B58855.166701703620097 (code B ref 58855); Sat, 29 Oct 2022 04:18:03 +0000 Received: (at 58855) by debbugs.gnu.org; 29 Oct 2022 04:17:16 +0000 Received: from localhost ([127.0.0.1]:34744 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oodHX-0005Dy-Qh for submit@debbugs.gnu.org; Sat, 29 Oct 2022 00:17:16 -0400 Received: from mail-qv1-f45.google.com ([209.85.219.45]:42862) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oodHQ-0005D1-VJ for 58855@debbugs.gnu.org; Sat, 29 Oct 2022 00:17:09 -0400 Received: by mail-qv1-f45.google.com with SMTP id t16so5318395qvm.9 for <58855@debbugs.gnu.org>; Fri, 28 Oct 2022 21:17:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=yUvfqOjM2OcpsbmMDFguwwp50Rlhlf1kyr0jIQLB5i4=; b=ln0BCDbMChrYjSTJ8DNc/+dLzQsdJGbfY+5YQQFjB6+sWnv2R1B6PRtuM6AF+qU0VO HHu6vl9Hyx36TZeVZZuk9P4YD2FnP7BacL2O4jjXz7qUBf5/a+dB1ZM0VXYhfrRxK/4/ 75fTGhZ2IL0e5shQxDy4ijT2PC/XL9Y+DnAGd58cx4KX0Jactc5+EzrMPaPAzvfIAVpj HN5noXlYsrNVqgpQdm+PgHuTZYbQiJiU81QTNysR6ZtEl6po2fFKhM/QXhat/0TgQsNI LxwZbaardLGEqy3X/5R4ui/JHE0Z6kBiQTudGSqFJG0jthQoKsMqKSpzWEQ092a6qTuo 2t5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yUvfqOjM2OcpsbmMDFguwwp50Rlhlf1kyr0jIQLB5i4=; b=yVmTfLAAEkQDviw+i/CE0ATCQQjcWely63ST9REvITWccd1nuwm1NguYrtk15YV4ol dSJX6mFgHH2PC0ynCuNqJ9jnz00Ye7jpzJcxvJzyTI3DdmxkAy2pvRDLsZf0SaRMG1FP K40LiSOZ+fU0+MUKX952oxJFI6PoJ7y4tjSrvg5QgT3uW16+YmaU1lt6Mr1XV7lxUTGG M4tI8w1wvSkHTmsr7STMHoe2so5VVHi2krIbnXPT8uQ4+9AiJIWPRkOeoraaJr9ciRD1 SwDuAyOi69KMdqmiiSrMdOFJQi4w07yDnh4dmXYSuQPqcJG4HboAEW4QRtOdFuaBWTdF qEKg== X-Gm-Message-State: ACrzQf39Yfyvd2Lj5eqZQhajB6hem+br5aEo6fsYoxZh1YAgyqGSLndA mhIPdQvH4SurGchlSWfif31DuSlaS/I= X-Google-Smtp-Source: AMsMyM75RdPmFhn/a5AXeem0IfzxOpTdNcTmRf92l3IwcBRr2QKeMe2ckrKotbJEg4JeKa4X5Fp4ZA== X-Received: by 2002:a05:6214:762:b0:4b1:c5d2:3fd0 with SMTP id f2-20020a056214076200b004b1c5d23fd0mr2325240qvz.97.1667017023249; Fri, 28 Oct 2022 21:17:03 -0700 (PDT) Received: from localhost.localdomain (dsl-152-179.b2b2c.ca. [66.158.152.179]) by smtp.gmail.com with ESMTPSA id do28-20020a05620a2b1c00b006f87d28ea3asm391514qkb.54.2022.10.28.21.17.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Oct 2022 21:17:02 -0700 (PDT) From: Maxim Cournoyer Date: Sat, 29 Oct 2022 00:16:48 -0400 Message-Id: <20221029041649.12144-4-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221029041649.12144-1-maxim.cournoyer@gmail.com> References: <20221029041649.12144-1-maxim.cournoyer@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Guix-patches" Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/guile-xyz.scm (guile2.2-mcron): Delete variable. --- gnu/packages/guile-xyz.scm | 6 ------ 1 file changed, 6 deletions(-) diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm index 1b41eb24af..41f93df155 100644 --- a/gnu/packages/guile-xyz.scm +++ b/gnu/packages/guile-xyz.scm @@ -2697,12 +2697,6 @@ (define-public mcron format is also supported.") (license license:gpl3+))) -(define-public guile2.2-mcron - (package - (inherit mcron) - (name "guile2.2-mcron") - (inputs (list guile-2.2)))) - (define-public guile-picture-language (let ((commit "a1322bf11945465241ca5b742a70893f24156d12") (revision "5")) From patchwork Sat Oct 29 04:16:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 44182 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 4B6E527BBEA; Sat, 29 Oct 2022 06:38:57 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id B14E427BBE9 for ; Sat, 29 Oct 2022 06:38:56 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ooeU8-0002eM-Mt; Sat, 29 Oct 2022 01:34:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oodIV-0008Dh-7p for guix-patches@gnu.org; Sat, 29 Oct 2022 00:18:15 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oodIK-0006rG-Fk for guix-patches@gnu.org; Sat, 29 Oct 2022 00:18:14 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oodIK-0005Fk-AW for guix-patches@gnu.org; Sat, 29 Oct 2022 00:18:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58855] [PATCH 5/5] gnu: mcron: Update to 1.2.1-0.5fd0ccd. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 29 Oct 2022 04:18:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58855 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58855@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 58855-submit@debbugs.gnu.org id=B58855.166701703620103 (code B ref 58855); Sat, 29 Oct 2022 04:18:04 +0000 Received: (at 58855) by debbugs.gnu.org; 29 Oct 2022 04:17:16 +0000 Received: from localhost ([127.0.0.1]:34746 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oodHY-0005E6-43 for submit@debbugs.gnu.org; Sat, 29 Oct 2022 00:17:16 -0400 Received: from mail-qv1-f54.google.com ([209.85.219.54]:46843) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oodHR-0005D2-La for 58855@debbugs.gnu.org; Sat, 29 Oct 2022 00:17:10 -0400 Received: by mail-qv1-f54.google.com with SMTP id u7so5302834qvn.13 for <58855@debbugs.gnu.org>; Fri, 28 Oct 2022 21:17:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=TumnG60VPCeduNCvfDyzQ52lhPxw6vD28KABAvzwOrY=; b=LVgN6nmlb7BaqiqatVpkRhOE9SKGiJa5Ai/GJUJjhgPlEX3975cdKG6Pq0TbBSbYAr Odvc4f+oPkALtv19YVM8J8RGGt93S+zTKpeaU1rkfSEcjpecz8fM7jpJ0GHIsxA0fQKz ZcDeXzgSJvYn55Qoin4CET8FVsY4cIoKpD7Y6JKKhZhUgr8UnG6kyRI7uIgNlSSv/88/ 8bp3Zxv5Zt4D8n4a3mcWm9u2LWk8xmM0XaH7HuQ4yXaZAnkTsRJU5niuPvgPK7zGefKy hvRNd/u8pfzJJC03GTBc8/s37tNPuvdhEmvow+tB0h/aq+gLOkmvjfRKsBpopdHx4WHF w6cA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TumnG60VPCeduNCvfDyzQ52lhPxw6vD28KABAvzwOrY=; b=GouVPvDuMoMZrRzps+RJVpFLEsuUTxToyYzzUvtanigtVanNH7ZgK68q0Efhnxwhu7 SnMnSwjzxj+fCz7Ct73hChpdRhJEcfGaQrHT+DmMuZfwh5PyPEn9wpYT2u7lZpUaI3Lt M151NGZGMnWC3xeSZF1j4SEKpWgKwwi20ALG4ad/ZAgmbIym7AXdCrXSeurahxcraRO1 TmPsPF4P37+6FOL1Aqw1qq8Ftbpg0WjKcr4fmeLUL3IGlbF6fMj4NGmA/O++ZE6tGx6o DGGDpGQqAHnJhOktu+Uh7GTIn4NaUpQRIKyaBeItcYPscqznMeAFcmci8snrfIPyWPXl 9qTw== X-Gm-Message-State: ACrzQf2aJ/nRFVPp2Tv6EU68CGqhaE32BIlUAp5AMMus25RB3jCI8Q+V P/9dLJwwpFdZtLSuvg4DK+0ZiYjOqIU= X-Google-Smtp-Source: AMsMyM5zYAue50L8Etm4OKY68j7Io4cO4tVwdSoEWRULcx/oEIJcwxxE+G1XSyGVYUDYJnd5zfNZ1A== X-Received: by 2002:a05:6214:1c87:b0:4af:8d8d:f319 with SMTP id ib7-20020a0562141c8700b004af8d8df319mr2313931qvb.11.1667017023883; Fri, 28 Oct 2022 21:17:03 -0700 (PDT) Received: from localhost.localdomain (dsl-152-179.b2b2c.ca. [66.158.152.179]) by smtp.gmail.com with ESMTPSA id do28-20020a05620a2b1c00b006f87d28ea3asm391514qkb.54.2022.10.28.21.17.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Oct 2022 21:17:03 -0700 (PDT) From: Maxim Cournoyer Date: Sat, 29 Oct 2022 00:16:49 -0400 Message-Id: <20221029041649.12144-5-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221029041649.12144-1-maxim.cournoyer@gmail.com> References: <20221029041649.12144-1-maxim.cournoyer@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Guix-patches" Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/guile-xyz.scm (mcron): Update to 1.2.1-0.5fd0ccd. [native-inputs]: Add autoconf, automake, help2man, and texinfo. --- gnu/packages/guile-xyz.scm | 85 +++++++++++++++++++++----------------- 1 file changed, 47 insertions(+), 38 deletions(-) diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm index 41f93df155..fd2a26d3a5 100644 --- a/gnu/packages/guile-xyz.scm +++ b/gnu/packages/guile-xyz.scm @@ -2655,47 +2655,56 @@ (define-public guile2.0-commonmark (inputs (list guile-2.0)))) (define-public mcron - (package - (name "mcron") - (version "1.2.1") - (source (origin - (method url-fetch) - (uri (string-append "mirror://gnu/mcron/mcron-" - version ".tar.gz")) - (sha256 - (base32 - "0bkn235g2ia4f7ispr9d55c7bc18282r3qd8ldhh5q2kiin75zi0")))) - (build-system gnu-build-system) - (arguments - (list - #:phases #~(modify-phases %standard-phases - (add-before 'check 'adjust-tests - (lambda _ - (substitute* "tests/job-specifier.scm" - ;; (getpw) fails with "entry not found" in the build - ;; environment, so pass an argument. - (("\\(getpw\\)") - "(getpwnam (getuid))") - ;; The build environment lacks an entry for root in - ;; /etc/passwd. - (("\\(getpw 0\\)") - "(getpwnam \"nobody\")") - ;; FIXME: Skip the 4 faulty tests (see above). - (("\\(test-equal \"next-year\"" all) - (string-append "(test-skip 4)\n" all)))))))) - (native-inputs (list guile-3.0 ;for 'guild compile' - pkg-config - tzdata-for-tests)) - - (inputs (list guile-3.0)) - (home-page "https://www.gnu.org/software/mcron/") - (synopsis "Run jobs at scheduled times") - (description - "GNU Mcron is a complete replacement for Vixie cron. It is used to run + ;; Use the latest commits, as interesting changes haven't been released yet, + ;; such as improved logging. + (let ((revision "0") + (commit "5fd0ccde5a4cff70299999f988e6b5166584814d")) + (package + (name "mcron") + (version (git-version "1.2.1" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://git.savannah.gnu.org/git/mcron.git") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0jl2w67a5hkphzssdzq3q4jcwv2b174b11d3w5i3khxq2vhzd6kk")))) + (build-system gnu-build-system) + (arguments + (list + #:phases #~(modify-phases %standard-phases + (add-before 'check 'adjust-tests + (lambda _ + (substitute* "tests/job-specifier.scm" + ;; (getpw) fails with "entry not found" in the build + ;; environment, so pass an argument. + (("\\(getpw\\)") + "(getpwnam (getuid))") + ;; The build environment lacks an entry for root in + ;; /etc/passwd. + (("\\(getpw 0\\)") + "(getpwnam \"nobody\")") + ;; FIXME: Skip the 4 faulty tests (see above). + (("\\(test-equal \"next-year\"" all) + (string-append "(test-skip 4)\n" all)))))))) + (native-inputs (list autoconf + automake + guile-3.0 ;for 'guild compile' + help2man + pkg-config + tzdata-for-tests + texinfo)) + (inputs (list guile-3.0)) + (home-page "https://www.gnu.org/software/mcron/") + (synopsis "Run jobs at scheduled times") + (description + "GNU Mcron is a complete replacement for Vixie cron. It is used to run tasks on a schedule, such as every hour or every Monday. Mcron is written in Guile, so its configuration can be written in Scheme; the original cron format is also supported.") - (license license:gpl3+))) + (license license:gpl3+)))) (define-public guile-picture-language (let ((commit "a1322bf11945465241ca5b742a70893f24156d12")