Bug 243157 - brp-java-repack-jars fails if jar file contains filenames with spaces
brp-java-repack-jars fails if jar file contains filenames with spaces
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: redhat-rpm-config (Show other bugs)
5.0
x86_64 Linux
low Severity high
: ---
: ---
Assigned To: Jon Masters
:
: 207338 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-06-07 12:19 EDT by Roy Bonser
Modified: 2011-02-10 08:20 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-01-20 17:04:43 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch for brp-java-repack-jars to fix the space issue (1.05 KB, patch)
2008-06-04 12:00 EDT, Peter Bieringer
no flags Details | Diff
.src.rpm with jar which contains files with spaces in their names (3.13 KB, application/x-rpm)
2008-07-30 04:45 EDT, Jan Hutař
no flags Details

  None (edit)
Description Roy Bonser 2007-06-07 12:19:55 EDT
Description of problem:
If a jar file contains files with spaces in their names, brp-java-repack-jars
produces errors.

When the results of the find command are fed to the for loop at line #65 the
filenames with spaces are split apart and produce invalid filenames for the
commands within the loop. This may also be a problem with other loops in the
script as well.

Version-Release number of selected component (if applicable):
redhat-rpm-config-8.0.45-17.0.1.el5

How reproducible:
Every time

Steps to Reproduce:
1. Create a jar file that contains files with spaces in their names
2. Build an rpm containing the jar file on x86_64.
3.
  
Actual results:


Expected results:


Additional info:
The problem, for me, showed up while packaging a piece of commercial software so
renaming the files is not an option.
Comment 1 Jeremy Katz 2007-06-19 14:32:11 EDT
*** Bug 207338 has been marked as a duplicate of this bug. ***
Comment 2 Peter Bieringer 2008-06-04 12:00:05 EDT
Created attachment 308362 [details]
Patch for brp-java-repack-jars to fix the space issue
Comment 3 RHEL Product and Program Management 2008-07-21 19:11:02 EDT
This request was evaluated by Red Hat Product Management for
inclusion, but this component is not scheduled to be updated in
the current Red Hat Enterprise Linux release. If you would like
this request to be reviewed for the next minor release, ask your
support representative to set the next rhel-x.y flag to "?".
Comment 5 RHEL Product and Program Management 2008-07-28 16:11:11 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.
Comment 6 Jan Hutař 2008-07-30 04:45:03 EDT
Created attachment 312978 [details]
.src.rpm with jar which contains files with spaces in their names

(Thanks jcastro for that jar)
$ jar tvf with-spaces.jar 
    62 Wed Jul 30 10:04:12 CEST 2008 META-INF/MANIFEST.MF
   552 Wed Jul 30 09:51:52 CEST 2008 org/jboss/test/jar/Main.class
   226 Wed Jul 30 09:50:34 CEST 2008 .classpath
   362 Wed Jul 30 09:50:34 CEST 2008 .project
     0 Wed Jul 30 10:03:38 CEST 2008 resources/many spaces here

I can still reproduce with redhat-rpm-config-8.0.45-24.el5.noarch:

# rpmbuild --rebuild with-spaces-in-jar-0.1-1.src.rpm
...
+ /usr/lib/rpm/redhat/brp-java-repack-jars
cp: cannot stat `./resources/many': No such file or directory
cp: cannot stat `spaces': No such file or directory
cp: cannot stat `here': No such file or directory
Processing files: with-spaces-in-jar-0.1-1
...
Wrote: /usr/src/redhat/RPMS/i386/with-spaces-in-jar-0.1-1.i386.rpm
...
+ exit 0
Comment 8 Jon Masters 2008-09-18 08:12:28 EDT
In redhat-rpm-config-8_0_45-27_el5
Comment 13 errata-xmlrpc 2009-01-20 17:04:43 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-0224.html

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