Red Hat Bugzilla – Bug 234286
brp-java-repack-jars is modifying jar contents that breaks application
Last modified: 2007-11-30 17:12:00 EST
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):
Steps to Reproduce:
1. Build the tomcat5 rpm
2. Install the built rpm
3. Start the tomcat5 service with a proprietary JVM
Service does not start. The log (/var/log/tomcat5/catalina.out) shows an invalid
Service should start, and the log should have no exceptions.
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.
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?
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
% 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
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.
Vivek, please see comments above re: tomcat5
Tried the same thing on a local FC-6 machine with tomcat5-5.5.17-6jpp.2:
$ rpm -q tomcat5
$ 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
[ OK ]
I can verify that tomcat5 is up and running
Must be something with your environment...
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.