X-Loop: help-debbugs@HIDDEN Subject: [bug#62005] [PATCH] services: tor: Deprecate 'tor-hidden-service' procedure. Resent-From: Bruno Victal <mirai@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: ludo@HIDDEN, guix-patches@HIDDEN Resent-Date: Mon, 06 Mar 2023 17:26:02 +0000 Resent-Message-ID: <handler.62005.B.167812351125829 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 62005 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 62005 <at> debbugs.gnu.org Cc: Bruno Victal <mirai@HIDDEN>, ludo@HIDDEN X-Debbugs-Original-To: guix-patches@HIDDEN X-Debbugs-Original-Xcc: ludo@HIDDEN Received: via spool by submit <at> debbugs.gnu.org id=B.167812351125829 (code B ref -1); Mon, 06 Mar 2023 17:26:02 +0000 Received: (at submit) by debbugs.gnu.org; 6 Mar 2023 17:25:11 +0000 Received: from localhost ([127.0.0.1]:43545 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pZEaF-0006iW-5v for submit <at> debbugs.gnu.org; Mon, 06 Mar 2023 12:25:11 -0500 Received: from lists.gnu.org ([209.51.188.17]:54732) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <mirai@HIDDEN>) id 1pZEaD-0006iP-El for submit <at> debbugs.gnu.org; Mon, 06 Mar 2023 12:25:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <mirai@HIDDEN>) id 1pZEaD-0002jO-88 for guix-patches@HIDDEN; Mon, 06 Mar 2023 12:25:09 -0500 Received: from smtpm1.myservices.hosting ([185.26.105.232]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <mirai@HIDDEN>) id 1pZEaA-0000Pf-U0 for guix-patches@HIDDEN; Mon, 06 Mar 2023 12:25:08 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm1.myservices.hosting (Postfix) with ESMTP id CE30420495 for <guix-patches@HIDDEN>; Mon, 6 Mar 2023 18:25:00 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 88AE380097; Mon, 6 Mar 2023 18:25:00 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id p9RDlMPA35PQ; Mon, 6 Mar 2023 18:25:00 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@HIDDEN) by mail1.netim.hosting (Postfix) with ESMTPSA id C7ABF8009C; Mon, 6 Mar 2023 18:24:59 +0100 (CET) From: Bruno Victal <mirai@HIDDEN> Date: Mon, 6 Mar 2023 17:24:54 +0000 Message-Id: <6254896f46b35816c7784569724d82248e4b7acf.1678123306.git.mirai@HIDDEN> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=185.26.105.232; envelope-from=mirai@HIDDEN; helo=smtpm1.myservices.hosting X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.3 (--) Due to (now renamed) 'hidden-service' record type not being exported, the only way hidden services could have worked is through the now deprecated 'tor-hidden-service' procedure which also had the issue that it can only be used once since the returned service always had the same name. This commit fixes the Tor service documentation and deprecates 'tor-hidden-service' procedure, correcting some inconsistencies along the way. * doc/guix.texi (Networking Services): Add examples for Tor hidden services. Document <tor-hidden-service-configuration>. Remove mention of 'tor-hidden-service' procedure. * gnu/services/networking.scm: Export tor-configuration-tor, tor-configuration-config-file, tor-configuration-hidden-services, tor-configuration-socks-socket-type, tor-configuration-control-socket-path, tor-hidden-service-configuration, tor-hidden-service-configuration?, tor-hidden-service-configuration-name, tor-hidden-service-configuration-mapping. (<tor-configuration>)[control-socket?]: Rename accessor. (<hidden-service>): Rename to ... (<tor-hidden-service-configuration>): ... this. (tor-configuration->torrc): Update record-type name. (tor-activation): Ditto. (tor-service-type): Tweak comment. (tor-hidden-service-type): Remove variable. (tor-hidden-service): Deprecate procedure. --- Split from #61789. To be decided: whether hidden-services should be renamed to onion-services. doc/guix.texi | 55 +++++++++++++++++++++++-------------- gnu/services/networking.scm | 47 +++++++++++++++++-------------- 2 files changed, 61 insertions(+), 41 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 6671ba9305..51fe0a6119 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -20494,11 +20494,21 @@ Networking Services @cindex Tor @defvar tor-service-type -This is the type for a service that runs the @uref{https://torproject.org, -Tor} anonymous networking daemon. The service is configured using a +Type for a service that runs the @uref{https://torproject.org, Tor} +anonymous networking daemon. The service is configured using a @code{<tor-configuration>} record. By default, the Tor daemon runs as the @code{tor} unprivileged user, which is a member of the @code{tor} group. +In addition to adding Tor @dfn{hidden service}s records to the service +configuration directly, this service can be extended by other services to add +hidden services, as in this example: + +@lisp +(simple-service 'my-extra-hidden-service tor-service-type + (list (tor-hidden-service-configuration + (name "extra-hidden-service") + (mapping '((80 "127.0.0.1:8080")))))) +@end lisp @end defvar @deftp {Data Type} tor-configuration @@ -20517,11 +20527,10 @@ Networking Services syntax. @item @code{hidden-services} (default: @code{'()}) -The list of @code{<hidden-service>} records to use. For any hidden service -you include in this list, appropriate configuration to enable the hidden -service will be automatically added to the default configuration file. You -may conveniently create @code{<hidden-service>} records using the -@code{tor-hidden-service} procedure described below. +The list of @code{<tor-hidden-service-configuration>} records to use. +For any hidden service you include in this list, appropriate +configuration to enable the hidden service will be automatically added to +the default configuration file. @item @code{socks-socket-type} (default: @code{'tcp}) The default socket type that Tor should use for its SOCKS socket. This must @@ -20546,26 +20555,32 @@ Networking Services @end table @end deftp -@cindex hidden service -@deffn {Scheme Procedure} tor-hidden-service @var{name} @var{mapping} -Define a new Tor @dfn{hidden service} called @var{name} and implementing -@var{mapping}. @var{mapping} is a list of port/host tuples, such as: +@cindex hidden service, tor +@deftp {Data Type} tor-hidden-service-configuration +Data Type representing a Tor @dfn{hidden service} configuration. +See @uref{https://www.torproject.org/docs/tor-hidden-service.html.en, the Tor +project's documentation} for more information. + +@table @asis +@item @code{name} (type: string) +Name for the Tor @dfn{hidden service}. +This creates a @file{/var/lib/tor/hidden-services/@var{name}} directory, +where the @file{hostname} file contains the @samp{.onion} host name for +the hidden service. + +@item @code{mapping} (type: list-of-list) +List of host---@dfn{hidden-service} port mappings, such as: @example - '((22 "127.0.0.1:22") - (80 "127.0.0.1:8080")) +'((22 "127.0.0.1:22") + (80 "127.0.0.1:8080")) @end example In this example, port 22 of the hidden service is mapped to local port 22, and port 80 is mapped to local port 8080. -This creates a @file{/var/lib/tor/hidden-services/@var{name}} directory, where -the @file{hostname} file contains the @code{.onion} host name for the hidden -service. - -See @uref{https://www.torproject.org/docs/tor-hidden-service.html.en, the Tor -project's documentation} for more information. -@end deffn +@end table +@end deftp The @code{(gnu services rsync)} module provides the following services: diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm index dacf64c2d1..d6e1877ef5 100644 --- a/gnu/services/networking.scm +++ b/gnu/services/networking.scm @@ -138,7 +138,16 @@ (define-module (gnu services networking) tor-configuration tor-configuration? - tor-hidden-service + tor-configuration-tor + tor-configuration-config-file + tor-configuration-hidden-services + tor-configuration-socks-socket-type + tor-configuration-control-socket-path + tor-hidden-service-configuration + tor-hidden-service-configuration? + tor-hidden-service-configuration-name + tor-hidden-service-configuration-mapping + tor-hidden-service ; deprecated tor-service-type network-manager-configuration @@ -919,7 +928,7 @@ (define-record-type* <tor-configuration> (default '())) (socks-socket-type tor-configuration-socks-socket-type ; 'tcp or 'unix (default 'tcp)) - (control-socket? tor-control-socket-path + (control-socket? tor-configuration-control-socket-path (default #f))) (define %tor-accounts @@ -933,11 +942,11 @@ (define %tor-accounts (home-directory "/var/empty") (shell (file-append shadow "/sbin/nologin"))))) -(define-record-type <hidden-service> - (hidden-service name mapping) - hidden-service? - (name hidden-service-name) ;string - (mapping hidden-service-mapping)) ;list of port/address tuples +(define-record-type <tor-hidden-service-configuration> + (tor-hidden-service-configuration name mapping) + tor-hidden-service-configuration? + (name tor-hidden-service-configuration-name) ;string + (mapping tor-hidden-service-configuration-mapping)) ;list of port/address tuples (define (tor-configuration->torrc config) "Return a 'torrc' file for CONFIG." @@ -977,7 +986,7 @@ (define (tor-configuration->torrc config) tcp-port host)) ports hosts))) '#$(map (match-lambda - (($ <hidden-service> name mapping) + (($ <tor-hidden-service-configuration> name mapping) (cons name mapping))) hidden-services)) @@ -1064,7 +1073,7 @@ (define (tor-activation config) (chmod "/var/lib" #o755) (for-each initialize - '#$(map hidden-service-name + '#$(map tor-hidden-service-configuration-name (tor-configuration-hidden-services config))))) (define tor-service-type @@ -1077,7 +1086,7 @@ (define tor-service-type (service-extension activation-service-type tor-activation))) - ;; This can be extended with hidden services. + ;; This can be extended with tor hidden services. (compose concatenate) (extend (lambda (config services) (tor-configuration @@ -1090,15 +1099,8 @@ (define tor-service-type "Run the @uref{https://torproject.org, Tor} anonymous networking daemon."))) -(define tor-hidden-service-type - ;; A type that extends Tor with hidden services. - (service-type (name 'tor-hidden-service) - (extensions - (list (service-extension tor-service-type list))) - (description - "Define a new Tor @dfn{hidden service}."))) - -(define (tor-hidden-service name mapping) +(define-deprecated (tor-hidden-service name mapping) + #f "Define a new Tor @dfn{hidden service} called @var{name} and implementing @var{mapping}. @var{mapping} is a list of port/host tuples, such as: @@ -1116,8 +1118,11 @@ (define (tor-hidden-service name mapping) See @uref{https://www.torproject.org/docs/tor-hidden-service.html.en, the Tor project's documentation} for more information." - (service tor-hidden-service-type - (hidden-service name mapping))) + (simple-service 'tor-hidden-service + tor-service-type + (list (tor-hidden-service-configuration + (name name) + (mapping mapping))))) ;;; -- 2.39.1
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Bruno Victal <mirai@HIDDEN> Subject: bug#62005: Acknowledgement ([PATCH] services: tor: Deprecate 'tor-hidden-service' procedure.) Message-ID: <handler.62005.B.167812351125829.ack <at> debbugs.gnu.org> References: <6254896f46b35816c7784569724d82248e4b7acf.1678123306.git.mirai@HIDDEN> X-Gnu-PR-Message: ack 62005 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 62005 <at> debbugs.gnu.org Date: Mon, 06 Mar 2023 17:26:02 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. As you requested using X-Debbugs-CC, your message was also forwarded to ludo@HIDDEN (after having been given a bug report number, if it did not have one). Your message has been sent to the package maintainer(s): guix-patches@HIDDEN If you wish to submit further information on this problem, please send it to 62005 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 62005: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D62005 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
X-Loop: help-debbugs@HIDDEN Subject: [bug#62005] [PATCH v2] services: tor: Deprecate 'tor-hidden-service' procedure. References: <6254896f46b35816c7784569724d82248e4b7acf.1678123306.git.mirai@HIDDEN> In-Reply-To: <6254896f46b35816c7784569724d82248e4b7acf.1678123306.git.mirai@HIDDEN> Resent-From: Bruno Victal <mirai@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: guix-patches@HIDDEN Resent-Date: Sun, 09 Apr 2023 14:48:02 +0000 Resent-Message-ID: <handler.62005.B62005.168105165120139 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 62005 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 62005 <at> debbugs.gnu.org Cc: ludo@HIDDEN, Bruno Victal <mirai@HIDDEN> Received: via spool by 62005-submit <at> debbugs.gnu.org id=B62005.168105165120139 (code B ref 62005); Sun, 09 Apr 2023 14:48:02 +0000 Received: (at 62005) by debbugs.gnu.org; 9 Apr 2023 14:47:31 +0000 Received: from localhost ([127.0.0.1]:33554 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1plWKI-0005Ek-CX for submit <at> debbugs.gnu.org; Sun, 09 Apr 2023 10:47:31 -0400 Received: from smtpmciv4.myservices.hosting ([185.26.107.240]:50642) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <mirai@HIDDEN>) id 1plWKF-0005Eb-NL for 62005 <at> debbugs.gnu.org; Sun, 09 Apr 2023 10:47:29 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpmciv4.myservices.hosting (Postfix) with ESMTP id 80609207A8; Sun, 9 Apr 2023 16:47:26 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id E7BA08009B; Sun, 9 Apr 2023 16:47:25 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 1cDVcOlNP1KJ; Sun, 9 Apr 2023 16:47:24 +0200 (CEST) Received: from guix-nuc.home.arpa (unknown [10.192.1.83]) (Authenticated sender: lumen@HIDDEN) by mail1.netim.hosting (Postfix) with ESMTPSA id ABD8D80079; Sun, 9 Apr 2023 16:47:23 +0200 (CEST) From: Bruno Victal <mirai@HIDDEN> Date: Sun, 9 Apr 2023 15:47:19 +0100 Message-Id: <2f32f2b2bb371a2356cc385ccafdf86e7135d4cd.1681051448.git.mirai@HIDDEN> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Due to (now renamed) 'hidden-service' record type not being exported, the only way Onion services (formely hidden services) could have worked is through the now deprecated 'tor-hidden-service' procedure. This commit updates the Tor service documentation, corrects some inconsistently named accessors in <tor-configuration> record-type, renames and refactors tor-hidden-service-configuration to tor-onion-service-configuration using define-configuration and also exports it, allowing Onion services to be configured directly within a <tor-configuration> record. Lastly, it also deprecates the 'tor-hidden-service' procedure. * doc/guix.texi (Networking Services): Substitute mentions of “Hidden services” with “Onion Services”. Add a Tor Onion service configuration example. Document <tor-onion-service-configuration>. Remove mention of 'tor-hidden-service' procedure. * gnu/services/networking.scm: Export tor-configuration-tor, tor-configuration-config-file, tor-configuration-hidden-services, tor-configuration-socks-socket-type, tor-configuration-control-socket-path, tor-onion-service-configuration, tor-onion-service-configuration?, tor-onion-service-configuration-name, tor-onion-service-configuration-mapping. (<tor-configuration>)[control-socket?]: Rename accessor. (<hidden-service>): Replace with … (<tor-onion-service-configuration>): … this. (tor-configuration->torrc): Update record-type name. (tor-activation): Ditto. (tor-hidden-service-type): Remove variable. (tor-hidden-service): Deprecate procedure. --- Notable changes since v1: * Replaced mentions of hidden services with Onion Services. * Use define-configuration for tor-onion-service-configuration. Tested with: make check-system TESTS=tor and inspected output from 'tor-configuration->torrc'. doc/guix.texi | 61 ++++++++++++++++++++++-------------- gnu/services/networking.scm | 62 +++++++++++++++++++++++-------------- 2 files changed, 76 insertions(+), 47 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index ed42488882..6a89562cf1 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -20578,11 +20578,21 @@ Networking Services @cindex Tor @defvar tor-service-type -This is the type for a service that runs the @uref{https://torproject.org, -Tor} anonymous networking daemon. The service is configured using a +Type for a service that runs the @uref{https://torproject.org, Tor} +anonymous networking daemon. The service is configured using a @code{<tor-configuration>} record. By default, the Tor daemon runs as the @code{tor} unprivileged user, which is a member of the @code{tor} group. +In addition to adding Tor @dfn{Onion Service}s records to the service +configuration directly, this service can be extended by other services to add +Onion Services, as in this example: + +@lisp +(simple-service 'my-extra-onion-service tor-service-type + (list (tor-onion-service-configuration + (name "extra-onion-service") + (mapping '((80 . "127.0.0.1:8080")))))) +@end lisp @end defvar @deftp {Data Type} tor-configuration @@ -20601,11 +20611,10 @@ Networking Services syntax. @item @code{hidden-services} (default: @code{'()}) -The list of @code{<hidden-service>} records to use. For any hidden service -you include in this list, appropriate configuration to enable the hidden -service will be automatically added to the default configuration file. You -may conveniently create @code{<hidden-service>} records using the -@code{tor-hidden-service} procedure described below. +The list of @code{<tor-onion-service-configuration>} records to use. +For any Onion Service you include in this list, appropriate +configuration to enable the Onion Service will be automatically added to +the default configuration file. @item @code{socks-socket-type} (default: @code{'tcp}) The default socket type that Tor should use for its SOCKS socket. This must @@ -20630,26 +20639,30 @@ Networking Services @end table @end deftp -@cindex hidden service -@deffn {Scheme Procedure} tor-hidden-service @var{name} @var{mapping} -Define a new Tor @dfn{hidden service} called @var{name} and implementing -@var{mapping}. @var{mapping} is a list of port/host tuples, such as: - -@example - '((22 "127.0.0.1:22") - (80 "127.0.0.1:8080")) -@end example +@cindex onion service, tor +@deftp {Data Type} tor-onion-service-configuration +Data Type representing a Tor @dfn{Onion Service} configuration. +See @url{https://community.torproject.org/onion-services/, the Tor +project's documentation} for more information. +Available @code{tor-onion-service-configuration} fields are: -In this example, port 22 of the hidden service is mapped to local port 22, and -port 80 is mapped to local port 8080. +@table @asis +@item @code{name} (type: string) +Name for this Onion Service. This creates a +@file{/var/lib/tor/hidden-services/@var{name}} directory, where the +@file{hostname} file contains the @indicateurl{.onion} host name for this Onion +Service. -This creates a @file{/var/lib/tor/hidden-services/@var{name}} directory, where -the @file{hostname} file contains the @code{.onion} host name for the hidden -service. +@item @code{mapping} (type: alist) +Association list of port to address mappings. The following example: +@lisp +'((22 . "127.0.0.1:22") + (80 . "127.0.0.1:8080")) +@end lisp +maps ports 22 and 80 of the Onion Service to the local ports 22 and 8080. -See @uref{https://www.torproject.org/docs/tor-hidden-service.html.en, the Tor -project's documentation} for more information. -@end deffn +@end table +@end deftp The @code{(gnu services rsync)} module provides the following services: diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm index 19c109d238..866368aa90 100644 --- a/gnu/services/networking.scm +++ b/gnu/services/networking.scm @@ -138,7 +138,16 @@ (define-module (gnu services networking) tor-configuration tor-configuration? - tor-hidden-service + tor-configuration-tor + tor-configuration-config-file + tor-configuration-hidden-services + tor-configuration-socks-socket-type + tor-configuration-control-socket-path + tor-onion-service-configuration + tor-onion-service-configuration? + tor-onion-service-configuration-name + tor-onion-service-configuration-mapping + tor-hidden-service ; deprecated tor-service-type network-manager-configuration @@ -908,7 +917,7 @@ (define-record-type* <tor-configuration> (default '())) (socks-socket-type tor-configuration-socks-socket-type ; 'tcp or 'unix (default 'tcp)) - (control-socket? tor-control-socket-path + (control-socket? tor-configuration-control-socket-path (default #f))) (define %tor-accounts @@ -922,11 +931,22 @@ (define %tor-accounts (home-directory "/var/empty") (shell (file-append shadow "/sbin/nologin"))))) -(define-record-type <hidden-service> - (hidden-service name mapping) - hidden-service? - (name hidden-service-name) ;string - (mapping hidden-service-mapping)) ;list of port/address tuples +(define-configuration/no-serialization tor-onion-service-configuration + (name + string + "Name for this Onion Service. This creates a +@file{/var/lib/tor/hidden-services/@var{name}} directory, where the +@file{hostname} file contains the @indicateurl{.onion} host name for this +Onion Service.") + + (mapping + alist + "Association list of port to address mappings. The following example: +@lisp +'((22 . \"127.0.0.1:22\") + (80 . \"127.0.0.1:8080\")) +@end lisp +maps ports 22 and 80 of the Onion Service to the local ports 22 and 8080.")) (define (tor-configuration->torrc config) "Return a 'torrc' file for CONFIG." @@ -966,7 +986,7 @@ (define (tor-configuration->torrc config) tcp-port host)) ports hosts))) '#$(map (match-lambda - (($ <hidden-service> name mapping) + (($ <tor-onion-service-configuration> name mapping) (cons name mapping))) hidden-services)) @@ -1053,7 +1073,7 @@ (define (tor-activation config) (chmod "/var/lib" #o755) (for-each initialize - '#$(map hidden-service-name + '#$(map tor-onion-service-configuration-name (tor-configuration-hidden-services config))))) (define tor-service-type @@ -1066,7 +1086,7 @@ (define tor-service-type (service-extension activation-service-type tor-activation))) - ;; This can be extended with hidden services. + ;; This can be extended with Tor Onion Services. (compose concatenate) (extend (lambda (config services) (tor-configuration @@ -1079,21 +1099,14 @@ (define tor-service-type "Run the @uref{https://torproject.org, Tor} anonymous networking daemon."))) -(define tor-hidden-service-type - ;; A type that extends Tor with hidden services. - (service-type (name 'tor-hidden-service) - (extensions - (list (service-extension tor-service-type list))) - (description - "Define a new Tor @dfn{hidden service}."))) - -(define (tor-hidden-service name mapping) +(define-deprecated (tor-hidden-service name mapping) + #f "Define a new Tor @dfn{hidden service} called @var{name} and implementing @var{mapping}. @var{mapping} is a list of port/host tuples, such as: @example - '((22 \"127.0.0.1:22\") - (80 \"127.0.0.1:8080\")) + '((22 . \"127.0.0.1:22\") + (80 . \"127.0.0.1:8080\")) @end example In this example, port 22 of the hidden service is mapped to local port 22, and @@ -1105,8 +1118,11 @@ (define (tor-hidden-service name mapping) See @uref{https://www.torproject.org/docs/tor-hidden-service.html.en, the Tor project's documentation} for more information." - (service tor-hidden-service-type - (hidden-service name mapping))) + (simple-service 'tor-hidden-service + tor-service-type + (list (tor-onion-service-configuration + (name name) + (mapping mapping))))) ;;; base-commit: 02033bfc05a1e82b12e80c6d000e1724e910e899 -- 2.39.2
MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN> Subject: bug#62005: closed ([PATCH] services: tor: Deprecate 'tor-hidden-service' procedure.) CC: tracker <at> debbugs.gnu.org Message-ID: <handler.62005.D62005.168236708131512.ackdone <at> debbugs.gnu.org> References: <87mt2x2g82.fsf@HIDDEN> <6254896f46b35816c7784569724d82248e4b7acf.1678123306.git.mirai@HIDDEN> X-Gnu-PR-Message: closed 62005 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Date: Mon, 24 Apr 2023 20:12:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1682367122-31565-0" This is a multi-part message in MIME format... ------------=_1682367122-31565-0 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Your message dated Mon, 24 Apr 2023 22:11:09 +0200 with message-id <87mt2x2g82.fsf@HIDDEN> and subject line Re: [PATCH v2] services: tor: Deprecate 'tor-hidden-servic= e' procedure. has caused the debbugs.gnu.org bug report #62005, regarding [PATCH] services: tor: Deprecate 'tor-hidden-service' procedure. to be marked as done. (If you believe you have received this mail in error, please contact help-debbugs@HIDDEN) --=20 62005: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D62005 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems ------------=_1682367122-31565-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 6 Mar 2023 17:25:11 +0000 Received: from localhost ([127.0.0.1]:43545 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pZEaF-0006iW-5v for submit <at> debbugs.gnu.org; Mon, 06 Mar 2023 12:25:11 -0500 Received: from lists.gnu.org ([209.51.188.17]:54732) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <mirai@HIDDEN>) id 1pZEaD-0006iP-El for submit <at> debbugs.gnu.org; Mon, 06 Mar 2023 12:25:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <mirai@HIDDEN>) id 1pZEaD-0002jO-88 for guix-patches@HIDDEN; Mon, 06 Mar 2023 12:25:09 -0500 Received: from smtpm1.myservices.hosting ([185.26.105.232]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <mirai@HIDDEN>) id 1pZEaA-0000Pf-U0 for guix-patches@HIDDEN; Mon, 06 Mar 2023 12:25:08 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm1.myservices.hosting (Postfix) with ESMTP id CE30420495 for <guix-patches@HIDDEN>; Mon, 6 Mar 2023 18:25:00 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 88AE380097; Mon, 6 Mar 2023 18:25:00 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id p9RDlMPA35PQ; Mon, 6 Mar 2023 18:25:00 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@HIDDEN) by mail1.netim.hosting (Postfix) with ESMTPSA id C7ABF8009C; Mon, 6 Mar 2023 18:24:59 +0100 (CET) From: Bruno Victal <mirai@HIDDEN> To: guix-patches@HIDDEN Subject: [PATCH] services: tor: Deprecate 'tor-hidden-service' procedure. Date: Mon, 6 Mar 2023 17:24:54 +0000 Message-Id: <6254896f46b35816c7784569724d82248e4b7acf.1678123306.git.mirai@HIDDEN> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 X-Debbugs-CC: ludo@HIDDEN Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=185.26.105.232; envelope-from=mirai@HIDDEN; helo=smtpm1.myservices.hosting X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: Bruno Victal <mirai@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.3 (--) Due to (now renamed) 'hidden-service' record type not being exported, the only way hidden services could have worked is through the now deprecated 'tor-hidden-service' procedure which also had the issue that it can only be used once since the returned service always had the same name. This commit fixes the Tor service documentation and deprecates 'tor-hidden-service' procedure, correcting some inconsistencies along the way. * doc/guix.texi (Networking Services): Add examples for Tor hidden services. Document <tor-hidden-service-configuration>. Remove mention of 'tor-hidden-service' procedure. * gnu/services/networking.scm: Export tor-configuration-tor, tor-configuration-config-file, tor-configuration-hidden-services, tor-configuration-socks-socket-type, tor-configuration-control-socket-path, tor-hidden-service-configuration, tor-hidden-service-configuration?, tor-hidden-service-configuration-name, tor-hidden-service-configuration-mapping. (<tor-configuration>)[control-socket?]: Rename accessor. (<hidden-service>): Rename to ... (<tor-hidden-service-configuration>): ... this. (tor-configuration->torrc): Update record-type name. (tor-activation): Ditto. (tor-service-type): Tweak comment. (tor-hidden-service-type): Remove variable. (tor-hidden-service): Deprecate procedure. --- Split from #61789. To be decided: whether hidden-services should be renamed to onion-services. doc/guix.texi | 55 +++++++++++++++++++++++-------------- gnu/services/networking.scm | 47 +++++++++++++++++-------------- 2 files changed, 61 insertions(+), 41 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 6671ba9305..51fe0a6119 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -20494,11 +20494,21 @@ Networking Services @cindex Tor @defvar tor-service-type -This is the type for a service that runs the @uref{https://torproject.org, -Tor} anonymous networking daemon. The service is configured using a +Type for a service that runs the @uref{https://torproject.org, Tor} +anonymous networking daemon. The service is configured using a @code{<tor-configuration>} record. By default, the Tor daemon runs as the @code{tor} unprivileged user, which is a member of the @code{tor} group. +In addition to adding Tor @dfn{hidden service}s records to the service +configuration directly, this service can be extended by other services to add +hidden services, as in this example: + +@lisp +(simple-service 'my-extra-hidden-service tor-service-type + (list (tor-hidden-service-configuration + (name "extra-hidden-service") + (mapping '((80 "127.0.0.1:8080")))))) +@end lisp @end defvar @deftp {Data Type} tor-configuration @@ -20517,11 +20527,10 @@ Networking Services syntax. @item @code{hidden-services} (default: @code{'()}) -The list of @code{<hidden-service>} records to use. For any hidden service -you include in this list, appropriate configuration to enable the hidden -service will be automatically added to the default configuration file. You -may conveniently create @code{<hidden-service>} records using the -@code{tor-hidden-service} procedure described below. +The list of @code{<tor-hidden-service-configuration>} records to use. +For any hidden service you include in this list, appropriate +configuration to enable the hidden service will be automatically added to +the default configuration file. @item @code{socks-socket-type} (default: @code{'tcp}) The default socket type that Tor should use for its SOCKS socket. This must @@ -20546,26 +20555,32 @@ Networking Services @end table @end deftp -@cindex hidden service -@deffn {Scheme Procedure} tor-hidden-service @var{name} @var{mapping} -Define a new Tor @dfn{hidden service} called @var{name} and implementing -@var{mapping}. @var{mapping} is a list of port/host tuples, such as: +@cindex hidden service, tor +@deftp {Data Type} tor-hidden-service-configuration +Data Type representing a Tor @dfn{hidden service} configuration. +See @uref{https://www.torproject.org/docs/tor-hidden-service.html.en, the Tor +project's documentation} for more information. + +@table @asis +@item @code{name} (type: string) +Name for the Tor @dfn{hidden service}. +This creates a @file{/var/lib/tor/hidden-services/@var{name}} directory, +where the @file{hostname} file contains the @samp{.onion} host name for +the hidden service. + +@item @code{mapping} (type: list-of-list) +List of host---@dfn{hidden-service} port mappings, such as: @example - '((22 "127.0.0.1:22") - (80 "127.0.0.1:8080")) +'((22 "127.0.0.1:22") + (80 "127.0.0.1:8080")) @end example In this example, port 22 of the hidden service is mapped to local port 22, and port 80 is mapped to local port 8080. -This creates a @file{/var/lib/tor/hidden-services/@var{name}} directory, where -the @file{hostname} file contains the @code{.onion} host name for the hidden -service. - -See @uref{https://www.torproject.org/docs/tor-hidden-service.html.en, the Tor -project's documentation} for more information. -@end deffn +@end table +@end deftp The @code{(gnu services rsync)} module provides the following services: diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm index dacf64c2d1..d6e1877ef5 100644 --- a/gnu/services/networking.scm +++ b/gnu/services/networking.scm @@ -138,7 +138,16 @@ (define-module (gnu services networking) tor-configuration tor-configuration? - tor-hidden-service + tor-configuration-tor + tor-configuration-config-file + tor-configuration-hidden-services + tor-configuration-socks-socket-type + tor-configuration-control-socket-path + tor-hidden-service-configuration + tor-hidden-service-configuration? + tor-hidden-service-configuration-name + tor-hidden-service-configuration-mapping + tor-hidden-service ; deprecated tor-service-type network-manager-configuration @@ -919,7 +928,7 @@ (define-record-type* <tor-configuration> (default '())) (socks-socket-type tor-configuration-socks-socket-type ; 'tcp or 'unix (default 'tcp)) - (control-socket? tor-control-socket-path + (control-socket? tor-configuration-control-socket-path (default #f))) (define %tor-accounts @@ -933,11 +942,11 @@ (define %tor-accounts (home-directory "/var/empty") (shell (file-append shadow "/sbin/nologin"))))) -(define-record-type <hidden-service> - (hidden-service name mapping) - hidden-service? - (name hidden-service-name) ;string - (mapping hidden-service-mapping)) ;list of port/address tuples +(define-record-type <tor-hidden-service-configuration> + (tor-hidden-service-configuration name mapping) + tor-hidden-service-configuration? + (name tor-hidden-service-configuration-name) ;string + (mapping tor-hidden-service-configuration-mapping)) ;list of port/address tuples (define (tor-configuration->torrc config) "Return a 'torrc' file for CONFIG." @@ -977,7 +986,7 @@ (define (tor-configuration->torrc config) tcp-port host)) ports hosts))) '#$(map (match-lambda - (($ <hidden-service> name mapping) + (($ <tor-hidden-service-configuration> name mapping) (cons name mapping))) hidden-services)) @@ -1064,7 +1073,7 @@ (define (tor-activation config) (chmod "/var/lib" #o755) (for-each initialize - '#$(map hidden-service-name + '#$(map tor-hidden-service-configuration-name (tor-configuration-hidden-services config))))) (define tor-service-type @@ -1077,7 +1086,7 @@ (define tor-service-type (service-extension activation-service-type tor-activation))) - ;; This can be extended with hidden services. + ;; This can be extended with tor hidden services. (compose concatenate) (extend (lambda (config services) (tor-configuration @@ -1090,15 +1099,8 @@ (define tor-service-type "Run the @uref{https://torproject.org, Tor} anonymous networking daemon."))) -(define tor-hidden-service-type - ;; A type that extends Tor with hidden services. - (service-type (name 'tor-hidden-service) - (extensions - (list (service-extension tor-service-type list))) - (description - "Define a new Tor @dfn{hidden service}."))) - -(define (tor-hidden-service name mapping) +(define-deprecated (tor-hidden-service name mapping) + #f "Define a new Tor @dfn{hidden service} called @var{name} and implementing @var{mapping}. @var{mapping} is a list of port/host tuples, such as: @@ -1116,8 +1118,11 @@ (define (tor-hidden-service name mapping) See @uref{https://www.torproject.org/docs/tor-hidden-service.html.en, the Tor project's documentation} for more information." - (service tor-hidden-service-type - (hidden-service name mapping))) + (simple-service 'tor-hidden-service + tor-service-type + (list (tor-hidden-service-configuration + (name name) + (mapping mapping))))) ;;; -- 2.39.1 ------------=_1682367122-31565-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 62005-done) by debbugs.gnu.org; 24 Apr 2023 20:11:21 +0000 Received: from localhost ([127.0.0.1]:50409 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pr2Wu-0008CC-PP for submit <at> debbugs.gnu.org; Mon, 24 Apr 2023 16:11:21 -0400 Received: from eggs.gnu.org ([209.51.188.92]:56824) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1pr2Wt-0008Bz-2l for 62005-done <at> debbugs.gnu.org; Mon, 24 Apr 2023 16:11:19 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1pr2Wn-0002N0-0R; Mon, 24 Apr 2023 16:11:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=K5NcgAV++gKDxRh1cgeJ90TaW9Kub/iP/AZifoDFmGc=; b=nh7njnsL0bjnujsYl11T 03UdtQCwNZspMtgEhWwPJDbg6KcVVm2RTS8o1y2Rpbl+aIzWsjXVRHb+1aO8RhC+sOn2VTGKsiWO5 nVua6TTpHVPzKo1VDEJAckB0tKs+AjLrl1O8US07sfBkFCBMon0P0206lohWzS713czEnZC2UtSkL QlQivLAEZxgpOOZQrwU8C5MDUr4iVEoXzOGPo3FAIiJ/duXfbo5kHimXywP//RCY5rd0Eiw03NUyN t0LMCYcOyCjkU+seCWit0ohNaomXkDEYje/1U46meuqYN+8SrnlcUlsJM/jIJpiLUDmtebkmIEcMj v0ldoVMxscZ7nA==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1pr2Wm-0002xH-A7; Mon, 24 Apr 2023 16:11:12 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN> To: Bruno Victal <mirai@HIDDEN> Subject: Re: [PATCH v2] services: tor: Deprecate 'tor-hidden-service' procedure. References: <2f32f2b2bb371a2356cc385ccafdf86e7135d4cd.1681051448.git.mirai@HIDDEN> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Quintidi 5 =?utf-8?Q?Flor=C3=A9al?= an 231 de la =?utf-8?Q?R=C3=A9volution=2C?= jour du Rossignol X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Mon, 24 Apr 2023 22:11:09 +0200 In-Reply-To: <2f32f2b2bb371a2356cc385ccafdf86e7135d4cd.1681051448.git.mirai@HIDDEN> (Bruno Victal's message of "Sun, 9 Apr 2023 15:47:19 +0100") Message-ID: <87mt2x2g82.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 62005-done Cc: 62005-done <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Bruno, Bruno Victal <mirai@HIDDEN> skribis: > Due to (now renamed) 'hidden-service' record type not being exported, the= only > way Onion services (formely hidden services) could have worked is through= the > now deprecated 'tor-hidden-service' procedure. > > This commit updates the Tor service documentation, corrects some inconsis= tently > named accessors in <tor-configuration> record-type, renames and refactors > tor-hidden-service-configuration to tor-onion-service-configuration using > define-configuration and also exports it, allowing Onion services to be > configured directly within a <tor-configuration> record. > Lastly, it also deprecates the 'tor-hidden-service' procedure. > > * doc/guix.texi (Networking Services): Substitute mentions of =E2=80=9CHi= dden services=E2=80=9D > with =E2=80=9COnion Services=E2=80=9D. Add a Tor Onion service configurat= ion example. > Document <tor-onion-service-configuration>. Remove mention of > 'tor-hidden-service' procedure. > * gnu/services/networking.scm: Export tor-configuration-tor, > tor-configuration-config-file, tor-configuration-hidden-services, > tor-configuration-socks-socket-type, tor-configuration-control-socket-pat= h, > tor-onion-service-configuration, tor-onion-service-configuration?, > tor-onion-service-configuration-name, tor-onion-service-configuration-map= ping. > (<tor-configuration>)[control-socket?]: Rename accessor. > (<hidden-service>): Replace with =E2=80=A6 > (<tor-onion-service-configuration>): =E2=80=A6 this. > (tor-configuration->torrc): Update record-type name. > (tor-activation): Ditto. > (tor-hidden-service-type): Remove variable. > (tor-hidden-service): Deprecate procedure. Finally applied; I tweaked wording in the manual as shown below. Thank you! Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/doc/guix.texi b/doc/guix.texi index 6ebb245dd7..8afacfb54c 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -20600,9 +20600,10 @@ anonymous networking daemon. The service is configured using a @code{<tor-configuration>} record. By default, the Tor daemon runs as the @code{tor} unprivileged user, which is a member of the @code{tor} group. -In addition to adding Tor @dfn{Onion Service}s records to the service -configuration directly, this service can be extended by other services to add -Onion Services, as in this example: +@cindex onion services, for Tor +Services of this type can be extended by other services to specify +@dfn{onion services} (in addition to those already specified in +@code{tor-configuration}) as in this example: @lisp (simple-service 'my-extra-onion-service tor-service-type @@ -20629,8 +20630,8 @@ syntax. @item @code{hidden-services} (default: @code{'()}) The list of @code{<tor-onion-service-configuration>} records to use. -For any Onion Service you include in this list, appropriate -configuration to enable the Onion Service will be automatically added to +For any onion service you include in this list, appropriate +configuration to enable the onion service will be automatically added to the default configuration file. @item @code{socks-socket-type} (default: @code{'tcp}) --=-=-=-- ------------=_1682367122-31565-0--
MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Bruno Victal <mirai@HIDDEN> Subject: bug#62005: closed (Re: [PATCH v2] services: tor: Deprecate 'tor-hidden-service' procedure.) Message-ID: <handler.62005.D62005.168236708131512.notifdone <at> debbugs.gnu.org> References: <87mt2x2g82.fsf@HIDDEN> <6254896f46b35816c7784569724d82248e4b7acf.1678123306.git.mirai@HIDDEN> X-Gnu-PR-Message: they-closed 62005 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 62005 <at> debbugs.gnu.org Date: Mon, 24 Apr 2023 20:12:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1682367122-31565-1" This is a multi-part message in MIME format... ------------=_1682367122-31565-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #62005: [PATCH] services: tor: Deprecate 'tor-hidden-service' procedure. which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 62005 <at> debbugs.gnu.org. --=20 62005: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D62005 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems ------------=_1682367122-31565-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 62005-done) by debbugs.gnu.org; 24 Apr 2023 20:11:21 +0000 Received: from localhost ([127.0.0.1]:50409 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pr2Wu-0008CC-PP for submit <at> debbugs.gnu.org; Mon, 24 Apr 2023 16:11:21 -0400 Received: from eggs.gnu.org ([209.51.188.92]:56824) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1pr2Wt-0008Bz-2l for 62005-done <at> debbugs.gnu.org; Mon, 24 Apr 2023 16:11:19 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1pr2Wn-0002N0-0R; Mon, 24 Apr 2023 16:11:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=K5NcgAV++gKDxRh1cgeJ90TaW9Kub/iP/AZifoDFmGc=; b=nh7njnsL0bjnujsYl11T 03UdtQCwNZspMtgEhWwPJDbg6KcVVm2RTS8o1y2Rpbl+aIzWsjXVRHb+1aO8RhC+sOn2VTGKsiWO5 nVua6TTpHVPzKo1VDEJAckB0tKs+AjLrl1O8US07sfBkFCBMon0P0206lohWzS713czEnZC2UtSkL QlQivLAEZxgpOOZQrwU8C5MDUr4iVEoXzOGPo3FAIiJ/duXfbo5kHimXywP//RCY5rd0Eiw03NUyN t0LMCYcOyCjkU+seCWit0ohNaomXkDEYje/1U46meuqYN+8SrnlcUlsJM/jIJpiLUDmtebkmIEcMj v0ldoVMxscZ7nA==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1pr2Wm-0002xH-A7; Mon, 24 Apr 2023 16:11:12 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN> To: Bruno Victal <mirai@HIDDEN> Subject: Re: [PATCH v2] services: tor: Deprecate 'tor-hidden-service' procedure. References: <2f32f2b2bb371a2356cc385ccafdf86e7135d4cd.1681051448.git.mirai@HIDDEN> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Quintidi 5 =?utf-8?Q?Flor=C3=A9al?= an 231 de la =?utf-8?Q?R=C3=A9volution=2C?= jour du Rossignol X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Mon, 24 Apr 2023 22:11:09 +0200 In-Reply-To: <2f32f2b2bb371a2356cc385ccafdf86e7135d4cd.1681051448.git.mirai@HIDDEN> (Bruno Victal's message of "Sun, 9 Apr 2023 15:47:19 +0100") Message-ID: <87mt2x2g82.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 62005-done Cc: 62005-done <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Bruno, Bruno Victal <mirai@HIDDEN> skribis: > Due to (now renamed) 'hidden-service' record type not being exported, the= only > way Onion services (formely hidden services) could have worked is through= the > now deprecated 'tor-hidden-service' procedure. > > This commit updates the Tor service documentation, corrects some inconsis= tently > named accessors in <tor-configuration> record-type, renames and refactors > tor-hidden-service-configuration to tor-onion-service-configuration using > define-configuration and also exports it, allowing Onion services to be > configured directly within a <tor-configuration> record. > Lastly, it also deprecates the 'tor-hidden-service' procedure. > > * doc/guix.texi (Networking Services): Substitute mentions of =E2=80=9CHi= dden services=E2=80=9D > with =E2=80=9COnion Services=E2=80=9D. Add a Tor Onion service configurat= ion example. > Document <tor-onion-service-configuration>. Remove mention of > 'tor-hidden-service' procedure. > * gnu/services/networking.scm: Export tor-configuration-tor, > tor-configuration-config-file, tor-configuration-hidden-services, > tor-configuration-socks-socket-type, tor-configuration-control-socket-pat= h, > tor-onion-service-configuration, tor-onion-service-configuration?, > tor-onion-service-configuration-name, tor-onion-service-configuration-map= ping. > (<tor-configuration>)[control-socket?]: Rename accessor. > (<hidden-service>): Replace with =E2=80=A6 > (<tor-onion-service-configuration>): =E2=80=A6 this. > (tor-configuration->torrc): Update record-type name. > (tor-activation): Ditto. > (tor-hidden-service-type): Remove variable. > (tor-hidden-service): Deprecate procedure. Finally applied; I tweaked wording in the manual as shown below. Thank you! Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/doc/guix.texi b/doc/guix.texi index 6ebb245dd7..8afacfb54c 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -20600,9 +20600,10 @@ anonymous networking daemon. The service is configured using a @code{<tor-configuration>} record. By default, the Tor daemon runs as the @code{tor} unprivileged user, which is a member of the @code{tor} group. -In addition to adding Tor @dfn{Onion Service}s records to the service -configuration directly, this service can be extended by other services to add -Onion Services, as in this example: +@cindex onion services, for Tor +Services of this type can be extended by other services to specify +@dfn{onion services} (in addition to those already specified in +@code{tor-configuration}) as in this example: @lisp (simple-service 'my-extra-onion-service tor-service-type @@ -20629,8 +20630,8 @@ syntax. @item @code{hidden-services} (default: @code{'()}) The list of @code{<tor-onion-service-configuration>} records to use. -For any Onion Service you include in this list, appropriate -configuration to enable the Onion Service will be automatically added to +For any onion service you include in this list, appropriate +configuration to enable the onion service will be automatically added to the default configuration file. @item @code{socks-socket-type} (default: @code{'tcp}) --=-=-=-- ------------=_1682367122-31565-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 6 Mar 2023 17:25:11 +0000 Received: from localhost ([127.0.0.1]:43545 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pZEaF-0006iW-5v for submit <at> debbugs.gnu.org; Mon, 06 Mar 2023 12:25:11 -0500 Received: from lists.gnu.org ([209.51.188.17]:54732) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <mirai@HIDDEN>) id 1pZEaD-0006iP-El for submit <at> debbugs.gnu.org; Mon, 06 Mar 2023 12:25:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <mirai@HIDDEN>) id 1pZEaD-0002jO-88 for guix-patches@HIDDEN; Mon, 06 Mar 2023 12:25:09 -0500 Received: from smtpm1.myservices.hosting ([185.26.105.232]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <mirai@HIDDEN>) id 1pZEaA-0000Pf-U0 for guix-patches@HIDDEN; Mon, 06 Mar 2023 12:25:08 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm1.myservices.hosting (Postfix) with ESMTP id CE30420495 for <guix-patches@HIDDEN>; Mon, 6 Mar 2023 18:25:00 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 88AE380097; Mon, 6 Mar 2023 18:25:00 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id p9RDlMPA35PQ; Mon, 6 Mar 2023 18:25:00 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@HIDDEN) by mail1.netim.hosting (Postfix) with ESMTPSA id C7ABF8009C; Mon, 6 Mar 2023 18:24:59 +0100 (CET) From: Bruno Victal <mirai@HIDDEN> To: guix-patches@HIDDEN Subject: [PATCH] services: tor: Deprecate 'tor-hidden-service' procedure. Date: Mon, 6 Mar 2023 17:24:54 +0000 Message-Id: <6254896f46b35816c7784569724d82248e4b7acf.1678123306.git.mirai@HIDDEN> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 X-Debbugs-CC: ludo@HIDDEN Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=185.26.105.232; envelope-from=mirai@HIDDEN; helo=smtpm1.myservices.hosting X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: Bruno Victal <mirai@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.3 (--) Due to (now renamed) 'hidden-service' record type not being exported, the only way hidden services could have worked is through the now deprecated 'tor-hidden-service' procedure which also had the issue that it can only be used once since the returned service always had the same name. This commit fixes the Tor service documentation and deprecates 'tor-hidden-service' procedure, correcting some inconsistencies along the way. * doc/guix.texi (Networking Services): Add examples for Tor hidden services. Document <tor-hidden-service-configuration>. Remove mention of 'tor-hidden-service' procedure. * gnu/services/networking.scm: Export tor-configuration-tor, tor-configuration-config-file, tor-configuration-hidden-services, tor-configuration-socks-socket-type, tor-configuration-control-socket-path, tor-hidden-service-configuration, tor-hidden-service-configuration?, tor-hidden-service-configuration-name, tor-hidden-service-configuration-mapping. (<tor-configuration>)[control-socket?]: Rename accessor. (<hidden-service>): Rename to ... (<tor-hidden-service-configuration>): ... this. (tor-configuration->torrc): Update record-type name. (tor-activation): Ditto. (tor-service-type): Tweak comment. (tor-hidden-service-type): Remove variable. (tor-hidden-service): Deprecate procedure. --- Split from #61789. To be decided: whether hidden-services should be renamed to onion-services. doc/guix.texi | 55 +++++++++++++++++++++++-------------- gnu/services/networking.scm | 47 +++++++++++++++++-------------- 2 files changed, 61 insertions(+), 41 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 6671ba9305..51fe0a6119 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -20494,11 +20494,21 @@ Networking Services @cindex Tor @defvar tor-service-type -This is the type for a service that runs the @uref{https://torproject.org, -Tor} anonymous networking daemon. The service is configured using a +Type for a service that runs the @uref{https://torproject.org, Tor} +anonymous networking daemon. The service is configured using a @code{<tor-configuration>} record. By default, the Tor daemon runs as the @code{tor} unprivileged user, which is a member of the @code{tor} group. +In addition to adding Tor @dfn{hidden service}s records to the service +configuration directly, this service can be extended by other services to add +hidden services, as in this example: + +@lisp +(simple-service 'my-extra-hidden-service tor-service-type + (list (tor-hidden-service-configuration + (name "extra-hidden-service") + (mapping '((80 "127.0.0.1:8080")))))) +@end lisp @end defvar @deftp {Data Type} tor-configuration @@ -20517,11 +20527,10 @@ Networking Services syntax. @item @code{hidden-services} (default: @code{'()}) -The list of @code{<hidden-service>} records to use. For any hidden service -you include in this list, appropriate configuration to enable the hidden -service will be automatically added to the default configuration file. You -may conveniently create @code{<hidden-service>} records using the -@code{tor-hidden-service} procedure described below. +The list of @code{<tor-hidden-service-configuration>} records to use. +For any hidden service you include in this list, appropriate +configuration to enable the hidden service will be automatically added to +the default configuration file. @item @code{socks-socket-type} (default: @code{'tcp}) The default socket type that Tor should use for its SOCKS socket. This must @@ -20546,26 +20555,32 @@ Networking Services @end table @end deftp -@cindex hidden service -@deffn {Scheme Procedure} tor-hidden-service @var{name} @var{mapping} -Define a new Tor @dfn{hidden service} called @var{name} and implementing -@var{mapping}. @var{mapping} is a list of port/host tuples, such as: +@cindex hidden service, tor +@deftp {Data Type} tor-hidden-service-configuration +Data Type representing a Tor @dfn{hidden service} configuration. +See @uref{https://www.torproject.org/docs/tor-hidden-service.html.en, the Tor +project's documentation} for more information. + +@table @asis +@item @code{name} (type: string) +Name for the Tor @dfn{hidden service}. +This creates a @file{/var/lib/tor/hidden-services/@var{name}} directory, +where the @file{hostname} file contains the @samp{.onion} host name for +the hidden service. + +@item @code{mapping} (type: list-of-list) +List of host---@dfn{hidden-service} port mappings, such as: @example - '((22 "127.0.0.1:22") - (80 "127.0.0.1:8080")) +'((22 "127.0.0.1:22") + (80 "127.0.0.1:8080")) @end example In this example, port 22 of the hidden service is mapped to local port 22, and port 80 is mapped to local port 8080. -This creates a @file{/var/lib/tor/hidden-services/@var{name}} directory, where -the @file{hostname} file contains the @code{.onion} host name for the hidden -service. - -See @uref{https://www.torproject.org/docs/tor-hidden-service.html.en, the Tor -project's documentation} for more information. -@end deffn +@end table +@end deftp The @code{(gnu services rsync)} module provides the following services: diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm index dacf64c2d1..d6e1877ef5 100644 --- a/gnu/services/networking.scm +++ b/gnu/services/networking.scm @@ -138,7 +138,16 @@ (define-module (gnu services networking) tor-configuration tor-configuration? - tor-hidden-service + tor-configuration-tor + tor-configuration-config-file + tor-configuration-hidden-services + tor-configuration-socks-socket-type + tor-configuration-control-socket-path + tor-hidden-service-configuration + tor-hidden-service-configuration? + tor-hidden-service-configuration-name + tor-hidden-service-configuration-mapping + tor-hidden-service ; deprecated tor-service-type network-manager-configuration @@ -919,7 +928,7 @@ (define-record-type* <tor-configuration> (default '())) (socks-socket-type tor-configuration-socks-socket-type ; 'tcp or 'unix (default 'tcp)) - (control-socket? tor-control-socket-path + (control-socket? tor-configuration-control-socket-path (default #f))) (define %tor-accounts @@ -933,11 +942,11 @@ (define %tor-accounts (home-directory "/var/empty") (shell (file-append shadow "/sbin/nologin"))))) -(define-record-type <hidden-service> - (hidden-service name mapping) - hidden-service? - (name hidden-service-name) ;string - (mapping hidden-service-mapping)) ;list of port/address tuples +(define-record-type <tor-hidden-service-configuration> + (tor-hidden-service-configuration name mapping) + tor-hidden-service-configuration? + (name tor-hidden-service-configuration-name) ;string + (mapping tor-hidden-service-configuration-mapping)) ;list of port/address tuples (define (tor-configuration->torrc config) "Return a 'torrc' file for CONFIG." @@ -977,7 +986,7 @@ (define (tor-configuration->torrc config) tcp-port host)) ports hosts))) '#$(map (match-lambda - (($ <hidden-service> name mapping) + (($ <tor-hidden-service-configuration> name mapping) (cons name mapping))) hidden-services)) @@ -1064,7 +1073,7 @@ (define (tor-activation config) (chmod "/var/lib" #o755) (for-each initialize - '#$(map hidden-service-name + '#$(map tor-hidden-service-configuration-name (tor-configuration-hidden-services config))))) (define tor-service-type @@ -1077,7 +1086,7 @@ (define tor-service-type (service-extension activation-service-type tor-activation))) - ;; This can be extended with hidden services. + ;; This can be extended with tor hidden services. (compose concatenate) (extend (lambda (config services) (tor-configuration @@ -1090,15 +1099,8 @@ (define tor-service-type "Run the @uref{https://torproject.org, Tor} anonymous networking daemon."))) -(define tor-hidden-service-type - ;; A type that extends Tor with hidden services. - (service-type (name 'tor-hidden-service) - (extensions - (list (service-extension tor-service-type list))) - (description - "Define a new Tor @dfn{hidden service}."))) - -(define (tor-hidden-service name mapping) +(define-deprecated (tor-hidden-service name mapping) + #f "Define a new Tor @dfn{hidden service} called @var{name} and implementing @var{mapping}. @var{mapping} is a list of port/host tuples, such as: @@ -1116,8 +1118,11 @@ (define (tor-hidden-service name mapping) See @uref{https://www.torproject.org/docs/tor-hidden-service.html.en, the Tor project's documentation} for more information." - (service tor-hidden-service-type - (hidden-service name mapping))) + (simple-service 'tor-hidden-service + tor-service-type + (list (tor-hidden-service-configuration + (name name) + (mapping mapping))))) ;;; -- 2.39.1 ------------=_1682367122-31565-1--
Received: (at fakecontrol) by fakecontrolmessage; To: internal_control <at> debbugs.gnu.org From: Debbugs Internal Request <help-debbugs@HIDDEN> Subject: Internal Control Message-Id: bug archived. Date: Tue, 23 May 2023 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
Received: (at control) by debbugs.gnu.org; 9 Jan 2025 18:19:50 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 09 13:19:50 2025 Received: from localhost ([127.0.0.1]:54200 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tVx8I-00062C-40 for submit <at> debbugs.gnu.org; Thu, 09 Jan 2025 13:19:50 -0500 Received: from mail-4325.protonmail.ch ([185.70.43.25]:35405) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <raid5atemyhomework@HIDDEN>) id 1tVx8F-00061q-ME for control <at> debbugs.gnu.org; Thu, 09 Jan 2025 13:19:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1736446780; x=1736705980; bh=2AHhhg6DzY1R/MlD2YJegIBjulzq1IBo0KBmTt2r8NA=; h=Date:To:From:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector: List-Unsubscribe:List-Unsubscribe-Post; b=XF+oIDgcevO0sT9M317B31W+T8e5wu1DOqw2YFHPXy0qgsizLqZUy6F2Gf3Ichq1W w8hYIWhTYKotjeLncUs0D4bweM+9dNYsWQ3tWHp2ZRJB6pMYMKyWDM9jw93uHIpo6x esUxGjj7t6V2a4wKDAulpNXmhI0rDMaacvpKhfydPATVHGLp05cZIR45o9PAjXggUT +MKhnPD4LyDLrWE+UMbAKmIgaYO13mEoQWYRlvFcQwJsknmLDCgImNqRNhgUN5UiWP hWtgaWz3M2VtJ744r/ZCa0/hDJLPH6VvAbXS5+Ye0XEhRddQQdPN86HP0AR92rESnK mRoxLgK5yMFWQ== Date: Thu, 09 Jan 2025 18:19:37 +0000 To: "control <at> debbugs.gnu.org" <control <at> debbugs.gnu.org> From: raid5atemyhomework <raid5atemyhomework@HIDDEN> Subject: (No Subject) Message-ID: <Aj75gI9lmKTpgPjK1hBKMLkrPEX1gWl1XsHpPGExk2DaY3NKf8qxv_JQ7hHlJzUWY__jqHSMgNuOp3dqF4uZPRnoqP3UEOH4gUf2JgIzLRo=@protonmail.com> Feedback-ID: 28717774:user:proton X-Pm-Message-ID: 5e6883d7c10e8884a0cdfcc400447113a3d28c7b MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: unarchive 62005 stop Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.0 SLIGHTLY_BAD_SUBJECT Subject contains something slightly spammy 0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [185.70.43.25 listed in bl.score.senderscore.com] 0.0 RCVD_IN_VALIDITY_SAFE_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [185.70.43.25 listed in sa-accredit.habeas.com] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [185.70.43.25 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [185.70.43.25 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (raid5atemyhomework[at]protonmail.com) 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: 1.0 (+) unarchive 62005 stop
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.