Bug 461347

Summary: Not found patches do not terminate build
Product: [Fedora] Fedora Reporter: Ville Skyttä <ville.skytta>
Component: rpmAssignee: Panu Matilainen <pmatilai>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: high    
Version: rawhideCC: ffesti, jnovy, mtasaka, pnasrat
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-09-06 13:55:58 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:

Description Ville Skyttä 2008-09-06 08:15:14 UTC
It seems that with Rawhide rpm, not found patches do not terminate the build, they just print out an error.

With the "Patch0: not applied with %patch and Patch: not applied with %patch0" change in the new rpm, this will cause quite a few regressions and possibly security issues unless people happen to read their build logs carefully - essentially some patches just do not get applied.

One example here:
http://kojipkgs.fedoraproject.org/packages/mboxgrep/0.7.9/6.fc10/data/logs/x86_64/build.log

[...]
Executing command: ['bash', '--login', '-c', 'rpmbuild -bb --target x86_64 --nodeps builddir/build/SPECS/mboxgrep.spec']
/etc/profile: line 38: /bin/hostname: No such file or directory
error: 
%patch without corresponding "Patch:" tag
Building target platforms: x86_64
Building for target x86_64
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.Kbstjz
[...]

An error is printed, but the build continues without the patch applied.  The build should IMO be terminated instead.

I don't have a Rawhide box to test with, but can reproduce locally in mock on a F-9 system.  I hacked my mock to not use --nodeps with rpmbuild -bb just to try it out, but it had no effect on this issue.

There are about 60 packages in Rawhide that are potentially affected, will post to fedora-devel about it soon.

Comment 1 Jindrich Novy 2008-09-06 13:55:58 UTC
Fixed in upstream and rawhide. Thanks for noticing.