Bug 525825

Summary: galeon plugin search is mostly broken
Product: [Fedora] Fedora Reporter: Michal Jaegermann <michal>
Component: galeonAssignee: Yanko Kaneti <yaneti>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 14CC: denis, kas
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-16 21:24:03 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
a script to turn on correct plugins-wrapped directories for galeon
none
patch to fix galeon plugin search
none
a version 2 of a pre-script for a shell wrapper
none
a patch for a spec file none

Description Michal Jaegermann 2009-09-26 02:41:41 UTC
Created attachment 362738 [details]
a script to turn on correct plugins-wrapped directories for galeon

Description of problem:

There are two problems. The first is that 64-bit version of galeon is searching for plugins in /usr/lib/mozilla/plugins.  One can see that in a strace output and also running 'strings -n8 /usr/bin/galeon | grep plugins'.  That is a configuration error and instead /usr/lib64/mozilla/plugins should be checked.

The other is that even if mozilla-plugin-config is present plugins-wrapped directories are not scanned.  A galeon which was unable to find any plugins at all if invoked as

   MOZ_PLUGIN_PATH=/usr/lib64/mozilla/plugins-wrapped galeon

all of sudden has various, wrapped, 64 and 32 bit plugins active.

The second issue can be solved with a help of an attached shell script.
An assumption is that this script is running as galeon while he "real" binary
was renamed to /usr/bin/galeon.bin
  

Version-Release number of selected component (if applicable):
galeon-2.0.7-16.fc12

How reproducible:
always

Expected results:
galeon sees the same plugins as, say, firefox.

Comment 1 Denis Leroy 2009-09-26 07:15:20 UTC
Yes, I've removed the wrap patch because it renders 32-bit galeon unusable. Spurious crashes on exit, random flash crashes, etc... Until we figure out what's going on, I can't put it back in. I'll work on a reduced path to at least fix the MOZ_PLUGIN_PATH issue for 64-bit.

Comment 2 Michal Jaegermann 2009-09-26 17:49:51 UTC
> Yes, I've removed the wrap patch because it renders 32-bit galeon unusable.
> Spurious crashes on exit, random flash crashes, etc...

Hm. I did not notice anything of that sort with wrapped pluggins but I looked only at 64-bit version of galeon and only for a really short time.

OTOH if those crashes affect solely a 32-bit galeon then a shell wrap can be made in this case "toothless", until those issues are resolved, by making a default action in a wrap 'case' statement into

  exec /usr/bin/galeon.bin "$@"

If MOZ_PLUGIN_PATH is already assigned in a calling shell then it will be inherited here.

Comment 3 Michal Jaegermann 2009-09-26 23:16:03 UTC
> ... it renders 32-bit galeon unusable.
> Spurious crashes on exit, random flash crashes, etc...

A totally untested idea.  Maybe when "plugins-wrapped" directory is in MOZ_PLUGIN_PATH then galeon should not search in %{_libdir}/mozilla/plugins?
Currently it always adds /usr/lib/mozilla/plugins and I do not think that
firefox and other browsers do that.  Because galeon will find wrapped and unwrapped variants for the same plugin and this is possibly a trouble.

With a 64-bit galeon searching through /usr/lib/mozilla/plugins is at this moment "safe" because  32-bit plugins found there will be rejected with "wrong ELF class: ELFCLASS32".  Currently /usr/lib64/mozilla/plugins is not searched at all so if I will provide "wrapped" MOZ_PLUGIN_PATH I see only plugins from /usr/lib64/mozilla/plugins-wrapped (and an error on an attempt to use /usr/lib/mozilla/plugins/nppdf.so while nswrapper_32_64.nppdf.so is just fine).

Comment 4 Michal Jaegermann 2009-10-02 05:02:25 UTC
Created attachment 363420 [details]
patch to fix galeon plugin search

> Spurious crashes on exit, random flash crashes, etc...

This patch adjusts a default plugins search patch depending on architecture.  It also avoids dropping into a search path 'plugins' directory if 'plugins-wrapped' is already present (only for %{_libdir}/mozilla).

I run with that on a 64-bit galeon but so far I did not see any ill-effects.

Comment 5 Michal Jaegermann 2009-10-02 05:09:27 UTC
Created attachment 363422 [details]
a version 2 of a pre-script for a shell wrapper

This is for use in SOURCES as galeon.sh.

Old galeon was setting XLIB_SKIP_ARGB_VISUALS=1 in an environment, directly in mozilla-embed-shell.cpp, in order to prevent flash crashes.  I do not know if this is still needed and/or helps but I added it to this version.  Does not seem to be doing any harm...

Comment 6 Michal Jaegermann 2009-10-02 05:11:30 UTC
Created attachment 363424 [details]
a patch for a spec file

Sample galeon.spec modifications to use pieces from the two previous attachments

Comment 7 Denis Leroy 2009-10-13 07:20:21 UTC
*** Bug 528142 has been marked as a duplicate of this bug. ***

Comment 8 Denis Leroy 2009-10-13 07:37:45 UTC
Hi Michal,

Can you give this build a try ? :

http://koji.fedoraproject.org/koji/buildinfo?buildID=136384

thx

Comment 9 Michal Jaegermann 2009-10-13 18:50:41 UTC
> http://koji.fedoraproject.org/koji/buildinfo?buildID=136384

That would be galeon-2.0.7-17.fc13 AFAICT.  It looks like it is broken as it was before.  Apparently it searches unconditionally in /usr/lib/mozilla/plugins which is not the place to look on 64-bit system and also when you have wrapped plugins.  It is not finding for me a single plugin.  A galeon patched with attachments to this report finds and uses on my test system seven plugins and is not "doubling up" wrapped and unwrapped variants.

Comment 10 Denis Leroy 2009-10-14 07:11:38 UTC
Yikes sorry, made a silly mistake in the spec. This should be better:

http://koji.fedoraproject.org/koji/buildinfo?buildID=136580

Comment 11 Michal Jaegermann 2009-10-14 19:31:44 UTC
> This should be better ...

Indeed.  With galeon-2.0.7-18.fc13.x86_64 I see five plugins out of seven.
Missing in a default configuration are libnullplugin.so and libunixprintplugin.so which happen to live in %{_libdir}/xulrunner-1.9.1/plugins/.

Somehow I miss why I still see, when starting from a terminal window, this:
LoadPlugin: failed to initialize shared library /opt/Adobe/Reader9/Browser/intellinux/nppdf.so [/opt/Adobe/Reader9/Browser/intellinux/nppdf.so: wrong ELF class: ELFCLASS32]

That is correct and nswrapper_32_64.nppdf.so is used but something still tries
to load that directly.  Interesting what would happen on a 32-bit installation. ("In real life" I am not using that plugin at all but this is testing).

Comment 12 Michal Jaegermann 2009-10-14 19:53:45 UTC
I have some hints about the last question.  Runing galeon-2.0.7-18.fc13.x86_64 under strace I see:

access("/home/michal/.galeon/mozilla/galeon/plugins", F_OK) = -1 ENOENT (No such file or directory)
access("/home/michal/.mozilla/plugins", F_OK) = -1 ENOENT (No such file or directory)
access("/usr/lib64/mozilla/plugins-wrapped", F_OK) = 0
access("/home/michal/.mozilla/plugins", F_OK) = -1 ENOENT (No such file or directory)
access("/usr/share/galeon/plugins", F_OK) = -1 ENOENT (No such file or directory)
access("/usr/lib/mozilla/plugins", F_OK) = 0

So it still tries to get plugins from /usr/lib/mozilla/plugins even if /usr/lib/mozilla/plugins-wrapped exists and this is not 32-bit installation.  This may mess up things if something from there will manage to get loaded after
/usr/lib/mozilla/plugins-wrapped was already visited.

Comment 13 Jan "Yenya" Kasprzak 2009-10-15 06:33:58 UTC
galeon-2.0.7-18.fc13.x86_64.rpm is definitely better - about:config displays the same (five) plugins as firefox. The libnullplugin and libunixprintplugin problem is probably not on a galeon side, but on the firefox one.

Comment 14 Jan "Yenya" Kasprzak 2009-10-15 07:50:35 UTC
The galeon-2.0.7-18.fc13.x86_64.rpm has a different problem: the file upload entry in HTML forms does not work (the file name cannot be entered to it and the Browse button does nothing). The following is printed to the stderr:

unable to open file picker
[Exception... "Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIBaseWindow.blurSuppression]"  nsresult: "0x80004001 (NS_ERROR_NOT_IMPLEMENTED)"  location: "JS frame :: file:///usr/lib64/xulrunner-1.9.1/components/nsFilePicker.js :: anonymous :: line 245"  data: no]
unable to open file picker
[Exception... "Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIBaseWindow.blurSuppression]"  nsresult: "0x80004001 (NS_ERROR_NOT_IMPLEMENTED)"  location: "JS frame :: file:///usr/lib64/xulrunner-1.9.1/components/nsFilePicker.js :: anonymous :: line 245"  data: no]

Comment 15 Michal Jaegermann 2009-10-15 16:30:05 UTC
> The libnullplugin and libunixprintplugin problem is probably not on a galeon
> side

I am not sure what you mean by that.  If you make the corresponding directory to show in MOZ_PLUGIN_PATH before calling galeon then these two will be found.  I think that they should be noticed by default.

Sounds like comment #14 should be a separate bugzilla entry.  Hm, firefox is using the same xulrunner code.  A different way of calling?

Comment 16 Michal Jaegermann 2009-10-30 16:36:46 UTC
An update to galeon-2.0.7-16.fc12.1.x86_64 brings old breakage back.  That means that "wrapped" plugins are ignored and /usr/lib/mozilla/plugins is unconditionally searched on a 64-bit installation.

Printing (see bug 529515) still does not work.

Comment 17 Denis Leroy 2009-10-30 17:12:25 UTC
I'll be honest, I am likely to orphan galeon after f12 is released. It has become harder and harder to maintain and now suffers from to many hard-to-fix issues (printing, keyboard focus issues with facebook and youtube, security exceptions, constant flash crashes). Looking at other distros, they either dropped it already or simply use the same fedora patches written by myself and other fedora contributors. As much as Iove galeon, the transition to firefox seems more and more unavoidable... I'll try to address some of the bugs for f12, but I can only manage the fairly straightforward ones...

Comment 18 Michal Jaegermann 2009-10-30 18:00:39 UTC
> ... and now suffers from to many hard-to-fix issues

I have no idea if anybody "upstream" cares but that mostly sounds like upstream problems.  I tried to peek at the code a bit but between xulrunner and C++ it is for me far from clear.  One would hope that this would be much easier for somebody familiar with sources.

Comment 19 Denis Leroy 2009-10-30 21:36:53 UTC
> I have no idea if anybody "upstream" cares but that mostly sounds like
> upstream problems.

That's the problem exactly: there is no more upstream. Philip Langdale abandoned the project years ago. To maintain this project in Fedora means being ready to write C++ xulrunner code, something that is not always simple...

-denis

Comment 20 Bug Zapper 2009-11-16 12:57:54 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 12 development cycle.
Changing version to '12'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 21 Jan "Yenya" Kasprzak 2009-11-23 20:01:36 UTC
As probably expected, the problem still exists in galeon-2.0.7-18.fc12.x86_64. Downgrading to -14.fc11 fixes the problem.

Comment 22 Yanko Kaneti 2009-12-07 08:47:28 UTC
Taking over open galeon bugreports.

Comment 23 Bug Zapper 2010-11-04 09:49:22 UTC
This message is a reminder that Fedora 12 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 12.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '12'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 12's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 12 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 24 Fedora End Of Life 2012-08-16 21:24:05 UTC
This message is a notice that Fedora 14 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 14. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained.  At this time, all open bugs with a Fedora 'version'
of '14' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this 
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen 
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we were unable to fix it before Fedora 14 reached end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" (top right of this page) and open it against that 
version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping