From 2c3e673b31a76a0d21aabcf787190d50d7760847 Mon Sep 17 00:00:00 2001 From: Michal Hlavinka Date: Thu, 18 Jul 2024 16:05:03 +0200 Subject: [PATCH] updated to 2.5.2 (#RHEL-48781) Resolves: #RHEL-48781 --- .gitignore | 1 + gating.yaml | 7 +++++++ heap-buffer-overflow.patch | 22 ---------------------- openjpeg2.spec | 18 +++++++++--------- openjpeg2_opj2.patch | 12 ++++++------ sources | 2 +- 6 files changed, 24 insertions(+), 38 deletions(-) create mode 100644 gating.yaml delete mode 100644 heap-buffer-overflow.patch diff --git a/.gitignore b/.gitignore index e72d436..37049da 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ /openjpeg-2.3.1.tar.gz /openjpeg-2.4.0.tar.gz /openjpeg-2.5.0.tar.gz +/openjpeg-2.5.2.tar.gz diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..95f53bc --- /dev/null +++ b/gating.yaml @@ -0,0 +1,7 @@ +--- !Policy +product_versions: + - rhel-10 +decision_context: osci_compose_gate +rules: + - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} + - !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional} diff --git a/heap-buffer-overflow.patch b/heap-buffer-overflow.patch deleted file mode 100644 index 6dcd51a..0000000 --- a/heap-buffer-overflow.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -rupN --no-dereference openjpeg-2.4.0/src/bin/common/color.c openjpeg-2.4.0-new/src/bin/common/color.c ---- openjpeg-2.4.0/src/bin/common/color.c 2020-12-28 21:59:39.000000000 +0100 -+++ openjpeg-2.4.0-new/src/bin/common/color.c 2021-05-27 23:46:46.961130438 +0200 -@@ -368,12 +368,15 @@ static void sycc420_to_rgb(opj_image_t * - - sycc_to_rgb(offset, upb, *y, *cb, *cr, r, g, b); - -- ++y; -+ if (*y != img->comps[0].data[loopmaxh]) -+ ++y; - ++r; - ++g; - ++b; -- ++cb; -- ++cr; -+ if (*cb != img->comps[1].data[loopmaxh]) -+ ++cb; -+ if (*cr != img->comps[2].data[loopmaxh]) -+ ++cr; - } - if (j < maxw) { - sycc_to_rgb(offset, upb, *y, *cb, *cr, r, g, b); diff --git a/openjpeg2.spec b/openjpeg2.spec index 7c47a20..c42569e 100644 --- a/openjpeg2.spec +++ b/openjpeg2.spec @@ -13,8 +13,8 @@ %endif Name: openjpeg2 -Version: 2.5.0 -Release: 8%{?dist} +Version: 2.5.2 +Release: 1%{?dist} Summary: C-Library for JPEG 2000 # windirent.h is MIT, the rest is BSD @@ -28,9 +28,6 @@ Source1: data.tar.xz # Rename tool names to avoid conflicts with openjpeg-1.x Patch0: openjpeg2_opj2.patch -# Backport proposed patch for heap buffer overflow (#1957616) -# See https://github.com/uclouvain/openjpeg/issues/1347 -Patch1: heap-buffer-overflow.patch BuildRequires: cmake @@ -199,6 +196,7 @@ Development files for OpenJPEG2 JPIP module %package jpip-tools Summary: OpenJPEG2 JPIP module command line tools +License: BSD-2-Clause AND LGPL-2.0-or-later WITH WxWindows-exception-3.1 Requires: %{name}-jpip%{?_isa} = %{version}-%{release} Requires: jpackage-utils Requires: java @@ -354,9 +352,8 @@ rm -rf %{buildroot}%{mingw64_datadir}/doc %dir %{_includedir}/openjpeg-2.5/ %{_includedir}/openjpeg-2.5/openjpeg.h %{_includedir}/openjpeg-2.5/opj_config.h -%{_includedir}/openjpeg-2.5/opj_stdint.h %{_libdir}/libopenjp2.so -%{_libdir}/openjpeg-2.5/ +%{_libdir}/cmake/openjpeg-2.5/ %{_libdir}/pkgconfig/libopenjp2.pc %files devel-docs @@ -420,8 +417,8 @@ rm -rf %{buildroot}%{mingw64_datadir}/doc %{mingw32_bindir}/libopenjp2.dll %{mingw32_libdir}/libopenjp2.dll.a %{mingw32_includedir}/openjpeg-2.5/ -%{mingw32_libdir}/openjpeg-2.5/ %{mingw32_libdir}/pkgconfig/libopenjp2.pc +%{mingw32_libdir}/cmake/openjpeg-2.5/ %files -n mingw32-%{name}-tools %{mingw32_bindir}/opj2_compress.exe @@ -433,8 +430,8 @@ rm -rf %{buildroot}%{mingw64_datadir}/doc %{mingw64_bindir}/libopenjp2.dll %{mingw64_libdir}/libopenjp2.dll.a %{mingw64_includedir}/openjpeg-2.5/ -%{mingw64_libdir}/openjpeg-2.5/ %{mingw64_libdir}/pkgconfig/libopenjp2.pc +%{mingw64_libdir}/cmake/openjpeg-2.5/ %files -n mingw64-%{name}-tools %{mingw64_bindir}/opj2_compress.exe @@ -444,6 +441,9 @@ rm -rf %{buildroot}%{mingw64_datadir}/doc %changelog +* Thu Jul 18 2024 Michal Hlavinka - 2.5.2-1 +- updated to 2.5.2 (#RHEL-48781) + * Mon Jun 24 2024 Troy Dawson - 2.5.0-8 - Bump release for June 2024 mass rebuild diff --git a/openjpeg2_opj2.patch b/openjpeg2_opj2.patch index 0ae7f66..72a9cff 100644 --- a/openjpeg2_opj2.patch +++ b/openjpeg2_opj2.patch @@ -1,12 +1,12 @@ -diff -rupN --no-dereference openjpeg-2.5.0/src/bin/jp2/CMakeLists.txt openjpeg-2.5.0-new/src/bin/jp2/CMakeLists.txt ---- openjpeg-2.5.0/src/bin/jp2/CMakeLists.txt 2022-05-13 18:54:29.000000000 +0200 -+++ openjpeg-2.5.0-new/src/bin/jp2/CMakeLists.txt 2022-05-16 10:23:47.026551355 +0200 +diff -rupN --no-dereference openjpeg-2.5.2/src/bin/jp2/CMakeLists.txt openjpeg-2.5.2-new/src/bin/jp2/CMakeLists.txt +--- openjpeg-2.5.2/src/bin/jp2/CMakeLists.txt 2024-02-28 14:32:43.000000000 +0100 ++++ openjpeg-2.5.2-new/src/bin/jp2/CMakeLists.txt 2024-02-28 17:24:59.806790712 +0100 @@ -44,6 +44,8 @@ endif() # Loop over all executables: foreach(exe opj_decompress opj_compress opj_dump) add_executable(${exe} ${exe}.c ${common_SRCS}) + string(REPLACE "opj_" "opj2_" exe2 ${exe}) + set_target_properties(${exe} PROPERTIES OUTPUT_NAME ${exe2}) - if(NOT ${CMAKE_VERSION} VERSION_LESS "2.8.12") - target_compile_options(${exe} PRIVATE ${OPENJP2_COMPILE_OPTIONS}) - endif() + target_compile_options(${exe} PRIVATE ${OPENJP2_COMPILE_OPTIONS}) + target_link_libraries(${exe} ${OPENJPEG_LIBRARY_NAME} + ${PNG_LIBNAME} ${TIFF_LIBNAME} ${LCMS_LIBNAME} diff --git a/sources b/sources index c1152a2..b384307 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (openjpeg-2.5.0.tar.gz) = 08975a2dd79f1e29fd1824249a5fbe66026640ed787b3a3aa8807c2c69f994240ff33e2132f8bf15bbc2202bef7001f98e42d487231d4eebc8e503538658049a +SHA512 (openjpeg-2.5.2.tar.gz) = 24c058b3e0710e689ba7fd6bce8a88353ce64e825b2e5bbf6b00ca3f2a2ec1e9c70a72e0252a5c89d10c537cf84d55af54bf2f16c58ca01db98c2018cf132e1a