From patchwork Thu Apr 30 20:41:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ricardo Wurmus X-Patchwork-Id: 21778 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 5F72527BBE4; Thu, 30 Apr 2020 21:43:40 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,T_DKIM_INVALID,URIBL_BLOCKED,URIBL_SBL,URIBL_SBL_A autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:470:142::17]) by mira.cbaines.net (Postfix) with ESMTP id 179D127BBE1 for ; Thu, 30 Apr 2020 21:43:36 +0100 (BST) Received: from localhost ([::1]:34242 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jUG1v-0000c6-KX for patchwork@mira.cbaines.net; Thu, 30 Apr 2020 16:43:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44666) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jUG1c-0000UK-Lj for guix-patches@gnu.org; Thu, 30 Apr 2020 16:43:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jUG1P-0000YA-Pp for guix-patches@gnu.org; Thu, 30 Apr 2020 16:43:16 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36248) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jUG1O-0000UK-AL for guix-patches@gnu.org; Thu, 30 Apr 2020 16:43:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jUG1O-0004If-5T for guix-patches@gnu.org; Thu, 30 Apr 2020 16:43:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#40959] [PATCH 1/1] gnu: Add icedove. Resent-From: Ricardo Wurmus Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 30 Apr 2020 20:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40959 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 40959@debbugs.gnu.org Cc: malacoda@monarch-pass.net, gillmann@infotropique.org, Jonathan Brielmaier Received: via spool by 40959-submit@debbugs.gnu.org id=B40959.158827933916480 (code B ref 40959); Thu, 30 Apr 2020 20:43:02 +0000 Received: (at 40959) by debbugs.gnu.org; 30 Apr 2020 20:42:19 +0000 Received: from localhost ([127.0.0.1]:47794 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jUG0U-0004HT-3p for submit@debbugs.gnu.org; Thu, 30 Apr 2020 16:42:18 -0400 Received: from sender4-of-o53.zoho.com ([136.143.188.53]:21398) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jUG0M-0004Gx-38 for 40959@debbugs.gnu.org; Thu, 30 Apr 2020 16:42:05 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1588279315; cv=none; d=zohomail.com; s=zohoarc; b=FbRlPvSP0A0QklpJGHNSM+BvhMyzTs178yPUuH8myVqbV6Mmhjy5RvUcFSVprtCVoFo1N2LsMbEU4XE0pQ9xPYY+imy7hdOEF6H34N1gf35YtBIn9zSBlMOJLEmW25QKCEkn5ogWxhF2TjcU3E+xyULP/DAEtgJugt0xZDwCwPs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588279315; h=Content-Type:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=1VTL6D+N6R0wBcrvgk50Ud1cumvBqPviOwGsbs2krmo=; b=MdPN23vddpaOABdQOpcFUJJGmB+m0hnr/MSlKIoVrCUr+gUfmHpQV2Z6g+emZ2wNZ/JYIBO0afWLhWY4X80lgxjwmHRNHmTQ2DJhOafFFx4BO6PFXaSz5nueitIBPUI6hcXaOmICCvVLNSZ9pBX0I3jNpEJE1Grqs21sMYjImhU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1588279315; s=zoho; d=elephly.net; i=rekado@elephly.net; h=References:From:To:Cc:Subject:In-reply-to:Date:Message-ID:MIME-Version:Content-Type; bh=1VTL6D+N6R0wBcrvgk50Ud1cumvBqPviOwGsbs2krmo=; b=fEXry5Jdy9HxoqATOT06Z6OnkgwDGI2N2AY0r78QxX/8LN3VY6jMYw+rwl7yAOND 5OkIb+xKDW9LaGNJ7yjhKuPoLNlKl2tZfJhU4L8dFTbKd2PsBqwfnaorthx/2QfiE2W dVOS51vFkQOQPZRwcQtA5sjkurqT76TqOHWk1s6s= Received: from localhost (p54AD4F86.dip0.t-ipconnect.de [84.173.79.134]) by mx.zohomail.com with SMTPS id 1588279312931322.2660779753297; Thu, 30 Apr 2020 13:41:52 -0700 (PDT) References: <20200429105614.11517-1-jonathan.brielmaier@web.de> <20200429110018.11677-1-jonathan.brielmaier@web.de> <877dxyjpsv.fsf@elephly.net> <87lfmd5bmj.fsf@elephly.net> <87k11x5bh0.fsf@elephly.net> User-agent: mu4e 1.2.0; emacs 26.3 From: Ricardo Wurmus In-reply-to: <87k11x5bh0.fsf@elephly.net> X-URL: https://elephly.net X-PGP-Key: https://elephly.net/rekado.pubkey X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC Date: Thu, 30 Apr 2020 22:41:49 +0200 Message-ID: <87imhg6702.fsf@elephly.net> MIME-Version: 1.0 X-ZohoMailClient: External X-Zoho-Virus-Status: 1 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Ricardo Wurmus writes: > 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. From 85d7439dec310e94548c393ab66981c5f81182e6 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Thu, 30 Apr 2020 22:39:10 +0200 Subject: [PATCH] WIP gnu: Add icedove. * gnu/packages/gnuzilla.scm (%icedove-build-id, icedove): New variables. --- gnu/packages/gnuzilla.scm | 253 +++++++++++++++++++++++++++++++++++++- 1 file changed, 251 insertions(+), 2 deletions(-) diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index 06d855ee3e..54ace31364 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -6,12 +6,14 @@ ;;; Copyright © 2016, 2017, 2018, 2019 Efraim Flashner ;;; Copyright © 2016 Alex Griffin ;;; Copyright © 2017 Clément Lassieur -;;; Copyright © 2017 ng0 +;;; Copyright © 2017, 2018 Nikita ;;; Copyright © 2017, 2018, 2020 Tobias Geerinckx-Rice -;;; Copyright © 2018 Ricardo Wurmus +;;; Copyright © 2018, 2020 Ricardo Wurmus ;;; Copyright © 2019 Ivan Petkov ;;; Copyright © 2020 Oleg Pykhalov ;;; Copyright © 2020 Jakub Kądziołka +;;; Copyright © 2019, 2020 Adrian Malacoda +;;; Copyright © 2020 Jonathan Brielmaier ;;; ;;; This file is part of GNU Guix. ;;; @@ -1142,6 +1144,253 @@ 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) + (invoke "tar" "xf" (assoc-ref inputs "thunderbird-sources") + "--strip-components=1") + ;; 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") + #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 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 "\""))) + (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 '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) + "" + (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/thunderbird")) + (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") + (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 "^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 + `(("thunderbird-sources" + ,(origin + (method url-fetch) + (uri (string-append "https://archive.mozilla.org/pub/" + "thunderbird/releases/" + version "/source/thunderbird-" version + ".source.tar.xz")) + (sha256 + (base32 + "112by5xzy9f28fj35yz644vby3c957apj5by2xm8b3qxxqpzsbmw")) + (modules '((guix build utils))) + (snippet + '(begin + (use-modules (ice-9 ftw)) + (let ((select (lambda (name) + (and (string<> "comm" name) + (string<> "sourcestamp.txt"))))) + (for-each delete-file-recursively + (delete ".." (delete "." (scandir "." select)))) + #t))))) + ("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 "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))) + (define-public firefox-decrypt (package (name "firefox-decrypt") -- 2.25.1