Name: gm110360 Date: 01/20/2004
FULL PRODUCT VERSION :
1.4.2-03
ADDITIONAL OS VERSION INFORMATION :
Linux beta 2.6.1-rc1 #1 Sun Jan 4 22:25:17 EST 2004 i686 AuthenticAMD unknown GNU/Linux
EXTRA RELEVANT SYSTEM CONFIGURATION :
The system is NPTL enabled. I'm using glibc CVS from 2004-Jan-03 (since Ulrich Drepper doesn't want to release any more tarballs, CVS is the only choice, at least for the moment) built against kernel 2.6.X in order to enable it.
A DESCRIPTION OF THE PROBLEM :
This newer glibc (CVS from 2004-Jan-03) defines _POSIX2_VERSION to 200112L in unistd.h, which makes GNU coreutils conform to the newer POSIX2 spec (1003.1-2001 instead of 1003.1-1992) with respect to command-line arguments.
The info pages for head, tail, etc. have said for quite a while that the syntax -COUNTUNITS and +COUNT (where "COUNT" is a number, and "UNITS" is an optional letter) were obsolete and would be removed eventually -- well when _POSIX2_VERSION is defined to 200112L in unistd.h (and not set to 199209 in the environment), it's removed.
The installer for 1.4.2-03 on Linux (not the RPM, the other one) tries to invoke "tail -1 somefile" and "tail +473 someotherfile". These fail, since the first is deprecated by tail, and the second is supposed to grab the last 10 lines out of the file named "+473" according to 1003.1-2001.
The offending tail invocations are on lines 324 and 332 of the .bin file.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Get on a system with recent glibc, that hasn't patched coreutils to make the old behavior the default. (Fedora, for example, *has* patched coreutils -- when installing my system, I've patched everything *else* instead, to fix the broken scripts or Makefiles or whatever. I can't just patch the .bin file, because then the checksum fails.)
Run the .bin file for j2sdk 1.4.2-03. Accept the license.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The package should checksum, then decompress into a directory below the current one named "j2sdk1.4.2_03".
ACTUAL -
Two errors from tail, and an apparent failed checksum. No decompression.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
Do you agree to the above license terms? [yes or no]
y
tail: `-1' option is obsolete; use `-n 1`
Try `'tail --help' for more information.
/path/to/j2sdk-1_4_2_03-linux-i586.bin: line 325: [: -lt: unary operator expected
Unpacking...
tail: +473: No such file or directory
Checksumming...
1
The download file appears to be corrupted. Please refer
to the Troubleshooting section <yadda yadda>.
Please do not attempt to install from this archive file.
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND :
"export _POSIX2_VERSION=199209" before running the installer. This reverts coreutils' behavior to the 1003.1-1992 spec, and the SDK decompresses itself.
There may be other places in the Java 2 build system that use old syntax too, but I don't know that for sure since I'm just trying to install the SDK binaries.
Severity is set to "No Impact" only because of this workaround...
(Incident Review ID: 234679)
======================================================================