The package rpms/rust-slog-scope.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-scope.git/commit/?id=b4c84....
Change: +ExclusiveArch: %{rust_arches}
Thanks.
Full change: ============
commit b4c842a61fa162e73c4e86e603f33995c795ad51 Author: Igor Gnatenko ignatenkobrain@fedoraproject.org Date: Sun Apr 28 10:05:26 2019 +0200
Initial import
Signed-off-by: Igor Gnatenko ignatenkobrain@fedoraproject.org
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..396c6a8 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/slog-scope-4.1.1.crate diff --git a/0001-Switch-to-arc-swap.patch b/0001-Switch-to-arc-swap.patch new file mode 100644 index 0000000..a9674f5 --- /dev/null +++ b/0001-Switch-to-arc-swap.patch @@ -0,0 +1,81 @@ +From 520fc4575b1e7f6d90c07ca65b85ccf16d0d3169 Mon Sep 17 00:00:00 2001 +From: Igor Gnatenko i.gnatenko.brain@gmail.com +Date: Sat, 27 Apr 2019 09:06:35 +0200 +Subject: [PATCH] Switch to arc-swap + +Latest version of "crossbeam" dropped ArcCell and suggested to move to +ArcSwap. + +Signed-off-by: Igor Gnatenko i.gnatenko.brain@gmail.com +--- + lib.rs | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/lib.rs b/lib.rs +index e6bc0cd..cbdb739 100644 +--- a/lib.rs ++++ b/lib.rs +@@ -57,13 +57,13 @@ + extern crate slog; + #[macro_use] + extern crate lazy_static; +-extern crate crossbeam; ++extern crate arc_swap; + + use slog::{Logger, Record, OwnedKVList}; + + use std::sync::Arc; + use std::cell::RefCell; +-use crossbeam::atomic::ArcCell; ++use arc_swap::ArcSwap; + + use std::result; + +@@ -103,7 +103,7 @@ thread_local! { + } + + lazy_static! { +- static ref GLOBAL_LOGGER : ArcCellslog::Logger = ArcCell::new( ++ static ref GLOBAL_LOGGER : ArcSwapslog::Logger = ArcSwap::from( + Arc::new( + slog::Logger::root(slog::Discard, o!()) + ) +@@ -153,7 +153,7 @@ impl GlobalLoggerGuard { + impl Drop for GlobalLoggerGuard { + fn drop(&mut self) { + if !self.canceled { +- let _ = GLOBAL_LOGGER.set( ++ GLOBAL_LOGGER.store( + Arc::new( + slog::Logger::root(NoGlobalLoggerSet, o!()) + ) +@@ -165,7 +165,7 @@ impl Drop for GlobalLoggerGuard { + + /// Set global `Logger` that is returned by calls like `logger()` outside of any logging scope. + pub fn set_global_logger(l: slog::Logger) -> GlobalLoggerGuard { +- let _ = GLOBAL_LOGGER.set(Arc::new(l)); ++ GLOBAL_LOGGER.store(Arc::new(l)); + + GlobalLoggerGuard::new() + } +@@ -197,7 +197,7 @@ pub fn logger() -> Logger { + let s = s.borrow(); + match s.last() { + Some(logger) => (unsafe {&**logger}).clone(), +- None => (*GLOBAL_LOGGER.get()).clone(), ++ None => (*GLOBAL_LOGGER.load()).clone(), + } + }) + } +@@ -212,7 +212,7 @@ where F : FnOnce(&Logger) -> R { + let s = s.borrow(); + match s.last() { + Some(logger) => f(unsafe {&**logger}), +- None => f(&(*GLOBAL_LOGGER.get())), ++ None => f(&(*GLOBAL_LOGGER.peek())), + } + }) + } +-- +2.21.0 + diff --git a/rust-slog-scope.spec b/rust-slog-scope.spec new file mode 100644 index 0000000..a699175 --- /dev/null +++ b/rust-slog-scope.spec @@ -0,0 +1,82 @@ +# Generated by rust2rpm +%bcond_with check +%global debug_package %{nil} + +%global crate slog-scope + +Name: rust-%{crate} +Version: 4.1.1 +Release: 1%{?dist} +Summary: Logging scopes for slog-rs + +# Upstream license specification: MPL-2.0/MIT/Apache-2.0 +License: MPLv2.0 or MIT or ASL 2.0 +URL: https://crates.io/crates/slog-scope +Source: %{crates_source} +# Initial patched metadata +# * Bump slog-term to released, https://github.com/slog-rs/scope/pull/8 +# * Switch to arc-swap, https://github.com/slog-rs/scope/pull/7 +Patch0: slog-scope-fix-metadata.diff +# Complete switch to arc-swap +Patch0001: 0001-Switch-to-arc-swap.patch + +ExclusiveArch: %{rust_arches} + +BuildRequires: rust-packaging +BuildRequires: (crate(arc-swap/default) >= 0.3.0 with crate(arc-swap/default) < 0.4.0) +BuildRequires: (crate(lazy_static/default) >= 1.2.0 with crate(lazy_static/default) < 2.0.0) +BuildRequires: (crate(slog/default) >= 2.4.0 with crate(slog/default) < 3.0.0) +%if %{with check} +BuildRequires: (crate(slog-async/default) >= 2.0.0 with crate(slog-async/default) < 3.0.0) +BuildRequires: (crate(slog-term/default) >= 2.0.0 with crate(slog-term/default) < 3.0.0) +%endif + +%global _description \ +Logging scopes 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-MIT LICENSE-APACHE 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 +* Sun Apr 28 07:54:49 CEST 2019 Igor Gnatenko ignatenkobrain@fedoraproject.org - 4.1.1-1 +- Initial package diff --git a/slog-scope-fix-metadata.diff b/slog-scope-fix-metadata.diff new file mode 100644 index 0000000..32c2126 --- /dev/null +++ b/slog-scope-fix-metadata.diff @@ -0,0 +1,19 @@ +--- slog-scope-4.1.1/Cargo.toml 1970-01-01T00:00:00+00:00 ++++ slog-scope-4.1.1/Cargo.toml 2019-04-28T05:54:49.806906+00:00 +@@ -24,8 +24,8 @@ + + [lib] + path = "lib.rs" +-[dependencies.crossbeam] +-version = "0.6" ++[dependencies.arc-swap] ++version = "0.3" + + [dependencies.lazy_static] + version = "1.2" +@@ -36,4 +36,4 @@ + version = "2" + + [dev-dependencies.slog-term] +-version = "~2.0.0-4" ++version = "2" diff --git a/sources b/sources new file mode 100644 index 0000000..46429ba --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (slog-scope-4.1.1.crate) = 3f3e2a1ed2ac2ab6bf880ec297d8379d7dccd14dc55b10e25cb996008c5cbae4a424c843543c5d62dd9e34800ebaf6a2314e2c168fdb97266dbffab3bad348f0 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..1602f2c --- /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-scope
arch-excludes@lists.fedoraproject.org