minimization/content-resolver-input

How to leverage `bcond_with` macros

voxik opened this issue · 6 comments

voxik commented

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 commented

@asamalik, @contyk any update please?

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 commented

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?

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.)

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 commented

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.