diff --git a/rust-failure.spec b/rust-failure.spec index 6aee65e..0d76954 100644 --- a/rust-failure.spec +++ b/rust-failure.spec @@ -1,12 +1,13 @@ # Generated by rust2rpm -%bcond_without check +# Tests are run in infrastructre +%bcond_with check %global debug_package %{nil} %global crate failure Name: rust-%{crate} Version: 0.1.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Experimental error handling abstraction # Upstream license specification: MIT OR Apache-2.0 @@ -17,22 +18,88 @@ Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{ ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging -# [dependencies] -BuildRequires: (crate(backtrace) >= 0.3.3 with crate(backtrace) < 0.4.0) -BuildRequires: (crate(failure_derive) >= 0.1.3 with crate(failure_derive) < 0.2.0) +BuildRequires: (crate(backtrace/default) >= 0.3.3 with crate(backtrace/default) < 0.4.0) +BuildRequires: (crate(failure_derive/default) >= 0.1.3 with crate(failure_derive/default) < 0.2.0) -%description -%{summary}. +%global _description \ +Experimental error handling abstraction. + +%description %{_description} %package devel Summary: %{summary} BuildArch: noarch -%description devel -Experimental error handling abstraction. +%description devel %{_description} + +This package contains library source intended for building other packages +which use "%{crate}" crate. + +%files devel +%license LICENSE-MIT LICENSE-APACHE +%doc README.md RELEASES.md +%{cargo_registry}/%{crate}-%{version}/ +%exclude %{cargo_registry}/%{crate}-%{version}/build-docs.sh + +%package -n %{name}+default-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+default-devel %{_description} This package contains library source intended for building other packages -which use %{crate} from crates.io. +which use "default" feature of "%{crate}" crate. + +%files -n %{name}+default-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+backtrace-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+backtrace-devel %{_description} + +This package contains library source intended for building other packages +which use "backtrace" feature of "%{crate}" crate. + +%files -n %{name}+backtrace-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+derive-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+derive-devel %{_description} + +This package contains library source intended for building other packages +which use "derive" feature of "%{crate}" crate. + +%files -n %{name}+derive-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+failure_derive-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+failure_derive-devel %{_description} + +This package contains library source intended for building other packages +which use "failure_derive" feature of "%{crate}" crate. + +%files -n %{name}+failure_derive-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+std-devel +Summary: %{summary} +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. + +%files -n %{name}+std-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml %prep %autosetup -n %{crate}-%{version} -p1 @@ -49,13 +116,10 @@ which use %{crate} from crates.io. %cargo_test %endif -%files devel -%license LICENSE-MIT LICENSE-APACHE -%doc README.md RELEASES.md -%{cargo_registry}/%{crate}-%{version}/ -%exclude %{cargo_registry}/%{crate}-%{version}/build-docs.sh - %changelog +* Sat Nov 10 2018 Robert-André Mauchin - 0.1.3-2 +- Adapt to new packaging + * Mon Oct 22 2018 Josh Stone - 0.1.3-1 - Update to 0.1.3 diff --git a/tests/.fmf/version b/tests/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/tests/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/tests/provision.fmf b/tests/provision.fmf new file mode 100644 index 0000000..503a97c --- /dev/null +++ b/tests/provision.fmf @@ -0,0 +1,5 @@ +--- +standard-inventory-qcow2: + qemu: + # `cargo test` usually eats more than 1G. + m: 4G diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..463c32e --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,13 @@ +--- +- hosts: localhost + roles: + - role: standard-test-basic + tags: + - classic + repositories: + - repo: "https://src.fedoraproject.org/tests/rust.git" + dest: rust + tests: + - rust/cargo-test + environment: + pkg: rust-failure