From d4fc615be83009ac79a36ecd9a0997d6a11dde55 Mon Sep 17 00:00:00 2001 From: Jonathan Brielmaier Date: Tue, 22 Sep 2020 20:40:49 +0200 Subject: [PATCH 2/2] gnu: icedove: Update to 78.2.2. * gnu/packages/gnuzilla.scm (icedove): Update to 78.2.2. [source]: Separate from icecat-source. This allows adding patches for icedove only. [arguments]: We don't need to copy stuff in 'prepare-thunderbird-sources phase anymore. Use more flexible approach for generating cargo checksums from icecat. Update files in 'rename-to-icedove phase. Remove gone configure flags and rename disable-ion to disable-jit. [inputs]: Update icu4c to version 67 and nss to 3.56. [native-inputs]: Remove thunderbird-sources as the release tarball is used instead. Update rust and cargo to 1.41, rust-cbindgen to 0.14 and node to 10.22. * gnu/packages/patches/icedove-78-fix-new-page.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. Tested-by: Jonathan Brielmaier --- gnu/local.mk | 1 + gnu/packages/gnuzilla.scm | 77 ++++++++----------- .../patches/icedove-78-fix-new-page.patch | 63 +++++++++++++++ 3 files changed, 94 insertions(+), 47 deletions(-) create mode 100644 gnu/packages/patches/icedove-78-fix-new-page.patch diff --git a/gnu/local.mk b/gnu/local.mk index 579974b517..f715a09b49 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1137,6 +1137,7 @@ dist_patch_DATA = \ %D%/packages/patches/icecat-use-system-media-libs.patch \ %D%/packages/patches/icedtea-6-hotspot-gcc-segfault-workaround.patch \ %D%/packages/patches/icedtea-7-hotspot-gcc-segfault-workaround.patch \ + %D%/packages/patches/icedove-78-fix-new-page.patch \ %D%/packages/patches/icu4c-CVE-2020-10531.patch \ %D%/packages/patches/id3lib-CVE-2007-4460.patch \ %D%/packages/patches/id3lib-UTF16-writing-bug.patch \ diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index 5f4d179b87..3c96775c11 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -1154,12 +1154,19 @@ standards of the IceCat project.") (cpe-version . ,(first (string-split version #\-))))))) ;; Update this together with icecat! -(define %icedove-build-id "20200825000000") ;must be of the form YYYYMMDDhhmmss +(define %icedove-build-id "20200910000000") ;must be of the form YYYYMMDDhhmmss (define-public icedove (package (name "icedove") - (version "68.12.0") - (source icecat-source) + (version "78.2.2") + (source (origin + (method url-fetch) + (uri (string-append "https://ftp.mozilla.org/pub/thunderbird/releases/" + version "/source/thunderbird-" version ".source.tar.xz")) + (patches (search-patches "icedove-78-fix-new-page.patch")) ; remove in 78.3.0 + (sha256 + (base32 + "0rzcfkcsxwspbbcf9c0fwclvajixwfx600hhbqc6l7yja4an9s33")))) (properties `((cpe-name . "thunderbird_esr"))) (build-system gnu-build-system) @@ -1174,9 +1181,6 @@ standards of the IceCat project.") (modify-phases %standard-phases (add-after 'unpack 'prepare-thunderbird-sources (lambda* (#:key inputs #:allow-other-keys) - (mkdir "comm") - (copy-recursively (assoc-ref inputs "thunderbird-sources") - "comm") (delete-file-recursively "obj-x86_64-pc-linux-gnu") (delete-file "sourcestamp.txt") #t)) @@ -1184,10 +1188,15 @@ standards of the IceCat project.") (lambda _ (use-modules (guix build cargo-utils)) (let ((null-hash "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855")) - (substitute* '("Cargo.lock" "gfx/wr/Cargo.lock") - (("(\"checksum .* = )\".*\"" all name) - (string-append name "\"" null-hash "\""))) - (generate-all-checksums "third_party/rust")) + (for-each (lambda (file) + (format #t "patching checksums in ~a~%" file) + (substitute* (find-files "." "Cargo.lock$") + (("^checksum = \".*\"") + (string-append "checksum = \"" null-hash "\"")))) + (find-files "." "Cargo.lock$")) + (for-each generate-all-checksums + '("third_party/rust" + "toolkit/library/rust"))) #t)) ;; Fixes issue where each installation directory generates its own profile. ;; See e.g. https://trac.torproject.org/projects/tor/ticket/31457 @@ -1229,12 +1238,10 @@ standards of the IceCat project.") (("mozilla.org") "guix.gnu.org"))) ;; Remove other mentions of Thunderbird in user-visible text. (with-directory-excursion "comm/mail/base/content" - (substitute* '("newInstallPage.xhtml" - "overrides/app-license-name.html" - "newInstall.xul") + (substitute* '("overrides/app-license-name.html") (("Thunderbird") "Icedove"))) (with-directory-excursion "comm/mail/components/" - (substitute* '("mailGlue.js" + (substitute* '("MailGlue.jsm" "extensions/schemas/addressBook.json" "extensions/schemas/tabs.json" "extensions/schemas/cloudFile.json" @@ -1244,14 +1251,9 @@ standards of the IceCat project.") "im/messages/mail/Info.plist" "enterprisepolicies/moz.build" "enterprisepolicies/helpers/moz.build" - "enterprisepolicies/schemas/moz.build" - "preferences/chat.inc.xul") + "enterprisepolicies/schemas/moz.build") (("Thunderbird") "Icedove"))) - (substitute* "comm/calendar/lightning/lightning-packager.mk" - (("ifeq \\(thunderbird") - "ifeq (icedove")) (substitute* '("comm/mailnews/base/prefs/content/accountUtils.js" - "comm/mailnews/extensions/newsblog/content/feed-subscriptions.js" "comm/common/src/customizeToolbar.js") (("AppConstants.MOZ_APP_NAME (.)= \"thunderbird" _ e) (format #f "AppConstants.MOZ_APP_NAME ~a= \"icedove" e))) @@ -1324,8 +1326,7 @@ standards of the IceCat project.") "ac_add_options --disable-debug\n" "ac_add_options --disable-debug-symbols\n" "ac_add_options --disable-elf-hack\n" - "ac_add_options --disable-gconf\n" - "ac_add_options --disable-ion\n" + "ac_add_options --disable-jit\n" "ac_add_options --disable-necko-wifi\n" "ac_add_options --disable-official-branding\n" "ac_add_options --disable-tests\n" @@ -1333,16 +1334,13 @@ standards of the IceCat project.") "ac_add_options --disable-webrtc\n" "ac_add_options --enable-application=comm/mail\n" "ac_add_options --enable-calendar\n" - "ac_add_options --enable-content-sandbox\n" "ac_add_options --enable-default-toolkit=\"cairo-gtk3\"\n" "ac_add_options --enable-optimize\n" "ac_add_options --enable-pulseaudio\n" "ac_add_options --enable-release\n" - "ac_add_options --enable-startup-notification\n" "ac_add_options --enable-strip\n" "ac_add_options --enable-system-ffi\n" "ac_add_options --enable-system-pixman\n" - "ac_add_options --enable-system-sqlite\n" "ac_add_options --prefix=" out "\n" "ac_add_options --with-clang-path=" (assoc-ref %build-inputs "clang") "/bin/clang\n" "ac_add_options --with-distribution-id=org.gnu\n" @@ -1413,7 +1411,7 @@ standards of the IceCat project.") ("gtk+" ,gtk+) ("gtk+-2" ,gtk+-2) ("hunspell" ,hunspell) - ("icu4c" ,icu4c) + ("icu4c" ,icu4c-67) ("libcanberra" ,libcanberra) ("libevent" ,libevent) ("libffi" ,libffi) @@ -1429,7 +1427,7 @@ standards of the IceCat project.") ("mesa" ,mesa) ("mit-krb5" ,mit-krb5) ("nspr" ,nspr) - ("nss" ,nss) + ("nss" ,nss-3.56) ("pango" ,pango) ("pixman" ,pixman) ("pulseaudio" ,pulseaudio) @@ -1439,33 +1437,18 @@ standards of the IceCat project.") ("zip" ,zip) ("zlib" ,zlib))) (native-inputs - `(("thunderbird-sources" - ;; The changeset identifier is taken from the file "sourcestamp.txt" - ;; in the Thunderbird release tarball. We don't use the release - ;; tarball because it duplicates the Icecat sources and only adds the - ;; "comm" directory, which is provided by this repository. - ,(let ((changeset "b41cdff70b185358d9c4c1d4a36cfad15a24f001")) - (origin - (method hg-fetch) - (uri (hg-reference - (url "https://hg.mozilla.org/releases/comm-esr68") - (changeset changeset))) - (file-name (string-append "thunderbird-" version "-checkout")) - (sha256 - (base32 - "1xvky8p5r41mxdyg9amydy94p51wmmdwdz0zq2vzspr9viixf7xm"))))) - ("autoconf" ,autoconf-2.13) - ("cargo" ,rust "cargo") + `(("autoconf" ,autoconf-2.13) + ("cargo" ,rust-1.41 "cargo") ("clang" ,clang) ("llvm" ,llvm) ("nasm" ,nasm) - ("node" ,node) + ("node" ,node-10.22) ("perl" ,perl) ("pkg-config" ,pkg-config) ("python" ,python) ("python2" ,python-2.7) - ("rust" ,rust) - ("rust-cbindgen" ,rust-cbindgen) + ("rust" ,rust-1.41) + ("rust-cbindgen" ,rust-cbindgen-0.14) ("which" ,which) ("yasm" ,yasm))) (home-page "https://www.thunderbird.net") diff --git a/gnu/packages/patches/icedove-78-fix-new-page.patch b/gnu/packages/patches/icedove-78-fix-new-page.patch new file mode 100644 index 0000000000..fe886ca9fa --- /dev/null +++ b/gnu/packages/patches/icedove-78-fix-new-page.patch @@ -0,0 +1,63 @@ +# HG changeset patch +# User Rob Lemley +# Date 1600079976 -10800 +# Node ID f085dbd311bc4b013605202de04de9a81bb55ed1 +# Parent 391f1b69f6d617dd566297dd92c5f1188c6eca20 +Bug 1664607 - Don't try to load what's new page when built with updater disabled. r=mkmelin a=wsmwk + + +When Thunderbird is built with --disable-updater, as it done by most Linux +distributions, accessing the nsIUpdateManager service will throw an error +resulting in a broken UI. Check AppConstants.MOZ_UPDATER when using +nsIUpdateManger to prevent errors. + +Differential Revision: https://phabricator.services.mozilla.com/D90023 + +Added "comm" to the file paths (by Jonathan Brielmaier ) + +diff --git a/comm/mail/base/content/specialTabs.js b/comm/mail/base/content/specialTabs.js +--- a/comm/mail/base/content/specialTabs.js ++++ b/comm/mail/base/content/specialTabs.js +@@ -1043,28 +1043,30 @@ var specialTabs = { + "" + ); + + let mstone = Services.appinfo.version; + if (mstone != old_mstone) { + Services.prefs.setCharPref("mailnews.start_page_override.mstone", mstone); + } + +- let update = Cc["@mozilla.org/updates/update-manager;1"].getService( +- Ci.nsIUpdateManager +- ).activeUpdate; ++ if (AppConstants.MOZ_UPDATER) { ++ let update = Cc["@mozilla.org/updates/update-manager;1"].getService( ++ Ci.nsIUpdateManager ++ ).activeUpdate; + +- if (update && Services.vc.compare(update.appVersion, old_mstone) > 0) { +- let overridePage = Services.urlFormatter.formatURLPref( +- "mailnews.start_page.override_url" +- ); +- overridePage = this.getPostUpdateOverridePage(update, overridePage); +- overridePage = overridePage.replace("%OLD_VERSION%", old_mstone); +- if (overridePage) { +- openLinkExternally(overridePage); ++ if (update && Services.vc.compare(update.appVersion, old_mstone) > 0) { ++ let overridePage = Services.urlFormatter.formatURLPref( ++ "mailnews.start_page.override_url" ++ ); ++ overridePage = this.getPostUpdateOverridePage(update, overridePage); ++ overridePage = overridePage.replace("%OLD_VERSION%", old_mstone); ++ if (overridePage) { ++ openLinkExternally(overridePage); ++ } + } + } + }, + + /** + * Gets the override page for the first run after the application has been + * updated. + * @param {nsIUpdate} update - The nsIUpdate for the update that has been applied. + -- 2.28.0