Re: Action requested: check dist tags and conditionals

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

 



On 06/04/2009 01:11 PM, Julian Sikorski wrote:
> Bill Nottingham pisze:
>> (If you've never used a construct like "%if 0%{?fedora}" in your spec
>> file, you can disregard this message.)
>>
>> Many packages in Fedora use release-based conditionals such as:
>>
>> ...
>> %if 0%{?rhel}
>> %endif
>>
>> %if 0%{?fedora} < 10
>> %endif
>>
>> %{?fedora:%global _with_xfce --with-xfce}
>> ...
>>
>> I'd just like to remind people of the following:
>>
>> - If you're using open ended conditionals such as:
>> 	%if 0%{?fedora} > 9
>>   make sure you keep in mind what will happen if %{fedora} isn't defined,
>>   such as in the case of a derivative distribution.
>>
>> - If you're building for EPEL from a unified Fedora spec file, and have
>>   separate %{fedora} and %{rhel} sections, make sure they do the right
>>   things for any potential new releases, not just %{rhel} = 4 or %{rhel} = 5.
>>

Does this look like the right generic structure for doing this:

%if 0%{?fedora} >= X || 0%{?rhel} >= Y
  # Do things from X until Current Fedora, Y until Current RHEL
  # Y should be the latest released version if we don't know that
  # it's not going to change in the next version
%else
  %if %{fedora} && 0%{fedora} < X && ! %{rhel}
    # Do things for Fedora < X
  %else
    %if ! %{fedora} && %{rhel} && 0%{rhel} < Y
      # Do things for RHEL < Y
    %else
      # Do things for any other distros
    %endif
  %endif
%endif

If so, then we'd want to prettify and codify it a bit so we can put it
in the Packaging Guidelines

> This is often used to tailor BuildRequires, I can't take responsibility
> what a given release of a derivative distro does or doesn't include.
> 
So we could just decide that derivative distros include those things
unless proven wrong.

Note that that seems to make my final %else above wrong....

-Toshio

Attachment: signature.asc
Description: OpenPGP digital signature

-- 
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [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