[DOCUMENTATION] [PATCH] doc: Move %facebook-host-aliases to operating-system.

  • Done
  • quality assurance status badge
Details
3 participants
  • Maxim Cournoyer
  • Bruno Victal
  • Ryan Sundberg
Owner
unassigned
Submitted by
Bruno Victal
Severity
normal
B
B
Bruno Victal wrote on 29 Nov 2022 22:44
[PATCH 0/1] doc: Move %facebook-host-aliases to operating-system.
(address . guix-patches@gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
cover.1669758136.git.mirai@makinata.eu
Looks misplaced among the various service definitions.

Bruno Victal (1):
doc: Move %facebook-host-aliases to operating-system.

doc/guix.texi | 58 +++++++++++++++++++++++++--------------------------
1 file changed, 29 insertions(+), 29 deletions(-)


base-commit: aaf1f18b8044142515ff868bcbd2b72b81ced3ec
--
2.38.1
M
[PATCH 1/1] doc: Move %facebook-host-aliases to operating-system.
(address . 59700@debbugs.gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
ee0a6f0e347daa6dd0946df37af2b2b536ec08be.1669758136.git.mirai@makinata.eu
From: Bruno Victal <mirai@makinata.eu>

---
doc/guix.texi | 58 +++++++++++++++++++++++++--------------------------
1 file changed, 29 insertions(+), 29 deletions(-)

Toggle diff (78 lines)
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
--
2.38.1
M
M
mirai wrote on 7 Dec 2022 00:56
(no subject)
(name . control)(address . control@debbugs.gnu.org)
0c5193c7-ab27-27f2-95fd-ba6ca4eb17b6@makinata.eu
retitle 59699 [DOCUMENTATION] [PATCH] doc: Fix formatting for 'computed-file'.
retitle 59700 [DOCUMENTATION] [PATCH] doc: Move %facebook-host-aliases to operating-system.
retitle 59712 [DOCUMENTATION] [PATCH] doc: Suggest guile-readline and guile-colorized.
quit
M
M
Maxim Cournoyer wrote on 3 Jan 23:01 +0100
Re: bug#59700: [DOCUMENTATION] [PATCH] doc: Move %facebook-host-aliases to operating-system.
(address . mirai@makinata.eu)(address . 59700@debbugs.gnu.org)
87tu17z3a2.fsf_-_@gmail.com
Hi Bruno,

mirai@makinata.eu writes:

Putting a facebook related stanzas

Toggle quote (6 lines)
> From: Bruno Victal <mirai@makinata.eu>
>
> ---
> doc/guix.texi | 58 +++++++++++++++++++++++++--------------------------
> 1 file changed, 29 insertions(+), 29 deletions(-)

Please include a GNU Changelog commit message, it makes it easy to
comprehend the changes (see: info "(standards) Style of Change Logs"
from the 'standards' package).

Moving %facebook-hosts-aliases to under the 'operating-system Reference'
from network services doesn't seem an improvement to me (it seems even
more out of place to me).

I'd err on the side of the status quo.

What do you think?

Maxim
M
M
Maxim Cournoyer wrote on 3 Jan 23:01 +0100
control message for bug #59700
(address . control@debbugs.gnu.org)
87sfgrz39x.fsf@gmail.com
tags 59700 + moreinfo
quit
R
R
Ryan Sundberg wrote on 3 Jan 23:07 +0100
Re: [bug#59700] [DOCUMENTATION] [PATCH] doc: Move %facebook-host-aliases to operating-system.
(address . guix-patches@gnu.org)
45e36fcb-797c-3a73-02de-acec265d44bb@arctype.co
Hi Maxim, Bruno,

In my opinion, this entire Facebook blocklist is out of scope of the
core operating system, and it should be removed entirely to reduce the
maintenance burden, and any other future attempt to add other hosts to
it. I am not sure how many users out there are relying on this behavior.

--
Sincerely,
Ryan Sundberg

On 1/3/23 2:01 PM, Maxim Cournoyer wrote:
Toggle quote (25 lines)
> Hi Bruno,
>
> mirai@makinata.eu writes:
>
> Putting a facebook related stanzas
>
>> From: Bruno Victal <mirai@makinata.eu>
>>
>> ---
>> doc/guix.texi | 58 +++++++++++++++++++++++++--------------------------
>> 1 file changed, 29 insertions(+), 29 deletions(-)
>
> Please include a GNU Changelog commit message, it makes it easy to
> comprehend the changes (see: info "(standards) Style of Change Logs"
> from the 'standards' package).
>
> Moving %facebook-hosts-aliases to under the 'operating-system Reference'
> from network services doesn't seem an improvement to me (it seems even
> more out of place to me).
>
> I'd err on the side of the status quo.
>
> What do you think?
>
> Maxim
Attachment: OpenPGP_signature
M
Re: bug#59700: [DOCUMENTATION] [PATCH] doc: Move %facebook-host-aliases to operating-system.
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 59700@debbugs.gnu.org)
8319843d-abb5-afdb-e828-8faaf33ad593@makinata.eu
On 2023-01-03 22:01, Maxim Cournoyer wrote:
Toggle quote (4 lines)
> Moving %facebook-hosts-aliases to under the 'operating-system Reference'
> from network services doesn't seem an improvement to me (it seems even
> more out of place to me).

I placed it under 'operating-system Reference' because of the proximity to 'hosts-file' field
and the usage example seems to suggest it's a better fit here.

Toggle quote (5 lines)
>
> I'd err on the side of the status quo.
>
> What do you think?

I think its current location (Network services) is extremely strange as %facebook-host-aliases
is not a service and given the usage example it fits better elsewhere.


Bruno
M
M
Maxim Cournoyer wrote on 5 Jan 17:23 +0100
(name . mirai)(address . mirai@makinata.eu)(address . 59700@debbugs.gnu.org)
87y1qhne6u.fsf@gmail.com
Hi,

mirai <mirai@makinata.eu> writes:

Toggle quote (16 lines)
> On 2023-01-03 22:01, Maxim Cournoyer wrote:
>> Moving %facebook-hosts-aliases to under the 'operating-system Reference'
>> from network services doesn't seem an improvement to me (it seems even
>> more out of place to me).
>
> I placed it under 'operating-system Reference' because of the proximity to 'hosts-file' field
> and the usage example seems to suggest it's a better fit here.
>
>>
>> I'd err on the side of the status quo.
>>
>> What do you think?
>
> I think its current location (Network services) is extremely strange as %facebook-host-aliases
> is not a service and given the usage example it fits better elsewhere.

I gathered another opinion on #guix from civodul, which thought status
quo is appropriate, though they mentioned turning host-file into a
service would be nice to make it more extendable. Perhaps you could
look into this, if you want to improve things in that direction?

--
Thanks,
Maxim
B
B
Bruno Victal wrote 9 hours ago
(no subject)
(address . 59700-done@debbugs.gnu.org)
45748467-6533-0aef-cf1c-2c072fb37d1c@makinata.eu
Completed with #60735.
Closed
?