From unknown Sat Sep 20 08:01:40 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#26137 <26137@debbugs.gnu.org> To: bug#26137 <26137@debbugs.gnu.org> Subject: Status: [PATCH 0/6 v2] Add tlp service. Reply-To: bug#26137 <26137@debbugs.gnu.org> Date: Sat, 20 Sep 2025 15:01:40 +0000 retitle 26137 [PATCH 0/6 v2] Add tlp service. reassign 26137 guix-patches submitter 26137 Mathieu Othacehe severity 26137 normal tag 26137 fixed patch thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 17 06:32:08 2017 Received: (at submit) by debbugs.gnu.org; 17 Mar 2017 10:32:08 +0000 Received: from localhost ([127.0.0.1]:59655 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1copB1-0000XZ-Sv for submit@debbugs.gnu.org; Fri, 17 Mar 2017 06:32:08 -0400 Received: from eggs.gnu.org ([208.118.235.92]:40845) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1copAx-0000X1-9a for submit@debbugs.gnu.org; Fri, 17 Mar 2017 06:32:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1copAr-00029O-7n for submit@debbugs.gnu.org; Fri, 17 Mar 2017 06:31:58 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_40,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:53134) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1copAr-000297-4k for submit@debbugs.gnu.org; Fri, 17 Mar 2017 06:31:57 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60047) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1copAp-0004K3-VS for guix-patches@gnu.org; Fri, 17 Mar 2017 06:31:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1copAk-00022B-Up for guix-patches@gnu.org; Fri, 17 Mar 2017 06:31:55 -0400 Received: from mail-wm0-x235.google.com ([2a00:1450:400c:c09::235]:33629) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1copAk-000221-PY for guix-patches@gnu.org; Fri, 17 Mar 2017 06:31:50 -0400 Received: by mail-wm0-x235.google.com with SMTP id v203so7890391wmg.0 for ; Fri, 17 Mar 2017 03:31:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=rQBE4ywCu8iRvJAXCt4uOtcmOIxO359LLPcgKwcOs7E=; b=IqeS0apglZMqAJqj4N/rzCP7RadlFZJOHCUydFIUUEeSV/G/rmdjWtJmku/15WOrgv R51u9qkorM/xVDDp8ltXumtVGp6KNRvSfmCS46AhgRujKWz+doy/FhBU23cQBfyuyH6R IKeCZBYsTVnzksnS4pwdkf2coLf9BS5pHVCKwTqVV8lgePflwP2NzaD6aNLSc16QHfEe xQauMNsWSs6LZdl1HJHwqN66ZMOK3GGzupG51x0695ApjcfI/X7KxvVVfSJhvFGzWsl8 Ek6QvAfDt49OoXsiXkqnIdincPfKi0hiCurfLykBjfUDOcygwsDblek5boOeeI1j13rQ m/sA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=rQBE4ywCu8iRvJAXCt4uOtcmOIxO359LLPcgKwcOs7E=; b=rp3PSIByZnjclt8hyVL6emSpi71qP1wsWOoKaDdcK5XLmZgnuVTCv6UYMnOuQwZI19 ySsgz2OlrG0AB6T2mp7fhjMKMph34Uggjm3gZrMIHDWJvQKivwYfbwOLmEo7gUuVR4GX +qh5NZEdLX9I2bid0XPqeJNSY7btnjW3P0z2MAKUEEGnwlNPXJgfetR0G8vKJNGvpnPu 7kYOncr5mSafM5xYOwAO+92KVFba44Dv7eaA7notdZ87eC7/G0DpLZrspng88GnUVbiz w8DLP8o5HKaQp7YJeNn+dXSukODNOsEMIW5b0KpJNGFRRTKLp1foOJdE65atPPnWAu63 Sh/g== X-Gm-Message-State: AFeK/H24lH/vLzP15Q38q07ip33oke3l5aTtVY4Nx4ZqPk5oT4JEINc9RWioXnm+qUHlew== X-Received: by 10.28.98.2 with SMTP id w2mr2264586wmb.66.1489746709639; Fri, 17 Mar 2017 03:31:49 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id v3sm9522211wrb.39.2017.03.17.03.31.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Mar 2017 03:31:48 -0700 (PDT) From: Mathieu Othacehe To: guix-patches@gnu.org Subject: [PATCH 0/6 v2] Add tlp service. Date: Fri, 17 Mar 2017 11:31:38 +0100 Message-Id: <20170317103138.7557-1-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit Cc: Mathieu Othacehe X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) Hi Guix, Here's the v2 of this serie. The v1 was published without debbugs. This version addresses issues pointed out by Clément. Thank you, Mathieu Mathieu Othacehe (6): gnu: tlp: Read configuration from /etc/tlp. services: Factorize define-maybe macro. services: configuration: Rewrite id procedure. gnu: Add tlp service. services: openvpn: Fix a typo which was corrected in generated doc. doc: Re-generate openvpn service documentation. doc/guix.texi | 587 ++++++++++++++++++++++++++++++++++++++--- gnu/local.mk | 2 + gnu/packages/linux.scm | 2 +- gnu/services/configuration.scm | 29 +- gnu/services/messaging.scm | 23 +- gnu/services/pm.scm | 404 ++++++++++++++++++++++++++++ gnu/services/vpn.scm | 3 +- 7 files changed, 977 insertions(+), 73 deletions(-) create mode 100644 gnu/services/pm.scm -- 2.12.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 17 06:34:58 2017 Received: (at 26137) by debbugs.gnu.org; 17 Mar 2017 10:34:58 +0000 Received: from localhost ([127.0.0.1]:59661 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1copDm-0000cQ-C2 for submit@debbugs.gnu.org; Fri, 17 Mar 2017 06:34:58 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:33638) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1copDl-0000c8-6g for 26137@debbugs.gnu.org; Fri, 17 Mar 2017 06:34:57 -0400 Received: by mail-wm0-f68.google.com with SMTP id n11so2540120wma.0 for <26137@debbugs.gnu.org>; Fri, 17 Mar 2017 03:34:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=xPWDoqvF1D7KppoXD3AG8CkSzx5eKerZdqeqIyS6RBg=; b=ehdhNhw/gy8+zhsCYalF7DEMeGuW++0L6+SVnERxS9Jw51KPcHhrLfDUFxJ9fGX/Nv SBN9JXUN9X+JF+QUq9whcQjBxhp95kefR98PeNPOGqbPd0cvTLy8qweQ6csNU8EwRhL1 MQ7MD0Pmt0BpUwhqS8qHEywrB8aWRIaBLAjXPmMm8iflRuRLo3/1gg+yrr3ctZwCo9/a E7+dJWuo1a58CvvdWLMhTScyHBQ+rK7i9YpNcpJPkIZ2moQoFHDkVILbjICoFQpX40B4 R3WjHs13XpU4ujJCo2+NJhXieN31a4FWfb5mrVbVqVZPCzfuDamqwmD/haWWLadQkY0G fEsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=xPWDoqvF1D7KppoXD3AG8CkSzx5eKerZdqeqIyS6RBg=; b=hcdYr/e5zJs4shl+7NtdAYfvkS09ZXKPuugReQvqTdQay9qgL6m/ahqoBy6cwKDmB1 LgECRI5baCOD+Vxz8qFWU6eaQEYhF1DdLDDFBS0hHy8sOvAY3STFFPvj5dp1SdHpLDdy dN7ohW7NghUlD+gu2hAiWoLu32mKgKcJ+lh+50LanQhnNwAgEpaa8JvCQclOGRfdhjKu 8tMzO73dOTnXlIPlRLgFlC9EHqX3ri0DTdOVWsJOYkMZBxyhzNyHB3vZquH0TDkKUp5F ErDDN+gk5CBGtlZdA8GBAUAVqb3KeLj5ezunQiDKzNRDk7uWNWK2HrnPAKAnLtCFYHpM ewag== X-Gm-Message-State: AFeK/H2ZiqiC16Ba57ugIZtMp5vQc1BIbk5ICMqI8KSDmgqkwrzAAbT3xawJKHssrxfaHQ== X-Received: by 10.28.36.86 with SMTP id k83mr2038777wmk.90.1489746891475; Fri, 17 Mar 2017 03:34:51 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id x127sm2149142wmf.31.2017.03.17.03.34.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Mar 2017 03:34:50 -0700 (PDT) From: Mathieu Othacehe To: 26137@debbugs.gnu.org Subject: [PATCH 1/6] gnu: tlp: Read configuration from /etc/tlp. Date: Fri, 17 Mar 2017 11:34:25 +0100 Message-Id: <20170317103430.7629-1-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.0 X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 26137 Cc: Mathieu Othacehe X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) * gnu/packages/linux.scm (tlp): Set TLP_CONF to "/etc/tlp". --- gnu/packages/linux.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 4557194e8..61afc9b00 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -3494,7 +3494,7 @@ Light is the successor of lightscript.") (setenv "TLP_BIN" (string-append out "/bin")) (setenv "TLP_TLIB" (string-append out "/share/tlp-pm")) (setenv "TLP_ULIB" (string-append out "/lib/udev")) - (setenv "TLP_CONF" (string-append out "/etc/tlp")) + (setenv "TLP_CONF" "/etc/tlp") (setenv "TLP_SHCPL" (string-append out "/share/bash-completion/completions")) (setenv "TLP_MAN" (string-append out "/share/man"))))) -- 2.12.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 17 06:35:00 2017 Received: (at 26137) by debbugs.gnu.org; 17 Mar 2017 10:35:01 +0000 Received: from localhost ([127.0.0.1]:59665 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1copDo-0000cj-Kw for submit@debbugs.gnu.org; Fri, 17 Mar 2017 06:35:00 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:34323) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1copDm-0000cA-0a for 26137@debbugs.gnu.org; Fri, 17 Mar 2017 06:34:58 -0400 Received: by mail-wm0-f66.google.com with SMTP id u132so2524770wmg.1 for <26137@debbugs.gnu.org>; Fri, 17 Mar 2017 03:34:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2JHQN5zyOKv6qzg5raL0RCSAq/dAmMXZt2oN3O/EpjM=; b=kbzJOFkiJj60EHmzA2inThOeRlqps9/NVGBzIo6+Z8ngm4Y5XlQp9GMBmqQfXaYrJp 3GKtF2r5TuPDx+Sz+w1nH5qCTJcScCZvRf2Y1xojJWIkaxW7fYvhMzt2Rn+lSmRyXliN EdAhq7ULTubgZN4vcIwLaIwgxJUcHcbkSokeD6Z534JJLIhbEofbUjIXe+RJgqJ00ujR +eTlT/aIxs1dNPBIeCNkTtffeju8gV1ADIfzcKBoH9/3OUZcIdBUgTUNHlRsURIcIaHJ 39AsgGKt2idUQaURxFbcGWNVwNypTuEtQl43fm2xRHb4D9iOgbjO31hcxObHbfonfqEK BRnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2JHQN5zyOKv6qzg5raL0RCSAq/dAmMXZt2oN3O/EpjM=; b=uigs0P0bPegkDJGsA8t2h7ZbnYw54rOPmtHUDihkJtUNi09DtA4x7O9fZAtp2PHeEM vOe/6TYQPZNSoFdbq/EBqB2VvEE0I8CIhGKMS9KWI684vbwNs/T7dpub3k+Dp89qdiNo LaY9EB6gckXIwc/KlrQPsUEXcSJh+vqyK5/fssLL4XN6ewcvU0QVjQ6TSFNCxKfSrY0v m1PjlFHXFek3CB9zYQSFhCU5oKWY3qVeH5BWzPg2+SWvlsVGZKgVJvmXwGEdDQHJ53lR amoWsgAuvVYKrnzuVKGuYyWzbrsEQ18Q3djbTs7vPr62m1YP99KRNephuYGMlec1jWWr 8dLw== X-Gm-Message-State: AFeK/H2cGwIDqNmMd6rFZ6adt2sT5h8TDlLo/5eCvfcx5PtW7Ledt8gMb38jTTBM5HG9Pg== X-Received: by 10.28.145.130 with SMTP id t124mr2145241wmd.39.1489746892224; Fri, 17 Mar 2017 03:34:52 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id x127sm2149142wmf.31.2017.03.17.03.34.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Mar 2017 03:34:51 -0700 (PDT) From: Mathieu Othacehe To: 26137@debbugs.gnu.org Subject: [PATCH 2/6] services: Factorize define-maybe macro. Date: Fri, 17 Mar 2017 11:34:26 +0100 Message-Id: <20170317103430.7629-2-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170317103430.7629-1-m.othacehe@gmail.com> References: <20170317103430.7629-1-m.othacehe@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 26137 Cc: Mathieu Othacehe X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) * gnu/services/configuration.scm (id): New procedure extracted from define-configuration. (define-maybe): New exported procedure, moved from messaging.scm. * gnu/services/messaging.scm (define-maybe): Remove it. (id): Move declaration inside define-all-configurations which is now the only caller procedure. --- gnu/services/configuration.scm | 24 +++++++++++++++++++++--- gnu/services/messaging.scm | 23 ++++------------------- 2 files changed, 25 insertions(+), 22 deletions(-) diff --git a/gnu/services/configuration.scm b/gnu/services/configuration.scm index 2ad3a637a..f59920d5a 100644 --- a/gnu/services/configuration.scm +++ b/gnu/services/configuration.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015 Andy Wingo +;;; Copyright © 2017 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; @@ -36,6 +37,7 @@ configuration-field-default-value-thunk configuration-field-documentation serialize-configuration + define-maybe define-configuration validate-configuration generate-documentation @@ -85,9 +87,7 @@ (configuration-field-name field) val)))) fields)) -(define-syntax define-configuration - (lambda (stx) - (define (id ctx part . parts) +(define (id ctx part . parts) (let ((part (syntax->datum part))) (datum->syntax ctx @@ -95,6 +95,24 @@ (() part) (parts (symbol-append part (syntax->datum (apply id ctx parts)))))))) + +(define-syntax define-maybe + (lambda (x) + (syntax-case x () + ((_ stem) + (with-syntax + ((stem? (id #'stem #'stem #'?)) + (maybe-stem? (id #'stem #'maybe- #'stem #'?)) + (serialize-stem (id #'stem #'serialize- #'stem)) + (serialize-maybe-stem (id #'stem #'serialize-maybe- #'stem))) + #'(begin + (define (maybe-stem? val) + (or (eq? val 'disabled) (stem? val))) + (define (serialize-maybe-stem field-name val) + (when (stem? val) (serialize-stem field-name val))))))))) + +(define-syntax define-configuration + (lambda (stx) (syntax-case stx () ((_ stem (field (field-type def) doc) ...) (with-syntax (((field-getter ...) diff --git a/gnu/services/messaging.scm b/gnu/services/messaging.scm index 34723dc11..715d6181f 100644 --- a/gnu/services/messaging.scm +++ b/gnu/services/messaging.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2017 Clément Lassieur +;;; Copyright © 2017 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; @@ -49,27 +50,11 @@ ;;; ;;; Code: -(define-syntax-rule (id ctx parts ...) - "Assemble PARTS into a raw (unhygienic) identifier." - (datum->syntax ctx (symbol-append (syntax->datum parts) ...))) - -(define-syntax define-maybe - (lambda (x) - (syntax-case x () - ((_ stem) - (with-syntax - ((stem? (id #'stem #'stem #'?)) - (maybe-stem? (id #'stem #'maybe- #'stem #'?)) - (serialize-stem (id #'stem #'serialize- #'stem)) - (serialize-maybe-stem (id #'stem #'serialize-maybe- #'stem))) - #'(begin - (define (maybe-stem? val) - (or (eq? val 'disabled) (stem? val))) - (define (serialize-maybe-stem field-name val) - (when (stem? val) (serialize-stem field-name val))))))))) - (define-syntax define-all-configurations (lambda (stx) + (define-syntax-rule (id ctx parts ...) + "Assemble PARTS into a raw (unhygienic) identifier." + (datum->syntax ctx (symbol-append (syntax->datum parts) ...))) (define (make-pred arg) (lambda (field target) (and (memq (syntax->datum target) `(common ,arg)) field))) -- 2.12.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 17 06:35:01 2017 Received: (at 26137) by debbugs.gnu.org; 17 Mar 2017 10:35:01 +0000 Received: from localhost ([127.0.0.1]:59668 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1copDo-0000cq-UF for submit@debbugs.gnu.org; Fri, 17 Mar 2017 06:35:01 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:35520) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1copDm-0000cC-Hk for 26137@debbugs.gnu.org; Fri, 17 Mar 2017 06:34:58 -0400 Received: by mail-wm0-f68.google.com with SMTP id z133so2529958wmb.2 for <26137@debbugs.gnu.org>; Fri, 17 Mar 2017 03:34:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=wZNQxuy7suQmUbbwBwLAoC5rcTQ5fd7/NWuTk3MiUY8=; b=nKLtqrFFMwbXIhfdsNJ1LxmW8NIky0fvLCJBPIcF2POg5ytXW0BrOHMsxw7nl9wDam 6qpbhhs56V6S2qSVXIx7rGxWnwL0ygbIJC1EnG/SCRCiC2g1cAV69oEi/J0E1xqDRIan iA/M57xiT9MBTMjywLmNwamLM6wUdy4VuFJIplycd1y35n30vTRnrVeHq7AEkJ/3Nfy/ FSESa2zwx4x9D8ewWDAACRHgO4T2Cm7bki1+nyg6oBPZbX91dFwWu7BO4ZHtx4I11Ct8 3132div76cN8MwSSSz3LL9l3OU+zNtGiVFYlMezfGXZTEawhEDI8/FUp3sj2ypl5HYuw suKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=wZNQxuy7suQmUbbwBwLAoC5rcTQ5fd7/NWuTk3MiUY8=; b=sEvx0jtDQ/Y76KRQijsSERplxGr8eicnhxizvGBPFwcMlkUoGYYg4zddA4NnRnUZB9 3dXwM2ZhAANVACSCoO6UpEo+jl2/8RJIgHYf0etv5i77Z+wttcdOVylm4Z34EOVVG9Yr qmRT9OE9pY7cL3XEHvuro40Jf7O+j81pLvwW5LAtXyRsbGkUDxgFBaqYFBXFJAnj4hPw h034/ghhmch1X4Ep8uQadBJzWlXsYr7EWcYdZD7d3ABRY9+V2YCzw0Zthpn7iCzRKJiV Sx1+HN1+l5fLyTa0VX3WF6M8gEetK+j2WKNSVvLNsuP659LvSmwtcEjL+VhHVehi160/ 3fDA== X-Gm-Message-State: AFeK/H32KJbbucaeElysbmlToWX/LoY1E0vi/qUOB4rpQ2gpDrp+D90OfK/gSy+vsXL9AA== X-Received: by 10.28.28.69 with SMTP id c66mr2254904wmc.28.1489746893071; Fri, 17 Mar 2017 03:34:53 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id x127sm2149142wmf.31.2017.03.17.03.34.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Mar 2017 03:34:52 -0700 (PDT) From: Mathieu Othacehe To: 26137@debbugs.gnu.org Subject: [PATCH 3/6] services: configuration: Rewrite id procedure. Date: Fri, 17 Mar 2017 11:34:27 +0100 Message-Id: <20170317103430.7629-3-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170317103430.7629-1-m.othacehe@gmail.com> References: <20170317103430.7629-1-m.othacehe@gmail.com> X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 26137 Cc: Mathieu Othacehe X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) * gnu/services/configuration.scm (id): Replace it using the more concise version found in messaging.scm. --- gnu/services/configuration.scm | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/gnu/services/configuration.scm b/gnu/services/configuration.scm index f59920d5a..4ee92e35f 100644 --- a/gnu/services/configuration.scm +++ b/gnu/services/configuration.scm @@ -87,14 +87,9 @@ (configuration-field-name field) val)))) fields)) -(define (id ctx part . parts) - (let ((part (syntax->datum part))) - (datum->syntax - ctx - (match parts - (() part) - (parts (symbol-append part - (syntax->datum (apply id ctx parts)))))))) +(define-syntax-rule (id ctx parts ...) + "Assemble PARTS into a raw (unhygienic) identifier." + (datum->syntax ctx (symbol-append (syntax->datum parts) ...))) (define-syntax define-maybe (lambda (x) -- 2.12.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 17 06:35:05 2017 Received: (at 26137) by debbugs.gnu.org; 17 Mar 2017 10:35:05 +0000 Received: from localhost ([127.0.0.1]:59674 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1copDt-0000dz-GJ for submit@debbugs.gnu.org; Fri, 17 Mar 2017 06:35:05 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:35529) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1copDo-0000cF-Bf for 26137@debbugs.gnu.org; Fri, 17 Mar 2017 06:35:00 -0400 Received: by mail-wm0-f67.google.com with SMTP id z133so2530036wmb.2 for <26137@debbugs.gnu.org>; Fri, 17 Mar 2017 03:35:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mxu+nqLqbINnP+l27Ak0gWkQjjzzIldL3ULtAHgodAA=; b=CuVM2VXgq+cH2B5ylOs8+Yc+d2knLeLQv5UT6qJlK65hgzOMFlnrkNqt9ut6SxF665 vqccq0nZWIb9tGuDta8i4UtRpH5EV/07bcFaaLhiyB7iuUKBbxCgQobQtIwi0Q2SDgjM qWh5LemsxYLOe6/YZPRX0q7TGTPdQdJ1GXkxQNZ5e+lM+jTjjma0BfGX2TICitrVcWN/ xqucd5M5sujzSPGqGh2SeV0Hcrns7Z2GtC8MeYLQI0tAW67KRK5tW6DG0hb0ZwTnYFTR 1G9ufB2xhUd98wA4G4IIxZMf1VwJXnwvgWAxl6/206jfvIiS3XrEFhWYjGjw35JngHXU 3kRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=mxu+nqLqbINnP+l27Ak0gWkQjjzzIldL3ULtAHgodAA=; b=GyKe7uchYYeG+6ifBX+H54LIhlky8U+cMWFD+p/cgj7AoHvxfaMTwi7yO/5KlsrVJ6 hDyhO1qYq5spjF9rFK3P6H/akmniGzsShcdy4J+O1ESYIgtOHcZyDOSsHqkPUCuIN/5i cUvsDCoAwInW4QD5DnhPC6wF6YNSRU1CPmTsu7YhrFtTdvSKZkmthtzt8ZOffG3nn0oK 04K3Cuzs6H/uNJ2lnoZcZbImmN2IG+wlW95nTOHPC73iq3I+z2i3FwqK1ga12ZaHd+AT FPhk+gXZUSSvnrhDSaUH4K/qVPDCMXNZ/73becTAh1ncM4/Yu4MzomQyruL6aA3ZoqQo 46YQ== X-Gm-Message-State: AFeK/H20XEhAY3G90SoeCwEKdU6LUz0urZ4cT3HJWfJHUT0qI2C4VnFIc0GdAKTwVuGyQQ== X-Received: by 10.28.47.205 with SMTP id v196mr337024wmv.20.1489746894667; Fri, 17 Mar 2017 03:34:54 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id x127sm2149142wmf.31.2017.03.17.03.34.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Mar 2017 03:34:54 -0700 (PDT) From: Mathieu Othacehe To: 26137@debbugs.gnu.org Subject: [PATCH 5/6] services: openvpn: Fix a typo which was corrected in generated doc. Date: Fri, 17 Mar 2017 11:34:29 +0100 Message-Id: <20170317103430.7629-5-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170317103430.7629-1-m.othacehe@gmail.com> References: <20170317103430.7629-1-m.othacehe@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 26137 Cc: Mathieu Othacehe X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) * gnu/services/vpn.scm (define-split-configuration): Fix typo. --- gnu/services/vpn.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gnu/services/vpn.scm b/gnu/services/vpn.scm index 844a11b3d..e1a04a985 100644 --- a/gnu/services/vpn.scm +++ b/gnu/services/vpn.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2017 Julien Lepiller ;;; Copyright © 2017 Clément Lassieur +;;; Copyright © 2017 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; @@ -279,7 +280,7 @@ by the authority given in @code{ca}.") (key (string "/etc/openvpn/client.key") - "The key of the machine the daemon is running on. It must be the whose + "The key of the machine the daemon is running on. It must be the key whose certificate is @code{cert}.") (comp-lzo? -- 2.12.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 17 06:35:06 2017 Received: (at 26137) by debbugs.gnu.org; 17 Mar 2017 10:35:06 +0000 Received: from localhost ([127.0.0.1]:59676 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1copDt-0000e2-Od for submit@debbugs.gnu.org; Fri, 17 Mar 2017 06:35:06 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:33675) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1copDp-0000cI-HL for 26137@debbugs.gnu.org; Fri, 17 Mar 2017 06:35:03 -0400 Received: by mail-wm0-f65.google.com with SMTP id n11so2540436wma.0 for <26137@debbugs.gnu.org>; Fri, 17 Mar 2017 03:35:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ih9KmOg+EIZfo1if1ymBu3nmWbi4gjjLi/oaojN+I9c=; b=SPJ1+erRzacLhro/h6EijuZw7MC0yDcg0SF7UBDKq1+t0x01zbZ4K9p3scmDRLRUWw 0TePzXsIH8LQt7CsnOXH5/PJ855kN6CdhsmvwVyQ5/X1b9IvoBZiTYDgViTZE44hZ/6o 2FhhUxb/m4qosLiy4zYaaogPd8bzd66zQ3yeniqMCk1u+xpGJMGzsOAw8mD3q6V8Rwta WkZHTY4MUIYdtnwypxJsmypiyjRHqkoJR15/aWyk7vO2LGZvnNFpiB5NgTsezzU1hVYR 8EzB3wVT7PyAt6ibk2OCFRgfi9T7b2T4aHeLXXcTaNDxtn8dabgX0o7JjRedkznpof4m 9c/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ih9KmOg+EIZfo1if1ymBu3nmWbi4gjjLi/oaojN+I9c=; b=cCZ2DH/bAWV/kbgCuGOim2pFe7U7kGCiVtlmy/XMGJWasUm/PdSnJx9aB3i/r06cRw SBWXmuAOzETJGoz9yy5wcDyYz2jLsT26imyNCcwoJsuPI6L7RtHgk8M9L+Iq+hkb+n4K sptwqRWlU0xL0DyXkwDtn5whaYNM7EfN/f/ToA/RZEPngFIsG+0q3ie/GRWiXct/gg8w 3NEosZhPo43bFEwn2mH07O6XBqVrVUMF2K87JXNBVJW6J2u3swfJK4eQFwq//px/Ik9C Q6X+ROmf8W3Ss+mtFALMh9jwmc4wVA6mwO+iq/AFwqOEkp4PdA0hFTevn+Vh9GopU7cg EDGw== X-Gm-Message-State: AFeK/H3gIWGeEYifvxXgH2wcSaNlxFCT81qJ430FJtLuTuj71u4F/cAxZx5Xx3UgLciboA== X-Received: by 10.28.109.147 with SMTP id b19mr2161843wmi.69.1489746895574; Fri, 17 Mar 2017 03:34:55 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id x127sm2149142wmf.31.2017.03.17.03.34.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Mar 2017 03:34:54 -0700 (PDT) From: Mathieu Othacehe To: 26137@debbugs.gnu.org Subject: [PATCH 6/6] doc: Re-generate openvpn service documentation. Date: Fri, 17 Mar 2017 11:34:30 +0100 Message-Id: <20170317103430.7629-6-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170317103430.7629-1-m.othacehe@gmail.com> References: <20170317103430.7629-1-m.othacehe@gmail.com> X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 26137 Cc: Mathieu Othacehe X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) * doc/guix.texi (VPN Services): Generate documentation with generate-openvpn-server-documentation and generate-openvpn-client-documentation helpers and guile 2.1.7. --- doc/guix.texi | 88 +++++++++++++++++++++++++++++------------------------------ 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index bed8a6ff4..fd6b9a15b 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -13027,19 +13027,19 @@ Both can be run simultaneously. Available @code{openvpn-client-configuration} fields are: -@deftypevr @code{openvpn-client-configuration} parameter package openvpn +@deftypevr {@code{openvpn-client-configuration} parameter} package openvpn The OpenVPN package. @end deftypevr -@deftypevr @code{openvpn-client-configuration} parameter string pid-file +@deftypevr {@code{openvpn-client-configuration} parameter} string pid-file The OpenVPN pid file. Defaults to @samp{"/var/run/openvpn/openvpn.pid"}. @end deftypevr -@deftypevr @code{openvpn-client-configuration} parameter proto proto +@deftypevr {@code{openvpn-client-configuration} parameter} proto proto The protocol (UDP or TCP) used to open a channel between clients and servers. @@ -13047,21 +13047,21 @@ Defaults to @samp{udp}. @end deftypevr -@deftypevr @code{openvpn-client-configuration} parameter dev dev +@deftypevr {@code{openvpn-client-configuration} parameter} dev dev The device type used to represent the VPN connection. Defaults to @samp{tun}. @end deftypevr -@deftypevr @code{openvpn-client-configuration} parameter string ca +@deftypevr {@code{openvpn-client-configuration} parameter} string ca The certificate authority to check connections against. Defaults to @samp{"/etc/openvpn/ca.crt"}. @end deftypevr -@deftypevr @code{openvpn-client-configuration} parameter string cert +@deftypevr {@code{openvpn-client-configuration} parameter} string cert The certificate of the machine the daemon is running on. It should be signed by the authority given in @code{ca}. @@ -13069,7 +13069,7 @@ Defaults to @samp{"/etc/openvpn/client.crt"}. @end deftypevr -@deftypevr @code{openvpn-client-configuration} parameter string key +@deftypevr {@code{openvpn-client-configuration} parameter} string key The key of the machine the daemon is running on. It must be the key whose certificate is @code{cert}. @@ -13077,21 +13077,21 @@ Defaults to @samp{"/etc/openvpn/client.key"}. @end deftypevr -@deftypevr @code{openvpn-client-configuration} parameter boolean comp-lzo? +@deftypevr {@code{openvpn-client-configuration} parameter} boolean comp-lzo? Whether to use the lzo compression algorithm. Defaults to @samp{#t}. @end deftypevr -@deftypevr @code{openvpn-client-configuration} parameter boolean persist-key? +@deftypevr {@code{openvpn-client-configuration} parameter} boolean persist-key? Don't re-read key files across SIGUSR1 or --ping-restart. Defaults to @samp{#t}. @end deftypevr -@deftypevr @code{openvpn-client-configuration} parameter boolean persist-tun? +@deftypevr {@code{openvpn-client-configuration} parameter} boolean persist-tun? Don't close and reopen TUN/TAP device or run up/down scripts across SIGUSR1 or --ping-restart restarts. @@ -13099,14 +13099,14 @@ Defaults to @samp{#t}. @end deftypevr -@deftypevr @code{openvpn-client-configuration} parameter number verbosity +@deftypevr {@code{openvpn-client-configuration} parameter} number verbosity Verbosity level. Defaults to @samp{3}. @end deftypevr -@deftypevr @code{openvpn-client-configuration} parameter tls-auth-client tls-auth +@deftypevr {@code{openvpn-client-configuration} parameter} tls-auth-client tls-auth Add an additional layer of HMAC authentication on top of the TLS control channel to protect against DoS attacks. @@ -13114,42 +13114,42 @@ Defaults to @samp{#f}. @end deftypevr -@deftypevr @code{openvpn-client-configuration} parameter key-usage verify-key-usage? +@deftypevr {@code{openvpn-client-configuration} parameter} key-usage verify-key-usage? Whether to check the server certificate has server usage extension. Defaults to @samp{#t}. @end deftypevr -@deftypevr @code{openvpn-client-configuration} parameter bind bind? +@deftypevr {@code{openvpn-client-configuration} parameter} bind bind? Bind to a specific local port number. Defaults to @samp{#f}. @end deftypevr -@deftypevr @code{openvpn-client-configuration} parameter resolv-retry resolv-retry? +@deftypevr {@code{openvpn-client-configuration} parameter} resolv-retry resolv-retry? Retry resolving server address. Defaults to @samp{#t}. @end deftypevr -@deftypevr @code{openvpn-client-configuration} parameter openvpn-remote-list remote +@deftypevr {@code{openvpn-client-configuration} parameter} openvpn-remote-list remote A list of remote servers to connect to. Defaults to @samp{()}. Available @code{openvpn-remote-configuration} fields are: -@deftypevr @code{openvpn-remote-configuration} parameter string name +@deftypevr {@code{openvpn-remote-configuration} parameter} string name Server name. Defaults to @samp{"my-server"}. @end deftypevr -@deftypevr @code{openvpn-remote-configuration} parameter number port +@deftypevr {@code{openvpn-remote-configuration} parameter} number port Port number the server listens to. Defaults to @samp{1194}. @@ -13163,19 +13163,19 @@ Defaults to @samp{1194}. Available @code{openvpn-server-configuration} fields are: -@deftypevr @code{openvpn-server-configuration} parameter package openvpn +@deftypevr {@code{openvpn-server-configuration} parameter} package openvpn The OpenVPN package. @end deftypevr -@deftypevr @code{openvpn-server-configuration} parameter string pid-file +@deftypevr {@code{openvpn-server-configuration} parameter} string pid-file The OpenVPN pid file. Defaults to @samp{"/var/run/openvpn/openvpn.pid"}. @end deftypevr -@deftypevr @code{openvpn-server-configuration} parameter proto proto +@deftypevr {@code{openvpn-server-configuration} parameter} proto proto The protocol (UDP or TCP) used to open a channel between clients and servers. @@ -13183,21 +13183,21 @@ Defaults to @samp{udp}. @end deftypevr -@deftypevr @code{openvpn-server-configuration} parameter dev dev +@deftypevr {@code{openvpn-server-configuration} parameter} dev dev The device type used to represent the VPN connection. Defaults to @samp{tun}. @end deftypevr -@deftypevr @code{openvpn-server-configuration} parameter string ca +@deftypevr {@code{openvpn-server-configuration} parameter} string ca The certificate authority to check connections against. Defaults to @samp{"/etc/openvpn/ca.crt"}. @end deftypevr -@deftypevr @code{openvpn-server-configuration} parameter string cert +@deftypevr {@code{openvpn-server-configuration} parameter} string cert The certificate of the machine the daemon is running on. It should be signed by the authority given in @code{ca}. @@ -13205,7 +13205,7 @@ Defaults to @samp{"/etc/openvpn/client.crt"}. @end deftypevr -@deftypevr @code{openvpn-server-configuration} parameter string key +@deftypevr {@code{openvpn-server-configuration} parameter} string key The key of the machine the daemon is running on. It must be the key whose certificate is @code{cert}. @@ -13213,21 +13213,21 @@ Defaults to @samp{"/etc/openvpn/client.key"}. @end deftypevr -@deftypevr @code{openvpn-server-configuration} parameter boolean comp-lzo? +@deftypevr {@code{openvpn-server-configuration} parameter} boolean comp-lzo? Whether to use the lzo compression algorithm. Defaults to @samp{#t}. @end deftypevr -@deftypevr @code{openvpn-server-configuration} parameter boolean persist-key? +@deftypevr {@code{openvpn-server-configuration} parameter} boolean persist-key? Don't re-read key files across SIGUSR1 or --ping-restart. Defaults to @samp{#t}. @end deftypevr -@deftypevr @code{openvpn-server-configuration} parameter boolean persist-tun? +@deftypevr {@code{openvpn-server-configuration} parameter} boolean persist-tun? Don't close and reopen TUN/TAP device or run up/down scripts across SIGUSR1 or --ping-restart restarts. @@ -13235,14 +13235,14 @@ Defaults to @samp{#t}. @end deftypevr -@deftypevr @code{openvpn-server-configuration} parameter number verbosity +@deftypevr {@code{openvpn-server-configuration} parameter} number verbosity Verbosity level. Defaults to @samp{3}. @end deftypevr -@deftypevr @code{openvpn-server-configuration} parameter tls-auth-server tls-auth +@deftypevr {@code{openvpn-server-configuration} parameter} tls-auth-server tls-auth Add an additional layer of HMAC authentication on top of the TLS control channel to protect against DoS attacks. @@ -13250,56 +13250,56 @@ Defaults to @samp{#f}. @end deftypevr -@deftypevr @code{openvpn-server-configuration} parameter number port +@deftypevr {@code{openvpn-server-configuration} parameter} number port Specifies the port number on which the server listens. Defaults to @samp{1194}. @end deftypevr -@deftypevr @code{openvpn-server-configuration} parameter ip-mask server +@deftypevr {@code{openvpn-server-configuration} parameter} ip-mask server An ip and mask specifying the subnet inside the virtual network. Defaults to @samp{"10.8.0.0 255.255.255.0"}. @end deftypevr -@deftypevr @code{openvpn-server-configuration} parameter cidr6 server-ipv6 +@deftypevr {@code{openvpn-server-configuration} parameter} cidr6 server-ipv6 A CIDR notation specifying the IPv6 subnet inside the virtual network. Defaults to @samp{#f}. @end deftypevr -@deftypevr @code{openvpn-server-configuration} parameter string dh +@deftypevr {@code{openvpn-server-configuration} parameter} string dh The Diffie-Hellman parameters file. Defaults to @samp{"/etc/openvpn/dh2048.pem"}. @end deftypevr -@deftypevr @code{openvpn-server-configuration} parameter string ifconfig-pool-persist +@deftypevr {@code{openvpn-server-configuration} parameter} string ifconfig-pool-persist The file that records client IPs. Defaults to @samp{"/etc/openvpn/ipp.txt"}. @end deftypevr -@deftypevr @code{openvpn-server-configuration} parameter gateway redirect-gateway? +@deftypevr {@code{openvpn-server-configuration} parameter} gateway redirect-gateway? When true, the server will act as a gateway for its clients. Defaults to @samp{#f}. @end deftypevr -@deftypevr @code{openvpn-server-configuration} parameter boolean client-to-client? +@deftypevr {@code{openvpn-server-configuration} parameter} boolean client-to-client? When true, clients are alowed to talk to each other inside the VPN. Defaults to @samp{#f}. @end deftypevr -@deftypevr @code{openvpn-server-configuration} parameter keepalive keepalive +@deftypevr {@code{openvpn-server-configuration} parameter} keepalive keepalive Causes ping-like messages to be sent back and forth over the link so that each side knows when the other side has gone down. @code{keepalive} requires a pair. The first element is the period of the ping sending, @@ -13308,14 +13308,14 @@ down. @end deftypevr -@deftypevr @code{openvpn-server-configuration} parameter number max-clients +@deftypevr {@code{openvpn-server-configuration} parameter} number max-clients The maximum number of clients. Defaults to @samp{100}. @end deftypevr -@deftypevr @code{openvpn-server-configuration} parameter string status +@deftypevr {@code{openvpn-server-configuration} parameter} string status The status file. This file shows a small report on current connection. It is trunkated and rewritten every minute. @@ -13323,28 +13323,28 @@ Defaults to @samp{"/var/run/openvpn/status"}. @end deftypevr -@deftypevr @code{openvpn-server-configuration} parameter openvpn-ccd-list client-config-dir +@deftypevr {@code{openvpn-server-configuration} parameter} openvpn-ccd-list client-config-dir The list of configuration for some clients. Defaults to @samp{()}. Available @code{openvpn-ccd-configuration} fields are: -@deftypevr @code{openvpn-ccd-configuration} parameter string name +@deftypevr {@code{openvpn-ccd-configuration} parameter} string name Client name. Defaults to @samp{"client"}. @end deftypevr -@deftypevr @code{openvpn-ccd-configuration} parameter ip-mask iroute +@deftypevr {@code{openvpn-ccd-configuration} parameter} ip-mask iroute Client own network Defaults to @samp{#f}. @end deftypevr -@deftypevr @code{openvpn-ccd-configuration} parameter ip-mask ifconfig-push +@deftypevr {@code{openvpn-ccd-configuration} parameter} ip-mask ifconfig-push Client VPN IP. Defaults to @samp{#f}. -- 2.12.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 17 06:35:07 2017 Received: (at 26137) by debbugs.gnu.org; 17 Mar 2017 10:35:07 +0000 Received: from localhost ([127.0.0.1]:59678 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1copDu-0000e8-A4 for submit@debbugs.gnu.org; Fri, 17 Mar 2017 06:35:07 -0400 Received: from mail-wm0-f49.google.com ([74.125.82.49]:34871) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1copDo-0000cG-Ij for 26137@debbugs.gnu.org; Fri, 17 Mar 2017 06:35:03 -0400 Received: by mail-wm0-f49.google.com with SMTP id u132so12086555wmg.0 for <26137@debbugs.gnu.org>; Fri, 17 Mar 2017 03:35:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uJ/0RIft5wyMmzHIbylxBeBKev3hATYmGEtWUjZRCQg=; b=qw+Gwf3Vf5uXTR8B1j1CjSIztyFYtCJCFOUa2shwxlZEfQxI/7E7yqk7rrEMz/IL7A 3mLRjvEi0mbMybMTTc72RxthewVPWMtwjrkx0thTlzuoJR5rxb/9aVFqfEmfrZWEMhuT ZszKBXzutEYkpTQZA27BgWB9pTmYaZPEthP6RjAQrlK+V1VdlxMiKwNehmR8n7O1jAjY XS0lLzJWL3sZKMwNB0Yp8bB05y6QM27/A3H9x800Hd7hGTRPWoxvsilfth+SlhcY8K3N sTscoY0P3Lv58to/eX5iY+cYdxIpYxBzeDPEqtnMqTvXowmTgYdaDcNcM6hTpCY+s2sP lWbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=uJ/0RIft5wyMmzHIbylxBeBKev3hATYmGEtWUjZRCQg=; b=GeN2aAJ9GwROP5HBOrH2rJNHECP7+dWsJTi/6OAX2ijFb7YCYvvc1Eodhn1faylvVX fhLpbG+qrj1nkgf/+Ub0H4wJJzZoSKt2ledRakJYDwKUFF/5CO+EgM+lWbBnrYW19zfh WdNUOO20+vgKUMU7n+eGHnpB8wzY49c50ftwqb2pM7cGss8U8n5Fq3qqMwc1l6FpNY2/ KPn1l2g6mMa63ELrMspDnnhdYb6B/gtfAfchRcL0K47VwHlLFdwS9WOZfBULj6jZpnQN wBmBlHGjiLzkkwtxD9NLSA4JdGmmcDY+RWE4tgiFKvF5VfWjpm/UvuRrgeh6dhB+/BFi n1yg== X-Gm-Message-State: AFeK/H3+JggSxcGLyh5JViqIjEL7xh/KpFhnUIyxHsoBRUKThZt+/xy1591QqPSRPiQepQ== X-Received: by 10.28.7.13 with SMTP id 13mr2120579wmh.16.1489746893938; Fri, 17 Mar 2017 03:34:53 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id x127sm2149142wmf.31.2017.03.17.03.34.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Mar 2017 03:34:53 -0700 (PDT) From: Mathieu Othacehe To: 26137@debbugs.gnu.org Subject: [PATCH 4/6] gnu: Add tlp service. Date: Fri, 17 Mar 2017 11:34:28 +0100 Message-Id: <20170317103430.7629-4-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170317103430.7629-1-m.othacehe@gmail.com> References: <20170317103430.7629-1-m.othacehe@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 26137 Cc: Mathieu Othacehe X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) * gnu/services/pm.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add gnu/services/tlp.scm. * doc/guix.texi (Power management Services): New section. --- doc/guix.texi | 499 ++++++++++++++++++++++++++++++++++++++++++++++++++++ gnu/local.mk | 2 + gnu/services/pm.scm | 404 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 905 insertions(+) create mode 100644 gnu/services/pm.scm diff --git a/doc/guix.texi b/doc/guix.texi index 93640dfba..bed8a6ff4 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -216,6 +216,7 @@ Services * VPN Services:: VPN daemons. * Network File System:: NFS related services. * Continuous Integration:: The Cuirass service. +* Power management Services:: The TLP tool. * Miscellaneous Services:: Other services. Defining Services @@ -8407,6 +8408,7 @@ declaration. * VPN Services:: VPN daemons. * Network File System:: NFS related services. * Continuous Integration:: The Cuirass service. +* Power management Services:: The TLP tool. * Miscellaneous Services:: Other services. @end menu @@ -13622,6 +13624,503 @@ The Cuirass package to use. @end table @end deftp +@node Power management Services +@subsubsection Power management Services + +@cindex power management with TLP +The @code{(gnu services pm)} module provides a Guix service definition +for the Linux power management tool TLP. + +@deffn {Scheme Variable} tlp-service-type +The service type for the TLP tool. Its value should be a valid +TLP configuration (see below). For example: +@example +(service tlp-service-type (tlp-configuration)) +@end example +@end deffn + +By default TLP does not need much configuration but most TLP parameters +can be tweaked using @code{tlp-configuration}. + +Each parameter definition is preceded by its type; for example, +@samp{boolean foo} indicates that the @code{foo} parameter +should be specified as a boolean. Types starting with +@code{maybe-} denote parameters that won't show up in TLP config file +when their value is @code{'disabled}. + +@c The following documentation was initially generated by +@c (generate-tlp-documentation) in (gnu services pm). Manually maintained +@c documentation is better, so we shouldn't hesitate to edit below as +@c needed. However if the change you want to make to this documentation +@c can be done in an automated way, it's probably easier to change +@c (generate-documentation) than to make it below and have to deal with +@c the churn as TLP updates. + +Available @code{tlp-configuration} fields are: + +@deftypevr {@code{tlp-configuration} parameter} package tlp +The TLP package. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} boolean tlp-enable? +Set to true if you wish to enable TLP. + +Defaults to @samp{#t}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} string tlp-default-mode +Default mode when no power supply can be detected. Alternatives are AC +and BAT. + +Defaults to @samp{"AC"}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} non-negative-integer disk-idle-secs-on-ac +Number of seconds Linux kernel has to wait after the disk goes idle, +before syncing on AC. + +Defaults to @samp{0}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} non-negative-integer disk-idle-secs-on-bat +Same as @code{disk-idle-ac} but on BAT mode. + +Defaults to @samp{2}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} non-negative-integer max-lost-work-secs-on-ac +Dirty pages flushing periodicity, expressed in seconds. + +Defaults to @samp{15}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} non-negative-integer max-lost-work-secs-on-bat +Same as @code{max-lost-work-secs-on-ac} but on BAT mode. + +Defaults to @samp{60}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} maybe-space-separated-string-list cpu-scaling-governor-on-ac +CPU frequency scaling governor on AC mode. With intel_pstate driver, +alternatives are powersave and performance. With acpi-cpufreq driver, +alternatives are ondemand, powersave, performance and conservative. + +Defaults to @samp{disabled}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} maybe-space-separated-string-list cpu-scaling-governor-on-bat +Same as @code{cpu-scaling-governor-on-ac} but on BAT mode. + +Defaults to @samp{disabled}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} maybe-non-negative-integer cpu-scaling-min-freq-on-ac +Set the min available frequency for the scaling governor on AC. + +Defaults to @samp{disabled}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} maybe-non-negative-integer cpu-scaling-max-freq-on-ac +Set the max available frequency for the scaling governor on AC. + +Defaults to @samp{disabled}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} maybe-non-negative-integer cpu-scaling-min-freq-on-bat +Set the min available frequency for the scaling governor on BAT. + +Defaults to @samp{disabled}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} maybe-non-negative-integer cpu-scaling-max-freq-on-bat +Set the max available frequency for the scaling governor on BAT. + +Defaults to @samp{disabled}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} maybe-non-negative-integer cpu-min-perf-on-ac +Limit the min P-state to control the power dissipation of the CPU, in AC +mode. Values are stated as a percentage of the available performance. + +Defaults to @samp{disabled}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} maybe-non-negative-integer cpu-max-perf-on-ac +Limit the max P-state to control the power dissipation of the CPU, in AC +mode. Values are stated as a percentage of the available performance. + +Defaults to @samp{disabled}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} maybe-non-negative-integer cpu-min-perf-on-bat +Same as @code{cpu-min-perf-on-ac} on BAT mode. + +Defaults to @samp{disabled}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} maybe-non-negative-integer cpu-max-perf-on-bat +Same as @code{cpu-max-perf-on-ac} on BAT mode. + +Defaults to @samp{disabled}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} maybe-boolean cpu-boost-on-ac? +Enable CPU turbo boost feature on AC mode. + +Defaults to @samp{disabled}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} maybe-boolean cpu-boost-on-bat? +Same as @code{cpu-boost-on-ac?} on BAT mode. + +Defaults to @samp{disabled}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} boolean sched-powersave-on-ac? +Allow Linux kernel to minimize the number of CPU cores/hyper-threads +used under light load conditions. + +Defaults to @samp{#f}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} boolean sched-powersave-on-bat? +Same as @code{sched-powersave-on-ac?} but on BAT mode. + +Defaults to @samp{#t}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} boolean nmi-watchdog? +Enable Linux kernel NMI watchdog. + +Defaults to @samp{#f}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} maybe-string phc-controls +For Linux kernels with PHC patch applied, change CPU voltages. An +example value would be @samp{"F:V F:V F:V F:V"}. + +Defaults to @samp{disabled}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} string energy-perf-policy-on-ac +Set CPU performance versus energy saving policy on AC. Alternatives are +performance, normal, powersave. + +Defaults to @samp{"performance"}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} string energy-perf-policy-on-bat +Same as @code{energy-perf-policy-ac} but on BAT mode. + +Defaults to @samp{"powersave"}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} space-separated-string-list disks-devices +Hard disk devices. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} space-separated-string-list disk-apm-level-on-ac +Hard disk advanced power management level. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} space-separated-string-list disk-apm-level-on-bat +Same as @code{disk-apm-bat} but on BAT mode. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} maybe-space-separated-string-list disk-spindown-timeout-on-ac +Hard disk spin down timeout. One value has to be specified for each +declared hard disk. + +Defaults to @samp{disabled}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} maybe-space-separated-string-list disk-spindown-timeout-on-bat +Same as @code{disk-spindown-timeout-on-ac} but on BAT mode. + +Defaults to @samp{disabled}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} maybe-space-separated-string-list disk-iosched +Select IO scheduler for disk devices. One value has to be specified for +each declared hard disk. Example alternatives are cfq, deadline and +noop. + +Defaults to @samp{disabled}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} string sata-linkpwr-on-ac +SATA aggressive link power management (ALPM) level. Alternatives are +min_power, medium_power, max_performance. + +Defaults to @samp{"max_performance"}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} string sata-linkpwr-on-bat +Same as @code{sata-linkpwr-ac} but on BAT mode. + +Defaults to @samp{"min_power"}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} maybe-string sata-linkpwr-blacklist +Exclude specified SATA host devices for link power management. + +Defaults to @samp{disabled}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} maybe-on-off-boolean ahci-runtime-pm-on-ac? +Enable Runtime Power Management for AHCI controller and disks on AC +mode. + +Defaults to @samp{disabled}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} maybe-on-off-boolean ahci-runtime-pm-on-bat? +Same as @code{ahci-runtime-pm-on-ac} on BAT mode. + +Defaults to @samp{disabled}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} non-negative-integer ahci-runtime-pm-timeout +Seconds of inactivity before disk is suspended. + +Defaults to @samp{15}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} string pcie-aspm-on-ac +PCI Express Active State Power Management level. Alternatives are +default, performance, powersave. + +Defaults to @samp{"performance"}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} string pcie-aspm-on-bat +Same as @code{pcie-aspm-ac} but on BAT mode. + +Defaults to @samp{"powersave"}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} string radeon-power-profile-on-ac +Radeon graphics clock speed level. Alternatives are low, mid, high, +auto, default. + +Defaults to @samp{"high"}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} string radeon-power-profile-on-bat +Same as @code{radeon-power-ac} but on BAT mode. + +Defaults to @samp{"low"}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} string radeon-dpm-state-on-ac +Radeon dynamic power management method (DPM). Alternatives are battery, +performance. + +Defaults to @samp{"performance"}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} string radeon-dpm-state-on-bat +Same as @code{radeon-dpm-state-ac} but on BAT mode. + +Defaults to @samp{"battery"}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} string radeon-dpm-perf-level-on-ac +Radeon DPM performance level. Alternatives are auto, low, high. + +Defaults to @samp{"auto"}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} string radeon-dpm-perf-level-on-bat +Same as @code{radeon-dpm-perf-ac} but on BAT mode. + +Defaults to @samp{"auto"}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} on-off-boolean wifi-pwr-on-ac? +Wifi power saving mode. + +Defaults to @samp{#f}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} on-off-boolean wifi-pwr-on-bat? +Same as @code{wifi-power-ac?} but on BAT mode. + +Defaults to @samp{#t}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} y-n-boolean wol-disable? +Disable wake on LAN. + +Defaults to @samp{#t}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} non-negative-integer sound-power-save-on-ac +Timeout duration in seconds before activating audio power saving on +Intel HDA and AC97 devices. A value of 0 disables power saving. + +Defaults to @samp{0}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} non-negative-integer sound-power-save-on-bat +Same as @code{sound-powersave-ac} but on BAT mode. + +Defaults to @samp{1}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} y-n-boolean sound-power-save-controller? +Disable controller in powersaving mode on Intel HDA devices. + +Defaults to @samp{#t}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} boolean bay-poweroff-on-bat? +Enable optical drive in UltraBay/MediaBay on BAT mode. Drive can be +powered on again by releasing (and reinserting) the eject lever or by +pressing the disc eject button on newer models. + +Defaults to @samp{#f}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} string bay-device +Name of the optical drive device to power off. + +Defaults to @samp{"sr0"}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} string runtime-pm-on-ac +Runtime Power Management for PCI(e) bus devices. Alternatives are on +and auto. + +Defaults to @samp{"on"}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} string runtime-pm-on-bat +Same as @code{runtime-pm-ac} but on BAT mode. + +Defaults to @samp{"auto"}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} boolean runtime-pm-all? +Runtime Power Management for all PCI(e) bus devices, except blacklisted +ones. + +Defaults to @samp{#t}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} maybe-space-separated-string-list runtime-pm-blacklist +Exclude specified PCI(e) devices adresses from Runtime Power Management. + +Defaults to @samp{disabled}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} space-separated-string-list runtime-pm-driver-blacklist +Exclude PCI(e) devices assigned to the specified drivers from Runtime +Power Management. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} boolean usb-autosuspend? +Enable USB autosuspend feature. + +Defaults to @samp{#t}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} maybe-string usb-blacklist +Exclude specified devices from USB autosuspend. + +Defaults to @samp{disabled}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} boolean usb-blacklist-wwan? +Exclude WWAN devices from USB autosuspend. + +Defaults to @samp{#t}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} maybe-string usb-whitelist +Include specified devices into USB autosuspend, even if they are already +excluded by the driver or via @code{usb-blacklist-wwan?}. + +Defaults to @samp{disabled}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} maybe-boolean usb-autosuspend-disable-on-shutdown? +Enable USB autosuspend before shutdown. + +Defaults to @samp{disabled}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} boolean restore-device-state-on-startup? +Restore radio device state (bluetooth, wifi, wwan) from previous +shutdown on system startup. + +Defaults to @samp{#f}. + +@end deftypevr + @node Miscellaneous Services @subsubsection Miscellaneous Services diff --git a/gnu/local.mk b/gnu/local.mk index 2cc5d546b..fc8367b26 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -10,6 +10,7 @@ # Copyright © 2016, 2017 Ricardo Wurmus # Copyright © 2016 Ben Woodcroft # Copyright © 2017 Clément Lassieur +# Copyright © 2017 Mathieu Othacehe # # This file is part of GNU Guix. # @@ -422,6 +423,7 @@ GNU_SYSTEM_MODULES = \ %D%/services/nfs.scm \ %D%/services/shepherd.scm \ %D%/services/herd.scm \ + %D%/services/pm.scm \ %D%/services/sddm.scm \ %D%/services/spice.scm \ %D%/services/ssh.scm \ diff --git a/gnu/services/pm.scm b/gnu/services/pm.scm new file mode 100644 index 000000000..ec35e5701 --- /dev/null +++ b/gnu/services/pm.scm @@ -0,0 +1,404 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2017 Mathieu Othacehe +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software: you can redistribute it and/or modify +;;; it under the terms of the GNU General Public License as published by +;;; the Free Software Foundation, either version 3 of the License, or +;;; (at your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, +;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu services pm) + #:use-module (guix gexp) + #:use-module (guix packages) + #:use-module (guix records) + #:use-module (gnu packages linux) + #:use-module (gnu services) + #:use-module (gnu services base) + #:use-module (gnu services configuration) + #:use-module (gnu services shepherd) + #:use-module (gnu system shadow) + #:export (tlp-service-type + tlp-configuration)) + +(define (uglify-field-name field-name) + (let ((str (symbol->string field-name))) + (string-join (string-split + (string-upcase + (if (string-suffix? "?" str) + (substring str 0 (1- (string-length str))) + str)) + #\-) + "_"))) + +(define (serialize-field field-name val) + (format #t "~a=~a\n" (uglify-field-name field-name) val)) + +(define (serialize-boolean field-name val) + (serialize-field field-name (if val "1" "0"))) +(define-maybe boolean) + +(define (serialize-string field-name val) + (serialize-field field-name val)) +(define-maybe string) + +(define (space-separated-string-list? val) + (and (list? val) + (and-map (lambda (x) + (and (string? x) (not (string-index x #\space)))) + val))) +(define (serialize-space-separated-string-list field-name val) + (serialize-field field-name + (format #f "~s" + (string-join val " ")))) +(define-maybe space-separated-string-list) + +(define (non-negative-integer? val) + (and (exact-integer? val) (not (negative? val)))) +(define (serialize-non-negative-integer field-name val) + (serialize-field field-name val)) +(define-maybe non-negative-integer) + +(define (on-off-boolean? val) + (boolean? val)) +(define (serialize-on-off-boolean field-name val) + (serialize-field field-name (if val "on" "off"))) +(define-maybe on-off-boolean) + +(define (y-n-boolean? val) + (boolean? val)) +(define (serialize-y-n-boolean field-name val) + (serialize-field field-name (if val "Y" "N"))) + +(define-configuration tlp-configuration + (tlp + (package tlp) + "The TLP package.") + + (tlp-enable? + (boolean #t) + "Set to true if you wish to enable TLP.") + + (tlp-default-mode + (string "AC") + "Default mode when no power supply can be detected. Alternatives are +AC and BAT.") + + (disk-idle-secs-on-ac + (non-negative-integer 0) + "Number of seconds Linux kernel has to wait after the disk goes idle, +before syncing on AC.") + + (disk-idle-secs-on-bat + (non-negative-integer 2) + "Same as @code{disk-idle-ac} but on BAT mode.") + + (max-lost-work-secs-on-ac + (non-negative-integer 15) + "Dirty pages flushing periodicity, expressed in seconds.") + + (max-lost-work-secs-on-bat + (non-negative-integer 60) + "Same as @code{max-lost-work-secs-on-ac} but on BAT mode.") + + (cpu-scaling-governor-on-ac + (maybe-space-separated-string-list 'disabled) + "CPU frequency scaling governor on AC mode. With intel_pstate +driver, alternatives are powersave and performance. With acpi-cpufreq driver, +alternatives are ondemand, powersave, performance and conservative.") + + (cpu-scaling-governor-on-bat + (maybe-space-separated-string-list 'disabled) + "Same as @code{cpu-scaling-governor-on-ac} but on BAT mode.") + + (cpu-scaling-min-freq-on-ac + (maybe-non-negative-integer 'disabled) + "Set the min available frequency for the scaling governor on AC.") + + (cpu-scaling-max-freq-on-ac + (maybe-non-negative-integer 'disabled) + "Set the max available frequency for the scaling governor on AC.") + + (cpu-scaling-min-freq-on-bat + (maybe-non-negative-integer 'disabled) + "Set the min available frequency for the scaling governor on BAT.") + + (cpu-scaling-max-freq-on-bat + (maybe-non-negative-integer 'disabled) + "Set the max available frequency for the scaling governor on BAT.") + + (cpu-min-perf-on-ac + (maybe-non-negative-integer 'disabled) + "Limit the min P-state to control the power dissipation of the CPU, +in AC mode. Values are stated as a percentage of the available performance.") + + (cpu-max-perf-on-ac + (maybe-non-negative-integer 'disabled) + "Limit the max P-state to control the power dissipation of the CPU, +in AC mode. Values are stated as a percentage of the available performance.") + + (cpu-min-perf-on-bat + (maybe-non-negative-integer 'disabled) + "Same as @code{cpu-min-perf-on-ac} on BAT mode.") + + (cpu-max-perf-on-bat + (maybe-non-negative-integer 'disabled) + "Same as @code{cpu-max-perf-on-ac} on BAT mode.") + + (cpu-boost-on-ac? + (maybe-boolean 'disabled) + "Enable CPU turbo boost feature on AC mode.") + + (cpu-boost-on-bat? + (maybe-boolean 'disabled) + "Same as @code{cpu-boost-on-ac?} on BAT mode.") + + (sched-powersave-on-ac? + (boolean #f) + "Allow Linux kernel to minimize the number of CPU cores/hyper-threads +used under light load conditions.") + + (sched-powersave-on-bat? + (boolean #t) + "Same as @code{sched-powersave-on-ac?} but on BAT mode.") + + (nmi-watchdog? + (boolean #f) + "Enable Linux kernel NMI watchdog.") + + (phc-controls + (maybe-string 'disabled) + "For Linux kernels with PHC patch applied, change CPU voltages. +An example value would be @samp{\"F:V F:V F:V F:V\"}.") + + (energy-perf-policy-on-ac + (string "performance") + "Set CPU performance versus energy saving policy on AC. Alternatives are +performance, normal, powersave.") + + (energy-perf-policy-on-bat + (string "powersave") + "Same as @code{energy-perf-policy-ac} but on BAT mode.") + + (disks-devices + (space-separated-string-list '("sda")) + "Hard disk devices.") + + (disk-apm-level-on-ac + (space-separated-string-list '("254" "254")) + "Hard disk advanced power management level.") + + (disk-apm-level-on-bat + (space-separated-string-list '("128" "128")) + "Same as @code{disk-apm-bat} but on BAT mode.") + + (disk-spindown-timeout-on-ac + (maybe-space-separated-string-list 'disabled) + "Hard disk spin down timeout. One value has to be specified for +each declared hard disk.") + + (disk-spindown-timeout-on-bat + (maybe-space-separated-string-list 'disabled) + "Same as @code{disk-spindown-timeout-on-ac} but on BAT mode.") + + (disk-iosched + (maybe-space-separated-string-list 'disabled) + "Select IO scheduler for disk devices. One value has to be specified +for each declared hard disk. Example alternatives are cfq, deadline and noop.") + + (sata-linkpwr-on-ac + (string "max_performance") + "SATA aggressive link power management (ALPM) level. Alternatives are +min_power, medium_power, max_performance.") + + (sata-linkpwr-on-bat + (string "min_power") + "Same as @code{sata-linkpwr-ac} but on BAT mode.") + + (sata-linkpwr-blacklist + (maybe-string 'disabled) + "Exclude specified SATA host devices for link power management.") + + (ahci-runtime-pm-on-ac? + (maybe-on-off-boolean 'disabled) + "Enable Runtime Power Management for AHCI controller and disks +on AC mode.") + + (ahci-runtime-pm-on-bat? + (maybe-on-off-boolean 'disabled) + "Same as @code{ahci-runtime-pm-on-ac} on BAT mode.") + + (ahci-runtime-pm-timeout + (non-negative-integer 15) + "Seconds of inactivity before disk is suspended.") + + (pcie-aspm-on-ac + (string "performance") + "PCI Express Active State Power Management level. Alternatives are +default, performance, powersave.") + + (pcie-aspm-on-bat + (string "powersave") + "Same as @code{pcie-aspm-ac} but on BAT mode.") + + (radeon-power-profile-on-ac + (string "high") + "Radeon graphics clock speed level. Alternatives are +low, mid, high, auto, default.") + + (radeon-power-profile-on-bat + (string "low") + "Same as @code{radeon-power-ac} but on BAT mode.") + + (radeon-dpm-state-on-ac + (string "performance") + "Radeon dynamic power management method (DPM). Alternatives are +battery, performance.") + + (radeon-dpm-state-on-bat + (string "battery") + "Same as @code{radeon-dpm-state-ac} but on BAT mode.") + + (radeon-dpm-perf-level-on-ac + (string "auto") + "Radeon DPM performance level. Alternatives are +auto, low, high.") + + (radeon-dpm-perf-level-on-bat + (string "auto") + "Same as @code{radeon-dpm-perf-ac} but on BAT mode.") + + (wifi-pwr-on-ac? + (on-off-boolean #f) + "Wifi power saving mode.") + + (wifi-pwr-on-bat? + (on-off-boolean #t) + "Same as @code{wifi-power-ac?} but on BAT mode.") + + (wol-disable? + (y-n-boolean #t) + "Disable wake on LAN.") + + (sound-power-save-on-ac + (non-negative-integer 0) + "Timeout duration in seconds before activating audio power saving + on Intel HDA and AC97 devices. A value of 0 disables power saving.") + + (sound-power-save-on-bat + (non-negative-integer 1) + "Same as @code{sound-powersave-ac} but on BAT mode.") + + (sound-power-save-controller? + (y-n-boolean #t) + "Disable controller in powersaving mode on Intel HDA devices.") + + (bay-poweroff-on-bat? + (boolean #f) + "Enable optical drive in UltraBay/MediaBay on BAT mode. +Drive can be powered on again by releasing (and reinserting) the eject lever +or by pressing the disc eject button on newer models.") + + (bay-device + (string "sr0") + "Name of the optical drive device to power off.") + + (runtime-pm-on-ac + (string "on") + "Runtime Power Management for PCI(e) bus devices. Alternatives are +on and auto.") + + (runtime-pm-on-bat + (string "auto") + "Same as @code{runtime-pm-ac} but on BAT mode.") + + (runtime-pm-all? + (boolean #t) + "Runtime Power Management for all PCI(e) bus devices, except +blacklisted ones.") + + (runtime-pm-blacklist + (maybe-space-separated-string-list 'disabled) + "Exclude specified PCI(e) devices adresses from Runtime Power Management.") + + (runtime-pm-driver-blacklist + (space-separated-string-list '("radeon" "nouveau")) + "Exclude PCI(e) devices assigned to the specified drivers from +Runtime Power Management.") + + (usb-autosuspend? + (boolean #t) + "Enable USB autosuspend feature.") + + (usb-blacklist + (maybe-string 'disabled) + "Exclude specified devices from USB autosuspend.") + + (usb-blacklist-wwan? + (boolean #t) + "Exclude WWAN devices from USB autosuspend.") + + (usb-whitelist + (maybe-string 'disabled) + "Include specified devices into USB autosuspend, even if they are +already excluded by the driver or via @code{usb-blacklist-wwan?}.") + + (usb-autosuspend-disable-on-shutdown? + (maybe-boolean 'disabled) + "Enable USB autosuspend before shutdown.") + + (restore-device-state-on-startup? + (boolean #f) + "Restore radio device state (bluetooth, wifi, wwan) from previous +shutdown on system startup.")) + + +(define (tlp-shepherd-service config) + (let* ((tlp-bin (file-append + (tlp-configuration-tlp config) "/bin/tlp")) + (tlp-action (lambda args + #~(lambda _ + (zero? (system* #$tlp-bin #$@args)))))) + (list (shepherd-service + (documentation "Run TLP script.") + (provision '(tlp)) + (requirement '(user-processes)) + (start (tlp-action "init" "start")) + (stop (tlp-action "init" "stop")))))) + +(define (tlp-activation config) + (let* ((config-str (with-output-to-string + (lambda () + (serialize-configuration + config + tlp-configuration-fields)))) + (config-file (plain-file "tlp" config-str))) + (with-imported-modules '((guix build utils)) + #~(begin + (use-modules (guix build utils)) + (copy-file #$config-file "/etc/tlp"))))) + +(define tlp-service-type + (service-type + (name 'tlp) + (extensions + (list + (service-extension shepherd-root-service-type + tlp-shepherd-service) + (service-extension udev-service-type + (compose list tlp-configuration-tlp)) + (service-extension activation-service-type + tlp-activation))))) + +(define (generate-tlp-documentation) + (generate-documentation + `((tlp-configuration ,tlp-configuration-fields)) + 'tlp-configuration)) -- 2.12.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 24 06:00:34 2017 Received: (at 26137) by debbugs.gnu.org; 24 Mar 2017 10:00:34 +0000 Received: from localhost ([127.0.0.1]:41740 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1crM1J-0003zw-On for submit@debbugs.gnu.org; Fri, 24 Mar 2017 06:00:33 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:34632) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1crM1I-0003za-9g for 26137@debbugs.gnu.org; Fri, 24 Mar 2017 06:00:32 -0400 Received: by mail-wr0-f194.google.com with SMTP id y90so1315790wrb.1 for <26137@debbugs.gnu.org>; Fri, 24 Mar 2017 03:00:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=MC0pXIBoLBlQow+uX2FvVuu9qQtM4XAXlWUxlDhPVt0=; b=r9NgGdbAgUrJLi/FpeaAHUdARewAhdVeROuO3GrRfXtggLz6hvy+WQIBK40J5u9sED C90g3V+rfuug9dszN1QxKoVTc+sRoFgFusVT8tH2U54ey3xwWaQl/DxsPJPiHY/a4d+k uxTCOkh65g4df+QQ0JnoR2U0I8BDNY47mYkfb08pANLx9cDaP/CMqTNMrwieCX4oQuhJ R6tyt9qOt2WGP9TP5fw0HkS/evw0Pj1PRtXxiW/zB9bmScrie0dJ/niwasy3KhZKSh2N 39Fn2QIz32gp7KaHzJUbC44WqVVj9PIL8nFd0USSNS37jWNi8+LuQ08RQ6bWCUjkB9RL hwXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=MC0pXIBoLBlQow+uX2FvVuu9qQtM4XAXlWUxlDhPVt0=; b=C6AAzDQTSzv55nndpd8zBHGezHGlsCwA3m/N1hc27AiIR2VqFQsrbK51zAW3UxoRb3 oVCdN5+pImSlAfWe3hqtH8+TwnOplh4l98SPBC13arlFqrauy4odQ3usd7cy6dUmpw+N wDJ192NrMWzM0NNlxF/2kT3z7H9BpRfgTAUuIU7d7tKR4fKzJtaT901KnzYchjlcvTrf DdDymNhjYTXvz44kfi/kwtXgfg7gJXGtYKWCrupFWBaxLFsvP4FIptyF/K9wJk2lzKkt /4E6sWGy9VWSvVzjlDAzH5ow+InSTT7CL86mjcJEceMvPkqL1VVzQHg0ddp4B5Rrg+6A 1Cxg== X-Gm-Message-State: AFeK/H0zfj/eesjobx4NVgPjjddFHq5rUdka5QYkGTyXaOnkpuxMPETtVu+7493SXE44IQ== X-Received: by 10.223.176.87 with SMTP id g23mr6531672wra.12.1490349626391; Fri, 24 Mar 2017 03:00:26 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id 11sm2230924wrb.10.2017.03.24.03.00.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Mar 2017 03:00:25 -0700 (PDT) From: Mathieu Othacehe To: 26137@debbugs.gnu.org Subject: [PATCH v3 1/6] gnu: tlp: Read configuration from /etc/tlp. Date: Fri, 24 Mar 2017 11:00:12 +0100 Message-Id: <20170324100017.7702-2-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170324100017.7702-1-m.othacehe@gmail.com> References: <20170324100017.7702-1-m.othacehe@gmail.com> X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 26137 Cc: Mathieu Othacehe X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.8 (--) * gnu/packages/linux.scm (tlp): Set TLP_CONF to "/etc/tlp". --- gnu/packages/linux.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 86c222f03..bf16ff0eb 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -3491,7 +3491,7 @@ Light is the successor of lightscript.") (setenv "TLP_BIN" (string-append out "/bin")) (setenv "TLP_TLIB" (string-append out "/share/tlp-pm")) (setenv "TLP_ULIB" (string-append out "/lib/udev")) - (setenv "TLP_CONF" (string-append out "/etc/tlp")) + (setenv "TLP_CONF" "/etc/tlp") (setenv "TLP_SHCPL" (string-append out "/share/bash-completion/completions")) (setenv "TLP_MAN" (string-append out "/share/man"))))) -- 2.12.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 24 06:00:37 2017 Received: (at 26137) by debbugs.gnu.org; 24 Mar 2017 10:00:38 +0000 Received: from localhost ([127.0.0.1]:41745 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1crM1N-00040I-4B for submit@debbugs.gnu.org; Fri, 24 Mar 2017 06:00:37 -0400 Received: from mail-wm0-f44.google.com ([74.125.82.44]:38837) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1crM1J-0003zc-4b for 26137@debbugs.gnu.org; Fri, 24 Mar 2017 06:00:33 -0400 Received: by mail-wm0-f44.google.com with SMTP id t189so8925009wmt.1 for <26137@debbugs.gnu.org>; Fri, 24 Mar 2017 03:00:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2JHQN5zyOKv6qzg5raL0RCSAq/dAmMXZt2oN3O/EpjM=; b=dSOlw96zOrP3geiTDs8O7N9AuYPjUVDU7feUrHUqTg867iqjr1UuG7dLDanYAr6rbj bbXRozSpVDlod/nhLzNTTfbMbPO6tOJytCz+JezqQ19hQV2JUaMmT7zMH16BG14W/UrP 9EikX0QNpg51SlqenJSHVwz5My2TIB1/FSBg4V0Whp2l/cMaBHenmEsa2qbcIhWpotZW C/d4MId7pFnFlx3el4m08ZAkQ/U7OeH+OIReiNoZNbvKJGzTzt3hyHL9pngn3I0CTf4u lsVczssuZBV798V1LaFlc98GCBtXxHaQEW05Ya/LVclECNuDKuTfpq/s3SmosjOvbgP8 Mrcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2JHQN5zyOKv6qzg5raL0RCSAq/dAmMXZt2oN3O/EpjM=; b=P0s2pdTNBRBW42BK4RV5lk0UhWAX5Rp6cENolKldp9I0UrL9/EBL04lxi1h45INZ1a 1pRBUcr7xEsjKctwrgbUque+iiU3rhd8AuT/WM4kfpVmDYgP8pYuCpAPsGQAvRCEPN3T NZTeTpK/ALXzdb5sxrLJnqxU9AIkbwwIJSyBvZoejwYoqCO1V7GZOttdOOPOw+F2LpKj L3mkrA9+XOUamuLD8MPMdvksRCmF0jdjbJaspHh9h/d+1OwfVDsRBdn83nI20SRTlKwa P3WjAfdFZyYMRCeEByX/wgbJRWnTlZo9K1n+sYMpZwKFirKh6HMRl1CRA8UjMJtt8nlO EmGg== X-Gm-Message-State: AFeK/H2bJX+0FCxzRTR+e/irACBgmbig+xtjJBYgeTJHA5XEyJj7fuwHi5hH6pGHTAzQTw== X-Received: by 10.28.131.65 with SMTP id f62mr2076663wmd.4.1490349627352; Fri, 24 Mar 2017 03:00:27 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id 11sm2230924wrb.10.2017.03.24.03.00.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Mar 2017 03:00:26 -0700 (PDT) From: Mathieu Othacehe To: 26137@debbugs.gnu.org Subject: [PATCH v3 2/6] services: Factorize define-maybe macro. Date: Fri, 24 Mar 2017 11:00:13 +0100 Message-Id: <20170324100017.7702-3-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170324100017.7702-1-m.othacehe@gmail.com> References: <20170324100017.7702-1-m.othacehe@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 26137 Cc: Mathieu Othacehe X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) * gnu/services/configuration.scm (id): New procedure extracted from define-configuration. (define-maybe): New exported procedure, moved from messaging.scm. * gnu/services/messaging.scm (define-maybe): Remove it. (id): Move declaration inside define-all-configurations which is now the only caller procedure. --- gnu/services/configuration.scm | 24 +++++++++++++++++++++--- gnu/services/messaging.scm | 23 ++++------------------- 2 files changed, 25 insertions(+), 22 deletions(-) diff --git a/gnu/services/configuration.scm b/gnu/services/configuration.scm index 2ad3a637a..f59920d5a 100644 --- a/gnu/services/configuration.scm +++ b/gnu/services/configuration.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015 Andy Wingo +;;; Copyright © 2017 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; @@ -36,6 +37,7 @@ configuration-field-default-value-thunk configuration-field-documentation serialize-configuration + define-maybe define-configuration validate-configuration generate-documentation @@ -85,9 +87,7 @@ (configuration-field-name field) val)))) fields)) -(define-syntax define-configuration - (lambda (stx) - (define (id ctx part . parts) +(define (id ctx part . parts) (let ((part (syntax->datum part))) (datum->syntax ctx @@ -95,6 +95,24 @@ (() part) (parts (symbol-append part (syntax->datum (apply id ctx parts)))))))) + +(define-syntax define-maybe + (lambda (x) + (syntax-case x () + ((_ stem) + (with-syntax + ((stem? (id #'stem #'stem #'?)) + (maybe-stem? (id #'stem #'maybe- #'stem #'?)) + (serialize-stem (id #'stem #'serialize- #'stem)) + (serialize-maybe-stem (id #'stem #'serialize-maybe- #'stem))) + #'(begin + (define (maybe-stem? val) + (or (eq? val 'disabled) (stem? val))) + (define (serialize-maybe-stem field-name val) + (when (stem? val) (serialize-stem field-name val))))))))) + +(define-syntax define-configuration + (lambda (stx) (syntax-case stx () ((_ stem (field (field-type def) doc) ...) (with-syntax (((field-getter ...) diff --git a/gnu/services/messaging.scm b/gnu/services/messaging.scm index 34723dc11..715d6181f 100644 --- a/gnu/services/messaging.scm +++ b/gnu/services/messaging.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2017 Clément Lassieur +;;; Copyright © 2017 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; @@ -49,27 +50,11 @@ ;;; ;;; Code: -(define-syntax-rule (id ctx parts ...) - "Assemble PARTS into a raw (unhygienic) identifier." - (datum->syntax ctx (symbol-append (syntax->datum parts) ...))) - -(define-syntax define-maybe - (lambda (x) - (syntax-case x () - ((_ stem) - (with-syntax - ((stem? (id #'stem #'stem #'?)) - (maybe-stem? (id #'stem #'maybe- #'stem #'?)) - (serialize-stem (id #'stem #'serialize- #'stem)) - (serialize-maybe-stem (id #'stem #'serialize-maybe- #'stem))) - #'(begin - (define (maybe-stem? val) - (or (eq? val 'disabled) (stem? val))) - (define (serialize-maybe-stem field-name val) - (when (stem? val) (serialize-stem field-name val))))))))) - (define-syntax define-all-configurations (lambda (stx) + (define-syntax-rule (id ctx parts ...) + "Assemble PARTS into a raw (unhygienic) identifier." + (datum->syntax ctx (symbol-append (syntax->datum parts) ...))) (define (make-pred arg) (lambda (field target) (and (memq (syntax->datum target) `(common ,arg)) field))) -- 2.12.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 24 06:00:38 2017 Received: (at 26137) by debbugs.gnu.org; 24 Mar 2017 10:00:38 +0000 Received: from localhost ([127.0.0.1]:41747 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1crM1N-00040R-TT for submit@debbugs.gnu.org; Fri, 24 Mar 2017 06:00:38 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:35644) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1crM1K-0003ze-6f for 26137@debbugs.gnu.org; Fri, 24 Mar 2017 06:00:34 -0400 Received: by mail-wr0-f196.google.com with SMTP id u108so1316166wrb.2 for <26137@debbugs.gnu.org>; Fri, 24 Mar 2017 03:00:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=wZNQxuy7suQmUbbwBwLAoC5rcTQ5fd7/NWuTk3MiUY8=; b=AtPQnYhh8M+tzn9Low93wRHfq5eLLVR5qvknSG6ZDlfg6iXgE2NJwE1gCyHOjN+n+O KyPmr06g5vQMFzMRc7utQQE6nbTLKwF1zdo3SiknzyOrNLdxyUoBycoi7B5SBIyan1GH /+NyCquQbs2jYhYYZ+pzsydj6RiQGxgg4M2Vq1EICKJF1eZFtz2G9xuyMpI8yzUEVwO7 1w4729c1flR1QPS+Q3UXhcD2vYJGRTOCV5B9IEKO2Cag8/meAyMKEZk6m9TdWImHv5Wl xIkB7r+sbhjIAuNFuEyRwsc/k9Y6TuiMsLpZPseuCaItjj/kZlUz3d4shHVzcEFgWhNr fvhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=wZNQxuy7suQmUbbwBwLAoC5rcTQ5fd7/NWuTk3MiUY8=; b=WplKx9iRLVJa3UIJ4rJ2AyoDrwSkGSo0R1zwUvmNoPXZ6dQ5NKG5sGX971Kw4xHvbG y2zgWo/5vyfWmtwCpy81G3gWtcpZxeqcGRnn1SbBR0sU9ZfE8n/NjW/yyyWBonY4EmTV pqlCYmsLdiXk4wYqqRfTTFbLyHLI9Rt92eXnQdpCrbQRsYX2ds7V0DvxC+0nGb6+KWmv ikhGY5ZwC3WlECgkHl9EkjkdhB6PcMmO+k1Qx9fJ/nNyWitVHT6mQQAZSvCvjlX93sk8 5sW2dKCEeulCb9uDl9E2KfDnHWv/y6SY0OUMRHhJg8aXMIKbMi2u6SJG5o7tLYbQDYxv 4qLg== X-Gm-Message-State: AFeK/H3rgRPuf682C94d2mL2/IV6HXJqCnoGUC3T+cCynnzRNtUEUHdMj4j78Qbnh0RFaQ== X-Received: by 10.223.135.143 with SMTP id b15mr6943373wrb.16.1490349628507; Fri, 24 Mar 2017 03:00:28 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id 11sm2230924wrb.10.2017.03.24.03.00.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Mar 2017 03:00:27 -0700 (PDT) From: Mathieu Othacehe To: 26137@debbugs.gnu.org Subject: [PATCH v3 3/6] services: configuration: Rewrite id procedure. Date: Fri, 24 Mar 2017 11:00:14 +0100 Message-Id: <20170324100017.7702-4-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170324100017.7702-1-m.othacehe@gmail.com> References: <20170324100017.7702-1-m.othacehe@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26137 Cc: Mathieu Othacehe X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) * gnu/services/configuration.scm (id): Replace it using the more concise version found in messaging.scm. --- gnu/services/configuration.scm | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/gnu/services/configuration.scm b/gnu/services/configuration.scm index f59920d5a..4ee92e35f 100644 --- a/gnu/services/configuration.scm +++ b/gnu/services/configuration.scm @@ -87,14 +87,9 @@ (configuration-field-name field) val)))) fields)) -(define (id ctx part . parts) - (let ((part (syntax->datum part))) - (datum->syntax - ctx - (match parts - (() part) - (parts (symbol-append part - (syntax->datum (apply id ctx parts)))))))) +(define-syntax-rule (id ctx parts ...) + "Assemble PARTS into a raw (unhygienic) identifier." + (datum->syntax ctx (symbol-append (syntax->datum parts) ...))) (define-syntax define-maybe (lambda (x) -- 2.12.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 24 06:00:39 2017 Received: (at 26137) by debbugs.gnu.org; 24 Mar 2017 10:00:39 +0000 Received: from localhost ([127.0.0.1]:41750 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1crM1O-00040Z-Dp for submit@debbugs.gnu.org; Fri, 24 Mar 2017 06:00:39 -0400 Received: from mail-wm0-f52.google.com ([74.125.82.52]:35420) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1crM1H-0003zX-6k for 26137@debbugs.gnu.org; Fri, 24 Mar 2017 06:00:35 -0400 Received: by mail-wm0-f52.google.com with SMTP id u132so8755228wmg.0 for <26137@debbugs.gnu.org>; Fri, 24 Mar 2017 03:00:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=OrB0v5iYUVfe+gz1F+wzq7DTYLZ62sJZJUBPkDwnWqk=; b=mNePMEEsda5A6SSKldqWLJc0iKFuyrT5p3109SukqOOuCphjsYFBkm+Bt3e4pKnk5h mRx1eFvhKF2aKX8nnZXjWmB+mrIbFiHEHThMhpiBmj8k2rSydMHySwGrswnp2d3gritB rlr5UKg6KSa9pGUM1XjfyEbz7370S3uREvhU4hb2SIaFsYcQWkMdYGr6Mc5s0jZogEk7 q4SUQjkWxpxFyCTzjgDcGKiZ6HcBhvMJuOz8PDZFvzADhjNf8pV5cHp3yyuk7HthKWFv g8KDupwRGsyKYiEJK6oDLp9datCQ2UkRuAgFNV9cHDhrxc1Fc50UcSEcXIKwlH1A+maz UnEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=OrB0v5iYUVfe+gz1F+wzq7DTYLZ62sJZJUBPkDwnWqk=; b=KDG9LqOl0R+yaQVIE/UjrNsKlGZj4FJjnPz9EMwuX9ttIrIU63VyIqknHlXHIwXIBd D4Hr+BDEjx+HzW5JMaYPS7LNfkAvEXtnfyv5uyhpbkCrZvIlaKcd++eC6D9aiuAdMC8v 9b3KV82lrTOAIdn0GTd70kp1OL9T6CTPFZYv5nsb6FXbhidFo3XYiuWv65SjP9agZefa N9eZ3Dfl/SuGPWKo3I+3OxAgZfOuhyZKlvPeSwQHXQQx06s24WzUzbvYCo8KNG+forNH TSQNnO+9+1XQvwwqpwPhHsIm4ctUGjLqNtoLNLUUUsbEwFzKcLMDtCkDSvv0MFcv4MBo Lx8A== X-Gm-Message-State: AFeK/H3zW1n/Wcqf5mi908el17Fj1tDecy7SkWdeTv84vrfmcD661HcC6sv7aQlf08kvqA== X-Received: by 10.28.133.203 with SMTP id h194mr2051529wmd.122.1490349625350; Fri, 24 Mar 2017 03:00:25 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id 11sm2230924wrb.10.2017.03.24.03.00.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Mar 2017 03:00:24 -0700 (PDT) From: Mathieu Othacehe To: 26137@debbugs.gnu.org Subject: [PATCH v3 0/6] Add TLP service. Date: Fri, 24 Mar 2017 11:00:11 +0100 Message-Id: <20170324100017.7702-1-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.0 X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 26137 Cc: Mathieu Othacehe X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hi, Here's the v3 of the patch. It improves tlp documentation as discussed on IRC. Thanks, Mathieu Mathieu Othacehe (6): gnu: tlp: Read configuration from /etc/tlp. services: Factorize define-maybe macro. services: configuration: Rewrite id procedure. gnu: Add tlp service. services: openvpn: Fix a typo which was corrected in generated doc. doc: Re-generate openvpn service documentation. doc/guix.texi | 593 ++++++++++++++++++++++++++++++++++++++--- gnu/local.mk | 2 + gnu/packages/linux.scm | 2 +- gnu/services/configuration.scm | 29 +- gnu/services/messaging.scm | 23 +- gnu/services/pm.scm | 404 ++++++++++++++++++++++++++++ gnu/services/vpn.scm | 3 +- 7 files changed, 983 insertions(+), 73 deletions(-) create mode 100644 gnu/services/pm.scm -- 2.12.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 24 06:00:43 2017 Received: (at 26137) by debbugs.gnu.org; 24 Mar 2017 10:00:43 +0000 Received: from localhost ([127.0.0.1]:41752 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1crM1T-00040z-8q for submit@debbugs.gnu.org; Fri, 24 Mar 2017 06:00:43 -0400 Received: from mail-wr0-f174.google.com ([209.85.128.174]:34232) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1crM1M-0003zi-GJ for 26137@debbugs.gnu.org; Fri, 24 Mar 2017 06:00:37 -0400 Received: by mail-wr0-f174.google.com with SMTP id l43so5943978wre.1 for <26137@debbugs.gnu.org>; Fri, 24 Mar 2017 03:00:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mxu+nqLqbINnP+l27Ak0gWkQjjzzIldL3ULtAHgodAA=; b=XR5f0YBmojhQRJM512jmi7iNX9fWT4RSDpRSyzfgjxAIy/ewgcBnR8qO4FMcKrVJlI 9hMsS2pZawoY1WMUsVnaAN0uhhnRnVpWbaPVCTNEZSyYZH1EUY55aujNoP9GZyqgckzx m/xM1bk3TSIBS20U46aKk/G4d4AmB7knCesQtptENK99LnaJj5LOvBGXYW0ZtiE+pANR 8KTSMcU1kvLEdDqwwcsh1ScI8/tDm7huEeYyzSFOL0YFZtsJ+4BaIvJxfE4P2En7+u5+ 1dPVJcgopTinsRst/zIkKmhYB6Tf8UyndjCuHPMVnVMeEWd/AAcshR2p7ZLETe3Xriw5 yOAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=mxu+nqLqbINnP+l27Ak0gWkQjjzzIldL3ULtAHgodAA=; b=dY4Pf7v9Gfe6urNSzP7YnGGRpj1O0VQgSS6sim11UlWNq4gqH+70872SlhLJP+DRj5 PDDd+z6YckEPWGIBxvTeOwPisqtxJlMKkjs6jk1o0GgvnRPvVc1Q5hCPIctOdhCQh54V XFrjkYWZeaH/Id2zK1g85mucLKJZxQaUtxIYuLZqKUD/gI1tipB45pOlxRlWelJiRRMn +uy0NzO9uUbm1xR8T9aBtl68G/KoUbIo9JGHgE8M/2HZDpQuuQKBqTXd/9QWwWFZA1++ +/m06bmqGlNJK1cSEu4G5UOSansf/deiLqXGffXD8ZS1aXXB+kuSFRp/BtzcUEgqXsNY g59g== X-Gm-Message-State: AFeK/H2hntePTheXNSZh83X9ZFxQJ+0Dne1ZbuByMpH/F/dYz95EMmZlRRx8uD692CrRbA== X-Received: by 10.223.165.17 with SMTP id i17mr7267360wrb.70.1490349630833; Fri, 24 Mar 2017 03:00:30 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id 11sm2230924wrb.10.2017.03.24.03.00.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Mar 2017 03:00:30 -0700 (PDT) From: Mathieu Othacehe To: 26137@debbugs.gnu.org Subject: [PATCH v3 5/6] services: openvpn: Fix a typo which was corrected in generated doc. Date: Fri, 24 Mar 2017 11:00:16 +0100 Message-Id: <20170324100017.7702-6-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170324100017.7702-1-m.othacehe@gmail.com> References: <20170324100017.7702-1-m.othacehe@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 26137 Cc: Mathieu Othacehe X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.8 (--) * gnu/services/vpn.scm (define-split-configuration): Fix typo. --- gnu/services/vpn.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gnu/services/vpn.scm b/gnu/services/vpn.scm index 844a11b3d..e1a04a985 100644 --- a/gnu/services/vpn.scm +++ b/gnu/services/vpn.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2017 Julien Lepiller ;;; Copyright © 2017 Clément Lassieur +;;; Copyright © 2017 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; @@ -279,7 +280,7 @@ by the authority given in @code{ca}.") (key (string "/etc/openvpn/client.key") - "The key of the machine the daemon is running on. It must be the whose + "The key of the machine the daemon is running on. It must be the key whose certificate is @code{cert}.") (comp-lzo? -- 2.12.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 24 06:00:47 2017 Received: (at 26137) by debbugs.gnu.org; 24 Mar 2017 10:00:47 +0000 Received: from localhost ([127.0.0.1]:41754 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1crM1T-000411-Gt for submit@debbugs.gnu.org; Fri, 24 Mar 2017 06:00:47 -0400 Received: from mail-wm0-f53.google.com ([74.125.82.53]:33437) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1crM1M-0003zh-FL for 26137@debbugs.gnu.org; Fri, 24 Mar 2017 06:00:38 -0400 Received: by mail-wm0-f53.google.com with SMTP id v203so6505275wmg.0 for <26137@debbugs.gnu.org>; Fri, 24 Mar 2017 03:00:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=r7kMDm5gzjQLKrpj4cpbo+zlZV5ttosiLH7IL+/+Uo8=; b=pgAweVPjjX4JBV6eZSJtYm9CkuvaqWMiPNj20ZyAuAOZBHE3WHpUdbV0gt0aqD/wxX S9GC9u6z777VnSftZahFg9qBD6PqTf/+gYRjYrL/ei5/0lxGEv1Hq1mAl4e/pmjWrYOH scVmV7BMkCmR4kOLgPCd/m44NZc59Smi+5++1yrBpAc2Lehqx9Do3k9ZDKLPGBIFhh+2 15DlB/56r2kTW5MaRiKMB2H2JjOrqE0Pe0Pc7pfc9ZebgX6uc9b4JceYUgr6CeNaE1aF 8vxANYe6eQo1WUoCD0qFM5avY/g5YYd4aMylfT9KDwTDMRiAd1tqsEANQOatWqKn/p7C HNbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=r7kMDm5gzjQLKrpj4cpbo+zlZV5ttosiLH7IL+/+Uo8=; b=GjN7HNVDU6R6j8ws8yIAn9GHu/FqvDaXmkIHp81fs0PqBuaJwbd+Gl/DIfAPyRHRTV z9cA8i5tk3T2LwyGZlm3Fo1nPErhGSlIaBrc45AO/EpFL5h+IJRv9vfL9TIc+Gu88V+z mHe6/nUkRAQn4tJ4cEZBwOCAqX7JTAs+ZiU+mOqGL183Q1XfQ60QTLiSObd5fMWQVdRp IB7uwVEw6T6aGdUm5QcAyTV+plNRvPCmoON0c+Chl9eCvrMKx8PGL7wVHv3IqxeMcyc/ /UGaeieda+DJ2mGB2BrhUi3UExPmw1pVaZtqrVe/gqjLPhRTX+q43mFlkcvHd7e41IVq xZRg== X-Gm-Message-State: AFeK/H3YHyaRlnSZZ51ST77pwPF0VZvbfunPjkCzpLUJh4OFooR3d4wqs8drfB+hVayqtA== X-Received: by 10.28.109.93 with SMTP id i90mr2042350wmc.44.1490349629797; Fri, 24 Mar 2017 03:00:29 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id 11sm2230924wrb.10.2017.03.24.03.00.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Mar 2017 03:00:29 -0700 (PDT) From: Mathieu Othacehe To: 26137@debbugs.gnu.org Subject: [PATCH v3 4/6] gnu: Add tlp service. Date: Fri, 24 Mar 2017 11:00:15 +0100 Message-Id: <20170324100017.7702-5-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170324100017.7702-1-m.othacehe@gmail.com> References: <20170324100017.7702-1-m.othacehe@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 26137 Cc: Mathieu Othacehe X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) * gnu/services/pm.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add gnu/services/tlp.scm. * doc/guix.texi (Power management Services): New section. --- doc/guix.texi | 505 ++++++++++++++++++++++++++++++++++++++++++++++++++++ gnu/local.mk | 2 + gnu/services/pm.scm | 404 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 911 insertions(+) create mode 100644 gnu/services/pm.scm diff --git a/doc/guix.texi b/doc/guix.texi index fb0862096..79d9c9fcb 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -216,6 +216,7 @@ Services * VPN Services:: VPN daemons. * Network File System:: NFS related services. * Continuous Integration:: The Cuirass service. +* Power management Services:: The TLP tool. * Miscellaneous Services:: Other services. Defining Services @@ -8451,6 +8452,7 @@ declaration. * VPN Services:: VPN daemons. * Network File System:: NFS related services. * Continuous Integration:: The Cuirass service. +* Power management Services:: The TLP tool. * Miscellaneous Services:: Other services. @end menu @@ -13708,6 +13710,509 @@ The Cuirass package to use. @end table @end deftp +@node Power management Services +@subsubsection Power management Services + +@cindex power management with TLP +The @code{(gnu services pm)} module provides a Guix service definition +for the Linux power management tool TLP. + +TLP enables various powersaving modes in userspace and kernel. +Contrary to @code{upower-service}, it is not a passive, +monitoring tool, as it will apply custom settings each time a new power +source is detected. More information can be found at +@uref{http://linrunner.de/en/tlp/tlp.html, TLP home page.}. + +@deffn {Scheme Variable} tlp-service-type +The service type for the TLP tool. Its value should be a valid +TLP configuration (see below). For example: +@example +(service tlp-service-type (tlp-configuration)) +@end example +@end deffn + +By default TLP does not need much configuration but most TLP parameters +can be tweaked using @code{tlp-configuration}. + +Each parameter definition is preceded by its type; for example, +@samp{boolean foo} indicates that the @code{foo} parameter +should be specified as a boolean. Types starting with +@code{maybe-} denote parameters that won't show up in TLP config file +when their value is @code{'disabled}. + +@c The following documentation was initially generated by +@c (generate-tlp-documentation) in (gnu services pm). Manually maintained +@c documentation is better, so we shouldn't hesitate to edit below as +@c needed. However if the change you want to make to this documentation +@c can be done in an automated way, it's probably easier to change +@c (generate-documentation) than to make it below and have to deal with +@c the churn as TLP updates. + +Available @code{tlp-configuration} fields are: + +@deftypevr {@code{tlp-configuration} parameter} package tlp +The TLP package. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} boolean tlp-enable? +Set to true if you wish to enable TLP. + +Defaults to @samp{#t}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} string tlp-default-mode +Default mode when no power supply can be detected. Alternatives are AC +and BAT. + +Defaults to @samp{"AC"}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} non-negative-integer disk-idle-secs-on-ac +Number of seconds Linux kernel has to wait after the disk goes idle, +before syncing on AC. + +Defaults to @samp{0}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} non-negative-integer disk-idle-secs-on-bat +Same as @code{disk-idle-ac} but on BAT mode. + +Defaults to @samp{2}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} non-negative-integer max-lost-work-secs-on-ac +Dirty pages flushing periodicity, expressed in seconds. + +Defaults to @samp{15}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} non-negative-integer max-lost-work-secs-on-bat +Same as @code{max-lost-work-secs-on-ac} but on BAT mode. + +Defaults to @samp{60}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} maybe-space-separated-string-list cpu-scaling-governor-on-ac +CPU frequency scaling governor on AC mode. With intel_pstate driver, +alternatives are powersave and performance. With acpi-cpufreq driver, +alternatives are ondemand, powersave, performance and conservative. + +Defaults to @samp{disabled}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} maybe-space-separated-string-list cpu-scaling-governor-on-bat +Same as @code{cpu-scaling-governor-on-ac} but on BAT mode. + +Defaults to @samp{disabled}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} maybe-non-negative-integer cpu-scaling-min-freq-on-ac +Set the min available frequency for the scaling governor on AC. + +Defaults to @samp{disabled}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} maybe-non-negative-integer cpu-scaling-max-freq-on-ac +Set the max available frequency for the scaling governor on AC. + +Defaults to @samp{disabled}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} maybe-non-negative-integer cpu-scaling-min-freq-on-bat +Set the min available frequency for the scaling governor on BAT. + +Defaults to @samp{disabled}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} maybe-non-negative-integer cpu-scaling-max-freq-on-bat +Set the max available frequency for the scaling governor on BAT. + +Defaults to @samp{disabled}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} maybe-non-negative-integer cpu-min-perf-on-ac +Limit the min P-state to control the power dissipation of the CPU, in AC +mode. Values are stated as a percentage of the available performance. + +Defaults to @samp{disabled}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} maybe-non-negative-integer cpu-max-perf-on-ac +Limit the max P-state to control the power dissipation of the CPU, in AC +mode. Values are stated as a percentage of the available performance. + +Defaults to @samp{disabled}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} maybe-non-negative-integer cpu-min-perf-on-bat +Same as @code{cpu-min-perf-on-ac} on BAT mode. + +Defaults to @samp{disabled}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} maybe-non-negative-integer cpu-max-perf-on-bat +Same as @code{cpu-max-perf-on-ac} on BAT mode. + +Defaults to @samp{disabled}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} maybe-boolean cpu-boost-on-ac? +Enable CPU turbo boost feature on AC mode. + +Defaults to @samp{disabled}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} maybe-boolean cpu-boost-on-bat? +Same as @code{cpu-boost-on-ac?} on BAT mode. + +Defaults to @samp{disabled}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} boolean sched-powersave-on-ac? +Allow Linux kernel to minimize the number of CPU cores/hyper-threads +used under light load conditions. + +Defaults to @samp{#f}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} boolean sched-powersave-on-bat? +Same as @code{sched-powersave-on-ac?} but on BAT mode. + +Defaults to @samp{#t}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} boolean nmi-watchdog? +Enable Linux kernel NMI watchdog. + +Defaults to @samp{#f}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} maybe-string phc-controls +For Linux kernels with PHC patch applied, change CPU voltages. An +example value would be @samp{"F:V F:V F:V F:V"}. + +Defaults to @samp{disabled}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} string energy-perf-policy-on-ac +Set CPU performance versus energy saving policy on AC. Alternatives are +performance, normal, powersave. + +Defaults to @samp{"performance"}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} string energy-perf-policy-on-bat +Same as @code{energy-perf-policy-ac} but on BAT mode. + +Defaults to @samp{"powersave"}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} space-separated-string-list disks-devices +Hard disk devices. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} space-separated-string-list disk-apm-level-on-ac +Hard disk advanced power management level. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} space-separated-string-list disk-apm-level-on-bat +Same as @code{disk-apm-bat} but on BAT mode. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} maybe-space-separated-string-list disk-spindown-timeout-on-ac +Hard disk spin down timeout. One value has to be specified for each +declared hard disk. + +Defaults to @samp{disabled}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} maybe-space-separated-string-list disk-spindown-timeout-on-bat +Same as @code{disk-spindown-timeout-on-ac} but on BAT mode. + +Defaults to @samp{disabled}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} maybe-space-separated-string-list disk-iosched +Select IO scheduler for disk devices. One value has to be specified for +each declared hard disk. Example alternatives are cfq, deadline and +noop. + +Defaults to @samp{disabled}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} string sata-linkpwr-on-ac +SATA aggressive link power management (ALPM) level. Alternatives are +min_power, medium_power, max_performance. + +Defaults to @samp{"max_performance"}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} string sata-linkpwr-on-bat +Same as @code{sata-linkpwr-ac} but on BAT mode. + +Defaults to @samp{"min_power"}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} maybe-string sata-linkpwr-blacklist +Exclude specified SATA host devices for link power management. + +Defaults to @samp{disabled}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} maybe-on-off-boolean ahci-runtime-pm-on-ac? +Enable Runtime Power Management for AHCI controller and disks on AC +mode. + +Defaults to @samp{disabled}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} maybe-on-off-boolean ahci-runtime-pm-on-bat? +Same as @code{ahci-runtime-pm-on-ac} on BAT mode. + +Defaults to @samp{disabled}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} non-negative-integer ahci-runtime-pm-timeout +Seconds of inactivity before disk is suspended. + +Defaults to @samp{15}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} string pcie-aspm-on-ac +PCI Express Active State Power Management level. Alternatives are +default, performance, powersave. + +Defaults to @samp{"performance"}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} string pcie-aspm-on-bat +Same as @code{pcie-aspm-ac} but on BAT mode. + +Defaults to @samp{"powersave"}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} string radeon-power-profile-on-ac +Radeon graphics clock speed level. Alternatives are low, mid, high, +auto, default. + +Defaults to @samp{"high"}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} string radeon-power-profile-on-bat +Same as @code{radeon-power-ac} but on BAT mode. + +Defaults to @samp{"low"}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} string radeon-dpm-state-on-ac +Radeon dynamic power management method (DPM). Alternatives are battery, +performance. + +Defaults to @samp{"performance"}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} string radeon-dpm-state-on-bat +Same as @code{radeon-dpm-state-ac} but on BAT mode. + +Defaults to @samp{"battery"}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} string radeon-dpm-perf-level-on-ac +Radeon DPM performance level. Alternatives are auto, low, high. + +Defaults to @samp{"auto"}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} string radeon-dpm-perf-level-on-bat +Same as @code{radeon-dpm-perf-ac} but on BAT mode. + +Defaults to @samp{"auto"}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} on-off-boolean wifi-pwr-on-ac? +Wifi power saving mode. + +Defaults to @samp{#f}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} on-off-boolean wifi-pwr-on-bat? +Same as @code{wifi-power-ac?} but on BAT mode. + +Defaults to @samp{#t}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} y-n-boolean wol-disable? +Disable wake on LAN. + +Defaults to @samp{#t}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} non-negative-integer sound-power-save-on-ac +Timeout duration in seconds before activating audio power saving on +Intel HDA and AC97 devices. A value of 0 disables power saving. + +Defaults to @samp{0}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} non-negative-integer sound-power-save-on-bat +Same as @code{sound-powersave-ac} but on BAT mode. + +Defaults to @samp{1}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} y-n-boolean sound-power-save-controller? +Disable controller in powersaving mode on Intel HDA devices. + +Defaults to @samp{#t}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} boolean bay-poweroff-on-bat? +Enable optical drive in UltraBay/MediaBay on BAT mode. Drive can be +powered on again by releasing (and reinserting) the eject lever or by +pressing the disc eject button on newer models. + +Defaults to @samp{#f}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} string bay-device +Name of the optical drive device to power off. + +Defaults to @samp{"sr0"}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} string runtime-pm-on-ac +Runtime Power Management for PCI(e) bus devices. Alternatives are on +and auto. + +Defaults to @samp{"on"}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} string runtime-pm-on-bat +Same as @code{runtime-pm-ac} but on BAT mode. + +Defaults to @samp{"auto"}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} boolean runtime-pm-all? +Runtime Power Management for all PCI(e) bus devices, except blacklisted +ones. + +Defaults to @samp{#t}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} maybe-space-separated-string-list runtime-pm-blacklist +Exclude specified PCI(e) devices adresses from Runtime Power Management. + +Defaults to @samp{disabled}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} space-separated-string-list runtime-pm-driver-blacklist +Exclude PCI(e) devices assigned to the specified drivers from Runtime +Power Management. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} boolean usb-autosuspend? +Enable USB autosuspend feature. + +Defaults to @samp{#t}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} maybe-string usb-blacklist +Exclude specified devices from USB autosuspend. + +Defaults to @samp{disabled}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} boolean usb-blacklist-wwan? +Exclude WWAN devices from USB autosuspend. + +Defaults to @samp{#t}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} maybe-string usb-whitelist +Include specified devices into USB autosuspend, even if they are already +excluded by the driver or via @code{usb-blacklist-wwan?}. + +Defaults to @samp{disabled}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} maybe-boolean usb-autosuspend-disable-on-shutdown? +Enable USB autosuspend before shutdown. + +Defaults to @samp{disabled}. + +@end deftypevr + +@deftypevr {@code{tlp-configuration} parameter} boolean restore-device-state-on-startup? +Restore radio device state (bluetooth, wifi, wwan) from previous +shutdown on system startup. + +Defaults to @samp{#f}. + +@end deftypevr + @node Miscellaneous Services @subsubsection Miscellaneous Services diff --git a/gnu/local.mk b/gnu/local.mk index 0eb18f26c..f589cd946 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -10,6 +10,7 @@ # Copyright © 2016, 2017 Ricardo Wurmus # Copyright © 2016 Ben Woodcroft # Copyright © 2017 Clément Lassieur +# Copyright © 2017 Mathieu Othacehe # # This file is part of GNU Guix. # @@ -422,6 +423,7 @@ GNU_SYSTEM_MODULES = \ %D%/services/nfs.scm \ %D%/services/shepherd.scm \ %D%/services/herd.scm \ + %D%/services/pm.scm \ %D%/services/sddm.scm \ %D%/services/spice.scm \ %D%/services/ssh.scm \ diff --git a/gnu/services/pm.scm b/gnu/services/pm.scm new file mode 100644 index 000000000..ec35e5701 --- /dev/null +++ b/gnu/services/pm.scm @@ -0,0 +1,404 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2017 Mathieu Othacehe +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software: you can redistribute it and/or modify +;;; it under the terms of the GNU General Public License as published by +;;; the Free Software Foundation, either version 3 of the License, or +;;; (at your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, +;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu services pm) + #:use-module (guix gexp) + #:use-module (guix packages) + #:use-module (guix records) + #:use-module (gnu packages linux) + #:use-module (gnu services) + #:use-module (gnu services base) + #:use-module (gnu services configuration) + #:use-module (gnu services shepherd) + #:use-module (gnu system shadow) + #:export (tlp-service-type + tlp-configuration)) + +(define (uglify-field-name field-name) + (let ((str (symbol->string field-name))) + (string-join (string-split + (string-upcase + (if (string-suffix? "?" str) + (substring str 0 (1- (string-length str))) + str)) + #\-) + "_"))) + +(define (serialize-field field-name val) + (format #t "~a=~a\n" (uglify-field-name field-name) val)) + +(define (serialize-boolean field-name val) + (serialize-field field-name (if val "1" "0"))) +(define-maybe boolean) + +(define (serialize-string field-name val) + (serialize-field field-name val)) +(define-maybe string) + +(define (space-separated-string-list? val) + (and (list? val) + (and-map (lambda (x) + (and (string? x) (not (string-index x #\space)))) + val))) +(define (serialize-space-separated-string-list field-name val) + (serialize-field field-name + (format #f "~s" + (string-join val " ")))) +(define-maybe space-separated-string-list) + +(define (non-negative-integer? val) + (and (exact-integer? val) (not (negative? val)))) +(define (serialize-non-negative-integer field-name val) + (serialize-field field-name val)) +(define-maybe non-negative-integer) + +(define (on-off-boolean? val) + (boolean? val)) +(define (serialize-on-off-boolean field-name val) + (serialize-field field-name (if val "on" "off"))) +(define-maybe on-off-boolean) + +(define (y-n-boolean? val) + (boolean? val)) +(define (serialize-y-n-boolean field-name val) + (serialize-field field-name (if val "Y" "N"))) + +(define-configuration tlp-configuration + (tlp + (package tlp) + "The TLP package.") + + (tlp-enable? + (boolean #t) + "Set to true if you wish to enable TLP.") + + (tlp-default-mode + (string "AC") + "Default mode when no power supply can be detected. Alternatives are +AC and BAT.") + + (disk-idle-secs-on-ac + (non-negative-integer 0) + "Number of seconds Linux kernel has to wait after the disk goes idle, +before syncing on AC.") + + (disk-idle-secs-on-bat + (non-negative-integer 2) + "Same as @code{disk-idle-ac} but on BAT mode.") + + (max-lost-work-secs-on-ac + (non-negative-integer 15) + "Dirty pages flushing periodicity, expressed in seconds.") + + (max-lost-work-secs-on-bat + (non-negative-integer 60) + "Same as @code{max-lost-work-secs-on-ac} but on BAT mode.") + + (cpu-scaling-governor-on-ac + (maybe-space-separated-string-list 'disabled) + "CPU frequency scaling governor on AC mode. With intel_pstate +driver, alternatives are powersave and performance. With acpi-cpufreq driver, +alternatives are ondemand, powersave, performance and conservative.") + + (cpu-scaling-governor-on-bat + (maybe-space-separated-string-list 'disabled) + "Same as @code{cpu-scaling-governor-on-ac} but on BAT mode.") + + (cpu-scaling-min-freq-on-ac + (maybe-non-negative-integer 'disabled) + "Set the min available frequency for the scaling governor on AC.") + + (cpu-scaling-max-freq-on-ac + (maybe-non-negative-integer 'disabled) + "Set the max available frequency for the scaling governor on AC.") + + (cpu-scaling-min-freq-on-bat + (maybe-non-negative-integer 'disabled) + "Set the min available frequency for the scaling governor on BAT.") + + (cpu-scaling-max-freq-on-bat + (maybe-non-negative-integer 'disabled) + "Set the max available frequency for the scaling governor on BAT.") + + (cpu-min-perf-on-ac + (maybe-non-negative-integer 'disabled) + "Limit the min P-state to control the power dissipation of the CPU, +in AC mode. Values are stated as a percentage of the available performance.") + + (cpu-max-perf-on-ac + (maybe-non-negative-integer 'disabled) + "Limit the max P-state to control the power dissipation of the CPU, +in AC mode. Values are stated as a percentage of the available performance.") + + (cpu-min-perf-on-bat + (maybe-non-negative-integer 'disabled) + "Same as @code{cpu-min-perf-on-ac} on BAT mode.") + + (cpu-max-perf-on-bat + (maybe-non-negative-integer 'disabled) + "Same as @code{cpu-max-perf-on-ac} on BAT mode.") + + (cpu-boost-on-ac? + (maybe-boolean 'disabled) + "Enable CPU turbo boost feature on AC mode.") + + (cpu-boost-on-bat? + (maybe-boolean 'disabled) + "Same as @code{cpu-boost-on-ac?} on BAT mode.") + + (sched-powersave-on-ac? + (boolean #f) + "Allow Linux kernel to minimize the number of CPU cores/hyper-threads +used under light load conditions.") + + (sched-powersave-on-bat? + (boolean #t) + "Same as @code{sched-powersave-on-ac?} but on BAT mode.") + + (nmi-watchdog? + (boolean #f) + "Enable Linux kernel NMI watchdog.") + + (phc-controls + (maybe-string 'disabled) + "For Linux kernels with PHC patch applied, change CPU voltages. +An example value would be @samp{\"F:V F:V F:V F:V\"}.") + + (energy-perf-policy-on-ac + (string "performance") + "Set CPU performance versus energy saving policy on AC. Alternatives are +performance, normal, powersave.") + + (energy-perf-policy-on-bat + (string "powersave") + "Same as @code{energy-perf-policy-ac} but on BAT mode.") + + (disks-devices + (space-separated-string-list '("sda")) + "Hard disk devices.") + + (disk-apm-level-on-ac + (space-separated-string-list '("254" "254")) + "Hard disk advanced power management level.") + + (disk-apm-level-on-bat + (space-separated-string-list '("128" "128")) + "Same as @code{disk-apm-bat} but on BAT mode.") + + (disk-spindown-timeout-on-ac + (maybe-space-separated-string-list 'disabled) + "Hard disk spin down timeout. One value has to be specified for +each declared hard disk.") + + (disk-spindown-timeout-on-bat + (maybe-space-separated-string-list 'disabled) + "Same as @code{disk-spindown-timeout-on-ac} but on BAT mode.") + + (disk-iosched + (maybe-space-separated-string-list 'disabled) + "Select IO scheduler for disk devices. One value has to be specified +for each declared hard disk. Example alternatives are cfq, deadline and noop.") + + (sata-linkpwr-on-ac + (string "max_performance") + "SATA aggressive link power management (ALPM) level. Alternatives are +min_power, medium_power, max_performance.") + + (sata-linkpwr-on-bat + (string "min_power") + "Same as @code{sata-linkpwr-ac} but on BAT mode.") + + (sata-linkpwr-blacklist + (maybe-string 'disabled) + "Exclude specified SATA host devices for link power management.") + + (ahci-runtime-pm-on-ac? + (maybe-on-off-boolean 'disabled) + "Enable Runtime Power Management for AHCI controller and disks +on AC mode.") + + (ahci-runtime-pm-on-bat? + (maybe-on-off-boolean 'disabled) + "Same as @code{ahci-runtime-pm-on-ac} on BAT mode.") + + (ahci-runtime-pm-timeout + (non-negative-integer 15) + "Seconds of inactivity before disk is suspended.") + + (pcie-aspm-on-ac + (string "performance") + "PCI Express Active State Power Management level. Alternatives are +default, performance, powersave.") + + (pcie-aspm-on-bat + (string "powersave") + "Same as @code{pcie-aspm-ac} but on BAT mode.") + + (radeon-power-profile-on-ac + (string "high") + "Radeon graphics clock speed level. Alternatives are +low, mid, high, auto, default.") + + (radeon-power-profile-on-bat + (string "low") + "Same as @code{radeon-power-ac} but on BAT mode.") + + (radeon-dpm-state-on-ac + (string "performance") + "Radeon dynamic power management method (DPM). Alternatives are +battery, performance.") + + (radeon-dpm-state-on-bat + (string "battery") + "Same as @code{radeon-dpm-state-ac} but on BAT mode.") + + (radeon-dpm-perf-level-on-ac + (string "auto") + "Radeon DPM performance level. Alternatives are +auto, low, high.") + + (radeon-dpm-perf-level-on-bat + (string "auto") + "Same as @code{radeon-dpm-perf-ac} but on BAT mode.") + + (wifi-pwr-on-ac? + (on-off-boolean #f) + "Wifi power saving mode.") + + (wifi-pwr-on-bat? + (on-off-boolean #t) + "Same as @code{wifi-power-ac?} but on BAT mode.") + + (wol-disable? + (y-n-boolean #t) + "Disable wake on LAN.") + + (sound-power-save-on-ac + (non-negative-integer 0) + "Timeout duration in seconds before activating audio power saving + on Intel HDA and AC97 devices. A value of 0 disables power saving.") + + (sound-power-save-on-bat + (non-negative-integer 1) + "Same as @code{sound-powersave-ac} but on BAT mode.") + + (sound-power-save-controller? + (y-n-boolean #t) + "Disable controller in powersaving mode on Intel HDA devices.") + + (bay-poweroff-on-bat? + (boolean #f) + "Enable optical drive in UltraBay/MediaBay on BAT mode. +Drive can be powered on again by releasing (and reinserting) the eject lever +or by pressing the disc eject button on newer models.") + + (bay-device + (string "sr0") + "Name of the optical drive device to power off.") + + (runtime-pm-on-ac + (string "on") + "Runtime Power Management for PCI(e) bus devices. Alternatives are +on and auto.") + + (runtime-pm-on-bat + (string "auto") + "Same as @code{runtime-pm-ac} but on BAT mode.") + + (runtime-pm-all? + (boolean #t) + "Runtime Power Management for all PCI(e) bus devices, except +blacklisted ones.") + + (runtime-pm-blacklist + (maybe-space-separated-string-list 'disabled) + "Exclude specified PCI(e) devices adresses from Runtime Power Management.") + + (runtime-pm-driver-blacklist + (space-separated-string-list '("radeon" "nouveau")) + "Exclude PCI(e) devices assigned to the specified drivers from +Runtime Power Management.") + + (usb-autosuspend? + (boolean #t) + "Enable USB autosuspend feature.") + + (usb-blacklist + (maybe-string 'disabled) + "Exclude specified devices from USB autosuspend.") + + (usb-blacklist-wwan? + (boolean #t) + "Exclude WWAN devices from USB autosuspend.") + + (usb-whitelist + (maybe-string 'disabled) + "Include specified devices into USB autosuspend, even if they are +already excluded by the driver or via @code{usb-blacklist-wwan?}.") + + (usb-autosuspend-disable-on-shutdown? + (maybe-boolean 'disabled) + "Enable USB autosuspend before shutdown.") + + (restore-device-state-on-startup? + (boolean #f) + "Restore radio device state (bluetooth, wifi, wwan) from previous +shutdown on system startup.")) + + +(define (tlp-shepherd-service config) + (let* ((tlp-bin (file-append + (tlp-configuration-tlp config) "/bin/tlp")) + (tlp-action (lambda args + #~(lambda _ + (zero? (system* #$tlp-bin #$@args)))))) + (list (shepherd-service + (documentation "Run TLP script.") + (provision '(tlp)) + (requirement '(user-processes)) + (start (tlp-action "init" "start")) + (stop (tlp-action "init" "stop")))))) + +(define (tlp-activation config) + (let* ((config-str (with-output-to-string + (lambda () + (serialize-configuration + config + tlp-configuration-fields)))) + (config-file (plain-file "tlp" config-str))) + (with-imported-modules '((guix build utils)) + #~(begin + (use-modules (guix build utils)) + (copy-file #$config-file "/etc/tlp"))))) + +(define tlp-service-type + (service-type + (name 'tlp) + (extensions + (list + (service-extension shepherd-root-service-type + tlp-shepherd-service) + (service-extension udev-service-type + (compose list tlp-configuration-tlp)) + (service-extension activation-service-type + tlp-activation))))) + +(define (generate-tlp-documentation) + (generate-documentation + `((tlp-configuration ,tlp-configuration-fields)) + 'tlp-configuration)) -- 2.12.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 24 06:00:48 2017 Received: (at 26137) by debbugs.gnu.org; 24 Mar 2017 10:00:48 +0000 Received: from localhost ([127.0.0.1]:41756 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1crM1X-00041C-CJ for submit@debbugs.gnu.org; Fri, 24 Mar 2017 06:00:47 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:36212) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1crM1O-0003zq-1u for 26137@debbugs.gnu.org; Fri, 24 Mar 2017 06:00:39 -0400 Received: by mail-wm0-f65.google.com with SMTP id x124so2186242wmf.3 for <26137@debbugs.gnu.org>; Fri, 24 Mar 2017 03:00:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=2CBFOGNKfrc/EmzsKfQcnAFcGgI2AocpIXQkF8B05yQ=; b=q7lkxyZqqCDo6jKdOpA8pIyhBGveepNARfCcEq03Q5ozG1LjJLb31Lbl6p/YwFBiEr 02Gm1Fq61JbIduD2/K0dm3Qg3EgdSVfGyuwm03Lc7pnSGWbhq9BlHfLS7tMtZk3QaZFn r2dr3RvaJoly2Yr7GmUeoICkKAZJPl7n6RKnT7huokJIGm4wKhLKkFqbTRtAkhW/Odr9 8x3qMKGyzQctU6jZ6HZVkUAWvYlvm1Y9oaUT1htcTBRmjK/+OQMJSDi/s2B+QRubMPO/ 9QQIDzGZHKblctzXyRBDwVpOeiTokTNDbvaOT2CuPZq32YY1TlkXwvvH4vUe0wgDSfsO e+KQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=2CBFOGNKfrc/EmzsKfQcnAFcGgI2AocpIXQkF8B05yQ=; b=oFGI0COpqG8/xH3B4miadX993UiES2RKtYd1UPhtNXeJgT0A+jxkO3REaK6wIr4tss Xvq7+KSLSyKL2bpzMept2YYrM02p7Dnw3I48Lfc/heVjI5br40dhtb/t8tJ3uFhjb9Ck nPVmChum4HoCIQRpy82MMMHdHuj8cC9zjCVF4PCqKCTD1KIzOCvz0xB8EDiR5hrKLkLI bNXCZ8faqvr/bMpPdUlVX0iWrRm7aCYPQuWCycvgW/e9G8KgDy4MY76qZhJvnpYzJZ6q CHgAF8xgATG3scEWKUnraQ/DxtjsmnipLec2bRNmHJDdSe2SDLIbAQmLWmkCIHaewnRD HMlA== X-Gm-Message-State: AFeK/H2hpzj0yo5bhV2OMy7uuR7+KDSDjb0n8/YQO+TJTojCudFfdvl+u0zPOeRLugBZwg== X-Received: by 10.28.21.210 with SMTP id 201mr2121394wmv.94.1490349632100; Fri, 24 Mar 2017 03:00:32 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id 11sm2230924wrb.10.2017.03.24.03.00.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Mar 2017 03:00:31 -0700 (PDT) From: Mathieu Othacehe To: 26137@debbugs.gnu.org Subject: [PATCH v3 6/6] doc: Re-generate openvpn service documentation. Date: Fri, 24 Mar 2017 11:00:17 +0100 Message-Id: <20170324100017.7702-7-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170324100017.7702-1-m.othacehe@gmail.com> References: <20170324100017.7702-1-m.othacehe@gmail.com> X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 26137 Cc: Mathieu Othacehe X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) * doc/guix.texi (VPN Services): Generate documentation with generate-openvpn-server-documentation and generate-openvpn-client-documentation helpers and guile 2.1.7. --- doc/guix.texi | 88 +++++++++++++++++++++++++++++------------------------------ 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 79d9c9fcb..80eb2284e 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -13113,19 +13113,19 @@ Both can be run simultaneously. Available @code{openvpn-client-configuration} fields are: -@deftypevr @code{openvpn-client-configuration} parameter package openvpn +@deftypevr {@code{openvpn-client-configuration} parameter} package openvpn The OpenVPN package. @end deftypevr -@deftypevr @code{openvpn-client-configuration} parameter string pid-file +@deftypevr {@code{openvpn-client-configuration} parameter} string pid-file The OpenVPN pid file. Defaults to @samp{"/var/run/openvpn/openvpn.pid"}. @end deftypevr -@deftypevr @code{openvpn-client-configuration} parameter proto proto +@deftypevr {@code{openvpn-client-configuration} parameter} proto proto The protocol (UDP or TCP) used to open a channel between clients and servers. @@ -13133,21 +13133,21 @@ Defaults to @samp{udp}. @end deftypevr -@deftypevr @code{openvpn-client-configuration} parameter dev dev +@deftypevr {@code{openvpn-client-configuration} parameter} dev dev The device type used to represent the VPN connection. Defaults to @samp{tun}. @end deftypevr -@deftypevr @code{openvpn-client-configuration} parameter string ca +@deftypevr {@code{openvpn-client-configuration} parameter} string ca The certificate authority to check connections against. Defaults to @samp{"/etc/openvpn/ca.crt"}. @end deftypevr -@deftypevr @code{openvpn-client-configuration} parameter string cert +@deftypevr {@code{openvpn-client-configuration} parameter} string cert The certificate of the machine the daemon is running on. It should be signed by the authority given in @code{ca}. @@ -13155,7 +13155,7 @@ Defaults to @samp{"/etc/openvpn/client.crt"}. @end deftypevr -@deftypevr @code{openvpn-client-configuration} parameter string key +@deftypevr {@code{openvpn-client-configuration} parameter} string key The key of the machine the daemon is running on. It must be the key whose certificate is @code{cert}. @@ -13163,21 +13163,21 @@ Defaults to @samp{"/etc/openvpn/client.key"}. @end deftypevr -@deftypevr @code{openvpn-client-configuration} parameter boolean comp-lzo? +@deftypevr {@code{openvpn-client-configuration} parameter} boolean comp-lzo? Whether to use the lzo compression algorithm. Defaults to @samp{#t}. @end deftypevr -@deftypevr @code{openvpn-client-configuration} parameter boolean persist-key? +@deftypevr {@code{openvpn-client-configuration} parameter} boolean persist-key? Don't re-read key files across SIGUSR1 or --ping-restart. Defaults to @samp{#t}. @end deftypevr -@deftypevr @code{openvpn-client-configuration} parameter boolean persist-tun? +@deftypevr {@code{openvpn-client-configuration} parameter} boolean persist-tun? Don't close and reopen TUN/TAP device or run up/down scripts across SIGUSR1 or --ping-restart restarts. @@ -13185,14 +13185,14 @@ Defaults to @samp{#t}. @end deftypevr -@deftypevr @code{openvpn-client-configuration} parameter number verbosity +@deftypevr {@code{openvpn-client-configuration} parameter} number verbosity Verbosity level. Defaults to @samp{3}. @end deftypevr -@deftypevr @code{openvpn-client-configuration} parameter tls-auth-client tls-auth +@deftypevr {@code{openvpn-client-configuration} parameter} tls-auth-client tls-auth Add an additional layer of HMAC authentication on top of the TLS control channel to protect against DoS attacks. @@ -13200,42 +13200,42 @@ Defaults to @samp{#f}. @end deftypevr -@deftypevr @code{openvpn-client-configuration} parameter key-usage verify-key-usage? +@deftypevr {@code{openvpn-client-configuration} parameter} key-usage verify-key-usage? Whether to check the server certificate has server usage extension. Defaults to @samp{#t}. @end deftypevr -@deftypevr @code{openvpn-client-configuration} parameter bind bind? +@deftypevr {@code{openvpn-client-configuration} parameter} bind bind? Bind to a specific local port number. Defaults to @samp{#f}. @end deftypevr -@deftypevr @code{openvpn-client-configuration} parameter resolv-retry resolv-retry? +@deftypevr {@code{openvpn-client-configuration} parameter} resolv-retry resolv-retry? Retry resolving server address. Defaults to @samp{#t}. @end deftypevr -@deftypevr @code{openvpn-client-configuration} parameter openvpn-remote-list remote +@deftypevr {@code{openvpn-client-configuration} parameter} openvpn-remote-list remote A list of remote servers to connect to. Defaults to @samp{()}. Available @code{openvpn-remote-configuration} fields are: -@deftypevr @code{openvpn-remote-configuration} parameter string name +@deftypevr {@code{openvpn-remote-configuration} parameter} string name Server name. Defaults to @samp{"my-server"}. @end deftypevr -@deftypevr @code{openvpn-remote-configuration} parameter number port +@deftypevr {@code{openvpn-remote-configuration} parameter} number port Port number the server listens to. Defaults to @samp{1194}. @@ -13249,19 +13249,19 @@ Defaults to @samp{1194}. Available @code{openvpn-server-configuration} fields are: -@deftypevr @code{openvpn-server-configuration} parameter package openvpn +@deftypevr {@code{openvpn-server-configuration} parameter} package openvpn The OpenVPN package. @end deftypevr -@deftypevr @code{openvpn-server-configuration} parameter string pid-file +@deftypevr {@code{openvpn-server-configuration} parameter} string pid-file The OpenVPN pid file. Defaults to @samp{"/var/run/openvpn/openvpn.pid"}. @end deftypevr -@deftypevr @code{openvpn-server-configuration} parameter proto proto +@deftypevr {@code{openvpn-server-configuration} parameter} proto proto The protocol (UDP or TCP) used to open a channel between clients and servers. @@ -13269,21 +13269,21 @@ Defaults to @samp{udp}. @end deftypevr -@deftypevr @code{openvpn-server-configuration} parameter dev dev +@deftypevr {@code{openvpn-server-configuration} parameter} dev dev The device type used to represent the VPN connection. Defaults to @samp{tun}. @end deftypevr -@deftypevr @code{openvpn-server-configuration} parameter string ca +@deftypevr {@code{openvpn-server-configuration} parameter} string ca The certificate authority to check connections against. Defaults to @samp{"/etc/openvpn/ca.crt"}. @end deftypevr -@deftypevr @code{openvpn-server-configuration} parameter string cert +@deftypevr {@code{openvpn-server-configuration} parameter} string cert The certificate of the machine the daemon is running on. It should be signed by the authority given in @code{ca}. @@ -13291,7 +13291,7 @@ Defaults to @samp{"/etc/openvpn/client.crt"}. @end deftypevr -@deftypevr @code{openvpn-server-configuration} parameter string key +@deftypevr {@code{openvpn-server-configuration} parameter} string key The key of the machine the daemon is running on. It must be the key whose certificate is @code{cert}. @@ -13299,21 +13299,21 @@ Defaults to @samp{"/etc/openvpn/client.key"}. @end deftypevr -@deftypevr @code{openvpn-server-configuration} parameter boolean comp-lzo? +@deftypevr {@code{openvpn-server-configuration} parameter} boolean comp-lzo? Whether to use the lzo compression algorithm. Defaults to @samp{#t}. @end deftypevr -@deftypevr @code{openvpn-server-configuration} parameter boolean persist-key? +@deftypevr {@code{openvpn-server-configuration} parameter} boolean persist-key? Don't re-read key files across SIGUSR1 or --ping-restart. Defaults to @samp{#t}. @end deftypevr -@deftypevr @code{openvpn-server-configuration} parameter boolean persist-tun? +@deftypevr {@code{openvpn-server-configuration} parameter} boolean persist-tun? Don't close and reopen TUN/TAP device or run up/down scripts across SIGUSR1 or --ping-restart restarts. @@ -13321,14 +13321,14 @@ Defaults to @samp{#t}. @end deftypevr -@deftypevr @code{openvpn-server-configuration} parameter number verbosity +@deftypevr {@code{openvpn-server-configuration} parameter} number verbosity Verbosity level. Defaults to @samp{3}. @end deftypevr -@deftypevr @code{openvpn-server-configuration} parameter tls-auth-server tls-auth +@deftypevr {@code{openvpn-server-configuration} parameter} tls-auth-server tls-auth Add an additional layer of HMAC authentication on top of the TLS control channel to protect against DoS attacks. @@ -13336,56 +13336,56 @@ Defaults to @samp{#f}. @end deftypevr -@deftypevr @code{openvpn-server-configuration} parameter number port +@deftypevr {@code{openvpn-server-configuration} parameter} number port Specifies the port number on which the server listens. Defaults to @samp{1194}. @end deftypevr -@deftypevr @code{openvpn-server-configuration} parameter ip-mask server +@deftypevr {@code{openvpn-server-configuration} parameter} ip-mask server An ip and mask specifying the subnet inside the virtual network. Defaults to @samp{"10.8.0.0 255.255.255.0"}. @end deftypevr -@deftypevr @code{openvpn-server-configuration} parameter cidr6 server-ipv6 +@deftypevr {@code{openvpn-server-configuration} parameter} cidr6 server-ipv6 A CIDR notation specifying the IPv6 subnet inside the virtual network. Defaults to @samp{#f}. @end deftypevr -@deftypevr @code{openvpn-server-configuration} parameter string dh +@deftypevr {@code{openvpn-server-configuration} parameter} string dh The Diffie-Hellman parameters file. Defaults to @samp{"/etc/openvpn/dh2048.pem"}. @end deftypevr -@deftypevr @code{openvpn-server-configuration} parameter string ifconfig-pool-persist +@deftypevr {@code{openvpn-server-configuration} parameter} string ifconfig-pool-persist The file that records client IPs. Defaults to @samp{"/etc/openvpn/ipp.txt"}. @end deftypevr -@deftypevr @code{openvpn-server-configuration} parameter gateway redirect-gateway? +@deftypevr {@code{openvpn-server-configuration} parameter} gateway redirect-gateway? When true, the server will act as a gateway for its clients. Defaults to @samp{#f}. @end deftypevr -@deftypevr @code{openvpn-server-configuration} parameter boolean client-to-client? +@deftypevr {@code{openvpn-server-configuration} parameter} boolean client-to-client? When true, clients are alowed to talk to each other inside the VPN. Defaults to @samp{#f}. @end deftypevr -@deftypevr @code{openvpn-server-configuration} parameter keepalive keepalive +@deftypevr {@code{openvpn-server-configuration} parameter} keepalive keepalive Causes ping-like messages to be sent back and forth over the link so that each side knows when the other side has gone down. @code{keepalive} requires a pair. The first element is the period of the ping sending, @@ -13394,14 +13394,14 @@ down. @end deftypevr -@deftypevr @code{openvpn-server-configuration} parameter number max-clients +@deftypevr {@code{openvpn-server-configuration} parameter} number max-clients The maximum number of clients. Defaults to @samp{100}. @end deftypevr -@deftypevr @code{openvpn-server-configuration} parameter string status +@deftypevr {@code{openvpn-server-configuration} parameter} string status The status file. This file shows a small report on current connection. It is trunkated and rewritten every minute. @@ -13409,28 +13409,28 @@ Defaults to @samp{"/var/run/openvpn/status"}. @end deftypevr -@deftypevr @code{openvpn-server-configuration} parameter openvpn-ccd-list client-config-dir +@deftypevr {@code{openvpn-server-configuration} parameter} openvpn-ccd-list client-config-dir The list of configuration for some clients. Defaults to @samp{()}. Available @code{openvpn-ccd-configuration} fields are: -@deftypevr @code{openvpn-ccd-configuration} parameter string name +@deftypevr {@code{openvpn-ccd-configuration} parameter} string name Client name. Defaults to @samp{"client"}. @end deftypevr -@deftypevr @code{openvpn-ccd-configuration} parameter ip-mask iroute +@deftypevr {@code{openvpn-ccd-configuration} parameter} ip-mask iroute Client own network Defaults to @samp{#f}. @end deftypevr -@deftypevr @code{openvpn-ccd-configuration} parameter ip-mask ifconfig-push +@deftypevr {@code{openvpn-ccd-configuration} parameter} ip-mask ifconfig-push Client VPN IP. Defaults to @samp{#f}. -- 2.12.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 24 11:20:38 2017 Received: (at 26137) by debbugs.gnu.org; 24 Mar 2017 15:20:38 +0000 Received: from localhost ([127.0.0.1]:42556 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1crR14-0000GV-Bm for submit@debbugs.gnu.org; Fri, 24 Mar 2017 11:20:38 -0400 Received: from mail.lassieur.org ([83.152.10.219]:49900) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1crR12-0000GN-M8 for 26137@debbugs.gnu.org; Fri, 24 Mar 2017 11:20:37 -0400 Received: from rodion (88.191.118.83 [88.191.118.83]) by mail.lassieur.org (OpenSMTPD) with ESMTPSA id fdab7326 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Fri, 24 Mar 2017 15:20:35 +0000 (UTC) References: <20170317103138.7557-1-m.othacehe@gmail.com> <20170324100017.7702-1-m.othacehe@gmail.com> User-agent: mu4e 0.9.18; emacs 25.2.1 From: =?utf-8?Q?Cl=C3=A9ment?= Lassieur To: Mathieu Othacehe Subject: Re: bug#26137: [PATCH v3 0/6] Add TLP service. In-reply-to: <20170324100017.7702-1-m.othacehe@gmail.com> Date: Fri, 24 Mar 2017 16:20:34 +0100 Message-ID: <87efxmitvh.fsf@lassieur.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 26137 Cc: 26137@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Mathieu Othacehe writes: > Hi, > > Here's the v3 of the patch. It improves tlp documentation > as discussed on IRC. > > Thanks, Pushed! With small indentation changes and an extra dot removed in the documentation. I also realized one of my comments (about splitting a commit into two different ones) was useless, sorry for this. Thanks! Clément From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 24 11:20:53 2017 Received: (at control) by debbugs.gnu.org; 24 Mar 2017 15:20:53 +0000 Received: from localhost ([127.0.0.1]:42559 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1crR1J-0000Gz-JP for submit@debbugs.gnu.org; Fri, 24 Mar 2017 11:20:53 -0400 Received: from mail.lassieur.org ([83.152.10.219]:49904) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1crR1I-0000Gr-5U for control@debbugs.gnu.org; Fri, 24 Mar 2017 11:20:52 -0400 Received: from rodion (88.191.118.83 [88.191.118.83]) by mail.lassieur.org (OpenSMTPD) with ESMTPSA id 05c0d8ea (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for ; Fri, 24 Mar 2017 15:20:50 +0000 (UTC) Date: Fri, 24 Mar 2017 16:20:50 +0100 Message-Id: <87d1d6itv1.fsf@lassieur.org> To: control@debbugs.gnu.org From: clement@lassieur.org (=?utf-8?Q?Cl=C3=A9ment?= Lassieur) Subject: control message for bug #26137 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) tags 26137 fixed close 26137 From unknown Sat Sep 20 08:01:40 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 22 Apr 2017 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator