Telegram now automatically downloads its updater into my user home directory and wants to run that, asking for the root password, on the next start. The only way to get rid of that updating is to delete ~/.local/share/TelegramDesktop/tupdates/, but then it just downloads the update again. Since net-im/telegram-desktop is managed by the Gentoo ebuild, the updates should be completely disabled instead. Reproducible: Always Steps to Reproduce: 1. Start telegram-desktop 2. Wait for it to show the "Update Telegram" button on the bottom left 3. Close Telegram 4. Start telegram-desktop again Actual Results: A prompt to enter the root password is shown on the console, to run the auto-updater. Expected Results: No updates should be done outside the package manager.
I can't reproduce this. Considering the -r1 version isn't being specified, are you sure you're running net-im/telegram-desktop, and not net-im/telegram-desktop-bin (note the -bin part)? If you're sure, please run the following commands and show me the output: sudo ebuild /var/db/repos/gentoo/net-im/telegram-desktop/telegram-desktop-3.0.1-r1.ebuild clean configure sudo grep DESKTOP_APP_DISABLE_AUTOUPDATE /var/tmp/portage/net-im/telegram-desktop-3.0.1-r1/work/telegram-desktop-3.0.1_build/CMakeCache.txt On my system, and any other system, this should say "DESKTOP_APP_DISABLE_AUTOUPDATE:BOOL=ON". Also, an additional question, do the updater-related settings pop up in settings->advanced?
Oh, you're absolutely right, I've been running net-im/telegram-desktop-bin. My bad, sorry! I guess the bug does still apply to that package, though? Unless that's fixed with 3.1.0. Personally, I'm switching over to net-im/telegram-desktop, then.
(Also, 3.0.1-r1 doesn't seem to exist? https://gitweb.gentoo.org/repo/gentoo.git/tree/net-im/telegram-desktop only has 3.0.1)
Right, -r1 hasn't been pushed yet, my bad.
As of 2.9.4 -externalupdater flag has been ignored. Instead, we should create /etc/tdesktop/externalupdater file with only line pointing telegram binary itself: echo /usr/lib/telegram-desktop-bin/Telegram > /etc/tdesktop/externalupdater
Created attachment 741492 [details] Updated ebuild to install /etc/tdesktop/externalupdater This ebuild needs externalupdater file
Created attachment 741495 [details] /etc/tdesktop/externalupdater file needed to stop Telegram from trying to run update
Created attachment 741498 [details] Updated ebuild to install /etc/tdesktop/externalupdater
Created attachment 741501 [details] Updated wrapper (-externalupdater flag is not respected by telegram as of 2.9.4)
telegram-desktop-bin disables the internal updater with appending the cmdline arg "-externalupdater". But i have seen the internal updater still doing something a while ago. Looking at the sourcecode it still has code for that cmdline switch so i was expecting a glitch in my setup. Alexey Zapparov, did you find any evidence on why your suggestion is "correct". I think we should rather get in touch with upstream to repair that switch (in case it is broken), instead of coming up with a workaround that might not work for long either.
https://github.com/telegramdesktop/tdesktop/commit/8b7b0fa570775338a4fa28a245405e0d3f9e0b77 removed "-externalupdater", first released in 2.9.4
https://github.com/telegramdesktop/tdesktop/commit/b19dcf0653dc2deb00ca2edffc4bb7cafcb4a863 did add that very weird interface where the config file contains a line to point to the binary in order to disable the internal updater ... but it is what it is and creating such a file does the trick
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d4d5d2b25219999249569b6031b6514f653047f1 commit d4d5d2b25219999249569b6031b6514f653047f1 Author: Henning Schild <henning@hennsch.de> AuthorDate: 2021-10-03 08:39:51 +0000 Commit: Ionen Wolkens <ionen@gentoo.org> CommitDate: 2021-10-03 15:24:09 +0000 net-im/telegram-desktop-bin: disable internal updater again Upstream silently dropped the "-externalupdater" switch. Instead we need to create a file in /etc to disable the internal updater. Closes: https://bugs.gentoo.org/814062 Signed-off-by: Henning Schild <henning@hennsch.de> Closes: https://github.com/gentoo/gentoo/pull/22472 Signed-off-by: Ionen Wolkens <ionen@gentoo.org> net-im/telegram-desktop-bin/files/telegram-desktop-bin | 9 --------- ...top-bin-3.0.1.ebuild => telegram-desktop-bin-3.0.1-r1.ebuild} | 9 +++++---- ...top-bin-3.1.0.ebuild => telegram-desktop-bin-3.1.0-r1.ebuild} | 9 +++++---- ...top-bin-3.1.1.ebuild => telegram-desktop-bin-3.1.1-r1.ebuild} | 9 +++++---- 4 files changed, 15 insertions(+), 21 deletions(-)
Henning Schild, sorry for not providing the links to relevant upstream commits and pull-requests (somehow I thought I did). Thanks for resolving it.
Thanks for the report and digging out a solution. What was merged was inspired by your suggestions.