Bug 234286 - brp-java-repack-jars is modifying jar contents that breaks application
Summary: brp-java-repack-jars is modifying jar contents that breaks application
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: redhat-rpm-config (Show other bugs)
(Show other bugs)
Version: 6
Hardware: All Linux
medium
medium
Target Milestone: ---
Assignee: Ben Konrath
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-03-28 06:11 UTC by Ben Konrath
Modified: 2007-11-30 22:12 UTC (History)
3 users (show)

Fixed In Version: 8.0.45-9.fc6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-04-02 13:47:05 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Ben Konrath 2007-03-28 06:11:25 UTC
From bug #227721:

Description of problem:
brp-java-repack-jars is a post processing script run after each rpm build. It's
job is to squash date differences between jars and jar contents so that
multi-lib packages do not throw errors.

In it's current state, the script unpacks jars, changes dates, and then packs
the files again using 'zip'. However, it does not re-pack the directories in the
jars (directories are treated as separate entries in a zip). As a result, if
there is an associated INDEX.LIST file in the jar, the index contents will not
match the jar contents, causing the classloader to throw an exception and abort.

Version-Release number of selected component (if applicable):
All

How reproducible:
Always

Steps to Reproduce:
1. Build the tomcat5 rpm
2. Install the built rpm
3. Start the tomcat5 service with a proprietary JVM
  
Actual results:
Service does not start. The log (/var/log/tomcat5/catalina.out) shows an invalid
index exception.

Expected results:
Service should start, and the log should have no exceptions.

Additional info:
We have a fix that we are currently verifying. After the fix is in, tomcat5,
antlr, mysql-connector-java and jakarta-commons-modeler will need to be rebuilt.

Comment 1 Ben Konrath 2007-03-28 06:14:10 UTC
Deepak, Will I need to push an update for tomcat5, antlr, mysql-connector-java
and jakarta-commons-modeler after the update to redhat-rpm-config goes out in FC6?

Comment 2 Ben Konrath 2007-03-28 07:36:39 UTC
I just did a local build of tomcat5-5.5.17-8jpp.1 (latest in FC-6 cvs) with the
fixed redhat-rpm-config (8.0.45-9.fc6) and I get this problem when I try to
start it:

 % sudo service tomcat5 start
Starting tomcat5: runuser: warning: cannot change directory to
/usr/share/tomcat5: Permission denied
/etc/profile.d/colorls.sh: line 14: dircolors: command not found
/etc/profile.d/krb5.sh: line 5: /usr/bin/id: Permission denied
/etc/profile.d/krb5.sh: line 5: [: =: unary operator expected
-bash: /usr/share/tomcat5/.bash_profile: Permission denied
-bash: /usr/bin/dtomcat5: Permission denied
                                                           [FAILED]

I get the same problem with tomcat5-5.5.17-6jpp.2 (orginally shipped with FC-6
final). Am I doing something wrong here? 

The fixed redhat-rpm-config (8.0.45-9.fc6) should show up in updates-testing soon.

Comment 3 Deepak Bhole 2007-03-28 14:57:59 UTC
Vivek, please see comments above re: tomcat5

Comment 4 Vivek Lakshmanan 2007-03-28 15:55:55 UTC
Tried the same thing on a local FC-6 machine with tomcat5-5.5.17-6jpp.2:

$ rpm -q tomcat5
tomcat5-5.5.17-6jpp.2

$ cat /etc/redhat-release
Fedora Core release 6 (Zod)

$ sudo service tomcat5 start
Starting tomcat5: Using CATALINA_BASE:   /usr/share/tomcat5
Using CATALINA_HOME:   /usr/share/tomcat5
Using CATALINA_TMPDIR: /usr/share/tomcat5/temp
Using JRE_HOME:
                                                           [  OK  ]
I can verify that tomcat5 is up and running

Must be something with your environment...


Comment 5 Ben Konrath 2007-03-29 06:49:25 UTC
Ok, I found a different box that has a working tomcat. To test the
brp-java-repack-jars script I installed redhat-rpm-config-8.0.45-9.fc6,
re-compiled tomcat5-5.5.17-6jpp.3 (just bumped the version number of
tomcat5-5.5.17-6jpp.2) and installed it. I was able to start tomcat from
tomcat5-5.5.17-6jpp.3 so redhat-rpm-config-8.0.45-9.fc6 does indeed fix the
problem. I am going to request redhat-rpm-config-8.0.45-9.fc6 go out to final.


Note You need to log in before you can comment on or make changes to this bug.