Bug 221283

Summary: net-im/linux-telegram-desktop: Update to 1.1.23
Product: Ports & Packages Reporter: Thomas Merkel <tm>
Component: Individual Port(s)Assignee: Jochen Neumeister <joneum>
Status: Closed FIXED    
Severity: Affects Some People CC: a.andersson.thn, henry.hu.sh, joneum
Priority: --- Keywords: easy, needs-qa
Version: LatestFlags: henry.hu.sh: maintainer-feedback+
Hardware: Any   
OS: Any   
Attachments:
Description Flags
net-im/linux-telegram-desktop update to version 1.1.19
henry.hu.sh: maintainer-approval+
poudriere log
none
patched launch script
none
patch henry.hu.sh: maintainer-approval+

Description Thomas Merkel 2017-08-06 14:38:17 UTC
Created attachment 185092 [details]
net-im/linux-telegram-desktop update to version 1.1.19
Comment 1 Andreas Andersson 2017-08-08 05:31:36 UTC
I tried this diff on my laptop (11.1, amd64) works without a problem.
Comment 2 Henry Hu 2017-08-08 16:15:16 UTC
I tried this patch and it works well. I've been using 1.1.19 for several days and it works the same as before. Please commit it.
Comment 3 Kubilay Kocak freebsd_committer freebsd_triage 2017-08-09 03:52:47 UTC
Run time QA testing and confirmation (while great and should be done more often), does not test packaging.

Could either the reporter or maintainer please confirm that this change passes poudriere
Comment 4 Andreas Andersson 2017-08-09 13:20:11 UTC
I can confirm poudriere testport runs find on amd64.
Comment 5 Henry Hu 2017-08-09 17:41:15 UTC
Created attachment 185213 [details]
poudriere log

This is the poudriere log of building version 1.1.19. It builds successfully.
Comment 6 Jochen Neumeister freebsd_committer freebsd_triage 2017-08-09 22:29:42 UTC
Is there a link to see the Changes?
Comment 7 Henry Hu 2017-08-09 22:33:42 UTC
The version history page (https://desktop.telegram.org/changelog) rarely updates. From the update info sent inside Telegram:

New in version 1.1.19:

— Search by messages of specific group members.
— Bug fixes and other minor improvements.

Same message is present on the github release page (https://github.com/telegramdesktop/tdesktop/releases) which also shows older changelogs.
Comment 8 Jochen Neumeister freebsd_committer freebsd_triage 2017-08-13 17:09:49 UTC
http://joneumbox.org/data/10amd64-ports/2017-08-10_01h00m26s/logs/linux-telegram-desktop-1.1.19.log

Hmm, does these messages mean that the port does not run on 10.3?
>   Registering installation for linux-telegram-desktop-1.1.19

(linux-telegram-desktop-1.1.19) /wrkdirs/usr/ports/net-im/linux-telegram-desktop/work/stageusr/local/lib/telegram-desktop/Telegram - required shared library libxcb.so.1 not found
(linux-telegram-desktop-1.1.19) /wrkdirs/usr/ports/net-im/linux-telegram-desktop/work/stageusr/local/lib/telegram-desktop/Telegram - required shared library libX11.so.6 not found
(linux-telegram-desktop-1.1.19) /wrkdirs/usr/ports/net-im/linux-telegram-desktop/work/stageusr/local/lib/telegram-desktop/Telegram - required shared library libX11-xcb.so.1 not found
(linux-telegram-desktop-1.1.19) /wrkdirs/usr/ports/net-im/linux-telegram-desktop/work/stageusr/local/lib/telegram-desktop/Telegram - required shared library libdbus-1.so.3 not found
(linux-telegram-desktop-1.1.19) /wrkdirs/usr/ports/net-im/linux-telegram-desktop/work/stageusr/local/lib/telegram-desktop/Telegram - required shared library libdl.so.2 not found
(linux-telegram-desktop-1.1.19) /wrkdirs/usr/ports/net-im/linux-telegram-desktop/work/stageusr/local/lib/telegram-desktop/Telegram - required shared library libglib-2.0.so.0 not found
(linux-telegram-desktop-1.1.19) /wrkdirs/usr/ports/net-im/linux-telegram-desktop/work/stageusr/local/lib/telegram-desktop/Telegram - required shared library libpthread.so.0 not found
(linux-telegram-desktop-1.1.19) /wrkdirs/usr/ports/net-im/linux-telegram-desktop/work/stageusr/local/lib/telegram-desktop/Telegram - required shared library libm.so.6 not found
(linux-telegram-desktop-1.1.19) /wrkdirs/usr/ports/net-im/linux-telegram-desktop/work/stageusr/local/lib/telegram-desktop/Telegram - required shared library libc.so.6 not found
(linux-telegram-desktop-1.1.19) /wrkdirs/usr/ports/net-im/linux-telegram-desktop/work/stageusr/local/lib/telegram-desktop/Telegram - required shared library ld-linux.so.2 not found

Can you pls check this? I have no 10.3 machine currently :(
Comment 9 Thomas Merkel 2017-08-18 19:59:17 UTC
I can confirm that it isn't working on FreeBSD 10.3.

-->8--
/lib/libc.so.6(gsignal+0x47)[0x2d0221f7]
/lib/libc.so.6(abort+0x143)[0x2d023a33]
/usr/local/lib/telegram-desktop/Telegram[0x9952267]
/usr/local/lib/telegram-desktop/Telegram(_ZN14QXcbConnectionC2EP19QXcbNativeInterfacebjPKc+0x875)[0x8ff0c85]
/usr/local/lib/telegram-desktop/Telegram(_ZN15QXcbIntegrationC1ERK11QStringListRiPPc+0x316)[0x8fc14e6]
/usr/local/lib/telegram-desktop/Telegram[0x8fbffdf]
/usr/local/lib/telegram-desktop/Telegram[0x980f8ef]
/usr/local/lib/telegram-desktop/Telegram[0x9526c53]
/usr/local/lib/telegram-desktop/Telegram[0x9527a4c]
/usr/local/lib/telegram-desktop/Telegram[0x91bf6f8]
/usr/local/lib/telegram-desktop/Telegram[0x9b11603]
/usr/local/lib/telegram-desktop/Telegram[0x9529273]
/usr/local/lib/telegram-desktop/Telegram[0x91c16fa]
/usr/local/lib/telegram-desktop/Telegram(_ZN11ApplicationC2ERiPPc+0x2c)[0x892ba9c]
/usr/local/lib/telegram-desktop/Telegram(main+0x9b)[0x842155b]
/lib/libc.so.6(__libc_start_main+0xf3)[0x2d00d9a3]
/usr/local/lib/telegram-desktop/Telegram[0x843c2c9]
Abort (core dumped)
--8<--
Comment 10 Jochen Neumeister freebsd_committer freebsd_triage 2017-08-19 09:06:56 UTC
Well, what shall we do?
Do you want to fix it, or mark it as Broken for 10.3?
Comment 11 Thomas Merkel 2017-08-19 15:22:07 UTC
Hello Jochen,

thanks for your question it took me a little bit longer to debug the issue to be sure if I could fix it or not. Anyway what I found out is that the application works with the following workaround:

1. Be sure dbus is running (service dbus start and /etc/rc.conf: dbus_enable=YES)
2. In your home folder the following directories need to exist:
   ~/.local/share/TelegramDesktop
   ~/.local/share/TelegramDesktop/tdata

I'm not sure if that is something which could be fixed or added to the ports file because it require some modification of the users home.
Comment 12 Henry Hu 2017-08-20 02:06:09 UTC
(In reply to Jochen Neumeister from comment #8)
This is strange. I tried a poudriere run on 10.3-RELEASE-p21 and it succeeded.
Later I'll try it on a 10.3 vm. Are you both using 10.3 on amd64?
Comment 13 Jochen Neumeister freebsd_committer freebsd_triage 2017-08-27 17:06:14 UTC
(In reply to Henry Hu from comment #12)

i386 and amd64
Comment 14 Jochen Neumeister freebsd_committer freebsd_triage 2017-09-09 14:23:43 UTC
Any update?
Comment 15 Henry Hu 2017-09-11 03:49:49 UTC
(In reply to Jochen Neumeister from comment #14)

I tried it on an 10.3/amd64 VM and it can be made to work.

Like Thomas pointed out, there are 2 requirements:
1. Be sure dbus is running (service dbus start and /etc/rc.conf: dbus_enable=YES)

It requires dbus to be correctly configured (have DBUS_SESSION_BUS_ADDRESS present in the environment) or it would crash upon startup.

2. In your home folder the following directories need to exist:
   ~/.local/share/TelegramDesktop
   ~/.local/share/TelegramDesktop/tdata

Add

    mkdir -p $HOME/.local/share/TelegramDesktop/tdata

into telegram-desktop.sh.in can solves this.

I've uploaded a patch which includes those commands. Please try it out on a fresh install.
Comment 16 Henry Hu 2017-09-11 03:51:49 UTC
Created attachment 186239 [details]
patched launch script

The startup script now checks if DBus' environment variable is present. If it is not, dbus-launch is used to create a message bus. This might be problematic, but if it is not present then it is possible that the user does not use DBus.
It also creates the data directory if necessary.
Comment 17 Jochen Neumeister freebsd_committer freebsd_triage 2017-09-28 18:51:24 UTC
Hey guys, sorry for the late replay.

One problem: ~...net-im/linux-telegram-desktop: make makesum                                  [20:46:40]
=> tsetup32.1.1.19.tar.xz doesn't seem to exist in /usr/home/joneum/dev/ports/distfiles/.
=> Attempting to fetch https://updates.tdesktop.com/tlinux32/tsetup32.1.1.19.tar.xz
fetch: https://updates.tdesktop.com/tlinux32/tsetup32.1.1.19.tar.xz: Not Found
=> Attempting to fetch http://freebsd.nsu.ru/distfiles/tsetup32.1.1.19.tar.xz
fetch: http://freebsd.nsu.ru/distfiles/tsetup32.1.1.19.tar.xz: Not Found
=> Attempting to fetch http://distcache.FreeBSD.org/ports-distfiles/tsetup32.1.1.19.tar.xz
fetch: http://distcache.FreeBSD.org/ports-distfiles/tsetup32.1.1.19.tar.xz: Not Found
=> Couldn't fetch it - please try to retrieve this
=> port manually into /usr/home/joneum/dev/ports/distfiles/ and try again.
*** Error code 1

Stop.

both master sites are offline:
    http://freebsd.nsu.ru/distfiles/
    https://updates.tdesktop.com/tlinux32/

https://desktop.telegram.org/ still work.

Have you more information about the 2 Master sites? Or will you switch to telegram.org?
Comment 18 Henry Hu 2017-09-28 20:15:22 UTC
(In reply to Jochen Neumeister from comment #17)
It seems like that the main reason is that now we should update to 1.1.23:

https://updates.tdesktop.com/tlinux32/tsetup32.1.1.23.tar.xz

I'll check if the new version works well.
Comment 20 Henry Hu 2017-09-30 03:49:18 UTC
Comment on attachment 186807 [details]
patch

Version 1.1.23 seems to be working well.
Comment 21 commit-hook freebsd_committer freebsd_triage 2017-10-08 11:49:26 UTC
A commit references this bug:

Author: joneum
Date: Sun Oct  8 11:48:16 UTC 2017
New revision: 451520
URL: https://svnweb.freebsd.org/changeset/ports/451520

Log:
  net-im/linux-telegram-desktop: Update from 1.1.7 to 1.1.23

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

  PR:		221283
  Reported by:	tm+freebsd@core.io
  Approved by:	Henry Su <henry.su@gmail.com> (maintainer)
  Approved by:	miwi (mentor)
  Differential Revision:	https://reviews.freebsd.org/D11940

Changes:
  head/net-im/linux-telegram-desktop/Makefile
  head/net-im/linux-telegram-desktop/distinfo
  head/net-im/linux-telegram-desktop/files/telegram-desktop.sh.in
Comment 22 Jochen Neumeister freebsd_committer freebsd_triage 2017-10-08 11:50:30 UTC
Committed, thanks :-)