import CS webkit2gtk3-2.40.5-1.el8

This commit is contained in:
eabdullin 2023-09-27 14:21:26 +00:00
parent 98a4cd4c1e
commit 70522ea6c7
9 changed files with 181 additions and 64 deletions

2
.gitignore vendored
View File

@ -1,2 +1,2 @@
SOURCES/webkitgtk-2.38.5.tar.xz
SOURCES/webkitgtk-2.40.5.tar.xz
SOURCES/webkitgtk-keys.gpg

View File

@ -1,2 +1,2 @@
1774390c628bb3a524d4ed76f11de4a878078db6 SOURCES/webkitgtk-2.38.5.tar.xz
2f4d06b021115eb4106177f7d5f534f45b5d3b2e SOURCES/webkitgtk-2.40.5.tar.xz
cf57cbbadf2a07c6ede1c886f9742b7d352460c0 SOURCES/webkitgtk-keys.gpg

View File

@ -1,26 +1,14 @@
From ffe84688fc8a91b1e6d1c4462120fc44349a7c05 Mon Sep 17 00:00:00 2001
From: Michael Catanzaro <mcatanzaro@redhat.com>
Date: Thu, 27 Oct 2022 19:12:43 -0500
Subject: [PATCH] Force Evolution to use single secondary process
---
Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp b/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp
index 6bb6767869af..2a05a69d9b0d 100644
index a30f5b13be26..72ad006cde21 100644
--- a/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp
+++ b/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp
@@ -431,6 +431,9 @@ static void webkitWebContextConstructed(GObject* object)
@@ -438,6 +438,9 @@ static void webkitWebContextConstructed(GObject* object)
}
configuration.setTimeZoneOverride(String::fromUTF8(priv->timeZoneOverride.data(), priv->timeZoneOverride.length()));
+ if (!g_strcmp0(g_get_prgname(), "evolution"))
+ configuration.setUsesSingleWebProcess(true);
+
#if !ENABLE(2022_GLIB_API)
if (!priv->websiteDataManager)
priv->websiteDataManager = adoptGRef(webkit_website_data_manager_new("local-storage-directory", priv->localStorageDirectory.data(), nullptr));
--
2.31.1

19
SOURCES/glib-dep.patch Normal file
View File

@ -0,0 +1,19 @@
diff --git a/glib-dep.patch b/glib-dep.patch
new file mode 100644
index 0000000..dbc0ab6
--- /dev/null
+++ b/glib-dep.patch
@@ -0,0 +1,13 @@
+diff --git a/Source/WTF/wtf/glib/Sandbox.cpp b/Source/WTF/wtf/glib/Sandbox.cpp
+index 9b07bb8cb5a9b..a8169511fe851 100644
+--- a/Source/WTF/wtf/glib/Sandbox.cpp
++++ b/Source/WTF/wtf/glib/Sandbox.cpp
+@@ -58,7 +58,7 @@ bool isInsideUnsupportedContainer()
+ int waitStatus = 0;
+ gboolean spawnSucceeded = g_spawn_sync(nullptr, const_cast<char**>(bwrapArgs), nullptr,
+ G_SPAWN_STDERR_TO_DEV_NULL, nullptr, nullptr, nullptr, nullptr, &waitStatus, nullptr);
+- supportedContainer = spawnSucceeded && g_spawn_check_wait_status(waitStatus, nullptr);
++ supportedContainer = spawnSucceeded && g_spawn_check_exit_status(waitStatus, nullptr);
+ if (!supportedContainer)
+ WTFLogAlways("Bubblewrap does not work inside of this container, sandboxing will be disabled.");
+ }

View File

@ -0,0 +1,57 @@
diff --git a/Source/WebCore/platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp b/Source/WebCore/platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp
index a861b913ccfc..df21a1f67e98 100644
--- a/Source/WebCore/platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp
+++ b/Source/WebCore/platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp
@@ -88,7 +88,25 @@ static void webKitGLVideoSinkConstructed(GObject* object)
ASSERT(colorconvert);
gst_bin_add_many(GST_BIN_CAST(sink), upload, colorconvert, sink->priv->appSink.get(), nullptr);
- GRefPtr<GstCaps> caps = adoptGRef(gst_caps_from_string("video/x-raw, format = (string) " GST_GL_CAPS_FORMAT));
+ // Workaround until we can depend on GStreamer 1.16.2.
+ // https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/commit/8d32de090554cf29fe359f83aa46000ba658a693
+ // Forcing a color conversion to RGBA here allows glupload to internally use
+ // an uploader that adds a VideoMeta, through the TextureUploadMeta caps
+ // feature, without needing the patch above. However this specific caps
+ // feature is going to be removed from GStreamer so it is considered a
+ // short-term workaround. This code path most likely will have a negative
+ // performance impact on embedded platforms as well. Downstream embedders
+ // are highly encouraged to cherry-pick the patch linked above in their BSP
+ // and set the WEBKIT_GST_NO_RGBA_CONVERSION environment variable until
+ // GStreamer 1.16.2 is released.
+ // See also https://bugs.webkit.org/show_bug.cgi?id=201422
+ GRefPtr<GstCaps> caps;
+ if (webkitGstCheckVersion(1, 16, 2) || getenv("WEBKIT_GST_NO_RGBA_CONVERSION"))
+ caps = adoptGRef(gst_caps_from_string("video/x-raw, format = (string) " GST_GL_CAPS_FORMAT));
+ else {
+ GST_INFO_OBJECT(sink, "Forcing RGBA as GStreamer is not new enough.");
+ caps = adoptGRef(gst_caps_from_string("video/x-raw, format = (string) RGBA"));
+ }
gst_caps_set_features(caps.get(), 0, gst_caps_features_new(GST_CAPS_FEATURE_MEMORY_GL_MEMORY, nullptr));
g_object_set(sink->priv->appSink.get(), "caps", caps.get(), nullptr);
diff --git a/Source/cmake/GStreamerChecks.cmake b/Source/cmake/GStreamerChecks.cmake
index ba8423e2795c..df9d3204910d 100644
--- a/Source/cmake/GStreamerChecks.cmake
+++ b/Source/cmake/GStreamerChecks.cmake
@@ -36,7 +36,7 @@ if (ENABLE_VIDEO OR ENABLE_WEB_AUDIO)
list(APPEND GSTREAMER_COMPONENTS webrtc)
endif ()
- find_package(GStreamer 1.16.2 REQUIRED COMPONENTS ${GSTREAMER_COMPONENTS})
+ find_package(GStreamer 1.16.0 REQUIRED COMPONENTS ${GSTREAMER_COMPONENTS})
if (ENABLE_WEB_AUDIO)
if (NOT PC_GSTREAMER_AUDIO_FOUND OR NOT PC_GSTREAMER_FFT_FOUND)
diff --git a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
index 0b81e04559f0..4c6ae470e49f 100644
--- a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
+++ b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
@@ -479,7 +479,6 @@ bool MediaPlayerPrivateGStreamer::doSeek(const MediaTime& position, float rate)
auto seekStart = toGstClockTime(startTime);
auto seekStop = toGstClockTime(endTime);
- GST_DEBUG_OBJECT(pipeline(), "[Seek] Performing actual seek to %" GST_TIMEP_FORMAT " (endTime: %" GST_TIMEP_FORMAT ") at rate %f", &seekStart, &seekStop, rate);
return gst_element_seek(m_pipeline.get(), rate, GST_FORMAT_TIME, m_seekFlags, GST_SEEK_TYPE_SET, seekStart, GST_SEEK_TYPE_SET, seekStop);
}

View File

@ -1,17 +1,3 @@
From 833cfdd150b6f7f0fb021ac5de7890dff158f5fd Mon Sep 17 00:00:00 2001
From: Michael Catanzaro <mcatanzaro@redhat.com>
Date: Thu, 27 Oct 2022 16:32:43 -0500
Subject: [PATCH] Build against ICU 60
---
Source/JavaScriptCore/runtime/IntlCache.cpp | 3 +++
Source/JavaScriptCore/runtime/IntlCache.h | 3 +++
Source/JavaScriptCore/runtime/IntlDisplayNames.cpp | 11 +++++++++++
Source/JavaScriptCore/runtime/IntlDisplayNames.h | 7 +++++++
Source/JavaScriptCore/runtime/IntlObject.cpp | 6 +++++-
Source/cmake/OptionsGTK.cmake | 2 +-
6 files changed, 30 insertions(+), 2 deletions(-)
diff --git a/Source/JavaScriptCore/runtime/IntlCache.cpp b/Source/JavaScriptCore/runtime/IntlCache.cpp
index b17d7340df56..94a5474059b6 100644
--- a/Source/JavaScriptCore/runtime/IntlCache.cpp
@ -62,7 +48,7 @@ index 058b2423786d..e7a8c82f392b 100644
private:
UDateTimePatternGenerator* getSharedPatternGenerator(const CString& locale, UErrorCode& status)
diff --git a/Source/JavaScriptCore/runtime/IntlDisplayNames.cpp b/Source/JavaScriptCore/runtime/IntlDisplayNames.cpp
index c281f796eaee..1bc3c0c8a8c6 100644
index f38161e7f95b..068613ce8feb 100644
--- a/Source/JavaScriptCore/runtime/IntlDisplayNames.cpp
+++ b/Source/JavaScriptCore/runtime/IntlDisplayNames.cpp
@@ -110,6 +110,7 @@ void IntlDisplayNames::initializeDisplayNames(JSGlobalObject* globalObject, JSVa
@ -73,18 +59,20 @@ index c281f796eaee..1bc3c0c8a8c6 100644
UErrorCode status = U_ZERO_ERROR;
UDisplayContext contexts[] = {
@@ -137,6 +138,10 @@ void IntlDisplayNames::initializeDisplayNames(JSGlobalObject* globalObject, JSVa
@@ -137,15 +138,19 @@ void IntlDisplayNames::initializeDisplayNames(JSGlobalObject* globalObject, JSVa
throwTypeError(globalObject, scope, "failed to initialize DisplayNames"_s);
return;
}
+#else
+ throwTypeError(globalObject, scope, "failed to initialize Intl.DisplayNames since feature is not supported by the ICU version"_s);
+ return;
+ throwTypeError(globalObject, scope, "failed to initialize Intl.DisplayNames since feature is not supported by the ICU version"_s);
+ return;
+#endif
}
// https://tc39.es/proposal-intl-displaynames/#sec-Intl.DisplayNames.prototype.of
@@ -146,6 +151,7 @@ JSValue IntlDisplayNames::of(JSGlobalObject* globalObject, JSValue codeValue) co
JSValue IntlDisplayNames::of(JSGlobalObject* globalObject, JSValue codeValue) const
{
-
VM& vm = globalObject->vm();
auto scope = DECLARE_THROW_SCOPE(vm);
@ -92,7 +80,7 @@ index c281f796eaee..1bc3c0c8a8c6 100644
ASSERT(m_displayNames);
auto code = codeValue.toWTFString(globalObject);
RETURN_IF_EXCEPTION(scope, { });
@@ -350,6 +356,11 @@ JSValue IntlDisplayNames::of(JSGlobalObject* globalObject, JSValue codeValue) co
@@ -350,6 +355,11 @@ JSValue IntlDisplayNames::of(JSGlobalObject* globalObject, JSValue codeValue) co
return throwTypeError(globalObject, scope, "Failed to query a display name."_s);
}
return jsString(vm, String(WTFMove(buffer)));
@ -123,18 +111,18 @@ index d80dc3d83a15..f2bf36275c79 100644
enum class RelevantExtensionKey : uint8_t;
diff --git a/Source/JavaScriptCore/runtime/IntlObject.cpp b/Source/JavaScriptCore/runtime/IntlObject.cpp
index f7dc4d578d77..a6ccbe1b9f74 100644
index 0080abf51be4..d23c7c021334 100644
--- a/Source/JavaScriptCore/runtime/IntlObject.cpp
+++ b/Source/JavaScriptCore/runtime/IntlObject.cpp
@@ -153,7 +153,6 @@ namespace JSC {
getCanonicalLocales intlObjectFuncGetCanonicalLocales DontEnum|Function 1
@@ -164,7 +164,6 @@ namespace JSC {
supportedValuesOf intlObjectFuncSupportedValuesOf DontEnum|Function 1
Collator createCollatorConstructor DontEnum|PropertyCallback
DateTimeFormat createDateTimeFormatConstructor DontEnum|PropertyCallback
- DisplayNames createDisplayNamesConstructor DontEnum|PropertyCallback
Locale createLocaleConstructor DontEnum|PropertyCallback
NumberFormat createNumberFormatConstructor DontEnum|PropertyCallback
PluralRules createPluralRulesConstructor DontEnum|PropertyCallback
@@ -239,6 +238,11 @@ void IntlObject::finishCreation(VM& vm, JSGlobalObject* globalObject)
@@ -252,6 +251,11 @@ void IntlObject::finishCreation(VM& vm, JSGlobalObject*)
Base::finishCreation(vm);
ASSERT(inherits(info()));
JSC_TO_STRING_TAG_WITHOUT_TRANSITION();
@ -144,21 +132,38 @@ index f7dc4d578d77..a6ccbe1b9f74 100644
+ UNUSED_PARAM(&createDisplayNamesConstructor);
+#endif
#if HAVE(ICU_U_LIST_FORMATTER)
putDirectWithoutTransition(vm, vm.propertyNames->ListFormat, createListFormatConstructor(vm, this), static_cast<unsigned>(PropertyAttribute::DontEnum));
#else
if (Options::useIntlDurationFormat())
putDirectWithoutTransition(vm, vm.propertyNames->DurationFormat, createDurationFormatConstructor(vm, this), static_cast<unsigned>(PropertyAttribute::DontEnum));
diff --git a/Source/cmake/OptionsGTK.cmake b/Source/cmake/OptionsGTK.cmake
index 5e653a9e0b5a..0977f2c49037 100644
index 8bd6ed347418..9d0a7e88b16a 100644
--- a/Source/cmake/OptionsGTK.cmake
+++ b/Source/cmake/OptionsGTK.cmake
@@ -19,7 +19,7 @@ find_package(Freetype 2.4.2 REQUIRED)
@@ -18,7 +18,7 @@ find_package(Fontconfig 2.8.0 REQUIRED)
find_package(Freetype 2.4.2 REQUIRED)
find_package(LibGcrypt 1.6.0 REQUIRED)
find_package(GLIB 2.56.4 REQUIRED COMPONENTS gio gio-unix gobject gthread gmodule)
find_package(HarfBuzz 0.9.18 REQUIRED COMPONENTS ICU)
-find_package(ICU 61.2 REQUIRED COMPONENTS data i18n uc)
+find_package(ICU 60.2 REQUIRED COMPONENTS data i18n uc)
+find_package(ICU 60 REQUIRED COMPONENTS data i18n uc)
find_package(JPEG REQUIRED)
find_package(LibEpoxy 1.4.0 REQUIRED)
find_package(LibXml2 2.8.0 REQUIRED)
find_package(PNG REQUIRED)
--
2.31.1
diff --git a/Source/JavaScriptCore/runtime/IntlDurationFormat.cpp b/Source/JavaScriptCore/runtime/IntlDurationFormat.cpp
index fdcaa71f2011..f6aa1b0e3def 100644
--- a/Source/JavaScriptCore/runtime/IntlDurationFormat.cpp
+++ b/Source/JavaScriptCore/runtime/IntlDurationFormat.cpp
@@ -41,7 +41,6 @@
#endif
#endif
#include <unicode/ulistformatter.h>
-#include <unicode/unumberformatter.h>
#include <unicode/ures.h>
#if HAVE(ICU_U_LIST_FORMATTER)
#define U_HIDE_DRAFT_API 1
@@ -49,6 +48,7 @@
#if HAVE(ICU_U_LIST_FORMATTER)
#include <unicode/uformattedvalue.h>
+#include <unicode/unumberformatter.h>
#endif
namespace JSC {

View File

@ -1,6 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iF0EABEDAB0WIQTX/PYc+aLeqzHYG9Pz0yLQ7EWCwwUCY+yu2QAKCRDz0yLQ7EWC
w7UkAKCS0EoptKZRn3/Z+WgGerHQEQXaFQCg51h2++dwb1bqVZ05Q1YtHmoT2gk=
=or/S
-----END PGP SIGNATURE-----

View File

@ -0,0 +1,6 @@
-----BEGIN PGP SIGNATURE-----
iF0EABEDAB0WIQTX/PYc+aLeqzHYG9Pz0yLQ7EWCwwUCZMjRYQAKCRDz0yLQ7EWC
wwPPAJ0XUmEmSr4IFQWpbDfPOR9keXY+lwCfVLyOFL8T55psriGN4vkxVZqq+EM=
=nGCs
-----END PGP SIGNATURE-----

View File

@ -6,7 +6,7 @@
cp -p %1 _license_files/$(echo '%1' | sed -e 's!/!.!g')
Name: webkit2gtk3
Version: 2.38.5
Version: 2.40.5
Release: 1%{?dist}
Summary: GTK Web content engine library
@ -25,16 +25,24 @@ Patch0: evolution-shared-secondary-process.patch
# https://bugs.webkit.org/show_bug.cgi?id=235367
Patch1: icu60.patch
# https://github.com/WebKit/WebKit/pull/14498
Patch2: glib-dep.patch
# Partial revert of https://github.com/WebKit/WebKit/pull/6087
Patch3: gstreamer-1.16.1.patch
BuildRequires: bison
BuildRequires: cmake
BuildRequires: flex
BuildRequires: gcc-c++
BuildRequires: gcc-toolset-13
BuildRequires: gettext
BuildRequires: git
BuildRequires: gperf
BuildRequires: hyphen-devel
BuildRequires: libatomic
BuildRequires: ninja-build
BuildRequires: openssl-devel
BuildRequires: perl(English)
BuildRequires: perl(FindBin)
BuildRequires: perl(JSON::PP)
@ -42,6 +50,8 @@ BuildRequires: python3
BuildRequires: ruby
BuildRequires: rubygem-json
BuildRequires: rubygems
BuildRequires: shadow-utils
BuildRequires: unifdef
BuildRequires: pkgconfig(atspi-2)
BuildRequires: pkgconfig(cairo)
@ -54,16 +64,19 @@ BuildRequires: pkgconfig(enchant-2)
%endif
BuildRequires: pkgconfig(fontconfig)
BuildRequires: pkgconfig(freetype2)
BuildRequires: pkgconfig(gbm)
BuildRequires: pkgconfig(gl)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(glesv2)
BuildRequires: pkgconfig(gobject-introspection-1.0)
BuildRequires: pkgconfig(gstreamer-1.0)
BuildRequires: pkgconfig(gstreamer-plugins-bad-1.0)
BuildRequires: pkgconfig(gstreamer-plugins-base-1.0)
BuildRequires: pkgconfig(gtk+-3.0)
BuildRequires: pkgconfig(harfbuzz)
BuildRequires: pkgconfig(icu-uc)
BuildRequires: pkgconfig(lcms2)
BuildRequires: pkgconfig(libdrm)
BuildRequires: pkgconfig(libjpeg)
BuildRequires: pkgconfig(libnotify)
BuildRequires: pkgconfig(libopenjp2)
@ -184,18 +197,26 @@ rm -rf Source/ThirdParty/qunit/
%global optflags %(echo %{optflags} | sed 's/-g /-g1 /')
%endif
# bmalloc and JIT are disabled on aarch64 only in RHEL because of the nonstandard
# page size that's causing problems there. WebKit's build system sets appropriate
# defaults for all other architectures, and all other distros except RHEL.
# The system GCC is too old to build WebKit, so use a GCC Toolset instead.
# This prints warnings complaining that it should not be used except in
# SCL scriplets, but I can't figure out any other way to make it work.
source scl_source enable gcc-toolset-13
# -DUSE_SYSTEM_MALLOC=ON is really bad for security, but libpas requires
# __atomic_compare_exchange_16 which does not seem to be available.
mkdir -p %{_target_platform}
pushd %{_target_platform}
%cmake \
-GNinja \
-DPORT=GTK \
-DCMAKE_BUILD_TYPE=Release \
-DUSE_SYSTEM_MALLOC=ON \
-DENABLE_JIT=OFF \
-DENABLE_BUBBLEWRAP_SANDBOX=OFF \
-DUSE_SOUP2=ON \
-DUSE_AVIF=OFF \
-DENABLE_DOCUMENTATION=OFF \
-DUSE_GSTREAMER_TRANSCODER=OFF \
-DENABLE_GAMEPAD=OFF \
%if 0%{?rhel}
%ifarch aarch64
@ -212,12 +233,11 @@ export NINJA_STATUS="[%f/%t][%e] "
%install
%ninja_install -C %{_target_platform}
%find_lang WebKit2GTK-4.0
%find_lang WebKitGTK-4.0
# Finally, copy over and rename various files for %%license inclusion
%add_to_license_files Source/JavaScriptCore/COPYING.LIB
%add_to_license_files Source/ThirdParty/ANGLE/LICENSE
%add_to_license_files Source/ThirdParty/ANGLE/src/common/third_party/smhasher/LICENSE
%add_to_license_files Source/ThirdParty/ANGLE/src/third_party/libXNVCtrl/LICENSE
%add_to_license_files Source/WebCore/LICENSE-APPLE
%add_to_license_files Source/WebCore/LICENSE-LGPL-2
@ -229,7 +249,7 @@ export NINJA_STATUS="[%f/%t][%e] "
%add_to_license_files Source/WTF/wtf/dtoa/COPYING
%add_to_license_files Source/WTF/wtf/dtoa/LICENSE
%files -f WebKit2GTK-4.0.lang
%files -f WebKitGTK-4.0.lang
%license _license_files/*ThirdParty*
%license _license_files/*WebCore*
%license _license_files/*WebInspectorUI*
@ -273,6 +293,34 @@ export NINJA_STATUS="[%f/%t][%e] "
%{_datadir}/gir-1.0/JavaScriptCore-4.0.gir
%changelog
* Tue Aug 01 2023 Michael Catanzaro <mcatanzaro@redhat.com> - 2.40.5-1
- Upgrade to 2.40.5. Also, disable JIT
Resolves: #2176269
Resolves: #2185742
Resolves: #2209728
Resolves: #2209745
Resolves: #2218649
Resolves: #2218651
Resolves: #2224611
* Thu May 25 2023 Michael Catanzaro <mcatanzaro@redhat.com> - 2.38.5-1.4
- Add patch for CVE-2023-28204
Resolves: #2209744
- Add patch for CVE-2023-32373
Resolves: #2209727
* Fri Apr 14 2023 Michael Catanzaro <mcatanzaro@redhat.com> - 2.38.5-1.3
- Restore libwpe and wpebackend-fdo dependencies
Related: #2185741 (sort of)
* Wed Apr 12 2023 Michael Catanzaro <mcatanzaro@redhat.com> - 2.38.5-1.2
- Disable libwpe and wpebackend-fdo dependencies
Related: #2185741 (sort of)
* Tue Apr 11 2023 Michael Catanzaro <mcatanzaro@redhat.com> - 2.38.5-1.1
- Add patch for CVE-2023-28205
Resolves: #2185741
* Wed Feb 15 2023 Michael Catanzaro <mcatanzaro@redhat.com> - 2.38.5-1
- Update to 2.38.5
Related: #2127468