[PATCH 0/1] WIP: Add icedove.

  • Done
  • quality assurance status badge
Details
5 participants
  • Adrian Malacoda
  • Efraim Flashner
  • Jonathan Brielmaier
  • Nikita Gillmann
  • Ricardo Wurmus
Owner
unassigned
Submitted by
Jonathan Brielmaier
Severity
normal
J
J
Jonathan Brielmaier wrote on 29 Apr 2020 12:56
(address . guix-patches@gnu.org)(name . Jonathan Brielmaier)(address . jonathan.brielmaier@web.de)
20200429105614.11517-1-jonathan.brielmaier@web.de
Hi fellow guix hackers,

in the last couple of days I worked on this icedove patch. It is based
on earlier patches from Adrian and ng0 dating back until 2017 :)

Before getting to exited: there is still a lot to do before merging into
master!

Big missing stuff
=================
* Addons are still enabled and linked to addons.thunderbird.net. This is
a problem with the FSDG though I've not used a non-free Addon or even
saw one in the addon store. Any help how to disable it is welcome.
* Localization: It doesn't have localization support like Icecat. I
guess we just need to port it to Icedove.

Smaller stuff
=============
* The binary should also called icedove not thunderbird.
* In the UI it's called "Thunderbird Daily" this should become Icedove.
* Adrian needs to sign-off as he worked on this patch under GNU AGPL3.
* Do more unbundling. But that is also missing in Icecat.
* We may need some more build phases from Icecat, but at the moment I
want to keep the package as simple as possible. Only acting on real
bugs or issues.

I'm running Icedove now for a couple of days on my laptop. It's working
great. I didn't test installing with a new/empty thunderbird profile.
There are maybe some unknown issues. It builds reproducible and `guix
size` is about 1.1GiB so comparable to Icecat :)

I really hope that we can get Icedove into master. It's current number
one at Guix package wishlist (+6).

So any feedback welcome!

Jonathan Brielmaier (1):
gnu: Add icedove.

gnu/local.mk | 1 +
gnu/packages/icedove.scm | 322 +++++++++++++++++++++++++++++++++++++++
2 files changed, 323 insertions(+)
create mode 100644 gnu/packages/icedove.scm

--
2.26.1
J
J
Jonathan Brielmaier wrote on 29 Apr 2020 13:00
[PATCH 1/1] gnu: Add icedove.
(address . 40959@debbugs.gnu.org)
20200429110018.11677-1-jonathan.brielmaier@web.de
* gnu/packages/icedove.scm: New module.
* gnu/local.mk (GNU_SYSTEM_MODULES): Register it.

Co-authored-by: ng0 <gillmann@infotropique.org>
Co-authored-by: Adrian Malacoda <malacoda@monarch-pass.net>
---
gnu/local.mk | 1 +
gnu/packages/icedove.scm | 322 +++++++++++++++++++++++++++++++++++++++
2 files changed, 323 insertions(+)
create mode 100644 gnu/packages/icedove.scm

Toggle diff (340 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 4af79f0caf..3c09649111 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -264,6 +264,7 @@ GNU_SYSTEM_MODULES = \
%D%/packages/hyperledger.scm \
%D%/packages/i2p.scm \
%D%/packages/ibus.scm \
+ %D%/packages/icedove.scm \
%D%/packages/icu4c.scm \
%D%/packages/idris.scm \
%D%/packages/idutils.scm \
diff --git a/gnu/packages/icedove.scm b/gnu/packages/icedove.scm
new file mode 100644
index 0000000000..5e699898ac
--- /dev/null
+++ b/gnu/packages/icedove.scm
@@ -0,0 +1,322 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright (C) 2017, 2018 ng0 <gillmann@infotropique.org>
+;;; Copyright (C) 2019, 2020 Adrian Malacoda <malacoda@monarch-pass.net>
+;;; Copyright (C) 2020 Jonathan Brielmaier <jonathan.brielmaier@web.de>
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages icedove)
+ #:use-module (guix download)
+ #:use-module ((guix licenses) #:prefix license:)
+ #:use-module (guix packages)
+ #:use-module (guix utils)
+ #:use-module (guix build-system gnu)
+ #:use-module (guix build-system cargo)
+ #:use-module (gnu packages)
+ #:use-module (gnu packages autotools)
+ #:use-module (gnu packages assembly)
+ #:use-module (gnu packages base)
+ #:use-module (gnu packages commencement)
+ #:use-module (gnu packages compression)
+ #:use-module (gnu packages crates-io)
+ #:use-module (gnu packages cups)
+ #:use-module (gnu packages databases)
+ #:use-module (gnu packages fontutils)
+ #:use-module (gnu packages gcc)
+ #:use-module (gnu packages gl)
+ #:use-module (gnu packages glib)
+ #:use-module (gnu packages gnome)
+ #:use-module (gnu packages gtk)
+ #:use-module (gnu packages icu4c)
+ #:use-module (gnu packages image)
+ #:use-module (gnu packages kerberos)
+ #:use-module (gnu packages libcanberra)
+ #:use-module (gnu packages libevent)
+ #:use-module (gnu packages libffi)
+ #:use-module (gnu packages libreoffice) ;for hunspell
+ #:use-module (gnu packages linux)
+ #:use-module (gnu packages llvm)
+ #:use-module (gnu packages node)
+ #:use-module (gnu packages nss)
+ #:use-module (gnu packages perl)
+ #:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages pulseaudio)
+ #:use-module (gnu packages python)
+ #:use-module (gnu packages readline)
+ #:use-module (gnu packages rust)
+ #:use-module (gnu packages rust-apps)
+ #:use-module (gnu packages sqlite)
+ #:use-module (gnu packages video)
+ #:use-module (gnu packages xdisorg)
+ #:use-module (gnu packages xorg))
+
+(define %icedove-build-id "20200428000000")
+
+(define-public icedove
+ (package
+ (name "icedove")
+ (version "68.7.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://archive.mozilla.org/pub/"
+ "thunderbird/releases/"
+ version "/source/thunderbird-" version
+ ".source.tar.xz"))
+ (sha256
+ (base32
+ "112by5xzy9f28fj35yz644vby3c957apj5by2xm8b3qxxqpzsbmw"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f ; no check target
+ ;; XXX: There are RUNPATH issues such as
+ ;; $prefix/lib/icecat-31.6.0/plugin-container NEEDing libmozalloc.so,
+ ;; which is not in its RUNPATH, but they appear to be harmless in
+ ;; practice somehow. See <http://hydra.gnu.org/build/378133>.
+ #:validate-runpath? #f
+
+ #:imported-modules ,%cargo-utils-modules ;for `generate-checksums'
+
+ #:modules ((guix build utils) ;find-files
+ (ice-9 regex)
+ ,@%gnu-build-system-modules)
+
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'remove-bundled-libraries
+ (lambda _
+ ;; Remove bundled libraries that we don't use.
+ (for-each (lambda (file)
+ (format #t "deleting '~a'...~%" file)
+ (delete-file-recursively file))
+ '(;; UNBUNDLE-ME! icu
+ ;; UNBUNDLE-ME! nss
+ "modules/zlib"))
+ #t))
+ (add-before 'configure 'augment-CPLUS_INCLUDE_PATH
+ (lambda* (#:key build inputs #:allow-other-keys)
+ ;; Here, we add additional entries to CPLUS_INCLUDE_PATH, to work
+ ;; around a problem that otherwise occurs when attempting to
+ ;; build Stylo, which requires Rust and Clang. Without these
+ ;; additional entries, errors occur during the build indicating
+ ;; that the <cstddef> and "c++config.h" headers cannot be found.
+ ;; Note that the 'build' keyword argument contains the GNU
+ ;; triplet, e.g. "x86_64-unknown-linux-gnu".
+ (let ((gcc (assoc-ref inputs "gcc")))
+ (setenv "CPLUS_INCLUDE_PATH"
+ (string-append gcc "/include/c++" ":"
+ gcc "/include/c++/" build)))
+ #t))
+
+ (add-after 'patch-source-shebangs 'patch-cargo-checksums
+ (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 "\"")))
+ (for-each
+ (lambda (filename)
+ (delete-file filename)
+ (let ((dir (dirname filename)))
+ (display (string-append
+ "patch-cargo-checksums: generate-checksums for "
+ dir "\n"))
+ (generate-checksums dir)))
+ (find-files "third_party/rust" ".cargo-checksum.json")))
+ #t))
+
+ ; Fixes issue where each installation directory generates its own profile.
+ ; See e.g. https://trac.torproject.org/projects/tor/ticket/31457
+ (add-after 'patch-source-shebangs 'fix-profile-setting
+ (lambda _
+ (let ((mozconfigure "comm/mail/moz.configure"))
+ (substitute* mozconfigure
+ (("'MOZ_DEDICATED_PROFILES', True")
+ "'MOZ_DEDICATED_PROFILES', False")))))
+
+ (add-after 'build 'neutralise-store-references
+ (lambda _
+ ;; Mangle the store references to compilers & other build tools in
+ ;; about:buildconfig, reducing Icedove's closure significant.
+ ;; The resulting files are saved in lib/thunderbird/omni.ja
+ (substitute*
+ ;; Use find because the path "obj-x86_64-pc-linux-gnu" contains
+ ;; the architecture and the system -> more complicated.
+ (find-files "." "buildconfig.html")
+ (((format #f "(~a/)([0-9a-df-np-sv-z]{32})"
+ (regexp-quote (%store-directory)))
+ _ store hash)
+ (string-append store
+ (string-take hash 8)
+ "<!-- Guix: not a runtime dependency -->"
+ (string-drop hash 8))))
+ #t))
+ (replace 'configure
+ (lambda* (#:key outputs configure-flags #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bash (which "bash"))
+ (abs-srcdir (getcwd))
+ (srcdir (string-append "../" (basename abs-srcdir)))
+ (flags `(,(string-append "--prefix=" out)
+ ,@configure-flags))
+ (mozconfig (string-append (getcwd) "/.mozconfig")))
+ (setenv "SHELL" bash)
+ (setenv "AUTOCONF"
+ (string-append (assoc-ref %build-inputs
+ "autoconf")
+ "/bin/autoconf"))
+ (setenv "CONFIG_SHELL" bash)
+ (setenv "QA_CONFIGURE_OPTIONS" ".*")
+ (setenv "MOZBUILD_STATE_PATH"
+ (string-append (getcwd) "/mach_state"))
+ (setenv "MOZCONFIG"
+ (string-append (getcwd) "/.mozconfig"))
+ (setenv "CC" "gcc")
+ (setenv "MOZ_NOSPAM" "1")
+ (setenv "PYTHON"
+ (string-append (assoc-ref %build-inputs
+ "python2")
+ "/bin/python"))
+ (setenv "MOZ_BUILD_DATE" ,%icedove-build-id) ; avoid timestamp
+ ;; (setenv "builddir" (string-append (getcwd) "/build"))
+ ;; (mkdir-p (getenv "MOZBUILD_STATE_PATH"))
+ (mkdir-p (string-append (getcwd) "/builddir"))
+ (with-output-to-file mozconfig
+ (lambda ()
+ (display
+ (string-append
+ "ac_add_options --disable-crashreporter\n"
+ "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-necko-wifi\n"
+ "ac_add_options --disable-official-branding\n"
+ "ac_add_options --disable-tests\n"
+ "ac_add_options --disable-updater\n"
+ "ac_add_options --disable-webrtc\n"
+ "ac_add_options --enable-alsa\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"
+ "ac_add_options --with-libclang-path=" (assoc-ref %build-inputs "clang") "/lib\n"
+ "ac_add_options --with-system-bz2\n"
+ "ac_add_options --with-system-icu\n"
+ "ac_add_options --with-system-jpeg\n"
+ "ac_add_options --with-system-libevent\n"
+ "ac_add_options --with-system-nspr\n"
+ "ac_add_options --with-system-nss\n"
+ "ac_add_options --with-system-zlib\n"
+ "ac_add_options --with-user-appdir=\\.thunderbird\n"))))
+ (display (getcwd))
+ (newline)
+ (display "mach configure")
+ (delete-file-recursively "obj-x86_64-pc-linux-gnu")
+ (zero? (system* "./mach" "configure")))))
+
+ (replace 'build
+ (lambda _
+ (zero? (system* "./mach" "build"))))
+
+ (replace 'install
+ (lambda _
+ (zero? (system* "./mach" "install"))))
+
+ (add-after 'install 'wrap-program
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (lib (string-append out "/lib"))
+ (gtk (assoc-ref inputs "gtk+"))
+ (gtk-share (string-append gtk "/share"))
+ (pulseaudio (assoc-ref inputs "pulseaudio"))
+ (pulseaudio-lib (string-append pulseaudio "/lib")))
+ (wrap-program (car (find-files lib "^thunderbird$"))
+ `("XDG_DATA_DIRS" prefix (,gtk-share))
+ `("LD_LIBRARY_PATH" prefix (,pulseaudio-lib)))
+ #t))))))
+ (inputs
+ `(("alsa-lib" ,alsa-lib)
+ ("bzip2" ,bzip2)
+ ("cairo" ,cairo)
+ ("cups" ,cups)
+ ("dbus-glib" ,dbus-glib)
+ ("ffmpeg" ,ffmpeg)
+ ("freetype" ,freetype)
+ ("gdk-pixbuf" ,gdk-pixbuf)
+ ("glib" ,glib)
+ ("gtk+" ,gtk+)
+ ("gtk+-2" ,gtk+-2)
+ ("hunspell" ,hunspell)
+ ("icu4c" ,icu4c)
+ ("libcanberra" ,libcanberra)
+ ("libevent" ,libevent)
+ ("libffi" ,libffi)
+ ("libgnome" ,libgnome)
+ ("libjpeg-turbo" ,libjpeg-turbo)
+ ("libpng-apng" ,libpng-apng)
+ ("libvpx" ,libvpx)
+ ("libxcomposite" ,libxcomposite)
+ ("libxft" ,libxft)
+ ("libxinerama" ,libxinerama)
+ ("libxscrnsaver" ,libxscrnsaver)
+ ("libxt" ,libxt)
+ ("mesa" ,mesa)
+ ("mit-krb5" ,mit-krb5)
+ ("nspr" ,nspr)
+ ("nss" ,nss)
+ ("pango" ,pango)
+ ("pixman" ,pixman)
+ ("pulseaudio" ,pulseaudio)
+ ("sqlite" ,sqlite)
+ ("startup-notification" ,startup-notification)
+ ("unzip" ,unzip)
+ ("zip" ,zip)
+ ("zlib" ,zlib)))
+ (native-inputs
+ `(("autoconf" ,autoconf-2.13)
+ ("cargo" ,rust "cargo")
+ ("clang" ,clang)
+ ("llvm" ,llvm)
+ ("nasm" ,nasm)
+ ("node" ,node)
+ ("perl" ,perl)
+ ("pkg-config" ,pkg-config)
+ ("python" ,python)
+ ("python2" ,python-2.7)
+ ("python2-pysqlite" ,python2-pysqlite)
+ ("rust" ,rust)
+ ("rust-cbindgen" ,rust-cbindgen)
+ ("which" ,which)
+ ("yasm" ,yasm)))
+ (home-page "https://www.thunderbird.net")
+ (synopsis "Trademarkless version of Mozilla Thunderbird")
+ (description
+ "Full-featured email client built from Thunderbird source tree. It
+supports email, news feeds, chat, calendar and contacts.")
+ (license license:mpl2.0))) ;and others, see toolkit/content/license.html
--
2.26.1
N
N
Nikita Gillmann wrote on 29 Apr 2020 13:12
(name . Jonathan Brielmaier)(address . jonathan.brielmaier@web.de)
20200429111123.royy42iwuak742rh@hex
Attachment: file
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEYRUBLeowJvYqmKVW1rVwhC9+f40FAl6pYQEACgkQ1rVwhC9+
f40q1Q//c5yLBwDx+QX7D3Mve82pZamOcxNh1WeuCPYJkCzEsd+ZLTYug1f69z+j
x145PgCx1LwZ4+BKgzDFXBp3pq6aktSQh7vpDv0ipvHmsGZ+6f9VDs1VxwNIj3/c
qs3ZYn7p2/fVrU1pMdThYyvq0Ns39U57EYX+uPcG9HSoxBWgZ8Eg6Jo6vE6Z8nLV
1UXG5+p4Pq5D4cOj7t1eevjbdqNaTFfRJsX2HEhzpCvZRoawBsgkOMfwmbmxc7Nu
1WsmFQ3UkYPvkBo+O53WnVF/pYMlEUfE1N0QIX3303oRMpsLnUdccDLDKhzep8Ca
hTy0TH06BPWd2X4bh1cA6vr4xkVdPJ2FuQ6OKoPiPwcSCoYS0qb+DDO55CxubDBV
q6NcC7Hggod1NdL3qHolPNPacq2HZpkVTASWd4Lm54QCAtmP8gTP45FrxENsRi8I
7RDqPTSf63chNpW7K9JNISPea4tld0cyoCpL9WjQCgAoXrl9AOU+LZMVY6ZLmwr2
tYncfUBEcE+VMz396qRPUwpbzTSdSFASOw0TwKbhKgOb8G6oC5hLVABVIqV+hEL1
TablMQpO5Fkne3wQ7ke7QT9C6IbJ87FReS1xg0hBN0Is4uWO7qqQDVJ0iJKyqzSD
Wywo5iwv5N1yzmQCQruK5I75Tfl0fJ2ZLPyYewW7jScQmGN+ZlQ=
=ss9e
-----END PGP SIGNATURE-----


R
R
Ricardo Wurmus wrote on 29 Apr 2020 17:05
Re: [bug#40959] [PATCH 1/1] gnu: Add icedove.
(address . 40959@debbugs.gnu.org)
877dxyjpsv.fsf@elephly.net
Thank you for this patch.

Toggle quote (8 lines)
> + (arguments
> + `(#:tests? #f ; no check target
> + ;; XXX: There are RUNPATH issues such as
> + ;; $prefix/lib/icecat-31.6.0/plugin-container NEEDing libmozalloc.so,
> + ;; which is not in its RUNPATH, but they appear to be harmless in
> + ;; practice somehow. See <http://hydra.gnu.org/build/378133>.
> + #:validate-runpath? #f

The comment seems to have been copied from somewhere. I don’t think
this package produces $prefix/lib/icecat-31.6.0/plugin-container

The URL is also no longer reachable.

Toggle quote (11 lines)
> + (add-after 'unpack 'remove-bundled-libraries
> + (lambda _
> + ;; Remove bundled libraries that we don't use.
> + (for-each (lambda (file)
> + (format #t "deleting '~a'...~%" file)
> + (delete-file-recursively file))
> + '(;; UNBUNDLE-ME! icu
> + ;; UNBUNDLE-ME! nss
> + "modules/zlib"))
> + #t))

This should be done in a snippet.

Toggle quote (6 lines)
> + (add-after 'patch-source-shebangs 'patch-cargo-checksums
> + (lambda _
> + (use-modules (guix build cargo-utils))
> + (let ((null-hash
> "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"))

What is this null-hash?

Toggle quote (14 lines)
> + (substitute* '("Cargo.lock" "gfx/wr/Cargo.lock")
> + (("(\"checksum .* = )\".*\"" all name)
> + (string-append name "\"" null-hash "\"")))
> + (for-each
> + (lambda (filename)
> + (delete-file filename)
> + (let ((dir (dirname filename)))
> + (display (string-append
> + "patch-cargo-checksums: generate-checksums for "
> + dir "\n"))
> + (generate-checksums dir)))
> + (find-files "third_party/rust" ".cargo-checksum.json")))
> + #t))

Oh, there are a lot of things in third_party/rust… Can this be unbundled?

Toggle quote (9 lines)
> + ; Fixes issue where each installation directory generates its own profile.
> + ; See e.g. https://trac.torproject.org/projects/tor/ticket/31457
> + (add-after 'patch-source-shebangs 'fix-profile-setting
> + (lambda _
> + (let ((mozconfigure "comm/mail/moz.configure"))
> + (substitute* mozconfigure
> + (("'MOZ_DEDICATED_PROFILES', True")
> + "'MOZ_DEDICATED_PROFILES', False")))))

This phase needs to end on #t.

Toggle quote (27 lines)
> + (replace 'configure
> + (lambda* (#:key outputs configure-flags #:allow-other-keys)
> + (let* ((out (assoc-ref outputs "out"))
> + (bash (which "bash"))
> + (abs-srcdir (getcwd))
> + (srcdir (string-append "../" (basename abs-srcdir)))
> + (flags `(,(string-append "--prefix=" out)
> + ,@configure-flags))
> + (mozconfig (string-append (getcwd) "/.mozconfig")))
> + (setenv "SHELL" bash)
> + (setenv "AUTOCONF"
> + (string-append (assoc-ref %build-inputs
> + "autoconf")
> + "/bin/autoconf"))
> + (setenv "CONFIG_SHELL" bash)
> + (setenv "QA_CONFIGURE_OPTIONS" ".*")
> + (setenv "MOZBUILD_STATE_PATH"
> + (string-append (getcwd) "/mach_state"))
> + (setenv "MOZCONFIG"
> + (string-append (getcwd) "/.mozconfig"))
> + (setenv "CC" "gcc")
> + (setenv "MOZ_NOSPAM" "1")
> + (setenv "PYTHON"
> + (string-append (assoc-ref %build-inputs
> + "python2")
> + "/bin/python"))

Looks like Python 3 could be used instead. Have you tried that?

Toggle quote (2 lines)
> + (delete-file-recursively "obj-x86_64-pc-linux-gnu")

Can this be deleted in a snippet or is this generated in some earlier
phase? Is the same directory generated on other architectures?

Toggle quote (2 lines)
> + (zero? (system* "./mach" "configure")))))

Please use (invoke …) instead of (zero? (system* …)).

Toggle quote (4 lines)
> + (replace 'build
> + (lambda _
> + (zero? (system* "./mach" "build"))))

Same here.

Toggle quote (4 lines)
> + (replace 'install
> + (lambda _
> + (zero? (system* "./mach" "install"))))

…and here.

Toggle quote (13 lines)
> + (add-after 'install 'wrap-program
> + (lambda* (#:key inputs outputs #:allow-other-keys)
> + (let* ((out (assoc-ref outputs "out"))
> + (lib (string-append out "/lib"))
> + (gtk (assoc-ref inputs "gtk+"))
> + (gtk-share (string-append gtk "/share"))
> + (pulseaudio (assoc-ref inputs "pulseaudio"))
> + (pulseaudio-lib (string-append pulseaudio "/lib")))
> + (wrap-program (car (find-files lib "^thunderbird$"))
> + `("XDG_DATA_DIRS" prefix (,gtk-share))
> + `("LD_LIBRARY_PATH" prefix (,pulseaudio-lib)))
> + #t))))))

Why does thunderbird need wrapping with pulseaudio?

Toggle quote (3 lines)
> + ("python" ,python)
> + ("python2" ,python-2.7)

See above. We may be able to use Python 3 here.

Toggle quote (3 lines)
> + (home-page "https://www.thunderbird.net")
> + (synopsis "Trademarkless version of Mozilla Thunderbird")

Is the use of the name “Thunderbird” a violation of Mozilla’s trademark
policies?

--
Ricardo
E
E
Efraim Flashner wrote on 29 Apr 2020 21:47
(name . Ricardo Wurmus)(address . rekado@elephly.net)
20200429194702.GX5243@E5400
Attachment: file
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl6p2bIACgkQQarn3Mo9
g1HnlRAAtFnZdwoEuBUR88Ftnc82e/s/qFj6RJ0veKt5EiT1MNV/QlKQLhbgjLRV
U+QOqeOVC1g++HE6J8XV3f809NR5SEu3UoiLA4z51uR/gPDo+IJ4oKExQGpZ2/6e
jYZ8QAoZjoUen75PqJpC9Afp8u4g8t4wl01D0ThJ9Sd8LLDQM+LMtYDiiY0J/s+W
x1merPW3swrsj/1L2K7skbmxWJ43kZsUq7k9gfirOTdjJFNCAfj+E+UNCuVt6h9j
t/MM3q7rutxHE1vxPewZM6ajKT2WmAUEVh++dNoQ65nL05X0YqkDGFCzBNENVctS
KVrZTZW+Oux7JGYaxbz1elt+YaKgL8G//iUzQrYYKSTpFK6A8MzdbqEWyzcSb0Wb
t4WWi65Q4MuoMP3aYwhVVimzs237UWwpiI1XB0f+ThaBpYKQkp1UXWGfI0a5lLIA
90KyoFL6ODlaynBXLi4osMitiNyLfoWtlXxmhcJMXepbvdk1a/6XuQF+7f5HgP90
9F8rSU8r/dRtJh9n84cBANDN5FPj0JyyzezVzNaxmNKaC8wIfBK4eGfU6AW4ZkDY
h7xrHCi2A8Fbs7g4iOz7FD4DfgPh8PVliWQ7g3YdDmuQGzg0oyKwL9VnSZgVH2Ic
OcduOtzriBEr51G1kBEtn6YOk8MzKEAQcaWuMljwcjlzxDM+uWE=
=gi3S
-----END PGP SIGNATURE-----


R
R
Ricardo Wurmus wrote on 30 Apr 2020 15:47
(address . 40959@debbugs.gnu.org)
87lfmd5bmj.fsf@elephly.net
Another thing I just noticed: the tarball that we are working with is
2.7G unpacked. But when I download a zip of the repository at

What’s up with that?

~~~

I made a few changes to the package to fix the runpath, use invoke, and
to edit the sources in a snippet.

It would be nice if we could use the 35MB repository instead of the 2.7G
thing.

--
Ricardo
R
R
Ricardo Wurmus wrote on 30 Apr 2020 15:50
(address . 40959@debbugs.gnu.org)
87k11x5bh0.fsf@elephly.net
Ricardo Wurmus <rekado@elephly.net> writes:

Toggle quote (6 lines)
> Another thing I just noticed: the tarball that we are working with is
> 2.7G unpacked. But when I download a zip of the repository at
> https://hg.mozilla.org/comm-central I get a 35MB file.
>
> What’s up with that?

Looks like the comm-central stuff is meant to be added to the firefox
code, which contains the platform code.

This makes me wonder if we could combine this with our icecat package
and reuse the icecat sources.

--
Ricardo
R
R
Ricardo Wurmus wrote on 30 Apr 2020 22:41
(address . 40959@debbugs.gnu.org)
87imhg6702.fsf@elephly.net
Ricardo Wurmus <rekado@elephly.net> writes:

Toggle quote (3 lines)
> This makes me wonder if we could combine this with our icecat package
> and reuse the icecat sources.

We can, but I haven’t been able to find the sources in the repository
that correspond to the release, so I’m just taking the huge release
tarball and cut out the “comm” directory…

Attached is my latest version of the patch.

Problem is: this is still just Thunderbird, not Icedove. At the very
least we should rename it.

--
Ricardo
R
R
Ricardo Wurmus wrote on 2 May 2020 12:08
[PATCH v2] gnu: Add icedove.
(address . 40959@debbugs.gnu.org)
20200502100842.29566-1-rekado@elephly.net
From: Jonathan Brielmaier <jonathan.brielmaier@web.de>

* gnu/packages/gnuzilla.scm (%icedove-build-id, icedove): New variables.

Co-authored-by: Nikita <nikita@n0.is>
Co-authored-by: Adrian Malacoda <malacoda@monarch-pass.net>
Co-authored-by: Ricardo Wurmus <rekado@elephly.net>
---
gnu/local.mk | 1 +
gnu/packages/gnuzilla.scm | 248 +++++++++++++++++++++++++++++++++++++-
2 files changed, 247 insertions(+), 2 deletions(-)

Toggle diff (284 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 26d26ee215..98eaf11db8 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -265,6 +265,7 @@ GNU_SYSTEM_MODULES = \
%D%/packages/hyperledger.scm \
%D%/packages/i2p.scm \
%D%/packages/ibus.scm \
+ %D%/packages/icedove.scm \
%D%/packages/icu4c.scm \
%D%/packages/idris.scm \
%D%/packages/idutils.scm \
diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm
index 06d855ee3e..d05c707293 100644
--- a/gnu/packages/gnuzilla.scm
+++ b/gnu/packages/gnuzilla.scm
@@ -6,12 +6,14 @@
;;; Copyright © 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
-;;; Copyright © 2017 ng0 <ng0@n0.is>
+;;; Copyright © 2017, 2018 Nikita <nikita@n0.is>
;;; Copyright © 2017, 2018, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
-;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2018, 2020 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2019 Ivan Petkov <ivanppetkov@gmail.com>
;;; Copyright © 2020 Oleg Pykhalov <go.wigust@gmail.com>
;;; Copyright © 2020 Jakub K?dzio?ka <kuba@kadziolka.net>
+;;; Copyright © 2019, 2020 Adrian Malacoda <malacoda@monarch-pass.net>
+;;; Copyright © 2020 Jonathan Brielmaier <jonathan.brielmaier@web.de>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1142,6 +1144,248 @@ standards of the IceCat project.")
(cpe-name . "firefox_esr")
(cpe-version . ,(first (string-split version #\-)))))))
+;; Update this together with icecat!
+(define %icedove-build-id "20200428000000")
+(define-public icedove
+ (package
+ (name "icedove")
+ (version "68.7.0")
+ (source icecat-source)
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f ; no check target
+ #:imported-modules ,%cargo-utils-modules ;for `generate-all-checksums'
+
+ #:modules ((guix build utils) ;find-files
+ (ice-9 regex)
+ ,@%gnu-build-system-modules)
+
+ #:phases
+ (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")
+ ;; The build scripts does not like files from 1970
+ (let ((circa-1980 (* 10 366 24 60 60)))
+ (for-each (lambda (file)
+ (utime file circa-1980 circa-1980))
+ (find-files "comm")))
+ (delete-file-recursively "obj-x86_64-pc-linux-gnu")
+ (delete-file "sourcestamp.txt")
+ #t))
+ (add-after 'patch-source-shebangs 'patch-cargo-checksums
+ (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"))
+ #t))
+ ;; Fixes issue where each installation directory generates its own profile.
+ ;; See e.g. https://trac.torproject.org/projects/tor/ticket/31457
+ (add-after 'patch-source-shebangs 'fix-profile-setting
+ (lambda _
+ (substitute* "comm/mail/moz.configure"
+ (("'MOZ_DEDICATED_PROFILES', True")
+ "'MOZ_DEDICATED_PROFILES', False"))
+ #t))
+ (add-after 'prepare-thunderbird-sources 'rename-to-icedove
+ (lambda _
+ (substitute* "comm/mail/confvars.sh"
+ (("MOZ_APP_BASENAME=Thunderbird")
+ "MOZ_APP_BASENAME=Icedove")
+ (("MOZ_APP_NAME=thunderbird")
+ "MOZ_APP_NAME=icedove")
+ (("MOZ_UPDATER=1")
+ "MOZ_UPDATER=0"))
+ (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)))
+ #t))
+ (add-after 'build 'neutralize-store-references
+ (lambda _
+ ;; Mangle the store references to compilers & other build tools in
+ ;; about:buildconfig, reducing Icedove's closure significant.
+ ;; The resulting files are saved in lib/thunderbird/omni.ja
+ (substitute*
+ ;; Use find because the path "obj-x86_64-pc-linux-gnu" contains
+ ;; the architecture and the system -> more complicated.
+ (find-files "." "buildconfig.html")
+ (((format #f "(~a/)([0-9a-df-np-sv-z]{32})"
+ (regexp-quote (%store-directory)))
+ _ store hash)
+ (string-append store
+ (string-take hash 8)
+ "<!-- Guix: not a runtime dependency -->"
+ (string-drop hash 8))))
+ #t))
+ (replace 'configure
+ (lambda* (#:key inputs outputs configure-flags #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bash (which "bash"))
+ (abs-srcdir (getcwd))
+ (srcdir (string-append "../" (basename abs-srcdir)))
+ (flags `(,(string-append "--prefix=" out)
+ ,@configure-flags))
+ (mozconfig (string-append (getcwd) "/.mozconfig")))
+ (setenv "SHELL" bash)
+ (setenv "AUTOCONF"
+ (string-append (assoc-ref %build-inputs
+ "autoconf")
+ "/bin/autoconf"))
+ (setenv "CONFIG_SHELL" bash)
+ (setenv "QA_CONFIGURE_OPTIONS" ".*")
+ (setenv "MOZBUILD_STATE_PATH"
+ (string-append (getcwd) "/mach_state"))
+ (setenv "MOZCONFIG"
+ (string-append (getcwd) "/.mozconfig"))
+ (setenv "CC" "gcc")
+ (setenv "MOZ_NOSPAM" "1")
+ (setenv "PYTHON"
+ (string-append (assoc-ref inputs "python2")
+ "/bin/python"))
+ (setenv "MOZ_BUILD_DATE" ,%icedove-build-id) ; avoid timestamp
+ (setenv "LDFLAGS" (string-append "-Wl,-rpath="
+ (assoc-ref outputs "out")
+ "/lib/icedove"))
+ (mkdir-p (string-append (getcwd) "/builddir"))
+ (with-output-to-file mozconfig
+ (lambda ()
+ (display
+ (string-append
+ "ac_add_options --disable-crashreporter\n"
+ "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-necko-wifi\n"
+ "ac_add_options --disable-official-branding\n"
+ "ac_add_options --disable-tests\n"
+ "ac_add_options --disable-updater\n"
+ "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"
+ "ac_add_options --with-libclang-path=" (assoc-ref %build-inputs "clang") "/lib\n"
+ "ac_add_options --with-system-bz2\n"
+ "ac_add_options --with-system-icu\n"
+ "ac_add_options --with-system-jpeg\n"
+ "ac_add_options --with-system-libevent\n"
+ "ac_add_options --with-system-nspr\n"
+ "ac_add_options --with-system-nss\n"
+ "ac_add_options --with-system-zlib\n"
+ "ac_add_options --with-user-appdir=\\.icedove\n"))))
+ (display (getcwd))
+ (newline)
+ (display "mach configure")
+ (invoke "./mach" "configure"))))
+ (replace 'build
+ (lambda _ (invoke "./mach" "build")))
+ (replace 'install
+ (lambda _ (invoke "./mach" "install")))
+ (add-after 'install 'wrap-program
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (lib (string-append out "/lib"))
+ (gtk (assoc-ref inputs "gtk+"))
+ (gtk-share (string-append gtk "/share"))
+ (pulseaudio (assoc-ref inputs "pulseaudio"))
+ (pulseaudio-lib (string-append pulseaudio "/lib")))
+ (wrap-program (car (find-files lib "^icedove$"))
+ `("XDG_DATA_DIRS" prefix (,gtk-share))
+ `("LD_LIBRARY_PATH" prefix (,pulseaudio-lib)))
+ #t))))))
+ (inputs
+ `(("bzip2" ,bzip2)
+ ("cairo" ,cairo)
+ ("cups" ,cups)
+ ("dbus-glib" ,dbus-glib)
+ ("ffmpeg" ,ffmpeg)
+ ("freetype" ,freetype)
+ ("gdk-pixbuf" ,gdk-pixbuf)
+ ("glib" ,glib)
+ ("gtk+" ,gtk+)
+ ("gtk+-2" ,gtk+-2)
+ ("hunspell" ,hunspell)
+ ("icu4c" ,icu4c)
+ ("libcanberra" ,libcanberra)
+ ("libevent" ,libevent)
+ ("libffi" ,libffi)
+ ("libgnome" ,libgnome)
+ ("libjpeg-turbo" ,libjpeg-turbo)
+ ("libpng-apng" ,libpng-apng)
+ ("libvpx" ,libvpx)
+ ("libxcomposite" ,libxcomposite)
+ ("libxft" ,libxft)
+ ("libxinerama" ,libxinerama)
+ ("libxscrnsaver" ,libxscrnsaver)
+ ("libxt" ,libxt)
+ ("mesa" ,mesa)
+ ("mit-krb5" ,mit-krb5)
+ ("nspr" ,nspr)
+ ("nss" ,nss)
+ ("pango" ,pango)
+ ("pixman" ,pixman)
+ ("pulseaudio" ,pulseaudio)
+ ("sqlite" ,sqlite)
+ ("startup-notification" ,startup-notification)
+ ("unzip" ,unzip)
+ ("zip" ,zip)
+ ("zlib" ,zlib)))
+ (native-inputs
+ `(("thunderbird-sources"
+ ,(let ((changeset "f7099fd16d6f5dff22154eab3161674142501739"))
+ (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
+ "1x0351wy0i1560893kzclyimpvj7cykavrkzsfrhgd8kycp4mf92")))))
+ ("autoconf" ,autoconf-2.13)
+ ("cargo" ,rust "cargo")
+ ("clang" ,clang)
+ ("llvm" ,llvm)
+ ("nasm" ,nasm)
+ ("node" ,node)
+ ("perl" ,perl)
+ ("pkg-config" ,pkg-config)
+ ("python" ,python)
+ ("python2" ,python-2.7)
+ ("rust" ,rust)
+ ("rust-cbindgen" ,rust-cbindgen)
+ ("which" ,which)
+ ("yasm" ,yasm)))
+ (home-page "https://www.thunderbird.net")
+ (synopsis "Rebranded Mozilla Thunderbird email client")
+ (description
+ "This package provides an email client built based on Mozilla
+Thunderbird. It supports email, news feeds, chat, calendar and contacts.")
+ (license license:mpl2.0)))
+
(define-public firefox-decrypt
(package
(name "firefox-decrypt")
--
2.25.1
R
R
Ricardo Wurmus wrote on 2 May 2020 12:48
(address . 40959@debbugs.gnu.org)
87bln6629l.fsf@elephly.net
The executable and the lib directory are now renamed to icedove. The
image shown on the about screen of the calendar still mentions
“Thunderbird Daily”, and the application.ini file still use Thunderbird
Daily as the code name.

I removed another useless build phase, removed alsa-lib from the inputs
(works fine without), and we’re now using the sources directly from the
Mercurial repositories. The changeset to use is mentioned in the
release tarball’s sourcestamp.txt file.

I think the branding still should be modified some more, but I think
we’re getting close to an acceptable version.

--
Ricardo
R
R
Ricardo Wurmus wrote on 3 May 2020 23:41
[PATCH] gnu: Add icedove.
(address . 40959@debbugs.gnu.org)
20200503214115.26975-1-rekado@elephly.net
From: Jonathan Brielmaier <jonathan.brielmaier@web.de>

* gnu/packages/gnuzilla.scm (%icedove-build-id, icedove): New variables.

Co-authored-by: Nikita <nikita@n0.is>
Co-authored-by: Adrian Malacoda <malacoda@monarch-pass.net>
Co-authored-by: Ricardo Wurmus <rekado@elephly.net>
---
gnu/packages/gnuzilla.scm | 302 +++++++++++++++++++++++++++++++++++++-
1 file changed, 300 insertions(+), 2 deletions(-)

Toggle diff (326 lines)
diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm
index 06d855ee3e..f6143591fc 100644
--- a/gnu/packages/gnuzilla.scm
+++ b/gnu/packages/gnuzilla.scm
@@ -6,12 +6,14 @@
;;; Copyright © 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
-;;; Copyright © 2017 ng0 <ng0@n0.is>
+;;; Copyright © 2017, 2018 Nikita <nikita@n0.is>
;;; Copyright © 2017, 2018, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
-;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2018, 2020 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2019 Ivan Petkov <ivanppetkov@gmail.com>
;;; Copyright © 2020 Oleg Pykhalov <go.wigust@gmail.com>
;;; Copyright © 2020 Jakub K?dzio?ka <kuba@kadziolka.net>
+;;; Copyright © 2019, 2020 Adrian Malacoda <malacoda@monarch-pass.net>
+;;; Copyright © 2020 Jonathan Brielmaier <jonathan.brielmaier@web.de>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1142,6 +1144,302 @@ standards of the IceCat project.")
(cpe-name . "firefox_esr")
(cpe-version . ,(first (string-split version #\-)))))))
+;; Update this together with icecat!
+(define %icedove-build-id "20200428000000")
+(define-public icedove
+ (package
+ (name "icedove")
+ (version "68.7.0")
+ (source icecat-source)
+ (properties
+ `((cpe-name . "thunderbird_esr")))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f ; no check target
+ #:imported-modules ,%cargo-utils-modules ;for `generate-all-checksums'
+ #:modules ((guix build utils) ;find-files
+ (sxml simple)
+ (ice-9 regex)
+ ,@%gnu-build-system-modules)
+ #:phases
+ (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))
+ (add-after 'patch-source-shebangs 'patch-cargo-checksums
+ (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"))
+ #t))
+ ;; Fixes issue where each installation directory generates its own profile.
+ ;; See e.g. https://trac.torproject.org/projects/tor/ticket/31457
+ (add-after 'patch-source-shebangs 'fix-profile-setting
+ (lambda _
+ (substitute* "comm/mail/moz.configure"
+ (("'MOZ_DEDICATED_PROFILES', True")
+ "'MOZ_DEDICATED_PROFILES', False"))
+ #t))
+ (add-after 'prepare-thunderbird-sources 'rename-to-icedove
+ (lambda _
+ (substitute* "comm/mail/confvars.sh"
+ (("MOZ_APP_BASENAME=Thunderbird")
+ "MOZ_APP_BASENAME=Icedove\nMOZ_APP_DISPLAYNAME=Icedove")
+ (("MOZ_APP_NAME=thunderbird")
+ "MOZ_APP_NAME=icedove")
+ (("MOZ_UPDATER=1")
+ "MOZ_UPDATER=0"))
+ ;; Remove branding to comply with Mozilla's trademark policy
+ (with-directory-excursion "comm/mail/branding/nightly"
+ (delete-file "content/about-wordmark.svg")
+ (call-with-output-file "content/about-wordmark.svg"
+ (lambda (port)
+ (sxml->xml '(svg (@ (xmlns "http://www.w3.org/2000/svg")
+ (viewBox "0 0 789.1 90.78")
+ (width "333")
+ (height "48")
+ (fill "#fff"))
+ (text (@ (x "400") (y "70")
+ (text-anchor "middle")
+ (font-size "90"))
+ "Icedove Daily"))
+ port)))
+ (substitute* '("locales/en-US/brand.properties"
+ "locales/en-US/brand.ftl"
+ "locales/en-US/brand.dtd"
+ "configure.sh")
+ (("Thunderbird") "Icedove")
+ (("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")
+ (("Thunderbird") "Icedove")))
+ (with-directory-excursion "comm/mail/components/"
+ (substitute* '("mailGlue.js"
+ "extensions/schemas/addressBook.json"
+ "extensions/schemas/tabs.json"
+ "extensions/schemas/cloudFile.json"
+ "extensions/schemas/chrome_settings_overrides.json"
+ "extensions/schemas/windows.json"
+ "extensions/parent/ext-mail.js"
+ "im/messages/mail/Info.plist"
+ "enterprisepolicies/moz.build"
+ "enterprisepolicies/helpers/moz.build"
+ "enterprisepolicies/schemas/moz.build"
+ "preferences/chat.inc.xul")
+ (("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)))
+
+ ;; Override addon URLs and settings
+ (substitute* "comm/mail/app/profile/all-thunderbird.js"
+ (("pref\\(\"extensions.webservice.discoverURL\".*" m)
+ (string-append m ", \"https://directory.fsf.org/wiki/Icedove\");"))
+ (("pref\\(\"extensions.getAddons.search.url\".*" m)
+ (string-append m ", \"https://guix.gnu.org/packages\");"))
+ (("pref\\(\"extensions.update.enabled\".*" m)
+ (string-append m ", false);"))
+ (("pref\\(\"extensions.systemAddon.update.enabled\".*" m)
+ (string-append m ", false);"))
+ (("pref\\(\"lightweightThemes.update.enabled\".*" m)
+ (string-append m ", false);")))
+ #t))
+ (add-after 'build 'neutralize-store-references
+ (lambda _
+ ;; Mangle the store references to compilers & other build tools in
+ ;; about:buildconfig, reducing Icedove's closure significant.
+ ;; The resulting files are saved in lib/thunderbird/omni.ja
+ (substitute*
+ ;; Use find because the path "obj-x86_64-pc-linux-gnu" contains
+ ;; the architecture and the system -> more complicated.
+ (find-files "." "buildconfig.html")
+ (((format #f "(~a/)([0-9a-df-np-sv-z]{32})"
+ (regexp-quote (%store-directory)))
+ _ store hash)
+ (string-append store
+ (string-take hash 8)
+ "<!-- Guix: not a runtime dependency -->"
+ (string-drop hash 8))))
+ #t))
+ (replace 'configure
+ (lambda* (#:key inputs outputs configure-flags #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bash (which "bash"))
+ (abs-srcdir (getcwd))
+ (srcdir (string-append "../" (basename abs-srcdir)))
+ (flags `(,(string-append "--prefix=" out)
+ ,@configure-flags))
+ (mozconfig (string-append (getcwd) "/.mozconfig")))
+ (setenv "SHELL" bash)
+ (setenv "AUTOCONF"
+ (string-append (assoc-ref %build-inputs
+ "autoconf")
+ "/bin/autoconf"))
+ (setenv "CONFIG_SHELL" bash)
+ (setenv "QA_CONFIGURE_OPTIONS" ".*")
+ (setenv "MOZBUILD_STATE_PATH"
+ (string-append (getcwd) "/mach_state"))
+ (setenv "MOZCONFIG"
+ (string-append (getcwd) "/.mozconfig"))
+ (setenv "CC" "gcc")
+ (setenv "MOZ_NOSPAM" "1")
+ (setenv "PYTHON"
+ (string-append (assoc-ref inputs "python2")
+ "/bin/python"))
+ (setenv "MOZ_BUILD_DATE" ,%icedove-build-id) ; avoid timestamp
+ (setenv "LDFLAGS" (string-append "-Wl,-rpath="
+ (assoc-ref outputs "out")
+ "/lib/icedove"))
+ (mkdir-p (string-append (getcwd) "/builddir"))
+ (with-output-to-file mozconfig
+ (lambda ()
+ (display
+ (string-append
+ "ac_add_options --disable-crashreporter\n"
+ "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-necko-wifi\n"
+ "ac_add_options --disable-official-branding\n"
+ "ac_add_options --disable-tests\n"
+ "ac_add_options --disable-updater\n"
+ "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"
+ "ac_add_options --with-libclang-path=" (assoc-ref %build-inputs "clang") "/lib\n"
+ "ac_add_options --with-system-bz2\n"
+ "ac_add_options --with-system-icu\n"
+ "ac_add_options --with-system-jpeg\n"
+ "ac_add_options --with-system-libevent\n"
+ "ac_add_options --with-system-nspr\n"
+ "ac_add_options --with-system-nss\n"
+ "ac_add_options --with-system-zlib\n"
+ "ac_add_options --with-user-appdir=\\.icedove\n"))))
+ (display (getcwd))
+ (newline)
+ (display "mach configure")
+ (invoke "./mach" "configure"))))
+ (replace 'build
+ (lambda _ (invoke "./mach" "build")))
+ (replace 'install
+ (lambda _ (invoke "./mach" "install")))
+ (add-after 'install 'wrap-program
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (lib (string-append out "/lib"))
+ (gtk (assoc-ref inputs "gtk+"))
+ (gtk-share (string-append gtk "/share"))
+ (pulseaudio (assoc-ref inputs "pulseaudio"))
+ (pulseaudio-lib (string-append pulseaudio "/lib")))
+ (wrap-program (car (find-files lib "^icedove$"))
+ `("XDG_DATA_DIRS" prefix (,gtk-share))
+ `("LD_LIBRARY_PATH" prefix (,pulseaudio-lib)))
+ #t))))))
+ (inputs
+ `(("bzip2" ,bzip2)
+ ("cairo" ,cairo)
+ ("cups" ,cups)
+ ("dbus-glib" ,dbus-glib)
+ ("ffmpeg" ,ffmpeg)
+ ("freetype" ,freetype)
+ ("gdk-pixbuf" ,gdk-pixbuf)
+ ("glib" ,glib)
+ ("gtk+" ,gtk+)
+ ("gtk+-2" ,gtk+-2)
+ ("hunspell" ,hunspell)
+ ("icu4c" ,icu4c)
+ ("libcanberra" ,libcanberra)
+ ("libevent" ,libevent)
+ ("libffi" ,libffi)
+ ("libgnome" ,libgnome)
+ ("libjpeg-turbo" ,libjpeg-turbo)
+ ("libpng-apng" ,libpng-apng)
+ ("libvpx" ,libvpx)
+ ("libxcomposite" ,libxcomposite)
+ ("libxft" ,libxft)
+ ("libxinerama" ,libxinerama)
+ ("libxscrnsaver" ,libxscrnsaver)
+ ("libxt" ,libxt)
+ ("mesa" ,mesa)
+ ("mit-krb5" ,mit-krb5)
+ ("nspr" ,nspr)
+ ("nss" ,nss)
+ ("pango" ,pango)
+ ("pixman" ,pixman)
+ ("pulseaudio" ,pulseaudio)
+ ("sqlite" ,sqlite)
+ ("startup-notification" ,startup-notification)
+ ("unzip" ,unzip)
+ ("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 "f7099fd16d6f5dff22154eab3161674142501739"))
+ (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
+ "1x0351wy0i1560893kzclyimpvj7cykavrkzsfrhgd8kycp4mf92")))))
+ ("autoconf" ,autoconf-2.13)
+ ("cargo" ,rust "cargo")
+ ("clang" ,clang)
+ ("llvm" ,llvm)
+ ("nasm" ,nasm)
+ ("node" ,node)
+ ("perl" ,perl)
+ ("pkg-config" ,pkg-config)
+ ("python" ,python)
+ ("python2" ,python-2.7)
+ ("rust" ,rust)
+ ("rust-cbindgen" ,rust-cbindgen)
+ ("which" ,which)
+ ("yasm" ,yasm)))
+ (home-page "https://www.thunderbird.net")
+ (synopsis "Rebranded Mozilla Thunderbird email client")
+ (description
+ "This package provides an email client built based on Mozilla
+Thunderbird. It supports email, news feeds, chat, calendar and contacts.")
+ (license license:mpl2.0)))
+
(define-public firefox-decrypt
(package
(name "firefox-decrypt")
--
2.25.1
R
R
Ricardo Wurmus wrote on 3 May 2020 23:47
(address . 40959@debbugs.gnu.org)
87lfm84rom.fsf@elephly.net
Noteworthy changes in this version:

* add the CPE name for CVE checks with “guix lint”
* “rename-to-icedove” now also replaces mentions of “Thunderbird” with
“Icedove” in user-visible text and at least one image.
* the addon directory URL has been replaced with the FSF software
directory URL, and the addon search page has been replaced with the
Guix package list.

If there are no objections I’ll merge this next week.

--
Ricardo
R
R
Ricardo Wurmus wrote on 3 May 2020 23:50
(address . 40959@debbugs.gnu.org)
87k11s4rib.fsf@elephly.net
Oh, I only just noticed this item from Jonathan’s list:

* Adrian needs to sign-off as he worked on this patch under GNU AGPL3.

This is a blocker. Package definitions must be GPLv3 or later to be
included in Guix.

--
Ricardo
A
A
Adrian Malacoda wrote on 5 May 2020 21:04
(name . Ricardo Wurmus)(address . rekado@elephly.net)
fc8b6730022bce4c260199bd63307c76@monarch-pass.net
Hello all,

I give permission for my work on the Icedove package to be relicensed as
GPLv3 for inclusion in Guix. Thank you all for picking up this package
and continuing to work on it.
R
R
Ricardo Wurmus wrote on 6 May 2020 13:32
(name . Adrian Malacoda)(address . adrian.malacoda@monarch-pass.net)
87a72l47uh.fsf@elephly.net
Adrian Malacoda <adrian.malacoda@monarch-pass.net> writes:

Toggle quote (4 lines)
> I give permission for my work on the Icedove package to be relicensed
> as GPLv3 for inclusion in Guix. Thank you all for picking up this
> package and continuing to work on it.

Thank you Adrian.

I apologize for being picky. Do you also permit relicensing under GPL
“version 3 or later” (not just “version 3”) as the rest of Guix?

--
Ricardo
A
A
Adrian Malacoda wrote on 6 May 2020 22:32
(name . Ricardo Wurmus)(address . rekado@elephly.net)
ff93765144a310129dd546a4d6e4370d@monarch-pass.net
On 2020-05-06 06:32, Ricardo Wurmus wrote:
Toggle quote (11 lines)
> Adrian Malacoda <adrian.malacoda@monarch-pass.net> writes:
>
>> I give permission for my work on the Icedove package to be relicensed
>> as GPLv3 for inclusion in Guix. Thank you all for picking up this
>> package and continuing to work on it.
>
> Thank you Adrian.
>
> I apologize for being picky. Do you also permit relicensing under GPL
> “version 3 or later” (not just “version 3”) as the rest of Guix?

Yes, I meant to say "GPL version 3 or later." Thanks
R
R
Ricardo Wurmus wrote on 7 May 2020 15:44
(name . Adrian Malacoda)(address . adrian.malacoda@monarch-pass.net)
87zhaj3lm9.fsf@elephly.net
Adrian Malacoda <adrian.malacoda@monarch-pass.net> writes:

Toggle quote (2 lines)
> Yes, I meant to say "GPL version 3 or later." Thanks

Excellent, thank you.

I upgraded Icedove to the latest version, fixed a bug in my patches to
all-thunderbird.js, and pushed it to the master branch with commit
b14aab6710.

We’re done!

--
Ricardo
Closed
?