[4/5] package/wpewebkit: bump to version 2.24.1
diff mbox series

Message ID 20190514114111.20424-5-aperez@igalia.com
State Changes Requested
Headers show
Series
  • [1/5] package/libwpe: bump to version 1.2.0
Related show

Commit Message

Adrian Perez de Castro May 14, 2019, 11:41 a.m. UTC
This is a new major release which brings in many improvements and new
features. For a complete list, please refer to the release notes:

  https://wpewebkit.org/release/wpewebkit-2.24.0.html
  https://wpewebkit.org/release/wpewebkit-2.24.1.html

Updating to version 2.24.1 also includes fixes for CVE-2019-6201,
CVE-2019-6251, CVE-2019-7285, CVE-2019-7292, CVE-2019-8503,
CVE-2019-8506, CVE-2019-8515, CVE-2019-8518, CVE-2019-8523,
CVE-2019-8524, CVE-2019-8535, CVE-2019-8536, CVE-2019-8544,
CVE-2019-8551, CVE-2019-8558, CVE-2019-8559, CVE-2019-8563, and
CVE-2019-11070. The detailed security advisory can be found at:

  https://wpewebkit.org/security/WSA-2019-0002.html

The BR2_PACKAGE_WPEWEBKIT_ARCH_SUPPORTS_JIT configuration symbol is not
needed anymore, because the logic to decide whether the JavaScriptCore
JIT spport can be enabled has been improved upstream.

One of the new features in 2.24.x is the support for JPEG2000 images,
which is implemented using the OpenJPEG library. Therefore a dependency
on BR2_PACKAGE_OPENJPEG is added.

Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
---
 package/wpewebkit/Config.in      | 17 +----------------
 package/wpewebkit/wpewebkit.hash |  8 ++++----
 package/wpewebkit/wpewebkit.mk   | 10 ++--------
 3 files changed, 7 insertions(+), 28 deletions(-)

Comments

François Perrad May 15, 2019, 6:55 a.m. UTC | #1
Le mar. 14 mai 2019 à 14:24, Adrian Perez de Castro <aperez@igalia.com> a
écrit :

> This is a new major release which brings in many improvements and new
> features. For a complete list, please refer to the release notes:
>
>   https://wpewebkit.org/release/wpewebkit-2.24.0.html
>   https://wpewebkit.org/release/wpewebkit-2.24.1.html
>
> Updating to version 2.24.1 also includes fixes for CVE-2019-6201,
> CVE-2019-6251, CVE-2019-7285, CVE-2019-7292, CVE-2019-8503,
> CVE-2019-8506, CVE-2019-8515, CVE-2019-8518, CVE-2019-8523,
> CVE-2019-8524, CVE-2019-8535, CVE-2019-8536, CVE-2019-8544,
> CVE-2019-8551, CVE-2019-8558, CVE-2019-8559, CVE-2019-8563, and
> CVE-2019-11070. The detailed security advisory can be found at:
>
>   https://wpewebkit.org/security/WSA-2019-0002.html
>
> The BR2_PACKAGE_WPEWEBKIT_ARCH_SUPPORTS_JIT configuration symbol is not
> needed anymore, because the logic to decide whether the JavaScriptCore
> JIT spport can be enabled has been improved upstream.
>
> One of the new features in 2.24.x is the support for JPEG2000 images,
> which is implemented using the OpenJPEG library. Therefore a dependency
> on BR2_PACKAGE_OPENJPEG is added.
>
> Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
> ---
>  package/wpewebkit/Config.in      | 17 +----------------
>  package/wpewebkit/wpewebkit.hash |  8 ++++----
>  package/wpewebkit/wpewebkit.mk   | 10 ++--------
>  3 files changed, 7 insertions(+), 28 deletions(-)
>
> diff --git a/package/wpewebkit/Config.in b/package/wpewebkit/Config.in
> index 04ebe5452b..ff5775c735 100644
> --- a/package/wpewebkit/Config.in
> +++ b/package/wpewebkit/Config.in
> @@ -12,22 +12,6 @@ config BR2_PACKAGE_WPEWEBKIT_ARCH_SUPPORTS
>         depends on BR2_TOOLCHAIN_HAS_SYNC_4
>         depends on BR2_PACKAGE_LIBGPG_ERROR_ARCH_SUPPORTS # libgcrypt
>
> -config BR2_PACKAGE_WPEWEBKIT_ARCH_SUPPORTS_JIT
> -       bool
> -       # ARM needs NEON for JIT.
> -       default y if BR2_ARM_CPU_HAS_NEON
> -       # AArch64 is supported upstream but not well tested on big-endian
> mode.
> -       default y if BR2_aarch64
> -       # i386 & x86_64 don't have any special requirements.
> -       default y if BR2_i386
> -       default y if BR2_x86_64
> -       # JIT is known not to work on MIPS64.
> -       # Plain MIPS32 (pre R2) is not well tested and likely broken, and
> R6
> -       # is unsupported, see
> https://bugs.webkit.org/show_bug.cgi?id=191258
> -       # The MIPS support is completely untested in big-endian mode.
> -       default y if BR2_mipsel && BR2_MIPS_CPU_MIPS32R2
> -       default y if BR2_mipsel && BR2_MIPS_CPU_MIPS32R5
> -
>  comment "wpewebkit needs a toolchain w/ C++, wchar, threads, dynamic
> library, gcc >= 4.8, host gcc >= 4.8"
>         depends on BR2_PACKAGE_WPEWEBKIT_ARCH_SUPPORTS
>         depends on !BR2_BINFMT_FLAT
> @@ -63,6 +47,7 @@ config BR2_PACKAGE_WPEWEBKIT
>         select BR2_PACKAGE_LIBSOUP
>         select BR2_PACKAGE_LIBTASN1
>         select BR2_PACKAGE_LIBXSLT
> +       select BR2_PACKAGE_OPENJPEG
>         select BR2_PACKAGE_WAYLAND
>         select BR2_PACKAGE_WAYLAND_PROTOCOLS
>         select BR2_PACKAGE_WEBP
> diff --git a/package/wpewebkit/wpewebkit.hash
> b/package/wpewebkit/wpewebkit.hash
> index cbf253d29c..27f7344be2 100644
> --- a/package/wpewebkit/wpewebkit.hash
> +++ b/package/wpewebkit/wpewebkit.hash
> @@ -1,7 +1,7 @@
> -# From https://wpewebkit.org/releases/wpewebkit-2.22.5.tar.xz.sums
> -md5 <https://wpewebkit.org/releases/wpewebkit-2.22.5.tar.xz.sums-md5>
> 7b768bfae1295ebbc9a9038bf8fb6e6c wpewebkit-2.22.5.tar.xz
> -sha1 c85f927e0f17f1e7045a5d33c683d310c7af24de wpewebkit-2.22.5.tar.xz
> -sha256 d5e7b23e4f9e9f1b9d369faa4d527cdb59aef56b3e6a50a16dad243df5f699f3
> wpewebkit-2.22.5.tar.xz
> +# From https://wpewebkit.org/releases/wpewebkit-2.24.1.tar.xz.sums
> +md5 <https://wpewebkit.org/releases/wpewebkit-2.24.1.tar.xz.sums+md5>
> 0f7b792874853416d8005b020bd90685 wpewebkit-2.24.1.tar.xz
> +sha1 d009c82afbc2c373a7f34ffda392e5c3b52dac7d wpewebkit-2.24.1.tar.xz
> +sha256 95f2fb68429fbd901ea415d09fdd88d6d9ac5ec2d170bec9977093b12e5093a6
> wpewebkit-2.24.1.tar.xz
>
>  # Hashes for license files:
>  sha256 0b5d3a7cc325942567373b0ecd757d07c132e0ebd7c97bfc63f7e1a76094edb4
> Source/WebCore/LICENSE-APPLE
> diff --git a/package/wpewebkit/wpewebkit.mk b/package/wpewebkit/
> wpewebkit.mk
> index 73ad534acd..480ddb0b0c 100644
> --- a/package/wpewebkit/wpewebkit.mk
> +++ b/package/wpewebkit/wpewebkit.mk
> @@ -4,7 +4,7 @@
>  #
>
>  ################################################################################
>
> -WPEWEBKIT_VERSION = 2.22.5
> +WPEWEBKIT_VERSION = 2.24.1
>  WPEWEBKIT_SITE = http://www.wpewebkit.org/releases
>  WPEWEBKIT_SOURCE = wpewebkit-$(WPEWEBKIT_VERSION).tar.xz
>  WPEWEBKIT_INSTALL_STAGING = YES
> @@ -14,19 +14,13 @@ WPEWEBKIT_LICENSE_FILES = \
>         Source/WebCore/LICENSE-LGPL-2.1
>  WPEWEBKIT_DEPENDENCIES = host-gperf host-python host-ruby \
>         harfbuzz cairo icu jpeg libepoxy libgcrypt libgles libsoup
> libtasn1 \
> -       libpng libxslt wayland-protocols webp wpebackend-fdo
> +       libpng libxslt openjpeg wayland-protocols webp wpebackend-fdo
>
>  WPEWEBKIT_CONF_OPTS = \
>         -DPORT=WPE \
>         -DENABLE_API_TESTS=OFF \
>         -DENABLE_MINIBROWSER=OFF
>
>
openjpeg is an optional dependency

ifeq ($(BR2_PACKAGE_OPENJPEG),y)
WPEWEBKIT_CONF_OPTS += -DUSE_OPENJPEG=ON
WPEWEBKIT_DEPENDENCIES += openjpeg
else
WPEWEBKIT_CONF_OPTS += -DUSE_OPENJPEG=OFF
endif


François


> -ifeq ($(BR2_PACKAGE_WPEWEBKIT_ARCH_SUPPORTS_JIT),y)
> -WPEWEBKIT_CONF_OPTS += -DENABLE_JIT=ON
> -else
> -WPEWEBKIT_CONF_OPTS += -DENABLE_JIT=OFF
> -endif
> -
>  ifeq ($(BR2_PACKAGE_WPEWEBKIT_MULTIMEDIA),y)
>  WPEWEBKIT_CONF_OPTS += \
>         -DENABLE_VIDEO=ON \
> --
> 2.21.0
>
>
Adrian Perez de Castro May 15, 2019, 11:52 a.m. UTC | #2
Hello,

On Wed, 15 May 2019 08:55:08 +0200, François Perrad <francois.perrad@gadz.org> wrote:
> Le mar. 14 mai 2019 à 14:24, Adrian Perez de Castro <aperez@igalia.com> a
> écrit :
> 
> > This is a new major release which brings in many improvements and new
> > features. For a complete list, please refer to the release notes:
> >
> >   https://wpewebkit.org/release/wpewebkit-2.24.0.html
> >   https://wpewebkit.org/release/wpewebkit-2.24.1.html
> >
> > Updating to version 2.24.1 also includes fixes for CVE-2019-6201,
> > CVE-2019-6251, CVE-2019-7285, CVE-2019-7292, CVE-2019-8503,
> > CVE-2019-8506, CVE-2019-8515, CVE-2019-8518, CVE-2019-8523,
> > CVE-2019-8524, CVE-2019-8535, CVE-2019-8536, CVE-2019-8544,
> > CVE-2019-8551, CVE-2019-8558, CVE-2019-8559, CVE-2019-8563, and
> > CVE-2019-11070. The detailed security advisory can be found at:
> >
> >   https://wpewebkit.org/security/WSA-2019-0002.html
> >
> > The BR2_PACKAGE_WPEWEBKIT_ARCH_SUPPORTS_JIT configuration symbol is not
> > needed anymore, because the logic to decide whether the JavaScriptCore
> > JIT spport can be enabled has been improved upstream.
> >
> > One of the new features in 2.24.x is the support for JPEG2000 images,
> > which is implemented using the OpenJPEG library. Therefore a dependency
> > on BR2_PACKAGE_OPENJPEG is added.
> >
> > Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
> > ---
> >  package/wpewebkit/Config.in      | 17 +----------------
> >  package/wpewebkit/wpewebkit.hash |  8 ++++----
> >  package/wpewebkit/wpewebkit.mk   | 10 ++--------
> >  3 files changed, 7 insertions(+), 28 deletions(-)
> >
> > diff --git a/package/wpewebkit/Config.in b/package/wpewebkit/Config.in
> > index 04ebe5452b..ff5775c735 100644
> > --- a/package/wpewebkit/Config.in
> > +++ b/package/wpewebkit/Config.in
> > @@ -12,22 +12,6 @@ config BR2_PACKAGE_WPEWEBKIT_ARCH_SUPPORTS
> >         depends on BR2_TOOLCHAIN_HAS_SYNC_4
> >         depends on BR2_PACKAGE_LIBGPG_ERROR_ARCH_SUPPORTS # libgcrypt
> >
> > -config BR2_PACKAGE_WPEWEBKIT_ARCH_SUPPORTS_JIT
> > -       bool
> > -       # ARM needs NEON for JIT.
> > -       default y if BR2_ARM_CPU_HAS_NEON
> > -       # AArch64 is supported upstream but not well tested on big-endian
> > mode.
> > -       default y if BR2_aarch64
> > -       # i386 & x86_64 don't have any special requirements.
> > -       default y if BR2_i386
> > -       default y if BR2_x86_64
> > -       # JIT is known not to work on MIPS64.
> > -       # Plain MIPS32 (pre R2) is not well tested and likely broken, and
> > R6
> > -       # is unsupported, see
> > https://bugs.webkit.org/show_bug.cgi?id=191258
> > -       # The MIPS support is completely untested in big-endian mode.
> > -       default y if BR2_mipsel && BR2_MIPS_CPU_MIPS32R2
> > -       default y if BR2_mipsel && BR2_MIPS_CPU_MIPS32R5
> > -
> >  comment "wpewebkit needs a toolchain w/ C++, wchar, threads, dynamic
> > library, gcc >= 4.8, host gcc >= 4.8"
> >         depends on BR2_PACKAGE_WPEWEBKIT_ARCH_SUPPORTS
> >         depends on !BR2_BINFMT_FLAT
> > @@ -63,6 +47,7 @@ config BR2_PACKAGE_WPEWEBKIT
> >         select BR2_PACKAGE_LIBSOUP
> >         select BR2_PACKAGE_LIBTASN1
> >         select BR2_PACKAGE_LIBXSLT
> > +       select BR2_PACKAGE_OPENJPEG
> >         select BR2_PACKAGE_WAYLAND
> >         select BR2_PACKAGE_WAYLAND_PROTOCOLS
> >         select BR2_PACKAGE_WEBP
> > diff --git a/package/wpewebkit/wpewebkit.hash
> > b/package/wpewebkit/wpewebkit.hash
> > index cbf253d29c..27f7344be2 100644
> > --- a/package/wpewebkit/wpewebkit.hash
> > +++ b/package/wpewebkit/wpewebkit.hash
> > @@ -1,7 +1,7 @@
> > -# From https://wpewebkit.org/releases/wpewebkit-2.22.5.tar.xz.sums
> > -md5 <https://wpewebkit.org/releases/wpewebkit-2.22.5.tar.xz.sums-md5>
> > 7b768bfae1295ebbc9a9038bf8fb6e6c wpewebkit-2.22.5.tar.xz
> > -sha1 c85f927e0f17f1e7045a5d33c683d310c7af24de wpewebkit-2.22.5.tar.xz
> > -sha256 d5e7b23e4f9e9f1b9d369faa4d527cdb59aef56b3e6a50a16dad243df5f699f3
> > wpewebkit-2.22.5.tar.xz
> > +# From https://wpewebkit.org/releases/wpewebkit-2.24.1.tar.xz.sums
> > +md5 <https://wpewebkit.org/releases/wpewebkit-2.24.1.tar.xz.sums+md5>
> > 0f7b792874853416d8005b020bd90685 wpewebkit-2.24.1.tar.xz
> > +sha1 d009c82afbc2c373a7f34ffda392e5c3b52dac7d wpewebkit-2.24.1.tar.xz
> > +sha256 95f2fb68429fbd901ea415d09fdd88d6d9ac5ec2d170bec9977093b12e5093a6
> > wpewebkit-2.24.1.tar.xz
> >
> >  # Hashes for license files:
> >  sha256 0b5d3a7cc325942567373b0ecd757d07c132e0ebd7c97bfc63f7e1a76094edb4
> > Source/WebCore/LICENSE-APPLE
> > diff --git a/package/wpewebkit/wpewebkit.mk b/package/wpewebkit/
> > wpewebkit.mk
> > index 73ad534acd..480ddb0b0c 100644
> > --- a/package/wpewebkit/wpewebkit.mk
> > +++ b/package/wpewebkit/wpewebkit.mk
> > @@ -4,7 +4,7 @@
> >  #
> >
> >  ################################################################################
> >
> > -WPEWEBKIT_VERSION = 2.22.5
> > +WPEWEBKIT_VERSION = 2.24.1
> >  WPEWEBKIT_SITE = http://www.wpewebkit.org/releases
> >  WPEWEBKIT_SOURCE = wpewebkit-$(WPEWEBKIT_VERSION).tar.xz
> >  WPEWEBKIT_INSTALL_STAGING = YES
> > @@ -14,19 +14,13 @@ WPEWEBKIT_LICENSE_FILES = \
> >         Source/WebCore/LICENSE-LGPL-2.1
> >  WPEWEBKIT_DEPENDENCIES = host-gperf host-python host-ruby \
> >         harfbuzz cairo icu jpeg libepoxy libgcrypt libgles libsoup
> > libtasn1 \
> > -       libpng libxslt wayland-protocols webp wpebackend-fdo
> > +       libpng libxslt openjpeg wayland-protocols webp wpebackend-fdo
> >
> >  WPEWEBKIT_CONF_OPTS = \
> >         -DPORT=WPE \
> >         -DENABLE_API_TESTS=OFF \
> >         -DENABLE_MINIBROWSER=OFF
> >
> >
> openjpeg is an optional dependency
> 
> ifeq ($(BR2_PACKAGE_OPENJPEG),y)
> WPEWEBKIT_CONF_OPTS += -DUSE_OPENJPEG=ON
> WPEWEBKIT_DEPENDENCIES += openjpeg
> else
> WPEWEBKIT_CONF_OPTS += -DUSE_OPENJPEG=OFF
> endif

While it is indeed possible to build without OpenJPEG, with my WebKit
developer hat I have to strongly recommend to make it required: many websites
will silently fail to show images without this enabled, and that's the reason
why I have selected the dependency unconditionally.

For the record: I did a quick check and in my work system (x86_64) the
“libopenjp2.so” library is only 365 KiB, which is peanuts compared to the size
of “libWPEWebKit.so”. Moreover, the openjpeg package can be built in every
platform where wpewebkit is supported, therefore I think it is worth it to
leave the dependency unconditionally enabled.

Thoughts?

—Adrián

 
> > -ifeq ($(BR2_PACKAGE_WPEWEBKIT_ARCH_SUPPORTS_JIT),y)
> > -WPEWEBKIT_CONF_OPTS += -DENABLE_JIT=ON
> > -else
> > -WPEWEBKIT_CONF_OPTS += -DENABLE_JIT=OFF
> > -endif
> > -
> >  ifeq ($(BR2_PACKAGE_WPEWEBKIT_MULTIMEDIA),y)
> >  WPEWEBKIT_CONF_OPTS += \
> >         -DENABLE_VIDEO=ON \
> > --
> > 2.21.0
Thomas Petazzoni May 15, 2019, 2:05 p.m. UTC | #3
Hello,

Adding Peter in Cc. I know he'll like it :-)

Adding Yann in Cc. I know he won't like it :-)

On Wed, 15 May 2019 14:52:39 +0300
Adrian Perez de Castro <aperez@igalia.com> wrote:


> > openjpeg is an optional dependency
> > 
> > ifeq ($(BR2_PACKAGE_OPENJPEG),y)
> > WPEWEBKIT_CONF_OPTS += -DUSE_OPENJPEG=ON
> > WPEWEBKIT_DEPENDENCIES += openjpeg
> > else
> > WPEWEBKIT_CONF_OPTS += -DUSE_OPENJPEG=OFF
> > endif  
> 
> While it is indeed possible to build without OpenJPEG, with my WebKit
> developer hat I have to strongly recommend to make it required: many websites
> will silently fail to show images without this enabled, and that's the reason
> why I have selected the dependency unconditionally.
> 
> For the record: I did a quick check and in my work system (x86_64) the
> “libopenjp2.so” library is only 365 KiB, which is peanuts compared to the size
> of “libWPEWebKit.so”. Moreover, the openjpeg package can be built in every
> platform where wpewebkit is supported, therefore I think it is worth it to
> leave the dependency unconditionally enabled.

Perhaps this is one situation where we could make good use of the
"imply" kconfig keyword ?

BR2_PACKAGE_WEBKIT would do an "imply BR2_PACKAGE_OPENJPEG". This way
by default OpenJPEG is automatically enabled by WPE Webkit, but we
still allow the user to disable OpenJPEG if he really wants it.

That allows to comply with the Buildroot principle of "make everything
optional really optional" while offering a good out-of-the-box
experience.

Thomas
Adrian Perez de Castro May 15, 2019, 6:11 p.m. UTC | #4
Hi Thomas,

On Wed, 15 May 2019 16:05:30 +0200, Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:

> Hello,
> 
> Adding Peter in Cc. I know he'll like it :-)
> 
> Adding Yann in Cc. I know he won't like it :-)

:-D

Personally, I like the suggestion, but I will wait for feedback on this
before sending v2 of the patch set.

> On Wed, 15 May 2019 14:52:39 +0300
> Adrian Perez de Castro <aperez@igalia.com> wrote:
> 
> > > openjpeg is an optional dependency
> > > 
> > > ifeq ($(BR2_PACKAGE_OPENJPEG),y)
> > > WPEWEBKIT_CONF_OPTS += -DUSE_OPENJPEG=ON
> > > WPEWEBKIT_DEPENDENCIES += openjpeg
> > > else
> > > WPEWEBKIT_CONF_OPTS += -DUSE_OPENJPEG=OFF
> > > endif  
> > 
> > While it is indeed possible to build without OpenJPEG, with my WebKit
> > developer hat I have to strongly recommend to make it required: many websites
> > will silently fail to show images without this enabled, and that's the reason
> > why I have selected the dependency unconditionally.
> > 
> > For the record: I did a quick check and in my work system (x86_64) the
> > “libopenjp2.so” library is only 365 KiB, which is peanuts compared to the size
> > of “libWPEWebKit.so”. Moreover, the openjpeg package can be built in every
> > platform where wpewebkit is supported, therefore I think it is worth it to
> > leave the dependency unconditionally enabled.
> 
> Perhaps this is one situation where we could make good use of the
> "imply" kconfig keyword ?
> 
> BR2_PACKAGE_WEBKIT would do an "imply BR2_PACKAGE_OPENJPEG". This way
> by default OpenJPEG is automatically enabled by WPE Webkit, but we
> still allow the user to disable OpenJPEG if he really wants it.
> 
> That allows to comply with the Buildroot principle of "make everything
> optional really optional" while offering a good out-of-the-box
> experience.

It seems like the situation in which “imply” fits perfectly.

Cheers,
—Adrián
Yann E. MORIN May 15, 2019, 7:53 p.m. UTC | #5
Adrian, Thomas, All,

On 2019-05-15 21:11 +0300, Adrian Perez de Castro spake thusly:
> On Wed, 15 May 2019 16:05:30 +0200, Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:
> > Adding Peter in Cc. I know he'll like it :-)
> > Adding Yann in Cc. I know he won't like it :-)

I see the wink, but still, meh... ;-)

> Personally, I like the suggestion, but I will wait for feedback on this
> before sending v2 of the patch set.

Well, as you said previously, what good is a browser without support for
one of the most prominent image format on the web?

If you were arguing for BMP or TGA, we'd use a conditional dependency.

But please note that openjpeg is a JPEG 2000 codec, not a JPEG one.
JPEG 2000 is much less used on the web:

    https://en.wikipedia.org/wiki/Comparison_of_web_browsers#Image_format_support

Only Konqueror, Midori, Omniweb, and Safari are said to support it.

Also, Thomas, please note that NetSurf does not support it eitther. ;-]

So, in this case, I would argue for a conditional dependency, as Adrian
initially suggested below:

> > On Wed, 15 May 2019 14:52:39 +0300
> > Adrian Perez de Castro <aperez@igalia.com> wrote:
> > > > openjpeg is an optional dependency
> > > > ifeq ($(BR2_PACKAGE_OPENJPEG),y)
> > > > WPEWEBKIT_CONF_OPTS += -DUSE_OPENJPEG=ON
> > > > WPEWEBKIT_DEPENDENCIES += openjpeg
> > > > else
> > > > WPEWEBKIT_CONF_OPTS += -DUSE_OPENJPEG=OFF
> > > > endif  

... here ^^^.

Sorry, but I still dislike "imply". :-p

Regards,
Yann E. MORIN.
Adrian Perez de Castro May 15, 2019, 9:15 p.m. UTC | #6
Hello!

On Wed, 15 May 2019 21:53:34 +0200, "Yann E. MORIN" <yann.morin.1998@free.fr> wrote:
> Adrian, Thomas, All,
> 
> On 2019-05-15 21:11 +0300, Adrian Perez de Castro spake thusly:
> > On Wed, 15 May 2019 16:05:30 +0200, Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:
> > > Adding Peter in Cc. I know he'll like it :-)
> > > Adding Yann in Cc. I know he won't like it :-)
> 
> I see the wink, but still, meh... ;-)
> 
> > Personally, I like the suggestion, but I will wait for feedback on this
> > before sending v2 of the patch set.
> 
> Well, as you said previously, what good is a browser without support for
> one of the most prominent image format on the web?
>
> If you were arguing for BMP or TGA, we'd use a conditional dependency.
> 
> But please note that openjpeg is a JPEG 2000 codec, not a JPEG one.
> JPEG 2000 is much less used on the web:
> 
>     https://en.wikipedia.org/wiki/Comparison_of_web_browsers#Image_format_support
> 
> Only Konqueror, Midori, Omniweb, and Safari are said to support it.

…and now WebKitGTK, and WPE WebKit :)

With my WebKit maintainer hat on, let me tell you a short story.

We have been forced to add support for JPEG2000 [1] because our user-agent is
similar to that of Safari (because… our WebKit ports *are* using the same Web
engine as Safari—there is no point denying it!) and a few sites started over
a year ago to send JPEG2000 images replies, then a few more, and then some.
At some point Akamai's Image Manager [2] started serving JPEG2000 images
transparently: the HTML references an URL ending in “.png” (for example),
and Akamai will return a JPEG2000 in the response (with an appropriate
Content-Type HTTP header, of course). At this point, if we don't support
JPEG2000, a good chunk of popular websites will just look broken because
the images returned by popular CDNs or the websites themselves cannot be
decoded.

This above is what I meant with “many websites will silently fail to
show images without [OpenJPEG support] enabled”.

I hope this helps understand why I am so insistent in having the OpenJPEG
support enabled unconditionally: preventing that the Web is broken when
browsing with a WebKit-based browser.

The rationale why we have in the CMake build files in WebKit an “USE_OPENJPEG”
build-time option is to disable it when configuring for distributions which
either a.) do not ship an OpenJPEG package, or b.) ship an old version that
does not include some new API that WebKit needs (example: Ubuntu LTS).
Buildroot does not fall into any of the categories above, and therefore I
would argue that either we use “select” to depend unconditionally on OpenJPEG,
or “imply” to choose it by default while still allowing to deselect it by
hand.

> Also, Thomas, please note that NetSurf does not support it eitther. ;-]

Then again, NetSurf does not have an user-agent close enough to a WebKit
one as to be served JPEG2000 images }:-)

> So, in this case, I would argue for a conditional dependency, as Adrian
> initially suggested below:
> 
> > > On Wed, 15 May 2019 14:52:39 +0300
> > > Adrian Perez de Castro <aperez@igalia.com> wrote:
> > > > > openjpeg is an optional dependency
> > > > > ifeq ($(BR2_PACKAGE_OPENJPEG),y)
> > > > > WPEWEBKIT_CONF_OPTS += -DUSE_OPENJPEG=ON
> > > > > WPEWEBKIT_DEPENDENCIES += openjpeg
> > > > > else
> > > > > WPEWEBKIT_CONF_OPTS += -DUSE_OPENJPEG=OFF
> > > > > endif  
> 
> ... here ^^^.
> 
> Sorry, but I still dislike "imply". :-p

I hope that my little store above might help you change your mind, if
only a little bit :-)

Best regards,
—Adrián

---
[1] https://bugs.webkit.org/show_bug.cgi?id=186272
[2] https://www.akamai.com/us/en/products/performance/image-manager.jsp
Yann E. MORIN May 16, 2019, 7:07 p.m. UTC | #7
Adrian, All,

On 2019-05-16 00:15 +0300, Adrian Perez de Castro spake thusly:
> On Wed, 15 May 2019 21:53:34 +0200, "Yann E. MORIN" <yann.morin.1998@free.fr> wrote:
> > On 2019-05-15 21:11 +0300, Adrian Perez de Castro spake thusly:
> > Well, as you said previously, what good is a browser without support for
> > one of the most prominent image format on the web?
> > But please note that openjpeg is a JPEG 2000 codec, not a JPEG one.
> > JPEG 2000 is much less used on the web:
> >     https://en.wikipedia.org/wiki/Comparison_of_web_browsers#Image_format_support
> > Only Konqueror, Midori, Omniweb, and Safari are said to support it.
> 
> …and now WebKitGTK, and WPE WebKit :)
> 
> With my WebKit maintainer hat on, let me tell you a short story.

/me sits by the fire and listens carefully to stories from the
trenches... :-)

> We have been forced to add support for JPEG2000 [1] because our user-agent is
> similar to that of Safari (because… our WebKit ports *are* using the same Web
> engine as Safari—there is no point denying it!) and a few sites started over
> a year ago to send JPEG2000 images replies, then a few more, and then some.
> At some point Akamai's Image Manager [2] started serving JPEG2000 images
> transparently: the HTML references an URL ending in “.png” (for example),
> and Akamai will return a JPEG2000 in the response (with an appropriate
> Content-Type HTTP header, of course). At this point, if we don't support
> JPEG2000, a good chunk of popular websites will just look broken because
> the images returned by popular CDNs or the websites themselves cannot be
> decoded.
> 
> This above is what I meant with “many websites will silently fail to
> show images without [OpenJPEG support] enabled”.

So, from what you are saying, I understand that support for jpeg 2000
*is* de facto mandatory.

> I hope this helps understand why I am so insistent in having the OpenJPEG
> support enabled unconditionally: preventing that the Web is broken when
> browsing with a WebKit-based browser.

Yes, I understand that. Thanks for the explanations.

> The rationale why we have in the CMake build files in WebKit an “USE_OPENJPEG”
> build-time option is to disable it when configuring for distributions which
> either a.) do not ship an OpenJPEG package, or b.) ship an old version that
> does not include some new API that WebKit needs (example: Ubuntu LTS).
> Buildroot does not fall into any of the categories above, and therefore I
> would argue that either we use “select” to depend unconditionally on OpenJPEG,
> or “imply” to choose it by default while still allowing to deselect it by
> hand.

I would not even give the option to disable it. Given the size of
openjpeg as compared to that of *webkit, there is not even the slightest
reason to make it configurable (IMHO).

> > Also, Thomas, please note that NetSurf does not support it eitther. ;-]
> Then again, NetSurf does not have an user-agent close enough to a WebKit
> one as to be served JPEG2000 images }:-)

That was a partially-private joke with Thomas, as he is keen on removing
netsurf after having lost countless hair trying to fix it. ;-)

> I hope that my little store above might help you change your mind, if
> only a little bit :-)

Yes, I changed my mind, from a conditional to mandatory dependency. ;-)
Sorry, still no imply for me! ;-)

Regards,
Yann E. MORIN.
Adrian Perez de Castro May 17, 2019, 3:36 p.m. UTC | #8
Hello,

On Thu, 16 May 2019 21:07:03 +0200, "Yann E. MORIN" <yann.morin.1998@free.fr> wrote:
> Adrian, All,
> 
> On 2019-05-16 00:15 +0300, Adrian Perez de Castro spake thusly:
> > On Wed, 15 May 2019 21:53:34 +0200, "Yann E. MORIN" <yann.morin.1998@free.fr> wrote:
> > > On 2019-05-15 21:11 +0300, Adrian Perez de Castro spake thusly:
> > > Well, as you said previously, what good is a browser without support for
> > > one of the most prominent image format on the web?
> > > But please note that openjpeg is a JPEG 2000 codec, not a JPEG one.
> > > JPEG 2000 is much less used on the web:
> > >     https://en.wikipedia.org/wiki/Comparison_of_web_browsers#Image_format_support
> > > Only Konqueror, Midori, Omniweb, and Safari are said to support it.
> > 
> > …and now WebKitGTK, and WPE WebKit :)
> > 
> > With my WebKit maintainer hat on, let me tell you a short story.
> 
> /me sits by the fire and listens carefully to stories from the
> trenches... :-)

:-D

> > We have been forced to add support for JPEG2000 [1] because our user-agent is
> > similar to that of Safari (because… our WebKit ports *are* using the same Web
> > engine as Safari—there is no point denying it!) and a few sites started over
> > a year ago to send JPEG2000 images replies, then a few more, and then some.
> > At some point Akamai's Image Manager [2] started serving JPEG2000 images
> > transparently: the HTML references an URL ending in “.png” (for example),
> > and Akamai will return a JPEG2000 in the response (with an appropriate
> > Content-Type HTTP header, of course). At this point, if we don't support
> > JPEG2000, a good chunk of popular websites will just look broken because
> > the images returned by popular CDNs or the websites themselves cannot be
> > decoded.
> > 
> > This above is what I meant with “many websites will silently fail to
> > show images without [OpenJPEG support] enabled”.
> 
> So, from what you are saying, I understand that support for jpeg 2000
> *is* de facto mandatory.

That's 101% correct.

> > I hope this helps understand why I am so insistent in having the OpenJPEG
> > support enabled unconditionally: preventing that the Web is broken when
> > browsing with a WebKit-based browser.
> 
> Yes, I understand that. Thanks for the explanations.

No problem. If there's any other questions regarding WebKit, feel free to
send them my way.

> > The rationale why we have in the CMake build files in WebKit an “USE_OPENJPEG”
> > build-time option is to disable it when configuring for distributions which
> > either a.) do not ship an OpenJPEG package, or b.) ship an old version that
> > does not include some new API that WebKit needs (example: Ubuntu LTS).
> > Buildroot does not fall into any of the categories above, and therefore I
> > would argue that either we use “select” to depend unconditionally on OpenJPEG,
> > or “imply” to choose it by default while still allowing to deselect it by
> > hand.
> 
> I would not even give the option to disable it. Given the size of
> openjpeg as compared to that of *webkit, there is not even the slightest
> reason to make it configurable (IMHO).

I also like this option, so I will do that for v2 of the patch set.

> > > Also, Thomas, please note that NetSurf does not support it eitther. ;-]
> > Then again, NetSurf does not have an user-agent close enough to a WebKit
> > one as to be served JPEG2000 images }:-)
> 
> That was a partially-private joke with Thomas, as he is keen on removing
> netsurf after having lost countless hair trying to fix it. ;-)

Hehe, I figured :-]

> > I hope that my little store above might help you change your mind, if
> > only a little bit :-)
> 
> Yes, I changed my mind, from a conditional to mandatory dependency. ;-)
> Sorry, still no imply for me! ;-)

Well, imply or not imply... at least we have now an agreement on how to
go ahead with this. Thanks for your feedback!

—Adrián

Patch
diff mbox series

diff --git a/package/wpewebkit/Config.in b/package/wpewebkit/Config.in
index 04ebe5452b..ff5775c735 100644
--- a/package/wpewebkit/Config.in
+++ b/package/wpewebkit/Config.in
@@ -12,22 +12,6 @@  config BR2_PACKAGE_WPEWEBKIT_ARCH_SUPPORTS
 	depends on BR2_TOOLCHAIN_HAS_SYNC_4
 	depends on BR2_PACKAGE_LIBGPG_ERROR_ARCH_SUPPORTS # libgcrypt
 
-config BR2_PACKAGE_WPEWEBKIT_ARCH_SUPPORTS_JIT
-	bool
-	# ARM needs NEON for JIT.
-	default y if BR2_ARM_CPU_HAS_NEON
-	# AArch64 is supported upstream but not well tested on big-endian mode.
-	default y if BR2_aarch64
-	# i386 & x86_64 don't have any special requirements.
-	default y if BR2_i386
-	default y if BR2_x86_64
-	# JIT is known not to work on MIPS64.
-	# Plain MIPS32 (pre R2) is not well tested and likely broken, and R6
-	# is unsupported, see https://bugs.webkit.org/show_bug.cgi?id=191258
-	# The MIPS support is completely untested in big-endian mode.
-	default y if BR2_mipsel && BR2_MIPS_CPU_MIPS32R2
-	default y if BR2_mipsel && BR2_MIPS_CPU_MIPS32R5
-
 comment "wpewebkit needs a toolchain w/ C++, wchar, threads, dynamic library, gcc >= 4.8, host gcc >= 4.8"
 	depends on BR2_PACKAGE_WPEWEBKIT_ARCH_SUPPORTS
 	depends on !BR2_BINFMT_FLAT
@@ -63,6 +47,7 @@  config BR2_PACKAGE_WPEWEBKIT
 	select BR2_PACKAGE_LIBSOUP
 	select BR2_PACKAGE_LIBTASN1
 	select BR2_PACKAGE_LIBXSLT
+	select BR2_PACKAGE_OPENJPEG
 	select BR2_PACKAGE_WAYLAND
 	select BR2_PACKAGE_WAYLAND_PROTOCOLS
 	select BR2_PACKAGE_WEBP
diff --git a/package/wpewebkit/wpewebkit.hash b/package/wpewebkit/wpewebkit.hash
index cbf253d29c..27f7344be2 100644
--- a/package/wpewebkit/wpewebkit.hash
+++ b/package/wpewebkit/wpewebkit.hash
@@ -1,7 +1,7 @@ 
-# From https://wpewebkit.org/releases/wpewebkit-2.22.5.tar.xz.sums
-md5 7b768bfae1295ebbc9a9038bf8fb6e6c wpewebkit-2.22.5.tar.xz
-sha1 c85f927e0f17f1e7045a5d33c683d310c7af24de wpewebkit-2.22.5.tar.xz
-sha256 d5e7b23e4f9e9f1b9d369faa4d527cdb59aef56b3e6a50a16dad243df5f699f3 wpewebkit-2.22.5.tar.xz
+# From https://wpewebkit.org/releases/wpewebkit-2.24.1.tar.xz.sums
+md5 0f7b792874853416d8005b020bd90685 wpewebkit-2.24.1.tar.xz
+sha1 d009c82afbc2c373a7f34ffda392e5c3b52dac7d wpewebkit-2.24.1.tar.xz
+sha256 95f2fb68429fbd901ea415d09fdd88d6d9ac5ec2d170bec9977093b12e5093a6 wpewebkit-2.24.1.tar.xz
 
 # Hashes for license files:
 sha256 0b5d3a7cc325942567373b0ecd757d07c132e0ebd7c97bfc63f7e1a76094edb4 Source/WebCore/LICENSE-APPLE
diff --git a/package/wpewebkit/wpewebkit.mk b/package/wpewebkit/wpewebkit.mk
index 73ad534acd..480ddb0b0c 100644
--- a/package/wpewebkit/wpewebkit.mk
+++ b/package/wpewebkit/wpewebkit.mk
@@ -4,7 +4,7 @@ 
 #
 ################################################################################
 
-WPEWEBKIT_VERSION = 2.22.5
+WPEWEBKIT_VERSION = 2.24.1
 WPEWEBKIT_SITE = http://www.wpewebkit.org/releases
 WPEWEBKIT_SOURCE = wpewebkit-$(WPEWEBKIT_VERSION).tar.xz
 WPEWEBKIT_INSTALL_STAGING = YES
@@ -14,19 +14,13 @@  WPEWEBKIT_LICENSE_FILES = \
 	Source/WebCore/LICENSE-LGPL-2.1
 WPEWEBKIT_DEPENDENCIES = host-gperf host-python host-ruby \
 	harfbuzz cairo icu jpeg libepoxy libgcrypt libgles libsoup libtasn1 \
-	libpng libxslt wayland-protocols webp wpebackend-fdo
+	libpng libxslt openjpeg wayland-protocols webp wpebackend-fdo
 
 WPEWEBKIT_CONF_OPTS = \
 	-DPORT=WPE \
 	-DENABLE_API_TESTS=OFF \
 	-DENABLE_MINIBROWSER=OFF
 
-ifeq ($(BR2_PACKAGE_WPEWEBKIT_ARCH_SUPPORTS_JIT),y)
-WPEWEBKIT_CONF_OPTS += -DENABLE_JIT=ON
-else
-WPEWEBKIT_CONF_OPTS += -DENABLE_JIT=OFF
-endif
-
 ifeq ($(BR2_PACKAGE_WPEWEBKIT_MULTIMEDIA),y)
 WPEWEBKIT_CONF_OPTS += \
 	-DENABLE_VIDEO=ON \