Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 499100 - net-im/viber-bin - proprietary messaging and calling app for Linux (New package)
Summary: net-im/viber-bin - proprietary messaging and calling app for Linux (New package)
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal with 5 votes (vote)
Assignee: Default Assignee for New Packages
URL: http://www.viber.com/
Whiteboard:
Keywords: EBUILD
Depends on:
Blocks:
 
Reported: 2014-01-24 08:09 UTC by Martux
Modified: 2024-03-18 17:25 UTC (History)
19 users (show)

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


Attachments
first alpha viber ebuild (viber-1.0.ebuild,325 bytes, text/plain)
2014-02-02 22:52 UTC, b1254633
Details
second alpha viber ebuild (viber-1.0.ebuild,349 bytes, text/plain)
2014-02-02 23:28 UTC, b1254633
Details
viber ebuild (viber-1.0.ebuild,478 bytes, text/plain)
2014-02-03 17:15 UTC, b1254633
Details
viber-1.0.ebuild (viber-1.0.ebuild,512 bytes, text/plain)
2014-02-03 20:01 UTC, b1254633
Details
viber-1.0.ebuild (viber-1.0.ebuild,586 bytes, text/plain)
2014-02-06 15:57 UTC, b1254633
Details
viber-1.0.ebuild (viber-1.0.ebuild,680 bytes, text/plain)
2014-02-08 10:54 UTC, b1254633
Details
viber-9999.ebuild (viber-9999.ebuild,696 bytes, text/plain)
2014-02-09 09:58 UTC, b1254633
Details
viber-bin-6.5.5.1481.ebuild (viber-bin-6.5.5.1481.ebuild,1.86 KB, text/plain)
2017-01-27 20:55 UTC, Vladimir Pavljuchenkov (SpiderX)
Details
viber-bin-7.0.0.1035.ebuild (viber-bin-7.0.0.1035.ebuild,3.01 KB, text/plain)
2017-12-22 15:49 UTC, Vladimir Pavljuchenkov (SpiderX)
Details
viber-bin-7.0.0.1035.ebuild (viber-bin-7.0.0.1035.ebuild,3.28 KB, text/plain)
2018-03-12 16:50 UTC, Vladimir Pavljuchenkov (SpiderX)
Details
viber-bin-7.0.0.1035.ebuild (viber-bin-7.0.0.1035.ebuild,3.28 KB, text/plain)
2018-03-15 19:59 UTC, Vladimir Pavljuchenkov (SpiderX)
Details
ebuild (viber-bin-10.3.0.37.ebuild,3.12 KB, text/plain)
2019-11-12 23:18 UTC, Vladimir Pavljuchenkov (SpiderX)
Details
viber-10.3.0.37.ebuild (viber-bin-10.3.0.37.ebuild,3.12 KB, text/plain)
2019-11-18 10:05 UTC, Vladimir Pavljuchenkov (SpiderX)
Details
updated viber ebuild, with proper permissions and accounting for moved files (viber-12.0.0.ebuild,1.05 KB, text/plain)
2020-02-11 16:11 UTC, George Shapovalov
Details
viber-13.3.1.22.ebuild (viber-13.3.1.22.ebuild,6.30 KB, text/plain)
2020-07-27 19:36 UTC, Vladimir Pavljuchenkov (SpiderX)
Details
viber-16.1.0.37.ebuild (viber-16.1.0.37.ebuild,6.35 KB, text/plain)
2021-10-25 10:05 UTC, Vladimir Pavljuchenkov (SpiderX)
Details
viber-18.2.0.2.ebuild (viber-18.2.0.2.ebuild,6.75 KB, text/plain)
2022-09-24 18:26 UTC, Vdrag
Details
viber-18.2.0.2-r1.ebuild (viber-18.2.0.2-r1.ebuild,9.77 KB, text/plain)
2023-01-25 02:15 UTC, Alexander Kurakin
Details
viber-18.2.0.2-r1.ebuild (viber-18.2.0.2-r1.ebuild,4.12 KB, text/plain)
2023-01-27 14:27 UTC, Alexander Kurakin
Details
viber-18.2.0.2-r1.ebuild (viber-18.2.0.2-r1.ebuild,4.18 KB, text/plain)
2023-02-04 20:04 UTC, Alexander Kurakin
Details
viber-18.2.0.2-r1.ebuild (viber-18.2.0.2-r1.ebuild,4.23 KB, text/plain)
2023-05-30 12:54 UTC, Alexander Kurakin
Details
Viber 21.0.0.1 Ebuild (viber-21.0.0.1.ebuild,4.61 KB, text/plain)
2023-11-12 17:30 UTC, Alexander Kurakin
Details
viber-21.8.0.11.ebuild (viber-21.8.0.11.ebuild,4.71 KB, text/plain)
2024-03-18 17:25 UTC, Alexander Kurakin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martux 2014-01-24 08:09:51 UTC
http://www.viber.com/products/linux/

Viber for Android and desktop, native Linux client available.
I don't know if it is possible to add .deb packages, but I would love to see this in portage!
(It works pretty well with WINE, but of course the native client would be better).
Comment 1 b1254633 2014-02-01 14:10:49 UTC
just download it and decompress data.tar.gz in root.

Works very well in Gentoo.

waiting ebuild....
Comment 2 Martux 2014-02-02 08:49:51 UTC
I will wait for an ebuild too. I really don't want to spam my system with manually installed packages. The wine version works though.
Comment 3 b1254633 2014-02-02 22:52:21 UTC
Created attachment 369392 [details]
first alpha viber ebuild

this is my very first ebuild. I don't know if it works for you
Comment 4 Alex Xu (Hello71) 2014-02-02 23:00:54 UTC
(In reply to b1254633 from comment #3)
> Created attachment 369392 [details]
> first alpha viber ebuild
> 
> this is my very first ebuild. I don't know if it works for you

please start all ebuilds from /usr/portage/skel.ebuild, then remove as necessary.
Comment 5 b1254633 2014-02-02 23:28:01 UTC
Created attachment 369396 [details]
second alpha viber ebuild

some unuseful corrections
Comment 6 b1254633 2014-02-03 17:15:34 UTC
Created attachment 369450 [details]
viber ebuild

updated to skel.ebuild scheme
Comment 7 Martux 2014-02-03 17:18:50 UTC
Hm, weird. ebuild compiles just fine, but if I call the command, from KDE menu or via Konsole, simply nothing happens. No output. Does it work for you?
Comment 8 b1254633 2014-02-03 19:07:30 UTC
very weird.... For me it works fine. I can start Viber from kde menu and from Konsole without issues.

try this command
sh /usr/share/viber/Viber.sh
Comment 9 Martux 2014-02-03 19:14:40 UTC
It works as root, not as user...
Comment 10 b1254633 2014-02-03 19:21:10 UTC
thus, it should be a permission issue

Can you post output of this?

ls -l /usr/share/viber/
Comment 11 Martux 2014-02-03 19:22:22 UTC
Sure:

ls -l /usr/share/viber/
insgesamt 102528
drwxr-xr-x 2 root root     4096  3. Feb 18:17 icons
drwxr-xr-x 2 root root     4096  3. Feb 18:17 imageformats
-rw-r--r-- 1 root root     5120  3. Feb 20:13 launcher.db
-rw-r--r-- 1 root root  1029368 31. Okt 09:26 libbfd-2.22-system.so
-rw-r--r-- 1 root root 18282384 31. Okt 09:26 libicudata.so.48
-rw-r--r-- 1 root root  1866528 31. Okt 09:26 libicui18n.so.48
-rw-r--r-- 1 root root  1465096 31. Okt 09:26 libicuuc.so.48
-rwxr-xr-x 1 root root  4334448 31. Okt 09:26 libQt5Core.so.5
-rwxr-xr-x 1 root root   489624 31. Okt 09:26 libQt5DBus.so.5
-rwxr-xr-x 1 root root  4190616 31. Okt 09:26 libQt5Gui.so.5
-rwxr-xr-x 1 root root  1390328 31. Okt 09:26 libQt5Network.so.5
-rwxr-xr-x 1 root root   432752 31. Okt 09:26 libQt5OpenGL.so.5
-rwxr-xr-x 1 root root   342400 31. Okt 09:26 libQt5PrintSupport.so.5
-rwxr-xr-x 1 root root  2359536 31. Okt 09:26 libQt5Qml.so.5
-rwxr-xr-x 1 root root  3553744 31. Okt 09:26 libQt5Quick.so.5
-rwxr-xr-x 1 root root   258240 31. Okt 09:26 libQt5Sql.so.5
-rwxr-xr-x 1 root root   333800 31. Okt 09:26 libQt5Svg.so.5
-rwxr-xr-x 1 root root  4483560 31. Okt 09:26 libQt5V8.so.5
-rwxr-xr-x 1 root root 32935424 31. Okt 09:26 libQt5WebKit.so.5
-rwxr-xr-x 1 root root   266304 31. Okt 09:26 libQt5WebKitWidgets.so.5
-rwxr-xr-x 1 root root  6418808 31. Okt 09:26 libQt5Widgets.so.5
-rwxr-xr-x 1 root root 19046376  3. Feb 18:17 libViber.so
-rw-r--r-- 1 root root    14480 31. Okt 09:26 libXss.so.1
drwxr-xr-x 2 root root     4096  3. Feb 18:17 platforms
drwxr-xr-x 5 root root     4096  3. Feb 18:17 Sound
drwxr-xr-x 2 root root     4096  3. Feb 18:17 sqldrivers
-rwxr-xr-x 1 root root  1386368  3. Feb 18:17 Viber
-rw-r--r-- 1 root root    25391 31. Okt 09:26 viber.png
-rwxr-xr-x 1 root root      228 31. Okt 09:26 Viber.sh
Comment 12 b1254633 2014-02-03 19:33:35 UTC
from root:
chown <yourusername>:<yourusername> /usr/share/viber/launcher.db

from user:
sh /usr/share/viber/Viber.sh

tell me if this fix it
Comment 13 Martux 2014-02-03 19:47:12 UTC
No, doesn't work, even ls -la shows my user:group as owner of the file. Still nothing happens.
Comment 14 b1254633 2014-02-03 20:01:04 UTC
Created attachment 369466 [details]
viber-1.0.ebuild

fix permissions
Comment 15 b1254633 2014-02-03 20:02:11 UTC
try

emerge -C viber
rm -rf /usr/share/viber

emerge viber using new ebuild
Comment 16 b1254633 2014-02-03 20:05:51 UTC
Comment on attachment 369466 [details]
viber-1.0.ebuild

># Copyright 1999-2014 Gentoo Foundation
># Distributed under the terms of the GNU General Public License v2
># $Header: $
>
>EAPI="5"
>
>DESCRIPTION="Free calls, text and picture sharing with anyone, anywhere!"
>HOMEPAGE="http://www.viber.com"
>SRC_URI="http://download.cdn.viber.com/cdn/desktop/Linux/viber.deb"
>
>SLOT="0"
>KEYWORDS="~amd64"
>IUSE=""
>
>src_unpack() {
>	unpack ${A}
>	mkdir ${P}
>}
>
>src_prepare(){
>	tar -xf "${WORKDIR}/data.tar.gz" -C ${S}
>	chmod 777 ${S}/usr/share/viber/
>}
>
>src_install(){
>	mv ${S}/* ${D}
>}
Comment 17 b1254633 2014-02-03 20:06:14 UTC
Comment on attachment 369466 [details]
viber-1.0.ebuild

># Copyright 1999-2014 Gentoo Foundation
># Distributed under the terms of the GNU General Public License v2
># $Header: $
>
>EAPI="5"
>
>DESCRIPTION="Free calls, text and picture sharing with anyone, anywhere!"
>HOMEPAGE="http://www.viber.com"
>SRC_URI="http://download.cdn.viber.com/cdn/desktop/Linux/viber.deb"
>
>SLOT="0"
>KEYWORDS="~amd64"
>IUSE=""
>
>src_unpack() {
>	unpack ${A}
>	mkdir ${P}
>}
>
>src_prepare(){
>	tar -xf "${WORKDIR}/data.tar.gz" -C ${S}
>	chmod 777 ${S}/usr/share/viber/
>}
>
>src_install(){
>	mv ${S}/* ${D}
>}
Comment 18 Martux 2014-02-03 20:11:09 UTC
Awesome! It works now :-D Thanks mate!! Let'S hope your ebuild makes it into portage.
Comment 19 Alex Xu (Hello71) 2014-02-03 21:50:41 UTC
chmod 777 evil

very bad

almost certainly insecure

pretty sure there are builtin methods for extracting .deb

see qgrep .deb
Comment 20 b1254633 2014-02-04 08:28:27 UTC
I know 777 is very bad. the problem is that viber needs to write launcher.db in /usr/share/viber/. It shoud be better if viber creates launcher.db in user home. In this way, chmod 777 is unnecessary.
Comment 21 Alex Xu (Hello71) 2014-02-04 15:55:58 UTC
Then patch it. We don't want another bug 125902.
Comment 22 b1254633 2014-02-04 19:41:01 UTC
My ebuild is public. If you are able patch it please.
Comment 23 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2014-02-05 00:29:53 UTC
Thank you for your bug and contribution.

Some further suggestions for improvements for whomever picks this up:

1) Except in SRC_URI, you can use ${PN} instead of viber; this allows for easier package changes.

2) To catch failures, add || die "..." (fill in a reason to die) at the end of external commands like mkdir, tar, chmod, mv.

3) ${S} and ${D} are unquoted, use "${S}" and "${D}" to allow spaces instead.

4) `chmod 777 ${S}/usr/share/viber/` is indeed wrong, see the install functions in the dev manual as there are functions like fperms; but as pointed out, this might be something that upstream will want to fix such that the user can use a file in ~ instead. Or maybe upstream does this already; so, check first how the package works in this regard. On a side note, permission changes are to be done in the src_install phase function.

5) `mv ${S}/* ${D}` is avoided, there are ins* and do* functions in the same install functions section of the devmanual.

For reference: http://devmanual.gentoo.org/function-reference/install-functions
Comment 24 b1254633 2014-02-06 15:57:06 UTC
Created attachment 369710 [details]
viber-1.0.ebuild

same changes
Comment 25 Martux 2014-02-06 18:14:07 UTC
Thank you for your efforts!
Comment 26 b1254633 2014-02-08 10:54:13 UTC
Created attachment 369864 [details]
viber-1.0.ebuild

added pkg_postrm
Comment 27 b1254633 2014-02-09 09:58:31 UTC
Created attachment 369934 [details]
viber-9999.ebuild
Comment 28 Martux 2014-02-09 10:11:47 UTC
The 9999 ebuild will not start. Seems it doesn't install in /usr/share/viber anymore?
Comment 29 b1254633 2014-02-09 11:02:33 UTC
can you post output?
Comment 30 Martux 2014-02-09 13:51:15 UTC
There's no output. There is simply no directory /usr/share/viber anymore.
Comment 31 b1254633 2014-02-09 21:27:36 UTC
it's weird

emerge -C viber?
Comment 32 Martux 2014-02-10 16:25:44 UTC
Very weird. If I unmerge version 1.0 and remerge the 9999-ebuild it works again :) Will this automatically fetch newer versions if called again?
Comment 33 b1254633 2014-02-10 18:32:11 UTC
It emerge the newer version only if you remove viber.deb from distfiles
Comment 34 Sven Müller 2014-07-07 19:50:37 UTC
Btw. /usr/share/viber is the wrong place for shared libraries und executable files. 

Better would be /usr/lib/viber. Or if that conflicts with existing libs, the right place would be /opt/viber as Google Earth does.
Comment 35 Julian Ospald 2014-07-07 20:45:45 UTC
(In reply to Sven Müller from comment #34)
> Btw. /usr/share/viber is the wrong place for shared libraries und executable
> files. 
> 
> Better would be /usr/lib/viber. Or if that conflicts with existing libs, the
> right place would be /opt/viber as Google Earth does.

precompiled binaries _always_ go to /opt... at least in gentoo
Comment 36 Paul Sobey 2014-08-07 16:21:44 UTC
Note, new version of Viber available for download on their site. It's named viber.deb (no versioning info per previous release, but has the following characteristics:

Size: 57046082
MD5: 4dec3ade37a3738c6f084858a4554861

It's a big improvement as far as I can tell:

- extracts into /opt/viber
- no 0777 perms needed any more (modify ebuild to make the executable /opt/viber/Viber 0755)
- no launcher.db requiring write perms
- faster
- shows delivered/seen/last online times


The only thing they haven't fixed is if you run it from an nfs mounted homedir it'll cry about re-registration every time you switch computers. I fixed by symlinking ~/.ViberPC into /var/tmp/viber on both machines and registering twice. I raised it with them as a bug also, no response yet.
Comment 37 Martux 2014-08-20 20:06:24 UTC
How do I modify the ebuild to work with this newer version?
Comment 38 MickKi 2014-10-12 12:53:20 UTC
Any idea when viber might arrive in portage?
-- 
Regards,
Mick
Comment 39 C. Wijtmans 2015-05-08 19:29:09 UTC
I also wish to have viber in portage. It could be a great replacement for skype.

http://gpo.zugaina.org/net-im/viber/Dep
Comment 40 Martux 2015-06-01 20:13:03 UTC
Guys, does anyone here has the newer versions of viber running successfully?
I can install it from any overlay, but when I go through the registration process it tells me that I need an internet connection.  I tried like 4 to 5 different ebuilds (all I could find) with no success. Any ideas?
Comment 41 miklosh 2015-10-19 15:39:37 UTC
viber need a =media-libs/gstreamer:0.10

>>$ /opt/viber/Viber 
>>/opt/viber/Viber: error while loading shared libraries: libgstreamer-0.10.so.0: cannot open shared object file: No such file or directory
Comment 42 lumbrius 2016-07-27 15:14:00 UTC
Can it be added to tree now, or some additional feedback is required?
Comment 43 Vladimir Pavljuchenkov (SpiderX) 2017-01-27 20:55:25 UTC
Created attachment 461658 [details]
viber-bin-6.5.5.1481.ebuild
Comment 44 Vladimir Pavljuchenkov (SpiderX) 2017-01-27 21:09:01 UTC
> Can it be added to tree now, or some additional feedback is required?

There is no good way to support it in portage, at least until Viber will continue to provide package without version info in its name.

Package is too big to be added to distfiles (from my point of view), so we can use distfiles to redistribute package.
At the same time, we can't use upstream provided package since every its update will break ebuild.
Comment 45 Vladimir Pavljuchenkov (SpiderX) 2017-12-22 15:49:38 UTC
Created attachment 511480 [details]
viber-bin-7.0.0.1035.ebuild
Comment 46 Alex Efros 2018-03-12 16:17:01 UTC
Is it actually needs pulseaudio? Any chance it'll work with media-sound/apulse instead?
Comment 47 Vladimir Pavljuchenkov (SpiderX) 2018-03-12 16:50:04 UTC
Created attachment 523570 [details]
viber-bin-7.0.0.1035.ebuild

viber-bin-7.0.0.1035.ebuild supports apulse.
You could try it.
Comment 48 Alex Efros 2018-03-14 15:59:03 UTC
(In reply to Vladimir Pavljuchenkov (SpiderX) from comment #47)
> viber-bin-7.0.0.1035.ebuild supports apulse.
> You could try it.

Thanks. It turns out viber require libpulse-mainloop-glib.so.0. It emulation was added to apulse just few weeks ago and not included in any tagged release yet. With apulse installed from current master viber was able to start, at least (I didn't had a chance to actually login and test is sound/microphone works with apulse).

BTW, you probably need to mark required one of apulse/pulseaudio USE flags.
Comment 49 Vladimir Pavljuchenkov (SpiderX) 2018-03-15 19:59:23 UTC
Created attachment 524072 [details]
viber-bin-7.0.0.1035.ebuild

It's great that you were able to use it.

> BTW, you probably need to mark required one of apulse/pulseaudio USE flags.

Added.
Comment 50 augustin 2019-11-12 04:28:38 UTC
net-im/viber now requires: dev-libs/openssl-compat:1.0.0
Comment 51 augustin 2019-11-12 04:47:18 UTC
This could be added to the list of packages failing with newer versions of openssl:
https://bugs.gentoo.org/592438 
https://bugs.gentoo.org/679194
Comment 52 Vladimir Pavljuchenkov (SpiderX) 2019-11-12 23:18:37 UTC
Created attachment 595920 [details]
ebuild

I don't see that viber has dependencies on openssl
Comment 53 augustin 2019-11-13 01:11:25 UTC
Conditions:
You use dev-libs/openssl-1.1.1 or above.

Symptoms:
You cannot use Viber desktop to send or receive files.

Solution, as I said, install:
dev-libs/openssl-compat:1.0.0 

So, it depends on your use of Viber. 
dev-libs/openssl-compat:1.0.0 is not a hard requirement, but if you care about receiving and sending files, then you need it. I spent the whole afternoon yesterday debugging Viber, figuring what was broken, why and how to fix it. The solution, it turns out, is very simple.

I posted the previous comment to save you all a lot of time, if you start to wonder why you cannot send file attachments.
Comment 54 Vladimir Pavljuchenkov (SpiderX) 2019-11-18 10:05:48 UTC
Created attachment 596622 [details]
viber-10.3.0.37.ebuild

> I posted the previous comment to save you all a lot of time, if you start to wonder why you cannot send file attachments

And you succeed in time saving, thanks.
I see what you meant.
Modified ebuild attached.
Comment 55 augustin 2020-02-11 10:50:55 UTC
How to check what is the latest version available for linux? 

The download page does not make it clear: https://www.viber.com/download/ only links to viber.rpm and viber.deb, without any version number mentioned.
Comment 56 George Shapovalov 2020-02-11 16:11:38 UTC
Created attachment 613290 [details]
updated viber ebuild, with proper permissions and accounting for moved files

(In reply to augustin from comment #55)
> How to check what is the latest version available for linux? 
To install it, then go to Help->About - that's the only way I know of unfortunately :).

Anyway, I am glad to report that as of now (or some time ago, impossible to be sure because of a really sloppy versioning by upstream - as was pointed out many times above, and which is the main reason Viber is not in the official tree)
Viber is working just fine with openssl:1.1. Installing/denending upon openssl-compat:1.0.0 is no longer necessary. Some extra info:

The latest version (as of this date) is 12.0.0
one of the files that need fperms done to it has been moved into libexec/ from top dir.
The updated ebuild for this latest version is attached..
Comment 57 augustin 2020-02-12 02:30:05 UTC
Thanks a lot George for the answer and the update.
Comment 58 augustin 2020-02-13 08:55:38 UTC
https://www.viber.com/blog/2020-02-10/remember-everything-thats-important-with-my-notes-see-whats-new-on-viber/ 
Is the feature above, "My Notes", supposed to be available on the Desktop 12.0.0 version? I just upgraded, thanks to George's newest ebuild, but I don't see it, so that I cannot share notes between the mobile and the desktop version.
Comment 59 George Shapovalov 2020-02-13 09:20:52 UTC
(In reply to augustin from comment #58)
> Is the feature above, "My Notes", supposed to be available on the Desktop
> 12.0.0 version?
Hm, not so sure. The active mobile version is 12.3.7, and I don't remember seeing My Notes until very recently. In fact I think I noticed them appearing like a week or two ago only, haven't even investigated what's that - was assuming its another spam channel that's popped up. So, thanks for a pointer in fact :).
But back to this issue, I rather suspect that not in 12.0, not yet. I don't think I can even see it on Windows version yet either, but I haven't updated it in a few weeks..
Frankly, I think its really nice/lucky that we are on the same major version in Linux as on mobile - quite contrary to most other messaging apps (like Skype :) ) lagging behind severely or even being actively blocked by regular protocol changes..

I guess just try to reinstall viber on desktop once in a while (every few weeks or so), but don;t forget first to delete downloaded file. Unfortunately, due to totally absent versioning info by upstream, the only way to spot an update is to force redownload and see if portage complains about checksum failure.. If it does fail - bingo! Rename the downloaded file back to its proper name (portage adds .chechsum_failure_blah-blah part to it) and run 
ebuild viber-x.y.z.ebuild digest
from its portage dir and then emerge away. You should have new version installed after that. If the build fails, likely due to some files having been moved around, then you are likely looking at major version change, then some ebuild adapting would be necessary, but usually simple..
Comment 60 augustin 2020-02-14 01:09:59 UTC
Thanks a lot George for all the information. I'll post further updates as and when I find something new.
Comment 61 augustin 2020-07-26 00:02:56 UTC
viber-13.3.1 for desktop linux is out.
In includes the feature that I mentioned in #58.
Comment 62 Vladimir Pavljuchenkov (SpiderX) 2020-07-27 19:36:05 UTC
Created attachment 651060 [details]
viber-13.3.1.22.ebuild
Comment 63 Vasilis Lourdas 2020-11-04 14:28:03 UTC
(In reply to Vladimir Pavljuchenkov (SpiderX) from comment #62)
> Created attachment 651060 [details]
> viber-13.3.1.22.ebuild

Your ebuild works fine here, but I have one issue. It core dumps when it tries to download a video. The same behaviour is with the viber AppImage, so it must be something wrong with the upstream binary.
Comment 64 Konstantinos Smanis 2020-11-04 17:58:57 UTC
You are probably missing one or more gstreamer packages. Upstream .deb depends on a bunch of them, namely:

Depends: libpulse0, libasound2, libnss3, libgstreamer-plugins-base1.0-0, libgstreamer1.0-0, gstreamer1.0-plugins-base, gstreamer1.0-plugins-good, gstreamer1.0-plugins-ugly, gstreamer1.0-pulseaudio, gstreamer1.0-libav

The Gentoo equivalent would be something along the lines of:

RDEPEND="media-libs/alsa-lib
    media-sound/pulseaudio
    dev-libs/nss
    media-libs/gstreamer:1.0
    media-libs/gst-plugins-base:1.0
    media-libs/gst-plugins-good:1.0
    media-libs/gst-plugins-ugly:1.0
    media-plugins/gst-plugins-pulse:1.0
    media-plugins/gst-plugins-libav:1.0"
Comment 65 Vasilis Lourdas 2020-11-04 18:25:09 UTC
(In reply to Konstantinos Smanis from comment #64)
> You are probably missing one or more gstreamer packages. Upstream .deb
> depends on a bunch of them, namely:
> 
> Depends: libpulse0, libasound2, libnss3, libgstreamer-plugins-base1.0-0,
> libgstreamer1.0-0, gstreamer1.0-plugins-base, gstreamer1.0-plugins-good,
> gstreamer1.0-plugins-ugly, gstreamer1.0-pulseaudio, gstreamer1.0-libav
> 
> The Gentoo equivalent would be something along the lines of:
> 
> RDEPEND="media-libs/alsa-lib
>     media-sound/pulseaudio
>     dev-libs/nss
>     media-libs/gstreamer:1.0
>     media-libs/gst-plugins-base:1.0
>     media-libs/gst-plugins-good:1.0
>     media-libs/gst-plugins-ugly:1.0
>     media-plugins/gst-plugins-pulse:1.0
>     media-plugins/gst-plugins-libav:1.0"

I have all these packages installed, I just checked. What else can I check?
Comment 66 Vladimir Pavljuchenkov (SpiderX) 2020-12-06 22:02:44 UTC
Try to launch it from shell, maybe it will provide some meaningful output on crush.
Comment 70 George Shapovalov 2021-09-29 09:38:40 UTC
Just to confirm that the last ebuild works fine so far (haven't tested all functionality yet though). Used mostly as is, with a minor modification of adding 
media-plugins/gst-plugins-libav[${MULTILIB_USEDEP}]
to RDEPEND and adjusting conditional on pulsaidio (ibid) to:
pulseaudio? ( 
        media-sound/pulseaudio[${MULTILIB_USEDEP}]
        media-plugins/gst-plugins-pulse[${MULTILIB_USEDEP}] )
Comment 71 Jonas Stein gentoo-dev 2021-10-24 17:40:02 UTC
https://gpo.zugaina.org/Search?search=viber shows several overlays with viber. 
Guru could be a good overlay to collaborate on this one https://wiki.gentoo.org/wiki/Project:GURU
Comment 72 Vladimir Pavljuchenkov (SpiderX) 2021-10-25 10:05:46 UTC
Created attachment 746598 [details]
viber-16.1.0.37.ebuild
Comment 73 Vdrag 2022-09-24 18:26:11 UTC
Created attachment 814015 [details]
viber-18.2.0.2.ebuild
Comment 74 Uladzimir Bely 2022-09-27 18:53:10 UTC
(In reply to Vdrag from comment #73)
> Created attachment 814015 [details]
> viber-18.2.0.2.ebuild

$ Viber 
Viber: error while loading shared libraries: libgstphotography-1.0.so.0: cannot open shared object file: No such file or directory
Comment 75 Uladzimir Bely 2022-09-27 18:56:08 UTC
(In reply to Uladzimir Bely from comment #74)
> (In reply to Vdrag from comment #73)
> > Created attachment 814015 [details]
> > viber-18.2.0.2.ebuild
> 
> $ Viber 
> Viber: error while loading shared libraries: libgstphotography-1.0.so.0:
> cannot open shared object file: No such file or directory

It seems, new ebuild should depend on `media-libs/gst-plugins-bad` that provides this library
Comment 76 Vadim Efimov 2022-09-28 16:16:03 UTC
Version 18.2.0.2 affected by Qt bug https://bugreports.qt.io/browse/QTBUG-101201 and fail to start in environment with multiple keyboard layouts:

xkbcommon: ERROR: Couldn't process include statement for 'us(winkeys)'
xkbcommon: ERROR: Abandoning symbols file "(unnamed)"
xkbcommon: ERROR: Failed to compile xkb_symbols
xkbcommon: ERROR: Failed to compile keymap
[8530:8560:0928/190953.815645:FATAL:xkb_keyboard_layout_engine.cc(640)] Keymap file failed to load: us-winkeys

For me fixed by simplest workaround ever: start Viber when non-us layout enabled. After startup it works fine.
Comment 77 Alexander Kurakin 2023-01-22 17:32:41 UTC
We also need `app-arch/snappy`:

```
$ Viber
Viber: error while loading shared libraries: libsnappy.so.1: cannot open shared object file: No such file or directory
```
Comment 78 Alexander Kurakin 2023-01-22 17:46:24 UTC
Also, dependencies from Viber's .deb:

```
Depends: libpulse0, libasound2, libnss3, libgstreamer-plugins-base1.0-0,
libgstreamer1.0-0, gstreamer1.0-plugins-base, gstreamer1.0-plugins-good,
gstreamer1.0-plugins-ugly, gstreamer1.0-pulseaudio, gstreamer1.0-libav,
libxcb-xinput0, libstdc++6
```

Note: they propose gstreamer1.0-plugins-{base,good,ugly}, we propose gstreamer1.0-plugins-{base,bad}. Uhm?
Comment 79 Alexander Kurakin 2023-01-24 14:41:01 UTC
Oh, I'm sorry about a  span... But I've found `qa-vdb` tool...

So, let's sum up again:

1. Here is its output for this bug's .ebuild:

```
$ qa-vdb net-im/viber-18.2.0.2
VDB: detected possibly incorrect RDEPEND (net-im/viber-18.2.0.2)
                        > app-arch/snappy
                        > app-arch/zstd
                        > app-crypt/mit-krb5
                        > dev-libs/libxml2
                        > dev-libs/libxslt
dev-libs/openssl-compat < 
                        > media-libs/gst-plugins-bad:1.0
                        > media-libs/harfbuzz
                        > media-libs/lcms:2
                        > media-libs/libglvnd
                        > media-libs/libwebp
                        > media-libs/opus
                        > media-libs/tiff
                        > sys-apps/systemd-utils
                        > sys-libs/mtdev
x11-libs/libXcomposite  < 
x11-libs/libXcursor     < 
x11-libs/libXdamage     < 
                        > x11-libs/libxkbcommon
                        > x11-libs/libxkbfile
x11-libs/libXi          < 
x11-libs/libXrender     < 
                        > x11-libs/libxshmfence
```

2. The dependencies from Viber's .deb:

```
Depends: libpulse0, libasound2, libnss3, libgstreamer-plugins-base1.0-0,
libgstreamer1.0-0, gstreamer1.0-plugins-base, gstreamer1.0-plugins-good,
gstreamer1.0-plugins-ugly, gstreamer1.0-pulseaudio, gstreamer1.0-libav,
libxcb-xinput0, libstdc++6
```
According to this, we may need `media-plugins/gst-plugins-libav`.
Also, they request `gstreamer1.0-plugins-{base,good,ugly}`, we request `media-libs/gst-plugins-base` only (`-bad` was proposed above).

3. We request
```
pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
```
but according to PipeWire sound server migration [1], could it be replaced by:
```
pulseaudio? ( media-libs/libpulse[${MULTILIB_USEDEP}] )
```
?

I'd appreciate a feedback very much.
Thanks!

---

[1] https://www.gentoo.org/support/news-items/2022-07-29-pipewire-sound-server.html
Comment 80 Alexander Kurakin 2023-01-25 02:15:23 UTC
Created attachment 849169 [details]
viber-18.2.0.2-r1.ebuild

Found also `x11-libs/tslib` and `media-libs/libmng` dependencies.

Created a patch based on my previous comments.

Also, add more `fperms`, move binaries fixing to `src_prepare`, move EAPI to 8, use HTTPS.
Comment 81 Alexander Kurakin 2023-01-27 14:27:12 UTC
Created attachment 849285 [details]
viber-18.2.0.2-r1.ebuild

Updates:

1. Point `amd64` architecture in `SRC_URI`.
2. Replace `QA_PREBUILT` by more concrete `QA_PRESTRIPPED` file list.
3. Move `pax-mark` and `fix-gnustack` back to `src-install`.
4. Replace back `media-libs/libpulse` by `media-sound/pulseaudio`.
5. Make `fperms +x` for really executable files only.
Comment 82 Vasilis Lourdas 2023-01-28 10:40:28 UTC
(In reply to Alexander Kurakin from comment #81)
> Created attachment 849285 [details]
> viber-18.2.0.2-r1.ebuild
> 
> Updates:
> 
> 1. Point `amd64` architecture in `SRC_URI`.
> 2. Replace `QA_PREBUILT` by more concrete `QA_PRESTRIPPED` file list.
> 3. Move `pax-mark` and `fix-gnustack` back to `src-install`.
> 4. Replace back `media-libs/libpulse` by `media-sound/pulseaudio`.
> 5. Make `fperms +x` for really executable files only.

Tried it. In my systemd system, I had blocks. The line

sys-apps/systemd-utils[${MULTILIB_USEDEP}]

must probably be replaced by

|| ( sys-apps/systemd[${MULTILIB_USEDEP}] sys-apps/systemd-utils[${MULTILIB_USEDEP}] )
Comment 83 Alexander Kurakin 2023-02-01 09:36:57 UTC
(In reply to Vasilis Lourdas from comment #82)
> (In reply to Alexander Kurakin from comment #81)
> Tried it. In my systemd system, I had blocks. The line
> 
> sys-apps/systemd-utils[${MULTILIB_USEDEP}]
> 
> must probably be replaced by
> 
> || ( sys-apps/systemd[${MULTILIB_USEDEP}]
> sys-apps/systemd-utils[${MULTILIB_USEDEP}] )

Vasilis, thank you very much! Will apply.

Seems like we need `udev` for `sys-apps/systemd-utils`.
BTW, could anybody help about required flags for all dependencies above?

And one more question. Is Viber's `.deb` for amd64 only?
Or we could use it for x86, too?
Comment 84 Alexander Kurakin 2023-02-04 20:04:46 UTC
Created attachment 849868 [details]
viber-18.2.0.2-r1.ebuild

Well, a new version, then.

Updates:

1. Fix LICENSE.
2. Move `sys-apps/fix-gnustack` from `IDEPEND` to `BDEPEND`.
3. `sys-apps/systemd-utils[${MULTILIB_USEDEP}]`
    was be replaced by
    ```
    || (
        sys-apps/systemd[${MULTILIB_USEDEP}]
        sys-apps/systemd-utils[udev,${MULTILIB_USEDEP}]
    )
    ```
Comment 85 Vadim Efimov 2023-04-13 09:00:47 UTC
Today Viber failed to start (not die, but show nothing) with messages below.
I have updated system yesterday (without --depclean). I see minor Gstereamer bump:   1.20.3 --> 1.20.4, kernel, and more.

If I cleanup ~/.ViberPC it show login screen and otputs message before "QHighDpiScaling", but after scanning QR code I got "new auth detected" in smartphone, rotating progressbar and other part of the messgae in console.

Appimage fail to start with same message.
Not sure what direction to search.


(Viber:20815): GStreamer-CRITICAL **: 11:42:05.987: gst_element_unlink: assertion 'GST_IS_ELEMENT (dest)' failed

(Viber:20815): GStreamer-CRITICAL **: 11:42:05.987: gst_bin_remove: assertion 'GST_IS_ELEMENT (element)' failed

(Viber:20815): GStreamer-CRITICAL **: 11:42:05.987: gst_element_set_state: assertion 'GST_IS_ELEMENT (element)' failed
qt.webenginecontext:

GLImplementation: desktop
Surface Type: OpenGL
Surface Profile: CompatibilityProfile
Surface Version: 4.6
Using Default SG Backend: yes
Using Software Dynamic GL: no
Using Angle: no

Init Parameters:
  *  allow-loopback-in-peer-connection
  *  application-name ViberPC
  *  autoplay-policy no-user-gesture-required
  *  browser-subprocess-path /opt/viber/libexec/QtWebEngineProcess
  *  create-default-gl-context
  *  disable-features DnsOverHttpsUpgrade,ConsolidatedMovementXY,InstalledApp,BackgroundFetch,WebOTP,WebPayments,WebUSB,PictureInPicture,AudioServiceOutOfProcess
  *  disable-setuid-sandbox
  *  disable-speech-api
  *  enable-features NetworkServiceInProcess,TracingServiceInProcess,NetworkServiceInProcess
  *  enable-threaded-compositing
  *  enable-usermedia-screen-capture
  *  in-process-gpu
  *  use-gl desktop

QHighDpiScaling::setFactor: Should only be called when no windows exist.

(Viber:20815): GStreamer-CRITICAL **: 11:42:06.682: gst_bin_add_many: assertion 'GST_IS_ELEMENT (element_1)' failed

(Viber:20815): GStreamer-CRITICAL **: 11:42:06.682: gst_element_link_pads_full: assertion 'GST_IS_ELEMENT (src)' failed

(Viber:20815): GStreamer-CRITICAL **: 11:42:06.682: gst_element_get_static_pad: assertion 'GST_IS_ELEMENT (element)' failed

(Viber:20815): GStreamer-CRITICAL **: 11:42:06.682: gst_pad_add_probe: assertion 'GST_IS_PAD (pad)' failed
Comment 86 Vadim Efimov 2023-05-30 10:38:23 UTC
Viber starts normally after installing media-libs/gst-plugins-good
Audio-video calls also works fine.
Comment 87 Alexander Kurakin 2023-05-30 12:54:54 UTC
Created attachment 862885 [details]
viber-18.2.0.2-r1.ebuild

(In reply to Vadim Efimov from comment #86)
> Viber starts normally after installing media-libs/gst-plugins-good
> Audio-video calls also works fine.

Yes, thanks! Checked. Added the dependency.
Comment 88 Alexander Kurakin 2023-11-12 17:30:12 UTC
Created attachment 874607 [details]
Viber 21.0.0.1 Ebuild

Updated to the 21.0.0.1 upstream version.

Also according to
* iwdevtools,
* post-install QA warnings,
* .deb package's Dependencies
I:

Fixed subslots for:
 * app-arch/brotli,
 * app-arch/snappy,
 * app-arch/zstd,
 * media-libs/harfbuzz,
 * media-libs/libmng,
 * media-libs/libwebp.

Added:
 * dev-libs/libevent:=,
 * media-plugins/gst-plugins-libav:1.0,
 * media-libs/mesa,
 * x11-libs/gdk-pixbuf:2,
 * x11-libs/gtk+:3,
 * x11-libs/pango,
 * x11-libs/xcb-util-cursor,
 * pulseaudio? ( media-plugins/gst-plugins-pulse:1.0 ).

Replaced media-libs/tiff with media-libs/tiff-compat:4.

Removed x11-libs/libxshmfence.
Comment 89 Vadim Efimov 2023-11-13 20:34:13 UTC
(In reply to Alexander Kurakin from comment #88)
> Created attachment 874607 [details]
> Viber 21.0.0.1 Ebuild

Hi, thank you for the update.
Works fine here and crash on start depending on kbd layout finally gone.
Comment 90 Alexander Kurakin 2024-03-18 17:25:12 UTC
Created attachment 887887 [details]
viber-21.8.0.11.ebuild

Viber 21.8.0.11 for Linux is out.