Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 708505

Summary: fails to build without downstream patches
Product: Red Hat Enterprise Linux 6 Reporter: Kamil Dudka <kdudka>
Component: virt-whatAssignee: Richard W.M. Jones <rjones>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 6.1CC: jzheng, leiwang, pcao, qwan
Target Milestone: rcKeywords: EasyFix, Patch
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: virt-what-1.11-1.1.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-06 09:57:59 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
proposed fix none

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