From: Simon Tournier <zimon.toutoune@gmail.com>
To: 66609@debbugs.gnu.org
Cc: Simon Tournier <zimon.toutoune@gmail.com>
Subject: [bug#66609] [PATCH 1/1] services: admin: Export rottlog-configuration accessors.
Date: Wed, 18 Oct 2023 17:10:09 +0200 [thread overview]
Message-ID: <68b1665bd37417da822cd5ca1156f03225aa0e2c.1697641168.git.zimon.toutoune@gmail.com> (raw)
In-Reply-To: <cover.1697641168.git.zimon.toutoune@gmail.com>
* gnu/services/admin.scm (<rottlog-configuration>): Rename accessors
rottlog-rottlog to rottlog-configuration-rottlog, rottlog-rc-file to
rottlog-configuration-rc-file, rottlog-rotations to
rottlog-configuration-rotations, rottlog-jobs to rottlog-configuration-jobs.
(rottlog-etc, rottlog-jobs-or-default, rottlog-service-type): Adjust
accordingly.
---
gnu/services/admin.scm | 25 +++++++++++++++----------
1 file changed, 15 insertions(+), 10 deletions(-)
diff --git a/gnu/services/admin.scm b/gnu/services/admin.scm
index 5cf74c6e4d..ce27f7f7d3 100644
--- a/gnu/services/admin.scm
+++ b/gnu/services/admin.scm
@@ -3,6 +3,7 @@
;;; Copyright © 2016-2023 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
;;; Copyright © 2023 Giacomo Leidi <goodoldpaul@autistici.org>
+;;; Copyright © 2023 Simon Tournier <zimon.toutoune@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -52,6 +53,10 @@ (define-module (gnu services admin)
rottlog-configuration
rottlog-configuration?
+ rottlog-configuration-rottlog
+ rottlog-configuration-rc-file
+ rottlog-configuration-rotations
+ rottlog-configuration-jobs
rottlog-service
rottlog-service-type
@@ -193,25 +198,25 @@ (define (default-jobs rottlog)
(define-record-type* <rottlog-configuration>
rottlog-configuration make-rottlog-configuration
rottlog-configuration?
- (rottlog rottlog-rottlog ;file-like
+ (rottlog rottlog-configuration-rottlog ;file-like
(default rottlog))
- (rc-file rottlog-rc-file ;file-like
+ (rc-file rottlog-configuration-rc-file ;file-like
(default (file-append rottlog "/etc/rc")))
- (rotations rottlog-rotations ;list of <log-rotation>
+ (rotations rottlog-configuration-rotations ;list of <log-rotation>
(default %default-rotations))
- (jobs rottlog-jobs ;list of <mcron-job>
+ (jobs rottlog-configuration-jobs ;list of <mcron-job>
(default #f)))
(define (rottlog-etc config)
`(("rottlog"
,(file-union "rottlog"
- (cons `("rc" ,(rottlog-rc-file config))
+ (cons `("rc" ,(rottlog-configuration-rc-file config))
(log-rotations->/etc-entries
- (rottlog-rotations config)))))))
+ (rottlog-configuration-rotations config)))))))
(define (rottlog-jobs-or-default config)
- (or (rottlog-jobs config)
- (default-jobs (rottlog-rottlog config))))
+ (or (rottlog-configuration-jobs config)
+ (default-jobs (rottlog-configuration-rottlog config))))
(define rottlog-service-type
(service-type
@@ -226,12 +231,12 @@ (define rottlog-service-type
;; Add Rottlog to the global profile so users can access
;; the documentation.
(service-extension profile-service-type
- (compose list rottlog-rottlog))))
+ (compose list rottlog-configuration-rottlog))))
(compose concatenate)
(extend (lambda (config rotations)
(rottlog-configuration
(inherit config)
- (rotations (append (rottlog-rotations config)
+ (rotations (append (rottlog-configuration-rotations config)
rotations)))))
(default-value (rottlog-configuration))))
--
2.38.1
next prev parent reply other threads:[~2023-10-18 15:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-18 15:08 [bug#66609] [PATCH 0/1] services: admin: Export rottlog-configuration accessors Simon Tournier
2023-10-18 15:10 ` Simon Tournier [this message]
2023-10-18 15:44 ` [bug#66609] [PATCH 1/1] " Bruno Victal
2023-10-24 16:56 ` bug#66609: " Simon Tournier
2023-10-20 22:21 ` [bug#66609] " Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=68b1665bd37417da822cd5ca1156f03225aa0e2c.1697641168.git.zimon.toutoune@gmail.com \
--to=zimon.toutoune@gmail.com \
--cc=66609@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.