#39 RFE: add automatic static() provides for binaries
Opened 6 years ago by ignatenkobrain. Modified 6 months ago

This is useful to find which version of crate has been used to build particular binary, so we can make rebuilds more intelligent.

So, we're back to wanting #15 now?

Nope, even we use system crates we still linking them statically.. I just want to see overview which version was used.

I think adding Provides: bundled(foo) to statically linked binaries for this use case is wrong. bundled() virtual Provides are only added if a package builds from bundled source code, but we don't do that for Rust packages (except when using vendored dependencies, but that's a different problem).

If we want to add some metadata about which versions of a crate a binary was built against, we should not reuse bundled() virtual Provides, because that mixes metadata from two different concepts. We could use some other format, which could then also be reused by other language ecosystems (i.e. Go), something like Provides: built-against(crate(serde)) = 1.0.138.

We now already have a way to get the information that would be needed to implement this (basically, same as the %cargo_license macro), but at this point, not sure if this is even still needed. It's already documented in two places which versions of a library a binary was built from (the koji build log and the file written by %cargo_license).

Login to comment on this ticket.