Request for review (S): 7099454 /bin/sh does not support syntax used in the src/os/posix/launcher/launcher.script shell script
robert.ottenhag at oracle.com
Tue Oct 11 09:55:57 UTC 2011
If using separate vars, then I suggest that we at least following the common variable name syntax (no underscores), and use MYRELDIR, or MYDIR0 for the temporary variable.
> -----Original Message-----
> From: Mikael Gerdin
> Sent: den 11 oktober 2011 11:50
> To: Robert Ottenhag
> Cc: Bengt Rutisson; hotspot-gc-dev at openjdk.java.net; hotspot-runtime-
> dev at openjdk.java.net
> Subject: Re: Request for review (S): 7099454 /bin/sh does not support
> syntax used in the src/os/posix/launcher/launcher.script shell script
> The GNU autoconf docs claim that nestled backticks is not portable.
> I'm not claiming that they're the definitive resource for this type of
> information but they've worked hard to figure out the quirks of the
> shells on different systems. Given that we seem to be constantly
> expanding our platform matrix we should probably keep this portable.
> On 2011-10-11 11:27, Robert Ottenhag wrote:
> > Bengt,
> > The removal of bashisms looks fine. I also not you remove some multiple
> definitions of MYDIR and and the usused RUNDIR.
> > The following changes
> > + REL_MYDIR=`dirname $0`
> > + MYDIR=`cd $REL_MYDIR&& pwd`
> > should however be written shorter as
> > + MYDIR=`cd \`dirname $0\`&& pwd`
> > /Robert
> >> -----Original Message-----
> >> From: Bengt Rutisson
> >> Sent: den 11 oktober 2011 11:06
> >> To: hotspot-gc-dev at openjdk.java.net; hotspot-runtime-
> dev at openjdk.java.net
> >> Subject: Request for review (S): 7099454 /bin/sh does not support
> >> used in the src/os/posix/launcher/launcher.script shell script
> >> Hi all,
> >> Sending this review request to both Runtime and GC. I think the change
> >> is Runtime responsibility, but I would like to submit it to hotspot-gc
> >> since it is getting in the way of testing that I am doing at the
> >> The problem is that the hotspot script that the build process creates
> >> has been updated to use /bin/sh instead of /bin/bash. This is more
> >> correct since bash is optional. But the /bin/sh shell on Solaris does
> >> not accept some of the syntax in the script.
> >> In particular the $() notation is not supported by Solaris /bin/sh. The
> >> script also contains the bash specific "source" command.
> >> The fix is to change this to use `` and . respectively.
> >> Webrev:
> >> http://cr.openjdk.java.net/~brutisso/7099454/webrev.01/
> >> CR:
> >> 7099454 /bin/sh does not support syntax used in the
> >> src/os/posix/launcher/launcher.script shell script
> >> http://monaco.us.oracle.com/detail.jsf?cr=7099454
> >> Testing
> >> Tested the new script on Linux (Ubuntu) and Solaris. Ran JPRT.
More information about the hotspot-gc-dev