Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to leverage bcond_with macros #501

Open
voxik opened this issue Feb 18, 2021 · 6 comments
Open

How to leverage bcond_with macros #501

voxik opened this issue Feb 18, 2021 · 6 comments

Comments

@voxik
Copy link
Contributor

voxik commented Feb 18, 2021

It seems there is rubygem-stringex dependency chain pulled in for rubygem-kramdown just to execute 5 test cases for optional and probably rarely used feature. Is there any way to leverage bcond_without stringex feature flag if I going to propose such change to that package?

@voxik
Copy link
Contributor Author

voxik commented Mar 11, 2021

@asamalik, @contyk any update please?

@contyk
Copy link
Contributor

contyk commented Mar 11, 2021

If you set the default based on the %rhel macro, I think it should work after an internal or ELN rebuild & the next CR run.
But I know very little about Content Resolver and its operation. Maybe it's also possible to hint at this in the definitions?

@voxik
Copy link
Contributor Author

voxik commented Mar 11, 2021

Using %rhel macro defeats the whole purpose of the %bcond_with :/ Would it be big problem to have separate package setting this conditionals? Or be it part of redhat-rpm-config or what not?

@pcahyna
Copy link
Contributor

pcahyna commented Mar 15, 2021

Using %rhel macro defeats the whole purpose of the %bcond_with :/

Why? I have been using %bcond_with/without inside %if %rhel or %if %fedora conditionals and it seems to do the job.

https://src.fedoraproject.org/rpms/gnuplot/blob/rawhide/f/gnuplot.spec#_7

(I think it depends on what one considers to be the whole purpose of %bcond_with.)

@asamalik
Copy link
Contributor

Content Resolver consumes packages from the repositories, and those packages have been already built in the build system that takes %bcond_with into account.

@voxik
Copy link
Contributor Author

voxik commented Mar 23, 2021

It seems that my initial comment was too artificial. There is %bcond_without in rubygem-puma. Now it would be enough to have file like this to disable the Ragel dependency:

$ /usr/lib/rpm/macros.d/macros.features
# Ragel is not strictly needed, because the Ragel files can be pregenerated.
%_without_ragel		1

In Fedora, it would be likely empty. In ELN/RHEL, we could use it to disable features.

That way

  • Fedora would not need to be polluted with %{rhel} conditionals
  • The reasons would be documented on one place
  • It would be discoverable and
  • It could be possible to change such feature globally, if e.g. Ragel is deemed required for some reasons.

So far, it seems the best place to pull this in could be fedora-release package, which already contains content specifically adjusted for ELN. However, I am not sure how this package actually transforms for RHEL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants