<p></p>
<p>I need to use git to apply binary patch. Therefore I thought about using <code>%apply_patch</code> and I ended up using the following:</p>
<pre><code>%global __scm git_am
%{expand:%__scm_setup_%{__scm}}
%apply_patch -p1 %{PATCH4}
</code></pre>
<p>This is suboptimal, because I believe that the doubleunderscore macros are implementation detail and should not be used. You might admit that I should use <code>%autosetup</code> but I can't use it, because this is the current <code>%setup</code> line:</p>
<pre><code>%setup -n %{gem_name}-%{version} -b 1 -b 3
</code></pre>
<p>i.e. it expands more sources prior expanding the main source and I don't think this is supported by %autosetup. So I have to keep using the <code>%setup</code>.</p>
<p>So I thinking about two possible extensions:</p>
<ol>
<li>Allow to disable the <code>%setup</code> call from <code>%autosetup</code>.</li>
<li>Providing something like <code>%setup_scm</code> which would actually do the necessary setup for <code>%apply_patch</code>.</li>
</ol>
<p>Please also note that on top of that, I actually need to apply patches in the <code>%{_builddir}</code>, so the current implementation is very limiting.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/rpm-software-management/rpm/issues/1357">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ADLPZU43ZKCQZQVM56AY4YDSEXZR3ANCNFSM4Q7XM4MQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ADLPZU7TUDSD56JLBCB22KLSEXZR3A5CNFSM4Q7XM4M2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4KLXUGMA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/rpm-software-management/rpm/issues/1357",
"url": "https://github.com/rpm-software-management/rpm/issues/1357",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>