libjpeg-turbo/libjpeg-turbo.spec

231 lines
6.7 KiB
RPMSpec
Raw Permalink Normal View History

#
Accepting request 1144368 from home:mnhauke:branches:openSUSE:Factory - Update to version 3.0.2 * Fixed a signed integer overflow in the tj3CompressFromYUV8(), tj3DecodeYUV8(), tj3DecompressToYUV8(), and tj3EncodeYUV8() functions, detected by the Clang and GCC undefined behavior sanitizers, that could be triggered by setting the align parameter to an unreasonably large value. This issue did not pose a security threat, but removing the warning made it easier to detect actual security issues, should they arise in the future. * Introduced a new parameter (TJPARAM_MAXMEMORY in the TurboJPEG C API and TJ.PARAM_MAXMEMORY in the TurboJPEG Java API) and a corresponding TJBench option (-maxmemory) for specifying the maximum amount of memory (in megabytes) that will be allocated for intermediate buffers, which are used with progressive JPEG compression and decompression, optimized baseline entropy coding, lossless JPEG compression, and lossless transformation. The new parameter and option serve the same purpose as the max_memory_to_use field in the jpeg_memory_mgr struct in the libjpeg API, the JPEGMEM environment variable, and the cjpeg/djpeg/jpegtran -maxmemory option. * Introduced a new parameter (TJPARAM_MAXPIXELS in the TurboJPEG C API and TJ.PARAM_MAXPIXELS in the TurboJPEG Java API) and a corresponding TJBench option (-maxpixels) for specifying the maximum number of pixels that the decompression, lossless transformation, and packed-pixel image loading functions/methods will process. * Fixed an error ("Unsupported color conversion request") that occurred when attempting to decompress a 3-component lossless JPEG image without an Adobe APP14 marker. The decompressor OBS-URL: https://build.opensuse.org/request/show/1144368 OBS-URL: https://build.opensuse.org/package/show/graphics/libjpeg-turbo?expand=0&rev=153
2024-02-12 09:45:14 +01:00
# spec file for package libjpeg-turbo
#
Accepting request 1136025 from home:dirkmueller:Factory - update to 3.0.1 (bsc#1211542, CVE-2023-2804): * The x86-64 SIMD functions now use a standard stack frame, prologue, and epilogue so that debuggers and profilers can reliably capture backtraces from within the functions. * Fixed two minor issues in the interblock smoothing algorithm that caused mathematical (but not necessarily perceptible) edge block errors when decompressing progressive JPEG images exactly two MCU blocks in width or that use vertical chrominance subsampling. * The TurboJPEG API now supports 4:4:1 (transposed 4:1:1) chrominance subsampling, which allows losslessly transposed or rotated 4:1:1 JPEG images to be losslessly cropped, partially decompressed, or decompressed to planar YUV images. * Fixed various segfaults and buffer overruns (CVE-2023-2804) * that occurred when attempting to decompress various specially-crafted malformed 12-bit-per-component and 16-bit-per-component lossless JPEG images using color quantization or merged chroma upsampling/color conversion. The underlying cause of these issues was that the color quantization and merged chroma upsampling/color conversion algorithms were not designed with lossless decompression in mind. Since libjpeg-turbo explicitly does not support color conversion when compressing or decompressing lossless JPEG images, merged chroma upsampling/color conversion never should have been enabled for such images. Color quantization is a legacy feature that serves little or no purpose with lossless JPEG images, so it is also now disabled when decompressing such images. (As a result, djpeg can no longer decompress a lossless JPEG image into a GIF image.) * Fixed an oversight in 1.4 beta1[8] that caused various OBS-URL: https://build.opensuse.org/request/show/1136025 OBS-URL: https://build.opensuse.org/package/show/graphics/libjpeg-turbo?expand=0&rev=149
2024-01-02 12:29:38 +01:00
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == ""
%global flavor libjpeg-turbo
%endif
%define asan_build 0
%define debug_build 0
Accepting request 1144368 from home:mnhauke:branches:openSUSE:Factory - Update to version 3.0.2 * Fixed a signed integer overflow in the tj3CompressFromYUV8(), tj3DecodeYUV8(), tj3DecompressToYUV8(), and tj3EncodeYUV8() functions, detected by the Clang and GCC undefined behavior sanitizers, that could be triggered by setting the align parameter to an unreasonably large value. This issue did not pose a security threat, but removing the warning made it easier to detect actual security issues, should they arise in the future. * Introduced a new parameter (TJPARAM_MAXMEMORY in the TurboJPEG C API and TJ.PARAM_MAXMEMORY in the TurboJPEG Java API) and a corresponding TJBench option (-maxmemory) for specifying the maximum amount of memory (in megabytes) that will be allocated for intermediate buffers, which are used with progressive JPEG compression and decompression, optimized baseline entropy coding, lossless JPEG compression, and lossless transformation. The new parameter and option serve the same purpose as the max_memory_to_use field in the jpeg_memory_mgr struct in the libjpeg API, the JPEGMEM environment variable, and the cjpeg/djpeg/jpegtran -maxmemory option. * Introduced a new parameter (TJPARAM_MAXPIXELS in the TurboJPEG C API and TJ.PARAM_MAXPIXELS in the TurboJPEG Java API) and a corresponding TJBench option (-maxpixels) for specifying the maximum number of pixels that the decompression, lossless transformation, and packed-pixel image loading functions/methods will process. * Fixed an error ("Unsupported color conversion request") that occurred when attempting to decompress a 3-component lossless JPEG image without an Adobe APP14 marker. The decompressor OBS-URL: https://build.opensuse.org/request/show/1144368 OBS-URL: https://build.opensuse.org/package/show/graphics/libjpeg-turbo?expand=0&rev=153
2024-02-12 09:45:14 +01:00
%define srcver 3.0.2
%if "%{flavor}" == "libjpeg-turbo"
%define major 8
Accepting request 1136025 from home:dirkmueller:Factory - update to 3.0.1 (bsc#1211542, CVE-2023-2804): * The x86-64 SIMD functions now use a standard stack frame, prologue, and epilogue so that debuggers and profilers can reliably capture backtraces from within the functions. * Fixed two minor issues in the interblock smoothing algorithm that caused mathematical (but not necessarily perceptible) edge block errors when decompressing progressive JPEG images exactly two MCU blocks in width or that use vertical chrominance subsampling. * The TurboJPEG API now supports 4:4:1 (transposed 4:1:1) chrominance subsampling, which allows losslessly transposed or rotated 4:1:1 JPEG images to be losslessly cropped, partially decompressed, or decompressed to planar YUV images. * Fixed various segfaults and buffer overruns (CVE-2023-2804) * that occurred when attempting to decompress various specially-crafted malformed 12-bit-per-component and 16-bit-per-component lossless JPEG images using color quantization or merged chroma upsampling/color conversion. The underlying cause of these issues was that the color quantization and merged chroma upsampling/color conversion algorithms were not designed with lossless decompression in mind. Since libjpeg-turbo explicitly does not support color conversion when compressing or decompressing lossless JPEG images, merged chroma upsampling/color conversion never should have been enabled for such images. Color quantization is a legacy feature that serves little or no purpose with lossless JPEG images, so it is also now disabled when decompressing such images. (As a result, djpeg can no longer decompress a lossless JPEG image into a GIF image.) * Fixed an oversight in 1.4 beta1[8] that caused various OBS-URL: https://build.opensuse.org/request/show/1136025 OBS-URL: https://build.opensuse.org/package/show/graphics/libjpeg-turbo?expand=0&rev=149
2024-01-02 12:29:38 +01:00
%define minor 3
%define micro 2
%define tmajor 0
Accepting request 1136025 from home:dirkmueller:Factory - update to 3.0.1 (bsc#1211542, CVE-2023-2804): * The x86-64 SIMD functions now use a standard stack frame, prologue, and epilogue so that debuggers and profilers can reliably capture backtraces from within the functions. * Fixed two minor issues in the interblock smoothing algorithm that caused mathematical (but not necessarily perceptible) edge block errors when decompressing progressive JPEG images exactly two MCU blocks in width or that use vertical chrominance subsampling. * The TurboJPEG API now supports 4:4:1 (transposed 4:1:1) chrominance subsampling, which allows losslessly transposed or rotated 4:1:1 JPEG images to be losslessly cropped, partially decompressed, or decompressed to planar YUV images. * Fixed various segfaults and buffer overruns (CVE-2023-2804) * that occurred when attempting to decompress various specially-crafted malformed 12-bit-per-component and 16-bit-per-component lossless JPEG images using color quantization or merged chroma upsampling/color conversion. The underlying cause of these issues was that the color quantization and merged chroma upsampling/color conversion algorithms were not designed with lossless decompression in mind. Since libjpeg-turbo explicitly does not support color conversion when compressing or decompressing lossless JPEG images, merged chroma upsampling/color conversion never should have been enabled for such images. Color quantization is a legacy feature that serves little or no purpose with lossless JPEG images, so it is also now disabled when decompressing such images. (As a result, djpeg can no longer decompress a lossless JPEG image into a GIF image.) * Fixed an oversight in 1.4 beta1[8] that caused various OBS-URL: https://build.opensuse.org/request/show/1136025 OBS-URL: https://build.opensuse.org/package/show/graphics/libjpeg-turbo?expand=0&rev=149
2024-01-02 12:29:38 +01:00
%define tminor 3
%define tmicro 0
%define tlibver %{tmajor}.%{tminor}.%{tmicro}
%endif
%if "%{flavor}" == "libjpeg62-turbo"
%define major 62
Accepting request 1136025 from home:dirkmueller:Factory - update to 3.0.1 (bsc#1211542, CVE-2023-2804): * The x86-64 SIMD functions now use a standard stack frame, prologue, and epilogue so that debuggers and profilers can reliably capture backtraces from within the functions. * Fixed two minor issues in the interblock smoothing algorithm that caused mathematical (but not necessarily perceptible) edge block errors when decompressing progressive JPEG images exactly two MCU blocks in width or that use vertical chrominance subsampling. * The TurboJPEG API now supports 4:4:1 (transposed 4:1:1) chrominance subsampling, which allows losslessly transposed or rotated 4:1:1 JPEG images to be losslessly cropped, partially decompressed, or decompressed to planar YUV images. * Fixed various segfaults and buffer overruns (CVE-2023-2804) * that occurred when attempting to decompress various specially-crafted malformed 12-bit-per-component and 16-bit-per-component lossless JPEG images using color quantization or merged chroma upsampling/color conversion. The underlying cause of these issues was that the color quantization and merged chroma upsampling/color conversion algorithms were not designed with lossless decompression in mind. Since libjpeg-turbo explicitly does not support color conversion when compressing or decompressing lossless JPEG images, merged chroma upsampling/color conversion never should have been enabled for such images. Color quantization is a legacy feature that serves little or no purpose with lossless JPEG images, so it is also now disabled when decompressing such images. (As a result, djpeg can no longer decompress a lossless JPEG image into a GIF image.) * Fixed an oversight in 1.4 beta1[8] that caused various OBS-URL: https://build.opensuse.org/request/show/1136025 OBS-URL: https://build.opensuse.org/package/show/graphics/libjpeg-turbo?expand=0&rev=149
2024-01-02 12:29:38 +01:00
%define minor 4
%define micro 0
%endif
%define libver %{major}.%{minor}.%{micro}
Name: %{flavor}
Version: %{srcver}
Release: 0
Summary: A SIMD-accelerated library for manipulating JPEG image files
License: BSD-3-Clause
Accepting request 1136025 from home:dirkmueller:Factory - update to 3.0.1 (bsc#1211542, CVE-2023-2804): * The x86-64 SIMD functions now use a standard stack frame, prologue, and epilogue so that debuggers and profilers can reliably capture backtraces from within the functions. * Fixed two minor issues in the interblock smoothing algorithm that caused mathematical (but not necessarily perceptible) edge block errors when decompressing progressive JPEG images exactly two MCU blocks in width or that use vertical chrominance subsampling. * The TurboJPEG API now supports 4:4:1 (transposed 4:1:1) chrominance subsampling, which allows losslessly transposed or rotated 4:1:1 JPEG images to be losslessly cropped, partially decompressed, or decompressed to planar YUV images. * Fixed various segfaults and buffer overruns (CVE-2023-2804) * that occurred when attempting to decompress various specially-crafted malformed 12-bit-per-component and 16-bit-per-component lossless JPEG images using color quantization or merged chroma upsampling/color conversion. The underlying cause of these issues was that the color quantization and merged chroma upsampling/color conversion algorithms were not designed with lossless decompression in mind. Since libjpeg-turbo explicitly does not support color conversion when compressing or decompressing lossless JPEG images, merged chroma upsampling/color conversion never should have been enabled for such images. Color quantization is a legacy feature that serves little or no purpose with lossless JPEG images, so it is also now disabled when decompressing such images. (As a result, djpeg can no longer decompress a lossless JPEG image into a GIF image.) * Fixed an oversight in 1.4 beta1[8] that caused various OBS-URL: https://build.opensuse.org/request/show/1136025 OBS-URL: https://build.opensuse.org/package/show/graphics/libjpeg-turbo?expand=0&rev=149
2024-01-02 12:29:38 +01:00
URL: https://libjpeg-turbo.org/
Source0: https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/%{version}/libjpeg-turbo-%{version}.tar.gz
Source1: https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/%{version}/libjpeg-turbo-%{version}.tar.gz.sig
Accepting request 826111 from home:elimat:branches:graphics - Update to version 2.0.5 * Worked around issues in the MIPS DSPr2 SIMD extensions that caused failures in the libjpeg-turbo regression tests. Specifically, the jsimd_h2v1_downsample_dspr2() and jsimd_h2v2_downsample_dspr2() functions in the MIPS DSPr2 SIMD extensions are now disabled until/unless they can be fixed, and other functions that are incompatible with big endian MIPS CPUs are disabled when building libjpeg-turbo for such CPUs. * Fixed an oversight in the TJCompressor.compress(int) method in the TurboJPEG Java API that caused an error ("java.lang.IllegalStateException: No source image is associated with this instance") when attempting to use that method to compress a YUV image. * Fixed an issue (CVE-2020-13790) in the PPM reader that caused a buffer overrun in cjpeg, TJBench, or the tjLoadImage() function if one of the values in a binary PPM/PGM input file exceeded the maximum value defined in the file's header and that maximum value was less than 255. libjpeg-turbo 1.5.0 already included a similar fix for binary PPM/PGM files with maximum values greater than 255. * The TurboJPEG API library's global error handler, which is used in functions such as tjBufSize() and tjLoadImage() that do not require a TurboJPEG instance handle, is now thread-safe on platforms that support thread-local storage. - Fix source verification - Drop patches fixed upstream: * ctest-depends.patch * libjpeg-turbo-CVE-2020-13790.patch - Run spec-cleaner * Remove package groups * Use make macros - Update to version 2.0.5 * Worked around issues in the MIPS DSPr2 SIMD extensions that caused failures in the libjpeg-turbo regression tests. Specifically, the jsimd_h2v1_downsample_dspr2() and jsimd_h2v2_downsample_dspr2() functions in the MIPS DSPr2 SIMD extensions are now disabled until/unless they can be fixed, and other functions that are incompatible with big endian MIPS CPUs are disabled when building libjpeg-turbo for such CPUs. * Fixed an oversight in the TJCompressor.compress(int) method in the TurboJPEG Java API that caused an error ("java.lang.IllegalStateException: No source image is associated with this instance") when attempting to use that method to compress a YUV image. * Fixed an issue (CVE-2020-13790) in the PPM reader that caused a buffer overrun in cjpeg, TJBench, or the tjLoadImage() function if one of the values in a binary PPM/PGM input file exceeded the maximum value defined in the file's header and that maximum value was less than 255. libjpeg-turbo 1.5.0 already included a similar fix for binary PPM/PGM files with maximum values greater than 255. * The TurboJPEG API library's global error handler, which is used in functions such as tjBufSize() and tjLoadImage() that do not require a TurboJPEG instance handle, is now thread-safe on platforms that support thread-local storage. - Drop patches fixed upstream: * ctest-depends.patch * libjpeg-turbo-CVE-2020-13790.patch - Run spec-cleaner * Remove package groups * Use make macros OBS-URL: https://build.opensuse.org/request/show/826111 OBS-URL: https://build.opensuse.org/package/show/graphics/libjpeg-turbo?expand=0&rev=111
2020-08-13 09:14:02 +02:00
Source2: libjpeg-turbo.keyring
Source3: baselibs.conf
Patch1: libjpeg-turbo-1.3.0-tiff-ojpeg.patch
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: nasm
- Update to version 1.5.0 + Fixed an issue whereby a malformed motion-JPEG frame could cause the "fast path" of libjpeg-turbo's Huffman decoder to read from uninitialized memory. + Added libjpeg-turbo version and build information to the global string table of the libjpeg and TurboJPEG API libraries. + Fixed a couple of issues in the PPM reader that would cause buffer overruns in cjpeg if one of the values in a binary PPM/PGM input file exceeded the maximum value defined in the file's header. libjpeg-turbo 1.4.2 already included a similar fix for ASCII PPM/PGM files. Note that these issues were not security bugs, since they were confined to the cjpeg program and did not affect any of the libjpeg-turbo libraries. + Fixed an issue whereby attempting to decompress a JPEG file with a corrupt header using the tjDecompressToYUV2() function would cause the function to abort without returning an error and, under certain circumstances, corrupt the stack. This only occurred if tjDecompressToYUV2() was called prior to calling tjDecompressHeader3(), or if the return value from tjDecompressHeader3() was ignored (both cases represent incorrect usage of the TurboJPEG API.) + The jpeg_stdio_src(), jpeg_mem_src(), jpeg_stdio_dest(), and jpeg_mem_dest() functions in the libjpeg API will now throw an error if a source/destination manager has already been assigned to the compress or decompress object by a different function or by the calling program. - Update to version 1.5.0 + Fixed an issue whereby a malformed motion-JPEG frame could cause the "fast path" of libjpeg-turbo's Huffman decoder to OBS-URL: https://build.opensuse.org/package/show/graphics/libjpeg-turbo?expand=0&rev=59
2016-06-08 10:11:04 +02:00
BuildRequires: pkgconfig
%if "%{flavor}" == "libjpeg-turbo"
Conflicts: jpeg%{major}
Obsoletes: jpeg = 6b
Obsoletes: jpeg = 8.0.1
Obsoletes: jpeg = 8.0.2
Provides: jpeg = %{version}
Obsoletes: jpeg < %{version}
Provides: jpegtran = %{version}
%{?suse_build_hwcaps_libs}
%endif
%if "%{flavor}" == "libjpeg62-turbo"
# needed for tests as we remove the lib here
BuildRequires: libturbojpeg0 >= 8.2.2
Conflicts: jpeg%{major}
%endif
%description
The libjpeg-turbo package contains a library of functions for manipulating
JPEG images. It supports architecture-specific SIMD instructions,
such as SSE/SSE2/AVX2, AltiVec, NEON, MIPS DSPR2, and Loongson MMI.
%if "%{flavor}" == "libjpeg-turbo"
It also includes the following command line utilities:
djpeg - decompress a JPEG file to an image file
jpegtran - lossless transformation of JPEG files
rdjpgcom - display text comments from a JPEG file
wrjpgcom - insert text comments into a JPEG file
tjbench - a JPEG decompression/compression benchmark
%endif
%package -n libjpeg%{major}
Version: %{libver}
Release: 0
Summary: A SIMD-accelerated JPEG compression/decompression library
%description -n libjpeg%{major}
A library for manipulating JPEG images. It supports
architecture-specific SIMD instructions, such as SSE/SSE2/AVX2,
AltiVec, NEON, MIPS DSPR2, and Loongson MMI.
%if "%{flavor}" == "libjpeg-turbo"
%package -n libturbojpeg%{tmajor}
Version: %{version}
Release: 0
Summary: A SIMD-accelerated JPEG compression/decompression library
%description -n libturbojpeg%{tmajor}
A library for manipulating JPEG images. It supports
architecture-specific SIMD instructions, such as SSE/SSE2/AVX2,
AltiVec, NEON, MIPS DSPR2, and Loongson MMI.
%endif
%package -n libjpeg%{major}-devel
Version: %{libver}
Release: 0
Summary: Development Tools for applications which will use the Libjpeg Library
Requires: libjpeg%{major} = %{version}
%if "%{flavor}" == "libjpeg-turbo"
Requires: libturbojpeg%{tmajor} = %{version}
%endif
Conflicts: libjpeg-devel
Provides: libjpeg-devel = %{version}
Obsoletes: libjpeg-devel < %{version}
%description -n libjpeg%{major}-devel
The libjpeg-devel package includes the header files and libraries
necessary for compiling and linking programs which will manipulate JPEG
files using the libjpeg library.
%prep
%autosetup -p1 -n libjpeg-turbo-%{srcver}
%build
MYLDFLAGS="-Wl,-z,relro,-z,now"
MYCFLAGS="%{optflags}"
%if %{asan_build}
MYLDFLAGS="$MYLDFLAGS -lasan"
MYCFLAGS="$MYCFLAGS -fsanitize=address"
%endif
%if %{debug_build}
MYCFLAGS="$MYCFLAGS -O0 -g"
%endif
%cmake \
%if "%{flavor}" == "libjpeg-turbo"
-DWITH_JPEG8=ON \
%endif
%if %{debug_build} || %{asan_build}
-DCMAKE_BUILD_TYPE=DEBUG \
-DCMAKE_C_FLAGS_DEBUG="$MYCFLAGS" \
%endif
%ifarch armv6l armv6hl
-DWITH_SIMD=FALSE \
%endif
%ifarch x86_64 %{ix86} aarch64 ppc64le
Accepting request 1136025 from home:dirkmueller:Factory - update to 3.0.1 (bsc#1211542, CVE-2023-2804): * The x86-64 SIMD functions now use a standard stack frame, prologue, and epilogue so that debuggers and profilers can reliably capture backtraces from within the functions. * Fixed two minor issues in the interblock smoothing algorithm that caused mathematical (but not necessarily perceptible) edge block errors when decompressing progressive JPEG images exactly two MCU blocks in width or that use vertical chrominance subsampling. * The TurboJPEG API now supports 4:4:1 (transposed 4:1:1) chrominance subsampling, which allows losslessly transposed or rotated 4:1:1 JPEG images to be losslessly cropped, partially decompressed, or decompressed to planar YUV images. * Fixed various segfaults and buffer overruns (CVE-2023-2804) * that occurred when attempting to decompress various specially-crafted malformed 12-bit-per-component and 16-bit-per-component lossless JPEG images using color quantization or merged chroma upsampling/color conversion. The underlying cause of these issues was that the color quantization and merged chroma upsampling/color conversion algorithms were not designed with lossless decompression in mind. Since libjpeg-turbo explicitly does not support color conversion when compressing or decompressing lossless JPEG images, merged chroma upsampling/color conversion never should have been enabled for such images. Color quantization is a legacy feature that serves little or no purpose with lossless JPEG images, so it is also now disabled when decompressing such images. (As a result, djpeg can no longer decompress a lossless JPEG image into a GIF image.) * Fixed an oversight in 1.4 beta1[8] that caused various OBS-URL: https://build.opensuse.org/request/show/1136025 OBS-URL: https://build.opensuse.org/package/show/graphics/libjpeg-turbo?expand=0&rev=149
2024-01-02 12:29:38 +01:00
-DREQUIRE_SIMD=TRUE \
%endif
-DCMAKE_SHARED_LINKER_FLAGS="$MYLDFLAGS" \
-DENABLE_STATIC=OFF \
%ifarch s390x riscv64
-DFLOATTEST=fp-contract \
%endif
%{nil}
Accepting request 826111 from home:elimat:branches:graphics - Update to version 2.0.5 * Worked around issues in the MIPS DSPr2 SIMD extensions that caused failures in the libjpeg-turbo regression tests. Specifically, the jsimd_h2v1_downsample_dspr2() and jsimd_h2v2_downsample_dspr2() functions in the MIPS DSPr2 SIMD extensions are now disabled until/unless they can be fixed, and other functions that are incompatible with big endian MIPS CPUs are disabled when building libjpeg-turbo for such CPUs. * Fixed an oversight in the TJCompressor.compress(int) method in the TurboJPEG Java API that caused an error ("java.lang.IllegalStateException: No source image is associated with this instance") when attempting to use that method to compress a YUV image. * Fixed an issue (CVE-2020-13790) in the PPM reader that caused a buffer overrun in cjpeg, TJBench, or the tjLoadImage() function if one of the values in a binary PPM/PGM input file exceeded the maximum value defined in the file's header and that maximum value was less than 255. libjpeg-turbo 1.5.0 already included a similar fix for binary PPM/PGM files with maximum values greater than 255. * The TurboJPEG API library's global error handler, which is used in functions such as tjBufSize() and tjLoadImage() that do not require a TurboJPEG instance handle, is now thread-safe on platforms that support thread-local storage. - Fix source verification - Drop patches fixed upstream: * ctest-depends.patch * libjpeg-turbo-CVE-2020-13790.patch - Run spec-cleaner * Remove package groups * Use make macros - Update to version 2.0.5 * Worked around issues in the MIPS DSPr2 SIMD extensions that caused failures in the libjpeg-turbo regression tests. Specifically, the jsimd_h2v1_downsample_dspr2() and jsimd_h2v2_downsample_dspr2() functions in the MIPS DSPr2 SIMD extensions are now disabled until/unless they can be fixed, and other functions that are incompatible with big endian MIPS CPUs are disabled when building libjpeg-turbo for such CPUs. * Fixed an oversight in the TJCompressor.compress(int) method in the TurboJPEG Java API that caused an error ("java.lang.IllegalStateException: No source image is associated with this instance") when attempting to use that method to compress a YUV image. * Fixed an issue (CVE-2020-13790) in the PPM reader that caused a buffer overrun in cjpeg, TJBench, or the tjLoadImage() function if one of the values in a binary PPM/PGM input file exceeded the maximum value defined in the file's header and that maximum value was less than 255. libjpeg-turbo 1.5.0 already included a similar fix for binary PPM/PGM files with maximum values greater than 255. * The TurboJPEG API library's global error handler, which is used in functions such as tjBufSize() and tjLoadImage() that do not require a TurboJPEG instance handle, is now thread-safe on platforms that support thread-local storage. - Drop patches fixed upstream: * ctest-depends.patch * libjpeg-turbo-CVE-2020-13790.patch - Run spec-cleaner * Remove package groups * Use make macros OBS-URL: https://build.opensuse.org/request/show/826111 OBS-URL: https://build.opensuse.org/package/show/graphics/libjpeg-turbo?expand=0&rev=111
2020-08-13 09:14:02 +02:00
%make_build
%check
%if %{asan_build}
# ASAN needs /proc to be mounted
exit 0
%endif
export LD_LIBRARY_PATH=%{buildroot}%{_libdir}${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
%if 0%{?fedora_version} || 0%{?centos_version}
ctest --output-on-failure --force-new-ctest-process
%else
%ctest
%endif
%install
%if 0%{?fedora_version} || 0%{?centos_version}
make DESTDIR=%{buildroot} install/fast
%else
%cmake_install
%endif
# Remove docs, we'll select docs manually
rm -rf %{buildroot}%{_datadir}/doc/
%if "%{flavor}" == "libjpeg62-turbo"
# Remove unwanted files
rm %{buildroot}%{_bindir}/*
rm %{buildroot}%{_mandir}/man1/*
# libjpegturbo is provided with libjpeg-turbo.spec yet
rm %{buildroot}%{_includedir}/turbojpeg.h
rm %{buildroot}%{_libdir}/libturbojpeg.so*
rm %{buildroot}%{_libdir}/pkgconfig/libturbojpeg.pc
rm -r %{buildroot}%{_libdir}/cmake
%endif
%post -n libjpeg%{major} -p /sbin/ldconfig
%postun -n libjpeg%{major} -p /sbin/ldconfig
%if "%{flavor}" == "libjpeg-turbo"
%post -n libturbojpeg%{tmajor} -p /sbin/ldconfig
%postun -n libturbojpeg%{tmajor} -p /sbin/ldconfig
%endif
%if "%{flavor}" == "libjpeg-turbo"
%files
- Update to version 1.5.0 + Fixed an issue whereby a malformed motion-JPEG frame could cause the "fast path" of libjpeg-turbo's Huffman decoder to read from uninitialized memory. + Added libjpeg-turbo version and build information to the global string table of the libjpeg and TurboJPEG API libraries. + Fixed a couple of issues in the PPM reader that would cause buffer overruns in cjpeg if one of the values in a binary PPM/PGM input file exceeded the maximum value defined in the file's header. libjpeg-turbo 1.4.2 already included a similar fix for ASCII PPM/PGM files. Note that these issues were not security bugs, since they were confined to the cjpeg program and did not affect any of the libjpeg-turbo libraries. + Fixed an issue whereby attempting to decompress a JPEG file with a corrupt header using the tjDecompressToYUV2() function would cause the function to abort without returning an error and, under certain circumstances, corrupt the stack. This only occurred if tjDecompressToYUV2() was called prior to calling tjDecompressHeader3(), or if the return value from tjDecompressHeader3() was ignored (both cases represent incorrect usage of the TurboJPEG API.) + The jpeg_stdio_src(), jpeg_mem_src(), jpeg_stdio_dest(), and jpeg_mem_dest() functions in the libjpeg API will now throw an error if a source/destination manager has already been assigned to the compress or decompress object by a different function or by the calling program. - Update to version 1.5.0 + Fixed an issue whereby a malformed motion-JPEG frame could cause the "fast path" of libjpeg-turbo's Huffman decoder to OBS-URL: https://build.opensuse.org/package/show/graphics/libjpeg-turbo?expand=0&rev=59
2016-06-08 10:11:04 +02:00
%doc README.md change.log ChangeLog.md
%doc usage.txt wizard.txt
%{_bindir}/*
%{_mandir}/man1/*
%endif
%files -n libjpeg%{major}
%license LICENSE.md
%{_libdir}/libjpeg.so.%{libver}
%{_libdir}/libjpeg.so.%{major}
%if "%{flavor}" == "libjpeg-turbo"
%files -n libturbojpeg%{tmajor}
%license LICENSE.md
%{_libdir}/libturbojpeg.so.%{tmajor}
%{_libdir}/libturbojpeg.so.%{tlibver}
%endif
%files -n libjpeg%{major}-devel
%{_includedir}/*.h
%{_libdir}/libjpeg.so
- Update to version 1.5.0 + Fixed an issue whereby a malformed motion-JPEG frame could cause the "fast path" of libjpeg-turbo's Huffman decoder to read from uninitialized memory. + Added libjpeg-turbo version and build information to the global string table of the libjpeg and TurboJPEG API libraries. + Fixed a couple of issues in the PPM reader that would cause buffer overruns in cjpeg if one of the values in a binary PPM/PGM input file exceeded the maximum value defined in the file's header. libjpeg-turbo 1.4.2 already included a similar fix for ASCII PPM/PGM files. Note that these issues were not security bugs, since they were confined to the cjpeg program and did not affect any of the libjpeg-turbo libraries. + Fixed an issue whereby attempting to decompress a JPEG file with a corrupt header using the tjDecompressToYUV2() function would cause the function to abort without returning an error and, under certain circumstances, corrupt the stack. This only occurred if tjDecompressToYUV2() was called prior to calling tjDecompressHeader3(), or if the return value from tjDecompressHeader3() was ignored (both cases represent incorrect usage of the TurboJPEG API.) + The jpeg_stdio_src(), jpeg_mem_src(), jpeg_stdio_dest(), and jpeg_mem_dest() functions in the libjpeg API will now throw an error if a source/destination manager has already been assigned to the compress or decompress object by a different function or by the calling program. - Update to version 1.5.0 + Fixed an issue whereby a malformed motion-JPEG frame could cause the "fast path" of libjpeg-turbo's Huffman decoder to OBS-URL: https://build.opensuse.org/package/show/graphics/libjpeg-turbo?expand=0&rev=59
2016-06-08 10:11:04 +02:00
%{_libdir}/pkgconfig/libjpeg.pc
%doc coderules.txt jconfig.txt libjpeg.txt structure.txt tjexample.c
%if "%{flavor}" == "libjpeg-turbo"
%{_libdir}/libturbojpeg.so
- Update to version 1.5.0 + Fixed an issue whereby a malformed motion-JPEG frame could cause the "fast path" of libjpeg-turbo's Huffman decoder to read from uninitialized memory. + Added libjpeg-turbo version and build information to the global string table of the libjpeg and TurboJPEG API libraries. + Fixed a couple of issues in the PPM reader that would cause buffer overruns in cjpeg if one of the values in a binary PPM/PGM input file exceeded the maximum value defined in the file's header. libjpeg-turbo 1.4.2 already included a similar fix for ASCII PPM/PGM files. Note that these issues were not security bugs, since they were confined to the cjpeg program and did not affect any of the libjpeg-turbo libraries. + Fixed an issue whereby attempting to decompress a JPEG file with a corrupt header using the tjDecompressToYUV2() function would cause the function to abort without returning an error and, under certain circumstances, corrupt the stack. This only occurred if tjDecompressToYUV2() was called prior to calling tjDecompressHeader3(), or if the return value from tjDecompressHeader3() was ignored (both cases represent incorrect usage of the TurboJPEG API.) + The jpeg_stdio_src(), jpeg_mem_src(), jpeg_stdio_dest(), and jpeg_mem_dest() functions in the libjpeg API will now throw an error if a source/destination manager has already been assigned to the compress or decompress object by a different function or by the calling program. - Update to version 1.5.0 + Fixed an issue whereby a malformed motion-JPEG frame could cause the "fast path" of libjpeg-turbo's Huffman decoder to OBS-URL: https://build.opensuse.org/package/show/graphics/libjpeg-turbo?expand=0&rev=59
2016-06-08 10:11:04 +02:00
%{_libdir}/pkgconfig/libturbojpeg.pc
%dir %{_libdir}/cmake/libjpeg-turbo
%{_libdir}/cmake/libjpeg-turbo/*
%endif
%changelog