From 5b6cdc56f4874ed78bfc371a5f0021c5dea7953d Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Wed, 14 Nov 2018 11:46:06 +0100 Subject: [PATCH] Adapt to new packaging Signed-off-by: Igor Gnatenko --- ...metadata.diff => iso8601-fix-metadata.diff | 7 +-- rust-iso8601.spec | 47 ++++++++++++------- tests/.fmf/version | 1 + tests/provision.fmf | 5 ++ tests/tests.yml | 13 +++++ 5 files changed, 54 insertions(+), 19 deletions(-) rename iso8601-0.2.0-fix-metadata.diff => iso8601-fix-metadata.diff (74%) create mode 100644 tests/.fmf/version create mode 100644 tests/provision.fmf create mode 100644 tests/tests.yml diff --git a/iso8601-0.2.0-fix-metadata.diff b/iso8601-fix-metadata.diff similarity index 74% rename from iso8601-0.2.0-fix-metadata.diff rename to iso8601-fix-metadata.diff index 50b240a..62b4c69 100644 --- a/iso8601-0.2.0-fix-metadata.diff +++ b/iso8601-fix-metadata.diff @@ -1,12 +1,13 @@ --- iso8601-0.2.0/Cargo.toml 1970-01-01T01:00:00+01:00 -+++ iso8601-0.2.0/Cargo.toml 2017-11-20T16:18:15.776636+01:00 -@@ -20,9 +20,6 @@ ++++ iso8601-0.2.0/Cargo.toml 2018-11-14T11:45:22.909557+01:00 +@@ -20,10 +20,6 @@ readme = "README.md" license = "MIT" repository = "https://github.com/badboy/iso8601" -[dependencies.clippy] -version = ">0.0.0" -optional = true - +- [dependencies.nom] version = "3.2" + diff --git a/rust-iso8601.spec b/rust-iso8601.spec index 87a4383..eaaab5e 100644 --- a/rust-iso8601.spec +++ b/rust-iso8601.spec @@ -1,12 +1,13 @@ # Generated by rust2rpm -%bcond_without check +# * Tests are run in infrastructure +%bcond_with check %global debug_package %{nil} %global crate iso8601 Name: rust-%{crate} Version: 0.2.0 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Parsing ISO8601 dates using nom License: MIT @@ -14,26 +15,43 @@ URL: https://crates.io/crates/iso8601 Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate # Initial patched metadata # * No clippy -Patch0: iso8601-0.2.0-fix-metadata.diff +Patch0: iso8601-fix-metadata.diff ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging -# [dependencies] -BuildRequires: (crate(nom) >= 3.2.0 with crate(nom) < 4.0.0) +BuildRequires: (crate(nom/default) >= 3.2.0 with crate(nom/default) < 4.0.0) -%description -%{summary}. +%global _description \ +Parsing ISO8601 dates using nom. + +%description %{_description} %package devel Summary: %{summary} BuildArch: noarch -%description devel -Parsing ISO8601 dates using nom. +%description devel %{_description} This package contains library source intended for building other packages -which use %{crate} from crates.io. +which use "%{crate}" crate. + +%files devel +%license LICENSE +%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 %prep %autosetup -n %{crate}-%{version} -p1 @@ -50,13 +68,10 @@ which use %{crate} from crates.io. %cargo_test %endif -%files devel -%license LICENSE -%doc README.md -%{cargo_registry}/%{crate}-%{version}/ -%exclude %{cargo_registry}/%{crate}-%{version}/Makefile - %changelog +* Wed Nov 14 2018 Igor Gnatenko - 0.2.0-7 +- Adapt to new packaging + * Sat Jul 14 2018 Fedora Release Engineering - 0.2.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild 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..55896f1 --- /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-iso8601