From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id 0EjaB3X1L2WjtQAAG6o9tA:P1 (envelope-from ) for ; Wed, 18 Oct 2023 17:10:45 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 0EjaB3X1L2WjtQAAG6o9tA (envelope-from ) for ; Wed, 18 Oct 2023 17:10:45 +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 3C5EC5A618 for ; Wed, 18 Oct 2023 17:10:43 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=TbiYuKjj; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1697641843; a=rsa-sha256; cv=none; b=JMajr6mLaHy0092DuSivc+DG1LUvTScg/2RS6LqKBjqhbapcDDWS3Zn//x2pI91UWVmxa9 OYioIXntJAcat2rAvgH6rSzF0c/0/LYw8da9Wrfm4R6QNnPGTcKP8FxmqDigOmiYsW8v/E WSW0r2l3SN2quQKWZuXphI06WOvICO/OmpLqAZZx52b2qU+twUeEiXZejMoVcO54Xtr46K sYrSgvLM5AOfB9Vuj8iUKA8k6Ql5TLdmNCbCcZoywo+U8JAwCL9bz0k47Ao/IRCm3dVqSw TM2tGkTzzAu6RFFKHUH9rYxZarMfVYPkIuyZg01o0U+1YIxDgrkY3fpML5dQjg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=TbiYuKjj; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1697641843; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=sP7OoyOBP/GnSXlxZ6XBnr9Uc8Mj9yzK3/j+z9HJInY=; b=mtgDVstq2QykSjthMoIGkQ9IIjzlj0J+T/iUou1+WAQwhQRLk/8eh2JYFnkPHM2PyfZltR cA6BNUDw+AeyHUK1GHwm/3BKfB3rFy1RZzG34w98nHdUGQagd1xVeE7O2vfPbnou2nQKZ/ HcQjp22EiCN++PT24/KATlNa5mEk8CSN8wdmw6/t2f8WRD+ahkQ8QwZZi2sLQPJd6LByir Km3bMu9A5rcs5sxRmn1y4tI5kJkqqX/FgramvosPY2K2keRpT9oZeJKlO1nCvXKsypzUP0 RpWLs4e9eIeWWxLAvdkhYa6Kn2RZ2JXW24CALkFvAQn13iPbK7tYKV7bizsZDQ== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qt8By-000552-5G; Wed, 18 Oct 2023 11:10:38 -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 1qt8Bw-00054U-Pt for guix-patches@gnu.org; Wed, 18 Oct 2023 11:10:36 -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 1qt8Bw-0007SY-Hy for guix-patches@gnu.org; Wed, 18 Oct 2023 11:10:36 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qt8CM-0003h2-I4 for guix-patches@gnu.org; Wed, 18 Oct 2023 11:11:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66609] [PATCH 1/1] services: admin: Export rottlog-configuration accessors. Resent-From: Simon Tournier Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 18 Oct 2023 15:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66609 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 66609@debbugs.gnu.org Cc: Simon Tournier Received: via spool by 66609-submit@debbugs.gnu.org id=B66609.169764185314176 (code B ref 66609); Wed, 18 Oct 2023 15:11:02 +0000 Received: (at 66609) by debbugs.gnu.org; 18 Oct 2023 15:10:53 +0000 Received: from localhost ([127.0.0.1]:34445 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qt8CD-0003ga-3h for submit@debbugs.gnu.org; Wed, 18 Oct 2023 11:10:53 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:39315) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qt8CA-0003gK-ML for 66609@debbugs.gnu.org; Wed, 18 Oct 2023 11:10:52 -0400 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-3175e1bb38cso639040f8f.1 for <66609@debbugs.gnu.org>; Wed, 18 Oct 2023 08:10:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697641819; x=1698246619; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=sP7OoyOBP/GnSXlxZ6XBnr9Uc8Mj9yzK3/j+z9HJInY=; b=TbiYuKjjtRDcnMebjDAfidGoBKU5HncHX6fWOcwMWANaBkqhZk7sVW1KHdcvxTijUi noIguqnQ+D4423i8VnOpNloWQTWaxu1A2+xMMc7YvoBpCwj8wT6ycOgCNpqKDN7VWPQu ZJVM5b98OhDCf58WIL1BKYhKUlExiUFiimjJ29rMj0qTgiBOESvMo3MZgF4GozGomhNv O+IKbA+43PvXBJqndXu+IXnFA1AepzNkKF2r1wA80D9TKrL0fI4L5zMdbdo8Xl+BLe76 MNEVj+I2ceGij6hZGnCtEUNeINS6XTgWeTfWaEkC4vrSUyvjJCdcUKpUcvqADRMMXr6J n4qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697641819; x=1698246619; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sP7OoyOBP/GnSXlxZ6XBnr9Uc8Mj9yzK3/j+z9HJInY=; b=ldDfIycVNIeKUn4MQvBcHkytVgOGuv3Uz541NtOqb8xiU6obWo0rlZRhi+9vg4W494 KHRVIK/E913iCmBF9LmIQuh4gsSrKbcKY6PUbeEHLFVB3gdLaaVPuGqD5dUoutSIrJE7 2iav59Fy0igkj+da1A0QASm5LKcOPDnZotiZts9wCS34IqVrfIUD0/uCBDgi6sS31D5b Khnfc4H+G7U++TemUTdGIp5+aDHX0xzDA5U9FdFICI5HdyY099BLN8F7kQIbC5tSjheP FtlyltUvKlP4GQoUOs7oNBzrMYFFnccVq8AnYuKaaeFhNC9DTZ9ItlpSNBq0Z10HSHcR kH/g== X-Gm-Message-State: AOJu0YwtTubNbglO09Ujb2N6dK4PiG0nIgPFqAFziK2D0q/Poi8q1XXh XK/7c73QjYFl9yTgFmYTJcz03FShFbg= X-Google-Smtp-Source: AGHT+IHcNwA2i9E8TAXbJoyTSHLzBrj8uTlH5wKpNp6m6NIIbNZpz+VQMmdgQm53Nh/5La7U9OiOpw== X-Received: by 2002:adf:a112:0:b0:32d:a860:324e with SMTP id o18-20020adfa112000000b0032da860324emr4203221wro.3.1697641818497; Wed, 18 Oct 2023 08:10:18 -0700 (PDT) Received: from localhost.localdomain ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id j14-20020adfea4e000000b0032d81837433sm2368314wrn.30.2023.10.18.08.10.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 08:10:17 -0700 (PDT) From: Simon Tournier Date: Wed, 18 Oct 2023 17:10:09 +0200 Message-Id: <68b1665bd37417da822cd5ca1156f03225aa0e2c.1697641168.git.zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx1.migadu.com X-Migadu-Spam-Score: 2.83 X-Spam-Score: 2.83 X-Migadu-Queue-Id: 3C5EC5A618 X-TUID: ZUt7yWqCVMMe * gnu/services/admin.scm (): 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 ;;; Copyright © 2020 Brice Waegeneire ;;; Copyright © 2023 Giacomo Leidi +;;; Copyright © 2023 Simon Tournier ;;; ;;; 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 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 + (rotations rottlog-configuration-rotations ;list of (default %default-rotations)) - (jobs rottlog-jobs ;list of + (jobs rottlog-configuration-jobs ;list of (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