Closed Bug 803955 Opened 7 years ago Closed 7 years ago

Fix systemwide extensions/plugins search path for the BSDs

Categories

(Core :: XPCOM, defect)

Other
OpenBSD
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla19

People

(Reporter: gaston, Assigned: gaston)

Details

Attachments

(1 file, 1 obsolete file)

(not 100% sure of the component)

On the BSDs, we use alternative dirs for systemwide installations, /usr is reserved for the basesystem and third-party apps from the portstree/pkgsrc ends up in /usr/local (OpenBSD, FreeBSD) or /usr/pkg (NetBSD/pkgsrc).

For example on openbsd i can install :

gecko-mediaplayer-1.0.6:www/gecko-mediaplayer:/usr/local/lib/mozilla/plugins/gecko-mediaplayer-dvx.so
gecko-mediaplayer-1.0.6:www/gecko-mediaplayer:/usr/local/lib/mozilla/plugins/gecko-mediaplayer-qt.so
gecko-mediaplayer-1.0.6:www/gecko-mediaplayer:/usr/local/lib/mozilla/plugins/gecko-mediaplayer-rm.so
gecko-mediaplayer-1.0.6:www/gecko-mediaplayer:/usr/local/lib/mozilla/plugins/gecko-mediaplayer-wmp.so
gecko-mediaplayer-1.0.6:www/gecko-mediaplayer:/usr/local/lib/mozilla/plugins/gecko-mediaplayer.so
gnash-0.8.10p0v0:www/gnash:/usr/local/lib/mozilla/plugins/libgnashplugin.so
gnome-shell-3.4.2p0:x11/gnome/shell:/usr/local/lib/mozilla/plugins/libgnome-shell-browser-plugin.so
icedtea-web-1.2p1:www/icedtea-web:/usr/local/lib/mozilla/plugins/IcedTeaPlugin.so
mozplugger-1.14.2:www/mozplugger:/usr/local/lib/mozilla/plugins/mozplugger.so
swfdec-plugin-0.8.2p6:www/swfdec-plugin:/usr/local/lib/mozilla/plugins/libswfdecmozilla.so
vteplugin-0.1p10:www/vteplugin:/usr/local/lib/mozilla/plugins/vteplugin.so

I'm carrying some patches fixing the default search paths since ages, and i suppose my other bsd folks do the same, so lets fix it once for all.

http://www.openbsd.org/cgi-bin/cvsweb/ports/www/mozilla-firefox/patches/patch-toolkit_xre_nsXREDirProvider_cpp?rev=1.15
http://www.openbsd.org/cgi-bin/cvsweb/ports/www/mozilla-firefox/patches/patch-xpcom_io_nsAppFileLocationProvider_cpp?rev=1.6
Attached patch Fix search paths for OpenBSD (obsolete) — Splinter Review
First stab only taking openbsd into account, awaiting feedback from my bsd folks for a complete patch.
Assignee: nobody → landry
Comment on attachment 673678 [details] [diff] [review]
Fix search paths for OpenBSD

FreeBSD ports install extensions under $prefix/lib/xpi and plugins under $prefix/lib/browser_plugins. Those directories contain symlink farms to limit some plugins/extensions to certain apps, probably predating $prefix/lib/$appname/{extensions,plugins} support.

http://svnweb.freebsd.org/ports/head/www/firefox/Makefile.webplugins?view=co
http://svnweb.freebsd.org/ports/head/www/xpi-adblock/Makefile.xpi?view=co
Attachment #673678 - Flags: feedback+
To take advantage of the change on FreeBSD some infrastructure work downstream is still needed. But it's not like /usr worked before.
Attachment #673678 - Attachment is obsolete: true
pkgsrc uses:

SUBST_SED.fix-paths+=         -e 's,/usr/lib/mozilla/plugins,${PREFIX}/lib/netscape/plugins,g'
(In reply to Jan Beich from comment #3)
> Created attachment 673704 [details] [diff] [review]
> FreeBSD and OpenBSD should look under /usr/local prefix by default
> 
> To take advantage of the change on FreeBSD some infrastructure work
> downstream is still needed. But it's not like /usr worked before.

Does that mean you're okay with /usr/local/lib/mozilla/{plugins,extensions} or you prefer the patch to look for the dirs existing now on freebsd ?

(In reply to Martin Husemann from comment #4)
> pkgsrc uses:
> 
> SUBST_SED.fix-paths+=         -e
> 's,/usr/lib/mozilla/plugins,${PREFIX}/lib/netscape/plugins,g'

So... should /usr/pkg/lib/netscape/plugins be searched for on DragonFly/NetBSD ? We have no way to tell we're running on a pkgsrc-installed ffx..
This should be a configure option. As long as it is not, we will just adopt whatever hardcoded string ends up in there and sed it to the value we want.
(In reply to Martin Husemann from comment #6)
> This should be a configure option. As long as it is not, we will just adopt
> whatever hardcoded string ends up in there and sed it to the value we want.

So, no #ifdef dance for netbsd/dfly, and you prefer to patch it away ? your call.
Assuming we can't make it a configure option: yes. We need it under $PREFIX, which is varying a lot, so no hardcoded value will fit. And as you say, we can not tell a pkgsrc from a native build easily via the preprocessor.

(Sorry, my autoconfig fu is very weak)
(In reply to Martin Husemann from comment #8)
> Assuming we can't make it a configure option: yes. We need it under $PREFIX,
> which is varying a lot, so no hardcoded value will fit.

Ah, right - this is indeed the same for me, but i wont be bothering with patching hardcoded usr/local for $PREFIX; i already have enough useless battles to fight
Comment on attachment 673704 [details] [diff] [review]
FreeBSD and OpenBSD should look under /usr/local prefix by default

So let's see how acceptable this is...
Attachment #673704 - Flags: review?(benjamin)
Attachment #673704 - Flags: review?(benjamin) → review+
https://hg.mozilla.org/mozilla-central/rev/cf6c50786ee5
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
Why GetSystemExtensionsDirectory ifdef is only for OpenBSD?
My bad. I'll fix it rsn.
You need to log in before you can comment on or make changes to this bug.