From patchwork Wed Jan 8 21:51:49 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: 36785 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 12EF127BBEB; Wed, 8 Jan 2025 21:54:07 +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 D0F8627BBEA for ; Wed, 8 Jan 2025 21:54:06 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tVdz7-0002ee-LF; Wed, 08 Jan 2025 16:53:05 -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 1tVdz6-0002Ro-3l for guix-patches@gnu.org; Wed, 08 Jan 2025 16:53: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 1tVdz5-00047V-Pt for guix-patches@gnu.org; Wed, 08 Jan 2025 16:53: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=tbOmsPNSDFREGQ5/l6TEyrp3gWEg96vZzh/U56BJ65sfJQG6EyMlQhXmGiz1pPFUg2RF/UgjqK8QimQNdy+87W4EBPd5qlJDAddYnp8Ei/OvP2oCkgQva9/lkwMsKj6ELbDnMn6/lYy9JcrJrOYUTf8cNJZMFgj5MAOzkPHBFGsERtGx559S8iXo2/4tztGPVXancNu7Cl4eG85wGCUKb3Co0zgPXY7YcKkf+kkRiuQ6xnNwNluNwiu6ILrlLoIC0CgaIq0rsbSJK7e8NBW7hEUlCgw17662HGYb0vjGEPuYFOCnZDBMZat3Zm3YRvqc2yre5/lQyE9wDGtfhTRMuQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tVdz4-0005Tn-E4; Wed, 08 Jan 2025 16:53:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74860] [PATCH v3 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 21:53: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?= , Sharlatan Hellseher X-Debbugs-Original-Xcc: Sharlatan Hellseher Received: via spool by 74860-submit@debbugs.gnu.org id=B74860.173637318121037 (code B ref 74860); Wed, 08 Jan 2025 21:53:02 +0000 Received: (at 74860) by debbugs.gnu.org; 8 Jan 2025 21:53:01 +0000 Received: from localhost ([127.0.0.1]:49278 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tVdz2-0005T5-A3 for submit@debbugs.gnu.org; Wed, 08 Jan 2025 16:53:00 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37954) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tVdyz-0005ST-21 for 74860@debbugs.gnu.org; Wed, 08 Jan 2025 16:52:58 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tVdyt-00044t-M7; Wed, 08 Jan 2025 16:52:51 -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=CVnecepTeoJLYTfkJuBw uDiwlPYpeJKG4nepikdcKvpTL4DTNXXF6yPnjtppjmc20QXxw3swO5Td+YzuQz1F4oiwOtcJacA7d fLj3WKx+IpgyYQbmDo2jdy0VZH8ndJCJPtGIAlw1r46YIXruuFQiOEd0rNK3C2SIYS4cRDUrkRWkq cfIksn54jgqHVnZ7nk50hiSWR+HfOghRrVWMnFoTTpVOAFEHPFVnm6x2zii9nNNQTneKAGMXOvvTU v9B8SjJlXz7AI1Bfs5v3MAsUFW5lZ4jlD5iz7X2puOH/9fCvNWIL7if3rBXBLYK3ci3m1x+eJsHx3 kjbLTyMMv1pNfw==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Wed, 8 Jan 2025 22:51:49 +0100 Message-ID: <51f23b8ff77f5426f5fa8d8355cc3061898b6614.1736373022.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 21:51: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: 36784 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 CE33027BBEA; Wed, 8 Jan 2025 21:53:44 +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 2B8C427BBE2 for ; Wed, 8 Jan 2025 21:53:43 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tVdz8-0002iJ-Jm; Wed, 08 Jan 2025 16:53:07 -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 1tVdz6-0002TM-BC for guix-patches@gnu.org; Wed, 08 Jan 2025 16:53: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 1tVdz6-000483-0e for guix-patches@gnu.org; Wed, 08 Jan 2025 16:53: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=PizxbUrpY2ib030KWzLZ7zo+S+J+DjfbBuZNmetvRWg=; b=H3O1WMoNjxwjn6HZzh4MzIHdivF2vASlupnNtqQi+oflzXC99sdC0oJ+4StOm5ajGdrWGO6W3kSmdjqxO+xpqUDubT8ajJHbBcOTwr3BY4nIm1axzkvVtzEM7CqUDJ/oYkNjDdsw7KfRzBznLGxftyKKznewDabMtR32oYq7yV/LC6SJ0rZc66PlS3By+7jwbDai8kadYBuOId+3aIyg5Nnyx96xo+OPlAj9WHDmH9zwrUixcj69/bgUZbWU7mx+Erg95SDWcW2NuH3yX0PI11ngpJqr07s1HVzXuy8x/qTJvwKONieYPzMh5aJdIgxsB5YjJCw+6tw2Bb+a9MDW7w==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tVdz5-0005U4-QX for guix-patches@gnu.org; Wed, 08 Jan 2025 16:53:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74860] [PATCH v3 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 21:53: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?= Received: via spool by 74860-submit@debbugs.gnu.org id=B74860.173637318221063 (code B ref 74860); Wed, 08 Jan 2025 21:53:03 +0000 Received: (at 74860) by debbugs.gnu.org; 8 Jan 2025 21:53:02 +0000 Received: from localhost ([127.0.0.1]:49284 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tVdz3-0005TQ-Bd for submit@debbugs.gnu.org; Wed, 08 Jan 2025 16:53:01 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37956) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tVdz0-0005SW-5i for 74860@debbugs.gnu.org; Wed, 08 Jan 2025 16:52:59 -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 1tVdyu-00045B-NK; Wed, 08 Jan 2025 16:52:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=PizxbUrpY2ib030KWzLZ7zo+S+J+DjfbBuZNmetvRWg=; b=ZiLrj1NL/QRYbgxTi2WH hCY3LTazn0AEWRf/yP/gJR5mkcBgzQ3D891VB0UTVZVDDplT2sbS1sNXMdCGRPXGM39UpqNDIbgmA mtIc2/BbUId3RljnQKcTMjpJdwn2jc4NVcmxeh5POF+0zaWQOcYXJ7BFCKAEH5W6lQdsVezEKrvPb ZTA6DvlPTDkOT8dupfL/hrW8Gp9jDzJFeBQ41dtrpZenBe8n9CWtqk3WbV2hc/+Fffa0s/aXvR6Lw MlPhHbJE02txe5gs7UlOawSd7pTvdFFc136/+ugP5f8skQdU5skY0Swqiz/01QW/s6ndrxRtE69Wc 5YujvX08m+aw0g==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Wed, 8 Jan 2025 22:51:50 +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 21:51:51 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: 36787 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 942DA27BBE9; Wed, 8 Jan 2025 21:54:21 +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 7D8A327BBE2 for ; Wed, 8 Jan 2025 21:54:20 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tVe0G-0000Vx-Al; Wed, 08 Jan 2025 16:54: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 1tVe02-0008VV-Qv for guix-patches@gnu.org; Wed, 08 Jan 2025 16:54: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 1tVe02-0004GC-Hf; Wed, 08 Jan 2025 16:54: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=Laf33kyswaXFBPb6jed6TOukZ6/HqKIdR+p2dgqVirI=; b=EjORAMEVZUWd0HUwslqCFCuAAiAxRZPNnrImbEjRtaKFo62u5B1FM2WMNGvu0z8sImOBJGMRa/j7628pCvDkrx0bbEemDRx959sK+K8Llv+oaGxRS0mev6EqRdIhnVRGnTak4bu99bXItZk0pZZiWButqKklYkF27ZWLyJwRxyIpf+lDzxyzTwko63LArbCVXcY7+VO4spUKBqT7SPLbtFUoJo+/3ywz77cgvvSAfF3pCQPbbWlQH7GkBceK/iRBGcSLQqEomr+3srIiVGZWYcdjP8NOb9/3ZjDtORKrX8NPysVn1DS9vgHTUxloxjcDET4PCrAi6GFtlBMT+LKo7g==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tVe02-0005XQ-DD; Wed, 08 Jan 2025 16:54:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74860] [PATCH v3 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 21:54: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?= , 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.173637318921151 (code B ref 74860); Wed, 08 Jan 2025 21:54:02 +0000 Received: (at 74860) by debbugs.gnu.org; 8 Jan 2025 21:53:09 +0000 Received: from localhost ([127.0.0.1]:49304 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tVdzA-0005Ur-1J for submit@debbugs.gnu.org; Wed, 08 Jan 2025 16:53:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37962) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tVdz1-0005SY-4o for 74860@debbugs.gnu.org; Wed, 08 Jan 2025 16:53:00 -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 1tVdyv-00045M-LZ; Wed, 08 Jan 2025 16:52:53 -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=g+qsZy9C6k0Nu2Od8HwW vnD1WiNCD5Dd0vdzIEYS5HL6qFe47UYBYqTvWsq8ICBapQsz0fwgsN85RyvVjlN/AL8opZsJeVbWO /7KpMYw9nDvPF+mlWp7EuA/ilzjoVUfd2fsaMdaV5po5YW1hXU99yywoNQ9u79Jrt7Ws62D8f8X1f Jy4Yt8WuXAUHYdXE8c8kk2EdCdLrZObdKLqHbTbzN24vekuAPOVwJOX1eLv+T/JeUqEX7HZwzIISk r10KsJGx2fW9Fh2UTXN5u2/5oV//v1GPrKoWnd3jpD7TKrYIqhdrdbWA9wxzASIjlNj2sTDNQdoXn wwUiWTWU9n3jag==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Wed, 8 Jan 2025 22:51:51 +0100 Message-ID: <3c927596ee81d985d925c8b72bf4a3f33336b457.1736373022.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 21:51: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: 36786 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 4258527BBEA; Wed, 8 Jan 2025 21:54:16 +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 0957827BBE2 for ; Wed, 8 Jan 2025 21:54:16 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tVe09-00008G-J9; Wed, 08 Jan 2025 16:54:12 -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 1tVe02-0008UR-81 for guix-patches@gnu.org; Wed, 08 Jan 2025 16:54:02 -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 1tVe01-0004Fz-Uh; Wed, 08 Jan 2025 16:54:01 -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=vktHOrUFmYU5VQn+O1oQWfz4gABB+YOWC2QmwHGnkiRsBahMJmBglNKrffh7Xg5ocgxJBHsxMyY9kDri+5w6JGS4NvFk6wONdWfe5bi3C4JbMkyLYEXQyoBleDhWIEG/BeREsILjJsoUI84bxpVieJcvBG0apvgLH7oDsxHPwwCssEvnV162BMxcB2LiomfLj4OSNJ8kyGv8iFh4s5jERcyrBKPhnOJacRYlnAg8JeT6UJHxdy0Y9i3jrlTqJL25jYZX7Yjo01uvRQVrmEQRKPIMgRD/sjvNH4eNq/Ovj7o/gMPLD/SLfTs2J3MJpaZsP7mw3vPkCEWMOzR+73IJGg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tVe01-0005XI-PM; Wed, 08 Jan 2025 16:54:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74860] [PATCH v3 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 21:54:01 +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.173637318821137 (code B ref 74860); Wed, 08 Jan 2025 21:54:01 +0000 Received: (at 74860) by debbugs.gnu.org; 8 Jan 2025 21:53:08 +0000 Received: from localhost ([127.0.0.1]:49300 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tVdz9-0005Ue-37 for submit@debbugs.gnu.org; Wed, 08 Jan 2025 16:53:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37976) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tVdz1-0005SZ-QL for 74860@debbugs.gnu.org; Wed, 08 Jan 2025 16:53:00 -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 1tVdyw-00045h-Hl; Wed, 08 Jan 2025 16:52:54 -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=CYrighEuEMRi+UHB3bAc +212R/pjMsbSyvQivGlqELlMAQe3zhjGLmzkuRk/PVmrF7CgR2CSIuGs/BYUB3KMh5nzXrqrt60KV BRwQQHNqx0yOL3DKZG2YpEoLd1VQt05GydBW3qkqUe57ZeumAylwF7YOVEEAZyX6VEW7xSBJCDPSx qtsI+I3Tpjqu/hleWDn9SWU1P77s4ZfWJy5tg5xp6GtiUrDjdF+9iG9zK5Oy8K2RmLzicJqnUfI2F v6oQYMw06U1bGk5Jew/GVpoxPKe0Vh5yr//3uj7Ii2uGvGBWZeS+qhbu74cf5PcjIyAX1G5lsommA JCSKAOeWJRM/zw==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Wed, 8 Jan 2025 22:51:52 +0100 Message-ID: <788340be0f08a348de1e1dcbd908019e24f465cf.1736373022.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 21:51: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: 36793 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 3C4F127BBE2; Wed, 8 Jan 2025 21:54:41 +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 87CFB27BBE2 for ; Wed, 8 Jan 2025 21:54:40 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tVe0U-0000yT-SJ; Wed, 08 Jan 2025 16:54:30 -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 1tVe03-0008WI-AD for guix-patches@gnu.org; Wed, 08 Jan 2025 16:54: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 1tVe03-0004GK-14; Wed, 08 Jan 2025 16:54: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=dmVHySpjvJXWXi9jrxBVmLaf9JxKKQwLsN5EnAypjdI=; b=JsehYc8Le/OCl+YDbwvc3J2s88REqCl78cQ5qE2yLprhNkXPAQFL9NTkEX1I+RX4OQl96C34sidGVLGrQyBzz7id/ZgiOHIIRAvcEnOmly7tVZgDrJsOJ6kBnHGzGiQB+tWBvg+msTvTF+p+IdioM0qu7RXxdQsDpZBkuJPwC6Uto67p2J1vtI5rE+roLUx0Em5AY2PZDdmlP9aUy56kqVRpq9vozQe276f1cPSvOAqzImQWr4c/dwU6AGA2FzY2mU9sTSDF2t3uAoTV97ah8NV95gigc3RGhhjlOgSvXJuDh3UlOm+1pUCNrDEmL6VhXafwPEbAW9rWdFbHJxqK7Q==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tVe02-0005XZ-T9; Wed, 08 Jan 2025 16:54:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74860] [PATCH v3 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 21:54: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?= , 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.173637319021163 (code B ref 74860); Wed, 08 Jan 2025 21:54:02 +0000 Received: (at 74860) by debbugs.gnu.org; 8 Jan 2025 21:53:10 +0000 Received: from localhost ([127.0.0.1]:49308 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tVdzB-0005V5-Hj for submit@debbugs.gnu.org; Wed, 08 Jan 2025 16:53:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37980) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tVdz2-0005Sb-Rp for 74860@debbugs.gnu.org; Wed, 08 Jan 2025 16:53:01 -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 1tVdyx-00045x-H5; Wed, 08 Jan 2025 16:52:55 -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=nwgz6807aQ12xT9uD5Ml RppmTcukcRBaLx0DVadn88aOe/hd3RKa5n8O8oDdJsUirXzVb8I/Rkxuw2JYxJaG7FW+WpcBBAWkp snRpzX6EmEDmLsraYdUFh7Jkaqgu8lXlOPepVgG3MhR8/F2m5kZfW9iVHV0LvXArf6X5latUt+r4T QhJZiL1jMBoGbm0qd53rn8JBOhMiW8qSTp+9lRzZdX3d6Vy/21hdRPZpuC9WCjUtatktiCv+5AwRi e7q4EoIF8CaxzkqvGaJwlzZ4UkF12f1EEPgU9Zo81TwO9Xd/QGJVCDgGqBrXuhcVyOL5PNXbFaC9H YEdsELYT5kS1Ag==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Wed, 8 Jan 2025 22:51:53 +0100 Message-ID: <564285438f6fa9498d1ecdcc9a7b0d00453651cf.1736373022.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 21:51: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: 36789 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 E818627BBEA; Wed, 8 Jan 2025 21:54:34 +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 903C127BBE2 for ; Wed, 8 Jan 2025 21:54:32 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tVe0K-0000c9-QT; Wed, 08 Jan 2025 16:54:21 -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 1tVe04-00006Z-OL for guix-patches@gnu.org; Wed, 08 Jan 2025 16:54: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 1tVe04-0004Gl-FA; Wed, 08 Jan 2025 16:54: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=eVlTO9deNtYxCPKsr7SVFRt5188WSjSbnfVGHleXeVY=; b=aniSGjbUEjDFsDtCTCBf5m8zjNom++4N/gy5ceKb3VFhv8jLEqVZ0cKjLuwuqBLo661elmwAW5BCrioBVvz4Sis/uY2JPi9ZyYTt1JT3zH9bdwWAltx4HxqBBSb53+CTP+fW+xLw+83Xc+hJxORkHGaZ3FYCJHU20yBL7BMMgXZpumi0UkagTnk377w6oNs/s+HSpgzUlBx2w8tuLd6VSSihcxkhlk52lfZuwU9mPhhb51JCsEFvZ43NbdX7NdVHBxu9Hk9DKxVxgetI1lkv7TK4dlUOZmSh0Vxa1ZhnFkVCnsG6uBPMUfBpw5FkMTOH/Yn95qicIFm+4hoICjr6HQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tVe04-0005Y0-A2; Wed, 08 Jan 2025 16:54:04 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74860] [PATCH v3 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 21:54: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.173637319721196 (code B ref 74860); Wed, 08 Jan 2025 21:54:04 +0000 Received: (at 74860) by debbugs.gnu.org; 8 Jan 2025 21:53:17 +0000 Received: from localhost ([127.0.0.1]:49316 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tVdzH-0005Vg-Qk for submit@debbugs.gnu.org; Wed, 08 Jan 2025 16:53:17 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37982) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tVdz4-0005Sf-Fi for 74860@debbugs.gnu.org; Wed, 08 Jan 2025 16:53:07 -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 1tVdyy-00046R-Vf; Wed, 08 Jan 2025 16:52:56 -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=eVlTO9deNtYxCPKsr7SVFRt5188WSjSbnfVGHleXeVY=; b=GDH729orAfEb7OetXcZN yU9BGhzCLVytfRzZU8BE5ekMkAPDLFqxszEzJofsmXz/wX//GuvrGp8NMHVijB7tSmFL793tyNyt+ UlptmsOwKlky6AwY9BkJNGnnhifh3dwBDY4rDI+wj06T61C08lgLWwHssdyZ605uazPsmo0BHir6q sNqGRxCcvmGaNxOaqpje+1kxGa8Mec5kJxCEQLT6PEKZB8tP5AInrKBKhH490lR2x/Cuc/nB/g5Q/ CgkcSSIau3+Vaz0N0gFapDIgJriMjRLVbbVGuwSaMLXXkuqh5aaaSqWmOjY+RvMMrxkK35/Xpf2yY m/F06yyHvQUYWQ==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Wed, 8 Jan 2025 22:51:54 +0100 Message-ID: <3447f9ee5cb158f7320075ccf6f93f27ce1f53cc.1736373022.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. * 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’. (%default-syslog-files): New variable. (syslog-service-type): Extend ‘log-rotation-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’. Change-Id: I8802d4c2337a1e08e3c084d6217f76527d7ee1fb --- doc/guix.texi | 5 +-- gnu/services/admin.scm | 9 +----- gnu/services/audio.scm | 26 ++------------- gnu/services/base.scm | 22 ++++++------- 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, 28 insertions(+), 153 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index bfd9ab1ab4..0e8945be16 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. @@ -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..f3331ae835 100644 --- a/gnu/services/admin.scm +++ b/gnu/services/admin.scm @@ -670,19 +670,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..c712c90c33 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013-2024 Ludovic Courtès +;;; Copyright © 2013-2025 Ludovic Courtès ;;; Copyright © 2015, 2016 Alex Kost ;;; Copyright © 2015, 2016, 2020 Mark H Weaver ;;; Copyright © 2015 Sou Bunnbu @@ -1685,12 +1685,20 @@ (define (syslog-shepherd-service config) #:pid-file "/var/run/syslog.pid")) (stop #~(make-kill-destructor)))) +(define %default-syslog-files + ;; List of files usually produced by syslogd that should be rotated. + '("/var/log/messages" "/var/log/secure" "/var/log/debug" + "/var/log/maillog")) + (define syslog-service-type (service-type (name 'syslog) (default-value (syslog-configuration)) (extensions (list (service-extension shepherd-root-service-type - (compose list syslog-shepherd-service)) + (compose list + syslog-shepherd-service)) + (service-extension log-rotation-service-type + (const %default-syslog-files)) (service-extension etc-service-type syslog-etc))) (description "Run the syslog daemon, @command{syslogd}, which is responsible for logging system messages."))) @@ -2354,12 +2362,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 +2383,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 +3736,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 21:51:55 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: 36792 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 8D04427BBE9; Wed, 8 Jan 2025 21:54: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 2166A27BBEA for ; Wed, 8 Jan 2025 21:54:37 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tVe0U-0000zF-Sl; Wed, 08 Jan 2025 16:54:30 -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 1tVe03-000069-Oq for guix-patches@gnu.org; Wed, 08 Jan 2025 16:54: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 1tVe03-0004GT-Fc; Wed, 08 Jan 2025 16:54: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=emTGtHy+fK6l0puxRTyccYSeAJFk1ZfY4yWYha0ivCk=; b=Teh13hbBXXQjM+FCuFszZksJYDX2EDf2QrZX8hGGAxop1aUuH+lhauNynV7RcYzVEQJxjZ933DRRETWdE4Z1sCaLe4uc5yeLenLlrocau2vtDi3NZ+g6lmIk6bPDxZNDK4sqd/Ym36rsX3IvoeA8PRrgF1KCD1GSbBcJ7E33gm1hb15uzBKaD0K5W7DjOURO/UwMIyDtue4sHsHP98E3BMPLIDsoDB8ZYdXg36iHMhvBiqQz7bzFKArzTuXqFNMfmAuKzYAwXOFSyE7vcwoN73AAPYiwXAd7Kt8AqmwD7NpRQ4ZSqo0zKsesT9yjoY5rCNjetSbdb+8yPPFg4KELxA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tVe03-0005Xh-Ar; Wed, 08 Jan 2025 16:54:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74860] [PATCH v3 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 21:54: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.173637319121174 (code B ref 74860); Wed, 08 Jan 2025 21:54:03 +0000 Received: (at 74860) by debbugs.gnu.org; 8 Jan 2025 21:53:11 +0000 Received: from localhost ([127.0.0.1]:49312 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tVdzC-0005VJ-CH for submit@debbugs.gnu.org; Wed, 08 Jan 2025 16:53:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37992) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tVdz5-0005Sh-Ck for 74860@debbugs.gnu.org; Wed, 08 Jan 2025 16:53:04 -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 1tVdz0-00046b-1h; Wed, 08 Jan 2025 16:52:58 -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=emTGtHy+fK6l0puxRTyccYSeAJFk1ZfY4yWYha0ivCk=; b=BAyYKBk10aNYZ9ue1S2c 4PUXkj+rsYhzPTXjYYAyCXyAtFg1+Pwt5eRbzGwdkY3P71IqVRjU+0VlMpaWhUO3bCif/KqbuRmvg mmTAv4uNZJkLhT/6VBKpVCISW2AoX8Fi8o/L7Fpy1ulWmVhMU++N7cAry5Od4+SEQH79IG9hdjSW1 zx3Os0nu8RUZWzT5OFPeztaA1Hw3f+IG0nq7bibQbZ7QXg+Y6vGh2cSso9Vo6nKqj3KUGHtKUQrGQ 0MoKlI3nneLpyV48fuiGoEvbsoX/NDcVQmUeVHeUT6jXHrTa0xdvj0Rg+F5KGaSYlhg3487NQN39o FyCsa4AK42AjZg==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Wed, 8 Jan 2025 22:51:55 +0100 Message-ID: <0bc8156ace914dd7e1b8f8a5c7741d8b5af7b8fe.1736373023.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 0e8945be16..7bc1d0b9e5 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 f3331ae835..54a22d98dc 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) @@ -334,12 +335,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 21:51:56 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: 36788 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 D081927BBEA; Wed, 8 Jan 2025 21:54: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=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 4A04127BBE2 for ; Wed, 8 Jan 2025 21:54:30 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tVe0M-0000dm-NA; Wed, 08 Jan 2025 16:54: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 1tVe04-00006Y-8K for guix-patches@gnu.org; Wed, 08 Jan 2025 16:54: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 1tVe03-0004Gf-W3 for guix-patches@gnu.org; Wed, 08 Jan 2025 16:54: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=Vvrmc4kywCk1IGPDsLpd2JolME0Ks2CYJikl8GA3PoU=; b=sSGUJrasGxkEpbBLzb6jlJtCjALVpMciwAJKXBexmso8DEFMFXwYAZVdsCgBt+0e06L4PPXRTbIqt9ffWvA9REMrfcVa7FiE2pu3tZDo1SEfMFzQtzhMdpBBOKfUEu1vIBxHZ4Lh07I/yIf2ZOgoxc01e0cIQo+FcjmAApbOf3s5Q1L6A+vTxixFKbXqsDf7Fm+kjj1rCxUbOn7dOJjCvIT/HkpjFiLbf/gQbGgatrvhM86iAoMwbtKfp+366nv//DYbqmV26PnG43V354eIq1CUPgDHbUdpdzWYwwpDB/pEUVcY+WVdouKI6nba0ffsxo3+qGVPEn/y1MSZ2OIGJQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tVe03-0005Xq-RY; Wed, 08 Jan 2025 16:54:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74860] [PATCH v3 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 21:54: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?= , 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.173637319621187 (code B ref 74860); Wed, 08 Jan 2025 21:54:03 +0000 Received: (at 74860) by debbugs.gnu.org; 8 Jan 2025 21:53:16 +0000 Received: from localhost ([127.0.0.1]:49314 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tVdzH-0005Ve-1A for submit@debbugs.gnu.org; Wed, 08 Jan 2025 16:53:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55110) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tVdz7-0005TH-U0 for 74860@debbugs.gnu.org; Wed, 08 Jan 2025 16:53:06 -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 1tVdz1-00046y-0U; Wed, 08 Jan 2025 16:52:59 -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=XPehLrIslfHFPBGwODlj W3hDYBwauHYed1h52aTDxxBqOjMWKH9DcHhHktfmruUa6cWo8aytPxUnRsGzGiqGd1Et04GlUjNQ+ 8/8IgCgupBnlSIuzCPs8otoJ4Y2JFAP/lSUwIur+wf/rhtBspV0PrFD6Iab4vwZjMdjvL1yG3k+57 A2s3MhLpPZKhi/y/wkc/NwDCQ97r6XDyYPKHe/SZaZmUTiXP8OZGJJWYhJBjW4X0kDrCGoLVnwS4J 5XvKl4Eobd02phFl+sAlBWiqPZWWdNVuwzgrDCKJm0Xl3yo/u+/xasCADrUWEVGbh8t/KgjWL2So1 LffOYbHBlw8t9w==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Wed, 8 Jan 2025 22:51:56 +0100 Message-ID: <65258e0a435d013ec0326051991961391cf555f9.1736373023.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 21:51:57 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: 36794 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 52FF627BBE9; Wed, 8 Jan 2025 21:54:42 +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 2373E27BBEA for ; Wed, 8 Jan 2025 21:54:41 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tVe0W-00019S-IA; Wed, 08 Jan 2025 16:54:32 -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 1tVe09-0000HY-6V for guix-patches@gnu.org; Wed, 08 Jan 2025 16:54:11 -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 1tVe08-0004Ic-QT; Wed, 08 Jan 2025 16:54: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=rtx6jF9s547Sdf8qK+wTeWLZznPqsY3ur02Ejgc+6M4=; b=bNVVHMgC0OKmMoLSP0O0zdtcWMacWEhxMbAywaMrfnw+x6TzcFQnu3dhfC+dGuKe+ZDjYJ2TRKjWEPV3EjWuFuM7IT/J3eH90yqWYqtQKIAw5hz/sxi6DwVeHIWuwXegfFttAB7p8gV8fj5/b5CKSgphEOcPOXvAkayZ1EByFJsQSlctld2Rx6DDq4K1FbyQQq7EN3Ea4Anlq8Oskm2f2p633XPigcaesQDD1p8Ak5WYeoalMX2yyrfIIfNeXJnA2hZTqQiqlcLT9VoUCTSmuLYmzoMDY578auhlsSsyPuHMixjjMoyeFS9bDh/x5KHCSjnAhg1XXTe1Ky0ahRAtOw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tVe04-0005Y8-QP; Wed, 08 Jan 2025 16:54:04 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74860] [PATCH v3 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 21:54: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?= , 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.173637319721203 (code B ref 74860); Wed, 08 Jan 2025 21:54:04 +0000 Received: (at 74860) by debbugs.gnu.org; 8 Jan 2025 21:53:17 +0000 Received: from localhost ([127.0.0.1]:49318 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tVdzJ-0005Vp-8r for submit@debbugs.gnu.org; Wed, 08 Jan 2025 16:53:17 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55116) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tVdz8-0005Ta-Tp for 74860@debbugs.gnu.org; Wed, 08 Jan 2025 16:53:07 -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 1tVdz3-00047K-IK; Wed, 08 Jan 2025 16:53:01 -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=rtx6jF9s547Sdf8qK+wTeWLZznPqsY3ur02Ejgc+6M4=; b=Ok4ktuoXOWCfji+MLhRr /X0LOZgCDUZdtMIjN7CWopA6H68CiU7LEFwu9UNXvVJLhMhDMxl1TAGLVmNPx6ZO1jXrOSNs5Cawu o0/B52HT15Mfs4mA90On1OPyEQZFkWeNGSwVEimIfvlp495FOpT+KyepudnVQzvcpx0FiDYGGc5xK +F8TdI2AIeXADdZnzN6W8EXDL9pizmO75a1HcSrGC2O5dMBJA5ck0vxbNiPkW2HkSPeloljFTWcAo StH9Tms87+P+R8SH+pZeuynRYwoG3rWyW4zZY9tcXjsgz7QGkHlLKYaJZ9LKz4lUkJRZQJzhZUIQS AhBifc4bHHVpZA==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Wed, 8 Jan 2025 22:51:57 +0100 Message-ID: <24304f1ae073bbd8cf2be1f7b79b61413f3a68da.1736373023.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/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 7bc1d0b9e5..1b8047585d 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 21:51:58 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: 36795 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 B8FEE27BBEA; Wed, 8 Jan 2025 21:54: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=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 16BA227BBE2 for ; Wed, 8 Jan 2025 21:54:43 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tVe0Y-0001DK-20; Wed, 08 Jan 2025 16:54:34 -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 1tVe0C-0000LT-U2 for guix-patches@gnu.org; Wed, 08 Jan 2025 16:54: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 1tVe0B-0004Ip-7K; Wed, 08 Jan 2025 16:54:12 -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=nHcacDsx3UbBcvWhS9fL7gIR3YciMQVhqeT0y4xzKVg=; b=l0xQLjEGLI674Q1r49eocl55nR2lYlwcqqt88jMHNVBlqia9iykD8jEFOmQb3yBcth8FLRXSFmyu9aMKdPy/4XJ+9okXDziPjv16n5nLaEX0RS8TRWA46llNEV0YJcwPUcLj32KolthCYloLjNtiUkUNYrFPluJRpiULj1wiCuGXaikTICQY3XLTZYTlF2weNg9wg8CVOHqYUviZGG9RH3F7yuYFKlru/wITmgQsAB7GBcSAUHNxvT03UHxAe2510kzhPIR1GpyT8r2v8e1KLRFGX8MDc/5qlWJ+adjHwL8v/cW+UGE2MVyBQL9N4bfVRWFWmO21JMgY5f6tIEkwvg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tVe05-0005YH-Ch; Wed, 08 Jan 2025 16:54:05 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74860] [PATCH v3 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 21:54: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?= , 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.173637319821212 (code B ref 74860); Wed, 08 Jan 2025 21:54:05 +0000 Received: (at 74860) by debbugs.gnu.org; 8 Jan 2025 21:53:18 +0000 Received: from localhost ([127.0.0.1]:49320 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tVdzJ-0005Vw-PR for submit@debbugs.gnu.org; Wed, 08 Jan 2025 16:53:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55128) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tVdz9-0005Tw-V4 for 74860@debbugs.gnu.org; Wed, 08 Jan 2025 16:53:09 -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 1tVdz4-00047W-LU; Wed, 08 Jan 2025 16:53:02 -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=nHcacDsx3UbBcvWhS9fL7gIR3YciMQVhqeT0y4xzKVg=; b=aUcJlwzZoUfiZhJtjPzk 6kM1aG4N91ZP80RHInkjEEJFuQ6b3yTtC7OJh1k8sDXpBUHE45vRDOwhMUFfO1Cv2N26RbZoRfNL1 7Xhc6HKjD7tG4xHGzQlrppxDyl0TAfcjhauKPY91+2KO5d7PhBGb6zHcm+Md0lYsxyAEwAahNN7G8 QKNwKF9L8jOfdfJvucLrz129osX5J61vYpelmKIYNAbDZvm5798FKC+ICdobPyVSkxOvIwqxLbuy7 mYFC8NY4rmLjmo01VopUhOesr6OX0YkY2cuQ9xWXS6x+m7pFB2Qp/miRzttxozGw27FKrpacoKm0f QET/NA+s3NRtaw==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Wed, 8 Jan 2025 22:51:58 +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 1b8047585d..f8ac7b1912 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 21:51:59 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: 36790 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 770C727BBEB; Wed, 8 Jan 2025 21:54:36 +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 0421027BBE2 for ; Wed, 8 Jan 2025 21:54:36 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tVe0V-000146-Sd; Wed, 08 Jan 2025 16:54:31 -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 1tVe07-0000EU-JW for guix-patches@gnu.org; Wed, 08 Jan 2025 16:54: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 1tVe06-0004HG-66; Wed, 08 Jan 2025 16:54: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=/WSQwEt8GP1IfnmLjrqrFHKmXXoxKoEqDszkj6oH8uM=; b=GzV4dsLGv4PsHiK/bKPjnL6ze5EC/Csslq6iVanI9vFJJeFpmsQH/tlDiMVr92k4wow7XxbR9FgmjgPUhr2B3bNIP9TKGNImTy/krGR5tkzse08Ueec+X8toNPQ+dBtHV4ybPvRJEhY6NeI3bz+hV09bqVTs0Lg4m5GjnUlE0KbD0YmQgiaunl+QS4UZbUAO+zNsGPl8nhWv7W9b3IyY8Vd6/Bb407OnuSiDMPMvX52F+ToJ2/YluYp+ZET8NCTiPFQHUV3L4/D9qFhmRmRi92SS1NwiMbuqxLRl/apWpueHGr6/5tyHcjaXE4I+tiSnnrZXMSUWV7N/FJfGthuP3A==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tVe05-0005YN-RQ; Wed, 08 Jan 2025 16:54:05 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74860] [PATCH v3 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 21:54: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?= , 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.173637319921220 (code B ref 74860); Wed, 08 Jan 2025 21:54:05 +0000 Received: (at 74860) by debbugs.gnu.org; 8 Jan 2025 21:53:19 +0000 Received: from localhost ([127.0.0.1]:49322 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tVdzK-0005W5-GP for submit@debbugs.gnu.org; Wed, 08 Jan 2025 16:53:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55144) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tVdzB-0005U7-0N for 74860@debbugs.gnu.org; Wed, 08 Jan 2025 16:53:09 -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 1tVdz5-00047q-NH; Wed, 08 Jan 2025 16:53:03 -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=/WSQwEt8GP1IfnmLjrqrFHKmXXoxKoEqDszkj6oH8uM=; b=M6qlPwi+BYlvv+lKbmVq jyowAJOr/4efd9GL+eU3fhK6xztRHMjtHp9wgMwp7/MphoxGBYZtgjEuJvx+nZ2bmdoZHM/iZORio +K/0xB8JJ7df7PwjZGgWbB6TGa+aUOHPM8JAobx0K0klVXdcOB7jTp0EWf+1Kvf+3Zx/r3ta9noRy OLU1hNL1Hyj7wnaOp8ZFSgFC7UpUwfyrGrkwczWbq0bwu1C+Zxd2+bhFkOHZ6Hyd038Y22dWVJ0/b 2sSkuayJvUJNvAFQTlValZCVk514rUG5X+7XmgzOFti/U2s7+eNa3w51Xaz4iNR2n/vjORLzmpcN9 j9GPoHURRYuNUg==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Wed, 8 Jan 2025 22:51:59 +0100 Message-ID: <56b71587f028893a695d99fe67fa9b31ed28f6cf.1736373023.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 f8ac7b1912..669102f516 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 21:52:00 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: 36791 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 01D9D27BBE2; Wed, 8 Jan 2025 21:54: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 3276A27BBE9 for ; Wed, 8 Jan 2025 21:54:36 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tVe0T-0000rY-Q3; Wed, 08 Jan 2025 16:54:29 -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 1tVe08-0000HB-HE for guix-patches@gnu.org; Wed, 08 Jan 2025 16:54:10 -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 1tVe08-0004IU-63 for guix-patches@gnu.org; Wed, 08 Jan 2025 16:54: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=VQwcyopSj2WtuiHDGW7Yyd8sVSKSMkNYuMmPYPdGggT4LRAhOmEsXqgHWxHn4rGjXDkjkSiP9vq8fH8ysrNCUBeBUnUDVe2UzkES307F2EP7vKnz7GaKbmV+w95IFVQCHBTFA+HMRI2xLEfFsCGRXmU6fLaQrBd7j4hOeII9g+UTtPfZfXOyrwCsHMMPAAD6Cs+NHJhsxfHFrIxA1bOp4oYxNokgE10yK/kqlzaHPf//q2jD6qBFPFm+EqqZ71kJsqCBhj0bTFi/mJTS/vjjEZxV9ihxyiLv5QQJ+iSqcnOxNQTiXjVxnPtxQJDLQWd7u/k/6UArcRxmXBe/PGkBdA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tVe06-0005YZ-9x; Wed, 08 Jan 2025 16:54:06 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74860] [PATCH v3 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 21:54: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?= , Florian Pelz , Julien Lepiller X-Debbugs-Original-Xcc: Florian Pelz , Julien Lepiller Received: via spool by 74860-submit@debbugs.gnu.org id=B74860.173637319921227 (code B ref 74860); Wed, 08 Jan 2025 21:54:06 +0000 Received: (at 74860) by debbugs.gnu.org; 8 Jan 2025 21:53:19 +0000 Received: from localhost ([127.0.0.1]:49324 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tVdzL-0005WD-19 for submit@debbugs.gnu.org; Wed, 08 Jan 2025 16:53:19 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55148) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tVdzC-0005UV-6O for 74860@debbugs.gnu.org; Wed, 08 Jan 2025 16:53:10 -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 1tVdz6-00048M-RS; Wed, 08 Jan 2025 16:53:04 -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=el0ZjRGnoP5KImcgvbpg bUrSpJywbNj31WkIFlqtT1cCfJO89RAlg+atyBVTgHMwJoaF8XSIR8WXtnV8G9gMw2go0x51H5z1H KlOtTIr9eHOZxymab2fRAp2ydnc0nI9TPyymh/rklR/N7Kp3QYueKnokwpG0e8s4DANLGfec2FJNc TdSLT0veAEvy0Fol9dIJcX5k/b1qeIh9f+gU/Rf13ectNrxJteNOh/Bd/K8j0gnGjwxCJTseQCTbj 2mkcG4gRUfsZYnRIFn1cSMJ2qzAEfmqFfQvGWJ9mrGnMUbez9c5zidyMnnK8B5MPWtk9Xd7HTmxfx EQfhz7BTPDh0sg==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Wed, 8 Jan 2025 22:52:00 +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 * 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")