You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Ian Darwin <ia...@darwinsys.com> on 2000/03/15 20:12:05 UTC

mod_jserv/5889: Jar file created with leading ./ due to unwarranted assumption about jar tool behavior.

>Number:         5889
>Category:       mod_jserv
>Synopsis:       Jar file created with leading ./ due to unwarranted assumption about jar tool behavior.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    jserv
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Wed Mar 15 11:20:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     ian655@darwinsys.com
>Release:        1.3.x
>Organization:
apache
>Environment:
OpenBSD 2.6 i386.
Kaffe 1.0.5.
>Description:
The Makefile in ApacheJServ-1.1/src/java generates the ApacheJServ.jar file.
The list of filenames is created by "find . -name *.java", which emits
filenames with an extraneous leading "./", i.e., "./org/apache/jserv/JServ.class"
Now a given implementation of "jar" may surreptitiously remove those leading
dotslashes, but it is NOT supposed to - there is nothing in Suns' reference
DOCUMENTATION to suggest that it should.  Although you claim only to support
Sun's jdk, the one-line change below will solve this problem for everybody,
and get you away from depending on undocumented behaviors. Strip the leading ./!
>How-To-Repeat:
Build in the above environment.
>Fix:
Sure do, folks! And it's really easy! All ya gotta do is make this
one-line change (which I made to Makefile) to Makefile.in.
$ cd ApacheJServ-1.1/src/java
$ diff Makefile.orig Makefile              
454c454
<               ${JAR} -cf ${ARCHIVE} `${FIND} . \( ${FINDSTRING} \) -print`; \
---
>               ${JAR} -cf ${ARCHIVE} `${FIND} . \( ${FINDSTRING} \) -print|${SED} -e s@^./@@`; \


>Release-Note:
>Audit-Trail:
>Unformatted:
 [In order for any reply to be added to the PR database, you need]
 [to include <ap...@Apache.Org> in the Cc line and make sure the]
 [subject line starts with the report component and number, with ]
 [or without any 'Re:' prefixes (such as "general/1098:" or      ]
 ["Re: general/1098:").  If the subject doesn't match this       ]
 [pattern, your message will be misfiled and ignored.  The       ]
 ["apbugs" address is not added to the Cc line of messages from  ]
 [the database automatically because of the potential for mail   ]
 [loops.  If you do not include this Cc, your reply may be ig-   ]
 [nored unless you are responding to an explicit request from a  ]
 [developer.  Reply only with text; DO NOT SEND ATTACHMENTS!     ]