unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: ng0 <ng0@infotropique.org>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 27386@debbugs.gnu.org
Subject: bug#27386: offloading documentation and env
Date: Wed, 28 Jun 2017 22:36:36 +0000	[thread overview]
Message-ID: <20170628223636.h3k24txegftwmlmk@abyayala> (raw)
In-Reply-To: <87k23vzsyb.fsf@gnu.org>

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

Ludovic Courtès transcribed 2.2K bytes:
> ng0 <ng0@infotropique.org> skribis:
> 
> > I think the method as described never really worked.
> >
> > When I do as you (and the manual) suggested, I no longer
> > have any results for ssh host env | grep "GUILE_".
> >
> > When I extend it like this it works. I include the full
> > paste to show that previously I had the sourcing of /etc/profile
> > in it:
> >
> > user@shadownet ~$ cat .bashrc
> > # Bash initialization for interactive non-login shells and
> > # for remote shells (info "(bash) Bash Startup Files").
> >
> > # Export 'SHELL' to child processes.  Programs such as 'screen'
> > # honor it and otherwise use /bin/sh.
> > export SHELL
> >
> > if [ -n "$SSH_CLIENT" -a -z "`type -P cat`" ]
> > then
> >     # We are being invoked from a non-interactive SSH session
> >     # (as in "ssh host command") but 'cat' cannot be found
> >     # in $PATH.  Source /etc/profile so we get $PATH and other
> >     # essential variables.
> >     source /etc/profile
> > fi
> >
> > # Adjust the prompt depending on whether we're in 'guix environment'.
> > if [ -n "$GUIX_ENVIRONMENT" ]
> > then
> >     PS1='\u@\h \w [env]\$ '
> > else
> >     PS1='\u@\h \w\$ '
> > fi
> > source ~/.guix-profile/etc/profile
> > alias ls='ls -p --color'
> > alias ll='ls -l'
> > GUILE_LOAD_COMPILED_PATH="${GUILE_LOAD_COMPILED_PATH}:/run/current-system/profile/lib/guile/2.2/site-ccache:/run/current-system/profile/share/guile/site/2.2"
> > GUILE_LOAD_PATH="${GUILE_LOAD_PATH}:/run/current-system/profile/share/guile/site/2.2"
> 
> The difference compared to /etc/skel/.bashrc is the last two lines,
> right?

Yes. And that I source ~/.guix-profile/etc/profile before those lines.

> On my GuixSD installation they’re not needed because /etc/profile
> sources /run/current-system/profile/etc/profile, which already defines
> these two variables.

Well this file is the same on both systems involved:

user@abyayala ~$ cat /etc/profile
# Crucial variables that could be missing in the profiles' 'etc/profile'
# because they would require combining both profiles.
# FIXME: See <http://bugs.gnu.org/20255>.
export MANPATH=$HOME/.guix-profile/share/man:/run/current-system/profile/share/man
export INFOPATH=$HOME/.guix-profile/share/info:/run/current-system/profile/share/info
export XDG_DATA_DIRS=$HOME/.guix-profile/share:/run/current-system/profile/share
export XDG_CONFIG_DIRS=$HOME/.guix-profile/etc/xdg:/run/current-system/profile/etc/xdg

# Ignore the default value of 'PATH'.
unset PATH

# Load the system profile's settings.
GUIX_PROFILE=/run/current-system/profile \
. /run/current-system/profile/etc/profile

# Prepend setuid programs.
export PATH=/run/setuid-programs:$PATH

# Since 'lshd' does not use pam_env, /etc/environment must be explicitly
# loaded when someone logs in via SSH.  See <http://bugs.gnu.org/22175>.
# We need 'PATH' to be defined here, for 'cat' and 'cut'.  Do this before
# reading the user's 'etc/profile' to allow variables to be overridden.
if [ -f /etc/environment -a -n "$SSH_CLIENT" \
     -a -z "$LINUX_MODULE_DIRECTORY" ]
then
  . /etc/environment
  export `cat /etc/environment | cut -d= -f1`
fi

if [ -f "$HOME/.guix-profile/etc/profile" ]
then
  # Load the user profile's settings.
  GUIX_PROFILE="$HOME/.guix-profile" \
  . "$HOME/.guix-profile/etc/profile"
else
  # At least define this one so that basic things just work
  # when the user installs their first package.
  export PATH="$HOME/.guix-profile/bin:$PATH"
fi

# Set the umask, notably for users logging in via 'lsh'.
# See <http://bugs.gnu.org/22650>.
umask 022

# Allow GStreamer-based applications to find plugins.
export GST_PLUGIN_PATH="$HOME/.guix-profile/lib/gstreamer-1.0"

if [ -n "$BASH_VERSION" -a -f /etc/bashrc ]
then
  # Load Bash-specific initialization code.
  . /etc/bashrc
fi


> But maybe your global profile is slightly different from mine, which
> would explain this.  FWIW I have:
> 
> --8<---------------cut here---------------start------------->8---
> $ guix package -I gui -p /run/current-system/profile
> guix	0.13.0-2.de9d8f0	out	/gnu/store/js4ml3w20ysh4znp9wl0da0ljji4kisl-guix-0.13.0-2.de9d8f0
> guile	2.2.2	out	/gnu/store/5zx29y44nrqj0s8h3jlvlj82k8hj4dxs-guile-2.2.2
> --8<---------------cut here---------------end--------------->8---

user@shadownet ~$ guix package -I gui -p /run/current-system/profile
guix	0.13.0-2.de9d8f0	out	/gnu/store/nrd0v38d61l8y16vqkb1gws0bw45q885-guix-0.13.0-2.de9d8f0
guile	2.2.2	out	/gnu/store/1pzfigry5bnh3n146w0ib77vkd2g6jdc-guile-2.2.2

So it is not different.
The system in use is this: https://gitlab.com/ng0/systems/blob/master/servers/pragmatique/shadownet.scm

> Anyway, if you have ideas on how to improve the doc, they’re welcome.
> 
> Thanks for your feedback!
> 
> Ludo’.
-- 
ng0
GnuPG: A88C8ADD129828D7EAC02E52E22F9BBFEE348588
GnuPG: https://n0is.noblogs.org/my-keys
infotropique: https://www.infotropique.org

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2017-06-28 22:37 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-15 17:05 bug#27386: offloading documentation and env ng0
2017-06-15 21:11 ` ng0
2017-06-15 22:19   ` ng0
2017-06-15 22:34     ` ng0
2017-06-26 19:56       ` Ludovic Courtès
2017-06-26 21:15         ` ng0
2017-06-27 13:39           ` Ludovic Courtès
2017-06-27 14:54             ` ng0
2017-06-27 19:38               ` Ludovic Courtès
2017-06-27 20:31                 ` ng0
2017-06-28  8:31                   ` Ludovic Courtès
2017-06-28 11:45                     ` ng0
2017-06-28 21:46                       ` Ludovic Courtès
2017-06-28 22:36                         ` ng0 [this message]
2017-06-29 11:50                           ` Ludovic Courtès
2017-07-04 13:51                             ` Oleg Pykhalov
2017-07-04 15:43                               ` Oleg Pykhalov
2017-07-04 16:02                                 ` Oleg Pykhalov
2017-07-04 21:36                               ` Ludovic Courtès
2017-07-05 17:06                                 ` Oleg Pykhalov
2017-07-06  7:33                                   ` Ludovic Courtès
2017-07-06 13:15                                     ` Oleg Pykhalov
2017-07-07 10:00                                       ` Ludovic Courtès
     [not found]                                         ` <871spsginl.fsf@clover.i-did-not-set--mail-host-address--so-tickle-me>
2017-07-08 16:33                                           ` bug#27386: [SOLVED] " Ludovic Courtès
2017-09-28 19:40             ` Divan Santana
2017-09-28 19:44               ` Divan Santana
2017-09-29  7:49               ` Ludovic Courtès
2017-09-29 17:02                 ` Ricardo Wurmus
2017-09-29 19:35                   ` Divan Santana
2017-09-29 19:33                 ` Divan Santana

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170628223636.h3k24txegftwmlmk@abyayala \
    --to=ng0@infotropique.org \
    --cc=27386@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).