From 7f384f8492c67ddf9c59e1d079a7601b9a78655b Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Thu, 14 Mar 2019 02:25:15 +0100 Subject: [PATCH] Initial import Signed-off-by: Igor Gnatenko --- .gitignore | 1 + crypto-mac-fix-metadata.diff | 11 ++++ rust-crypto-mac.spec | 109 +++++++++++++++++++++++++++++++++++ sources | 1 + tests/.fmf/version | 1 + tests/provision.fmf | 5 ++ tests/tests.yml | 13 +++++ 7 files changed, 141 insertions(+) create mode 100644 .gitignore create mode 100644 crypto-mac-fix-metadata.diff create mode 100644 rust-crypto-mac.spec create mode 100644 sources create mode 100644 tests/.fmf/version create mode 100644 tests/provision.fmf create mode 100644 tests/tests.yml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e8c1e3e --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/crypto-mac-0.7.0.crate diff --git a/crypto-mac-fix-metadata.diff b/crypto-mac-fix-metadata.diff new file mode 100644 index 0000000..9e8ee8c --- /dev/null +++ b/crypto-mac-fix-metadata.diff @@ -0,0 +1,11 @@ +--- crypto-mac-0.7.0/Cargo.toml 1970-01-01T01:00:00+01:00 ++++ crypto-mac-0.7.0/Cargo.toml 2019-03-13T23:39:35.767228+01:00 +@@ -30,7 +30,7 @@ + version = "0.12" + + [dependencies.subtle] +-version = "1" ++version = "2" + default-features = false + + [features] diff --git a/rust-crypto-mac.spec b/rust-crypto-mac.spec new file mode 100644 index 0000000..d9916cc --- /dev/null +++ b/rust-crypto-mac.spec @@ -0,0 +1,109 @@ +# Generated by rust2rpm +%bcond_with check +%global debug_package %{nil} + +%global crate crypto-mac + +Name: rust-%{crate} +Version: 0.7.0 +Release: 1%{?dist} +Summary: Trait for Message Authentication Code (MAC) algorithms + +# Upstream license specification: MIT OR Apache-2.0 +License: MIT or ASL 2.0 +URL: https://crates.io/crates/crypto-mac +Source: %{crates_source} +# Initial patched metadata +# * Update subtle to 2, https://github.com/RustCrypto/traits/commit/2ed5d5a3a254c61c60cd0cf14931841b6f5c27ef +Patch0: crypto-mac-fix-metadata.diff + +ExclusiveArch: %{rust_arches} + +BuildRequires: rust-packaging +BuildRequires: (crate(generic-array/default) >= 0.12.0 with crate(generic-array/default) < 0.13.0) +BuildRequires: (crate(subtle) >= 2.0.0 with crate(subtle) < 3.0.0) + +%global _description \ +Trait for Message Authentication Code (MAC) algorithms. + +%description %{_description} + +%package devel +Summary: %{summary} +BuildArch: noarch + +%description devel %{_description} + +This package contains library source intended for building other packages +which use "%{crate}" crate. + +%files devel +%license LICENSE-MIT LICENSE-APACHE +%{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}+blobby-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+blobby-devel %{_description} + +This package contains library source intended for building other packages +which use "blobby" feature of "%{crate}" crate. + +%files -n %{name}+blobby-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + +%package -n %{name}+dev-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+dev-devel %{_description} + +This package contains library source intended for building other packages +which use "dev" feature of "%{crate}" crate. + +%files -n %{name}+dev-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_no_tilde} -p1 +%cargo_prep + +%build +%cargo_build + +%install +%cargo_install + +%if %{with check} +%check +%cargo_test +%endif + +%changelog +* Wed Mar 13 2019 Igor Gnatenko - 0.7.0-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..b7dfc46 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (crypto-mac-0.7.0.crate) = 7297396fc06aae578644d47c8ef1053895e0a29d1c007f303631166cf12711f106eb91c9c11d01497e7a85fb461b84a16d2e0f1020444ab16fb4b8f2dfee18b1 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..49c239b --- /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-crypto-mac