all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Modification for guix installation script.
@ 2018-03-24  9:04 Tatiana Sholokhova
  2018-03-24 16:46 ` Vincent Legoll
                   ` (3 more replies)
  0 siblings, 4 replies; 20+ messages in thread
From: Tatiana Sholokhova @ 2018-03-24  9:04 UTC (permalink / raw)
  To: guix-devel

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

Hello! My name is Tatiana.

I have installed guix for the first time and noticed that the installation
script at
https://git.savannah.gnu.org/cgit/guix.git/tree/etc/guix-install.sh did not
work for me. So, I had to make some modifications.

There was a problem with the path to root user home directory. Below I
provide diff output for original script and my modified script.

266c266,267
<     ln -sf /var/guix/profiles/per-user/root/guix-profile
/root/.guix-profile
---
>     ln -sf /var/guix/profiles/per-user/root/guix-profile \
>        ~root/.guix-profile
268c269
<     GUIX_PROFILE="/root/.guix-profile"
---
>     GUIX_PROFILE="${HOME}/.guix-profile"

These changes allowed me to install guix via the script.

P. S.
I am really a newcomer to the guix community. And still not sure how
everything works here. Sorry If my post's format is not appropriate.

--
Tatiana Sholokhova

[-- Attachment #2: Type: text/html, Size: 1672 bytes --]

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

* Re: Modification for guix installation script.
  2018-03-24  9:04 Modification for guix installation script Tatiana Sholokhova
@ 2018-03-24 16:46 ` Vincent Legoll
  2018-03-24 17:00   ` Tatiana Sholokhova
  2018-03-25 15:26 ` bug#30728: " Ricardo Wurmus
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 20+ messages in thread
From: Vincent Legoll @ 2018-03-24 16:46 UTC (permalink / raw)
  To: Tatiana Sholokhova; +Cc: guix-devel

Hello,

> 266c266,267
> <     ln -sf /var/guix/profiles/per-user/root/guix-profile
> /root/.guix-profile
> ---
>>     ln -sf /var/guix/profiles/per-user/root/guix-profile \
>>        ~root/.guix-profile
> 268c269
> <     GUIX_PROFILE="/root/.guix-profile"
> ---
>>     GUIX_PROFILE="${HOME}/.guix-profile"
>
> These changes allowed me to install guix via the script.

Why didn't you also use ${HOME} in the "ln" case ? (or "~/" in
the two cases...)

-- 
Vincent Legoll

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

* Re: Modification for guix installation script.
  2018-03-24 16:46 ` Vincent Legoll
@ 2018-03-24 17:00   ` Tatiana Sholokhova
  2018-03-24 17:05     ` Vincent Legoll
  0 siblings, 1 reply; 20+ messages in thread
From: Tatiana Sholokhova @ 2018-03-24 17:00 UTC (permalink / raw)
  To: Vincent Legoll; +Cc: guix-devel

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

I just sent diff between my modified script and original script. (So, my
version of the script goes first in the diff output). I had to replace ${HOME}
and ~root with /root since there supposed to be the root user home
directory path.

2018-03-24 19:46 GMT+03:00 Vincent Legoll <vincent.legoll@gmail.com>:

> Hello,
>
> > 266c266,267
> > <     ln -sf /var/guix/profiles/per-user/root/guix-profile
> > /root/.guix-profile
> > ---
> >>     ln -sf /var/guix/profiles/per-user/root/guix-profile \
> >>        ~root/.guix-profile
> > 268c269
> > <     GUIX_PROFILE="/root/.guix-profile"
> > ---
> >>     GUIX_PROFILE="${HOME}/.guix-profile"
> >
> > These changes allowed me to install guix via the script.
>
> Why didn't you also use ${HOME} in the "ln" case ? (or "~/" in
> the two cases...)
>
> --
> Vincent Legoll
>

[-- Attachment #2: Type: text/html, Size: 1574 bytes --]

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

* Re: Modification for guix installation script.
  2018-03-24 17:00   ` Tatiana Sholokhova
@ 2018-03-24 17:05     ` Vincent Legoll
  2018-03-24 21:26       ` Tatiana Sholokhova
  0 siblings, 1 reply; 20+ messages in thread
From: Vincent Legoll @ 2018-03-24 17:05 UTC (permalink / raw)
  To: Tatiana Sholokhova; +Cc: guix-devel

On Sat, Mar 24, 2018 at 6:00 PM, Tatiana Sholokhova
<tanja201396@gmail.com> wrote:
> I just sent diff between my modified script and original script. (So, my
> version of the script goes first in the diff output). I had to replace
> ${HOME} and ~root with /root since there supposed to be the root user home
> directory path.

OK, so you have a reversed patch, so my remark was misplaced.

What is the OS you're installing guix on ?

-- 
Vincent Legoll

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

* RE: Modification for guix installation script.
  2018-03-24 17:05     ` Vincent Legoll
@ 2018-03-24 21:26       ` Tatiana Sholokhova
  0 siblings, 0 replies; 20+ messages in thread
From: Tatiana Sholokhova @ 2018-03-24 21:26 UTC (permalink / raw)
  To: Vincent Legoll; +Cc: guix-devel

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

Ubuntu 17.10
--
Tatiana Sholokhova

От: Vincent Legoll
Отправлено: 24 марта 2018 г. в 17:05
Кому: Tatiana Sholokhova
Копия: guix-devel
Тема: Re: Modification for guix installation script.

On Sat, Mar 24, 2018 at 6:00 PM, Tatiana Sholokhova
<tanja201396@gmail.com> wrote:
> I just sent diff between my modified script and original script. (So, my
> version of the script goes first in the diff output). I had to replace
> ${HOME} and ~root with /root since there supposed to be the root user home
> directory path.

OK, so you have a reversed patch, so my remark was misplaced.

What is the OS you're installing guix on ?

-- 
Vincent Legoll


[-- Attachment #2: Type: text/html, Size: 2821 bytes --]

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

* bug#30728: Modification for guix installation script.
  2018-03-24  9:04 Modification for guix installation script Tatiana Sholokhova
  2018-03-24 16:46 ` Vincent Legoll
@ 2018-03-25 15:26 ` Ricardo Wurmus
  2018-03-25 18:57   ` Mark H Weaver
  2018-03-25 18:57   ` bug#30728: " Mark H Weaver
  2018-03-26  8:27 ` Clément Lassieur
  2018-03-26  8:27 ` Clément Lassieur
  3 siblings, 2 replies; 20+ messages in thread
From: Ricardo Wurmus @ 2018-03-25 15:26 UTC (permalink / raw)
  To: Tatiana Sholokhova; +Cc: guix-devel, 30728


Hi Tatiana,

> I have installed guix for the first time and noticed that the installation
> script at
> https://git.savannah.gnu.org/cgit/guix.git/tree/etc/guix-install.sh did not
> work for me. So, I had to make some modifications.
>
> There was a problem with the path to root user home directory. Below I
> provide diff output for original script and my modified script.

Thank you.

Could you please make that change on top of the current version of the
Guix sources as a git commit?  Then you can run “git format-patch -1” to
format it as a patch in a format that we can apply.  You can send the
resulting patch file as an attachment to a reply to this email.

This also fixes bug #30728, so please add this line to the commit
message:

Fixes <https://debbugs.gnu.org/30728>.


--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net

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

* bug#30728: Modification for guix installation script.
  2018-03-25 15:26 ` bug#30728: " Ricardo Wurmus
  2018-03-25 18:57   ` Mark H Weaver
@ 2018-03-25 18:57   ` Mark H Weaver
  1 sibling, 0 replies; 20+ messages in thread
From: Mark H Weaver @ 2018-03-25 18:57 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel, 30728, Tatiana Sholokhova

Ricardo Wurmus <rekado@elephly.net> writes:

>> I have installed guix for the first time and noticed that the installation
>> script at
>> https://git.savannah.gnu.org/cgit/guix.git/tree/etc/guix-install.sh did not
>> work for me. So, I had to make some modifications.
>>
>> There was a problem with the path to root user home directory. Below I
>> provide diff output for original script and my modified script.
>
> Thank you.
>
> Could you please make that change on top of the current version of the
> Guix sources as a git commit?  Then you can run “git format-patch -1” to
> format it as a patch in a format that we can apply.  You can send the
> resulting patch file as an attachment to a reply to this email.
>
> This also fixes bug #30728, so please add this line to the commit
> message:
>
> Fixes <https://debbugs.gnu.org/30728>.

Note that there's also another proposed patch for this same issue, here:

https://bugs.gnu.org/30728#11

    Regards,
      Mark

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

* Re: Modification for guix installation script.
  2018-03-25 15:26 ` bug#30728: " Ricardo Wurmus
@ 2018-03-25 18:57   ` Mark H Weaver
  2018-03-25 18:57   ` bug#30728: " Mark H Weaver
  1 sibling, 0 replies; 20+ messages in thread
From: Mark H Weaver @ 2018-03-25 18:57 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel, 30728, Tatiana Sholokhova

Ricardo Wurmus <rekado@elephly.net> writes:

>> I have installed guix for the first time and noticed that the installation
>> script at
>> https://git.savannah.gnu.org/cgit/guix.git/tree/etc/guix-install.sh did not
>> work for me. So, I had to make some modifications.
>>
>> There was a problem with the path to root user home directory. Below I
>> provide diff output for original script and my modified script.
>
> Thank you.
>
> Could you please make that change on top of the current version of the
> Guix sources as a git commit?  Then you can run “git format-patch -1” to
> format it as a patch in a format that we can apply.  You can send the
> resulting patch file as an attachment to a reply to this email.
>
> This also fixes bug #30728, so please add this line to the commit
> message:
>
> Fixes <https://debbugs.gnu.org/30728>.

Note that there's also another proposed patch for this same issue, here:

https://bugs.gnu.org/30728#11

    Regards,
      Mark

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

* bug#30728: Modification for guix installation script.
  2018-03-24  9:04 Modification for guix installation script Tatiana Sholokhova
                   ` (2 preceding siblings ...)
  2018-03-26  8:27 ` Clément Lassieur
@ 2018-03-26  8:27 ` Clément Lassieur
  3 siblings, 0 replies; 20+ messages in thread
From: Clément Lassieur @ 2018-03-26  8:27 UTC (permalink / raw)
  To: Tatiana Sholokhova; +Cc: guix-devel, 30728

Hi Tatiana,

Tatiana Sholokhova <tanja201396@gmail.com> writes:

> Hello! My name is Tatiana.
>
> I have installed guix for the first time and noticed that the installation
> script at
> https://git.savannah.gnu.org/cgit/guix.git/tree/etc/guix-install.sh did not
> work for me. So, I had to make some modifications.
>
> There was a problem with the path to root user home directory. Below I
> provide diff output for original script and my modified script.

Thank you for working on this!

> 266c266,267
> <     ln -sf /var/guix/profiles/per-user/root/guix-profile
> /root/.guix-profile
> ---
>>     ln -sf /var/guix/profiles/per-user/root/guix-profile \
>>        ~root/.guix-profile
> 268c269
> <     GUIX_PROFILE="/root/.guix-profile"
> ---
>>     GUIX_PROFILE="${HOME}/.guix-profile"
>
> These changes allowed me to install guix via the script.

As I said to Chris (Cc'ed), I don't think it's a good idea to install
Guix in root's home directory.  Instead, we should probably honor the
USER and HOME environment variables, so that the command can be run as a
non-root user (with sudo) in a consistent way.  What do you think?

You can follow the discussion there:
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=30728.  Every email sent
to 30728@debbugs.gnu.org will appear there.

Clément

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

* Re: Modification for guix installation script.
  2018-03-24  9:04 Modification for guix installation script Tatiana Sholokhova
  2018-03-24 16:46 ` Vincent Legoll
  2018-03-25 15:26 ` bug#30728: " Ricardo Wurmus
@ 2018-03-26  8:27 ` Clément Lassieur
  2018-03-26  9:11   ` bug#30728: " Ricardo Wurmus
  2018-03-26  8:27 ` Clément Lassieur
  3 siblings, 1 reply; 20+ messages in thread
From: Clément Lassieur @ 2018-03-26  8:27 UTC (permalink / raw)
  To: Tatiana Sholokhova; +Cc: guix-devel, 30728

Hi Tatiana,

Tatiana Sholokhova <tanja201396@gmail.com> writes:

> Hello! My name is Tatiana.
>
> I have installed guix for the first time and noticed that the installation
> script at
> https://git.savannah.gnu.org/cgit/guix.git/tree/etc/guix-install.sh did not
> work for me. So, I had to make some modifications.
>
> There was a problem with the path to root user home directory. Below I
> provide diff output for original script and my modified script.

Thank you for working on this!

> 266c266,267
> <     ln -sf /var/guix/profiles/per-user/root/guix-profile
> /root/.guix-profile
> ---
>>     ln -sf /var/guix/profiles/per-user/root/guix-profile \
>>        ~root/.guix-profile
> 268c269
> <     GUIX_PROFILE="/root/.guix-profile"
> ---
>>     GUIX_PROFILE="${HOME}/.guix-profile"
>
> These changes allowed me to install guix via the script.

As I said to Chris (Cc'ed), I don't think it's a good idea to install
Guix in root's home directory.  Instead, we should probably honor the
USER and HOME environment variables, so that the command can be run as a
non-root user (with sudo) in a consistent way.  What do you think?

You can follow the discussion there:
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=30728.  Every email sent
to 30728@debbugs.gnu.org will appear there.

Clément

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

* bug#30728: Modification for guix installation script.
  2018-03-26  8:27 ` Clément Lassieur
@ 2018-03-26  9:11   ` Ricardo Wurmus
  2018-03-26 12:59     ` Clément Lassieur
                       ` (3 more replies)
  0 siblings, 4 replies; 20+ messages in thread
From: Ricardo Wurmus @ 2018-03-26  9:11 UTC (permalink / raw)
  To: Clément Lassieur; +Cc: guix-devel, 30728, Tatiana Sholokhova


Hi Clément,

> As I said to Chris (Cc'ed), I don't think it's a good idea to install
> Guix in root's home directory.  Instead, we should probably honor the
> USER and HOME environment variables, so that the command can be run as a
> non-root user (with sudo) in a consistent way.  What do you think?

The script should be run as root as it follows the manual’s
instructions, which tell people to install Guix for the root user and
then make it available system-wide.

This is why I think that it would be correct to install it to the root’s
home directory and not to the sudoing user’s HOME.

Or am I missing something?

-- 
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net

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

* bug#30728: Modification for guix installation script.
  2018-03-26  9:11   ` bug#30728: " Ricardo Wurmus
@ 2018-03-26 12:59     ` Clément Lassieur
  2018-03-26 12:59     ` Clément Lassieur
                       ` (2 subsequent siblings)
  3 siblings, 0 replies; 20+ messages in thread
From: Clément Lassieur @ 2018-03-26 12:59 UTC (permalink / raw)
  To: Ricardo Wurmus, Marius Bakke; +Cc: guix-devel, 30728, Tatiana Sholokhova

Hi Ricardo and Marius,

Marius Bakke <mbakke@fastmail.com> writes:

> The binary installation tarball only comes with a profile for 'root'.

Indeed, but it's easy to copy it for any user isn't it?

> The problem is that the installation script assumes $HOME will expand to
> ~root when sourcing the profile, but as you found that isn't always the
> case.
> 
> ~root/.guix-profile is "hard-coded" many other places in the script, so
> Tatianas solution seems sensible to me.

Ricardo Wurmus <rekado@elephly.net> writes:

> Hi Clément,
>
>> As I said to Chris (Cc'ed), I don't think it's a good idea to install
>> Guix in root's home directory.  Instead, we should probably honor the
>> USER and HOME environment variables, so that the command can be run as a
>> non-root user (with sudo) in a consistent way.  What do you think?
>
> The script should be run as root as it follows the manual’s
> instructions, which tell people to install Guix for the root user and
> then make it available system-wide.
>
> This is why I think that it would be correct to install it to the root’s
> home directory and not to the sudoing user’s HOME.
>
> Or am I missing something?

Thank you both for your comments. :-)

What I dislike with the present state of things is the need for Guix to
be installed within root's directory.  For two reasons :

  1. I don't think a command should ever install something in another
     user's home directory.  The home directory of a user is for things
     that are specific to that user, I believe.

  2. Users need to update the root profile if they want to update the
     Guix daemon, which is cumbersome.

The systemd configuration file must know where to find the Guix daemon.
If it's not in ~root, it must be in the user's home directory.  Either
way, the Guix daemon, which is system-wide, still depends on a user.

(A way to make the daemon user-independant would be to add a new command
that would update, say, /var/guix/guix-daemon, with the systemd
configuration file pointing to it.)

I personally prefer that the Guix daemon points to my home directory
because I don't want to update root's profile.  Some other people might
prefer that it points to ~root because they might later delete their
profile and want Guix to keep working.

Do we have to take a decision here?  Can't we just let the user decide
by letting them customize their environment variables?  I think it is
the point of environment variables: giving freedom to users.

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

* Re: bug#30728: Modification for guix installation script.
  2018-03-26  9:11   ` bug#30728: " Ricardo Wurmus
  2018-03-26 12:59     ` Clément Lassieur
@ 2018-03-26 12:59     ` Clément Lassieur
  2018-03-26 16:09       ` Tatiana Sholokhova
  2018-03-26 16:09       ` Tatiana Sholokhova
  2018-03-27 11:53     ` Gábor Boskovits
  2018-03-27 11:53     ` Gábor Boskovits
  3 siblings, 2 replies; 20+ messages in thread
From: Clément Lassieur @ 2018-03-26 12:59 UTC (permalink / raw)
  To: Ricardo Wurmus, Marius Bakke; +Cc: guix-devel, 30728, Tatiana Sholokhova

Hi Ricardo and Marius,

Marius Bakke <mbakke@fastmail.com> writes:

> The binary installation tarball only comes with a profile for 'root'.

Indeed, but it's easy to copy it for any user isn't it?

> The problem is that the installation script assumes $HOME will expand to
> ~root when sourcing the profile, but as you found that isn't always the
> case.
> 
> ~root/.guix-profile is "hard-coded" many other places in the script, so
> Tatianas solution seems sensible to me.

Ricardo Wurmus <rekado@elephly.net> writes:

> Hi Clément,
>
>> As I said to Chris (Cc'ed), I don't think it's a good idea to install
>> Guix in root's home directory.  Instead, we should probably honor the
>> USER and HOME environment variables, so that the command can be run as a
>> non-root user (with sudo) in a consistent way.  What do you think?
>
> The script should be run as root as it follows the manual’s
> instructions, which tell people to install Guix for the root user and
> then make it available system-wide.
>
> This is why I think that it would be correct to install it to the root’s
> home directory and not to the sudoing user’s HOME.
>
> Or am I missing something?

Thank you both for your comments. :-)

What I dislike with the present state of things is the need for Guix to
be installed within root's directory.  For two reasons :

  1. I don't think a command should ever install something in another
     user's home directory.  The home directory of a user is for things
     that are specific to that user, I believe.

  2. Users need to update the root profile if they want to update the
     Guix daemon, which is cumbersome.

The systemd configuration file must know where to find the Guix daemon.
If it's not in ~root, it must be in the user's home directory.  Either
way, the Guix daemon, which is system-wide, still depends on a user.

(A way to make the daemon user-independant would be to add a new command
that would update, say, /var/guix/guix-daemon, with the systemd
configuration file pointing to it.)

I personally prefer that the Guix daemon points to my home directory
because I don't want to update root's profile.  Some other people might
prefer that it points to ~root because they might later delete their
profile and want Guix to keep working.

Do we have to take a decision here?  Can't we just let the user decide
by letting them customize their environment variables?  I think it is
the point of environment variables: giving freedom to users.

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

* bug#30728: Modification for guix installation script.
  2018-03-26 12:59     ` Clément Lassieur
  2018-03-26 16:09       ` Tatiana Sholokhova
@ 2018-03-26 16:09       ` Tatiana Sholokhova
  1 sibling, 0 replies; 20+ messages in thread
From: Tatiana Sholokhova @ 2018-03-26 16:09 UTC (permalink / raw)
  To: Clément Lassieur; +Cc: guix-devel, 30728


[-- Attachment #1.1: Type: text/plain, Size: 1123 bytes --]

Hello!

Could you please make that change on top of the current version of the
> Guix sources as a git commit?  Then you can run “git format-patch -1” to
> format it as a patch in a format that we can apply.  You can send the
> resulting patch file as an attachment to a reply to this email.
> This also fixes bug #30728, so please add this line to the commit
> message:
> --
> Ricardo


I have attached the patch file to this email. This patch fixes the
installation process but it place guix within root's directory.

I personally prefer that the Guix daemon points to my home directory
> because I don't want to update root's profile.  Some other people might
> prefer that it points to ~root because they might later delete their
> profile and want Guix to keep working.


> Do we have to take a decision here?  Can't we just let the user decide
> by letting them customize their environment variables?  I think it is
> the point of environment variables: giving freedom to users.


We can further work on the script's flexibility using the environment
variable solution.

--
Tatiana

[-- Attachment #1.2: Type: text/html, Size: 12878 bytes --]

[-- Attachment #2: 0001-Fixes-https-debbugs.gnu.org-30728.patch --]
[-- Type: text/x-patch, Size: 904 bytes --]

From f286b6e9c60cba54f3da68428fc034d272ba5ffc Mon Sep 17 00:00:00 2001
From: tsholokhova <tanja201396@gmail.com>
Date: Mon, 26 Mar 2018 18:59:40 +0300
Subject: [PATCH] Fixes <https://debbugs.gnu.org/30728>

---
 etc/guix-install.sh | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index 933492a33..b4a9cdf94 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -263,10 +263,9 @@ sys_create_store()
     fi
 
     _msg "${INF}Linking the root user's profile"
-    ln -sf /var/guix/profiles/per-user/root/guix-profile \
-       ~root/.guix-profile
+    ln -sf /var/guix/profiles/per-user/root/guix-profile /root/.guix-profile
 
-    GUIX_PROFILE="${HOME}/.guix-profile"
+    GUIX_PROFILE="/root/.guix-profile"
     source "${GUIX_PROFILE}/etc/profile"
     _msg "${PAS}activated root profile at /root/.guix-profile"
 }
-- 
2.14.1


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

* Re: bug#30728: Modification for guix installation script.
  2018-03-26 12:59     ` Clément Lassieur
@ 2018-03-26 16:09       ` Tatiana Sholokhova
  2018-03-29  8:24         ` Clément Lassieur
  2018-03-26 16:09       ` Tatiana Sholokhova
  1 sibling, 1 reply; 20+ messages in thread
From: Tatiana Sholokhova @ 2018-03-26 16:09 UTC (permalink / raw)
  To: Clément Lassieur; +Cc: guix-devel, 30728


[-- Attachment #1.1: Type: text/plain, Size: 1123 bytes --]

Hello!

Could you please make that change on top of the current version of the
> Guix sources as a git commit?  Then you can run “git format-patch -1” to
> format it as a patch in a format that we can apply.  You can send the
> resulting patch file as an attachment to a reply to this email.
> This also fixes bug #30728, so please add this line to the commit
> message:
> --
> Ricardo


I have attached the patch file to this email. This patch fixes the
installation process but it place guix within root's directory.

I personally prefer that the Guix daemon points to my home directory
> because I don't want to update root's profile.  Some other people might
> prefer that it points to ~root because they might later delete their
> profile and want Guix to keep working.


> Do we have to take a decision here?  Can't we just let the user decide
> by letting them customize their environment variables?  I think it is
> the point of environment variables: giving freedom to users.


We can further work on the script's flexibility using the environment
variable solution.

--
Tatiana

[-- Attachment #1.2: Type: text/html, Size: 12878 bytes --]

[-- Attachment #2: 0001-Fixes-https-debbugs.gnu.org-30728.patch --]
[-- Type: text/x-patch, Size: 904 bytes --]

From f286b6e9c60cba54f3da68428fc034d272ba5ffc Mon Sep 17 00:00:00 2001
From: tsholokhova <tanja201396@gmail.com>
Date: Mon, 26 Mar 2018 18:59:40 +0300
Subject: [PATCH] Fixes <https://debbugs.gnu.org/30728>

---
 etc/guix-install.sh | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index 933492a33..b4a9cdf94 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -263,10 +263,9 @@ sys_create_store()
     fi
 
     _msg "${INF}Linking the root user's profile"
-    ln -sf /var/guix/profiles/per-user/root/guix-profile \
-       ~root/.guix-profile
+    ln -sf /var/guix/profiles/per-user/root/guix-profile /root/.guix-profile
 
-    GUIX_PROFILE="${HOME}/.guix-profile"
+    GUIX_PROFILE="/root/.guix-profile"
     source "${GUIX_PROFILE}/etc/profile"
     _msg "${PAS}activated root profile at /root/.guix-profile"
 }
-- 
2.14.1


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

* bug#30728: Modification for guix installation script.
  2018-03-26  9:11   ` bug#30728: " Ricardo Wurmus
  2018-03-26 12:59     ` Clément Lassieur
  2018-03-26 12:59     ` Clément Lassieur
@ 2018-03-27 11:53     ` Gábor Boskovits
  2018-03-27 11:53     ` Gábor Boskovits
  3 siblings, 0 replies; 20+ messages in thread
From: Gábor Boskovits @ 2018-03-27 11:53 UTC (permalink / raw)
  To: Ricardo Wurmus
  Cc: Guix-devel, 30728, Clément Lassieur, Tatiana Sholokhova

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

2018-03-26 11:11 GMT+02:00 Ricardo Wurmus <rekado@elephly.net>:

>
> Hi Clément,
>
> > As I said to Chris (Cc'ed), I don't think it's a good idea to install
> > Guix in root's home directory.  Instead, we should probably honor the
> > USER and HOME environment variables, so that the command can be run as a
> > non-root user (with sudo) in a consistent way.  What do you think?
>
> The script should be run as root as it follows the manual’s
> instructions, which tell people to install Guix for the root user and
> then make it available system-wide.
>
> This is why I think that it would be correct to install it to the root’s
> home directory and not to the sudoing user’s HOME.
>
> Or am I missing something?
>
>
I think Ricardo is right on this one. I would also recommend installing in
root's home directory. Ibelieve, that installing in a user home would make
sense only with a big amount of additional instrumentation and
documentation changes, along with arrangements to allow guix in
userspace. This is a straightforward way to make the script do what it's
purpose is.


> --
> Ricardo
>
> GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
> https://elephly.net
>
>
>
>

[-- Attachment #2: Type: text/html, Size: 1991 bytes --]

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

* Re: Modification for guix installation script.
  2018-03-26  9:11   ` bug#30728: " Ricardo Wurmus
                       ` (2 preceding siblings ...)
  2018-03-27 11:53     ` Gábor Boskovits
@ 2018-03-27 11:53     ` Gábor Boskovits
  2018-03-29  8:11       ` Clément Lassieur
  2018-03-29  8:11       ` bug#30728: " Clément Lassieur
  3 siblings, 2 replies; 20+ messages in thread
From: Gábor Boskovits @ 2018-03-27 11:53 UTC (permalink / raw)
  To: Ricardo Wurmus
  Cc: Guix-devel, 30728, Clément Lassieur, Tatiana Sholokhova

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

2018-03-26 11:11 GMT+02:00 Ricardo Wurmus <rekado@elephly.net>:

>
> Hi Clément,
>
> > As I said to Chris (Cc'ed), I don't think it's a good idea to install
> > Guix in root's home directory.  Instead, we should probably honor the
> > USER and HOME environment variables, so that the command can be run as a
> > non-root user (with sudo) in a consistent way.  What do you think?
>
> The script should be run as root as it follows the manual’s
> instructions, which tell people to install Guix for the root user and
> then make it available system-wide.
>
> This is why I think that it would be correct to install it to the root’s
> home directory and not to the sudoing user’s HOME.
>
> Or am I missing something?
>
>
I think Ricardo is right on this one. I would also recommend installing in
root's home directory. Ibelieve, that installing in a user home would make
sense only with a big amount of additional instrumentation and
documentation changes, along with arrangements to allow guix in
userspace. This is a straightforward way to make the script do what it's
purpose is.


> --
> Ricardo
>
> GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
> https://elephly.net
>
>
>
>

[-- Attachment #2: Type: text/html, Size: 1991 bytes --]

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

* bug#30728: Modification for guix installation script.
  2018-03-27 11:53     ` Gábor Boskovits
  2018-03-29  8:11       ` Clément Lassieur
@ 2018-03-29  8:11       ` Clément Lassieur
  1 sibling, 0 replies; 20+ messages in thread
From: Clément Lassieur @ 2018-03-29  8:11 UTC (permalink / raw)
  To: Gábor Boskovits; +Cc: Guix-devel, 30728, Tatiana Sholokhova

Gábor Boskovits <boskovits@gmail.com> writes:

> 2018-03-26 11:11 GMT+02:00 Ricardo Wurmus <rekado@elephly.net>:
>
>>
>> Hi Clément,
>>
>> > As I said to Chris (Cc'ed), I don't think it's a good idea to install
>> > Guix in root's home directory.  Instead, we should probably honor the
>> > USER and HOME environment variables, so that the command can be run as a
>> > non-root user (with sudo) in a consistent way.  What do you think?
>>
>> The script should be run as root as it follows the manual’s
>> instructions, which tell people to install Guix for the root user and
>> then make it available system-wide.
>>
>> This is why I think that it would be correct to install it to the root’s
>> home directory and not to the sudoing user’s HOME.
>>
>> Or am I missing something?
>>
>>
> I think Ricardo is right on this one. I would also recommend installing in
> root's home directory.

But you don't explain why.  And "as it follows the manual's
instructions" isn't a good reason to me.

> I believe, that installing in a user home would make sense only with a
> big amount of additional instrumentation and documentation changes,
> along with arrangements to allow guix in userspace.

I think it would be fairly easy.  The kind of edit we do all the time
when patches are being reviewed.

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

* Re: Modification for guix installation script.
  2018-03-27 11:53     ` Gábor Boskovits
@ 2018-03-29  8:11       ` Clément Lassieur
  2018-03-29  8:11       ` bug#30728: " Clément Lassieur
  1 sibling, 0 replies; 20+ messages in thread
From: Clément Lassieur @ 2018-03-29  8:11 UTC (permalink / raw)
  To: Gábor Boskovits; +Cc: Guix-devel, 30728, Tatiana Sholokhova

Gábor Boskovits <boskovits@gmail.com> writes:

> 2018-03-26 11:11 GMT+02:00 Ricardo Wurmus <rekado@elephly.net>:
>
>>
>> Hi Clément,
>>
>> > As I said to Chris (Cc'ed), I don't think it's a good idea to install
>> > Guix in root's home directory.  Instead, we should probably honor the
>> > USER and HOME environment variables, so that the command can be run as a
>> > non-root user (with sudo) in a consistent way.  What do you think?
>>
>> The script should be run as root as it follows the manual’s
>> instructions, which tell people to install Guix for the root user and
>> then make it available system-wide.
>>
>> This is why I think that it would be correct to install it to the root’s
>> home directory and not to the sudoing user’s HOME.
>>
>> Or am I missing something?
>>
>>
> I think Ricardo is right on this one. I would also recommend installing in
> root's home directory.

But you don't explain why.  And "as it follows the manual's
instructions" isn't a good reason to me.

> I believe, that installing in a user home would make sense only with a
> big amount of additional instrumentation and documentation changes,
> along with arrangements to allow guix in userspace.

I think it would be fairly easy.  The kind of edit we do all the time
when patches are being reviewed.

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

* bug#30728: Modification for guix installation script.
  2018-03-26 16:09       ` Tatiana Sholokhova
@ 2018-03-29  8:24         ` Clément Lassieur
  0 siblings, 0 replies; 20+ messages in thread
From: Clément Lassieur @ 2018-03-29  8:24 UTC (permalink / raw)
  To: Tatiana Sholokhova; +Cc: guix-devel, 30728

Hi Tatiana,

Tatiana Sholokhova <tanja201396@gmail.com> writes:

> Hello!
>
>
>     Could you please make that change on top of the current version of the
>     Guix sources as a git commit? Then you can run “git format-patch -1” to
>     format it as a patch in a format that we can apply. You can send the
>     resulting patch file as an attachment to a reply to this email.
>     This also fixes bug #30728, so please add this line to the commit
>     message:
>     --
>     Ricardo
>
>
> I have attached the patch file to this email. This patch fixes the installation
> process but it placeguixwithin root's directory.
>
>
>     I personally prefer that the Guix daemon points to my home directory
>     because I don't want to update root's profile. Some other people might
>     prefer that it points to ~root because they might later delete their
>     profile and want Guix to keep working.
>
>
>     Do we have to take a decision here? Can't we just let the user decide
>     by letting them customize their environment variables? I think it is
>     the point of environment variables: giving freedom to users.
>
>
> We can further work on the script's flexibility using the environment variable
> solution.

Thank you for your patch.  The one Chris did has been pushed, but if you
want, you can still work on improving the script's flexibility.  I still
haven't seen any valid argument for or against it, though, so I don't
know if it's a good idea.  Maybe we can wait until someone says
something about it!

Clément

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

end of thread, other threads:[~2018-03-29  8:25 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-24  9:04 Modification for guix installation script Tatiana Sholokhova
2018-03-24 16:46 ` Vincent Legoll
2018-03-24 17:00   ` Tatiana Sholokhova
2018-03-24 17:05     ` Vincent Legoll
2018-03-24 21:26       ` Tatiana Sholokhova
2018-03-25 15:26 ` bug#30728: " Ricardo Wurmus
2018-03-25 18:57   ` Mark H Weaver
2018-03-25 18:57   ` bug#30728: " Mark H Weaver
2018-03-26  8:27 ` Clément Lassieur
2018-03-26  9:11   ` bug#30728: " Ricardo Wurmus
2018-03-26 12:59     ` Clément Lassieur
2018-03-26 12:59     ` Clément Lassieur
2018-03-26 16:09       ` Tatiana Sholokhova
2018-03-29  8:24         ` Clément Lassieur
2018-03-26 16:09       ` Tatiana Sholokhova
2018-03-27 11:53     ` Gábor Boskovits
2018-03-27 11:53     ` Gábor Boskovits
2018-03-29  8:11       ` Clément Lassieur
2018-03-29  8:11       ` bug#30728: " Clément Lassieur
2018-03-26  8:27 ` Clément Lassieur

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.