From patchwork Thu Mar 27 08:34:08 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: 40870 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 1A79C27BBE9; Thu, 27 Mar 2025 08:35: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=-8.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H2,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 2E38827BBE2 for ; Thu, 27 Mar 2025 08:35:39 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1txihe-0008Uw-LW; Thu, 27 Mar 2025 04:35:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1txihc-0008SB-Gu for guix-patches@gnu.org; Thu, 27 Mar 2025 04:35:04 -0400 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 1txihb-0001kl-Se; Thu, 27 Mar 2025 04:35:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=NnnWxW0xyDf2VKBSK999yQv2Gcg7vjk3aKiNVSIDKm8=; b=h3vXCOB8X2ZjoKvvZGCkdm3aeRhnORgPda/opQ26ueN+3R6JvT5kSjVVJY8tRcaCc77WJdkb/0uKY6CzTXjNGk30Gv7OiDlPszztQh7g0Af8howK9czlacT5eyMjRCiGz75QxQAJsIBJf3UC5s4YbjsBxGmDbk9Curjys0I1QzpqSljDxKyUUhMU4Q5nk1E6M1Ud11LmWaKtQ9LO43/0lHlcm9yWTHdLIkeoUYaOLYundC9ZRvJPRrNiaPVN6dcvkunFHFbQGl86xu73I95epr1yhjmRJip8iulizyb5Y8DLhUxaDEgeGakzaRtPuLm4do0x7uUmSGs+j2zVG0m5Ww==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1txihb-0000Mk-7R; Thu, 27 Mar 2025 04:35:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77303] [PATCH] services: anonip: Rotate log files. 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: Thu, 27 Mar 2025 08:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 77303 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77303@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-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Ludovic =?utf-8?q?Court=C3=A8s?= , Maxim Cournoyer Received: via spool by submit@debbugs.gnu.org id=B.17430644761117 (code B ref -1); Thu, 27 Mar 2025 08:35:02 +0000 Received: (at submit) by debbugs.gnu.org; 27 Mar 2025 08:34:36 +0000 Received: from localhost ([127.0.0.1]:47322 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1txih9-0000Hx-Ka for submit@debbugs.gnu.org; Thu, 27 Mar 2025 04:34:36 -0400 Received: from lists.gnu.org ([2001:470:142::17]:48004) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1txih5-0000Gy-NF for submit@debbugs.gnu.org; Thu, 27 Mar 2025 04:34:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1txih0-0008K2-0i for guix-patches@gnu.org; Thu, 27 Mar 2025 04:34:26 -0400 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 1txigz-0001eV-15; Thu, 27 Mar 2025 04:34:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=NnnWxW0xyDf2VKBSK999yQv2Gcg7vjk3aKiNVSIDKm8=; b=j7kkM/XJf2CcGa 9A5ZBfz1UNe3fJM1sGXb8bxqZw+ytRAemU5lrnFsWgEYE/DwwO7J2yg4s5jGtJVKHjPL7K2t2WSBj c/vWI0IhC/+w6MV7ReWzu35qx/mzoBWsxZpmScnaBrf4RDVySoTJ3oqwzhDyFv1sKzk1OhAOmwz8A 6U38EXYF+o0W5qEwlzhYrxn8x0JhhbdZPOy390/9ZmWEAWXPvB5IFOhIwx8jDziK7H0FoDjQYZyYZ U3PWX8qH/3xPAvp+399kAmcPlfHAT0BHE8nJ4v0jhtcXRh74oAi3WeDw6uJ3T0BO2VPFX29nmnery tuV2VS/JB+XepPLrunAA==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Thu, 27 Mar 2025 09:34:08 +0100 Message-ID: <0e996666edba9393bd912f7018fd27273a5c288e.1743064399.git.ludo@gnu.org> X-Mailer: git-send-email 2.49.0 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/web.scm (anonip-log-files): New procedure. (anonip-service-type): Use it to extend ‘log-rotation-service-type’. * doc/guix.texi (Log Rotation): Document it. Change-Id: I903bb79e0992b794bb0a40e504283cd57a8a087b --- doc/guix.texi | 4 +++- gnu/services/web.scm | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) This fixes a longstanding issue, in particular on berlin where log files keep growing. :-) Ludo'. base-commit: cfdd0f58d0f85127c166f0908aa7b85c7cb9cc74 diff --git a/doc/guix.texi b/doc/guix.texi index 3b98f1b4ea..28d7bf60ea 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -21453,7 +21453,9 @@ Log Rotation FIFO of this name. The web server should write its logs to this FIFO. @item @code{output} -The file name of the processed log file. +The file name of the processed log file. This file is subject to log +rotation @i{via} the Shepherd's log rotation service (@pxref{Log +Rotation}). @end table The following optional settings may be provided: diff --git a/gnu/services/web.scm b/gnu/services/web.scm index f8cf06fb48..9caa03317b 100644 --- a/gnu/services/web.scm +++ b/gnu/services/web.scm @@ -1574,12 +1574,18 @@ (define (anonip-shepherd-service config) "LC_ALL=en_US.utf8")))) (stop #~(make-kill-destructor)))))) +(define (anonip-log-files config) + "Return the list of log files produced by @command{anonip}." + (list (anonip-configuration-output config))) + (define anonip-service-type (service-type (name 'anonip) (extensions (list (service-extension shepherd-root-service-type anonip-shepherd-service) + (service-extension log-rotation-service-type + anonip-log-files) (service-extension activation-service-type anonip-activation))) (description