diff mbox series

[bug#43647,2/3] gnu: icedove: Update to 78.3.0.

Message ID 20200927104420.4091-2-jonathan.brielmaier@web.de
State Accepted
Headers show
Series Update icedove to 78 | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job

Commit Message

Jonathan Brielmaier Sept. 27, 2020, 10:44 a.m. UTC
* gnu/packages/gnuzilla.scm (icedove): Update to 78.3.0.
[source]: Use source from Icecat 78.
[arguments]: 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]: Use ESR 78 mercurial repo for thunderbird soruces.
Update rust and cargo to 1.41, rust-cbindgen to 0.14 and
node to 10.22.

Tested-by: Jonathan Brielmaier <jonathan.brielmaier@web.de>
---
 gnu/packages/gnuzilla.scm | 56 +++++++++++++++++----------------------
 1 file changed, 25 insertions(+), 31 deletions(-)

--
2.28.0

Comments

Mark H Weaver Sept. 27, 2020, 11:25 p.m. UTC | #1
Hi Jonathan,

> * gnu/packages/gnuzilla.scm (icedove): Update to 78.3.0.
> [source]: Use source from Icecat 78.
> [arguments]: 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]: Use ESR 78 mercurial repo for thunderbird soruces.
> Update rust and cargo to 1.41, rust-cbindgen to 0.14 and
> node to 10.22.
> 
> Tested-by: Jonathan Brielmaier <jonathan.brielmaier@web.de>

Thanks very much for this, Jonathan!

It looks good to me except for one minor issue which is my fault:

> diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm
> index 85ad9678d0..873cccaa9c 100644
> --- a/gnu/packages/gnuzilla.scm
> +++ b/gnu/packages/gnuzilla.scm
[...]
>             (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))

This change was inherited from a change I made in the IceCat 78 update
(commit c7011ff850420fdbe1319b3d218bd362f2f9d618), and as Zhu Zihao
<all_but_last@163.com> recently pointed out on guix-devel, it has a
problem which turns out to be harmless but wasteful: the argument to the
second call to 'substitute*' should be 'files' instead of
(find-files "." "Cargo.lock$").

I'm currently testing the 'icedove' build with this minor fix applied.

     Thank you!
        Mark
Jonathan Brielmaier Sept. 28, 2020, 9:41 a.m. UTC | #2
>>              (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))
>
> This change was inherited from a change I made in the IceCat 78 update
> (commit c7011ff850420fdbe1319b3d218bd362f2f9d618), and as Zhu Zihao
> <all_but_last@163.com> recently pointed out on guix-devel, it has a
> problem which turns out to be harmless but wasteful: the argument to the
> second call to 'substitute*' should be 'files' instead of
> (find-files "." "Cargo.lock$").
>
> I'm currently testing the 'icedove' build with this minor fix applied.

I saw this proposal already on the ML and it's a good one :)
diff mbox series

Patch

diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm
index 85ad9678d0..873cccaa9c 100644
--- a/gnu/packages/gnuzilla.scm
+++ b/gnu/packages/gnuzilla.scm
@@ -1430,12 +1430,12 @@  standards of the IceCat project.")
                 #t))))))))

 ;; Update this together with icecat!
-(define %icedove-build-id "20200825000000") ;must be of the form YYYYMMDDhhmmss
+(define %icedove-build-id "20200924000000") ;must be of the form YYYYMMDDhhmmss
 (define-public icedove
   (package
     (name "icedove")
-    (version "68.12.0")
-    (source icecat-68-source)
+    (version "78.3.0")
+    (source icecat-source)
     (properties
      `((cpe-name . "thunderbird_esr")))
     (build-system gnu-build-system)
@@ -1460,10 +1460,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
@@ -1505,12 +1510,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"
@@ -1520,14 +1523,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)))
@@ -1600,8 +1598,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"
@@ -1609,16 +1606,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"
@@ -1689,7 +1683,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)
@@ -1705,7 +1699,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)
@@ -1720,28 +1714,28 @@  standards of the IceCat project.")
         ;; 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"))
+        ,(let ((changeset "35e647ebd4fa09407a0fe151d3823b1b58172a2a"))
            (origin
              (method hg-fetch)
              (uri (hg-reference
-                   (url "https://hg.mozilla.org/releases/comm-esr68")
+                   (url "https://hg.mozilla.org/releases/comm-esr78")
                    (changeset changeset)))
              (file-name (string-append "thunderbird-" version "-checkout"))
              (sha256
               (base32
-               "1xvky8p5r41mxdyg9amydy94p51wmmdwdz0zq2vzspr9viixf7xm")))))
+               "0g27rapn1xf19i5pl2g12hndb55shzsk4vrrc6bnj4vf2q49zcwy")))))
        ("autoconf" ,autoconf-2.13)
-       ("cargo" ,rust "cargo")
+       ("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")