Hide Forgot
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.
Created attachment 501384 [details] proposed fix
(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' ...
(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.
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.
In fact the test in comment 0 just works fine with the rebased package.
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.
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