Bug 708505 - fails to build without downstream patches
Summary: fails to build without downstream patches
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: virt-what
Version: 6.1
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-05-27 20:33 UTC by Kamil Dudka
Modified: 2011-12-06 09:57 UTC (History)
4 users (show)

Fixed In Version: virt-what-1.11-1.1.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-06 09:57:59 UTC
Target Upstream Version:


Attachments (Terms of Use)
proposed fix (1.50 KB, patch)
2011-05-27 20:34 UTC, Kamil Dudka
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2011:1556 0 normal SHIPPED_LIVE virt-what bug fix and enhancement update 2011-12-06 00:39:22 UTC

Description Kamil Dudka 2011-05-27 20:33:51 UTC
Version-Release number of selected component (if applicable):
virt-what-1.3-4.4.el6


Steps to Reproduce:
1. rpmbuild --define '__patch /bin/true' --rebuild virt-what-1.3-4.4.el6.src.rpm

  
Actual results:
DEBUG: + chmod +x 'tests/test-*.sh' 'tests/*/sbin/*'
DEBUG: chmod: cannot access `tests/test-*.sh': No such file or directory
DEBUG: chmod: cannot access `tests/*/sbin/*': No such file or directory
DEBUG: RPM build errors:
DEBUG: error: Bad exit status from /var/tmp/rpm-tmp.rCtw9y (%prep)
DEBUG:     Bad exit status from /var/tmp/rpm-tmp.rCtw9y (%prep)


Additional info:
The proposed change is required for Coverity to scan defects in downstream
patches separately.

Comment 1 Kamil Dudka 2011-05-27 20:34:55 UTC
Created attachment 501384 [details]
proposed fix

Comment 3 Richard W.M. Jones 2011-05-31 08:02:43 UTC
(In reply to comment #1)
> Created attachment 501384 [details]
> proposed fix

I'm unhappy about this fix because those lines could
fail silently during a normal build which would
indicate a serious build/configuration problem.

Is it possible instead to have an RPM variable set
when coverity testing without patches is being done,
so that the code can be disabled conditionally?  eg:

 rpm --define '__patch /bin/true' --define '__coverity_no_patches 1' ...

Comment 4 Kamil Dudka 2011-05-31 08:13:18 UTC
(In reply to comment #3)
> Is it possible instead to have an RPM variable set
> when coverity testing without patches is being done,
> so that the code can be disabled conditionally?  eg:
> 
>  rpm --define '__patch /bin/true' --define '__coverity_no_patches 1' ...

Sure thing.  The '_with_vanilla 1' RPM macro definition seems to be a good candidate for that since it is already being used by kernel.spec and some other packages.  The only difference there is that it also excludes the patches when specified.

Comment 6 Richard W.M. Jones 2011-05-31 10:30:38 UTC
OK, dev-ack'd for 6.2.  I will add a bit of conditional
code to make sure it compiles when _with_vanilla is defined.

Comment 7 Richard W.M. Jones 2011-08-11 11:36:35 UTC
In fact the test in comment 0 just works fine with the
rebased package.

Comment 9 Jinxin Zheng 2011-09-01 08:33:37 UTC
I reproduced this on virt-what-1.3-4.4.el6.src.rpm, running:

rpmbuild --define '__patch /bin/true' --rebuild
virt-what-1.3-4.4.el6.src.rpm

the script fails to build.

Verfied on the virt-what-1.11-1.1.el6.src.rpm. The script succeeds to build and returns with exit status 0.

Comment 10 errata-xmlrpc 2011-12-06 09:57:59 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHEA-2011-1556.html


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