summaryrefslogtreecommitdiffstats
path: root/recipes-wam
diff options
context:
space:
mode:
authorRoger Zanoni <rzanoni@igalia.com>2021-02-23 14:05:08 +0100
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2021-03-24 12:26:56 +0000
commitbc27ab6af9319a4754eb54a3acb42f89d99aeeef (patch)
tree70c25b3fbfe4d534c17020434c04f891262688f1 /recipes-wam
parentadafca5975daa27fd45008052297000077e5b070 (diff)
web-runtime: Update from chromium79 to chromium84
This patch contains all the squashed changes needed to bump WAM and chromium, including the ported changes from cr79. Bug-AGL: SPEC-3806 Signed-off-by: Roger Zanoni <rzanoni@igalia.com> Change-Id: If2b18e2978e8b1050e4b167b9627c1a526867cfb
Diffstat (limited to 'recipes-wam')
-rw-r--r--recipes-wam/chromium/chromium.inc16
-rw-r--r--recipes-wam/chromium/chromium79/0001-GCC-fix-includes-for-gcc-10.patch89
-rw-r--r--recipes-wam/chromium/chromium84_git.bb (renamed from recipes-wam/chromium/chromium79_git.bb)37
-rw-r--r--recipes-wam/chromium/files/chromium-quiche-invalid-offsetof.patch57
-rw-r--r--recipes-wam/chromium/files/chromium-skia-no_sanitize.patch63
-rw-r--r--recipes-wam/wam/files/WebAppMgr@.service2
-rw-r--r--recipes-wam/wam/wam_git.bb8
7 files changed, 165 insertions, 107 deletions
diff --git a/recipes-wam/chromium/chromium.inc b/recipes-wam/chromium/chromium.inc
index 823016039..3144993f0 100644
--- a/recipes-wam/chromium/chromium.inc
+++ b/recipes-wam/chromium/chromium.inc
@@ -14,7 +14,7 @@ require gn-utils.inc
inherit gettext qemu pythonnative
-DEPENDS = "virtual/gettext wayland wayland-native pixman freetype glib-2.0 fontconfig openssl pango cairo icu libxkbcommon libexif dbus pciutils udev libcap alsa-lib virtual/egl elfutils-native libdrm atk gperf-native gconf nss nss-native nspr nspr-native bison-native qemu-native"
+DEPENDS = "virtual/gettext wayland wayland-native pixman freetype glib-2.0 fontconfig openssl pango cairo icu libxkbcommon libexif dbus pciutils udev libcap alsa-lib virtual/egl elfutils-native libdrm atk at-spi2-atk gperf-native gconf nss nss-native nspr nspr-native bison-native qemu-native"
PROVIDES = "${BROWSER_APPLICATION}"
@@ -34,8 +34,8 @@ B = "${OUT_DIR}/${BUILD_TYPE}"
WEBRUNTIME_BUILD_TARGET = "webos:weboswebruntime"
BROWSER_APP_BUILD_TARGET = "chrome"
-BROWSER_APPLICATION = "chromium68-browser"
-BROWSER_APPLICATION_DIR = "/opt/chromium68"
+BROWSER_APPLICATION = "chromium84-browser"
+BROWSER_APPLICATION_DIR = "/opt/chromium84"
TARGET = "${WEBRUNTIME_BUILD_TARGET}"
@@ -60,9 +60,8 @@ PACKAGECONFIG[lttng] = "use_lttng=true,use_lttng=false,lttng-ust,lttng-tools ltt
PACKAGECONFIG[use-linux-v4l2] = "use_v4l2_codec=true use_v4lplugin=true use_linux_v4l2_only=true"
PACKAGECONFIG[use-upstream-wayland] = " \
- ozone_platform_wayland_external=false ozone_platform_wayland=true \
- use_system_minigbm=true, \
- ozone_platform_wayland_external=true ozone_platform_wayland=false \
+ ozone_platform_wayland_external=false ozone_platform_wayland=true, \
+ ozone_platform_wayland_external=true ozone_platform_wayland=false \
"
GN_ARGS = "\
@@ -277,12 +276,16 @@ install_webruntime() {
# gzip -c ${OUT_DIR}/${BUILD_TYPE}/${MKSNAPSHOT_PATH}mksnapshot > ${D}${bindir_cross}/${HOST_SYS}-mksnapshot.gz
install -d ${D}${libdir}
+ install -d ${D}${libdir}/swiftshader
install -d ${D}${includedir}/${BPN}
install -d ${D}${CBE_DATA_PATH}
install -d ${D}${CBE_DATA_LOCALES_PATH}
# Install webos webview files
${S}/depot_tools/ninja ${PARALLEL_MAKE} -C ${OUT_DIR}/${BUILD_TYPE} webos/install/weboswebruntime
+
+ install -v -m 0644 ${OUT_DIR}/${BUILD_TYPE}/swiftshader/*.so ${D}${libdir}/swiftshader
+
chown root:root -R ${D}${libdir}
chown root:root -R ${D}${includedir}
@@ -326,6 +329,7 @@ INSANE_SKIP_${BROWSER_APPLICATION} += "libdir ldflags textrel"
FILES_${PN} = " \
${libdir}/*.so \
+ ${libdir}/swiftshader/*.so \
${CBE_DATA_PATH}/* \
${libdir}/${BPN}/*.so \
${WEBOS_SYSTEM_BUS_DIRS} \
diff --git a/recipes-wam/chromium/chromium79/0001-GCC-fix-includes-for-gcc-10.patch b/recipes-wam/chromium/chromium79/0001-GCC-fix-includes-for-gcc-10.patch
deleted file mode 100644
index 45441d610..000000000
--- a/recipes-wam/chromium/chromium79/0001-GCC-fix-includes-for-gcc-10.patch
+++ /dev/null
@@ -1,89 +0,0 @@
-From 07c48d101166930daa13bbcab6bf5c6be89a8bd8 Mon Sep 17 00:00:00 2001
-From: Stephan Hartmann <stha09@googlemail.com>
-Date: Tue, 7 Apr 2020 10:02:27 +0000
-Subject: [PATCH] GCC: fix includes for gcc-10
-
-From
-https://gitweb.gentoo.org/repo/gentoo.git/plain/www-client/chromium/files/chromium-81-gcc-10.patch
----
- src/base/trace_event/trace_event_memory_overhead.h | 1 +
- src/chrome/browser/search/background/ntp_backgrounds.h | 1 +
- src/media/cdm/supported_cdm_versions.h | 1 +
- src/third_party/angle/include/platform/Platform.h | 1 +
- src/third_party/perfetto/include/perfetto/base/task_runner.h | 1 +
- src/third_party/webrtc/call/rtx_receive_stream.h | 1 +
- .../webrtc/modules/audio_processing/aec3/clockdrift_detector.h | 1 +
- 7 files changed, 7 insertions(+)
-
-diff --git a/src/base/trace_event/trace_event_memory_overhead.h b/src/base/trace_event/trace_event_memory_overhead.h
-index 69468d464..3f5b786aa 100644
---- a/src/base/trace_event/trace_event_memory_overhead.h
-+++ b/src/base/trace_event/trace_event_memory_overhead.h
-@@ -9,6 +9,7 @@
- #include <stdint.h>
-
- #include <unordered_map>
-+#include <string>
-
- #include "base/base_export.h"
- #include "base/macros.h"
-diff --git a/src/chrome/browser/search/background/ntp_backgrounds.h b/src/chrome/browser/search/background/ntp_backgrounds.h
-index 7afc0a230..ea5818e0d 100644
---- a/src/chrome/browser/search/background/ntp_backgrounds.h
-+++ b/src/chrome/browser/search/background/ntp_backgrounds.h
-@@ -6,6 +6,7 @@
- #define CHROME_BROWSER_SEARCH_BACKGROUND_NTP_BACKGROUNDS_H_
-
- #include <array>
-+#include <cstddef>
-
- class GURL;
-
-diff --git a/src/media/cdm/supported_cdm_versions.h b/src/media/cdm/supported_cdm_versions.h
-index 2b54e197b..f34a2a265 100644
---- a/src/media/cdm/supported_cdm_versions.h
-+++ b/src/media/cdm/supported_cdm_versions.h
-@@ -6,6 +6,7 @@
- #define MEDIA_CDM_SUPPORTED_CDM_VERSIONS_H_
-
- #include <array>
-+#include <cstddef>
-
- #include "media/base/media_export.h"
- #include "media/cdm/api/content_decryption_module.h"
-diff --git a/src/third_party/angle/include/platform/Platform.h b/src/third_party/angle/include/platform/Platform.h
-index cea607055..829ada6d0 100644
---- a/src/third_party/angle/include/platform/Platform.h
-+++ b/src/third_party/angle/include/platform/Platform.h
-@@ -11,6 +11,7 @@
-
- #include <stdint.h>
- #include <array>
-+#include <cstddef>
-
- #define EGL_PLATFORM_ANGLE_PLATFORM_METHODS_ANGLEX 0x3482
-
-diff --git a/src/third_party/webrtc/call/rtx_receive_stream.h b/src/third_party/webrtc/call/rtx_receive_stream.h
-index 8ffa4400a..113a8168b 100644
---- a/src/third_party/webrtc/call/rtx_receive_stream.h
-+++ b/src/third_party/webrtc/call/rtx_receive_stream.h
-@@ -12,6 +12,7 @@
- #define CALL_RTX_RECEIVE_STREAM_H_
-
- #include <map>
-+#include <cstdint>
-
- #include "call/rtp_packet_sink_interface.h"
-
-diff --git a/src/third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.h b/src/third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.h
-index 22528c948..69e624e8b 100644
---- a/src/third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.h
-+++ b/src/third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.h
-@@ -12,6 +12,7 @@
- #define MODULES_AUDIO_PROCESSING_AEC3_CLOCKDRIFT_DETECTOR_H_
-
- #include <array>
-+#include <cstddef>
-
- namespace webrtc {
-
diff --git a/recipes-wam/chromium/chromium79_git.bb b/recipes-wam/chromium/chromium84_git.bb
index 7f1ce11cf..90c7e6189 100644
--- a/recipes-wam/chromium/chromium79_git.bb
+++ b/recipes-wam/chromium/chromium84_git.bb
@@ -1,21 +1,24 @@
require chromium.inc
SRC_URI = "\
- git://github.com/igalia/${PN};branch=@45.agl.jellyfish;protocol=https;rev=${SRCREV_chromium79};name=chromium79 \
- git://github.com/webosose/chromium-v8;branch=@chromium79;destsuffix=git/src/v8;rev=${SRCREV_v8};name=v8 \
- file://0001-GCC-fix-includes-for-gcc-10.patch \
+ git://github.com/igalia/${PN};branch=koi;protocol=https;rev=${SRCREV_chromium84};name=chromium84 \
+ git://github.com/webosose/chromium-v8;branch=@chromium84;destsuffix=git/src/v8;rev=${SRCREV_v8};name=v8 \
+ file://chromium-quiche-invalid-offsetof.patch \
+ file://chromium-skia-no_sanitize.patch \
"
# Needed by catapult
DEPENDS += "python-six-native python-beautifulsoup4-native python-lxml-native python-html5lib-native python-webencodings-native"
-SRCREV_chromium79 = "3499e08c510310e7dd99c9eb7830b90713a8f8e1"
-SRCREV_v8 = "e876fd0e28bd3bda5815394874183b7e6079d440"
+SRCREV_chromium84 = "20b9dd7995c70950e45d66c7c8cc2b2487c90eb6"
+SRCREV_v8 = "5c1d89dd2945a10cf7a6a3458050b3177a870b09"
-BROWSER_APPLICATION = "chromium79-browser"
-BROWSER_APPLICATION_DIR = "/opt/chromium79"
+BROWSER_APPLICATION = "chromium84-browser"
+BROWSER_APPLICATION_DIR = "/opt/chromium84"
MKSNAPSHOT_PATH = "v8_snapshot/"
+PACKAGECONFIG_remove="jumbo"
+
GN_ARGS += "use_gtk=false"
# Disable closure_compile
@@ -56,5 +59,25 @@ GN_ARGS += "\
use_v8_context_snapshot=false \
"
+GN_ARGS_append = " \
+ use_system_minigbm=false \
+ use_wayland_gbm=false \
+"
+
+GN_ARGS_append = " \
+ is_webos=false \
+ is_agl=true \
+"
+
+# TODO: drop this after we migrate to ubuntu 16.04 or above
+GN_ARGS += "\
+ fatal_linker_warnings=false\
+"
+
+# TODO(rzanoni) copied from original recipe to fix qemux86 build.
+# check if it can be removed in the future.
+PACKAGECONFIG_remove_qemux86 = "gstreamer umediaserver neva-media gav neva-webrtc"
+#END TODO
+
D = "${OUT_DIR}/${BUILD_TYPE}/image"
diff --git a/recipes-wam/chromium/files/chromium-quiche-invalid-offsetof.patch b/recipes-wam/chromium/files/chromium-quiche-invalid-offsetof.patch
new file mode 100644
index 000000000..4fdd98de4
--- /dev/null
+++ b/recipes-wam/chromium/files/chromium-quiche-invalid-offsetof.patch
@@ -0,0 +1,57 @@
+From 4cea86e76af28b28aa72cb7c69ff7cf242b2bd5d Mon Sep 17 00:00:00 2001
+From: Stephan Hartmann <stha09@googlemail.com>
+Date: Sat, 27 Jun 2020 12:18:05 +0000
+Subject: [PATCH] GCC: supress invalid-offsetof warning
+
+GCC emits a warning if offsetof is used for non-POD
+types. However, GCC supports this and prints only
+the warning, because it might be nonportable code.
+Disable the warning for GCC with a pragma.
+---
+ src/net/third_party/quiche/src/quic/core/frames/quic_frame.h | 7 +++++++
+ .../quiche/src/quic/core/frames/quic_inlined_frame.h | 7 +++++++
+ 2 files changed, 14 insertions(+)
+
+diff --git a/src/net/third_party/quiche/src/quic/core/frames/quic_frame.h b/src/net/third_party/quiche/src/quic/core/frames/quic_frame.h
+index 756b69f..aceba76 100644
+--- a/src/net/third_party/quiche/src/quic/core/frames/quic_frame.h
++++ b/src/net/third_party/quiche/src/quic/core/frames/quic_frame.h
+@@ -110,8 +110,15 @@ struct QUIC_EXPORT_PRIVATE QuicFrame {
+
+ static_assert(sizeof(QuicFrame) <= 24,
+ "Frames larger than 24 bytes should be referenced by pointer.");
++#if defined(__GNUC__)
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Winvalid-offsetof"
++#endif
+ static_assert(offsetof(QuicStreamFrame, type) == offsetof(QuicFrame, type),
+ "Offset of |type| must match in QuicFrame and QuicStreamFrame");
++#if defined(__GNUC__)
++#pragma GCC diagnostic pop
++#endif
+
+ // A inline size of 1 is chosen to optimize the typical use case of
+ // 1-stream-frame in QuicTransmissionInfo.retransmittable_frames.
+diff --git a/src/net/third_party/quiche/src/quic/core/frames/quic_inlined_frame.h b/src/net/third_party/quiche/src/quic/core/frames/quic_inlined_frame.h
+index 08c4869..804e4bb 100644
+--- a/src/net/third_party/quiche/src/quic/core/frames/quic_inlined_frame.h
++++ b/src/net/third_party/quiche/src/quic/core/frames/quic_inlined_frame.h
+@@ -17,8 +17,15 @@ namespace quic {
+ template <typename DerivedT>
+ struct QUIC_EXPORT_PRIVATE QuicInlinedFrame {
+ QuicInlinedFrame(QuicFrameType type) : type(type) {
++#if defined(__GNUC__)
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Winvalid-offsetof"
++#endif
+ static_assert(offsetof(DerivedT, type) == 0,
+ "type must be the first field.");
++#if defined(__GNUC__)
++#pragma GCC diagnostic pop
++#endif
+ static_assert(sizeof(DerivedT) <= 24,
+ "Frames larger than 24 bytes should not be inlined.");
+ }
+--
+2.26.2
+
diff --git a/recipes-wam/chromium/files/chromium-skia-no_sanitize.patch b/recipes-wam/chromium/files/chromium-skia-no_sanitize.patch
new file mode 100644
index 000000000..abfba57ab
--- /dev/null
+++ b/recipes-wam/chromium/files/chromium-skia-no_sanitize.patch
@@ -0,0 +1,63 @@
+From 04765936a0a8dd3ac3f530786fce6b5cea826d3e Mon Sep 17 00:00:00 2001
+From: Roger Zanoni <rzanoni@igalia.com>
+Date: Wed, 24 Feb 2021 13:50:27 +0100
+Subject: [PATCH] [skia][build] fix skia no_sanitize build issues for gcc
+
+Based on https://src.fedoraproject.org/rpms/chromium/blob/rawhide/f/chromium-skia-no_sanitize.patch
+
+---
+ .../skia/include/private/SkFloatingPoint.h | 24 +++++++++++++++++++
+ 1 file changed, 24 insertions(+)
+
+diff --git a/src/third_party/skia/include/private/SkFloatingPoint.h b/src/third_party/skia/include/private/SkFloatingPoint.h
+index 110dda2ae4..8223e9b57d 100644
+--- a/src/third_party/skia/include/private/SkFloatingPoint.h
++++ b/src/third_party/skia/include/private/SkFloatingPoint.h
+@@ -159,7 +159,15 @@ static inline int64_t sk_float_saturate2int64(float x) {
+ // Cast double to float, ignoring any warning about too-large finite values being cast to float.
+ // Clang thinks this is undefined, but it's actually implementation defined to return either
+ // the largest float or infinity (one of the two bracketing representable floats). Good enough!
++#if defined(__GNUC__) && __GNUC__ >= 8
++__attribute__((no_sanitize("float-cast-overflow")))
++#else
++# if defined(__GNUC__)
++__attribute__((no_sanitize_undefined))
++# else
+ [[clang::no_sanitize("float-cast-overflow")]]
++# endif
++#endif
+ static inline float sk_double_to_float(double x) {
+ return static_cast<float>(x);
+ }
+@@ -226,12 +234,28 @@ static inline float sk_float_rsqrt(float x) {
+ // IEEE defines how float divide behaves for non-finite values and zero-denoms, but C does not
+ // so we have a helper that suppresses the possible undefined-behavior warnings.
+
++#if defined(__GNUC__) && __GNUC__ >= 8
++__attribute__((no_sanitize("float-divide-by-zero")))
++#else
++# if defined(__GNUC__)
++__attribute__((no_sanitize_undefined))
++# else
+ [[clang::no_sanitize("float-divide-by-zero")]]
++# endif
++#endif
+ static inline float sk_ieee_float_divide(float numer, float denom) {
+ return numer / denom;
+ }
+
++#if defined(__GNUC__) && __GNUC__ >= 8
++__attribute__((no_sanitize("float-cast-overflow")))
++#else
++# if defined(__GNUC__)
++__attribute__((no_sanitize_undefined))
++# else
+ [[clang::no_sanitize("float-divide-by-zero")]]
++# endif
++#endif
+ static inline double sk_ieee_double_divide(double numer, double denom) {
+ return numer / denom;
+ }
+--
+2.30.1
+
diff --git a/recipes-wam/wam/files/WebAppMgr@.service b/recipes-wam/wam/files/WebAppMgr@.service
index 5dfed9c53..beffd114c 100644
--- a/recipes-wam/wam/files/WebAppMgr@.service
+++ b/recipes-wam/wam/files/WebAppMgr@.service
@@ -29,7 +29,7 @@ EnvironmentFile=-/etc/default/WebAppMgr.env
Environment=XDG_RUNTIME_DIR=/run/user/%i
Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%i/bus
Environment=WAM_DATA_PATH="/home/%i/wamdata"
-ExecStart=/usr/bin/WebAppMgr --no-sandbox --use-viz-fmp-with-timeout=0 --in-process-gpu --remote-debugging-port=9998 --user-data-dir="/home/%i/wamdata" --webos-wam
+ExecStart=/usr/bin/WebAppMgr --enable-features=UseOzonePlatform --ozone-platform=wayland --no-sandbox --use-viz-fmp-with-timeout=0 --in-process-gpu --remote-debugging-port=9998 --user-data-dir="/home/%i/wamdata" --webos-wam
Restart=on-failure
RestartSec=50
diff --git a/recipes-wam/wam/wam_git.bb b/recipes-wam/wam/wam_git.bb
index 536b71f94..b9cefb891 100644
--- a/recipes-wam/wam/wam_git.bb
+++ b/recipes-wam/wam/wam_git.bb
@@ -5,13 +5,13 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7ca
inherit cmake
-DEPENDS = "glib-2.0 jsoncpp boost chromium79 libhomescreen"
+DEPENDS = "glib-2.0 jsoncpp boost chromium84 libhomescreen"
EXTRA_OECMAKE = "\
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=${prefix} \
-DPLATFORM_NAME=${@'${DISTRO}'.upper().replace('-', '_')} \
- -DCHROMIUM_SRC_DIR=${STAGING_INCDIR}/chromium79"
+ -DCHROMIUM_SRC_DIR=${STAGING_INCDIR}/chromium84"
PR="r0"
@@ -25,7 +25,7 @@ lcl_maybe_fortify = ""
SECURITY_STACK_PROTECTOR = ""
SRC_URI = "\
- git://github.com/igalia/${BPN}.git;branch=@43.agl.jellyfish;protocol=https \
+ git://github.com/igalia/${BPN}.git;branch=koi;protocol=https \
file://WebAppMgr@.service \
file://WebAppMgr.env \
file://wam-user-setup.sh \
@@ -33,7 +33,7 @@ SRC_URI = "\
file://trunc-webapp-roles.patch \
"
S = "${WORKDIR}/git"
-SRCREV = "8a1ec2f3e474199a689ae71a12ba70a230770c0d"
+SRCREV = "2a246d2ea79bd335b86942a5579d6de0c9ddce40"
do_install_append() {
install -d ${D}${sysconfdir}/wam