Re: Changes in the Fedora Packaging Guidelines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 17. 01. 23 15:53, Olivier Fourdan wrote:
Hi Miro

On Mon, Jan 16, 2023 at 8:18 PM Miro Hrončok <mhroncok@xxxxxxxxxx> wrote:

[…]

-------------------------------------------------------------------------------

Packages are told not to conditionalize Sources definitions
(e.g. on %fedora or %rhel).

https://docs.fedoraproject.org/en-US/packaging-guidelines/SourceURL/#_do_not_conditionalize_sources
https://pagure.io/packaging-committee/pull-request/1163

-------------------------------------------------------------------------------

The example there on how to do that correctly would not work with
%autosetup though.

That is exactly why the example does not use %autosetup.

If you'd like to use %autosetup, you could use something like this:

Patch:      I-am-always-applied.patch
Patch:      So-am-I.patch
Patch:      This-patch-is-also-always-applied.patch

# RHEL-only patches
Patch201:   This-patch-is-not-applied-on-Fedora.patch
Patch202:   This-patch-is-only-for-the-enterprise.patch

%prep
%autosetup -N   <--- don't apply patches
%autopatch -M 200  <--- apply patches up until 200
%if 0%{?rhel}
%autopatch -m 201 <--- apply patches >= 201
%endif


Or even:

...
%prep
%autosetup -N
%autopatch %{!?rhel:-M 200}


--
Miro Hrončok
--
Phone: +420777974800
IRC: mhroncok
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux