From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id CMhnMW6WRmKepwAAgWs5BA (envelope-from ) for ; Fri, 01 Apr 2022 08:06:38 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id WKIOLm6WRmJD5QAAauVa8A (envelope-from ) for ; Fri, 01 Apr 2022 08:06:38 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 4855A12EE8 for ; Fri, 1 Apr 2022 08:06:38 +0200 (CEST) Received: from localhost ([::1]:45766 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1naAQc-0002L0-5a for larch@yhetil.org; Fri, 01 Apr 2022 02:06:35 -0400 Received: from eggs.gnu.org ([209.51.188.92]:56448) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1naAQ6-0002Ic-Pu for guix-patches@gnu.org; Fri, 01 Apr 2022 02:06:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46730) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1naAQ6-0004Yy-HD for guix-patches@gnu.org; Fri, 01 Apr 2022 02:06:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1naAQ6-0003LY-C1 for guix-patches@gnu.org; Fri, 01 Apr 2022 02:06:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#54659] [PATCH 2/2] services: Add 'log-cleanup' service to '%base-services' for build logs. Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 01 Apr 2022 06:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54659 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= , 54659@debbugs.gnu.org Received: via spool by 54659-submit@debbugs.gnu.org id=B54659.164879313712798 (code B ref 54659); Fri, 01 Apr 2022 06:06:02 +0000 Received: (at 54659) by debbugs.gnu.org; 1 Apr 2022 06:05:37 +0000 Received: from localhost ([127.0.0.1]:40622 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1naAPh-0003KL-Es for submit@debbugs.gnu.org; Fri, 01 Apr 2022 02:05:37 -0400 Received: from mailrelay.tugraz.at ([129.27.2.202]:29848) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1naAPf-0003KB-HY for 54659@debbugs.gnu.org; Fri, 01 Apr 2022 02:05:36 -0400 Received: from lprikler-laptop.ist.intra (gw.ist.tugraz.at [129.27.202.101]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4KV8mC6DmHz3xcV; Fri, 1 Apr 2022 08:05:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1648793132; bh=5dIQzNvDQthwzyTlnA9QkfX6+3s8o6Dq9b2pZFmhpac=; h=Subject:From:To:Date:In-Reply-To:References; b=KnWwWMh/4/cLBbwBNGH8vhfGiCjUQst5SKuZigzrU09YqnURjthayKAbxmS4KMCJh k2o4TchNNJ9EJKjfe2KskNGGgylN7nSN15rhwfHJiRvbngktJhtK2T+bT1Tbk3qi/P MJHSlOW7MjMpbbyLFmFTW0HuRdWNH9JPA7yvsRT8= Message-ID: <7073d9d64e8c68c943d4d2a03cb6fee2b6a0364e.camel@ist.tugraz.at> From: Liliana Marie Prikler Date: Fri, 01 Apr 2022 08:05:30 +0200 In-Reply-To: <20220331212208.24385-2-ludo@gnu.org> References: <20220331212208.24385-1-ludo@gnu.org> <20220331212208.24385-2-ludo@gnu.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TUG-Backscatter-control: waObeELIUl4ypBWmcn/8wQ X-Scanned-By: MIMEDefang 2.74 on 129.27.10.117 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1648793198; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=5dIQzNvDQthwzyTlnA9QkfX6+3s8o6Dq9b2pZFmhpac=; b=EZAMPs0N2wu0xHFrcXHyGZyff+LCmTxWl0X+K9H5UhJ/jNWwqZSOFTZr00+mRmRFqskbwj 7haXJhBTWkhqmIIwKgDckwvP8t+HppDjvqobmTPNZ+PMnoDOaadq0ys1WRl/9KQkDPvreE rnAcnXCSjYZ8g+JMqdcQLgzaSKVEvUk80j15idYZXfllmUEzVDo4Z1atjKBJlE17wQfT3j rMWAXCpNEC7u6lCItfWaJQ+pc6k3U7gV5HsjCB0qj9T0gi0xj8mZASywbHT/ZS2tib9U3v RMs4EPft7DvjPMG5APo170bjpPe20HnMEuckNW5+jKZLn0MaC6qg2Q8+CVpQYg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1648793198; a=rsa-sha256; cv=none; b=kXahcsHFfH16CilioP6n6vXIeg23o3teXr+DROGZM8IiAAoFnhuUuKnjsXPpKqklxzaI7x dj61aFCKHCXCAr6OEcUyVacBAq+eTjyGKky4Xnc3NDlzo8RiAhs3udJsXbTML/cQTHt938 TRB6212DYNL1H6wpc14HkAfeVPwh06uV/1yt+tjZReeVI17ISWgRu84CftYr/tGCTN7tcp jUPOYYLAHyk/c8dfkTzK54Qf2ejbF+Hp5wu8gMBiSTv/8QFEGPIqwhF2WH2+dY95Zxk5aj /dQ/HzQJThWtmWu8AkzTCUahbVcDhQBgCED0GFgHiLv7oyP4j9AYOPbO5KQgJw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tugraz.at header.s=mailrelay header.b="KnWwWMh/"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=tugraz.at (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 5.73 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tugraz.at header.s=mailrelay header.b="KnWwWMh/"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=tugraz.at (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 4855A12EE8 X-Spam-Score: 5.73 X-Migadu-Scanner: scn1.migadu.com X-TUID: XgZYw5smjzq5 Am Donnerstag, dem 31.03.2022 um 23:22 +0200 schrieb Ludovic Courtès: > * gnu/services/base.scm (%base-services): Add 'log-cleanup-service- > type' > instance. > * doc/guix.texi (Log Rotation): Add example and mention '%base- > services'. > --- >  doc/guix.texi         | 13 ++++++++++++- >  gnu/services/base.scm |  6 ++++++ >  2 files changed, 18 insertions(+), 1 deletion(-) > > diff --git a/doc/guix.texi b/doc/guix.texi > index ad2763ec8a..eaaf829aa2 100644 > --- a/doc/guix.texi > +++ b/doc/guix.texi > @@ -17645,7 +17645,18 @@ Some log files just need to be deleted > periodically once they are old, >  without any other criterion and without any archival step.  This is > the >  case of build logs stored by @command{guix-daemon} under >  @file{/var/log/guix/drvs} (@pxref{Invoking guix-daemon}).  The > -@code{log-cleanup} service addresses this use case. > +@code{log-cleanup} service addresses this use case.  For example, > +@code{%base-services} (@pxref{Base Services}) includes the > following: > + > +@lisp > +;; Periodically delete build logs more than 4 months old. > +(service log-cleanup-service-type > +         (log-cleanup-configuration > +          (directory "/var/log/guix/drvs") > +          (expiry (* 4 30 24 3600)))) > +@end lisp > + > +That ensures build logs do not accumulate endlessly. >   >  @defvr {Scheme Variable} log-cleanup-service-type >  This is the type of the service to delete old logs.  Its value must > be a > diff --git a/gnu/services/base.scm b/gnu/services/base.scm > index f278cb76de..ebaba524bc 100644 > --- a/gnu/services/base.scm > +++ b/gnu/services/base.scm > @@ -2817,6 +2817,12 @@ (define %base-services >   >          (service rottlog-service-type) >   > +        ;; Periodically delete build logs more than 4 months old. > +        (service log-cleanup-service-type > +                 (log-cleanup-configuration > +                  (directory "/var/log/guix/drvs") > +                  (expiry (* 4 30 24 3600)))) > + This might be very nitpicky, but I think we should leave expiry undefined so that the default of 6 months is applied. This way, if there's a future decision that all logs should probably kept e.g. for only 3 months, there is just one place to edit rather than two. Cheers