unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#29271] [PATCH 0/1] Improve the "Substitutes" documentation
@ 2017-11-12 11:02 Chris Marusich
  2017-11-12 11:05 ` [bug#29271] [PATCH 1/1] doc: Split the "Substitutes" section into subsections Chris Marusich
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Chris Marusich @ 2017-11-12 11:02 UTC (permalink / raw)
  To: 29271; +Cc: myglc2, Chris Marusich

Hi Guix,

Attached is a patch which attempts to improve the clarity of the
Substitutes section by moving its content into subsections.  I have
also taken the liberty of adding some new information, which should
clarify (1) the question of whether or not substitutes are enabled by
default, and (2) the --fallback option.  The following email thread
demonstrates that this information was not clear enough, so hopefully
it is clear enough now:

https://lists.gnu.org/archive/html/help-guix/2017-11/msg00032.html

Best regards,

Chris Marusich (1):
  doc: Split the "Substitutes" section into subsections.

 doc/guix.texi | 126 +++++++++++++++++++++++++++++++++++++++++++---------------
 1 file changed, 94 insertions(+), 32 deletions(-)

-- 
2.14.2

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [bug#29271] [PATCH 1/1] doc: Split the "Substitutes" section into subsections.
  2017-11-12 11:02 [bug#29271] [PATCH 0/1] Improve the "Substitutes" documentation Chris Marusich
@ 2017-11-12 11:05 ` Chris Marusich
  2017-11-12 13:56   ` Jan Nieuwenhuizen
                     ` (2 more replies)
  2017-11-12 11:21 ` [bug#29271] [PATCH 0/1] Improve the "Substitutes" documentation Adonay Felipe Nogueira
  2017-11-22  4:29 ` bug#29271: Status: " Chris Marusich
  2 siblings, 3 replies; 13+ messages in thread
From: Chris Marusich @ 2017-11-12 11:05 UTC (permalink / raw)
  To: 29271; +Cc: myglc2, Chris Marusich

* doc/guix.texi (Substitutes): Move information into sections, and create one
  new subsection regarding substitution failure.
  (Top): In the detailed listing, add entries for the new subsections.
  (Hydra): Move info about Hydra here.  Add information that explains when
  substitutes are enabled by default.
  (Substitute Server Authorization): Move information about how to enable or
  disable substitutes here.
  (Substitute Authentication): Move information about how Guix authenticates
  substitutes here.
  (Proxy Settings): Move information about how to download substitutes via
  proxy here.
  (Substitution Failure): New section.  Add information about how Guix handles
  substitution failure.  Be extra clear about behavior concerning --fallback.
  (On Trusting Binaries): Move information about trusting binaries here.
  (Invoking guix-daemon): Remove an incorrect statement about when substitutes
  are enabled by default.
  (Common Build Options): Clarify the behavior of --fallback.

Co-authored-by: myglc2 <myglc2@gmail.com>
---
 doc/guix.texi | 126 +++++++++++++++++++++++++++++++++++++++++++---------------
 1 file changed, 94 insertions(+), 32 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 11a9de689..404ea2406 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -130,6 +130,15 @@ Package Management
 * Invoking guix pack::          Creating software bundles.
 * Invoking guix archive::       Exporting and importing store files.
 
+Substitutes
+
+* Hydra::                           One particular source of substitutes.
+* Substitute Server Authorization:: How to enable or disable substitutes.
+* Substitute Authentication::       How Guix verifies substitutes.
+* Proxy Settings::                  How to get substitutes via proxy.
+* Substitution Failure::            What happens when substitution fails.
+* On Trusting Binaries::            How can you trust that binary blob?
+
 Programming Interface
 
 * Defining Packages::           Defining new packages.
@@ -1108,10 +1117,6 @@ Do not use substitutes for build products.  That is, always build things
 locally instead of allowing downloads of pre-built binaries
 (@pxref{Substitutes}).
 
-By default substitutes are used, unless the client---such as the
-@command{guix package} command---is explicitly invoked with
-@code{--no-substitutes}.
-
 When the daemon runs with @code{--no-substitutes}, clients can still
 explicitly enable substitution @i{via} the @code{set-build-options}
 remote procedure call (@pxref{The Store}).
@@ -2108,7 +2113,6 @@ preserve transformations across upgrades, you should define your own
 package variant in a Guile module and add it to @code{GUIX_PACKAGE_PATH}
 (@pxref{Defining Packages}).
 
-
 @node Substitutes
 @section Substitutes
 
@@ -2116,8 +2120,8 @@ package variant in a Guile module and add it to @code{GUIX_PACKAGE_PATH}
 @cindex pre-built binaries
 Guix supports transparent source/binary deployment, which means that it
 can either build things locally, or download pre-built items from a
-server.  We call these pre-built items @dfn{substitutes}---they are
-substitutes for local build results.  In many cases, downloading a
+server, or both.  We call these pre-built items @dfn{substitutes}---they
+are substitutes for local build results.  In many cases, downloading a
 substitute is much faster than building things locally.
 
 Substitutes can be anything resulting from a derivation build
@@ -2125,6 +2129,20 @@ Substitutes can be anything resulting from a derivation build
 pre-built package binaries, but source tarballs, for instance, which
 also result from derivation builds, can be available as substitutes.
 
+@menu
+* Hydra::                           One particular source of substitutes.
+* Substitute Server Authorization:: How to enable or disable substitutes.
+* Substitute Authentication::       How Guix verifies substitutes.
+* Proxy Settings::                  How to get substitutes via proxy.
+* Substitution Failure::            What happens when substitution fails.
+* On Trusting Binaries::            How can you trust that binary blob?
+@end menu
+
+@node Hydra
+@subsection Hydra
+
+@cindex hydra
+@cindex build farm
 The @code{hydra.gnu.org} server is a front-end to a build farm that
 builds packages from the GNU distribution continuously for some
 architectures, and makes them available as substitutes.  This is the
@@ -2141,9 +2159,19 @@ using HTTP makes all communications visible to an eavesdropper, who
 could use the information gathered to determine, for instance, whether
 your system has unpatched security vulnerabilities.
 
+Substitutes from Hydra are enabled by default when using the Guix System
+Distribution (@pxref{GNU Distribution}).  However, substitutes are
+disabled by default when using Guix on a foreign distribution
+(@pxref{Installation}).  The following paragraphs describe how to enable
+or disable substitutes for Hydra; the same procedure can also be used to
+enable substitutes for any other substitute server.
+
+
+@node Substitute Server Authorization
+@subsection Substitute Server Authorization
+
 @cindex security
-@cindex digital signatures
-@cindex substitutes, authorization thereof
+@cindex substitutes, how to enable
 @cindex access control list (ACL), for substitutes
 @cindex ACL (access control list), for substitutes
 To allow Guix to download substitutes from @code{hydra.gnu.org} or a
@@ -2153,7 +2181,7 @@ imports, using the @command{guix archive} command (@pxref{Invoking guix
 archive}).  Doing so implies that you trust @code{hydra.gnu.org} to not
 be compromised and to serve genuine substitutes.
 
-This public key is installed along with Guix, in
+Hydra's public key is installed along with Guix, in
 @code{@var{prefix}/share/guix/hydra.gnu.org.pub}, where @var{prefix} is
 the installation prefix of Guix.  If you installed Guix from source,
 make sure you checked the GPG signature of
@@ -2194,6 +2222,17 @@ The following files would be downloaded:
 This indicates that substitutes from @code{hydra.gnu.org} are usable and
 will be downloaded, when possible, for future builds.
 
+@cindex substitutes, how to disable
+The substitute mechanism can be disabled globally by running
+@code{guix-daemon} with @code{--no-substitutes} (@pxref{Invoking
+guix-daemon}).  It can also be disabled temporarily by passing the
+@code{--no-substitutes} option to @command{guix package}, @command{guix
+build}, and other command-line tools.
+
+@node Substitute Authentication
+@subsection Substitute Authentication
+
+@cindex digital signatures
 Guix detects and raises an error when attempting to use a substitute
 that has been tampered with.  Likewise, it ignores substitutes that are
 not signed, or that are not signed by one of the keys listed in the ACL.
@@ -2218,15 +2257,6 @@ comes first in the list and can be considered a mirror of
 produce the same binaries, thanks to bit-reproducible builds (see
 below).
 
-@vindex http_proxy
-Substitutes are downloaded over HTTP or HTTPS.
-The @code{http_proxy} environment
-variable can be set in the environment of @command{guix-daemon} and is
-honored for downloads of substitutes.  Note that the value of
-@code{http_proxy} in the environment where @command{guix build},
-@command{guix package}, and other client commands are run has
-@emph{absolutely no effect}.
-
 When using HTTPS, the server's X.509 certificate is @emph{not} validated
 (in other words, the server is not authenticated), contrary to what
 HTTPS clients such as Web browsers usually do.  This is because Guix
@@ -2234,18 +2264,49 @@ authenticates substitute information itself, as explained above, which
 is what we care about (whereas X.509 certificates are about
 authenticating bindings between domain names and public keys.)
 
-You can get statistics on the substitutes provided by a server using the
-@command{guix weather} command (@pxref{Invoking guix weather}).
-
-The substitute mechanism can be disabled globally by running
-@code{guix-daemon} with @code{--no-substitutes} (@pxref{Invoking
-guix-daemon}).  It can also be disabled temporarily by passing the
-@code{--no-substitutes} option to @command{guix package}, @command{guix
-build}, and other command-line tools.
-
+@node Proxy Settings
+@subsection Proxy Settings
 
-@unnumberedsubsec On Trusting Binaries
+@vindex http_proxy
+Substitutes are downloaded over HTTP or HTTPS.
+The @code{http_proxy} environment
+variable can be set in the environment of @command{guix-daemon} and is
+honored for downloads of substitutes.  Note that the value of
+@code{http_proxy} in the environment where @command{guix build},
+@command{guix package}, and other client commands are run has
+@emph{absolutely no effect}.
 
+@node Substitution Failure
+@subsection Substitution Failure
+
+Even when a substitute for a derivation is available, sometimes the
+substitution attempt will fail.  This can happen for a variety of
+reasons: the substitute server might be offline, the substitute may
+recently have been deleted, the connection might have been interrupted,
+etc.
+
+When substitutes are enabled and a substitute for a derivation is
+available, but the substitution attempt fails, Guix will attempt to
+build the derivation locally depending on whether or not
+@code{--fallback} was given (@pxref{fallback-option}).  Specifically, if
+@code{--fallback} was omitted, then no local build will be performed,
+and the derivation is considered to have failed.  However, if
+@code{--fallback} was given, then Guix will attempt to build the
+derivation locally, and the success or failure of the derivation depends
+on the success or failure of the local build.  Note that when
+substitutes are disabled or no substitute is available for the
+derivation in question, a local build will @emph{always} be performed,
+regardless of whether or not @code{--fallback} was given.
+
+To get an idea of how many substitutes are available right now, you can
+try running the @command{guix weather} command (@pxref{Invoking guix
+weather}).  This command provides statistics on the substitutes provided
+by a server.
+
+@node On Trusting Binaries
+@subsection On Trusting Binaries
+
+@cindex trust, of pre-built binaries
 Today, each individual's control over their own computing is at the
 mercy of institutions, corporations, and groups with enough power and
 determination to subvert the computing infrastructure and exploit its
@@ -2272,7 +2333,6 @@ In the future, we want Guix to have support to publish and retrieve
 binaries to/from other users, in a peer-to-peer fashion.  If you would
 like to discuss this project, join us on @email{guix-devel@@gnu.org}.
 
-
 @node Packages with Multiple Outputs
 @section Packages with Multiple Outputs
 
@@ -5191,9 +5251,11 @@ derivations has failed.
 @itemx -n
 Do not build the derivations.
 
+@anchor{fallback-option}
 @item --fallback
-When substituting a pre-built binary fails, fall back to building
-packages locally.
+Attempt to build locally instead of issuing an error when substitutes
+are enabled and a substitute is available, but the substitution attempt
+fails (@pxref{Substitution Failure}).
 
 @item --substitute-urls=@var{urls}
 @anchor{client-substitute-urls}
-- 
2.14.2

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [bug#29271] [PATCH 0/1] Improve the "Substitutes" documentation
  2017-11-12 11:02 [bug#29271] [PATCH 0/1] Improve the "Substitutes" documentation Chris Marusich
  2017-11-12 11:05 ` [bug#29271] [PATCH 1/1] doc: Split the "Substitutes" section into subsections Chris Marusich
@ 2017-11-12 11:21 ` Adonay Felipe Nogueira
  2017-11-22  4:29 ` bug#29271: Status: " Chris Marusich
  2 siblings, 0 replies; 13+ messages in thread
From: Adonay Felipe Nogueira @ 2017-11-12 11:21 UTC (permalink / raw)
  To: 29271

Nice work! ;)

Chris Marusich <cmmarusich@gmail.com> writes:

> Hi Guix,
>
> Attached is a patch which attempts to improve the clarity of the
> Substitutes section by moving its content into subsections.  I have
> also taken the liberty of adding some new information, which should
> clarify (1) the question of whether or not substitutes are enabled by
> default, and (2) the --fallback option.  The following email thread
> demonstrates that this information was not clear enough, so hopefully
> it is clear enough now:
>
> https://lists.gnu.org/archive/html/help-guix/2017-11/msg00032.html
>
> Best regards,
>
> Chris Marusich (1):
>   doc: Split the "Substitutes" section into subsections.
>
>  doc/guix.texi | 126 +++++++++++++++++++++++++++++++++++++++++++---------------
>  1 file changed, 94 insertions(+), 32 deletions(-)

-- 
- https://libreplanet.org/wiki/User:Adfeno
- Palestrante e consultor sobre /software/ livre (não confundir com
  gratis).
- "WhatsApp"? Ele não é livre. Por favor, veja formas de se comunicar
  instantaneamente comigo no endereço abaixo.
- Contato: https://libreplanet.org/wiki/User:Adfeno#vCard
- Arquivos comuns aceitos (apenas sem DRM): Corel Draw, Microsoft
  Office, MP3, MP4, WMA, WMV.
- Arquivos comuns aceitos e enviados: CSV, GNU Dia, GNU Emacs Org, GNU
  GIMP, Inkscape SVG, JPG, LibreOffice (padrão ODF), OGG, OPUS, PDF
  (apenas sem DRM), PNG, TXT, WEBM.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [bug#29271] [PATCH 1/1] doc: Split the "Substitutes" section into subsections.
  2017-11-12 11:05 ` [bug#29271] [PATCH 1/1] doc: Split the "Substitutes" section into subsections Chris Marusich
@ 2017-11-12 13:56   ` Jan Nieuwenhuizen
  2017-11-12 20:25     ` Leo Famulari
  2017-11-12 20:36   ` Leo Famulari
  2017-11-13 17:27   ` myglc2
  2 siblings, 1 reply; 13+ messages in thread
From: Jan Nieuwenhuizen @ 2017-11-12 13:56 UTC (permalink / raw)
  To: Chris Marusich; +Cc: 29271, myglc2

Chris Marusich writes:

> +Substitutes from Hydra are enabled by default when using the Guix System
> +Distribution (@pxref{GNU Distribution}).  However, substitutes are
> +disabled by default when using Guix on a foreign distribution
> +(@pxref{Installation}).

It's great to have this clarified, however I wonder about the rationale
of this decision?

janneke

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [bug#29271] [PATCH 1/1] doc: Split the "Substitutes" section into subsections.
  2017-11-12 20:36   ` Leo Famulari
@ 2017-11-12 19:17     ` Eric Bavier
  2017-11-20 22:40       ` Ludovic Courtès
  0 siblings, 1 reply; 13+ messages in thread
From: Eric Bavier @ 2017-11-12 19:17 UTC (permalink / raw)
  To: Leo Famulari; +Cc: 29271, Chris Marusich, myglc2

[-- Attachment #1: Type: text/plain, Size: 1200 bytes --]

On Sun, 12 Nov 2017 15:36:44 -0500
Leo Famulari <leo@famulari.name> wrote:

> On Sun, Nov 12, 2017 at 03:05:58AM -0800, Chris Marusich wrote:
> > +@anchor{fallback-option}
> >  @item --fallback
> > -When substituting a pre-built binary fails, fall back to building
> > -packages locally.
> > +Attempt to build locally instead of issuing an error when substitutes
> > +are enabled and a substitute is available, but the substitution attempt
> > +fails (@pxref{Substitution Failure}).  
> 
> I was able to read this smaller change. I think the new sentence is too
> byzantine. I know what --fallback does but I found this sentence hard to
> understand.

Same here.

> 
> The condition that determines whether we "attempt to build locally"
> should be at the beginning of the sentence, like this:
> 
> "When substitutes are enabled and a substitute is available, but the
> substitution fails, fall back to building the derivation locally."
> 
> This is basically the same as before, but with some more detail about
> the condition.

IMHO, the original text is just fine, and succinctly conveys the
origin of the option name. Perhaps just add the cross reference.

`~Eric

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [bug#29271] [PATCH 1/1] doc: Split the "Substitutes" section into subsections.
  2017-11-12 13:56   ` Jan Nieuwenhuizen
@ 2017-11-12 20:25     ` Leo Famulari
  2017-11-13 14:37       ` myglc2
  0 siblings, 1 reply; 13+ messages in thread
From: Leo Famulari @ 2017-11-12 20:25 UTC (permalink / raw)
  To: Jan Nieuwenhuizen; +Cc: 29271, Chris Marusich, myglc2

[-- Attachment #1: Type: text/plain, Size: 984 bytes --]

On Sun, Nov 12, 2017 at 02:56:23PM +0100, Jan Nieuwenhuizen wrote:
> Chris Marusich writes:
> 
> > +Substitutes from Hydra are enabled by default when using the Guix System
> > +Distribution (@pxref{GNU Distribution}).  However, substitutes are
> > +disabled by default when using Guix on a foreign distribution
> > +(@pxref{Installation}).
> 
> It's great to have this clarified, however I wonder about the rationale
> of this decision?

Copied from my previous message [0]:

------
I don't know if there is a design choice here, but the steps required to
authorize substitutes for Guix on another distro require root. So, we
can't make it "just work" without the user elevating their privileges.
It's not the only part of our installation guide that requires root,
however.

On GuixSD, we can control the entire system during installation, so we
enable substitutes by default.
------

[0]
https://lists.gnu.org/archive/html/help-guix/2017-11/msg00048.html

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [bug#29271] [PATCH 1/1] doc: Split the "Substitutes" section into subsections.
  2017-11-12 11:05 ` [bug#29271] [PATCH 1/1] doc: Split the "Substitutes" section into subsections Chris Marusich
  2017-11-12 13:56   ` Jan Nieuwenhuizen
@ 2017-11-12 20:36   ` Leo Famulari
  2017-11-12 19:17     ` Eric Bavier
  2017-11-13 17:27   ` myglc2
  2 siblings, 1 reply; 13+ messages in thread
From: Leo Famulari @ 2017-11-12 20:36 UTC (permalink / raw)
  To: Chris Marusich; +Cc: 29271, myglc2

[-- Attachment #1: Type: text/plain, Size: 2247 bytes --]

On Sun, Nov 12, 2017 at 03:05:58AM -0800, Chris Marusich wrote:
> * doc/guix.texi (Substitutes): Move information into sections, and create one
>   new subsection regarding substitution failure.
>   (Top): In the detailed listing, add entries for the new subsections.
>   (Hydra): Move info about Hydra here.  Add information that explains when
>   substitutes are enabled by default.
>   (Substitute Server Authorization): Move information about how to enable or
>   disable substitutes here.
>   (Substitute Authentication): Move information about how Guix authenticates
>   substitutes here.
>   (Proxy Settings): Move information about how to download substitutes via
>   proxy here.
>   (Substitution Failure): New section.  Add information about how Guix handles
>   substitution failure.  Be extra clear about behavior concerning --fallback.
>   (On Trusting Binaries): Move information about trusting binaries here.
>   (Invoking guix-daemon): Remove an incorrect statement about when substitutes
>   are enabled by default.
>   (Common Build Options): Clarify the behavior of --fallback.

Hi, thanks for your efforts to improve the documentation.

Personally, I find it impossible to read diffs of natural language text;
it just doesn't work for me like it does with code.

So, I will just ask, does this duplicate instructions regarding
substitutes in other sections? We should be careful to avoid that.

> +@anchor{fallback-option}
>  @item --fallback
> -When substituting a pre-built binary fails, fall back to building
> -packages locally.
> +Attempt to build locally instead of issuing an error when substitutes
> +are enabled and a substitute is available, but the substitution attempt
> +fails (@pxref{Substitution Failure}).

I was able to read this smaller change. I think the new sentence is too
byzantine. I know what --fallback does but I found this sentence hard to
understand.

The condition that determines whether we "attempt to build locally"
should be at the beginning of the sentence, like this:

"When substitutes are enabled and a substitute is available, but the
substitution fails, fall back to building the derivation locally."

This is basically the same as before, but with some more detail about
the condition.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [bug#29271] [PATCH 1/1] doc: Split the "Substitutes" section into subsections.
  2017-11-12 20:25     ` Leo Famulari
@ 2017-11-13 14:37       ` myglc2
  2017-11-15  5:21         ` Chris Marusich
  0 siblings, 1 reply; 13+ messages in thread
From: myglc2 @ 2017-11-13 14:37 UTC (permalink / raw)
  To: Leo Famulari; +Cc: 29271, Chris Marusich


On 11/12/2017 at 20:25 Leo Famulari writes:

> On Sun, Nov 12, 2017 at 02:56:23PM +0100, Jan Nieuwenhuizen wrote:
>> Chris Marusich writes:
>>
>> > +Substitutes from Hydra are enabled by default when using the Guix System
>> > +Distribution (@pxref{GNU Distribution}).  However, substitutes are
>> > +disabled by default when using Guix on a foreign distribution
>> > +(@pxref{Installation}).
>>
>> It's great to have this clarified, however I wonder about the rationale
>> of this decision?
>
> Copied from my previous message [0]:
>
> ------
> I don't know if there is a design choice here, but the steps required to
> authorize substitutes for Guix on another distro require root. So, we
> can't make it "just work" without the user elevating their privileges.
> It's not the only part of our installation guide that requires root,
> however.
>
> On GuixSD, we can control the entire system during installation, so we
> enable substitutes by default.
> ------
>
> [0]
> https://lists.gnu.org/archive/html/help-guix/2017-11/msg00048.html

ISTM that "disabled by default when using Guix on a foreign
distribution" is too strong. How about ...

Substitutes from Hydra are enabled by default in the Guix System
Distribution (@pxref{GNU Distribution}) and by one of the recommended
installation steps for Guix on a foreign distribution
(@pxref{Installation}).

- George

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [bug#29271] [PATCH 1/1] doc: Split the "Substitutes" section into subsections.
  2017-11-12 11:05 ` [bug#29271] [PATCH 1/1] doc: Split the "Substitutes" section into subsections Chris Marusich
  2017-11-12 13:56   ` Jan Nieuwenhuizen
  2017-11-12 20:36   ` Leo Famulari
@ 2017-11-13 17:27   ` myglc2
  2 siblings, 0 replies; 13+ messages in thread
From: myglc2 @ 2017-11-13 17:27 UTC (permalink / raw)
  To: Chris Marusich; +Cc: 29271


Chris,

I installed the patch and read the sections. This is great stuff.

In addition to the minor suggestion in a sub-thread, how about
replacing...

> +When substitutes are enabled and a substitute for a derivation is
> +available, but the substitution attempt fails, Guix will attempt to
> +build the derivation locally depending on whether or not
> +@code{--fallback} was given (@pxref{fallback-option}).  Specifically, if
> +@code{--fallback} was omitted, then no local build will be performed,
> +and the derivation is considered to have failed.  However, if
> +@code{--fallback} was given, then Guix will attempt to build the
> +derivation locally, and the success or failure of the derivation depends
> +on the success or failure of the local build.  Note that when

... with...

When substitutes are enabled and a substitute for a derivation is
available, but the substitution attempt fails, Guix will report an error
unless the @code{--fallback} was given (@pxref{fallback-option}), in
which case Guix will attempt to build the derivation locally Note that
when

HTH - George

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [bug#29271] [PATCH 1/1] doc: Split the "Substitutes" section into subsections.
  2017-11-13 14:37       ` myglc2
@ 2017-11-15  5:21         ` Chris Marusich
  2017-11-15 13:31           ` myglc2
  0 siblings, 1 reply; 13+ messages in thread
From: Chris Marusich @ 2017-11-15  5:21 UTC (permalink / raw)
  To: myglc2; +Cc: 29271

[-- Attachment #1: Type: text/plain, Size: 4517 bytes --]

Hi everyone,

Thank you for taking the time to review my patch!

myglc2 <myglc2@gmail.com> writes:

> On 11/12/2017 at 20:25 Leo Famulari writes:
>
> ISTM that "disabled by default when using Guix on a foreign
> distribution" is too strong. How about ...
>
> Substitutes from Hydra are enabled by default in the Guix System
> Distribution (@pxref{GNU Distribution}) and by one of the recommended
> installation steps for Guix on a foreign distribution
> (@pxref{Installation}).

What if we say something like "disabled by default when using Guix on a
foreign distro, unless you've explicitly enabled them via one of the
recommended installation steps (@pxref{Installation})"?  Let me know if
you think that would be OK.

I want to clarify the fact that the substitutes are disabled by default
when installing Guix on a foreign distro.  That's a bit surprising, and
it needs to be clear.  At the same time, I think it's good to remind
users that they are in full control and can enable the substitutes
easily.

Leo Famulari <leo@famulari.name> writes:

> Personally, I find it impossible to read diffs of natural language text;
> it just doesn't work for me like it does with code.
>
> So, I will just ask, does this duplicate instructions regarding
> substitutes in other sections? We should be careful to avoid that.

No, there is no duplication (as far as I can tell!).  90% of this commit
is about moving existing text into subsections.  9% is the new
sub-section "Substitution Failure", and 1% is minor adjustments
elsewhere (e.g., removing an incorrect statement from the "Invoking
guix-daemon" section).

If this were code, I might have broken it out more into separate
commits, but since the GNU standards explicitly say that we don't even
need ChangeLog entries for documentation, I think it's OK to
conveniently squish these changes into one commit.

>> +@anchor{fallback-option}
>>  @item --fallback
>> -When substituting a pre-built binary fails, fall back to building
>> -packages locally.
>> +Attempt to build locally instead of issuing an error when substitutes
>> +are enabled and a substitute is available, but the substitution attempt
>> +fails (@pxref{Substitution Failure}).
>
> I was able to read this smaller change. I think the new sentence is too
> byzantine. I know what --fallback does but I found this sentence hard to
> understand.
>
> The condition that determines whether we "attempt to build locally"
> should be at the beginning of the sentence, like this:
>
> "When substitutes are enabled and a substitute is available, but the
> substitution fails, fall back to building the derivation locally."
>
> This is basically the same as before, but with some more detail about
> the condition.

I agree that is better, as long as we include a cross-reference to the
more detailed "Substitution Failure" section (which is what Eric
suggested).  I'll update the patch along those lines.

myglc2 <myglc2@gmail.com> writes:

> Chris,
>
> I installed the patch and read the sections. This is great stuff.
>
> In addition to the minor suggestion in a sub-thread, how about
> replacing...
>
>> +When substitutes are enabled and a substitute for a derivation is
>> +available, but the substitution attempt fails, Guix will attempt to
>> +build the derivation locally depending on whether or not
>> +@code{--fallback} was given (@pxref{fallback-option}).  Specifically, if
>> +@code{--fallback} was omitted, then no local build will be performed,
>> +and the derivation is considered to have failed.  However, if
>> +@code{--fallback} was given, then Guix will attempt to build the
>> +derivation locally, and the success or failure of the derivation depends
>> +on the success or failure of the local build.  Note that when
>
> ... with...
>
> When substitutes are enabled and a substitute for a derivation is
> available, but the substitution attempt fails, Guix will report an error
> unless the @code{--fallback} was given (@pxref{fallback-option}), in
> which case Guix will attempt to build the derivation locally Note that
> when

Personally, I prefer the more detailed explanation because it's less
ambiguous.  What does "report an error" mean?  To those who already
know, it might be clear, but to someone who is learning for the first
time, the ambiguity is unhelpful.

However, if others prefer the less verbose wording, I will use it.
What do you think, Leo and Eric?

-- 
Chris

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [bug#29271] [PATCH 1/1] doc: Split the "Substitutes" section into subsections.
  2017-11-15  5:21         ` Chris Marusich
@ 2017-11-15 13:31           ` myglc2
  0 siblings, 0 replies; 13+ messages in thread
From: myglc2 @ 2017-11-15 13:31 UTC (permalink / raw)
  To: Chris Marusich; +Cc: 29271

On 11/14/2017 at 21:21 Chris Marusich writes:

[...]
>> Substitutes from Hydra are enabled by default in the Guix System
>> Distribution (@pxref{GNU Distribution}) and by one of the recommended
>> installation steps for Guix on a foreign distribution
>> (@pxref{Installation}).
>
> What if we say something like "disabled by default when using Guix on a
> foreign distro, unless you've explicitly enabled them via one of the
> recommended installation steps (@pxref{Installation})"?  Let me know if
> you think that would be OK.

LGTM! Thanks for doing this. - George

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [bug#29271] [PATCH 1/1] doc: Split the "Substitutes" section into subsections.
  2017-11-12 19:17     ` Eric Bavier
@ 2017-11-20 22:40       ` Ludovic Courtès
  0 siblings, 0 replies; 13+ messages in thread
From: Ludovic Courtès @ 2017-11-20 22:40 UTC (permalink / raw)
  To: Eric Bavier; +Cc: 29271, Chris Marusich, myglc2

Hello!

Eric Bavier <ericbavier@centurylink.net> skribis:

> On Sun, 12 Nov 2017 15:36:44 -0500
> Leo Famulari <leo@famulari.name> wrote:
>
>> On Sun, Nov 12, 2017 at 03:05:58AM -0800, Chris Marusich wrote:
>> > +@anchor{fallback-option}
>> >  @item --fallback
>> > -When substituting a pre-built binary fails, fall back to building
>> > -packages locally.
>> > +Attempt to build locally instead of issuing an error when substitutes
>> > +are enabled and a substitute is available, but the substitution attempt
>> > +fails (@pxref{Substitution Failure}).  
>> 
>> I was able to read this smaller change. I think the new sentence is too
>> byzantine. I know what --fallback does but I found this sentence hard to
>> understand.
>
> Same here.

[...]

> IMHO, the original text is just fine, and succinctly conveys the
> origin of the option name. Perhaps just add the cross reference.

I agree, but I’m biased.  ;-)

Apart from that, the rest LGTM.  I have one minor request:

> +* Hydra::                           One particular source of substitutes.

I would call this “Official Substitute Server” or something like that,
and not mention Hydra (as a proper noun) since we’re not defining it,
and since the server won’t run Hydra forever.

With these two changes, I think you can push.

Thanks for improving the manual!

Ludo’.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#29271: Status: [PATCH 0/1] Improve the "Substitutes" documentation
  2017-11-12 11:02 [bug#29271] [PATCH 0/1] Improve the "Substitutes" documentation Chris Marusich
  2017-11-12 11:05 ` [bug#29271] [PATCH 1/1] doc: Split the "Substitutes" section into subsections Chris Marusich
  2017-11-12 11:21 ` [bug#29271] [PATCH 0/1] Improve the "Substitutes" documentation Adonay Felipe Nogueira
@ 2017-11-22  4:29 ` Chris Marusich
  2 siblings, 0 replies; 13+ messages in thread
From: Chris Marusich @ 2017-11-22  4:29 UTC (permalink / raw)
  To: bug#29271

[-- Attachment #1: Type: text/plain, Size: 620 bytes --]

Hi,

I've committed this as 77f921587c6b784e84b98a9f2e9c821f73114340.  This
commit includes the minor changes suggested by Ludo.

In particular, I used the phrase "official build server" instead of
"hydra" where applicable; I simply added a cross-reference to the
description of the --fallback option instead of making it more verbose;
and I changed the language describing how substitutes are disabled by
default when Guix is installed on a foreign distro to emphasize the fact
that our recommended installation steps will enable them anyway.

If anyone has any concerns, please let me know.

-- 
Chris

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2017-11-22  4:30 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-12 11:02 [bug#29271] [PATCH 0/1] Improve the "Substitutes" documentation Chris Marusich
2017-11-12 11:05 ` [bug#29271] [PATCH 1/1] doc: Split the "Substitutes" section into subsections Chris Marusich
2017-11-12 13:56   ` Jan Nieuwenhuizen
2017-11-12 20:25     ` Leo Famulari
2017-11-13 14:37       ` myglc2
2017-11-15  5:21         ` Chris Marusich
2017-11-15 13:31           ` myglc2
2017-11-12 20:36   ` Leo Famulari
2017-11-12 19:17     ` Eric Bavier
2017-11-20 22:40       ` Ludovic Courtès
2017-11-13 17:27   ` myglc2
2017-11-12 11:21 ` [bug#29271] [PATCH 0/1] Improve the "Substitutes" documentation Adonay Felipe Nogueira
2017-11-22  4:29 ` bug#29271: Status: " Chris Marusich

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).