unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#41601] [PATCH] doc: Make 'sudo -E ./pre-inst-env guix-daemon' example less prominent.
@ 2020-05-29 15:00 Marius Bakke
  2020-05-29 15:34 ` Nicolas Goaziou
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Marius Bakke @ 2020-05-29 15:00 UTC (permalink / raw)
  To: 41601

* 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@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@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





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

* [bug#41601] [PATCH] doc: Make 'sudo -E ./pre-inst-env guix-daemon' example less prominent.
  2020-05-29 15:00 [bug#41601] [PATCH] doc: Make 'sudo -E ./pre-inst-env guix-daemon' example less prominent Marius Bakke
@ 2020-05-29 15:34 ` Nicolas Goaziou
  2020-05-29 15:57   ` zimoun
  2020-05-29 15:36 ` Julien Lepiller
  2020-10-09  2:29 ` bug#41601: " Maxim Cournoyer
  2 siblings, 1 reply; 6+ messages in thread
From: Nicolas Goaziou @ 2020-05-29 15:34 UTC (permalink / raw)
  To: Marius Bakke; +Cc: 41601

Hello,

Marius Bakke <marius@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




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

* [bug#41601] [PATCH] doc: Make 'sudo -E ./pre-inst-env guix-daemon' example less prominent.
  2020-05-29 15:00 [bug#41601] [PATCH] doc: Make 'sudo -E ./pre-inst-env guix-daemon' example less prominent Marius Bakke
  2020-05-29 15:34 ` Nicolas Goaziou
@ 2020-05-29 15:36 ` Julien Lepiller
  2020-10-09  2:29 ` bug#41601: " Maxim Cournoyer
  2 siblings, 0 replies; 6+ messages in thread
From: Julien Lepiller @ 2020-05-29 15:36 UTC (permalink / raw)
  To: Marius Bakke, 41601

Le 29 mai 2020 11:00:03 GMT-04:00, Marius Bakke <marius@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@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@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).




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

* [bug#41601] [PATCH] doc: Make 'sudo -E ./pre-inst-env guix-daemon' example less prominent.
  2020-05-29 15:34 ` Nicolas Goaziou
@ 2020-05-29 15:57   ` zimoun
  2020-05-29 17:43     ` Nicolas Goaziou
  0 siblings, 1 reply; 6+ messages in thread
From: zimoun @ 2020-05-29 15:57 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: 41601, Marius Bakke

Hi Nicolas,

On Fri, 29 May 2020 at 17:36, Nicolas Goaziou <mail@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




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

* [bug#41601] [PATCH] doc: Make 'sudo -E ./pre-inst-env guix-daemon' example less prominent.
  2020-05-29 15:57   ` zimoun
@ 2020-05-29 17:43     ` Nicolas Goaziou
  0 siblings, 0 replies; 6+ messages in thread
From: Nicolas Goaziou @ 2020-05-29 17:43 UTC (permalink / raw)
  To: zimoun; +Cc: 41601, Marius Bakke

Hello,

zimoun <zimon.toutoune@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




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

* bug#41601: [PATCH] doc: Make 'sudo -E ./pre-inst-env guix-daemon' example less prominent.
  2020-05-29 15:00 [bug#41601] [PATCH] doc: Make 'sudo -E ./pre-inst-env guix-daemon' example less prominent Marius Bakke
  2020-05-29 15:34 ` Nicolas Goaziou
  2020-05-29 15:36 ` Julien Lepiller
@ 2020-10-09  2:29 ` Maxim Cournoyer
  2 siblings, 0 replies; 6+ messages in thread
From: Maxim Cournoyer @ 2020-10-09  2:29 UTC (permalink / raw)
  To: Marius Bakke; +Cc: 41601-done

Hello Marius,

Marius Bakke <marius@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




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

end of thread, other threads:[~2020-10-09  2:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-29 15:00 [bug#41601] [PATCH] doc: Make 'sudo -E ./pre-inst-env guix-daemon' example less prominent Marius Bakke
2020-05-29 15:34 ` Nicolas Goaziou
2020-05-29 15:57   ` zimoun
2020-05-29 17:43     ` Nicolas Goaziou
2020-05-29 15:36 ` Julien Lepiller
2020-10-09  2:29 ` bug#41601: " Maxim Cournoyer

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).