[ksh93-integration-discuss] Trouble with /usr/bin/sum ... / was: Re: installing java re fails using bash due to problems with /usr/bin/sum
Alexander Stecker
alexander.stecker at kollerbeck.de
Thu Nov 29 08:03:23 PST 2007
Roland Mainz schrieb:
> Richard Lowe wrote:
>> Alexander Stecker <alexander.stecker at kollerbeck.de> writes:
>>> Bart Smaalders schrieb:
>>>> Alexander Stecker wrote:
>>>>> Bart Smaalders schrieb:
>>>>>> Alexander Stecker wrote:
> [snip]
>>>>> as at solstice:/usr/bin$ md5sum /usr/bin/sum /usr/gnu/bin/sum
>>>>> 18f3d84bdbfde9c6c3d36a5ad4d8bfbf /usr/bin/sum
>>>>> db6538ef7a5436a08fa87a450ac5a4d0 /usr/gnu/bin/sum
>>>>> as at solstice:/usr/bin$ uname -a
>>>>> SunOS solstice 5.11 snv_75 i86pc i386 i86pc
>>>> Your sum version doesn't match. Where did it come from?
>>> i've installed the latest ksh93 tarball from the ksh integration
>>> project. in the tarball file list
>>> (http://www.opensolaris.org/os/project/ksh93-integration/downloads/ksh93_integration_20071105_snapshot_i386.lsfiles.txt)
>>>
>>> i found the explanation:
>>>
>>> hr-xr-xr-x test001/users 0 2007-11-06 04:09:14 usr/bin/sum link to
>>> usr/bin/bg
>> >From memory, ksh93 has a builtin sum(1), it looks like Roland enabled
>> that (I would bet that usr/bin/bg was a shellscript, similar to the
>> 'alias.ksh' hack that current ksh uses).
>
> Right... but that doesn't explain his problems. The "sum" builtin (and
> /usr/bin/sum which is a shell script which calls the ksh93 "sum" builtin
> like this:
> -- snip --
> #!/usr/bin/ksh93
> builtin basename
> cmd="$(basename "$0")"
> ${cmd} "$@"
> -- snip --
> ) should return the same hash values as the old Solaris /usr/bin/sum
>
> Alex:
> 1. Could you please post the output of:
> $ bash -c 'echo "chicken monster" | sum'
> $ ksh93 -c 'echo "chicken monster" | sum'
root:
# bash -c 'echo "chicken monster" | sum'
32758 1
# ksh93 -c 'echo "chicken monster" | sum'
32758 1
non-root:
as at solstice:~$ bash -c 'echo "chicken monster" | sum'
1543 1
as at solstice:~$ ksh93 -c 'echo "chicken monster" | sum'
1543 1
looks as i screw up something...
>
> 2. Is it possible that you upload the java tarballs which caused the
> problem somewhere to the net (where I can access them) and post the
> output of $ /usr/sfw/bin/openssl md5 name-of-java-tarball # back to this
> list, please ?
i've downloaded the java file from
http://java.com/en/download/solaris_manual.jsp?locale=en&host=java.com
(x86 version). to get comparable results i've uploaded "my" file to
http://sv-kollerbeck.de/dl/jre-6u3-solaris-i586.sh
as at solstice:~/Desktop$ /usr/sfw/bin/openssl md5 jre-6u3-solaris-i586.sh
MD5(jre-6u3-solaris-i586.sh)= 5b25269d5059a04411be992ac630b926
>
> 3. Could you please post the output of /usr/bin/env to an reply to this
> email ? Somehow my feeling tells me that PATH vs. builtin path bindings
> is responsible for this screw-up.
>
root:
# /usr/bin/env
DESKTOP_STARTUP_ID=
SHELL=/usr/bin/ksh
TERM=xterm
GTK_RC_FILES=/etc/gtk/gtkrc:/export/home/as/.gtkrc-1.2-gnome2
WINDOWID=37748789
USER=as
_AST_FEATURES=UNIVERSE - att
GNOME_KEYRING_SOCKET=/var/tmp/keyring-7baW6a/socket
SESSION_MANAGER=unix/solstice:/tmp/.ICE-unix/458
USERNAME=as
DESKTOP_SESSION=gnome
PATH=/usr/gnu/bin:/usr/gnu/bin:/usr/sbin:/usr/bin:/usr/sbin:/sbin:/usr/sbin:/sbin
GDM_XSERVER_LOCATION=local
PWD=/export/home/as
LANG=C
GDM_LANG=C
PS1=#
VTE_CJK_WIDTH=1
GDMSESSION=gnome
HOME=/export/home/as
SHLVL=2
GNOME_DESKTOP_SESSION_ID=Default
G_FILENAME_ENCODING=@locale,UTF-8
LOGNAME=as
XDG_DATA_DIRS=/usr/local/share/:/usr/share/:/usr/share/gdm/
DISPLAY=:0.0
G_BROKEN_FILENAMES=yes
COLORTERM=gnome-terminal
XAUTHORITY=/export/home/as/.Xauthority
_=/usr/bin/env
non-root:
as at solstice:~$ /usr/bin/env
_=/usr/bin/env
COLORTERM=gnome-terminal
DESKTOP_SESSION=gnome
DESKTOP_STARTUP_ID=
DISPLAY=:0.0
GDMSESSION=gnome
GDM_LANG=C
GDM_XSERVER_LOCATION=local
GNOME_DESKTOP_SESSION_ID=Default
GNOME_KEYRING_SOCKET=/var/tmp/keyring-7baW6a/socket
GTK_RC_FILES=/etc/gtk/gtkrc:/export/home/as/.gtkrc-1.2-gnome2
G_BROKEN_FILENAMES=yes
G_FILENAME_ENCODING=@locale,UTF-8
HOME=/export/home/as
LANG=C
LOGNAME=as
PATH=/usr/bin:/usr/openwin/bin:/usr/sbin:/sbin
PWD=/export/home/as
SESSION_MANAGER=unix/solstice:/tmp/.ICE-unix/458
SHELL=/usr/bin/ksh
TERM=xterm
USER=as
USERNAME=as
VTE_CJK_WIDTH=1
WINDOWID=37748789
XAUTHORITY=/export/home/as/.Xauthority
XDG_DATA_DIRS=/usr/local/share/:/usr/share/:/usr/share/gdm/
_AST_FEATURES=UNIVERSE - att
bye
as
> ----
>
> Bye,
> Roland
>
> P.S.: CC:'ing ksh93-integration-discuss at opensolaris.org - please keep
> the list in the CC: list when you reply...
>
More information about the ksh93-integration-discuss
mailing list