Re: inject rpm dependency depending on library symbol?

2018-02-14 Thread Rex Dieter
Kevin Kofler wrote:

> Rex Dieter wrote:
>> (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 possible)
> 
> IMHO, the right approach is to do just that. There is already a patch that
> does this:
> https://build.opensuse.org/package/view_file/KDE:Qt:5.9/libqt5-qtbase/tell-the-truth-about-private-api.patch?expand=1
> 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.

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

-- Rex
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org


Re: inject rpm dependency depending on library symbol?

2018-02-09 Thread Kevin Kofler
Rex Dieter wrote:
> (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
> possible)

IMHO, the right approach is to do just that. There is already a patch that
does this:
https://build.opensuse.org/package/view_file/KDE:Qt:5.9/libqt5-qtbase/tell-the-truth-about-private-api.patch?expand=1
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
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org


Re: inject rpm dependency depending on library symbol?

2018-02-09 Thread Tomasz Kłoczko
On 9 February 2018 at 15:33, Rex Dieter  wrote:

> 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:
> libQt5Core.so.5(Qt_5_PRIVATE_API)
>
> 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?
>

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.

kloczek
-- 
Tomasz Kłoczko | LinkedIn: *http://lnkd.in/FXPWxH *
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org


Re: inject rpm dependency depending on library symbol?

2018-02-09 Thread Rex Dieter
Neal Gompa wrote:

> On Fri, Feb 9, 2018 at 10:33 AM, Rex Dieter  wrote:
>> 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:
>> libQt5Core.so.5(Qt_5_PRIVATE_API)
>>
>> 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 possible)
> 
> 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.

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

___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org


Re: inject rpm dependency depending on library symbol?

2018-02-09 Thread Neal Gompa
On Fri, Feb 9, 2018 at 10:33 AM, Rex Dieter  wrote:
> 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:
> libQt5Core.so.5(Qt_5_PRIVATE_API)
>
> 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
> possible)

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.


-- 
真実はいつも一つ!/ Always, there's only one truth!
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org