Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 911145 - net-im/telegram-desktop-4.8.10 version bump
Summary: net-im/telegram-desktop-4.8.10 version bump
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Esteve Varela Colominas
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2023-07-24 16:18 UTC by Esteve Varela Colominas
Modified: 2023-10-07 22:26 UTC (History)
8 users (show)

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


Attachments
Updated patch for version 4.8.10 (tdesktop-4.8.10-system-cppgir.patch,1.82 KB, patch)
2023-08-05 13:48 UTC, Михаил
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Esteve Varela Colominas 2023-07-24 16:18:18 UTC
Opening this bug to indicate that I've decided to hold off on the update for a bit.
Version 4.8.7 requires >=dev-cpp/glibmm-2.77.0, which is currently an unstable version of glibmm. Since it's unstable, it's unlikely to land in the ::gentoo repo.
Packaging it currently implies statically linking this library, which is inconvenient, as it implies getting the build-time dependencies right and building two programs within the same ebuild, which is always hard to get right, especially for a one-time thing like this.
Looking around repology.org, the only distributions that have 4.8.7 are either those that package the binary, or those that derive from Arch, which has gone the static linking route. So we're not alone in this situation.

Hopefully glibmm updates quickly enough for us to bump the package. Of course, if anyone else is willing to work on it, PRs are always welcome. Just tag this issue in the "Closes:" tag of the GLEP66-formatted commit and I'll be notified.
Comment 1 Михаил 2023-08-05 13:46:31 UTC
I've installed  telegram-desktop-4.8.10 with dev-cpp/glibmm-2.77.0 and trivial change in tdesktop-4.8.4-system-cppgir.patch

Regressions not found.
Comment 2 Михаил 2023-08-05 13:48:44 UTC
Created attachment 867148 [details, diff]
Updated patch for version 4.8.10
Comment 3 Esteve Varela Colominas 2023-08-05 16:46:37 UTC
Where did you get glibmm-2.77.0 from?
Comment 4 Михаил 2023-08-05 18:39:14 UTC
(In reply to Esteve Varela Colominas from comment #3)
> Where did you get glibmm-2.77.0 from?

Renamed in local overlay:
glibmm-2.76.0.ebuild → glibmm-2.77.0.ebuild
glib-2.76.4.ebuild → glib-2.77.0.ebuild
gdbus-codegen-2.76.4.ebuild → gdbus-codegen-2.77.0.ebuild
Comment 5 Esteve Varela Colominas 2023-08-05 18:46:03 UTC
Yeah, we can't really do that in ::gentoo because 2.77.0 is an unstable version... It'd have to be statically linked in telegram.
Comment 6 Joe Kappus 2023-08-16 22:45:08 UTC
I have 4.8.10 fully working with old glibmm. My patches (plus the one attached to this bug) are just slightly oversize for ::gentoo though, so you'll need to repackage and host them elsewhere?

Can install from my overlay: https://github.com/joecool1029/joecool-overlay/tree/master/net-im/telegram-desktop


pkgcheck scan output:
SizeViolation: 'files/tdesktop-4.8.10-revert-glibmm.patch' exceeds 20.0 KiB in size; 34.1 KiB total
TotalSizeViolation: files/ directory exceeds 50.0 KiB in size; 58.2 KiB total
Comment 7 Esteve Varela Colominas 2023-08-17 00:46:26 UTC
I'm surprised reverting the glibmm commit doesn't cause a lot of headaches and issues - it's not a trivial conmit, unfortunately, so I'm iffy on doing it like that. I'd much rather bundle the new copy of glibmm with the ebuild.
Comment 8 Joe Kappus 2023-08-17 02:31:01 UTC
I haven't hit any issues running this yet with multiple accounts. That's including testing stuff like the Stories feature.

But there are now starting to be issues using the older versions in portage due to all the changes telegram is rolling out (mainly notifications are getting screwed up and not showing between accounts). 

Bundling would make it easier to maintain in the long run, but a new stable glibmm will eventually arrive.
Comment 9 Ionen Wolkens gentoo-dev 2023-09-13 21:43:17 UTC
>Version 4.8.7 requires >=dev-cpp/glibmm-2.77.0
ftr glibmm-2.78 is in tree now, albeit still masked while glib-2.78 is being given a test run at the tinderbox
Comment 10 Esteve Varela Colominas 2023-09-13 22:09:11 UTC
Oh thank god I was *this* close to caving and just bundling the library. Thanks for the heads-up, I'll get to upgrading telegram soon.
Comment 11 Joe Kappus 2023-09-15 07:51:43 UTC
The remove-private-qt patch will have to be updated for 4.9.7 (it still patches in 4.9.6). Other than that, it works with a simple bump once you unmask GNOME 45.
Comment 12 Erik 2023-09-22 18:36:50 UTC
(In reply to Joe Kappus from comment #8)
> I haven't hit any issues running this yet with multiple accounts. That's
> including testing stuff like the Stories feature.
> 
> But there are now starting to be issues using the older versions in portage
> due to all the changes telegram is rolling out (mainly notifications are
> getting screwed up and not showing between accounts). 

How are notifications screwed up? I use version 4.8.4 and sometimes push notifications from chats with recent activity (or that I was looking at recently) are delayed.

I saw that glibmm-2.78.0 is released and stable:
https://download.gnome.org/sources/glibmm/2.78/glibmm-2.78.0.news

Hope that solves our problems.

Current telegram version is 4.9.9.
Comment 13 Mike 2023-09-23 06:44:47 UTC
Current Telegram version is 4.10.0.
Comment 14 Mike 2023-09-24 07:30:01 UTC
Current Telegram version is 4.10.1:

https://github.com/telegramdesktop/tdesktop/releases

Time goes by so fast...
Comment 15 Esteve Varela Colominas 2023-09-24 08:20:54 UTC
Welcome to telegram patch sprees. I generally just wait them out.
Sorry for taking so long with the bump. I've been very busy as of late and I need to re-evaluate some of the patches.
Comment 16 Joe Kappus 2023-09-24 09:32:12 UTC
Erik, the old versions in ::gentoo don't work well if you use multiple accounts at once on telegram. The notifications for the accounts not in view will not show. Plus all the stories features will not work. I don't think this should be surprising.

Mike, gentoo doesn't bump every release telegram puts out since they push a ton and not all have changes applicable to Linux (like 4.10.1). Use my overlay if you want rapid updates and don't care about it getting as much testing/patching as the main tree.

Esteve, jemalloc patch works, remove-private-qt does not patch cleanly anymore (I just dropped it from my tree, they release more frequently than qt does), and the rest I believe were upstreamed. Up to you whether it needs more patching.

I've also submitted a PR to bump the -bin ebuild.
Comment 17 Esteve Varela Colominas 2023-09-24 13:47:42 UTC
iirc the clang patches weren't integrated properly because upstream didn't like them, and the way they solved it didn't really work, but I'm not sure since it's been a hot minute so I'm currently testing that. tg_owt has integrated libyuv (potentially security) fixes, and cppgir could also use some updating. It's just that my computer is slow, depressed, has anorexia and a low self-estem, so it's gonna take a bit to upgrade clang and whatnot :)
Comment 18 Mike 2023-09-24 13:51:52 UTC
(In reply to Joe Kappus from comment #16)
> Erik, the old versions in ::gentoo don't work well if you use multiple
> accounts at once on telegram. The notifications for the accounts not in view
> will not show. Plus all the stories features will not work. I don't think
> this should be surprising.
> 
> Mike, gentoo doesn't bump every release telegram puts out since they push a
> ton and not all have changes applicable to Linux (like 4.10.1). Use my
> overlay if you want rapid updates and don't care about it getting as much
> testing/patching as the main tree.
> 
> Esteve, jemalloc patch works, remove-private-qt does not patch cleanly
> anymore (I just dropped it from my tree, they release more frequently than
> qt does), and the rest I believe were upstreamed. Up to you whether it needs
> more patching.
> 
> I've also submitted a PR to bump the -bin ebuild.

Did you mean this overlay?

https://github.com/joecool1029/joecool-overlay
Comment 19 Esteve Varela Colominas 2023-09-27 18:02:41 UTC
Progress update:
Discovered some automagic dependencies on QtQuick and QtQuickWidgets. It could explain https://bugs.gentoo.org/911395
Am adding a new use flag to control this dependency, and while at it treating webkit-gtk as an rdepend.
Apparently QtDBus is also an optional dependency these days, not sure what it does, though. Will probably keep it as-is.
Comment 20 Esteve Varela Colominas 2023-09-29 13:58:07 UTC
(In reply to Joe Kappus from comment #16)

Joe, have you managed to compile 4.10.x with Qt5, or are you building with Qt6?
I'm having trouble with Qt5 currently.
Comment 21 Ionen Wolkens gentoo-dev 2023-09-29 14:13:40 UTC
Personally I'd just drop Qt5 support if it's going to cause issues.
Comment 22 Esteve Varela Colominas 2023-09-29 15:12:09 UTC
I'm just making sure it's not just my setup.
Comment 23 Esteve Varela Colominas 2023-09-29 15:19:25 UTC
Qt5 is still being supported, and the issue I was facing has been fixed:
https://github.com/desktop-app/lib_webview/commit/25d3e658b0b9a34eef90ea2e2570bd9b0fd47bce

This is among a few other issues I'm waiting for 4.10.2 for.
Comment 24 Esteve Varela Colominas 2023-10-01 13:09:36 UTC
Now I'm encountering Clang issues, fixed (and verified) in this commit:
https://github.com/desktop-app/lib_base/commit/0912ba4b3b67fc485dc43f64664b5a56b9509e02

Now I'm waiting for 4.10.3 :/
It keeps happening.
Comment 25 Erik 2023-10-01 18:05:50 UTC
(In reply to Erik from comment #12)
> I saw that glibmm-2.78.0 is released and stable:
> https://download.gnome.org/sources/glibmm/2.78/glibmm-2.78.0.news
> 
> Hope that solves our problems.
> 
> Current telegram version is 4.9.9.

Unfortunately glibmm-2.78 is broken. It installs files into /usr/include/glibmm-2.68. See most recent comment on bug #829512.
Comment 26 Esteve Varela Colominas 2023-10-01 18:18:50 UTC
(In reply to Erik from comment #25)
> Unfortunately glibmm-2.78 is broken. It installs files into
> /usr/include/glibmm-2.68. See most recent comment on bug #829512.

That path is there to be able to SLOT dev-cpp/glibmm:2.68 next to dev-cpp/glibmm:2
If I had to guess why this is that way, I'd say versions prior to 2.68 are API and ABI incompatible, and some applications will need to depend on :2

Anyway, this has nothing to do with telegram, the pkgconfig files specify the correct directories for us.
Comment 27 Erik 2023-10-01 18:35:12 UTC
(In reply to Esteve Varela Colominas from comment #26)
> Anyway, this has nothing to do with telegram

Telegram build fails related to it:
In file included from /var/tmp/portage/net-im/telegram-desktop-4.8.4-r2/work/tdesktop-4.8.4-full/Telegram/lib_base/base/platform/linux/base_last_input_linux.cpp:10:
/var/tmp/portage/net-im/telegram-desktop-4.8.4-r2/work/tdesktop-4.8.4-full/Telegram/lib_base/base/platform/linux/base_linux_glibmm_helper.h:22:7: error: redefinition of ‘class Glib::Variant<long long int>’
   22 | class Variant<Int64Helper> : public VariantBase {
      |       ^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/glibmm-2.68/glibmm/variant.h:1785,
                 from /var/tmp/portage/net-im/telegram-desktop-4.8.4-r2/work/tdesktop-4.8.4-full/Telegram/lib_base/base/platform/linux/base_linux_glibmm_helper.h:11:
/usr/include/glibmm-2.68/glibmm/variant_basictypes.h:735:18: note: previous definition of ‘class Glib::Variant<long long int>’
  735 | class GLIBMM_API Variant<long long> : public VariantBase
      |                  ^~~~~~~~~~~~~~~~~~
/var/tmp/portage/net-im/telegram-desktop-4.8.4-r2/work/tdesktop-4.8.4-full/Telegram/lib_base/base/platform/linux/base_linux_glibmm_helper.h:66:7: error: redefinition of ‘class Glib::Variant<long long unsigned int>’
   66 | class Variant<UInt64Helper> : public VariantBase {
      |       ^~~~~~~~~~~~~~~~~~~~~
/usr/include/glibmm-2.68/glibmm/variant_basictypes.h:778:18: note: previous definition of ‘class Glib::Variant<long long unsigned int>’
  778 | class GLIBMM_API Variant<unsigned long long> : public VariantBase
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~
Comment 28 Esteve Varela Colominas 2023-10-01 20:42:32 UTC
That error has nothing to do with its install location. A new version of SLOT=2.68 may be slightly api incompatible with the previous version. As long as the ABI is backwards-compatible that's generally fine. Maybe a new SLOT is in order, but regardless of what happens telegram would need to be fixed up for this glibmm update. For now, you can downgrade glibmm to 2.76, then build tdesktop, and upgrade glibmm afterwards.
Anyway, please keep this issue on-topic, and please understand that I'm prioritizing getting this new version into the tree and stable, than fixing up a version that's over three months old.
Comment 29 Larry the Git Cow gentoo-dev 2023-10-07 22:26:51 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=49a2ff0348fa1dc82946cc2a68c4bde6af1d55ff

commit 49a2ff0348fa1dc82946cc2a68c4bde6af1d55ff
Author:     Esteve Varela Colominas <esteve.varela@gmail.com>
AuthorDate: 2023-10-04 06:00:06 +0000
Commit:     Ionen Wolkens <ionen@gentoo.org>
CommitDate: 2023-10-07 22:25:08 +0000

    net-im/telegram-desktop: Bump to 4.10.3
    
    Closes: https://bugs.gentoo.org/911145
    Signed-off-by: Esteve Varela Colominas <esteve.varela@gmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/33182
    Signed-off-by: Ionen Wolkens <ionen@gentoo.org>

 net-im/telegram-desktop/Manifest                   |   1 +
 .../files/tdesktop-4.10.0-system-cppgir.patch      |  32 +++
 .../tdesktop-4.10.3-fix-clang-libstdcxx.patch      |  13 ++
 .../telegram-desktop-4.10.3.ebuild                 | 234 +++++++++++++++++++++
 4 files changed, 280 insertions(+)