From patchwork Wed Jan 8 17:41:45 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 36758 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 7910F27BBEA; Wed, 8 Jan 2025 17:43:43 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=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 A0C4827BBEC for ; Wed, 8 Jan 2025 17:43:40 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tVa5S-0005eK-BQ; Wed, 08 Jan 2025 12:43:22 -0500 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 1tVa59-0005Ug-TQ for guix-patches@gnu.org; Wed, 08 Jan 2025 12:43:03 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tVa59-00038Q-KJ for guix-patches@gnu.org; Wed, 08 Jan 2025 12:43:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=BBaBFcIvkYvsGlNkI/XKCTp//NalWKdETTFcy5m66yM=; b=vgsNTAlPi/lYfV3GdUKa4u8NYY/D495/bsmsdu/i71wwQlNBWgDAhDzipqHpk+fVMT7Sai5L6cL56u4cLz8ma+dP9eEXxoWo5rvCvMaltcGgHHdn1kmekpyd6d4MCG8GGzk3N063csXfr8ZqOxCcxvYhQ9m48WjNS6zA0JkT0r87gHWg/AtIliHugKNKbEpswoXDU1+t1jEQnQCoeljVP/n6uYBInwaujnyqhHpyEdhz5L1+NXzlOypVGE/L06CECMDWjZ8LQrH9i2YZAC4ErrLvP57NJKwkazHrxSOkMyE5U5PSHc8kfFemVlDjwNNhAi3t/JkuUKRIkXVvxIKVgQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tVa59-0007sA-5k; Wed, 08 Jan 2025 12:43:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74860] [PATCH v2 01/12] gnu: shepherd@1.0: Add dependency on gzip and zstd. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: sharlatanus@gmail.com, guix-patches@gnu.org Resent-Date: Wed, 08 Jan 2025 17:43:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74860 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74860@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= , Sharlatan Hellseher X-Debbugs-Original-Xcc: Sharlatan Hellseher Received: via spool by 74860-submit@debbugs.gnu.org id=B74860.173635815630113 (code B ref 74860); Wed, 08 Jan 2025 17:43:03 +0000 Received: (at 74860) by debbugs.gnu.org; 8 Jan 2025 17:42:36 +0000 Received: from localhost ([127.0.0.1]:48788 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tVa4i-0007pd-8p for submit@debbugs.gnu.org; Wed, 08 Jan 2025 12:42:36 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59970) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tVa4Z-0007o8-Ij for 74860@debbugs.gnu.org; Wed, 08 Jan 2025 12:42:29 -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 1tVa4U-0002te-Aj; Wed, 08 Jan 2025 12:42:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=BBaBFcIvkYvsGlNkI/XKCTp//NalWKdETTFcy5m66yM=; b=Zc1TrShBCncLw+5Lbw5t 7yFRumVTsprEnpXOh+sQIoYG1yLfrH+BRSLejw7SVrNmvn+Iu2WxVEXqrsFWPQ1QuoYAUwvgb2Wf+ 1kwn2uA7LSmoelZHL+mAWkdFUz9UAsISe/xEWp5DK68ciR4V0v6zMubRFVwbQKsWYdPxPn3Z0j70h Y14wXyDMP5TSYV3UniTeZdTEsLKSJNcoYx+eh9hkLfLm1JvMPyhoiKeBwqIfQQJyU7VqoPP95+BBJ qd1sXMtR53jBwfy3vdATlCRIyosZYVPjg8Tt4ccqR1kab33s9rBp5n6nKeQOHi+OiJhKptpsCIyX5 +h8CgahBrvhODQ==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Wed, 8 Jan 2025 18:41:45 +0100 Message-ID: <51f23b8ff77f5426f5fa8d8355cc3061898b6614.1736357737.git.ludo@gnu.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/admin.scm (shepherd-1.0)[arguments]: New field. [inputs]: New field. Change-Id: If21f876bbf3fba933a8d997a95db91b961adfca3 --- gnu/packages/admin.scm | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 466df65dd9..b1b1da8075 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -425,7 +425,19 @@ (define-public shepherd-1.0 version ".tar.gz")) (sha256 (base32 - "0z4yxl8g0k3b6k4x7b3ks10x31hs46j5kmw0ah5cr417n0rszrp8")))))) + "0z4yxl8g0k3b6k4x7b3ks10x31hs46j5kmw0ah5cr417n0rszrp8")))) + (arguments + (substitute-keyword-arguments (package-arguments shepherd-0.10) + ((#:configure-flags flags #~'()) + #~(list "--localstatedir=/var" + + ;; Gzip and zstd are used by the log rotation service. + (string-append "--with-gzip=" #$(this-package-input "gzip") + "/bin/gzip") + (string-append "--with-zstd=" #$(this-package-input "zstd") + "/bin/zstd"))))) + (inputs (modify-inputs (package-inputs shepherd-0.10) + (append gzip zstd))))) (define-public shepherd shepherd-0.10) From patchwork Wed Jan 8 17:41:46 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 36755 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 2CFCA27BBEA; Wed, 8 Jan 2025 17:43:13 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=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 9A74127BBE2 for ; Wed, 8 Jan 2025 17:43:12 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tVa5B-0005V6-S7; Wed, 08 Jan 2025 12:43:06 -0500 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 1tVa59-0005UV-3r for guix-patches@gnu.org; Wed, 08 Jan 2025 12:43:03 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tVa58-000389-RL for guix-patches@gnu.org; Wed, 08 Jan 2025 12:43:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=PizxbUrpY2ib030KWzLZ7zo+S+J+DjfbBuZNmetvRWg=; b=eKT/3+pBLfxSXb1CdYKlPXnbpZMXKNhIfCUG8up1Y43CTEqhLfNKES6YsT5W21ICmZFvIjTLrl4mjrU0XMt85jo+E3tvqkna1noN7VjzMzaRRj9Qu2CQhpY2cVtGJ1eDqBBmfFkqao1Tj1DWqltdcByI7LQKZxOA9AB7L7BrpgQitnpUysujvS0KMCvfgNBVH3nI1VJ71zB806Hs9HJYDm8aM42inBZte26eOGHlJwRgPmittAUNdg+05zn5O4W5FJvURaNcUTMBV1ntH724pFf5dtECFJyCgjR4bUx2V1c8hB2n9MJDbcG/5wCK989f+9WsZpGYxTnBcDUzTViGJA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tVa58-0007s2-Lb for guix-patches@gnu.org; Wed, 08 Jan 2025 12:43:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74860] [PATCH v2 02/12] system: Add zstd to =?utf-8?b?4oCYJWJh?= =?utf-8?b?c2UtcGFja2FnZXPigJku?= Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 08 Jan 2025 17:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74860 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74860@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= Received: via spool by 74860-submit@debbugs.gnu.org id=B74860.173635815130066 (code B ref 74860); Wed, 08 Jan 2025 17:43:02 +0000 Received: (at 74860) by debbugs.gnu.org; 8 Jan 2025 17:42:31 +0000 Received: from localhost ([127.0.0.1]:48776 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tVa4c-0007on-Q0 for submit@debbugs.gnu.org; Wed, 08 Jan 2025 12:42:31 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59986) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tVa4a-0007oA-I4 for 74860@debbugs.gnu.org; Wed, 08 Jan 2025 12:42:28 -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 1tVa4V-0002tm-9R; Wed, 08 Jan 2025 12:42:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=PizxbUrpY2ib030KWzLZ7zo+S+J+DjfbBuZNmetvRWg=; b=fT50T3FsQ+AQUbjYu9Fr 3dyj3sGs9YZrow7NGtwxdyc/pUm3iQArUU5URemZ3YuvT90ZfSIoxFwrbzm7+wPUmPnk1tY/6hc2+ 5/+3MVJJdm/jHthBukce6G6Xe2V1py2hel6V1vcVPOmSAajscUbYGJnfhs84MvpmTu/1S+LW0VezA kPUTudf2PAU28jM/eY+Qkmfqw5lUP67ya5I3lmJWAqtw1Z6txKLHY7DZD2wgtG6fbFMInO3P3ZAbk 5tN65YD+YSLpa2pn5VGlnH80qSOXRAgXfMW44hEWJCeb0ToidNM/LG5a0M7K8+H4q5WbqhiVVWABV fcU+yzwvAkPKBA==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Wed, 8 Jan 2025 18:41:46 +0100 Message-ID: X-Mailer: git-send-email 2.47.1 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches This is particularly useful now that log files are going to be zstd-compressed by default, among other uses of zstd. * gnu/system.scm (%base-packages-utils): Add ‘zstd’. Change-Id: I766791fea3bc3fca2519a7cd6ac472550be386dd --- gnu/system.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gnu/system.scm b/gnu/system.scm index 252a26cac3..8df871f255 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013-2022, 2024 Ludovic Courtès +;;; Copyright © 2013-2022, 2024-2025 Ludovic Courtès ;;; Copyright © 2015 Mark H Weaver ;;; Copyright © 2015, 2016 Alex Kost ;;; Copyright © 2016 Chris Marusich @@ -944,7 +944,8 @@ (define %base-packages-utils ;; The packages below are also in %FINAL-INPUTS, so take them from ;; there to avoid duplication. (list bash coreutils findutils grep sed - diffutils patch gawk tar gzip bzip2 xz lzip))) + diffutils patch gawk tar + gzip bzip2 lzip xz zstd))) (define %base-packages-linux ;; Default set of linux specific packages. From patchwork Wed Jan 8 17:41:47 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 36766 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 8DC1527BBE9; Wed, 8 Jan 2025 17:44:11 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 9C31E27BBE2 for ; Wed, 8 Jan 2025 17:44:09 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tVa5T-0005en-Bh; Wed, 08 Jan 2025 12:43:23 -0500 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 1tVa5A-0005Uj-2y for guix-patches@gnu.org; Wed, 08 Jan 2025 12:43:05 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tVa59-00038w-QI; Wed, 08 Jan 2025 12:43:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=Laf33kyswaXFBPb6jed6TOukZ6/HqKIdR+p2dgqVirI=; b=afA1joVLr2sVstgev+8SkcOkaydU/Njvfj2jIyddvhGrdKFaK9KmmmbwmiY2WtuhDQFS8J7zGzRqYJX6bD7f5H3BWtDs5Yb0ytscP7jFOPSdjQL89kUzlovQeZ4dOghzKxq8w3MQPDIlI1Vy50URZAHfvI7sgodYR/wK+ITXSz84pE/5fKtzqE3aMNC9F5yMAewHWMtGTfNs00ixGImx6eMUIEQ4FRvP0q+TSkTCZOatgGKAJGKTgfo55jC44Dsd22d5napkrPxBq90yJWjUorr4Yn1+pmKqaurk3O3KxU6tk6HLuoT3N08zzc8/2+EWV3x0groAvVwU4N+3/39qGw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tVa59-0007sK-Ky; Wed, 08 Jan 2025 12:43:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74860] [PATCH v2 03/12] services: Add =?utf-8?b?4oCYbG9nLXJv?= =?utf-8?b?dGF0aW9uLXNlcnZpY2UtdHlwZeKAmS4=?= Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: ludo@gnu.org, maxim.cournoyer@gmail.com, guix-patches@gnu.org Resent-Date: Wed, 08 Jan 2025 17:43:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74860 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74860@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= , Ludovic =?utf-8?q?Court?= =?utf-8?q?=C3=A8s?= , Maxim Cournoyer X-Debbugs-Original-Xcc: Ludovic =?utf-8?q?Court=C3=A8s?= , Maxim Cournoyer Received: via spool by 74860-submit@debbugs.gnu.org id=B74860.173635815830124 (code B ref 74860); Wed, 08 Jan 2025 17:43:03 +0000 Received: (at 74860) by debbugs.gnu.org; 8 Jan 2025 17:42:38 +0000 Received: from localhost ([127.0.0.1]:48792 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tVa4i-0007pk-Vt for submit@debbugs.gnu.org; Wed, 08 Jan 2025 12:42:37 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:60002) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tVa4b-0007oC-FD for 74860@debbugs.gnu.org; Wed, 08 Jan 2025 12:42:30 -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 1tVa4W-0002tv-5C; Wed, 08 Jan 2025 12:42:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=Laf33kyswaXFBPb6jed6TOukZ6/HqKIdR+p2dgqVirI=; b=MgjjkdOBuc9+84+NsoSJ atnhuAHQv7Z2z/5V0SjkDarHHlPhPnXJLEhCkPV3DPYooB4NLNUL1KDAPWfadrLiykgvrEkseUAuC 48g/wPWlIWWE6Q4wzJZvBKFSnaRtJBaRLtQ65FYptJ7DHlSmxUE2bXOcpe2LEmYULxi32fVsyCkA4 rddqVBHKgd9Si5cfC54yhhfnMnZ9majjbloQM7fjOYuShR0W0c9W3/t20amkj/WErt9InCp31vBzx y17dV1i61mckkc6l+vdhP7iknOWf+98kZeBt1X7Zl08xW8znop211oP3PzJAL3OS++94maOWC4QPy 5zM7c7oU3edzkQ==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Wed, 8 Jan 2025 18:41:47 +0100 Message-ID: <3c927596ee81d985d925c8b72bf4a3f33336b457.1736357737.git.ludo@gnu.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/services/admin.scm (%default-log-rotation-calendar-event): New variable. (): New record type. (log-rotation-shepherd-services): New procedure. (log-rotation-service-type): New variable. Change-Id: I4400035f3b6065ec147ac932110b690120d739c2 --- doc/guix.texi | 82 +++++++++++++++++++++++++++-- gnu/services/admin.scm | 116 ++++++++++++++++++++++++++++++++++++++--- 2 files changed, 187 insertions(+), 11 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index caebe3b03c..f521a2d2ad 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -394,7 +394,7 @@ Top * Base Services:: Essential system services. * Scheduled Job Execution:: The mcron service. -* Log Rotation:: The rottlog service. +* Log Rotation:: Archiving and deleting old logs. * Networking Setup:: Setting up network interfaces. * Networking Services:: Firewall, SSH daemon, etc. * Unattended Upgrades:: Automated system upgrades. @@ -19229,7 +19229,7 @@ Services @menu * Base Services:: Essential system services. * Scheduled Job Execution:: The mcron service. -* Log Rotation:: The rottlog service. +* Log Rotation:: Archiving and deleting old logs. * Networking Setup:: Setting up network interfaces. * Networking Services:: Firewall, SSH daemon, etc. * Unattended Upgrades:: Automated system upgrades. @@ -20872,8 +20872,82 @@ Log Rotation Log files such as those found in @file{/var/log} tend to grow endlessly, so it's a good idea to @dfn{rotate} them once in a while---i.e., archive their contents in separate files, possibly compressed. The @code{(gnu -services admin)} module provides an interface to GNU@tie{}Rot[t]log, a -log rotation tool (@pxref{Top,,, rottlog, GNU Rot[t]log Manual}). +services admin)} module provides an interface to the log rotation +service provided by the Shepherd (@pxref{Log Rotation,,, shepherd, The +GNU Shepherd Manual}). + +This log rotation service is made available through +@code{log-rotation-service-type}, which takes a +@code{log-rotation-configuration} record has its value. By default, +this provides @code{log-rotation}, a Shepherd ``timed service'' that +runs periodically---once a week by default. It automatically knows +about the log files produced by Shepherd services and can be taught +about external log files. You can inspect the service and see when it's +going to run the usual way: + +@example +$ sudo herd status log-rotation +Status of log-rotation: + It is running since Mon 09 Dec 2024 03:27:47 PM CET (2 days ago). + @dots{} + +Upcoming timer alarms: + Sun 15 Dec 2024 10:00:00 PM CET (in 4 days) + Sun 22 Dec 2024 10:00:00 PM CET (in 11 days) + Sun 29 Dec 2024 10:00:00 PM CET (in 18 days) +@end example + +You can also list files subject to rotation with @command{herd files +log-rotation} and trigger rotation manually with @command{herd trigger +log-rotation}. + +@defvar log-rotation-service-type +This is the type of the log rotation service. Its associated value must +be a @code{log-rotation-configuration} record, as discussed below. +@end defvar + +@c %start of fragment + +@deftp {Data Type} log-rotation-configuration +Available @code{log-rotation-configuration} fields are: + +@table @asis +@item @code{provision} (default: @code{(log-rotation)}) (type: list-of-symbols) +The name(s) of the log rotation Shepherd service. + +@item @code{requirement} (default: @code{(user-processes)}) (type: list-of-symbols) +Dependencies of the log rotation Shepherd service. + +@item @code{calendar-event} (type: gexp) +Gexp containing the @dfn{calendar event} when log rotation occurs. +@xref{Timers,,,shepherd,The GNU Shepherd Manual}, for more information +on calendar events. + +@item @code{external-log-files} (default: @code{()}) (type: list-of-strings) +List of file names, external log files that should also be rotated. + +@item @code{compression} (default: @code{zstd}) (type: symbol) +The compression method used for rotated log files, one of @code{'none}, +@code{'gzip}, and @code{'zstd}. + +@item @code{expiry} (type: gexp-or-integer) +Age in seconds after which a log file is deleted. + +@item @code{size-threshold} (type: gexp-or-integer) +Size in bytes below which a log file is @emph{not} rotated. + +@end table + +@end deftp + + +@c %end of fragment + +@subheading Rottlog + +An alternative log rotation service relying on GNU@tie{}Rot[t]log, a log +rotation tool (@pxref{Top,,, rottlog, GNU Rot[t]log Manual}), is also +provided. This service is part of @code{%base-services}, and thus enabled by default, with the default settings, for commonly encountered log files. diff --git a/gnu/services/admin.scm b/gnu/services/admin.scm index 571af6a04e..deaa3b6c89 100644 --- a/gnu/services/admin.scm +++ b/gnu/services/admin.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2016 Jan Nieuwenhuizen -;;; Copyright © 2016-2024 Ludovic Courtès +;;; Copyright © 2016-2025 Ludovic Courtès ;;; Copyright © 2020 Brice Waegeneire ;;; Copyright © 2023 Giacomo Leidi ;;; Copyright © 2024 Gabriel Wicki @@ -45,7 +45,18 @@ (define-module (gnu services admin) #:use-module (srfi srfi-1) #:use-module (ice-9 match) #:use-module (ice-9 vlist) - #:export (%default-rotations + #:export (log-rotation-configuration + log-rotation-configuration? + log-rotation-configuration-provision + log-rotation-configuration-requirement + log-rotation-configuration-calendar-event + log-rotation-configuration-external-log-files + log-rotation-configuration-compression + log-rotation-configuration-expiry + log-rotation-configuration-size-threshold + log-rotation-service-type + + %default-rotations %rotated-files log-rotation @@ -112,14 +123,105 @@ (define-module (gnu services admin) ;;; Commentary: ;;; -;;; This module implements configuration of rottlog by writing -;;; /etc/rottlog/{rc,hourly|daily|weekly}. Example usage -;;; -;;; (mcron-service) -;;; (service rottlog-service-type) +;;; This module provides basic system administration tools: log rotation, +;;; unattended upgrades, etc. ;;; ;;; Code: + +;;; +;;; Shepherd's log rotation service. +;;; + +(define %default-log-rotation-calendar-event + ;; Default calendar event when log rotation is triggered. + #~(calendar-event #:minutes '(0) + #:hours '(22) + #:days-of-week '(sunday))) + +(define (gexp-or-integer? x) + (or (gexp? x) (integer? x))) + +(define-configuration log-rotation-configuration + (provision + (list-of-symbols '(log-rotation)) + "The name(s) of the log rotation Shepherd service." + empty-serializer) + (requirement + (list-of-symbols (if for-home? '() '(user-processes))) + "Dependencies of the log rotation Shepherd service." + empty-serializer) + (calendar-event + (gexp %default-log-rotation-calendar-event) + "Gexp containing the @dfn{calendar event} when log rotation occurs. +@xref{Timers,,, shepherd, The GNU Shepherd Manual}, for more information on +calendar events." + empty-serializer) + (external-log-files + (list-of-strings '()) + "List of file names, external log files that should also be +rotated." + empty-serializer) + (compression + (symbol 'zstd) + "The compression method used for rotated log files, one of +@code{'none}, @code{'gzip}, and @code{'zstd}." + empty-serializer) + (expiry + (gexp-or-integer #~(%default-log-expiry)) + "Age in seconds after which a log file is deleted." + empty-serializer) + (size-threshold + (gexp-or-integer #~(%default-rotation-size-threshold)) + "Size in bytes below which a log file is @emph{not} rotated." + empty-serializer)) + +(define (log-rotation-shepherd-services config) + (list (shepherd-service + (provision (log-rotation-configuration-provision config)) + (requirement (log-rotation-configuration-requirement config)) + (modules '((shepherd service timer) ;for 'calendar-event' + (shepherd service log-rotation))) + (free-form #~(log-rotation-service + #$(log-rotation-configuration-calendar-event config) + #:provision + '#$(log-rotation-configuration-provision config) + #:requirement + '#$(log-rotation-configuration-requirement config) + #:external-log-files + '#$(log-rotation-configuration-external-log-files + config) + #:compression + '#$(log-rotation-configuration-compression config) + #:expiry + #$(log-rotation-configuration-expiry config) + #:rotation-size-threshold + #$(log-rotation-configuration-size-threshold + config)))))) + +(define log-rotation-service-type + (service-type + (name 'log-rotation) + (description + "Periodically rotate log files using the Shepherd's log rotation service. +Run @command{herd status log-rotation} to view its status, @command{herd files +log-rotation} to list files subject to log rotation.") + (extensions (list (service-extension shepherd-root-service-type + log-rotation-shepherd-services))) + (compose concatenate) + (extend (lambda (config log-files) + (log-rotation-configuration + (inherit config) + (external-log-files + (append (log-rotation-configuration-external-log-files config) + log-files))))) + (default-value (log-rotation-configuration)))) + + +;;; +;;; Rottlog + mcron. +;;; + (define-record-type* log-rotation make-log-rotation log-rotation? (files log-rotation-files) ;list of strings From patchwork Wed Jan 8 17:41:48 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 36761 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 74EEC27BBEA; Wed, 8 Jan 2025 17:43:49 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=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 3002B27BBE2 for ; Wed, 8 Jan 2025 17:43:49 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tVa5V-0005ez-B7; Wed, 08 Jan 2025 12:43:26 -0500 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 1tVa5A-0005Ur-Vq for guix-patches@gnu.org; Wed, 08 Jan 2025 12:43:05 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tVa5A-00039k-Ma; Wed, 08 Jan 2025 12:43:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=Ybuk2RetGYS+YVsBjWOX8n0lzltYgSskKRb1HStkWyo=; b=nEV0XsJ8xU6r/jAQ2F6jV2t1+YNCWknx/y/QVdF2+CSIW6YOxptdRIlxAUL37qO+84pEoyR5BnPtuPjzwV85mO9UCRv9wq2vHCA6VH917cpx7DYG1nww/dxN4fcPTlH4iIYotw4fuZrZs0svacnD5iOBOabVMXlo5CdKiukwrojL/9q1vBhPmMaGdtQJNKuuJSk4IJIfSKikPuqGHXeMA9dIw0wCw2XHw1WeoSPHN8siWkcJA0DS4OniHEzikQCO/EXk/4iN6yTB4R96SwYzQEfYtgf9BUs4Cvt8P5J/QRuuUukvg2QIqGAeU6wZrgDQk93PgWb+jScV5iC2e19asw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tVa5A-0007sc-I9; Wed, 08 Jan 2025 12:43:04 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74860] [PATCH v2 04/12] services: log-cleanup: Rewrite as a Shepherd timer. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: ludo@gnu.org, maxim.cournoyer@gmail.com, guix-patches@gnu.org Resent-Date: Wed, 08 Jan 2025 17:43:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74860 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74860@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= , Ludovic =?utf-8?q?Court?= =?utf-8?q?=C3=A8s?= , Maxim Cournoyer X-Debbugs-Original-Xcc: Ludovic =?utf-8?q?Court=C3=A8s?= , Maxim Cournoyer Received: via spool by 74860-submit@debbugs.gnu.org id=B74860.173635815930149 (code B ref 74860); Wed, 08 Jan 2025 17:43:04 +0000 Received: (at 74860) by debbugs.gnu.org; 8 Jan 2025 17:42:39 +0000 Received: from localhost ([127.0.0.1]:48798 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tVa4k-0007q7-LB for submit@debbugs.gnu.org; Wed, 08 Jan 2025 12:42:38 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:60014) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tVa4c-0007oF-BS for 74860@debbugs.gnu.org; Wed, 08 Jan 2025 12:42:32 -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 1tVa4X-0002uA-2G; Wed, 08 Jan 2025 12:42:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=Ybuk2RetGYS+YVsBjWOX8n0lzltYgSskKRb1HStkWyo=; b=ajFPZBJ/G27ESE+mwEZL NPx7J00df5MTVi10NMPqvyl/enu0+VkVmzKxUb5jqLSAn+x3Jyrm7CnMSwO+gWvPw0xtG1fPPF1Ft eDYMqx0uJPO/u0Nv0WrlgrGnYve6crdJacr0qMNQZS1/QwWyhwo1tQm9Ep33/xjKGH6HWFmP3hXc3 WVLlomTj1Ff6yNZMy11OWbYj6jzmJDM8YrJXkPGgrwaWWKvWiVmDNOzDIIVlkau3hDWeO6GT8wSX4 R/OGsV30ODGd1B2mhTMyat0TPmjIqX36B5aHZdANyNwbzYBSpMFHOVRmSmJr/+gozsiIwXxwJrU1r Bq+BPk4AUfexGA==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Wed, 8 Jan 2025 18:41:48 +0100 Message-ID: <788340be0f08a348de1e1dcbd908019e24f465cf.1736357737.git.ludo@gnu.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches This is a semi-incompatible change: gexps previously provided in the ‘schedule’ field will no longer work. * gnu/services/admin.scm (log-cleanup-mcron-jobs): Remove. (log-cleanup-shepherd-services): New procedure. (log-cleanup-service-type): Extend SHEPHERD-ROOT-SERVICE-TYPE instead of MCRON-SERVICE-TYPE. * doc/guix.texi (Log Rotation): Adjust ‘schedule’ documentation accordingly. Change-Id: I2a3beb7dffbc9992b714a29423674db9c7dc6cab --- doc/guix.texi | 5 +++-- gnu/services/admin.scm | 25 +++++++++++++++++++------ 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index f521a2d2ad..e1d08c2f10 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -21084,8 +21084,9 @@ Log Rotation default). @item @code{schedule} (default: @code{"30 12 01,08,15,22 * *"}) -String or gexp denoting the corresponding mcron job schedule -(@pxref{Scheduled Job Execution}). +Schedule of the log cleanup job written either as a string in +traditional cron syntax or as a gexp representing a Shepherd calendar +event (@pxref{Timers,,, shepherd, The GNU Shepherd Manual}). @end table @end deftp diff --git a/gnu/services/admin.scm b/gnu/services/admin.scm index deaa3b6c89..7d202d737e 100644 --- a/gnu/services/admin.scm +++ b/gnu/services/admin.scm @@ -385,18 +385,31 @@ (define (log-cleanup-program directory expiry) (length logs) #$directory) (for-each delete-file logs)))))) -(define (log-cleanup-mcron-jobs configuration) +(define (log-cleanup-shepherd-services configuration) (match-record configuration - (directory expiry schedule) - (list #~(job #$schedule - #$(log-cleanup-program directory expiry))))) + (directory expiry schedule) + (let ((program (log-cleanup-program directory expiry))) + (list (shepherd-service + (provision '(log-cleanup)) + (requirement '(user-processes)) + (modules '((shepherd service timer))) + (start #~(make-timer-constructor + #$(if (string? schedule) + #~(cron-string->calendar-event #$schedule) + schedule) + (command '(#$program)))) + (stop #~(make-timer-destructor)) + (actions (list (shepherd-action + (name 'trigger) + (documentation "Trigger log cleanup.") + (procedure #~trigger-timer))))))))) (define log-cleanup-service-type (service-type (name 'log-cleanup) (extensions - (list (service-extension mcron-service-type - log-cleanup-mcron-jobs))) + (list (service-extension shepherd-root-service-type + log-cleanup-shepherd-services))) (description "Periodically delete old log files."))) From patchwork Wed Jan 8 17:41:49 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 36757 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 7D18E27BBEA; Wed, 8 Jan 2025 17:43:37 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=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 0218D27BBE2 for ; Wed, 8 Jan 2025 17:43:37 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tVa5G-0005Xe-VH; Wed, 08 Jan 2025 12:43:10 -0500 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 1tVa5A-0005Up-JL for guix-patches@gnu.org; Wed, 08 Jan 2025 12:43:04 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tVa5A-00039S-9U; Wed, 08 Jan 2025 12:43:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=dmVHySpjvJXWXi9jrxBVmLaf9JxKKQwLsN5EnAypjdI=; b=XEjwBPZ2dZyoIXNUCQAmzPuIti86FqxPYKWYe+n3EEPs95BCGdzkVPNmcYBwrSlZOhq3h3mKF5YKWNr0U9D7aeaqp6eqCAF3Od0wM17jxi7d0LLL1EoaBbEXlJjoGCBYCp/DLPNtlunkEL3tJ7W7BqhqDth3woiNom7FRvAJAjxmBNhZ1OjKn7AHYe0TGSCo3/cJcdqadjxn12Qw81soncvvelSfD0vpsq8XS3OpPe/+PxbT5SKUPftCpP2ALqPz2N/ZbQ6BHpcvZNL5ReJbGIRSPNrN5hsj8WApDQaYQ+cdpJjxSJTHiQw15sNvEvi/djvf4F6yG26YmSj5y/upag==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tVa5A-0007sT-2H; Wed, 08 Jan 2025 12:43:04 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74860] [PATCH v2 05/12] services: unattended-upgrade: Rewrite as a Shepherd timer. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: ludo@gnu.org, maxim.cournoyer@gmail.com, guix-patches@gnu.org Resent-Date: Wed, 08 Jan 2025 17:43:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74860 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74860@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= , Ludovic =?utf-8?q?Court?= =?utf-8?q?=C3=A8s?= , Maxim Cournoyer X-Debbugs-Original-Xcc: Ludovic =?utf-8?q?Court=C3=A8s?= , Maxim Cournoyer Received: via spool by 74860-submit@debbugs.gnu.org id=B74860.173635815830142 (code B ref 74860); Wed, 08 Jan 2025 17:43:04 +0000 Received: (at 74860) by debbugs.gnu.org; 8 Jan 2025 17:42:38 +0000 Received: from localhost ([127.0.0.1]:48794 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tVa4j-0007po-PV for submit@debbugs.gnu.org; Wed, 08 Jan 2025 12:42:38 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:60022) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tVa4d-0007oH-C8 for 74860@debbugs.gnu.org; Wed, 08 Jan 2025 12:42:32 -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 1tVa4X-0002uL-UD; Wed, 08 Jan 2025 12:42:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=dmVHySpjvJXWXi9jrxBVmLaf9JxKKQwLsN5EnAypjdI=; b=D9YqZgzwVmdL5r0byZAv S+FweXBQbienrHL6W8t7pHwirxCLNLp0t652sOSYNVxd1rvlKs8kioPEy7jHEb1eg7y7Kg8tdrAX/ xZIREPjsnATL6ceAz01lnPm7WtgiDLbiTZ/YBx7DS28k05pew0et1y/6whhkCsS0HM/31o9TXmkSr G2n11pgzNPh/3Ikm7KRehe9sgQhp1E06hgzzWwJMvqxzvVi6RzwJwtp4I9nOuRt70KUUgTzv5ZGti 3JBYjfu942dEEMH9eLojaNYtEACDn1H+Wepf4/pDOm/QIInh0jXKGtEa1eejQPuCMXQY0KBoVAzqy 3frjOdSRyERVsQ==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Wed, 8 Jan 2025 18:41:49 +0100 Message-ID: <564285438f6fa9498d1ecdcc9a7b0d00453651cf.1736357737.git.ludo@gnu.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches This is a semi-incompatible change: gexps previously provided in the ‘schedule’ field will no longer work. * gnu/services/admin.scm (unattended-upgrade-mcron-jobs): Rename to… (unattended-upgrade-shepherd-services): … this. Return a list of one Shepherd service. Remove custom logging and time limitation facilities from ‘code’. (unattended-upgrade-service-type): Extend ‘shepherd-root-service-type’ instead of ‘mcron-service-type’. ()[services-to-restart]: Change default. * doc/guix.texi (Unattended Upgrades): Adjust ‘schedule’ and ‘services-to-restart’ documentation. Change-Id: I1b239c5946e71cf9e2af9b24fe4b01366b57fb7a --- doc/guix.texi | 13 ++++---- gnu/services/admin.scm | 69 +++++++++++++++++++++++------------------- 2 files changed, 45 insertions(+), 37 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index e1d08c2f10..bfd9ab1ab4 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -23471,9 +23471,9 @@ Unattended Upgrades @table @asis @item @code{schedule} (default: @code{"30 01 * * 0"}) -This is the schedule of upgrades, expressed as a gexp containing an -mcron job schedule (@pxref{Guile Syntax, mcron job specifications,, -mcron, GNU@tie{}mcron}). +This is the schedule of upgrades, expressed as a string in traditional +cron syntax or as a gexp evaluating to a Shepherd calendar event +(@pxref{Timers,,, shepherd, The GNU Shepherd Manual}). @item @code{channels} (default: @code{#~%default-channels}) This gexp specifies the channels to use for the upgrade @@ -23522,7 +23522,7 @@ Unattended Upgrades rebooting. This means that the value for @code{services-to-restart} is ignored. The updated services will be started after the system reboots. -@item @code{services-to-restart} (default: @code{'(mcron)}) +@item @code{services-to-restart} (default: @code{'(unattended-upgrade)}) This field specifies the Shepherd services to restart when the upgrade completes. @@ -23537,8 +23537,9 @@ Unattended Upgrades @xref{Services}, for general information about services. Common services to restart would include @code{ntpd} and @code{ssh-daemon}. -By default, the @code{mcron} service is restarted. This ensures that -the latest version of the unattended upgrade job will be used next time. +By default, the @code{unattended-upgrade} service is restarted. This +ensures that the latest version of the unattended upgrade job will be +used next time. @item @code{system-expiration} (default: @code{(* 3 30 24 3600)}) This is the expiration time in seconds for system generations. System diff --git a/gnu/services/admin.scm b/gnu/services/admin.scm index 7d202d737e..735ba3f7be 100644 --- a/gnu/services/admin.scm +++ b/gnu/services/admin.scm @@ -553,7 +553,7 @@ (define-record-type* (reboot? unattended-upgrade-configuration-reboot? (default #f)) (services-to-restart unattended-upgrade-configuration-services-to-restart - (default '(mcron))) + (default '(unattended-upgrade))) (system-expiration unattended-upgrade-system-expiration (default (* 3 30 24 3600))) (maximum-duration unattended-upgrade-maximum-duration @@ -564,7 +564,7 @@ (define-record-type* (define %unattended-upgrade-log-file "/var/log/unattended-upgrade.log") -(define (unattended-upgrade-mcron-jobs config) +(define (unattended-upgrade-shepherd-services config) (define channels (scheme-file "channels.scm" (unattended-upgrade-configuration-channels config))) @@ -572,6 +572,9 @@ (define (unattended-upgrade-mcron-jobs config) (define log (unattended-upgrade-configuration-log-file config)) + (define schedule + (unattended-upgrade-configuration-schedule config)) + (define services (unattended-upgrade-configuration-services-to-restart config)) @@ -598,35 +601,17 @@ (define (unattended-upgrade-mcron-jobs config) #~(begin (use-modules (guix build utils) (gnu services herd) - (srfi srfi-19) (srfi srfi-34)) - (define log - (open-file #$log "a0")) - - (define (timestamp) - (date->string (time-utc->date (current-time time-utc)) - "[~4]")) - - (define (alarm-handler . _) - (format #t "~a time is up, aborting upgrade~%" - (timestamp)) - (exit 1)) + (setvbuf (current-output-port) 'line) + (setvbuf (current-error-port) 'line) ;; 'guix time-machine' needs X.509 certificates to authenticate the ;; Git host. (setenv "SSL_CERT_DIR" #$(file-append nss-certs "/etc/ssl/certs")) - ;; Make sure the upgrade doesn't take too long. - (sigaction SIGALRM alarm-handler) - (alarm #$(unattended-upgrade-maximum-duration config)) - - ;; Redirect stdout/stderr to LOG to save the output of 'guix' below. - (redirect-port log (current-output-port)) - (redirect-port log (current-error-port)) - - (format #t "~a starting upgrade...~%" (timestamp)) + (format #t "starting upgrade...~%") (guard (c ((invoke-error? c) (report-invoke-error c))) (apply invoke #$(file-append guix "/bin/guix") @@ -645,23 +630,45 @@ (define (unattended-upgrade-mcron-jobs config) (unless #$reboot? ;; Rebooting effectively restarts services anyway and execution ;; would be halted here if mcron is restarted. - (format #t "~a restarting services...~%" (timestamp)) + (format #t "restarting services...~%") (for-each restart-service '#$services)) - ;; XXX: If 'mcron' has been restarted, this is not reached. - (format #t "~a upgrade complete~%" (timestamp)) + ;; XXX: If this service has been restarted, this is not reached. + (format #t "upgrade complete~%") ;; Stopping the root shepherd service triggers a reboot. (when #$reboot? - (format #t "~a rebooting system~%" (timestamp)) + (format #t "rebooting system~%") (force-output) ;ensure the entire log is written. (stop-service 'root)))))) (define upgrade (program-file "unattended-upgrade" code)) - (list #~(job #$(unattended-upgrade-configuration-schedule config) - #$upgrade))) + (list (shepherd-service + (provision '(unattended-upgrade)) + (requirement '(user-processes networking)) + (modules '((shepherd service timer))) + (start #~(make-timer-constructor + #$(if (string? schedule) + #~(cron-string->calendar-event #$schedule) + schedule) + (command '(#$upgrade)) + + #:log-file #$log + + ;; Make sure the upgrade doesn't take too long. + #:max-duration + #$(unattended-upgrade-maximum-duration config) + + ;; Wait for the previous attempt to terminate before trying + ;; again. + #:wait-for-termination? #t)) + (stop #~(make-timer-destructor)) + (actions (list (shepherd-action + (name 'trigger) + (documentation "Trigger unattended system upgrade.") + (procedure #~trigger-timer))))))) (define (unattended-upgrade-log-rotations config) (list (log-rotation @@ -672,8 +679,8 @@ (define unattended-upgrade-service-type (service-type (name 'unattended-upgrade) (extensions - (list (service-extension mcron-service-type - unattended-upgrade-mcron-jobs) + (list (service-extension shepherd-root-service-type + unattended-upgrade-shepherd-services) (service-extension rottlog-service-type unattended-upgrade-log-rotations))) (description From patchwork Wed Jan 8 17:41:50 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 36759 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 04F6527BBEB; Wed, 8 Jan 2025 17:43:45 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=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 B934427BBE2 for ; Wed, 8 Jan 2025 17:43:39 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tVa5N-0005c4-6t; Wed, 08 Jan 2025 12:43:17 -0500 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 1tVa5C-0005Vf-D8 for guix-patches@gnu.org; Wed, 08 Jan 2025 12:43:07 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tVa5B-0003AJ-JW; Wed, 08 Jan 2025 12:43:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=l3vCzWQLqO1Eq8I/2mkNN/32dS5MqHu9+yDi3raY0kM=; b=aiMaWtA4XpEQTqhQI9c1qI7+epe+bSmiZvGakcQ/rFNxSyHgSWb4wA2uIhK6d71osd7bcXLJ+1rFH5aL4M2C1HKY1ixXt93RRcccaESFYP0nE0081a3YuEr0ui6KyotEzRSGSfjdpolVHDOAXgKH6bexBquz4UI3bszrHsQzi4GKF9q4NmX0ax2fxqRgmzNLQjqXJP0Ii3pkBnMnBDlik9WBmx3Lo/srZ43ZHFViUjkllK/aOBXMBJSVwjMQTwOPBIB8lHb2/hzjya/c5NMIXavRf2Y13zvtOqijBdzsiwDugihuD6MtmPYilyBFHBaz/6bCy6YDPq8Ov1wplRgKzw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tVa5B-0007st-Em; Wed, 08 Jan 2025 12:43:05 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74860] [PATCH v2 06/12] services: Switch from mcron + Rottlog to =?utf-8?b?U2hlcGhlcmTigJlz?= log rotation. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: ludo@gnu.org, maxim.cournoyer@gmail.com, guix-patches@gnu.org Resent-Date: Wed, 08 Jan 2025 17:43:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74860 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74860@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= , Ludovic =?utf-8?q?Court?= =?utf-8?q?=C3=A8s?= , Maxim Cournoyer X-Debbugs-Original-Xcc: Ludovic =?utf-8?q?Court=C3=A8s?= , Maxim Cournoyer Received: via spool by 74860-submit@debbugs.gnu.org id=B74860.173635816130171 (code B ref 74860); Wed, 08 Jan 2025 17:43:05 +0000 Received: (at 74860) by debbugs.gnu.org; 8 Jan 2025 17:42:41 +0000 Received: from localhost ([127.0.0.1]:48802 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tVa4l-0007qL-E5 for submit@debbugs.gnu.org; Wed, 08 Jan 2025 12:42:41 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:60036) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tVa4e-0007oJ-MK for 74860@debbugs.gnu.org; Wed, 08 Jan 2025 12:42:34 -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 1tVa4Z-0002ud-B4; Wed, 08 Jan 2025 12:42:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=l3vCzWQLqO1Eq8I/2mkNN/32dS5MqHu9+yDi3raY0kM=; b=f9f9HVLYvBsor5bNU57u ek277pUYdzQljEjH+tY0eupI7J1xhYKqlDWrYpW/NXa+ec1il2UUo7tHKSVCr/+ENZePrahY7YABg HT70Y2ReRx+SAdXUA69qxaotLfmMpbgBr5BcJsQ/tfOc2a/LRXCjJhbnl1aMULBXvLPNFwqquRnRP apL+3aLzJVFoKJtYUJYG0RemHRPVKqwgyF3ndIjiD3qY26YFPSIsBooOlsbi25MMnI6DGIqurLzFI JydevcJ9NFVuIQQOrKSFHl1SDhY0+801JZ0Lh4uPmmZmZIwlIkvscNDIrDC07OYZkq5WZxav3FMae SexFQR8cF9JIYg==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Wed, 8 Jan 2025 18:41:50 +0100 Message-ID: <7de9e73e6146639bee8e06708ddd8bff945b3e8d.1736357737.git.ludo@gnu.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/services/admin.scm (unattended-upgrade-log-rotations): Remove. (unattended-upgrade-service-type): Remove ‘rottlog-service-type’ extension. (%syslogd-files): New variable. (log-rotation-configuration)[external-log-files]: Use it. * gnu/services/audio.scm (mpd-log-rotation): Remove. (mpd-service-type): Remove ‘rottlog-service-type’ extension. (mympd-log-rotation): Remove. (mympd-service-type): Remove rottlog-service-type’ extension. * gnu/services/base.scm (%guix-publish-log-rotations): Remove. (guix-publish-service-type): Remove ‘rottlog-service-type’ extension. (%base-services): Instantiate ‘log-rotation-service-type’ instead of ‘rottlog-service-type’. * gnu/services/cuirass.scm (cuirass-log-rotations): Remove. (cuirass-service-type): Remove ‘rottlog-service-type’ extension. (cuirass-remote-worker-log-rotations): Remove. (cuirass-remote-worker-service-type): Remove ‘rottlog-service-type’ extension. * gnu/services/file-sharing.scm (%transmission-daemon-log-rotations): Remove. (transmission-daemon-service-type): Remove ‘rottlog-service-type’ extension. * gnu/services/linux.scm (%earlyoom-log-rotation): Remove. (earlyoom-service-type): Remove ‘rottlog-service-type’ extension. * gnu/services/networking.scm (%ntp-log-rotation): Remove. (ntp-service-type): Remove ‘rottlog-service-type’ extension. (openntpd-service-type): Likewise. (%connman-log-rotation): Remove. (connman-service-type): Remove ‘rottlog-service-type’ extension. (%hostapd-log-rotation): Remove. (hostapd-service-type): Remove ‘rottlog-service-type’ extension. (%pagekite-log-rotation): Remove. (pagekite-service-type): Remove ‘rottlog-service-type’ extension. (%yggdrasil-log-rotation): Remove. (yggdrasil-service-type): Remove ‘rottlog-service-type’ extension. (%ipfs-log-rotation): Remove. (ipfs-service-type): Remove ‘rottlog-service-type’ extension. (%keepalived-log-rotation): Remove. (keepalived-service-type): Remove ‘rottlog-service-type’ extension. * gnu/services/web.scm (%hpcguix-web-log-rotations): Remove. (hpcguix-web-service-type): Remove ‘rottlog-service-type’ extension. (%mumi-log-rotations): Remove. (mumi-service-type): Remove ‘rottlog-service-type’ extension. * doc/guix.texi (Log Rotation): Adjust text regarding which one is in ‘%base-services’. Update default value of ‘external-log-files’. Change-Id: I8802d4c2337a1e08e3c084d6217f76527d7ee1fb --- doc/guix.texi | 7 ++-- gnu/services/admin.scm | 18 +++++------ gnu/services/audio.scm | 26 ++------------- gnu/services/base.scm | 10 +----- gnu/services/cuirass.scm | 27 +--------------- gnu/services/file-sharing.scm | 6 ---- gnu/services/linux.scm | 8 +---- gnu/services/networking.scm | 61 +++++------------------------------ gnu/services/web.scm | 17 +--------- 9 files changed, 27 insertions(+), 153 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index bfd9ab1ab4..3feeb460c8 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -20901,6 +20901,9 @@ Log Rotation log-rotation} and trigger rotation manually with @command{herd trigger log-rotation}. +This service is part of @code{%base-services}, and thus enabled by +default, with the default settings. + @defvar log-rotation-service-type This is the type of the log rotation service. Its associated value must be a @code{log-rotation-configuration} record, as discussed below. @@ -20923,7 +20926,7 @@ Log Rotation @xref{Timers,,,shepherd,The GNU Shepherd Manual}, for more information on calendar events. -@item @code{external-log-files} (default: @code{()}) (type: list-of-strings) +@item @code{external-log-files} (default: @code{("/var/log/messages" "/var/log/secure" "/var/log/debug" "/var/log/maillog")}) (type: list-of-strings) List of file names, external log files that should also be rotated. @item @code{compression} (default: @code{zstd}) (type: symbol) @@ -20949,8 +20952,6 @@ Log Rotation rotation tool (@pxref{Top,,, rottlog, GNU Rot[t]log Manual}), is also provided. -This service is part of @code{%base-services}, and thus enabled by -default, with the default settings, for commonly encountered log files. The example below shows how to extend it with an additional @dfn{rotation}, should you need to do that (usually, services that produce log files already take care of that): diff --git a/gnu/services/admin.scm b/gnu/services/admin.scm index 735ba3f7be..f0cb94cd64 100644 --- a/gnu/services/admin.scm +++ b/gnu/services/admin.scm @@ -142,6 +142,13 @@ (define %default-log-rotation-calendar-event (define (gexp-or-integer? x) (or (gexp? x) (integer? x))) +(define %syslogd-files + ;; List of files from good'ol syslogd that should be rotated. This variable + ;; is intentionally kept private: it will be removed when the Shepherd's + ;; system log service is in use. + '("/var/log/messages" "/var/log/secure" "/var/log/debug" + "/var/log/maillog")) + (define-configuration log-rotation-configuration (provision (list-of-symbols '(log-rotation)) @@ -158,7 +165,7 @@ (define-configuration log-rotation-configuration calendar events." empty-serializer) (external-log-files - (list-of-strings '()) + (list-of-strings %syslogd-files) "List of file names, external log files that should also be rotated." empty-serializer) @@ -670,19 +677,12 @@ (define (unattended-upgrade-shepherd-services config) (documentation "Trigger unattended system upgrade.") (procedure #~trigger-timer))))))) -(define (unattended-upgrade-log-rotations config) - (list (log-rotation - (files - (list (unattended-upgrade-configuration-log-file config)))))) - (define unattended-upgrade-service-type (service-type (name 'unattended-upgrade) (extensions (list (service-extension shepherd-root-service-type - unattended-upgrade-shepherd-services) - (service-extension rottlog-service-type - unattended-upgrade-log-rotations))) + unattended-upgrade-shepherd-services))) (description "Periodically upgrade the system from the current configuration.") (default-value (unattended-upgrade-configuration)))) diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm index 5d2cd56a17..6515d53dbd 100644 --- a/gnu/services/audio.scm +++ b/gnu/services/audio.scm @@ -579,17 +579,6 @@ (define (mpd-serialize-configuration configuration) "mpd.conf" (serialize-configuration configuration mpd-configuration-fields))) -(define (mpd-log-rotation config) - (match-record config - (log-file) - (if (string=? "syslog" log-file) - '() ;nothing to do - (list (log-rotation - (files (list log-file)) - (post-rotate #~(begin - (use-modules (gnu services herd)) - (with-shepherd-action 'mpd ('reopen) #f)))))))) - (define (mpd-shepherd-service config) (match-record config (user package shepherd-requirement @@ -675,8 +664,7 @@ (define mpd-service-type (extensions (list (service-extension shepherd-root-service-type (compose list mpd-shepherd-service)) - (service-extension account-service-type mpd-accounts) - (service-extension rottlog-service-type mpd-log-rotation))) + (service-extension account-service-type mpd-accounts))) (default-value (mpd-configuration)))) @@ -953,14 +941,6 @@ (define (mympd-accounts config) user))) (list user group)))) -(define (mympd-log-rotation config) - (match-record config - (log-to) - (if (maybe-value-set? log-to) - (list (log-rotation - (files (list log-to)))) - '()))) - (define mympd-service-type (service-type (name 'mympd) @@ -970,8 +950,6 @@ (define mympd-service-type (service-extension account-service-type mympd-accounts) (service-extension special-files-service-type - mympd-serialize-configuration) - (service-extension rottlog-service-type - mympd-log-rotation))) + mympd-serialize-configuration))) (description "Run myMPD, a frontend for MPD. (Music Player Daemon)") (default-value (mympd-configuration)))) diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 75ce4e8fe5..237b6f0928 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -2354,12 +2354,6 @@ (define %guix-publish-accounts (home-directory "/var/empty") (shell (file-append shadow "/sbin/nologin"))))) -(define %guix-publish-log-rotations - (list (log-rotation - (files (list "/var/log/guix-publish.log")) - (options `("rotate 4" ;don't keep too many of them - ,@%default-log-rotation-options))))) - (define (guix-publish-activation config) (let ((cache (guix-publish-configuration-cache config))) (if cache @@ -2381,8 +2375,6 @@ (define guix-publish-service-type guix-publish-shepherd-service) (service-extension account-service-type (const %guix-publish-accounts)) - (service-extension rottlog-service-type - (const %guix-publish-log-rotations)) (service-extension activation-service-type guix-publish-activation))) (default-value (guix-publish-configuration)) @@ -3736,7 +3728,7 @@ (define %base-services (service guix-service-type) (service nscd-service-type) - (service rottlog-service-type) + (service log-rotation-service-type) ;; Periodically delete old build logs. (service log-cleanup-service-type diff --git a/gnu/services/cuirass.scm b/gnu/services/cuirass.scm index cc5cd62672..6643fd2f35 100644 --- a/gnu/services/cuirass.scm +++ b/gnu/services/cuirass.scm @@ -331,20 +331,6 @@ (define (cuirass-activation config) (when #$remote-cache (chown #$remote-cache uid gid))))))) -(define (cuirass-log-rotations config) - "Return the list of log rotations that corresponds to CONFIG." - (list (log-rotation - (files (append (list (cuirass-configuration-log-file config) - (cuirass-configuration-web-log-file config)) - (let ((server - (cuirass-configuration-remote-server config))) - (if server - (list (cuirass-remote-server-log-file server)) - '())))) - (frequency 'weekly) - (options `("rotate 40" ;worth keeping - ,@%default-log-rotation-options))))) - (define cuirass-service-type (service-type (name 'cuirass) @@ -352,7 +338,6 @@ (define cuirass-service-type (list (service-extension profile-service-type ;for 'info cuirass' (compose list cuirass-configuration-cuirass)) - (service-extension rottlog-service-type cuirass-log-rotations) (service-extension activation-service-type cuirass-activation) (service-extension shepherd-root-service-type cuirass-shepherd-service) (service-extension account-service-type cuirass-account) @@ -445,14 +430,6 @@ (define (cuirass-remote-worker-shepherd-service config) #:log-file #$log-file)) (stop #~(make-kill-destructor)))))) -(define (cuirass-remote-worker-log-rotations config) - "Return the list of log rotations that corresponds to CONFIG." - (list (log-rotation - (files (list (cuirass-remote-worker-log-file config))) - (frequency 'weekly) - (options `("rotate 4" ;don't keep too many of them - ,@%default-log-rotation-options))))) - (define cuirass-remote-worker-service-type (service-type (name 'cuirass-remote-worker) @@ -460,8 +437,6 @@ (define cuirass-remote-worker-service-type (list (service-extension shepherd-root-service-type cuirass-remote-worker-shepherd-service) (service-extension account-service-type - (const %cuirass-remote-worker-accounts)) - (service-extension rottlog-service-type - cuirass-remote-worker-log-rotations))) + (const %cuirass-remote-worker-accounts)))) (description "Run the Cuirass remote build worker service."))) diff --git a/gnu/services/file-sharing.scm b/gnu/services/file-sharing.scm index 75e99f20b7..6b25cd420f 100644 --- a/gnu/services/file-sharing.scm +++ b/gnu/services/file-sharing.scm @@ -701,10 +701,6 @@ (define %transmission-daemon-accounts (shell (file-append shadow "/sbin/nologin")) (system? #t)))) -(define %transmission-daemon-log-rotations - (list (log-rotation - (files (list %transmission-daemon-log-file))))) - (define (transmission-daemon-computed-settings-file config) "Return a @code{computed-file} object that, when unquoted in a G-expression, produces a Transmission settings file (@file{settings.json}) matching CONFIG." @@ -785,8 +781,6 @@ (define transmission-daemon-service-type transmission-daemon-shepherd-service) (service-extension account-service-type (const %transmission-daemon-accounts)) - (service-extension rottlog-service-type - (const %transmission-daemon-log-rotations)) (service-extension activation-service-type transmission-daemon-activation))) (default-value (transmission-daemon-configuration)) diff --git a/gnu/services/linux.scm b/gnu/services/linux.scm index 9955a11e64..e683da6bac 100644 --- a/gnu/services/linux.scm +++ b/gnu/services/linux.scm @@ -181,19 +181,13 @@ (define (earlyoom-shepherd-service config) #:log-file "/var/log/earlyoom.log")) (stop #~(make-kill-destructor)))) -(define %earlyoom-log-rotation - (list (log-rotation - (files '("/var/log/earlyoom.log"))))) - (define earlyoom-service-type (service-type (name 'earlyoom) (default-value (earlyoom-configuration)) (extensions (list (service-extension shepherd-root-service-type - (compose list earlyoom-shepherd-service)) - (service-extension rottlog-service-type - (const %earlyoom-log-rotation)))) + (compose list earlyoom-shepherd-service)))) (description "Run @command{earlyoom}, a daemon that quickly responds to @acronym{OOM, out-of-memory} conditions by terminating relevant processes."))) diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm index 48a86b3694..af28bd0626 100644 --- a/gnu/services/networking.scm +++ b/gnu/services/networking.scm @@ -496,11 +496,6 @@ (define dhcpd-service-type ;;; NTP. ;;; - -(define %ntp-log-rotation - (list (log-rotation - (files '("/var/log/ntpd.log"))))) - (define ntp-server-types (make-enumeration '(pool server @@ -634,9 +629,7 @@ (define ntp-service-type (service-extension account-service-type (const %ntp-accounts)) (service-extension activation-service-type - ntp-service-activation) - (service-extension rottlog-service-type - (const %ntp-log-rotation)))) + ntp-service-activation))) (description "Run the @command{ntpd}, the Network Time Protocol (NTP) daemon of the @uref{http://www.ntp.org, Network Time Foundation}. The daemon @@ -745,9 +738,7 @@ (define openntpd-service-type (service-extension profile-service-type (compose list openntpd-configuration-openntpd)) (service-extension activation-service-type - openntpd-service-activation) - (service-extension rottlog-service-type - (const %ntp-log-rotation)))) + openntpd-service-activation))) (default-value (openntpd-configuration)) (description "Run the @command{ntpd}, the Network Time Protocol (NTP) @@ -1699,10 +1690,6 @@ (define (connman-shepherd-service config) #:log-file "/var/log/connman.log")) (stop #~(make-kill-destructor))))))) -(define %connman-log-rotation - (list (log-rotation - (files '("/var/log/connman.log"))))) - (define connman-service-type (let ((connman-package (compose list connman-configuration-connman))) (service-type (name 'connman) @@ -1717,9 +1704,7 @@ (define connman-service-type connman-activation) ;; Add connman to the system profile. (service-extension profile-service-type - connman-package) - (service-extension rottlog-service-type - (const %connman-log-rotation)))) + connman-package))) (default-value (connman-configuration)) (description "Run @url{https://01.org/connman,Connman}, @@ -1960,18 +1945,12 @@ (define* (hostapd-shepherd-services config #:key (requirement '())) #:log-file "/var/log/hostapd.log")) (stop #~(make-kill-destructor))))) -(define %hostapd-log-rotation - (list (log-rotation - (files '("/var/log/hostapd.log"))))) - (define hostapd-service-type (service-type (name 'hostapd) (extensions (list (service-extension shepherd-root-service-type - hostapd-shepherd-services) - (service-extension rottlog-service-type - (const %hostapd-log-rotation)))) + hostapd-shepherd-services))) (description "Run the @uref{https://w1.fi/hostapd/, hostapd} daemon for Wi-Fi access points and authentication servers."))) @@ -2272,10 +2251,6 @@ (define (pagekite-shepherd-service config) ;; SIGTERM doesn't always work for some reason. (stop #~(make-kill-destructor SIGINT)))))) -(define %pagekite-log-rotation - (list (log-rotation - (files '("/var/log/pagekite.log"))))) - (define %pagekite-accounts (list (user-group (name "pagekite") (system? #t)) (user-account @@ -2294,9 +2269,7 @@ (define pagekite-service-type (list (service-extension shepherd-root-service-type (compose list pagekite-shepherd-service)) (service-extension account-service-type - (const %pagekite-accounts)) - (service-extension rottlog-service-type - (const %pagekite-log-rotation)))) + (const %pagekite-accounts)))) (description "Run @url{https://pagekite.net/,PageKite}, a tunneling solution to make local servers publicly accessible on the web, even behind NATs and firewalls."))) @@ -2387,10 +2360,6 @@ (define (yggdrasil-shepherd-service config) #:group "yggdrasil")) (stop #~(make-kill-destructor))))) -(define %yggdrasil-log-rotation - (list (log-rotation - (files '("/var/log/yggdrasil.log"))))) - (define %yggdrasil-accounts (list (user-group (name "yggdrasil") (system? #t)))) @@ -2406,9 +2375,7 @@ (define yggdrasil-service-type (service-extension account-service-type (const %yggdrasil-accounts)) (service-extension profile-service-type - (compose list yggdrasil-configuration-package)) - (service-extension rottlog-service-type - (const %yggdrasil-log-rotation)))))) + (compose list yggdrasil-configuration-package)))))) ;;; @@ -2478,10 +2445,6 @@ (define (ipfs-shepherd-service config) #:environment-variables #$%ipfs-environment)) (stop #~(make-kill-destructor))))) -(define %ipfs-log-rotation - (list (log-rotation - (files '("/var/log/ipfs.log"))))) - (define (%ipfs-activation config) "Return an activation gexp for IPFS with CONFIG" (define (exec-command . args) @@ -2537,9 +2500,7 @@ (define ipfs-service-type (service-extension activation-service-type %ipfs-activation) (service-extension shepherd-root-service-type - ipfs-shepherd-service) - (service-extension rottlog-service-type - (const %ipfs-log-rotation)))) + ipfs-shepherd-service))) (default-value (ipfs-configuration)) (description "Run @command{ipfs daemon}, the reference implementation @@ -2575,16 +2536,10 @@ (define (keepalived-shepherd-service config) (respawn? #f) (stop #~(make-kill-destructor)))))) -(define %keepalived-log-rotation - (list (log-rotation - (files '("/var/log/keepalived.log"))))) - (define keepalived-service-type (service-type (name 'keepalived) (extensions (list (service-extension shepherd-root-service-type - keepalived-shepherd-service) - (service-extension rottlog-service-type - (const %keepalived-log-rotation)))) + keepalived-shepherd-service))) (description "Run @uref{https://www.keepalived.org/, Keepalived} routing software."))) diff --git a/gnu/services/web.scm b/gnu/services/web.scm index 3997fe2ab8..c6b2b7fc23 100644 --- a/gnu/services/web.scm +++ b/gnu/services/web.scm @@ -1245,11 +1245,6 @@ (define %hpcguix-web-activation (define %hpcguix-web-log-file "/var/log/hpcguix-web.log") -(define %hpcguix-web-log-rotations - (list (log-rotation - (files (list %hpcguix-web-log-file)) - (frequency 'weekly)))) - (define (hpcguix-web-shepherd-service config) (let* ((specs (hpcguix-web-configuration-specs config)) (config-file (and specs (scheme-file "hpcguix-web.scm" specs))) @@ -1287,8 +1282,6 @@ (define hpcguix-web-service-type (const %hpcguix-web-accounts)) (service-extension activation-service-type (const %hpcguix-web-activation)) - (service-extension rottlog-service-type - (const %hpcguix-web-log-rotations)) (service-extension shepherd-root-service-type (compose list hpcguix-web-shepherd-service)))) (default-value (hpcguix-web-configuration)))) @@ -2084,12 +2077,6 @@ (define (mumi-shepherd-services config) #:log-file #$%mumi-mailer-log)) (stop #~(make-kill-destructor))))))) -(define %mumi-log-rotations - (list (log-rotation - (files (list %mumi-log - %mumi-mailer-log - %mumi-worker-log))))) - (define mumi-service-type (service-type (name 'mumi) @@ -2099,9 +2086,7 @@ (define mumi-service-type (service-extension account-service-type (const %mumi-accounts)) (service-extension shepherd-root-service-type - mumi-shepherd-services) - (service-extension rottlog-service-type - (const %mumi-log-rotations)))) + mumi-shepherd-services))) (description "Run Mumi, a Web interface to the Debbugs bug-tracking server.") (default-value From patchwork Wed Jan 8 17:41:51 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 36762 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 6F73B27BBEA; Wed, 8 Jan 2025 17:43:56 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=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 2647A27BBE2 for ; Wed, 8 Jan 2025 17:43:56 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tVa5Y-0005gz-B6; Wed, 08 Jan 2025 12:43:28 -0500 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 1tVa5C-0005Ve-4h for guix-patches@gnu.org; Wed, 08 Jan 2025 12:43:07 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tVa5B-0003A4-5f; Wed, 08 Jan 2025 12:43:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=5W+NXjJi9V333h45hnkop5N/CAKm2nLQyyDzKMRC8tA=; b=UBLEriSbdbSoq0f7K7s2ap0TPoWcFqFx0sTNKXPtmvXsOK+MgRDxLH9i9Lm/UqMz3I2I51q51qgT1KmzpYLz6/LHW/3ekXhEWEn63TMZ1e45j440o9dzmYQjpgRmoXKv0SzJgoYT1ToR0ZPHbZ3GR29ZPHFkfQ4Hmkro7WHaCBa9jwSbaEHgcpb1Jp3NVtxwzZOdr48BlJThY2ltDClfsauSENdtn8DPLsL8BnqsbjA1YoJDfZMU1K7+6pvKham37xHxNgUxHAXue6kLCtHLNKdyjFQijtTDyzOyJHyK/DX+jkB0VpapV17VDVitfQAs369O4DZUJIqmB3Ei165E1A==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tVa5B-0007sk-1H; Wed, 08 Jan 2025 12:43:05 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74860] [PATCH v2 07/12] services: rottlog: Deprecate. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: ludo@gnu.org, maxim.cournoyer@gmail.com, guix-patches@gnu.org Resent-Date: Wed, 08 Jan 2025 17:43:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74860 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74860@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= , Ludovic =?utf-8?q?Court?= =?utf-8?q?=C3=A8s?= , Maxim Cournoyer X-Debbugs-Original-Xcc: Ludovic =?utf-8?q?Court=C3=A8s?= , Maxim Cournoyer Received: via spool by 74860-submit@debbugs.gnu.org id=B74860.173635815930156 (code B ref 74860); Wed, 08 Jan 2025 17:43:04 +0000 Received: (at 74860) by debbugs.gnu.org; 8 Jan 2025 17:42:39 +0000 Received: from localhost ([127.0.0.1]:48800 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tVa4l-0007qE-1k for submit@debbugs.gnu.org; Wed, 08 Jan 2025 12:42:39 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:60038) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tVa4f-0007oQ-Lk for 74860@debbugs.gnu.org; Wed, 08 Jan 2025 12:42:34 -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 1tVa4a-0002un-Cp; Wed, 08 Jan 2025 12:42:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=5W+NXjJi9V333h45hnkop5N/CAKm2nLQyyDzKMRC8tA=; b=PxaJSGdae/XXg6i8jNkV yFmk29MJ3AFCpXeX8m1nEw2zynBf6XOdC0hq37KcV/Gz+6cq1CIkGycSVUfPDy6r39LvvXcHyk7pg tJMdf2GIf8fOWdudKJCC8tletP7LSoP6OFAce0XTuSG5MY2EoG/Zb5mHjTgjNokgvlEowj6zeLEwG wb4oBYFrKbVBQAeW8AA6Z5miw/xNH1hNeMXKYAtl7e4ugDATAYKFn8gGnA6ISBIO6nZOWS1gxUQvd MUhivBI9ScR3SQSysF4grU3Msbmno+AN3hUDNx3QHVW3ELG3T5leLBwG2djK5l0K+AVC4hM+oTq+y qavnwvO8rJ6qwQ==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Wed, 8 Jan 2025 18:41:51 +0100 Message-ID: <4f57aed0863887c7b7555ae926f3c102f86f4f09.1736357737.git.ludo@gnu.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/services/admin.scm (rottlog-service-type): Deprecate. * doc/guix.texi (Log Rotation): Add deprecation warning. Change-Id: I661666ff3de64a69ff4f4982d7f432fd575c36df --- doc/guix.texi | 7 +++++++ gnu/services/admin.scm | 9 +++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 3feeb460c8..8ed5c16dda 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -20952,6 +20952,13 @@ Log Rotation rotation tool (@pxref{Top,,, rottlog, GNU Rot[t]log Manual}), is also provided. +@quotation Warning +The Rottlog service presented here is deprecated in favor of +@code{log-rotation-service-type} (see above). The +@code{rottlog-service-type} variable and related tools will be removed +after 2025-06-15. +@end quotation + The example below shows how to extend it with an additional @dfn{rotation}, should you need to do that (usually, services that produce log files already take care of that): diff --git a/gnu/services/admin.scm b/gnu/services/admin.scm index f0cb94cd64..f58fc5494e 100644 --- a/gnu/services/admin.scm +++ b/gnu/services/admin.scm @@ -38,6 +38,7 @@ (define-module (gnu services admin) #:use-module (gnu system accounts) #:use-module ((gnu system shadow) #:select (account-service-type)) #:use-module ((guix store) #:select (%store-prefix)) + #:use-module (guix deprecation) #:use-module (guix gexp) #:use-module (guix modules) #:use-module (guix packages) @@ -341,12 +342,16 @@ (define (rottlog-jobs-or-default config) (or (rottlog-configuration-jobs config) (default-jobs (rottlog-configuration-rottlog config)))) -(define rottlog-service-type +;; TODO: Deprecated; remove sometime after 2025-06-15. +(define-deprecated rottlog-service-type + log-rotation-service-type (service-type (name 'rottlog) (description "Periodically rotate log files using GNU@tie{}Rottlog and GNU@tie{}mcron. -Old log files are removed or compressed according to the configuration.") +Old log files are removed or compressed according to the configuration. + +This service is deprecated and slated for removal after 2025-06-15.") (extensions (list (service-extension etc-service-type rottlog-etc) (service-extension mcron-service-type rottlog-jobs-or-default) From patchwork Wed Jan 8 17:41:52 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 36760 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 9E8AB27BBE9; Wed, 8 Jan 2025 17:43:46 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=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 DC20C27BBE2 for ; Wed, 8 Jan 2025 17:43:45 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tVa5I-0005YC-K0; Wed, 08 Jan 2025 12:43:13 -0500 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 1tVa5C-0005Vh-Ef for guix-patches@gnu.org; Wed, 08 Jan 2025 12:43:07 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tVa5C-0003Ab-62 for guix-patches@gnu.org; Wed, 08 Jan 2025 12:43:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=Vvrmc4kywCk1IGPDsLpd2JolME0Ks2CYJikl8GA3PoU=; b=BzmzA23eocvAifSzIY/uJfjRi6BBtVn57AE4Lid/BaXkmVvKXQmPeW9ZSsQN3WU2bri2eM2eEqfPf/DswfB45Gg6Eu09KVKwG+7ZHNmOPd7N5QWDAaFRnMPLxgXjSfCTHNQ0yhcpWO5m6/CQQWV/q9kN5e+2XH/ADS3mN+G/OKgZQQXUTIuyUwi3tC1fQrw9TpNtxX8M2yDi6+7WGwdNw77n3xaLyczgjDuhW4E6pShgxt7WKbQNp0BLWts5TIfB5VkF/jlyG9SLy2g4bDAH92wThxmh0JApQteu1YhX6RdMxX+3qqKmqJKVLyTf1O0VFpVAS6z1WfDJVmc5eYgSvg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tVa5C-0007t1-0S; Wed, 08 Jan 2025 12:43:06 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74860] [PATCH v2 08/12] DRAFT news: Add entry for =?utf-8?b?4oCYcm90dGxvZy1zZXJ2aWNlLXR5cGXigJk=?= deprecation. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: pelzflorian@pelzflorian.de, julien@lepiller.eu, guix-patches@gnu.org Resent-Date: Wed, 08 Jan 2025 17:43:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74860 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74860@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= , Florian Pelz , Florian Pelz , Julien Lepiller X-Debbugs-Original-Xcc: Florian Pelz , Julien Lepiller Received: via spool by 74860-submit@debbugs.gnu.org id=B74860.173635816130180 (code B ref 74860); Wed, 08 Jan 2025 17:43:05 +0000 Received: (at 74860) by debbugs.gnu.org; 8 Jan 2025 17:42:41 +0000 Received: from localhost ([127.0.0.1]:48806 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tVa4n-0007qe-9Z for submit@debbugs.gnu.org; Wed, 08 Jan 2025 12:42:41 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:60050) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tVa4g-0007oX-RT for 74860@debbugs.gnu.org; Wed, 08 Jan 2025 12:42:35 -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 1tVa4b-0002v4-EN; Wed, 08 Jan 2025 12:42:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=Vvrmc4kywCk1IGPDsLpd2JolME0Ks2CYJikl8GA3PoU=; b=hK/DBSA5YeS03+Qv3/9A OAz3RviZoeFwGk/iuoHfgKbfz/uoMBQqpmBr95jLNL5Z1oTROGbj7dQAACZokydVsHdDt6YY1n4ec w2yzRtFYCfXrLjqy3Bpu3vSZjwUeyOrdrSjUmpdqgYkdzWXQwgIAtJAd+ClZyN5Bl4F1T5eFlzE8N /JQuFaFIhhpont04XJVckuhvegcopA6gHCcyUQ+hUXHXg7kig3RV3TqvhIYlFGV43tguBWGABmSBd yj43JbPvgToXZ9ke6Cuz3Em3CIWS1wO+fW+E8LBnSVV1aWrAEKxJHv+fkGDNRWBbo5uLcWlkQYZJo o7PT351O/vAGOQ==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Wed, 8 Jan 2025 18:41:52 +0100 Message-ID: <1c41d798e649ecf96a042fd0622c834007f2c548.1736357737.git.ludo@gnu.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * etc/news.scm: Add entry. Change-Id: I46ccddf4216b4c46ec417692c832b2e37a3669a0 Co-authored-by: Florian Pelz --- etc/news.scm | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/etc/news.scm b/etc/news.scm index 00d2cbf444..677cd12847 100644 --- a/etc/news.scm +++ b/etc/news.scm @@ -1,6 +1,6 @@ ;; GNU Guix news, for use by 'guix pull'. ;; -;; Copyright © 2019-2024 Ludovic Courtès +;; Copyright © 2019-2025 Ludovic Courtès ;; Copyright © 2019–2021, 2024 Tobias Geerinckx-Rice ;; Copyright © 2019, 2020 Miguel Ángel Arruga Vivas ;; Copyright © 2019, 2020 Konrad Hinsen @@ -35,6 +35,61 @@ (channel-news (version 0) + (entry (commit "FIXME") + (title + (en "Rottlog service replaced by new log rotation service") + (de "Rottlog-Dienst ersetzt durch neuen Dienst zur Protokollrotation") + (fr "Service Rottlog remplacé par un nouveau service de rotation des +journaux")) + (body + (en "A noticeable change was made that impacts all Guix System users: +the Rottlog service was replaced by the new log rotation service. +Additionally, @code{rottlog-service-type} is now deprecated in favor of +@code{log-rotation-service-type} and will be removed in six months, in +accordance with the Guix's deprecation policy. Authors of service types in +custom Guix channels should therefore no longer extend +@code{rottlog-service-type}. + +The new @code{log-rotation-service-type} builds upon the log rotation service +provided by version 1.0 of the Shepherd. It is more flexible and easier to +use. Run @command{info \"(guix) Log Rotation\"}, for more info. + +Because the new log rotation service depends on Shepherd 1.0 functionality, +you will need to reboot after reconfiguring if you are not running Shepherd +1.0 yet.") + (de "Eine merkliche Änderung betrifft alle Nutzer von Guix System: +Anstelle des Rottlog-Dienstes wird jetzt ein neuer Dienst zur Protokollrotation +benutzt. Des Weiteren gilt @code{rottlog-service-type} jetzt als veraltet und +ersetzt durch @code{log-rotation-service-type}; er wird in sechs Monaten +entfernt werden, wie es Guix’ Richtlinie zu Veraltetem vorsieht. Autoren +von Diensttypen in eigenen Guix-Kanälen sollten daher nicht mehr +@code{rottlog-service-type} erweitern. + +Der neue Diensttyp @code{log-rotation-service-type} baut auf auf dem in Version +1.0 von Shepherd bereitgestellten Protokollrotationsdienst. Er ist +vielseitiger und leichter nutzbar. Führen Sie @command{info \"(guix.de) +Log-Rotation\"} aus, um mehr zu erfahren. + +Weil der neue Protokollrotationsdienst die Funktionalitäten der Version 1.0 von +Shepherd voraussetzt, werden Sie nach dem Rekonfigurieren Ihren Rechner neu +starten müssen, falls auf ihm noch nicht Shepherd 1.0 läuft.") + (fr "Un changement important a eu lieu impactant toute personne +utilisant Guix System : le service Rottlog a été remplacé par le nouveau +service de rotation des journaux. De plus, @code{rottlog-service-type} est +maintenant obsolète, remplacé par @code{log-rotation-service-type}, et sera +retiré d'ici six mois, conformément à la politique d'obsolescence de Guix. +Les auteurices de services dans des canaux Guix tiers sont donc invité·es à ne +plus étendre @code{rottlog-service-type}. + +Le nouveau @code{log-rotation-service-type} repose sur le service de rotation +des journaux fourni par la version 1.0 du Shepherd. Il est plus flexible et +facile à utiliser. Lancer @command{info \"(guix.fr) Rotation des journaux\"} +pour en savoir plus. + +Comme ce nouveau service dépend d'une fonctionnalité de Shepherd 1.0, il +faudra redémarrer après reconfiguration si tu ne fais pas encore tourner +Shepherd 1.0."))) + (entry (commit "1dcd0ded86e341cbfd0567cefde1e71684c0cdba") (title (en "Linux-libre 6.12 now available")) From patchwork Wed Jan 8 17:41:53 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 36765 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 F179927BBE9; Wed, 8 Jan 2025 17:44:10 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=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 C7EFC27BBEA for ; Wed, 8 Jan 2025 17:44:09 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tVa5V-0005f8-BY; Wed, 08 Jan 2025 12:43:26 -0500 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 1tVa5H-0005YE-Ma for guix-patches@gnu.org; Wed, 08 Jan 2025 12:43:12 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tVa5H-0003D4-7v; Wed, 08 Jan 2025 12:43:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=/01dKeoUrsHROvtL/sVduCHj5bO6IO54eFoO8wJpGMY=; b=s1motTdrBse30KiIBqsdXvBYWUH1rT9VzcrZu7L3hrIwL7Z/rgVwb69iwZkow0yq1QgchecewDNCA12cKGDu/Bb1SPe1xHnv+yFjLyh1WTOZAbxELcWmm0BQvqP7IjjB/TnIayXezAZgCrGgrMPMXa7iy2lHLoOpbhVx52qa4DR2Ab87RYvhbo/h2Z+jsTMx+4UdiTMZYSddaIBeCIq2UxpYE/BQWsdjpLhc5uHQUS3Jc7Q3wNillPHcgODxt4Dcd7IaFnqMfvY/BTBQzCmHjZSG23vQwS0/xnLAkBwsk33HO5cQYjzrd/vktZiwnbKHlGQOEgI2H5PNs2hqefKukg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tVa5C-0007tB-EF; Wed, 08 Jan 2025 12:43:06 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74860] [PATCH v2 09/12] home: services: Add log rotation service. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: andrew@trop.in, janneke@gnu.org, ludo@gnu.org, maxim.cournoyer@gmail.com, tanguy@bioneland.org, guix-patches@gnu.org Resent-Date: Wed, 08 Jan 2025 17:43:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74860 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74860@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= , Andrew Tropin , Janneke Nieuwenhuizen , Ludovic =?utf-8?q?Court=C3=A8s?= , Maxim Cournoyer , Tanguy Le Carrour X-Debbugs-Original-Xcc: Andrew Tropin , Janneke Nieuwenhuizen , Ludovic =?utf-8?q?Court=C3=A8s?= , Maxim Cournoyer , Tanguy Le Carrour Received: via spool by 74860-submit@debbugs.gnu.org id=B74860.173635816230186 (code B ref 74860); Wed, 08 Jan 2025 17:43:06 +0000 Received: (at 74860) by debbugs.gnu.org; 8 Jan 2025 17:42:42 +0000 Received: from localhost ([127.0.0.1]:48808 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tVa4n-0007qj-RS for submit@debbugs.gnu.org; Wed, 08 Jan 2025 12:42:42 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35704) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tVa4h-0007ol-NF for 74860@debbugs.gnu.org; Wed, 08 Jan 2025 12:42:36 -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 1tVa4c-0002vF-FG; Wed, 08 Jan 2025 12:42:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=/01dKeoUrsHROvtL/sVduCHj5bO6IO54eFoO8wJpGMY=; b=QBVLlVBHhu0j4+7W7itD u8nfYaHsmoZF71moZJY/Yt5wIxMqWNZYOISdhysVxPdNTK0G+QOnSm2yd0IJ+7irg+b2FmTkUQZPL PrWwBqLwtBeJORl15rHVyvZwhjuseeq1SXTz0jUp5kgarRMVVVtY+RL3k1uvjRsddCah4xvidEYYw zi6ApQM8jKTyr6iXVFxQY6F0ghF/Nzu+lCUfV3f3Yv+ynju2d+AjYCMQQWYQAb7JD5XlQh8Dt0jr6 n/NZi6tRroEyOj9MCIQpCHz8qUtXJ5AinE9v2obmg7ip7QRFhdtVtpTffDnz8Z39BIwiEOE22k7N4 Po62BFzCQdoL0Q==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Wed, 8 Jan 2025 18:41:53 +0100 Message-ID: X-Mailer: git-send-email 2.47.1 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/home/services/admin.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. * doc/guix.texi (Shepherd Home Service): Document it. Change-Id: I37ac171147c236b05d6d3b226e9072ab7524dfe9 --- doc/guix.texi | 15 +++++++++++++++ gnu/home/services/admin.scm | 31 +++++++++++++++++++++++++++++++ gnu/local.mk | 1 + 3 files changed, 47 insertions(+) create mode 100644 gnu/home/services/admin.scm diff --git a/doc/guix.texi b/doc/guix.texi index 8ed5c16dda..d0e53feff2 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -20909,6 +20909,7 @@ Log Rotation be a @code{log-rotation-configuration} record, as discussed below. @end defvar +@anchor{log-rotation-configuration} @c %start of fragment @deftp {Data Type} log-rotation-configuration @@ -47090,6 +47091,20 @@ Shepherd Home Service @end table @end deftp +@cindex log rotation, for user services +The Shepherd also comes with a @dfn{log rotation service}, which +compresses and then deletes old log files produced by services and +daemons that it runs. This service is made available through +@code{home-log-rotation-service-type} as described below. + +@defvar home-log-rotation-service-type +This is the service type for the user Shepherd log rotation service +(@pxref{Log Rotation Service,,, shepherd, The GNU Shepherd Manual}). +Its value must be a @code{log-rotation-configuration} record, exactly as +for its system-wide counterpart. @xref{log-rotation-configuration}, for +its reference. +@end defvar + @node Secure Shell @subsection Secure Shell diff --git a/gnu/home/services/admin.scm b/gnu/home/services/admin.scm new file mode 100644 index 0000000000..1cd398cc51 --- /dev/null +++ b/gnu/home/services/admin.scm @@ -0,0 +1,31 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2024 Ludovic Courtès +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu home services admin) + #:use-module (gnu home services) + #:use-module (gnu services) + #:use-module (gnu services admin) + ;; For the 'home-shepherd-service-type' mapping. + #:use-module (gnu home services shepherd) + #:export (home-log-rotation-service-type) + #:re-export (log-rotation-configuration)) + +(define home-log-rotation-service-type + (service-type + (inherit (system->home-service-type log-rotation-service-type)) + (default-value (for-home (log-rotation-configuration))))) diff --git a/gnu/local.mk b/gnu/local.mk index f118fe4442..e4840fd550 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -100,6 +100,7 @@ GNU_SYSTEM_MODULES = \ %D%/compression.scm \ %D%/home.scm \ %D%/home/services.scm \ + %D%/home/services/admin.scm \ %D%/home/services/desktop.scm \ %D%/home/services/dict.scm \ %D%/home/services/dotfiles.scm \ From patchwork Wed Jan 8 17:41:54 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 36756 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 A0DFB27BBEA; Wed, 8 Jan 2025 17:43:30 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id F32F527BBE2 for ; Wed, 8 Jan 2025 17:43:29 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tVa5N-0005cK-NY; Wed, 08 Jan 2025 12:43:17 -0500 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 1tVa5K-0005a0-Ew for guix-patches@gnu.org; Wed, 08 Jan 2025 12:43:14 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tVa5K-0003Ey-5l; Wed, 08 Jan 2025 12:43:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=hnnDy3lWNrZIGVsrz8TBHsuQcY/7SG6vNFI3BaVYQ5k=; b=RB0bviF7TmLJbGM/muqfFf6ROQDwn38+YOgHnvxi7c6elZssNOi5MsuKJi7usnJFb7svG7tWhzjEegXAh7djtMeQYlsjpGychvg2t+5p/p6h0rrqgdsa+tybkx7lAwHQVIHuVdSUfsSGR71g7TJlvvXA36/ESO68MUHzl9sXKBvQdTjxWgmVUWlsbIADZ38ZfZO6Gm6C5+FQjIsMnIca+ToUqmxJDidbS4JjoD31m2xnvnMCJqNhopeShG9GFyvATkbNp6yDaHlfG08TsYIMlLHCde2J33ueKmJ3i7LSs5t9Q5DOCUevMaS2pKmhivsDwfeE5RVU/equ24qOWHap/w==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tVa5C-0007tH-W0; Wed, 08 Jan 2025 12:43:07 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74860] [PATCH v2 10/12] home: Define =?utf-8?b?4oCYJWJhc2Ut?= =?utf-8?b?aG9tZS1zZXJ2aWNlc+KAmS4=?= Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: andrew@trop.in, guix@cbaines.net, janneke@gnu.org, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, maxim.cournoyer@gmail.com, zimon.toutoune@gmail.com, tanguy@bioneland.org, me@tobias.gr, guix-patches@gnu.org Resent-Date: Wed, 08 Jan 2025 17:43:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74860 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74860@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= , Andrew Tropin , Christopher Baines , Janneke Nieuwenhuizen , Josselin Poiret , Ludovic =?utf-8?q?Court=C3=A8s?= , Mathieu Othacehe , Maxim Cournoyer , Simon Tournier , Tanguy Le Carrour , Tobias Geerinckx-Rice X-Debbugs-Original-Xcc: Andrew Tropin , Christopher Baines , Janneke Nieuwenhuizen , Josselin Poiret , Ludovic =?utf-8?q?Court=C3=A8s?= , Mathieu Othacehe , Maxim Cournoyer , Simon Tournier , Tanguy Le Carrour , Tobias Geerinckx-Rice Received: via spool by 74860-submit@debbugs.gnu.org id=B74860.173635817330213 (code B ref 74860); Wed, 08 Jan 2025 17:43:06 +0000 Received: (at 74860) by debbugs.gnu.org; 8 Jan 2025 17:42:53 +0000 Received: from localhost ([127.0.0.1]:48810 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tVa4y-0007rD-Bf for submit@debbugs.gnu.org; Wed, 08 Jan 2025 12:42:52 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35710) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tVa4i-0007p0-T3 for 74860@debbugs.gnu.org; Wed, 08 Jan 2025 12:42:37 -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 1tVa4d-0002vQ-Kd; Wed, 08 Jan 2025 12:42:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=hnnDy3lWNrZIGVsrz8TBHsuQcY/7SG6vNFI3BaVYQ5k=; b=k+xa/qYKyz58dsqULlBi Jvkv/7x77ieMRLT6/oAKvKTiLbKsCoxActWCQ2Q8D8N6yVY4R5QXJYkTaYtN3K/SMYexZRJwvF1Ux Gmjv6aKTH7JtVKcDh9vxGEjp/ThfnkcJ8DmTa5m8mu1FgZZ1dNBZOMAPB3uzHniah8+pAxVAtgc9l F6O9WY951fGAR8ehqhj4Cp5yzonRIMTjjP1PenIwgxu/UZ35s0ypIB8C8V5V18B2ivls6qvgJsUJY 0SFmfkLfhRVekdw533RSt2oAmemJ6az0kGF66H3xLYKh4HQ13L11FjLD5uqRtrQruhRe6vAXgqJAS IqGQ9M36Y/gS9g==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Wed, 8 Jan 2025 18:41:54 +0100 Message-ID: X-Mailer: git-send-email 2.47.1 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/home.scm (%base-home-services): New variable. ()[services]: Change default to ‘%base-home-services’. * guix/scripts/home/import.scm (manifest+configuration-files->code): Use ‘%base-home-services’ by default. * tests/home-import.scm (match-home-environment-no-services) (match-home-environment-transformations) (match-home-environment-no-services-nor-packages) (match-home-environment-bash-service) (match-home-environment-bash-service-with-alias): Adjust accordingly. * doc/he-config-bare-bones.scm: Use ‘%base-home-services’. * doc/guix.texi (Declaring the Home Environment): Add index entry for ‘%base-home-services’. Change-Id: Id95ede62b97a976aad138bfc4b63fc0bdf37c7de --- doc/guix.texi | 1 + doc/he-config-bare-bones.scm | 27 ++++++++++++------------ gnu/home.scm | 11 ++++++++-- guix/scripts/home/import.scm | 8 +++++--- tests/home-import.scm | 40 +++++++++++++++++++----------------- 5 files changed, 50 insertions(+), 37 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index d0e53feff2..9360cdb35c 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -46066,6 +46066,7 @@ Declaring the Home Environment @end quotation @findex home-environment +@vindex %base-home-services @lisp @include he-config-bare-bones.scm @end lisp diff --git a/doc/he-config-bare-bones.scm b/doc/he-config-bare-bones.scm index f948d85277..844d666110 100644 --- a/doc/he-config-bare-bones.scm +++ b/doc/he-config-bare-bones.scm @@ -7,19 +7,20 @@ (home-environment - (packages (list htop)) - (services - (list - (service home-bash-service-type - (home-bash-configuration - (guix-defaults? #t) - (bash-profile (list (plain-file "bash-profile" "\ + (packages (list htop)) + (services + (append (list + (service home-bash-service-type + (home-bash-configuration + (guix-defaults? #t) + (bash-profile (list (plain-file "bash-profile" "\ export HISTFILE=$XDG_CACHE_HOME/.bash_history"))))) - (simple-service 'test-config - home-xdg-configuration-files-service-type - (list `("test.conf" - ,(plain-file "tmp-file.txt" - "the content of - ~/.config/test.conf"))))))) + (simple-service 'test-config + home-xdg-configuration-files-service-type + (list `("test.conf" + ,(plain-file "tmp-file.txt" + "the content of + ~/.config/test.conf"))))) + %base-home-services))) diff --git a/gnu/home.scm b/gnu/home.scm index b390c8d534..042d2e67de 100644 --- a/gnu/home.scm +++ b/gnu/home.scm @@ -23,6 +23,7 @@ (define-module (gnu home) #:use-module (gnu home services shells) #:use-module (gnu home services xdg) #:use-module (gnu home services fontutils) + #:use-module (gnu home services admin) #:use-module (gnu services) #:use-module (guix records) #:use-module (guix diagnostics) @@ -43,7 +44,9 @@ (define-module (gnu home) home-environment-with-provenance - home-generation-base)) + home-generation-base + + %base-home-services)) ;;; Comment: ;;; @@ -67,7 +70,7 @@ (define-record-type* home-environment this-home-environment))) (services home-environment-user-services - (default '()) + (default %base-home-services) (sanitize validate-service-list)) (location home-environment-location ; @@ -75,6 +78,10 @@ (define-record-type* home-environment source-properties->location)) (innate))) +(define %base-home-services + ;; Non-essential but useful services to have by default. + '()) + (define (home-environment-default-essential-services he) "Return the list of essential services for home environment." (list diff --git a/guix/scripts/home/import.scm b/guix/scripts/home/import.scm index fd263c0699..15b4bc9798 100644 --- a/guix/scripts/home/import.scm +++ b/guix/scripts/home/import.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2021 Xinglu Chen ;;; Copyright © 2021 Andrew Tropin -;;; Copyright © 2021-2022 Ludovic Courtès +;;; Copyright © 2021-2022, 2024 Ludovic Courtès ;;; Copyright © 2022 Arjan Adriaanse ;;; Copyright © 2022 Antero Mejr ;;; @@ -160,7 +160,8 @@ (define (manifest+configuration-files->code manifest (home-environment (packages ,packages) - (services (list ,@services))))))) + (services (append (list ,@services) + %base-home-services))))))) (('begin ('specifications->manifest packages)) (match (configurations+modules configuration-directory) (((services . modules) ...) @@ -183,7 +184,8 @@ (define (manifest+configuration-files->code manifest ,(comment (G_ "\ ;; Below is the list of Home services. To search for available ;; services, run 'guix home search KEYWORD' in a terminal.\n")) - (services (list ,@services))))))))) + (services (append (list ,@services) + %base-home-services))))))))) (define* (import-manifest manifest destination-directory diff --git a/tests/home-import.scm b/tests/home-import.scm index 04b7b76156..57a3d62a72 100644 --- a/tests/home-import.scm +++ b/tests/home-import.scm @@ -115,7 +115,7 @@ (define-home-environment-matcher match-home-environment-no-services ('specifications->packages ('list "guile@2.0.9" "gcc:lib" "glibc@2.19"))) ('services - ('list))))) + ('append ('list) '%base-home-services))))) (define-home-environment-matcher match-home-environment-transformations ('begin @@ -131,7 +131,7 @@ (define-home-environment-matcher match-home-environment-transformations ('list (transform ('specification->package "guile@2.0.9")) ('list ('specification->package "gcc") "lib") ('specification->package "glibc@2.19"))) - ('services ('list))))) + ('services ('append ('list) '%base-home-services))))) (define-home-environment-matcher match-home-environment-no-services-nor-packages ('begin @@ -143,7 +143,7 @@ (define-home-environment-matcher match-home-environment-no-services-nor-packages ('packages ('specifications->packages ('list))) ('services - ('list))))) + ('append ('list) '%base-home-services))))) (define-home-environment-matcher match-home-environment-bash-service ('begin @@ -157,13 +157,14 @@ (define-home-environment-matcher match-home-environment-bash-service ('packages ('specifications->packages ('list))) ('services - ('list ('service - 'home-bash-service-type - ('home-bash-configuration - ('aliases ('quote ())) - ('bashrc - ('list ('local-file "/tmp/guix-config/.bashrc" - "bashrc")))))))))) + (append ('list ('service + 'home-bash-service-type + ('home-bash-configuration + ('aliases ('quote ())) + ('bashrc + ('list ('local-file "/tmp/guix-config/.bashrc" + "bashrc")))))) + '%base-home-services))))) (define-home-environment-matcher match-home-environment-bash-service-with-alias ('begin @@ -177,15 +178,16 @@ (define-home-environment-matcher match-home-environment-bash-service-with-alias ('packages ('specifications->packages ('list))) ('services - ('list ('service - 'home-bash-service-type - ('home-bash-configuration - ('aliases - ('quote (("grep" . "grep --exclude-from=\"$HOME/.grep-exclude\"") - ("ls" . "ls -p")))) - ('bashrc - ('list ('local-file "/tmp/guix-config/.bashrc" - "bashrc")))))))))) + ('append ('list ('service + 'home-bash-service-type + ('home-bash-configuration + ('aliases + ('quote (("grep" . "grep --exclude-from=\"$HOME/.grep-exclude\"") + ("ls" . "ls -p")))) + ('bashrc + ('list ('local-file "/tmp/guix-config/.bashrc" + "bashrc")))))) + '%base-home-services))))) (test-assert "manifest->code: No services" From patchwork Wed Jan 8 17:41:55 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 36764 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 04BE327BBEA; Wed, 8 Jan 2025 17:44:08 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=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 BF42227BBE2 for ; Wed, 8 Jan 2025 17:44:07 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tVa5M-0005bR-5e; Wed, 08 Jan 2025 12:43:16 -0500 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 1tVa5H-0005YD-MX for guix-patches@gnu.org; Wed, 08 Jan 2025 12:43:12 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tVa5H-0003D3-7n; Wed, 08 Jan 2025 12:43:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=fofas6T9j0bzmdK9uIoODNVl7EL6wiaxylG8u5zUAsU=; b=qyde/xMbJLAD96htcnRlh8HyN6z9rp4Q+fq975ybCDlvZrldgTSyQMJL07P4NGWmVbkiHPXJki8vTA5qiKYjbeDtk3RUNXu1d1OGmv2MknYRRhUROrVJgdYADmredgnVX5qxe5eo0ZZd15Hm+oD8Re5a7+jXdtIEaPXhnYNl42iejW7DuUSwNeQWFwTdJSKHgET1Sk1U9Qjvh6CWGMMmGlFwGD9tLF9O5+8JJbA/kYL+WIITAZrTDUtabamqHKNAjNLmfi7FHQJo5NRb0JWTdvotBSMtF7WLfShKzJmmET1cP1lwo4aOlrb58/rKJGVU/vyMAvqt8e5EAZaLavnS/A==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tVa5D-0007tS-H4; Wed, 08 Jan 2025 12:43:07 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74860] [PATCH v2 11/12] home: Add log rotation to =?utf-8?b?4oCYJWJhc2UtaG9tZS1zZXJ2aWNlc+KAmS4=?= Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: andrew@trop.in, janneke@gnu.org, ludo@gnu.org, maxim.cournoyer@gmail.com, tanguy@bioneland.org, guix-patches@gnu.org Resent-Date: Wed, 08 Jan 2025 17:43:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74860 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74860@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= , Andrew Tropin , Janneke Nieuwenhuizen , Ludovic =?utf-8?q?Court=C3=A8s?= , Maxim Cournoyer , Tanguy Le Carrour X-Debbugs-Original-Xcc: Andrew Tropin , Janneke Nieuwenhuizen , Ludovic =?utf-8?q?Court=C3=A8s?= , Maxim Cournoyer , Tanguy Le Carrour Received: via spool by 74860-submit@debbugs.gnu.org id=B74860.173635817330220 (code B ref 74860); Wed, 08 Jan 2025 17:43:07 +0000 Received: (at 74860) by debbugs.gnu.org; 8 Jan 2025 17:42:53 +0000 Received: from localhost ([127.0.0.1]:48812 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tVa4z-0007rG-1Y for submit@debbugs.gnu.org; Wed, 08 Jan 2025 12:42:53 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35720) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tVa4k-0007pC-3P for 74860@debbugs.gnu.org; Wed, 08 Jan 2025 12:42:38 -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 1tVa4e-0002vl-R0; Wed, 08 Jan 2025 12:42:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=fofas6T9j0bzmdK9uIoODNVl7EL6wiaxylG8u5zUAsU=; b=IpNhSLacx4Fizy5eE2Rd G6Ae7UaiULrFnyodTxMQoBGZTk34Fh4W0uMzGT5713Y2Qm2XLkT4hAqUK2sonaZYvzfyz64Ac7eqC ak8fsrb+W+HF9zaG3fuhH2+g+2Mj+kfiL9kcmOKQac+AZ6i0GrtdGbiHvTdA6cM7VWRV0lSuPMxwx CIYusZYzqysAEdyeUeoqImCTNo82+Lu6GvFDCoE5OYtk14ZxpW1ISx4P+ErYyajd+JwD8cG4fgX6a 0+PyhnqJGe+mRg5GCXY88wEmYRVYXrQ4JuMVDWqq4FRyBLL/82UVvcsZflFEeEJZL8rm5HgjyZv4Y w0tYLl98/MpcAA==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Wed, 8 Jan 2025 18:41:55 +0100 Message-ID: <17d83e2c3c8a686db5c7ef941933d746563551c5.1736357738.git.ludo@gnu.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/home.scm (%base-home-services): Add instance of ‘home-log-rotation-service-type’. * doc/guix.texi (Shepherd Home Service): Document it. Change-Id: I00a98da100e3a07fe409f3c44d8ab88e743a8e3e --- doc/guix.texi | 2 ++ gnu/home.scm | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/guix.texi b/doc/guix.texi index 9360cdb35c..35fc7b594c 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -47104,6 +47104,8 @@ Shepherd Home Service Its value must be a @code{log-rotation-configuration} record, exactly as for its system-wide counterpart. @xref{log-rotation-configuration}, for its reference. + +This service is part of @code{%base-home-services}. @end defvar @node Secure Shell diff --git a/gnu/home.scm b/gnu/home.scm index 042d2e67de..3b479f64f9 100644 --- a/gnu/home.scm +++ b/gnu/home.scm @@ -80,7 +80,7 @@ (define-record-type* home-environment (define %base-home-services ;; Non-essential but useful services to have by default. - '()) + (list (service home-log-rotation-service-type))) (define (home-environment-default-essential-services he) "Return the list of essential services for home environment." From patchwork Wed Jan 8 17:41:56 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 36763 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 7AD2927BBEA; Wed, 8 Jan 2025 17:43:59 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=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 4046127BBE2 for ; Wed, 8 Jan 2025 17:43:59 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tVa5L-0005at-3q; Wed, 08 Jan 2025 12:43:15 -0500 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 1tVa5E-0005Wj-FT for guix-patches@gnu.org; Wed, 08 Jan 2025 12:43:08 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tVa5E-0003BY-5Y for guix-patches@gnu.org; Wed, 08 Jan 2025 12:43:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=SC4yLvwYlaMSYZGAIB5AJGPo3JUUH3XvRS5cswC7B/M=; b=m/6ln7xv5ApIDuUrf+krlQ0P3vGcTMRmgCO+t1KzfeGZr0L+kaxVokmetAiE3sD+q7QIr/tLm49s56GpvZjdb0PhZLIL3lQZr97SA8ijsSmYkjDq5rj0UMk93rz78UDFRoNIw2a17lGrOsG7eGjeKTr7yJaFOgkp3dKPmaRBI8likJoChiSQcveKLwiUUNVkNdRCEAtIfnSmNvHKF/cMHMzEPF+6OWNnyO8qE4i7riZ2L2DnSLHIe5sEDyHCh1edxDpFzAM9E7zhxVQEgmWvBVn+oNgvOYApn+lElaA339kKD7FqJx7j0F9KUfcgUbNomYIrD4uGUFeNvuXvmlhfiA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tVa5E-0007tc-1Z; Wed, 08 Jan 2025 12:43:08 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74860] [PATCH v2 12/12] DRAFT news: Add entry for =?utf-8?b?4oCYJWJhc2UtaG9tZS1zZXJ2aWNlc+KAmS4=?= Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: pelzflorian@pelzflorian.de, julien@lepiller.eu, guix-patches@gnu.org Resent-Date: Wed, 08 Jan 2025 17:43:08 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74860 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74860@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= , Florian Pelz , Julien Lepiller X-Debbugs-Original-Xcc: Florian Pelz , Julien Lepiller Received: via spool by 74860-submit@debbugs.gnu.org id=B74860.173635817330228 (code B ref 74860); Wed, 08 Jan 2025 17:43:08 +0000 Received: (at 74860) by debbugs.gnu.org; 8 Jan 2025 17:42:53 +0000 Received: from localhost ([127.0.0.1]:48814 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tVa4z-0007rN-Co for submit@debbugs.gnu.org; Wed, 08 Jan 2025 12:42:53 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35722) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tVa4l-0007pP-Dx for 74860@debbugs.gnu.org; Wed, 08 Jan 2025 12:42:39 -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 1tVa4g-0002wH-5g; Wed, 08 Jan 2025 12:42:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=SC4yLvwYlaMSYZGAIB5AJGPo3JUUH3XvRS5cswC7B/M=; b=lvhRXGbmSEWBIEzgyZXF pfBy1GokC2bg1oo/M4Zt1dULkVlRtYdg7YrgKeEQ0bghLO3hQJQxCi7MOFKdIGYy1SnPsOCmXVUNd 4JstxDK10+v2YoB4XqEEM8StC3E9hkZySWMIc3y0R36RId6JIQewliA0dIPT2VVghj8IlewSk/Wyc bkZ3J2my9kzwxgcPkqXoptVX3PqMhClSpZHe0LniFGe78cOxsAXhPskj6noZSuVE3Ls6TyXCBj4E8 zzP3zQan/4/Qz2wSqQKBB9YEn9hZns4ZtmTJ7udZBfZ3ivawxJ4unMNEMPVKVrDmvVAS5UOWyj3xr fDAwJYKaXIWXOw==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Wed, 8 Jan 2025 18:41:56 +0100 Message-ID: <496087c2add2b319e843adc064587a07978b21d4.1736357738.git.ludo@gnu.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * etc/news.scm: Add entry. Change-Id: I77b73ab870116004bfe66d86a28532af3e5447aa --- etc/news.scm | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/etc/news.scm b/etc/news.scm index 677cd12847..43a0cde32e 100644 --- a/etc/news.scm +++ b/etc/news.scm @@ -35,6 +35,27 @@ (channel-news (version 0) + (entry (commit "FIXME") + (title + (en "New @code{%base-home-services} variable for Guix Home")) + (body + (en "If you are using Guix Home, we recommend you update your +configuration to include @code{%base-home-services}, a list of non-essential +services deemed generally useful (this is comparable to @code{%base-services} +in Guix System). That is, your Home configuration should now look like this: + +@lisp +(home-environment + ;; fields omitted @dots{} + (services (append (list @dots{}) %base-home-services))) +@end lisp + +The dots above should be replaced by your own list of services, as it +currently appears in your @code{home-environment} declaration. + +Currently, @code{%base-home-services} contains only one service: the new log +rotation service provided by version 1.0 of the Shepherd."))) + (entry (commit "FIXME") (title (en "Rottlog service replaced by new log rotation service")