From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bengt Richter Subject: bug#37249: console shell upon login is not ~/.guix-profile/bash -- is this always/never ok? Date: Sat, 31 Aug 2019 15:21:04 -0700 Message-ID: <20190831222104.GA11128@PhantoNv4ArchGx.localdomain> Reply-To: Bengt Richter Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:46758) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i4Bkz-0000GI-8b for bug-guix@gnu.org; Sat, 31 Aug 2019 18:22:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i4Bkw-0006y9-TD for bug-guix@gnu.org; Sat, 31 Aug 2019 18:22:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:47213) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i4Bkw-0006xy-OU for bug-guix@gnu.org; Sat, 31 Aug 2019 18:22:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i4Bkw-0003os-IP for bug-guix@gnu.org; Sat, 31 Aug 2019 18:22:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: Received: from eggs.gnu.org ([2001:470:142:3::10]:46689) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i4BkH-0000DG-2S for bug-guix@gnu.org; Sat, 31 Aug 2019 18:21:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i4BkE-0005wv-H8 for bug-guix@gnu.org; Sat, 31 Aug 2019 18:21:20 -0400 Received: from imta-37.everyone.net ([216.200.145.37]:45210 helo=imta-38.everyone.net) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i4BkE-0005tB-7d for bug-guix@gnu.org; Sat, 31 Aug 2019 18:21:18 -0400 Received: from pps.filterd (m0004962.ppops.net [127.0.0.1]) by imta-38.everyone.net (8.16.0.27/8.16.0.27) with SMTP id x7VMK8Ws019639 for ; Sat, 31 Aug 2019 15:21:14 -0700 Received: by m0117124.mta.everyone.net (EON-AUTHRELAY2 - 32d0d199) id m0117124.5d552785.2ace20 for ; Sat, 31 Aug 2019 15:21:13 -0700 Content-Disposition: inline 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: 37249@debbugs.gnu.org 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: 6 #!GaH0,lQdqUHRI!sXe9eQO3Ee^,L\eVF^Wbnu,aSH[**!_"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$XtTNP^t.[[P$W\[/V0J8eAS