Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 525884 - <net-dns/avahi-0.7-r1 optionally depends on deprecated Qt4 (was: net-dns/avahi-0.6.31-r6 - add qt5 support)
Summary: <net-dns/avahi-0.7-r1 optionally depends on deprecated Qt4 (was: net-dns/avah...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Anthony Basile
URL: https://github.com/lathiat/avahi/pull/19
Whiteboard:
Keywords: PATCH
Depends on: 635418
Blocks: 587830 qt4-removal
  Show dependency tree
 
Reported: 2014-10-19 17:52 UTC by Michael Jones
Modified: 2018-05-27 08:17 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
qt5.patch (qt5.patch,5.83 KB, patch)
2014-10-19 17:53 UTC, Michael Jones
Details | Diff
qt5-r2.patch (qt5.patch,5.88 KB, patch)
2014-10-19 18:58 UTC, Michael Jones
Details | Diff
version of avahi ebuild with concessions to qt5. (avahi-0.6.31-r9.ebuild,6.39 KB, text/plain)
2015-10-15 21:53 UTC, Michael Jones
Details
Version -r1 of unpatched ebuild (avahi-0.6.32-r1.ebuild,5.58 KB, text/plain)
2016-09-05 21:45 UTC, Carter Young
Details
avahi-0.7.ebuild with qt5 changes (avahi-0.7.ebuild,5.14 KB, text/plain)
2017-10-26 20:58 UTC, Michael Jones
Details
avahi-0.7-qt5.patch (avahi-0.7-qt5.patch,5.89 KB, patch)
2017-10-26 21:00 UTC, Michael Jones
Details | Diff
net-dns/avahi-0.7-r1.ebuild.diff (avahi-qt5.patch,1.85 KB, patch)
2017-12-04 22:58 UTC, Andreas Sturmlechner
Details | Diff
net-dns/avahi-0.7-r1.ebuild.diff (avahi-0.7-qt5.ebuild,2.15 KB, patch)
2018-01-20 19:24 UTC, Andreas Sturmlechner
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Jones 2014-10-19 17:52:57 UTC
See attached.

Reproducible: Always
Comment 1 Michael Jones 2014-10-19 17:53:53 UTC
Created attachment 386964 [details, diff]
qt5.patch

Patch sent to upstream mailing list.
Comment 2 Rafał Mużyło 2014-10-19 18:48:58 UTC
I think I see a minor simplification of that patch:
@@ -18,7 +18,11 @@
 ***/
 
 #include <sys/time.h>
-#ifdef QT4
+#if #defined(QT5)
+#include <QSocketNotifier>
+#include <QObject>
+#include <QTimer>
+#elif defined(QT4)
 #include <Qt/qsocketnotifier.h>
 #include <Qt/qobject.h>
 #include <Qt/qtimer.h>

AFAICT,
 #if #defined(QT5) || defined(QT4)
 #include <qsocketnotifier.h>
 #include <qobject.h>
 #include <qtimer.h>
 #endif

should be correct for both.
Comment 3 Michael Jones 2014-10-19 18:57:16 UTC
You're right.

Updating patch.
Comment 4 Michael Jones 2014-10-19 18:58:25 UTC
Created attachment 386968 [details, diff]
qt5-r2.patch
Comment 5 Anthony Basile gentoo-dev 2014-10-19 21:01:49 UTC
(In reply to Michael Jones from comment #4)
> Created attachment 386968 [details, diff] [details, diff]
> qt5-r2.patch

Ping me back when upstream accepts this and I'll back port it.
Comment 6 Michael Jones 2014-10-24 22:50:16 UTC
Posted to Avahi mailing list: http://lists.freedesktop.org/archives/avahi/2014-October/002305.html
Comment 7 Michael Jones 2015-10-15 21:26:39 UTC
https://github.com/lathiat/avahi/pull/19
Comment 8 Anthony Basile gentoo-dev 2015-10-15 21:39:04 UTC
(In reply to Michael Jones from comment #7)
> https://github.com/lathiat/avahi/pull/19

qt5 support wasn't there as far as I can see in 0.6.32_rc which I just added to the tree, so I assume your pull/19 wasn't accepted yet?

If its in the pipeline upstream, can't I just close this bug RESOLVED UPSTREAM and wait it trickles down to us?
Comment 9 Michael Jones 2015-10-15 21:52:07 UTC
You can, if you prefer to do it that way.

You'll probably need to make changes to the ebuild to accommodate qt5.


I'll post my hacked up ebuild for you to compare against. (Not that my ebuild skills are really impressive or anything.)
Comment 10 Michael Jones 2015-10-15 21:53:57 UTC
Created attachment 414662 [details]
version of avahi ebuild with concessions to qt5.
Comment 11 Michael Jones 2015-10-15 21:55:36 UTC
And no, I don't think the pull request has been integrated yet. I suppose that means it'll be included in a later release.
Comment 12 Anthony Basile gentoo-dev 2015-10-15 21:56:34 UTC
(In reply to Michael Jones from comment #11)
> And no, I don't think the pull request has been integrated yet. I suppose
> that means it'll be included in a later release.

no, they may just be reviewing it, i'm not sure.  ping me back when its merged.
Comment 13 Carter Young 2016-09-05 21:15:50 UTC
Easy Fix:

Add export QT_SELECT=4 before the pkg_pretend() phase, then in the post_install() or at the end of one of the src_install phase re-export QT_SELECT=5, until this package patch is accepted upstraem
Comment 14 Carter Young 2016-09-05 21:35:32 UTC
(In reply to Carter Young from comment #13)
> Easy Fix:
> 
> Add export QT_SELECT=4 before the pkg_pretend() phase, then in the
> post_install() or at the end of one of the src_install phase re-export
> QT_SELECT=5, until this package patch is accepted upstraem

Just tested in my Local overlay, and this works.  It even works when you don't reexport, in other words:

> Easy Fix:
> 
> Add export QT_SELECT=4 before the pkg_pretend() phase.

is all that's needed.

qmake -v still reports:

QMake version 3.0
Using Qt version 5.6.1 in /usr/lib64

when properly symlinked using qtchooser.
Comment 15 Carter Young 2016-09-05 21:45:02 UTC
Created attachment 445054 [details]
Version -r1 of unpatched ebuild

Attached version of original ebuild containing export
Comment 16 Anthony Basile gentoo-dev 2016-09-06 19:56:22 UTC
(In reply to Carter Young from comment #13)
> Easy Fix:
> 
> Add export QT_SELECT=4 before the pkg_pretend() phase, then in the
> post_install() or at the end of one of the src_install phase re-export
> QT_SELECT=5, until this package patch is accepted upstraem

I'm confused here.  Doesn't that cause this package to build against qt4?

Anyhow, I'm tired of waiting for upstream.  Two years is absurd.  Can people just give Michael's patch a test and I'll just commit that.  I'm sorry I waited so long on this but I just assumed upstream would act.  It doesn't look like they are interested.  I don't like carrying patches downstream but I'll do it if I have to.
Comment 17 Carter Young 2016-09-15 19:36:05 UTC
(In reply to Anthony Basile from comment #16)
> I'm confused here.  Doesn't that cause this package to build against qt4?
> 
> Anyhow, I'm tired of waiting for upstream.  Two years is absurd.  Can people
> just give Michael's patch a test and I'll just commit that.  I'm sorry I
> waited so long on this but I just assumed upstream would act.  It doesn't
> look like they are interested.  I don't like carrying patches downstream but
> I'll do it if I have to.

QT5 is only stable on the plasma profile, and there is no stable GCC5 compiler candidate in the portage tree.  I'm not using the plasma profile, but I am using the GCC5 compiler, and as such, have qt-chooser installed.  Packages like this are the reason qt-chooser is there.  I'm not opposed to Micheal's patch, but I am opposed to early adoption of a patch for GCC5 support, when there is no stable GCC5 candidate in the tree.
Comment 18 Michael Jones 2017-10-26 20:58:47 UTC
Created attachment 500330 [details]
avahi-0.7.ebuild with qt5 changes

Attached new avahi-0.7.ebuild with qt5 changes
Comment 19 Michael Jones 2017-10-26 21:00:04 UTC
Created attachment 500332 [details, diff]
avahi-0.7-qt5.patch

Essentially identical to my previous patch.

Major difference is that I force --std=gnu++11. Don't know why the compiler is defaulting to older now.

Feel free to edit as desired.
Comment 20 Michael Jones 2017-12-04 01:59:23 UTC
Upstream seems uninterested in merging this patch.

What's going to happen to avahi's qt integration when qt4 is removed from the tree?
Comment 21 Andreas Sturmlechner gentoo-dev 2017-12-04 22:32:52 UTC
@Anthony, Michael's patch works fine for me and also seems to solve bug 587830.

Please, let's use this to get rid of USE=qt4 in here.

Thanks Michael for your work!
Comment 22 Andreas Sturmlechner gentoo-dev 2017-12-04 22:58:46 UTC
Created attachment 508198 [details, diff]
net-dns/avahi-0.7-r1.ebuild.diff
Comment 23 Andreas Sturmlechner gentoo-dev 2018-01-20 19:24:30 UTC
Created attachment 515442 [details, diff]
net-dns/avahi-0.7-r1.ebuild.diff

fix multilib-strict error
Comment 24 Andreas Sturmlechner gentoo-dev 2018-01-20 19:28:00 UTC
doesn't depend on qt5-multilib anymore.
Comment 25 Anthony Basile gentoo-dev 2018-01-21 03:01:09 UTC
(In reply to Andreas Sturmlechner from comment #24)
> doesn't depend on qt5-multilib anymore.

we should revbump this commit.
Comment 26 Anthony Basile gentoo-dev 2018-01-21 03:43:01 UTC
(In reply to Michael Jones from comment #20)
> Upstream seems uninterested in merging this patch.
> 
> What's going to happen to avahi's qt integration when qt4 is removed from
> the tree?

I pushed this patch against my better judgment.  When upstream becomes uninterested in a patch I tend to shy away.  Its not a question of correctness so much as who will maintain this going forward.  I'll make an effort because there is value to qt-avahi integration, but if it becomes onerous, I'll drop the integration in future versions.
Comment 27 Andreas Sturmlechner gentoo-dev 2018-02-27 20:27:53 UTC
Let's keep this open until the old versions are gone.
Comment 28 Larry the Git Cow gentoo-dev 2018-05-27 08:17:11 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5d34efe6e04c0eb4f83e66657805e4deb3298cb6

commit 5d34efe6e04c0eb4f83e66657805e4deb3298cb6
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2018-05-27 08:16:21 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2018-05-27 08:16:57 +0000

    net-dns/avahi: Drop USE=qt4 in 0.6.32 hppa special edition
    
    Closes: https://bugs.gentoo.org/525884
    Package-Manager: Portage-2.3.40, Repoman-2.3.9

 net-dns/avahi/avahi-0.6.32.ebuild | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)