Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 476 - Bash not posix compliant (environment bug)
Summary: Bash not posix compliant (environment bug)
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Vitaly Kushneriuk (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-02-01 13:39 UTC by Tim van den Elsen
Modified: 2003-02-04 19:42 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim van den Elsen 2002-02-01 13:39:42 UTC
Bash seems to not initialize the environment variables with accordance to the
man page as wel as the POSIX standard to wich it is compliant.. variables as
OSTYPE, VENDOR and HOSTTYPE are some of them.

Gr,

Tim
Comment 1 Vitaly Kushneriuk (RETIRED) gentoo-dev 2002-02-03 05:55:36 UTC
1) VENDOR variable is not in "man bash"
2) At my system OSTYPE and HOSTTYPE are properly set, bot in
   login and non login modes.


Tim, Please attach output of "set" in login/nonlogin modes.
as well as "ls /var/db/pkg/aya-apps/bash*". Also please specify
which other variables are missing. 
Please take into account that if bash POSIX-complience is not a 
gentoo issue, but bash issue and should be dealt with by bash developers.
Comment 2 Vitaly Kushneriuk (RETIRED) gentoo-dev 2002-02-04 06:07:21 UTC
no additional comments received, so I change it to WORKSFORME
Comment 3 Tim van den Elsen 2002-02-04 06:23:48 UTC
Sorry for this late reaction, i couldn't do it any earlier.. this is the output
of: ls /var/db/pkg/sys-apps/bash*

timmie@vitalie timmie $ ls /var/db/pkg/sys-apps/bash*
CATEGORY  CHOST     CXXFLAGS  PF       RDEPEND  bash-2.05a-r1.ebuild
CFLAGS    CONTENTS  LICENSE   PROVIDE  USE
timmie@vitalie timmie $ 

this is the output of the "set" command running it in X (xterm):

timmie@vitalie timmie $ set
BASH=/bin/bash
BASH_VERSINFO=([0]="2" [1]="05a" [2]="0" [3]="1" [4]="release"
[5]="i686-pc-linux-gnu")
BASH_VERSION='2.05a.0(1)-release'
CLASSPATH=/opt/blackdown-jre-1.3.1/lib/rt.jar
COLUMNS=80
CVS_RSH=/usr/bin/ssh
DIRSTACK=()
DISPLAY=:0.0
EDITOR=/usr/bin/nano
EUID=1000
GNUSTEP_LOCAL_ROOT=/usr/lib/GNUstep
GROUPS=()
HISTFILE=/home/timmie/.bash_history
HISTFILESIZE=500
HISTSIZE=500
HOME=/home/timmie
HOSTNAME=vitalie
HOSTTYPE=i686
HUSHLOGIN=FALSE
HZ=100
IFS=$' \t\n'
INFODIR=/usr/share/info:/usr/X11R6/info:/opt/wine/info
JAVA_HOME=/opt/blackdown-jre-1.3.1
JRE_HOME=/opt/blackdown-jre-1.3.1
LESSOPEN='|lesspipe.sh %s'
LINES=24
LOGNAME=timmie
MACHTYPE=i686-pc-linux-gnu
MAIL=/var/spool/mail/timmie
MAILCHECK=60
MANPATH=/usr/share/man:/usr/X11R6/man:/opt/wine/man
MOZILLA_FIVE_HOME=/usr/lib/mozilla
OPTERR=1
OPTIND=1
OSTYPE=linux-gnu
PAGER=/usr/bin/less
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin:/opt/blackdown-jre-1.3.1/bin:/usr/qt/3/bin:/usr/qt/2/bin:/opt/wine/bin
PIPESTATUS=([0]="0")
PPID=811
PS1='\[\033[01;32m\]\u@\h \[\033[01;34m\]\W \$ \[\033[00m\]'
PS2='> '
PS4='+ '
PWD=/home/timmie
QMAKESPEC=linux-g++
QTDIR=/usr/qt/2
SHELL=/bin/bash
SHELLOPTS=braceexpand:hashall:histexpand:monitor:history:interactive-comments:emacs
SHLVL=3
TERM=xterm
UID=1000
USER=timmie
WINDOWID=31457294
WMAKER_BIN_NAME=wmaker
WRASTER_COLOR_RESOLUTION0=4
XAUTHORITY=/home/timmie/.Xauthority
XINITRC=/etc/X11/xinit/xinitrc
_=/var/db/pkg/sys-apps/bash-2.05a-r1
timmie@vitalie timmie $ 

this is the output of "set" in console mode (not in X):

BASH=/bin/bash
BASH_VERSINFO=([0]="2" [1]="05a" [2]="0" [3]="1" [4]="release" [5]="i686-pc-lin$
BASH_VERSION='2.05a.0(1)-release'
CLASSPATH=/opt/blackdown-jre-1.3.1/lib/rt.jar
COLUMNS=80
CVS_RSH=/usr/bin/ssh
DIRSTACK=()
EDITOR=/usr/bin/nano
EUID=1000
GNUSTEP_LOCAL_ROOT=/usr/lib/GNUstep
GROUPS=()
HISTFILE=/home/timmie/.bash_history
HISTFILESIZE=500
HISTSIZE=500
HOME=/home/timmie
HOSTNAME=vitalie
HOSTTYPE=i686
HUSHLOGIN=FALSE
HZ=100
IFS=$' \t\n'
INFODIR=/usr/share/info:/usr/X11R6/info:/opt/wine/info
JAVA_HOME=/opt/blackdown-jre-1.3.1
JRE_HOME=/opt/blackdown-jre-1.3.1
LESSOPEN='|lesspipe.sh %s'
LINES=25
LOGNAME=timmie
MACHTYPE=i686-pc-linux-gnu
MAIL=/var/spool/mail/timmie
MAILCHECK=60
MANPATH=/usr/share/man:/usr/X11R6/man:/opt/wine/man
MOZILLA_FIVE_HOME=/usr/lib/mozilla
OPTERR=1
OPTIND=1
OSTYPE=linux-gnu
PAGER=/usr/bin/less
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin:/opt/blackdown-jre-1.3.1/bin:/$
PIPESTATUS=([0]="0")
PPID=1
PS1='\[\033[01;32m\]\u@\h \[\033[01;34m\]\W \$ \[\033[00m\]'
PS2='> '
PS4='+ '
PWD=/home/timmie
QMAKESPEC=linux-g++
QTDIR=/usr/qt/2
SHELL=/bin/bash
SHELLOPTS=braceexpand:hashall:histexpand:monitor:history:interactive-comments:e$
SHLVL=1
TERM=linux
UID=1000
USER=timmie
XINITRC=/etc/X11/xinit/xinitrc
_=--color=auto

That was it.. i am sorry for not putting the output in an attached file.. i am
new to bugzilla and therefor don't know how :)

Regards,

Tim
Comment 4 Tim van den Elsen 2002-02-04 06:27:27 UTC
ps. i see OSTYPE etc included that's because a friend of mine manually inserted
them... they weren't there before.
Comment 5 Vitaly Kushneriuk (RETIRED) gentoo-dev 2002-02-14 01:33:39 UTC
please try "env - sh --norc --noprofile -c set"
and attach the output.
Comment 6 Tim van den Elsen 2002-02-14 03:41:25 UTC
timmie@vitalie timmie $ env - sh --norc --noprofile -c set
BASH=/bin/sh
BASH_VERSINFO=([0]="2" [1]="05a" [2]="0" [3]="1" [4]="release" [5]="i686-pc-linu
x-gnu")
BASH_VERSION='2.05a.0(1)-release'
DIRSTACK=()
EUID=1000
GROUPS=()
HOSTNAME=vitalie
HOSTTYPE=i686
IFS=' 
'
MACHTYPE=i686-pc-linux-gnu
OPTERR=1
OPTIND=1
OSTYPE=linux-gnu
PATH=/usr/gnu/bin:/usr/local/bin:/usr/ucb:/bin:/usr/bin:.
POSIXLY_CORRECT=y
PPID=771
PS4='+ '
PWD=/home/timmie
SHELL=/bin/bash
SHELLOPTS=braceexpand:hashall:interactive-comments:posix
SHLVL=1
TERM=dumb
UID=1000
_=sh
timmie@vitalie timmie $ 

Regards,

Tim
Comment 7 Vitaly Kushneriuk (RETIRED) gentoo-dev 2002-02-14 03:44:37 UTC
well... OSTYPE and HOSTTYPE seem to be there, and VENDOR is
not mentioned in 'man bash', to have it please post a bug
to bash developers.