Bug 1084309

Summary: %autosetup does not apply any patches
Product: [Fedora] Fedora Reporter: Till Maas <opensource>
Component: rpmAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: anto.trande, dtardon, jzeleny, lkardos, novyjindrich, opensource, packaging-team-maint, pertusus, pmatilai, rdieter, rvokal
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1359084 (view as bug list) Environment:
Last Closed: 2015-04-10 15:51:15 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1359084, 1438815    

Description Till Maas 2014-04-04 06:58:51 UTC
Patches are specified in the spec but not applied, see e.g.:

curl --silent http://kojipkgs.fedoraproject.org/packages/xdg-utils/1.1.0/0.21.rc2.fc20/data/logs/noarch/build.log  | grep -i patch

This affects F19, F20 and Rawhide.

Comment 1 Till Maas 2014-04-04 06:59:29 UTC
Btw. if you do not have the time, I can take a look.

Comment 2 Rex Dieter 2014-04-04 09:01:04 UTC
It looks like an rpm buglet where %autosetup fails to apply patches in some circumstances (for example, if BuildArch: comes before Patch: declarations).

should be fixed in xdg-utils-1.1.0-0.22

%changelog
* Fri Apr 04 2014 Rex Dieter <rdieter> 1.1.0-0.22.rc2
- drop using %%autosetup (it didn't work?)

Comment 3 Rex Dieter 2014-04-04 12:01:59 UTC
See details in comment #2, and confirmed in #fedora-devel with mrunge earlier today, %autosetup fails to apply any patches , in particular, %{patches} is empty, if
BuildArch:
appears before
Patch:
declarations.

The specific case I ran into was:
http://pkgs.fedoraproject.org/cgit/xdg-utils.git/tree/xdg-utils.spec?id=0966bc2c18c63057de35ab9d7802277c9086ee9c

and moving BuildArch: after all the Patch...: entries made it work.

Comment 4 Panu Matilainen 2014-04-04 12:25:40 UTC
Yup, known. Its one of the lovely wtf quirks caused by the way spec parse recurses on BuildArch.

Comment 5 Ľuboš Kardoš 2015-04-10 15:51:15 UTC
Fixed upstream as 344f938670b8f7400ef177945cef5552783d450f.

Comment 6 Rex Dieter 2015-11-15 14:53:29 UTC
For anyone else who hits this in fedora, it appears this got fixed only in f23's rpm, f22 seems to still suffer from it (I had a f22 build fail just now due to unapplied patches)