From 6670f259805fbef656e12739f4ab82ed1515486f Mon Sep 17 00:00:00 2001 From: Ian Stakenvicius Date: Wed, 15 Aug 2018 13:09:26 -0400 Subject: thunderbird: sync v60 ebuild with tree - fix pref to ensure OS locale is honoured - use patch tarball instead of files in FILESDIR (due to file size) --- mail-client/thunderbird/Manifest | 1 + .../files/tb60-build-gdata-provider.patch | 1473 -------------------- .../files/thunderbird-gentoo-default-prefs.js-2 | 10 + mail-client/thunderbird/thunderbird-60.0-r1.ebuild | 362 +++++ mail-client/thunderbird/thunderbird-60.0.ebuild | 362 ----- 5 files changed, 373 insertions(+), 1835 deletions(-) delete mode 100644 mail-client/thunderbird/files/tb60-build-gdata-provider.patch create mode 100644 mail-client/thunderbird/files/thunderbird-gentoo-default-prefs.js-2 create mode 100644 mail-client/thunderbird/thunderbird-60.0-r1.ebuild delete mode 100644 mail-client/thunderbird/thunderbird-60.0.ebuild diff --git a/mail-client/thunderbird/Manifest b/mail-client/thunderbird/Manifest index 96e86b39..2e1e8448 100644 --- a/mail-client/thunderbird/Manifest +++ b/mail-client/thunderbird/Manifest @@ -97,6 +97,7 @@ DIST thunderbird-60.0-lt.xpi 605439 BLAKE2B 4c4628ba2d25319b01b4c6d2d674d6ba2af0 DIST thunderbird-60.0-nb-NO.xpi 578233 BLAKE2B f6106c0ff2346c65ab3fdc94d2995dec5af7459ec7785ea888d9ec7cc1861bd3e422ba13b4f51c506e880b42bb0ba05d5ef0f95dda12474a20ad7cc37de46cd5 SHA512 58a157b886bbe12ed4eb4d0d3cfbb57af1007bab9dfdad2d3640323e0f730d4267245f1fcb61259a3f34382989ba0b52baba2de287db23a982f91ebcc218e9ea DIST thunderbird-60.0-nl.xpi 583912 BLAKE2B 8bd178f8d3a947eec9034ef578f164b0bd69575d3769a5e28aaa1cb2dff0aa73bfb365c795251f48e46177f9c0b2ffb69df2a59d6b5952d510f8c1623a313bd2 SHA512 c3145fb0f7a83b67ea4c195823b08db5ad4ad1a41c36c53c7ab7339c337d161739c72e98f1aeb6a60641f220b6ad8e20b8fb9141740102a6da7bb7677a7f9df0 DIST thunderbird-60.0-nn-NO.xpi 577653 BLAKE2B ccf638bf16de4f6b625d62db6ba299b7691098ed7fcebef026824b5ec04984793079ab1154bdf0aa8e67353d3ba560cd1a83f1ab3b178056509fb983757ffa8b SHA512 5188a0fa1102bc0fc92970a4986de731deaca358abebb92c1ae153d6a2db2193578c3d6d533b48490e1efe2d51652db5aed2401ad4a2a6186b319251afec78c5 +DIST thunderbird-60.0-patches-0.tar.xz 10292 BLAKE2B a81ac6708389baff21accccac1511c1fc372324cac8bb3ee0f3b5d2a0690b6e22ef658b41c887b99168b43c4ea4bb0947d3e48ad9b7e80db558db22c976df868 SHA512 1dae465676b2ff4faae08ebf69e6bac46552bc0331659bf5f444c45b026e4c8d2fc46cd3758e3bd121716aa85d5dcc56de6483919f7f0077b9d9720574dbd1aa DIST thunderbird-60.0-pl.xpi 480724 BLAKE2B 2cfd0ed35e23f2b5aee177ba0c115865d3c8988e6626210f21fb178701313ade1bf5be15ba4076c503c2f3d3bc2e2303681fbbdfe32483665855bd490a838301 SHA512 66ce0bdfbeca840a39a78b5be56be56684bec409509d543b42b98e775012c1e620e640867163473e5725fb8f16d95c73146120d6089b9a7a68fde22265a4241d DIST thunderbird-60.0-pt-BR.xpi 585017 BLAKE2B a0a830f012ec2b7bd703d611332a72b6e57c58de34fd5ab381a84af21b10237b19ee3e6250dca33b92ba0525e3f19487a3d45d79914f3cb6ac73f5c57c768968 SHA512 ae9d59d1e30858560c134b7a82d2e5550a66ea6f0b131688e55a7b29646e5df74f10d9e2e4e55a241dabfc52c2314385d357b192b4fb7cc86a86969cb1ebf37c DIST thunderbird-60.0-pt-PT.xpi 593185 BLAKE2B cd4bd6a1629af2cec48a4e667f4ae034a5e334848fbdc272b5129d2cd343a1e9a7f38e37a69224e448c19224047cfa41ea0bb7b538a2d4234ad623080ab4e4b1 SHA512 fb155832962516b396ac7574515c9223622601efc0a73e75aff20efb76d1aef6d44918bb24314f6f6e0b45ee826e12920a749f94b805739d7bc7e0310a8bef83 diff --git a/mail-client/thunderbird/files/tb60-build-gdata-provider.patch b/mail-client/thunderbird/files/tb60-build-gdata-provider.patch deleted file mode 100644 index 6323865c..00000000 --- a/mail-client/thunderbird/files/tb60-build-gdata-provider.patch +++ /dev/null @@ -1,1473 +0,0 @@ - -# HG changeset patch -# User Geoff Lankow -# Date 1533166138 -43200 -# Node ID b3975c8d27c10bfad83b9af956fea2bb43045b1a -# Parent 00325311f1a5d6e8d27a4364c1792232f52995bf -Bug 1471326 - Build GData Provider with Thunderbird and re-enable its test test_gdata_provider.js. r=philipp - -diff --git a/calendar/lightning/versions.mk b/calendar/lightning/versions.mk ---- a/calendar/lightning/versions.mk -+++ b/calendar/lightning/versions.mk -@@ -7,18 +7,16 @@ THUNDERBIRD_VERSION := $(shell cat $(com - SEAMONKEY_VERSION := $(shell cat $(commtopsrcdir)/suite/config/version.txt) - - ifdef MOZ_SUITE - LIGHTNING_VERSION := $(shell $(PYTHON) $(commtopsrcdir)/calendar/lightning/build/makeversion.py $(THUNDERBIRD_VERSION)) - else - LIGHTNING_VERSION := $(shell $(PYTHON) $(commtopsrcdir)/calendar/lightning/build/makeversion.py $(word 1,$(MOZ_PKG_VERSION) $(THUNDERBIRD_VERSION))) - endif - --#GDATA_VERSION := $(shell $(PYTHON) $(commtopsrcdir)/calendar/providers/gdata/makeversion.py $(LIGHTNING_VERSION)) -- - # For extensions we require a max version that is compatible across security releases. - # THUNDERBIRD_MAXVERSION and SEAMONKEY_MAXVERSION is our method for doing that. - # Alpha versions 10.0a1 and 10.0a2 aren't affected - # For Seamonkey, 2.17 becomes 2.17.*, 2.17.1 becomes 2.17.* - # For Thunderbird, 10.0 becomes 10.*, 10.0.1 becomes 10.* - THUNDERBIRD_MAXVERSION := $(THUNDERBIRD_VERSION) - ifneq (a,$(findstring a,$(THUNDERBIRD_VERSION))) - THUNDERBIRD_MAXVERSION := $(shell echo $(THUNDERBIRD_VERSION) | sed 's|\(^[0-9]*\)\.\([0-9]*\).*|\1|' ).* -diff --git a/calendar/providers/gdata/Makefile.in b/calendar/providers/gdata/Makefile.in ---- a/calendar/providers/gdata/Makefile.in -+++ b/calendar/providers/gdata/Makefile.in -@@ -1,33 +1,28 @@ - # This Source Code Form is subject to the terms of the Mozilla Public - # License, v. 2.0. If a copy of the MPL was not distributed with this - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - --XPI_PKGNAME = gdata-provider-$(GDATA_VERSION).$(AB_CD).$(MOZ_PKG_PLATFORM) --XPI_VERSION = $(GDATA_VERSION) -+XPI_NAME = gdata-provider -+XPI_PKGNAME = gdata-provider.$(AB_CD) - XPI_EM_ID = {a62ef8ec-5fdc-40c2-873c-223b8a6925cc} - XPI_INSTALL_EXTENSION = $(XPI_EM_ID) - --DEFINES += -DLIGHTNING_VERSION=$(LIGHTNING_VERSION) \ -- -DSEAMONKEY_VERSION=$(SEAMONKEY_VERSION) \ -+ifdef MOZ_SUITE -+LIGHTNING_VERSION := $(shell $(PYTHON) $(commtopsrcdir)/calendar/lightning/build/makeversion.py $(THUNDERBIRD_VERSION)) -+else -+LIGHTNING_VERSION := $(shell $(PYTHON) $(commtopsrcdir)/calendar/lightning/build/makeversion.py $(word 1,$(MOZ_PKG_VERSION) $(THUNDERBIRD_VERSION))) -+endif -+ -+GDATA_VERSION := $(shell $(PYTHON) $(commtopsrcdir)/calendar/providers/gdata/makeversion.py $(LIGHTNING_VERSION)) -+THUNDERBIRD_VERSION := $(shell cat $(commtopsrcdir)/mail/config/version.txt) -+SEAMONKEY_VERSION := $(shell cat $(commtopsrcdir)/suite/config/version.txt) -+ -+DEFINES += -DSEAMONKEY_VERSION=$(SEAMONKEY_VERSION) \ - -DTHUNDERBIRD_VERSION=$(THUNDERBIRD_VERSION) \ -- -DCOMM_BUILD=$(COMM_BUILD) \ - -DGDATA_VERSION=$(GDATA_VERSION) \ - $(NULL) - --ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT)) --# If the macbundle dist dir was already created, sync the gdata provider here to avoid --# the need to make -C objdir/mail/app each time --tools repackage:: -- [ -d $(DIST)/$(MOZ_MACBUNDLE_NAME) ] && rsync -a $(FINAL_TARGET)/ $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/Resources/extensions/$(XPI_EM_ID) || true --endif -- --# stage the extension for use in packaged tests --PKG_STAGE = $(DIST)/test-stage -+include $(commtopsrcdir)/calendar/lightning/lightning-packager.mk - - stage-package: -- $(NSINSTALL) -D $(PKG_STAGE)/extensions/$(XPI_EM_ID) -- (cd $(FINAL_TARGET) && tar $(TAR_CREATE_FLAGS) - *) | (cd $(PKG_STAGE)/extensions/$(XPI_EM_ID) && tar -xf -) -- --include $(moztopsrcdir)/config/rules.mk --include $(commtopsrcdir)/calendar/lightning/versions.mk --include $(commtopsrcdir)/calendar/lightning/lightning-packager.mk -+ $(PYTHON) -u $(MOZILLA_DIR)/build/upload.py $(DIST)/xpi-stage/$(XPI_PKGNAME).xpi -diff --git a/calendar/providers/gdata/install.rdf b/calendar/providers/gdata/manifest.json -rename from calendar/providers/gdata/install.rdf -rename to calendar/providers/gdata/manifest.json ---- a/calendar/providers/gdata/install.rdf -+++ b/calendar/providers/gdata/manifest.json -@@ -1,41 +1,23 @@ -- -+# This Source Code Form is subject to the terms of the Mozilla Public -+# License, v. 2.0. If a copy of the MPL was not distributed with this -+# file, You can obtain one at http://mozilla.org/MPL/2.0/. -+# - #filter substitution -- -- -- -- -- -- {a62ef8ec-5fdc-40c2-873c-223b8a6925cc} -- @GDATA_VERSION@ -- 2 -- -- -- -- -- -- {3550f703-e582-4d05-9a08-453d09bdfdc6} -- 52.0 -- @THUNDERBIRD_VERSION@ -- -- -- -- -- -- {92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a} -- 2.49 -- @SEAMONKEY_VERSION@ -- -- -- -- Provider for Google Calendar -- Allows bidirectional access to Google Calendar -- Philipp Kewisch -- Mark James (http://www.famfamfam.com/lab/icons/silk/) -- https://addons.mozilla.org/thunderbird/addon/4631 -- chrome://gdata-provider/content/gcal.png -- -- -+{ -+ "manifest_version": 2, -+ "name": "Provider for Google Calendar", -+ "description": "Allows bidirectional access to Google Calendar", -+ "version": "@GDATA_VERSION@", -+ "author": "Philipp Kewisch", -+ "homepage_url": "https://addons.mozilla.org/thunderbird/addon/4631", -+ "legacy": true, -+ "applications": { -+ "gecko": { -+ "id": "{a62ef8ec-5fdc-40c2-873c-223b8a6925cc}", -+ "strict_min_version": "@THUNDERBIRD_VERSION@" -+ } -+ }, -+ "icons": { -+ "32": "chrome://gdata-provider/content/gcal.png" -+ } -+} -diff --git a/calendar/providers/gdata/moz.build b/calendar/providers/gdata/moz.build ---- a/calendar/providers/gdata/moz.build -+++ b/calendar/providers/gdata/moz.build -@@ -1,16 +1,17 @@ - # vim: set filetype=python: - # This Source Code Form is subject to the terms of the Mozilla Public - # License, v. 2.0. If a copy of the MPL was not distributed with this - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - - XPI_NAME = 'gdata-provider' -+export('XPI_NAME') - --FINAL_TARGET_PP_FILES += ['install.rdf'] -+FINAL_TARGET_PP_FILES += ['manifest.json'] - - DIRS += [ - 'locales', - ] - - EXTRA_JS_MODULES += [ - 'modules/calUtilsShim.jsm', - 'modules/gdataLogging.jsm', -@@ -23,14 +24,17 @@ EXTRA_JS_MODULES += [ - - EXTRA_COMPONENTS += [ - 'components/calGoogleCalendar.js', - 'components/calGoogleCalendar.manifest', - ] - - JAR_MANIFESTS += ['jar.mn'] - -+USE_EXTENSION_MANIFEST = True -+export('USE_EXTENSION_MANIFEST') -+ - JS_PREFERENCE_FILES += [ - 'defaults/preferences.js', - ] - - with Files('**'): - BUG_COMPONENT = ('Calendar', 'Provider: GData') -diff --git a/calendar/test/unit/test_gdata_provider.js b/calendar/test/unit/test_gdata_provider.js ---- a/calendar/test/unit/test_gdata_provider.js -+++ b/calendar/test/unit/test_gdata_provider.js -@@ -4,22 +4,30 @@ - - (function() { - ChromeUtils.import("resource://gre/modules/Services.jsm"); - Services.prefs.setBoolPref("javascript.options.showInConsole", true); - Services.prefs.setBoolPref("browser.dom.window.dump.enabled", true); - Services.prefs.setBoolPref("calendar.debug.log", true); - Services.prefs.setBoolPref("calendar.debug.log.verbose", true); - -- let bindir = Services.dirsvc.get("CurProcD", Components.interfaces.nsIFile); -- bindir.append("extensions"); -- bindir.append("{a62ef8ec-5fdc-40c2-873c-223b8a6925cc}"); -- bindir.append("chrome.manifest"); -- dump("Loading" + bindir.path + "\n"); -- Components.manager.autoRegister(bindir); -+ let xpiFile; -+ let env = Cc["@mozilla.org/process/environment;1"].getService(Ci.nsIEnvironment); -+ if (env.exists("MOZ_FETCHES_DIR")) { -+ xpiFile = new FileUtils.File(env.get("MOZ_FETCHES_DIR")); -+ xpiFile.append("gdata-provider.en-US.xpi"); -+ } else { -+ xpiFile = Services.dirsvc.get("CurProcD", Components.interfaces.nsIFile); -+ xpiFile.append("extensions"); -+ xpiFile.append("{a62ef8ec-5fdc-40c2-873c-223b8a6925cc}"); -+ } -+ -+ dump("Loading " + xpiFile.path + "\n"); -+ let manager = Cc["@mozilla.org/component-manager-extra;1"].getService(Ci.nsIComponentManagerExtra); -+ manager.addLegacyExtensionManifestLocation(xpiFile); - })(); - - ChromeUtils.import("resource://testing-common/httpd.js"); - ChromeUtils.import("resource://gre/modules/NetUtil.jsm"); - ChromeUtils.import("resource://gre/modules/Preferences.jsm"); - ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); - - ChromeUtils.import("resource://gdata-provider/modules/gdataSession.jsm"); -@@ -502,48 +510,48 @@ function run_test() { - run_next_test(); - do_test_finished(); - } - }); - } - }); - } - --add_task(function* test_migrate_cache() { -+add_task(async function test_migrate_cache() { - let uriString = "googleapi://xpcshell/?calendar=xpcshell%40example.com"; - let uri = Services.io.newURI(uriString); - let client = cal.getCalendarManager().createCalendar("gdata", uri); - let unwrapped = client.wrappedJSObject; - let migrateStorageCache = unwrapped.migrateStorageCache.bind(unwrapped); - - monkeyPatch(unwrapped, "resetSync", (protofunc) => { - return Promise.resolve(); - }); - - // No version, should not reset -- equal(yield migrateStorageCache(), false); -+ equal(await migrateStorageCache(), false); - equal(client.getProperty("cache.version"), 3); - - // Check migrate 1 -> 2 - unwrapped.CACHE_DB_VERSION = 2; - client.setProperty("cache.version", 1); -- equal(yield migrateStorageCache(), true); -+ equal(await migrateStorageCache(), true); - equal(client.getProperty("cache.version"), 2); - - // Check migrate 2 -> 3 normal calendar - unwrapped.CACHE_DB_VERSION = 3; - client.setProperty("cache.version", 2); -- equal(yield migrateStorageCache(), false); -+ equal(await migrateStorageCache(), false); - - // Check migrate 2 -> 3 birthday calendar - unwrapped.CACHE_DB_VERSION = 3; - uri = "googleapi://xpcshell/?calendar=%23contacts%40group.v.calendar.google.com"; - unwrapped.uri = Services.io.newURI(uri); - client.setProperty("cache.version", 2); -- equal(yield migrateStorageCache(), true); -+ equal(await migrateStorageCache(), true); - }); - - add_test(function test_migrate_uri() { - function checkMigrate(fromUri, session, calendarId, tasksId) { - let uri = Services.io.newURI(fromUri); - let client = cal.getCalendarManager().createCalendar("gdata", uri); - - if (session) { -@@ -567,17 +575,17 @@ add_test(function test_migrate_uri() { - "example@example.com", "example@example.com", "@default"); - - checkMigrate("ehmwtf://www.google.com/calendar/feeds/example%40example.com/public/full"); - checkMigrate("googleapi://session/?calendar=calendarId&tasksId=tasksId"); - - run_next_test(); - }); - --add_task(function* test_dateToJSON() { -+add_task(async function test_dateToJSON() { - function _createDateTime(tzid, offset=0) { - let offsetFrom = offset <= 0 ? "-0" + (offset - 1) : "+0" + (offset - 1) + "00"; - let offsetTo = "+0" + offset + "00"; - let ics = ["BEGIN:VCALENDAR", - "BEGIN:VTIMEZONE", - "TZID:ThirdPartyZone", - "BEGIN:STANDARD", - "DTSTART:20071104T020000", -@@ -666,17 +674,17 @@ add_task(function* test_dateToJSON() { - date = _createDateTime("Europe/London"); - deepEqual(dateToJSON(date), { dateTime: "2015-01-30T12:00:00", timeZone: "Europe/London" }); - - // date only - date.isDate = true; - deepEqual(dateToJSON(date), { date: "2015-01-30" }); - }); - --add_task(function* test_JSONToDate() { -+add_task(async function test_JSONToDate() { - function convert(aEntry, aTimezone="Europe/Berlin") { - let tzs = cal.getTimezoneService(); - let calendarTz = tzs.getTimezone(aTimezone); - let date = JSONToDate(aEntry, calendarTz); - return date ? date.icalString + " in " + date.timezone.tzid : null; - } - - // A date, using the passed in default timezone -@@ -710,75 +718,75 @@ add_task(function* test_JSONToDate() { - // An offset matching the passed in calendar timezone. This should NOT be Africa/Algiers - equal(convert({ dateTime: "2015-01-02T03:04:05+01:00" }), "20150102T030405 in Europe/Berlin"); - - // An offset that doesn't match the calendar timezone, will use the first timezone in that offset - info("The following warning is expected: 2015-01-02T03:04:05+04:00 does not match timezone offset for Europe/Berlin"); - equal(convert({ dateTime: "2015-01-02T03:04:05+05:00" }), "20150102T030405 in Antarctica/Mawson"); - }); - --add_task(function* test_organizerCN() { -+add_task(async function test_organizerCN() { - gServer.events = []; -- let client = yield gServer.getClient(); -+ let client = await gServer.getClient(); - equal(client.getProperty("organizerCN"), null); - gServer.resetClient(client); - - gServer.events = [{ - kind: "calendar#event", - etag: "\"2299601498276000\"", - id: "go6ijb0b46hlpbu4eeu92njevo", - created: "2006-06-08T21:04:52.000Z", - updated: "2006-06-08T21:05:49.138Z", - summary: "New Event", - creator: gServer.creator, - organizer: gServer.creator, - start: { dateTime: "2006-06-10T18:00:00+02:00" }, - end: { dateTime: "2006-06-10T20:00:00+02:00" }, - iCalUID: "go6ijb0b46hlpbu4eeu92njevo@google.com" - }]; -- client = yield gServer.getClient(); -+ client = await gServer.getClient(); - equal(client.getProperty("organizerCN"), gServer.creator.displayName); - gServer.resetClient(client); - }); - --add_task(function* test_always_readOnly() { -+add_task(async function test_always_readOnly() { - gServer.events = [{ - kind: "calendar#event", - etag: "\"2299601498276000\"", - id: "go6ijb0b46hlpbu4eeu92njevo", - created: "2006-06-08T21:04:52.000Z", - updated: "2006-06-08T21:05:49.138Z", - summary: "New Event", - creator: gServer.creator, - organizer: gServer.creator, - start: { dateTime: "2006-06-10T18:00:00+02:00" }, - end: { dateTime: "2006-06-10T20:00:00+02:00" }, - iCalUID: "go6ijb0b46hlpbu4eeu92njevo@google.com" - }]; - gServer.calendarListData.accessRole = "freeBusyReader"; -- let client = yield gServer.getClient(); -+ let client = await gServer.getClient(); - let pclient = cal.async.promisifyCalendar(client); - ok(client.readOnly); - client.readOnly = false; - ok(client.readOnly); - -- let items = yield pclient.getAllItems(); -+ let items = await pclient.getAllItems(); - equal(items.length, 1); - notEqual(items[0].title, "New Event"); - gServer.resetClient(client); - - gServer.calendarListData.accessRole = "reader"; -- client = yield gServer.getClient(); -+ client = await gServer.getClient(); - ok(client.readOnly); - client.readOnly = false; - ok(client.readOnly); - gServer.resetClient(client); - }); - --add_task(function* test_reset_sync() { -+add_task(async function test_reset_sync() { - gServer.tasks = [{ - kind: "tasks#task", - id: "MTEyMDE2MDE5NzE0NjYzMDk4ODI6MDo0MDI1NDg2NjU", - etag: "\"Lck7VNWFJuXdzMtOmrYPx0KFV2s/LTIwNjA4MDcyNDM\"", - title: "New Task", - updated: "2014-09-08T16:30:27.000Z", - selfLink: gServer.baseUri + "/tasks/v1/lists/MTEyMDE2MDE5NzE0NjYzMDk4ODI6MDow/tasks/MTEyMDE2MDE5NzE0NjYzMDk4ODI6MDo0MDI1NDg2NjU", - position: "00000000000000130998", -@@ -813,37 +821,37 @@ add_task(function* test_reset_sync() { - updated: "2006-06-08T21:05:49.138Z", - summary: "New Event 2", - creator: gServer.creator, - organizer: gServer.creator, - start: { dateTime: "2006-06-10T18:00:00+02:00" }, - end: { dateTime: "2006-06-10T20:00:00+02:00" }, - iCalUID: "fepf8uf6n7n04w7feukucs9n8e@google.com" - }]; -- let client = yield gServer.getClient(); -+ let client = await gServer.getClient(); - let uncached = client.wrappedJSObject.mUncachedCalendar.wrappedJSObject; - let pclient = cal.async.promisifyCalendar(client); - -- let items = yield pclient.getAllItems(); -+ let items = await pclient.getAllItems(); - equal(items.length, 4); - - notEqual(client.getProperty("syncToken.events"), ""); - notEqual(client.getProperty("lastUpdated.tasks"), ""); - -- yield uncached.resetSync(); -- items = yield pclient.getAllItems(); -+ await uncached.resetSync(); -+ items = await pclient.getAllItems(); - equal(items.length, 0); - - equal(client.getProperty("syncToken.events"), ""); - equal(client.getProperty("lastUpdated.tasks"), ""); - - gServer.resetClient(client); - }); - --add_task(function* test_basicItems() { -+add_task(async function test_basicItems() { - gServer.events = [{ - kind: "calendar#event", - etag: "\"2299601498276000\"", - id: "go6ijb0b46hlpbu4eeu92njevo", - status: "confirmed", - htmlLink: gServer.baseUri + "/calendar/event?eid=eventhash", - created: "2006-06-08T21:04:52.000Z", - updated: "2006-06-08T21:05:49.138Z", -@@ -897,20 +905,20 @@ add_task(function* test_basicItems() { - parent: "MTEyMDE2MDE5NzE0NjYzMDk4ODI6MDo4MDIzOTU2NDc", - links: [{ - link: "mailto:something@example.com", - description: "link description", - type: "email" - }] - }]; - -- let client = yield gServer.getClient(); -+ let client = await gServer.getClient(); - let pclient = cal.async.promisifyCalendar(client); - -- let items = yield pclient.getAllItems(); -+ let items = await pclient.getAllItems(); - equal(items.length, 2); - - let event = cal.item.isEvent(items[0]) ? items[0] : items[1]; - equal(event.id, "go6ijb0b46hlpbu4eeu92njevo@google.com"); - equal(event.getProperty("STATUS"), "CONFIRMED"); - equal(event.getProperty("URL"), gServer.baseUri + "/calendar/event?eid=eventhash"); - equal(event.getProperty("CREATED").icalString, "20060608T210452Z"); - equal(event.getProperty("LAST-MODIFIED").icalString, "20060608T210549Z"); -@@ -959,18 +967,18 @@ add_task(function* test_basicItems() { - equal(attachments.length, 1); - equal(attachments[0].uri.spec, "mailto:something@example.com"); - equal(attachments[0].getParameter("X-GOOGLE-TYPE"), "email"); - equal(attachments[0].getParameter("FILENAME"), "link description"); - - gServer.resetClient(client); - }); - --add_task(function* test_addModifyDeleteItem() { -- let client = yield gServer.getClient(); -+add_task(async function test_addModifyDeleteItem() { -+ let client = await gServer.getClient(); - let pclient = cal.async.promisifyCalendar(client.wrappedJSObject); - equal(gServer.events.length, 0); - equal(gServer.tasks.length, 0); - - let event = cal.createEvent([ - "BEGIN:VEVENT", - "CREATED:20060608T210452Z", - "LAST-MODIFIED:20060608T210549Z", -@@ -1010,118 +1018,118 @@ add_task(function* test_addModifyDeleteI - "DUE;VALUE=DATE:20140904", - "COMPLETED:20140901T170000Z", - "RELATED-TO;RELTYPE=PARENT:MTEyMDE2MDE5NzE0NjYzMDk4ODI6MDo4MDIzOTU2NDc", - "ATTACH;FILENAME=\"link description\";X-GOOGLE-TYPE=email:mailto:something@example.com", - "END:VTODO" - ].join("\r\n")); - - // Add an event -- let addedEvent = yield pclient.adoptItem(event); -+ let addedEvent = await pclient.adoptItem(event); - notEqual(addedEvent.id, null); - equal(addedEvent.organizer.id, "mailto:xpcshell@example.com"); - -- let items = yield pclient.getAllItems(); -+ let items = await pclient.getAllItems(); - equal(items.length, 1); - equal(items[0].id, addedEvent.id); - equal(items[0].organizer.id, "mailto:xpcshell@example.com"); - - equal(gServer.events.length, 1); - equal(gServer.tasks.length, 0); - - // Add a task -- let addedTask = yield pclient.adoptItem(task); -+ let addedTask = await pclient.adoptItem(task); - notEqual(addedTask.id, null); - -- items = yield pclient.getAllItems(); -+ items = await pclient.getAllItems(); - equal(items.length, 2); - equal(items[1].id, addedTask.id); - - equal(gServer.events.length, 1); - equal(gServer.tasks.length, 1); - - // Modify an event - let newEvent = items[0].clone(); - newEvent.title = "changed"; - -- let modifiedEvent = yield pclient.modifyItem(newEvent, items[0]); -+ let modifiedEvent = await pclient.modifyItem(newEvent, items[0]); - equal(modifiedEvent.title, "changed"); - notEqual(modifiedEvent.getProperty("LAST-MODIFIED"), addedEvent.getProperty("LAST-MODIFIED")); -- items = yield pclient.getAllItems(); -+ items = await pclient.getAllItems(); - equal(items.length, 2); - equal(items[0].title, "changed"); - equal(items[0].id, addedEvent.id); - equal(items[0].getProperty("LAST-MODIFIED"), modifiedEvent.getProperty("LAST-MODIFIED")); - equal(gServer.events.length, 1); - equal(gServer.tasks.length, 1); - - // Modify a task - let newTask = items[1].clone(); - newTask.title = "changed"; - -- let modifiedTask = yield pclient.modifyItem(newTask, items[1]); -+ let modifiedTask = await pclient.modifyItem(newTask, items[1]); - equal(modifiedTask.title, "changed"); - notEqual(modifiedTask.getProperty("LAST-MODIFIED"), addedTask.getProperty("LAST-MODIFIED")); -- items = yield pclient.getAllItems(); -+ items = await pclient.getAllItems(); - equal(items.length, 2); - equal(items[1].title, "changed"); - equal(items[1].id, addedTask.id); - equal(items[1].getProperty("LAST-MODIFIED"), modifiedTask.getProperty("LAST-MODIFIED")); - equal(gServer.events.length, 1); - equal(gServer.tasks.length, 1); - - // Delete an event -- yield pclient.deleteItem(modifiedEvent); -- items = yield pclient.getAllItems(); -+ await pclient.deleteItem(modifiedEvent); -+ items = await pclient.getAllItems(); - equal(items.length, 1); - equal(gServer.events.length, 0); - equal(gServer.tasks.length, 1); - - // Delete a task -- yield pclient.deleteItem(modifiedTask); -- items = yield pclient.getAllItems(); -+ await pclient.deleteItem(modifiedTask); -+ items = await pclient.getAllItems(); - equal(items.length, 0); - equal(gServer.events.length, 0); - equal(gServer.tasks.length, 0); - - gServer.resetClient(client); - }); - --add_task(function* test_recurring_event() { -- let client = yield gServer.getClient(); -+add_task(async function test_recurring_event() { -+ let client = await gServer.getClient(); - let pclient = cal.async.promisifyCalendar(client.wrappedJSObject); - - let event = cal.createEvent([ - "BEGIN:VEVENT", - "SUMMARY:Recurring Event", - "DTSTART:20060610T180000Z", - "DTEND:20060610T200000Z", - "RRULE:FREQ=WEEKLY", - "END:VEVENT" - ].join("\r\n")); - -- event = yield pclient.addItem(event); -+ event = await pclient.addItem(event); - equal(gServer.events.length, 1); - equal(gServer.events[0].recurrence.length, 1); - equal(gServer.events[0].recurrence[0], "RRULE:FREQ=WEEKLY"); - - let occ = event.recurrenceInfo.getNextOccurrence(event.startDate); - let changedOcc = occ.clone(); - changedOcc.title = "changed"; - event.recurrenceInfo.modifyException(occ, true); - -- event = yield pclient.modifyItem(changedOcc, occ); -+ event = await pclient.modifyItem(changedOcc, occ); - occ = event.recurrenceInfo.getNextOccurrence(event.startDate); - equal(occ.title, "changed"); - equal(gServer.events.length, 2); - - gServer.resetClient(client); - }); - --add_task(function* test_recurring_exception() { -+add_task(async function test_recurring_exception() { - gServer.syncs = [{ - token: "1", - events: [{ - kind: "calendar#event", - etag: "\"1\"", - id: "go6ijb0b46hlpbu4eeu92njevo", - created: "2006-06-08T21:04:52.000Z", - updated: "2006-06-08T21:05:49.138Z", -@@ -1156,41 +1164,41 @@ add_task(function* test_recurring_except - start: { dateTime: "2006-06-17T18:00:00+02:00" }, - end: { dateTime: "2006-06-17T20:00:00+02:00" }, - status: "cancelled", - recurringEventId: "go6ijb0b46hlpbu4eeu92njevo", - originalStartTime: { dateTime: "2006-06-17T18:00:00+02:00" } - }] - }]; - -- let client = yield gServer.getClient(); -+ let client = await gServer.getClient(); - let pclient = cal.async.promisifyCalendar(client.wrappedJSObject); - -- let items = yield pclient.getAllItems(); -+ let items = await pclient.getAllItems(); - equal(items.length, 1); - - let exIds = items[0].recurrenceInfo.getExceptionIds({}); - equal(exIds.length, 1); - - let ex = items[0].recurrenceInfo.getExceptionFor(exIds[0]); - equal(ex.title, "New Event changed"); - - client.refresh(); -- yield gServer.waitForLoad(client); -+ await gServer.waitForLoad(client); - -- items = yield pclient.getAllItems(); -+ items = await pclient.getAllItems(); - equal(items.length, 1); - - exIds = items[0].recurrenceInfo.getExceptionIds({}); - equal(exIds.length, 0); - - gServer.resetClient(client); - }); - --add_task(function* test_recurring_cancelled_exception() { -+add_task(async function test_recurring_cancelled_exception() { - gServer.syncs = [{ - token: "1", - events: [{ - kind: "calendar#event", - etag: "\"1\"", - id: "go6ijb0b46hlpbu4eeu92njevo", - status: "cancelled", - }, { -@@ -1198,28 +1206,28 @@ add_task(function* test_recurring_cancel - etag: "\"2\"", - id: "go6ijb0b46hlpbu4eeu92njevo_20060617T160000Z", - status: "cancelled", - recurringEventId: "go6ijb0b46hlpbu4eeu92njevo", - originalStartTime: { dateTime: "2006-06-17T18:00:00+02:00" } - }] - }]; - -- let client = yield gServer.getClient(); -+ let client = await gServer.getClient(); - let pclient = cal.async.promisifyCalendar(client.wrappedJSObject); - -- let items = yield pclient.getAllItems(); -+ let items = await pclient.getAllItems(); - equal(items.length, 0); - - gServer.resetClient(client); - }); - --add_task(function* test_import_invitation() { -+add_task(async function test_import_invitation() { - Preferences.set("calendar.google.enableAttendees", true); -- let client = yield gServer.getClient(); -+ let client = await gServer.getClient(); - let pclient = cal.async.promisifyCalendar(client.wrappedJSObject); - let event = cal.createEvent([ - "BEGIN:VEVENT", - "UID:xpcshell-import", - "CREATED:20060608T210452Z", - "LAST-MODIFIED:20060608T210549Z", - "DTSTAMP:20060608T210549Z", - "SUMMARY:New Event", -@@ -1230,24 +1238,24 @@ add_task(function* test_import_invitatio - "ATTENDEE;CN=Eggs P. Seashell;PARTSTAT=TENTATIVE;CUTYPE=INDIVIDUAL;", - " ROLE=REQ-PARTICIPANT:mailto:xpcshell@example.com", - "DTSTART:20060610T180000Z", - "DTEND:20060610T200000Z", - "SEQUENCE:1", - "END:VEVENT" - ].join("\r\n")); - -- let addedItem = yield pclient.adoptItem(event); -+ let addedItem = await pclient.adoptItem(event); - equal(gServer.events.length, 1); - equal(addedItem.icalString, event.icalString); - gServer.resetClient(client); - Preferences.set("calendar.google.enableAttendees", false); - }); - --add_task(function* test_modify_invitation() { -+add_task(async function test_modify_invitation() { - Preferences.set("calendar.google.enableAttendees", true); - let organizer = { - displayName: "organizer name", - email: "organizer@example.com", - organizer: true, - responseStatus: "tentative" - }; - let attendee = Object.assign({}, gServer.creator); -@@ -1272,36 +1280,36 @@ add_task(function* test_modify_invitatio - transparency: "transparent", - visibility: "private", - iCalUID: "go6ijb0b46hlpbu4eeu92njevo@google.com", - sequence: 1, - attendees: [organizer, attendee], - }]; - - // Case #1: User is attendee -- let client = yield gServer.getClient(); -+ let client = await gServer.getClient(); - let pclient = cal.async.promisifyCalendar(client.wrappedJSObject); - -- let items = yield pclient.getAllItems(); -+ let items = await pclient.getAllItems(); - equal(items.length, 1); - - let item = items[0]; - let att = cal.itip.getInvitedAttendee(item); - let newItem = item.clone(); - - notEqual(att, null); - equal(att.id, "mailto:" + attendee.email); - equal(att.participationStatus, "NEEDS-ACTION"); - - newItem.removeAttendee(att); - att = att.clone(); - att.participationStatus = "ACCEPTED"; - newItem.addAttendee(att); - -- yield pclient.modifyItem(newItem, items[0]); -+ await pclient.modifyItem(newItem, items[0]); - equal(gServer.lastMethod, "PATCH"); - - // Case #2: User is organizer - let events = gServer.events; - gServer.resetClient(client); - gServer.events = events; - - organizer = Object.assign({}, gServer.creator); -@@ -1312,42 +1320,42 @@ add_task(function* test_modify_invitatio - email: "attendee@example.com", - responseStatus: "tentative" - }; - - gServer.events[0].organizer = gServer.creator; - gServer.events[0].creator = gServer.creator; - gServer.events[0].attendees = [organizer, attendee]; - -- client = yield gServer.getClient(); -+ client = await gServer.getClient(); - pclient = cal.async.promisifyCalendar(client.wrappedJSObject); - -- items = yield pclient.getAllItems(); -+ items = await pclient.getAllItems(); - equal(items.length, 1); - - item = items[0]; - let org = item.getAttendeeById("mailto:" + organizer.email); - newItem = item.clone(); - - notEqual(org, null); - equal(org.id, "mailto:" + organizer.email); - equal(org.participationStatus, "ACCEPTED"); - - newItem.removeAttendee(org); - org = org.clone(); - org.participationStatus = "TENTATIVE"; - newItem.addAttendee(org); - -- modifiedItem = yield pclient.modifyItem(newItem, items[0]); -+ modifiedItem = await pclient.modifyItem(newItem, items[0]); - equal(gServer.lastMethod, "PUT"); - - gServer.resetClient(client); - }); - --add_task(function* test_metadata() { -+add_task(async function test_metadata() { - gServer.events = [{ - kind: "calendar#event", - etag: "\"1\"", - id: "go6ijb0b46hlpbu4eeu92njevo", - created: "2006-06-08T21:04:52.000Z", - updated: "2006-06-08T21:05:49.138Z", - summary: "New Event", - creator: gServer.creator, -@@ -1361,91 +1369,91 @@ add_task(function* test_metadata() { - id: "MTEyMDE2MDE5NzE0NjYzMDk4ODI6MDo0MDI1NDg2NjU", - etag: "\"2\"", - title: "New Task", - updated: "2014-09-08T16:30:27.000Z", - selfLink: gServer.baseUri + "/tasks/v1/lists/MTEyMDE2MDE5NzE0NjYzMDk4ODI6MDow/tasks/MTEyMDE2MDE5NzE0NjYzMDk4ODI6MDo0MDI1NDg2NjU", - notes: "description" - }]; - -- let client = yield gServer.getClient(); -+ let client = await gServer.getClient(); - let offline = client.wrappedJSObject.mCachedCalendar; - let pclient = cal.async.promisifyCalendar(client.wrappedJSObject); - - // Check initial metadata -- let items = yield pclient.getAllItems(); -+ let items = await pclient.getAllItems(); - let meta = getAllMeta(offline); - let [event, task] = items; - ok(cal.item.isEvent(event)); - ok(cal.item.isToDo(task)); - equal(meta.size, 2); - equal(meta.get(event.hashId), ['"1"', "go6ijb0b46hlpbu4eeu92njevo", false].join("\u001A")); - equal(meta.get(task.hashId), ['"2"', "MTEyMDE2MDE5NzE0NjYzMDk4ODI6MDo0MDI1NDg2NjU", false].join("\u001A")); - - // Modify an event - gServer.nextEtag = '"3"'; - let newEvent = event.clone(); - newEvent.title = "changed"; -- yield pclient.modifyItem(newEvent, event); -+ await pclient.modifyItem(newEvent, event); - -- items = yield pclient.getAllItems(); -+ items = await pclient.getAllItems(); - meta = getAllMeta(offline); - [event, task] = items; - ok(cal.item.isEvent(event)); - ok(cal.item.isToDo(task)); - equal(meta.size, 2); - equal(meta.get(event.hashId), ['"3"', "go6ijb0b46hlpbu4eeu92njevo", false].join("\u001A")); - equal(meta.get(task.hashId), ['"2"', "MTEyMDE2MDE5NzE0NjYzMDk4ODI6MDo0MDI1NDg2NjU", false].join("\u001A")); - - // Modify a task - gServer.nextEtag = '"4"'; - let newTask = task.clone(); - newTask.title = "changed"; -- yield pclient.modifyItem(newTask, task); -+ await pclient.modifyItem(newTask, task); - -- items = yield pclient.getAllItems(); -+ items = await pclient.getAllItems(); - meta = getAllMeta(offline); - [event, task] = items; - equal(meta.size, 2); - equal(meta.get(event.hashId), ['"3"', "go6ijb0b46hlpbu4eeu92njevo", false].join("\u001A")); - equal(meta.get(task.hashId), ['"4"', "MTEyMDE2MDE5NzE0NjYzMDk4ODI6MDo0MDI1NDg2NjU", false].join("\u001A")); - - // Delete an event -- yield pclient.deleteItem(event); -+ await pclient.deleteItem(event); - meta = getAllMeta(offline); - equal(meta.size, 1); - equal(meta.get(task.hashId), ['"4"', "MTEyMDE2MDE5NzE0NjYzMDk4ODI6MDo0MDI1NDg2NjU", false].join("\u001A")); - - // Delete a task -- yield pclient.deleteItem(task); -+ await pclient.deleteItem(task); - meta = getAllMeta(offline); - equal(meta.size, 0); - - // Add an event - gServer.nextEtag = '"6"'; -- newEvent = yield pclient.addItem(event); -+ newEvent = await pclient.addItem(event); - meta = getAllMeta(offline); - equal(meta.size, 1); - equal(gServer.events.length, 1); - equal(meta.get(newEvent.hashId), ['"6"', gServer.events[0].id, false].join("\u001A")); - - // Add a task - gServer.nextEtag = '"7"'; -- newTask = yield pclient.addItem(task); -+ newTask = await pclient.addItem(task); - meta = getAllMeta(offline); - equal(meta.size, 2); - equal(gServer.events.length, 1); - equal(gServer.tasks.length, 1); - equal(meta.get(newEvent.hashId), ['"6"', gServer.events[0].id, false].join("\u001A")); - equal(meta.get(newTask.hashId), ['"7"', gServer.tasks[0].id, false].join("\u001A")); - - gServer.resetClient(client); - }); - --add_task(function* test_metadata_recurring() { -+add_task(async function test_metadata_recurring() { - gServer.events = [{ - kind: "calendar#event", - etag: "\"1\"", - id: "go6ijb0b46hlpbu4eeu92njevo", - created: "2006-06-08T21:04:52.000Z", - updated: "2006-06-08T21:05:49.138Z", - summary: "New Event", - creator: gServer.creator, -@@ -1471,145 +1479,145 @@ add_task(function* test_metadata_recurri - id: "go6ijb0b46hlpbu4eeu92njevo_20060617T160000Z", - summary: "New Event next week", - start: { dateTime: "2006-06-17T18:00:00+02:00" }, - end: { dateTime: "2006-06-17T20:00:00+02:00" }, - recurringEventId: "go6ijb0b46hlpbu4eeu92njevo", - originalStartTime: { dateTime: "2006-06-17T18:00:00+02:00" } - }]; - -- let client = yield gServer.getClient(); -+ let client = await gServer.getClient(); - let offline = client.wrappedJSObject.mCachedCalendar; - let pclient = cal.async.promisifyCalendar(client.wrappedJSObject); -- let items = yield pclient.getAllItems(); -+ let items = await pclient.getAllItems(); - - let meta = getAllMeta(offline); - equal(meta.size, 3); - equal(meta.get(items[0].hashId), ['"1"', "go6ijb0b46hlpbu4eeu92njevo", false].join("\u001A")); - - // The exception metadata should also exist - let exIds = items[0].recurrenceInfo.getExceptionIds({}); - equal(exIds.length, 2); - let ex = items[0].recurrenceInfo.getExceptionFor(exIds[0]); - equal(meta.get(ex.hashId), ['"2"', "go6ijb0b46hlpbu4eeu92njevo_20060610T160000Z", false].join("\u001A")); - - // Changing an exception should retain the metadata entries - let newEx = ex.clone(); - newEx.title = "New Event changed again"; - gServer.nextEtag = '"4"'; -- yield pclient.modifyItem(newEx, ex); -+ await pclient.modifyItem(newEx, ex); - meta = getAllMeta(offline); - equal(meta.size, 3); - equal(meta.get(newEx.hashId), ['"4"', "go6ijb0b46hlpbu4eeu92njevo_20060610T160000Z", false].join("\u001A")); - - // Deleting an exception should delete the metadata, as it turns into an EXDATE - let newItem = items[0].clone(); - newItem.recurrenceInfo.removeOccurrenceAt(exIds[0]); -- yield pclient.modifyItem(newItem, items[0]); -+ await pclient.modifyItem(newItem, items[0]); - - meta = getAllMeta(offline); - equal(meta.size, 2); - - // Deleting the master item should remove all metadata entries -- yield pclient.deleteItem(items[0]); -+ await pclient.deleteItem(items[0]); - meta = getAllMeta(offline); - equal(meta.size, 0); - - gServer.resetClient(client); - }); - --add_task(function* test_conflict_modify() { -+add_task(async function test_conflict_modify() { - // TODO task/event conflicts are handled in the same way so I'm going to - // skip adding tests for tasks here, but it probably wouldn't hurt to - // create them at some point. - gServer.events = [{ - kind: "calendar#event", - etag: "\"1\"", - id: "go6ijb0b46hlpbu4eeu92njevo", - created: "2006-06-08T21:04:52.000Z", - updated: "2006-06-08T21:05:49.138Z", - summary: "New Event", - creator: gServer.creator, - organizer: gServer.creator, - start: { dateTime: "2006-06-10T18:00:00+02:00" }, - end: { dateTime: "2006-06-10T20:00:00+02:00" }, - iCalUID: "go6ijb0b46hlpbu4eeu92njevo@google.com" - }]; -- let client = yield gServer.getClient(); -+ let client = await gServer.getClient(); - let pclient = cal.async.promisifyCalendar(client.wrappedJSObject); -- let item = (yield pclient.getAllItems())[0]; -+ let item = (await pclient.getAllItems())[0]; - - // Case #1: Modified on server, modify locally, overwrite conflict - MockConflictPrompt.overwrite = true; - let newItem = item.clone(); - newItem.title = "local change"; - gServer.events[0].etag = '"2"'; - gServer.events[0].summary = "remote change"; -- let modifiedItem = yield pclient.modifyItem(newItem, item); -- item = (yield pclient.getAllItems())[0]; -+ let modifiedItem = await pclient.modifyItem(newItem, item); -+ item = (await pclient.getAllItems())[0]; - equal(gServer.events[0].summary, "local change"); - notEqual(gServer.events[0].etag, '"2"'); - equal(item.title, "local change"); - equal(modifiedItem.title, "local change"); - equal(gServer.events.length, 1); - - // Case #2: Modified on server, modify locally, don't overwrite conflict - MockConflictPrompt.overwrite = false; - gServer.events[0].etag = '"3"'; - gServer.events[0].summary = "remote change"; - try { -- modifiedItem = yield pclient.modifyItem(newItem, item); -+ modifiedItem = await pclient.modifyItem(newItem, item); - do_throw("Expected modifyItem to be cancelled"); - } catch (e) { - // Swallow cancelling the request - if (e != Components.interfaces.calIErrors.OPERATION_CANCELLED) { - throw e; - } - } - -- yield gServer.waitForLoad(client); -+ await gServer.waitForLoad(client); - -- item = (yield pclient.getAllItems())[0]; -+ item = (await pclient.getAllItems())[0]; - equal(gServer.events[0].summary, "remote change"); - equal(gServer.events[0].etag, '"3"'); - equal(item.title, "remote change"); - - // Case #3: Modified on server, delete locally, don't overwrite conflict - MockConflictPrompt.overwrite = false; - gServer.events[0].etag = '"4"'; - gServer.events[0].summary = "remote change"; - try { -- yield pclient.deleteItem(item); -+ await pclient.deleteItem(item); - do_throw("Expected deleteItem to be cancelled"); - } catch (e) { - // Swallow cancelling the request - if (e != Components.interfaces.calIErrors.OPERATION_CANCELLED) { - throw e; - } - } - -- yield gServer.waitForLoad(client); -+ await gServer.waitForLoad(client); - -- item = (yield pclient.getAllItems())[0]; -+ item = (await pclient.getAllItems())[0]; - equal(gServer.events[0].summary, "remote change"); - equal(gServer.events[0].etag, '"4"'); - equal(item.title, "remote change"); - - // Case #4: Modified on server, delete locally, overwrite conflict - MockConflictPrompt.overwrite = true; - gServer.events[0].etag = '"5"'; - gServer.events[0].summary = "remote change"; -- yield pclient.deleteItem(item); -- item = (yield pclient.getAllItems())[0]; -+ await pclient.deleteItem(item); -+ item = (await pclient.getAllItems())[0]; - equal(gServer.events.length, 0); - - gServer.resetClient(client); - }); - --add_task(function* test_conflict_delete() { -+add_task(async function test_conflict_delete() { - // TODO task/event conflicts are handled in the same way so I'm going to - // skip adding tests for tasks here, but it probably wouldn't hurt to - // create them at some point. - let coreEvent = { - kind: "calendar#event", - etag: "\"2\"", - id: "go6ijb0b46hlpbu4eeu92njevo", - created: "2006-06-08T21:04:52.000Z", -@@ -1619,100 +1627,100 @@ add_task(function* test_conflict_delete( - organizer: gServer.creator, - start: { dateTime: "2006-06-10T18:00:00+02:00" }, - end: { dateTime: "2006-06-10T20:00:00+02:00" }, - iCalUID: "go6ijb0b46hlpbu4eeu92njevo@google.com" - }; - - // Load intial event to server - gServer.events = [coreEvent]; -- let client = yield gServer.getClient(); -+ let client = await gServer.getClient(); - let pclient = cal.async.promisifyCalendar(client.wrappedJSObject); -- let item = (yield pclient.getAllItems())[0]; -+ let item = (await pclient.getAllItems())[0]; - - // Case #1: Deleted on server, modify locally, overwrite conflict - MockConflictPrompt.overwrite = true; - gServer.events = []; - let newItem = item.clone(); - newItem.title = "local change"; -- let modifiedItem = yield pclient.modifyItem(newItem, item); -- item = (yield pclient.getAllItems())[0]; -+ let modifiedItem = await pclient.modifyItem(newItem, item); -+ item = (await pclient.getAllItems())[0]; - equal(gServer.events[0].summary, "local change"); - notEqual(gServer.events[0].etag, '"2"'); - equal(item.title, "local change"); - equal(modifiedItem.title, "local change"); - equal(gServer.events.length, 1); - - // Case #2: Deleted on server, modify locally, don't overwrite conflict - MockConflictPrompt.overwrite = false; - gServer.events = []; - try { -- modifiedItem = yield pclient.modifyItem(newItem, item); -+ modifiedItem = await pclient.modifyItem(newItem, item); - do_throw("Expected modifyItem to be cancelled"); - } catch (e) { - // Swallow cancelling the request - if (e != Components.interfaces.calIErrors.OPERATION_CANCELLED) { - throw e; - } - } - // The next synchronize should cause the event to be deleted locally. - coreEvent.status = "cancelled"; - gServer.events = [coreEvent]; - -- yield gServer.waitForLoad(client); -+ await gServer.waitForLoad(client); - -- let items = yield pclient.getAllItems(); -+ let items = await pclient.getAllItems(); - equal(items.length, 0); - equal(gServer.events.length, 1); - - // Put the event back in the calendar for the next run - delete gServer.events[0].status; - client.refresh(); -- yield gServer.waitForLoad(client); -- items = yield pclient.getAllItems(); -+ await gServer.waitForLoad(client); -+ items = await pclient.getAllItems(); - equal(items.length, 1); - - // Case #3: Deleted on server, delete locally, don't overwrite conflict - MockConflictPrompt.overwrite = false; - gServer.events = []; - try { -- yield pclient.deleteItem(item); -+ await pclient.deleteItem(item); - do_throw("Expected deleteItem to be cancelled"); - } catch (e) { - // Swallow cancelling the request - if (e != Components.interfaces.calIErrors.OPERATION_CANCELLED) { - throw e; - } - } - // The next synchronize should cause the event to be deleted locally. - coreEvent.status = "cancelled"; - gServer.events = [coreEvent]; -- yield gServer.waitForLoad(client); -+ await gServer.waitForLoad(client); - -- items = yield pclient.getAllItems(); -+ items = await pclient.getAllItems(); - equal(items.length, 0); - - // Put the event back in the calendar for the next run - delete gServer.events[0].status; - client.refresh(); -- yield gServer.waitForLoad(client); -- items = yield pclient.getAllItems(); -+ await gServer.waitForLoad(client); -+ items = await pclient.getAllItems(); - equal(items.length, 1); - - // Case #4: Deleted on server, delete locally, overwrite conflict - MockConflictPrompt.overwrite = true; - gServer.events = []; -- yield pclient.deleteItem(item); -- items = yield pclient.getAllItems(); -+ await pclient.deleteItem(item); -+ items = await pclient.getAllItems(); - equal(items.length, 0); - - gServer.resetClient(client); - }); - --add_task(function* test_default_alarms() { -+add_task(async function test_default_alarms() { - let defaultReminders = [ - { method: "popup", minutes: 10 }, - { method: "email", minutes: 20 }, - ]; - gServer.calendarListData.defaultReminders = defaultReminders; - gServer.eventsData.defaultReminders = defaultReminders; - gServer.events = [{ - kind: "calendar#event", -@@ -1725,21 +1733,21 @@ add_task(function* test_default_alarms() - organizer: gServer.creator, - start: { dateTime: "2006-06-10T18:00:00+02:00" }, - end: { dateTime: "2006-06-10T20:00:00+02:00" }, - iCalUID: "go6ijb0b46hlpbu4eeu92njevo@google.com", - reminders: { useDefault: true } - }]; - - // Case #1: read default alarms from event stream -- let client = yield gServer.getClient(); -+ let client = await gServer.getClient(); - let pclient = cal.async.promisifyCalendar(client.wrappedJSObject); - equal(client.getProperty("settings.defaultReminders"), JSON.stringify(defaultReminders)); - -- let item = (yield pclient.getAllItems())[0]; -+ let item = (await pclient.getAllItems())[0]; - let alarms = item.getAlarms({}); - - equal(alarms.length, 2); - ok(alarms.every(x => x.getProperty("X-DEFAULT-ALARM") == "TRUE")); - equal(alarms[0].action, "DISPLAY"); - equal(alarms[0].offset.icalString, "-PT10M"); - equal(alarms[1].action, "EMAIL"); - equal(alarms[1].offset.icalString, "-PT20M"); -@@ -1754,17 +1762,17 @@ add_task(function* test_default_alarms() - "X-DEFAULT-ALARM:TRUE", - "ACTION:DISPLAY", - "TRIGGER;VALUE=DURATION:PT0S", - "DESCRIPTION:Description", - "END:VALARM", - "END:VEVENT" - ].join("\r\n")); - -- yield pclient.addItem(event); -+ await pclient.addItem(event); - ok(gServer.events[1].reminders.useDefault); - equal(gServer.events[1].reminders.overrides.length, 0); - - // Case #3: Mixed default/non-default alarms. Not sure this will happen - event = cal.createEvent([ - "BEGIN:VEVENT", - "SUMMARY:Default Alarms", - "DTSTART:20060610T180000Z", -@@ -1778,57 +1786,57 @@ add_task(function* test_default_alarms() - "BEGIN:VALARM", - "ACTION:DISPLAY", - "TRIGGER;VALUE=DURATION:-PT5M", - "DESCRIPTION:Description", - "END:VALARM", - "END:VEVENT" - ].join("\r\n")); - -- yield pclient.addItem(event); -+ await pclient.addItem(event); - ok(gServer.events[2].reminders.useDefault); - equal(gServer.events[2].reminders.overrides.length, 1); - equal(gServer.events[2].reminders.overrides[0].minutes, 5); - - gServer.resetClient(client); - - // Case #4a: Empty default alarms - gServer.calendarListData.defaultReminders = []; - gServer.eventsData.defaultReminders = []; -- client = yield gServer.getClient(); -+ client = await gServer.getClient(); - pclient = cal.async.promisifyCalendar(client.wrappedJSObject); - - event = cal.createEvent([ - "BEGIN:VEVENT", - "SUMMARY:Default Alarms Empty", - "DTSTART:20060610T180000Z", - "DTEND:20060610T200000Z", - "X-DEFAULT-ALARM:TRUE", - "END:VEVENT" - ].join("\r\n")); - -- yield pclient.addItem(event); -+ await pclient.addItem(event); - ok(gServer.events[0].reminders.useDefault); - equal(gServer.events[0].reminders.overrides, undefined); - - let events = gServer.events; - gServer.resetClient(client); - - // Case #4b: Read an item with empty default alarms - gServer.events = events; -- client = yield gServer.getClient(); -+ client = await gServer.getClient(); - pclient = cal.async.promisifyCalendar(client.wrappedJSObject); - -- item = (yield pclient.getAllItems())[0]; -+ item = (await pclient.getAllItems())[0]; - equal(item.getProperty("X-DEFAULT-ALARM"), "TRUE"); - - gServer.resetClient(client); - }); - --add_task(function* test_paginate() { -+add_task(async function test_paginate() { - gServer.events = [{ - kind: "calendar#event", - etag: "\"1\"", - id: "go6ijb0b46hlpbu4eeu92njevo", - created: "2006-06-08T21:04:52.000Z", - updated: "2006-06-08T21:05:49.138Z", - summary: "New Event", - creator: gServer.creator, -@@ -1867,35 +1875,35 @@ add_task(function* test_paginate() { - updated: "2014-09-08T16:30:27.000Z", - selfLink: gServer.baseUri + "/tasks/v1/lists/MTEyMDE2MDE5NzE0NjYzMDk4ODI6MDow/tasks/MTEyMDE2MDE5NzE0NjYzMDk4ODI6MDo5OTU0Mjk2MzQ", - position: "00000000000000130993", - status: "needsAction" - }]; - - Preferences.set("calendar.google.maxResultsPerRequest", 1); - -- let client = yield gServer.getClient(); -+ let client = await gServer.getClient(); - let pclient = cal.async.promisifyCalendar(client); - - // Make sure all pages were requested - equal(gServer.eventsData.nextPageToken, null); - equal(gServer.tasksData.nextPageToken, null); - - // ...and we have all items. Not checking props - // because the other tests do this sufficiently. -- let items = yield pclient.getAllItems(); -+ let items = await pclient.getAllItems(); - equal(items.length, 4); - - equal(client.getProperty("syncToken.events"), "next-sync-token"); - - Preferences.reset("calendar.google.maxResultsPerRequest"); - gServer.resetClient(client); - }); - --add_task(function* test_incremental_reset() { -+add_task(async function test_incremental_reset() { - gServer.syncs = [{ - token: "1", - events: [{ - kind: "calendar#event", - etag: "\"1\"", - id: "go6ijb0b46hlpbu4eeu92njevo", - created: "2006-06-08T21:04:52.000Z", - updated: "2006-06-08T21:05:49.138Z", -@@ -1920,27 +1928,27 @@ add_task(function* test_incremental_rese - summary: "New Event 2", - creator: gServer.creator, - organizer: gServer.creator, - start: { dateTime: "2006-06-10T18:00:00+02:00" }, - end: { dateTime: "2006-06-10T20:00:00+02:00" }, - iCalUID: "fepf8uf6n7n04w7feukucs9n8e@google.com" - }] - }]; -- let client = yield gServer.getClient(); -+ let client = await gServer.getClient(); - let pclient = cal.async.promisifyCalendar(client); - -- let items = yield pclient.getAllItems(); -+ let items = await pclient.getAllItems(); - equal(items.length, 1); - equal(items[0].title, "New Event"); - - client.refresh(); -- yield gServer.waitForLoad(client); -+ await gServer.waitForLoad(client); - -- items = yield pclient.getAllItems(); -+ items = await pclient.getAllItems(); - equal(items.length, 1); - equal(items[0].title, "New Event 2"); - - equal(gServer.syncs.length, 0); - equal(client.getProperty("syncToken.events"), "last"); - - gServer.resetClient(client); - }); -diff --git a/calendar/test/unit/xpcshell-shared.ini b/calendar/test/unit/xpcshell-shared.ini ---- a/calendar/test/unit/xpcshell-shared.ini -+++ b/calendar/test/unit/xpcshell-shared.ini -@@ -24,18 +24,18 @@ - [test_datetime_before_1970.js] - [test_datetimeformatter.js] - [test_deleted_items.js] - [test_duration.js] - [test_extract.js] - [test_email_utils.js] - [test_freebusy.js] - [test_freebusy_service.js] --#[test_gdata_provider.js] --#requesttimeoutfactor = 2 -+[test_gdata_provider.js] -+requesttimeoutfactor = 2 - [test_hashedarray.js] - [test_ics.js] - [test_ics_parser.js] - [test_ics_service.js] - [test_imip.js] - [test_items.js] - [test_ltninvitationutils.js] - [test_providers.js] -diff --git a/mail/app.mozbuild b/mail/app.mozbuild ---- a/mail/app.mozbuild -+++ b/mail/app.mozbuild -@@ -16,16 +16,17 @@ if CONFIG['MOZ_EXTENSIONS']: - DIRS += ['/%s/extensions' % CONFIG['mozreltopsrcdir']] - - DIRS += ['/%s' % CONFIG['MOZ_BRANDING_DIRECTORY']] - - - if CONFIG['MOZ_CALENDAR']: - DIRS += [ - '/%s/calendar/lightning' % CONFIG['commreltopsrcdir'], -- '/%s/calendar/timezones' % CONFIG['commreltopsrcdir'] -+ '/%s/calendar/providers/gdata' % CONFIG['commreltopsrcdir'], -+ '/%s/calendar/timezones' % CONFIG['commreltopsrcdir'], - ] - - DIRS += [ - '/%s/chat' % CONFIG['commreltopsrcdir'], - '/%s/editor/ui' % CONFIG['commreltopsrcdir'], - '/%s/mail' % CONFIG['commreltopsrcdir'], - ] -diff --git a/mail/testsuite-targets.mk b/mail/testsuite-targets.mk ---- a/mail/testsuite-targets.mk -+++ b/mail/testsuite-targets.mk -@@ -56,10 +56,11 @@ else - package-tests: stage-mozmill - endif - - stage-mozmill: make-stage-dir - $(MAKE) -C $(commtopobjdir)/mail/test/mozmill stage-package - - stage-calendar: make-stage-dir - $(MAKE) -C $(commtopobjdir)/calendar/lightning stage-package -+ $(MAKE) -C $(commtopobjdir)/calendar/providers/gdata stage-package - - .PHONY: stage-mozmill stage-calendar -diff --git a/taskcluster/ci/test/tests.yml b/taskcluster/ci/test/tests.yml ---- a/taskcluster/ci/test/tests.yml -+++ b/taskcluster/ci/test/tests.yml -@@ -66,16 +66,19 @@ xpcshell: - - remove_executables.py - - unittests/thunderbird_extra.py - extra-options: - - "--xpcshell-suite=xpcshell" - requires-signed-builds: - by-test-platform: - windows.*: true - default: false -+ fetches: -+ build: -+ - gdata-provider.en-US.xpi - - mozmill: - description: "mozmill test run" - suite: mozmill - treeherder-symbol: Z(Z) - run-on-projects: built-projects - docker-image: - in-tree: "desktop1604-test" - diff --git a/mail-client/thunderbird/files/thunderbird-gentoo-default-prefs.js-2 b/mail-client/thunderbird/files/thunderbird-gentoo-default-prefs.js-2 new file mode 100644 index 00000000..9770a1ac --- /dev/null +++ b/mail-client/thunderbird/files/thunderbird-gentoo-default-prefs.js-2 @@ -0,0 +1,10 @@ +pref("app.update.enabled", false); +pref("app.update.autoInstallEnabled", false); +pref("browser.display.use_system_colors", true); +pref("intl.locale.matchOS", true); +pref("intl.locale.requested", ""); +pref("general.useragent.locale", "chrome://global/locale/intl.properties"); +pref("mail.shell.checkDefaultClient", false); +# Do not switch to Smart Folders after upgrade to 3.0b4 +pref("mail.folder.views.version", "1"); +pref("extensions.autoDisableScopes", 0); diff --git a/mail-client/thunderbird/thunderbird-60.0-r1.ebuild b/mail-client/thunderbird/thunderbird-60.0-r1.ebuild new file mode 100644 index 00000000..6b286589 --- /dev/null +++ b/mail-client/thunderbird/thunderbird-60.0-r1.ebuild @@ -0,0 +1,362 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +WANT_AUTOCONF="2.1" +MOZ_ESR="" +MOZ_LIGHTNING_VER="6.2" +MOZ_LIGHTNING_GDATA_VER="4.4.1" + +# This list can be updated using scripts/get_langs.sh from the mozilla overlay +MOZ_LANGS=(ar ast be bg br ca cs cy da de el en en-GB en-US es-AR +es-ES et eu fi fr fy-NL ga-IE gd gl he hr hsb hu hy-AM id is it ja ko lt +nb-NO nl nn-NO pl pt-BR pt-PT rm ro ru si sk sl sq sr sv-SE tr +uk vi zh-CN zh-TW ) + +# Convert the ebuild version to the upstream mozilla version, used by mozlinguas +MOZ_PV="${PV/_beta/b}" + +# Patches +PATCHTB="thunderbird-60.0-patches-0" +PATCHFF="firefox-60.0-patches-02" + +MOZ_HTTP_URI="https://archive.mozilla.org/pub/${PN}/releases" + +# ESR releases have slightly version numbers +if [[ ${MOZ_ESR} == 1 ]]; then + MOZ_PV="${MOZ_PV}esr" +fi +MOZ_P="${PN}-${MOZ_PV}" + +MOZCONFIG_OPTIONAL_WIFI=1 +#MOZ_GENERATE_LANGPACKS=1 + +inherit check-reqs flag-o-matic toolchain-funcs gnome2-utils mozconfig-v6.60 pax-utils xdg-utils autotools mozlinguas-v2 + +DESCRIPTION="Thunderbird Mail Client" +HOMEPAGE="http://www.mozilla.com/en-US/thunderbird/" + +KEYWORDS="~amd64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux" +SLOT="0" +LICENSE="MPL-2.0 GPL-2 LGPL-2.1" +IUSE="bindist crypt hardened lightning +minimal mozdom rust selinux" +RESTRICT="!bindist? ( bindist )" + +PATCH_URIS=( https://dev.gentoo.org/~{anarchy,axs,polynomial-c}/mozilla/patchsets/{${PATCHTB},${PATCHFF}}.tar.xz ) +SRC_URI="${SRC_URI} + ${MOZ_HTTP_URI}/${MOZ_PV}/source/${MOZ_P}.source.tar.xz + https://dev.gentoo.org/~axs/distfiles/lightning-${MOZ_LIGHTNING_VER}.tar.xz + lightning? ( https://dev.gentoo.org/~axs/distfiles/gdata-provider-${MOZ_LIGHTNING_GDATA_VER}.tar.xz ) + ${PATCH_URIS[@]}" + +ASM_DEPEND=">=dev-lang/yasm-1.1" + +CDEPEND=" + >=dev-libs/nss-3.28.3 + >=dev-libs/nspr-4.13.1 + " + +DEPEND="rust? ( dev-lang/rust ) + amd64? ( ${ASM_DEPEND} + virtual/opengl ) + x86? ( ${ASM_DEPEND} + virtual/opengl )" + +RDEPEND="${CDEPEND} + selinux? ( sec-policy/selinux-thunderbird ) + crypt? ( >=x11-plugins/enigmail-1.9.8.3-r1 ) +" + +S="${WORKDIR}/${MOZ_P%b[0-9]*}" + +BUILD_OBJ_DIR="${S}/tbird" + +pkg_setup() { + moz_pkgsetup + + #export MOZILLA_DIR="${S}/mozilla" + + if ! use bindist ; then + elog "You are enabling official branding. You may not redistribute this build" + elog "to any users on your network or the internet. Doing so puts yourself into" + elog "a legal problem with Mozilla Foundation" + elog "You can disable it by emerging ${PN} _with_ the bindist USE-flag" + elog + fi + + addpredict /proc/self/oom_score_adj +} + +pkg_pretend() { + # Ensure we have enough disk space to compile + CHECKREQS_DISK_BUILD="4G" + check-reqs_pkg_setup +} + +src_unpack() { + unpack ${A} + + # Unpack language packs + mozlinguas_src_unpack + + # this version of lightning is a .tar.xz, no xpi needed + #xpi_unpack lightning-${MOZ_LIGHTNING_VER}.xpi + + # this version of gdata-provider is a .tar.xz , no xpi needed + #use lightning && xpi_unpack gdata-provider-${MOZ_LIGHTNING_GDATA_VER}.xpi +} + +src_prepare() { + # Apply our patchset from firefox to thunderbird as well + rm -f "${WORKDIR}"/firefox/2007_fix_nvidia_latest.patch \ + "${WORKDIR}"/firefox/2005_ffmpeg4.patch \ + || die + eapply "${WORKDIR}/firefox" + + # Ensure that are plugins dir is enabled as default + sed -i -e "s:/usr/lib/mozilla/plugins:/usr/lib/nsbrowser/plugins:" \ + "${S}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path for 32bit!" + sed -i -e "s:/usr/lib64/mozilla/plugins:/usr/lib64/nsbrowser/plugins:" \ + "${S}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path for 64bit!" + + # Don't error out when there's no files to be removed: + sed 's@\(xargs rm\)$@\1 -f@' \ + -i "${S}"/toolkit/mozapps/installer/packager.mk || die + + # Don't exit with error when some libs are missing which we have in + # system. + sed '/^MOZ_PKG_FATAL_WARNINGS/s@= 1@= 0@' \ + -i "${S}"/comm/mail/installer/Makefile.in || die + + # Shell scripts sometimes contain DOS line endings; bug 391889 +# grep -rlZ --include="*.sh" $'\r$' . | +# while read -r -d $'\0' file ; do +# einfo edos2unix "${file}" +# edos2unix "${file}" +# done + + # Apply our Thunderbird patchset + pushd "${S}"/comm &>/dev/null || doe + eapply "${WORKDIR}"/thunderbird + + # simulate old directory structure just in case it helps eapply_user + ln -s .. mozilla || die + # Allow user to apply any additional patches without modifing ebuild + eapply_user + # remove the symlink + rm -f mozilla + + # Confirm the version of lightning being grabbed for langpacks is the same + # as that used in thunderbird + local THIS_MOZ_LIGHTNING_VER=$(${PYTHON} calendar/lightning/build/makeversion.py ${PV}) + if [[ ${MOZ_LIGHTNING_VER} != ${THIS_MOZ_LIGHTNING_VER} ]]; then + eqawarn "The version of lightning used for localization differs from the version" + eqawarn "in thunderbird. Please update MOZ_LIGHTNING_VER in the ebuild from ${MOZ_LIGHTNING_VER}" + eqawarn "to ${THIS_MOZ_LIGHTNING_VER}" + fi + + popd &>/dev/null || die + + eautoreconf old-configure.in + # Ensure we run eautoreconf in spidermonkey to regenerate configure + cd "${S}"/js/src || die + eautoconf old-configure.in +} + +src_configure() { + MEXTENSIONS="default" + + #################################### + # + # mozconfig, CFLAGS and CXXFLAGS setup + # + #################################### + + mozconfig_init + mozconfig_config + + # It doesn't compile on alpha without this LDFLAGS + use alpha && append-ldflags "-Wl,--no-relax" + + # Add full relro support for hardened + use hardened && append-ldflags "-Wl,-z,relro,-z,now" + + mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}" + mozconfig_annotate '' --enable-calendar + + # Other tb-specific settings + mozconfig_annotate '' --with-user-appdir=.thunderbird + + # Disabling ldap support causes build failures with 60.0b10 + #mozconfig_use_enable ldap + mozconfig_annotate '' --enable-ldap + if use hardened; then + append-ldflags "-Wl,-z,relro,-z,now" + mozconfig_use_enable hardened hardening + fi + + mozlinguas_mozconfig + + # Bug #72667 + if use mozdom; then + MEXTENSIONS="${MEXTENSIONS},inspector" + fi + + # Use an objdir to keep things organized. + echo "mk_add_options MOZ_OBJDIR=${BUILD_OBJ_DIR}" >> "${S}"/.mozconfig + echo "mk_add_options XARGS=/usr/bin/xargs" >> "${S}"/.mozconfig + + # Default mozilla_five_home no longer valid option + sed '/with-default-mozilla-five-home=/d' -i "${S}"/.mozconfig + + # Finalize and report settings + mozconfig_final + + #################################### + # + # Configure and build + # + #################################### + + # Disable no-print-directory + MAKEOPTS=${MAKEOPTS/--no-print-directory/} + + if [[ $(gcc-major-version) -lt 4 ]]; then + append-cxxflags -fno-stack-protector + fi + + # workaround for funky/broken upstream configure... + SHELL="${SHELL:-${EPREFIX}/bin/bash}" MOZ_NOSPAM=1 \ + ./mach configure || die +} + +src_compile() { + MOZ_MAKE_FLAGS="${MAKEOPTS}" SHELL="${SHELL:-${EPREFIX}/bin/bash}" MOZ_NOSPAM=1 \ + ./mach build --verbose || die +} + +src_install() { + declare emid + cd "${BUILD_OBJ_DIR}" || die + + # Pax mark xpcshell for hardened support, only used for startupcache creation. + pax-mark m "${BUILD_OBJ_DIR}"/dist/bin/xpcshell + + # Copy our preference before omnijar is created. + cp "${FILESDIR}"/thunderbird-gentoo-default-prefs.js-2 \ + "${BUILD_OBJ_DIR}/dist/bin/defaults/pref/all-gentoo.js" \ + || die + + mozconfig_install_prefs \ + "${BUILD_OBJ_DIR}/dist/bin/defaults/pref/all-gentoo.js" + + # dev-db/sqlite does not have FTS3_TOKENIZER support. + # gloda needs it to function, and bad crashes happen when its enabled and doesn't work + if in_iuse system-sqlite && use system-sqlite ; then + echo "sticky_pref(\"mailnews.database.global.indexer.enabled\", false);" \ + >>"${BUILD_OBJ_DIR}/dist/bin/defaults/pref/all-gentoo.js" || die + fi + +# MOZ_MAKE_FLAGS="${MAKEOPTS}" \ +# emake DESTDIR="${D}" install + cd "${S}" || die + MOZ_MAKE_FLAGS="${MAKEOPTS}" SHELL="${SHELL:-${EPREFIX}/bin/bash}" MOZ_NOSPAM=1 \ + DESTDIR="${D}" ./mach install + + # Install language packs + mozlinguas_src_install + + local size sizes icon_path icon + if ! use bindist; then + icon_path="${S}/comm/mail/branding/thunderbird" + icon="${PN}-icon" + + domenu "${FILESDIR}"/icon/${PN}.desktop + else + icon_path="${S}/comm/mail/branding/nightly" + icon="${PN}-icon-unbranded" + + newmenu "${FILESDIR}"/icon/${PN}-unbranded.desktop \ + ${PN}.desktop + + sed -i -e "s:Mozilla\ Thunderbird:EarlyBird:g" \ + "${ED}"/usr/share/applications/${PN}.desktop + fi + + # Install a 48x48 icon into /usr/share/pixmaps for legacy DEs + newicon "${icon_path}"/default48.png "${icon}".png + # Install icons for menu entry + sizes="16 22 24 32 48 256" + for size in ${sizes}; do + newicon -s ${size} "${icon_path}/default${size}.png" "${icon}.png" + done + + local emid + # stage extra locales for lightning and install over existing + rm -f "${ED}"/${MOZILLA_FIVE_HOME}/distribution/extensions/${emid}.xpi || die + mozlinguas_xpistage_langpacks "${BUILD_OBJ_DIR}"/dist/bin/distribution/extensions/${emid} \ + "${WORKDIR}"/lightning-${MOZ_LIGHTNING_VER} lightning calendar + + emid='{e2fda1a4-762b-4020-b5ad-a41df1933103}' + mkdir -p "${T}/${emid}" || die + cp -RLp -t "${T}/${emid}" "${BUILD_OBJ_DIR}"/dist/bin/distribution/extensions/${emid}/* || die + insinto ${MOZILLA_FIVE_HOME}/distribution/extensions + doins -r "${T}/${emid}" + + if use lightning; then + # move lightning out of distribution/extensions and into extensions for app-global install + mv "${ED}"/${MOZILLA_FIVE_HOME}/{distribution,}/extensions/${emid} || die + + # stage extra locales for gdata-provider and install app-global + mozlinguas_xpistage_langpacks "${BUILD_OBJ_DIR}"/dist/xpi-stage/gdata-provider \ + "${WORKDIR}"/gdata-provider-${MOZ_LIGHTNING_GDATA_VER} + emid='{a62ef8ec-5fdc-40c2-873c-223b8a6925cc}' + mkdir -p "${T}/${emid}" || die + cp -RLp -t "${T}/${emid}" "${BUILD_OBJ_DIR}"/dist/xpi-stage/gdata-provider/* || die + insinto ${MOZILLA_FIVE_HOME}/extensions + doins -r "${T}/${emid}" + fi + + # Required in order to use plugins and even run thunderbird on hardened. + pax-mark pm "${ED}"${MOZILLA_FIVE_HOME}/{thunderbird,thunderbird-bin,plugin-container} + +# if use minimal; then +# rm -r "${ED}"/usr/include "${ED}"${MOZILLA_FIVE_HOME}/{idl,include,lib,sdk} || \ +# die "Failed to remove sdk and headers" +# fi +} + +pkg_preinst() { + gnome2_icon_savelist +} + +pkg_postinst() { + xdg_desktop_database_update + gnome2_icon_cache_update + + if use crypt; then + elog + elog "USE=crypt will be dropped from thunderbird with version 52.6.0 as" + elog "x11-plugins/enigmail-1.9.8.3-r1 and above is now a fully standalone" + elog "package. For continued enigmail support in thunderbird please add" + elog "x11-plugins/enigmail to your @world set." + fi + + elog + elog "If you experience problems with plugins please issue the" + elog "following command : rm \${HOME}/.thunderbird/*/extensions.sqlite ," + elog "then restart thunderbird" + + if ! use lightning; then + elog + elog "If calendar fails to show up in extensions please open config editor" + elog "and set extensions.lastAppVersion to 38.0.0 to force a reload. If this" + elog "fails to show the calendar extension after restarting with above change" + elog "please file a bug report." + fi +} + +pkg_postrm() { + xdg_desktop_database_update + gnome2_icon_cache_update +} diff --git a/mail-client/thunderbird/thunderbird-60.0.ebuild b/mail-client/thunderbird/thunderbird-60.0.ebuild deleted file mode 100644 index 28892cf5..00000000 --- a/mail-client/thunderbird/thunderbird-60.0.ebuild +++ /dev/null @@ -1,362 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 -WANT_AUTOCONF="2.1" -MOZ_ESR="" -MOZ_LIGHTNING_VER="6.2" -MOZ_LIGHTNING_GDATA_VER="4.4.1" - -# This list can be updated using scripts/get_langs.sh from the mozilla overlay -MOZ_LANGS=(ar ast be bg br ca cs cy da de el en en-GB en-US es-AR -es-ES et eu fi fr fy-NL ga-IE gd gl he hr hsb hu hy-AM id is it ja ko lt -nb-NO nl nn-NO pl pt-BR pt-PT rm ro ru si sk sl sq sr sv-SE tr -uk vi zh-CN zh-TW ) - -# Convert the ebuild version to the upstream mozilla version, used by mozlinguas -MOZ_PV="${PV/_beta/b}" - -# Patches -PATCHFF="firefox-60.0-patches-02" - -MOZ_HTTP_URI="https://archive.mozilla.org/pub/${PN}/releases" - -# ESR releases have slightly version numbers -if [[ ${MOZ_ESR} == 1 ]]; then - MOZ_PV="${MOZ_PV}esr" -fi -MOZ_P="${PN}-${MOZ_PV}" - -MOZCONFIG_OPTIONAL_WIFI=1 -#MOZ_GENERATE_LANGPACKS=1 - -inherit check-reqs flag-o-matic toolchain-funcs gnome2-utils mozconfig-v6.60 pax-utils xdg-utils autotools mozlinguas-v2 - -DESCRIPTION="Thunderbird Mail Client" -HOMEPAGE="http://www.mozilla.com/en-US/thunderbird/" - -KEYWORDS="~alpha amd64 ~arm ~ppc ~ppc64 x86 ~x86-fbsd ~amd64-linux ~x86-linux" -SLOT="0" -LICENSE="MPL-2.0 GPL-2 LGPL-2.1" -IUSE="bindist crypt hardened lightning +minimal mozdom rust selinux" -RESTRICT="!bindist? ( bindist )" - -PATCH_URIS=( https://dev.gentoo.org/~{anarchy,axs,polynomial-c}/mozilla/patchsets/${PATCHFF}.tar.xz ) -SRC_URI="${SRC_URI} - ${MOZ_HTTP_URI}/${MOZ_PV}/source/${MOZ_P}.source.tar.xz - https://dev.gentoo.org/~axs/distfiles/lightning-${MOZ_LIGHTNING_VER}.tar.xz - lightning? ( https://dev.gentoo.org/~axs/distfiles/gdata-provider-${MOZ_LIGHTNING_GDATA_VER}.tar.xz ) - ${PATCH_URIS[@]}" - -ASM_DEPEND=">=dev-lang/yasm-1.1" - -CDEPEND=" - >=dev-libs/nss-3.28.3 - >=dev-libs/nspr-4.13.1 - " - -DEPEND="rust? ( dev-lang/rust ) - amd64? ( ${ASM_DEPEND} - virtual/opengl ) - x86? ( ${ASM_DEPEND} - virtual/opengl )" - -RDEPEND="${CDEPEND} - selinux? ( sec-policy/selinux-thunderbird ) - crypt? ( >=x11-plugins/enigmail-1.9.8.3-r1 ) -" - -S="${WORKDIR}/${MOZ_P%b[0-9]*}" - -BUILD_OBJ_DIR="${S}/tbird" - -pkg_setup() { - moz_pkgsetup - - #export MOZILLA_DIR="${S}/mozilla" - - if ! use bindist ; then - elog "You are enabling official branding. You may not redistribute this build" - elog "to any users on your network or the internet. Doing so puts yourself into" - elog "a legal problem with Mozilla Foundation" - elog "You can disable it by emerging ${PN} _with_ the bindist USE-flag" - elog - fi - - addpredict /proc/self/oom_score_adj -} - -pkg_pretend() { - # Ensure we have enough disk space to compile - CHECKREQS_DISK_BUILD="4G" - check-reqs_pkg_setup -} - -src_unpack() { - unpack ${A} - - # Unpack language packs - mozlinguas_src_unpack - - # this version of lightning is a .tar.xz, no xpi needed - #xpi_unpack lightning-${MOZ_LIGHTNING_VER}.xpi - - # this version of gdata-provider is a .tar.xz , no xpi needed - #use lightning && xpi_unpack gdata-provider-${MOZ_LIGHTNING_GDATA_VER}.xpi -} - -src_prepare() { - # Apply our patchset from firefox to thunderbird as well - rm -f "${WORKDIR}"/firefox/2007_fix_nvidia_latest.patch \ - "${WORKDIR}"/firefox/2005_ffmpeg4.patch \ - || die - eapply "${WORKDIR}/firefox" - - # Ensure that are plugins dir is enabled as default - sed -i -e "s:/usr/lib/mozilla/plugins:/usr/lib/nsbrowser/plugins:" \ - "${S}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path for 32bit!" - sed -i -e "s:/usr/lib64/mozilla/plugins:/usr/lib64/nsbrowser/plugins:" \ - "${S}"/xpcom/io/nsAppFileLocationProvider.cpp || die "sed failed to replace plugin path for 64bit!" - - # Don't error out when there's no files to be removed: - sed 's@\(xargs rm\)$@\1 -f@' \ - -i "${S}"/toolkit/mozapps/installer/packager.mk || die - - # Don't exit with error when some libs are missing which we have in - # system. - sed '/^MOZ_PKG_FATAL_WARNINGS/s@= 1@= 0@' \ - -i "${S}"/comm/mail/installer/Makefile.in || die - - # Shell scripts sometimes contain DOS line endings; bug 391889 -# grep -rlZ --include="*.sh" $'\r$' . | -# while read -r -d $'\0' file ; do -# einfo edos2unix "${file}" -# edos2unix "${file}" -# done - - # Apply our Thunderbird patchset - pushd "${S}"/comm &>/dev/null || doe - eapply "${FILESDIR}"/1000_fix_gentoo_preferences.patch - eapply "${FILESDIR}"/tb60-build-gdata-provider.patch - - # simulate old directory structure just in case it helps eapply_user - ln -s .. mozilla || die - # Allow user to apply any additional patches without modifing ebuild - eapply_user - # remove the symlink - rm -f mozilla - - # Confirm the version of lightning being grabbed for langpacks is the same - # as that used in thunderbird - local THIS_MOZ_LIGHTNING_VER=$(${PYTHON} calendar/lightning/build/makeversion.py ${PV}) - if [[ ${MOZ_LIGHTNING_VER} != ${THIS_MOZ_LIGHTNING_VER} ]]; then - eqawarn "The version of lightning used for localization differs from the version" - eqawarn "in thunderbird. Please update MOZ_LIGHTNING_VER in the ebuild from ${MOZ_LIGHTNING_VER}" - eqawarn "to ${THIS_MOZ_LIGHTNING_VER}" - fi - - popd &>/dev/null || die - - eautoreconf old-configure.in - # Ensure we run eautoreconf in spidermonkey to regenerate configure - cd "${S}"/js/src || die - eautoconf old-configure.in -} - -src_configure() { - MEXTENSIONS="default" - - #################################### - # - # mozconfig, CFLAGS and CXXFLAGS setup - # - #################################### - - mozconfig_init - mozconfig_config - - # It doesn't compile on alpha without this LDFLAGS - use alpha && append-ldflags "-Wl,--no-relax" - - # Add full relro support for hardened - use hardened && append-ldflags "-Wl,-z,relro,-z,now" - - mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}" - mozconfig_annotate '' --enable-calendar - - # Other tb-specific settings - mozconfig_annotate '' --with-user-appdir=.thunderbird - - # Disabling ldap support causes build failures with 60.0b10 - #mozconfig_use_enable ldap - mozconfig_annotate '' --enable-ldap - if use hardened; then - append-ldflags "-Wl,-z,relro,-z,now" - mozconfig_use_enable hardened hardening - fi - - mozlinguas_mozconfig - - # Bug #72667 - if use mozdom; then - MEXTENSIONS="${MEXTENSIONS},inspector" - fi - - # Use an objdir to keep things organized. - echo "mk_add_options MOZ_OBJDIR=${BUILD_OBJ_DIR}" >> "${S}"/.mozconfig - echo "mk_add_options XARGS=/usr/bin/xargs" >> "${S}"/.mozconfig - - # Default mozilla_five_home no longer valid option - sed '/with-default-mozilla-five-home=/d' -i "${S}"/.mozconfig - - # Finalize and report settings - mozconfig_final - - #################################### - # - # Configure and build - # - #################################### - - # Disable no-print-directory - MAKEOPTS=${MAKEOPTS/--no-print-directory/} - - if [[ $(gcc-major-version) -lt 4 ]]; then - append-cxxflags -fno-stack-protector - fi - - # workaround for funky/broken upstream configure... - SHELL="${SHELL:-${EPREFIX}/bin/bash}" MOZ_NOSPAM=1 \ - ./mach configure || die -} - -src_compile() { - MOZ_MAKE_FLAGS="${MAKEOPTS}" SHELL="${SHELL:-${EPREFIX}/bin/bash}" MOZ_NOSPAM=1 \ - ./mach build --verbose || die -} - -src_install() { - declare emid - cd "${BUILD_OBJ_DIR}" || die - - # Pax mark xpcshell for hardened support, only used for startupcache creation. - pax-mark m "${BUILD_OBJ_DIR}"/dist/bin/xpcshell - - # Copy our preference before omnijar is created. - cp "${FILESDIR}"/thunderbird-gentoo-default-prefs-1.js-1 \ - "${BUILD_OBJ_DIR}/dist/bin/defaults/pref/all-gentoo.js" \ - || die - - mozconfig_install_prefs \ - "${BUILD_OBJ_DIR}/dist/bin/defaults/pref/all-gentoo.js" - - # dev-db/sqlite does not have FTS3_TOKENIZER support. - # gloda needs it to function, and bad crashes happen when its enabled and doesn't work - if in_iuse system-sqlite && use system-sqlite ; then - echo "sticky_pref(\"mailnews.database.global.indexer.enabled\", false);" \ - >>"${BUILD_OBJ_DIR}/dist/bin/defaults/pref/all-gentoo.js" || die - fi - -# MOZ_MAKE_FLAGS="${MAKEOPTS}" \ -# emake DESTDIR="${D}" install - cd "${S}" || die - MOZ_MAKE_FLAGS="${MAKEOPTS}" SHELL="${SHELL:-${EPREFIX}/bin/bash}" MOZ_NOSPAM=1 \ - DESTDIR="${D}" ./mach install - - # Install language packs - mozlinguas_src_install - - local size sizes icon_path icon - if ! use bindist; then - icon_path="${S}/comm/mail/branding/thunderbird" - icon="${PN}-icon" - - domenu "${FILESDIR}"/icon/${PN}.desktop - else - icon_path="${S}/comm/mail/branding/nightly" - icon="${PN}-icon-unbranded" - - newmenu "${FILESDIR}"/icon/${PN}-unbranded.desktop \ - ${PN}.desktop - - sed -i -e "s:Mozilla\ Thunderbird:EarlyBird:g" \ - "${ED}"/usr/share/applications/${PN}.desktop - fi - - # Install a 48x48 icon into /usr/share/pixmaps for legacy DEs - newicon "${icon_path}"/default48.png "${icon}".png - # Install icons for menu entry - sizes="16 22 24 32 48 256" - for size in ${sizes}; do - newicon -s ${size} "${icon_path}/default${size}.png" "${icon}.png" - done - - local emid - # stage extra locales for lightning and install over existing - rm -f "${ED}"/${MOZILLA_FIVE_HOME}/distribution/extensions/${emid}.xpi || die - mozlinguas_xpistage_langpacks "${BUILD_OBJ_DIR}"/dist/bin/distribution/extensions/${emid} \ - "${WORKDIR}"/lightning-${MOZ_LIGHTNING_VER} lightning calendar - - emid='{e2fda1a4-762b-4020-b5ad-a41df1933103}' - mkdir -p "${T}/${emid}" || die - cp -RLp -t "${T}/${emid}" "${BUILD_OBJ_DIR}"/dist/bin/distribution/extensions/${emid}/* || die - insinto ${MOZILLA_FIVE_HOME}/distribution/extensions - doins -r "${T}/${emid}" - - if use lightning; then - # move lightning out of distribution/extensions and into extensions for app-global install - mv "${ED}"/${MOZILLA_FIVE_HOME}/{distribution,}/extensions/${emid} || die - - # stage extra locales for gdata-provider and install app-global - mozlinguas_xpistage_langpacks "${BUILD_OBJ_DIR}"/dist/xpi-stage/gdata-provider \ - "${WORKDIR}"/gdata-provider-${MOZ_LIGHTNING_GDATA_VER} - emid='{a62ef8ec-5fdc-40c2-873c-223b8a6925cc}' - mkdir -p "${T}/${emid}" || die - cp -RLp -t "${T}/${emid}" "${BUILD_OBJ_DIR}"/dist/xpi-stage/gdata-provider/* || die - insinto ${MOZILLA_FIVE_HOME}/extensions - doins -r "${T}/${emid}" - fi - - # Required in order to use plugins and even run thunderbird on hardened. - pax-mark pm "${ED}"${MOZILLA_FIVE_HOME}/{thunderbird,thunderbird-bin,plugin-container} - -# if use minimal; then -# rm -r "${ED}"/usr/include "${ED}"${MOZILLA_FIVE_HOME}/{idl,include,lib,sdk} || \ -# die "Failed to remove sdk and headers" -# fi -} - -pkg_preinst() { - gnome2_icon_savelist -} - -pkg_postinst() { - xdg_desktop_database_update - gnome2_icon_cache_update - - if use crypt; then - elog - elog "USE=crypt will be dropped from thunderbird with version 52.6.0 as" - elog "x11-plugins/enigmail-1.9.8.3-r1 and above is now a fully standalone" - elog "package. For continued enigmail support in thunderbird please add" - elog "x11-plugins/enigmail to your @world set." - fi - - elog - elog "If you experience problems with plugins please issue the" - elog "following command : rm \${HOME}/.thunderbird/*/extensions.sqlite ," - elog "then restart thunderbird" - - if ! use lightning; then - elog - elog "If calendar fails to show up in extensions please open config editor" - elog "and set extensions.lastAppVersion to 38.0.0 to force a reload. If this" - elog "fails to show the calendar extension after restarting with above change" - elog "please file a bug report." - fi -} - -pkg_postrm() { - xdg_desktop_database_update - gnome2_icon_cache_update -} -- cgit v1.2.3-18-g5258