-
Notifications
You must be signed in to change notification settings - Fork 6
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
Feature flags #35
Comments
@contyk Was going to look into this after F34 was out the door, so now seems like the right time to restart that discussion. |
@contyk ping |
Glad to see there is some interest in this. I got some interesting feedback for the original proposal; mostly positive for the idea itself, some ideas for the implementation. The next steps aren't super clear but I'd like the second iteration to address a few things:
But yes, I'd like to come up with something in the upcoming months. I want this to provide the same level of flexibility Gentoo USE flags have, with global "release" definitions, package-specific definitions or overrides, potential additional overrides for both for spins or similar, and local overrides for both for developers and end users who build their own packages locally. And it needs to be reliable, easy to use, compatible and not all that different from bconds. |
Was it something tangible? I think that ATM, it would be enough if the feature flags were some
This is pretty basic. It could be pulled in via redhat_rpm_config and that would be it. |
It was, yes: https://gist.github.com/contyk/0aaaaf0585c57976ca18a293b3566408 |
So far, all use of feature flags in ELN have been at the specfile level, not globally. Is there still something here that needs work? |
Yes, I think it would be nice if feature flags worked globally. There are not feature flags in use as far as I know, but they could be useful to e.g. reduce content of Buildroot. There are e.g. a lot of -doc subpackages, or -javadoc subpackages, various language bindings, etc. |
While it is possible to use koji tag options to set feature flags for that tag (e.g. we do this for flatpak builds), it seems very unlikely that we could implement this practically in ELN. Not only do we currently build ELN and ELN Extras in the same build tag (although that has its own issues tbh), even within ELN AFAICS we can't just say "never build docs" or "never build perl (or any other particular language) bindings". Doing so also makes it somewhat opaque as to why a particular subpackage/feature is enabled in one build and disabled in another. Once you're touching the spec file anyway to implement a (consistently named) feature flag, you might as well just put the preference in the spec file. Furthermore, it's not necessarily always worth the trouble to disable a particular subpackage in the build when it doesn't add any net new dependencies, and there really isn't harm in docs and other unused subpackages to remain in the buildroot. (Minimizing the buildroot should be primarily focused on things that might be used outside of RHEL, particularly in EPEL, and minimizing the need for needless rebuilds.) Therefore, I would need a compelling argument and example here. |
This specifically is questionable, as we learned during late cycle C10S updates of Perl 5.40 and java-21-openjdk. During such update, it is necessary to make sure those subpackages still works and are not FTBFS. If there were no such subpackages, we would not need to care. Admittedly, I don't remember the specific context, why I have opened this request, but given the 3 years anniversary, it must have been discussion of similar kind. And BTW I support having feature flags, but I don't like having some RHEL / EPEL and similar conditions in spec file. These are always wrong and not testable in Fedora context. |
In those particular cases I agree, and they fall under the "minimizing the need for needless rebuilds" condition.
That's what I'm trying to ascertain, because so far I'm not sure what is actionable here.
Not sure how they're "always wrong" but they are testable -- that's exactly what ELN is for. |
Just googling a bit, isn't this the "original proposal" mentioned by @contyk?
But having feature flag such as "don't produce -doc subpackage" is orthogonal to RHEL, it is valuable on itself, maybe for minimal container purposes. Having "don't produce -java binding" is useful flag on itself, trying to provide system without Java. |
Feature flags are also mentioned here: https://pagure.io/fesco/issue/2365#comment-639889 |
I wonder what is the plan leveraging the feature flags using
%bcond_with
?The text was updated successfully, but these errors were encountered: