Bug 678142 - Flakey JAR packaging encountered on Fedora 15 when using Mock
Summary: Flakey JAR packaging encountered on Fedora 15 when using Mock
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Dogtag Certificate System
Classification: Retired
Component: Console
Version: 9.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Matthew Harmsen
QA Contact: Chandrasekar Kannan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-02-16 21:23 UTC by Matthew Harmsen
Modified: 2015-01-04 23:46 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-02-22 00:02:46 UTC
Embargoed:


Attachments (Terms of Use)
Resource File diffs (304.93 KB, patch)
2011-02-19 00:59 UTC, Matthew Harmsen
jmagne: review+
Details | Diff

Description Matthew Harmsen 2011-02-16 21:23:58 UTC
Kevin Wright's nightly builds using 'mock' appear to construct the 'dogtag-pki-console-theme' JAR file incorrectly.

For example, performing an 'unzip -l pki-console-theme.jar' on a correctly packaged jar file should yield the following:
Archive:  pki-console-theme.jar
  Length     Date   Time    Name
 --------    ----   ----    ----
   305406  01-01-80 00:00   CMSAdminRS.properties
        0  01-01-80 00:00   META-INF/
       71  01-01-80 00:00   META-INF/MANIFEST.MF
        0  01-01-80 00:00   com/
        0  01-01-80 00:00   com/netscape/
        0  01-01-80 00:00   com/netscape/admin/
        0  01-01-80 00:00   com/netscape/admin/certsrv/
        0  01-01-80 00:00   com/netscape/admin/certsrv/theme/
     5565  01-01-80 00:00   com/netscape/admin/certsrv/theme/certmgmt.gif
        0  01-01-80 00:00   com/netscape/management/
        0  01-01-80 00:00   com/netscape/management/client/
        0  01-01-80 00:00   com/netscape/management/client/theme/
        0  01-01-80 00:00   com/netscape/management/client/theme/images/
     5565  01-01-80 00:00   com/netscape/management/client/theme/images/ConsoleBanner.gif
    20908  01-01-80 00:00   com/netscape/management/client/theme/images/login.gif
      994  01-01-80 00:00   com/netscape/management/client/theme/images/logo16.gif
     1458  01-01-80 00:00   com/netscape/management/client/theme/images/logo32.gif
     1302  01-01-80 00:00   com/netscape/management/client/theme/theme.properties
 --------                   -------
   341269                   18 files


Whereas, kwright's nightly 'mock' builds on Fedora 15 (and Fedora 14) yield the following:

Archive:  pki-console-theme.jar
  Length     Date   Time    Name
 --------    ----   ----    ----
        0  02-11-11 07:02   META-INF/
       71  02-11-11 07:02   META-INF/MANIFEST.MF
   305406  02-11-11 07:02   ../CMSAdminRS.properties
     1302  02-11-11 07:02   com/netscape/management/client/theme/theme.properties
    20908  02-11-11 07:02   com/netscape/management/client/theme/images/login.gif
     5565  02-11-11 07:02   com/netscape/management/client/theme/images/ConsoleBanner.gif
      994  02-11-11 07:02   com/netscape/management/client/theme/images/logo16.gif
     1458  02-11-11 07:02   com/netscape/management/client/theme/images/logo32.gif
     5565  02-11-11 07:02   com/netscape/admin/certsrv/theme/certmgmt.gif
 --------                   -------
   341269                   9 files

The problem appears to be that the 'jar' executable does not strip and expand the path location, and thus "../CMSAdminRS.properties" is not found.

Comment 1 Matthew Harmsen 2011-02-18 23:22:10 UTC
The following IRC conversation took place on the #dogtag-pki channel:

<gladiac> mharmsen: ping
<mharmsen> gladiac: pong
<gladiac> mharmsen: It was a bug in 2.6.4
<gladiac> the bahaviour in 2.8 is correct
<gladiac> if you do a copy
<mharmsen> gladiac: is there a specific bug that you are referring to?
<gladiac> what we do here
<gladiac> it should end up in the same directory
<gladiac> mharmsen: if we deal with resource files in a .jar
<gladiac> then you have a structure and it should be the same in the jar file
<gladiac> so if you copy a file from source dir to the binary dir it needs to be in the same dir
<gladiac> so 2.8 does the copy correctly but not 2.6.4
<gladiac> you should move CMSAdminRS.properties to the correct location in the source
<mharmsen> are you referring to https://bugzilla.redhat.com/show_bug.cgi?id=678142?
<gladiac> yes
<gladiac> mharmsen: so move it to the right directory to get rid of the .. and it should work on cmake 2.6 and 2.8
<mharmsen> okay -- I can move the properties file within the source, but I always had it work correctly using cmake 2.6.4, and generally using 2.8.x --- it was only using cmake 2.8.x from mock that there was always a problem (I can certainly move the properties file and change the cmakelists.txt file)
<mharmsen> hopefully this will resolve it

Comment 2 Matthew Harmsen 2011-02-19 00:59:01 UTC
Created attachment 479635 [details]
Resource File diffs

Comment 3 Matthew Harmsen 2011-02-19 01:30:45 UTC
TIP:

# cd pki

# svn status | grep -v ^$ | grep -v ^P | grep -v ^X | grep -v ^?
A  +    dogtag/console-ui/src/CMSAdminRS.properties
M       dogtag/console-ui/src/CMakeLists.txt
D       dogtag/console-ui/CMSAdminRS.properties
M       dogtag/console-ui/build.xml

# svn commit
Deleting       dogtag/console-ui/CMSAdminRS.properties
Sending        dogtag/console-ui/build.xml
Adding         dogtag/console-ui/src/CMSAdminRS.properties
Sending        dogtag/console-ui/src/CMakeLists.txt
Transmitting file data ..
Committed revision 1858.

Comment 4 Matthew Harmsen 2011-02-22 00:02:46 UTC
Closing per CS meeting of 02/21/2011.


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