Skip to content

Commit 2cf32d8

Browse files
author
Robert Strong
committed
Bug 1392913 - Remove updatev2.manifest support and other code that is no longer necessary for backwards compatibility after the next watershed. r=mhowell
Removes code to fallback to the updatev2.manifest file when the updatev3.manifest file isn't present Removes all of the one-off file and dir removals in removed-files.in Removes code for the OS X distribution directory migration and distribution directory migration tests that were added for v2 signing Removes code to remove the precomplete file located in the root of the bundle on OS X Removes code too fix the registry entry for the Windows crypto provider which was needed for Windows XP and Windows Vista
1 parent 8ff995c commit 2cf32d8

11 files changed

+11
-446
lines changed

browser/installer/removed-files.in

Lines changed: 4 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
# Due to Apple Mac OS X packaging requirements files that are in the same
5656
# directory on other platforms must be located in different directories on
5757
# Mac OS X. The following defines allow specifying the Mac OS X bundle
58-
# location which also work on other platforms.
58+
# location which will also work on other platforms.
5959
#
6060
# @DIR_MACOS@
6161
# Equals Contents/MacOS/ on Mac OS X and is an empty string on other platforms.
@@ -64,53 +64,6 @@
6464
# Equals Contents/Resources/ on Mac OS X and is an empty string on other
6565
# platforms.
6666

67-
# Common File Removals
68-
# This is located under the "distribution/" directory and it was added before
69-
# Firefox 27
70-
@DIR_MACOS@distribution/extensions/testpilot@labs.mozilla.com.xpi
71-
72-
# Mac OS X v2 signing removals
73-
#ifdef XP_MACOSX
74-
@DIR_MACOS@active-update.xml
75-
@DIR_MACOS@update-settings.ini
76-
@DIR_MACOS@updates.xml
77-
@DIR_MACOS@defaults/*
78-
@DIR_MACOS@updates/*
79-
#endif
80-
81-
# Common Directory removals
82-
@DIR_MACOS@chrome/
83-
#ifdef XP_UNIX
84-
#ifndef XP_MACOSX
85-
chrome/icons/
86-
chrome/icons/default/
87-
#endif
88-
#endif
89-
@DIR_MACOS@chrome/overlayinfo/
90-
@DIR_MACOS@components/
91-
@DIR_MACOS@defaults/autoconfig/
92-
@DIR_MACOS@defaults/profile/
93-
@DIR_MACOS@defaults/profile/chrome/
94-
@DIR_MACOS@defaults/profile/US/*
95-
@DIR_MACOS@defaults/profile/extensions/
96-
@DIR_MACOS@defaults/profile/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/*
97-
@DIR_MACOS@distribution/
98-
@DIR_MACOS@distribution/extensions/
99-
@DIR_MACOS@extensions/
100-
@DIR_MACOS@extensions/inspector@mozilla.org/*
101-
@DIR_MACOS@extensions/reporter@mozilla.org/*
102-
@DIR_MACOS@extensions/talkback@mozilla.org/*
103-
@DIR_MACOS@extensions/testpilot@labs.mozilla.com/*
104-
@DIR_MACOS@extensions/{641d8d09-7dda-4850-8228-ac0ab65e2ac9}/*
105-
@DIR_MACOS@extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/*
106-
@DIR_MACOS@greprefs/
107-
@DIR_MACOS@jssubloader/
108-
@DIR_MACOS@modules/
109-
#ifdef XP_MACOSX
110-
@DIR_MACOS@plugins/Default Plugin.plugin/*
111-
@DIR_MACOS@plugins/JavaEmbeddingPlugin.bundle/*
112-
@DIR_MACOS@plugins/MRJPlugin.plugin/*
113-
Contents/Plug-Ins/PrintPDE.plugin/*
114-
#endif
115-
@DIR_MACOS@searchplugins/*
116-
@DIR_MACOS@webapprt/components/
67+
# An update watershed was required to update to Firefox 56 for LZMA and SHA384
68+
# support. This made it possible to delete all of the removal instructions in
69+
# this file.

toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,6 @@ const FILE_WRONG_CHANNEL_MAR = "wrong_product_channel.mar";
8686

8787
const PERFORMING_STAGED_UPDATE = "Performing a staged update";
8888
const CALL_QUIT = "calling QuitProgressUI";
89-
const REMOVE_OLD_DIST_DIR = "removing old distribution directory";
90-
const MOVE_OLD_DIST_DIR = "Moving old distribution directory to new location";
9189
const ERR_UPDATE_IN_PROGRESS = "Update already in progress! Exiting";
9290
const ERR_RENAME_FILE = "rename_file: failed to rename file";
9391
const ERR_ENSURE_COPY = "ensure_copy: failed to copy the file";
@@ -3010,12 +3008,6 @@ function checkUpdateLogContents(aCompareLogFile, aStaged = false,
30103008
// Skip lines that log failed attempts to open the callback executable.
30113009
updateLogContents = updateLogContents.replace(/NS_main: callback app file .*/g, "");
30123010

3013-
if (IS_MACOSX) {
3014-
// Skip lines that log moving the distribution directory for Mac v2 signing.
3015-
updateLogContents = updateLogContents.replace(/Moving old [^\n]*\nrename_file: .*/g, "");
3016-
updateLogContents = updateLogContents.replace(/New distribution directory .*/g, "");
3017-
}
3018-
30193011
if (IS_WIN) {
30203012
// The FindFile results when enumerating the filesystem on Windows is not
30213013
// determistic so the results matching the following need to be fixed.

toolkit/mozapps/update/tests/unit_base_updater/marStageSuccessComplete.js

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ function run_test() {
1616
gTestFiles[gTestFiles.length - 1].compareContents = "FromComplete\n";
1717
gTestFiles[gTestFiles.length - 1].comparePerms = 0o644;
1818
gTestDirs = gTestDirsCompleteSuccess;
19-
setupDistributionDir();
2019
setupSymLinks();
2120
setupUpdaterTest(FILE_COMPLETE_MAR, false);
2221
}
@@ -56,7 +55,6 @@ function checkPostUpdateAppLogFinished() {
5655
checkPostUpdateRunningFile(true);
5756
checkFilesAfterUpdateSuccess(getApplyDirFile, false, true);
5857
checkUpdateLogContents(LOG_REPLACE_SUCCESS, false, true);
59-
checkDistributionDir();
6058
do_execute_soon(waitForUpdateXMLFiles);
6159
}
6260

@@ -68,33 +66,6 @@ function waitForUpdateXMLFilesFinished() {
6866
checkCallbackLog();
6967
}
7068

71-
/**
72-
* Setup the state of the distribution directory for the test.
73-
*/
74-
function setupDistributionDir() {
75-
if (IS_MACOSX) {
76-
// Create files in the old distribution directory location to verify that
77-
// the directory and its contents are removed when there is a distribution
78-
// directory in the new location.
79-
let testFile = getApplyDirFile(DIR_MACOS + "distribution/testFile", true);
80-
writeFile(testFile, "test\n");
81-
testFile = getApplyDirFile(DIR_MACOS + "distribution/test1/testFile", true);
82-
writeFile(testFile, "test\n");
83-
}
84-
}
85-
86-
/**
87-
* Checks the state of the distribution directory for the test.
88-
*/
89-
function checkDistributionDir() {
90-
if (IS_MACOSX) {
91-
let distributionDir = getApplyDirFile(DIR_MACOS + "distribution", true);
92-
Assert.ok(!distributionDir.exists(),
93-
MSG_SHOULD_NOT_EXIST + getMsgPath(distributionDir.path));
94-
checkUpdateLogContains(REMOVE_OLD_DIST_DIR);
95-
}
96-
}
97-
9869
/**
9970
* Setup symlinks for the test.
10071
*/

toolkit/mozapps/update/tests/unit_base_updater/marStageSuccessPartial.js

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ function run_test() {
1717
gTestFiles[gTestFiles.length - 2].comparePerms = 0o644;
1818
gTestDirs = gTestDirsPartialSuccess;
1919
preventDistributionFiles();
20-
setupDistributionDir();
2120
setupUpdaterTest(FILE_PARTIAL_MAR, true);
2221
}
2322

@@ -55,7 +54,6 @@ function checkPostUpdateAppLogFinished() {
5554
checkPostUpdateRunningFile(true);
5655
checkFilesAfterUpdateSuccess(getApplyDirFile, false, true);
5756
checkUpdateLogContents(LOG_REPLACE_SUCCESS, false, true, true);
58-
checkDistributionDir();
5957
do_execute_soon(waitForUpdateXMLFiles);
6058
}
6159

@@ -66,47 +64,3 @@ function waitForUpdateXMLFilesFinished() {
6664
checkUpdateManager(STATE_NONE, false, STATE_SUCCEEDED, 0, 1);
6765
checkCallbackLog();
6866
}
69-
70-
/**
71-
* Setup the state of the distribution directory for the test.
72-
*/
73-
function setupDistributionDir() {
74-
if (IS_MACOSX) {
75-
// Create files in the old distribution directory location to verify that
76-
// the directory and its contents are moved to the new location on update.
77-
let testFile = getApplyDirFile(DIR_MACOS + "distribution/testFile", true);
78-
writeFile(testFile, "test\n");
79-
testFile = getApplyDirFile(DIR_MACOS + "distribution/test/testFile", true);
80-
writeFile(testFile, "test\n");
81-
}
82-
}
83-
84-
/**
85-
* Checks the state of the distribution directory.
86-
*/
87-
function checkDistributionDir() {
88-
let distributionDir = getApplyDirFile(DIR_RESOURCES + "distribution", true);
89-
if (IS_MACOSX) {
90-
Assert.ok(distributionDir.exists(),
91-
MSG_SHOULD_EXIST + getMsgPath(distributionDir.path));
92-
93-
let testFile = getApplyDirFile(DIR_RESOURCES + "distribution/testFile", true);
94-
Assert.ok(testFile.exists(),
95-
MSG_SHOULD_EXIST + getMsgPath(testFile.path));
96-
97-
testFile = getApplyDirFile(DIR_RESOURCES + "distribution/test/testFile", true);
98-
Assert.ok(testFile.exists(),
99-
MSG_SHOULD_EXIST + getMsgPath(testFile.path));
100-
101-
distributionDir = getApplyDirFile(DIR_MACOS + "distribution", true);
102-
Assert.ok(!distributionDir.exists(),
103-
MSG_SHOULD_NOT_EXIST + getMsgPath(distributionDir.path));
104-
105-
checkUpdateLogContains(MOVE_OLD_DIST_DIR);
106-
} else {
107-
debugDump("testing that files aren't added with an add-if instruction " +
108-
"when the file's destination directory doesn't exist");
109-
Assert.ok(!distributionDir.exists(),
110-
MSG_SHOULD_NOT_EXIST + getMsgPath(distributionDir.path));
111-
}
112-
}

toolkit/mozapps/update/tests/unit_base_updater/marSuccessComplete.js

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ function run_test() {
1212
gTestFiles = gTestFilesCompleteSuccess;
1313
gTestDirs = gTestDirsCompleteSuccess;
1414
preventDistributionFiles();
15-
setupDistributionDir();
1615
setupUpdaterTest(FILE_COMPLETE_MAR, true);
1716
}
1817

@@ -39,7 +38,6 @@ function checkPostUpdateAppLogFinished() {
3938
checkPostUpdateRunningFile(true);
4039
checkFilesAfterUpdateSuccess(getApplyDirFile);
4140
checkUpdateLogContents(LOG_COMPLETE_SUCCESS, false, false, true);
42-
checkDistributionDir();
4341
do_execute_soon(waitForUpdateXMLFiles);
4442
}
4543

@@ -50,47 +48,3 @@ function waitForUpdateXMLFilesFinished() {
5048
checkUpdateManager(STATE_NONE, false, STATE_SUCCEEDED, 0, 1);
5149
checkCallbackLog();
5250
}
53-
54-
/**
55-
* Setup the state of the distribution directory for the test.
56-
*/
57-
function setupDistributionDir() {
58-
if (IS_MACOSX) {
59-
// Create files in the old distribution directory location to verify that
60-
// the directory and its contents are moved to the new location on update.
61-
let testFile = getApplyDirFile(DIR_MACOS + "distribution/testFile", true);
62-
writeFile(testFile, "test\n");
63-
testFile = getApplyDirFile(DIR_MACOS + "distribution/test/testFile", true);
64-
writeFile(testFile, "test\n");
65-
}
66-
}
67-
68-
/**
69-
* Checks the state of the distribution directory.
70-
*/
71-
function checkDistributionDir() {
72-
let distributionDir = getApplyDirFile(DIR_RESOURCES + "distribution", true);
73-
if (IS_MACOSX) {
74-
Assert.ok(distributionDir.exists(),
75-
MSG_SHOULD_EXIST + getMsgPath(distributionDir.path));
76-
77-
let testFile = getApplyDirFile(DIR_RESOURCES + "distribution/testFile", true);
78-
Assert.ok(testFile.exists(),
79-
MSG_SHOULD_EXIST + getMsgPath(testFile.path));
80-
81-
testFile = getApplyDirFile(DIR_RESOURCES + "distribution/test/testFile", true);
82-
Assert.ok(testFile.exists(),
83-
MSG_SHOULD_EXIST + getMsgPath(testFile.path));
84-
85-
distributionDir = getApplyDirFile(DIR_MACOS + "distribution", true);
86-
Assert.ok(!distributionDir.exists(),
87-
MSG_SHOULD_NOT_EXIST + getMsgPath(distributionDir.path));
88-
89-
checkUpdateLogContains(MOVE_OLD_DIST_DIR);
90-
} else {
91-
debugDump("testing that files aren't added with an add-if instruction " +
92-
"when the file's destination directory doesn't exist");
93-
Assert.ok(!distributionDir.exists(),
94-
MSG_SHOULD_NOT_EXIST + getMsgPath(distributionDir.path));
95-
}
96-
}

toolkit/mozapps/update/tests/unit_base_updater/marSuccessPartial.js

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ function run_test() {
1717
gTestFiles[gTestFiles.length - 2].compareContents = "FromPartial\n";
1818
gTestFiles[gTestFiles.length - 2].comparePerms = 0o644;
1919
gTestDirs = gTestDirsPartialSuccess;
20-
setupDistributionDir();
2120
// The third parameter will test that a relative path that contains a
2221
// directory traversal to the post update binary doesn't execute.
2322
setupUpdaterTest(FILE_PARTIAL_MAR, false, "test/../");
@@ -39,7 +38,6 @@ function runUpdateFinished() {
3938
checkPostUpdateRunningFile(false);
4039
checkFilesAfterUpdateSuccess(getApplyDirFile);
4140
checkUpdateLogContents(LOG_PARTIAL_SUCCESS);
42-
checkDistributionDir();
4341
do_execute_soon(waitForUpdateXMLFiles);
4442
}
4543

@@ -50,30 +48,3 @@ function waitForUpdateXMLFilesFinished() {
5048
checkUpdateManager(STATE_NONE, false, STATE_SUCCEEDED, 0, 1);
5149
checkCallbackLog();
5250
}
53-
54-
/**
55-
* Setup the state of the distribution directory for the test.
56-
*/
57-
function setupDistributionDir() {
58-
if (IS_MACOSX) {
59-
// Create files in the old distribution directory location to verify that
60-
// the directory and its contents are removed when there is a distribution
61-
// directory in the new location.
62-
let testFile = getApplyDirFile(DIR_MACOS + "distribution/testFile", true);
63-
writeFile(testFile, "test\n");
64-
testFile = getApplyDirFile(DIR_MACOS + "distribution/test/testFile", true);
65-
writeFile(testFile, "test\n");
66-
}
67-
}
68-
69-
/**
70-
* Checks the state of the distribution directory.
71-
*/
72-
function checkDistributionDir() {
73-
if (IS_MACOSX) {
74-
let distributionDir = getApplyDirFile(DIR_MACOS + "distribution", true);
75-
Assert.ok(!distributionDir.exists(),
76-
MSG_SHOULD_NOT_EXIST + getMsgPath(distributionDir.path));
77-
checkUpdateLogContains(REMOVE_OLD_DIST_DIR);
78-
}
79-
}

toolkit/mozapps/update/tests/unit_service_updater/marStageSuccessCompleteSvc.js

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ function run_test() {
1616
gTestFiles[gTestFiles.length - 1].compareContents = "FromComplete\n";
1717
gTestFiles[gTestFiles.length - 1].comparePerms = 0o644;
1818
gTestDirs = gTestDirsCompleteSuccess;
19-
setupDistributionDir();
2019
setupSymLinks();
2120
setupUpdaterTest(FILE_COMPLETE_MAR, false);
2221
}
@@ -56,7 +55,6 @@ function checkPostUpdateAppLogFinished() {
5655
checkPostUpdateRunningFile(true);
5756
checkFilesAfterUpdateSuccess(getApplyDirFile, false, true);
5857
checkUpdateLogContents(LOG_REPLACE_SUCCESS, false, true);
59-
checkDistributionDir();
6058
do_execute_soon(waitForUpdateXMLFiles);
6159
}
6260

@@ -68,33 +66,6 @@ function waitForUpdateXMLFilesFinished() {
6866
checkCallbackLog();
6967
}
7068

71-
/**
72-
* Setup the state of the distribution directory for the test.
73-
*/
74-
function setupDistributionDir() {
75-
if (IS_MACOSX) {
76-
// Create files in the old distribution directory location to verify that
77-
// the directory and its contents are removed when there is a distribution
78-
// directory in the new location.
79-
let testFile = getApplyDirFile(DIR_MACOS + "distribution/testFile", true);
80-
writeFile(testFile, "test\n");
81-
testFile = getApplyDirFile(DIR_MACOS + "distribution/test1/testFile", true);
82-
writeFile(testFile, "test\n");
83-
}
84-
}
85-
86-
/**
87-
* Checks the state of the distribution directory for the test.
88-
*/
89-
function checkDistributionDir() {
90-
if (IS_MACOSX) {
91-
let distributionDir = getApplyDirFile(DIR_MACOS + "distribution", true);
92-
Assert.ok(!distributionDir.exists(),
93-
MSG_SHOULD_NOT_EXIST + getMsgPath(distributionDir.path));
94-
checkUpdateLogContains(REMOVE_OLD_DIST_DIR);
95-
}
96-
}
97-
9869
/**
9970
* Setup symlinks for the test.
10071
*/

0 commit comments

Comments
 (0)