From f1322fbabfd71ac6d4c5bb6a894567402a4f1bae Mon Sep 17 00:00:00 2001 From: Bo Ren Date: Thu, 4 May 2023 14:24:07 +0800 Subject: [PATCH 1/2] update to libwebp-1.2.0-5.el9_0.src.rpm Signed-off-by: Bo Ren --- libwebp.spec | 15 +++++----- mozilla-1819244.patch | 68 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+), 7 deletions(-) create mode 100644 mozilla-1819244.patch diff --git a/libwebp.spec b/libwebp.spec index 28b5f6e..8107478 100644 --- a/libwebp.spec +++ b/libwebp.spec @@ -1,9 +1,8 @@ -%define anolis_release .0.1 %global _hardened_build 1 Name: libwebp Version: 1.2.0 -Release: 3%{anolis_release}%{?dist} +Release: 5%{?dist} URL: http://webmproject.org/ Summary: Library and tools for the WebP graphics format # Additional IPR is licensed as well. See PATENTS file for details @@ -11,7 +10,7 @@ License: BSD Source0: http://downloads.webmproject.org/releases/webp/%{name}-%{version}.tar.gz Source1: libwebp_jni_example.java Patch0: libwebp-freeglut.patch -Obsoletes: libwebp7 <= 1.0.3 +Patch1: mozilla-1819244.patch BuildRequires: libjpeg-devel BuildRequires: libpng-devel @@ -34,7 +33,7 @@ images more efficiently. %package tools Summary: The WebP command line tools -Obsoletes: libwebp7-tools <= 1.0.3 +Requires: %{name}%{?_isa} = %{version}-%{release} %description tools WebP is an image format that does lossy compression of digital @@ -47,7 +46,6 @@ images more efficiently. %package devel Summary: Development files for libwebp, a library for the WebP format Requires: %{name}%{?_isa} = %{version}-%{release} -Obsoletes: libwebp7-devel <= 1.0.3 %description devel WebP is an image format that does lossy compression of digital @@ -147,8 +145,11 @@ cp swig/*.jar swig/*.so %{buildroot}/%{_libdir}/%{name}-java/ %changelog -* Thu Mar 23 2023 Weitao Zhou - 1.2.0-3.0.1 -- Obsoletes libwebp7 from remi repo for better compatibility +* Wed Apr 26 2023 Martin Stransky - 1.2.0-5 +- Fix tools subpackage dependency + +* Wed Apr 26 2023 Martin Stransky - 1.2.0-4 +- Added fix for mzbz#1819244 * Mon Aug 09 2021 Mohan Boddu - 1.2.0-3 - Rebuilt for IMA sigs, glibc 2.34, aarch64 flags diff --git a/mozilla-1819244.patch b/mozilla-1819244.patch new file mode 100644 index 0000000..05fa0f8 --- /dev/null +++ b/mozilla-1819244.patch @@ -0,0 +1,68 @@ + +# HG changeset patch +# User Timothy Nikkel +# Date 1678835815 0 +# Node ID 53b805c752ff23080e100eda2b3b4280d4370b2e +# Parent 8fcdaf8d685d5903b127e041feb1716637b6008f +Bug 1819244. Cherry pic webp commit fix. r=aosmond, a=dsmith + +https://github.com/webmproject/libwebp/commit/a486d800b60d0af4cc0836bf7ed8f21e12974129 + +Differential Revision: https://phabricator.services.mozilla.com/D171814 + +diff --git a/media/libwebp/src/enc/alpha_enc.c b/media/libwebp/src/enc/alpha_enc.c +--- a/src/enc/alpha_enc.c ++++ b/src/enc/alpha_enc.c +@@ -8,16 +8,17 @@ + // ----------------------------------------------------------------------------- + // + // Alpha-plane compression. + // + // Author: Skal (pascal.massimino@gmail.com) + + #include + #include ++#include + + #include "src/enc/vp8i_enc.h" + #include "src/dsp/dsp.h" + #include "src/utils/filters_utils.h" + #include "src/utils/quant_levels_utils.h" + #include "src/utils/utils.h" + #include "src/webp/format_constants.h" + +@@ -143,31 +144,32 @@ static int EncodeAlphaInternal(const uin + output_size = VP8LBitWriterNumBytes(&tmp_bw); + if (output_size > data_size) { + // compressed size is larger than source! Revert to uncompressed mode. + method = ALPHA_NO_COMPRESSION; + VP8LBitWriterWipeOut(&tmp_bw); + } + } else { + VP8LBitWriterWipeOut(&tmp_bw); ++ memset(&result->bw, 0, sizeof(result->bw)); + return 0; + } + } + + if (method == ALPHA_NO_COMPRESSION) { + output = alpha_src; + output_size = data_size; + ok = 1; + } + + // Emit final result. + header = method | (filter << 2); + if (reduce_levels) header |= ALPHA_PREPROCESSED_LEVELS << 4; + +- VP8BitWriterInit(&result->bw, ALPHA_HEADER_LEN + output_size); ++ if (!VP8BitWriterInit(&result->bw, ALPHA_HEADER_LEN + output_size)) ok = 0; + ok = ok && VP8BitWriterAppend(&result->bw, &header, ALPHA_HEADER_LEN); + ok = ok && VP8BitWriterAppend(&result->bw, output, output_size); + + if (method != ALPHA_NO_COMPRESSION) { + VP8LBitWriterWipeOut(&tmp_bw); + } + ok = ok && !result->bw.error_; + result->score = VP8BitWriterSize(&result->bw); + -- Gitee From 858f9f1f1aad99b1c6aa864bc77fe1cca18933a4 Mon Sep 17 00:00:00 2001 From: ZhouWeitao Date: Thu, 23 Mar 2023 15:54:02 +0800 Subject: [PATCH 2/2] Obsoletes libwebp7 from remi repo for better compatibility Signed-off-by: ZhouWeitao --- libwebp.spec | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/libwebp.spec b/libwebp.spec index 8107478..469354b 100644 --- a/libwebp.spec +++ b/libwebp.spec @@ -1,8 +1,9 @@ +%define anolis_release .0.1 %global _hardened_build 1 Name: libwebp Version: 1.2.0 -Release: 5%{?dist} +Release: 5%{anolis_release}%{?dist} URL: http://webmproject.org/ Summary: Library and tools for the WebP graphics format # Additional IPR is licensed as well. See PATENTS file for details @@ -12,6 +13,8 @@ Source1: libwebp_jni_example.java Patch0: libwebp-freeglut.patch Patch1: mozilla-1819244.patch +Obsoletes: libwebp7 <= 1.0.3 + BuildRequires: libjpeg-devel BuildRequires: libpng-devel BuildRequires: giflib-devel @@ -34,6 +37,7 @@ images more efficiently. %package tools Summary: The WebP command line tools Requires: %{name}%{?_isa} = %{version}-%{release} +Obsoletes: libwebp7-tools <= 1.0.3 %description tools WebP is an image format that does lossy compression of digital @@ -46,6 +50,7 @@ images more efficiently. %package devel Summary: Development files for libwebp, a library for the WebP format Requires: %{name}%{?_isa} = %{version}-%{release} +Obsoletes: libwebp7-devel <= 1.0.3 %description devel WebP is an image format that does lossy compression of digital @@ -145,6 +150,9 @@ cp swig/*.jar swig/*.so %{buildroot}/%{_libdir}/%{name}-java/ %changelog +* Thu May 04 2023 Weitao Zhou - 1.2.0-5.0.1 +- Obsoletes libwebp7 from remi repo for better compatibility + * Wed Apr 26 2023 Martin Stransky - 1.2.0-5 - Fix tools subpackage dependency -- Gitee