The package rpms/rust-slog-term.git has added or updated architecture specific content in
its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/rust-slog-term.git/commit/?id=f7e....
Change:
+ExclusiveArch: %{rust_arches}
Thanks.
Full change:
============
commit f7ed58ab5daca341c2d6e3ed678dc8ab7bdaf7c2
Author: Igor Gnatenko <ignatenkobrain(a)fedoraproject.org>
Date: Sat Apr 27 14:35:57 2019 +0200
Initial import
Signed-off-by: Igor Gnatenko <ignatenkobrain(a)fedoraproject.org>
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..2508561
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/slog-term-2.4.0.crate
diff --git a/0001-Switch-to-atty.patch b/0001-Switch-to-atty.patch
new file mode 100644
index 0000000..d239875
--- /dev/null
+++ b/0001-Switch-to-atty.patch
@@ -0,0 +1,39 @@
+From 076236e51a9843e3231d4dde33ef64ded6e95d74 Mon Sep 17 00:00:00 2001
+From: Igor Gnatenko <i.gnatenko.brain(a)gmail.com>
+Date: Sat, 27 Apr 2019 08:49:33 +0200
+Subject: [PATCH] Switch to atty
+
+isatty is deprecated.
+
+Signed-off-by: Igor Gnatenko <i.gnatenko.brain(a)gmail.com>
+---
+ src/lib.rs | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/lib.rs b/src/lib.rs
+index f7b9d5e..4895b79 100644
+--- a/src/lib.rs
++++ b/src/lib.rs
+@@ -105,7 +105,7 @@
+ #![warn(missing_docs)]
+
+ extern crate chrono;
+-extern crate isatty;
++extern crate atty;
+ extern crate slog;
+ extern crate term;
+ extern crate thread_local;
+@@ -1173,8 +1173,8 @@ enum AnyTerminal {
+ impl AnyTerminal {
+ fn should_use_color(&self) -> bool {
+ match *self {
+- AnyTerminal::Stdout(_) => isatty::stdout_isatty(),
+- AnyTerminal::Stderr(_) => isatty::stderr_isatty(),
++ AnyTerminal::Stdout(_) => atty::is(atty::Stream::Stdout),
++ AnyTerminal::Stderr(_) => atty::is(atty::Stream::Stderr),
+ AnyTerminal::FallbackStdout => false,
+ AnyTerminal::FallbackStderr => false,
+ }
+--
+2.21.0
+
diff --git a/rust-slog-term.spec b/rust-slog-term.spec
new file mode 100644
index 0000000..0f7f7e4
--- /dev/null
+++ b/rust-slog-term.spec
@@ -0,0 +1,83 @@
+# Generated by rust2rpm
+%bcond_with check
+%global debug_package %{nil}
+
+%global crate slog-term
+
+Name: rust-%{crate}
+Version: 2.4.0
+Release: 1%{?dist}
+Summary: Unix terminal drain and formatter for slog-rs
+
+# Upstream license specification: MPL-2.0/MIT/Apache-2.0
+#
https://github.com/slog-rs/term/commit/ff5372ddf0ac5ca03fa5a30094e6693766...
+License: MPLv2.0 or MIT or ASL 2.0
+URL:
https://crates.io/crates/slog-term
+Source: %{crates_source}
+# Initial patched metadata
+# * Switch to atty,
https://github.com/slog-rs/term/pull/20
+Patch0: slog-term-fix-metadata.diff
+# Code changes for atty change
+Patch0001: 0001-Switch-to-atty.patch
+
+ExclusiveArch: %{rust_arches}
+
+BuildRequires: rust-packaging
+BuildRequires: (crate(atty/default) >= 0.2.0 with crate(atty/default) < 0.3.0)
+BuildRequires: (crate(chrono/default) >= 0.4.0 with crate(chrono/default) <
0.5.0)
+BuildRequires: (crate(slog/default) >= 2.0.0 with crate(slog/default) < 3.0.0)
+BuildRequires: (crate(term/default) >= 0.5.1 with crate(term/default) < 0.6.0)
+BuildRequires: (crate(thread_local/default) >= 0.3.3 with crate(thread_local/default)
< 0.4.0)
+%if %{with check}
+BuildRequires: (crate(slog-async/default) >= 2.0.0 with crate(slog-async/default)
< 3.0.0)
+%endif
+
+%global _description \
+Unix terminal drain and formatter for slog-rs.
+
+%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-MPL2
+%doc README.md CHANGELOG.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_no_tilde} -p1
+%cargo_prep
+
+%build
+%cargo_build
+
+%install
+%cargo_install
+
+%if %{with check}
+%check
+%cargo_test
+%endif
+
+%changelog
+* Sat Apr 27 08:51:09 CEST 2019 Igor Gnatenko <ignatenkobrain(a)fedoraproject.org> -
2.4.0-1
+- Initial package
diff --git a/slog-term-fix-metadata.diff b/slog-term-fix-metadata.diff
new file mode 100644
index 0000000..c943582
--- /dev/null
+++ b/slog-term-fix-metadata.diff
@@ -0,0 +1,13 @@
+--- slog-term-2.4.0/Cargo.toml 1970-01-01T00:00:00+00:00
++++ slog-term-2.4.0/Cargo.toml 2019-04-27T06:51:09.132734+00:00
+@@ -24,8 +24,8 @@
+ [dependencies.chrono]
+ version = "0.4"
+
+-[dependencies.isatty]
+-version = "0.1"
++[dependencies.atty]
++version = "0.2"
+
+ [dependencies.slog]
+ version = "2"
diff --git a/sources b/sources
new file mode 100644
index 0000000..5dcae73
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (slog-term-2.4.0.crate) =
ddbce3397ccd98f37e18c2cbd4a8d86df15bf0674ed9b7a637dd3922cf6799bb9a021473b1507f930df46783b92d00ad2dc5e88997d1ea8b29b178d72e28b033
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..f9db7f9
--- /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-slog-term