diff mbox series

[bug#40953] services: rottlog: Append '.gz' to rotated file.

Message ID 20200429073750.25435-1-brice@waegenei.re
State Accepted
Headers show
Series [bug#40953] services: rottlog: Append '.gz' to rotated file. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job

Commit Message

Brice Waegeneire April 29, 2020, 7:37 a.m. UTC
* gnu/services/admin.scm (%default-rotations): Add option 'storefile'.
---
 gnu/services/admin.scm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

Brice Waegeneire April 29, 2020, 7:50 a.m. UTC | #1
This patch should fix https://issues.guix.info/issue/40945
Ludovic Courtès May 1, 2020, 10:01 p.m. UTC | #2
Hi,

Brice Waegeneire <brice@waegenei.re> skribis:

> * gnu/services/admin.scm (%default-rotations): Add option 'storefile'.

Please add “Fixes <https://bugs.gnu.org/...>.”

LGTM!  That problem had always annoyed me.

Ludo’.
Brice Waegeneire May 6, 2020, 9:17 a.m. UTC | #3
Pushed as ab034adfe86333fccd6afe476806f169e2074d69.
diff mbox series

Patch

diff --git a/gnu/services/admin.scm b/gnu/services/admin.scm
index df3cb01646..89fa73920d 100644
--- a/gnu/services/admin.scm
+++ b/gnu/services/admin.scm
@@ -1,6 +1,7 @@ 
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -71,8 +72,11 @@ 
   (list (log-rotation                             ;syslog files
          (files %rotated-files)
 
+         (options '(;; Run post-rotate once per rotation
+                    "sharedscripts"
+                    ;; Append .gz to rotated files
+                    "storefile @FILENAME.@COMP_EXT"))
          ;; Restart syslogd after rotation.
-         (options '("sharedscripts"))
          (post-rotate #~(let ((pid (call-with-input-file "/var/run/syslog.pid"
                                      read)))
                           (kill pid SIGHUP))))