Native host manifest location should be arch-independent in Linux
Categories
(WebExtensions :: General, defect, P5)
Tracking
(Not tracked)
People
(Reporter: ykonotopov, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: triaged)
Comment 1•8 years ago
|
||
Comment 2•8 years ago
|
||
Updated•8 years ago
|
Comment 4•8 years ago
|
||
Comment 5•8 years ago
|
||
Reporter | ||
Comment 6•8 years ago
|
||
Comment 7•8 years ago
|
||
Reporter | ||
Comment 8•7 years ago
|
||
Comment 9•7 years ago
|
||
Updated•7 years ago
|
Updated•2 years ago
|
Comment 10•2 years ago
|
||
This issue has been mentioned in https://github.com/flatpak/xdg-desktop-portal/pull/705#issuecomment-1308723680 as a good thing to be solved for the flatpak/snap WebExtension/native messaging xdg-portal.
Comment 11•1 year ago
|
||
I think that Firefox on Linux should try to load manifests (and certificates apparently, as they also use the same base directory) from both /usr/lib/mozilla
and /usr/lib64/mozilla
, regardless of the architecture, so it would also detect native apps from packages that only place manifest into one of this directories. Additionally, it seems Firefox uses /usr/local/lib/mozilla
on OpenBSD and FreeBSD (but /usr/lib64/mozilla
when lib64 is enabled), so this directory should still be used on BSD (along with the other two directories for consistency on Linux, and maybe /usr/local/lib64/mozilla
if that exists).
Additionally, since some distros discourage placing platform-independent files to /usr/lib
, Firefox should probably also support loading manifests (and certificates) from /usr/share/mozilla
, still in combination with all other existing paths for backward compatibility. This should probably also be a preferred path.
However, I don't know what's the best way of implementing it. The path is currently obtained through XRESysNativeManifests
. If these new directories were to be implemented in the same way, this would require at least 3 new such service keys (I don't know what the correct terminology is). An easier (but more "hacky") way would be to just hard-code the new paths (/usr/share/mozilla
, /usr/lib/mozilla
, /usr/lib64/mozilla
, and maybe also /usr/local/lib/mozilla
or even /usr/local/lib64/mozilla
) where they are used (here and here) on Linux (and BSD). The original service key should probably stay, and Firefox will just continue searching in other directories in the list if it's not found there. This is a lot easier than creating new service keys, but I don't know if it's considered a good practice and could be accepted.
If the implementation with hard-coded directories is good enough, I can probably contribute a patch at some point.
Description
•