From a31cfdd37ed866d7f22ca92baf2c9327807f238d Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Wed, 14 Nov 2018 13:31:00 +0100 Subject: [PATCH] Adapt to new packaging Signed-off-by: Igor Gnatenko --- locale-fix-metadata.diff | 10 +++++++++ rust-locale.spec | 48 +++++++++++++++++++++++++++------------- tests/.fmf/version | 1 + tests/provision.fmf | 5 +++++ tests/tests.yml | 13 +++++++++++ 5 files changed, 62 insertions(+), 15 deletions(-) create mode 100644 locale-fix-metadata.diff create mode 100644 tests/.fmf/version create mode 100644 tests/provision.fmf create mode 100644 tests/tests.yml diff --git a/locale-fix-metadata.diff b/locale-fix-metadata.diff new file mode 100644 index 0000000..dc60dd0 --- /dev/null +++ b/locale-fix-metadata.diff @@ -0,0 +1,10 @@ +--- locale-0.2.2/Cargo.toml 1970-01-01T01:00:00+01:00 ++++ locale-0.2.2/Cargo.toml 2018-11-14T13:30:03.963721+01:00 +@@ -20,6 +20,7 @@ + keywords = ["i18n", "g12n", "l10n"] + license = "MIT" + repository = "https://github.com/rust-locale/rust-locale/" ++exclude = ["/ci/*", "/.travis.yml", "/appveyor.yml"] + + [dependencies] + libc = "0.2" diff --git a/rust-locale.spec b/rust-locale.spec index d066267..6eaac3a 100644 --- a/rust-locale.spec +++ b/rust-locale.spec @@ -1,36 +1,57 @@ # Generated by rust2rpm -%bcond_without check +# * Tests are run in infrastructure +%bcond_with check %global debug_package %{nil} %global crate locale Name: rust-%{crate} Version: 0.2.2 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Library for basic localisation License: MIT URL: https://crates.io/crates/locale Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate +# Initial patched metadata +# * Exclude CI files, https://github.com/rust-locale/rust-locale/pull/27 +Patch0: locale-fix-metadata.diff ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging -# [dependencies] -BuildRequires: (crate(libc) >= 0.2.0 with crate(libc) < 0.3.0) +BuildRequires: (crate(libc/default) >= 0.2.0 with crate(libc/default) < 0.3.0) -%description -%{summary}. +%global _description \ +Library for basic localisation. + +%description %{_description} %package devel Summary: %{summary} BuildArch: noarch -%description devel -Library for basic localisation. Warning: Major rewrite pending for 0.3! +%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 @@ -47,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}/{appveyor.yml,ci} - %changelog +* Wed Nov 14 2018 Igor Gnatenko - 0.2.2-5 +- Adapt to new packaging + * Sat Jul 14 2018 Fedora Release Engineering - 0.2.2-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..0d8c534 --- /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-locale