From patchwork Fri Mar 23 18:59:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Adrian Perez de Castro X-Patchwork-Id: 890151 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=igalia.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=igalia.com header.i=@igalia.com header.b="gInBCr8y"; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 407CXj03NXz9s0b for ; Sat, 24 Mar 2018 06:00:20 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 68CCF899A4; Fri, 23 Mar 2018 19:00:19 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PPwH9n+RUYzd; Fri, 23 Mar 2018 19:00:17 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id C65EC899A7; Fri, 23 Mar 2018 19:00:17 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 8BC2F1CF07A for ; Fri, 23 Mar 2018 19:00:11 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 89459888A2 for ; Fri, 23 Mar 2018 19:00:11 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id D-Nl3zZlq7m5 for ; Fri, 23 Mar 2018 19:00:09 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from fanzine.igalia.com (fanzine.igalia.com [91.117.99.155]) by fraxinus.osuosl.org (Postfix) with ESMTPS id E6591888AB for ; Fri, 23 Mar 2018 19:00:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=D8ZKjyCI4xj57TTPC1qwrE8a4nxksXtYxS77wg5UxOo=; b=gInBCr8yG2GUBzrWblH4E7+FO+ZcKnEp5FXwFN5c50FeBR93+xCF5XTN6OLig61pMNyeeUgNUkHk+o7AnZDa6HK4QW578S8ePpVw/0CFURpRPI57uo71oYxfpcHLXzlvhETwPGcJ4mcN5A9zvMhQG9TIHHf63TJYe0Uo2pZYWTmbRP97EtqQdjen3BtXQUmG/ptffxRI4Pombh6ZnFnfViS1WkTccjRfc0FcCVkNRPgisp7+8g8FkKmsUvXWHPmph4mO1Xo4s/tJU2s28+R5o7pGV27LJIldIWb+sq++OgMBDGDttrNN0PIwiDZTyhUrg8+ISZl9eDecWM9yAVIvMQ==; Received: from [194.100.51.2] (helo=kodama) by fanzine.igalia.com with esmtpsa (Cipher TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim) id 1ezRv3-0000f4-Kj; Fri, 23 Mar 2018 20:00:05 +0100 Received: from localhost (kodama [local]) by kodama (OpenSMTPD) with ESMTPA id d20e2735; Fri, 23 Mar 2018 18:59:42 +0000 (UTC) From: Adrian Perez de Castro To: buildroot@buildroot.org Date: Fri, 23 Mar 2018 20:59:40 +0200 Message-Id: <20180323185942.60252-3-aperez@igalia.com> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180323185942.60252-1-aperez@igalia.com> References: <20180323185942.60252-1-aperez@igalia.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v2/next 2/4] woff2: new package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Adrian Perez de Castro Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Add the woff2 package to Builroot. This is needed by webkitgtk from version 2.20.0 onwards. WebKitGTK+ used to bundle a copy of the library, but it stopped doing so now that the upstream is has been making releases. Signed-off-by: Adrian Perez de Castro --- DEVELOPERS | 1 + package/Config.in | 1 + package/woff2/Config.in | 9 +++++++++ package/woff2/woff2.hash | 5 +++++ package/woff2/woff2.mk | 17 +++++++++++++++++ 5 files changed, 33 insertions(+) create mode 100644 package/woff2/Config.in create mode 100644 package/woff2/woff2.hash create mode 100644 package/woff2/woff2.mk diff --git a/DEVELOPERS b/DEVELOPERS index 2d5f2108a8..031af3cdd0 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -65,6 +65,7 @@ N: Adrian Perez de Castro F: package/brotli/ F: package/libepoxy/ F: package/webkitgtk/ +F: package/woff2/ N: Adrien Gallouët F: package/glorytun/ diff --git a/package/Config.in b/package/Config.in index 26ded5ebb2..ae5a09bd5b 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1186,6 +1186,7 @@ menu "Graphics" source "package/waylandpp/Config.in" source "package/webkitgtk/Config.in" source "package/webp/Config.in" + source "package/woff2/Config.in" source "package/zbar/Config.in" source "package/zxing-cpp/Config.in" endmenu diff --git a/package/woff2/Config.in b/package/woff2/Config.in new file mode 100644 index 0000000000..48672570dd --- /dev/null +++ b/package/woff2/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_WOFF2 + bool "woff2" + depends on BR2_INSTALL_LIBSTDCPP + select BR2_PACKAGE_BROTLI + help + Reference implementation for the WOFF2 font file format, + typically used for Web fonts + + https://github.com/google/woff2 diff --git a/package/woff2/woff2.hash b/package/woff2/woff2.hash new file mode 100644 index 0000000000..2e9b62bde1 --- /dev/null +++ b/package/woff2/woff2.hash @@ -0,0 +1,5 @@ +# Locally generated: +sha512 c788bba1530aec463e755e901f9342f4b599e3a07f54645fef1dc388ab5d5c30625535e5dd38e9e792e04a640574baa50eeefb6b7338ab403755f4a4e0c3044d v1.0.2.tar.gz + +# Hash for license files: +sha512 16d7a62757f9854cd0ff9750eb0b374a1360deded0ba1646fde430f79a8f7c36a85f4884faaf1ea90db02537cd8d8c314cfcbcf492be25af24e1e77aa5919ebb LICENSE diff --git a/package/woff2/woff2.mk b/package/woff2/woff2.mk new file mode 100644 index 0000000000..23b88a5e9a --- /dev/null +++ b/package/woff2/woff2.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# woff2 +# +################################################################################ + +WOFF2_VERSION = 1.0.2 +WOFF2_SOURCE = v$(WOFF2_VERSION).tar.gz +WOFF2_SITE = https://github.com/google/woff2/archive +WOFF2_LICENSE = MIT +WOFF2_LICENSE_FILES = LICENSE +WOFF2_INSTALL_STAGING = YES +WOFF2_DEPENDENCIES = brotli +WOFF2_CONF_OPTS = \ + -DNOISY_LOGGING=OFF + +$(eval $(cmake-package)) From patchwork Fri Mar 23 18:59:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Perez de Castro X-Patchwork-Id: 890150 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=igalia.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=igalia.com header.i=@igalia.com header.b="rmcu7dk/"; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 407CXb4FF5z9s0b for ; Sat, 24 Mar 2018 06:00:15 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id CF390888B8; Fri, 23 Mar 2018 19:00:13 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dDRRhWhUNis6; Fri, 23 Mar 2018 19:00:12 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 1E197888AD; Fri, 23 Mar 2018 19:00:12 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id D21671CF0E5 for ; Fri, 23 Mar 2018 19:00:09 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id CC48C8A546 for ; Fri, 23 Mar 2018 19:00:09 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id m5sx0B6UZbbr for ; Fri, 23 Mar 2018 19:00:07 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from fanzine.igalia.com (fanzine.igalia.com [91.117.99.155]) by hemlock.osuosl.org (Postfix) with ESMTPS id A42258A547 for ; Fri, 23 Mar 2018 19:00:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=XYuUU8b3HNVSUAyTAI4mDVEzcEIDyp7NZ7cuz3r2Dk8=; b=rmcu7dk/U255/haeB4/tY+VT9DnoKx12Ql0J+zbgkUiVi+U8lEzBd/zDn73PL/co0cGf+fyiZXLzqpJBG1NmTeCfVP6Te7GaMzERFU49hqEKQ7P69XlBOZNRl5uNpd17QvtjDC/TVY3HFau/09CI+Yl4Wd91WJ8/mKPptQ1wnSHRuCPhFxLT1ceK8bv8rAKOwI9gGhlabX4zjXmsYp0WRw2CUL+BhjgrLy24WfgxOawTvNI2uqPopWT2RJkKMfB5Kz1sb9FEcl4AQ5dfYIN1FEWCVOkvN1xqLjN6vvp5vuA2orqDodXgKMSEKEt0zzIyXqbAnQiK0pQpOwudNOQikg==; Received: from [194.100.51.2] (helo=kodama) by fanzine.igalia.com with esmtpsa (Cipher TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim) id 1ezRv3-0000ef-P1; Fri, 23 Mar 2018 20:00:05 +0100 Received: from localhost (kodama [local]) by kodama (OpenSMTPD) with ESMTPA id fe2955b8; Fri, 23 Mar 2018 18:59:42 +0000 (UTC) From: Adrian Perez de Castro To: buildroot@buildroot.org Date: Fri, 23 Mar 2018 20:59:41 +0200 Message-Id: <20180323185942.60252-4-aperez@igalia.com> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180323185942.60252-1-aperez@igalia.com> References: <20180323185942.60252-1-aperez@igalia.com> Subject: [Buildroot] [PATCH v2/next 3/4] webkitgtk: update to version 2.20.0 X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Adrian Perez de Castro MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Release notes: https://webkitgtk.org/2018/03/12/webkitgtk2.20.0-released.html No corresponding WebKit Security Advisory (WSA) has been published for now. This also adds a dependency on the woff2 package. In previous versions WebKitGTK+ bundled a known-to-work snapshot of its Git repository due to upstream not providing releases. The situation has changed and releases are now available, and the bundled copy of woff2 has been removed. Last but not least, this patch selects BR2_PACKAGE_WEBP_DEMUX, which is now required. Signed-off-by: Adrian Perez de Castro --- Changes v1 -> v2: - Marked as supported on AArch64, which is officially supported upstream. - Add upstream patch for fixing build failure with multimedia/XSLT support disabled. --- ...ld-failure-when-ENABLE_VIDEO-ENABLE_WEB_A.patch | 32 ++++++++++++++++++++++ package/webkitgtk/Config.in | 3 ++ package/webkitgtk/webkitgtk.hash | 8 +++--- package/webkitgtk/webkitgtk.mk | 4 +-- 4 files changed, 41 insertions(+), 6 deletions(-) create mode 100644 package/webkitgtk/0002-WPE-GTK-Build-failure-when-ENABLE_VIDEO-ENABLE_WEB_A.patch diff --git a/package/webkitgtk/0002-WPE-GTK-Build-failure-when-ENABLE_VIDEO-ENABLE_WEB_A.patch b/package/webkitgtk/0002-WPE-GTK-Build-failure-when-ENABLE_VIDEO-ENABLE_WEB_A.patch new file mode 100644 index 0000000000..2c69fa89ae --- /dev/null +++ b/package/webkitgtk/0002-WPE-GTK-Build-failure-when-ENABLE_VIDEO-ENABLE_WEB_A.patch @@ -0,0 +1,32 @@ +From ecfba9336863c2dad22c9ad1dfd1f6ea1801ccdb Mon Sep 17 00:00:00 2001 +From: "aperez@igalia.com" + +Date: Thu, 22 Mar 2018 13:48:34 +0000 +Subject: [PATCH xserver 2/2] [WPE][GTK] Build failure when ENABLE_VIDEO, + ENABLE_WEB_AUDIO and ENABLE_XSLT are disabled + https://bugs.webkit.org/show_bug.cgi?id=183896 + +Reviewed by Yusuke Suzuki. + +No new tests needed. + +* bindings/js/JSWebAnimationCustom.cpp: Add missing #include of Document.h + +Signed-off-by: Adrian Perez de Castro +Upstream-Status: Committed + +diff --git a/Source/WebCore/bindings/js/JSWebAnimationCustom.cpp b/Source/WebCore/bindings/js/JSWebAnimationCustom.cpp +index 8b56f86c151..b8716be0f1c 100644 +--- a/Source/WebCore/bindings/js/JSWebAnimationCustom.cpp ++++ b/Source/WebCore/bindings/js/JSWebAnimationCustom.cpp +@@ -26,6 +26,7 @@ + #include "config.h" + #include "JSWebAnimation.h" + ++#include "Document.h" + #include "JSAnimationEffect.h" + #include "JSAnimationTimeline.h" + #include "JSDOMConstructor.h" +-- +2.16.2 + diff --git a/package/webkitgtk/Config.in b/package/webkitgtk/Config.in index 31794ed2a4..99755d8d69 100644 --- a/package/webkitgtk/Config.in +++ b/package/webkitgtk/Config.in @@ -2,6 +2,7 @@ config BR2_PACKAGE_WEBKITGTK_ARCH_SUPPORTS bool # ARM needs BLX, so v5t+, BE completely untested so disabled default y if BR2_arm && !BR2_ARM_CPU_ARMV4 + default y if BR2_aarch64 default y if BR2_i386 || BR2_x86_64 # Disabled on MIPS big endian due to sigbus default y if BR2_mipsel || BR2_mips64el @@ -41,6 +42,8 @@ config BR2_PACKAGE_WEBKITGTK select BR2_PACKAGE_LIBXSLT select BR2_PACKAGE_SQLITE select BR2_PACKAGE_WEBP + select BR2_PACKAGE_WEBP_DEMUX + select BR2_PACKAGE_WOFF2 select BR2_PACKAGE_XLIB_LIBXCOMPOSITE if BR2_PACKAGE_LIBGTK3_X11 select BR2_PACKAGE_XLIB_LIBXDAMAGE if BR2_PACKAGE_LIBGTK3_X11 select BR2_PACKAGE_XLIB_LIBXRENDER if BR2_PACKAGE_LIBGTK3_X11 diff --git a/package/webkitgtk/webkitgtk.hash b/package/webkitgtk/webkitgtk.hash index dd2b28d372..28468a5297 100644 --- a/package/webkitgtk/webkitgtk.hash +++ b/package/webkitgtk/webkitgtk.hash @@ -1,7 +1,7 @@ -# From https://webkitgtk.org/releases/webkitgtk-2.18.6.tar.xz.sums -md5 c1a548595135ee75ad3bf2e18ac83112 webkitgtk-2.18.6.tar.xz -sha1 fb0daa85142cfe8822de518dfaa7bd5c3cdd6c23 webkitgtk-2.18.6.tar.xz -sha256 93912cc2f40f12e452be1ca4babdbdaac0ec4f828d441257a6b06c2963bbac3c webkitgtk-2.18.6.tar.xz +# From https://webkitgtk.org/releases/webkitgtk-2.20.0.tar.xz.sums +md5 51cc47345c3ec53802718cd6fc9b746f webkitgtk-2.20.0.tar.xz +sha1 f1e021318f06085fff5455667459bf26716d610f webkitgtk-2.20.0.tar.xz +sha256 57f640f720bd9a8a7207f3321cf803a15c2f207b4e7b75ff1be17bc1eeb00a3c webkitgtk-2.20.20.tar.xz # Hashes for license files: sha256 0b5d3a7cc325942567373b0ecd757d07c132e0ebd7c97bfc63f7e1a76094edb4 Source/WebCore/LICENSE-APPLE diff --git a/package/webkitgtk/webkitgtk.mk b/package/webkitgtk/webkitgtk.mk index eb39664b1e..e27f970104 100644 --- a/package/webkitgtk/webkitgtk.mk +++ b/package/webkitgtk/webkitgtk.mk @@ -4,7 +4,7 @@ # ################################################################################ -WEBKITGTK_VERSION = 2.18.6 +WEBKITGTK_VERSION = 2.20.0 WEBKITGTK_SITE = http://www.webkitgtk.org/releases WEBKITGTK_SOURCE = webkitgtk-$(WEBKITGTK_VERSION).tar.xz WEBKITGTK_INSTALL_STAGING = YES @@ -14,7 +14,7 @@ WEBKITGTK_LICENSE_FILES = \ Source/WebCore/LICENSE-LGPL-2.1 WEBKITGTK_DEPENDENCIES = host-ruby host-flex host-bison host-gperf \ enchant harfbuzz icu jpeg libgcrypt libgtk3 libsecret libsoup \ - libtasn1 libxml2 libxslt sqlite webp + libtasn1 libxml2 libxslt sqlite webp woff2 WEBKITGTK_CONF_OPTS = \ -DENABLE_API_TESTS=OFF \ -DENABLE_GEOLOCATION=OFF \ From patchwork Fri Mar 23 18:59:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Perez de Castro X-Patchwork-Id: 890153 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=igalia.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=igalia.com header.i=@igalia.com header.b="I+CpSIdV"; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 407CXr2BQ1z9s0b for ; Sat, 24 Mar 2018 06:00:28 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 5C3188A546; Fri, 23 Mar 2018 19:00:20 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BTSu96wD4QVq; Fri, 23 Mar 2018 19:00:18 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id AA2468A548; Fri, 23 Mar 2018 19:00:18 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 89B921CF0D4 for ; Fri, 23 Mar 2018 19:00:12 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 8462C899B9 for ; Fri, 23 Mar 2018 19:00:12 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WuKMKOKx5QWQ for ; Fri, 23 Mar 2018 19:00:11 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from fanzine.igalia.com (fanzine.igalia.com [91.117.99.155]) by whitealder.osuosl.org (Postfix) with ESMTPS id 2697D89995 for ; Fri, 23 Mar 2018 19:00:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=PPPDhhWdHYF3CRKzJOzdInMaaggwCoAkABSYo3yTmlE=; b=I+CpSIdVGLmoo4KBZlo0eK3ysQqs2a9jX2FJ+BM4XrYy93RfIt/EOdc14Ne5FbCYtccjuidZNT+dp45ufbsom2kO36nOZD56o8mUGN/bZQHKAkFinQr9rljRj3BPzuo/Hcacqj8xg8kCfH5d1SO09ZyBGgeogBr6eBSXoW8BqpNJSdqWUQQjYTE8wwcrkOpdapxVd2ru7JBdQtvDZr1WSUFW1qGySgV9Y/boUBMRcVE9jpZBXPUefgCIG7aqgzRFwyR8u/Ar2rWi92kieYpPrdB8olscaO6wOG1gLonLrk8icN2Jtv25D8Eb+W8zOxIhdIwcGHb91iDUbkcvN5yEMQ==; Received: from [194.100.51.2] (helo=kodama) by fanzine.igalia.com with esmtpsa (Cipher TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim) id 1ezRv7-0000f4-7q; Fri, 23 Mar 2018 20:00:09 +0100 Received: from localhost (kodama [local]) by kodama (OpenSMTPD) with ESMTPA id 14cf945d; Fri, 23 Mar 2018 18:59:42 +0000 (UTC) From: Adrian Perez de Castro To: buildroot@buildroot.org Date: Fri, 23 Mar 2018 20:59:42 +0200 Message-Id: <20180323185942.60252-5-aperez@igalia.com> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180323185942.60252-1-aperez@igalia.com> References: <20180323185942.60252-1-aperez@igalia.com> Subject: [Buildroot] [PATCH v2/next 4/4] webkitgtk: Add upstream patch for better memory monitoring X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Adrian Perez de Castro MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" This imports a patch which has been committed upstream, but is not part of the 2.20.0 release which modifies WebKitGTK+'s memory monitor to take into account the available memory when calculating the thresholds at which the Web engine will try to return memory back to the system. The net result is that on constrained systems WebKitGTK+ will try to free memory it does not need more often. Signed-off-by: Adrian Perez de Castro --- ...memory-monitor-thresholds-should-be-bette.patch | 93 ++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 package/webkitgtk/0001-WebProcess-memory-monitor-thresholds-should-be-bette.patch diff --git a/package/webkitgtk/0001-WebProcess-memory-monitor-thresholds-should-be-bette.patch b/package/webkitgtk/0001-WebProcess-memory-monitor-thresholds-should-be-bette.patch new file mode 100644 index 0000000000..9848ec8526 --- /dev/null +++ b/package/webkitgtk/0001-WebProcess-memory-monitor-thresholds-should-be-bette.patch @@ -0,0 +1,93 @@ +From 25fe9c19e4fb3519e34df7e16b3d761812b921aa Mon Sep 17 00:00:00 2001 +From: Adrian Perez de Castro +Date: Wed, 21 Mar 2018 01:05:53 +0200 +Subject: [PATCH xserver 1/2] WebProcess memory monitor thresholds should be + better tuned for embedded systems. + https://bugs.webkit.org/show_bug.cgi?id=183773 + +Patch by Carlos Alberto Lopez Perez on 2018-03-20 +Reviewed by NOBODY (OOPS!). + +Take into account the total system RAM for the thresholds calculation. + +For systems with more than 3GB the conservative and strict thresholds remain as they are, +but for systems with less RAM the thresholds are dynamically configured as follows: + +- Conservative threshold (release non critical memory) if WebProcess using more than 33% of the total RAM. +- Strict threshold (release all possible memory) if WebProcess using more than 50% of the total RAM. + +The Kill threshold is also modified. Now it is capped at 90% of the total RAM. + +* wtf/MemoryPressureHandler.cpp: +(WTF::thresholdForMemoryKillWithProcessState): +(WTF::thresholdForPolicy): +(WTF::MemoryPressureHandler::shrinkOrDie): + +Signed-off-by: Adrian Perez de Castro +Upstream-Status: Committed + +diff --git a/Source/WTF/wtf/MemoryPressureHandler.cpp b/Source/WTF/wtf/MemoryPressureHandler.cpp +index 0e1d1a60fe0..d31180883eb 100644 +--- a/Source/WTF/wtf/MemoryPressureHandler.cpp ++++ b/Source/WTF/wtf/MemoryPressureHandler.cpp +@@ -28,6 +28,7 @@ + + #include + #include ++#include + + #define LOG_CHANNEL_PREFIX Log + +@@ -84,20 +85,17 @@ static const char* toString(MemoryUsagePolicy policy) + + static size_t thresholdForMemoryKillWithProcessState(WebsamProcessState processState, unsigned tabCount) + { ++ size_t baseThreshold = 2 * GB; + #if CPU(X86_64) || CPU(ARM64) +- size_t baseThreshold; + if (processState == WebsamProcessState::Active) + baseThreshold = 4 * GB; +- else +- baseThreshold = 2 * GB; +- if (tabCount <= 1) +- return baseThreshold; +- return baseThreshold + (std::min(tabCount - 1, 4u) * 1 * GB); ++ if (tabCount > 1) ++ baseThreshold += std::min(tabCount - 1, 4u) * 1 * GB; + #else +- UNUSED_PARAM(processState); +- UNUSED_PARAM(tabCount); +- return 3 * GB; ++ if ((tabCount > 1) || (processState == WebsamProcessState::Active)) ++ baseThreshold = 3 * GB; + #endif ++ return std::min(baseThreshold, static_cast(ramSize() * 0.9)); + } + + void MemoryPressureHandler::setPageCount(unsigned pageCount) +@@ -114,11 +112,12 @@ size_t MemoryPressureHandler::thresholdForMemoryKill() + + static size_t thresholdForPolicy(MemoryUsagePolicy policy) + { ++ const size_t baseThresholdForPolicy = std::min(3 * GB, ramSize()); + switch (policy) { + case MemoryUsagePolicy::Conservative: +- return 1 * GB; ++ return baseThresholdForPolicy / 3; + case MemoryUsagePolicy::Strict: +- return 1.5 * GB; ++ return baseThresholdForPolicy / 2; + case MemoryUsagePolicy::Unrestricted: + default: + ASSERT_NOT_REACHED(); +@@ -150,6 +149,7 @@ void MemoryPressureHandler::shrinkOrDie() + return; + } + ++ WTFLogAlways("Unable to shrink memory footprint of process (%lu MB) below the kill thresold (%lu MB). Killed\n", footprint.value() / MB, thresholdForMemoryKill() / MB); + RELEASE_ASSERT(m_memoryKillCallback); + m_memoryKillCallback(); + } +-- +2.16.2 +