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

soig notifications at github.com
Wed Sep 16 11:45:56 UTC 2020


Le mar. 8 sept. 2020 à 11:21, Vít Ondruch <notifications at github.com> a
écrit :

> 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
> %{expand:%__scm_setup_%{__scm}}
> %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.
>

You can always use %autopatch in that case…
%autosetup is basically %setup + %autopatch (modulo some defaults)

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, view it on GitHub
> <https://github.com/rpm-software-management/rpm/issues/1357>, or
> unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAXGVEKTWOCXUMCSRRTAAPDSEXZRZANCNFSM4Q7XM4MQ>
> .
>


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1357#issuecomment-693352194
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20200916/65bdb1bb/attachment.html>


More information about the Rpm-maint mailing list