Message ID | 20220206213344.3117861-1-contact@phfrohring.com |
---|---|
State | New |
Headers | show |
Series | [bug#53827] Add a TLDR entry to the cookbook for building Guix from Git. | expand |
Context | Check | Description |
---|---|---|
cbaines/applying patch | fail | View Laminar job |
cbaines/issue | success | View issue |
Pierre-Henry Fröhring schreef op zo 06-02-2022 om 22:33 [+0100]: > +@node Building from Git > +@chapter Building from Git > + > +Build Guix from Git and start hacking. > + > +@node Context > +@section Context This is all explained in the main manual in more detail, can a cross- reference to ‘(guix)Building from Git’ be added?
Pierre-Henry Fröhring schreef op zo 06-02-2022 om 22:33 [+0100]:
> +@code{./pre-inst-env} let's you distinguish between this installation of
"lets", not "let's"
Pierre-Henry Fröhring schreef op zo 06-02-2022 om 22:33 [+0100]:
> +guix environment guix --pure
Nowadays it's "guix shell":
"guix shell --pure -D guix"
Pierre-Henry Fröhring schreef op zo 06-02-2022 om 22:33 [+0100]: > +guix environment guix --pure --ad-hoc fd > +./bootstrap > +guix_db_prefix=$(fd -p '.*/guix/db$' /) > +guix_db_prefix=$@{guix_db_prefix%/guix/db@} What's this 'fd' and guix_db_prefix about? If this is necessary, shouldn't it be documented in the main manual. > +./configure --localstatedir="$guix_db_prefix" > +exit > +make authenticate This "make authenticate" gives a false sense of security -- the MITM attacker could have changed the Makefile.am to let the 'authenticate' target be a no-op. Likewise, authentication must happen before ./bootstrap and ./configure otherwise it's too late. Also, didn't this authentication already happen in > +@node Authentication > +@section Authentication > + > +@example > +git fetch origin keyring:keyring > +guix git authenticate 9edb3f66fd807b096b48283debdcddccfea34bad \ > + "BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA" Greetings, Maxime.
Pierre-Henry Fröhring schreef op zo 06-02-2022 om 22:33 [+0100]: > +cd ~/src That directory does not exist on my machine, it needs to be created first ('mkdir'). > +git clone https://git.savannah.gnu.org/git/guix.git Before we can "git clone", git needs to be installed ("guix install git", or "guix shell git"). Greetings, Maxime.
Pierre-Henry Fröhring schreef op zo 06-02-2022 om 22:33 [+0100]: > --- > doc/guix-cookbook.texi | 68 ++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 68 insertions(+) Commit message is missing. Greetings, Maxime
Thank you for your comments. An updated patch is on its way. On Sun, 2022-02-06 at 23:09 +0100, Maxime Devos wrote: > Pierre-Henry Fröhring schreef op zo 06-02-2022 om 22:33 [+0100]: > > --- > > doc/guix-cookbook.texi | 68 > > ++++++++++++++++++++++++++++++++++++++++++ > > 1 file changed, 68 insertions(+) > > Commit message is missing. > > Greetings, > Maxime
Hi, Maxime Devos <maximedevos@telenet.be> skribis: > Pierre-Henry Fröhring schreef op zo 06-02-2022 om 22:33 [+0100]: >> +@node Building from Git >> +@chapter Building from Git >> + >> +Build Guix from Git and start hacking. >> + >> +@node Context >> +@section Context > > This is all explained in the main manual in more detail, can a cross- > reference to ‘(guix)Building from Git’ be added? Yes, I wonder: what do you think Pierre-Henry is wrong with the same-named section of the manual? https://guix.gnu.org/manual/devel/en/html_node/Building-from-Git.html It is more verbose, but the important commands are in @example boxes, which should allow the reader to skip straight to the main parts. WDYT? Ludo’.
Hello Ludovic, I try to make Guix our default package manager. It's really wonderful so far. To that end, I need TLDRs so that less experienced developpers can get going /fast/. Deeper understanding will come in time. I also need to convince that Guix is /easy/ to third parties. I need to /show/ that /installing/, /configuring/ and /using/ Guix is fast and efficient. I found out that TLDRs are great tools for that. I need to have small TLDRs so that when things go wrong, it's easy to know where and fix either the TLDR or the manual steps. Also, sometimes, things go wrong and are not documented. /E.g./ setting ~LC_ALL=C.UTF-8~ will make Guix complain even after installing ~guix install glibc-utf8-locales~. I can factor this knowledge inside these TLDR fast. Now, if I compare the official documentation: https://guix.gnu.org/manual/devel/en/html_node/Building-from-Git.html with the TLDR version of it: https://transient.blog/1/tutoriel-guix-devel/ea10580e-9750-463a-aff4-9a3e90809ad4/54fcc4f606 Then, even after taking into account the great work accomplished in the documentation, I find the TLDR version more convincing. Pierre-Henry On Tue, 2022-02-15 at 10:20 +0100, Ludovic Courtès wrote: > Hi, > > Maxime Devos <maximedevos@telenet.be> skribis: > > > Pierre-Henry Fröhring schreef op zo 06-02-2022 om 22:33 [+0100]: > > > +@node Building from Git > > > +@chapter Building from Git > > > + > > > +Build Guix from Git and start hacking. > > > + > > > +@node Context > > > +@section Context > > > > This is all explained in the main manual in more detail, can a > > cross- > > reference to ‘(guix)Building from Git’ be added? > > Yes, I wonder: what do you think Pierre-Henry is wrong with the > same-named section of the manual? > > > https://guix.gnu.org/manual/devel/en/html_node/Building-from-Git.html > > It is more verbose, but the important commands are in @example boxes, > which should allow the reader to skip straight to the main parts. > > WDYT? > > Ludo’.
Hi, Pierre-Henry Fröhring <contact@phfrohring.com> skribis: > I try to make Guix our default package manager. It's really wonderful > so far. To that end, I need TLDRs so that less experienced > developpers can get going /fast/. Deeper understanding will come in > time. > > I also need to convince that Guix is /easy/ to third parties. I need > to /show/ that /installing/, /configuring/ and /using/ Guix is fast > and efficient. I found out that TLDRs are great tools for that. > > I need to have small TLDRs so that when things go wrong, it's easy to > know where and fix either the TLDR or the manual steps. Also, > sometimes, things go wrong and are not documented. /E.g./ setting > ~LC_ALL=C.UTF-8~ will make Guix complain even after installing ~guix > install glibc-utf8-locales~. I can factor this knowledge inside these > TLDR fast. No argument here, I very much understand why as a user or potential contributor one would want to-the-point documentation as a first step. I also want to be able to understand what I’m doing though—maybe not at first, but soon enough. That’s why I don’t feel comfortable giving a raw list of commands without explanations. But maybe we can have both, with cross references. Thoughts? Ludo’.
Hi, On Wed, 16 Feb 2022 at 14:39, Ludovic Courtès <ludo@gnu.org> wrote: > > Hi, > > Pierre-Henry Fröhring <contact@phfrohring.com> skribis: > > > I try to make Guix our default package manager. It's really wonderful > > so far. To that end, I need TLDRs so that less experienced > > developpers can get going /fast/. Deeper understanding will come in > > time. > > > > I also need to convince that Guix is /easy/ to third parties. I need > > to /show/ that /installing/, /configuring/ and /using/ Guix is fast > > and efficient. I found out that TLDRs are great tools for that. > > > > I need to have small TLDRs so that when things go wrong, it's easy to > > know where and fix either the TLDR or the manual steps. Also, > > sometimes, things go wrong and are not documented. /E.g./ setting > > ~LC_ALL=C.UTF-8~ will make Guix complain even after installing ~guix > > install glibc-utf8-locales~. I can factor this knowledge inside these > > TLDR fast. > > No argument here, I very much understand why as a user or potential > contributor one would want to-the-point documentation as a first step. > > I also want to be able to understand what I’m doing though—maybe not at > first, but soon enough. That’s why I don’t feel comfortable giving a > raw list of commands without explanations. For what it is worth, I wrote a version for some users here: <https://simon.tournier.info/posts/2021-10-12-add-guix-package.html> The manual is good (even really good!) once I am able to explicitly formulate what I want. That's the job of the Cookbook (or any other materials): fill the gap, IMHO. Cheers, simon
Envoyé de mon iPhone > Le 16 févr. 2022 à 14:36, Ludovic Courtès <ludo@gnu.org> a écrit : > > Hi, > > Pierre-Henry Fröhring <contact@phfrohring.com> skribis: > >> I try to make Guix our default package manager. It's really wonderful >> so far. To that end, I need TLDRs so that less experienced >> developpers can get going /fast/. Deeper understanding will come in >> time. >> >> I also need to convince that Guix is /easy/ to third parties. I need >> to /show/ that /installing/, /configuring/ and /using/ Guix is fast >> and efficient. I found out that TLDRs are great tools for that. >> >> I need to have small TLDRs so that when things go wrong, it's easy to >> know where and fix either the TLDR or the manual steps. Also, >> sometimes, things go wrong and are not documented. /E.g./ setting >> ~LC_ALL=C.UTF-8~ will make Guix complain even after installing ~guix >> install glibc-utf8-locales~. I can factor this knowledge inside these >> TLDR fast. > > No argument here, I very much understand why as a user or potential > contributor one would want to-the-point documentation as a first step. > > I also want to be able to understand what I’m doing though—maybe not at > first, but soon enough. That’s why I don’t feel comfortable giving a > raw list of commands without explanations. Agreed. > > But maybe we can have both, with cross references. Yes! It’s implicit in our workflow, the documentation _is_ the reference. > > Thoughts? Yes. I can add cross references in the patch and in the so called transient.blog > > Ludo’.
On Wed, Feb 16, 2022 at 02:36:00PM +0100, Ludovic Courtès wrote:
> But maybe we can have both, with cross references.
Sure, but we'll have to increase our efforts to maintain the cookbook.
So far, we seem to forgot to update it to reflect changes in Guix, while
we do try to keep the manual in sync with the codebase.
Instead, we could put the TLDR at the beginning of the manual section
Building From Git, and then we'll have less trouble remembering to
update it.
> Sure, but we'll have to increase our efforts to maintain the > cookbook. > > So far, we seem to forgot to update it to reflect changes in Guix, > while > we do try to keep the manual in sync with the codebase. > > Instead, we could put the TLDR at the beginning of the manual section > Building From Git, and then we'll have less trouble remembering to > update it. Agreed. This would have been useful.
Leo Famulari <leo@famulari.name> skribis: > On Wed, Feb 16, 2022 at 02:36:00PM +0100, Ludovic Courtès wrote: >> But maybe we can have both, with cross references. > > Sure, but we'll have to increase our efforts to maintain the cookbook. > > So far, we seem to forgot to update it to reflect changes in Guix, while > we do try to keep the manual in sync with the codebase. > > Instead, we could put the TLDR at the beginning of the manual section > Building From Git, and then we'll have less trouble remembering to > update it. Sure, why not. Thanks, Ludo’.
diff --git a/doc/guix-cookbook.texi b/doc/guix-cookbook.texi index d2ce525998..2d004d7a6b 100644 --- a/doc/guix-cookbook.texi +++ b/doc/guix-cookbook.texi @@ -66,6 +66,7 @@ Weblate} (@pxref{Translating Guix,,, guix, GNU Guix reference manual}). @menu * Scheme tutorials:: Meet your new favorite language! +* Building from Git:: Hack Guix itself * Packaging:: Packaging tutorials * System Configuration:: Customizing the GNU System * Advanced package management:: Power to the users! @@ -301,7 +302,73 @@ You'll find more books, tutorials and other resources at @url{https://schemers.org/}. +@c ********************************************************************* +@node Building from Git +@chapter Building from Git + +Build Guix from Git and start hacking. + +@node Context +@section Context + +@itemize +@item +Guix is installed using binary installation. +@end itemize + +@node Source +@section Source + +@example +cd ~/src +git clone https://git.savannah.gnu.org/git/guix.git +@end example + +@node Authentication +@section Authentication + +@example +git fetch origin keyring:keyring +guix git authenticate 9edb3f66fd807b096b48283debdcddccfea34bad \ + "BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA" +@end example + +@node Development environment +@section Development environment + +@example +guix environment guix --pure --ad-hoc fd +./bootstrap +guix_db_prefix=$(fd -p '.*/guix/db$' /) +guix_db_prefix=$@{guix_db_prefix%/guix/db@} +./configure --localstatedir="$guix_db_prefix" +exit +make authenticate +@end example + +@node Compile +@section Compile + +@example +guix environment guix --pure +make +make check +exit +@end example + +@node Test +@section Test + +@code{./pre-inst-env} let's you distinguish between this installation of +Guix and any other. + +@example +cd ~/src/guix +guix environment guix --pure +./pre-inst-env guix build hello +@end example + + @c ********************************************************************* @node Packaging @chapter Packaging --