From 2cd3c2bfd0b7c7b23b7adde96ca3cad57b6fd119 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Tue, 30 Oct 2018 14:28:47 +0100 Subject: [PATCH] Adapt to new packaging Signed-off-by: Igor Gnatenko --- quickcheck-fix-metadata.diff | 10 +++ rust-quickcheck.spec | 127 ++++++++++++++++++++++++++++++----- tests/.fmf/version | 1 + tests/provision.fmf | 5 ++ tests/tests.yml | 13 ++++ 5 files changed, 139 insertions(+), 17 deletions(-) create mode 100644 quickcheck-fix-metadata.diff create mode 100644 tests/.fmf/version create mode 100644 tests/provision.fmf create mode 100644 tests/tests.yml diff --git a/quickcheck-fix-metadata.diff b/quickcheck-fix-metadata.diff new file mode 100644 index 0000000..9d59701 --- /dev/null +++ b/quickcheck-fix-metadata.diff @@ -0,0 +1,10 @@ +--- quickcheck-0.7.1/Cargo.toml 1970-01-01T01:00:00+01:00 ++++ quickcheck-0.7.1/Cargo.toml 2018-10-30T14:27:31.694051+01:00 +@@ -22,6 +22,7 @@ + categories = ["development-tools::testing"] + license = "Unlicense/MIT" + repository = "https://github.com/BurntSushi/quickcheck" ++exclude = ["/.travis.yml", "/Makefile", "/ctags.rust", "/session.vim"] + + [lib] + name = "quickcheck" diff --git a/rust-quickcheck.spec b/rust-quickcheck.spec index 44029f3..adb2bdf 100644 --- a/rust-quickcheck.spec +++ b/rust-quickcheck.spec @@ -1,39 +1,135 @@ # Generated by rust2rpm -%bcond_without check +# * Tests are run in infrastructure +%bcond_with check %global debug_package %{nil} %global crate quickcheck Name: rust-%{crate} Version: 0.7.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Automatic property based testing with shrinking +# Upstream license specification: Unlicense/MIT License: Unlicense or MIT URL: https://crates.io/crates/quickcheck Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate +# Initial patched metadata +# * Exclude CI files, https://github.com/BurntSushi/quickcheck/pull/217 +Patch0: quickcheck-fix-metadata.diff ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging -# [dependencies] BuildRequires: (crate(env_logger) >= 0.5.0 with crate(env_logger) < 0.6.0) -BuildRequires: (crate(log) >= 0.4.0 with crate(log) < 0.5.0) -BuildRequires: (crate(rand) >= 0.5.0 with crate(rand) < 0.6.0) -BuildRequires: (crate(rand_core) >= 0.2.1 with crate(rand_core) < 0.3.0) +BuildRequires: (crate(env_logger/regex) >= 0.5.0 with crate(env_logger/regex) < 0.6.0) +BuildRequires: (crate(log/default) >= 0.4.0 with crate(log/default) < 0.5.0) +BuildRequires: (crate(rand/default) >= 0.5.0 with crate(rand/default) < 0.6.0) +BuildRequires: (crate(rand/i128_support) >= 0.5.0 with crate(rand/i128_support) < 0.6.0) +BuildRequires: (crate(rand_core/default) >= 0.2.1 with crate(rand_core/default) < 0.3.0) -%description -%{summary}. +%global _description \ +Automatic property based testing with shrinking. + +%description %{_description} %package devel Summary: %{summary} BuildArch: noarch -%description devel -Automatic property based testing with shrinking. +%description devel %{_description} + +This package contains library source intended for building other packages +which use "%{crate}" crate. + +%files devel +%license UNLICENSE LICENSE-MIT COPYING +%doc README.md +%{cargo_registry}/%{crate}-%{version}/ + +%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 "default" feature of "%{crate}" crate. + +%files -n %{name}+default-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+env_logger-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+env_logger-devel %{_description} + +This package contains library source intended for building other packages +which use "env_logger" feature of "%{crate}" crate. + +%files -n %{name}+env_logger-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+i128-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+i128-devel %{_description} This package contains library source intended for building other packages -which use %{crate} from crates.io. +which use "i128" feature of "%{crate}" crate. + +%files -n %{name}+i128-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+log-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+log-devel %{_description} + +This package contains library source intended for building other packages +which use "log" feature of "%{crate}" crate. + +%files -n %{name}+log-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+regex-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+regex-devel %{_description} + +This package contains library source intended for building other packages +which use "regex" feature of "%{crate}" crate. + +%files -n %{name}+regex-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+unstable-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+unstable-devel %{_description} + +This package contains library source intended for building other packages +which use "unstable" feature of "%{crate}" crate. + +%files -n %{name}+unstable-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+use_logging-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+use_logging-devel %{_description} + +This package contains library source intended for building other packages +which use "use_logging" feature of "%{crate}" crate. + +%files -n %{name}+use_logging-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml %prep %autosetup -n %{crate}-%{version} -p1 @@ -50,13 +146,10 @@ which use %{crate} from crates.io. %cargo_test %endif -%files devel -%license UNLICENSE LICENSE-MIT COPYING -%doc README.md -%{cargo_registry}/%{crate}-%{version}/ -%exclude %{cargo_registry}/%{crate}-%{version}/{Makefile,ctags.rust,session.vim} - %changelog +* Tue Oct 30 2018 Igor Gnatenko - 0.7.1-2 +- Adapt to new packaging + * Sun Sep 02 2018 Igor Gnatenko - 0.7.1-1 - Update to 0.7.1 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..7aac880 --- /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-quickcheck