From eae6c3182a2cb717ba991b4d6a5f3205c5244a1d Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Wed, 14 Nov 2018 14:02:19 +0100 Subject: [PATCH] Adapt to new packaging Signed-off-by: Igor Gnatenko --- rust-zoneinfo_compiled.spec | 46 +++++++++++++------ tests/.fmf/version | 1 + tests/provision.fmf | 5 ++ tests/tests.yml | 13 ++++++ ...iff => zoneinfo_compiled-fix-metadata.diff | 2 +- 5 files changed, 51 insertions(+), 16 deletions(-) create mode 100644 tests/.fmf/version create mode 100644 tests/provision.fmf create mode 100644 tests/tests.yml rename zoneinfo_compiled-0.4.7-fix-metadata.diff => zoneinfo_compiled-fix-metadata.diff (69%) diff --git a/rust-zoneinfo_compiled.spec b/rust-zoneinfo_compiled.spec index 042d0b4..84debe2 100644 --- a/rust-zoneinfo_compiled.spec +++ b/rust-zoneinfo_compiled.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 zoneinfo_compiled Name: rust-%{crate} Version: 0.4.7 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Library for parsing compiled zoneinfo files # https://github.com/rust-datetime/zoneinfo-compiled/issues/1 @@ -15,27 +16,43 @@ URL: https://crates.io/crates/zoneinfo_compiled Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate # Initial patched metadata # * Bump byteorder to 1, https://github.com/rust-datetime/zoneinfo-compiled/pull/2 -Patch0: zoneinfo_compiled-0.4.7-fix-metadata.diff +Patch0: zoneinfo_compiled-fix-metadata.diff ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging -# [dependencies] -BuildRequires: (crate(byteorder) >= 1.0.0 with crate(byteorder) < 2.0.0) -BuildRequires: (crate(datetime) >= 0.4.7 with crate(datetime) < 0.5.0) +BuildRequires: (crate(byteorder/default) >= 1.0.0 with crate(byteorder/default) < 2.0.0) +BuildRequires: (crate(datetime/default) >= 0.4.7 with crate(datetime/default) < 0.5.0) -%description -%{summary}. +%global _description \ +Library for parsing compiled zoneinfo files. + +%description %{_description} %package devel Summary: %{summary} BuildArch: noarch -%description devel -Library for parsing compiled zoneinfo files. +%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 +%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 @@ -52,11 +69,10 @@ which use %{crate} from crates.io. %cargo_test %endif -%files devel -%doc README.md -%{cargo_registry}/%{crate}-%{version}/ - %changelog +* Wed Nov 14 2018 Igor Gnatenko - 0.4.7-5 +- Adapt to new packaging + * Sat Jul 14 2018 Fedora Release Engineering - 0.4.7-4 - 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..be833af --- /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-zoneinfo_compiled diff --git a/zoneinfo_compiled-0.4.7-fix-metadata.diff b/zoneinfo_compiled-fix-metadata.diff similarity index 69% rename from zoneinfo_compiled-0.4.7-fix-metadata.diff rename to zoneinfo_compiled-fix-metadata.diff index 47c1e2a..489c185 100644 --- a/zoneinfo_compiled-0.4.7-fix-metadata.diff +++ b/zoneinfo_compiled-fix-metadata.diff @@ -1,5 +1,5 @@ --- zoneinfo_compiled-0.4.7/Cargo.toml 1970-01-01T01:00:00+01:00 -+++ zoneinfo_compiled-0.4.7/Cargo.toml 2017-11-27T13:38:36.405587+01:00 ++++ zoneinfo_compiled-0.4.7/Cargo.toml 2018-11-14T14:01:50.354846+01:00 @@ -25,4 +25,4 @@ version = "0.4.7"