From mboxrd@z Thu Jan 1 00:00:00 1970 From: ng0 Subject: bug#27386: offloading documentation and env Date: Wed, 28 Jun 2017 22:36:36 +0000 Message-ID: <20170628223636.h3k24txegftwmlmk@abyayala> References: <20170615223456.z5w2oaxifbah2ak2@abyayala> <87podq7cae.fsf@gnu.org> <20170626211511.ox5smekycmqz2vc3@abyayala> <87injh5z3h.fsf@gnu.org> <20170627145418.iq54zrhfzbr7vdtn@abyayala> <87d19p43wg.fsf@gnu.org> <20170627203136.rvl4dr6d3byzjein@abyayala> <8737ak1pji.fsf@gnu.org> <20170628114530.ca43xv4guqoa4mtv@abyayala> <87k23vzsyb.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="qbi6w4hejczb3v4i" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39602) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dQLa5-0001OT-NT for bug-guix@gnu.org; Wed, 28 Jun 2017 18:37:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dQLa2-0004xL-H5 for bug-guix@gnu.org; Wed, 28 Jun 2017 18:37:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:40419) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dQLa2-0004xC-Cm for bug-guix@gnu.org; Wed, 28 Jun 2017 18:37:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dQLa1-0007qd-Ka for bug-guix@gnu.org; Wed, 28 Jun 2017 18:37:01 -0400 Sender: "Debbugs-submit" Resent-Message-ID: Content-Disposition: inline In-Reply-To: <87k23vzsyb.fsf@gnu.org> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 27386@debbugs.gnu.org --qbi6w4hejczb3v4i Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s transcribed 2.2K bytes: > ng0 skribis: >=20 > > 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=3D'\u@\h \w [env]\$ ' > > else > > PS1=3D'\u@\h \w\$ ' > > fi > > source ~/.guix-profile/etc/profile > > alias ls=3D'ls -p --color' > > alias ll=3D'ls -l' > > GUILE_LOAD_COMPILED_PATH=3D"${GUILE_LOAD_COMPILED_PATH}:/run/current-sy= stem/profile/lib/guile/2.2/site-ccache:/run/current-system/profile/share/gu= ile/site/2.2" > > GUILE_LOAD_PATH=3D"${GUILE_LOAD_PATH}:/run/current-system/profile/share= /guile/site/2.2" >=20 > 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=E2=80=99re 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 . export MANPATH=3D$HOME/.guix-profile/share/man:/run/current-system/profile/= share/man export INFOPATH=3D$HOME/.guix-profile/share/info:/run/current-system/profil= e/share/info export XDG_DATA_DIRS=3D$HOME/.guix-profile/share:/run/current-system/profil= e/share export XDG_CONFIG_DIRS=3D$HOME/.guix-profile/etc/xdg:/run/current-system/pr= ofile/etc/xdg # Ignore the default value of 'PATH'. unset PATH # Load the system profile's settings. GUIX_PROFILE=3D/run/current-system/profile \ =2E /run/current-system/profile/etc/profile # Prepend setuid programs. export PATH=3D/run/setuid-programs:$PATH # Since 'lshd' does not use pam_env, /etc/environment must be explicitly # loaded when someone logs in via SSH. See . # 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=3D -f1` fi if [ -f "$HOME/.guix-profile/etc/profile" ] then # Load the user profile's settings. GUIX_PROFILE=3D"$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=3D"$HOME/.guix-profile/bin:$PATH" fi # Set the umask, notably for users logging in via 'lsh'. # See . umask 022 # Allow GStreamer-based applications to find plugins. export GST_PLUGIN_PATH=3D"$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: >=20 > --8<---------------cut here---------------start------------->8--- > $ guix package -I gui -p /run/current-system/profile > guix 0.13.0-2.de9d8f0 out /gnu/store/js4ml3w20ysh4znp9wl0da0ljji4kisl-gui= x-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/serve= rs/pragmatique/shadownet.scm > Anyway, if you have ideas on how to improve the doc, they=E2=80=99re welc= ome. >=20 > Thanks for your feedback! >=20 > Ludo=E2=80=99. --=20 ng0 GnuPG: A88C8ADD129828D7EAC02E52E22F9BBFEE348588 GnuPG: https://n0is.noblogs.org/my-keys infotropique: https://www.infotropique.org --qbi6w4hejczb3v4i Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEqIyK3RKYKNfqwC5S4i+bv+40hYgFAllUL3QACgkQ4i+bv+40 hYjs8RAAusuOZpAxFjuxPgCoQ94f7JJDUQGexjvFYcsQimGRB4bVOt9rjDO3LNXm PiL4o6t+bJw/cp9TEbaz/Z83IG/dyt4tp9LGnTKyaCIaaT0QsKe3UfJfdruk4BKK YI23aQsx5+uHexONTdvZScs4jLjmMmKXBXrkvlHwPhEwyho/TPLuc05Dru32B/0D qndmBk1yXUdVefrK+kVrArRHf6LAzI0ofs47HDAPRF/pdYCjTjFi1+cOs/6ifXM3 YPFtzhxRveZpyqU/tikcUYXH1byCXqce8tVcJ+QBtdloJjLM5f1mWhP3FGjZjkaX fiDfg2GTjOLwvuxzVfrpFOhj+OeXzVyBHBfIAxm/KQUOLEqeXd5TL9yKQxYIam9h XTb++wOpFJvzX3PdP+Xy1zKPtPZYqBV9U6eRIs8Y1qWu9jzR2JpObgx4tmqEiegO BU3f68pgQmdbwYk0MWlnkbF+Uz9GFRxDSQnyG9CzVlr3r60Q8MD8wVmaUy6H4n+B utII+cwHJxmnxzYhU0pefEHC8m55H+Jt7UEJE4ut1iLCpwZEklBtF/0jUPizkZTR LNRBXxIw35CyqifmMLXVqBIUTHI/DI9IuJO6CCFdnBxrOOGeCQfcSjYpRPbGBh/y oj/8ao8vhrWh3dv/6luZNHm1CAGWYMxqGqJN1cc7ToTUXh8iyBE= =OFo/ -----END PGP SIGNATURE----- --qbi6w4hejczb3v4i--