From 0b55f180bca394cd839f3d594cd013d1b83dd171 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Sun, 21 Aug 2022 22:13:17 +0200 Subject: [PATCH] Update to version 0.24.3; Fixes RHBZ#2048826 --- .gitignore | 1 + image-fix-metadata.diff | 20 +++++ rust-image.spec | 144 ++++++++++++++------------------ .rust2rpm.conf => rust2rpm.conf | 9 +- sources | 2 +- 5 files changed, 92 insertions(+), 84 deletions(-) create mode 100644 image-fix-metadata.diff rename .rust2rpm.conf => rust2rpm.conf (80%) diff --git a/.gitignore b/.gitignore index 35507a8..f00c34d 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ /image-0.23.12.crate /image-0.23.13.crate /image-0.23.14.crate +/image-0.24.3.crate diff --git a/image-fix-metadata.diff b/image-fix-metadata.diff new file mode 100644 index 0000000..e06d9df --- /dev/null +++ b/image-fix-metadata.diff @@ -0,0 +1,20 @@ +--- image-0.24.3/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ image-0.24.3/Cargo.toml 2022-08-21T11:24:17.461719+00:00 +@@ -112,9 +112,6 @@ + [dev-dependencies.crc32fast] + version = "1.2.0" + +-[dev-dependencies.criterion] +-version = "0.3" +- + [dev-dependencies.glob] + version = "0.3" + +@@ -159,7 +156,6 @@ + "dds", + "farbfeld", + "jpeg_rayon", +- "openexr", + ] + dxt = [] + farbfeld = [] diff --git a/rust-image.spec b/rust-image.spec index dab8749..f62e53b 100644 --- a/rust-image.spec +++ b/rust-image.spec @@ -1,25 +1,25 @@ -# Generated by rust2rpm 16 +# Generated by rust2rpm 22 %bcond_without check %global debug_package %{nil} %global crate image -Name: rust-%{crate} -Version: 0.23.14 +Name: rust-image +Version: 0.24.3 Release: %autorelease Summary: Imaging library written in Rust -# Upstream license specification: MIT License: MIT URL: https://crates.io/crates/image Source: %{crates_source} +# Manually created patch for downstream crate metadata changes +# * drop unused, benchmark-only criterion dev-dependency to speed up builds +# * disable little-endian-only openexr feature +Patch: image-fix-metadata.diff ExclusiveArch: %{rust_arches} -%if %{__cargo_skip_build} -BuildArch: noarch -%endif -BuildRequires: rust-packaging +BuildRequires: rust-packaging >= 21 %global _description %{expand: Imaging library written in Rust. Provides basic filters and decoders for the @@ -33,13 +33,14 @@ BuildArch: noarch %description devel %{_description} -This package contains library source intended for building other packages -which use "%{crate}" crate. +This package contains library source intended for building other packages which +use the "%{crate}" crate. %files devel -%license LICENSE -%doc README.md CHANGES.md -%{cargo_registry}/%{crate}-%{version_no_tilde}/ +%license %{crate_instdir}/LICENSE +%doc %{crate_instdir}/CHANGES.md +%doc %{crate_instdir}/README.md +%{crate_instdir}/ %package -n %{name}+default-devel Summary: %{summary} @@ -47,23 +48,11 @@ BuildArch: noarch %description -n %{name}+default-devel %{_description} -This package contains library source intended for building other packages -which use "default" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "default" feature of the "%{crate}" crate. %files -n %{name}+default-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml - -%package -n %{name}+benchmarks-devel -Summary: %{summary} -BuildArch: noarch - -%description -n %{name}+benchmarks-devel %{_description} - -This package contains library source intended for building other packages -which use "benchmarks" feature of "%{crate}" crate. - -%files -n %{name}+benchmarks-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+bmp-devel Summary: %{summary} @@ -71,11 +60,11 @@ BuildArch: noarch %description -n %{name}+bmp-devel %{_description} -This package contains library source intended for building other packages -which use "bmp" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "bmp" feature of the "%{crate}" crate. %files -n %{name}+bmp-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+dds-devel Summary: %{summary} @@ -83,11 +72,11 @@ BuildArch: noarch %description -n %{name}+dds-devel %{_description} -This package contains library source intended for building other packages -which use "dds" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "dds" feature of the "%{crate}" crate. %files -n %{name}+dds-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+dxt-devel Summary: %{summary} @@ -95,11 +84,11 @@ BuildArch: noarch %description -n %{name}+dxt-devel %{_description} -This package contains library source intended for building other packages -which use "dxt" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "dxt" feature of the "%{crate}" crate. %files -n %{name}+dxt-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+farbfeld-devel Summary: %{summary} @@ -107,11 +96,11 @@ BuildArch: noarch %description -n %{name}+farbfeld-devel %{_description} -This package contains library source intended for building other packages -which use "farbfeld" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "farbfeld" feature of the "%{crate}" crate. %files -n %{name}+farbfeld-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+gif-devel Summary: %{summary} @@ -119,11 +108,11 @@ BuildArch: noarch %description -n %{name}+gif-devel %{_description} -This package contains library source intended for building other packages -which use "gif" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "gif" feature of the "%{crate}" crate. %files -n %{name}+gif-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+hdr-devel Summary: %{summary} @@ -131,11 +120,11 @@ BuildArch: noarch %description -n %{name}+hdr-devel %{_description} -This package contains library source intended for building other packages -which use "hdr" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "hdr" feature of the "%{crate}" crate. %files -n %{name}+hdr-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+ico-devel Summary: %{summary} @@ -143,11 +132,11 @@ BuildArch: noarch %description -n %{name}+ico-devel %{_description} -This package contains library source intended for building other packages -which use "ico" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "ico" feature of the "%{crate}" crate. %files -n %{name}+ico-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+jpeg-devel Summary: %{summary} @@ -155,11 +144,11 @@ BuildArch: noarch %description -n %{name}+jpeg-devel %{_description} -This package contains library source intended for building other packages -which use "jpeg" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "jpeg" feature of the "%{crate}" crate. %files -n %{name}+jpeg-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+jpeg_rayon-devel Summary: %{summary} @@ -167,11 +156,11 @@ BuildArch: noarch %description -n %{name}+jpeg_rayon-devel %{_description} -This package contains library source intended for building other packages -which use "jpeg_rayon" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "jpeg_rayon" feature of the "%{crate}" crate. %files -n %{name}+jpeg_rayon-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+png-devel Summary: %{summary} @@ -179,11 +168,11 @@ BuildArch: noarch %description -n %{name}+png-devel %{_description} -This package contains library source intended for building other packages -which use "png" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "png" feature of the "%{crate}" crate. %files -n %{name}+png-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+pnm-devel Summary: %{summary} @@ -191,11 +180,11 @@ BuildArch: noarch %description -n %{name}+pnm-devel %{_description} -This package contains library source intended for building other packages -which use "pnm" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "pnm" feature of the "%{crate}" crate. %files -n %{name}+pnm-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+scoped_threadpool-devel Summary: %{summary} @@ -203,11 +192,11 @@ BuildArch: noarch %description -n %{name}+scoped_threadpool-devel %{_description} -This package contains library source intended for building other packages -which use "scoped_threadpool" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "scoped_threadpool" feature of the "%{crate}" crate. %files -n %{name}+scoped_threadpool-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+tga-devel Summary: %{summary} @@ -215,11 +204,11 @@ BuildArch: noarch %description -n %{name}+tga-devel %{_description} -This package contains library source intended for building other packages -which use "tga" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "tga" feature of the "%{crate}" crate. %files -n %{name}+tga-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+tiff-devel Summary: %{summary} @@ -227,11 +216,11 @@ BuildArch: noarch %description -n %{name}+tiff-devel %{_description} -This package contains library source intended for building other packages -which use "tiff" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "tiff" feature of the "%{crate}" crate. %files -n %{name}+tiff-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+webp-devel Summary: %{summary} @@ -239,11 +228,11 @@ BuildArch: noarch %description -n %{name}+webp-devel %{_description} -This package contains library source intended for building other packages -which use "webp" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "webp" feature of the "%{crate}" crate. %files -n %{name}+webp-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %prep %autosetup -n %{crate}-%{version_no_tilde} -p1 @@ -260,13 +249,8 @@ which use "webp" feature of "%{crate}" crate. %if %{with check} %check -# Missing test files -%cargo_test -- -- \ - --skip dynimage::test::image_dimensions \ - --skip dynimage::test::open_16bpc_png \ - --skip imageops::sample::tests::resize_transparent_image \ - --skip png::tests::ensure_no_decoder_off_by_one \ - --skip png::tests::underlying_error +# * skip tests with missing test files (not included in published crates) +%cargo_test -- -- --skip codecs::bmp::decoder::test::read_rect --skip codecs::png::tests::ensure_no_decoder_off_by_one --skip codecs::png::tests::underlying_error --skip dynimage::test::image_dimensions --skip dynimage::test::open_16bpc_png --skip imageops::sample::tests::resize_transparent_image %endif %changelog diff --git a/.rust2rpm.conf b/rust2rpm.conf similarity index 80% rename from .rust2rpm.conf rename to rust2rpm.conf index 79cbe2e..50bee69 100644 --- a/.rust2rpm.conf +++ b/rust2rpm.conf @@ -1,10 +1,13 @@ [DEFAULT] unwanted-features = - avif - avif-decoder - avif-encoder dav1d dcv-color-primitives mp4parse ravif rgb + avif + avif-decoder + avif-encoder + benchmarks + openexr + exr diff --git a/sources b/sources index aae261a..97273dc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (image-0.23.14.crate) = 4eb07fd698c2d902979ab06ae0baef4a53db74da78493c45f0c32d5903c5399cb8a1a25a2e89bf504ffb612e8153eaba4ae41df3d17f02c27e7991fdca518f63 +SHA512 (image-0.24.3.crate) = f669ae622f68f7a77d8a8074ca4ccc43bf9282f115b1d6ad72a70174de3e17ebba4618a2ba6605b4b3853b16dc95cd447a60299877dedc81bdad423ece36b9b0