On Wed, May 1, 2024 at 2:53 AM the Mulhern <amulhern(a)redhat.com> wrote:
Hi!
I do not know anything about the implementation of SPECPARTS. That being said:
I think the general idea that you seem to be proposing would be an
unusually good use for this SPECPARTS.
In general, I believe that packagers are wary of stuff that they can't
look at or debug being part of the spec file. I would be wary of
SPECPARTS for that reason, always.
I agree, something that feels like "too magical" is usually not good
for debugging ...
In this case, I think it would be fine, though:
The subpackages that are generated by rust2rpm for crate features are
100% boilerplate in almost all cases.
And in the cases where they are not 100% boilerplate, the only thing
different is additional Requires that can be configured via
rust2rpm.toml (like for "-sys" bindings that have different features
for different API levels of the wrapped C library). I'm not yet sure
how that use case will be supported, but that's a special case that
should be OK to deal with *after* shipping an initial, working
implementation that deals with most cases.
But this proposal seems like something that could be made very
regular
and more or less invisible to the user. Also, the explanation for it
would be simple, something like generate sub-packages for the powerset
of crate features (or whatever is actually done).
For every crate feature (including the implicit "default" feature),
exactly one subpackage is generated by rust2rpm (except for those
"hidden" via rust2rpm.toml config).
As you say, it would make upstream Rust projects' integration
with
packit for packaging tests pretty easy, certainly easier than it must
be now.
And that's really all I've got.
Thank you for your feedback!
Fabio