mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 22:08:16 -05:00
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.
This commit is contained in:
parent
f339cb188a
commit
7f2e852267
1 changed files with 71 additions and 27 deletions
|
@ -73,7 +73,8 @@ (define-module (gnu packages chromium)
|
||||||
#:use-module (srfi srfi-1))
|
#:use-module (srfi srfi-1))
|
||||||
|
|
||||||
(define %preserved-third-party-files
|
(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/dynamic_annotations" ;BSD-2
|
||||||
"base/third_party/icu" ;Unicode, X11-style
|
"base/third_party/icu" ;Unicode, X11-style
|
||||||
"base/third_party/superfasthash" ;BSD-3
|
"base/third_party/superfasthash" ;BSD-3
|
||||||
|
@ -85,7 +86,7 @@ (define %preserved-third-party-files
|
||||||
"courgette/third_party/divsufsort" ;Expat
|
"courgette/third_party/divsufsort" ;Expat
|
||||||
"net/third_party/mozilla_security_manager" ;MPL-1.1/GPL2+/LGPL2.1+
|
"net/third_party/mozilla_security_manager" ;MPL-1.1/GPL2+/LGPL2.1+
|
||||||
"net/third_party/nss" ;MPL-2.0
|
"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
|
"net/third_party/uri_template" ;ASL2.0
|
||||||
"third_party/abseil-cpp" ;ASL2.0
|
"third_party/abseil-cpp" ;ASL2.0
|
||||||
"third_party/adobe/flash/flapper_version.h" ;no license, trivial
|
"third_party/adobe/flash/flapper_version.h" ;no license, trivial
|
||||||
|
@ -105,6 +106,10 @@ (define %preserved-third-party-files
|
||||||
"third_party/blink" ;BSD-3, LGPL2+
|
"third_party/blink" ;BSD-3, LGPL2+
|
||||||
"third_party/boringssl" ;OpenSSL/ISC (Google additions are ISC)
|
"third_party/boringssl" ;OpenSSL/ISC (Google additions are ISC)
|
||||||
"third_party/boringssl/src/third_party/fiat" ;Expat
|
"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/breakpad" ;BSD-3
|
||||||
"third_party/brotli" ;Expat
|
"third_party/brotli" ;Expat
|
||||||
"third_party/cacheinvalidation" ;ASL2.0
|
"third_party/cacheinvalidation" ;ASL2.0
|
||||||
|
@ -164,6 +169,7 @@ (define %preserved-third-party-files
|
||||||
"third_party/nasm" ;BSD-2
|
"third_party/nasm" ;BSD-2
|
||||||
"third_party/node" ;Expat
|
"third_party/node" ;Expat
|
||||||
"third_party/node/node_modules/polymer-bundler/lib/third_party/UglifyJS2" ;BSD-2
|
"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/ots" ;BSD-3
|
||||||
"third_party/pdfium" ;BSD-3
|
"third_party/pdfium" ;BSD-3
|
||||||
"third_party/pdfium/third_party/agg23" ;Expat
|
"third_party/pdfium/third_party/agg23" ;Expat
|
||||||
|
@ -182,9 +188,10 @@ (define %preserved-third-party-files
|
||||||
"third_party/s2cellid" ;ASL2.0
|
"third_party/s2cellid" ;ASL2.0
|
||||||
"third_party/sfntly" ;ASL2.0
|
"third_party/sfntly" ;ASL2.0
|
||||||
"third_party/skia" ;BSD-3
|
"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/gif" ;MPL1.1/GPL2+/LGPL2.1+
|
||||||
"third_party/skia/third_party/skcms" ;BSD-3
|
"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/smhasher" ;Expat, public domain
|
||||||
"third_party/speech-dispatcher" ;GPL2+
|
"third_party/speech-dispatcher" ;GPL2+
|
||||||
"third_party/spirv-headers" ;ASL2.0
|
"third_party/spirv-headers" ;ASL2.0
|
||||||
|
@ -231,9 +238,9 @@ (define* (computed-origin-method gexp-promise hash-algo hash
|
||||||
#:system system
|
#:system system
|
||||||
#:guile-for-build guile)))
|
#:guile-for-build guile)))
|
||||||
|
|
||||||
(define %chromium-version "75.0.3770.142")
|
(define %chromium-version "76.0.3809.87")
|
||||||
(define %ungoogled-revision "5d8abc38b43a62f379615a0dc972b29d9aebb4b4")
|
(define %ungoogled-revision "6ea939002bae43a27910e03569d43519d07842e7")
|
||||||
(define %debian-revision "debian/75.0.3770.90-1")
|
(define %debian-revision "debian/76.0.3809.87-2")
|
||||||
(define package-revision "0")
|
(define package-revision "0")
|
||||||
(define %package-version (string-append %chromium-version "-"
|
(define %package-version (string-append %chromium-version "-"
|
||||||
package-revision "."
|
package-revision "."
|
||||||
|
@ -247,7 +254,7 @@ (define %chromium-origin
|
||||||
%chromium-version ".tar.xz"))
|
%chromium-version ".tar.xz"))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"1b550hc9sav0qdnh4hiin2bb3jmfyrb3dhbmnc0v8662rjknq3ji"))))
|
"1521vh38mfgy7aj1lw1vpbdm8m6wyh52d5p7bz4x6kvvxsnacp11"))))
|
||||||
|
|
||||||
(define %ungoogled-origin
|
(define %ungoogled-origin
|
||||||
(origin
|
(origin
|
||||||
|
@ -258,7 +265,7 @@ (define %ungoogled-origin
|
||||||
(string-take %ungoogled-revision 7)))
|
(string-take %ungoogled-revision 7)))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"1vk8jzzsn20ysn4nlz84mwwhfa9nnywzd1lrahlhcky9pf6xzpwa"))))
|
"1nhrh9fn1appbxf8d3dg49jrqjvha721s89i60s4m63d037cifzr"))))
|
||||||
|
|
||||||
(define %debian-origin
|
(define %debian-origin
|
||||||
(origin
|
(origin
|
||||||
|
@ -272,7 +279,29 @@ (define %debian-origin
|
||||||
(string-take %debian-revision 7))))
|
(string-take %debian-revision 7))))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(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:
|
;; This is a "computed" origin that does the following:
|
||||||
;; *) Runs the Ungoogled scripts on a pristine Chromium tarball.
|
;; *) Runs the Ungoogled scripts on a pristine Chromium tarball.
|
||||||
|
@ -314,6 +343,12 @@ (define ungoogled-chromium-source
|
||||||
(force-output)
|
(force-output)
|
||||||
(invoke "tar" "xf" #+chromium-source)
|
(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...~%")
|
(format #t "Ungooglifying...~%")
|
||||||
(force-output)
|
(force-output)
|
||||||
(invoke "python3" "utils/prune_binaries.py" chromium-dir
|
(invoke "python3" "utils/prune_binaries.py" chromium-dir
|
||||||
|
@ -330,16 +365,7 @@ (define ungoogled-chromium-source
|
||||||
(force-output)
|
(force-output)
|
||||||
(let* ((debian #+debian-source)
|
(let* ((debian #+debian-source)
|
||||||
(patches (string-append debian "/debian/patches"))
|
(patches (string-append debian "/debian/patches"))
|
||||||
(series (string-append patches "/series"))
|
(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)))))))))
|
|
||||||
(with-input-from-file series
|
(with-input-from-file series
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(let loop ((line (read-line)))
|
(let loop ((line (read-line)))
|
||||||
|
@ -347,19 +373,35 @@ (define ungoogled-chromium-source
|
||||||
(when (and (> (string-length line) 1)
|
(when (and (> (string-length line) 1)
|
||||||
;; Skip the Debian-specific ones.
|
;; Skip the Debian-specific ones.
|
||||||
(not (string-prefix? "debianization/" line))
|
(not (string-prefix? "debianization/" line))
|
||||||
|
(not (string-prefix? "buster/" line))
|
||||||
;; And those that conflict with Ungoogled.
|
;; And those that conflict with Ungoogled.
|
||||||
(not (any (cute string-suffix? <> line)
|
(not (any (cute string-suffix? <> line)
|
||||||
'("widevine-buildflag.patch"
|
'("widevine-buildflag.patch"
|
||||||
"signin.patch"
|
"signin.patch"
|
||||||
"third-party-cookies.patch")))
|
"third-party-cookies.patch"
|
||||||
;; Ungoogled includes a subset of the Debian
|
|
||||||
;; patches. Exclude those already present.
|
;; XXX: 'fixes/inspector.patch'
|
||||||
(not (grep-q line "../patches/series")))
|
;; 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"
|
(invoke "patch" "--force" "-p1" "--input"
|
||||||
(string-append patches "/" line)
|
(string-append patches "/" line)
|
||||||
"--no-backup-if-mismatch"))
|
"--no-backup-if-mismatch"))
|
||||||
(loop (read-line)))))))
|
(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...~%")
|
(format #t "Pruning third party files...~%")
|
||||||
(force-output)
|
(force-output)
|
||||||
(apply invoke "python"
|
(apply invoke "python"
|
||||||
|
@ -458,7 +500,6 @@ (define-public ungoogled-chromium
|
||||||
"is_clang=false"
|
"is_clang=false"
|
||||||
;; Disable debugging features to save space. These are normally
|
;; Disable debugging features to save space. These are normally
|
||||||
;; pulled in by "is_official_build", but that requires "is_clang".
|
;; pulled in by "is_official_build", but that requires "is_clang".
|
||||||
"blink_symbol_level=0"
|
|
||||||
"enable_iterator_debugging=false"
|
"enable_iterator_debugging=false"
|
||||||
"exclude_unwind_tables=true"
|
"exclude_unwind_tables=true"
|
||||||
;; Optimize for building everything at once, as opposed to
|
;; Optimize for building everything at once, as opposed to
|
||||||
|
@ -488,7 +529,7 @@ (define-public ungoogled-chromium
|
||||||
'("use_vaapi=true")
|
'("use_vaapi=true")
|
||||||
'())
|
'())
|
||||||
|
|
||||||
;; Don't arbitrarily restrict formats supported by system ffmpeg.
|
;; Do not artifically restrict formats supported by system ffmpeg.
|
||||||
"proprietary_codecs=true"
|
"proprietary_codecs=true"
|
||||||
"ffmpeg_branding=\"Chrome\""
|
"ffmpeg_branding=\"Chrome\""
|
||||||
|
|
||||||
|
@ -561,12 +602,12 @@ (define-public ungoogled-chromium
|
||||||
(substitute* "third_party/webrtc/rtc_base/strings/json.h"
|
(substitute* "third_party/webrtc/rtc_base/strings/json.h"
|
||||||
(("#include \"third_party/jsoncpp/") "#include \"json/"))
|
(("#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")
|
"components/viz/common/resources/resource_format_utils.h")
|
||||||
(("third_party/vulkan/include/") ""))
|
(("third_party/vulkan/include/") ""))
|
||||||
|
|
||||||
(substitute* "third_party/skia/include/gpu/vk/GrVkVulkan.h"
|
(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
|
;; Building chromedriver embeds some files using the ZIP
|
||||||
;; format which doesn't support timestamps before
|
;; format which doesn't support timestamps before
|
||||||
|
@ -587,6 +628,9 @@ (define-public ungoogled-chromium
|
||||||
(setenv "AR" "ar") (setenv "NM" "nm")
|
(setenv "AR" "ar") (setenv "NM" "nm")
|
||||||
(setenv "CC" "gcc") (setenv "CXX" "g++")
|
(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>.
|
;; Work around <https://bugs.gnu.org/30756>.
|
||||||
(unsetenv "C_INCLUDE_PATH")
|
(unsetenv "C_INCLUDE_PATH")
|
||||||
(unsetenv "CPLUS_INCLUDE_PATH")
|
(unsetenv "CPLUS_INCLUDE_PATH")
|
||||||
|
|
Loading…
Reference in a new issue