From b540e6fe0c82e32bd9a22d4ab5209fbc59f7e958 Mon Sep 17 00:00:00 2001 From: Carlos Alberto Lopez Perez Date: Fri, 12 May 2023 03:59:48 +0200 Subject: [PATCH] xdg-dbus-proxy, bubblewrap: update recipes and fix build with webkit (#478) * Update recipes for xdg-dbus-proxy and bubblewrap and also remove the patches already merged (checked). * Pass the run-time paths to the wpewebkit and webkitgtk recipe which is needed when cross-building since https://commits.webkit.org/264244@main * Remove also the native recipes which are not needed for anything. --- README.md | 7 ---- recipes-browser/webkitgtk/webkitgtk_2.38.6.bb | 2 +- recipes-browser/webkitgtk/webkitgtk_2.40.3.bb | 2 +- recipes-browser/wpewebkit/wpewebkit.inc | 2 +- .../bubblewrap/bubblewrap_0.4.1.bb | 20 ----------- .../bubblewrap/bubblewrap_0.8.0.bb | 16 +++++++++ .../xdg-dbus-proxy/0001-Call-setlocale.patch | 36 ------------------- ...ilation-by-adding-TEMP_FAILURE_RETRY.patch | 27 -------------- .../xdg-dbus-proxy/xdg-dbus-proxy_0.1.2.bb | 16 --------- .../xdg-dbus-proxy/xdg-dbus-proxy_0.1.4.bb | 12 +++++++ 10 files changed, 31 insertions(+), 109 deletions(-) delete mode 100644 recipes-flatpak/bubblewrap/bubblewrap_0.4.1.bb create mode 100644 recipes-flatpak/bubblewrap/bubblewrap_0.8.0.bb delete mode 100644 recipes-flatpak/xdg-dbus-proxy/xdg-dbus-proxy/0001-Call-setlocale.patch delete mode 100644 recipes-flatpak/xdg-dbus-proxy/xdg-dbus-proxy/0001-Fix-musl-compilation-by-adding-TEMP_FAILURE_RETRY.patch delete mode 100644 recipes-flatpak/xdg-dbus-proxy/xdg-dbus-proxy_0.1.2.bb create mode 100644 recipes-flatpak/xdg-dbus-proxy/xdg-dbus-proxy_0.1.4.bb diff --git a/README.md b/README.md index 1cf03854..aac8d2d8 100644 --- a/README.md +++ b/README.md @@ -23,13 +23,6 @@ This layer optionally depends on: If meta-qt5 is present, this layer will provide an opt-in Qt5 API as an alternative to other Qt5 web-engines such as QtWebKit and QtWebEngine. -This layer also optionally depends on meta-security to enable web process -sandboxing for WebKit (`bubblewrap`): - - URI: git://git.yoctoproject.org/meta-security - branch: main - revision: HEAD - **Warning**: The default branch has been renamed to `main` because [#219](https://github.com/Igalia/meta-webkit/issues/219). The old default branch (`master`) will still be kept as a mirror of the `main` until February diff --git a/recipes-browser/webkitgtk/webkitgtk_2.38.6.bb b/recipes-browser/webkitgtk/webkitgtk_2.38.6.bb index 3be8fea2..ff8a0132 100644 --- a/recipes-browser/webkitgtk/webkitgtk_2.38.6.bb +++ b/recipes-browser/webkitgtk/webkitgtk_2.38.6.bb @@ -50,7 +50,7 @@ PACKAGECONFIG ??= " ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d) " PACKAGECONFIG[reduce-size] = "-DCMAKE_BUILD_TYPE=MinSizeRel,-DCMAKE_BUILD_TYPE=Release,," -PACKAGECONFIG[bubblewrap] = "-DENABLE_BUBBLEWRAP_SANDBOX=ON,-DENABLE_BUBBLEWRAP_SANDBOX=OFF,bubblewrap xdg-dbus-proxy bubblewrap-native xdg-dbus-proxy-native libseccomp" +PACKAGECONFIG[bubblewrap] = "-DENABLE_BUBBLEWRAP_SANDBOX=ON -DBWRAP_EXECUTABLE=${bindir}/bwrap -DDBUS_PROXY_EXECUTABLE=${bindir}/xdg-dbus-proxy,-DENABLE_BUBBLEWRAP_SANDBOX=OFF,bubblewrap xdg-dbus-proxy libseccomp" PACKAGECONFIG[enchant] = "-DENABLE_SPELLCHECK=ON,-DENABLE_SPELLCHECK=OFF,enchant2" PACKAGECONFIG[gamepad] = "-DENABLE_GAMEPAD=ON,-DENABLE_GAMEPAD=OFF,libmanette" PACKAGECONFIG[geoclue] = "-DENABLE_GEOLOCATION=ON,-DENABLE_GEOLOCATION=OFF,geoclue" diff --git a/recipes-browser/webkitgtk/webkitgtk_2.40.3.bb b/recipes-browser/webkitgtk/webkitgtk_2.40.3.bb index d507c031..9ce04dda 100644 --- a/recipes-browser/webkitgtk/webkitgtk_2.40.3.bb +++ b/recipes-browser/webkitgtk/webkitgtk_2.40.3.bb @@ -53,7 +53,7 @@ PACKAGECONFIG ??= " ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d) " PACKAGECONFIG[reduce-size] = "-DCMAKE_BUILD_TYPE=MinSizeRel,-DCMAKE_BUILD_TYPE=Release,," -PACKAGECONFIG[bubblewrap] = "-DENABLE_BUBBLEWRAP_SANDBOX=ON,-DENABLE_BUBBLEWRAP_SANDBOX=OFF,bubblewrap xdg-dbus-proxy bubblewrap-native xdg-dbus-proxy-native libseccomp" +PACKAGECONFIG[bubblewrap] = "-DENABLE_BUBBLEWRAP_SANDBOX=ON -DBWRAP_EXECUTABLE=${bindir}/bwrap -DDBUS_PROXY_EXECUTABLE=${bindir}/xdg-dbus-proxy,-DENABLE_BUBBLEWRAP_SANDBOX=OFF,bubblewrap xdg-dbus-proxy libseccomp" PACKAGECONFIG[enchant] = "-DENABLE_SPELLCHECK=ON,-DENABLE_SPELLCHECK=OFF,enchant2" PACKAGECONFIG[gamepad] = "-DENABLE_GAMEPAD=ON,-DENABLE_GAMEPAD=OFF,libmanette" PACKAGECONFIG[gbm] = "-DUSE_GBM=ON,-DUSE_GBM=OFF,libdrm" diff --git a/recipes-browser/wpewebkit/wpewebkit.inc b/recipes-browser/wpewebkit/wpewebkit.inc index f492bb2f..56ca1f0b 100644 --- a/recipes-browser/wpewebkit/wpewebkit.inc +++ b/recipes-browser/wpewebkit/wpewebkit.inc @@ -70,7 +70,7 @@ PACKAGECONFIG[reduce-size] = "-DCMAKE_BUILD_TYPE=MinSizeRel,-DCMAKE_BUILD_TYPE=R # WPE features PACKAGECONFIG[accessibility] = "-DENABLE_ACCESSIBILITY=ON,-DENABLE_ACCESSIBILITY=OFF,atk at-spi2-atk" PACKAGECONFIG[avif] = "-DUSE_AVIF=ON,-DUSE_AVIF=OFF,libavif" -PACKAGECONFIG[bubblewrap] = "-DENABLE_BUBBLEWRAP_SANDBOX=ON,-DENABLE_BUBBLEWRAP_SANDBOX=OFF,bubblewrap xdg-dbus-proxy bubblewrap-native xdg-dbus-proxy-native libseccomp" +PACKAGECONFIG[bubblewrap] = "-DENABLE_BUBBLEWRAP_SANDBOX=ON -DBWRAP_EXECUTABLE=${bindir}/bwrap -DDBUS_PROXY_EXECUTABLE=${bindir}/xdg-dbus-proxy,-DENABLE_BUBBLEWRAP_SANDBOX=OFF,bubblewrap xdg-dbus-proxy libseccomp" PACKAGECONFIG[developer-mode] = "-DDEVELOPER_MODE=ON,-DDEVELOPER_MODE=OFF,wayland-native wayland-protocols wpebackend-fdo" PACKAGECONFIG[deviceorientation] = "-DENABLE_DEVICE_ORIENTATION=ON,-DENABLE_DEVICE_ORIENTATION=OFF," PACKAGECONFIG[dfg-jit] = "-DENABLE_DFG_JIT=ON,-DENABLE_DFG_JIT=OFF," diff --git a/recipes-flatpak/bubblewrap/bubblewrap_0.4.1.bb b/recipes-flatpak/bubblewrap/bubblewrap_0.4.1.bb deleted file mode 100644 index b924d50b..00000000 --- a/recipes-flatpak/bubblewrap/bubblewrap_0.4.1.bb +++ /dev/null @@ -1,20 +0,0 @@ -DESCRIPTION = "Helper binary for running applications sandboxed" -HOMEPAGE = "https://github.com/projectatomic/bubblewrap" -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2" - -DEPENDS = "libcap" - -SRC_URI = "https://github.com/projectatomic/${BPN}/releases/download/v${PV}/${BP}.tar.xz" -SRC_URI[sha256sum] = "b9c69b9b1c61a608f34325c8e1a495229bacf6e4a07cbb0c80cf7a814d7ccc03" - -inherit autotools pkgconfig systemd -AUTO_LIBNAME_PKGS = "" - -# possible package configurations -PACKAGECONFIG ??= "" - -EXTRA_OECONF:class-target += "--disable-man --without-bash-completion-dir" -EXTRA_OECONF:class-native += "--disable-man --without-bash-completion-dir" - -BBCLASSEXTEND = "native" diff --git a/recipes-flatpak/bubblewrap/bubblewrap_0.8.0.bb b/recipes-flatpak/bubblewrap/bubblewrap_0.8.0.bb new file mode 100644 index 00000000..09b2ee21 --- /dev/null +++ b/recipes-flatpak/bubblewrap/bubblewrap_0.8.0.bb @@ -0,0 +1,16 @@ +DESCRIPTION = "Helper binary for running applications sandboxed" +HOMEPAGE = "https://github.com/containers/bubblewrap" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2" + +DEPENDS = "libcap" + +SRC_URI = "https://github.com/containers/${BPN}/releases/download/v${PV}/${BP}.tar.xz" +SRC_URI[sha256sum] = "957ad1149db9033db88e988b12bcebe349a445e1efc8a9b59ad2939a113d333a" + +inherit meson pkgconfig + +PACKAGECONFIG ??= "" +PACKAGECONFIG[selinux] = "-Dselinux=enabled,-Dselinux=disabled,libselinux" + +EXTRA_OEMESON += "-Dman=disabled -Dbash_completion=disabled -Dzsh_completion=disabled -Dtests=false" diff --git a/recipes-flatpak/xdg-dbus-proxy/xdg-dbus-proxy/0001-Call-setlocale.patch b/recipes-flatpak/xdg-dbus-proxy/xdg-dbus-proxy/0001-Call-setlocale.patch deleted file mode 100644 index 9109faee..00000000 --- a/recipes-flatpak/xdg-dbus-proxy/xdg-dbus-proxy/0001-Call-setlocale.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 367f2d0247a878ccd0c220ef786ec0660d0557d4 Mon Sep 17 00:00:00 2001 -From: Michael Catanzaro -Date: Wed, 18 Sep 2019 13:09:18 -0500 -Subject: [PATCH] Call setlocale() - -To enable locales. This fixes UTF-8 characters being converted to ? -characters when printing error messages with e.g. g_warning(). ---- - dbus-proxy.c | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - ---- a/dbus-proxy.c -+++ b/dbus-proxy.c -@@ -28,6 +28,7 @@ - #include - #include - #include -+#include - - #include "flatpak-proxy.h" - -@@ -362,10 +363,13 @@ sync_closed_cb (GIOChannel *source, - int - main (int argc, const char *argv[]) - { -+ g_autoptr(GPtrArray) args = NULL; - GMainLoop *service_loop; - int i, args_i; - -- g_autoptr(GPtrArray) args = g_ptr_array_new_with_free_func (g_free); -+ setlocale (LC_ALL, ""); -+ -+ args = g_ptr_array_new_with_free_func (g_free); - - argv0 = argv[0]; - diff --git a/recipes-flatpak/xdg-dbus-proxy/xdg-dbus-proxy/0001-Fix-musl-compilation-by-adding-TEMP_FAILURE_RETRY.patch b/recipes-flatpak/xdg-dbus-proxy/xdg-dbus-proxy/0001-Fix-musl-compilation-by-adding-TEMP_FAILURE_RETRY.patch deleted file mode 100644 index 05fcd5f0..00000000 --- a/recipes-flatpak/xdg-dbus-proxy/xdg-dbus-proxy/0001-Fix-musl-compilation-by-adding-TEMP_FAILURE_RETRY.patch +++ /dev/null @@ -1,27 +0,0 @@ -From da9c2aee5ef666d1a033cfdd5a3e6b84ee70c51e Mon Sep 17 00:00:00 2001 -From: Danilo Spinella -Date: Sat, 7 Dec 2019 00:05:21 +0100 -Subject: [PATCH] Fix musl compilation by adding TEMP_FAILURE_RETRY - ---- - dbus-proxy.c | 9 +++++++++ - 1 file changed, 9 insertions(+) - ---- a/dbus-proxy.c -+++ b/dbus-proxy.c -@@ -31,6 +31,15 @@ - #include - - #include "flatpak-proxy.h" -+// Taken from glibc unistd.h -+#ifndef TEMP_FAILURE_RETRY -+# define TEMP_FAILURE_RETRY(expression) \ -+ (__extension__ \ -+ ({ long int __result; \ -+ do __result = (long int) (expression); \ -+ while (__result == -1L && errno == EINTR); \ -+ __result; })) -+#endif - - static const char *argv0; - static GList *proxies; diff --git a/recipes-flatpak/xdg-dbus-proxy/xdg-dbus-proxy_0.1.2.bb b/recipes-flatpak/xdg-dbus-proxy/xdg-dbus-proxy_0.1.2.bb deleted file mode 100644 index 6ceab2eb..00000000 --- a/recipes-flatpak/xdg-dbus-proxy/xdg-dbus-proxy_0.1.2.bb +++ /dev/null @@ -1,16 +0,0 @@ -HOMEPAGE = "https://github.com/flatpak/xdg-dbus-proxy" -LICENSE = "LGPL-2.1-or-later" -LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" - -SRC_URI = "https://github.com/flatpak/${BPN}/releases/download/${PV}/${BP}.tar.xz \ - file://0001-Call-setlocale.patch \ - file://0001-Fix-musl-compilation-by-adding-TEMP_FAILURE_RETRY.patch \ -" -SRC_URI[sha256sum] = "1749d6f9f46dcc9edc87725641cf56cf91dcad1b01707891ea0850c1000c520f" - -inherit autotools pkgconfig gobject-introspection - -EXTRA_OECONF:remove = "--enable-introspection" -EXTRA_OECONF:remove = "--disable-introspection" - -BBCLASSEXTEND = "native" diff --git a/recipes-flatpak/xdg-dbus-proxy/xdg-dbus-proxy_0.1.4.bb b/recipes-flatpak/xdg-dbus-proxy/xdg-dbus-proxy_0.1.4.bb new file mode 100644 index 00000000..289646bc --- /dev/null +++ b/recipes-flatpak/xdg-dbus-proxy/xdg-dbus-proxy_0.1.4.bb @@ -0,0 +1,12 @@ +HOMEPAGE = "https://github.com/flatpak/xdg-dbus-proxy" +LICENSE = "LGPL-2.1-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" + +DEPENDS = "glib-2.0" + +SRC_URI = "https://github.com/flatpak/${BPN}/releases/download/${PV}/${BP}.tar.xz" +SRC_URI[sha256sum] = "1ec0eab53d1e49966d722352bcfd51ac402dce5190baedc749a8541e761670ab" + +inherit meson pkgconfig + +EXTRA_OEMESON += "-Dman=disabled -Dtests=false"