inject rpm dependency depending on library symbol?

I'm exploring possibilities on how to track usage of a particular library
symbol via rpm dependencies.

In particular, whenever a package is built that includes a dependency on
library symbol:

I'd like to inject additional dependencies, something like:
Requires: qt5-qtbase = %{_qt5_version}

I've been told debian does a variant of this, but I've not been able to come
up with any good way to do that here. Any ideas or suggestions?

(I know this would be handled automatically if the Qt_5_PRIVATE_API symbol
was versioned, but that's an option we'd rather avoid if reasonably

-- Rex


Re: inject rpm dependency depending on library symbol?

By Kevin Kofler at 02/09/2018 - 17:24

Rex Dieter wrote:
IMHO, the right approach is to do just that. There is already a patch that
does this:
<a href="" title=""></a>
It just needs to be applied in Fedora.

Binary compatibility with upstream is irrelevant here because we are talking
about private APIs only. Any third-party package that notices this at all is
using private APIs and so can already break at any time. Any binaries not
using private APIs will see any difference at all.

Kevin Kofler

Re: inject rpm dependency depending on library symbol?

By Rex Dieter at 02/14/2018 - 10:00

OK, that's the approach we're going with for now. We'll see how well it
works out in practice and testing.

-- Rex

Re: inject rpm dependency depending on library symbol?

By =?UTF-8?Q?Tomas... at 02/09/2018 - 15:21

You know it is some old joke about colonist and locals in North America.
It was late autumn and one of the colonist spotted some local guy
collecting sticks. He was born in the city so he never saw someone
collecting sticks.
When he back to the colony he was so excited that he told what he saw to
his friends. They started scratching own heads and after discussion
colonist come to the conclusions that probably locals knows that winter
will be harsh so they need to spend more time to collect more heavy logs to
survive coming winter.
When locals spotted this they organized local tribe elders meeting to
discuss what colonist are doing. Because they knew colonists only few
months and they've already saw many amazing things they come to the
conclusion that colonist probably somehow knows that this winter will be
harsh so they decided to spend more time to collect more wood before coming
winter as well.

Doing something only because someone is doing something without
understanding why it is done is really bad way.
Try to add to this picture that current SONAME dependency generator
currently used for more then decade with only small cleanups.
So far no one found any issue with current generator so please do not waste
your time implement something to mimic something.

Engineering is not about assuming something and you just assumed that this
type of additional dependencies is fixing some unknown problem,
Do not try to fix *possible* problems but only those *already known* as
well (and list of those problems is reaaaly long).
If you want still dig around this hole just try to talk with Debian guys
and ask then why they are doing this.


Re: inject rpm dependency depending on library symbol?

By King InuYasha at 02/09/2018 - 10:39

On Fri, Feb 9, 2018 at 10:33 AM, Rex Dieter < ... at math dot> wrote:
You can write a dependency generator that would call a script that
executes rpmdeps the same way as the real generator does. If it's
detected, you can have it emit that dependency back as a Requires.

Re: inject rpm dependency depending on library symbol?

By Rex Dieter at 02/09/2018 - 10:47

Can you be a little more specific?

In particular, I'm not interested in re-inventing any wheels here. I
included the phrase "reasonably possible" intentionally.

-- Rex