Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 753737 - net-im/telegram-desktop-2.4.6 /7 make wayland support optional
Summary: net-im/telegram-desktop-2.4.6 /7 make wayland support optional
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Esteve Varela Colominas
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2020-11-09 16:47 UTC by Esteve Varela Colominas
Modified: 2021-04-23 20:03 UTC (History)
5 users (show)

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


Attachments
Patch to include in FILESDIR (optional-wayland.patch,5.27 KB, patch)
2020-11-09 16:47 UTC, Esteve Varela Colominas
Details | Diff
Proposed ebuild patch (telegram-desktop-2.4.6.ebuild.patch,1.63 KB, patch)
2020-11-09 16:47 UTC, Esteve Varela Colominas
Details | Diff
Patch to include in FILESDIR (optional-wayland.patch,22.10 KB, patch)
2020-11-17 14:42 UTC, Esteve Varela Colominas
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Esteve Varela Colominas 2020-11-09 16:47:07 UTC
Created attachment 670589 [details, diff]
Patch to include in FILESDIR

Wayland is currently a build-time dependency for all versions of telegram-desktop, but this is a bit of a waste if you don't actually run wayland.

Thankfully, it doesn't seem incredibly hard to patch out, so I've made a patch for this, and submitted it upstream[1]. I hope this can be integrated upstream, but if not, maybe it can be included downstream, or at least for the currently existing versions of telegram-desktop in the portage tree.

I've tested this patch, and there don't seem to be any problems with it, so I'm comfortable submitting it.
The ebuild patch is for 2.4.6, but 2.4.7 has no substantial changes to prevent it from applying.

1: https://github.com/telegramdesktop/tdesktop/issues/9031
Comment 1 Esteve Varela Colominas 2020-11-09 16:47:26 UTC
Created attachment 670592 [details, diff]
Proposed ebuild patch
Comment 2 Esteve Varela Colominas 2020-11-09 20:28:08 UTC
Upstream closed the request with a cryptic link to an existing issue on the matter[1], where it's mentioned to be a maintenance burden, so this configuration won't be supported.

However, that same issue is cross-referenced by an open pull request[2] that has a different patch to support this configuration, that hasn't been touched since july. I've linked my patch there in the hope of getting some response out of that.

Ultimately I'm unclear on upstream's stance, given the open pull request, and I kind of disagree on the maintenance burden aspect given how it's just shorting out checks that would otherwise be performed during runtime (if IsWayland()).

1: https://github.com/telegramdesktop/tdesktop/issues/8282
2: https://github.com/telegramdesktop/tdesktop/pull/8351
Comment 3 Esteve Varela Colominas 2020-11-09 22:40:01 UTC
I managed to get upstream to tell me how they'd prefer the patch to look like, I'll be seeing if I can accomodate for that soon.
Comment 4 Georgy Yakovlev archtester gentoo-dev 2020-11-10 00:38:37 UTC
thanks for working on it.
if it's upstream we'll include it asap, maybe even backport to stable.
Comment 5 Esteve Varela Colominas 2020-11-16 14:46:28 UTC
Just a general status update, that the patch was finalized a couple of days ago (aside from a possible stylistical change):
https://github.com/telegramdesktop/tdesktop/pull/9051

I'm currently waiting on the main dev to weigh in, which might take a bit. They seem busy.
Comment 6 Esteve Varela Colominas 2020-11-17 14:42:08 UTC
Created attachment 671893 [details, diff]
Patch to include in FILESDIR

The patch was merged! This means the "wayland" USE flag can be added from version 2.4.10 onwards.

For the older versions, the ebuild patch included in this bug report is still applicable to 2.4.7-r1, and I've backported the patch from the pull request and attached it to this message, removing some bits that were only necessary for a static build and didn't apply cleanly.

Building both with and without the "wayland" flag seems to work.
Comment 7 Georgy Yakovlev archtester gentoo-dev 2020-11-17 20:48:52 UTC
thanks for working on it. seems it was not-so-trivial amount of work.
I'll do some testing and bump to 2.4.10 later today and will look at adding backport to stable version with a useflag.
Comment 8 Esteve Varela Colominas 2020-11-18 00:08:45 UTC
Thanks!
Most of the non-triviality stems from upstream requirements. The initial patch I submitted works about as well, and is significantly more simple.
Comment 9 Attila Tóth 2020-11-18 11:21:44 UTC
(In reply to Esteve Varela Colominas from comment #8)
> Thanks!
> Most of the non-triviality stems from upstream requirements. The initial
> patch I submitted works about as well, and is significantly more simple.

I've just used your patch on 2.4.9 until 2.4.10 will appear in the tree. Thanks: Dw.
Comment 10 Larry the Git Cow gentoo-dev 2020-11-24 05:53:40 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2658014f512c0c931c80a95f40828a8af8fb67af

commit 2658014f512c0c931c80a95f40828a8af8fb67af
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2020-11-24 05:39:26 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2020-11-24 05:53:03 +0000

    net-im/telegram-desktop: bump to 2.4.11, make wayland optional
    
    Thanks-to:  Esteve Varela Colominas <esteve.varela@gmail.com>
    Bug: https://bugs.gentoo.org/733234
    Bug: https://bugs.gentoo.org/753737
    Package-Manager: Portage-3.0.10, Repoman-3.0.2
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 net-im/telegram-desktop/Manifest                                   | 2 +-
 ...elegram-desktop-2.4.9.ebuild => telegram-desktop-2.4.11.ebuild} | 7 ++++---
 2 files changed, 5 insertions(+), 4 deletions(-)
Comment 11 Esteve Varela Colominas 2021-04-23 20:03:49 UTC
Implemented upstream and in the new ebuilds, resolved.