[Rpm-maint] [rpm-software-management/rpm] Make use of %apply_patch easier (#1357)

Vít Ondruch notifications at github.com
Tue Sep 8 09:21:33 UTC 2020

I need to use git to apply binary patch. Therefore I thought about using `%apply_patch` and I ended up using the following:

%global __scm git_am
%apply_patch -p1 %{PATCH4}

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 `%autosetup` but I can't use it, because this is the current `%setup` line:

%setup -n %{gem_name}-%{version} -b 1 -b 3

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 `%setup`.

So I thinking about two possible extensions:

1. Allow to disable the `%setup` call from `%autosetup`.
2. Providing something like `%setup_scm` which would actually do the necessary setup for `%apply_patch`.

Please also note that on top of that, I actually need to apply patches in the `%{_builddir}`, so the current implementation is very limiting.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20200908/2df119f7/attachment.html>

More information about the Rpm-maint mailing list