FeRD <ferdnyc(a)gmail.com> writes:
I'd *like* the spec file to indicate that the existing F34 clazy
package
depends on the clang-11.0.0 package, specifically, and that my updated spec
file builds a clazy that "Requires: clang-12.0.0". (Or, really, any
clang-12* package.) That way, the clang11 packages will no longer satisfy
either of them, and clazy will be properly flagged as requiring a rebuild.
...But without some /usr/lib/rpm/macros.d/ file to provide the necessary
version numbering, I'm not super clear on how to go about doing that.
You can query the rpm database during the rpm build, e.g. via:
Requires: clang = %(rpm -q --qf '%%{version}' clang)
Calling rpm from within rpm used to be frowned upon, because it can lead
to really nasty issues if the "inner" rpm is a different than the outer
one. But since mock nowadays uses bootstrap mode by default, these
issues should no longer exist.
You'll find further details in this FPC issue:
https://pagure.io/packaging-committee/pull-request/954 as well as the
linked thread on devel:
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.o...
Hope this helps,
Dan