[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#296456: marked as done (java wrapper script mishandles command line options with arguments)

Your message dated Sun, 18 Sep 2005 05:32:18 -0700
with message-id <E1EGyLC-0002Z4-00@spohr.debian.org>
and subject line Bug#296456: fixed in gcc-4.0 4.0.1-8
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

Received: (at submit) by bugs.debian.org; 22 Feb 2005 15:50:56 +0000
>From olly@survex.com Tue Feb 22 07:50:56 2005
Return-path: <olly@survex.com>
Received: from ixion.tartarus.org [] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1D3cIx-0007Sk-00; Tue, 22 Feb 2005 07:50:31 -0800
Received: from olly by ixion.tartarus.org with local (Exim 3.35 #1 (Debian))
	for submit@bugs.debian.org
	id 1D3cIu-0002V2-00; Tue, 22 Feb 2005 15:50:28 +0000
Date: Tue, 22 Feb 2005 15:50:28 +0000
From: Olly Betts <olly@survex.com>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: java wrapper script mishandles command line options with arguments
Message-ID: <20050222155028.GM15027@survex.com>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="p4qYPpj5QlsIQJ0K"
Content-Disposition: inline
User-Agent: Mutt/1.3.28i
Delivered-To: submit@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE 
	autolearn=no version=2.60-bugs.debian.org_2005_01_02

Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Package: gij-3.4
Version: 3.4.3-9
Tags: patch

The "java" wrapper script doesn't correctly handle command line options
with arguments (e.g. -classpath and -jar) so it doesn't handle cases
like this correctly:

java -classpath myjavaclasses -Djava.library.path=myjni Foo

Once it sees "myjavaclasses", the script switches to just copying
remaining arguments, so it the special handling for -Djava.library.path
doesn't kick in.

I've attached a patch to fix this.


Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="java-classpath-argument.patch"

--- /usr/bin/java	2004-12-18 23:40:26.000000000 +0000
+++ java	2005-02-22 15:20:11.135688449 +0000
@@ -28,12 +28,20 @@
 # Build the command-line from the arguments given.
 my $parsingOptions = 1;
+# Flag used to copy argument to -classpath, -cp, -jar.
+my $copyNext = 0;
 foreach my $arg (@ARGV) {
   if (not $parsingOptions) {
     # We're done parsing options; just copy all remaining arguments directly.
     push @commandLine, $arg;
+  if ($copyNext) {
+    push @commandLine, $arg;
+    $copyNext = 0;
+    next;
+  }
   # Try to interpret Sun-style options.
   if ($arg eq '-version') {
@@ -42,8 +50,10 @@
     push @commandLine, '--help';
   } elsif ($arg eq '-cp' or $arg eq '--cp') {
     push @commandLine, '-cp';
+    $copyNext = 1;
   } elsif ($arg eq '-classpath' or $arg eq '--classpath') {
     push @commandLine, '-classpath';
+    $copyNext = 1;
   } elsif ($arg =~ /^-Djava.library.path=(.+)$/) {
     # A component of the JNI search path has been given.
     if ($JNIPath) {
@@ -51,7 +61,11 @@
     } else {
       $JNIPath = $1;
-  } elsif ($arg eq '-jar' or $arg =~ /^-D/) {
+  } elsif ($arg eq '-jar') {
+    # Copy the argument directly.
+    push @commandLine, $arg;
+    $copyNext = 1;
+  } elsif ($arg =~ /^-D/) {
     # Copy the argument directly.
     push @commandLine, $arg;
   } elsif ($arg =~ /^-/) {


Received: (at 296456-close) by bugs.debian.org; 18 Sep 2005 12:39:31 +0000
>From katie@spohr.debian.org Sun Sep 18 05:39:31 2005
Return-path: <katie@spohr.debian.org>
Received: from katie by spohr.debian.org with local (Exim 3.36 1 (Debian))
	id 1EGyLC-0002Z4-00; Sun, 18 Sep 2005 05:32:18 -0700
From: Matthias Klose <doko@debian.org>
To: 296456-close@bugs.debian.org
X-Katie: $Revision: 1.56 $
Subject: Bug#296456: fixed in gcc-4.0 4.0.1-8
Message-Id: <E1EGyLC-0002Z4-00@spohr.debian.org>
Sender: Archive Administrator <katie@spohr.debian.org>
Date: Sun, 18 Sep 2005 05:32:18 -0700
Delivered-To: 296456-close@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
	autolearn=no version=2.60-bugs.debian.org_2005_01_02

Source: gcc-4.0
Source-Version: 4.0.1-8

We believe that the bug you reported is fixed in the latest version of
gcc-4.0, which is due to be installed in the Debian FTP archive:

  to pool/main/g/gcc-4.0/cpp-4.0-doc_4.0.1-8_all.deb
  to pool/main/g/gcc-4.0/cpp-4.0_4.0.1-8_ia64.deb
  to pool/main/g/gcc-4.0/fastjar_4.0.1-8_ia64.deb
  to pool/main/g/gcc-4.0/fixincludes_4.0.1-8_ia64.deb
  to pool/main/g/gcc-4.0/g++-4.0_4.0.1-8_ia64.deb
  to pool/main/g/gcc-4.0/gcc-4.0-base_4.0.1-8_ia64.deb
  to pool/main/g/gcc-4.0/gcc-4.0-doc_4.0.1-8_all.deb
  to pool/main/g/gcc-4.0/gcc-4.0-locales_4.0.1-8_all.deb
  to pool/main/g/gcc-4.0/gcc-4.0_4.0.1-8.diff.gz
  to pool/main/g/gcc-4.0/gcc-4.0_4.0.1-8.dsc
  to pool/main/g/gcc-4.0/gcc-4.0_4.0.1-8_ia64.deb
  to pool/main/g/gcc-4.0/gcj-4.0_4.0.1-8_ia64.deb
  to pool/main/g/gcc-4.0/gfortran-4.0-doc_4.0.1-8_all.deb
  to pool/main/g/gcc-4.0/gfortran-4.0_4.0.1-8_ia64.deb
  to pool/main/g/gcc-4.0/gij-4.0_4.0.1-8_ia64.deb
  to pool/main/g/gcc-4.0/gnat-4.0-doc_4.0.1-8_all.deb
  to pool/main/g/gcc-4.0/gnat-4.0_4.0.1-8_ia64.deb
  to pool/main/g/gcc-4.0/gobjc-4.0_4.0.1-8_ia64.deb
  to pool/main/g/gcc-4.0/libffi4-dev_4.0.1-8_ia64.deb
  to pool/main/g/gcc-4.0/libffi4_4.0.1-8_ia64.deb
  to pool/main/g/gcc-4.0/libgcc1_4.0.1-8_ia64.deb
  to pool/main/g/gcc-4.0/libgcj-common_4.0.1-8_all.deb
  to pool/main/g/gcc-4.0/libgcj6-awt_4.0.1-8_ia64.deb
  to pool/main/g/gcc-4.0/libgcj6-common_4.0.1-8_all.deb
  to pool/main/g/gcc-4.0/libgcj6-dbg_4.0.1-8_ia64.deb
  to pool/main/g/gcc-4.0/libgcj6-dev_4.0.1-8_ia64.deb
  to pool/main/g/gcc-4.0/libgcj6-src_4.0.1-8_all.deb
  to pool/main/g/gcc-4.0/libgcj6_4.0.1-8_ia64.deb
  to pool/main/g/gcc-4.0/libgfortran0-dev_4.0.1-8_ia64.deb
  to pool/main/g/gcc-4.0/libgfortran0_4.0.1-8_ia64.deb
  to pool/main/g/gcc-4.0/libgnat-4.0_4.0.1-8_ia64.deb
  to pool/main/g/gcc-4.0/libmudflap0-dev_4.0.1-8_ia64.deb
  to pool/main/g/gcc-4.0/libmudflap0_4.0.1-8_ia64.deb
  to pool/main/g/gcc-4.0/libobjc1_4.0.1-8_ia64.deb
  to pool/main/g/gcc-4.0/libstdc++6-4.0-dbg_4.0.1-8_ia64.deb
  to pool/main/g/gcc-4.0/libstdc++6-4.0-dev_4.0.1-8_ia64.deb
  to pool/main/g/gcc-4.0/libstdc++6-4.0-doc_4.0.1-8_all.deb
  to pool/main/g/gcc-4.0/libstdc++6-4.0-pic_4.0.1-8_ia64.deb
  to pool/main/g/gcc-4.0/libstdc++6_4.0.1-8_ia64.deb
  to pool/main/g/gcc-4.0/protoize_4.0.1-8_ia64.deb
  to pool/main/g/gcc-4.0/treelang-4.0_4.0.1-8_ia64.deb

A summary of the changes between this version and the previous one is

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 296456@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
Matthias Klose <doko@debian.org> (supplier of updated gcc-4.0 package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)

Hash: SHA1

Format: 1.7
Date: Sat, 17 Sep 2005 10:35:23 +0200
Source: gcc-4.0
Binary: gcc-4.0-base libstdc++6 lib32ffi4 lib32gcj6-dev libobjc1 libgcc1 libgcj6-dev libgcj6-awt gpc-2.1-4.0 gcc-4.0-nof libstdc++6-4.0-dev lib32stdc++6-4.0-dbg libgcc2 lib64gnat-4.0 lib32gcj6 gpc-2.1-4.0-doc protoize lib64gcj6 treelang-4.0 libgnat-4.0 libstdc++6-4.0-dbg gcc-4.0-doc lib64stdc++6 lib32gfortran0 libffi4 lib64gcj6-awt gfortran-4.0-doc g++-4.0 libgcj6-src lib64ffi4 gcj-4.0 lib32gcc1 lib64stdc++6-4.0-dbg libgfortran0 gobjc-4.0 lib64objc1 cpp-4.0 gcc-4.0-soft-float gcc-4.0 gfortran-4.0 gcc-4.0-locales lib32objc1 libffi4-dev libgcj6 gnat-4.0-doc libgfortran0-dev libgcj-common libgcj6-common libstdc++6-4.0-pic cpp-4.0-doc lib64gcc1 fastjar gcc-4.0-hppa64 gij-4.0 fixincludes libmudflap0-dev libstdc++6-4.0-doc lib32stdc++6 gnat-4.0 libmudflap0 lib32gcj6-dbg lib64gfortran0 libgcj6-dbg
Architecture: source ia64 all
Version: 4.0.1-8
Distribution: unstable
Urgency: medium
Maintainer: Debian GCC Maintainers <debian-gcc@lists.debian.org>
Changed-By: Matthias Klose <doko@debian.org>
 cpp-4.0    - The GNU C preprocessor
 cpp-4.0-doc - Documentation for the GNU C preprocessor (cpp)
 fastjar    - Jar creation utility
 fixincludes - Fix non-ANSI header files
 g++-4.0    - The GNU C++ compiler
 gcc-4.0    - The GNU C compiler
 gcc-4.0-base - The GNU Compiler Collection (base package)
 gcc-4.0-doc - Documentation for the GNU compilers (gcc, gobjc, g++)
 gcc-4.0-locales - The GNU C compiler (native language support files)
 gcj-4.0    - The GNU compiler for Java(TM)
 gfortran-4.0 - The GNU Fortran 95 compiler
 gfortran-4.0-doc - Documentation for the GNU Fortran compiler (gfortran)
 gij-4.0    - The GNU Java bytecode interpreter
 gnat-4.0   - The GNU Ada compiler
 gnat-4.0-doc - Documentation for the GNU Ada compiler (gnat)
 gobjc-4.0  - The GNU Objective-C compiler
 libffi4    - Foreign Function Interface library runtime
 libffi4-dev - Foreign Function Interface library (development files)
 libgcc1    - GCC support library
 libgcj-common - Java runtime library (common files)
 libgcj6    - Java runtime library for use with gcj
 libgcj6-awt - AWT peer runtime libraries for use with gcj
 libgcj6-common - Java runtime library for use with gcj (jar files)
 libgcj6-dbg - Debugging symbols for libraries provided in libgcj6-dev
 libgcj6-dev - Java development headers and static library for use with gcj
 libgcj6-src - libgcj java sources for use in eclipse
 libgfortran0 - Runtime library for GNU Fortran applications
 libgfortran0-dev - GNU Fortran library development
 libgnat-4.0 - Runtime library for GNU Ada applications
 libmudflap0 - GCC mudflap shared support libraries
 libmudflap0-dev - GCC mudflap support libraries (development files)
 libobjc1   - Runtime library for GNU Objective-C applications
 libstdc++6 - The GNU Standard C++ Library v3
 libstdc++6-4.0-dbg - The GNU Standard C++ Library v3 (debugging files)
 libstdc++6-4.0-dev - The GNU Standard C++ Library v3 (development files)
 libstdc++6-4.0-doc - The GNU Standard C++ Library v3 (documentation files)
 libstdc++6-4.0-pic - The GNU Standard C++ Library v3 (shared library subset kit)
 protoize   - Create/remove ANSI prototypes from C code
 treelang-4.0 - The GNU Treelang compiler
Closes: 296456 328684 328705
 gcc-4.0 (4.0.1-8) unstable; urgency=medium
   * Update to CVS 20050917, taken from the gcc-4_0-branch.
     - Fix FTBFS for boost, introduced in 4.0.1-7 (closes: #328684).
   * Fix PR java/23891, eclipse bootstrap.
   * Set priority of gcc-4.0-hppa64 package to standard.
   * Bump standards version to 3.6.2.
   * Fix java wrapper script, mishandles command line options with arguments.
     Patch from Olly Betts. Closes: #296456.
   * Bump epoch of the lib32gcc1 package to the same epoch as for the the
     libgcc1 and lib64gcc1 packages.
   * Fix some lintian warnings.
   * Build libffi on the Hurd (closes: #328705).
   * For biarch builds, disable the testsuite for the non-default architecture
     for runtime libraries, which are not built by default (libjava).
   * Add gsfonts-x11 to Build-Depends-Indep to avoid warnings from doxygen.
   * Install Ada .ali files read-only.
 cc85e40fcdc4bebbf9daa6c2c82d6100 3583 devel standard gcc-4.0_4.0.1-8.dsc
 e038a334df016dc5f38a5bc158993f31 1441353 devel standard gcc-4.0_4.0.1-8.diff.gz
 e1004f325723f52478ccd39d0e435fbb 182496 doc optional cpp-4.0-doc_4.0.1-8_all.deb
 2e12e23370c012357e828da7a9756011 3096948 libs optional libgcj6-common_4.0.1-8_all.deb
 2c49b1cec010b1d17ef489026b706271 1168 libs optional libgcj-common_4.0.1-8_all.deb
 815a7e72c01c782002c9cd3761f520ef 6431148 libdevel optional libgcj6-src_4.0.1-8_all.deb
 011428ea86840350b9c2b33f3e4aa1c2 3280444 doc optional libstdc++6-4.0-doc_4.0.1-8_all.deb
 a913b0c7d9c193f284f259d49a0182e0 104030 doc optional gfortran-4.0-doc_4.0.1-8_all.deb
 7b12792e1b5cc37f97fb45b5b1e87614 942046 doc optional gnat-4.0-doc_4.0.1-8_all.deb
 ee5d540d0119e98a92ac663012543a85 1573198 doc optional gcc-4.0-doc_4.0.1-8_all.deb
 90d01a70d7ae824449cf64599315df64 966738 devel optional gcc-4.0-locales_4.0.1-8_all.deb
 0d014091d6254a055e7461340c27ba27 175804 devel required gcc-4.0-base_4.0.1-8_ia64.deb
 4c1427bdc20e583cc587667ba1f92ca7 89790 libs required libgcc1_4.0.1-8_ia64.deb
 c2d4b15e1f5089f80e0b54c764818a3b 3319336 interpreters standard cpp-4.0_4.0.1-8_ia64.deb
 f04b3acb4fd5aee85c4cd5b82360e2f7 58990 devel optional protoize_4.0.1-8_ia64.deb
 5d236bc61f4c068bc414fc9edcd2e983 81562 devel optional fixincludes_4.0.1-8_ia64.deb
 b272362e2aed62b8b5052623113790b3 188460 libs optional libmudflap0_4.0.1-8_ia64.deb
 58fbe8fa867f9e31f2774a5efb990fef 158026 libdevel optional libmudflap0-dev_4.0.1-8_ia64.deb
 ea7a065100ef53df9847964bb6e7531b 3397426 devel optional gobjc-4.0_4.0.1-8_ia64.deb
 25b8e93037d7ac1f045b18939b7e8799 145692 libs optional libobjc1_4.0.1-8_ia64.deb
 f59eb9f39692f4361799e4acecb1359f 33268 devel optional gij-4.0_4.0.1-8_ia64.deb
 ad6f6c7ccfc70258777884f217306300 7273072 libs optional libgcj6_4.0.1-8_ia64.deb
 68e6aed606f15fc370ace69fe1aa1da7 348252 libs optional libgcj6-awt_4.0.1-8_ia64.deb
 69314677bc2aadccda7b3d45bdc639af 3843468 devel optional gcj-4.0_4.0.1-8_ia64.deb
 2511f59940a6aeda2459c0166493f904 10307530 libdevel optional libgcj6-dev_4.0.1-8_ia64.deb
 4c463e989fa55cce2bef124d6997285e 8045930 libdevel extra libgcj6-dbg_4.0.1-8_ia64.deb
 040d646d8d617f8d16453319e7cb3553 151910 devel optional fastjar_4.0.1-8_ia64.deb
 73992b3d1886ee72cf2aef5e359bb1e6 96110 libs optional libffi4_4.0.1-8_ia64.deb
 e7f6b5e3f52067117be253c3800b0f7f 13316 libdevel optional libffi4-dev_4.0.1-8_ia64.deb
 ac6287af527f7bd13289a6b323d27026 3822086 devel standard g++-4.0_4.0.1-8_ia64.deb
 83719c1964810bb5cb84ba97ffd8257e 447168 libs required libstdc++6_4.0.1-8_ia64.deb
 c28fc02e4acda698a3dedc01474ad614 1245618 libdevel standard libstdc++6-4.0-dev_4.0.1-8_ia64.deb
 f6bf4d0e81e67c2befe05987e6a7a9a7 695286 libdevel extra libstdc++6-4.0-pic_4.0.1-8_ia64.deb
 2d1862704f33b9418163d7ea72fd6244 6366350 libdevel extra libstdc++6-4.0-dbg_4.0.1-8_ia64.deb
 2ae9429b475edb76eed08b272000c1ff 146668 libs optional libgfortran0_4.0.1-8_ia64.deb
 526139315969ac96f8a5185ecff178da 3543080 devel optional gfortran-4.0_4.0.1-8_ia64.deb
 052f871e65bca8cc73a38dbd4acab80c 190630 libdevel optional libgfortran0-dev_4.0.1-8_ia64.deb
 4475a1fa1e29f73233a9fed78d378edc 1215162 libs optional libgnat-4.0_4.0.1-8_ia64.deb
 718199bb96c22b4ce516f0cc825df061 14837176 devel optional gnat-4.0_4.0.1-8_ia64.deb
 c59cdec63a03bc0b0d7218cfb6e774e8 3066536 devel optional treelang-4.0_4.0.1-8_ia64.deb
 57bcd7fae15741c3266686e26aa948db 521870 devel standard gcc-4.0_4.0.1-8_ia64.deb

Version: GnuPG v1.4.1 (GNU/Linux)


Reply to: