Apache OpenOffice (AOO) Bugzilla – Issue 10342
setup script improvement
Last modified: 2003-11-23 11:39:07 UTC
The 'setup' shell script attempts to locate the 'test' binary by executing 'uname -s' and then guessing the location based on the result and some a-priori knowledge about where it is 'supposed to be' installed. This is an awkward procedure and in fact fails on my system, which is running Linux and has the 'test' binary installed as '/bin/test' (and, btw., I am using a BASH shell which happens to have a builtin 'test' command). I think instead of trying to make this kind of pseudo-smart guess it would be much more appropriate to just rely on the user having set up a sensible value for the PATH variable. I therefore suggest to run 'which test' first and use 'test=test' if it succeeds. Or, if this is not acceptable for some reason, I suggest replacing the default branch of the case statement, which now reads 'test=/usr/bin/test' with a plain 'test=test'.
Please have a look
Accept this issue will create a patch.
Created attachment 4217 [details] apply this to your setup.sh file or to setup2/script/setup2 with patch -i this.patch.file
This script appears a little strange. We go to all the bother of defining a 'test' command that configure just 'assumes' present and then we use '[' which autobook tells us is not nessecarily implemented. It also suggests that there is about four options that are guaranteed to work in and -L is not one of them (page 273-275 gnu automake book). I have therefore simply moved the script to use '[' like the rest of the script and got rid of the 'test' setup at all. There are a few more portability problems like the fact we do not set LD_LIBRARY_PATH at all if we do not recognise the particular platform.
Created attachment 4517 [details] Revised patch based upon comments from the mailing list.
Created attachment 4518 [details] Sorry missed the "0" fix..
Hi Ken, your patch removes the variable that save the current working directory, but I thought the outcome of our discussion was to do "cd $sd_cwd" to restore the original working directory before actually starting setup.bin (see soffice.sh in project sysui). The rest of the patch looks good though ..
Created attachment 4544 [details] complete I fixed this on the wrong tree, too many version of my HardDisk
Hi Ken, as I already wrote to the porting list, we have to revert the cd $sd_cwd change because it causes setup to fail during initial installation process. also I can't approve the revision of setup.sh you derived your patch from for use in StarOffice, because a) the -L switch doesn't work with solaris sh (suggest to use -h instead) b) there are two occurances of '==' which also don't work on solaris and should IMHO be replaced by '=' Having the same revision in OOo and SO would ensure that contributed changes won't get lost anymore when switching to a new branch, so it may be worth to create a version of the script that suits both. Also it seems to me that making LD_LIBRARY_PATH the default switch argument would be a good idea, enumerating just the unix flavors that need something else. What do you think ?
i will take care of the -h issue as well as the LD_LIBRARY_PATH
changes should go into CWS vcl04
pl->obr: fixed in vcl04
Damn stupid task handling ..
Works fins on Solaris sparc & Linux x86
As mentioned on the qa dev list on March 5th I will close all resolved <wontfix/duplicate/worksforme/invalid> issues. Please see this posting for details.