Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 509116 - www-plugins/google-talkplugin-5.2.4.0 - ppapi plugins should be symlinked to chrome/chromium plugin directories
Summary: www-plugins/google-talkplugin-5.2.4.0 - ppapi plugins should be symlinked to ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Christoph Junghans (RETIRED)
URL:
Whiteboard:
Keywords: EBUILD
Depends on:
Blocks:
 
Reported: 2014-04-30 00:25 UTC by Thomas Kear
Modified: 2014-05-12 01:45 UTC (History)
4 users (show)

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


Attachments
Ebuild modifications to install ppapi symlinks (google-talkplugin-5.2.4.0.ebuild.diff,1.52 KB, patch)
2014-04-30 00:25 UTC, Thomas Kear
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Kear 2014-04-30 00:25:42 UTC
Created attachment 376052 [details, diff]
Ebuild modifications to install ppapi symlinks

Looking in the .deb of the plugin, the plugin files are symlinked to the following locations:

NPAPI:
/usr/lib/iceape/plugins/
/usr/lib/firefox/plugins/
/usr/lib/xulrunner/plugins/
/usr/lib/midbrowser/plugins/
/usr/lib/mozilla/plugins/
/usr/lib/iceweasel/plugins/
/usr/lib/xulrunner-addons/plugins/

PPAPI:
/usr/lib/chromium-browser/pepper/
/opt/google/chrome-unstable/pepper/
/opt/google/chrome/pepper/

The current ebuild is only linking the NPAPI plugin, to /usr/lib64/nsbrowser/plugins/.  Since NPAPI is no longer supported in Chrome [1], Talk/Hangouts no longer works.

Creating links for these two libraries enables the plugin in www-client/google-chrome-unstable for me:

/opt/google/chrome-unstable/pepper/libppgoogletalk.so
/opt/google/chrome-unstable/pepper/libppo1d.so

And /usr/lib/chromium-browser/pepper works for www-client/chromium


Diff of possible modification for www-plugins/google-talkplugin-5.2.4.0.ebuild attached; USE for disabling one or the other plugin if the user desires, with USE=ppapi now installs symlinks into:

/usr/lib/chromium-browser/pepper/
/opt/google/chrome-unstable/pepper/
/opt/google/chrome-beta/pepper/
/opt/google/chrome/pepper/


[1] http://blog.chromium.org/2013/09/saying-goodbye-to-our-old-friend-npapi.html
Comment 1 Christoph Junghans (RETIRED) gentoo-dev 2014-04-30 15:21:14 UTC
I don't think we need use flags here, a couple of symlinks won't hurt anyone.

But I dislike to have 4 ppapi directories.

@chromium: Is there a universal ppapi fail-back folder for all the chrome browsers?

@mozilla: Would it be useful to add a inst_ppapi_plugin function to nsplugins.eclass?
Comment 2 Thomas Kear 2014-05-01 03:49:43 UTC
I've had a look around for chrome plugin folders and it's not looking good.

The removal of NPAPI has apparently killed the "--extra-plugin-dir" option (chrome://version says it's still set to /usr/lib64/nsbrowser/plugins on my system).  I tried putting the two libpp*.so files in both that directory or in a "pepper" subdirectory (as works inside chrome's installation directory) but no luck.

Also checked to see if google-chrome-unstable would look at any of /usr/lib64/chromium-browser/pepper, /opt/google/chrome-beta/pepper or /opt/google/chrome/pepper, in case there was one location universal to all the chrom{e,ium} browsers, but no luck there either.

Chrome won't start when I try and run it with 'strace -f' to find out which directories it's looking in on startup.

It's taken me while in the Chromium (36.0.1951.5) code - c++ isn't my strongest suit - but I think I finally found out how it resolves that path and it's not good news.

Someone will want to double-check my logic here, but it looks like from the Zygote code in the launcher (content/zygote/zygote_main_linux.cc), it searches through a list of hard-coded filenames (defined in chrome/common/chrome_paths.cc), two of which are the relevant "pepper/libppo1d.so" and "pepper/libppgoogletalk.so", but always resolves them relative to the absolute path to the "chrome" executable.


content/zygote/zygote_main_linux.cc:290:void PreloadPepperPlugins() {
content/zygote/zygote_main_linux.cc-291-  std::vector<PepperPluginInfo> plugins;
content/zygote/zygote_main_linux.cc-292-  ComputePepperPluginList(&plugins);

content/common/pepper_plugin_list.cc:146:void ComputePepperPluginList(std::vector<PepperPluginInfo>* plugins) {
content/common/pepper_plugin_list.cc-147-  GetContentClient()->AddPepperPlugins(plugins);

chrome/common/chrome_content_client.cc:467:void ChromeContentClient::AddPepperPlugins(
chrome/common/chrome_content_client.cc-468-    std::vector<content::PepperPluginInfo>* plugins) {
chrome/common/chrome_content_client.cc-469-  ComputeBuiltInPlugins(plugins);

chrome/common/chrome_content_client.cc:133:void ComputeBuiltInPlugins(std::vector<content::PepperPluginInfo>* plugins) {

chrome/common/chrome_content_client.cc:204:  if (PathService::Get(chrome::FILE_O1D_PLUGIN, &path)) {

chrome/common/chrome_paths.cc:338:    case chrome::FILE_O1D_PLUGIN:
chrome/common/chrome_paths.cc-339-      if (!PathService::Get(base::DIR_MODULE, &cur))
chrome/common/chrome_paths.cc-340-        return false;
chrome/common/chrome_paths.cc-341-      cur = cur.Append(kO1DPluginFileName);

base/base_paths.cc:21:    case DIR_MODULE:
base/base_paths.cc-22-      PathService::Get(FILE_MODULE, result);
base/base_paths.cc-23-      *result = result->DirName();
base/base_paths.cc-24-      return true;

base/base_paths_posix.cc:36:    case base::FILE_MODULE: {  // TODO(evanm): is this correct?
base/base_paths_posix.cc-37-#if defined(OS_LINUX)
base/base_paths_posix.cc-38-      FilePath bin_dir;
base/base_paths_posix.cc-39-      if (!ReadSymbolicLink(FilePath(kProcSelfExe), &bin_dir)) {
base/base_paths_posix.cc-40-        NOTREACHED() << "Unable to resolve " << kProcSelfExe << ".";
base/base_paths_posix.cc-41-        return false;
base/base_paths_posix.cc-42-      }
base/base_paths_posix.cc-43-      *result = bin_dir;
Comment 3 Jory A. Pratt gentoo-dev 2014-05-10 22:50:35 UTC
(In reply to Christoph Junghans from comment #1)
> I don't think we need use flags here, a couple of symlinks won't hurt anyone.
> 
> But I dislike to have 4 ppapi directories.
> 
> @chromium: Is there a universal ppapi fail-back folder for all the chrome
> browsers?
> 
> @mozilla: Would it be useful to add a inst_ppapi_plugin function to
> nsplugins.eclass?

There is no reason to add it to the eclass. nsplugin.eclass has always been dedicated for npapi plugins. There are no plans to support pepper plugins in any mozilla products, this should be handled by the package to setup a proper symlink for chromium in my opinion.
Comment 4 Mike Gilbert gentoo-dev 2014-05-10 23:09:51 UTC
(In reply to Christoph Junghans from comment #1)
> @chromium: Is there a universal ppapi fail-back folder for all the chrome
> browsers?

I have not seen anything like this.
Comment 5 Mike Gilbert gentoo-dev 2014-05-10 23:29:32 UTC
In fact, I think that chrome does not offer any sort of general pepper plugins directory. The GTalk plugin is actually treated as a special case and the file name is hard-coded into the chrome source.

http://src.chromium.org/viewvc/chrome?view=revision&revision=114487
Comment 6 Christoph Junghans (RETIRED) gentoo-dev 2014-05-12 01:45:09 UTC
+*google-talkplugin-5.3.1.0 (12 May 2014)
+
+  12 May 2014; Christoph Junghans <ottxor@gentoo.org>
+  +google-talkplugin-5.3.1.0.ebuild, google-talkplugin-5.2.4.0.ebuild,
+  google-talkplugin-9999.ebuild:
+  version bump, install ppapi plugins (bug #509116)
+