From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46225) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eIc1t-0003SP-G9 for guix-patches@gnu.org; Sat, 25 Nov 2017 10:06:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eIc1q-0000iP-9G for guix-patches@gnu.org; Sat, 25 Nov 2017 10:06:05 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:49333) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eIc1q-0000iB-6N for guix-patches@gnu.org; Sat, 25 Nov 2017 10:06:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eIc1p-0002Tp-VG for guix-patches@gnu.org; Sat, 25 Nov 2017 10:06:01 -0500 Subject: [bug#29438] [PATCH 2/2] services: configuration: Show default values of list types. Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46127) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eIc1Z-0003S0-Ng for guix-patches@gnu.org; Sat, 25 Nov 2017 10:05:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eIc1W-0000bP-Hg for guix-patches@gnu.org; Sat, 25 Nov 2017 10:05:45 -0500 Received: from mail.lassieur.org ([83.152.10.219]:56854) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eIc1W-0000aG-9Q for guix-patches@gnu.org; Sat, 25 Nov 2017 10:05:42 -0500 Received: from localhost.localdomain (88.191.118.83 [88.191.118.83]) by mail.lassieur.org (OpenSMTPD) with ESMTPSA id 935d73b5 (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128:NO) for ; Sat, 25 Nov 2017 15:05:40 +0000 (UTC) From: =?UTF-8?Q?Cl=C3=A9ment?= Lassieur Date: Sat, 25 Nov 2017 16:05:31 +0100 Message-Id: <20171125150531.26769-1-clement@lassieur.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 29438@debbugs.gnu.org * doc/guix.texi (Messaging Services): Regenerate it. * gnu/services/configuration.scm (show-default?): Fix recursion. * gnu/services/messaging.scm (show-default?): Fix recursion. (prosody-configuration)[modules-enabled]: Remove default value from docstring. --- doc/guix.texi | 7 +++++-- gnu/services/configuration.scm | 3 ++- gnu/services/messaging.scm | 6 +++--- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index a008b1c0a..bd3e1b0f2 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -13927,8 +13927,9 @@ Defaults to @samp{#f}. @deftypevr {@code{prosody-configuration} parameter} module-list modules-enabled This is the list of modules Prosody will load on startup. It looks for @code{mod_modulename.lua} in the plugins folder, so make sure that exists too. -Documentation on modules can be found at: @url{http://prosody.im/doc/modules}. -Defaults to @samp{%default-modules-enabled}. +Documentation on modules can be found at: +@url{http://prosody.im/doc/modules}. +Defaults to @samp{("roster" "saslauth" "tls" "dialback" "disco" "carbons" "private" "blocklist" "vcard" "version" "uptime" "time" "ping" "pep" "register" "admin_adhoc")}. @end deftypevr @deftypevr {@code{prosody-configuration} parameter} string-list modules-disabled @@ -14032,6 +14033,7 @@ Defaults to @samp{#f}. @deftypevr {@code{prosody-configuration} parameter} string-list disable-sasl-mechanisms Set of mechanisms that will never be offered. See @url{https://prosody.im/doc/modules/mod_saslauth}. +Defaults to @samp{("DIGEST-MD5")}. @end deftypevr @deftypevr {@code{prosody-configuration} parameter} boolean s2s-require-encryption? @@ -14199,6 +14201,7 @@ Hostname of the component. @deftypevr {@code{prosody-configuration} parameter} non-negative-integer-list component-ports Port(s) Prosody listens on for component connections. +Defaults to @samp{(5347)}. @end deftypevr @deftypevr {@code{prosody-configuration} parameter} string component-interface diff --git a/gnu/services/configuration.scm b/gnu/services/configuration.scm index 0a2219e74..c45340f02 100644 --- a/gnu/services/configuration.scm +++ b/gnu/services/configuration.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015 Andy Wingo ;;; Copyright © 2017 Mathieu Othacehe +;;; Copyright © 2017 Clément Lassieur ;;; ;;; This file is part of GNU Guix. ;;; @@ -165,7 +166,7 @@ (configuration-field-default-value-thunk f) (lambda _ '%invalid)))) (define (show-default? val) - (or (string? default) (number? default) (boolean? default) + (or (string? val) (number? val) (boolean? val) (and (symbol? val) (not (eq? val '%invalid))) (and (list? val) (and-map show-default? val)))) `(deftypevr (% (category diff --git a/gnu/services/messaging.scm b/gnu/services/messaging.scm index c75c71585..d57a7562a 100644 --- a/gnu/services/messaging.scm +++ b/gnu/services/messaging.scm @@ -354,8 +354,8 @@ Example: @code{(admins '(\"user1@@example.com\" \"user2@@example.net\"))}" (module-list %default-modules-enabled) "This is the list of modules Prosody will load on startup. It looks for @code{mod_modulename.lua} in the plugins folder, so make sure that exists too. -Documentation on modules can be found at: @url{http://prosody.im/doc/modules}. -Defaults to @samp{%default-modules-enabled}." +Documentation on modules can be found at: +@url{http://prosody.im/doc/modules}." common) (modules-disabled @@ -722,7 +722,7 @@ See also @url{http://prosody.im/doc/modules/mod_muc}." (display c)) str)))) (define (show-default? val) - (or (string? default) (number? default) (boolean? default) + (or (string? val) (number? val) (boolean? val) (and (list? val) (and-map show-default? val)))) (format #t "@deftypevr {@code{~a} parameter} ~a ~a\n~a\n" configuration-name field-type field-name field-docs) -- 2.15.0