From patchwork Fri May 31 17:28:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Baines X-Patchwork-Id: 14179 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 3704A17057; Fri, 31 May 2019 18:29:07 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,TVD_SPACE_RATIO, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id D909A17030 for ; Fri, 31 May 2019 18:29:06 +0100 (BST) Received: from localhost ([127.0.0.1]:46914 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWlKz-0004IH-EK for patchwork@mira.cbaines.net; Fri, 31 May 2019 13:29:05 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51993) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWlKx-0004Hx-3I for guix-patches@gnu.org; Fri, 31 May 2019 13:29:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hWlKw-0005JZ-2L for guix-patches@gnu.org; Fri, 31 May 2019 13:29:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:50778) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hWlKv-0005JE-VU for guix-patches@gnu.org; Fri, 31 May 2019 13:29:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hWlKv-0004C2-QR for guix-patches@gnu.org; Fri, 31 May 2019 13:29:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#35794] [PATCH] services: guix-publish: Configure log rotation. Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 31 May 2019 17:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35794 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 35794@debbugs.gnu.org Received: via spool by 35794-submit@debbugs.gnu.org id=B35794.155932370016024 (code B ref 35794); Fri, 31 May 2019 17:29:01 +0000 Received: (at 35794) by debbugs.gnu.org; 31 May 2019 17:28:20 +0000 Received: from localhost ([127.0.0.1]:36088 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hWlKG-0004AN-GF for submit@debbugs.gnu.org; Fri, 31 May 2019 13:28:20 -0400 Received: from mira.cbaines.net ([212.71.252.8]:53242) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hWlKE-0004A7-55 for 35794@debbugs.gnu.org; Fri, 31 May 2019 13:28:18 -0400 Received: from localhost (cpc102582-walt20-2-0-cust14.13-2.cable.virginm.net [86.27.34.15]) by mira.cbaines.net (Postfix) with ESMTPSA id D2C5617030 for <35794@debbugs.gnu.org>; Fri, 31 May 2019 18:28:11 +0100 (BST) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id e5cf13ae for <35794@debbugs.gnu.org>; Fri, 31 May 2019 17:28:11 +0000 (UTC) From: Christopher Baines Date: Fri, 31 May 2019 18:28:11 +0100 Message-Id: <20190531172811.15086-1-mail@cbaines.net> X-Mailer: git-send-email 2.21.0 In-Reply-To: <878sv0q1ur.fsf@gnu.org> References: <878sv0q1ur.fsf@gnu.org> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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" X-getmail-retrieved-from-mailbox: Patches * gnu/services/base.scm (%guix-publish-log-rotations): New variable. (guix-publish-service-type): Extend the rottlog-service-type. --- gnu/services/base.scm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 4593ac202f..1b3beb1c75 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -1807,6 +1807,10 @@ archive' public keys, with GUIX." (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"))))) + (define (guix-publish-activation config) (let ((cache (guix-publish-configuration-cache config))) (if cache @@ -1828,6 +1832,8 @@ archive' public keys, with GUIX." 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))