guix-install.sh should do more first-time setup

  • Done
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • zimoun
Owner
unassigned
Submitted by
Ludovic Courtès
Severity
important
L
L
Ludovic Courtès wrote on 1 Oct 2020 14:34
(address . bug-guix@gnu.org)
87362yt99e.fsf@gnu.org
Hello!

One of the things we can do to provide a better first-time experience on
a foreign distro is to automatically do some of the things that make
Guix readily usable and convenient, even for someone who skips the
“Application Setup” section of the manual. Things that come to mind:

1. Installing Bash and Zsh completion files globally (actually making
them a symlink to
/var/guix/profiles/per-user/root/current-guix/etc/…).
There seems to be +/- a cross-distro conventional directory to
collect those, for example /etc/bash_completion.d, no? The script
could create that symlink, perhaps asking the user to confirm.

2. Adding the following lines to /etc/profile (taken from Guix System):

Toggle snippet (16 lines)
# Arrange so that ~/.config/guix/current comes first.
for profile in "$HOME/.guix-profile" "$HOME/.config/guix/current"
do
if [ -f "$profile/etc/profile" ]
then
# Load the user profile's settings.
GUIX_PROFILE="$profile" ; \
. "$profile/etc/profile"
else
# At least define this one so that basic things just work
# when the user installs their first package.
export PATH="$profile/bin:$PATH"
fi
done

The user should be explicitly asked whether they want this change
to be made.

3. It could check “ps aux | grep nscd” and install nscd using the host
distro package manager if needed, or at least suggest doing it.

Any takers? :-)

Thanks,
Ludo’.
L
L
Ludovic Courtès wrote on 2 Oct 2020 09:33
control message for bug #43744
(address . control@debbugs.gnu.org)
87tuvdkrpm.fsf@gnu.org
severity 43744 important
quit
Z
Z
zimoun wrote on 2 Oct 2020 19:41
Re: bug#43744: guix-install.sh should do more first-time setup
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 43744@debbugs.gnu.org)
CAJ3okZ1t0vXWKFXg0s3C6=vwRwVtUcn9-pku8+CwcDp+tiCmbQ@mail.gmail.com
Hi,

On Thu, 1 Oct 2020 at 14:35, Ludovic Courtès <ludo@gnu.org> wrote:

Toggle quote (7 lines)
> 1. Installing Bash and Zsh completion files globally (actually making
> them a symlink to
> /var/guix/profiles/per-user/root/current-guix/etc/…).
> There seems to be +/- a cross-distro conventional directory to
> collect those, for example /etc/bash_completion.d, no? The script
> could create that symlink, perhaps asking the user to confirm.

Done in patch 1/2 #43769 [1].


Toggle quote (19 lines)
> 2. Adding the following lines to /etc/profile (taken from Guix System):
>
> --8<---------------cut here---------------start------------->8---
> # Arrange so that ~/.config/guix/current comes first.
> for profile in "$HOME/.guix-profile" "$HOME/.config/guix/current"
> do
> if [ -f "$profile/etc/profile" ]
> then
> # Load the user profile's settings.
> GUIX_PROFILE="$profile" ; \
> . "$profile/etc/profile"
> else
> # At least define this one so that basic things just work
> # when the user installs their first package.
> export PATH="$profile/bin:$PATH"
> fi
> done
> --8<---------------cut here---------------end--------------->8---

Hum? It looks like 'sys_create_init_profile'. I have not checked the
current order but maybe that's only that.


Toggle quote (3 lines)
> The user should be explicitly asked whether they want this change
> to be made.

Currently, 'sys_create_init_profile' is simply run without asking.


Toggle quote (3 lines)
> 3. It could check “ps aux | grep nscd” and install nscd using the host
> distro package manager if needed, or at least suggest doing it.

Done in patch 2/2 #43769 [1].



All the best,
simon
Z
Z
zimoun wrote on 21 Oct 2020 19:34
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 43744-done@debbugs.gnu.org)
871rhrfppg.fsf@gmail.com
Dear,

On Thu, 01 Oct 2020 at 14:34, Ludovic Courtès <ludo@gnu.org> wrote:

Toggle quote (12 lines)
> One of the things we can do to provide a better first-time experience on
> a foreign distro is to automatically do some of the things that make
> Guix readily usable and convenient, even for someone who skips the
> “Application Setup” section of the manual. Things that come to mind:
>
> 1. Installing Bash and Zsh completion files globally (actually making
> them a symlink to
> /var/guix/profiles/per-user/root/current-guix/etc/…).
> There seems to be +/- a cross-distro conventional directory to
> collect those, for example /etc/bash_completion.d, no? The script
> could create that symlink, perhaps asking the user to confirm.

Done in b3fba5ef043b161d05a9fdc371a32d89e9b22ea1.


Toggle quote (20 lines)
> 2. Adding the following lines to /etc/profile (taken from Guix System):
>
> # Arrange so that ~/.config/guix/current comes first.
> for profile in "$HOME/.guix-profile" "$HOME/.config/guix/current"
> do
> if [ -f "$profile/etc/profile" ]
> then
> # Load the user profile's settings.
> GUIX_PROFILE="$profile" ; \
> . "$profile/etc/profile"
> else
> # At least define this one so that basic things just work
> # when the user installs their first package.
> export PATH="$profile/bin:$PATH"
> fi
> done
>
> The user should be explicitly asked whether they want this change
> to be made.

Nothing to done.


Toggle quote (3 lines)
> 3. It could check “ps aux | grep nscd” and install nscd using the host
> distro package manager if needed, or at least suggest doing it.

Done in b2683a2bed424f58722c9c17c9582e3e2e19d9a3.


So closing!
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 43744@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 43744
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch