* 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 16:09 ` Tatiana Sholokhova
2018-03-26 16:09 ` Tatiana Sholokhova
2018-03-26 12:59 ` Clément Lassieur
` (2 subsequent siblings)
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-26 16:09 ` Tatiana Sholokhova
2018-03-29 8:24 ` Clément Lassieur
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 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
* 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: 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 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 ` bug#30728: " Clément Lassieur
2018-03-29 8:11 ` 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 ` bug#30728: " 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