85
edits
(→Extra file: propose the filename manifest-mozilla so that it sorts better in a web extension directory) |
(added banner) |
||
| (15 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
{{Template:ObsoleteAMO}} | |||
Status: '''draft''' | Status: '''draft''' | ||
| Line 4: | Line 6: | ||
Let's enable the running of WebExtensions add-ons built for Chrome with zero modification in Firefox. | Let's enable the running of WebExtensions add-ons built for Chrome with zero modification in Firefox. | ||
'''Update: a few things have changed and some people came up with a much better plan that does not involve using mozilla.json, this was updated to reflect this.''' | |||
== Bugs, bugs == | == Bugs, bugs == | ||
Bugzilla: {{Bugzilla|1255562}}, {{Bugzilla|1255564}} | Bugzilla: {{Bugzilla|1255562}} nope, this was replaced with {{Bugzilla|1262005}}, {{Bugzilla|1255564}} | ||
Github: https://github.com/mozilla/addons/issues/61 | Github: https://github.com/mozilla/addons/issues/61 | ||
| Line 17: | Line 21: | ||
"applications": { | "applications": { | ||
"gecko": { | "gecko": { | ||
"id": "drumpfinator-firefox@donaldjdrumpf.com" | "id": "drumpfinator-firefox@donaldjdrumpf.com" | ||
} | } | ||
} | } | ||
| Line 31: | Line 35: | ||
Because now all add-ons, be them hosted on AMO or hosted on a developers site have to go through AMO and be signed we now have the option to help developers out and do this for them. In the past this wouldn't have been possible. | Because now all add-ons, be them hosted on AMO or hosted on a developers site have to go through AMO and be signed we now have the option to help developers out and do this for them. In the past this wouldn't have been possible. | ||
== | == Rename field == | ||
Rename the field to '''browser_specific_settings'''. If other browsers support this key, then we can hope Chrome will start to ignore this key and not raise a warning in Chrome. | |||
Add-on developers could keep track of their add-on along with add-on if they so with, but it won't interfere with the basic operation of the add-on. | Add-on developers could keep track of their add-on along with add-on if they so with, but it won't interfere with the basic operation of the add-on. | ||
== | The field is optional, developers can use it if they want to specify their add-on id in advance (for example if they are upgrading an old add-on to WebExtensions). Otherwise they can ignore it. | ||
== Submitting an add-on == | |||
When | When submitting a WebExtension we would go through something like the following: | ||
* see if applications > id exists in the manifest.json (for legacy) | * see if applications > id exists in the manifest.json (for legacy) | ||
** if an add-on id exists, use it for the add-on | ** if an add-on id exists, use it for the add-on | ||
** continue | ** continue | ||
* generate a new add-on id, add it to the appropriate AMO table for that add-on | |||
* generate a new add-on id | |||
The add-on developer can find their add-on id | The add-on developer can find their add-on id by: | ||
* by accessing AMO and finding out | * by accessing AMO and finding out | ||
* | * using the API? | ||
* ... should we do more here? | |||
=== Signing an add-on === | |||
Each time the add-on is signed (for each version), it will pull the add-on id out of the appropriate AMO table and sign it with that add-on id. The add-on id will be in the signature and be consistent for each version of that add-on. | |||
== Loading in Firefox == | == Loading in Firefox == | ||
| Line 61: | Line 65: | ||
* see if applications > id exists in the manifest.json (for legacy) | * see if applications > id exists in the manifest.json (for legacy) | ||
** if an add-on id exists, use it for the add-on | ** if an add-on id exists, use it for the add-on | ||
** continue | ** continue on to the usual signing checks | ||
* | * if the add-on is signed | ||
** | ** the add-on is contained in the signing in the CN field? (should check that) of the signature | ||
** continue | ** use that add-on id | ||
** continue on to the usual signing checks | |||
* if the add-on id is not found and the add-on is being temporarily loaded through about:debugging | * if the add-on id is not found and the add-on is being temporarily loaded through about:debugging | ||
** generate a random add-on id | ** generate a random add-on id | ||
| Line 77: | Line 82: | ||
To fix this, we also propose changing the AMO signing API from | To fix this, we also propose changing the AMO signing API from | ||
'''PUT /api/v3/addons/[string:addon-id]/versions/[string:version]/''' | '''PUT /api/v3/addons/[string:addon-id]/versions/[string:version]/''' | ||
to | to | ||
'''PUT /api/v3/addons/''' | '''PUT /api/v3/addons/''' | ||
and having the server pull the addon-id and version out of the submitted XPI (or generate them if they're missing). | and having the server pull the addon-id and version out of the submitted XPI (or generate them if they're missing). | ||
(We should also return that data as fields in the response, so that the calling script would know what they were going to be.) | (We should also return that data as fields in the response, so that the calling script would know what they were going to be.) | ||
| Line 88: | Line 97: | ||
== Validator == | == Validator == | ||
We'd have to alter the validator | We'd have to alter the validator to make '''applications''' and '''browser_specific_settings''' optional. | ||
= Out of scope = | = Out of scope = | ||
edits