Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 542728 - net-misc/teamviewer-10.0.36281: broken multilib dependencies
Summary: net-misc/teamviewer-10.0.36281: broken multilib dependencies
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 2 votes (vote)
Assignee: Devrin Talen
URL:
Whiteboard:
Keywords: PMASKED, REGRESSION
Depends on:
Blocks:
 
Reported: 2015-03-09 18:10 UTC by Ulrich Müller
Modified: 2015-06-18 08:53 UTC (History)
10 users (show)

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


Attachments
emerge output (blockers.txt,336.34 KB, text/plain)
2015-03-09 18:30 UTC, Ulrich Müller
Details
teamviewer-10.0.37742.ebuild with updated multilib dependencies (teamviewer-10.0.37742.ebuild,3.40 KB, text/plain)
2015-03-12 02:46 UTC, Devrin Talen
Details
lsof output (lsof.out,7.47 KB, text/plain)
2015-03-12 08:22 UTC, Ulrich Müller
Details
files/teamviewer-10.0.37742-gentoo.patch (teamviewer-10.0.37742-gentoo.patch,3.95 KB, patch)
2015-03-13 21:22 UTC, Adam Feldman
Details | Diff
files/teamviewer-10.0.37742-gentoo.patch (teamviewer-10.0.37742-gentoo.patch,4.35 KB, patch)
2015-03-13 21:34 UTC, Adam Feldman
Details | Diff
teamviewer-10.0.37742-r1.ebuild (teamviewer-10.0.37742-r1.ebuild,2.75 KB, text/plain)
2015-03-14 00:55 UTC, Adam Feldman
Details
teamviewer-10.0.37741-r1.ebuild.patch (teamviewer.patch,4.81 KB, patch)
2015-03-14 00:58 UTC, Adam Feldman
Details | Diff
files/teamviewer-10.0.37742-gentoo.patch (teamviewer-10.0.37742-gentoo.patch,4.37 KB, patch)
2015-03-14 02:11 UTC, Adam Feldman
Details | Diff
teamviewer-10.0.37742-r2.ebuild (teamviewer-10.0.37742-r3.ebuild,2.94 KB, text/plain)
2015-03-29 16:58 UTC, Adam Feldman
Details
files/teamviewerd.init (teamviewerd.init,1.11 KB, text/plain)
2015-03-29 17:00 UTC, Adam Feldman
Details
files/teamviewerd.conf (teamviewerd.conf,230 bytes, text/plain)
2015-03-29 17:01 UTC, Adam Feldman
Details
files/teamviewer.sh (teamviewer.sh,452 bytes, application/x-shellscript)
2015-03-29 17:02 UTC, Adam Feldman
Details
teamviewer-10.0.37742-r2.ebuild with a minimal USE flag (teamviewer-10.0.37742-r3.ebuild,3.00 KB, text/plain)
2015-04-02 01:33 UTC, Adam Feldman
Details
teamviewer-10.0.37742-r2.ebuild with a minimal USE flag (teamviewer-10.0.37742-r3.ebuild,3.01 KB, text/plain)
2015-04-02 01:36 UTC, Adam Feldman
Details
teamviewer-10.0.37742-r3.ebuild (teamviewer-10.0.37742-r4.ebuild,2.66 KB, text/plain)
2015-04-02 01:39 UTC, Adam Feldman
Details
teamviewer-10.0.37742-r4.ebuild (teamviewer-10.0.37742-r4.ebuild,2.62 KB, text/plain)
2015-04-11 02:05 UTC, Adam Feldman
Details
files/teamviewer.sh (teamviewer.sh,450 bytes, application/x-shellscript)
2015-04-12 07:14 UTC, Adam Feldman
Details
files/teamviewer.sh (teamviewer.sh,659 bytes, application/x-shellscript)
2015-04-12 18:03 UTC, Adam Feldman
Details
files/teamviewerd.init (teamviewerd.init,900 bytes, text/plain)
2015-04-12 18:07 UTC, Adam Feldman
Details
files/teamviewer.sh (teamviewer.sh,659 bytes, application/x-shellscript)
2015-04-12 18:14 UTC, Adam Feldman
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ulrich Müller gentoo-dev 2015-03-09 18:10:23 UTC
With USE="-system-wine" the ebuild unconditionally depends on app-emulation/emul-linux-x86-baselibs and app-emulation/emul-linux-x86-soundlibs on amd64.

teamviewer-9.0.32150.ebuild had proper multilib dependencies, please restore them for slot 10.
Comment 1 Ulrich Müller gentoo-dev 2015-03-09 18:30:19 UTC
Created attachment 398538 [details]
emerge output

These are the blockers which I get when trying to update teamviewer.
Comment 2 tman 2015-03-09 19:28:57 UTC
this version is obsolate. why u dont put the version  
teamviewer-10.0.37742.ebuild 

in 
https://bugs.gentoo.org/show_bug.cgi?id=533452

in portage?

it would also be nice if it get reall support for multilib
Comment 3 Ulrich Müller gentoo-dev 2015-03-09 19:47:08 UTC
# Ulrich Müller <ulm@gentoo.org> (9 Mar 2015)
# Broken multilib dependencies causing blockers, bug 542728.
# Masked by QA until maintainer will sort this out.
=net-misc/teamviewer-10.0.36281
Comment 4 Devrin Talen 2015-03-10 11:53:59 UTC
Thanks Ulrich, I'll take a look tonight.
Comment 5 tman 2015-03-10 22:57:24 UTC
dont forget about to update the build version

@Devrin

thx
Comment 6 Ian Delaney (RETIRED) gentoo-dev 2015-03-11 05:51:44 UTC
(In reply to Ulrich Müller from comment #0)
> With USE="-system-wine" the ebuild unconditionally depends on
> app-emulation/emul-linux-x86-baselibs and
> app-emulation/emul-linux-x86-soundlibs on amd64.
> 
> teamviewer-9.0.32150.ebuild had proper multilib dependencies, please restore
> them for slot 10.

ulm, what do you think of just making it hard set unconditionally to use wine?
Comment 7 Ulrich Müller gentoo-dev 2015-03-11 06:07:06 UTC
(In reply to Ian Delaney from comment #6)
> ulm, what do you think of just making it hard set unconditionally to use
> wine?

Does this work reliably? The ebuild outputs a warning in pkg_postinst() about USE=system-wine being experimental and unsupported.
Comment 8 Devrin Talen 2015-03-12 02:46:41 UTC
Created attachment 398688 [details]
teamviewer-10.0.37742.ebuild with updated multilib dependencies

Ulrich, can you give this ebuild a try?  I copied over the dependencies as best as I could understand from the 9.0.32150 ebuild.  This works on my system, but if you could give it a shot that would make me more confident about it.
Comment 9 tman 2015-03-12 07:10:39 UTC
seems to work. but what about the system-wine USE? does this not able to activate?
Comment 10 Ulrich Müller gentoo-dev 2015-03-12 08:22:54 UTC
Created attachment 398710 [details]
lsof output

Looks like version 10 contains a lot of bundled libraries (in the RTlib directory). And attached lsof output doesn't really look sane, e.g. it uses the system libXi and libXfixes along with bundled libX11, libXext, etc.

Can the RTlib stuff be unbundled? Otherwise this will almost certainly cause security issues in the future.
Comment 11 Devrin Talen 2015-03-12 10:55:35 UTC
(In reply to Ulrich Müller from comment #10)
> Can the RTlib stuff be unbundled? Otherwise this will almost certainly cause
> security issues in the future.

I'll certainly try and I agree about the security issues.  Do you think that we should close out this bug and open a new one for the security side of this?  Is the multilib stuff that you were originally concerned about handled better now?
Comment 12 Ulrich Müller gentoo-dev 2015-03-12 19:12:22 UTC
(In reply to Devrin Talen from comment #11)
> Do you think that we should close out this bug and open a new one for the
> security side of this?  Is the multilib stuff that you were originally
> concerned about handled better now?

Dependencies will be different if there are bundled libs, therefore both issues are related and are (IMHO) best handled in a single bug. And the tv_bin/RTlib/README file makes me believe that bundled libs should *not* be installed, but system libs should be used instead:

   "The binaries in this folder (RTlib) are provided for convenience.
   They enable parts of TeamViewer to be run independently from any
   system libraries, so no additional dependencies have to be installed."

I've run scanelf -n over everything in the package. Unless I've missed something, the following libraries are needed by teamviewerd:

   libX11.so.6
   libXau.so.6

In addition, with USE="-system-wine" you'll need the following libraries as dependencies of the client:

   libQtCore.so.4
   libQtNetwork.so.4
   libQtGui.so.4
   libQtWebKit.so.4
   libSM.so.6
   libXdamage.so.1
   libXext.so.6
   libXfixes.so.3
   libXi.so.6
   libXrandr.so.2
   libXrender.so.1
   libXtst.so.6
   libasound.so.2
   libfontconfig.so.1
   libfreetype.so.6
   libjpeg.so.8
   libpng12.so.0
   libz.so.1

So dependencies would be something like the following:

RDEPEND="x11-misc/xdg-utils
    || (
        (
            x11-libs/libX11[abi_x86_32(-)]
            x11-libs/libXau[abi_x86_32(-)]
	)
        app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)]
    )
    !system-wine? (
        || (
            (
                dev-qt/qtcore:4[abi_x86_32(-)]
                dev-qt/qtgui:4[abi_x86_32(-)]
                dev-qt/qtwebkit:4[abi_x86_32(-)]
                media-libs/alsa-lib[abi_x86_32(-)]
                media-libs/fontconfig[abi_x86_32(-)]
                media-libs/freetype[abi_x86_32(-)]
                media-libs/jpeg:8[abi_x86_32(-)]
                media-libs/libpng:1.2[abi_x86_32(-)]
                sys-libs/zlib[abi_x86_32(-)]
                x11-libs/libSM[abi_x86_32(-)]
                x11-libs/libXdamage[abi_x86_32(-)]
                x11-libs/libXext[abi_x86_32(-)]
                x11-libs/libXfixes[abi_x86_32(-)]
                x11-libs/libXi[abi_x86_32(-)]
                x11-libs/libXrandr[abi_x86_32(-)]
                x11-libs/libXrender[abi_x86_32(-)]
                x11-libs/libXtst[abi_x86_32(-)]
            )
            (
                app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
                app-emulation/emul-linux-x86-qtlibs[-abi_x86_32(-)]
                app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
            )
        )
    )
    system-wine? ( app-emulation/wine )"

This assumes that the ebuild will neither install the bundled libs in tv_bin/RTlib/ nor the bundled xdg-utils in tv_bin/xdg-utils/.


And while you're at it, the ebuild should have RESTRICT="bindist mirror" (it's only mirror restricted currently) since binaries are certainly not distributable. This is already missing in version 9, though.
Comment 13 Ulrich Müller gentoo-dev 2015-03-12 23:02:36 UTC
I just noticed that both teamviewer-10.0.36281.ebuild (in tree) and teamviewer-10.0.37742.ebuild (attached in comment 8) actually download version 10.0.35002.

Version 10.0.37742 should have:
SRC_URI="http://www.teamviewer.com/download/version_${MV}x/${PN}_${PV}_i386.deb"

It has different dependencies too. In the !system-wine? ( ) dependency block:
- replace media-libs/jpeg:8[abi_x86_32(-)] by virtual/jpeg:62[abi_x86_32(-)]
- add x11-libs/libICE[abi_x86_32(-)]
Comment 14 Adam Feldman gentoo-dev 2015-03-13 19:22:36 UTC
(In reply to Ulrich Müller from comment #10)
> Can the RTlib stuff be unbundled? Otherwise this will almost certainly cause
> security issues in the future.

If this is the case, is it also worth investigating the reliability of the system-wine USE flag, and whether it should become default?
Comment 15 Adam Feldman gentoo-dev 2015-03-13 21:22:40 UTC
Created attachment 398824 [details, diff]
files/teamviewer-10.0.37742-gentoo.patch

With the latest changes,  copying the patch in the tree to files/teamviewer-10.0.37742-gentoo.patch, I got patch failure.  Attached is an updated version.
Comment 16 Adam Feldman gentoo-dev 2015-03-13 21:34:19 UTC
Created attachment 398826 [details, diff]
files/teamviewer-10.0.37742-gentoo.patch

Sorry, forgot this is slotted, and re-added the last hunk.
Comment 17 Ulrich Müller gentoo-dev 2015-03-13 21:39:48 UTC
(In reply to NP-Hardass from comment #14)
> (In reply to Ulrich Müller from comment #10)
> > Can the RTlib stuff be unbundled? Otherwise this will almost certainly cause
> > security issues in the future.
> 
> If this is the case, is it also worth investigating the reliability of the
> system-wine USE flag, and whether it should become default?

Seeing how dependencies have changed between builds 10.0.35002 and 10.0.37742, I believe that using the system wine unconditionally would be the cleanest solution. Assuming that this would work reliably.
Comment 18 Ulrich Müller gentoo-dev 2015-03-13 21:49:30 UTC
(In reply to NP-Hardass from comment #16)
> Sorry, forgot this is slotted, and re-added the last hunk.

Apropos slotting, src_install() in the ebuilds should be updated:

-    make_desktop_entry ${MY_PN} TeamViewer ${MY_PN}
+    make_desktop_entry ${MY_PN} "TeamViewer ${MV}" ${MY_PN}

Otherwise a user who has both slots 9 and 10 installed will see two undistinguishable menu entries named "TeamViewer".
Comment 19 Adam Feldman gentoo-dev 2015-03-13 22:36:37 UTC
(In reply to Ulrich Müller from comment #17)
> (In reply to NP-Hardass from comment #14)
> > (In reply to Ulrich Müller from comment #10)
> > > Can the RTlib stuff be unbundled? Otherwise this will almost certainly cause
> > > security issues in the future.
> > 
> > If this is the case, is it also worth investigating the reliability of the
> > system-wine USE flag, and whether it should become default?
> 
> Seeing how dependencies have changed between builds 10.0.35002 and
> 10.0.37742, I believe that using the system wine unconditionally would be
> the cleanest solution. Assuming that this would work reliably.

Well, I've been messing around with it locally, and I completely removed the prepackaged wine, and it ran beautifully without any issue, as far as I can tell.  (This is without built -system-wine and the wine binaries manually removed).  So I'm going to keep digging at it, and I'll post an update when I have it.
Comment 20 Adam Feldman gentoo-dev 2015-03-14 00:55:50 UTC
Created attachment 398846 [details]
teamviewer-10.0.37742-r1.ebuild

My rework of the ebuild for system wine as default and only, including all of the above mentioned work.  Seems to be working well on my end (wine-1.7.38).  I've included a couple of things which don't need to be incorporated into the final ebuild if you'd prefer to omit them.  1) in src_prepare, remove all the precompiled binaries.  (At a minimum, the wine ones have to stay, up to you about the others) 2) in src_install, I re-organized the installation a little, the first doins -r *  was a little much IMO, so I cleaned it a little
Comment 21 Adam Feldman gentoo-dev 2015-03-14 00:58:15 UTC
Created attachment 398848 [details, diff]
teamviewer-10.0.37741-r1.ebuild.patch

previous attachment in patch format.
Comment 22 Adam Feldman gentoo-dev 2015-03-14 02:11:58 UTC
Created attachment 398852 [details, diff]
files/teamviewer-10.0.37742-gentoo.patch

fix typo.
Comment 23 Adam Feldman gentoo-dev 2015-03-14 02:14:39 UTC
Re: slotting, both 10.x and 9.x are going to need to have their init scripts updated, as they both use the same PID file for every slot.  Not sure what else needs to be looked over, but Devrin, you should go through and make sure paths aren't used that would be shared, whenever possible/appropriate, since that can cause conflicts between slots.
Comment 24 Adam Feldman gentoo-dev 2015-03-14 02:23:50 UTC
(In reply to Ulrich Müller from comment #12)
> (In reply to Devrin Talen from comment #11)
> > Do you think that we should close out this bug and open a new one for the
> > security side of this?  Is the multilib stuff that you were originally
> > concerned about handled better now?
> 
> Dependencies will be different if there are bundled libs, therefore both
> issues are related and are (IMHO) best handled in a single bug. And the
> tv_bin/RTlib/README file makes me believe that bundled libs should *not* be
> installed, but system libs should be used instead:
> 
>    "The binaries in this folder (RTlib) are provided for convenience.
>    They enable parts of TeamViewer to be run independently from any
>    system libraries, so no additional dependencies have to be installed."
> 
> I've run scanelf -n over everything in the package. Unless I've missed
> something, the following libraries are needed by teamviewerd:
> 
>    libX11.so.6
>    libXau.so.6
> 
> In addition, with USE="-system-wine" you'll need the following libraries as
> dependencies of the client:
> 
>    libQtCore.so.4
>    libQtNetwork.so.4
>    libQtGui.so.4
>    libQtWebKit.so.4
>    libSM.so.6
>    libXdamage.so.1
>    libXext.so.6
>    libXfixes.so.3
>    libXi.so.6
>    libXrandr.so.2
>    libXrender.so.1
>    libXtst.so.6
>    libasound.so.2
>    libfontconfig.so.1
>    libfreetype.so.6
>    libjpeg.so.8
>    libpng12.so.0
>    libz.so.1
> 
> So dependencies would be something like the following:
> 
> RDEPEND="x11-misc/xdg-utils
>     || (
>         (
>             x11-libs/libX11[abi_x86_32(-)]
>             x11-libs/libXau[abi_x86_32(-)]
> 	)
>         app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)]
>     )
>     !system-wine? (
>         || (
>             (
>                 dev-qt/qtcore:4[abi_x86_32(-)]
>                 dev-qt/qtgui:4[abi_x86_32(-)]
>                 dev-qt/qtwebkit:4[abi_x86_32(-)]
>                 media-libs/alsa-lib[abi_x86_32(-)]
>                 media-libs/fontconfig[abi_x86_32(-)]
>                 media-libs/freetype[abi_x86_32(-)]
>                 media-libs/jpeg:8[abi_x86_32(-)]
>                 media-libs/libpng:1.2[abi_x86_32(-)]
>                 sys-libs/zlib[abi_x86_32(-)]
>                 x11-libs/libSM[abi_x86_32(-)]
>                 x11-libs/libXdamage[abi_x86_32(-)]
>                 x11-libs/libXext[abi_x86_32(-)]
>                 x11-libs/libXfixes[abi_x86_32(-)]
>                 x11-libs/libXi[abi_x86_32(-)]
>                 x11-libs/libXrandr[abi_x86_32(-)]
>                 x11-libs/libXrender[abi_x86_32(-)]
>                 x11-libs/libXtst[abi_x86_32(-)]
>             )
>             (
>                 app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
>                 app-emulation/emul-linux-x86-qtlibs[-abi_x86_32(-)]
>                 app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)]
>             )
>         )
>     )
>     system-wine? ( app-emulation/wine )"


When defaulting system wine, I removed most of those, but in hind sight, I'm not sure what is appropriate to have been removed.   What's necessary for client itself?  Like, the qt libs definitely aren't wine related.  Thoughts on sorting it out?
Comment 25 Adam Feldman gentoo-dev 2015-03-14 06:11:30 UTC
ah, My apologies, I didn't realize that -system-wine was not equivalent to "use prepackaged wine"  I'll post back with an update.
Comment 26 Ulrich Müller gentoo-dev 2015-03-14 08:05:33 UTC
(In reply to NP-Hardass from comment #24)
> > RDEPEND=[... long list of dependencies omitted ...]
> 
> When defaulting system wine, I removed most of those, but in hind sight, I'm
> not sure what is appropriate to have been removed.   What's necessary for
> client itself?  Like, the qt libs definitely aren't wine related.  Thoughts
> on sorting it out?

Well, the previous ebuild installed only teamviewerd and tvwine.dll.so with USE=system-wine. Not sure if that was correct (probably not), but for these two binaries only the following dependencies would be needed (everything to be followed by [abi_x86_32(-)] which I've omitted for clarity):

teamviewerd
   x11-libs/libX11
   x11-libs/libXau

tvwine.dll.so
   app-emulation/wine
   x11-libs/libX11

Plus x11-misc/xdg-utils which are called from some script(?).

The other binaries need more dependencies:

TVGuiSlave.32
   media-libs/alsa-lib
   x11-libs/libICE
   x11-libs/libSM
   x11-libs/libX11
   x11-libs/libXau
   x11-libs/libXfixes

TVGuiDelegate
   dev-qt/qtcore:4
   dev-qt/qtgui:4
   dev-qt/qtwebkit:4
   x11-libs/libICE
   x11-libs/libSM
   x11-libs/libX11
   x11-libs/libXau

TeamViewer_Desktop
   x11-libs/libICE
   x11-libs/libSM
   x11-libs/libX11
   x11-libs/libXau
   x11-libs/libXdamage
   x11-libs/libXext
   x11-libs/libXfixes
   x11-libs/libXrandr
   x11-libs/libXtst

libdepend (what is this needed for?)
   media-libs/fontconfig
   media-libs/freetype
   x11-libs/libSM
   x11-libs/libXrender


(In reply to NP-Hardass from comment #20)
> Created attachment 398846 [details]
> teamviewer-10.0.37742-r1.ebuild
> 
> My rework of the ebuild for system wine as default and only, including all
> of the above mentioned work.  Seems to be working well on my end
> (wine-1.7.38).  I've included a couple of things which don't need to be
> incorporated into the final ebuild if you'd prefer to omit them.  1) in
> src_prepare, remove all the precompiled binaries.

Removing things in src_prepare is unusual, unless it is needed for the build process (and there is no build process here). Leave the binaries alone and simply don't install them in src_install.

> (At a minimum, the wine ones have to stay, up to you about the others)

Can't you use more fine-grained installation than "doins -r wine" instead?

> 2) in src_install, I re-organized the installation a little, the first
> doins -r *  was a little much IMO, so I cleaned it a little

Yeah, it looks better now.


Other small things:
- RESTRICT should be "bindist mirror"
- omit app-shells/bash from RDEPEND
- drop the empty IUSE line
Comment 27 Adam Feldman gentoo-dev 2015-03-29 16:58:48 UTC
Created attachment 400056 [details]
teamviewer-10.0.37742-r2.ebuild

Reworked the ebuild a bit further.  This strips out emul-*, and includes a use flag, "minimal" which removes upstream's bloated shell script system, and replaces it with a much simpler shell wrapper.  The only reason I considered leaving their bloat in, is it supports several things like exporting the license and generating an info tarball for upstream.  Personally, I have no interest in such things, but others might.  I'd probably put it +minimal, but I think Gentoo policy is usually not to default hacks of upstream.
Comment 28 Adam Feldman gentoo-dev 2015-03-29 17:00:29 UTC
Created attachment 400058 [details]
files/teamviewerd.init

updated init script.  Includes one function from the upstream bash script suite, the ability to change the default system teamviewer password.
Comment 29 Adam Feldman gentoo-dev 2015-03-29 17:01:08 UTC
Created attachment 400060 [details]
files/teamviewerd.conf

corresponding conf.d
Comment 30 Adam Feldman gentoo-dev 2015-03-29 17:02:11 UTC
Created attachment 400062 [details]
files/teamviewer.sh

simple shell wrapper to replace upstream's complicated shell script system
Comment 31 Ulrich Müller gentoo-dev 2015-04-01 21:52:59 UTC
(In reply to NP-Hardass from comment #27)
> Created attachment 400056 [details]
> teamviewer-10.0.37742-r2.ebuild

Here are some remarks:
- You may want to use KEYWORDS="-* ~amd64 ~x86" to indicate that this won't run on any other architecture.
- x11-libs/libXdmcp[abi_x86_32(-)] is in dependencies. However, this didn't show up in my previous scanelf runs. Are you sure this is needed?
- x11-misc/xdg-utils used to be in dependencies. Are they not needed?
- TVGuiSlave.64 should be installed only on amd64 but not on x86.
- I'd just make the "minimal" case unconditional, and don't bother with upstream's scripts. Parts of their functionality are not useful, and you are adding your own init script in any case.


@Devrin: Are you still with us here? Can you comment on the attached ebuild and ancillary files?
Comment 32 Devrin Talen 2015-04-02 01:06:52 UTC
Yes, sorry, still here.  I'll have time to look at this tomorrow evening and will follow up then with a proper response.
Comment 33 Adam Feldman gentoo-dev 2015-04-02 01:23:54 UTC
(In reply to Ulrich Müller from comment #31)
> (In reply to NP-Hardass from comment #27)
> > Created attachment 400056 [details]
> > teamviewer-10.0.37742-r2.ebuild
> 
> Here are some remarks:
> - You may want to use KEYWORDS="-* ~amd64 ~x86" to indicate that this won't
> run on any other architecture.
Willdo

> - x11-libs/libXdmcp[abi_x86_32(-)] is in dependencies. However, this didn't
> show up in my previous scanelf runs. Are you sure this is needed?
Upstream claims it is needed for all of the binaries, but we can ignore that if you think that is best.

> - x11-misc/xdg-utils used to be in dependencies. Are they not needed?
I accidentally omitted this.  It's only needed for !minimal

> - TVGuiSlave.64 should be installed only on amd64 but not on x86.
Willdo

> - I'd just make the "minimal" case unconditional, and don't bother with
> upstream's scripts. Parts of their functionality are not useful, and you are
> adding your own init script in any case.
I'm quite content to make minimal default and/or remove !minimal, but will just elaborate, just in case it is decided that it is worth keeping their bash scripts around.  Just for the sake of record and completeness, as mentioned on IRC, there are primarily 3 (semi-)useful functions that the original bash scripts contain:
A) Change default password for the daemon, 
B) Create a tarball of system information to zip and send to upstream
C) Exporting the license file

My thoughts on the matter:
A) Changing the password requires the service not to be running, so I thought it most useful to have OpenRC open access to changing the password (/etc/init.d/teamviewer10 passwd).  I need to find the best way to do this with systemd (which unfortunately, I'm not terribly familiar with).
B) tarball of system information: I don't particularly think this will be useful, and worst case, the user can generate the same information on their own.
C) I'm not a frequent enough of a user to know whether this would be useful, but from my basic use, I haven't found a use for this.  This should be doable without the bash scripts, but I've omitted it from minimal because I don't see the use.

> 
> 
> @Devrin: Are you still with us here? Can you comment on the attached ebuild
> and ancillary files?
Comment 34 Adam Feldman gentoo-dev 2015-04-02 01:33:49 UTC
Created attachment 400360 [details]
teamviewer-10.0.37742-r2.ebuild with a minimal USE flag

Updated with ulm's suggestions (excluding the removal and defaulting of "minimal")
Comment 35 Adam Feldman gentoo-dev 2015-04-02 01:36:06 UTC
Created attachment 400362 [details]
teamviewer-10.0.37742-r2.ebuild with a minimal USE flag

minor typo, this version should be correct
Comment 36 Adam Feldman gentoo-dev 2015-04-02 01:39:22 UTC
Created attachment 400364 [details]
teamviewer-10.0.37742-r3.ebuild

This is the same as -r2, except it has the minimal flag removed and all non-minimal code removed
Comment 37 Adam Feldman gentoo-dev 2015-04-02 01:42:04 UTC
(In reply to Devrin Talen from comment #32)
> Yes, sorry, still here.  I'll have time to look at this tomorrow evening and
> will follow up then with a proper response.

Don't hesitate to let me know if you need assistance in parsing how/why I removed upstream's bash scripts or how/why I integrated wine more directly. Any other questions, comments, concerns are welcome.
Comment 38 Adam Feldman gentoo-dev 2015-04-10 17:59:07 UTC
(In reply to Devrin Talen from comment #32)
> Yes, sorry, still here.  I'll have time to look at this tomorrow evening and
> will follow up then with a proper response.

Just checking in.
Comment 39 Markus Lischka 2015-04-10 21:49:54 UTC
I tested the r3 ebuild on my amd64 system and emerge was able to pull in all multilib dependencies to 32 bit libraries including wine correctly: "teamviewer_setup checklibs" confirmed that all dependencies were satisfied. Nice work, thanks!

Nevertheless, the initial startup of TeamViewer itself failed due to missing license files: I could only cancel the license confirmation dialogue upon first startup due to an error "Could not find EULA".

It seems that TeamViewer relies on the license files in work/opt/teamviewer/tv_bin/wine/drive_c/TeamViewer which the ebuild is not installing. I'd also suggest to install work/opt/teamviewer/doc and update the official license file in ${PORTDIR}/licenses/TeamViewer to the current one.
Comment 40 Adam Feldman gentoo-dev 2015-04-11 02:05:40 UTC
Created attachment 401016 [details]
teamviewer-10.0.37742-r4.ebuild

Sorry about that, I over-zealously cut those out, forgetting that they were necessary.  This version should work.  Thanks for testing, Markus Lischka.
Comment 41 Markus Lischka 2015-04-11 20:50:12 UTC
(In reply to NP-Hardass from comment #40)
> Created attachment 401016 [details]
> teamviewer-10.0.37742-r4.ebuild

I could confirm the license dialogue now and proceed using your r4 ebuild for installation. Thanks for the quick fix!

Further testing the installation, I noticed two more problems:

1. At first launch of teamviewer, a file "1" is created in the working directory. The wrapper script probably just contains a minor typo:

--- a/net-misc/teamviewer/files/teamviewer.sh
+++ b/net-misc/teamviewer/files/teamviewer.sh
@@ -6,7 +6,7 @@ arch="win32"
 
 if [[ ! -d "${prefix}" ]]; then
        echo "Creating prefix..."
-       env WINEARCH="${arch}" WINEPREFIX="${prefix}" wineboot -i 2&>1 /dev/null
+       env WINEARCH="${arch}" WINEPREFIX="${prefix}" wineboot -i &> /dev/null
        echo "Copying TeamViewer files to prefix..."
        cp -R "/opt/${tv}/wine/drive_c/TeamViewer" "${prefix}/drive_c/TeamViewer"
 fi


2. Once launched (with a non-root user, in my case "markus"), teamviewer is usable, but cannot save any options. The client logs the following message:

StorageTextfile: file 'C:\users\markus\Application Data\TeamViewer\client.conf' is not accessible for writing - 2

Furthermore, the client's log file is not created in /var/log/teamviewer10/markus/ which points to the non-existent directory /home/markus/.config/teamviewer10/logfiles/, but in /tmp.


As to the second problem, I'm still clueless and any hints are appreciated.
Comment 42 Adam Feldman gentoo-dev 2015-04-12 07:14:11 UTC
Created attachment 401066 [details]
files/teamviewer.sh

Thanks for the patch for the first part, Markus Lischka.

(In reply to Markus Lischka from comment #41)
> 2. Once launched (with a non-root user, in my case "markus"), teamviewer is
> usable, but cannot save any options. The client logs the following message:
> 
> StorageTextfile: file 'C:\users\markus\Application
> Data\TeamViewer\client.conf' is not accessible for writing - 2

I'm actually unable this. Can you mv /home/marcus/.wine-teamviewer10{,.bak} and try again?  I edited the custom invitation message.

I tested "option saving" by editing the invitation message and then hitting "ok"
If it still doesn't work on your end, let me know some steps to reproduce

> 
> Furthermore, the client's log file is not created in
> /var/log/teamviewer10/markus/ which points to the non-existent directory
> /home/markus/.config/teamviewer10/logfiles/, but in /tmp.
> 
> 
> As to the second problem, I'm still clueless and any hints are appreciated.

I've fixed user logging, but I'm not sure on the /tmp issue yet..
Comment 43 Adam Feldman gentoo-dev 2015-04-12 18:03:43 UTC
Created attachment 401128 [details]
files/teamviewer.sh

Uploaded the wrong version for the last one.
Comment 44 Adam Feldman gentoo-dev 2015-04-12 18:07:58 UTC
Created attachment 401134 [details]
files/teamviewerd.init

Simplified and fixes bug where stopping daemon didn't actually stop daemon.  Thanks to williamh.
Comment 45 Adam Feldman gentoo-dev 2015-04-12 18:14:35 UTC
Created attachment 401136 [details]
files/teamviewer.sh

minor typo.

Would appreciate a test from someone who uses the software more thoroughly than I.

mv ~/.wine-teamviewer10{,.bak} so you start with a new prefix.
Comment 46 Ian Delaney (RETIRED) gentoo-dev 2015-04-15 12:22:12 UTC
NP-Hardass added as co-maintainer

  15 Apr 2015; Ian Delaney <idella4@gentoo.org> metadata.xml:
  add NP-Hardass as co-maintainer, endorsed by ulm
Comment 47 Priit Laes (IRC: plaes) 2015-04-16 03:38:10 UTC
(In reply to NP-Hardass from comment #44)
> Created attachment 401134 [details]
> files/teamviewerd.init
> 
> Simplified and fixes bug where stopping daemon didn't actually stop daemon. 
> Thanks to williamh.

There's following line in teamviewerd.init:

extra_stopped_ommands="passwd"


Shouldn't it be extra_stopped_commands?


PS. I recently had to use tv-10 and because I already had tv-9 installed, I just had to unmask it and after `emerge --nodeps teamviewer` it worked.
Comment 48 Adam Feldman gentoo-dev 2015-06-18 08:53:12 UTC
18 Jun 2015; NP-Hardass <NP-Hardass@gentoo.org> +files/teamviewer.init,
+files/teamviewer.sh, +files/teamviewerd.conf, +files/teamviewerd9.init,
+teamviewer-10.0.41499.ebuild, -files/teamviewer-10.0.36281-gentoo.patch,
-files/teamviewer-9.0.30203-gentoo.patch, -teamviewer-10.0.36281.ebuild,
files/teamviewerd.init, metadata.xml, teamviewer-9.0.32150.ebuild:
Version bump to 10.0.41499 and drop 10.0.36281.  Resolves bug #544222 and
#542728