[chromium-browser-privacy: 7/103] Update to 70.0.3538.67 with new vaapi patch
by qvint
commit a4eb1cd7c2b2c35cbd0ea9d229b4f0d3746e3a65
Author: Akarshan Biswas <hellbanger(a)ga-lmt-s2.biswasab.org>
Date: Sat Oct 20 11:14:28 2018 +0530
Update to 70.0.3538.67 with new vaapi patch
.gitignore | 1 +
chromium-gcc8-r588316.patch | 98 ++++++++
chromium-gcc8-r588547.patch | 30 +++
chromium-gcc8-r589614.patch | 37 +++
chromium-vaapi.appdata.xml | 4 +-
chromium-vaapi.sh | 4 -
chromium-vaapi.spec | 177 +++++++++++----
enable-vaapi.patch | 257 +++++++++++++++++++++
silencegcc.patch | 31 +++
sources | 2 +-
vaapi.patch | 542 --------------------------------------------
11 files changed, 584 insertions(+), 599 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 6317544..808c350 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
/chromium-69.0.3497.100.tar.xz
+/chromium-70.0.3538.67.tar.xz
diff --git a/chromium-gcc8-r588316.patch b/chromium-gcc8-r588316.patch
new file mode 100644
index 0000000..d980805
--- /dev/null
+++ b/chromium-gcc8-r588316.patch
@@ -0,0 +1,98 @@
+From 87902b3202f81d689dd314c17006ffc907fe12a1 Mon Sep 17 00:00:00 2001
+From: Wang Qing <wangqing-hf(a)loongson.cn>
+Date: Mon, 3 Sep 2018 02:41:08 +0000
+Subject: [PATCH] Fix build error for blink.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This CLs fixed the error of constexpr function call to non-constexpr function.
+
+Bug: 878202
+Change-Id: I6ad217a687e62a9a384980d852743a56479de3a9
+Reviewed-on: https://chromium-review.googlesource.com/1192467
+Commit-Queue: 汪 清 <wangqing-hf(a)loongson.cn>
+Reviewed-by: Eric Willigers <ericwilligers(a)chromium.org>
+Cr-Commit-Position: refs/heads/master@{#588316}
+---
+ .../core/animation/animation_time_delta.cc | 22 ++++++++++++++
+ .../core/animation/animation_time_delta.h | 30 +++++++------------
+ 2 files changed, 32 insertions(+), 20 deletions(-)
+
+diff --git a/third_party/blink/renderer/core/animation/animation_time_delta.cc b/third_party/blink/renderer/core/animation/animation_time_delta.cc
+index 1b25469c7f2f..2e30a18890da 100644
+--- a/third_party/blink/renderer/core/animation/animation_time_delta.cc
++++ b/third_party/blink/renderer/core/animation/animation_time_delta.cc
+@@ -7,6 +7,28 @@
+ namespace blink {
+
+ #if !defined(BLINK_ANIMATION_USE_TIME_DELTA)
++// Comparison operators on AnimationTimeDelta.
++bool CORE_EXPORT operator==(const AnimationTimeDelta& lhs,
++ const AnimationTimeDelta& rhs) {
++ return lhs.InSecondsF() == rhs.InSecondsF();
++}
++bool CORE_EXPORT operator!=(const AnimationTimeDelta& lhs,
++ const AnimationTimeDelta& rhs) {
++ return lhs.InSecondsF() != rhs.InSecondsF();
++}
++bool CORE_EXPORT operator>(const AnimationTimeDelta& lhs,
++ const AnimationTimeDelta& rhs) {
++ return lhs.InSecondsF() > rhs.InSecondsF();
++}
++bool CORE_EXPORT operator>=(const AnimationTimeDelta& lhs,
++ const AnimationTimeDelta& rhs) {
++ return lhs.InSecondsF() >= rhs.InSecondsF();
++}
++bool CORE_EXPORT operator<=(const AnimationTimeDelta& lhs,
++ const AnimationTimeDelta& rhs) {
++ return lhs.InSecondsF() <= rhs.InSecondsF();
++}
++
+ std::ostream& operator<<(std::ostream& os, AnimationTimeDelta time) {
+ return os << time.InSecondsF() << " s";
+ }
+diff --git a/third_party/blink/renderer/core/animation/animation_time_delta.h b/third_party/blink/renderer/core/animation/animation_time_delta.h
+index 1903c1150d3e..95d218466d90 100644
+--- a/third_party/blink/renderer/core/animation/animation_time_delta.h
++++ b/third_party/blink/renderer/core/animation/animation_time_delta.h
+@@ -90,26 +90,16 @@ AnimationTimeDelta operator*(T a, AnimationTimeDelta td) {
+ }
+
+ // Comparison operators on AnimationTimeDelta.
+-constexpr bool CORE_EXPORT operator==(const AnimationTimeDelta& lhs,
+- const AnimationTimeDelta& rhs) {
+- return lhs.InSecondsF() == rhs.InSecondsF();
+-}
+-constexpr bool CORE_EXPORT operator!=(const AnimationTimeDelta& lhs,
+- const AnimationTimeDelta& rhs) {
+- return lhs.InSecondsF() != rhs.InSecondsF();
+-}
+-constexpr bool CORE_EXPORT operator>(const AnimationTimeDelta& lhs,
+- const AnimationTimeDelta& rhs) {
+- return lhs.InSecondsF() > rhs.InSecondsF();
+-}
+-constexpr bool CORE_EXPORT operator>=(const AnimationTimeDelta& lhs,
+- const AnimationTimeDelta& rhs) {
+- return lhs.InSecondsF() >= rhs.InSecondsF();
+-}
+-constexpr bool CORE_EXPORT operator<=(const AnimationTimeDelta& lhs,
+- const AnimationTimeDelta& rhs) {
+- return lhs.InSecondsF() <= rhs.InSecondsF();
+-}
++bool CORE_EXPORT operator==(const AnimationTimeDelta& lhs,
++ const AnimationTimeDelta& rhs);
++bool CORE_EXPORT operator!=(const AnimationTimeDelta& lhs,
++ const AnimationTimeDelta& rhs);
++bool CORE_EXPORT operator>(const AnimationTimeDelta& lhs,
++ const AnimationTimeDelta& rhs);
++bool CORE_EXPORT operator>=(const AnimationTimeDelta& lhs,
++ const AnimationTimeDelta& rhs);
++bool CORE_EXPORT operator<=(const AnimationTimeDelta& lhs,
++ const AnimationTimeDelta& rhs);
+
+ // Defined to allow DCHECK_EQ/etc to work with the class.
+ CORE_EXPORT std::ostream& operator<<(std::ostream& os, AnimationTimeDelta time);
+--
+2.17.2
+
diff --git a/chromium-gcc8-r588547.patch b/chromium-gcc8-r588547.patch
new file mode 100644
index 0000000..5f12f7f
--- /dev/null
+++ b/chromium-gcc8-r588547.patch
@@ -0,0 +1,30 @@
+From e3ad3deb6a6e79284f3748fa7410311d87df91c5 Mon Sep 17 00:00:00 2001
+From: Henrique Nakashima <hnakashima(a)chromium.org>
+Date: Tue, 4 Sep 2018 16:49:51 +0000
+Subject: [PATCH] IWYU: stdint.h in pdfium_mem_buffer_file_write.h for uint8_t
+
+Bug: 879900
+Change-Id: I9c15d1c280a23c53d31f2d72c9d0d1db79eab886
+Reviewed-on: https://chromium-review.googlesource.com/1204410
+Reviewed-by: Lei Zhang <thestig(a)chromium.org>
+Commit-Queue: Henrique Nakashima <hnakashima(a)chromium.org>
+Cr-Commit-Position: refs/heads/master@{#588547}
+---
+ pdf/pdfium/pdfium_mem_buffer_file_write.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/pdf/pdfium/pdfium_mem_buffer_file_write.h b/pdf/pdfium/pdfium_mem_buffer_file_write.h
+index 03c54bb63800..82e82d23684d 100644
+--- a/pdf/pdfium/pdfium_mem_buffer_file_write.h
++++ b/pdf/pdfium/pdfium_mem_buffer_file_write.h
+@@ -6,6 +6,7 @@
+ #define PDF_PDFIUM_PDFIUM_MEM_BUFFER_FILE_WRITE_H_
+
+ #include <stddef.h>
++#include <stdint.h>
+
+ #include <vector>
+
+--
+2.17.2
+
diff --git a/chromium-gcc8-r589614.patch b/chromium-gcc8-r589614.patch
new file mode 100644
index 0000000..0c187fd
--- /dev/null
+++ b/chromium-gcc8-r589614.patch
@@ -0,0 +1,37 @@
+From cbdb8bd6567c8143dc8c1e5e86a21a8ea064eea4 Mon Sep 17 00:00:00 2001
+From: Maksim Sisov <msisov(a)igalia.com>
+Date: Fri, 7 Sep 2018 18:57:42 +0000
+Subject: [PATCH] OmniboxTextView: fix gcc error for structure initialization
+
+It looks like there is bug in GCC 6, which cannot go through
+structure initialization normally.
+
+Thus, instead of a default initialization of one of the members,
+explicitly initialize it to a default value.
+
+Change-Id: Ia55cc6658e6b6b2f8a80c2582dd28f001c9e648c
+Reviewed-on: https://chromium-review.googlesource.com/1213181
+Reviewed-by: Scott Violet <sky(a)chromium.org>
+Commit-Queue: Maksim Sisov <msisov(a)igalia.com>
+Cr-Commit-Position: refs/heads/master@{#589614}
+---
+ chrome/browser/ui/views/omnibox/omnibox_text_view.cc | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/chrome/browser/ui/views/omnibox/omnibox_text_view.cc b/chrome/browser/ui/views/omnibox/omnibox_text_view.cc
+index f0a8083dc930..9021284f166d 100644
+--- a/chrome/browser/ui/views/omnibox/omnibox_text_view.cc
++++ b/chrome/browser/ui/views/omnibox/omnibox_text_view.cc
+@@ -175,7 +175,8 @@ void ApplyTextStyleForType(SuggestionAnswer::TextStyle text_style,
+ style = {part_color, .baseline = gfx::SUPERIOR};
+ break;
+ case SuggestionAnswer::TextStyle::BOLD:
+- style = {part_color, .weight = gfx::Font::Weight::BOLD};
++ style = {part_color, .baseline = gfx::NORMAL_BASELINE,
++ .weight = gfx::Font::Weight::BOLD};
+ break;
+ case SuggestionAnswer::TextStyle::NORMAL:
+ case SuggestionAnswer::TextStyle::NORMAL_DIM:
+--
+2.17.2
+
diff --git a/chromium-vaapi.appdata.xml b/chromium-vaapi.appdata.xml
index a2b2064..167b69a 100644
--- a/chromium-vaapi.appdata.xml
+++ b/chromium-vaapi.appdata.xml
@@ -2,7 +2,7 @@
<!-- Referenced from https://www.freedesktop.org/software/appstream/docs/chap-Quickstart.html#... -->
<component type="desktop">
<id>chromium-vaapi.desktop</id>
- <update_contact> chromium-vaapi-owner(a)rpmfusion.org</update_contact>
+ <update_contact>chromium-vaapi-owner(a)rpmfusion.org</update_contact>
<metadata_license>CC0-1.0</metadata_license>
<project_license>BSD-3-Clause and LGPL-2.1+ and Apache-2.0 and IJG and MIT and GPL-2.0+ and ISC and OpenSSL and (MPL-1.1 or GPL-2.0 or LGPL-2.0)</project_license>
<name>chromium-vaapi</name>
@@ -27,7 +27,7 @@ Sometimes "Video Decode" in the "Graphics Feature Status" maybe misleading, Plea
<image>https://gitlab.com/biswasab/Project-screenshots/raw/master/a.png</image>
</screenshot>
<screenshot>
- <caption>The chrome://gpu page</caption>
+ <caption>The chrome GPU page</caption>
<image>https://gitlab.com/biswasab/Project-screenshots/raw/master/b.png</image>
</screenshot>
</screenshots>
diff --git a/chromium-vaapi.sh b/chromium-vaapi.sh
index 77a0027..dbdaf4a 100644
--- a/chromium-vaapi.sh
+++ b/chromium-vaapi.sh
@@ -50,11 +50,7 @@ CHROMIUM_DISTRO_FLAGS=" --enable-plugins \
--enable-extensions \
--enable-user-scripts \
--enable-printing \
- --enable-accelerated-video \
- --enable-native-gpu-memory-buffers \
- --enable-accelerated-mjpeg-decode \
--enable-gpu-rasterization \
- --disable-gpu-driver-bug-workarounds \
--enable-sync"
exec -a "$0" "@@CHROMIUMDIR@@/$(basename "$0" | sed 's/\.sh$//')" $CHROMIUM_DISTRO_FLAGS "$@"
diff --git a/chromium-vaapi.spec b/chromium-vaapi.spec
index 0479a34..9ecd1ef 100644
--- a/chromium-vaapi.spec
+++ b/chromium-vaapi.spec
@@ -16,8 +16,8 @@
%global __requires_exclude %{chromiumdir}/.*\\.so
%global __provides_exclude_from %{chromiumdir}/.*\\.so
#######################################CONFIGS###########################################
-# Require harfbuzz >= 1.5.0 for hb_glyph_info_t
-%if 0%{?fedora} >= 28
+#Require harfbuzz >= 1.8.6 for hb_font_funcs_set_glyph_h_advances_func
+%if 0%{?fedora} >= 29
%bcond_without system_harfbuzz
%else
%bcond_with system_harfbuzz
@@ -41,46 +41,86 @@
%endif
#Turn on verbose mode
%global debug_logs 1
-#Build debug packages for debugging
-%global debug_pkg 1
# Allow compiling with clang
%global clang 0
-#Allow building with Fedora compilation flags
+#Allow jumbo builds(turned off by default because it consumes too much memory)
+#enabled by default on rawhide for testing
+#Edit it works
+# Enabled by default
+%global jumbo 1
+#------------------------------------------------------
+%if %{clang}
+#Disable Build debug packages for debugging on clang
+%global debug_pkg 0
+#Disable building with Fedora compilation flags on clang
%global fedora_compilation_flags 0
+%else
+#Build debug packages for debugging
+%global debug_pkg 1
+#Allow building with Fedora compilation flags
+%global fedora_compilation_flags 1
+%endif
+# Use ld in rawhide as gold is faulty
+%if 0%{?fedora} >= 30
+%global stopgold 1
+%else
+%global stopgold 0
+%endif
##############################Package Definitions######################################
Name: chromium-vaapi
-Version: 69.0.3497.100
-Release: 4%{?dist}
+Version: 70.0.3538.67
+Release: 1%{?dist}
Summary: A Chromium web browser with video decoding acceleration
License: BSD and LGPLv2+ and ASL 2.0 and IJG and MIT and GPLv2+ and ISC and OpenSSL and (MPLv1.1 or GPLv2 or LGPLv2)
URL: https://www.chromium.org/Home
%if %{freeworld}
Source0: https://commondatastorage.googleapis.com/chromium-browser-official/chromi...
%else
-Source0: chromium-%{version}-clean.tar.xz
+# Unfortunately, Fedora & Copr forbids uploading sources with patent-encumbered
+# ffmpeg code even if they are never compiled and linked to target binraies,
+# so we must repackage upstream tarballs to satisfy this requirement. However,
+# we cannot simply delete all code of ffmpeg because this will disable support
+# for some commonly-used free codecs such as Ogg Theora. Instead, helper
+# scripts included in official Fedora packages are copied, modified, and used
+# to automate the repackaging work.
+# Get those helper scripts from https://src.fedoraproject.org/rpms/chromium
+# If you don't use Fedora services, Just set the value of freeworld in this spec fil
+# to 1 to use the upstreanm packaged source.
+# The repackaged source tarball used here is produced by:
+# ./chromium-latest.py --stable --ffmpegclean --ffmpegarm --deleteunrar
+Source0: chromium-%{version}-clean.tar.xz
%endif
# The following two source files are copied and modified from the chromium source
-Source10: %{name}.sh
-#Add our own appdata file. ##TODO
-Source11: %{name}.appdata.xml
+Source10: %{name}.sh
+#Add our own appdata file.
+Source11: %{name}.appdata.xml
#Personal stuff
-Source15: LICENSE
-#Video acceleration patch from https://chromium-review.googlesource.com/c/chromium/src/+/532294
-Patch1: vaapi.patch
+Source15: LICENSE
+# Enable video acceleration on chromium for Linux
+# Enabled video decode acceleration and webrtc encode acceleration(flag disabled by default)
+# Used existing flag instead of creating a new one
+Patch1: enable-vaapi.patch
+# Enable support for widevine
Patch2: widevine.patch
%if %{clang}
#Will use any clang patch here
#Fix breaking builds caused by gcc_ar_wrapper.py from upstream
-Patch7: llvm-arflags.patch
+Patch7: llvm-arflags.patch
%else
#Gcc patches area.
-%endif
-#More patches to fix chromium build here
-#remove dependency on unrar. That's a nasty code.
-Patch50: unrar.patch
-#Bootstrap still uses python command
-Patch51: py2-bootstrap.patch
-#This build should be only available to amd64
+#Gcc produces way too many warnings. Try to silence some of it.
+Patch8: silencegcc.patch
+#Fix building with GCC 8
+Patch9: chromium-gcc8-r588316.patch
+Patch10: chromium-gcc8-r588547.patch
+Patch11: chromium-gcc8-r589614.patch
+%endif
+# More patches to fix chromium build here
+# remove dependency on unrar. That's a nasty code.
+Patch50: unrar.patch
+# Bootstrap still uses python command
+Patch51: py2-bootstrap.patch
+# This build should be only available to amd64
ExclusiveArch: x86_64
########################################################################################
#Compiler settings
@@ -94,7 +134,7 @@ BuildRequires: gcc-c++
%endif
# Basic tools and libraries needed for building
BuildRequires: ninja-build, nodejs, bison, gperf, hwdata
-BuildRequires: libgcc, glibc, libatomic, libstdc++-static
+BuildRequires: libgcc, glibc, libatomic
BuildRequires: libcap-devel, cups-devel, alsa-lib-devel
BuildRequires: mesa-libGL-devel, mesa-libEGL-devel
%if %{with system_minizip}
@@ -185,6 +225,7 @@ find -depth -type f -name "*.py" -exec sed -iE '1s=^#! */usr/bin/\(python\|env p
net/third_party/nss \
net/third_party/quic \
net/third_party/spdy \
+ net/third_party/uri_template \
third_party/abseil-cpp \
third_party/adobe \
third_party/analytics \
@@ -213,6 +254,7 @@ find -depth -type f -name "*.py" -exec sed -iE '1s=^#! */usr/bin/\(python\|env p
third_party/catapult/common/py_vulcanize/third_party/rcssmin \
third_party/catapult/common/py_vulcanize/third_party/rjsmin \
third_party/catapult/third_party/polymer \
+ third_party/catapult/third_party/six \
third_party/catapult/tracing/third_party/d3 \
third_party/catapult/tracing/third_party/gl-matrix \
third_party/catapult/tracing/third_party/jszip \
@@ -252,6 +294,8 @@ find -depth -type f -name "*.py" -exec sed -iE '1s=^#! */usr/bin/\(python\|env p
third_party/leveldatabase \
third_party/libaddressinput \
third_party/libaom \
+ third_party/libaom/source/libaom/third_party/vector \
+ third_party/libaom/source/libaom/third_party/x86inc \
third_party/libjingle \
third_party/libphonenumber \
third_party/libsecret \
@@ -326,6 +370,13 @@ find -depth -type f -name "*.py" -exec sed -iE '1s=^#! */usr/bin/\(python\|env p
third_party/webdriver \
third_party/WebKit \
third_party/webrtc \
+ third_party/webrtc/common_audio/third_party/fft4g \
+ third_party/webrtc/common_audio/third_party/spl_sqrt_floor \
+ third_party/webrtc/modules/third_party/fft \
+ third_party/webrtc/modules/third_party/g711 \
+ third_party/webrtc/modules/third_party/g722 \
+ third_party/webrtc/rtc_base/third_party/base64 \
+ third_party/webrtc/rtc_base/third_party/sigslot \
third_party/widevine \
third_party/woff2 \
third_party/xdg-utils \
@@ -336,10 +387,10 @@ find -depth -type f -name "*.py" -exec sed -iE '1s=^#! */usr/bin/\(python\|env p
%endif
tools/gn/base/third_party/icu \
url/third_party/mozilla \
- v8/third_party/antlr4 \
v8/src/third_party/valgrind \
v8/src/third_party/utf8-decoder \
- v8/third_party/inspector_protocol
+ v8/third_party/inspector_protocol \
+ v8/third_party/v8
./build/linux/unbundle/replace_gn_files.py --system-libraries \
flac \
@@ -366,15 +417,12 @@ find -depth -type f -name "*.py" -exec sed -iE '1s=^#! */usr/bin/\(python\|env p
%if %{with system_minizip}
zlib
%endif
-
sed -i 's|//third_party/usb_ids|/usr/share/hwdata|g' device/usb/BUILD.gn
-%if %{clang}
-# Remove compiler flags not supported by our system clang
- sed -i \
- -e '/"-Wno-ignored-pragma-optimize"/d' \
- build/config/compiler/BUILD.gn
-%endif
+
+# Don't use static libstdc++
+sed -i '/-static-libstdc++/d' tools/gn/build/gen.py
+
rmdir third_party/markupsafe
ln -s %{python2_sitearch}/markupsafe third_party/markupsafe
%if %{with system_ply}
@@ -386,7 +434,7 @@ mkdir -p third_party/node/linux/node-linux-x64/bin
ln -s %{_bindir}/node third_party/node/linux/node-linux-x64/bin/node
# Hard code extra version
FILE=chrome/common/channel_info_posix.cc
-sed -i.orig -e 's/getenv("CHROME_VERSION_EXTRA")/"Chromium(vaapi) Fedora Project"/' $FILE
+sed -i.orig -e 's/getenv("CHROME_VERSION_EXTRA")/"chromium-vaapi Fedora Project"/' $FILE
#####################################BUILD#############################################
%build
#export compilar variables
@@ -397,28 +445,28 @@ export CC=clang CXX=clang++
export AR=ar NM=nm
export CC=gcc CXX=g++
%if %{fedora_compilation_flags}
-#Build falgs to make hardened binaries
-#Remove some flags which can create conflicts with chromium gyp flags.
-export CFLAGS="$(echo '%{__global_cflags}' |sed -e 's/-fexceptions//' \
- -e 's/-Werror=format-security//' \
- -e 's/-pipe//' \
- -e 's/-g/-g1/g' \
- -e 's/-g1record-g1cc-switches//' )"
-export CXXFLAGS="$(echo '%{?__global_cxxflags}%{!?__global_cxxflags:%{__global_cflags}}' | sed -e 's/-fexceptions//' \
- -e 's/-Werror=format-security//' \
- -e 's/-pipe//' \
- -e 's/-g/-g1/g' \
- -e 's/-g1record-g1cc-switches//' )"
-
+#Build flags to make hardened binaries
+#Remove some flags which are incompatible with chromium code.
+CBUILDFLAGS="$(echo '%{__global_cflags}' | sed -e 's/-fexceptions//' \
+ -e 's/-Werror=format-security//' \
+ -e 's/-pipe//' \
+ -e 's/-g1record-g1cc-switches//' \
+ -e 's/^-g / /g' -e 's/ -g / /g' -e 's/ -g$//g')"
+CXXBUILDFLAGS="$(echo '%{?__global_cxxflags}%{!?__global_cxxflags:%{__global_cflags}}' | sed -e 's/-fexceptions//' \
+ -e 's/-Werror=format-security//' \
+ -e 's/-pipe//' \
+ -e 's/-g1record-g1cc-switches//' \
+ -e 's/^-g / /g' -e 's/ -g / /g' -e 's/ -g$//g')"
+export CFLAGS="${CBUILDFLAGS}"
+export CXXFLAGS="${CXXBUILDFLAGS} -fpermissive"
export LDFLAGS='%{__global_ldflags}'
%else
-export CXXFLAGS=$CXXFLAGS" -fno-delete-null-pointer-checks"
+export CXXFLAGS=$CXXFLAGS" -fpermissive"
%endif
%endif
gn_args=(
is_debug=false
use_vaapi=true
- use_gtk3=true
enable_swiftshader=false
is_component_build=false
use_sysroot=false
@@ -431,6 +479,7 @@ gn_args=(
use_kerberos=true
use_libpci=true
use_pulseaudio=true
+ link_pulseaudio=true
use_system_freetype=true
enable_widevine=true
%if %{with system_harfbuzz}
@@ -456,6 +505,7 @@ gn_args=(
'google_default_client_id="%{default_client_id}"'
'google_default_client_secret="%{default_client_secret}"'
)
+# Gold is faulty on rawhide so disabled it.
gn_args+=(
%if %{clang}
is_clang=true
@@ -464,9 +514,25 @@ gn_args+=(
%else
is_clang=false
use_lld=false
+%if %{stopgold}
+ use_gold=false
+%endif
+%endif
+)
+#Jumbo stuff
+gn_args+=(
+%if %{jumbo}
+ use_jumbo_build=true
+ jumbo_file_merge_limit=12
+ concurrent_links=1
+%endif
+)
+#symbol
+gn_args+=(
+%if %{debug_pkg}
+ symbol_level=1
%endif
)
-
tools/gn/bootstrap/bootstrap.py --gn-gen-args "${gn_args[*]}"
%{target}/gn --script-executable=%{__python2} gen --args="${gn_args[*]}" %{target}
%if %{debug_logs}
@@ -556,10 +622,21 @@ appstream-util validate-relax --nonet "%{buildroot}%{_metainfodir}/%{name}.appda
%{chromiumdir}/locales/*.pak
#########################################changelogs#################################################
%changelog
+* Wed Oct 17 2018 Akarshan Biswas <akarshan.biswas(a)hotmail.com> 70.0.3538.67-1
+- Update to 70.0.3538.67
+- brand new vaapi patch
+- Add few patches to fix gcc
+- turned on support for jumbo builds by default across all branches
+- Added -fpermissive flag as requirement
+
+* Fri Oct 12 2018 Akarshan Biswas <akarshan.biswas(a)hotmail.com> 69.0.3497.100-5
+- turned of gold in rawhide as it crashes with fedora flags
+- spec cleanup
+- Minor appdata typo fix
+
* Thu Oct 11 2018 Akarshan Biswas <akarshan.biswas(a)hotmail.com> 69.0.3497.100-4
- Rebuild for new libva version on fedora 29+
- Use metainfodir for installing metadata
-- Turn off fedora build flags
* Fri Sep 28 2018 Akarshan Biswas <akarshan.biswas(a)hotmail.com> 69.0.3497.100-3
- Remove dependency on minizip-compat package(https://bugzilla.redhat.com/show_bug.cgi?id=1632170)
diff --git a/enable-vaapi.patch b/enable-vaapi.patch
new file mode 100644
index 0000000..2cb451e
--- /dev/null
+++ b/enable-vaapi.patch
@@ -0,0 +1,257 @@
+From a4d39ad4677cbc83c5e32a205d25c27beb84e13c Mon Sep 17 00:00:00 2001
+From: Akarshan Biswas <hellbanger(a)ga-lmt-s2.biswasab.org>
+Date: Fri, 19 Oct 2018 19:19:44 +0530
+Subject: [PATCH] Enable hardware video decoding and encoding using libva vaapi
+---
+ chrome/browser/about_flags.cc | 14 +++++++-------
+ chrome/browser/flag_descriptions.cc | 6 +++---
+ chrome/browser/flag_descriptions.h | 8 ++++++--
+ components/viz/service/main/viz_main_impl.cc | 2 +-
+ content/gpu/BUILD.gn | 5 +++++
+ content/gpu/gpu_main.cc | 4 ++--
+ gpu/config/software_rendering_list.json | 11 -----------
+ media/base/media_switches.cc | 2 +-
+ media/filters/BUILD.gn | 3 ++-
+ media/gpu/BUILD.gn | 7 +++++++
+ 10 files changed, 34 insertions(+), 28 deletions(-)
+
+diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
+index d029d0648..942f3627b 100644
+--- a/chrome/browser/about_flags.cc
++++ b/chrome/browser/about_flags.cc
+@@ -1386,18 +1386,18 @@ const FeatureEntry kFeatureEntries[] = {
+ flag_descriptions::kUiPartialSwapDescription, kOsAll,
+ SINGLE_DISABLE_VALUE_TYPE(switches::kUIDisablePartialSwap)},
+ {"disable-webrtc-hw-decoding", flag_descriptions::kWebrtcHwDecodingName,
+- flag_descriptions::kWebrtcHwDecodingDescription, kOsAndroid | kOsCrOS,
++ flag_descriptions::kWebrtcHwDecodingDescription, kOsAndroid | kOsCrOS | kOsLinux,
+ SINGLE_DISABLE_VALUE_TYPE(switches::kDisableWebRtcHWDecoding)},
+ {"disable-webrtc-hw-encoding", flag_descriptions::kWebrtcHwEncodingName,
+ flag_descriptions::kWebrtcHwEncodingDescription, kOsAndroid | kOsCrOS,
+ SINGLE_DISABLE_VALUE_TYPE(switches::kDisableWebRtcHWEncoding)},
+ {"enable-webrtc-hw-h264-encoding",
+ flag_descriptions::kWebrtcHwH264EncodingName,
+- flag_descriptions::kWebrtcHwH264EncodingDescription, kOsAndroid | kOsCrOS,
++ flag_descriptions::kWebrtcHwH264EncodingDescription, kOsAndroid | kOsCrOS | kOsLinux,
+ FEATURE_VALUE_TYPE(features::kWebRtcHWH264Encoding)},
+ {"enable-webrtc-hw-vp8-encoding",
+ flag_descriptions::kWebrtcHwVP8EncodingName,
+- flag_descriptions::kWebrtcHwVP8EncodingDescription, kOsAndroid | kOsCrOS,
++ flag_descriptions::kWebrtcHwVP8EncodingDescription, kOsAndroid | kOsCrOS | kOsLinux,
+ FEATURE_VALUE_TYPE(features::kWebRtcHWVP8Encoding)},
+ #if !defined(OS_ANDROID)
+ {"enable-webrtc-remote-event-log",
+@@ -1775,7 +1775,7 @@ const FeatureEntry kFeatureEntries[] = {
+ "disable-accelerated-video-decode",
+ flag_descriptions::kAcceleratedVideoDecodeName,
+ flag_descriptions::kAcceleratedVideoDecodeDescription,
+- kOsMac | kOsWin | kOsCrOS | kOsAndroid,
++ kOsMac | kOsWin | kOsCrOS | kOsAndroid | kOsLinux,
+ SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
+ },
+ #if defined(OS_WIN)
+@@ -2457,12 +2457,12 @@ const FeatureEntry kFeatureEntries[] = {
+ FEATURE_VALUE_TYPE(features::kOpenVR)},
+ #endif // ENABLE_OPENVR
+ #endif // ENABLE_VR
+-#if defined(OS_CHROMEOS)
++#if defined(OS_CHROMEOS) || defined(OS_LINUX)
+ {"disable-accelerated-mjpeg-decode",
+ flag_descriptions::kAcceleratedMjpegDecodeName,
+- flag_descriptions::kAcceleratedMjpegDecodeDescription, kOsCrOS,
++ flag_descriptions::kAcceleratedMjpegDecodeDescription, kOsCrOS | kOsLinux,
+ SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedMjpegDecode)},
+-#endif // OS_CHROMEOS
++#endif // OS_CHROMEOS OS_LINUX
+ {"v8-cache-options", flag_descriptions::kV8CacheOptionsName,
+ flag_descriptions::kV8CacheOptionsDescription, kOsAll,
+ MULTI_VALUE_TYPE(kV8CacheOptionsChoices)},
+diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
+index 0cb812619..b53567008 100644
+--- a/chrome/browser/flag_descriptions.cc
++++ b/chrome/browser/flag_descriptions.cc
+@@ -3053,9 +3053,9 @@ const char kTextSuggestionsTouchBarDescription[] =
+
+ #endif
+
+-// Chrome OS -------------------------------------------------------------------
++// Chrome OS and Linux-------------------------------------------------------------------
+
+-#if defined(OS_CHROMEOS)
++#if defined(OS_CHROMEOS) || (defined(OS_LINUX) && !defined(OS_ANDROID))
+
+ const char kAcceleratedMjpegDecodeName[] =
+ "Hardware-accelerated mjpeg decode for captured frame";
+@@ -3595,7 +3595,7 @@ const char kZipArchiverUnpackerName[] = "ZIP archiver - Unpacker";
+ const char kZipArchiverUnpackerDescription[] =
+ "Enable or disable the ability to unpack archives in incognito mode";
+
+-#endif // defined(OS_CHROMEOS)
++#endif // defined(OS_CHROMEOS) defined(OS_LINUX)
+
+ // Random platform combinations -----------------------------------------------
+
+diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
+index b3c5e5691..3306c5a27 100644
+--- a/chrome/browser/flag_descriptions.h
++++ b/chrome/browser/flag_descriptions.h
+@@ -1846,13 +1846,17 @@ extern const char kPermissionPromptPersistenceToggleDescription[];
+
+ #endif // defined(OS_MACOSX)
+
+-// Chrome OS ------------------------------------------------------------------
+
+-#if defined(OS_CHROMEOS)
++
++#if defined(OS_CHROMEOS) || (defined(OS_LINUX) && !defined(OS_ANDROID))
+
+ extern const char kAcceleratedMjpegDecodeName[];
+ extern const char kAcceleratedMjpegDecodeDescription[];
+
++#endif
++// Only Chrome OS ------------------------------------------------------------------
++#if defined(OS_CHROMEOS)
++
+ extern const char kAllowTouchpadThreeFingerClickName[];
+ extern const char kAllowTouchpadThreeFingerClickDescription[];
+
+diff --git a/components/viz/service/main/viz_main_impl.cc b/components/viz/service/main/viz_main_impl.cc
+index 2196abef4..b4e0a1ae1 100644
+--- a/components/viz/service/main/viz_main_impl.cc
++++ b/components/viz/service/main/viz_main_impl.cc
+@@ -41,7 +41,7 @@ std::unique_ptr<base::Thread> CreateAndStartIOThread() {
+ // It should be possible to use |main_task_runner_| for doing IO tasks.
+ base::Thread::Options thread_options(base::MessageLoop::TYPE_IO, 0);
+ thread_options.priority = base::ThreadPriority::NORMAL;
+-#if defined(OS_ANDROID) || defined(OS_CHROMEOS)
++#if defined(OS_ANDROID) || defined(OS_CHROMEOS) || defined(OS_LINUX)
+ // TODO(reveman): Remove this in favor of setting it explicitly for each
+ // type of process.
+ thread_options.priority = base::ThreadPriority::DISPLAY;
+diff --git a/content/gpu/BUILD.gn b/content/gpu/BUILD.gn
+index 8974e441d..24b7acd3d 100644
+--- a/content/gpu/BUILD.gn
++++ b/content/gpu/BUILD.gn
+@@ -6,6 +6,7 @@ import("//build/config/jumbo.gni")
+ import("//build/config/ui.gni")
+ import("//gpu/vulkan/features.gni")
+ import("//media/media_options.gni")
++import("//media/gpu/args.gni")
+ import("//ui/ozone/ozone.gni")
+
+ # See //content/BUILD.gn for how this works.
+@@ -134,4 +135,8 @@ target(link_target_type, "gpu_sources") {
+ (!is_chromecast || is_cast_desktop_build)) {
+ configs += [ "//build/config/linux/dri" ]
+ }
++ # Use vaapi on desktop Linux builds when use_vaapi is set
++ if (is_desktop_linux && use_vaapi) {
++ public_configs = [ "//media/gpu:libva_config" ]
++ }
+ }
+diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
+index f589d015d..03fd1b44a 100644
+--- a/content/gpu/gpu_main.cc
++++ b/content/gpu/gpu_main.cc
+@@ -283,7 +283,7 @@ int GpuMain(const MainFunctionParams& parameters) {
+
+ base::PlatformThread::SetName("CrGpuMain");
+
+-#if defined(OS_ANDROID) || defined(OS_CHROMEOS)
++#if defined(OS_ANDROID) || defined(OS_CHROMEOS) || defined(OS_LINUX)
+ // Set thread priority before sandbox initialization.
+ base::PlatformThread::SetCurrentThreadPriority(base::ThreadPriority::DISPLAY);
+ #endif
+@@ -316,7 +316,7 @@ int GpuMain(const MainFunctionParams& parameters) {
+ GetContentClient()->SetGpuInfo(gpu_init->gpu_info());
+
+ base::ThreadPriority io_thread_priority = base::ThreadPriority::NORMAL;
+-#if defined(OS_ANDROID) || defined(OS_CHROMEOS)
++#if defined(OS_ANDROID) || defined(OS_CHROMEOS) || defined(OS_LINUX)
+ io_thread_priority = base::ThreadPriority::DISPLAY;
+ #endif
+
+diff --git a/gpu/config/software_rendering_list.json b/gpu/config/software_rendering_list.json
+index 445953a64..0aac9ddb6 100644
+--- a/gpu/config/software_rendering_list.json
++++ b/gpu/config/software_rendering_list.json
+@@ -373,17 +373,6 @@
+ "all"
+ ]
+ },
+- {
+- "id": 48,
+- "description": "Accelerated video decode is unavailable on Linux",
+- "cr_bugs": [137247],
+- "os": {
+- "type": "linux"
+- },
+- "features": [
+- "accelerated_video_decode"
+- ]
+- },
+ {
+ "id": 50,
+ "description": "Disable VMware software renderer on older Mesa",
+diff --git a/media/base/media_switches.cc b/media/base/media_switches.cc
+index 684c1d5cf..e887e60bb 100644
+--- a/media/base/media_switches.cc
++++ b/media/base/media_switches.cc
+@@ -468,7 +468,7 @@ bool IsVideoCaptureAcceleratedJpegDecodingEnabled() {
+ switches::kUseFakeJpegDecodeAccelerator)) {
+ return true;
+ }
+-#if defined(OS_CHROMEOS)
++#if defined(OS_CHROMEOS) || defined(OS_LINUX)
+ return true;
+ #endif
+ return false;
+diff --git a/media/filters/BUILD.gn b/media/filters/BUILD.gn
+index ab6215152..b8d1ee896 100644
+--- a/media/filters/BUILD.gn
++++ b/media/filters/BUILD.gn
+@@ -5,6 +5,7 @@
+ import("//build/config/jumbo.gni")
+ import("//media/media_options.gni")
+ import("//third_party/libaom/options.gni")
++import("//media/gpu/args.gni")
+
+ jumbo_source_set("filters") {
+ # Do not expand the visibility here without double-checking with OWNERS, this
+@@ -198,7 +199,7 @@ jumbo_source_set("filters") {
+ deps += [ "//media/base/android" ]
+ }
+
+- if (current_cpu != "arm" && is_linux) {
++ if (use_vaapi && is_linux) {
+ sources += [
+ "h264_bitstream_buffer.cc",
+ "h264_bitstream_buffer.h",
+diff --git a/media/gpu/BUILD.gn b/media/gpu/BUILD.gn
+index 9ef4730a4..0c3a06c24 100644
+--- a/media/gpu/BUILD.gn
++++ b/media/gpu/BUILD.gn
+@@ -501,6 +501,12 @@ if (use_v4l2_codec || use_vaapi || is_mac || is_win) {
+ }
+ }
+
++import("//build/config/linux/pkg_config.gni")
++
++pkg_config("libva_config") {
++ packages = [ "libva" ]
++}
++
+ if (use_vaapi) {
+ test("jpeg_encode_accelerator_unittest") {
+ deps = [
+@@ -571,6 +577,7 @@ if (use_v4l2_codec || use_vaapi) {
+ if (use_ozone) {
+ deps += [ "//ui/ozone" ]
+ }
++ public_configs = [ ":libva_config" ]
+ }
+ }
+
+--
+2.17.2
+
diff --git a/silencegcc.patch b/silencegcc.patch
new file mode 100644
index 0000000..e5c6c9a
--- /dev/null
+++ b/silencegcc.patch
@@ -0,0 +1,31 @@
+From 8f49c61779610638bf4313000c0e9f467523730e Mon Sep 17 00:00:00 2001
+From: Akarshan Biswas <hellbanger(a)ga-lmt-s2.biswasab.org>
+Date: Sat, 20 Oct 2018 09:53:26 +0530
+Subject: [PATCH] Silence some gcc warnings on linux
+
+---
+ build/config/compiler/BUILD.gn | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
+index d1bb5597f..05aae1063 100644
+--- a/build/config/compiler/BUILD.gn
++++ b/build/config/compiler/BUILD.gn
+@@ -239,6 +239,14 @@ config("compiler") {
+ ":compiler_cpu_abi",
+ ":compiler_codegen",
+ ]
++ # Avoid warning flood on linux with gcc
++ if (is_linux && !is_clang) {
++ cflags += [ "-Wno-pragmas" ]
++ cflags += [ "-Wno-attributes" ]
++ cflags += [ "-Wno-ignored-attributes" ]
++ cflags += [ "-Wno-packed-not-aligned" ]
++ cflags_cc += [ "-Wno-class-memaccess" ]
++ }
+
+ # In general, Windows is totally different, but all the other builds share
+ # some common GCC configuration.
+--
+2.17.2
+
diff --git a/sources b/sources
index 7d1e885..f405063 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-1779724693bdcf7b4e01ea1133abdde2 chromium-69.0.3497.100.tar.xz
+2c6e39bdbeea70fdd30832fa18bbe6fb chromium-70.0.3538.67.tar.xz
5 years, 1 month
[chromium-browser-privacy/f30] (99 commits) ...Import sources with full history
by qvint
Summary of changes:
2012613... Initial setup of the repo (*)
444bbe5... Remove dependency on minizip-compat package(https://bugzill (*)
e45f345... Rebuild against new libva version on Fedora 29+ (*)
9bea27a... Turn off gold linker since it crashes; Make use of metainfo (*)
eb2287c... Re enable Gold for rawhide (*)
8a9fd2c... Turn off fedora build flags on rawhide (*)
a4eb1cd... Update to 70.0.3538.67 with new vaapi patch (*)
ba7299a... Reduce jumbo_file_merge_limit to a much lower number since (*)
6b14e1f... Update to 70.0.3538.77 Add a patch to fix building with sys (*)
7f8e0b3... Re brand chromium-vaapi and update vaapi patch (*)
d6f0043... Add a patch to fix building with harfbuzz2 on rawhide (*)
1988246... Switch to %%setup from %%autosetup because adding condition (*)
764a3f6... Update to 70.0.3538.102 (*)
f845271... Add a patch from upstream to remove sysroot-related options (*)
1829f0d... Update to 70.0.3538.110 (*)
a99d631... Update to 71.0.3578.80 Add a patch to fix libva version mis (*)
14e8997... Update to 71.0.3578.98 (*)
44e517b... Re enable the non effective enable_widevine flag (*)
95bdf98... Update to 72.0.3626.81 Add a patch to fix missing includes (*)
39ae7ad... Disable gold linker (again); Update didn't fixed the issue. (*)
473eed6... Rebundle icu for fedora 29 and fedora 28; Need icu version (*)
d918bbe... Update to 72.0.3626.109 remove ozone patches (*)
9f27085... Enable webrtc includes patch again. (*)
e57526b... Add fix-the-VA_CHECK_VERSION patch from upstream (*)
2ce345d... Updated to 72.0.3626.121 spec cleanup (*)
147974b... Update to 73.0.3683.75 Update BuildRequires for ozone, libv (*)
eba61dc... Enable pipewire support Added a patch from fedora to fix bu (*)
d76fb61... Add a patch from upstream to stop vsync error spam when run (*)
8b7b9e0... Switched to clang compiler which is supported by upstream (*)
f149ea0... Update to 73.0.3683.86. Disable debug logs. (*)
4d4d9b4... Update source file. (*)
27d8141... Switched to GNU ar and nm to work around a bug in the curre (*)
e953730... Fix date in changelog. (*)
45601a9... Revert switching to GNU ar and nm. (*)
8bf777f... Update to 73.0.3683.103. (*)
5e4b736... Update to 73.0.3683.103. (*)
16c42b6... Add wildcard for gitignore (*)
528cdf6... Removed outdated workarounds for linker and compiler (*)
566b951... Merge branch 'master' of ssh://pkgs.rpmfusion.org/free/chro (*)
8a83ddf... Fixed build with llvm 8. (*)
846be0c... Merge branch 'master' into f30 (*)
84f0bc7... Add MEIPreload in install package (*)
f0dfab7... Update to 74.0.3729.108 Install missing MEIPreload componen (*)
b94d551... Upload new sources (*)
5a043eb... Merge branch 'master' into f30 (*)
4bbccf8... Update to 74.0.3729.131 and spec cleanup (*)
b5ae81c... Merge branch 'master' into f30 (*)
0681269... Add a patch from upstream to Fix window flash for some WMs; (*)
f728a8c... Update to 74.0.3729.157 (*)
0dc6aab... Merge branch 'master' into f30 (*)
f98d107... Update to 74.0.3729.169. (*)
f426b11... Update to 74.0.3729.169. (*)
a16c57f... Merge branch 'master' into f30 (*)
4591d7d... Add patch to Disallow non-buildable sources in binary targe (*)
7d52ac7... Merge branch 'master' into f30 (*)
d8f20b8... Update to 75.0.3770.80 (*)
b76762b... Upload new sources (*)
51b388c... Use %autosetup and switch back to GCC (build fails on clang (*)
5eaf680... Update to 75.0.3770.90 Re bundle icu; requires 64 and up Us (*)
836f1f3... Use linux/sockios.h instead of sys/socket.h (linux 5.2) (*)
7bf836e... Merge branch 'master' into f30 (*)
2742ca6... Update to 75.0.3770.100. (*)
4b7d14f... Merge branch 'master' into f30 (*)
da49c06... Fix vaapi regression on few intel devices, disabled vaapi p (*)
e9e9fcd... Merge branch 'master' into f30 (*)
24e2c81... Remove the orig file (*)
641d58d... Remove the orig file (*)
7f157b7... Update to 75.0.3770.142 Removed Nvidia GPU video decode bla (*)
c3570e3... Merge branch 'master' into f30 (*)
bac7d04... - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass (*)
ca1f5b4... Update to 76.0.3809.100 (*)
90547a9... Add a patch to fix Unrar wrapper (*)
b0a2aed... Remove the no unrar patch (*)
9475c8a... Use unrar, it is free software and license permits to be fr (*)
61d5af5... Add third_party/unrar (*)
7225b60... Merge branch 'master' into f30 (*)
138fb15... Fix a bug which causes chromium to reject certificates by t (*)
ba193ad... Merge branch 'master' into f30 (*)
7158681... Update to 76.0.3809.132 (*)
b65c857... Merge branch 'master' into f30 (*)
4fb0363... Correct writting either RPM Fusion or rpmfusion (*)
97b636a... Update to 77.0.3865.90 Disabled Nvidia support (*)
7b33c54... Use the bundled python2 as python2 is going to be removed f (*)
58a9a8f... Add build requires: /usr/bin/python2 (*)
08af7c1... Preserve bundled pylibs (*)
fee2c1b... Apply ungoogled-chromium modifications (*)
9bd4d86... Rename to chromium-browser-privacy (*)
6724e3f... Rebundle harfbuzz (*)
0257b50... Enable Shiftshader support (*)
5b41de2... Revert "Rebundle harfbuzz" (*)
9d56b6c... Add patch from upstream to fix building with system harfbuz (*)
88571ef... Restart the changelog (*)
578480c... Merge branch 'master' into f30 (*)
532a378... Merge branch 'chromium-vaapi-f30' into chromium-browser-pri (*)
55586db... Update to 77.0.3865.120 (*)
c1aa6a5... Upload: New Sources (*)
8d976e2... Remove: blink symbol level gn flag, use the default option (*)
54087a4... Merge branch 'chromium-vaapi-f30' into chromium-browser-pri (*)
0716825... Import sources with full history (*)
(*) This commit already existed in another branch; no separate mail sent
5 years, 1 month
[chromium-browser-privacy: 6/103] Turn off fedora build flags on rawhide
by qvint
commit 8a9fd2cb6b02aa02dad85edab7c444c24fb7e6e9
Author: Akarshan Biswas <hellbanger(a)ga-lmt-s2.biswasab.org>
Date: Tue Oct 16 17:59:20 2018 +0530
Turn off fedora build flags on rawhide
chromium-vaapi.spec | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/chromium-vaapi.spec b/chromium-vaapi.spec
index 0120130..0479a34 100644
--- a/chromium-vaapi.spec
+++ b/chromium-vaapi.spec
@@ -46,7 +46,7 @@
# Allow compiling with clang
%global clang 0
#Allow building with Fedora compilation flags
-%global fedora_compilation_flags 1
+%global fedora_compilation_flags 0
##############################Package Definitions######################################
Name: chromium-vaapi
Version: 69.0.3497.100
@@ -559,6 +559,7 @@ appstream-util validate-relax --nonet "%{buildroot}%{_metainfodir}/%{name}.appda
* Thu Oct 11 2018 Akarshan Biswas <akarshan.biswas(a)hotmail.com> 69.0.3497.100-4
- Rebuild for new libva version on fedora 29+
- Use metainfodir for installing metadata
+- Turn off fedora build flags
* Fri Sep 28 2018 Akarshan Biswas <akarshan.biswas(a)hotmail.com> 69.0.3497.100-3
- Remove dependency on minizip-compat package(https://bugzilla.redhat.com/show_bug.cgi?id=1632170)
5 years, 1 month
[chromium-browser-privacy: 5/103] Re enable Gold for rawhide
by qvint
commit eb2287cc654b8c2f84ac2cdcbca8402657280269
Author: Akarshan Biswas <hellbanger(a)ga-lmt-s2.biswasab.org>
Date: Mon Oct 15 12:26:42 2018 +0530
Re enable Gold for rawhide
chromium-vaapi.spec | 2 --
1 file changed, 2 deletions(-)
---
diff --git a/chromium-vaapi.spec b/chromium-vaapi.spec
index dd9a703..0120130 100644
--- a/chromium-vaapi.spec
+++ b/chromium-vaapi.spec
@@ -447,7 +447,6 @@ gn_args=(
enable_hangout_services_extension=false
fatal_linker_warnings=false
treat_warnings_as_errors=false
- use_gold=false
linux_use_bundled_binutils=false
remove_webcore_debug_symbols=true
fieldtrial_testing_like_official_build=true
@@ -559,7 +558,6 @@ appstream-util validate-relax --nonet "%{buildroot}%{_metainfodir}/%{name}.appda
%changelog
* Thu Oct 11 2018 Akarshan Biswas <akarshan.biswas(a)hotmail.com> 69.0.3497.100-4
- Rebuild for new libva version on fedora 29+
-- turn off gold linker
- Use metainfodir for installing metadata
* Fri Sep 28 2018 Akarshan Biswas <akarshan.biswas(a)hotmail.com> 69.0.3497.100-3
5 years, 1 month
[chromium-browser-privacy: 4/103] Turn off gold linker since it crashes; Make use of metainfodir macro and spec cleanup
by qvint
commit 9bea27ae58c3b5a6ce8b01d5890572f3ff2a46e9
Author: Akarshan Biswas <hellbanger(a)ga-lmt-s2.biswasab.org>
Date: Thu Oct 11 17:18:06 2018 +0530
Turn off gold linker since it crashes; Make use of metainfodir macro and spec cleanup
chromium-vaapi.spec | 21 +++++++--------------
1 file changed, 7 insertions(+), 14 deletions(-)
---
diff --git a/chromium-vaapi.spec b/chromium-vaapi.spec
index 958163b..dd9a703 100644
--- a/chromium-vaapi.spec
+++ b/chromium-vaapi.spec
@@ -1,13 +1,3 @@
-# This spec file is based on other spec files, ebuilds, PKGBUILDs available from
-# [1] https://repos.fedorapeople.org/repos/spot/chromium/
-# [2] https://copr.fedoraproject.org/coprs/churchyard/chromium-russianfedora-te...
-# [3] https://www.archlinux.org/packages/extra/x86_64/chromium/
-# [4] https://src.fedoraproject.org/rpms/chromium/
-# [5] https://gitweb.gentoo.org/repo/gentoo.git/tree/www-client/chromium/
-# [6] https://copr.fedorainfracloud.org/coprs/lantw44/chromium/
-# Get the version number of latest stable version
-# $ curl -s 'https://omahaproxy.appspot.com/all?os=linux&channel=stable' | sed 1d | cut -d , -f 3
-######################################################################################################################
#Global Libraries
#Do not turn it on in Fedora copr!
%global freeworld 1
@@ -457,6 +447,7 @@ gn_args=(
enable_hangout_services_extension=false
fatal_linker_warnings=false
treat_warnings_as_errors=false
+ use_gold=false
linux_use_bundled_binutils=false
remove_webcore_debug_symbols=true
fieldtrial_testing_like_official_build=true
@@ -489,13 +480,13 @@ ninja %{_smp_mflags} -C %{target} chrome chrome_sandbox chromedriver
mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{chromiumdir}/locales
mkdir -p %{buildroot}%{_mandir}/man1
-mkdir -p %{buildroot}%{_datadir}/metainfo
+mkdir -p %{buildroot}%{_metainfodir}
mkdir -p %{buildroot}%{_datadir}/applications
mkdir -p %{buildroot}%{_datadir}/gnome-control-center/default-apps
sed -e "s|@@CHROMIUMDIR@@|%{chromiumdir}|" -e "s|@@BUILDTARGET@@|`cat /etc/redhat-release`|" \
%{SOURCE10} > chromium-vaapi.sh
install -m 755 chromium-vaapi.sh %{buildroot}%{_bindir}/%{name}
-install -m 644 %{SOURCE11} %{buildroot}%{_datadir}/metainfo
+install -m 644 %{SOURCE11} %{buildroot}%{_metainfodir}
sed -e "s|@@MENUNAME@@|%{name}|g" -e "s|@@PACKAGE@@|%{name}|g" \
chrome/app/resources/manpage.1.in > chrome.1
install -m 644 chrome.1 %{buildroot}%{_mandir}/man1/%{name}.1
@@ -531,13 +522,13 @@ for i in 22 24 32 48 64 128 256; do
done
####################################check##################################################
%check
-appstream-util validate-relax --nonet "%{buildroot}%{_datadir}/metainfo/%{name}.appdata.xml"
+appstream-util validate-relax --nonet "%{buildroot}%{_metainfodir}/%{name}.appdata.xml"
######################################files################################################
%files
%license LICENSE
%doc AUTHORS
%{_bindir}/chromium-vaapi
-%{_datadir}/metainfo/chromium-vaapi.appdata.xml
+%{_metainfodir}/chromium-vaapi.appdata.xml
%{_datadir}/applications/chromium-vaapi.desktop
%{_datadir}/gnome-control-center/default-apps/chromium-vaapi.xml
%{_datadir}/icons/hicolor/16x16/apps/chromium-vaapi.png
@@ -568,6 +559,8 @@ appstream-util validate-relax --nonet "%{buildroot}%{_datadir}/metainfo/%{name}.
%changelog
* Thu Oct 11 2018 Akarshan Biswas <akarshan.biswas(a)hotmail.com> 69.0.3497.100-4
- Rebuild for new libva version on fedora 29+
+- turn off gold linker
+- Use metainfodir for installing metadata
* Fri Sep 28 2018 Akarshan Biswas <akarshan.biswas(a)hotmail.com> 69.0.3497.100-3
- Remove dependency on minizip-compat package(https://bugzilla.redhat.com/show_bug.cgi?id=1632170)
5 years, 1 month
[chromium-browser-privacy: 3/103] Rebuild against new libva version on Fedora 29+
by qvint
commit e45f345921c939d2f99ce80e4a65f2f2cb1c1efb
Author: Akarshan Biswas <hellbanger(a)ga-lmt-s2.biswasab.org>
Date: Thu Oct 11 09:31:41 2018 +0530
Rebuild against new libva version on Fedora 29+
chromium-vaapi.spec | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/chromium-vaapi.spec b/chromium-vaapi.spec
index f2d300b..958163b 100644
--- a/chromium-vaapi.spec
+++ b/chromium-vaapi.spec
@@ -60,7 +60,7 @@
##############################Package Definitions######################################
Name: chromium-vaapi
Version: 69.0.3497.100
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: A Chromium web browser with video decoding acceleration
License: BSD and LGPLv2+ and ASL 2.0 and IJG and MIT and GPLv2+ and ISC and OpenSSL and (MPLv1.1 or GPLv2 or LGPLv2)
URL: https://www.chromium.org/Home
@@ -566,6 +566,9 @@ appstream-util validate-relax --nonet "%{buildroot}%{_datadir}/metainfo/%{name}.
%{chromiumdir}/locales/*.pak
#########################################changelogs#################################################
%changelog
+* Thu Oct 11 2018 Akarshan Biswas <akarshan.biswas(a)hotmail.com> 69.0.3497.100-4
+- Rebuild for new libva version on fedora 29+
+
* Fri Sep 28 2018 Akarshan Biswas <akarshan.biswas(a)hotmail.com> 69.0.3497.100-3
- Remove dependency on minizip-compat package(https://bugzilla.redhat.com/show_bug.cgi?id=1632170)
- Add conditions to build with{out} system minizip
5 years, 1 month
[chromium-browser-privacy: 2/103] Remove dependency on minizip-compat package(https://bugzilla.redhat.com/show_bug.cgi?id=1632170) Add
by qvint
commit 444bbe51cf3250b7fe426354858a35f7d05c1f73
Author: Akarshan Biswas <hellbanger(a)ga-lmt-s2.biswasab.org>
Date: Sat Sep 29 14:05:57 2018 +0530
Remove dependency on minizip-compat package(https://bugzilla.redhat.com/show_bug.cgi?id=1632170)
Add conditions to build with{out} system minizip
.gitignore | 1 +
LICENSE | 29 +++
chromium-vaapi.appdata.xml | 37 +++
chromium-vaapi.sh | 60 +++++
chromium-vaapi.spec | 598 +++++++++++++++++++++++++++++++++++++++++++++
py2-bootstrap.patch | 33 +++
sources | 1 +
unrar.patch | 186 ++++++++++++++
vaapi.patch | 542 ++++++++++++++++++++++++++++++++++++++++
widevine.patch | 23 ++
10 files changed, 1510 insertions(+)
---
diff --git a/.gitignore b/.gitignore
index e69de29..6317544 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/chromium-69.0.3497.100.tar.xz
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..1c5664f
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,29 @@
+BSD 3-Clause License
+
+Copyright (c) 2018, Akarshan Biswas
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+* Neither the name of the copyright holder nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/chromium-vaapi.appdata.xml b/chromium-vaapi.appdata.xml
new file mode 100644
index 0000000..a2b2064
--- /dev/null
+++ b/chromium-vaapi.appdata.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Referenced from https://www.freedesktop.org/software/appstream/docs/chap-Quickstart.html#... -->
+<component type="desktop">
+ <id>chromium-vaapi.desktop</id>
+ <update_contact> chromium-vaapi-owner(a)rpmfusion.org</update_contact>
+ <metadata_license>CC0-1.0</metadata_license>
+ <project_license>BSD-3-Clause and LGPL-2.1+ and Apache-2.0 and IJG and MIT and GPL-2.0+ and ISC and OpenSSL and (MPL-1.1 or GPL-2.0 or LGPL-2.0)</project_license>
+ <name>chromium-vaapi</name>
+ <summary>Web Browser</summary>
+ <description>
+ <p>
+ Chromium-vaapi is an open-source browser based on webkit(blink).
+ This build of chromium comes with video decoding acceleration enabled through libva vaapi.
+ Chromium browser with hardware video decoding will not only increase the battery by minimising the power consumption but also enable 4K video ( if supported ) on weaker systems. Installing this build requires vaapi driver to be installed on the system. check with vainfo. Compare CPU usages of both enabled and disabled state.
+ </p>
+ <p>
+ Video acceleration may or may not work on Nvidia GPUs because of no support of vaapi. Only Intel and amdgpus are supported at the moment. If chromium gives an error, try checking your gpu by running vainfo.
+Nvidia's open source Nouveau driver might work(with firmware from the binary driver) but it may crash.
+ Please look at the logs in chrome://gpu.
+Sometimes "Video Decode" in the "Graphics Feature Status" maybe misleading, Please look at "Video Acceleration Information" section.
+ </p>
+ </description>
+ <url type="homepage">https://www.chromium.org/Home</url>
+ <screenshots>
+ <screenshot type="default">
+ <caption>The main window</caption>
+ <image>https://gitlab.com/biswasab/Project-screenshots/raw/master/a.png</image>
+ </screenshot>
+ <screenshot>
+ <caption>The chrome://gpu page</caption>
+ <image>https://gitlab.com/biswasab/Project-screenshots/raw/master/b.png</image>
+ </screenshot>
+ </screenshots>
+ <developer_name>Google</developer_name>
+ <url type="bugtracker">https://bugzilla.rpmfusion.org</url>
+ <url type="help">https://chromium.googlesource.com/chromium/src/+/master/docs/linux_debugg...</url>
+</component>
diff --git a/chromium-vaapi.sh b/chromium-vaapi.sh
new file mode 100644
index 0000000..77a0027
--- /dev/null
+++ b/chromium-vaapi.sh
@@ -0,0 +1,60 @@
+#!/bin/bash
+#
+# Copyright (c) 2011 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# This file is obtained from https://src.fedoraproject.org/rpms/chromium/
+# and modified by Akarshan Biswas <akarshan.biswas(a)hotmail.com. All modifications are also
+# licensed under 3-clause BSD license.
+
+# Let the wrapped binary know that it has been run through the wrapper.
+export CHROME_WRAPPER="$(readlink -f "$0")"
+
+HERE="`dirname "$CHROME_WRAPPER"`"
+export CHROME_DESKTOP="chromium-vaapi.desktop"
+# We include some xdg utilities next to the binary, and we want to prefer them
+# over the system versions when we know the system versions are very old. We
+# detect whether the system xdg utilities are sufficiently new to be likely to
+# work for us by looking for xdg-settings. If we find it, we leave $PATH alone,
+# so that the system xdg utilities (including any distro patches) will be used.
+if ! which xdg-settings &> /dev/null; then
+ # Old xdg utilities. Prepend $HERE to $PATH to use ours instead.
+ export PATH="$HERE:$PATH"
+else
+ # Use system xdg utilities. But first create mimeapps.list if it doesn't
+ # exist; some systems have bugs in xdg-mime that make it fail without it.
+ xdg_app_dir="${XDG_DATA_HOME:-$HOME/.local/share/applications}"
+ mkdir -p "$xdg_app_dir"
+ [ -f "$xdg_app_dir/mimeapps.list" ] || touch "$xdg_app_dir/mimeapps.list"
+fi
+
+# Always use our versions of ffmpeg libs.
+# This also makes RPMs find the compatibly-named library symlinks.
+if [[ -n "$LD_LIBRARY_PATH" ]]; then
+ LD_LIBRARY_PATH="$HERE:$HERE/lib:$LD_LIBRARY_PATH"
+else
+ LD_LIBRARY_PATH="$HERE:$HERE/lib"
+fi
+export LD_LIBRARY_PATH
+
+# Sanitize std{in,out,err} because they'll be shared with untrusted child
+# processes (http://crbug.com/376567).
+exec < /dev/null
+exec > >(exec cat)
+exec 2> >(exec cat >&2)
+
+export CHROME_VERSION_EXTRA="Built from source for @@BUILDTARGET@@"
+
+CHROMIUM_DISTRO_FLAGS=" --enable-plugins \
+ --enable-extensions \
+ --enable-user-scripts \
+ --enable-printing \
+ --enable-accelerated-video \
+ --enable-native-gpu-memory-buffers \
+ --enable-accelerated-mjpeg-decode \
+ --enable-gpu-rasterization \
+ --disable-gpu-driver-bug-workarounds \
+ --enable-sync"
+
+exec -a "$0" "@@CHROMIUMDIR@@/$(basename "$0" | sed 's/\.sh$//')" $CHROMIUM_DISTRO_FLAGS "$@"
diff --git a/chromium-vaapi.spec b/chromium-vaapi.spec
new file mode 100644
index 0000000..f2d300b
--- /dev/null
+++ b/chromium-vaapi.spec
@@ -0,0 +1,598 @@
+# This spec file is based on other spec files, ebuilds, PKGBUILDs available from
+# [1] https://repos.fedorapeople.org/repos/spot/chromium/
+# [2] https://copr.fedoraproject.org/coprs/churchyard/chromium-russianfedora-te...
+# [3] https://www.archlinux.org/packages/extra/x86_64/chromium/
+# [4] https://src.fedoraproject.org/rpms/chromium/
+# [5] https://gitweb.gentoo.org/repo/gentoo.git/tree/www-client/chromium/
+# [6] https://copr.fedorainfracloud.org/coprs/lantw44/chromium/
+# Get the version number of latest stable version
+# $ curl -s 'https://omahaproxy.appspot.com/all?os=linux&channel=stable' | sed 1d | cut -d , -f 3
+######################################################################################################################
+#Global Libraries
+#Do not turn it on in Fedora copr!
+%global freeworld 1
+#This can be any folder on out
+%global target out/Release
+#Our installation folder
+%global chromiumdir %{_libdir}/chromium-vaapi
+### Google API keys (see http://www.chromium.org/developers/how-tos/api-keys)
+### Note: These are for Fedora use ONLY.
+### For your own distribution, please get your own set of keys.
+### http://lists.debian.org/debian-legal/2013/11/msg00006.html
+%global api_key AIzaSyDUIXvzVrt5OkVsgXhQ6NFfvWlA44by-aw
+%global default_client_id 449907151817.apps.googleusercontent.com
+%global default_client_secret miEreAep8nuvTdvLums6qyLK
+###############################Exclude Private chromium libs###########################
+%global __requires_exclude %{chromiumdir}/.*\\.so
+%global __provides_exclude_from %{chromiumdir}/.*\\.so
+#######################################CONFIGS###########################################
+# Require harfbuzz >= 1.5.0 for hb_glyph_info_t
+%if 0%{?fedora} >= 28
+%bcond_without system_harfbuzz
+%else
+%bcond_with system_harfbuzz
+%endif
+# Require libxml2 > 2.9.4 for XML_PARSE_NOXXE
+%bcond_without system_libxml2
+
+# https://github.com/dabeaz/ply/issues/66
+%bcond_without system_ply
+
+# Allow testing whether icu can be unbundled
+%bcond_with system_libicu
+# Allow testing whether libvpx can be unbundled
+%bcond_with system_libvpx
+#Allow minizip to be unbundled
+#mini-compat is going to be removed from fedora 30!
+%if 0%{?fedora} >= 30
+%bcond_with system_minizip
+%else
+%bcond_without system_minizip
+%endif
+#Turn on verbose mode
+%global debug_logs 1
+#Build debug packages for debugging
+%global debug_pkg 1
+# Allow compiling with clang
+%global clang 0
+#Allow building with Fedora compilation flags
+%global fedora_compilation_flags 1
+##############################Package Definitions######################################
+Name: chromium-vaapi
+Version: 69.0.3497.100
+Release: 3%{?dist}
+Summary: A Chromium web browser with video decoding acceleration
+License: BSD and LGPLv2+ and ASL 2.0 and IJG and MIT and GPLv2+ and ISC and OpenSSL and (MPLv1.1 or GPLv2 or LGPLv2)
+URL: https://www.chromium.org/Home
+%if %{freeworld}
+Source0: https://commondatastorage.googleapis.com/chromium-browser-official/chromi...
+%else
+Source0: chromium-%{version}-clean.tar.xz
+%endif
+# The following two source files are copied and modified from the chromium source
+Source10: %{name}.sh
+#Add our own appdata file. ##TODO
+Source11: %{name}.appdata.xml
+#Personal stuff
+Source15: LICENSE
+#Video acceleration patch from https://chromium-review.googlesource.com/c/chromium/src/+/532294
+Patch1: vaapi.patch
+Patch2: widevine.patch
+%if %{clang}
+#Will use any clang patch here
+#Fix breaking builds caused by gcc_ar_wrapper.py from upstream
+Patch7: llvm-arflags.patch
+%else
+#Gcc patches area.
+%endif
+#More patches to fix chromium build here
+#remove dependency on unrar. That's a nasty code.
+Patch50: unrar.patch
+#Bootstrap still uses python command
+Patch51: py2-bootstrap.patch
+#This build should be only available to amd64
+ExclusiveArch: x86_64
+########################################################################################
+#Compiler settings
+%if %{clang}
+BuildRequires: clang, llvm, lld
+%else
+#GCC mode on
+# Make sure we don't encounter any bug
+BuildRequires: gcc
+BuildRequires: gcc-c++
+%endif
+# Basic tools and libraries needed for building
+BuildRequires: ninja-build, nodejs, bison, gperf, hwdata
+BuildRequires: libgcc, glibc, libatomic, libstdc++-static
+BuildRequires: libcap-devel, cups-devel, alsa-lib-devel
+BuildRequires: mesa-libGL-devel, mesa-libEGL-devel
+%if %{with system_minizip}
+BuildRequires: minizip-devel
+%endif
+BuildRequires: pkgconfig(gtk+-2.0), pkgconfig(gtk+-3.0)
+BuildRequires: pkgconfig(libexif), pkgconfig(nss)
+BuildRequires: pkgconfig(xtst), pkgconfig(xscrnsaver)
+BuildRequires: pkgconfig(dbus-1), pkgconfig(libudev)
+BuildRequires: pkgconfig(gnome-keyring-1)
+BuildRequires: pkgconfig(libffi)
+# remove_bundled_libraries.py --do-remove
+BuildRequires: python2-rpm-macros
+BuildRequires: python2-beautifulsoup4
+BuildRequires: python2-html5lib
+BuildRequires: python2-markupsafe
+%if %{with system_ply}
+BuildRequires: python2-ply
+%endif
+# replace_gn_files.py --system-libraries
+BuildRequires: flac-devel
+BuildRequires: freetype-devel
+%if %{with system_harfbuzz}
+BuildRequires: harfbuzz-devel
+%endif
+%if %{with system_libicu}
+BuildRequires: libicu-devel
+%endif
+BuildRequires: libdrm-devel
+BuildRequires: libjpeg-turbo-devel
+BuildRequires: libpng-devel
+# Chromium requires libvpx 1.5.0 and some non-default options
+%if %{with system_libvpx}
+BuildRequires: libvpx-devel
+%endif
+BuildRequires: libwebp-devel
+%if %{with system_libxml2}
+BuildRequires: pkgconfig(libxml-2.0)
+%endif
+BuildRequires: pkgconfig(libxslt)
+BuildRequires: opus-devel
+BuildRequires: re2-devel
+BuildRequires: snappy-devel
+BuildRequires: yasm
+BuildRequires: pciutils-devel
+BuildRequires: speech-dispatcher-devel
+BuildRequires: pulseaudio-libs-devel
+# install desktop files
+BuildRequires: desktop-file-utils
+# install AppData files
+BuildRequires: libappstream-glib
+#for vaapi
+BuildRequires: libva-devel
+#Runtime Requirements
+Requires: hicolor-icon-theme
+#Some recommendations
+Recommends: libva-intel-hybrid-driver%{?_isa}
+Recommends: libva-intel-driver%{?_isa}
+%if !%{debug_pkg}
+%global debug_package %{nil}
+%endif
+%description
+chromium-vaapi is an open-source web browser, powered by WebKit (Blink)
+############################################PREP###########################################################
+%prep
+%autosetup -n chromium-%{version} -p1
+#Let's change the default shebang of python files.
+find -depth -type f -name "*.py" -exec sed -iE '1s=^#! */usr/bin/\(python\|env python\)[23]\?=#!%{__python2}=' {} +
+./build/linux/unbundle/remove_bundled_libraries.py --do-remove \
+ base/third_party/dmg_fp \
+ base/third_party/dynamic_annotations \
+ base/third_party/icu \
+ base/third_party/libevent \
+ base/third_party/nspr \
+ base/third_party/superfasthash \
+ base/third_party/symbolize \
+ base/third_party/valgrind \
+ base/third_party/xdg_mime \
+ base/third_party/xdg_user_dirs \
+ buildtools/third_party/libc++ \
+ buildtools/third_party/libc++abi \
+ chrome/third_party/mozilla_security_manager \
+ courgette/third_party \
+ native_client/src/third_party/dlmalloc \
+ native_client/src/third_party/valgrind \
+ net/third_party/http2 \
+ net/third_party/mozilla_security_manager \
+ net/third_party/nss \
+ net/third_party/quic \
+ net/third_party/spdy \
+ third_party/abseil-cpp \
+ third_party/adobe \
+ third_party/analytics \
+ third_party/angle \
+ third_party/angle/src/common/third_party/base \
+ third_party/angle/src/common/third_party/smhasher \
+ 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-headers \
+ third_party/angle/third_party/vulkan-loader \
+ third_party/angle/third_party/vulkan-tools \
+ third_party/angle/third_party/vulkan-validation-layers \
+ third_party/apple_apsl \
+ third_party/boringssl \
+ third_party/boringssl/src/third_party/fiat \
+ third_party/blink \
+ third_party/breakpad \
+ third_party/breakpad/breakpad/src/third_party/curl \
+ third_party/brotli \
+ third_party/cacheinvalidation \
+ third_party/catapult \
+ third_party/catapult/common/py_vulcanize/third_party/rcssmin \
+ third_party/catapult/common/py_vulcanize/third_party/rjsmin \
+ third_party/catapult/third_party/polymer \
+ third_party/catapult/tracing/third_party/d3 \
+ third_party/catapult/tracing/third_party/gl-matrix \
+ third_party/catapult/tracing/third_party/jszip \
+ third_party/catapult/tracing/third_party/mannwhitneyu \
+ third_party/catapult/tracing/third_party/oboe \
+ third_party/catapult/tracing/third_party/pako \
+ third_party/ced \
+ third_party/cld_3 \
+ third_party/crashpad \
+ third_party/crashpad/crashpad/third_party/zlib \
+ third_party/crc32c \
+ third_party/cros_system_api \
+ third_party/devscripts \
+ third_party/dom_distiller_js \
+ third_party/ffmpeg \
+ third_party/fips181 \
+ third_party/flatbuffers \
+ third_party/flot \
+ third_party/freetype \
+ third_party/glslang-angle \
+ third_party/google_input_tools \
+ third_party/google_input_tools/third_party/closure_library \
+ third_party/google_input_tools/third_party/closure_library/third_party/closure \
+ third_party/googletest \
+%if !%{with system_harfbuzz}
+ third_party/harfbuzz-ng \
+%endif
+ third_party/hunspell \
+ third_party/iccjpeg \
+%if !%{with system_libicu}
+ third_party/icu \
+%endif
+ third_party/inspector_protocol \
+ third_party/jinja2 \
+ third_party/jstemplate \
+ third_party/khronos \
+ third_party/leveldatabase \
+ third_party/libaddressinput \
+ third_party/libaom \
+ third_party/libjingle \
+ third_party/libphonenumber \
+ third_party/libsecret \
+ third_party/libsrtp \
+ third_party/libsync \
+ third_party/libudev \
+%if !%{with system_libvpx}
+ third_party/libvpx \
+ third_party/libvpx/source/libvpx/third_party/x86inc \
+%endif
+ third_party/libwebm \
+%if %{with system_libxml2}
+ third_party/libxml/chromium \
+%else
+ third_party/libxml \
+%endif
+ third_party/libXNVCtrl \
+ third_party/libyuv \
+ third_party/lss \
+ third_party/lzma_sdk \
+ third_party/mesa \
+ third_party/metrics_proto \
+%if !%{with system_minizip}
+ third_party/minizip/ \
+%endif
+ third_party/modp_b64 \
+ third_party/node \
+ third_party/node/node_modules/polymer-bundler/lib/third_party/UglifyJS2 \
+ third_party/openh264 \
+ third_party/openmax_dl \
+ third_party/ots \
+ third_party/pdfium \
+ third_party/pdfium/third_party/agg23 \
+ third_party/pdfium/third_party/base \
+ third_party/pdfium/third_party/bigint \
+ third_party/pdfium/third_party/freetype \
+ third_party/pdfium/third_party/lcms \
+ third_party/pdfium/third_party/libopenjpeg20 \
+ third_party/pdfium/third_party/libpng16 \
+ third_party/pdfium/third_party/libtiff \
+ third_party/pdfium/third_party/skia_shared \
+ third_party/perfetto \
+%if !%{with system_ply}
+ third_party/ply \
+%endif
+ third_party/polymer \
+ third_party/protobuf \
+ third_party/protobuf/third_party/six \
+ third_party/pyjson5 \
+ third_party/qcms \
+ third_party/rnnoise \
+ third_party/s2cellid \
+ third_party/sfntly \
+ third_party/skia \
+ third_party/skia/third_party/gif \
+ third_party/skia/third_party/vulkan \
+ third_party/skia/third_party/skcms \
+ 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/llvm-subzero \
+ third_party/swiftshader/third_party/subzero \
+ third_party/tcmalloc \
+ third_party/usb_ids \
+ third_party/usrsctp \
+ third_party/vulkan \
+ third_party/vulkan-validation-layers \
+ third_party/web-animations-js \
+ third_party/webdriver \
+ third_party/WebKit \
+ third_party/webrtc \
+ third_party/widevine \
+ third_party/woff2 \
+ third_party/xdg-utils \
+ third_party/yasm/run_yasm.py \
+ third_party/zlib/google \
+%if !%{with system_minizip}
+ third_party/zlib \
+%endif
+ tools/gn/base/third_party/icu \
+ url/third_party/mozilla \
+ v8/third_party/antlr4 \
+ v8/src/third_party/valgrind \
+ v8/src/third_party/utf8-decoder \
+ v8/third_party/inspector_protocol
+
+./build/linux/unbundle/replace_gn_files.py --system-libraries \
+ flac \
+ freetype \
+ fontconfig \
+%if %{with system_libicu}
+ icu \
+%endif
+ libdrm \
+ libjpeg \
+ libpng \
+%if %{with system_libvpx}
+ libvpx \
+%endif
+ libwebp \
+%if %{with system_libxml2}
+ libxml \
+%endif
+ libxslt \
+ opus \
+ re2 \
+ snappy \
+ yasm \
+%if %{with system_minizip}
+ zlib
+%endif
+
+
+sed -i 's|//third_party/usb_ids|/usr/share/hwdata|g' device/usb/BUILD.gn
+%if %{clang}
+# Remove compiler flags not supported by our system clang
+ sed -i \
+ -e '/"-Wno-ignored-pragma-optimize"/d' \
+ build/config/compiler/BUILD.gn
+%endif
+rmdir third_party/markupsafe
+ln -s %{python2_sitearch}/markupsafe third_party/markupsafe
+%if %{with system_ply}
+rmdir third_party/ply
+ln -s %{python2_sitelib}/ply third_party/ply
+%endif
+# Fix the path to nodejs binary
+mkdir -p third_party/node/linux/node-linux-x64/bin
+ln -s %{_bindir}/node third_party/node/linux/node-linux-x64/bin/node
+# Hard code extra version
+FILE=chrome/common/channel_info_posix.cc
+sed -i.orig -e 's/getenv("CHROME_VERSION_EXTRA")/"Chromium(vaapi) Fedora Project"/' $FILE
+#####################################BUILD#############################################
+%build
+#export compilar variables
+%if %{clang}
+export AR=llvm-ar NM=llvm-nm
+export CC=clang CXX=clang++
+%else
+export AR=ar NM=nm
+export CC=gcc CXX=g++
+%if %{fedora_compilation_flags}
+#Build falgs to make hardened binaries
+#Remove some flags which can create conflicts with chromium gyp flags.
+export CFLAGS="$(echo '%{__global_cflags}' |sed -e 's/-fexceptions//' \
+ -e 's/-Werror=format-security//' \
+ -e 's/-pipe//' \
+ -e 's/-g/-g1/g' \
+ -e 's/-g1record-g1cc-switches//' )"
+export CXXFLAGS="$(echo '%{?__global_cxxflags}%{!?__global_cxxflags:%{__global_cflags}}' | sed -e 's/-fexceptions//' \
+ -e 's/-Werror=format-security//' \
+ -e 's/-pipe//' \
+ -e 's/-g/-g1/g' \
+ -e 's/-g1record-g1cc-switches//' )"
+
+export LDFLAGS='%{__global_ldflags}'
+%else
+export CXXFLAGS=$CXXFLAGS" -fno-delete-null-pointer-checks"
+%endif
+%endif
+gn_args=(
+ is_debug=false
+ use_vaapi=true
+ use_gtk3=true
+ enable_swiftshader=false
+ is_component_build=false
+ use_sysroot=false
+ use_custom_libcxx=false
+ use_aura=true
+ 'system_libdir="%{_lib}"'
+ use_cups=true
+ use_gnome_keyring=true
+ use_gio=true
+ use_kerberos=true
+ use_libpci=true
+ use_pulseaudio=true
+ use_system_freetype=true
+ enable_widevine=true
+%if %{with system_harfbuzz}
+ use_system_harfbuzz=true
+%endif
+%if %{freeworld}
+ 'ffmpeg_branding="Chrome"'
+ proprietary_codecs=true
+%else
+ 'ffmpeg_branding="Chromium"'
+ proprietary_codecs=false
+%endif
+ enable_nacl=false
+ enable_hangout_services_extension=false
+ fatal_linker_warnings=false
+ treat_warnings_as_errors=false
+ linux_use_bundled_binutils=false
+ remove_webcore_debug_symbols=true
+ fieldtrial_testing_like_official_build=true
+ 'custom_toolchain="//build/toolchain/linux/unbundle:default"'
+ 'host_toolchain="//build/toolchain/linux/unbundle:default"'
+ 'google_api_key="%{api_key}"'
+ 'google_default_client_id="%{default_client_id}"'
+ 'google_default_client_secret="%{default_client_secret}"'
+)
+gn_args+=(
+%if %{clang}
+ is_clang=true
+ 'clang_base_path = "/usr"'
+ clang_use_chrome_plugins=false
+%else
+ is_clang=false
+ use_lld=false
+%endif
+)
+
+tools/gn/bootstrap/bootstrap.py --gn-gen-args "${gn_args[*]}"
+%{target}/gn --script-executable=%{__python2} gen --args="${gn_args[*]}" %{target}
+%if %{debug_logs}
+ninja %{_smp_mflags} -C %{target} -v chrome chrome_sandbox chromedriver
+%else
+ninja %{_smp_mflags} -C %{target} chrome chrome_sandbox chromedriver
+%endif
+######################################Install####################################
+%install
+mkdir -p %{buildroot}%{_bindir}
+mkdir -p %{buildroot}%{chromiumdir}/locales
+mkdir -p %{buildroot}%{_mandir}/man1
+mkdir -p %{buildroot}%{_datadir}/metainfo
+mkdir -p %{buildroot}%{_datadir}/applications
+mkdir -p %{buildroot}%{_datadir}/gnome-control-center/default-apps
+sed -e "s|@@CHROMIUMDIR@@|%{chromiumdir}|" -e "s|@@BUILDTARGET@@|`cat /etc/redhat-release`|" \
+ %{SOURCE10} > chromium-vaapi.sh
+install -m 755 chromium-vaapi.sh %{buildroot}%{_bindir}/%{name}
+install -m 644 %{SOURCE11} %{buildroot}%{_datadir}/metainfo
+sed -e "s|@@MENUNAME@@|%{name}|g" -e "s|@@PACKAGE@@|%{name}|g" \
+ chrome/app/resources/manpage.1.in > chrome.1
+install -m 644 chrome.1 %{buildroot}%{_mandir}/man1/%{name}.1
+#Using the template from the source. Still doesn't help in fixing.
+sed -e "s|@@MENUNAME@@|%{name}|g" -e "s|@@PACKAGE@@|%{name}|g" -e "s|@@USR_BIN_SYMLINK_NAME@@|%{name}|g" \
+ chrome/installer/linux/common/desktop.template > %{name}.desktop
+desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{name}.desktop
+sed -e "s|@@MENUNAME@@|%{name}|g" -e "s|@@PACKAGE@@|%{name}|g" -e "s|@@INSTALLDIR@@|%{_bindir}|g" \
+chrome/installer/linux/common/default-app.template > %{name}.xml
+install -m 644 %{name}.xml %{buildroot}%{_datadir}/gnome-control-center/default-apps/
+install -m 755 %{target}/chrome %{buildroot}%{chromiumdir}/%{name}
+install -m 4755 %{target}/chrome_sandbox %{buildroot}%{chromiumdir}/chrome-sandbox
+install -m 755 %{target}/chromedriver %{buildroot}%{chromiumdir}/
+%if !%{with system_libicu}
+install -m 644 %{target}/icudtl.dat %{buildroot}%{chromiumdir}/
+%endif
+install -m 644 %{target}/natives_blob.bin %{buildroot}%{chromiumdir}/
+install -m 644 %{target}/v8_context_snapshot.bin %{buildroot}%{chromiumdir}/
+install -m 644 %{target}/*.pak %{buildroot}%{chromiumdir}/
+install -m 644 %{target}/locales/*.pak %{buildroot}%{chromiumdir}/locales/
+install -m 644 %{target}/xdg* %{buildroot}%{chromiumdir}/
+for i in 16 32; do
+ mkdir -p %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps
+ install -m 644 chrome/app/theme/default_100_percent/chromium/product_logo_$i.png \
+ %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps/%{name}.png
+done
+for i in 22 24 32 48 64 128 256; do
+ if [ ${i} = 32 ]; then ext=xpm; else ext=png; fi
+ if [ ${i} = 32 ]; then dir=linux/; else dir=; fi
+ mkdir -p %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps
+ install -m 644 chrome/app/theme/chromium/${dir}product_logo_$i.${ext} \
+ %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps/%{name}.${ext}
+done
+####################################check##################################################
+%check
+appstream-util validate-relax --nonet "%{buildroot}%{_datadir}/metainfo/%{name}.appdata.xml"
+######################################files################################################
+%files
+%license LICENSE
+%doc AUTHORS
+%{_bindir}/chromium-vaapi
+%{_datadir}/metainfo/chromium-vaapi.appdata.xml
+%{_datadir}/applications/chromium-vaapi.desktop
+%{_datadir}/gnome-control-center/default-apps/chromium-vaapi.xml
+%{_datadir}/icons/hicolor/16x16/apps/chromium-vaapi.png
+%{_datadir}/icons/hicolor/22x22/apps/chromium-vaapi.png
+%{_datadir}/icons/hicolor/24x24/apps/chromium-vaapi.png
+%{_datadir}/icons/hicolor/32x32/apps/chromium-vaapi.png
+%{_datadir}/icons/hicolor/32x32/apps/chromium-vaapi.xpm
+%{_datadir}/icons/hicolor/48x48/apps/chromium-vaapi.png
+%{_datadir}/icons/hicolor/64x64/apps/chromium-vaapi.png
+%{_datadir}/icons/hicolor/128x128/apps/chromium-vaapi.png
+%{_datadir}/icons/hicolor/256x256/apps/chromium-vaapi.png
+%{_mandir}/man1/chromium-vaapi.1.gz
+%dir %{chromiumdir}
+%{chromiumdir}/chromium-vaapi
+%{chromiumdir}/chrome-sandbox
+%{chromiumdir}/chromedriver
+%if !%{with system_libicu}
+%{chromiumdir}/icudtl.dat
+%endif
+%{chromiumdir}/natives_blob.bin
+%{chromiumdir}/v8_context_snapshot.bin
+%{chromiumdir}/*.pak
+%{chromiumdir}/xdg-mime
+%{chromiumdir}/xdg-settings
+%dir %{chromiumdir}/locales
+%{chromiumdir}/locales/*.pak
+#########################################changelogs#################################################
+%changelog
+* Fri Sep 28 2018 Akarshan Biswas <akarshan.biswas(a)hotmail.com> 69.0.3497.100-3
+- Remove dependency on minizip-compat package(https://bugzilla.redhat.com/show_bug.cgi?id=1632170)
+- Add conditions to build with{out} system minizip
+
+* Sat Sep 22 2018 Akarshan Biswas <akarshan.biswas(a)hotmail.com> 69.0.3497.100-2
+- Produce an entire new package with unique appdata
+- Use desktop and default app template from the source
+- enable debug builds
+- Update chromium wrapper
+- Remove dependent on unrar
+
+* Tue Sep 18 2018 Akarshan Biswas <akarshan.biswas(a)hotmail.com> 69.0.3497.100-1
+- Updated chromium to 69.0.3497.100.
+- Enabled fedora GCC build flags and removed those flags which can cause confict with chromium's gyp flags.
+- Removed some duplicate flags and added g1 to ease memory which building.
+
+* Thu Sep 13 2018 Akarshan Biswas <akarshan.biswas(a)hotmail.com> 69.0.3497.92-1
+- updated chromium to 69.0.3497.92
+- fixed vaapi patch
+- Moved appstream validation to check
+
+* Thu Sep 06 2018 Akarshan Biswas <akarshan.biswas(a)hotmail.com> 69.0.3497.81-1
+- updated chromium to 69.0.3497.81
+- removed useless requirements
+- turned on verbose
+- removed conditions on obsolete fedora releases
+- fixed fedora compilation flags
+
+* Wed Aug 29 2018 Akarshan Biswas <akarshan.biswas(a)hotmail.com> 68.0.3440.106-1
+- Deleted provides and excludes and added conflict
diff --git a/py2-bootstrap.patch b/py2-bootstrap.patch
new file mode 100644
index 0000000..8a5db71
--- /dev/null
+++ b/py2-bootstrap.patch
@@ -0,0 +1,33 @@
+diff -up chromium-69.0.3497.81/third_party/catapult/common/py_vulcanize/py_vulcanize/generate.py.py2 chromium-69.0.3497.81/third_party/catapult/common/py_vulcanize/py_vulcanize/generate.py
+--- chromium-69.0.3497.81/third_party/catapult/common/py_vulcanize/py_vulcanize/generate.py.py2 2018-09-06 10:45:17.919774145 -0400
++++ chromium-69.0.3497.81/third_party/catapult/common/py_vulcanize/py_vulcanize/generate.py 2018-09-06 10:45:17.914774254 -0400
+@@ -58,7 +58,7 @@ def _MinifyJS(input_js):
+
+ with tempfile.NamedTemporaryFile() as _:
+ args = [
+- 'python',
++ 'python2',
+ rjsmin_path
+ ]
+ p = subprocess.Popen(args,
+@@ -177,7 +177,7 @@ def _MinifyCSS(css_text):
+ os.path.join(py_vulcanize_path, 'third_party', 'rcssmin', 'rcssmin.py'))
+
+ with tempfile.NamedTemporaryFile() as _:
+- rcssmin_args = ['python', rcssmin_path]
++ rcssmin_args = ['python2', rcssmin_path]
+ p = subprocess.Popen(rcssmin_args,
+ stdin=subprocess.PIPE,
+ stdout=subprocess.PIPE,
+diff -up chromium-69.0.3497.81/tools/gn/bootstrap/bootstrap.py.py2 chromium-69.0.3497.81/tools/gn/bootstrap/bootstrap.py
+--- chromium-69.0.3497.81/tools/gn/bootstrap/bootstrap.py.py2 2018-09-06 10:44:42.225550561 -0400
++++ chromium-69.0.3497.81/tools/gn/bootstrap/bootstrap.py 2018-09-06 13:06:24.251636231 -0400
+@@ -87,7 +87,7 @@ def main(argv):
+ if not options.debug:
+ gn_gen_args += ' is_debug=false'
+ subprocess.check_call([
+- gn_path, 'gen', out_dir,
++ gn_path, 'gen', out_dir, ' --script-executable=/usr/bin/python2',
+ '--args=%s' % gn_gen_args, "--root=" + SRC_ROOT
+ ])
+
diff --git a/sources b/sources
index e69de29..7d1e885 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+1779724693bdcf7b4e01ea1133abdde2 chromium-69.0.3497.100.tar.xz
diff --git a/unrar.patch b/unrar.patch
new file mode 100644
index 0000000..5951ab4
--- /dev/null
+++ b/unrar.patch
@@ -0,0 +1,186 @@
+diff --git a/chrome/browser/safe_browsing/download_protection/check_client_download_request.cc b/chrome/browser/safe_browsing/download_protection/check_client_download_request.cc
+index f5aaff83c87a..737e168ec5aa 100644
+--- a/chrome/browser/safe_browsing/download_protection/check_client_download_request.cc
++++ b/chrome/browser/safe_browsing/download_protection/check_client_download_request.cc
+@@ -379,10 +379,6 @@ void CheckClientDownloadRequest::AnalyzeFile() {
+ // are enabled.
+ if (item_->GetTargetFilePath().MatchesExtension(FILE_PATH_LITERAL(".zip"))) {
+ StartExtractZipFeatures();
+- } else if (item_->GetTargetFilePath().MatchesExtension(
+- FILE_PATH_LITERAL(".rar")) &&
+- base::FeatureList::IsEnabled(kInspectDownloadedRarFiles)) {
+- StartExtractRarFeatures();
+ #if defined(OS_MACOSX)
+ } else if (item_->GetTargetFilePath().MatchesExtension(
+ FILE_PATH_LITERAL(".dmg")) ||
+@@ -499,71 +495,6 @@ void CheckClientDownloadRequest::ExtractFileFeatures(
+ OnFileFeatureExtractionDone();
+ }
+
+-void CheckClientDownloadRequest::StartExtractRarFeatures() {
+- DCHECK_CURRENTLY_ON(BrowserThread::UI);
+- DCHECK(item_); // Called directly from Start(), item should still exist.
+- rar_analysis_start_time_ = base::TimeTicks::Now();
+- // We give the rar analyzer a weak pointer to this object. Since the
+- // analyzer is refcounted, it might outlive the request.
+- rar_analyzer_ = new SandboxedRarAnalyzer(
+- item_->GetFullPath(),
+- base::BindRepeating(&CheckClientDownloadRequest::OnRarAnalysisFinished,
+- weakptr_factory_.GetWeakPtr()),
+- content::ServiceManagerConnection::GetForProcess()->GetConnector());
+- rar_analyzer_->Start();
+-}
+-
+-void CheckClientDownloadRequest::OnRarAnalysisFinished(
+- const ArchiveAnalyzerResults& results) {
+- DCHECK_CURRENTLY_ON(BrowserThread::UI);
+- if (item_ == nullptr) {
+- PostFinishTask(DownloadCheckResult::UNKNOWN, REASON_REQUEST_CANCELED);
+- return;
+- }
+- if (!service_)
+- return;
+-
+- archive_is_valid_ =
+- (results.success ? ArchiveValid::VALID : ArchiveValid::INVALID);
+- archived_executable_ = results.has_executable;
+- CopyArchivedBinaries(results.archived_binary, &archived_binaries_);
+- DVLOG(1) << "Rar analysis finished for " << item_->GetFullPath().value()
+- << ", has_executable=" << results.has_executable
+- << ", has_archive=" << results.has_archive
+- << ", success=" << results.success;
+-
+- if (archived_executable_) {
+- UMA_HISTOGRAM_COUNTS_100("SBClientDownload.RarFileArchivedBinariesCount",
+- results.archived_binary.size());
+- }
+- UMA_HISTOGRAM_BOOLEAN("SBClientDownload.RarFileSuccess", results.success);
+- UMA_HISTOGRAM_BOOLEAN("SBClientDownload.RarFileHasExecutable",
+- archived_executable_);
+- UMA_HISTOGRAM_BOOLEAN("SBClientDownload.RarFileHasArchiveButNoExecutable",
+- results.has_archive && !archived_executable_);
+- UMA_HISTOGRAM_TIMES("SBClientDownload.ExtractRarFeaturesTime",
+- base::TimeTicks::Now() - rar_analysis_start_time_);
+- for (const auto& file_name : results.archived_archive_filenames)
+- RecordArchivedArchiveFileExtensionType(file_name);
+-
+- if (!archived_executable_) {
+- if (results.has_archive) {
+- type_ = ClientDownloadRequest::RAR_COMPRESSED_ARCHIVE;
+- } else if (!results.success) {
+- // .rar files that look invalid to Chrome may be successfully unpacked by
+- // other archive tools, so they may be a real threat.
+- type_ = ClientDownloadRequest::INVALID_RAR;
+- } else {
+- // Normal rar w/o EXEs, or invalid rar and not extended-reporting.
+- PostFinishTask(DownloadCheckResult::UNKNOWN,
+- REASON_ARCHIVE_WITHOUT_BINARIES);
+- return;
+- }
+- }
+-
+- OnFileFeatureExtractionDone();
+-}
+-
+ void CheckClientDownloadRequest::StartExtractZipFeatures() {
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
+ DCHECK(item_); // Called directly from Start(), item should still exist.
+diff --git a/chrome/browser/safe_browsing/download_protection/check_client_download_request.h b/chrome/browser/safe_browsing/download_protection/check_client_download_request.h
+index 9042d5d589ab..1c50dcff4312 100644
+--- a/chrome/browser/safe_browsing/download_protection/check_client_download_request.h
++++ b/chrome/browser/safe_browsing/download_protection/check_client_download_request.h
+@@ -148,7 +148,6 @@ class CheckClientDownloadRequest
+ scoped_refptr<SafeBrowsingDatabaseManager> database_manager_;
+ const bool pingback_enabled_;
+ std::unique_ptr<network::SimpleURLLoader> loader_;
+- scoped_refptr<SandboxedRarAnalyzer> rar_analyzer_;
+ scoped_refptr<SandboxedZipAnalyzer> zip_analyzer_;
+ base::TimeTicks rar_analysis_start_time_;
+ base::TimeTicks zip_analysis_start_time_;
+diff --git a/chrome/common/safe_browsing/BUILD.gn b/chrome/common/safe_browsing/BUILD.gn
+index 92cc4f57d03b..4780e931e9e7 100644
+--- a/chrome/common/safe_browsing/BUILD.gn
++++ b/chrome/common/safe_browsing/BUILD.gn
+@@ -68,7 +68,6 @@ if (safe_browsing_mode == 1) {
+ ":file_type_policies",
+ "//base",
+ "//base:i18n",
+- "//third_party/unrar:unrar",
+ ]
+
+ defines = [
+@@ -121,7 +120,6 @@ source_set("safe_browsing") {
+ deps += [
+ ":archive_analyzer_results",
+ ":download_protection_util",
+- ":rar_analyzer",
+ "//components/safe_browsing:features",
+ ]
+
+diff --git a/chrome/services/file_util/public/cpp/BUILD.gn b/chrome/services/file_util/public/cpp/BUILD.gn
+index 158cbfc6d157..6d8b0df7c59e 100644
+--- a/chrome/services/file_util/public/cpp/BUILD.gn
++++ b/chrome/services/file_util/public/cpp/BUILD.gn
+@@ -14,8 +14,6 @@ source_set("cpp") {
+ sources = [
+ "sandboxed_dmg_analyzer_mac.cc",
+ "sandboxed_dmg_analyzer_mac.h",
+- "sandboxed_rar_analyzer.cc",
+- "sandboxed_rar_analyzer.h",
+ "sandboxed_zip_analyzer.cc",
+ "sandboxed_zip_analyzer.h",
+ ]
+@@ -35,7 +33,6 @@ source_set("unit_tests") {
+
+ sources = [
+ "sandboxed_dmg_analyzer_mac_unittest.cc",
+- "sandboxed_rar_analyzer_unittest.cc",
+ "sandboxed_zip_analyzer_unittest.cc",
+ ]
+
+diff --git a/chrome/services/file_util/public/mojom/safe_archive_analyzer.mojom b/chrome/services/file_util/public/mojom/safe_archive_analyzer.mojom
+index 6983f7b415d4..15d5aaba3657 100644
+--- a/chrome/services/file_util/public/mojom/safe_archive_analyzer.mojom
++++ b/chrome/services/file_util/public/mojom/safe_archive_analyzer.mojom
+@@ -22,11 +22,6 @@ interface SafeArchiveAnalyzer {
+ // for malicious download protection.
+ AnalyzeDmgFile(mojo_base.mojom.File dmg_file)
+ => (SafeArchiveAnalyzerResults results);
+-
+- // Build flag FULL_SAFE_BROWSING: Analyze the |rar_file| for malicious
+- // download protection.
+- AnalyzeRarFile(mojo_base.mojom.File rar_file)
+- => (SafeArchiveAnalyzerResults results);
+ };
+
+ [Native]
+diff --git a/chrome/services/file_util/safe_archive_analyzer.cc b/chrome/services/file_util/safe_archive_analyzer.cc
+index a13b42b197b3..db49c37b9b49 100644
+--- a/chrome/services/file_util/safe_archive_analyzer.cc
++++ b/chrome/services/file_util/safe_archive_analyzer.cc
+@@ -44,12 +44,3 @@ void SafeArchiveAnalyzer::AnalyzeDmgFile(base::File dmg_file,
+ NOTREACHED();
+ #endif
+ }
+-
+-void SafeArchiveAnalyzer::AnalyzeRarFile(base::File rar_file,
+- AnalyzeRarFileCallback callback) {
+- DCHECK(rar_file.IsValid());
+-
+- safe_browsing::ArchiveAnalyzerResults results;
+- safe_browsing::rar_analyzer::AnalyzeRarFile(std::move(rar_file), &results);
+- std::move(callback).Run(results);
+-}
+diff --git a/chrome/services/file_util/safe_archive_analyzer.h b/chrome/services/file_util/safe_archive_analyzer.h
+index f21efa6f57ba..2eda4f378bcc 100644
+--- a/chrome/services/file_util/safe_archive_analyzer.h
++++ b/chrome/services/file_util/safe_archive_analyzer.h
+@@ -25,8 +25,6 @@ class SafeArchiveAnalyzer : public chrome::mojom::SafeArchiveAnalyzer {
+ AnalyzeZipFileCallback callback) override;
+ void AnalyzeDmgFile(base::File dmg_file,
+ AnalyzeDmgFileCallback callback) override;
+- void AnalyzeRarFile(base::File rar_file,
+- AnalyzeRarFileCallback callback) override;
+
+ const std::unique_ptr<service_manager::ServiceContextRef> service_ref_;
+
diff --git a/vaapi.patch b/vaapi.patch
new file mode 100644
index 0000000..70d0cfb
--- /dev/null
+++ b/vaapi.patch
@@ -0,0 +1,542 @@
+diff -ur chromium-69.0.3497.92-orig/chrome/browser/about_flags.cc chromium-69.0.3497.92/chrome/browser/about_flags.cc
+--- chromium-69.0.3497.92-orig/chrome/browser/about_flags.cc 2018-09-12 00:39:23.000000000 +0530
++++ chromium-69.0.3497.92/chrome/browser/about_flags.cc 2018-09-13 22:10:33.938016199 +0530
+@@ -1238,12 +1238,14 @@
+ {"ui-disable-partial-swap", flag_descriptions::kUiPartialSwapName,
+ flag_descriptions::kUiPartialSwapDescription, kOsAll,
+ SINGLE_DISABLE_VALUE_TYPE(switches::kUIDisablePartialSwap)},
++#if defined(OS_CHROMEOS) || defined(OS_ANDROID)
+ {"disable-webrtc-hw-decoding", flag_descriptions::kWebrtcHwDecodingName,
+ flag_descriptions::kWebrtcHwDecodingDescription, kOsAndroid | kOsCrOS,
+ SINGLE_DISABLE_VALUE_TYPE(switches::kDisableWebRtcHWDecoding)},
+ {"disable-webrtc-hw-encoding", flag_descriptions::kWebrtcHwEncodingName,
+ flag_descriptions::kWebrtcHwEncodingDescription, kOsAndroid | kOsCrOS,
+ SINGLE_DISABLE_VALUE_TYPE(switches::kDisableWebRtcHWEncoding)},
++#endif
+ {"enable-webrtc-hw-h264-encoding",
+ flag_descriptions::kWebrtcHwH264EncodingName,
+ flag_descriptions::kWebrtcHwH264EncodingDescription, kOsAndroid | kOsCrOS,
+@@ -1612,6 +1614,13 @@
+ flag_descriptions::kShowTouchHudDescription, kOsCrOS,
+ SINGLE_VALUE_TYPE(ash::switches::kAshTouchHud)},
+ #endif // OS_CHROMEOS
++#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
++ {
++ "enable-accelerated-video", flag_descriptions::kAcceleratedVideoName,
++ flag_descriptions::kAcceleratedVideoDescription, kOsLinux,
++ SINGLE_VALUE_TYPE(switches::kEnableAcceleratedVideo),
++ },
++#else
+ {
+ "disable-accelerated-video-decode",
+ flag_descriptions::kAcceleratedVideoDecodeName,
+@@ -1619,6 +1628,7 @@
+ kOsMac | kOsWin | kOsCrOS | kOsAndroid,
+ SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
+ },
++#endif
+ #if defined(OS_WIN)
+ {"enable-hdr", flag_descriptions::kEnableHDRName,
+ flag_descriptions::kEnableHDRDescription, kOsWin,
+@@ -2291,12 +2301,17 @@
+ FEATURE_VALUE_TYPE(features::kOpenVR)},
+ #endif // ENABLE_OPENVR
+ #endif // ENABLE_VR
+-#if defined(OS_CHROMEOS)
++#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
++ {"enable-accelerated-mjpeg-decode",
++ flag_descriptions::kAcceleratedMjpegDecodeName,
++ flag_descriptions::kAcceleratedMjpegDecodeDescription, kOsLinux,
++ SINGLE_VALUE_TYPE(switches::kEnableAcceleratedMjpegDecode)},
++#elif defined(OS_CHROMEOS)
+ {"disable-accelerated-mjpeg-decode",
+ flag_descriptions::kAcceleratedMjpegDecodeName,
+ flag_descriptions::kAcceleratedMjpegDecodeDescription, kOsCrOS,
+ SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedMjpegDecode)},
+-#endif // OS_CHROMEOS
++#endif
+ {"v8-cache-options", flag_descriptions::kV8CacheOptionsName,
+ flag_descriptions::kV8CacheOptionsDescription, kOsAll,
+ MULTI_VALUE_TYPE(kV8CacheOptionsChoices)},
+Only in chromium-69.0.3497.92/chrome/browser: about_flags.cc.orig
+diff -ur chromium-69.0.3497.92-orig/chrome/browser/chromeos/login/chrome_restart_request.cc chromium-69.0.3497.92/chrome/browser/chromeos/login/chrome_restart_request.cc
+--- chromium-69.0.3497.92-orig/chrome/browser/chromeos/login/chrome_restart_request.cc 2018-09-12 00:39:23.000000000 +0530
++++ chromium-69.0.3497.92/chrome/browser/chromeos/login/chrome_restart_request.cc 2018-09-13 22:10:33.986014728 +0530
+@@ -19,6 +19,7 @@
+ #include "base/sys_info.h"
+ #include "base/timer/timer.h"
+ #include "base/values.h"
++#include "build/build_config.h"
+ #include "cc/base/switches.h"
+ #include "chrome/browser/browser_process.h"
+ #include "chrome/browser/chromeos/boot_times_recorder.h"
+@@ -84,9 +85,14 @@
+ ::switches::kDisable2dCanvasImageChromium,
+ ::switches::kDisableAccelerated2dCanvas,
+ ::switches::kDisableAcceleratedJpegDecoding,
++#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
++ ::switches::kEnableAcceleratedMjpegDecode,
++ ::switches::kEnableAcceleratedVideo,
++#else
+ ::switches::kDisableAcceleratedMjpegDecode,
+ ::switches::kDisableAcceleratedVideoDecode,
+ ::switches::kDisableAcceleratedVideoEncode,
++#endif
+ ::switches::kDisableBlinkFeatures,
+ ::switches::kDisableCastStreamingHWEncoding,
+ ::switches::kDisableGpu,
+@@ -160,8 +166,10 @@
+ ::switches::kEnableWebGLImageChromium,
+ ::switches::kEnableWebVR,
+ ::switches::kEnableUnsafeWebGPU,
++#if (defined(OS_CHROMEOS) || defined(OS_ANDROID))
+ ::switches::kDisableWebRtcHWDecoding,
+ ::switches::kDisableWebRtcHWEncoding,
++#endif
+ ::switches::kOzonePlatform,
+ ash::switches::kAshEnableTabletMode,
+ ash::switches::kAshEnableWaylandServer,
+diff -ur chromium-69.0.3497.92-orig/chrome/browser/flag_descriptions.cc chromium-69.0.3497.92/chrome/browser/flag_descriptions.cc
+--- chromium-69.0.3497.92-orig/chrome/browser/flag_descriptions.cc 2018-09-12 00:39:24.000000000 +0530
++++ chromium-69.0.3497.92/chrome/browser/flag_descriptions.cc 2018-09-13 22:10:34.007014085 +0530
+@@ -14,6 +14,13 @@
+ "Enables the use of the GPU to perform 2d canvas rendering instead of "
+ "using software rendering.";
+
++#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
++const char kAcceleratedVideoName[] = "Hardware-accelerated video";
++const char kAcceleratedVideoDescription[] =
++ "Hardware-accelerated video where VA-API driver is installed on the"
++ "system.";
++#endif
++
+ const char kAcceleratedVideoDecodeName[] = "Hardware-accelerated video decode";
+ const char kAcceleratedVideoDecodeDescription[] =
+ "Hardware-accelerated video decode where available.";
+@@ -1986,6 +1993,7 @@
+ const char kWebrtcEchoCanceller3Description[] =
+ "Experimental WebRTC echo canceller (AEC3).";
+
++#if defined(OS_CHROMEOS) || defined(OS_ANDROID)
+ const char kWebrtcHwDecodingName[] = "WebRTC hardware video decoding";
+ const char kWebrtcHwDecodingDescription[] =
+ "Support in WebRTC for decoding video streams using platform hardware.";
+@@ -1993,6 +2001,7 @@
+ const char kWebrtcHwEncodingName[] = "WebRTC hardware video encoding";
+ const char kWebrtcHwEncodingDescription[] =
+ "Support in WebRTC for encoding video streams using platform hardware.";
++#endif
+
+ const char kWebrtcHwH264EncodingName[] = "WebRTC hardware h264 video encoding";
+ const char kWebrtcHwH264EncodingDescription[] =
+@@ -2892,14 +2901,16 @@
+
+ // Chrome OS -------------------------------------------------------------------
+
+-#if defined(OS_CHROMEOS)
++#if defined(OS_CHROMEOS) || (defined(OS_LINUX) && !defined(OS_ANDROID))
+
+ const char kAcceleratedMjpegDecodeName[] =
+ "Hardware-accelerated mjpeg decode for captured frame";
+ const char kAcceleratedMjpegDecodeDescription[] =
+ "Enable hardware-accelerated mjpeg decode for captured frame where "
+ "available.";
++#endif
+
++#if defined(OS_CHROMEOS)
+ const char kAllowTouchpadThreeFingerClickName[] = "Touchpad three-finger-click";
+ const char kAllowTouchpadThreeFingerClickDescription[] =
+ "Enables touchpad three-finger-click as middle button.";
+diff -ur chromium-69.0.3497.92-orig/chrome/browser/flag_descriptions.h chromium-69.0.3497.92/chrome/browser/flag_descriptions.h
+--- chromium-69.0.3497.92-orig/chrome/browser/flag_descriptions.h 2018-09-12 00:39:24.000000000 +0530
++++ chromium-69.0.3497.92/chrome/browser/flag_descriptions.h 2018-09-13 22:10:34.030013380 +0530
+@@ -37,6 +37,10 @@
+ extern const char kAccelerated2dCanvasName[];
+ extern const char kAccelerated2dCanvasDescription[];
+
++#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
++extern const char kAcceleratedVideoName[];
++extern const char kAcceleratedVideoDescription[];
++#endif
+ extern const char kAcceleratedVideoDecodeName[];
+ extern const char kAcceleratedVideoDecodeDescription[];
+
+@@ -1762,13 +1766,17 @@
+
+ #endif // defined(OS_MACOSX)
+
+-// Chrome OS ------------------------------------------------------------------
+-
+-#if defined(OS_CHROMEOS)
++#if defined(OS_CHROMEOS) || (defined(OS_LINUX) && !defined(OS_ANDROID))
+
+ extern const char kAcceleratedMjpegDecodeName[];
+ extern const char kAcceleratedMjpegDecodeDescription[];
+
++#endif
++
++// Chrome OS ------------------------------------------------------------------
++
++#if defined(OS_CHROMEOS)
++
+ extern const char kAllowTouchpadThreeFingerClickName[];
+ extern const char kAllowTouchpadThreeFingerClickDescription[];
+
+diff -ur chromium-69.0.3497.92-orig/content/browser/gpu/compositor_util.cc chromium-69.0.3497.92/content/browser/gpu/compositor_util.cc
+--- chromium-69.0.3497.92-orig/content/browser/gpu/compositor_util.cc 2018-09-12 00:39:41.000000000 +0530
++++ chromium-69.0.3497.92/content/browser/gpu/compositor_util.cc 2018-09-13 22:10:34.072012092 +0530
+@@ -149,7 +149,11 @@
+ {"video_decode",
+ SafeGetFeatureStatus(gpu_feature_info,
+ gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE),
++#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
++ !command_line.HasSwitch(switches::kEnableAcceleratedVideo),
++#else
+ command_line.HasSwitch(switches::kDisableAcceleratedVideoDecode),
++#endif
+ "Accelerated video decode has been disabled, either via blacklist, "
+ "about:flags or the command line.",
+ true, true},
+diff -ur chromium-69.0.3497.92-orig/content/browser/gpu/gpu_process_host.cc chromium-69.0.3497.92/content/browser/gpu/gpu_process_host.cc
+--- chromium-69.0.3497.92-orig/content/browser/gpu/gpu_process_host.cc 2018-09-12 00:39:41.000000000 +0530
++++ chromium-69.0.3497.92/content/browser/gpu/gpu_process_host.cc 2018-09-13 22:10:34.113010836 +0530
+@@ -209,7 +209,9 @@
+ switches::kDisableLogging,
+ switches::kDisableShaderNameHashing,
+ switches::kDisableSkiaRuntimeOpts,
++#if !defined(OS_LINUX)
+ switches::kDisableWebRtcHWEncoding,
++#endif
+ #if defined(OS_WIN)
+ switches::kEnableAcceleratedVpxDecode,
+ #endif
+diff -ur chromium-69.0.3497.92-orig/content/browser/renderer_host/media/video_capture_browsertest.cc chromium-69.0.3497.92/content/browser/renderer_host/media/video_capture_browsertest.cc
+--- chromium-69.0.3497.92-orig/content/browser/renderer_host/media/video_capture_browsertest.cc 2018-09-12 00:39:41.000000000 +0530
++++ chromium-69.0.3497.92/content/browser/renderer_host/media/video_capture_browsertest.cc 2018-09-13 22:10:34.124010499 +0530
+@@ -165,8 +165,13 @@
+ base::CommandLine::ForCurrentProcess()->AppendSwitch(
+ switches::kUseFakeJpegDecodeAccelerator);
+ } else {
++#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
++ base::CommandLine::ForCurrentProcess()->AppendSwitch(
++ switches::kEnableAcceleratedMjpegDecode);
++#else
+ base::CommandLine::ForCurrentProcess()->AppendSwitch(
+ switches::kDisableAcceleratedMjpegDecode);
++#endif
+ }
+ }
+
+diff -ur chromium-69.0.3497.92-orig/content/browser/renderer_host/render_process_host_impl.cc chromium-69.0.3497.92/content/browser/renderer_host/render_process_host_impl.cc
+--- chromium-69.0.3497.92-orig/content/browser/renderer_host/render_process_host_impl.cc 2018-09-12 00:39:41.000000000 +0530
++++ chromium-69.0.3497.92/content/browser/renderer_host/render_process_host_impl.cc 2018-09-13 22:10:34.133010223 +0530
+@@ -2798,7 +2798,11 @@
+ switches::kDefaultTileHeight,
+ switches::kDisable2dCanvasImageChromium,
+ switches::kDisableAcceleratedJpegDecoding,
++#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++ switches::kEnableAcceleratedVideo,
++#else
+ switches::kDisableAcceleratedVideoDecode,
++#endif
+ switches::kDisableBackgroundTasks,
+ switches::kDisableBackgroundTimerThrottling,
+ switches::kDisableBreakpad,
+@@ -2933,8 +2937,10 @@
+ #if BUILDFLAG(ENABLE_RUNTIME_MEDIA_RENDERER_SELECTION)
+ switches::kDisableMojoRenderer,
+ #endif
++#if !defined(OS_LINUX) || defined(OS_CHROMEOS)
+ switches::kDisableWebRtcHWDecoding,
+ switches::kDisableWebRtcHWEncoding,
++#endif
+ switches::kEnableWebRtcSrtpAesGcm,
+ switches::kEnableWebRtcSrtpEncryptedHeaders,
+ switches::kEnableWebRtcStunOrigin,
+Only in chromium-69.0.3497.92/content/browser/renderer_host: render_process_host_impl.cc.orig
+diff -ur chromium-69.0.3497.92-orig/content/browser/utility_process_host.cc chromium-69.0.3497.92/content/browser/utility_process_host.cc
+--- chromium-69.0.3497.92-orig/content/browser/utility_process_host.cc 2018-09-12 00:39:41.000000000 +0530
++++ chromium-69.0.3497.92/content/browser/utility_process_host.cc 2018-09-13 22:10:34.296005227 +0530
+@@ -296,7 +296,11 @@
+ switches::kOverrideUseSoftwareGLForTests,
+ switches::kOverrideEnabledCdmInterfaceVersion,
+ switches::kProxyServer,
++#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
++ switches::kEnableAcceleratedMjpegDecode,
++#else
+ switches::kDisableAcceleratedMjpegDecode,
++#endif
+ switches::kUseFakeDeviceForMediaStream,
+ switches::kUseFakeJpegDecodeAccelerator,
+ switches::kUseFileForFakeVideoCapture,
+diff -ur chromium-69.0.3497.92-orig/content/browser/webrtc/webrtc_media_recorder_browsertest.cc chromium-69.0.3497.92/content/browser/webrtc/webrtc_media_recorder_browsertest.cc
+--- chromium-69.0.3497.92-orig/content/browser/webrtc/webrtc_media_recorder_browsertest.cc 2018-09-12 00:39:41.000000000 +0530
++++ chromium-69.0.3497.92/content/browser/webrtc/webrtc_media_recorder_browsertest.cc 2018-09-13 22:10:34.143009916 +0530
+@@ -66,7 +66,12 @@
+ return;
+ // This flag is also used for encoding, https://crbug.com/616640.
+ base::CommandLine::ForCurrentProcess()->AppendSwitch(
+- switches::kDisableAcceleratedVideoDecode);
++#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++ switches::kEnableAcceleratedVideo
++#else
++ switches::kDisableAcceleratedVideoDecode
++#endif
++ );
+ }
+
+ private:
+diff -ur chromium-69.0.3497.92-orig/content/gpu/BUILD.gn chromium-69.0.3497.92/content/gpu/BUILD.gn
+--- chromium-69.0.3497.92-orig/content/gpu/BUILD.gn 2018-09-12 00:39:41.000000000 +0530
++++ chromium-69.0.3497.92/content/gpu/BUILD.gn 2018-09-13 22:10:34.148009763 +0530
+@@ -133,4 +133,8 @@
+ (!is_chromecast || is_cast_desktop_build)) {
+ configs += [ "//build/config/linux/dri" ]
+ }
++
++ if (is_desktop_linux) {
++ public_configs = [ "//media/gpu:libva_config" ]
++ }
+ }
+diff -ur chromium-69.0.3497.92-orig/content/gpu/gpu_main.cc chromium-69.0.3497.92/content/gpu/gpu_main.cc
+--- chromium-69.0.3497.92-orig/content/gpu/gpu_main.cc 2018-09-12 00:39:41.000000000 +0530
++++ chromium-69.0.3497.92/content/gpu/gpu_main.cc 2018-09-13 22:10:34.153009610 +0530
+@@ -284,7 +284,7 @@
+
+ base::PlatformThread::SetName("CrGpuMain");
+
+-#if defined(OS_ANDROID) || defined(OS_CHROMEOS)
++#if defined(OS_LINUX)
+ // Set thread priority before sandbox initialization.
+ base::PlatformThread::SetCurrentThreadPriority(base::ThreadPriority::DISPLAY);
+ #endif
+@@ -317,7 +317,7 @@
+ GetContentClient()->SetGpuInfo(gpu_init->gpu_info());
+
+ base::ThreadPriority io_thread_priority = base::ThreadPriority::NORMAL;
+-#if defined(OS_ANDROID) || defined(OS_CHROMEOS)
++#if defined(OS_LINUX)
+ io_thread_priority = base::ThreadPriority::DISPLAY;
+ #endif
+
+diff -ur chromium-69.0.3497.92-orig/content/public/browser/gpu_utils.cc chromium-69.0.3497.92/content/public/browser/gpu_utils.cc
+--- chromium-69.0.3497.92-orig/content/public/browser/gpu_utils.cc 2018-09-12 00:39:42.000000000 +0530
++++ chromium-69.0.3497.92/content/public/browser/gpu_utils.cc 2018-09-13 22:10:34.164009273 +0530
+@@ -57,9 +57,17 @@
+ gpu_preferences.in_process_gpu =
+ command_line->HasSwitch(switches::kInProcessGPU);
+ gpu_preferences.disable_accelerated_video_decode =
++#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++ !command_line->HasSwitch(switches::kEnableAcceleratedVideo);
++#else
+ command_line->HasSwitch(switches::kDisableAcceleratedVideoDecode);
++#endif
+ gpu_preferences.disable_accelerated_video_encode =
++#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++ !command_line->HasSwitch(switches::kEnableAcceleratedVideo);
++#else
+ command_line->HasSwitch(switches::kDisableAcceleratedVideoEncode);
++#endif
+ #if defined(OS_WIN)
+ uint32_t enable_accelerated_vpx_decode_val =
+ gpu::GpuPreferences::VPX_VENDOR_MICROSOFT;
+diff -ur chromium-69.0.3497.92-orig/content/public/common/content_switches.cc chromium-69.0.3497.92/content/public/common/content_switches.cc
+--- chromium-69.0.3497.92-orig/content/public/common/content_switches.cc 2018-09-12 00:39:42.000000000 +0530
++++ chromium-69.0.3497.92/content/public/common/content_switches.cc 2018-09-13 22:10:34.172009028 +0530
+@@ -79,6 +79,11 @@
+ // Disable gpu-accelerated 2d canvas.
+ const char kDisableAccelerated2dCanvas[] = "disable-accelerated-2d-canvas";
+
++#if defined(OS_LINUX)
++// Enables hardware acceleration of video for Linux only. VA-API driver
++// is required to be present on the system installation.
++const char kEnableAcceleratedVideo[] = "enable-accelerated-video";
++#endif
+ // Disables hardware acceleration of video decode, where available.
+ const char kDisableAcceleratedVideoDecode[] =
+ "disable-accelerated-video-decode";
+@@ -868,11 +873,13 @@
+ // ignores this switch on its stable and beta channels.
+ const char kDisableWebRtcEncryption[] = "disable-webrtc-encryption";
+
++#if defined(OS_CHROMEOS)
+ // Disables HW decode acceleration for WebRTC.
+ const char kDisableWebRtcHWDecoding[] = "disable-webrtc-hw-decoding";
+
+ // Disables HW encode acceleration for WebRTC.
+ const char kDisableWebRtcHWEncoding[] = "disable-webrtc-hw-encoding";
++#endif
+
+ // Enables negotiation of GCM cipher suites from RFC 7714 for SRTP in WebRTC.
+ // See https://tools.ietf.org/html/rfc7714 for further information.
+diff -ur chromium-69.0.3497.92-orig/content/public/common/content_switches.h chromium-69.0.3497.92/content/public/common/content_switches.h
+--- chromium-69.0.3497.92-orig/content/public/common/content_switches.h 2018-09-12 00:39:42.000000000 +0530
++++ chromium-69.0.3497.92/content/public/common/content_switches.h 2018-09-13 22:10:34.172009028 +0530
+@@ -104,6 +104,9 @@
+ CONTENT_EXPORT extern const char kDomAutomationController[];
+ extern const char kDisable2dCanvasClipAntialiasing[];
+ CONTENT_EXPORT extern const char kDumpBlinkRuntimeCallStats[];
++#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
++CONTENT_EXPORT extern const char kEnableAcceleratedVideo[];
++#endif
+ CONTENT_EXPORT extern const char kEnableAccessibilityObjectModel[];
+ CONTENT_EXPORT extern const char kEnableAggressiveDOMStorageFlushing[];
+ CONTENT_EXPORT extern const char kEnableAutomation[];
+@@ -241,8 +244,10 @@
+ CONTENT_EXPORT extern const char kWaitForDebuggerChildren[];
+
+ CONTENT_EXPORT extern const char kDisableWebRtcEncryption[];
++#if defined(OS_CHROMEOS)
+ CONTENT_EXPORT extern const char kDisableWebRtcHWDecoding[];
+ CONTENT_EXPORT extern const char kDisableWebRtcHWEncoding[];
++#endif
+ CONTENT_EXPORT extern const char kEnableWebRtcSrtpAesGcm[];
+ CONTENT_EXPORT extern const char kEnableWebRtcSrtpEncryptedHeaders[];
+ CONTENT_EXPORT extern const char kEnableWebRtcStunOrigin[];
+diff -ur chromium-69.0.3497.92-orig/content/renderer/media/webrtc/peer_connection_dependency_factory.cc chromium-69.0.3497.92/content/renderer/media/webrtc/peer_connection_dependency_factory.cc
+--- chromium-69.0.3497.92-orig/content/renderer/media/webrtc/peer_connection_dependency_factory.cc 2018-09-12 00:39:42.000000000 +0530
++++ chromium-69.0.3497.92/content/renderer/media/webrtc/peer_connection_dependency_factory.cc 2018-09-13 22:10:34.181008752 +0530
+@@ -276,10 +276,18 @@
+
+ const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
+ if (gpu_factories && gpu_factories->IsGpuVideoAcceleratorEnabled()) {
++#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++ if (cmd_line->HasSwitch(switches::kEnableAcceleratedVideo))
++#else
+ if (!cmd_line->HasSwitch(switches::kDisableWebRtcHWDecoding))
++#endif
+ decoder_factory.reset(new RTCVideoDecoderFactory(gpu_factories));
+
++#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++ if (cmd_line->HasSwitch(switches::kEnableAcceleratedVideo))
++#else
+ if (!cmd_line->HasSwitch(switches::kDisableWebRtcHWEncoding))
++#endif
+ encoder_factory.reset(new RTCVideoEncoderFactory(gpu_factories));
+ }
+
+diff -ur chromium-69.0.3497.92-orig/content/renderer/render_thread_impl.cc chromium-69.0.3497.92/content/renderer/render_thread_impl.cc
+--- chromium-69.0.3497.92-orig/content/renderer/render_thread_impl.cc 2018-09-12 00:39:42.000000000 +0530
++++ chromium-69.0.3497.92/content/renderer/render_thread_impl.cc 2018-09-13 22:10:34.192008415 +0530
+@@ -1441,7 +1441,11 @@
+ kGpuStreamPriorityMedia);
+
+ const bool enable_video_accelerator =
++#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++ cmd_line->HasSwitch(switches::kEnableAcceleratedVideo) &&
++#else
+ !cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode) &&
++#endif
+ (gpu_channel_host->gpu_feature_info()
+ .status_values[gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE] ==
+ gpu::kGpuFeatureStatusEnabled);
+Only in chromium-69.0.3497.92/content/renderer: render_thread_impl.cc.orig
+diff -ur chromium-69.0.3497.92-orig/gpu/config/software_rendering_list.json chromium-69.0.3497.92/gpu/config/software_rendering_list.json
+--- chromium-69.0.3497.92-orig/gpu/config/software_rendering_list.json 2018-09-12 00:39:44.000000000 +0530
++++ chromium-69.0.3497.92/gpu/config/software_rendering_list.json 2018-09-13 22:10:34.193008384 +0530
+@@ -377,17 +377,6 @@
+ ]
+ },
+ {
+- "id": 48,
+- "description": "Accelerated video decode is unavailable on Linux",
+- "cr_bugs": [137247],
+- "os": {
+- "type": "linux"
+- },
+- "features": [
+- "accelerated_video_decode"
+- ]
+- },
+- {
+ "id": 50,
+ "description": "Disable VMware software renderer on older Mesa",
+ "cr_bugs": [145531, 332596, 571899, 629434],
+diff -ur chromium-69.0.3497.92-orig/media/base/media_switches.cc chromium-69.0.3497.92/media/base/media_switches.cc
+--- chromium-69.0.3497.92-orig/media/base/media_switches.cc 2018-09-12 00:39:48.000000000 +0530
++++ chromium-69.0.3497.92/media/base/media_switches.cc 2018-09-13 22:10:34.214007740 +0530
+@@ -117,10 +117,15 @@
+ // accelerator hardware to be present.
+ const char kUseFakeJpegDecodeAccelerator[] = "use-fake-jpeg-decode-accelerator";
+
++#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++// Enable hardware accelerated mjpeg decode on linux
++const char kEnableAcceleratedMjpegDecode[] = "enable-accelerated-mjpeg-decode";
++#else
+ // Disable hardware acceleration of mjpeg decode for captured frame, where
+ // available.
+ const char kDisableAcceleratedMjpegDecode[] =
+ "disable-accelerated-mjpeg-decode";
++#endif
+
+ // When running tests on a system without the required hardware or libraries,
+ // this flag will cause the tests to fail. Otherwise, they silently succeed.
+@@ -462,15 +467,22 @@
+ #endif
+
+ bool IsVideoCaptureAcceleratedJpegDecodingEnabled() {
++
++#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
++ if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
++ switches::kEnableAcceleratedMjpegDecode)
++#else
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+- switches::kDisableAcceleratedMjpegDecode)) {
++ switches::kDisableAcceleratedMjpegDecode)
++#endif
++ ) {
+ return false;
+ }
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kUseFakeJpegDecodeAccelerator)) {
+ return true;
+ }
+-#if defined(OS_CHROMEOS)
++#if !defined(OS_ANDROID) && defined(OS_LINUX)
+ return true;
+ #endif
+ return false;
+diff -ur chromium-69.0.3497.92-orig/media/base/media_switches.h chromium-69.0.3497.92/media/base/media_switches.h
+--- chromium-69.0.3497.92-orig/media/base/media_switches.h 2018-09-12 00:39:48.000000000 +0530
++++ chromium-69.0.3497.92/media/base/media_switches.h 2018-09-13 22:10:34.283005625 +0530
+@@ -66,7 +66,11 @@
+ MEDIA_EXPORT extern const char kUseFileForFakeVideoCapture[];
+ MEDIA_EXPORT extern const char kUseFileForFakeAudioCapture[];
+ MEDIA_EXPORT extern const char kUseFakeJpegDecodeAccelerator[];
++#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++MEDIA_EXPORT extern const char kEnableAcceleratedMjpegDecode[];
++#else
+ MEDIA_EXPORT extern const char kDisableAcceleratedMjpegDecode[];
++#endif
+
+ MEDIA_EXPORT extern const char kRequireAudioHardwareForTesting[];
+ MEDIA_EXPORT extern const char kMuteAudio[];
+diff -ur chromium-69.0.3497.92-orig/media/gpu/BUILD.gn chromium-69.0.3497.92/media/gpu/BUILD.gn
+--- chromium-69.0.3497.92-orig/media/gpu/BUILD.gn 2018-09-12 00:39:48.000000000 +0530
++++ chromium-69.0.3497.92/media/gpu/BUILD.gn 2018-09-13 22:10:34.210007863 +0530
+@@ -495,6 +495,14 @@
+ }
+ }
+
++if (is_desktop_linux && use_vaapi) {
++ import("//build/config/linux/pkg_config.gni")
++
++ pkg_config("libva_config") {
++ packages = [ "libva" ]
++ }
++}
++
+ if (use_vaapi) {
+ test("jpeg_encode_accelerator_unittest") {
+ deps = [
+@@ -559,6 +567,10 @@
+ if (use_ozone) {
+ deps += [ "//ui/ozone" ]
+ }
++
++ if (is_desktop_linux) {
++ public_configs = [ ":libva_config" ]
++ }
+ }
+ }
+
diff --git a/widevine.patch b/widevine.patch
new file mode 100644
index 0000000..2fc8d79
--- /dev/null
+++ b/widevine.patch
@@ -0,0 +1,23 @@
+diff -upr chromium-48.0.2564.82.orig/third_party/widevine/cdm/stub/widevine_cdm_version.h chromium-48.0.2564.82/third_party/widevine/cdm/stub/widevine_cdm_version.h
+--- chromium-48.0.2564.82.orig/third_party/widevine/cdm/stub/widevine_cdm_version.h 2016-01-14 01:05:17.000000000 +0200
++++ chromium-48.0.2564.82/third_party/widevine/cdm/stub/widevine_cdm_version.h 2016-01-21 19:18:51.287978456 +0200
+@@ -12,4 +12,6 @@
+
+ #define WIDEVINE_CDM_AVAILABLE
+
++#define WIDEVINE_CDM_VERSION_STRING "67"
++
+ #endif // WIDEVINE_CDM_VERSION_H_
+ #endif // WIDEVINE_CDM_VERSION_H_
+
+--- a/third_party/widevine/cdm/BUILD.gn
++++ b/third_party/widevine/cdm/BUILD.gn
+@@ -11,7 +11,7 @@ import("//third_party/widevine/cdm/widev
+ # Internal Cast builds set enable_widevine=true to bring in Widevine support.
+ # TODO(xhwang): Support component updated CDM on other platforms and remove this
+ # assert.
+-assert(!enable_widevine || is_win || is_mac || is_chromecast,
++assert(!enable_widevine || is_win || is_mac || is_chromecast || is_linux,
+ "Component updated CDM only supported on Windows and Mac for now.")
+
+ widevine_arch = current_cpu
5 years, 1 month
[chromium-browser-privacy: 1/103] Initial setup of the repo
by qvint
commit 20126133f3ab099319e6caf8ab6574d046200d9c
Author: RPM Fusion Release Engineering <sysadmin(a)lists.rpmfusion.org>
Date: Fri Sep 28 23:11:38 2018 +0200
Initial setup of the repo
.gitignore | 0
sources | 0
2 files changed, 0 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..e69de29
diff --git a/sources b/sources
new file mode 100644
index 0000000..e69de29
5 years, 1 month
[chromium-browser-privacy] (103 commits) ...Merge branch 'f30' into f31
by qvint
Summary of changes:
2012613... Initial setup of the repo
444bbe5... Remove dependency on minizip-compat package(https://bugzill
e45f345... Rebuild against new libva version on Fedora 29+
9bea27a... Turn off gold linker since it crashes; Make use of metainfo
eb2287c... Re enable Gold for rawhide
8a9fd2c... Turn off fedora build flags on rawhide
a4eb1cd... Update to 70.0.3538.67 with new vaapi patch
ba7299a... Reduce jumbo_file_merge_limit to a much lower number since
6b14e1f... Update to 70.0.3538.77 Add a patch to fix building with sys
7f8e0b3... Re brand chromium-vaapi and update vaapi patch
d6f0043... Add a patch to fix building with harfbuzz2 on rawhide
1988246... Switch to %%setup from %%autosetup because adding condition
764a3f6... Update to 70.0.3538.102
f845271... Add a patch from upstream to remove sysroot-related options
1829f0d... Update to 70.0.3538.110
a99d631... Update to 71.0.3578.80 Add a patch to fix libva version mis
14e8997... Update to 71.0.3578.98
44e517b... Re enable the non effective enable_widevine flag
95bdf98... Update to 72.0.3626.81 Add a patch to fix missing includes
39ae7ad... Disable gold linker (again); Update didn't fixed the issue.
473eed6... Rebundle icu for fedora 29 and fedora 28; Need icu version
d918bbe... Update to 72.0.3626.109 remove ozone patches
9f27085... Enable webrtc includes patch again.
e57526b... Add fix-the-VA_CHECK_VERSION patch from upstream
2ce345d... Updated to 72.0.3626.121 spec cleanup
147974b... Update to 73.0.3683.75 Update BuildRequires for ozone, libv
eba61dc... Enable pipewire support Added a patch from fedora to fix bu
d76fb61... Add a patch from upstream to stop vsync error spam when run
8b7b9e0... Switched to clang compiler which is supported by upstream
f149ea0... Update to 73.0.3683.86. Disable debug logs.
4d4d9b4... Update source file.
27d8141... Switched to GNU ar and nm to work around a bug in the curre
e953730... Fix date in changelog.
45601a9... Revert switching to GNU ar and nm.
8bf777f... Update to 73.0.3683.103.
5e4b736... Update to 73.0.3683.103.
16c42b6... Add wildcard for gitignore
528cdf6... Removed outdated workarounds for linker and compiler
566b951... Merge branch 'master' of ssh://pkgs.rpmfusion.org/free/chro
8a83ddf... Fixed build with llvm 8.
846be0c... Merge branch 'master' into f30
84f0bc7... Add MEIPreload in install package
f0dfab7... Update to 74.0.3729.108 Install missing MEIPreload componen
b94d551... Upload new sources
5a043eb... Merge branch 'master' into f30
4bbccf8... Update to 74.0.3729.131 and spec cleanup
b5ae81c... Merge branch 'master' into f30
0681269... Add a patch from upstream to Fix window flash for some WMs;
f728a8c... Update to 74.0.3729.157
0dc6aab... Merge branch 'master' into f30
f98d107... Update to 74.0.3729.169.
f426b11... Update to 74.0.3729.169.
a16c57f... Merge branch 'master' into f30
4591d7d... Add patch to Disallow non-buildable sources in binary targe
7d52ac7... Merge branch 'master' into f30
d8f20b8... Update to 75.0.3770.80
b76762b... Upload new sources
51b388c... Use %autosetup and switch back to GCC (build fails on clang
5eaf680... Update to 75.0.3770.90 Re bundle icu; requires 64 and up Us
836f1f3... Use linux/sockios.h instead of sys/socket.h (linux 5.2)
7bf836e... Merge branch 'master' into f30
2742ca6... Update to 75.0.3770.100.
4b7d14f... Merge branch 'master' into f30
da49c06... Fix vaapi regression on few intel devices, disabled vaapi p
e9e9fcd... Merge branch 'master' into f30
24e2c81... Remove the orig file
641d58d... Remove the orig file
7f157b7... Update to 75.0.3770.142 Removed Nvidia GPU video decode bla
c3570e3... Merge branch 'master' into f30
bac7d04... - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass
ca1f5b4... Update to 76.0.3809.100
90547a9... Add a patch to fix Unrar wrapper
b0a2aed... Remove the no unrar patch
9475c8a... Use unrar, it is free software and license permits to be fr
61d5af5... Add third_party/unrar
7225b60... Merge branch 'master' into f30
138fb15... Fix a bug which causes chromium to reject certificates by t
ba193ad... Merge branch 'master' into f30
7158681... Update to 76.0.3809.132
b65c857... Merge branch 'master' into f30
4fb0363... Correct writting either RPM Fusion or rpmfusion
97b636a... Update to 77.0.3865.90 Disabled Nvidia support
7b33c54... Use the bundled python2 as python2 is going to be removed f
58a9a8f... Add build requires: /usr/bin/python2
08af7c1... Preserve bundled pylibs
fee2c1b... Apply ungoogled-chromium modifications
9bd4d86... Rename to chromium-browser-privacy
6724e3f... Rebundle harfbuzz
0257b50... Enable Shiftshader support
5b41de2... Revert "Rebundle harfbuzz"
9d56b6c... Add patch from upstream to fix building with system harfbuz
88571ef... Restart the changelog
578480c... Merge branch 'master' into f30
532a378... Merge branch 'chromium-vaapi-f30' into chromium-browser-pri
d297586... Rebundle syslibs on older Fedoras
55586db... Update to 77.0.3865.120
c1aa6a5... Upload: New Sources
8d976e2... Remove: blink symbol level gn flag, use the default option
e01e3e3... Merge branch 'f30'
54087a4... Merge branch 'chromium-vaapi-f30' into chromium-browser-pri
a2f9717... Merge branch 'chromium-vaapi-f31' into chromium-browser-pri
0716825... Import sources with full history
d96de2d... Merge branch 'f30' into f31
5 years, 1 month
[vlc/f31] (7 commits) ...Update mmal patch
by Nicolas Chauvet
Summary of changes:
b5ab699... Add el8 support (*)
95341b0... Bump release (*)
55623b6... Drop kde-filesystem support (*)
01e0109... Update changelog (*)
78849c8... Drop any phonon support for RHEL (*)
48d97b5... Update to 20191014 (*)
bc72c5e... Update mmal patch (*)
(*) This commit already existed in another branch; no separate mail sent
5 years, 1 month