From e51cf536229c6458a604902a4711dee9f7d60d9051b24332844244a08a88f942 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Fri, 3 May 2024 14:35:08 +0200 Subject: [PATCH] Sync from SUSE:SLFO:Main libavif revision 0ed4446653560f2845fac490fdb04ca5 --- .gitattributes | 23 +++ baselibs.conf | 1 + libavif-0.11.1.tar.gz | 3 + libavif-CVE-2023-6704.patch | 30 ++++ libavif.changes | 315 ++++++++++++++++++++++++++++++++++++ libavif.spec | 157 ++++++++++++++++++ 6 files changed, 529 insertions(+) create mode 100644 .gitattributes create mode 100644 baselibs.conf create mode 100644 libavif-0.11.1.tar.gz create mode 100644 libavif-CVE-2023-6704.patch create mode 100644 libavif.changes create mode 100644 libavif.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/baselibs.conf b/baselibs.conf new file mode 100644 index 0000000..346a881 --- /dev/null +++ b/baselibs.conf @@ -0,0 +1 @@ +libavif15 diff --git a/libavif-0.11.1.tar.gz b/libavif-0.11.1.tar.gz new file mode 100644 index 0000000..1f124bc --- /dev/null +++ b/libavif-0.11.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0eb49965562a0e5e5de58389650d434cff32af84c34185b6c9b7b2fccae06d4e +size 5826813 diff --git a/libavif-CVE-2023-6704.patch b/libavif-CVE-2023-6704.patch new file mode 100644 index 0000000..cf3576b --- /dev/null +++ b/libavif-CVE-2023-6704.patch @@ -0,0 +1,30 @@ +From 7845153645cfe245de5add94fb07c227c2d16402 Mon Sep 17 00:00:00 2001 +From: Vignesh Venkatasubramanian +Date: Mon, 27 Nov 2023 11:31:38 -0800 +Subject: [PATCH] Do not store colorproperties until alpha item is found + +colorProperties could be pointing to a dangling pointer if +findAlphaItem() resizes the meta.items array. +--- + +Index: libavif-0.11.1/src/read.c +=================================================================== +--- libavif-0.11.1.orig/src/read.c ++++ libavif-0.11.1/src/read.c +@@ -3487,7 +3487,6 @@ avifResult avifDecoderReset(avifDecoder + avifDiagnosticsPrintf(&decoder->diag, "Primary item not found"); + return AVIF_RESULT_NO_AV1_ITEMS_FOUND; + } +- colorProperties = &colorItem->properties; + + // Find the alphaOBU item, if any + for (uint32_t itemIndex = 0; itemIndex < data->meta->items.count; ++itemIndex) { +@@ -3529,6 +3528,8 @@ avifResult avifDecoderReset(avifDecoder + } + } + ++ colorProperties = &colorItem->properties; ++ + // Find Exif and/or XMP metadata, if any + avifResult findResult = avifDecoderFindMetadata(decoder, data->meta, decoder->image, colorItem->id); + if (findResult != AVIF_RESULT_OK) { diff --git a/libavif.changes b/libavif.changes new file mode 100644 index 0000000..85b2993 --- /dev/null +++ b/libavif.changes @@ -0,0 +1,315 @@ +------------------------------------------------------------------- +Wed Jan 31 07:28:21 UTC 2024 - Xiaoguang Wang + +- Add libavif-CVE-2023-6704.patch: Do not store colorproperties + until alpha item is found (bsc#1218303 CVE-2023-6704). + +------------------------------------------------------------------- +Sun May 7 14:52:35 UTC 2023 - Arjen de Korte + +- Add BuildRequires pkgconfig(libwebp) to enable libsharpyuv + +------------------------------------------------------------------- +Mon Nov 14 11:41:20 UTC 2022 - ecsos + +- Update to version 0.11.1: + * Changed: + - avifincrtest_helpers: Cast 64-bit offset to size_t + - avifmetadatatest: don't include avif/internal.h + - avifrgbtoyuvtest: skip if no libsharpyuv + - Disable tests that may fail if the codec is not aom (#1176) + +------------------------------------------------------------------- +Thu Oct 27 19:02:16 UTC 2022 - Cristian Rodríguez + +- Remove unused BuildRequires on nasm +- Remove indirect/incorrect Buildrequires on zlib +- add direct glib Buildrequires + +------------------------------------------------------------------- +Sat Oct 15 12:28:59 UTC 2022 - Bjørn Lie + +- Update to version 0.11.0: + * There are incompatible ABI changes in this release. The + alphaRange member was removed from the avifImage struct. The + chromaDownsampling and avoidLibYUV members were added to the + avifRGBImage struct. The imageDimensionLimit member was added + to the avifDecoder struct. avifImageCopy() and + avifImageAllocatePlanes() signatures changed. It is necessary + to recompile your code. Also check the return values of + avifImageCopy() and avifImageAllocatePlanes(). + * Added: + - Add man pages for avifenc and avifdec + - Add the avifChannelIndex type alias for enum avifChannelIndex + - Add avifChromaDownsampling enum + - Add chromaDownsampling field to avifRGBImage struct + - Add support for AVIF_RGB_FORMAT_RGB_565 + - Add imageDimensionLimit field to avifDecoder struct + - Add autoTiling field to avifEncoder struct + - Add new avifResult codes AVIF_RESULT_CANNOT_CHANGE_SETTING + and AVIF_RESULT_INCOMPATIBLE_IMAGE + - Add new enum constants AVIF_PIXEL_FORMAT_COUNT and + AVIF_RGB_FORMAT_COUNT + - avifdec: Add --dimension-limit, which specifies the image + dimension limit (width or height) that should be tolerated + - avifenc: Add --sharpyuv, which enables "sharp" RGB to YUV420 + conversion, which reduces artifacts caused by 420 chroma + downsampling. Needs libsharpyuv (part of the libwebp + repository) at compile time. + - avifenc: Add --ignore-exif and --ignore-xmp flags. + - avifenc: Add --autotiling, which sets --tilerowslog2 and + --tilecolslog2 automatically. + - avifenc: Input Exif orientation is converted to irot/imir by + default. + * Changed: + - Fix memory leaks of metadata on avifenc exit + - Update the handling of 'lsel' and progressive decoding to + AVIF spec v1.1.0 + - Treat an absent lsel and layer_id == 0xFFFF equivalently for + backward compatibility with earlier drafts of AVIF spec + v1.1.0 + - Set libavif's own default value of cfg.rc_end_usage for + libaom + - Set the libaom-specific option -a tune=ssim by default + - Bump cmake_minimum_required from 3.5 to 3.13 + - Fix https://crbug.com/oss-fuzz/48135 + - Use several new libyuv functions in reformat_libyuv.c + - Fix SVT-AV1's issue 1957 related to uninitialized variables + crashing the encoder + - Update aom.cmd: v3.5.0 + - Update rav1e.cmd: v0.5.1 + - Update svt.cmd/svt.sh: v1.2.1 + - Update libgav1.cmd: v0.18.0 + - Update libyuv.cmd: f9fda6e7 (version 1844) + - avifImageCopy() and avifImageAllocatePlanes() now return + avifResult instead of void to report invalid parameters or + memory allocation failures. + - avifImageRGBToYUV() now uses libyuv fast paths by default. It + may slightly change conversion results. The old behavior can + be restored by setting avifRGBImage::chromaDownsampling to + AVIF_CHROMA_DOWNSAMPLING_BEST_QUALITY and + avifRGBImage::avoidLibYUV to AVIF_TRUE. + - avifRGBImage::chromaUpsampling now only applies to + conversions that need upsampling chroma from 4:2:0 or 4:2:2 + and has no impact on the use of libyuv. + - Set avifRGBImage::avoidLibYUV accordingly to control the use + of libyuv. + - avifenc: Set the YUV format to 4:0:0 for grayscale PNGs + - Support updating encoder settings and codec-specific options + during encoding + - Disable AVIF_STRICT_CLAP_VALID and AVIF_STRICT_PIXI_REQUIRED + in the JNI wrapper + - avifdec: Return proper exit code in "info" mode + - In avifenc and avifdec, treat all arguments that start with + '-' as options + - Exif and XMP metadata is imported from PNG and JPEG files. + - avifImageSetMetadataExif() parses the Exif metadata and + converts any Exif orientation found into transformFlags, irot + and imir values. + - Write 'auxi' box for animated images with alpha channel + - Write 'auxv' as handler_type for alpha channel track + - Use PNG_COLOR_TYPE_GRAY for 8-bit grayscale output + - Replace repeated subtraction by modulo in calcGCD + - Change avifImageCreate to take uint32_t instead of int + parameters + - When writing an image sequence, check if it's safe to cast + width and height to uint16_t + - Allow clamped grid cells in avifEncoderAddImageGrid() + * Removed: + - alphaRange field was removed from the avifImage struct. It it + presumed that alpha plane is always full range. + - The avifCodecConfigurationBox struct becomes a private type + for libavif internal use +- Bump lib_soversion global (also in baselibs.conf) to 15 following + upstream change. +- Use ldconfig_scriptlets for post(un) handling. + +------------------------------------------------------------------- +Sat Jul 30 13:32:08 UTC 2022 - Callum Farmer + +- Enable libyuv on TW + +------------------------------------------------------------------- +Sun Apr 24 20:01:35 UTC 2022 - Dirk Müller + +- update to 0.10.1: + * tests/docker/build.sh: Build SVT-AV1 using cmake and ninja directly + * Fix a Visual Studio 2017 compiler warning in src\reformat.c: warning C4204: + nonstandard extension used: non-constant aggregate initializer + * Fix the help message of avifdec: --index takes a value + +------------------------------------------------------------------- +Fri Apr 8 15:49:30 UTC 2022 - Andreas Schneider + +- Update to version 0.10.0 + * See https://github.com/AOMediaCodec/libavif/blob/v0.10.0/CHANGELOG.md + for a complete changelog or check the CHANGELOG.md in the doc directory. + +------------------------------------------------------------------- +Sat Dec 25 10:23:55 UTC 2021 - Andreas Schneider + +- Disable libaom and use rav1e by default + * As PHP 8.1 has AVIF support, use rav1e by default as it is more + secure being written in Rust. + +------------------------------------------------------------------- +Thu Oct 21 07:56:31 UTC 2021 - Andreas Schneider + +- Update to version 0.9.3 + * See https://github.com/AOMediaCodec/libavif/blob/v0.9.3/CHANGELOG.md + for a complete changelog. + +------------------------------------------------------------------- +Thu Jun 24 18:13:26 UTC 2021 - Andreas Schneider + +- Update to version 0.9.2 + * See https://github.com/AOMediaCodec/libavif/blob/v0.9.2/CHANGELOG.md + for a complete changelog. + +------------------------------------------------------------------- +Thu May 20 06:36:55 UTC 2021 - Andreas Schneider + +- Update to version 0.9.1 + * See https://github.com/AOMediaCodec/libavif/blob/v0.9.1/CHANGELOG.md + for a complete changelog. + +------------------------------------------------------------------- +Tue Apr 13 06:20:37 UTC 2021 - Dominique Leuenberger + +- Add baselibs.conf: produce libavif10-32bit as a new dependency to + libgd3-32bit (support avif in libgd). + +------------------------------------------------------------------- +Mon Mar 15 10:40:45 UTC 2021 - Andreas Schneider + +- Update to version 0.9.0 + * See https://github.com/AOMediaCodec/libavif/blob/v0.9.0/CHANGELOG.md + for a complete changelog. + +------------------------------------------------------------------- +Wed Jan 13 13:30:40 UTC 2021 - Bjørn Lie + +- Build the gdk-pixbuf module: Add pkgconfig(gdk-pixbuf-2.0) + BuildRequires and pass DAVIF_BUILD_GDK_PIXBUF=ON to cmake. + Package the resulting loader in a new sub package. +- Use cmake_build macro. + +------------------------------------------------------------------- +Wed Dec 9 15:59:14 UTC 2020 - Andreas Schneider + +- Update to version 0.8.4 + * See https://github.com/AOMediaCodec/libavif/blob/v0.8.4/CHANGELOG.md + for a complete changelog. + +------------------------------------------------------------------- +Thu Oct 15 08:17:41 UTC 2020 - Andreas Schneider + +- Update to version 0.8.2 + * See https://github.com/AOMediaCodec/libavif/blob/master/CHANGELOG.md + for a complete changelog. + +------------------------------------------------------------------- +Mon Aug 17 13:35:27 UTC 2020 - Andreas Schneider + +- Update to version 0.8.1 + * See https://github.com/AOMediaCodec/libavif/blob/master/CHANGELOG.md + for a complete changelog. +- Enabled AOM support (default) + +------------------------------------------------------------------- +Tue Jul 21 06:05:19 UTC 2020 - Andreas Schneider + +- Update to version 0.8.0 + * See https://github.com/AOMediaCodec/libavif/blob/master/CHANGELOG.md + for a complete changelog. + +------------------------------------------------------------------- +Tue May 5 12:58:13 UTC 2020 - Andreas Schneider + +- Update to version 0.7.3 + * See https://github.com/AOMediaCodec/libavif/blob/master/CHANGELOG.md + for a complete changelog. + * Removed e4e5d752ece581d6ef9fbb8bab0ab2edfde13fc5.patch + * Removed ebb29b37711c749681278f8b778f0e6c031c4ca2.patch + * Removed e7dcc74b5529da209266020852a72b554461e538.patch + +------------------------------------------------------------------- +Mon May 4 15:15:50 UTC 2020 - Andreas Schneider + +- Update to version 0.7.2 + * See https://github.com/AOMediaCodec/libavif/blob/master/CHANGELOG.md + for a complete changelog. + * Added e4e5d752ece581d6ef9fbb8bab0ab2edfde13fc5.patch + * Added ebb29b37711c749681278f8b778f0e6c031c4ca2.patch + * Added e7dcc74b5529da209266020852a72b554461e538.patch + +------------------------------------------------------------------- +Thu Apr 23 10:39:15 UTC 2020 - Ismail Dönmez + +- Update to version 0.7.1 + * See https://github.com/AOMediaCodec/libavif/blob/master/CHANGELOG.md + for a complete changelog. +- Add BR on libjpeg8-devel + +------------------------------------------------------------------- +Wed Mar 11 06:51:01 UTC 2020 - Andreas Schneider + +- Update to version 0.6.2 + https://github.com/AOMediaCodec/libavif/blob/master/CHANGELOG.md + +------------------------------------------------------------------- +Wed Mar 11 06:10:27 UTC 2020 - Andreas Schneider + +- If we want to build with aom, require version >= 1.1.0 +- Removed cbcf62c2200be83b85b48059c819ae708216ccec.patch + +------------------------------------------------------------------- +Wed Mar 4 15:09:24 UTC 2020 - Andreas Schneider + +- Update to version 0.5.7 + https://github.com/AOMediaCodec/libavif/releases/tag/v0.5.7 + +------------------------------------------------------------------- +Sun Feb 16 19:03:03 UTC 2020 - Andreas Schneider + +- Update to version 0.5.5 + https://github.com/AOMediaCodec/libavif/releases/tag/v0.5.5 +- Rename libavif-tools to avif-tools + This fixes an rpmlint warning + +------------------------------------------------------------------- +Wed Dec 11 18:10:04 UTC 2019 - Andreas Schneider + +- Update to version 0.5.3 + https://github.com/AOMediaCodec/libavif/releases/tag/v0.5.3 + +------------------------------------------------------------------- +Sun Nov 24 16:33:34 UTC 2019 - Marcus Rueckert + +- update to 0.5.2 + https://github.com/AOMediaCodec/libavif/releases/tag/v0.5.2 + +------------------------------------------------------------------- +Fri Nov 22 07:10:11 UTC 2019 - Marcus Rueckert + +- update to 0.5.1 + https://github.com/AOMediaCodec/libavif/releases/tag/v0.5.1 + https://github.com/AOMediaCodec/libavif/releases/tag/v0.5.0 + +------------------------------------------------------------------- +Wed Nov 20 14:00:20 UTC 2019 - Marcus Rueckert + +- support building with libaom 1.0.0 + https://github.com/cryptomilk/libavif/commit/cbcf62c2200be83b85b48059c819ae708216ccec.patch + +------------------------------------------------------------------- +Wed Nov 20 13:51:36 UTC 2019 - Marcus Rueckert + +- update to 0.4.8 + https://github.com/AOMediaCodec/libavif/releases/tag/v0.4.8 +- drop libs.patch + +------------------------------------------------------------------- +Mon Nov 18 23:42:37 UTC 2019 - Marcus Rueckert + +- initial package diff --git a/libavif.spec b/libavif.spec new file mode 100644 index 0000000..7760000 --- /dev/null +++ b/libavif.spec @@ -0,0 +1,157 @@ +# +# spec file for package libavif +# +# Copyright (c) 2023 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/ +# + + +%if 0%{?suse_version} >= 1550 +%bcond_without aom +%bcond_without yuv +%else +%bcond_with aom +%bcond_with yuv +%endif + +# Also update baselibs.conf if you bump the version +%global lib_soversion 15 +%global lib_name libavif%{lib_soversion} + +Name: libavif +Version: 0.11.1 +Release: 0 +Summary: Library for encoding and decoding .avif files +License: BSD-2-Clause +Group: Development/Libraries/C and C++ +URL: https://github.com/AOMediaCodec/libavif +# +Source: https://github.com/AOMediaCodec/libavif/archive/v%{version}/%{name}-%{version}.tar.gz +Source99: baselibs.conf +# +# PATCH-FIX-UPSTREAM libavif-CVE-2023-6704.patch bsc#1218303 xwang@suse.com -- Do not store colorproperties until alpha item is found +Patch0: libavif-CVE-2023-6704.patch +BuildRequires: cmake +BuildRequires: gcc-c++ +BuildRequires: libjpeg8-devel +BuildRequires: pkgconfig(dav1d) +BuildRequires: pkgconfig(gdk-pixbuf-2.0) +BuildRequires: pkgconfig(glib-2.0) +BuildRequires: pkgconfig(gobject-2.0) +BuildRequires: pkgconfig(libpng) +BuildRequires: pkgconfig(libwebp) +BuildRequires: pkgconfig(rav1e) >= 0.5.0 +%if %{with aom} +BuildRequires: pkgconfig(aom) >= 2.0.0 +%endif +%if %{with yuv} +BuildRequires: pkgconfig(libyuv) +%endif + +%description +This library aims to be a friendly, portable C implementation of the AV1 Image +File Format, as described here: + +https://aomediacodec.github.io/av1-avif/ + +%package -n avif-tools +Summary: Tools for libavif +Group: Productivity/Graphics/Convertors +Provides: libavif-tools = %{version} +Obsoletes: libavif-tools < %{version} + +%description -n avif-tools +This library aims to be a friendly, portable C implementation of the AV1 Image +File Format, as described here: + +https://aomediacodec.github.io/av1-avif/ + +This package holds the commandline tools for libavif. + +%package -n %{lib_name} +# +Summary: Shared library from libavif +Group: Development/Libraries/C and C++ + +%description -n %{lib_name} +This library aims to be a friendly, portable C implementation of the AV1 Image +File Format, as described here: + +https://aomediacodec.github.io/av1-avif/ + +This package holds the shared library for libavif. + +%package -n gdk-pixbuf-loader-libavif +Summary: AVIF image loader for GTK+ applications +Group: Development/Libraries/C and C++ + +%description -n gdk-pixbuf-loader-libavif +A pixbuf-loader plugin to load AVIF images in GTK+ applications. + +%package devel +Requires: %{lib_name} = %{version}-%{release} +# +Summary: Development files for libavif +Group: Development/Libraries/C and C++ + +%description devel +This library aims to be a friendly, portable C implementation of the AV1 Image +File Format, as described here: + +https://aomediacodec.github.io/av1-avif/ + +This package holds the development files for libavif. + +%prep +%autosetup -p1 + +%build +%cmake \ + -DAVIF_CODEC_RAV1E:BOOL=ON \ + -DAVIF_CODEC_DAV1D:BOOL=ON \ + %if %{with aom} + -DAVIF_CODEC_AOM:BOOL=ON \ + %endif + -DAVIF_BUILD_APPS:BOOL=ON \ + -DAVIF_BUILD_EXAMPLES:BOOL=ON \ + -DAVIF_BUILD_GDK_PIXBUF=ON +%cmake_build + +%install +%cmake_install + +%ldconfig_scriptlets -n %{lib_name} + +%files -n %{lib_name} +%license LICENSE +%{_libdir}/libavif.so.%{lib_soversion}* + +%files devel +%license LICENSE +%{_libdir}/libavif.so +%{_includedir}/avif/ +%{_libdir}/cmake/libavif/ +%{_libdir}/pkgconfig/libavif.pc + +%files -n avif-tools +%doc *.md +%license LICENSE +%{_bindir}/avifdec +%{_bindir}/avifenc + +%files -n gdk-pixbuf-loader-libavif +%{_libdir}/gdk-pixbuf-2.0/*/loaders/libpixbufloader-avif.so +%dir %{_datadir}/thumbnailers +%{_datadir}/thumbnailers/avif.thumbnailer + +%changelog