Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 132900 - Netbeans 6.0.x installation fails on Solaris 2.8
Netbeans 6.0.x installation fails on Solaris 2.8
Status: VERIFIED FIXED
Product: installer
Classification: Unclassified
Component: NBI
6.x
Sun Solaris
: P3 (vote)
: 6.x
Assigned To: dlipin
issues@installer
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-04-15 15:59 UTC by john_hadstate
Modified: 2008-08-18 10:13 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
:


Attachments
Requested result of running with --verbose --output out.txt (2.28 KB, text/plain)
2008-04-16 17:40 UTC, john_hadstate
Details
Output of "df -k" under Linux (514 bytes, text/plain)
2008-04-17 12:28 UTC, john_hadstate
Details
Output of "df -k" under Solaris 8 (578 bytes, text/plain)
2008-04-17 12:29 UTC, john_hadstate
Details
Output of "sh -x ./netb*.sh" captured by "script" (32.59 KB, text/plain)
2008-04-17 12:31 UTC, john_hadstate
Details
Output of "man test" under Solaris 8 (Unix format) (28.53 KB, text/plain)
2008-04-17 13:06 UTC, john_hadstate
Details

Note You need to log in before you can comment on or make changes to this bug.
Description john_hadstate 2008-04-15 15:59:41 UTC
Netbeans 6.0.x installation fails because Solaris 2.8 does not support the "df -h" command line switch.

Workaround:

(1) Create a shell script called "df" in your /tmp directory. df contains 1 line:

/usr/sbin/df -k $2

(2) Add /tmp to the front of your path:

PATH=/tmp:$PATH
export PATH

(3) Execute the Netbeans installer (as a command to bash):

bash /tmp/netb*.sh
Comment 1 dlipin 2008-04-16 10:47:08 UTC
Unfortunately Solaris 8 (2.8) is not the supported platform. 
We`ve get some feedback that NetBeans installer is not working due to some arguments missing in "test" command as well.

The other workaround is to run installer with --nospacecheck argument - that will disable df calls (this work with 6.1 
Beta and later).

John, could you please run installer without any workarounds applied in verbose mode and attach resulting out.txt here?
netbeans-6.0.1-ml-solaris-sparc.sh --verbose --output out.txt

thanks,
Dmitry
Comment 2 john_hadstate 2008-04-16 16:06:36 UTC
The problem with missing test arguments on Sol 2.8 is cured by running the install script as follows (the "bash" is 
required, even if you are logged-in under bash):

# bash netbeans-6.0.1-ml-solaris-sparc.sh

Comment 3 john_hadstate 2008-04-16 17:40:05 UTC
Created attachment 60299 [details]
Requested result of running with --verbose --output out.txt
Comment 4 dlipin 2008-04-16 18:58:41 UTC
John,

Do I understand you correctly that you experienced (saw) the original issue in the installer UI ? 
I checked that "df -h" is executed only at the last installation panel. It is used to get file system roots mounted at 
the installation time.

I guess it would be safe to change "df -h" -> "df -k" the output format is pretty much the same (in the area that we 
are interested).

I would do the change on development builds.
Please check the next daily build (>200804170000) at
http://bits.netbeans.org/dev/nightly/latest

Please let me know if the issue with df is no more reproducible and the workaround your suggested (creating special df 
script) is no more needed. Anyway calling via bash is still required...

BTW, what is the test argument that fail the installer? In other words, the test argument that is missing and could be 
solved my execution the installer via bash.
-d ? -L ? -f ? -x ?

Thanks,
Dmitry
Comment 5 john_hadstate 2008-04-17 11:41:09 UTC
Yes, after overcoming the "bash" problem, the "df -h" problem manifested itself in the last installer frame (just 
before beginning the actual installation) as a message down in the lower left of the frame that said something about 
the chosen install directory not being part of the file system (or words to that effect).  The "install" button was 
disabled, so the only choices were "back" and "cancel".  When I checked the installer log I discovered the "df -h" 
problem.  As a result of a lot of searching, I decided that you might be only interested in the first field output 
by "df -h" and noticed that "df -k" under Solaris 8 outputs a similar format.  That's what led me to the workaround.

I will attach two text files that show the output of "df -k" from Linux (Centos 4.4) and Solaris 8.

According to the man pages, "df" on Solaris 8 has the following options in common with Linux (Centos 4.4):

"-a", "-k", "-l", 

Both systems recognize "df -t", but in Linux, the man page says, "limit listing to filesystems of TYPE" whereas on 
Solaris 8 the man page says, "Print full listings with totals...".

I will not be able to test your new build for some time.  For reasons I don't remember, NB6.1Beta was a non-starter on 
my Linux systems (both Centos 4.4 and Centos 5.1) and I was forced to go back to NB6.0.1 in order to get any work 
done.  I really don't have any non-production systems on which to do more testing.

Comment 6 dlipin 2008-04-17 11:56:48 UTC
John,

Thanks a lot for you investigations. That is one of the most outstanding issue description and resolution I have ever 
worked on!

The df problem is clear now.

Could you please find some time to anwser also the question about the "test" command?
In other words, if you run just
> netbeans-6.0.1-ml-solaris-sparc.sh
then the installer fails at the very beginning.
If you run 
> bash netbeans-6.0.1-ml-solaris-sparc.sh
then it works. 
What command it failes in first case? Are there any error messages written in the console?
Could you please also attach the output of "man test" command from Solaris 8? It will help much to catch the "test" 
issue.
Comment 7 john_hadstate 2008-04-17 12:25:15 UTC
I just realized what you were asking at the end of your message from 17:58:41.  I will attach a text file that 
represents the output of "sh -x" captured using "script".  This may lead you to the statement with the missing 
argument.

-- jeh
Comment 8 john_hadstate 2008-04-17 12:28:42 UTC
Created attachment 60334 [details]
Output of "df -k" under Linux
Comment 9 john_hadstate 2008-04-17 12:29:40 UTC
Created attachment 60335 [details]
Output of "df -k" under Solaris 8
Comment 10 john_hadstate 2008-04-17 12:31:11 UTC
Created attachment 60336 [details]
Output of "sh -x ./netb*.sh" captured by "script"
Comment 11 dlipin 2008-04-17 12:44:21 UTC
Hi,

Thanks a lot for the attachments! It looks like it is -L test operand that is not working..

Could you please attach also the output of "man test"?
Comment 12 john_hadstate 2008-04-17 13:06:21 UTC
Created attachment 60337 [details]
Output of "man test" under Solaris 8 (Unix format)
Comment 13 john_hadstate 2008-04-17 13:10:46 UTC
I have attached the raw man page for "man test" under Solaris 8.  I have not run this file through unix2dos, so it is 
still in the original format.  If you can save this attachment on a Linux box and then view it with "less", you can 
see the original man page formatting.  Otherwise, it's pretty rough.

--jeh
Comment 14 dlipin 2008-04-17 13:11:35 UTC
Hm.. strange. -L is listed amount the arguments.

Does "test -L /tmp" produces any output?
Comment 15 john_hadstate 2008-04-17 13:54:26 UTC
On Sol8, under "bash", "test -L /tmp" produces no output.  However, under "sh", "test -L /tmp" produces "test: 
argument expected".

I also tried this:

touch foo.bar
ln -s foo.bar yyy

Under sh:
=========
test -L yyy
test: argument expected
echo $?
1

Under bash:
===========
test -L yyy
echo $?
0
test -L foo.bar
echo $?
1

So, for now, it looks like users of Sol8 need to force installation under bash.
Comment 16 dlipin 2008-04-17 14:17:23 UTC
I hope the last question: does "test -h /tmp" work under sh?
Comment 17 john_hadstate 2008-04-17 14:33:35 UTC
Here's what we just found:

(1) After a little probing with Google, this appears to be a known problem with Sol8 and a lot of people are upset 
about it.  I do not know whether Sun has fixed this in subsequent releases of Solaris.  We have the latest roll-up 
patches for Sol8 installed, and all of our systems show the same problem.

(2) Apparently, sh has an internal implementation of "test" that is not the same as "/usr/bin/test".  Try the 
following:

touch foo.bar
ln -s foo.bar yyy

/usr/bin/test -L yyy

if [ $? -eq 0 ]; then
   echo "This is a link"
else
   echo "This is not a link"
fi

Comment 18 john_hadstate 2008-04-17 14:39:19 UTC
Yes, "test -h yyy" returns 0 if yyy exists and is a symlink, 1 if not.  I don't know what other conditions might cause 
it to return 0.

test -h yyy
echo $?
0
test -h /tmp
echo $?
1
test -h nonexistant
echo $?
1


Comment 19 dlipin 2008-04-28 17:49:58 UTC
The issue with test argument (-L vs -h) has been fixed in development builds.
http://hg.netbeans.org/main/rev/f2c652d695da

The fix should be available in builds starting with 200804290000
http://bits.netbeans.org/dev/nightly/latest/

John, could you please verify?

Dmitry
Comment 20 Quality Engineering 2008-04-29 04:18:51 UTC
Integrated into 'main-golden', available in NB_Trunk_Production #164 build
Changeset: http://hg.netbeans.org/main/rev/f2c652d695da
User: Dmitry Lipin <dlipin@netbeans.org>
Log: Issue #132900 Netbeans 6.0.x installation fails on Solaris 2.8
Comment 21 dlipin 2008-08-18 10:13:02 UTC
Verified with 6.5 beta version.

E-mail from John:
I thought you might like to know that I downloaded Netbeans 6.5beta today and installed it on a Solaris 8 system.  The 
installation worked flawlessly and Netbeans started up with no problem.  Just for the record, I also had successful 
installs on Centos 4.4 and Centos 5.1 as well as Windows XP with Service Pack 2.
 
I should note that when I installed on Solaris 8, I ran the script from the command line as follows:
 
# bash /tmp/netbeans....sh
 
instead of executing the shell script directly.  I'm not sure this was necessary, but it is sufficient ;-)



By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo