Bug 1495247 - [xpp3] zip -u in spec file causes race condition
Summary: [xpp3] zip -u in spec file causes race condition
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: xpp3
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Mikolaj Izdebski
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-25 15:05 UTC by Troy Dawson
Modified: 2017-09-25 15:50 UTC (History)
6 users (show)

Fixed In Version: 1.1.4-17.c
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-09-25 15:50:19 UTC
Type: Bug


Attachments (Terms of Use)

Description Troy Dawson 2017-09-25 15:05:31 UTC
Description of problem:
zip -u is being used to update META-INF/MANIFEST.MF in jar files

zip -u will "Update existing entries if newer on the file system"

Unfortunately zip is only looking at the minute that a file is updated.  We are finding on fast test machines that the content of the jar, and the new META-INF/MANIFEST.MF, are being created in the same minute.  Thus when the zip -u is ran, the MANIFEST.MF isn't updated, zip returns a non 0 error code, and the build fails.

"zip -u" should be changed to "zip", which changes the zip command from "update" to "add"

zip (add) will "Update existing entries and add new files. ... This is the default mode."

If you can change your spec files to use just "zip" instead of "zip -u", that will solve this race condition

Version-Release number of selected component (if applicable):
xpp3-1.1.4-16.c.fc27

How reproducible:
5-95% - depending on the speed of the machine.

Steps to Reproduce:
1. koji build
2.
3.

Actual results:

+ zip -u build/lib/<jar-name>.jar META-INF/MANIFEST.MF
RPM build errors:
error: Bad exit status from /var/tmp/rpm-tmp.oh6WeU (%build)
    Bad exit status from /var/tmp/rpm-tmp.oh6WeU (%build)
Child return code was: 1


Expected results:

...
+ zip -u build/lib/<jar-name>.jar META-INF/MANIFEST.MF
updating: META-INF/MANIFEST.MF (deflated 56%)
...

Comment 1 Troy Dawson 2017-09-25 15:10:14 UTC
This is a bit of a blocker bug for fedora modularity.  We are trying to create tools that rebuild the latest modules daily, and this package is failing.

We understand that time is important, and not everyone is able to fix bugs quickly.  If this bug isn't updated in a week, we will have a proven packager apply a fix.  If you know you will not be able to fix this build quickly, and would like us to fix it sooner, please let us know.

Comment 2 Mikolaj Izdebski 2017-09-25 15:40:42 UTC
Fixed in xpp3-1.1.4-17.c

Comment 3 Mikolaj Izdebski 2017-09-25 15:50:19 UTC
I believe that this bug is fixed in xpp3-1.1.4-17.c,
which is available in Fedora Rawhide, so I am closing this bug now.

The build containing the fix can be found at Koji:
http://koji.fedoraproject.org/koji/buildinfo?buildID=975176


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