From a6ce5ebc121f129c3097f1f105b6a4de925b43e9 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Tue, 17 Apr 2018 03:54:56 +0200 Subject: [PATCH] Chromium 66 update. --- gnu/local.mk | 1 - gnu/packages/chromium.scm | 173 ++++++++++++------ .../patches/chromium-glibc-compat.patch | 38 ---- 3 files changed, 115 insertions(+), 97 deletions(-) delete mode 100644 gnu/packages/patches/chromium-glibc-compat.patch diff --git a/gnu/local.mk b/gnu/local.mk index fdb15a074..0bc3220f8 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -592,7 +592,6 @@ dist_patch_DATA = \ %D%/packages/patches/ceph-skip-collect-sys-info-test.patch \ %D%/packages/patches/ceph-skip-unittest_blockdev.patch \ %D%/packages/patches/chmlib-inttypes.patch \ - %D%/packages/patches/chromium-glibc-compat.patch \ %D%/packages/patches/chromium-remove-default-history.patch \ %D%/packages/patches/clang-3.5-libc-search-path.patch \ %D%/packages/patches/clang-3.8-libc-search-path.patch \ diff --git a/gnu/packages/chromium.scm b/gnu/packages/chromium.scm index cecbab7a1..a6f9fec0f 100644 --- a/gnu/packages/chromium.scm +++ b/gnu/packages/chromium.scm @@ -122,63 +122,89 @@ (sha256 (base32 hash)) (file-name (chromium-patch-file-name pathspec)))) -;; Fix an assignment bug when using Clang and libstdc++. -(define %chromium-clang-assignment.patch - (gentoo-patch "chromium-clang-r3.patch" - "804a0d7244a06736d01c353b45c20daf324f0722" - "1d10il3mjzyzwgqi8iifw3aw9jnbqfrzz8v1x7cmvqpwjkykwk2a")) - -;; Add missing stdint include. -(define %chromium-add-missing-stdint.patch - (gentoo-patch "chromium-stdint.patch" - "804a0d7244a06736d01c353b45c20daf324f0722" - "03r16zqi0hm3i00b9bwq2bdn2sp731rllizcxfl3i2q7y432a3f0")) +(define %debian-revision "debian/66.0.3359.26-1") +(define %gentoo-revision "599be358f257098e7ba29196f6fce498b0a8d208") +(define %inox-revision "365a106e298e04b4a7063559b7a0ee16888b928f") +;; Use system NSPR. (define %chromium-system-nspr.patch (debian-patch "system/nspr.patch" - "debian/65.0.3325.146-4" - "1ggdrlz94d75ni21rx6ivvajjwhx7zwnl3s5aapysqn9kls4qsr2")) + %debian-revision + "0x54c8zhwjldlnx4754aaq0xyb24spqia3fgn94kcf686wp61srz")) +;; And system libevent. (define %chromium-system-libevent.patch (debian-patch "system/event.patch" - "debian/65.0.3325.146-4" - "1k3zc59vpwc8rzbknxryjzzy99jk666whdablzcvxnyzaqk38kfx")) + %debian-revision + "18ka0zmfd6g5yxhknh6x94bfm643v1kgczzag5sfndizsaaxrlpc")) -(define %chromium-system-icu.patch - (debian-patch "system/icu.patch" - "debian/65.0.3325.146-4" - "19wclidx1kyjbi3b3hnmkjs0h34d67p4dp6a48vbjbx9rxmfdk3b")) +;; Avoid dependency on Chromiums embedded libc++ library for GN. +(define %chromium-gn-libcxx.patch + (debian-patch "gn/libcxx.patch" + %debian-revision + "14rx16abxv0pz4qyp194cy999z3390hxi80rdbjs3v2lwscx36cl")) ;; Don't show a warning about missing API keys. (define %chromium-disable-api-keys-warning.patch (debian-patch "disable/google-api-warning.patch" - "debian/65.0.3325.146-4" - "1g5yk51bl7svrqx8wjxsgpz545mnymnpi3bsa62kwdm4qd8bx10x")) + %debian-revision + "1qf2y7jmaya43k9rbsxjjpkp5manzmbkhjj5hvfyqcdylhy30swj")) -;; Add DuckDuckGo and set it as the default search engine. -(define %chromium-duckduckgo.patch - (inox-patch "0011-add-duckduckgo-search-engine.patch" - "0c55cc9a81634244ad13fbbd6b5c5098b9132162" - "0mvw1ax0gw3d252c9b1pwbk0j7ny8z9nsfywcmhj56wm6yksgpkg")) +;; Some files were missing in the Chromium 66 release tarball. +;; See . +(define %chromium-add-blink-tools.patch + (origin + (method url-fetch) + (uri (string-append "https://bazaar.launchpad.net/~chromium-team" + "/chromium-browser/bionic-stable/download/head:" + "/addmissingblinktools-20180416203514-02f50sz15c2mn6ei-1" + "/add-missing-blink-tools.patch")) + (sha256 + (base32 + "1im2l1g6g9mangpfphbkg6zxyglbfwbkm5jxv122yxqgm6vxzz6s")))) -;; Don't start a "Login Wizard" at first launch. -(define %chromium-first-run.patch - (inox-patch "0018-disable-first-run-behaviour.patch" - "0c55cc9a81634244ad13fbbd6b5c5098b9132162" - "1y4zsqqf2125jkb1phwy9g5hcbd9xhyv5lr4xcaly66rpdzx2ayb")) +;; Fix an assignment bug when using Clang and libstdc++. +(define %chromium-clang-assignment.patch + (gentoo-patch "chromium-clang-r4.patch" + %gentoo-revision + "0ip3pzk9is6n7icpml33ryysiq4cfrx8jlr0jkjgdg6mvl8pli3i")) + +;; Fix error detecting system ffmpeg. +(define %chromium-ffmpeg.patch + (gentoo-patch "chromium-ffmpeg-r1.patch" + %gentoo-revision + "1pivcdmana4qx8sngcdpr858l0qh6bygv7azj66vg021phq5725a")) + +;; Fix build failure when built with "safe_browsing_mode=0". +(define %chromium-build-without-safebrowsing.patch + (inox-patch "0001-fix-building-without-safebrowsing.patch" + %inox-revision + "0r1as6vmc6bbc7i54cxbmbm6rrwj33a12hfz6rzj0yxyqnnps00f")) ;; Use privacy-preserving defaults. (define %chromium-default-preferences.patch (inox-patch "0006-modify-default-prefs.patch" - "0c55cc9a81634244ad13fbbd6b5c5098b9132162" - "0zyshpl1hjssqrfhdfbgxdib4smdszjgf0ac98l978hrn9gwwk03")) + %inox-revision + "1ncjij9sib7fliafpv37j1zf8zz5hvyxqad669vvadg7vvwr9rza")) ;; Recent versions of Chromium may load a remote search engine on the ;; New Tab Page, causing unnecessary and involuntary network traffic. (define %chromium-restore-classic-ntp.patch (inox-patch "0008-restore-classic-ntp.patch" - "0c55cc9a81634244ad13fbbd6b5c5098b9132162" - "1h698cbp97g8lgmndfy6kswgwfvss7c3k609xgvyxbfldkzy7pd5")) + %inox-revision + "1jl978qas2ry9lnq6x42xl4qa6arxxj9a37k9j2wclz2pin8cmzn")) + +;; Add DuckDuckGo and set it as the default search engine. +(define %chromium-duckduckgo.patch + (inox-patch "0011-add-duckduckgo-search-engine.patch" + %inox-revision + "0mvw1ax0gw3d252c9b1pwbk0j7ny8z9nsfywcmhj56wm6yksgpkg")) + +;; Don't start a "Login Wizard" at first launch. +(define %chromium-first-run.patch + (inox-patch "0018-disable-first-run-behaviour.patch" + %inox-revision + "1y4zsqqf2125jkb1phwy9g5hcbd9xhyv5lr4xcaly66rpdzx2ayb")) (define opus+custom (package (inherit opus) @@ -194,6 +220,17 @@ (define libvpx+experimental (package (inherit libvpx) + ;; XXX: Chromium 66 relies on unreleased libvpx features. + ;; The commit below is the tip of the "m66-3359" branch + ;; as of 2018-04-19. + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://chromium.googlesource.com/webm/libvpx") + (commit "e9fff8a9dbcd03fbf3e5b7caaa9dc2631a79882a"))) + (sha256 + (base32 + "1b1d89dlbr8ydakvp82cg6xnlnkz5hj7679f4pgxwlgd6x46f4g2")))) (name "libvpx+experimental") (arguments (substitute-keyword-arguments (package-arguments libvpx) @@ -305,7 +342,7 @@ includes Clang, the Guix ld wrapper, glibc, a C++ library, and Binutils.") (define-public chromium (package (name "chromium") - (version "65.0.3325.181") + (version "66.0.3359.117") (synopsis "Graphical web browser") (source (origin (method url-fetch) @@ -314,19 +351,22 @@ includes Clang, the Guix ld wrapper, glibc, a C++ library, and Binutils.") version ".tar.xz")) (sha256 (base32 - "11w6wg862ixbgm7dpqag2lmbjknv83zlr9imd8zchvmrqr468rlk")) - (patches (list %chromium-duckduckgo.patch - %chromium-default-preferences.patch - %chromium-first-run.patch - %chromium-restore-classic-ntp.patch - - %chromium-clang-assignment.patch - %chromium-add-missing-stdint.patch - %chromium-system-icu.patch + "1mlfavs0m0lf60s42krqxqiyx73hdfd4r1mkjwv31p2gchsa7ibp")) + (patches (list %chromium-gn-libcxx.patch + %chromium-disable-api-keys-warning.patch %chromium-system-nspr.patch %chromium-system-libevent.patch - %chromium-disable-api-keys-warning.patch - (search-patch "chromium-glibc-compat.patch") + + %chromium-add-blink-tools.patch + + %chromium-clang-assignment.patch + %chromium-ffmpeg.patch + + %chromium-build-without-safebrowsing.patch + %chromium-default-preferences.patch + %chromium-restore-classic-ntp.patch + %chromium-duckduckgo.patch + %chromium-first-run.patch (search-patch "chromium-remove-default-history.patch"))) (modules '((srfi srfi-1) (srfi srfi-26) @@ -351,7 +391,6 @@ includes Clang, the Guix ld wrapper, glibc, a C++ library, and Binutils.") "base/third_party/symbolize" ;glog "base/third_party/xdg_mime" "base/third_party/xdg_user_dirs" - "buildtools/third_party/libc++" "chrome/third_party/mozilla_security_manager" "courgette/third_party" "net/third_party/mozilla_security_manager" @@ -367,6 +406,10 @@ includes Clang, the Guix ld wrapper, glibc, a C++ library, and Binutils.") "third_party/angle/src/third_party/compiler" "third_party/angle/src/third_party/libXNVCtrl" "third_party/angle/src/third_party/trace_event" + "third_party/angle/third_party/glslang" + "third_party/angle/third_party/spirv-headers" + "third_party/angle/third_party/spirv-tools" + "third_party/angle/third_party/vulkan-validation-layers" "third_party/blink" "third_party/boringssl" "third_party/boringssl/src/third_party/fiat" @@ -406,6 +449,8 @@ includes Clang, the Guix ld wrapper, glibc, a C++ library, and Binutils.") "third_party/leveldatabase" "third_party/libXNVCtrl" "third_party/libaddressinput" + "third_party/libaom" + "third_party/libaom/source/libaom/third_party/x86inc/x86inc.asm" "third_party/libjingle_xmpp" "third_party/libphonenumber" "third_party/libsecret" ;FIXME: needs pkg-config support. @@ -420,7 +465,6 @@ includes Clang, the Guix ld wrapper, glibc, a C++ library, and Binutils.") "third_party/mesa" "third_party/metrics_proto" "third_party/modp_b64" - "third_party/mt19937ar" "third_party/node" (string-append "third_party/node/node_modules/" "polymer-bundler/lib/third_party/UglifyJS2") @@ -430,7 +474,7 @@ includes Clang, the Guix ld wrapper, glibc, a C++ library, and Binutils.") "third_party/pdfium" "third_party/pdfium/third_party" (string-append "third_party/pdfium/third_party/freetype" - "/include/psnames/pstables.h") + "/include/pstables.h") "third_party/ply" "third_party/polymer" "third_party/protobuf" @@ -442,16 +486,12 @@ includes Clang, the Guix ld wrapper, glibc, a C++ library, and Binutils.") "third_party/skia/third_party/gif" "third_party/smhasher" "third_party/speech-dispatcher" - "third_party/spirv-headers" - "third_party/spirv-tools-angle" "third_party/sqlite" "third_party/swiftshader" "third_party/swiftshader/third_party" "third_party/s2cellid" "third_party/usb_ids" "third_party/usrsctp" - "third_party/vulkan" - "third_party/vulkan-validation-layers" "third_party/WebKit" "third_party/web-animations-js" "third_party/webrtc" @@ -475,6 +515,10 @@ includes Clang, the Guix ld wrapper, glibc, a C++ library, and Binutils.") #t #f)) + (define (useless? file) + (any (cute string-suffix? <> file) + '(".tar.gz" ".zip" ".exe" ".jar"))) + (define (parents child) "Return a list of paths up to and including the closest third_party" (let ((lst (reverse (string-split child #\/)))) @@ -492,11 +536,12 @@ includes Clang, the Guix ld wrapper, glibc, a C++ library, and Binutils.") (let ((protected (make-regexp "\\.(gn|gyp)i?$"))) (match flag ((or 'regular 'symlink 'stale-symlink) - (when (third_party? child) + (when (or (third_party? child) (useless? child)) (unless (or (member child preserved-club) (any (cute member <> preserved-club) (parents child)) (regexp-exec protected child)) + (format (current-error-port) "deleting ~s~%" child) (delete-file child))) #t) ('directory-processed @@ -507,9 +552,11 @@ includes Clang, the Guix ld wrapper, glibc, a C++ library, and Binutils.") (nftw "." delete-unwanted 'depth 'physical) - ;; Do a second pass to get rid of various binary archives. - (for-each delete-file - (find-files "." "\\.(zip|jar|tar.gz|exe)$")) + ;; Assert that each listed item is present to catch removals. + (for-each (lambda (third-party) + (unless (file-exists? third-party) + (error (format #f "~s does not exist!" third-party)))) + preserved-club) ;; Replace "GN" files from third_party with shims for ;; building against system libraries. Keep this list in @@ -635,7 +682,12 @@ includes Clang, the Guix ld wrapper, glibc, a C++ library, and Binutils.") "override_build_date=\"01 01 2000 05:00:00\"" "use_unofficial_version_number=false" + ;; Disable "safe browsing", which pulls in a dependency + ;; on the nonfree "unrar" program. + "safe_browsing_mode=0" + ;; GCC is poorly supported, so we use Clang for now. + ;;"is_clang=false" (string-append "clang_base_path=\"" clang-toolchain "\"") "clang_use_chrome_plugins=false" @@ -716,6 +768,11 @@ includes Clang, the Guix ld wrapper, glibc, a C++ library, and Binutils.") (string-append (getenv "CPLUS_INCLUDE_PATH") ":" clang-toolchain "/include/x86_64-unknown-linux-gnu")) + ;; XXX: For some reason this is needed also for C code (libaom). + (setenv "C_INCLUDE_PATH" + (string-append (getenv "C_INCLUDE_PATH") + ":" clang-toolchain + "/include/x86_64-unknown-linux-gnu")) ;; TODO: pre-compile instead. Avoids a race condition. (setenv "PYTHONDONTWRITEBYTECODE" "1") diff --git a/gnu/packages/patches/chromium-glibc-compat.patch b/gnu/packages/patches/chromium-glibc-compat.patch deleted file mode 100644 index 720adbeef..000000000 --- a/gnu/packages/patches/chromium-glibc-compat.patch +++ /dev/null @@ -1,38 +0,0 @@ -Upstream-Status: Backport - -Signed-off-by: Raphael Kubo da Costa ---- -From 9f63f94a11abc34d40ede8b8712fa15b5844a8c0 Mon Sep 17 00:00:00 2001 -From: Tom Anderson -Date: Sat, 27 Jan 2018 20:03:37 +0000 -Subject: [PATCH] Fix build with glibc 2.27 - -BUG=806340 -TBR=hamelphi@chromium.org - -Change-Id: Ib4e5091212d874d9ad88f3e9a1fdfee3ed7e0d5e -Reviewed-on: https://chromium-review.googlesource.com/890059 -Reviewed-by: Thomas Anderson -Reviewed-by: Philippe Hamel -Commit-Queue: Thomas Anderson -Cr-Commit-Position: refs/heads/master@{#532249} ---- - components/assist_ranker/ranker_example_util.cc | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/components/assist_ranker/ranker_example_util.cc b/components/assist_ranker/ranker_example_util.cc -index 54d4dbd58f7d..ceedd8f9b18d 100644 ---- a/components/assist_ranker/ranker_example_util.cc -+++ b/components/assist_ranker/ranker_example_util.cc -@@ -2,6 +2,8 @@ - // Use of this source code is governed by a BSD-style license that can be - // found in the LICENSE file. - -+#include -+ - #include "components/assist_ranker/ranker_example_util.h" - #include "base/bit_cast.h" - #include "base/format_macros.h" --- -2.14.3 - -- 2.17.0