Message ID | ee0a6f0e347daa6dd0946df37af2b2b536ec08be.1669758136.git.mirai@makinata.eu |
---|---|
State | New |
Headers | show |
Series | doc: Move %facebook-host-aliases to operating-system. | expand |
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
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: > 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
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. Bruno
Hi, mirai <mirai@makinata.eu> writes: > 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?
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
From: Bruno Victal <mirai@makinata.eu> --- doc/guix.texi | 58 +++++++++++++++++++++++++-------------------------- 1 file changed, 29 insertions(+), 29 deletions(-)