Re: RFC: Feature macros (aka USE flags)

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

 



On Mon, Apr 27, 2020 at 6:38 PM Vít Ondruch <vondruch@xxxxxxxxxx> wrote:
>
>
> Dne 27. 04. 20 v 16:25 Petr Šabata napsal(a):
> > On Mon, Apr 27, 2020 at 3:01 PM Vít Ondruch <vondruch@xxxxxxxxxx> wrote:
> >>
> >> Dne 27. 04. 20 v 13:19 Petr Šabata napsal(a):
> >>> Based on the recent discussions around %fedora/%rhel macros and ELN,
> >>> and %bcond generally being confusing to work with, I came up with a
> >>> distribution-wide feature that defines generic feature keywords and
> >>> associated helper macros that packages can check in build-time
> >>> conditionals.
> >>
> >> The most confusing part of the %bcond is the definition itself. The rest
> >> is fine IMO. Therefore, I somehow don't understand why would you like to
> >> replace:
> >>
> >>
> >> ```
> >>
> >> %if %{with ssl}
> >> BuildRequires:  openssl-devel
> >> %endif
> >>
> >> ```
> >>
> >>
> >> by
> >>
> >>
> >> ```
> >>
> >> %if %{use ssl}
> >> BuildRequires:  openssl-devel
> >> %endif
> >>
> >> ```
> > The difference here is %use defaults are defined by the buildroot
> > while %with %bconds are defined by the package.
>
>
> Looking at the provided example and the binary RPM and what not, I am
> still confused and it is not clear to me what you actually want to achieve.
>
> I think the biggest issue I have is that you seems to propose to use the
> `%{use ssl}`, `%{use_enable ssl openssl}` and `%{?_use_ssl:-DSSL}` in
> places, where it would make more sense to use the well established
> `with/without` rpm(build) macros.
>
> Also, this `%{use_enable ssl openssl}` for example looks like you have
> some distribution wide `ssl` feature, but you want to locally implement
> it via openssl and moreover it seems you are trying to address the case
> where `configure` does not accept with/without but enable/disable
> instead (which was probably not an issue so far, otherwise rpmbuild
> would probably provide enable/disable options alongside with/without).

Yes, this is exactly what I'm trying to achieve -- to have
distribution-wide generic keywords that control default build options
in packages. In the example SSL support is enabled via the openssl
package.

The well-established with/without options and their defaults are bound
to the package, not the buildroot, which is the key idea behind this,
not the exact helper scripts. Considering it's a repeated point in
this thread, I should have done better job emphasizing it :)

> IOW it could be probably better if there was something like `%{use ssl
> openssl}` call on top of the .spec file, which would enable use of
> standard RPM macros instead of introducing set of new macros. This would
> also make the `general availability` section much shorter, because there
> would be probably need to check the macro existence on a single place.

Something like that could be done and would be an option if no one
cared for the helper macros (currently limited to autotools but the
list could grow). We could actually make this nice and SPECs more
readable.

P
_______________________________________________
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




[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