Thunderbird 3 and Firefox 3.1: same extension used for both, how to package it?

Ville-Pekka Vainio vpivaini at cs.helsinki.fi
Sat Mar 7 19:37:42 UTC 2009


Hi,

(CC'd caillon and jhorak directly, since they have been rebuilding
mozvoikko when doing xulrunner updates, so they may have some ideas
about this...)

Rawhide has had Thunderbird 3 a few days now. I'm packaging a Firefox
extension called mozvoikko, which has been in Fedora since F-9.
Mozvoikko itself supports Thunderbird 3 but the package doesn't, yet.

The main question I have is: what's the best way of packaging the same
extension for both Firefox and Thunderbird?

Currently the extension is
in /usr/lib/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/{b676e3ff-cda7-4e0c-b2b8-74e4bb40a67a}
(on a 32 bit system) where ec8... is the Firefox application ID and
b67... is the Mozvoikko extension ID.

Here's the 'tree' output of the '{b676e3ff-cda7-4e0c-b2b8-74e4bb40a67a}'
directory:

|-- chrome.manifest
|-- components
|   `-- libmozvoikko.so
`-- install.rdf

It has two text files and the extension library in a 'components'
directory.

As far as I know, to make mozvoikko work with Thunderbird I need to have
the same file structure also
under /usr/lib/mozilla/extensions/{3550f703-e582-4d05-9a08-453d09bdfdc6}/{b676e3ff-cda7-4e0c-b2b8-74e4bb40a67a}
where 355... is the Thunderbird extension ID.

I could of course install the extension twice to both locations, but I'd
hate to have duplicate files. The best solution I've come up with is to
symlink the
'{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/{b676e3ff-cda7-4e0c-b2b8-74e4bb40a67a}' directory to '{3550f703-e582-4d05-9a08-453d09bdfdc6}/{b676e3ff-cda7-4e0c-b2b8-74e4bb40a67a}'.

In that case, the 'tree' output of '/usr/lib/mozilla/extensions' would
be:

|-- {3550f703-e582-4d05-9a08-453d09bdfdc6}
|   `-- {b676e3ff-cda7-4e0c-b2b8-74e4bb40a67a}
-> ../{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/{b676e3ff-cda7-4e0c-b2b8-74e4bb40a67a}
`-- {ec8030f7-c20a-464f-9b0e-13a3a9e97384}
    `-- {b676e3ff-cda7-4e0c-b2b8-74e4bb40a67a}
        |-- chrome.manifest
        |-- components
        |   `-- libmozvoikko.so
        `-- install.rdf

That will probably wrap in an ugly way, so the idea is to have
'{3550f703-e582-4d05-9a08-453d09bdfdc6}' be an actual directory and then
'{b676e3ff-cda7-4e0c-b2b8-74e4bb40a67a}' under it be a symlink to
'../{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/{b676e3ff-cda7-4e0c-b2b8-74e4bb40a67a}'.

This works with both Firefox and Thunderbird. I'm mostly concerned about
RPM. I've heard that RPM doesn't like it if a directory that's a symlink
is at some later point made to be an actual directory. Is it really so
and if it is, what should I do instead? Make all the directories 'real'
and only symlink all the individual files? Any other ideas?


-- 
Ville-Pekka Vainio





More information about the fedora-devel-list mailing list