Closed Bug 438287 Opened 16 years ago Closed 16 years ago

Blocklist service should be platform-specific

Categories

(Toolkit :: Blocklist Policy Requests, defect)

defect
Not set
minor

Tracking

()

RESOLVED FIXED

People

(Reporter: morgamic, Assigned: morgamic)

References

Details

Attachments

(1 file)

Right now if we need to blocklist something for a specific platform, it's not possible unless the filenames are different for each operating system.  In most cases they are different, so the filename match is all we need, but this may not always be the case.
This is of particular interest if we had to key off of different versions of windows, for example -- if we had to blocklist something for Vista but not XP, etc.

There is actually support for this now, according to mossop and his work in bug 393285.  See the blocklist test case from the meta bug:
https://bugzilla.mozilla.org/attachment.cgi?id=301878

So what we need to do here is:
1) add an os field to blplugins
2) add ability to echo it in the blocklist RDF as shown in the example above
This also needs to cover basic emItem elements:
    <emItem id="item_6@domain" os="WINNT,Darwin"/>

See:
http://wiki.mozilla.org/Extension_Blocklisting:Code_Design#Blocklist_syntax
Blocks: 423550
Status: NEW → ASSIGNED
SQL for update:
ALTER TABLE `blapps` ADD `os` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL AFTER `max` ;

ALTER TABLE `blitems` ADD `os` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL AFTER `max` ;

ALTER TABLE `blplugins` ADD `os` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL AFTER `max` ;
Target Milestone: --- → 3.4.5
Assignee: nobody → morgamic
Status: ASSIGNED → NEW
blplugins is actually:
ALTER TABLE `blplugins` ADD `os` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL AFTER `max` ,
ADD `xpcomabi` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL AFTER `os` ;
Status: NEW → ASSIGNED
Alright, so final SQL to push this is:

ALTER TABLE `blplugins` ADD `os` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE
utf8_general_ci NULL AFTER `max` ,
ADD `xpcomabi` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL
AFTER `os` ;

ALTER TABLE `blitems` ADD `os` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE
utf8_general_ci NULL AFTER `max` ;

(blapps doesn't need an `os` column)
Adds support for os in emItems and os/xpcomabi in pluginItems to match the spec here:
http://wiki.mozilla.org/Extension_Blocklisting:Code_Design#Blocklist_syntax

Note that you'll have to reload your remora schema then reload the tests data in tests/data/remora-tests-data.sql.  You'll also need to have your TEST_DB_NAME defined correctly if it's not just DB_NAME.'-test'.
Attachment #328452 - Flags: review?
Attachment #328452 - Flags: review? → review?(fwenzel)
Comment on attachment 328452 [details] [diff] [review]
v1, patch to add support for os/xpcomabi to blocklist elements

Actually, the tests will fail unless you set all three databases (DB, SHADOW, TEST) to the test data. Then however, your patch works.
Attachment #328452 - Flags: review?(fwenzel) → review+
If you do what I did in comment #6, seems to work for the tests just fine?
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Keywords: push-needed
Resolution: --- → FIXED
3.4.5 was pushed on Friday.
Keywords: push-needed
Product: addons.mozilla.org → Toolkit
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: