mozilla-devscripts should place extension configuration files in /etc automatically

Bug #535544 reported by dkg
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mozilla-devscripts
Fix Released
Undecided
Unassigned
mozilla-devscripts (Debian)
Fix Released
Unknown

Bug Description

http://bugs.debian.org/558490 suggests that xul extensions should automatically place their default preference files in /etc, so that they will be treated as conffiles and maintained across system upgrades, allowing local administrators better configuration control.

Attached is a patch to install-xpi to do this automatically, as described in the debian bug.

Revision history for this message
dkg (dkg0) wrote :
Benjamin Drung (bdrung)
affects: debian → mozilla-devscripts (Debian)
Revision history for this message
Benjamin Drung (bdrung) wrote :

<asac> we dont want all .js files to go there
<asac> what we should do is to guess a name that is alphabetically lower than all other preferences fils
<asac> create that and link it to an empty file in /etc/
<asac> in that way admins can change the defaults
<asac> without loosing ability to reset to package defaults
<asac> like the file we have for ubufox
<asac> bdrung: we have 000system.js there
<asac> thats a link to /etc/...

asac and I discussed the best place for the location in /etc. The result was to use /etc/xul-ext/PACKAGE.js. PACKAGE should be the package name with stripped xul-ext-.

Example xul-ext-adblock-plus:
* create a file empty file /etc/xul-ext/adblock-plus.js
* create a link in /usr/share/xul-ext-adblock-plus/defaults/preferences/000system.js pointing to /etc/xul-ext/adblock-plus.js

The option to disable this behavior should start with --disable-.

Your patch contains some conversions from tabs to spaces (in the usage function), but I can't find any tabs in our branch.

Revision history for this message
dkg (dkg0) wrote :

I have no objection to the suggestion that /etc/xul-ext/ is a better location than /etc/mozilla-extensions, given our package naming scheme. i do have other concerns with the above proposal, though.

asac's comment suggests that xul apps will load the extension preferences in alphabetical order, first-match-wins. I don't know the specified behavior well enough to know that to be a guarantee (though i'd be satisfied with a link to the right spot in the xul extension docs).

I'm also not convinced that we want an empty file as the configfile -- that seems pretty unhelpful to the sysadmin. Most sysadmins use the system-supplied default config files as shipped with packages, and tweak them as needed. I don't know if i've ever seen a package ship with an empty config file.

If the concern is about a reversion to the packages' default preferences file, we could place another copy of it in /usr/share/doc/xul-ext-foo/. Then reversion is as simple as:

 cp /usr/share/doc/xul-ext-foo/foo.js /etc/xul-ext/foo.js

(sorry about the errant spaces. i tried to fix all of those to conform with the style of the file, but i guess i missed some. i'm not attached to them in any way)

Changed in mozilla-devscripts (Debian):
status: Unknown → Confirmed
Changed in mozilla-devscripts (Debian):
status: Confirmed → Fix Released
Benjamin Drung (bdrung)
Changed in mozilla-devscripts:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.