From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 29 00:07:52 2022 Received: (at submit) by debbugs.gnu.org; 29 Oct 2022 04:07:52 +0000 Received: from localhost ([127.0.0.1]:34685 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ood8S-0004vo-0t for submit@debbugs.gnu.org; Sat, 29 Oct 2022 00:07:52 -0400 Received: from lists.gnu.org ([209.51.188.17]:44696) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ood8O-0004vf-TH for submit@debbugs.gnu.org; Sat, 29 Oct 2022 00:07:51 -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 1ood8O-0003JL-Er for guix-patches@gnu.org; Sat, 29 Oct 2022 00:07:48 -0400 Received: from mail-qt1-x82e.google.com ([2607:f8b0:4864:20::82e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oocof-00023z-T8 for guix-patches@gnu.org; Fri, 28 Oct 2022 23:47:27 -0400 Received: by mail-qt1-x82e.google.com with SMTP id c23so4669334qtw.8 for ; Fri, 28 Oct 2022 20:47:25 -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=yFUMnyijuN8f4Z8Gi1g5vMr6o+K1ZDJeg8U8gUG95zc=; b=g8VK8Om1p0TtKrSN/gns7nhVL5qxnYcE3Cedeh3gQAQjABvkr4rJHFOU4yCRUFhnAQ +SVsY8XQZyAMQt9bzp4vIjWi3kou2EzvGSTIB7K0hj2Ux/jUby12XSMn+96aKIV8EFcP /nY5ZD9cd0R2FAQmEelGlmmT1Knv59zd1r9YvJ9xKzNLfqC4r6t+z2R16uTLLP2YIzNh ZthDJHxkg17hL8CLAHcX1EBUlhrpC7rLzBlKcy+9NuzJScEwFOJ0t9c0Lt48jaC61dJ9 IFw0MWgKmQRCyZnn+GNfy9PZ2o0swfWmkjmdTgQePEDhVjQwu2HxIFA6OZFqZkgDHIP6 Fi+g== 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=yFUMnyijuN8f4Z8Gi1g5vMr6o+K1ZDJeg8U8gUG95zc=; b=QYJF2Ti0imHkILa5uOPPH+2j+VN8oTf/qNbEcXlTCxA0NDI1srki7vd3Sd4Orl1iAC Cgm7H0n588THa5A1Mt3XjDRUEBBbvlfoeGGI0qRRW/6f3KPIyxomAU6TLtCbdbBHN8tu 9aq9tbfgV2UqVMsfGWlRLwL+nlyMnZzIP89A4sQKS7u6QHkKZrhpc9Kg1XSMYCZNUBvU lC0FFjn49CAb9ZeXnxEucCneb70473M1C51Ga1EmVIpZQqYsjK8AinZDpHKzPM4nbAmB n98Kax5pnh3gh/malBVj6WoHkfg365TCWuhvsoqfPRpM3FYCyR0aTDz4jKlPDiqXWUOC SE9Q== X-Gm-Message-State: ACrzQf3Grz7ZKILmZSqhMGjp1Ue6SdF/Yxtq4wUEi1V24/Nn9H89WdA6 yh0zBVsHNwIhm4iUnUhZFdpkBEdzfSE= X-Google-Smtp-Source: AMsMyM4WVas8WdjLqHXS4tZcMseapf1tZ0XlqGT1MTLrZWkjUm6FSWg0+RkQNdmu0Qyd9YarZA7aIQ== X-Received: by 2002:a05:622a:f:b0:39c:f320:f7a3 with SMTP id x15-20020a05622a000f00b0039cf320f7a3mr2277755qtw.101.1667015243407; Fri, 28 Oct 2022 20:47:23 -0700 (PDT) Received: from localhost.localdomain (dsl-152-179.b2b2c.ca. [66.158.152.179]) by smtp.gmail.com with ESMTPSA id hg24-20020a05622a611800b00398a7c860c2sm295147qtb.4.2022.10.28.20.47.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Oct 2022 20:47:22 -0700 (PDT) From: Maxim Cournoyer To: guix-patches@gnu.org Subject: [PATCH 0/5] Update mcron to latest commit Date: Fri, 28 Oct 2022 23:47:16 -0400 Message-Id: <20221029034716.11125-1-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::82e; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qt1-x82e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: Maxim Cournoyer 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.3 (--) Hi, This update mcrons to its latest commit, which includes these changes: --8<---------------cut here---------------start------------->8--- 5fd0ccd * origin/master tests: Check (mcron vixie-specification) d1a3e83 * vixie-time: Remove calls to 'pk' debugging facility 19ba0a8 * Lose hope of running against guile 2.2 or earlier. e2ecb80 * Give mcron --log option to turn logging on. a7a456c * base: Annotate output with job information. 9e99490 * Revert "Minor cosmetic simplification of case logic after previous patch." d5c021e * documentation: extensive editing of info manual after a note from Paul Vixie. 99a26e5 * Minor cosmetic simplification of case logic after previous patch. 8b27157 * base: Handle nonexistent user home directories. 271b1f2 * Clarify an error message 172f70e * documentation: Bug fix in a simple example. --8<---------------cut here---------------end--------------->8--- The one "base: Annotate output with job information." one gives us better logging capability, such as when a job is started and when it finishes, and its completion status: --8<---------------cut here---------------start------------->8--- 2022-10-28 22:55:00 5185 duckdns-update: completed in 0.349s 2022-10-28 23:00:00 6547 duckdns-update: running... 2022-10-28 23:00:00 6548 btrbk: running... 2022-10-28 23:00:00 6547 duckdns-update: completed in 0.350s 2022-10-28 23:05:01 7764 duckdns-update: running... 2022-10-28 23:05:01 7764 duckdns-update: completed in 0.417s 2022-10-28 23:10:00 8315 duckdns-update: running... 2022-10-28 23:10:00 8315 duckdns-update: completed in 0.454s --8<---------------cut here---------------end--------------->8--- We now see the pid, job name and some message about the current status (running/completed/failed). I hope you like it! Maxim Cournoyer (5): services: configuration: Re-order generated record fields. services: mcron: Add log? and log-format fields to mcron-configuration. gnu: mcron: Use gexps and strip trailing #t. gnu: Remove guile2.2-mcron. gnu: mcron: Update to 1.2.1-0.5fd0ccd. doc/guix.texi | 45 +++++++++++++---- gnu/home/services/mcron.scm | 47 +++++++++++++---- gnu/packages/guile-xyz.scm | 92 +++++++++++++++++----------------- gnu/services/configuration.scm | 10 ++-- gnu/services/mcron.scm | 47 +++++++++++++---- gnu/services/monitoring.scm | 4 +- 6 files changed, 162 insertions(+), 83 deletions(-) -- 2.37.3 From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 29 00:17:07 2022 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 To: 58855@debbugs.gnu.org Subject: [PATCH 1/5] services: configuration: Re-order generated record fields. 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 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 58855 Cc: Maxim Cournoyer 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 (-) 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" "\ ) 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 To: 58855@debbugs.gnu.org Subject: [PATCH 2/5] services: mcron: Add log? and log-format fields to mcron-configuration. 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 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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: * 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 -- [...] Content analysis details: (2.0 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 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (maxim.cournoyer[at]gmail.com) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.160.177 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.160.177 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-Debbugs-Envelope-To: 58855 Cc: Maxim Cournoyer 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 (+) * 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 -- 2.37.3 From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 29 00:17:15 2022 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 To: 58855@debbugs.gnu.org Subject: [PATCH 3/5] gnu: mcron: Use gexps and strip trailing #t. 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 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 58855 Cc: Maxim Cournoyer 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 (-) * 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") -- 2.37.3 From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 29 00:17:16 2022 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 To: 58855@debbugs.gnu.org Subject: [PATCH 4/5] gnu: Remove guile2.2-mcron. 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 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 58855 Cc: Maxim Cournoyer 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 (-) * 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")) -- 2.37.3 From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 29 00:17:16 2022 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 To: 58855@debbugs.gnu.org Subject: [PATCH 5/5] gnu: mcron: Update to 1.2.1-0.5fd0ccd. 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 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 58855 Cc: Maxim Cournoyer 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 (-) * 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") -- 2.37.3 From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 15 19:50:21 2022 Received: (at control) by debbugs.gnu.org; 16 Nov 2022 00:50:21 +0000 Received: from localhost ([127.0.0.1]:55583 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ov6dB-0007qY-As for submit@debbugs.gnu.org; Tue, 15 Nov 2022 19:50:21 -0500 Received: from mail-qt1-f180.google.com ([209.85.160.180]:38720) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ov6d8-0007qH-44 for control@debbugs.gnu.org; Tue, 15 Nov 2022 19:50:20 -0500 Received: by mail-qt1-f180.google.com with SMTP id z6so9866256qtv.5 for ; Tue, 15 Nov 2022 16:50:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:from:to:message-id:date:from:to:cc:subject:date:message-id :reply-to; bh=V6V2pn7QymTZtaKwC5TeheG5zzpHUTUD92ixKSTlCak=; b=BhSSdfW8sGY2Bc7YxFw0lUJEljhiUmULHZXZvGloEVpulg426662+pZic6uV7M79kq nDYY42X92KkiXKXmu4d4YXF0KqOPa/g9biIfYyTisTt6fV4YGnA8A1LzZLz2nuUjuTXv RPXpFrfCGFgLBUaUEBtcXtMXTqXx3heJN+gBBtRX205emapG107AKaMVprK8T4IKuiSU +TKOfAy8cYs9MCR1xzXEcNXJ9evcPYaCTyHR1ePIY30lgqdXXjeSeI/9ci7mgtDa2rw1 hdTgfHOXdT9wZzJ9/o/4SZvHmNdCbKRQUxuVYm0iYy6NM6eg4kjNQMfB9NomGhbcZXgE GwHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=subject:from:to:message-id:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=V6V2pn7QymTZtaKwC5TeheG5zzpHUTUD92ixKSTlCak=; b=oKpwLwgMDpIyWcFJP8N4p3CUikvDe/SWuZRvvvrIcoAIwv/nzMwjMBfunMzvK99AFn a0tj1I70KcjUly+8vJ+mFVpR5JPzixSej2EeyCFMih4O0rnkbghajpmafoymvtC4wol6 yzO3uN1AsQuujzipQEB+wzKYpAZFm9psYOhPg1inqXOyenxXreXifCbItmW3hjxHsaTf Hem/Q71ceZE8ZZ8rAwKFwGqrCdY9/YQU0C4LGvMnUaoUjmdO78yqvCVkVLQY34QGqjZx ZAJyQIYfiTKCXc1gOIhUm7tZTbusz8zPMyn6Q0tquWmSYoFXPZU2bQJgX4bf5CbxzHTI Rj9w== X-Gm-Message-State: ANoB5pmsAu1fVt2FtTmrVZ0FSRMDcuksws7M6/sIg3yu8FDc4yBJyprN TBcL0sIWv6p5j0alq78Wf38KnRovqT5lkg== X-Google-Smtp-Source: AA0mqf5jMF8a4TnU/p64jVrUEnZULO4uUOtHHFrV+aOb/5ZrtekxF0gHoUwSijIf/O0vQ/TBwMmg2g== X-Received: by 2002:a05:622a:1c06:b0:3a5:7abc:4c67 with SMTP id bq6-20020a05622a1c0600b003a57abc4c67mr18773236qtb.437.1668559812427; Tue, 15 Nov 2022 16:50:12 -0800 (PST) Received: from hurd (dsl-151-98.b2b2c.ca. [66.158.151.98]) by smtp.gmail.com with ESMTPSA id k1-20020ac81401000000b0035cf31005e2sm7927077qtj.73.2022.11.15.16.50.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Nov 2022 16:50:12 -0800 (PST) Date: Tue, 15 Nov 2022 19:50:05 -0500 Message-Id: <87v8nflo3m.fsf@gmail.com> To: control@debbugs.gnu.org From: Maxim Cournoyer Subject: control message for bug #58855 X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: control 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 (-) close 58855 quit From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 17 17:38:00 2022 Received: (at 58855) by debbugs.gnu.org; 17 Nov 2022 22:38:00 +0000 Received: from localhost ([127.0.0.1]:34584 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovnWC-0006jw-85 for submit@debbugs.gnu.org; Thu, 17 Nov 2022 17:38:00 -0500 Received: from eggs.gnu.org ([209.51.188.92]:39402) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovnW9-0006ji-P1 for 58855@debbugs.gnu.org; Thu, 17 Nov 2022 17:37:58 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ovnW4-0004mt-Hq; Thu, 17 Nov 2022 17:37:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=IlTMesEQgbPnLEJPlWbrd/hyrlPJfQBb9a3llCfSL+U=; b=T1kUqwb4it1lCndUJbyJ aFy07R/EuiMr9i+9E4twIcB6T3GYMfKq4xRKie/MYSlnQ1jTqz3YiAVgwx4ZNs/KybvnW4/xMnxlO W4yseFsDv076d0Wi+aIX59XZzqn8EwnIi1gHbavzpr6EpYbgbgLlukzJadn3xgH0j1YXGAxYmoTVB xw2ZeewdsDGNMt1CPZiWFIpZWzJOy2RTf3mzxIAe3xqJi1SXRs+aa1NKh09xyS6sIo884SuT2eMcB S0W2eI4T06CwGEX9ENOhpfsnho98wn/zHRvWKAsMqlqfbi6OfUwdOm5AmMTJPnMyfBV6wp+Age4sW 4XN9JVC+/ybf+A==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ovnW3-0000wH-SK; Thu, 17 Nov 2022 17:37:52 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Maxim Cournoyer Subject: Layout of =?utf-8?Q?=E2=80=98define-configuration=E2=80=99?= records References: <20221029034716.11125-1-maxim.cournoyer@gmail.com> <20221029041649.12144-1-maxim.cournoyer@gmail.com> Mail-Followup-To: guix-devel@gnu.org Date: Thu, 17 Nov 2022 23:37:49 +0100 In-Reply-To: <20221029041649.12144-1-maxim.cournoyer@gmail.com> (Maxim Cournoyer's message of "Sat, 29 Oct 2022 00:16:45 -0400") Message-ID: <87zgcpdx6q.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 58855 Cc: guix-devel@gnu.org, 58855@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: -3.3 (---) Hi, Maxim Cournoyer skribis: > 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 pat= tern > accordingly. [...] > +++ 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=3D> (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=3D> (current-source-location) > + source-properties->location)) > + (innate))) Moving the field last is problematic as we=E2=80=99ve seen for any user that uses =E2=80=98match=E2=80=99 on records=E2=80=94something that=E2=80=99s no= t recommended but still used a lot. > (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) This change has no effect because =E2=80=98match-record=E2=80=99 matches fi= elds by name, precisely to avoid problems when changing the layout of record types. I=E2=80=99m not sure what was meant by =E2=80=9Ccompatible=E2=80=9D in the = commit log; how fields are laid out is something user code should not be aware of. The only thing to keep in mind is that records must not be matched with =E2=80=98match=E2=80=99 because then the code silently breaks when the reco= rd type layout is changed. This is why =E2=80=98match-record=E2=80=99 was introduc= ed: https://issues.guix.gnu.org/28960#4 One last thing: placing =E2=80=98%location=E2=80=99 first can let us implem= ent: (define (configuration-location config) (struct-ref config 0)) As if there were type inheritance. I didn=E2=80=99t see any indication that this is actually done anywhere, but it could have been the case (it=E2=80= =99s not an unusual pattern) and it=E2=80=99s still something we might want to d= o. Does that make sense? Thanks, Ludo=E2=80=99. From unknown Tue Jun 17 01:48:40 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 16 Dec 2022 12:24:07 +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