All of lore.kernel.org
 help / color / mirror / Atom feed
* [OE-core][PATCH] webkitgtk: Add packageconfig for libsoup2
@ 2021-12-09 20:44 Joshua Watt
  2021-12-09 21:00 ` Khem Raj
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Joshua Watt @ 2021-12-09 20:44 UTC (permalink / raw)
  To: openembedded-core; +Cc: Joshua Watt

Adds a PACKAGECONFIG option to use libsoup2 instead of libsoup3.
Including libsoup2 and libsoup3 in the same process can cause strange
runtime failures, and the latest release of each major version will
cause the process to exit if either if both are detected on process
startup.

The default is changed from libsoup3 back to libsoup2. Most GNOME
packages are still using libsoup2, and a large number of these pull in
webkitgtk either directly or indirectly. If webkitgtk uses libsoup3,
this causes all of these packages to fail at startup. It appears that
most GNOME packages will have to switch to libsoup3 when they transition
to GTK4.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
---
 meta/recipes-sato/webkit/webkitgtk_2.34.2.bb | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-sato/webkit/webkitgtk_2.34.2.bb b/meta/recipes-sato/webkit/webkitgtk_2.34.2.bb
index 413e0cdf92..279e260441 100644
--- a/meta/recipes-sato/webkit/webkitgtk_2.34.2.bb
+++ b/meta/recipes-sato/webkit/webkitgtk_2.34.2.bb
@@ -38,12 +38,12 @@ DEPENDS = " \
           atk \
           libwebp \
           gtk+3 \
-          libsoup \
           libxslt \
           libtasn1 \
           libnotify \
           gstreamer1.0 \
           gstreamer1.0-plugins-base \
+          ${@bb.utils.contains("PACKAGECONFIG", "soup2", "libsoup-2.4", "libsoup", d)} \
           "
 
 PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd wayland x11', d)} \
@@ -52,6 +52,7 @@ PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd wayland x11',
                    ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl-or-es', '', d)} \
                    enchant \
                    libsecret \
+                   soup2 \
                   "
 
 PACKAGECONFIG[wayland] = "-DENABLE_WAYLAND_TARGET=ON,-DENABLE_WAYLAND_TARGET=OFF,wayland libwpe wpebackend-fdo wayland-native"
@@ -70,6 +71,7 @@ PACKAGECONFIG[openjpeg] = "-DUSE_OPENJPEG=ON,-DUSE_OPENJPEG=OFF,openjpeg"
 PACKAGECONFIG[systemd] = "-DUSE_SYSTEMD=ON,-DUSE_SYSTEMD=off,systemd"
 PACKAGECONFIG[reduce-size] = "-DCMAKE_BUILD_TYPE=MinSizeRel,-DCMAKE_BUILD_TYPE=Release,,"
 PACKAGECONFIG[lcms] = "-DUSE_LCMS=ON,-DUSE_LCMS=OFF,lcms"
+PACKAGECONFIG[soup2] = "-DUSE_SOUP2=ON,-DUSE_SOUP2=OFF,,"
 
 # webkitgtk is full of /usr/bin/env python, particular for generating docs
 do_configure[postfuncs] += "setup_python_link"
@@ -124,7 +126,7 @@ EXTRA_OECMAKE:append:x86-x32 = " -DENABLE_JIT=OFF "
 SECURITY_CFLAGS:remove:aarch64 = "-fpie"
 SECURITY_CFLAGS:append:aarch64 = " -fPIE"
 
-FILES:${PN} += "${libdir}/webkit2gtk-4.1/injected-bundle/libwebkit2gtkinjectedbundle.so"
+FILES:${PN} += "${libdir}/webkit2gtk-4.*/injected-bundle/libwebkit2gtkinjectedbundle.so"
 
 RRECOMMENDS:${PN} += "ca-certificates shared-mime-info"
 
-- 
2.33.0



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [OE-core][PATCH] webkitgtk: Add packageconfig for libsoup2
  2021-12-09 20:44 [OE-core][PATCH] webkitgtk: Add packageconfig for libsoup2 Joshua Watt
@ 2021-12-09 21:00 ` Khem Raj
  2021-12-09 21:06 ` Scott Murray
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Khem Raj @ 2021-12-09 21:00 UTC (permalink / raw)
  To: Joshua Watt; +Cc: Patches and discussions about the oe-core layer

On Thu, Dec 9, 2021 at 12:44 PM Joshua Watt <JPEWhacker@gmail.com> wrote:
>
> Adds a PACKAGECONFIG option to use libsoup2 instead of libsoup3.
> Including libsoup2 and libsoup3 in the same process can cause strange
> runtime failures, and the latest release of each major version will
> cause the process to exit if either if both are detected on process
> startup.
>
> The default is changed from libsoup3 back to libsoup2. Most GNOME
> packages are still using libsoup2, and a large number of these pull in
> webkitgtk either directly or indirectly. If webkitgtk uses libsoup3,
> this causes all of these packages to fail at startup. It appears that
> most GNOME packages will have to switch to libsoup3 when they transition
> to GTK4.
>

LGTM thanks for doing this, I was struggling through this as well, I
think having the option to
stay with soup2 for now is the best approach instead of boiling the ocean.

> Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
> ---
>  meta/recipes-sato/webkit/webkitgtk_2.34.2.bb | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/meta/recipes-sato/webkit/webkitgtk_2.34.2.bb b/meta/recipes-sato/webkit/webkitgtk_2.34.2.bb
> index 413e0cdf92..279e260441 100644
> --- a/meta/recipes-sato/webkit/webkitgtk_2.34.2.bb
> +++ b/meta/recipes-sato/webkit/webkitgtk_2.34.2.bb
> @@ -38,12 +38,12 @@ DEPENDS = " \
>            atk \
>            libwebp \
>            gtk+3 \
> -          libsoup \
>            libxslt \
>            libtasn1 \
>            libnotify \
>            gstreamer1.0 \
>            gstreamer1.0-plugins-base \
> +          ${@bb.utils.contains("PACKAGECONFIG", "soup2", "libsoup-2.4", "libsoup", d)} \
>            "
>
>  PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd wayland x11', d)} \
> @@ -52,6 +52,7 @@ PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd wayland x11',
>                     ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl-or-es', '', d)} \
>                     enchant \
>                     libsecret \
> +                   soup2 \
>                    "
>
>  PACKAGECONFIG[wayland] = "-DENABLE_WAYLAND_TARGET=ON,-DENABLE_WAYLAND_TARGET=OFF,wayland libwpe wpebackend-fdo wayland-native"
> @@ -70,6 +71,7 @@ PACKAGECONFIG[openjpeg] = "-DUSE_OPENJPEG=ON,-DUSE_OPENJPEG=OFF,openjpeg"
>  PACKAGECONFIG[systemd] = "-DUSE_SYSTEMD=ON,-DUSE_SYSTEMD=off,systemd"
>  PACKAGECONFIG[reduce-size] = "-DCMAKE_BUILD_TYPE=MinSizeRel,-DCMAKE_BUILD_TYPE=Release,,"
>  PACKAGECONFIG[lcms] = "-DUSE_LCMS=ON,-DUSE_LCMS=OFF,lcms"
> +PACKAGECONFIG[soup2] = "-DUSE_SOUP2=ON,-DUSE_SOUP2=OFF,,"
>
>  # webkitgtk is full of /usr/bin/env python, particular for generating docs
>  do_configure[postfuncs] += "setup_python_link"
> @@ -124,7 +126,7 @@ EXTRA_OECMAKE:append:x86-x32 = " -DENABLE_JIT=OFF "
>  SECURITY_CFLAGS:remove:aarch64 = "-fpie"
>  SECURITY_CFLAGS:append:aarch64 = " -fPIE"
>
> -FILES:${PN} += "${libdir}/webkit2gtk-4.1/injected-bundle/libwebkit2gtkinjectedbundle.so"
> +FILES:${PN} += "${libdir}/webkit2gtk-4.*/injected-bundle/libwebkit2gtkinjectedbundle.so"
>
>  RRECOMMENDS:${PN} += "ca-certificates shared-mime-info"
>
> --
> 2.33.0
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#159477): https://lists.openembedded.org/g/openembedded-core/message/159477
> Mute This Topic: https://lists.openembedded.org/mt/87621243/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [OE-core][PATCH] webkitgtk: Add packageconfig for libsoup2
  2021-12-09 20:44 [OE-core][PATCH] webkitgtk: Add packageconfig for libsoup2 Joshua Watt
  2021-12-09 21:00 ` Khem Raj
@ 2021-12-09 21:06 ` Scott Murray
  2021-12-09 21:55 ` Quentin Schulz
  2021-12-10 15:37 ` [OE-core][PATCH v2] " Joshua Watt
  3 siblings, 0 replies; 7+ messages in thread
From: Scott Murray @ 2021-12-09 21:06 UTC (permalink / raw)
  To: Joshua Watt; +Cc: openembedded-core

On Thu, 9 Dec 2021, Joshua Watt wrote:

> Adds a PACKAGECONFIG option to use libsoup2 instead of libsoup3.
> Including libsoup2 and libsoup3 in the same process can cause strange
> runtime failures, and the latest release of each major version will
> cause the process to exit if either if both are detected on process

I'm guessing the "if either" is a leftover from editing?

> startup.
>
> The default is changed from libsoup3 back to libsoup2. Most GNOME
> packages are still using libsoup2, and a large number of these pull in
> webkitgtk either directly or indirectly. If webkitgtk uses libsoup3,
> this causes all of these packages to fail at startup. It appears that
> most GNOME packages will have to switch to libsoup3 when they transition
> to GTK4.
>
> Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
> ---
>  meta/recipes-sato/webkit/webkitgtk_2.34.2.bb | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/meta/recipes-sato/webkit/webkitgtk_2.34.2.bb b/meta/recipes-sato/webkit/webkitgtk_2.34.2.bb
> index 413e0cdf92..279e260441 100644
> --- a/meta/recipes-sato/webkit/webkitgtk_2.34.2.bb
> +++ b/meta/recipes-sato/webkit/webkitgtk_2.34.2.bb
> @@ -38,12 +38,12 @@ DEPENDS = " \
>            atk \
>            libwebp \
>            gtk+3 \
> -          libsoup \
>            libxslt \
>            libtasn1 \
>            libnotify \
>            gstreamer1.0 \
>            gstreamer1.0-plugins-base \
> +          ${@bb.utils.contains("PACKAGECONFIG", "soup2", "libsoup-2.4", "libsoup", d)} \
>            "
>
>  PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd wayland x11', d)} \
> @@ -52,6 +52,7 @@ PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd wayland x11',
>                     ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl-or-es', '', d)} \
>                     enchant \
>                     libsecret \
> +                   soup2 \
>                    "
>
>  PACKAGECONFIG[wayland] = "-DENABLE_WAYLAND_TARGET=ON,-DENABLE_WAYLAND_TARGET=OFF,wayland libwpe wpebackend-fdo wayland-native"
> @@ -70,6 +71,7 @@ PACKAGECONFIG[openjpeg] = "-DUSE_OPENJPEG=ON,-DUSE_OPENJPEG=OFF,openjpeg"
>  PACKAGECONFIG[systemd] = "-DUSE_SYSTEMD=ON,-DUSE_SYSTEMD=off,systemd"
>  PACKAGECONFIG[reduce-size] = "-DCMAKE_BUILD_TYPE=MinSizeRel,-DCMAKE_BUILD_TYPE=Release,,"
>  PACKAGECONFIG[lcms] = "-DUSE_LCMS=ON,-DUSE_LCMS=OFF,lcms"
> +PACKAGECONFIG[soup2] = "-DUSE_SOUP2=ON,-DUSE_SOUP2=OFF,,"
>
>  # webkitgtk is full of /usr/bin/env python, particular for generating docs
>  do_configure[postfuncs] += "setup_python_link"
> @@ -124,7 +126,7 @@ EXTRA_OECMAKE:append:x86-x32 = " -DENABLE_JIT=OFF "
>  SECURITY_CFLAGS:remove:aarch64 = "-fpie"
>  SECURITY_CFLAGS:append:aarch64 = " -fPIE"
>
> -FILES:${PN} += "${libdir}/webkit2gtk-4.1/injected-bundle/libwebkit2gtkinjectedbundle.so"
> +FILES:${PN} += "${libdir}/webkit2gtk-4.*/injected-bundle/libwebkit2gtkinjectedbundle.so"

Is this required for the libsoup2 changes?

>  RRECOMMENDS:${PN} += "ca-certificates shared-mime-info"
>
>

Cheers,

Scott





^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [OE-core][PATCH] webkitgtk: Add packageconfig for libsoup2
  2021-12-09 20:44 [OE-core][PATCH] webkitgtk: Add packageconfig for libsoup2 Joshua Watt
  2021-12-09 21:00 ` Khem Raj
  2021-12-09 21:06 ` Scott Murray
@ 2021-12-09 21:55 ` Quentin Schulz
  2021-12-09 22:08   ` Joshua Watt
  2021-12-10 15:37 ` [OE-core][PATCH v2] " Joshua Watt
  3 siblings, 1 reply; 7+ messages in thread
From: Quentin Schulz @ 2021-12-09 21:55 UTC (permalink / raw)
  To: openembedded-core, Joshua Watt

Hi Joshua,

On December 9, 2021 9:44:17 PM GMT+01:00, Joshua Watt <JPEWhacker@gmail.com> wrote:
>Adds a PACKAGECONFIG option to use libsoup2 instead of libsoup3.
>Including libsoup2 and libsoup3 in the same process can cause strange
>runtime failures, and the latest release of each major version will
>cause the process to exit if either if both are detected on process
>startup.
>
>The default is changed from libsoup3 back to libsoup2. Most GNOME
>packages are still using libsoup2, and a large number of these pull in
>webkitgtk either directly or indirectly. If webkitgtk uses libsoup3,
>this causes all of these packages to fail at startup. It appears that
>most GNOME packages will have to switch to libsoup3 when they transition
>to GTK4.
>
>Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
>---
> meta/recipes-sato/webkit/webkitgtk_2.34.2.bb | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
>diff --git a/meta/recipes-sato/webkit/webkitgtk_2.34.2.bb b/meta/recipes-sato/webkit/webkitgtk_2.34.2.bb
>index 413e0cdf92..279e260441 100644
>--- a/meta/recipes-sato/webkit/webkitgtk_2.34.2.bb
>+++ b/meta/recipes-sato/webkit/webkitgtk_2.34.2.bb
>@@ -38,12 +38,12 @@ DEPENDS = " \
>           atk \
>           libwebp \
>           gtk+3 \
>-          libsoup \
>           libxslt \
>           libtasn1 \
>           libnotify \
>           gstreamer1.0 \
>           gstreamer1.0-plugins-base \
>+          ${@bb.utils.contains("PACKAGECONFIG", "soup2", "libsoup-2.4", "libsoup", d)} \
>           "
> 
> PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd wayland x11', d)} \
>@@ -52,6 +52,7 @@ PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd wayland x11',
>                    ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl-or-es', '', d)} \
>                    enchant \
>                    libsecret \
>+                   soup2 \
>                   "
> 
> PACKAGECONFIG[wayland] = "-DENABLE_WAYLAND_TARGET=ON,-DENABLE_WAYLAND_TARGET=OFF,wayland libwpe wpebackend-fdo wayland-native"
>@@ -70,6 +71,7 @@ PACKAGECONFIG[openjpeg] = "-DUSE_OPENJPEG=ON,-DUSE_OPENJPEG=OFF,openjpeg"
> PACKAGECONFIG[systemd] = "-DUSE_SYSTEMD=ON,-DUSE_SYSTEMD=off,systemd"
> PACKAGECONFIG[reduce-size] = "-DCMAKE_BUILD_TYPE=MinSizeRel,-DCMAKE_BUILD_TYPE=Release,,"
> PACKAGECONFIG[lcms] = "-DUSE_LCMS=ON,-DUSE_LCMS=OFF,lcms"
>+PACKAGECONFIG[soup2] = "-DUSE_SOUP2=ON,-DUSE_SOUP2=OFF,,"
> 

What about leveraging package conflicts in PACKAGECONFIG?

e.g.:
PACKAGECONFIG[soup2] = "-DUSE_SOUP2=ON,-DUSE_SOUP2=OFF,libsoup-2.4,,,soup"
PACKAGECONFIG[soup] = ",,libsoup,,,soup2"
?
No need for the check on PACKAGECONFIG in depends then.

> # webkitgtk is full of /usr/bin/env python, particular for generating docs
> do_configure[postfuncs] += "setup_python_link"
>@@ -124,7 +126,7 @@ EXTRA_OECMAKE:append:x86-x32 = " -DENABLE_JIT=OFF "
> SECURITY_CFLAGS:remove:aarch64 = "-fpie"
> SECURITY_CFLAGS:append:aarch64 = " -fPIE"
> 
>-FILES:${PN} += "${libdir}/webkit2gtk-4.1/injected-bundle/libwebkit2gtkinjectedbundle.so"
>+FILES:${PN} += "${libdir}/webkit2gtk-4.*/injected-bundle/libwebkit2gtkinjectedbundle.so"
> 

Was this change suppose to make it in this commit?

Cheers,
Quentin

> RRECOMMENDS:${PN} += "ca-certificates shared-mime-info"
> 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [OE-core][PATCH] webkitgtk: Add packageconfig for libsoup2
  2021-12-09 21:55 ` Quentin Schulz
@ 2021-12-09 22:08   ` Joshua Watt
  2021-12-10  6:00     ` Quentin Schulz
  0 siblings, 1 reply; 7+ messages in thread
From: Joshua Watt @ 2021-12-09 22:08 UTC (permalink / raw)
  To: Quentin Schulz; +Cc: openembedded-core

On Thu, Dec 9, 2021 at 3:55 PM Quentin Schulz <foss+yocto@0leil.net> wrote:
>
> Hi Joshua,
>
> On December 9, 2021 9:44:17 PM GMT+01:00, Joshua Watt <JPEWhacker@gmail.com> wrote:
> >Adds a PACKAGECONFIG option to use libsoup2 instead of libsoup3.
> >Including libsoup2 and libsoup3 in the same process can cause strange
> >runtime failures, and the latest release of each major version will
> >cause the process to exit if either if both are detected on process
> >startup.
> >
> >The default is changed from libsoup3 back to libsoup2. Most GNOME
> >packages are still using libsoup2, and a large number of these pull in
> >webkitgtk either directly or indirectly. If webkitgtk uses libsoup3,
> >this causes all of these packages to fail at startup. It appears that
> >most GNOME packages will have to switch to libsoup3 when they transition
> >to GTK4.
> >
> >Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
> >---
> > meta/recipes-sato/webkit/webkitgtk_2.34.2.bb | 6 ++++--
> > 1 file changed, 4 insertions(+), 2 deletions(-)
> >
> >diff --git a/meta/recipes-sato/webkit/webkitgtk_2.34.2.bb b/meta/recipes-sato/webkit/webkitgtk_2.34.2.bb
> >index 413e0cdf92..279e260441 100644
> >--- a/meta/recipes-sato/webkit/webkitgtk_2.34.2.bb
> >+++ b/meta/recipes-sato/webkit/webkitgtk_2.34.2.bb
> >@@ -38,12 +38,12 @@ DEPENDS = " \
> >           atk \
> >           libwebp \
> >           gtk+3 \
> >-          libsoup \
> >           libxslt \
> >           libtasn1 \
> >           libnotify \
> >           gstreamer1.0 \
> >           gstreamer1.0-plugins-base \
> >+          ${@bb.utils.contains("PACKAGECONFIG", "soup2", "libsoup-2.4", "libsoup", d)} \
> >           "
> >
> > PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd wayland x11', d)} \
> >@@ -52,6 +52,7 @@ PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd wayland x11',
> >                    ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl-or-es', '', d)} \
> >                    enchant \
> >                    libsecret \
> >+                   soup2 \
> >                   "
> >
> > PACKAGECONFIG[wayland] = "-DENABLE_WAYLAND_TARGET=ON,-DENABLE_WAYLAND_TARGET=OFF,wayland libwpe wpebackend-fdo wayland-native"
> >@@ -70,6 +71,7 @@ PACKAGECONFIG[openjpeg] = "-DUSE_OPENJPEG=ON,-DUSE_OPENJPEG=OFF,openjpeg"
> > PACKAGECONFIG[systemd] = "-DUSE_SYSTEMD=ON,-DUSE_SYSTEMD=off,systemd"
> > PACKAGECONFIG[reduce-size] = "-DCMAKE_BUILD_TYPE=MinSizeRel,-DCMAKE_BUILD_TYPE=Release,,"
> > PACKAGECONFIG[lcms] = "-DUSE_LCMS=ON,-DUSE_LCMS=OFF,lcms"
> >+PACKAGECONFIG[soup2] = "-DUSE_SOUP2=ON,-DUSE_SOUP2=OFF,,"
> >
>
> What about leveraging package conflicts in PACKAGECONFIG?
>
> e.g.:
> PACKAGECONFIG[soup2] = "-DUSE_SOUP2=ON,-DUSE_SOUP2=OFF,libsoup-2.4,,,soup"
> PACKAGECONFIG[soup] = ",,libsoup,,,soup2"
> ?
> No need for the check on PACKAGECONFIG in depends then.

Ya, the weird part there is that if you want libsoup3, you *must* put
"soup" in PACKAGECONFIG *and* remove soup2, otherwise libsoup won't be
added to DEPENDS and the build fails.

>
> > # webkitgtk is full of /usr/bin/env python, particular for generating docs
> > do_configure[postfuncs] += "setup_python_link"
> >@@ -124,7 +126,7 @@ EXTRA_OECMAKE:append:x86-x32 = " -DENABLE_JIT=OFF "
> > SECURITY_CFLAGS:remove:aarch64 = "-fpie"
> > SECURITY_CFLAGS:append:aarch64 = " -fPIE"
> >
> >-FILES:${PN} += "${libdir}/webkit2gtk-4.1/injected-bundle/libwebkit2gtkinjectedbundle.so"
> >+FILES:${PN} += "${libdir}/webkit2gtk-4.*/injected-bundle/libwebkit2gtkinjectedbundle.so"
> >
>
> Was this change suppose to make it in this commit?

Yes. The minor version of the library changes based on libsoup3 (4.1)
vs. libsoup2 (4.0)

>
> Cheers,
> Quentin
>
> > RRECOMMENDS:${PN} += "ca-certificates shared-mime-info"
> >


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [OE-core][PATCH] webkitgtk: Add packageconfig for libsoup2
  2021-12-09 22:08   ` Joshua Watt
@ 2021-12-10  6:00     ` Quentin Schulz
  0 siblings, 0 replies; 7+ messages in thread
From: Quentin Schulz @ 2021-12-10  6:00 UTC (permalink / raw)
  To: Joshua Watt; +Cc: openembedded-core



On December 9, 2021 11:08:31 PM GMT+01:00, Joshua Watt <jpewhacker@gmail.com> wrote:
>On Thu, Dec 9, 2021 at 3:55 PM Quentin Schulz <foss+yocto@0leil.net> wrote:
>>
>> Hi Joshua,
>>
>> On December 9, 2021 9:44:17 PM GMT+01:00, Joshua Watt <JPEWhacker@gmail.com> wrote:
>> >Adds a PACKAGECONFIG option to use libsoup2 instead of libsoup3.
>> >Including libsoup2 and libsoup3 in the same process can cause strange
>> >runtime failures, and the latest release of each major version will
>> >cause the process to exit if either if both are detected on process
>> >startup.
>> >
>> >The default is changed from libsoup3 back to libsoup2. Most GNOME
>> >packages are still using libsoup2, and a large number of these pull in
>> >webkitgtk either directly or indirectly. If webkitgtk uses libsoup3,
>> >this causes all of these packages to fail at startup. It appears that
>> >most GNOME packages will have to switch to libsoup3 when they transition
>> >to GTK4.
>> >
>> >Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
>> >---
>> > meta/recipes-sato/webkit/webkitgtk_2.34.2.bb | 6 ++++--
>> > 1 file changed, 4 insertions(+), 2 deletions(-)
>> >
>> >diff --git a/meta/recipes-sato/webkit/webkitgtk_2.34.2.bb b/meta/recipes-sato/webkit/webkitgtk_2.34.2.bb
>> >index 413e0cdf92..279e260441 100644
>> >--- a/meta/recipes-sato/webkit/webkitgtk_2.34.2.bb
>> >+++ b/meta/recipes-sato/webkit/webkitgtk_2.34.2.bb
>> >@@ -38,12 +38,12 @@ DEPENDS = " \
>> >           atk \
>> >           libwebp \
>> >           gtk+3 \
>> >-          libsoup \
>> >           libxslt \
>> >           libtasn1 \
>> >           libnotify \
>> >           gstreamer1.0 \
>> >           gstreamer1.0-plugins-base \
>> >+          ${@bb.utils.contains("PACKAGECONFIG", "soup2", "libsoup-2.4", "libsoup", d)} \
>> >           "
>> >
>> > PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd wayland x11', d)} \
>> >@@ -52,6 +52,7 @@ PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd wayland x11',
>> >                    ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl-or-es', '', d)} \
>> >                    enchant \
>> >                    libsecret \
>> >+                   soup2 \
>> >                   "
>> >
>> > PACKAGECONFIG[wayland] = "-DENABLE_WAYLAND_TARGET=ON,-DENABLE_WAYLAND_TARGET=OFF,wayland libwpe wpebackend-fdo wayland-native"
>> >@@ -70,6 +71,7 @@ PACKAGECONFIG[openjpeg] = "-DUSE_OPENJPEG=ON,-DUSE_OPENJPEG=OFF,openjpeg"
>> > PACKAGECONFIG[systemd] = "-DUSE_SYSTEMD=ON,-DUSE_SYSTEMD=off,systemd"
>> > PACKAGECONFIG[reduce-size] = "-DCMAKE_BUILD_TYPE=MinSizeRel,-DCMAKE_BUILD_TYPE=Release,,"
>> > PACKAGECONFIG[lcms] = "-DUSE_LCMS=ON,-DUSE_LCMS=OFF,lcms"
>> >+PACKAGECONFIG[soup2] = "-DUSE_SOUP2=ON,-DUSE_SOUP2=OFF,,"
>> >
>>
>> What about leveraging package conflicts in PACKAGECONFIG?
>>
>> e.g.:
>> PACKAGECONFIG[soup2] = "-DUSE_SOUP2=ON,-DUSE_SOUP2=OFF,libsoup-2.4,,,soup"
>> PACKAGECONFIG[soup] = ",,libsoup,,,soup2"
>> ?
>> No need for the check on PACKAGECONFIG in depends then.
>
>Ya, the weird part there is that if you want libsoup3, you *must* put
>"soup" in PACKAGECONFIG *and* remove soup2, otherwise libsoup won't be
>added to DEPENDS and the build fails.
>

I can suggest a solution à la qt package from meta-qt5:
PACKAGECONFIG_LIBSOUP ?= "soup2"
PACKAGECONFIG ??= "[...] ${PACKAGECONFIG_LIBSOUP}"

If you want to make really sure one or the other is selected, you can add a check in an anonymous Python function?

This should tackle the "must" part and also allow easy swap in bbappends in addition of making sure libsoup and libsoup-2.4 can't be selected at the same time?

What do you think?

On a side note, I feel like this patch could be split in two. One for the libsoup switch mechanism and one for switching the default to libsoup-2.4? I don't think Richard care usually though, so no biggie :)

Cheers,
Quentin

>>
>> > # webkitgtk is full of /usr/bin/env python, particular for generating docs
>> > do_configure[postfuncs] += "setup_python_link"
>> >@@ -124,7 +126,7 @@ EXTRA_OECMAKE:append:x86-x32 = " -DENABLE_JIT=OFF "
>> > SECURITY_CFLAGS:remove:aarch64 = "-fpie"
>> > SECURITY_CFLAGS:append:aarch64 = " -fPIE"
>> >
>> >-FILES:${PN} += "${libdir}/webkit2gtk-4.1/injected-bundle/libwebkit2gtkinjectedbundle.so"
>> >+FILES:${PN} += "${libdir}/webkit2gtk-4.*/injected-bundle/libwebkit2gtkinjectedbundle.so"
>> >
>>
>> Was this change suppose to make it in this commit?
>
>Yes. The minor version of the library changes based on libsoup3 (4.1)
>vs. libsoup2 (4.0)
>
>>
>> Cheers,
>> Quentin
>>
>> > RRECOMMENDS:${PN} += "ca-certificates shared-mime-info"
>> >


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [OE-core][PATCH v2] webkitgtk: Add packageconfig for libsoup2
  2021-12-09 20:44 [OE-core][PATCH] webkitgtk: Add packageconfig for libsoup2 Joshua Watt
                   ` (2 preceding siblings ...)
  2021-12-09 21:55 ` Quentin Schulz
@ 2021-12-10 15:37 ` Joshua Watt
  3 siblings, 0 replies; 7+ messages in thread
From: Joshua Watt @ 2021-12-10 15:37 UTC (permalink / raw)
  To: openembedded-core; +Cc: Joshua Watt

Adds a PACKAGECONFIG option to use libsoup2 instead of libsoup3.
Including libsoup2 and libsoup3 in the same process can cause strange
runtime failures, and the latest release of each major version will
cause the process to exit if both are detected on startup.

The default is changed from libsoup3 back to libsoup2. Most GNOME
packages are still using libsoup2, and a large number of these pull in
webkitgtk either directly or indirectly. If webkitgtk uses libsoup3,
this causes all of these packages to fail at startup. It appears that
most GNOME packages will have to switch to libsoup3 when they transition
to GTK4.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
---
 meta/recipes-sato/webkit/webkitgtk_2.34.2.bb | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-sato/webkit/webkitgtk_2.34.2.bb b/meta/recipes-sato/webkit/webkitgtk_2.34.2.bb
index 413e0cdf92..a9b151e3c3 100644
--- a/meta/recipes-sato/webkit/webkitgtk_2.34.2.bb
+++ b/meta/recipes-sato/webkit/webkitgtk_2.34.2.bb
@@ -38,7 +38,6 @@ DEPENDS = " \
           atk \
           libwebp \
           gtk+3 \
-          libsoup \
           libxslt \
           libtasn1 \
           libnotify \
@@ -46,12 +45,14 @@ DEPENDS = " \
           gstreamer1.0-plugins-base \
           "
 
+PACKAGECONFIG_SOUP ?= "soup2"
 PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd wayland x11', d)} \
                    ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'webgl opengl', '', d)} \
                    ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', 'webgl gles2 angle', d)} \
                    ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl-or-es', '', d)} \
                    enchant \
                    libsecret \
+                   ${PACKAGECONFIG_SOUP} \
                   "
 
 PACKAGECONFIG[wayland] = "-DENABLE_WAYLAND_TARGET=ON,-DENABLE_WAYLAND_TARGET=OFF,wayland libwpe wpebackend-fdo wayland-native"
@@ -70,6 +71,8 @@ PACKAGECONFIG[openjpeg] = "-DUSE_OPENJPEG=ON,-DUSE_OPENJPEG=OFF,openjpeg"
 PACKAGECONFIG[systemd] = "-DUSE_SYSTEMD=ON,-DUSE_SYSTEMD=off,systemd"
 PACKAGECONFIG[reduce-size] = "-DCMAKE_BUILD_TYPE=MinSizeRel,-DCMAKE_BUILD_TYPE=Release,,"
 PACKAGECONFIG[lcms] = "-DUSE_LCMS=ON,-DUSE_LCMS=OFF,lcms"
+PACKAGECONFIG[soup2] = "-DUSE_SOUP2=ON,-DUSE_SOUP2=OFF,libsoup-2.4,,,soup3"
+PACKAGECONFIG[soup3] = ",,libsoup,,,soup2"
 
 # webkitgtk is full of /usr/bin/env python, particular for generating docs
 do_configure[postfuncs] += "setup_python_link"
@@ -124,7 +127,7 @@ EXTRA_OECMAKE:append:x86-x32 = " -DENABLE_JIT=OFF "
 SECURITY_CFLAGS:remove:aarch64 = "-fpie"
 SECURITY_CFLAGS:append:aarch64 = " -fPIE"
 
-FILES:${PN} += "${libdir}/webkit2gtk-4.1/injected-bundle/libwebkit2gtkinjectedbundle.so"
+FILES:${PN} += "${libdir}/webkit2gtk-4.*/injected-bundle/libwebkit2gtkinjectedbundle.so"
 
 RRECOMMENDS:${PN} += "ca-certificates shared-mime-info"
 
-- 
2.33.0



^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-12-10 15:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-09 20:44 [OE-core][PATCH] webkitgtk: Add packageconfig for libsoup2 Joshua Watt
2021-12-09 21:00 ` Khem Raj
2021-12-09 21:06 ` Scott Murray
2021-12-09 21:55 ` Quentin Schulz
2021-12-09 22:08   ` Joshua Watt
2021-12-10  6:00     ` Quentin Schulz
2021-12-10 15:37 ` [OE-core][PATCH v2] " Joshua Watt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.