From 883593410c45d3f3047b8e03531fc0ee5a2e4b91 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Fri, 7 Jan 2022 20:41:16 +0100 Subject: [PATCH] Update to version 1.6.2+zstd.1.5.1; Fixes RHBZ#2035404 --- .gitignore | 1 + Update-for-latest-bindgen.patch | 12 ------ rust-zstd-sys.spec | 75 ++++++++++++++++++--------------- sources | 2 +- zstd-sys-fix-metadata.diff | 28 ++++++------ 5 files changed, 55 insertions(+), 63 deletions(-) delete mode 100644 Update-for-latest-bindgen.patch diff --git a/.gitignore b/.gitignore index afade85..6d50a3f 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /zstd-sys-1.4.20+zstd.1.4.9.crate /zstd-sys-1.5.0+zstd.1.4.9.crate /zstd-sys-1.6.1+zstd.1.5.0.crate +/zstd-sys-1.6.2+zstd.1.5.1.crate diff --git a/Update-for-latest-bindgen.patch b/Update-for-latest-bindgen.patch deleted file mode 100644 index 0df7f6e..0000000 --- a/Update-for-latest-bindgen.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up zstd-sys-1.6.1+zstd.1.5.0/build.rs.orig zstd-sys-1.6.1+zstd.1.5.0/build.rs ---- zstd-sys-1.6.1+zstd.1.5.0/build.rs.orig 2021-11-13 22:29:26.895153505 +0100 -+++ zstd-sys-1.6.1+zstd.1.5.0/build.rs 2021-11-13 22:30:03.082902425 +0100 -@@ -6,7 +6,7 @@ use std::{env, fs}; - fn generate_bindings(defs: Vec<&str>, headerpaths: Vec) { - let bindings = bindgen::Builder::default() - .header("zstd.h") -- .blacklist_type("max_align_t") -+ .blocklist_type("max_align_t") - .size_t_is_usize(true) - .use_core() - .rustified_enum(".*") diff --git a/rust-zstd-sys.spec b/rust-zstd-sys.spec index 2d1bc67..95d2038 100644 --- a/rust-zstd-sys.spec +++ b/rust-zstd-sys.spec @@ -1,12 +1,12 @@ -# Generated by rust2rpm 18 +# Generated by rust2rpm 20 %bcond_without check %global debug_package %{nil} %global crate zstd-sys -%global upstream_version 1.6.1+zstd.1.5.0 +%global upstream_version 1.6.2+zstd.1.5.1 Name: rust-%{crate} -Version: 1.6.1 +Version: 1.6.2 Release: %autorelease Summary: Low-level bindings for the zstd compression library @@ -17,14 +17,10 @@ Source: %{crates_source %{crate} %{upstream_version}} # Initial patched metadata # * Remove zstd version from version field # * Make pkg-config and bindgen default features -# * Bump bindgen to 0.59.0 +# * Fix logic for included / excluded files Patch0: zstd-sys-fix-metadata.diff -Patch1: Update-for-latest-bindgen.patch ExclusiveArch: %{rust_arches} -%if %{__cargo_skip_build} -BuildArch: noarch -%endif BuildRequires: rust-packaging @@ -40,11 +36,11 @@ Requires: pkgconfig(libzstd) %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 +%license LICENSE.Apache-2.0 LICENSE.Mit %doc Readme.md %{cargo_registry}/%{crate}-%{version_no_tilde}/ @@ -54,8 +50,8 @@ 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 @@ -66,8 +62,8 @@ BuildArch: noarch %description -n %{name}+bindgen-devel %{_description} -This package contains library source intended for building other packages -which use "bindgen" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "bindgen" feature of the "%{crate}" crate. %files -n %{name}+bindgen-devel %ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml @@ -78,8 +74,8 @@ BuildArch: noarch %description -n %{name}+debug-devel %{_description} -This package contains library source intended for building other packages -which use "debug" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "debug" feature of the "%{crate}" crate. %files -n %{name}+debug-devel %ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml @@ -90,8 +86,8 @@ BuildArch: noarch %description -n %{name}+experimental-devel %{_description} -This package contains library source intended for building other packages -which use "experimental" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "experimental" feature of the "%{crate}" crate. %files -n %{name}+experimental-devel %ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml @@ -102,20 +98,32 @@ BuildArch: noarch %description -n %{name}+legacy-devel %{_description} -This package contains library source intended for building other packages -which use "legacy" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "legacy" feature of the "%{crate}" crate. %files -n %{name}+legacy-devel %ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%package -n %{name}+no_asm-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+no_asm-devel %{_description} + +This package contains library source intended for building other packages which +use the "no_asm" feature of the "%{crate}" crate. + +%files -n %{name}+no_asm-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + %package -n %{name}+non-cargo-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+non-cargo-devel %{_description} -This package contains library source intended for building other packages -which use "non-cargo" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "non-cargo" feature of the "%{crate}" crate. %files -n %{name}+non-cargo-devel %ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml @@ -126,8 +134,8 @@ BuildArch: noarch %description -n %{name}+pkg-config-devel %{_description} -This package contains library source intended for building other packages -which use "pkg-config" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "pkg-config" feature of the "%{crate}" crate. %files -n %{name}+pkg-config-devel %ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml @@ -138,8 +146,8 @@ BuildArch: noarch %description -n %{name}+std-devel %{_description} -This package contains library source intended for building other packages -which use "std" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "std" feature of the "%{crate}" crate. %files -n %{name}+std-devel %ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml @@ -150,8 +158,8 @@ BuildArch: noarch %description -n %{name}+thin-devel %{_description} -This package contains library source intended for building other packages -which use "thin" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "thin" feature of the "%{crate}" crate. %files -n %{name}+thin-devel %ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml @@ -162,8 +170,8 @@ BuildArch: noarch %description -n %{name}+zstdmt-devel %{_description} -This package contains library source intended for building other packages -which use "zstdmt" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "zstdmt" feature of the "%{crate}" crate. %files -n %{name}+zstdmt-devel %ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml @@ -171,7 +179,7 @@ which use "zstdmt" feature of "%{crate}" crate. %prep %autosetup -n %{crate}-%{upstream_version} -p1 # Remove bundled zstd -rm -rfv zstd/ .cargo_vcs_info.json +rm -rfv zstd/ %cargo_prep %generate_buildrequires @@ -183,7 +191,6 @@ echo 'pkgconfig(libzstd)' %install %cargo_install -a -rm -rfv %{buildroot}%{cargo_registry}/%{crate}-%{version_no_tilde}/.cargo %if %{with check} %check @@ -191,4 +198,4 @@ rm -rfv %{buildroot}%{cargo_registry}/%{crate}-%{version_no_tilde}/.cargo %endif %changelog -%autochangelog \ No newline at end of file +%autochangelog diff --git a/sources b/sources index f383c4c..a59ecd1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (zstd-sys-1.6.1+zstd.1.5.0.crate) = 79278016fbe30f0b55195c540f31be5e8de961f6b7de7852c6870ba9d21f7be4aef8c4f57871e0a932e830484d6612c1fce808e77991bf1c6aa98d84007eb01a +SHA512 (zstd-sys-1.6.2+zstd.1.5.1.crate) = 25b28da7cd4465be2ff909cc30c879db4c0fe3e91c1faa8e2e7d9483f8439286123570f09bfa5aea1754a4473aa6f6851180b000df2094b6b56aec9b3b5d6d30 diff --git a/zstd-sys-fix-metadata.diff b/zstd-sys-fix-metadata.diff index 41c9848..ed3b509 100644 --- a/zstd-sys-fix-metadata.diff +++ b/zstd-sys-fix-metadata.diff @@ -1,24 +1,20 @@ ---- zstd-sys-1.6.1+zstd.1.5.0/Cargo.toml 1970-01-01T00:00:00+00:00 -+++ zstd-sys-1.6.1+zstd.1.5.0/Cargo.toml 2021-11-13T21:15:23.658968+00:00 -@@ -13,7 +13,7 @@ +--- zstd-sys-1.6.2+zstd.1.5.1/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ zstd-sys-1.6.2+zstd.1.5.1/Cargo.toml 2022-01-07T18:49:26.176892+00:00 +@@ -12,11 +12,11 @@ [package] edition = "2018" name = "zstd-sys" --version = "1.6.1+zstd.1.5.0" -+version = "1.6.1" +-version = "1.6.2+zstd.1.5.1" ++version = "1.6.2" authors = ["Alexandre Bury "] build = "build.rs" links = "zstd" -@@ -32,7 +32,7 @@ - [dependencies.libc] - version = "0.2.45" - [build-dependencies.bindgen] --version = "0.58" -+version = "0.59" - optional = true - - [build-dependencies.cc] -@@ -45,7 +45,7 @@ +-include = ["/LICENSE", "/*.*", "/src/", "/zstd/LICENSE", "/zstd/COPYING", "/zstd/lib/**/*.c", "/zstd/lib/**/*.h", "/zstd/lib/**/*.S"] ++exclude = ["/test_it.sh", "/update_bindings.sh", "/update_zstd.sh"] + description = "Low-level bindings for the zstd compression library." + readme = "Readme.md" + keywords = ["zstd", "zstandard", "compression"] +@@ -44,7 +44,7 @@ [features] debug = [] @@ -26,4 +22,4 @@ +default = ["legacy", "pkg-config", "bindgen"] experimental = [] legacy = [] - non-cargo = [] + no_asm = []