GNU bug report logs - #41601
[PATCH] doc: Make 'sudo -E ./pre-inst-env guix-daemon' example less prominent.

Previous Next

Package: guix-patches;

Reported by: Marius Bakke <marius <at> gnu.org>

Date: Fri, 29 May 2020 15:01:02 UTC

Severity: normal

Tags: patch

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 41601 in the body.
You can then email your comments to 41601 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#41601; Package guix-patches. (Fri, 29 May 2020 15:01:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Marius Bakke <marius <at> gnu.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 29 May 2020 15:01:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Marius Bakke <marius <at> gnu.org>
To: guix-patches <at> gnu.org
Subject: [PATCH] doc: Make 'sudo -E ./pre-inst-env guix-daemon' example less
 prominent.
Date: Fri, 29 May 2020 17:00:03 +0200
* doc/contributing.texi (Running Guix Before It Is Installed): Move
'./pre-inst-env guix-daemon' example after the mention of GUILE_LOAD_PATH &
co, because running the daemon from the checkout frequently trips new users.
Additionally clarify that sudo must be setuid.
---
 doc/contributing.texi | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/doc/contributing.texi b/doc/contributing.texi
index 88128e5498..d9e54dd23b 100644
--- a/doc/contributing.texi
+++ b/doc/contributing.texi
@@ -161,13 +161,8 @@ with all the dependencies available (@pxref{Building from Git}), and then
 simply prefix each command with
 @command{./pre-inst-env} (the @file{pre-inst-env} script lives in the
 top build tree of Guix; it is generated by @command{./configure}).
-An example <at> footnote{The @option{-E} flag to
-@command{sudo} guarantees that @code{GUILE_LOAD_PATH} is correctly set
-such that @command{guix-daemon} and the tools it uses can find the Guile
-modules they need.}:
 
 @example
-$ sudo -E ./pre-inst-env guix-daemon --build-users-group=guixbuild
 $ ./pre-inst-env guix build hello
 @end example
 
@@ -205,6 +200,16 @@ $1 = 361
 The @command{pre-inst-env} script sets up all the environment variables
 necessary to support this, including @env{PATH} and @env{GUILE_LOAD_PATH}.
 
+When root privileges are required, use the @option{-E} argument to
+@command{sudo} to preserve the environment <at> footnote{Additionally, make sure
+to use the installed @command{sudo} such as @file{/run/setuid-programs/sudo}
+instead of the @code{sudo} package, otherwise sudo won't be able to elevate
+privileges}.  E.g. if you are testing changes to @command{guix-daemon}:
+
+@example
+$ sudo -E ./pre-inst-env guix-daemon --build-users-group=guixbuild
+@end example
+
 Note that @command{./pre-inst-env guix pull} does @emph{not} upgrade the
 local source tree; it simply updates the @file{~/.config/guix/current}
 symlink (@pxref{Invoking guix pull}).  Run @command{git pull} instead if
-- 
2.26.2





Information forwarded to guix-patches <at> gnu.org:
bug#41601; Package guix-patches. (Fri, 29 May 2020 15:36:02 GMT) Full text and rfc822 format available.

Message #8 received at 41601 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: Marius Bakke <marius <at> gnu.org>
Cc: 41601 <at> debbugs.gnu.org
Subject: Re: [bug#41601] [PATCH] doc: Make 'sudo -E ./pre-inst-env
 guix-daemon' example less prominent.
Date: Fri, 29 May 2020 17:34:55 +0200
Hello,

Marius Bakke <marius <at> gnu.org> writes:

> +privileges}.  E.g. if you are testing changes to @command{guix-daemon}:
                  ^^^^
Beware the dot above. You could write

  E.g.@: if you…

or

  E.g., if you…
                  

instead.

Regards,

-- 
Nicolas Goaziou




Information forwarded to guix-patches <at> gnu.org:
bug#41601; Package guix-patches. (Fri, 29 May 2020 15:37:02 GMT) Full text and rfc822 format available.

Message #11 received at 41601 <at> debbugs.gnu.org (full text, mbox):

From: Julien Lepiller <julien <at> lepiller.eu>
To: Marius Bakke <marius <at> gnu.org>,41601 <at> debbugs.gnu.org
Subject: Re: [bug#41601] [PATCH] doc: Make 'sudo -E ./pre-inst-env
 guix-daemon' example less prominent.
Date: Fri, 29 May 2020 11:36:15 -0400
Le 29 mai 2020 11:00:03 GMT-04:00, Marius Bakke <marius <at> gnu.org> a écrit :
>* doc/contributing.texi (Running Guix Before It Is Installed): Move
>'./pre-inst-env guix-daemon' example after the mention of
>GUILE_LOAD_PATH &
>co, because running the daemon from the checkout frequently trips new
>users.
>Additionally clarify that sudo must be setuid.
>---
> doc/contributing.texi | 15 ++++++++++-----
> 1 file changed, 10 insertions(+), 5 deletions(-)
>
>diff --git a/doc/contributing.texi b/doc/contributing.texi
>index 88128e5498..d9e54dd23b 100644
>--- a/doc/contributing.texi
>+++ b/doc/contributing.texi
>@@ -161,13 +161,8 @@ with all the dependencies available
>(@pxref{Building from Git}), and then
> simply prefix each command with
> @command{./pre-inst-env} (the @file{pre-inst-env} script lives in the
> top build tree of Guix; it is generated by @command{./configure}).
>-An example <at> footnote{The @option{-E} flag to
>-@command{sudo} guarantees that @code{GUILE_LOAD_PATH} is correctly set
>-such that @command{guix-daemon} and the tools it uses can find the
>Guile
>-modules they need.}:
> 
> @example
>-$ sudo -E ./pre-inst-env guix-daemon --build-users-group=guixbuild
> $ ./pre-inst-env guix build hello
> @end example
> 
>@@ -205,6 +200,16 @@ $1 = 361
>The @command{pre-inst-env} script sets up all the environment variables
>necessary to support this, including @env{PATH} and
>@env{GUILE_LOAD_PATH}.
> 
>+When root privileges are required, use the @option{-E} argument to
>+@command{sudo} to preserve the environment <at> footnote{Additionally, make
>sure
>+to use the installed @command{sudo} such as
>@file{/run/setuid-programs/sudo}
>+instead of the @code{sudo} package, otherwise sudo won't be able to
>elevate
>+privileges}.  E.g. if you are testing changes to
>@command{guix-daemon}:
>+
>+@example
>+$ sudo -E ./pre-inst-env guix-daemon --build-users-group=guixbuild
>+@end example
>+
>Note that @command{./pre-inst-env guix pull} does @emph{not} upgrade
>the
> local source tree; it simply updates the @file{~/.config/guix/current}
>symlink (@pxref{Invoking guix pull}).  Run @command{git pull} instead
>if

Looks good, but you should mention that, before running the daemon that way, the one running on the system must be stopped (herd stop guix-daemon or whatever init system is installed).




Information forwarded to guix-patches <at> gnu.org:
bug#41601; Package guix-patches. (Fri, 29 May 2020 15:58:02 GMT) Full text and rfc822 format available.

Message #14 received at 41601 <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
Cc: 41601 <at> debbugs.gnu.org, Marius Bakke <marius <at> gnu.org>
Subject: Re: [bug#41601] [PATCH] doc: Make 'sudo -E ./pre-inst-env
 guix-daemon' example less prominent.
Date: Fri, 29 May 2020 17:57:27 +0200
Hi Nicolas,

On Fri, 29 May 2020 at 17:36, Nicolas Goaziou <mail <at> nicolasgoaziou.fr> wrote:

> > +privileges}.  E.g. if you are testing changes to @command{guix-daemon}:
>                   ^^^^
> Beware the dot above. You could write
>
>   E.g.@: if you…
>
> or
>
>   E.g., if you…

I am not native speaker but last time I have checked the rule for
Latin abbreviation, if I remember well, it says: it depends. :-)
In general, the style guides says always a comma before, i.e. like that.
However, the comma after depends on U.S. vs U.K.:
  - U.S., i.e., comma after the abbreviation;
  - U.K., i.e. no command after the abbreviation.


Cheers,
simon




Information forwarded to guix-patches <at> gnu.org:
bug#41601; Package guix-patches. (Fri, 29 May 2020 17:44:01 GMT) Full text and rfc822 format available.

Message #17 received at 41601 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: zimoun <zimon.toutoune <at> gmail.com>
Cc: 41601 <at> debbugs.gnu.org, Marius Bakke <marius <at> gnu.org>
Subject: Re: [bug#41601] [PATCH] doc: Make 'sudo -E ./pre-inst-env
 guix-daemon' example less prominent.
Date: Fri, 29 May 2020 19:43:52 +0200
Hello,

zimoun <zimon.toutoune <at> gmail.com> writes:

> I am not native speaker but last time I have checked the rule for
> Latin abbreviation, if I remember well, it says: it depends. :-)

I was talking about Texinfo syntax, where "E.g. if" is misleading. Sorry
if that was not clear.

Regards,

-- 
Nicolas Goaziou




Reply sent to Maxim Cournoyer <maxim.cournoyer <at> gmail.com>:
You have taken responsibility. (Fri, 09 Oct 2020 02:30:02 GMT) Full text and rfc822 format available.

Notification sent to Marius Bakke <marius <at> gnu.org>:
bug acknowledged by developer. (Fri, 09 Oct 2020 02:30:02 GMT) Full text and rfc822 format available.

Message #22 received at 41601-done <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Marius Bakke <marius <at> gnu.org>
Cc: 41601-done <at> debbugs.gnu.org
Subject: Re: [bug#41601] [PATCH] doc: Make 'sudo -E ./pre-inst-env
 guix-daemon' example less prominent.
Date: Thu, 08 Oct 2020 22:29:23 -0400
Hello Marius,

Marius Bakke <marius <at> gnu.org> writes:

> * doc/contributing.texi (Running Guix Before It Is Installed): Move
> './pre-inst-env guix-daemon' example after the mention of GUILE_LOAD_PATH &
> co, because running the daemon from the checkout frequently trips new users.
> Additionally clarify that sudo must be setuid.

Ludovic today pushed a changed very similar in commit
9022861dc028e99fab930721fe991a682c497bbb, obsoleting this one.

Closing.

Thank you,

Maxim




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 06 Nov 2020 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 171 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.