guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/03: gnu: ungoogled-chromium: Update to 76.0.3809.87-0.6ea9390.


From: guix-commits
Subject: 02/03: gnu: ungoogled-chromium: Update to 76.0.3809.87-0.6ea9390.
Date: Sun, 4 Aug 2019 07:37:29 -0400 (EDT)

mbakke pushed a commit to branch master
in repository guix.

commit 7f2e852267d3484c3b0a3457ad6f3f9ad4debe6a
Author: Marius Bakke <address@hidden>
Date:   Sat Aug 3 23:24:07 2019 +0200

    gnu: ungoogled-chromium: Update to 76.0.3809.87-0.6ea9390.
    
    * gnu/packages/chromium.scm (%preserved-third-party-files): Adjust for 76.
    (%chromium-version): Set to 76.0.3809.87.
    (%ungoogled-revision): Set to 6ea939002bae43a27910e03569d43519d07842e7.
    (%debian-revision): Set to debian/76.0.3809.87-2.
    (%chromium-origin, %ungoogled-origin, %debian-origin): Update hashes.
    (gentoo-patch, gentoo-patches): New procedures.
    (%auxiliary-patches): New variable.
    (ungoogled-chromium-source): Ignore Ungoogleds bundled Debian patches, as 
well
    as some of Debians build fixes.  Apply %AUXILIARY-PATCHES.
    (ungoogled-chromium)[arguments]: Adjust unbundling substitutions.  Do not 
set
    Blink symbol level.
---
 gnu/packages/chromium.scm | 98 ++++++++++++++++++++++++++++++++++-------------
 1 file changed, 71 insertions(+), 27 deletions(-)

diff --git a/gnu/packages/chromium.scm b/gnu/packages/chromium.scm
index d072fc5..a014486 100644
--- a/gnu/packages/chromium.scm
+++ b/gnu/packages/chromium.scm
@@ -73,7 +73,8 @@
   #:use-module (srfi srfi-1))
 
 (define %preserved-third-party-files
-  '("base/third_party/dmg_fp" ;X11-style
+  '("base/third_party/cityhash" ;Expat
+    "base/third_party/dmg_fp" ;X11-style
     "base/third_party/dynamic_annotations" ;BSD-2
     "base/third_party/icu" ;Unicode, X11-style
     "base/third_party/superfasthash" ;BSD-3
@@ -85,7 +86,7 @@
     "courgette/third_party/divsufsort" ;Expat
     "net/third_party/mozilla_security_manager" ;MPL-1.1/GPL2+/LGPL2.1+
     "net/third_party/nss" ;MPL-2.0
-    "net/third_party/quic" ;BSD-3
+    "net/third_party/quiche" ;BSD-3
     "net/third_party/uri_template" ;ASL2.0
     "third_party/abseil-cpp" ;ASL2.0
     "third_party/adobe/flash/flapper_version.h" ;no license, trivial
@@ -105,6 +106,10 @@
     "third_party/blink" ;BSD-3, LGPL2+
     "third_party/boringssl" ;OpenSSL/ISC (Google additions are ISC)
     "third_party/boringssl/src/third_party/fiat" ;Expat
+    "third_party/boringssl/src/third_party/sike" ;Expat
+    ;; XXX: these files are generated by fp-$arch.pl in the above directory.
+    
"third_party/boringssl/linux-aarch64/crypto/third_party/sike/asm/fp-armv8.S"
+    
"third_party/boringssl/linux-x86_64/crypto/third_party/sike/asm/fp-x86_64.S"
     "third_party/breakpad" ;BSD-3
     "third_party/brotli" ;Expat
     "third_party/cacheinvalidation" ;ASL2.0
@@ -164,6 +169,7 @@
     "third_party/nasm" ;BSD-2
     "third_party/node" ;Expat
     "third_party/node/node_modules/polymer-bundler/lib/third_party/UglifyJS2" 
;BSD-2
+    "third_party/openscreen" ;BSD-3
     "third_party/ots" ;BSD-3
     "third_party/pdfium" ;BSD-3
     "third_party/pdfium/third_party/agg23" ;Expat
@@ -182,9 +188,10 @@
     "third_party/s2cellid" ;ASL2.0
     "third_party/sfntly" ;ASL2.0
     "third_party/skia" ;BSD-3
+    "third_party/skia/include/third_party/skcms" ;BSD-3
     "third_party/skia/third_party/gif" ;MPL1.1/GPL2+/LGPL2.1+
     "third_party/skia/third_party/skcms" ;BSD-3
-    "third_party/skia/third_party/vulkan" ;BSD-3
+    "third_party/skia/third_party/vulkanmemoryallocator" ;BSD-3, Expat
     "third_party/smhasher" ;Expat, public domain
     "third_party/speech-dispatcher" ;GPL2+
     "third_party/spirv-headers" ;ASL2.0
@@ -231,9 +238,9 @@ from forcing GEXP-PROMISE."
                       #:system system
                       #:guile-for-build guile)))
 
-(define %chromium-version "75.0.3770.142")
-(define %ungoogled-revision "5d8abc38b43a62f379615a0dc972b29d9aebb4b4")
-(define %debian-revision "debian/75.0.3770.90-1")
+(define %chromium-version "76.0.3809.87")
+(define %ungoogled-revision "6ea939002bae43a27910e03569d43519d07842e7")
+(define %debian-revision "debian/76.0.3809.87-2")
 (define package-revision "0")
 (define %package-version (string-append %chromium-version "-"
                                         package-revision "."
@@ -247,7 +254,7 @@ from forcing GEXP-PROMISE."
                         %chromium-version ".tar.xz"))
     (sha256
      (base32
-      "1b550hc9sav0qdnh4hiin2bb3jmfyrb3dhbmnc0v8662rjknq3ji"))))
+      "1521vh38mfgy7aj1lw1vpbdm8m6wyh52d5p7bz4x6kvvxsnacp11"))))
 
 (define %ungoogled-origin
   (origin
@@ -258,7 +265,7 @@ from forcing GEXP-PROMISE."
                               (string-take %ungoogled-revision 7)))
     (sha256
      (base32
-      "1vk8jzzsn20ysn4nlz84mwwhfa9nnywzd1lrahlhcky9pf6xzpwa"))))
+      "1nhrh9fn1appbxf8d3dg49jrqjvha721s89i60s4m63d037cifzr"))))
 
 (define %debian-origin
   (origin
@@ -272,7 +279,29 @@ from forcing GEXP-PROMISE."
                                   (string-take %debian-revision 7))))
     (sha256
      (base32
-      "0sh6z2lx44zb31qrpa29vm0sw09dxi7i9h6fsq3ivfxjs7v98bbx"))))
+      "1fjhpzrxmgjr7i31li1vsfmp0qkbi0cpyc7p1zjwvf2x4da0v907"))))
+
+(define (gentoo-patch name hash revision)
+  (origin
+    (method url-fetch)
+    (uri (string-append "https://gitweb.gentoo.org/repo/gentoo.git/plain";
+                        "/www-client/chromium/files/" name "?id=" revision))
+    (file-name name)
+    (sha256 (base32 hash))))
+
+(define-syntax-rule (gentoo-patches (name hash) ...)
+  (list (gentoo-patch name hash "9fd80e7d75aa63843ec33c9d44fee32596ae8f25")
+        ...))
+
+(define %auxiliary-patches
+  ;; XXX: Debians "gcc/wrong-namespace.patch" and "fixes/inspector.patch" does
+  ;; not work for us, so we take these upstream fixes via Gentoo instead.
+  (gentoo-patches
+   ("chromium-76-quiche.patch" 
"1cs0y16jn7r1nxh0j36vqcsdvigl902kdcqfmyivnxgblrx66l2i")
+   ("chromium-76-gcc-blink-namespace1.patch"
+    "0k7nrn0dhvqxj4sg2gndzxih0l1f77h6pv7jhcdz7h69sm4xci2z")
+   ("chromium-76-gcc-blink-namespace2.patch"
+    "014y2d8ii9sr340sjbv1fhsjd5s3dl0vbmq5wzlkdjsp91dcn9ch")))
 
 ;; This is a "computed" origin that does the following:
 ;; *) Runs the Ungoogled scripts on a pristine Chromium tarball.
@@ -314,6 +343,12 @@ from forcing GEXP-PROMISE."
                    (force-output)
                    (invoke "tar" "xf" #+chromium-source)
 
+                   ;; Ungoogled-Chromium contains a forked subset of the Debian
+                   ;; patches.  Disable those, as we apply newer versions 
later.
+                   (substitute* "patches/series"
+                     ((".*/debian_buster/.*")
+                      ""))
+
                    (format #t "Ungooglifying...~%")
                    (force-output)
                    (invoke "python3" "utils/prune_binaries.py" chromium-dir
@@ -330,16 +365,7 @@ from forcing GEXP-PROMISE."
                      (force-output)
                      (let* ((debian  #+debian-source)
                             (patches (string-append debian "/debian/patches"))
-                            (series  (string-append patches "/series"))
-                            (grep-q (lambda (query file)
-                                      (with-input-from-file file
-                                        (lambda ()
-                                          (let loop ((line (read-line))
-                                                     (match #f))
-                                            (if (or match (eof-object? line))
-                                                (if match #t #f)
-                                                (loop (read-line)
-                                                      (string-contains line 
query)))))))))
+                            (series  (string-append patches "/series")))
                        (with-input-from-file series
                          (lambda ()
                            (let loop ((line (read-line)))
@@ -347,19 +373,35 @@ from forcing GEXP-PROMISE."
                                (when (and (> (string-length line) 1)
                                           ;; Skip the Debian-specific ones.
                                           (not (string-prefix? 
"debianization/" line))
+                                          (not (string-prefix? "buster/" line))
                                           ;; And those that conflict with 
Ungoogled.
                                           (not (any (cute string-suffix? <> 
line)
                                                     
'("widevine-buildflag.patch"
                                                       "signin.patch"
-                                                      
"third-party-cookies.patch")))
-                                          ;; Ungoogled includes a subset of 
the Debian
-                                          ;; patches.  Exclude those already 
present.
-                                          (not (grep-q line 
"../patches/series")))
+                                                      
"third-party-cookies.patch"
+
+                                                      ;; XXX: 
'fixes/inspector.patch'
+                                                      ;; makes v8 reuse the 
top-level
+                                                      ;; 
third_party/inspector_protocol
+                                                      ;; instead of its own 
bundled copy,
+                                                      ;; but that does not 
work here for
+                                                      ;; some reason.  Ignore 
that patch
+                                                      ;; and those that depend 
on it.
+                                                      "wrong-namespace.patch"
+                                                      
"explicit-specialization.patch"
+                                                      "inspector.patch"))))
                                  (invoke "patch" "--force" "-p1" "--input"
                                          (string-append patches "/" line)
                                          "--no-backup-if-mismatch"))
                                (loop (read-line)))))))
 
+                     (format #t "Applying Guix-specific patches...~%")
+                     (force-output)
+                     (for-each (lambda (patch)
+                                 (invoke "patch" "--force" "-p1" "--input"
+                                         patch "--no-backup-if-mismatch"))
+                               '#+%auxiliary-patches)
+
                      (format #t "Pruning third party files...~%")
                      (force-output)
                      (apply invoke "python"
@@ -458,7 +500,6 @@ from forcing GEXP-PROMISE."
              "is_clang=false"
              ;; Disable debugging features to save space.  These are normally
              ;; pulled in by "is_official_build", but that requires "is_clang".
-             "blink_symbol_level=0"
              "enable_iterator_debugging=false"
              "exclude_unwind_tables=true"
              ;; Optimize for building everything at once, as opposed to
@@ -488,7 +529,7 @@ from forcing GEXP-PROMISE."
                    '("use_vaapi=true")
                    '())
 
-             ;; Don't arbitrarily restrict formats supported by system ffmpeg.
+             ;; Do not artifically restrict formats supported by system ffmpeg.
              "proprietary_codecs=true"
              "ffmpeg_branding=\"Chrome\""
 
@@ -561,12 +602,12 @@ from forcing GEXP-PROMISE."
              (substitute* "third_party/webrtc/rtc_base/strings/json.h"
                (("#include \"third_party/jsoncpp/") "#include \"json/"))
 
-             (substitute* '("ui/gfx/skia_util.h"
+             (substitute* 
'("components/viz/common/gpu/vulkan_context_provider.h"
                             
"components/viz/common/resources/resource_format_utils.h")
                (("third_party/vulkan/include/") ""))
 
              (substitute* "third_party/skia/include/gpu/vk/GrVkVulkan.h"
-               (("\\.\\./\\.\\./include/third_party/vulkan/") ""))
+               (("include/third_party/vulkan/") ""))
 
              ;; Building chromedriver embeds some files using the ZIP
              ;; format which doesn't support timestamps before
@@ -587,6 +628,9 @@ from forcing GEXP-PROMISE."
              (setenv "AR" "ar") (setenv "NM" "nm")
              (setenv "CC" "gcc") (setenv "CXX" "g++")
 
+             ;; Prevent GCC from optimizing away null pointer safety checks.
+             (setenv "CXXFLAGS" "-fno-delete-null-pointer-checks")
+
              ;; Work around <https://bugs.gnu.org/30756>.
              (unsetenv "C_INCLUDE_PATH")
              (unsetenv "CPLUS_INCLUDE_PATH")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]