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 ms5.migadu.com with LMTPS id +aC9IJ1a+mO1WgEAbAwnHQ (envelope-from ) for ; Sat, 25 Feb 2023 19:59:41 +0100 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 sCH/H51a+mMheAEAauVa8A (envelope-from ) for ; Sat, 25 Feb 2023 19:59:41 +0100 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 344B7B10F for ; Sat, 25 Feb 2023 19:59:41 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=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"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1677351581; a=rsa-sha256; cv=none; b=bKNJXbrlWpoV4IipsxY0EU1kjMyx+V9GcO3Aruzi++EbCWnEm5fnD+5j/5oJixbxG0DjlC UgWtAWf0jHyw4xdYLcP3ehr9f/BYCQRpOk9GV3DG+NSQIje13a/2v8brtcvA94ywzn8RXR S6Iminu9FZKzioH388XSmAWGy7mHTv/xUOL9/MZOjuoSgkK8QE4YyV7Ex7jFhHyiFhze41 NxRnp0yQT9klb7XAukzjazAHwNY0w5csaOpPOj46yg5EbnoQObYyu7JrxjUUORe8w0iCtJ tWweHjvEaVPbKcUMZyL1LZAruxvAiQwitI6vF9s0NvDzMXmpGWS8JOIaiohnRw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=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"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1677351581; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: 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; bh=4ixQYUDElcC7CU+qLCgYoXKJV5tHPnC40PvTsrHd57w=; b=jZiMvlKCTaThyxWhgR/vECL2JYQQimvgwd86VRnq77VBI9TNwSa02VXMuUoFYCXf2c4mVX CToedV/HrbnABnK9ZwHI6ubhVDq4qaSVLFnelg0FCiVTsXmym53X2p1J4VRIA4KjGVRqfb HbSGrcDOucuzN19SXn1BLpjp4OCBhmqBOItiK+Tvp5ShFR1rcd4Sf/fZkbDXCS0y8A28bN zvJSwrg7kbYMJ8sLBpbr6BLp5WoPvuhHbt6ZhJo8GthPfEkFSV2+a9mZIHTIC7R11evWi+ 7SPTTLcnyOEC3dB2AbyB3E5UN3H4JZw90QgbDoZ5lkDQ3WxzxqyIQIOBI1hDqw== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVzlE-0001rc-An; Sat, 25 Feb 2023 13:59:08 -0500 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 1pVzl8-0001o5-P2 for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVzl8-0000bQ-Gk for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pVzl8-0007vy-DV for guix-patches@gnu.org; Sat, 25 Feb 2023 13:59:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61789] [PATCH 07/27] services: base: Deprecate 'syslog-service' procedure. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 25 Feb 2023 18:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61789 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61789@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 61789-submit@debbugs.gnu.org id=B61789.167735150930283 (code B ref 61789); Sat, 25 Feb 2023 18:59:02 +0000 Received: (at 61789) by debbugs.gnu.org; 25 Feb 2023 18:58:29 +0000 Received: from localhost ([127.0.0.1]:41429 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzkb-0007sL-5L for submit@debbugs.gnu.org; Sat, 25 Feb 2023 13:58:29 -0500 Received: from smtpm4.myservices.hosting ([185.26.105.235]:39268) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVzkS-0007qm-Mk for 61789@debbugs.gnu.org; Sat, 25 Feb 2023 13:58:21 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm4.myservices.hosting (Postfix) with ESMTP id E83EF203BE for <61789@debbugs.gnu.org>; Sat, 25 Feb 2023 19:58:19 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 9014580079; Sat, 25 Feb 2023 19:58:19 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id eJE4eUV7KMoj; Sat, 25 Feb 2023 19:58:19 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id E952F8009A; Sat, 25 Feb 2023 19:58:18 +0100 (CET) From: Bruno Victal Date: Sat, 25 Feb 2023 18:57:53 +0000 Message-Id: <7adf5f5b68372e7b590c1af7e92c3823e748752e.1677350249.git.mirai@makinata.eu> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 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: X-Migadu-Queue-Id: 344B7B10F X-Spam-Score: -3.18 X-Migadu-Spam-Score: -3.18 X-Migadu-Scanner: scn0.migadu.com 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-Flow: FLOW_IN X-Migadu-Country: US X-TUID: G77sFTiDtQYK * doc/guix.texi (Base Services): Replace syslog-service with syslog-service-type. * gnu/services/base.scm (%default-syslog.conf): Place before . (syslog-service-type): Set default value. (syslog-service): Deprecate procedure. (%base-services): Use syslog-service-type. * gnu/system/hurd.scm (%base-services/hurd): Ditto. * gnu/system/install.scm (%installation-services): Ditto. --- doc/guix.texi | 19 ++++++------- gnu/services/base.scm | 61 +++++++++++++++++++++--------------------- gnu/system/hurd.scm | 2 +- gnu/system/install.scm | 2 +- 4 files changed, 41 insertions(+), 43 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 86edc58b40..5072bcc11f 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -18494,11 +18494,15 @@ Base Services external name servers do not even need to be queried. @end defvar -@anchor{syslog-configuration-type} @cindex syslog @cindex logging +@defvar syslog-service-type +Type of the service that runs the syslog daemon, whose value is a +@code{} object. +@end defvar + @deftp {Data Type} syslog-configuration -This data type represents the configuration of the syslog daemon. +Data type representing the configuration of the syslog daemon. @table @asis @item @code{syslogd} (default: @code{#~(string-append #$inetutils "/libexec/syslogd")}) @@ -18506,19 +18510,12 @@ Base Services @item @code{config-file} (default: @code{%default-syslog.conf}) The syslog configuration file to use. +@xref{syslogd invocation,,, inetutils, GNU Inetutils}, for more +information on the configuration file syntax. @end table @end deftp -@anchor{syslog-service} -@cindex syslog -@deffn {Scheme Procedure} syslog-service @var{config} -Return a service that runs a syslog daemon according to @var{config}. - -@xref{syslogd invocation,,, inetutils, GNU Inetutils}, for more -information on the configuration file syntax. -@end deffn - @defvar guix-service-type This is the type of the service that runs the build daemon, @command{guix-daemon} (@pxref{Invoking guix-daemon}). Its value must be a diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 423a38e39d..45e6c5f448 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -190,7 +190,7 @@ (define-module (gnu services base) syslog-configuration syslog-configuration? - syslog-service + syslog-service ; deprecated syslog-service-type %default-syslog.conf @@ -1511,6 +1511,32 @@ (define-deprecated (nscd-service #:optional (config (nscd-configuration))) Service Switch}, for an example." (service nscd-service-type config)) +;; Snippet adapted from the GNU inetutils manual. +(define %default-syslog.conf + (plain-file "syslog.conf" " + # Log all error messages, authentication messages of + # level notice or higher and anything of level err or + # higher to the console. + # Don't log private authentication messages! + *.alert;auth.notice;authpriv.none -/dev/console + + # Log anything (except mail) of level info or higher. + # Don't log private authentication messages! + *.info;mail.none;authpriv.none -/var/log/messages + + # Log \"debug\"-level entries and nothing else. + *.=debug -/var/log/debug + + # Same, in a different place. + *.info;mail.none;authpriv.none -/dev/tty12 + + # The authpriv file has restricted access. + # 'fsync' the file after each line (hence the lack of a leading dash). + authpriv.* /var/log/secure + + # Log all the mail messages in one place. + mail.* -/var/log/maillog +")) (define-record-type* syslog-configuration make-syslog-configuration @@ -1540,37 +1566,12 @@ (define syslog-service-type (umask mask) pid)))) (stop #~(make-kill-destructor)))) + (syslog-configuration) (description "Run the syslog daemon, @command{syslogd}, which is responsible for logging system messages."))) -;; Snippet adapted from the GNU inetutils manual. -(define %default-syslog.conf - (plain-file "syslog.conf" " - # Log all error messages, authentication messages of - # level notice or higher and anything of level err or - # higher to the console. - # Don't log private authentication messages! - *.alert;auth.notice;authpriv.none -/dev/console - - # Log anything (except mail) of level info or higher. - # Don't log private authentication messages! - *.info;mail.none;authpriv.none -/var/log/messages - - # Log \"debug\"-level entries and nothing else. - *.=debug -/var/log/debug - - # Same, in a different place. - *.info;mail.none;authpriv.none -/dev/tty12 - - # The authpriv file has restricted access. - # 'fsync' the file after each line (hence the lack of a leading dash). - authpriv.* /var/log/secure - - # Log all the mail messages in one place. - mail.* -/var/log/maillog -")) - -(define* (syslog-service #:optional (config (syslog-configuration))) +(define-deprecated (syslog-service #:optional (config (syslog-configuration))) + syslog-service-type "Return a service that runs @command{syslogd} and takes @var{} as a parameter. @@ -3294,7 +3295,7 @@ (define %base-services (cons tty %default-console-font)) '("tty1" "tty2" "tty3" "tty4" "tty5" "tty6"))) - (syslog-service) + (service syslog-service-type) (service agetty-service-type (agetty-configuration (extra-options '("-L")) ; no carrier detect (term "vt100") diff --git a/gnu/system/hurd.scm b/gnu/system/hurd.scm index 24fc6dbcae..20dc4ae735 100644 --- a/gnu/system/hurd.scm +++ b/gnu/system/hurd.scm @@ -93,7 +93,7 @@ (define %base-services/hurd `(("/bin/sh" ,(file-append bash "/bin/sh")) ("/usr/bin/env" ,(file-append coreutils "/bin/env")))) - (syslog-service)) + (service syslog-service-type)) (map (lambda (n) (service hurd-getty-service-type (hurd-getty-configuration diff --git a/gnu/system/install.scm b/gnu/system/install.scm index f7de0d6a09..8c7752df0e 100644 --- a/gnu/system/install.scm +++ b/gnu/system/install.scm @@ -367,7 +367,7 @@ (define* (%installation-services #:key (system (or (and=> (normal-tty "tty6") ;; The usual services. - (syslog-service) + (service syslog-service-type) ;; Use the Avahi daemon to discover substitute servers on the local ;; network. It can be faster than fetching from remote servers. -- 2.39.1