From 33cd8da5245dfab0a3dde214450a1c2a68acde32 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Wed, 14 Dec 2022 14:57:04 +0100 Subject: [PATCH] Update to version 0.15.2; Fixes RHBZ#1833660 --- .gitignore | 1 + rust-cargo_metadata.spec | 67 ++++++++++++++++++++++++++-------------- rust2rpm.conf | 2 ++ sources | 2 +- 4 files changed, 47 insertions(+), 25 deletions(-) create mode 100644 rust2rpm.conf diff --git a/.gitignore b/.gitignore index 081ef8d..18f1142 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /cargo_metadata-0.9.1.crate /cargo_metadata-0.10.0.crate /cargo_metadata-0.12.3.crate +/cargo_metadata-0.15.2.crate diff --git a/rust-cargo_metadata.spec b/rust-cargo_metadata.spec index d9ca355..71982fc 100644 --- a/rust-cargo_metadata.spec +++ b/rust-cargo_metadata.spec @@ -1,26 +1,19 @@ -# Generated by rust2rpm 16 -# * Tests require internet access -%bcond_with check +# Generated by rust2rpm 23 +%bcond_without check %global debug_package %{nil} %global crate cargo_metadata -Name: rust-%{crate} -Version: 0.12.3 +Name: rust-cargo_metadata +Version: 0.15.2 Release: %autorelease Summary: Structured access to the output of `cargo metadata` -# Upstream license specification: MIT License: MIT URL: https://crates.io/crates/cargo_metadata Source: %{crates_source} -ExclusiveArch: %{rust_arches} -%if %{__cargo_skip_build} -BuildArch: noarch -%endif - -BuildRequires: rust-packaging +BuildRequires: rust-packaging >= 21 %global _description %{expand: Structured access to the output of `cargo metadata`.} @@ -33,13 +26,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-MIT -%doc README.md -%{cargo_registry}/%{crate}-%{version_no_tilde}/ +%license %{crate_instdir}/LICENSE-MIT +%doc %{crate_instdir}/CHANGELOG.md +%doc %{crate_instdir}/README.md +%{crate_instdir}/ %package -n %{name}+default-devel Summary: %{summary} @@ -47,28 +41,53 @@ 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 +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+builder-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+builder-devel %{_description} + +This package contains library source intended for building other packages which +use the "builder" feature of the "%{crate}" crate. + +%files -n %{name}+builder-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+derive_builder-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+derive_builder-devel %{_description} + +This package contains library source intended for building other packages which +use the "derive_builder" feature of the "%{crate}" crate. + +%files -n %{name}+derive_builder-devel +%ghost %{crate_instdir}/Cargo.toml %prep %autosetup -n %{crate}-%{version_no_tilde} -p1 %cargo_prep %generate_buildrequires -%cargo_generate_buildrequires +%cargo_generate_buildrequires -a %build -%cargo_build +%cargo_build -a %install -%cargo_install +%cargo_install -a %if %{with check} %check -%cargo_test +# * skip tests that depend on fixtures which are not included in published crates +%cargo_test -a -- -- --skip advanced_feature_configuration --skip all_the_fields --skip basic_workspace_root_package_exists --skip current_dir %endif %changelog diff --git a/rust2rpm.conf b/rust2rpm.conf new file mode 100644 index 0000000..f626714 --- /dev/null +++ b/rust2rpm.conf @@ -0,0 +1,2 @@ +[DEFAULT] +all-features = true diff --git a/sources b/sources index 7c89fb0..1b4b22b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (cargo_metadata-0.12.3.crate) = fc67003f014d6b13b12d8a897168665dbafed7516662bce53bff3dec75892a930f602a4ddf9e2be44fdbdb77b4f2641c0adb116be31929142c3d4a2e6cee4e1f +SHA512 (cargo_metadata-0.15.2.crate) = f663676ac3e2182d67d1047164eddd24d1006f61f378003abb1d5f53f9dfee672202d33a530cac1bb749955edd142ca78169dc3412d78c8fe98d6121c4303fd3