all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#37249: console shell upon login is not ~/.guix-profile/bash -- is this always/never ok?
@ 2019-08-31 22:21 Bengt Richter
  2019-09-07  8:50 ` 宋文武
  2019-09-10  7:00 ` Efraim Flashner
  0 siblings, 2 replies; 4+ messages in thread
From: Bengt Richter @ 2019-08-31 22:21 UTC (permalink / raw)
  To: 37249

Hello,

In the pursuit of causes for problems as yet not clear enough to
post as bugs, I am looking for ambivalences in name searches
in /gnu/... and /(the-rest).

The first is immediately bash:
To duplicate, log into a fresh console and look at what's running
and invoked. I did an Alt-F4 and logged in fresh, and captured the
terminal screen seen in the following:

---------8<---------

[ ... snip some output from .bash_profile ... ]

[13:33 ~/bs]$ ps -o pid,tty,args
  PID TT       COMMAND
25500 tty4     -bash
25966 tty4     ps -o pid,tty,args
[13:35 ~/bs]$ which -a ps
/usr/bin/ps
[13:35 ~/bs]$ file /proc/25500/exe
/proc/25500/exe: symbolic link to /usr/bin/bash

So, the shell I am talking to right after login is /usr/bin/bash,
but if I type bash, the guix version will be found first:

[13:36 ~/bs]$ which -a bash
/home/bokr/.guix-profile/bin/bash
/usr/bin/bash
[13:38 ~/bs]$ which -a bash|xargs readlink -f
/gnu/store/qn1ax1fkj16x280m1rv7mcimfmn9l2pf-bash-4.4.23/bin/bash
/usr/bin/bash

So, nesting into the guix one,

[13:39 ~/bs]$ bash
[13:39 ~/bs]$ ps -o pid,tty,args
  PID TT       COMMAND
25500 tty4     -bash
26226 tty4     bash
26253 tty4     ps -o pid,tty,args
[13:40 ~/bs]$ file /proc/26226/exe
/proc/26226/exe: symbolic link to /gnu/store/qn1ax1fkj16x280m1rv7mcimfmn9l2pf-bash-4.4.23/bin/bash

Indeed our current pid belongs to guix bash.
What is the difference? They were built differently...

[13:41 ~/bs]$
[13:42 ~/bs]$ which -a bash
/home/bokr/.guix-profile/bin/bash
/usr/bin/bash
[13:43 ~/bs]$ which -a bash|xargs readlink -f|while read line;do echo -ne "$line:\n    "; file "$line";done
/gnu/store/qn1ax1fkj16x280m1rv7mcimfmn9l2pf-bash-4.4.23/bin/bash:
    /gnu/store/qn1ax1fkj16x280m1rv7mcimfmn9l2pf-bash-4.4.23/bin/bash:
    ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter
    /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/lib/ld-linux-x86-64.so.2,
    for GNU/Linux 2.6.32, not stripped
/usr/bin/bash:
    /usr/bin/bash: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked,
    interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=21a51cb5f7d727370e4d8099d283d7cd20222571,
    for GNU/Linux 3.2.0, stripped

Are the differences possibly dangerous?

The way I got the above, and this tail part itself:
[13:45 ~/bs]$ tty
/dev/tty4
[13:47 ~/bs]$ su -c 'setterm -file login-bashes.txt -dump 4'
------------------------------------

Looking for dependencies outside of /gnu from within /gnu, I grepped the whole
as you see below. I am sure most of this is fine and coming out of documentation
and stuff meant for other than normally booted runtime. But does it all look ok?

Or is my foreign-host twilight-zone shared ArchLinux/guix namespace really not
meant to be. I.e., is guix really defined to use /usr/ as a trusted base namespace
when it is defined by e.g. linux-libre in GuixSD ?

Where would be the best docs to read about the guix name and environment rationales?

Ok, here is the grep:
(most of the bashes are in the store, as seen at the bottom, but many not)
-------------------------------
This was generated by:
    grep -Ihr '^ *#!' /gnu|sort|uniq -c|sort -h > gnu-bin-hash-bangs.txt

      2       #!/bin/csh
      2 #!/bin/tcsh
      2 #!@GAWK@ -f
      2 #!/gnu/store/03n7p9g78ixkrmra674pkx2c9cx8fwmz-guile-1.8.8/bin/guile \
      2 #!/gnu/store/0xfmkqpi7xk3ixhrqvjijk4ibsglif62-python-3.7.0/bin/python3.7m
      2 #!/gnu/store/57daq0hkwvmwx4asiy669cmln868brfm-python2-2.7.15/bin/python2
      2 #!/gnu/store/9alic3caqhay3h8mx4iihpmyj6ymqpcx-guile-2.2.4/bin/guile
      2 #!/gnu/store/b7fqhszxl02g6pfm3vw6b3cjz472qrly-python-3.7.0/bin/python3.7m
      2 #!/gnu/store/cl42c73h609bp2gy92qkh8q56spnnl2n-python-3.7.0/bin/python3.7m
      2 #! /gnu/store/dna8kpb00kq176rz8x69yy4j33my2q55-perl-5.28.0/bin/perl
      2 #!/gnu/store/h8l1pby3cm6b4fxsfwwr65b4d1hyh6cs-python-3.7.0/bin/python3.7m
      2 #!/gnu/store/l67sib1ld0fgyf0f4vrzyxnmn4yvimvb-gawk-4.2.1/bin/gawk -f
      2 #!/gnu/store/qn1ax1fkj16x280m1rv7mcimfmn9l2pf-bash-4.4.23/bin/sh -
      2 #!/gnu/store/ybglr7nfs8v9kpnm8vf4drg3gafnvd15-guile-static-stripped-2.2.4/bin/guile --no-auto-compile
      2 #!/gnu/store/zm3188ipzi262s0m8bxm24br77yh9pd8-python-3.7.0/bin/python3
      2 #!/gnu/store/zm3188ipzi262s0m8bxm24br77yh9pd8-python-3.7.0/bin/python3.7m
      2 #!@GUILE@ -s
      2 #!@PHP@ -q
      2 #!@TCLSH@
      2 #! /usr/bin/perl
      2 #!/usr/bin/perl -- # -*- Perl -*-
      2  #! /usr/bin/perl -w
      2 #! /usr/bin/python
      2 #!/usr/bin/python -u
      2 #!@WISH@
      3 #!#{Gem.ruby}
      3 #!/gnu/store/81y6l9ggc5q6z44hp90ll4dv5jl582mq-texlive-bin-20180414/bin/texlua 
      3 #!/gnu/store/hw0cz0mis43z19i76pl6ijx5risx4lf0-texlive-bin-20180414/bin/texlua 
      3 #!/gnu/store/lgbiv7q1b6m141nrkjm92qkl9ih5gamw-python2-2.7.15/bin/python -O
      3 #!/gnu/store/pyrlmxqx3g1mhzpnfpw4w94rj08wxfhj-texlive-bin-20180414/bin/texlua 
      3 #!/gnu/store/x9c77i6r5fmarslij6ng81awgrxblplm-texlive-bin-20180414/bin/texlua 
      3 #!/gnu/store/xwzyy0q261brxmafkvinrrvkq4rgwiq6-texlive-bin-20180414/bin/texlua 
      3                    #!if(WithStride,".stride","")
      3                 #!if(WithStride,".stride","")
      3 #! libapr-1.so
      3  #!/usr/bin/env ruby
      4                 #! $key eq '-range'    and  $key .= 's';
      4             #! $pod_parser->select(@{ $opts{'-ranges'} })
      4 #!$^X -w
      4 #! at all.)
      4 #!/gnu/store/9jjnk994sg3kynx7w2p873x60yr27q1p-pulseaudio-12.2/bin/pulseaudio -nF
      4 #!/gnu/store/cwla78yg7vnngk51jp81j4phy2fpgbhm-pulseaudio-12.2/bin/pulseaudio -nF
      4 #!/gnu/store/glvv9jyp28f8454laig76agc3jig4f4z-pulseaudio-12.2/bin/pulseaudio -nF
      4 #!/gnu/store/gvwf71vddp8c1d7ydqg02p43mgdjrx6s-bash
      4 #!/gnu/store/qqfrzd5jrpq7i1gn9spv7hzpj4kllvj0-pulseaudio-12.2/bin/pulseaudio -nF
      4 #!/gnu/store/qsvja1gy86vrdkcqygkamg5j0sfq6ry4-pulseaudio-12.2/bin/pulseaudio -nF
      4 #!/gnu/store/s795jav4270x940spl48a885nhw4axnx-pulseaudio-12.2/bin/pulseaudio -nF
      4 #!/gnu/store/wsd8i4dy3vvkpfjlg5m1q5cy0b2ld95q-pulseaudio-12.2/bin/pulseaudio -nF
      4 #!/gnu/store/yw409j5hzvhgj54p2xxaqbh3bz9zfhpg-pulseaudio-12.2/bin/pulseaudio -nF
      4 #!/gnu/store/zvhp49cvslhjdv7n19nssv2kr2jqa87h-pulseaudio-12.2/bin/pulseaudio -nF
      4             #!     if ( (defined $opts{'-ranges'})
      4 #!include_default, #!include /Path/to/another/manifest.skip
      4 #! libaprutil-1.so
      4     #! /opt/perl5/bin/perl
      4   #!/path/to/a/custom_perl --some --args
      4    #!/path/to/jperl
      4    #!/path/to/perl -Mencoding=euc-jp
      4 #!/path/to/perl script invocation.  There is a PTF available from
      4     #! -*-perl-*-
      4   #!perl
      4 #! perl
      4 #!@PERL@
      4    #!perl -l
      4     #!perl -T
      4 #!./perl -w
      4 #!/pro/bin/perl
      4 #!/QOpenSys/perl/bin/perl should always work.
      4             #!          && ((ref $opts{'-ranges'}) eq 'ARRAY') );
      4             #! ## Select the desired paragraph ranges
      4   #!/usr/bin/env perl use lib qw( lib );      # Add ./lib to @INC
      4 #!/usr/bin/perl MakeMaker will change this to the path of the perl
      4     #!/usr/bin/perl -n
      4     #!/usr/bin/perl -pi.orig
      4     #!/usr/bin/perl -s
      4     #!/usr/bin/perl -spi.orig	# same as -s -p -i.orig
      4     #!/usr/bin/perl -T -w
      4     #!/usr/bin/perl  -w
      4   #!/usr/bin/perl -wl
      4     #!/usr/bin/perl -w -T
      4   #!/usr/bin/php 
      4 #! /usr/bin/sh
      4     #!/usr/local/bin/perl5.14
      4     #!/usr/local/bin/perl     # just a comment really
      4   #!/usr/local/perl-5.6/bin/perl -w
      4     #!/usr/locl/bin/perl
      5 #!/gnu/store/dna8kpb00kq176rz8x69yy4j33my2q55-perl-5.28.0/bin/perl -W
      5 #!/gnu/store/g87hamjyipk1j6dfq5pjfzfnfb64spbv-python2-2.7.15/bin/python -O
      5 #!/gnu/store/iqx98v4rnw26n4qn555l4pbj96navxiv-python2-2.7.15/bin/python -O
      5 #!/usr/bin/env python2
      6 #!2_]r;QWmr;HTnrVZTls&f@&'E.jlrVud)rr5ao!5AL4r;?NmrVlcos83-$s!e*NeGfI2rVud!
      6     #![allow(dead_code, unused_imports)]
      6 #! /bin/bash
      6   #!/bin/bash^^J%
      6         #!/bin/sh
      6 #!bQ7"8Gg6b3eoe>$R71>:0O.S=?1;7XQV?G"!XuWkieE.A([)Gb:<g^IbF&+pDD
      6 #!cslatex
      6 #! <fmtname> <enginename> <hyphen> <args>
      6 #!GaH0,lQdqUHRI!sXe9eQO3Ee^,L\eVF^Wbnu,aSH[**!_"<Pp=0tM"j#6E8hJM_"j#6E?QmeH
      6 #!/gnu/store/2k67pvrdq9hygg2ysgflk94jhbnc9s9g-tcsh-6.20.00/bin/csh
      6 #!/gnu/store/2k67pvrdq9hygg2ysgflk94jhbnc9s9g-tcsh-6.20.00/bin/csh -xv
      6 #!/gnu/store/dna8kpb00kq176rz8x69yy4j33my2q55-perl-5.28.0/bin/perl -n
      6 #!/gnu/store/dna8kpb00kq176rz8x69yy4j33my2q55-perl-5.28.0/bin/perl -p -i
      6 #!/gnu/store/dna8kpb00kq176rz8x69yy4j33my2q55-perl-5.28.0/bin/perl -p -i.bak
      6 #!/gnu/store/dna8kpb00kq176rz8x69yy4j33my2q55-perl-5.28.0/bin/perl -T
      6 #!/gnu/store/dna8kpb00kq176rz8x69yy4j33my2q55-perl-5.28.0/bin/perl -T -w
      6 #!/gnu/store/dna8kpb00kq176rz8x69yy4j33my2q55-perl-5.28.0/bin/perl -w
      6 #!/gnu/store/dna8kpb00kq176rz8x69yy4j33my2q55-perl-5.28.0/bin/perl -w 
      6 #!H!IX"''9Wa>D7VYA@E`L5suKOJFl<>^ul(bEXhP*HM"9Cbeu,BGMsN,"AdAt[@0
      6 #!*k<&fW2FrVus62#[IT!r2g.8PT6c"onDor;HKjrVQBcqo8O6&-;h3!XT9::G`Fa"TSNE1E60,
      6 #!Kmci!<<*"Z2t"+!g3]e!<<*"\cMj3"Hj)l!<<*"_?'];"d0#h!<<*"aoVPC#Ef
      6 #!kTb'N:-k+U6(!m^1q$6QNUqf%C$^9!K[Ab31,32$=gB!5?i/?h?%VXZd%RmtRZfZE*me2U0QZ'3/
      6 #!latex
      6 #! Map belleek.map
      6 #! Map mapname.map
      6 #! MixedMap mapname.map
      6 #!/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-glibc-2.18/bin/sh
      6 #!P5"q7-/;:!\TuP1=X[Q1lGL6k.rYpP!p4b6-X*ZAl;G!b8,cGrd14Q5D0jpXMON
      6 #!pdfcslatex
      6 #!pdflatex
      6 #! @PERL@ -w
      6 #!rF>2s`M\gb\?pQ[)lRMVXD7X%;@d6\M.@oPbQ)'8mjcqSsDGM79n2$XtTN<DZbi
      6 #!topic/comp.text.tex/o14P2e83o4A}{comp.text.tex} for a macro that will define commands and also save the commands being defined in a file or a container macro, \eg, for spelling exceptions on editors that don't support \tex syntax.
      6 #!UGlO1/(4)%t4-m<.kt,%uoHGtV4M7IFIlnDr.!2?[>P^t.[[P$W\[/V0J8eAS<P
      6 #! /usr/bin/env perl
      6 #!/usr/bin/env pfaedit
      6 #!/usr/bin/fontforge -lang=ff
      6 #!/usr/bin/fontforge -script
      6 #!/usr/bin/fontforge -script 
      6 #!/usr/local/bin/perl
      7 #!/gnu/store/lgbiv7q1b6m141nrkjm92qkl9ih5gamw-python2-2.7.15/bin/python2
      8 #!/gnu/store/81y6l9ggc5q6z44hp90ll4dv5jl582mq-texlive-bin-20180414/bin/texlua  
      8 #!/gnu/store/8z9avbgm73nzrbkhscps68gcpfipgllc-bootstrap-binaries-0/bin/bash
      8 #!/gnu/store/hw0cz0mis43z19i76pl6ijx5risx4lf0-texlive-bin-20180414/bin/texlua  
      8 #!/gnu/store/pyrlmxqx3g1mhzpnfpw4w94rj08wxfhj-texlive-bin-20180414/bin/texlua  
      8 #!/gnu/store/qn1ax1fkj16x280m1rv7mcimfmn9l2pf-bash-4.4.23/bin/sh
      8 #!/gnu/store/x9c77i6r5fmarslij6ng81awgrxblplm-texlive-bin-20180414/bin/texlua  
      8 #!/gnu/store/xwzyy0q261brxmafkvinrrvkq4rgwiq6-texlive-bin-20180414/bin/texlua  
      8 #!/gnu/store/zzakf905mzla4csi1dn9qpcwmgbxj29b-bash-static-4.4.23/bin/bash
      8 #!/gnu/store/zzakf905mzla4csi1dn9qpcwmgbxj29b-bash-static-4.4.23/bin/sh
      8  #!/usr/bin/perl -n
      8  #!/usr/bin/perl -Tw
      8     #!/usr/local/bin/perl
      8     #!/usr/local/bin/perl5.10.0
      8     #!/your/path/to/perl
     10 #!/gnu/store/0xfmkqpi7xk3ixhrqvjijk4ibsglif62-python-3.7.0/bin/python3
     10 #!/gnu/store/cl42c73h609bp2gy92qkh8q56spnnl2n-python-3.7.0/bin/python3
     10    #!/usr/bin/emacs --script
     11 #!/bin/sh -x
     11 #!!!!!!!!???  Check @pwd_log
     11 #!/gnu/store/g30znz9vwkvi23k41dgallfg85sj65hp-python-wrapper-3.7.0/bin/python
     11 #!/gnu/store/iqx98v4rnw26n4qn555l4pbj96navxiv-python2-2.7.15/bin/python2
     11 #!/usr/bin/emacs -script
     11 #! /usr/local/bin/python
     12        #!/bin/sh
     12   #! /bin/sh
     12 #! cont-fr pdftex cont-usr.tex -8bit *cont-fr.mkii
     12 #! cont-it pdftex cont-usr.tex -8bit *cont-it.mkii
     12 #! cont-nl pdftex cont-usr.tex -8bit *cont-nl.mkii
     12 #! cont-ro pdftex cont-usr.tex -8bit *cont-ro.mkii
     12 #!/gnu/store/dna8kpb00kq176rz8x69yy4j33my2q55-perl-5.28.0/bin/perl -n -s
     12 #!/gnu/store/l67sib1ld0fgyf0f4vrzyxnmn4yvimvb-gawk-4.2.1/bin/awk -f
     12 #!/gnu/store/q19l04vd2za80mk1845pz7r8cz29qk43-bash-minimal-4.4.23/bin/sh -vx
     12     #! Map belleek.map
     12 #! mflua mflua-nowin - mf.ini
     12  #!/usr/bin/env perl
     12 #!/usr/bin/fontforge
     12     #!/usr/bin/perl -Tw
     12 #!/usr/bin/python
     12 #!/usr/local/bin/fontforge
     12 #! /usr/local/bin/perl
     12     #!/usr/local/bin/perl -w
     13 #!/gnu/store/0xfmkqpi7xk3ixhrqvjijk4ibsglif62-python-3.7.0/bin/python3.7
     13 #!/gnu/store/b7fqhszxl02g6pfm3vw6b3cjz472qrly-python-3.7.0/bin/python3.7
     13 #!/gnu/store/cl42c73h609bp2gy92qkh8q56spnnl2n-python-3.7.0/bin/python3.7
     13 #!/gnu/store/g87hamjyipk1j6dfq5pjfzfnfb64spbv-python2-2.7.15/bin/python2
     13 #!/gnu/store/h8l1pby3cm6b4fxsfwwr65b4d1hyh6cs-python-3.7.0/bin/python3.7
     13 #!/gnu/store/zm3188ipzi262s0m8bxm24br77yh9pd8-python-3.7.0/bin/python3.7
     14 #!@EMACS@ --script
     14 #!/gnu/store/9alic3caqhay3h8mx4iihpmyj6ymqpcx-guile-2.2.4/bin/guile -ds
     14 #!/gnu/store/q19l04vd2za80mk1845pz7r8cz29qk43-bash-minimal-4.4.23/bin/sh -
     14 #!/gnu/store/q19l04vd2za80mk1845pz7r8cz29qk43-bash-minimal-4.4.23/bin/sh -x
     14 #!@GUILE@ \
     14 #!@GUILE@ -ds
     14     #! luajitlatex luajittex language.dat,language.dat.lua lualatex.ini
     16 #!$PERL
     16 #!/usr/local/bin/perl -w
     17 #!/gnu/store/3w3nz0h93h7jif9d9c3hdfyimgkpx1a4-python-wrapper-3.7.0/bin/python
     18 #!
     18 #!/gnu/store/dna8kpb00kq176rz8x69yy4j33my2q55-perl-5.28.0/bin/perl -s
     18 #! luajitlatex luajittex language.dat,language.dat.lua lualatex.ini
     18 #!./perl
     18           #!perl.exe (versions below 4)
     18 #!/usr/bin/env perl
     20 #! /gnu/store/q19l04vd2za80mk1845pz7r8cz29qk43-bash-minimal-4.4.23/bin/bash
     20  #!/usr/bin/perl -w
     21 #!/gnu/store/b7fqhszxl02g6pfm3vw6b3cjz472qrly-python-3.7.0/bin/python3
     22 #!/gnu/store/iqx98v4rnw26n4qn555l4pbj96navxiv-python2-2.7.15/bin/python2.7
     22 #!/usr/bin/env wish
     23 #!/gnu/store/r68bi4640vm0s7zsgyk7shsag8ibl3nc-python-wrapper-3.7.0/bin/python
     24 #!/bin/lua
     24 #!/usr/bin/lua
     24  #!/usr/bin/perl
     25 #!/gnu/store/57daq0hkwvmwx4asiy669cmln868brfm-python2-2.7.15/bin/python2.7
     25 #!perl -w
     28 #!/gnu/store/lgbiv7q1b6m141nrkjm92qkl9ih5gamw-python2-2.7.15/bin/python2.7
     28 #!perl
     29 #!/gnu/store/bs6bwq60sh3zamgiqmkyryf1lxbfjkgd-lua-5.3.5/bin/lua
     30  #![allow(dead_code, unused_variables)]
     30 #!/usr/bin/env python
     32     #!/usr/bin/env perl
     33 #!/gnu/store/dna8kpb00kq176rz8x69yy4j33my2q55-perl-5.28.0/bin/perl 
     35  #![allow(unused_variables)]
     35  #! /bin/sh -e
     35  #![feature(omit_gdb_pretty_printer_section)]
     36 #! $SHELL
     38 #!/gnu/store/@dots{}-guile-2.0.11/bin/guile -ds
     38 #!/gnu/store/g87hamjyipk1j6dfq5pjfzfnfb64spbv-python2-2.7.15/bin/python2.7
     40     #!/bin/sh
     40 #!/gnu/store/9alic3caqhay3h8mx4iihpmyj6ymqpcx-guile-2.2.4/bin/guile --no-auto-compile
     42 #!/gnu/store/r658y3cgpnf99nxjxqgjiaizx20ac4k0-guile-2.2.4/bin/guile --no-auto-compile
     42 #!/usr/bin/env ../utility/fontforge-interp.sh
     44   #!/usr/bin/perl
     45 #!/usr/bin/env ruby
     46   #!location/of/bin/ruby
     47 #!@BASH@
     48 #!/usr/bin/env texlua
     50 #!/gnu/store/9alic3caqhay3h8mx4iihpmyj6ymqpcx-guile-2.2.4/bin/guile \
     51 #!/usr/bin/perl -w
     53 #!/usr/bin/env fontforge
     56 #!@SHELL@
     56     #!/usr/bin/perl
     57 #!/gnu/store/5wp8mhmlq2xbd6kg0dq7armjgva7j7cs-perl-5.28.0/bin/perl
     60 #!/gnu/store/2k67pvrdq9hygg2ysgflk94jhbnc9s9g-tcsh-6.20.00/bin/csh -f
     61 #!/gnu/store/zvm2hcnbcv9mygzwpbrb6pvj1nc9wbfv-perl-boot0-5.28.0/bin/perl
     63   #!location/of/bin/bash
     64 #! /bin/sh
     66     #!/usr/bin/perl -w
     80 #! /usr/bin/env python
     90 #! /usr/bin/env python3
    108 #!/gnu/store/fndcvkn64ycw720d3ikjvmyvhsqk2v4n-ruby-2.5.3/bin/ruby
    110 #!~a
    116 #!/usr/bin/perl
    137  #!/bin/sh
    140 #!/gnu/store/61sixy2zjzlrpqwxphzf7v6h0yaysx1s-ruby-2.5.3/bin/ruby
    140 #!/gnu/store/lgbiv7q1b6m141nrkjm92qkl9ih5gamw-python2-2.7.15/bin/python
    145 #!/gnu/store/8z9avbgm73nzrbkhscps68gcpfipgllc-bootstrap-binaries-0/bin/sh
    146 #!/gnu/store/hw0cz0mis43z19i76pl6ijx5risx4lf0-texlive-bin-20180414/bin/texlua
    146 #!/gnu/store/xwzyy0q261brxmafkvinrrvkq4rgwiq6-texlive-bin-20180414/bin/texlua
    150 #!/gnu/store/81y6l9ggc5q6z44hp90ll4dv5jl582mq-texlive-bin-20180414/bin/texlua
    150 #!/gnu/store/pyrlmxqx3g1mhzpnfpw4w94rj08wxfhj-texlive-bin-20180414/bin/texlua
    150 #!/gnu/store/x9c77i6r5fmarslij6ng81awgrxblplm-texlive-bin-20180414/bin/texlua
    162 #!/usr/bin/env python3
    167 #!/bin/bash
    169 #!/usr/bin/env python
    207 #!/gnu/store/iqx98v4rnw26n4qn555l4pbj96navxiv-python2-2.7.15/bin/python
    209 #!/gnu/store/g87hamjyipk1j6dfq5pjfzfnfb64spbv-python2-2.7.15/bin/python
    228 #!/bin/sh
    292 #!/gnu/store/5s2nib1lrd2101bbrivcl17kjx1mspw6-coreutils-8.30/bin/false
    292 #!/gnu/store/8z9avbgm73nzrbkhscps68gcpfipgllc-bootstrap-binaries-0/bin/false
    319 #!/gnu/store/dna8kpb00kq176rz8x69yy4j33my2q55-perl-5.28.0/bin/perl -w
    362  #!/bin/bash
   1589 #!/gnu/store/dna8kpb00kq176rz8x69yy4j33my2q55-perl-5.28.0/bin/perl
   2706 #!/gnu/store/q19l04vd2za80mk1845pz7r8cz29qk43-bash-minimal-4.4.23/bin/bash
   3294 #!/gnu/store/q19l04vd2za80mk1845pz7r8cz29qk43-bash-minimal-4.4.23/bin/sh
   3871 #!/gnu/store/qn1ax1fkj16x280m1rv7mcimfmn9l2pf-bash-4.4.23/bin/bash
-----------------------------------------------------

Some look a bit weird, like
      6 #!/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-glibc-2.18/bin/sh
but I guess it could be a template for some remote context. Idk.
There is no /nix directory on my disk anyway. Maybe inside a ramdisk image?

(There were lots of matches in what appears binary to grep, but they were
all to inside /gnu/store, so I  eliminated them for here, with -I)

BTW, I haven't yet started shepherd automatically, and it isn't running in the above.
Just guix-daemon:
from emacs I'm in now: Esc-1 Esc-! ps -e f |grep -i guix
  530 ?        Ss     0:00 /var/guix/profiles/per-user/root/current-guix/bin/guix-daemon --build-users-group=guixbuild
31185 ?        Ss     0:00              \_ /home/bokr/.guix-profile/bin/bash -c ps -e f |grep -i guix
31187 ?        S      0:00                  \_ grep -i guix

I have set SHELL=/home/bokr/.guix-profile/bin/bash in ~/.bash_profile,
but as seen, that doesn't take effect for the immediate login shell.

I wonder if I could exec it at the end of ~/.bash_profile -- or even as the first and only thing, hm...

Hope someone can point to to enlightening reading re names in guix and its environments. TIA ;-)

Regards,
Bengt Richter

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

* bug#37249: console shell upon login is not ~/.guix-profile/bash -- is this always/never ok?
  2019-08-31 22:21 bug#37249: console shell upon login is not ~/.guix-profile/bash -- is this always/never ok? Bengt Richter
@ 2019-09-07  8:50 ` 宋文武
  2019-09-09 13:40   ` Bengt Richter
  2019-09-10  7:00 ` Efraim Flashner
  1 sibling, 1 reply; 4+ messages in thread
From: 宋文武 @ 2019-09-07  8:50 UTC (permalink / raw)
  To: Bengt Richter; +Cc: 37249

Bengt Richter <bokr@bokr.com> writes:

> Hello,
>
> In the pursuit of causes for problems as yet not clear enough to
> post as bugs, I am looking for ambivalences in name searches
> in /gnu/... and /(the-rest).

Hello, I think most guix packages (some won't or require manual
configurations) will work on a foreign GNU/Linux distribution, and guix
shouldn't cause problems for the distribution.

>
> The first is immediately bash:
> To duplicate, log into a fresh console and look at what's running
> and invoked. I did an Alt-F4 and logged in fresh, and captured the
> terminal screen seen in the following:
>
> ---------8<---------
>
> [ ... snip some output from .bash_profile ... ]
>
> [13:33 ~/bs]$ ps -o pid,tty,args
>   PID TT       COMMAND
> 25500 tty4     -bash
> 25966 tty4     ps -o pid,tty,args
> [13:35 ~/bs]$ which -a ps
> /usr/bin/ps
> [13:35 ~/bs]$ file /proc/25500/exe
> /proc/25500/exe: symbolic link to /usr/bin/bash
>
> So, the shell I am talking to right after login is /usr/bin/bash,
> but if I type bash, the guix version will be found first:
>
> [13:36 ~/bs]$ which -a bash
> /home/bokr/.guix-profile/bin/bash
> /usr/bin/bash
> [13:38 ~/bs]$ which -a bash|xargs readlink -f
> /gnu/store/qn1ax1fkj16x280m1rv7mcimfmn9l2pf-bash-4.4.23/bin/bash
> /usr/bin/bash

After login, user's shell program as specified in /etc/passwd will be
executed.  So you should have '/usr/bin/bash' or '/bin/bash' in
/etc/passwd, and your $PATH have '$HOME/.guix-profile/bin' before
'/usr/bin', so when type 'bash' in a shell, the guix one got executed.

>
> So, nesting into the guix one,
>
> [13:39 ~/bs]$ bash
> [13:39 ~/bs]$ ps -o pid,tty,args
>   PID TT       COMMAND
> 25500 tty4     -bash
> 26226 tty4     bash
> 26253 tty4     ps -o pid,tty,args
> [13:40 ~/bs]$ file /proc/26226/exe
> /proc/26226/exe: symbolic link to /gnu/store/qn1ax1fkj16x280m1rv7mcimfmn9l2pf-bash-4.4.23/bin/bash
>
> Indeed our current pid belongs to guix bash.
> What is the difference? They were built differently...
>
> [13:41 ~/bs]$
> [13:42 ~/bs]$ which -a bash
> /home/bokr/.guix-profile/bin/bash
> /usr/bin/bash
> [13:43 ~/bs]$ which -a bash|xargs readlink -f|while read line;do echo -ne "$line:\n    "; file "$line";done
> /gnu/store/qn1ax1fkj16x280m1rv7mcimfmn9l2pf-bash-4.4.23/bin/bash:
>     /gnu/store/qn1ax1fkj16x280m1rv7mcimfmn9l2pf-bash-4.4.23/bin/bash:
>     ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter
>     /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/lib/ld-linux-x86-64.so.2,
>     for GNU/Linux 2.6.32, not stripped
> /usr/bin/bash:
>     /usr/bin/bash: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked,
>     interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=21a51cb5f7d727370e4d8099d283d7cd20222571,
>     for GNU/Linux 3.2.0, stripped
>
> Are the differences possibly dangerous?

It's totally OK, you can use both :-)

>
> The way I got the above, and this tail part itself:
> [13:45 ~/bs]$ tty
> /dev/tty4
> [13:47 ~/bs]$ su -c 'setterm -file login-bashes.txt -dump 4'
> ------------------------------------
>
> Looking for dependencies outside of /gnu from within /gnu, I grepped the whole
> as you see below. I am sure most of this is fine and coming out of documentation
> and stuff meant for other than normally booted runtime. But does it all look ok?
>
> Or is my foreign-host twilight-zone shared ArchLinux/guix namespace really not
> meant to be. I.e., is guix really defined to use /usr/ as a trusted base namespace
> when it is defined by e.g. linux-libre in GuixSD ?
>
> Where would be the best docs to read about the guix name and environment rationales?

There are no 'namespace' involed, guix and your ArchLinux packages share
the same filesystem.  And guix binaries are self-contained, they can
work without any dependenices outsite of /gnu (sometimes they will use
what's available in PATH, etc. which may be provided by your distribution).

>
> Ok, here is the grep:
> (most of the bashes are in the store, as seen at the bottom, but many not)
> -------------------------------
> This was generated by:
>     grep -Ihr '^ *#!' /gnu|sort|uniq -c|sort -h > gnu-bin-hash-bangs.txt
>
>       2       #!/bin/csh
>       2 #!/bin/tcsh
>       2 #!@GAWK@ -f
>       2 #!/gnu/store/03n7p9g78ixkrmra674pkx2c9cx8fwmz-guile-1.8.8/bin/guile \
>       2 #!/gnu/store/0xfmkqpi7xk3ixhrqvjijk4ibsglif62-python-3.7.0/bin/python3.7m
>       2 #!/gnu/store/57daq0hkwvmwx4asiy669cmln868brfm-python2-2.7.15/bin/python2
>       2 #!/gnu/store/9alic3caqhay3h8mx4iihpmyj6ymqpcx-guile-2.2.4/bin/guile
>       2 #!/gnu/store/b7fqhszxl02g6pfm3vw6b3cjz472qrly-python-3.7.0/bin/python3.7m
>       2 #!/gnu/store/cl42c73h609bp2gy92qkh8q56spnnl2n-python-3.7.0/bin/python3.7m
>       2 #! /gnu/store/dna8kpb00kq176rz8x69yy4j33my2q55-perl-5.28.0/bin/perl
>       2 #!/gnu/store/h8l1pby3cm6b4fxsfwwr65b4d1hyh6cs-python-3.7.0/bin/python3.7m
>       2 #!/gnu/store/l67sib1ld0fgyf0f4vrzyxnmn4yvimvb-gawk-4.2.1/bin/gawk -f
>       2 #!/gnu/store/qn1ax1fkj16x280m1rv7mcimfmn9l2pf-bash-4.4.23/bin/sh -
>       2 #!/gnu/store/ybglr7nfs8v9kpnm8vf4drg3gafnvd15-guile-static-stripped-2.2.4/bin/guile --no-auto-compile
>       2 #!/gnu/store/zm3188ipzi262s0m8bxm24br77yh9pd8-python-3.7.0/bin/python3
>       2 #!/gnu/store/zm3188ipzi262s0m8bxm24br77yh9pd8-python-3.7.0/bin/python3.7m
>       2 #!@GUILE@ -s
>       2 #!@PHP@ -q
>       2 #!@TCLSH@
>       2 #! /usr/bin/perl
>       2 #!/usr/bin/perl -- # -*- Perl -*-
>       2  #! /usr/bin/perl -w
>       2 #! /usr/bin/python
>       2 #!/usr/bin/python -u
>       2 #!@WISH@
>       3 #!#{Gem.ruby}
>       3 #!/gnu/store/81y6l9ggc5q6z44hp90ll4dv5jl582mq-texlive-bin-20180414/bin/texlua 
>       3 #!/gnu/store/hw0cz0mis43z19i76pl6ijx5risx4lf0-texlive-bin-20180414/bin/texlua 
>       3 #!/gnu/store/lgbiv7q1b6m141nrkjm92qkl9ih5gamw-python2-2.7.15/bin/python -O
>       3 #!/gnu/store/pyrlmxqx3g1mhzpnfpw4w94rj08wxfhj-texlive-bin-20180414/bin/texlua 
>       3 #!/gnu/store/x9c77i6r5fmarslij6ng81awgrxblplm-texlive-bin-20180414/bin/texlua 
>       3 #!/gnu/store/xwzyy0q261brxmafkvinrrvkq4rgwiq6-texlive-bin-20180414/bin/texlua 
>       3                    #!if(WithStride,".stride","")
>       3                 #!if(WithStride,".stride","")
>       3 #! libapr-1.so
>       3  #!/usr/bin/env ruby
>       4                 #! $key eq '-range'    and  $key .= 's';
>       4             #! $pod_parser->select(@{ $opts{'-ranges'} })
>       4 #!$^X -w
>       4 #! at all.)
>       4 #!/gnu/store/9jjnk994sg3kynx7w2p873x60yr27q1p-pulseaudio-12.2/bin/pulseaudio -nF
>       4 #!/gnu/store/cwla78yg7vnngk51jp81j4phy2fpgbhm-pulseaudio-12.2/bin/pulseaudio -nF
>       4 #!/gnu/store/glvv9jyp28f8454laig76agc3jig4f4z-pulseaudio-12.2/bin/pulseaudio -nF
>       4 #!/gnu/store/gvwf71vddp8c1d7ydqg02p43mgdjrx6s-bash
>       4 #!/gnu/store/qqfrzd5jrpq7i1gn9spv7hzpj4kllvj0-pulseaudio-12.2/bin/pulseaudio -nF
>       4 #!/gnu/store/qsvja1gy86vrdkcqygkamg5j0sfq6ry4-pulseaudio-12.2/bin/pulseaudio -nF
>       4 #!/gnu/store/s795jav4270x940spl48a885nhw4axnx-pulseaudio-12.2/bin/pulseaudio -nF
>       4 #!/gnu/store/wsd8i4dy3vvkpfjlg5m1q5cy0b2ld95q-pulseaudio-12.2/bin/pulseaudio -nF
>       4 #!/gnu/store/yw409j5hzvhgj54p2xxaqbh3bz9zfhpg-pulseaudio-12.2/bin/pulseaudio -nF
>       4 #!/gnu/store/zvhp49cvslhjdv7n19nssv2kr2jqa87h-pulseaudio-12.2/bin/pulseaudio -nF
>       4             #!     if ( (defined $opts{'-ranges'})
>       4 #!include_default, #!include /Path/to/another/manifest.skip
>       4 #! libaprutil-1.so
>       4     #! /opt/perl5/bin/perl
>       4   #!/path/to/a/custom_perl --some --args
>       4    #!/path/to/jperl
>       4    #!/path/to/perl -Mencoding=euc-jp
>       4 #!/path/to/perl script invocation.  There is a PTF available from
>       4     #! -*-perl-*-
>       4   #!perl
>       4 #! perl
>       4 #!@PERL@
>       4    #!perl -l
>       4     #!perl -T
>       4 #!./perl -w
>       4 #!/pro/bin/perl
>       4 #!/QOpenSys/perl/bin/perl should always work.
>       4             #!          && ((ref $opts{'-ranges'}) eq 'ARRAY') );
>       4             #! ## Select the desired paragraph ranges
>       4   #!/usr/bin/env perl use lib qw( lib );      # Add ./lib to @INC
>       4 #!/usr/bin/perl MakeMaker will change this to the path of the perl
>       4     #!/usr/bin/perl -n
>       4     #!/usr/bin/perl -pi.orig
>       4     #!/usr/bin/perl -s
>       4     #!/usr/bin/perl -spi.orig	# same as -s -p -i.orig
>       4     #!/usr/bin/perl -T -w
>       4     #!/usr/bin/perl  -w
>       4   #!/usr/bin/perl -wl
>       4     #!/usr/bin/perl -w -T
>       4   #!/usr/bin/php 
>       4 #! /usr/bin/sh
>       4     #!/usr/local/bin/perl5.14
>       4     #!/usr/local/bin/perl     # just a comment really
>       4   #!/usr/local/perl-5.6/bin/perl -w
>       4     #!/usr/locl/bin/perl
>       5 #!/gnu/store/dna8kpb00kq176rz8x69yy4j33my2q55-perl-5.28.0/bin/perl -W
>       5 #!/gnu/store/g87hamjyipk1j6dfq5pjfzfnfb64spbv-python2-2.7.15/bin/python -O
>       5 #!/gnu/store/iqx98v4rnw26n4qn555l4pbj96navxiv-python2-2.7.15/bin/python -O
>       5 #!/usr/bin/env python2
>       6 #!2_]r;QWmr;HTnrVZTls&f@&'E.jlrVud)rr5ao!5AL4r;?NmrVlcos83-$s!e*NeGfI2rVud!
>       6     #![allow(dead_code, unused_imports)]
>       6 #! /bin/bash
>       6   #!/bin/bash^^J%
>       6         #!/bin/sh
>       6 #!bQ7"8Gg6b3eoe>$R71>:0O.S=?1;7XQV?G"!XuWkieE.A([)Gb:<g^IbF&+pDD
>       6 #!cslatex
>       6 #! <fmtname> <enginename> <hyphen> <args>
>       6 #!GaH0,lQdqUHRI!sXe9eQO3Ee^,L\eVF^Wbnu,aSH[**!_"<Pp=0tM"j#6E8hJM_"j#6E?QmeH
>       6 #!/gnu/store/2k67pvrdq9hygg2ysgflk94jhbnc9s9g-tcsh-6.20.00/bin/csh
>       6 #!/gnu/store/2k67pvrdq9hygg2ysgflk94jhbnc9s9g-tcsh-6.20.00/bin/csh -xv
>       6 #!/gnu/store/dna8kpb00kq176rz8x69yy4j33my2q55-perl-5.28.0/bin/perl -n
>       6 #!/gnu/store/dna8kpb00kq176rz8x69yy4j33my2q55-perl-5.28.0/bin/perl -p -i
>       6 #!/gnu/store/dna8kpb00kq176rz8x69yy4j33my2q55-perl-5.28.0/bin/perl -p -i.bak
>       6 #!/gnu/store/dna8kpb00kq176rz8x69yy4j33my2q55-perl-5.28.0/bin/perl -T
>       6 #!/gnu/store/dna8kpb00kq176rz8x69yy4j33my2q55-perl-5.28.0/bin/perl -T -w
>       6 #!/gnu/store/dna8kpb00kq176rz8x69yy4j33my2q55-perl-5.28.0/bin/perl -w
>       6 #!/gnu/store/dna8kpb00kq176rz8x69yy4j33my2q55-perl-5.28.0/bin/perl -w 
>       6 #!H!IX"''9Wa>D7VYA@E`L5suKOJFl<>^ul(bEXhP*HM"9Cbeu,BGMsN,"AdAt[@0
>       6 #!*k<&fW2FrVus62#[IT!r2g.8PT6c"onDor;HKjrVQBcqo8O6&-;h3!XT9::G`Fa"TSNE1E60,
>       6 #!Kmci!<<*"Z2t"+!g3]e!<<*"\cMj3"Hj)l!<<*"_?'];"d0#h!<<*"aoVPC#Ef
>       6 #!kTb'N:-k+U6(!m^1q$6QNUqf%C$^9!K[Ab31,32$=gB!5?i/?h?%VXZd%RmtRZfZE*me2U0QZ'3/
>       6 #!latex
>       6 #! Map belleek.map
>       6 #! Map mapname.map
>       6 #! MixedMap mapname.map
>       6 #!/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-glibc-2.18/bin/sh
>       6 #!P5"q7-/;:!\TuP1=X[Q1lGL6k.rYpP!p4b6-X*ZAl;G!b8,cGrd14Q5D0jpXMON
>       6 #!pdfcslatex
>       6 #!pdflatex
>       6 #! @PERL@ -w
>       6 #!rF>2s`M\gb\?pQ[)lRMVXD7X%;@d6\M.@oPbQ)'8mjcqSsDGM79n2$XtTN<DZbi
>       6 #!topic/comp.text.tex/o14P2e83o4A}{comp.text.tex} for a macro that will define commands and also save the commands being defined in a file or a container macro, \eg, for spelling exceptions on editors that don't support \tex syntax.
>       6 #!UGlO1/(4)%t4-m<.kt,%uoHGtV4M7IFIlnDr.!2?[>P^t.[[P$W\[/V0J8eAS<P
>       6 #! /usr/bin/env perl
>       6 #!/usr/bin/env pfaedit
>       6 #!/usr/bin/fontforge -lang=ff
>       6 #!/usr/bin/fontforge -script
>       6 #!/usr/bin/fontforge -script 
>       6 #!/usr/local/bin/perl
>       7 #!/gnu/store/lgbiv7q1b6m141nrkjm92qkl9ih5gamw-python2-2.7.15/bin/python2
>       8 #!/gnu/store/81y6l9ggc5q6z44hp90ll4dv5jl582mq-texlive-bin-20180414/bin/texlua  
>       8 #!/gnu/store/8z9avbgm73nzrbkhscps68gcpfipgllc-bootstrap-binaries-0/bin/bash
>       8 #!/gnu/store/hw0cz0mis43z19i76pl6ijx5risx4lf0-texlive-bin-20180414/bin/texlua  
>       8 #!/gnu/store/pyrlmxqx3g1mhzpnfpw4w94rj08wxfhj-texlive-bin-20180414/bin/texlua  
>       8 #!/gnu/store/qn1ax1fkj16x280m1rv7mcimfmn9l2pf-bash-4.4.23/bin/sh
>       8 #!/gnu/store/x9c77i6r5fmarslij6ng81awgrxblplm-texlive-bin-20180414/bin/texlua  
>       8 #!/gnu/store/xwzyy0q261brxmafkvinrrvkq4rgwiq6-texlive-bin-20180414/bin/texlua  
>       8 #!/gnu/store/zzakf905mzla4csi1dn9qpcwmgbxj29b-bash-static-4.4.23/bin/bash
>       8 #!/gnu/store/zzakf905mzla4csi1dn9qpcwmgbxj29b-bash-static-4.4.23/bin/sh
>       8  #!/usr/bin/perl -n
>       8  #!/usr/bin/perl -Tw
>       8     #!/usr/local/bin/perl
>       8     #!/usr/local/bin/perl5.10.0
>       8     #!/your/path/to/perl
>      10 #!/gnu/store/0xfmkqpi7xk3ixhrqvjijk4ibsglif62-python-3.7.0/bin/python3
>      10 #!/gnu/store/cl42c73h609bp2gy92qkh8q56spnnl2n-python-3.7.0/bin/python3
>      10    #!/usr/bin/emacs --script
>      11 #!/bin/sh -x
>      11 #!!!!!!!!???  Check @pwd_log
>      11 #!/gnu/store/g30znz9vwkvi23k41dgallfg85sj65hp-python-wrapper-3.7.0/bin/python
>      11 #!/gnu/store/iqx98v4rnw26n4qn555l4pbj96navxiv-python2-2.7.15/bin/python2
>      11 #!/usr/bin/emacs -script
>      11 #! /usr/local/bin/python
>      12        #!/bin/sh
>      12   #! /bin/sh
>      12 #! cont-fr pdftex cont-usr.tex -8bit *cont-fr.mkii
>      12 #! cont-it pdftex cont-usr.tex -8bit *cont-it.mkii
>      12 #! cont-nl pdftex cont-usr.tex -8bit *cont-nl.mkii
>      12 #! cont-ro pdftex cont-usr.tex -8bit *cont-ro.mkii
>      12 #!/gnu/store/dna8kpb00kq176rz8x69yy4j33my2q55-perl-5.28.0/bin/perl -n -s
>      12 #!/gnu/store/l67sib1ld0fgyf0f4vrzyxnmn4yvimvb-gawk-4.2.1/bin/awk -f
>      12 #!/gnu/store/q19l04vd2za80mk1845pz7r8cz29qk43-bash-minimal-4.4.23/bin/sh -vx
>      12     #! Map belleek.map
>      12 #! mflua mflua-nowin - mf.ini
>      12  #!/usr/bin/env perl
>      12 #!/usr/bin/fontforge
>      12     #!/usr/bin/perl -Tw
>      12 #!/usr/bin/python
>      12 #!/usr/local/bin/fontforge
>      12 #! /usr/local/bin/perl
>      12     #!/usr/local/bin/perl -w
>      13 #!/gnu/store/0xfmkqpi7xk3ixhrqvjijk4ibsglif62-python-3.7.0/bin/python3.7
>      13 #!/gnu/store/b7fqhszxl02g6pfm3vw6b3cjz472qrly-python-3.7.0/bin/python3.7
>      13 #!/gnu/store/cl42c73h609bp2gy92qkh8q56spnnl2n-python-3.7.0/bin/python3.7
>      13 #!/gnu/store/g87hamjyipk1j6dfq5pjfzfnfb64spbv-python2-2.7.15/bin/python2
>      13 #!/gnu/store/h8l1pby3cm6b4fxsfwwr65b4d1hyh6cs-python-3.7.0/bin/python3.7
>      13 #!/gnu/store/zm3188ipzi262s0m8bxm24br77yh9pd8-python-3.7.0/bin/python3.7
>      14 #!@EMACS@ --script
>      14 #!/gnu/store/9alic3caqhay3h8mx4iihpmyj6ymqpcx-guile-2.2.4/bin/guile -ds
>      14 #!/gnu/store/q19l04vd2za80mk1845pz7r8cz29qk43-bash-minimal-4.4.23/bin/sh -
>      14 #!/gnu/store/q19l04vd2za80mk1845pz7r8cz29qk43-bash-minimal-4.4.23/bin/sh -x
>      14 #!@GUILE@ \
>      14 #!@GUILE@ -ds
>      14     #! luajitlatex luajittex language.dat,language.dat.lua lualatex.ini
>      16 #!$PERL
>      16 #!/usr/local/bin/perl -w
>      17 #!/gnu/store/3w3nz0h93h7jif9d9c3hdfyimgkpx1a4-python-wrapper-3.7.0/bin/python
>      18 #!
>      18 #!/gnu/store/dna8kpb00kq176rz8x69yy4j33my2q55-perl-5.28.0/bin/perl -s
>      18 #! luajitlatex luajittex language.dat,language.dat.lua lualatex.ini
>      18 #!./perl
>      18           #!perl.exe (versions below 4)
>      18 #!/usr/bin/env perl
>      20 #! /gnu/store/q19l04vd2za80mk1845pz7r8cz29qk43-bash-minimal-4.4.23/bin/bash
>      20  #!/usr/bin/perl -w
>      21 #!/gnu/store/b7fqhszxl02g6pfm3vw6b3cjz472qrly-python-3.7.0/bin/python3
>      22 #!/gnu/store/iqx98v4rnw26n4qn555l4pbj96navxiv-python2-2.7.15/bin/python2.7
>      22 #!/usr/bin/env wish
>      23 #!/gnu/store/r68bi4640vm0s7zsgyk7shsag8ibl3nc-python-wrapper-3.7.0/bin/python
>      24 #!/bin/lua
>      24 #!/usr/bin/lua
>      24  #!/usr/bin/perl
>      25 #!/gnu/store/57daq0hkwvmwx4asiy669cmln868brfm-python2-2.7.15/bin/python2.7
>      25 #!perl -w
>      28 #!/gnu/store/lgbiv7q1b6m141nrkjm92qkl9ih5gamw-python2-2.7.15/bin/python2.7
>      28 #!perl
>      29 #!/gnu/store/bs6bwq60sh3zamgiqmkyryf1lxbfjkgd-lua-5.3.5/bin/lua
>      30  #![allow(dead_code, unused_variables)]
>      30 #!/usr/bin/env python
>      32     #!/usr/bin/env perl
>      33 #!/gnu/store/dna8kpb00kq176rz8x69yy4j33my2q55-perl-5.28.0/bin/perl 
>      35  #![allow(unused_variables)]
>      35  #! /bin/sh -e
>      35  #![feature(omit_gdb_pretty_printer_section)]
>      36 #! $SHELL
>      38 #!/gnu/store/@dots{}-guile-2.0.11/bin/guile -ds
>      38 #!/gnu/store/g87hamjyipk1j6dfq5pjfzfnfb64spbv-python2-2.7.15/bin/python2.7
>      40     #!/bin/sh
>      40 #!/gnu/store/9alic3caqhay3h8mx4iihpmyj6ymqpcx-guile-2.2.4/bin/guile --no-auto-compile
>      42 #!/gnu/store/r658y3cgpnf99nxjxqgjiaizx20ac4k0-guile-2.2.4/bin/guile --no-auto-compile
>      42 #!/usr/bin/env ../utility/fontforge-interp.sh
>      44   #!/usr/bin/perl
>      45 #!/usr/bin/env ruby
>      46   #!location/of/bin/ruby
>      47 #!@BASH@
>      48 #!/usr/bin/env texlua
>      50 #!/gnu/store/9alic3caqhay3h8mx4iihpmyj6ymqpcx-guile-2.2.4/bin/guile \
>      51 #!/usr/bin/perl -w
>      53 #!/usr/bin/env fontforge
>      56 #!@SHELL@
>      56     #!/usr/bin/perl
>      57 #!/gnu/store/5wp8mhmlq2xbd6kg0dq7armjgva7j7cs-perl-5.28.0/bin/perl
>      60 #!/gnu/store/2k67pvrdq9hygg2ysgflk94jhbnc9s9g-tcsh-6.20.00/bin/csh -f
>      61 #!/gnu/store/zvm2hcnbcv9mygzwpbrb6pvj1nc9wbfv-perl-boot0-5.28.0/bin/perl
>      63   #!location/of/bin/bash
>      64 #! /bin/sh
>      66     #!/usr/bin/perl -w
>      80 #! /usr/bin/env python
>      90 #! /usr/bin/env python3
>     108 #!/gnu/store/fndcvkn64ycw720d3ikjvmyvhsqk2v4n-ruby-2.5.3/bin/ruby
>     110 #!~a
>     116 #!/usr/bin/perl
>     137  #!/bin/sh
>     140 #!/gnu/store/61sixy2zjzlrpqwxphzf7v6h0yaysx1s-ruby-2.5.3/bin/ruby
>     140 #!/gnu/store/lgbiv7q1b6m141nrkjm92qkl9ih5gamw-python2-2.7.15/bin/python
>     145 #!/gnu/store/8z9avbgm73nzrbkhscps68gcpfipgllc-bootstrap-binaries-0/bin/sh
>     146 #!/gnu/store/hw0cz0mis43z19i76pl6ijx5risx4lf0-texlive-bin-20180414/bin/texlua
>     146 #!/gnu/store/xwzyy0q261brxmafkvinrrvkq4rgwiq6-texlive-bin-20180414/bin/texlua
>     150 #!/gnu/store/81y6l9ggc5q6z44hp90ll4dv5jl582mq-texlive-bin-20180414/bin/texlua
>     150 #!/gnu/store/pyrlmxqx3g1mhzpnfpw4w94rj08wxfhj-texlive-bin-20180414/bin/texlua
>     150 #!/gnu/store/x9c77i6r5fmarslij6ng81awgrxblplm-texlive-bin-20180414/bin/texlua
>     162 #!/usr/bin/env python3
>     167 #!/bin/bash
>     169 #!/usr/bin/env python
>     207 #!/gnu/store/iqx98v4rnw26n4qn555l4pbj96navxiv-python2-2.7.15/bin/python
>     209 #!/gnu/store/g87hamjyipk1j6dfq5pjfzfnfb64spbv-python2-2.7.15/bin/python
>     228 #!/bin/sh
>     292 #!/gnu/store/5s2nib1lrd2101bbrivcl17kjx1mspw6-coreutils-8.30/bin/false
>     292 #!/gnu/store/8z9avbgm73nzrbkhscps68gcpfipgllc-bootstrap-binaries-0/bin/false
>     319 #!/gnu/store/dna8kpb00kq176rz8x69yy4j33my2q55-perl-5.28.0/bin/perl -w
>     362  #!/bin/bash
>    1589 #!/gnu/store/dna8kpb00kq176rz8x69yy4j33my2q55-perl-5.28.0/bin/perl
>    2706 #!/gnu/store/q19l04vd2za80mk1845pz7r8cz29qk43-bash-minimal-4.4.23/bin/bash
>    3294 #!/gnu/store/q19l04vd2za80mk1845pz7r8cz29qk43-bash-minimal-4.4.23/bin/sh
>    3871 #!/gnu/store/qn1ax1fkj16x280m1rv7mcimfmn9l2pf-bash-4.4.23/bin/bash
> -----------------------------------------------------

Yeah, a guix package should patch all those shell interperters from
/bin, /usr/bin, etc to the store path under /gnu/store, but may miss
some cases (which should be fixed).

>
> Some look a bit weird, like
>       6 #!/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-glibc-2.18/bin/sh
> but I guess it could be a template for some remote context. Idk.
> There is no /nix directory on my disk anyway. Maybe inside a ramdisk image?

I don't know, guess it should be fine...
>
> (There were lots of matches in what appears binary to grep, but they were
> all to inside /gnu/store, so I  eliminated them for here, with -I)
>
> BTW, I haven't yet started shepherd automatically, and it isn't running in the above.
> Just guix-daemon:
> from emacs I'm in now: Esc-1 Esc-! ps -e f |grep -i guix
>   530 ?        Ss     0:00 /var/guix/profiles/per-user/root/current-guix/bin/guix-daemon --build-users-group=guixbuild
> 31185 ?        Ss     0:00              \_ /home/bokr/.guix-profile/bin/bash -c ps -e f |grep -i guix
> 31187 ?        S      0:00                  \_ grep -i guix
>
> I have set SHELL=/home/bokr/.guix-profile/bin/bash in ~/.bash_profile,
> but as seen, that doesn't take effect for the immediate login shell.
>
> I wonder if I could exec it at the end of ~/.bash_profile -- or even as the first and only thing, hm...

Both should work, but you might try the guix system if have so much
choices trouble you :-)
>
> Hope someone can point to to enlightening reading re names in guix and its environments. TIA ;-)
>
> Bengt Richter

I'm not sure what you mean about "names" and "environments", in the
low-level, they are:

filesystem:
  guix use /gnu, /var/guix, /var/log/guix, and $HOME/.guix-profile, your
  distribution doesn't use those, so guix can live within it happily.

environment variables:
  PATH, MANPATH, INFOPATH (and more...), both guix and your distribution
  share the same ones, so there maybe some conflicts.

Hope it helps!

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

* bug#37249: console shell upon login is not ~/.guix-profile/bash -- is this always/never ok?
  2019-09-07  8:50 ` 宋文武
@ 2019-09-09 13:40   ` Bengt Richter
  0 siblings, 0 replies; 4+ messages in thread
From: Bengt Richter @ 2019-09-09 13:40 UTC (permalink / raw)
  To: 宋文武; +Cc: 37249

On +2019-09-07 16:50:12 +0800, 宋文武 wrote:
> Bengt Richter <bokr@bokr.com> writes:
> 
> > Hello,
> >
> > In the pursuit of causes for problems as yet not clear enough to
> > post as bugs, I am looking for ambivalences in name searches
> > in /gnu/... and /(the-rest).
> 
> Hello, I think most guix packages (some won't or require manual
> configurations) will work on a foreign GNU/Linux distribution, and guix
> shouldn't cause problems for the distribution.
>

Hi ???iyzsong,

Thank you for caring to answer, and for your time working on it!

Unfortunately for me, perhaps, I am interested in pursuing purity
in the definition of systems, so "shoulds" are not that reassuring ;-)

I think your advice,

   > "... you might try the guix system if have so much
   > choices trouble you :-)

may be the easiest way to improve my current situation, so
I will see about doing that. Thanks :)

[...]

> 
> After login, user's shell program as specified in /etc/passwd will be
> executed.  So you should have '/usr/bin/bash' or '/bin/bash' in
> /etc/passwd, and your $PATH have '$HOME/.guix-profile/bin' before
> '/usr/bin', so when type 'bash' in a shell, the guix one got executed.
> 

Yes, but I don't normally type bash -- I type the name of some script
I've written and put in ~/bin, and it was typically written years ago
with a #!/usr/bin/bash first line, and I don't want to have to modify
all those ;-) Especially those that I might have put in a personal git
repo.

Would I have to, to migrate all those little helpers to my GuixSD ??

[...]

> > [13:42 ~/bs]$ which -a bash
> > /home/bokr/.guix-profile/bin/bash
> > /usr/bin/bash
> > [13:43 ~/bs]$ which -a bash|xargs readlink -f|while read line;do echo -ne "$line:\n    "; file "$line";done
> > /gnu/store/qn1ax1fkj16x280m1rv7mcimfmn9l2pf-bash-4.4.23/bin/bash:
> >     /gnu/store/qn1ax1fkj16x280m1rv7mcimfmn9l2pf-bash-4.4.23/bin/bash:
> >     ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter
> >     /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/lib/ld-linux-x86-64.so.2,
> >     for GNU/Linux 2.6.32, not stripped
> > /usr/bin/bash:
> >     /usr/bin/bash: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked,
> >     interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=21a51cb5f7d727370e4d8099d283d7cd20222571,
> >     for GNU/Linux 3.2.0, stripped
> >
> > Are the differences possibly dangerous?
> 
> It's totally OK, you can use both :-)
>
Until I have to diagnose a difference in behaviour ;-)
 
> >
> > Looking for dependencies outside of /gnu from within /gnu, I grepped the whole
> > as you see below. I am sure most of this is fine and coming out of documentation
> > and stuff meant for other than normally booted runtime. But does it all look ok?
> >
> > Or is my foreign-host twilight-zone shared ArchLinux/guix namespace really not
> > meant to be. I.e., is guix really defined to use /usr/ as a trusted base namespace
> > when it is defined by e.g. linux-libre in GuixSD ?
> >
> > Where would be the best docs to read about the guix name and environment rationales?
> 
> There are no 'namespace' involed, guix and your ArchLinux packages share
> the same filesystem.  And guix binaries are self-contained, they can
> work without any dependenices outsite of /gnu (sometimes they will use
> what's available in PATH, etc. which may be provided by your distribution).
>
I meant namespace in the general sense of a "space" to look for the meaning
of a name in, sorry to abuse the term.

Anyhow, that "sometimes" leaves me guessing ;-) 
> >
> > Ok, here is the grep:
[...]
> >     162 #!/usr/bin/env python3
> >     167 #!/bin/bash
> >     169 #!/usr/bin/env python
> >     207 #!/gnu/store/iqx98v4rnw26n4qn555l4pbj96navxiv-python2-2.7.15/bin/python
> >     209 #!/gnu/store/g87hamjyipk1j6dfq5pjfzfnfb64spbv-python2-2.7.15/bin/python
> >     228 #!/bin/sh
> >     292 #!/gnu/store/5s2nib1lrd2101bbrivcl17kjx1mspw6-coreutils-8.30/bin/false
> >     292 #!/gnu/store/8z9avbgm73nzrbkhscps68gcpfipgllc-bootstrap-binaries-0/bin/false
> >     319 #!/gnu/store/dna8kpb00kq176rz8x69yy4j33my2q55-perl-5.28.0/bin/perl -w
> >     362  #!/bin/bash
> >    1589 #!/gnu/store/dna8kpb00kq176rz8x69yy4j33my2q55-perl-5.28.0/bin/perl
> >    2706 #!/gnu/store/q19l04vd2za80mk1845pz7r8cz29qk43-bash-minimal-4.4.23/bin/bash
> >    3294 #!/gnu/store/q19l04vd2za80mk1845pz7r8cz29qk43-bash-minimal-4.4.23/bin/sh
> >    3871 #!/gnu/store/qn1ax1fkj16x280m1rv7mcimfmn9l2pf-bash-4.4.23/bin/bash
> > -----------------------------------------------------
> 
> Yeah, a guix package should patch all those shell interperters from
> /bin, /usr/bin, etc to the store path under /gnu/store, but may miss
> some cases (which should be fixed).
> 
I can live with work in progress ;-)

[...]

> > I have set SHELL=/home/bokr/.guix-profile/bin/bash in ~/.bash_profile,
> > but as seen, that doesn't take effect for the immediate login shell.
> >
> > I wonder if I could exec it at the end of ~/.bash_profile -- or even as the first and only thing, hm...
> 
> Both should work, but you might try the guix system if have so much
> choices trouble you :-)
> >
Actually, neither exec worked the ways I tried. Idk, maybe by design, so as
not to allow exec to replace the process that catches seg faults etc and
cleans up on logout.

> > Hope someone can point to to enlightening reading re names in guix and its environments. TIA ;-)
> >
> > Bengt Richter
> 
> I'm not sure what you mean about "names" and "environments", in the
> low-level, they are:
> 
> filesystem:
>   guix use /gnu, /var/guix, /var/log/guix, and $HOME/.guix-profile, your
>   distribution doesn't use those, so guix can live within it happily.
> 
> environment variables:
>   PATH, MANPATH, INFOPATH (and more...), both guix and your distribution
>   share the same ones, so there maybe some conflicts.
>
Yup, I am experiencing those ;-)
 
> Hope it helps!
Yes, actually. Thank you!

Regards,
Bengt Richter

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

* bug#37249: console shell upon login is not ~/.guix-profile/bash -- is this always/never ok?
  2019-08-31 22:21 bug#37249: console shell upon login is not ~/.guix-profile/bash -- is this always/never ok? Bengt Richter
  2019-09-07  8:50 ` 宋文武
@ 2019-09-10  7:00 ` Efraim Flashner
  1 sibling, 0 replies; 4+ messages in thread
From: Efraim Flashner @ 2019-09-10  7:00 UTC (permalink / raw)
  To: Bengt Richter; +Cc: 37249

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

This is something I'm also interested in. Something I've found while
looking around online is checking 'ssh server env | grep PATH', and on
my Guix System machines I see it is PATH=/run/current-system/profile/bin.
It seems that playing with ~/.ssh/environment and/or ~/.ssh/rc might
yield changes, but the real question IMO is if you can change things
without changing sshd_config.

-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

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

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

end of thread, other threads:[~2019-09-10  7:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-31 22:21 bug#37249: console shell upon login is not ~/.guix-profile/bash -- is this always/never ok? Bengt Richter
2019-09-07  8:50 ` 宋文武
2019-09-09 13:40   ` Bengt Richter
2019-09-10  7:00 ` Efraim Flashner

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.