From patchwork Tue Nov 29 21:47:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 44967 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 08BDD27BBEB; Tue, 29 Nov 2022 21:48:18 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 169F527BBE9 for ; Tue, 29 Nov 2022 21:48:17 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p08SV-0007n9-Ru; Tue, 29 Nov 2022 16:48:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p08SQ-0007kI-OT for guix-patches@gnu.org; Tue, 29 Nov 2022 16:48:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p08SQ-00059v-G7 for guix-patches@gnu.org; Tue, 29 Nov 2022 16:48:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p08SQ-0001Ex-Bd for guix-patches@gnu.org; Tue, 29 Nov 2022 16:48:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#59700] [PATCH 1/1] doc: Move %facebook-host-aliases to operating-system. Resent-From: mirai@makinata.eu Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 29 Nov 2022 21:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59700 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 59700@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 59700-submit@debbugs.gnu.org id=B59700.16697584414758 (code B ref 59700); Tue, 29 Nov 2022 21:48:02 +0000 Received: (at 59700) by debbugs.gnu.org; 29 Nov 2022 21:47:21 +0000 Received: from localhost ([127.0.0.1]:56617 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p08Rl-0001Eg-5F for submit@debbugs.gnu.org; Tue, 29 Nov 2022 16:47:21 -0500 Received: from smtpm1.myservices.hosting ([185.26.105.232]:35494) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p08Rj-0001Ea-2y for 59700@debbugs.gnu.org; Tue, 29 Nov 2022 16:47:19 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.172]) by smtpm1.myservices.hosting (Postfix) with ESMTP id 51659202A7 for <59700@debbugs.gnu.org>; Tue, 29 Nov 2022 22:47:18 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 01AB180097; Tue, 29 Nov 2022 22:47:18 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-1.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id B274oi_WcSQl; Tue, 29 Nov 2022 22:47:17 +0100 (CET) Received: from guix-nuc.home.arpa (bl12-93-156.dsl.telepac.pt [85.245.93.156]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 8BAA880093; Tue, 29 Nov 2022 22:47:17 +0100 (CET) From: mirai@makinata.eu Date: Tue, 29 Nov 2022 21:47:13 +0000 Message-Id: X-Mailer: git-send-email 2.38.1 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From: Bruno Victal --- doc/guix.texi | 58 +++++++++++++++++++++++++-------------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 47b805dc7f..3636c45b29 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -16530,6 +16530,35 @@ It is an error to refer to @code{this-operating-system} outside an operating system definition. @end deffn +@defvr {Scheme Variable} %facebook-host-aliases +This variable contains a string for use in @file{/etc/hosts} +(@pxref{Host Names,,, libc, The GNU C Library Reference Manual}). Each +line contains a entry that maps a known server name of the Facebook +on-line service---e.g., @code{www.facebook.com}---to the local +host---@code{127.0.0.1} or its IPv6 equivalent, @code{::1}. + +This variable is typically used in the @code{hosts-file} field of an +@code{operating-system} declaration (@pxref{operating-system Reference, +@file{/etc/hosts}}): + +@lisp +(use-modules (gnu) (guix)) + +(operating-system + (host-name "mymachine") + ;; ... + (hosts-file + ;; Create a /etc/hosts file with aliases for "localhost" + ;; and "mymachine", as well as for Facebook servers. + (plain-file "hosts" + (string-append (local-host-aliases host-name) + %facebook-host-aliases)))) +@end lisp + +This mechanism can prevent programs running locally, such as Web +browsers, from accessing Facebook. +@end defvr + @end deftp @node File Systems @@ -20841,35 +20870,6 @@ Logging level. @end table @end deftp -@defvr {Scheme Variable} %facebook-host-aliases -This variable contains a string for use in @file{/etc/hosts} -(@pxref{Host Names,,, libc, The GNU C Library Reference Manual}). Each -line contains a entry that maps a known server name of the Facebook -on-line service---e.g., @code{www.facebook.com}---to the local -host---@code{127.0.0.1} or its IPv6 equivalent, @code{::1}. - -This variable is typically used in the @code{hosts-file} field of an -@code{operating-system} declaration (@pxref{operating-system Reference, -@file{/etc/hosts}}): - -@lisp -(use-modules (gnu) (guix)) - -(operating-system - (host-name "mymachine") - ;; ... - (hosts-file - ;; Create a /etc/hosts file with aliases for "localhost" - ;; and "mymachine", as well as for Facebook servers. - (plain-file "hosts" - (string-append (local-host-aliases host-name) - %facebook-host-aliases)))) -@end lisp - -This mechanism can prevent programs running locally, such as Web -browsers, from accessing Facebook. -@end defvr - The @code{(gnu services avahi)} provides the following definition. @defvr {Scheme Variable} avahi-service-type