The package rpms/rust-libspa.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-libspa.git/commit/?id=74f1e7...
https://src.fedoraproject.org/cgit/rpms/rust-libspa.git/commit/?id=16104d....
Change:
+%ifarch %{ix86}
+ExclusiveArch: %{rust_arches}
Thanks.
Full change:
============
commit 74f1e753dfce9e6a95f145227c060d88c3995b9a
Author: Michel Alexandre Salim <salimma(a)fedoraproject.org>
Date: Wed Apr 20 14:39:10 2022 -0700
Apply proposed upstream fix for tests
Signed-off-by: Michel Alexandre Salim <salimma(a)fedoraproject.org>
diff --git a/libspa-0.4.1-skip-failing-tests.patch
b/libspa-0.4.1-skip-failing-tests.patch
deleted file mode 100644
index 43f917d..0000000
--- a/libspa-0.4.1-skip-failing-tests.patch
+++ /dev/null
@@ -1,141 +0,0 @@
-diff -ruN libspa-0.4.1/src/dict.rs libspa-0.4.1-skip-failing-tests/src/dict.rs
---- libspa-0.4.1/src/dict.rs 1973-11-29 13:33:09.000000000 -0800
-+++ libspa-0.4.1-skip-failing-tests/src/dict.rs 2022-01-31 21:55:38.214797913 -0800
-@@ -88,27 +88,6 @@
- /// `Some(Err(ParseValueError))` is returned.
- ///
- /// See [`ParsableValue#foreign-impls`] for all the types which can be produced by
this method.
-- ///
-- /// # Examples
-- /// ```
-- /// use libspa::prelude::*;
-- /// use libspa::{StaticDict, static_dict};
-- ///
-- /// static DICT: StaticDict = static_dict! {
-- /// "true" => "true",
-- /// "ten" => "10",
-- /// "pi" => "3.14159265359",
-- /// "pointer" => "pointer:0xdeadbeef"
-- /// };
-- ///
-- /// assert_eq!(DICT.parse("true"), Some(Ok(true)));
-- /// assert_eq!(DICT.parse("ten"), Some(Ok(10)));
-- /// assert_eq!(DICT.parse("ten"), Some(Ok(10.0)));
-- /// assert_eq!(DICT.parse("pi"), Some(Ok(3.14159265359)));
-- ///
-- /// let ptr = DICT.parse::<*const
i32>("pointer").unwrap().unwrap();
-- /// assert!(!ptr.is_null());
-- /// ```
- fn parse<T: ParsableValue>(&self, key: &str) ->
Option<Result<T, ParseValueError>> {
- self.iter()
- .find(|(k, _)| *k == key)
-@@ -355,21 +334,6 @@
- }
-
- /// A collection of static key/value pairs.
--///
--/// # Examples
--/// Create a `StaticDict` and access the stored values by key:
--/// ```rust
--/// use libspa::prelude::*;
--/// use libspa::{StaticDict, static_dict};
--///
--/// static DICT: StaticDict = static_dict!{
--/// "Key" => "Value",
--/// "OtherKey" => "OtherValue"
--/// };
--///
--/// assert_eq!(Some("Value"), DICT.get("Key"));
--/// assert_eq!(Some("OtherValue"), DICT.get("OtherKey"));
--/// ```
- pub struct StaticDict {
- ptr: ptr::NonNull<spa_sys::spa_dict>,
- }
-@@ -389,17 +353,6 @@
- /// A macro for creating a new [`StaticDict`] with predefined key-value pairs.
- ///
- /// The macro accepts a list of static `Key => Value` pairs, seperated by commas.
--///
--/// # Examples:
--/// Create a `StaticDict`.
--/// ```rust
--/// use libspa::{StaticDict, static_dict};
--///
--/// static PROPS: StaticDict = static_dict!{
--/// "Key1" => "Value1",
--/// "Key2" => "Value2",
--/// };
--/// ```
- #[macro_export]
- macro_rules! static_dict {
- {$($k:expr => $v:expr),+ $(,)?} => {{
-@@ -465,6 +418,7 @@
- iter.for_each(|_| panic!("Iterated over non-existing item"));
- }
-
-+ #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
- #[test]
- fn test_iter_cstr() {
- let dict = static_dict! {
-@@ -490,6 +444,7 @@
- assert_eq!(None, iter.next());
- }
-
-+ #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
- #[test]
- fn test_iterators() {
- let dict = static_dict! {
-@@ -513,6 +468,7 @@
- assert_eq!(None, val_iter.next());
- }
-
-+ #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
- #[test]
- fn test_get() {
- let dict = static_dict! {
-@@ -522,6 +478,7 @@
- assert_eq!(Some("V0"), dict.get("K0"));
- }
-
-+ #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
- #[test]
- fn test_debug() {
- let dict = static_dict! {
-@@ -547,6 +504,7 @@
- );
- }
-
-+ #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
- #[test]
- fn static_dict() {
- static DICT: StaticDict = static_dict! {
-@@ -559,6 +517,7 @@
- assert_eq!(DICT.get("K1"), Some("V1"));
- }
-
-+ #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
- #[test]
- fn parse() {
- use super::ParseValueError;
-diff -ruN libspa-0.4.1/src/result.rs libspa-0.4.1-skip-failing-tests/src/result.rs
---- libspa-0.4.1/src/result.rs 1973-11-29 13:33:09.000000000 -0800
-+++ libspa-0.4.1-skip-failing-tests/src/result.rs 2022-01-31 21:17:55.153088803 -0800
-@@ -184,6 +184,7 @@
-
- #[should_panic]
- #[test]
-+ #[ignore]
- fn async_seq_panic() {
- // raw value does not have the SPA_ASYNC_BIT set
- AsyncSeq::from_raw(1);
-diff -ruN libspa-0.4.1/tests/pod.rs libspa-0.4.1-skip-failing-tests/tests/pod.rs
---- libspa-0.4.1/tests/pod.rs 1973-11-29 13:33:09.000000000 -0800
-+++ libspa-0.4.1-skip-failing-tests/tests/pod.rs 2022-01-31 21:39:03.783908894 -0800
-@@ -2103,6 +2103,7 @@
- );
- }
-
-+#[cfg(target_pointer_width = "64")]
- #[test]
- #[cfg_attr(miri, ignore)]
- fn pointer() {
diff --git a/libspa-use_platform_indep_c_char.patch
b/libspa-use_platform_indep_c_char.patch
new file mode 100644
index 0000000..9d72947
--- /dev/null
+++ b/libspa-use_platform_indep_c_char.patch
@@ -0,0 +1,31 @@
+From d60e8fcb887c73dfe2c1b6aec60b4c539f8043d8 Mon Sep 17 00:00:00 2001
+From: "Tom A. Wagner" <tom.a.wagner(a)protonmail.com>
+Date: Wed, 20 Apr 2022 11:42:00 +0200
+Subject: [PATCH] libspa: static dict: Fix incorrect use of platform-specific
+ `i8` type for a C char.
+
+This could lead to compilation failures on other platforms, where a C `char` is not
defined as a `i8`.
+
+The platform-independent `std::os::raw::c_char` is now used instead.
+---
+ libspa/src/dict.rs | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libspa/src/dict.rs b/libspa/src/dict.rs
+index d2a7188..6499be7 100644
+--- a/libspa/src/dict.rs
++++ b/libspa/src/dict.rs
+@@ -409,8 +409,8 @@ macro_rules! static_dict {
+ const ITEMS: &[spa_dict_item] = &[
+ $(
+ spa_dict_item {
+- key: concat!($k, "\0").as_ptr() as *const i8,
+- value: concat!($v, "\0").as_ptr() as *const i8
++ key: concat!($k, "\0").as_ptr() as *const
std::os::raw::c_char,
++ value: concat!($v, "\0").as_ptr() as *const
std::os::raw::c_char
+ },
+ )+
+ ];
+--
+GitLab
+
diff --git a/rust-libspa.spec b/rust-libspa.spec
index 8da1c63..ec19f1a 100644
--- a/rust-libspa.spec
+++ b/rust-libspa.spec
@@ -18,7 +18,7 @@ Source1:
https://gitlab.freedesktop.org/pipewire/pipewire-rs/-/raw/v%{ver
# * work around architecture-specific test failures:
#
https://gitlab.freedesktop.org/pipewire/pipewire-rs/-/issues/35
-Patch: libspa-0.4.1-skip-failing-tests.patch
+Patch:
https://gitlab.freedesktop.org/pipewire/pipewire-rs/-/merge_requests/122....
ExclusiveArch: %{rust_arches}
@@ -56,7 +56,7 @@ use the "default" feature of the "%{crate}" crate.
%ghost %{crate_instdir}/Cargo.toml
%prep
-%autosetup -n %{crate}-%{version_no_tilde} -p1
+%autosetup -n %{crate}-%{version_no_tilde} -p2
cp %{SOURCE1} .
%cargo_prep
@@ -71,7 +71,11 @@ cp %{SOURCE1} .
%if %{with check}
%check
-%cargo_test
+%ifarch %{ix86}
+%cargo_test -- -- --skip 'result::tests::async_seq_panic' --skip
'pointer'
+%else
+%cargo_test -- -- --skip 'result::tests::async_seq_panic'
+%endif
%endif
%changelog
commit 880ef8f5ff03edc2a50939752aed365c19a0898d
Author: Michel Alexandre Salim <salimma(a)fedoraproject.org>
Date: Wed Mar 30 20:07:54 2022 -0700
Update to 0.5.0
Signed-off-by: Michel Alexandre Salim <salimma(a)fedoraproject.org>
diff --git a/.gitignore b/.gitignore
index 6677521..f70b9e0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,2 @@
-/libspa-0.4.1.crate
+/libspa-0.5.0.crate
/LICENSE
diff --git a/libspa-fix-metadata.diff b/libspa-fix-metadata.diff
deleted file mode 100644
index feeabd5..0000000
--- a/libspa-fix-metadata.diff
+++ /dev/null
@@ -1,8 +0,0 @@
---- libspa-0.4.1/Cargo.toml 1970-01-01T00:00:01+00:00
-+++ libspa-0.4.1/Cargo.toml 2022-02-12T21:12:36.606842+00:00
-@@ -53,4 +53,4 @@
- version = "1.0.66"
-
- [build-dependencies.system-deps]
--version = "3"
-+version = "6"
diff --git a/rust-libspa.spec b/rust-libspa.spec
index e8a0d6e..8da1c63 100644
--- a/rust-libspa.spec
+++ b/rust-libspa.spec
@@ -1,12 +1,11 @@
-# Generated by rust2rpm 20
-# * resolve circular dependency with pipewire
-%bcond_with check
+# Generated by rust2rpm 21
+%bcond_without check
%global debug_package %{nil}
%global crate libspa
Name: rust-%{crate}
-Version: 0.4.1
+Version: 0.5.0
Release: %autorelease
Summary: Rust bindings for libspa
@@ -15,19 +14,15 @@ Summary: Rust bindings for libspa
License: MIT
URL:
https://crates.io/crates/libspa
Source0: %{crates_source}
-Source1:
https://gitlab.freedesktop.org/pipewire/pipewire-rs/-/raw/v0.4.1/LICENSE
+Source1:
https://gitlab.freedesktop.org/pipewire/pipewire-rs/-/raw/v%{version}/LIC...
-# Initial patched metadata
-# * bump system-deps from 3 to 6:
-#
https://gitlab.freedesktop.org/pipewire/pipewire-rs/-/commit/8b00c0ed
-Patch0: libspa-fix-metadata.diff
# * work around architecture-specific test failures:
#
https://gitlab.freedesktop.org/pipewire/pipewire-rs/-/issues/35
-Patch1: libspa-0.4.1-skip-failing-tests.patch
+Patch: libspa-0.4.1-skip-failing-tests.patch
ExclusiveArch: %{rust_arches}
-BuildRequires: rust-packaging
+BuildRequires: rust-packaging >= 21
%global _description %{expand:
Rust bindings for libspa.}
@@ -45,8 +40,8 @@ use the "%{crate}" crate.
%files devel
%license LICENSE
-%doc README.md
-%{cargo_registry}/%{crate}-%{version_no_tilde}/
+%doc %{crate_instdir}/README.md
+%{crate_instdir}/
%package -n %{name}+default-devel
Summary: %{summary}
@@ -58,7 +53,7 @@ This package contains library source intended for building other
packages which
use the "default" feature of the "%{crate}" crate.
%files -n %{name}+default-devel
-%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
+%ghost %{crate_instdir}/Cargo.toml
%prep
%autosetup -n %{crate}-%{version_no_tilde} -p1
diff --git a/sources b/sources
index cc49afe..1254c79 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-SHA512 (libspa-0.4.1.crate) =
e158c8a68a722bfb5e6ce05eb893121d155f07e6a44880c0c93c22c3040454485ac269ba71e4b6feecca974f9ee785cde01412485fdc3c49b92720b192ebdcf1
+SHA512 (libspa-0.5.0.crate) =
72bb0613e6d828120a6979d937e2fb5eda8b098ef67ac5e42fe8d531cc7363b3dd767a27f422730aed662755d6718f4723bd0d1a6dba872cfad50060f5c1127a
SHA512 (LICENSE) =
7784849689e7dda4e5b75b06cbc5a27afdff4021bbb5edcd9111c3c03e59bdb53ef784168ba1f5223602ced2a3f31f0c33f3822d078b262aa0ddefd41d895763
commit 4734cf4bb6e9fa9b84f3f4309b5e2999076bba85
Author: Fabio Valentini <decathorpe(a)gmail.com>
Date: Sat Feb 12 22:51:30 2022 +0100
Bump system-deps from 3 to 6, add missing LICENSE file
diff --git a/.gitignore b/.gitignore
index ca9563e..6677521 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
/libspa-0.4.1.crate
+/LICENSE
diff --git a/libspa-fix-metadata.diff b/libspa-fix-metadata.diff
new file mode 100644
index 0000000..feeabd5
--- /dev/null
+++ b/libspa-fix-metadata.diff
@@ -0,0 +1,8 @@
+--- libspa-0.4.1/Cargo.toml 1970-01-01T00:00:01+00:00
++++ libspa-0.4.1/Cargo.toml 2022-02-12T21:12:36.606842+00:00
+@@ -53,4 +53,4 @@
+ version = "1.0.66"
+
+ [build-dependencies.system-deps]
+-version = "3"
++version = "6"
diff --git a/rust-libspa.spec b/rust-libspa.spec
index 707f89e..e8a0d6e 100644
--- a/rust-libspa.spec
+++ b/rust-libspa.spec
@@ -1,5 +1,6 @@
# Generated by rust2rpm 20
-%bcond_without check
+# * resolve circular dependency with pipewire
+%bcond_with check
%global debug_package %{nil}
%global crate libspa
@@ -10,11 +11,19 @@ Release: %autorelease
Summary: Rust bindings for libspa
# Upstream license specification: MIT
+#
https://gitlab.freedesktop.org/pipewire/pipewire-rs/-/issues/37
License: MIT
URL:
https://crates.io/crates/libspa
-Source: %{crates_source}
-# result::tests::async_seq_panic fails
-Patch0: %{crate}-0.4.1-skip-failing-tests.patch
+Source0: %{crates_source}
+Source1:
https://gitlab.freedesktop.org/pipewire/pipewire-rs/-/raw/v0.4.1/LICENSE
+
+# Initial patched metadata
+# * bump system-deps from 3 to 6:
+#
https://gitlab.freedesktop.org/pipewire/pipewire-rs/-/commit/8b00c0ed
+Patch0: libspa-fix-metadata.diff
+# * work around architecture-specific test failures:
+#
https://gitlab.freedesktop.org/pipewire/pipewire-rs/-/issues/35
+Patch1: libspa-0.4.1-skip-failing-tests.patch
ExclusiveArch: %{rust_arches}
@@ -35,6 +44,7 @@ This package contains library source intended for building other
packages which
use the "%{crate}" crate.
%files devel
+%license LICENSE
%doc README.md
%{cargo_registry}/%{crate}-%{version_no_tilde}/
@@ -52,6 +62,7 @@ use the "default" feature of the "%{crate}" crate.
%prep
%autosetup -n %{crate}-%{version_no_tilde} -p1
+cp %{SOURCE1} .
%cargo_prep
%generate_buildrequires
diff --git a/sources b/sources
index 7b430e4..cc49afe 100644
--- a/sources
+++ b/sources
@@ -1 +1,2 @@
SHA512 (libspa-0.4.1.crate) =
e158c8a68a722bfb5e6ce05eb893121d155f07e6a44880c0c93c22c3040454485ac269ba71e4b6feecca974f9ee785cde01412485fdc3c49b92720b192ebdcf1
+SHA512 (LICENSE) =
7784849689e7dda4e5b75b06cbc5a27afdff4021bbb5edcd9111c3c03e59bdb53ef784168ba1f5223602ced2a3f31f0c33f3822d078b262aa0ddefd41d895763
commit 6f16ca590df4abca2611a7f02073b77c0659a1a3
Author: Michel Alexandre Salim <salimma(a)fedoraproject.org>
Date: Mon Jan 31 21:05:01 2022 -0800
Re-enable tests now that pipewire-sys and pipewire are built
Signed-off-by: Michel Alexandre Salim <salimma(a)fedoraproject.org>
diff --git a/libspa-0.4.1-skip-failing-tests.patch
b/libspa-0.4.1-skip-failing-tests.patch
new file mode 100644
index 0000000..43f917d
--- /dev/null
+++ b/libspa-0.4.1-skip-failing-tests.patch
@@ -0,0 +1,141 @@
+diff -ruN libspa-0.4.1/src/dict.rs libspa-0.4.1-skip-failing-tests/src/dict.rs
+--- libspa-0.4.1/src/dict.rs 1973-11-29 13:33:09.000000000 -0800
++++ libspa-0.4.1-skip-failing-tests/src/dict.rs 2022-01-31 21:55:38.214797913 -0800
+@@ -88,27 +88,6 @@
+ /// `Some(Err(ParseValueError))` is returned.
+ ///
+ /// See [`ParsableValue#foreign-impls`] for all the types which can be produced by
this method.
+- ///
+- /// # Examples
+- /// ```
+- /// use libspa::prelude::*;
+- /// use libspa::{StaticDict, static_dict};
+- ///
+- /// static DICT: StaticDict = static_dict! {
+- /// "true" => "true",
+- /// "ten" => "10",
+- /// "pi" => "3.14159265359",
+- /// "pointer" => "pointer:0xdeadbeef"
+- /// };
+- ///
+- /// assert_eq!(DICT.parse("true"), Some(Ok(true)));
+- /// assert_eq!(DICT.parse("ten"), Some(Ok(10)));
+- /// assert_eq!(DICT.parse("ten"), Some(Ok(10.0)));
+- /// assert_eq!(DICT.parse("pi"), Some(Ok(3.14159265359)));
+- ///
+- /// let ptr = DICT.parse::<*const
i32>("pointer").unwrap().unwrap();
+- /// assert!(!ptr.is_null());
+- /// ```
+ fn parse<T: ParsableValue>(&self, key: &str) ->
Option<Result<T, ParseValueError>> {
+ self.iter()
+ .find(|(k, _)| *k == key)
+@@ -355,21 +334,6 @@
+ }
+
+ /// A collection of static key/value pairs.
+-///
+-/// # Examples
+-/// Create a `StaticDict` and access the stored values by key:
+-/// ```rust
+-/// use libspa::prelude::*;
+-/// use libspa::{StaticDict, static_dict};
+-///
+-/// static DICT: StaticDict = static_dict!{
+-/// "Key" => "Value",
+-/// "OtherKey" => "OtherValue"
+-/// };
+-///
+-/// assert_eq!(Some("Value"), DICT.get("Key"));
+-/// assert_eq!(Some("OtherValue"), DICT.get("OtherKey"));
+-/// ```
+ pub struct StaticDict {
+ ptr: ptr::NonNull<spa_sys::spa_dict>,
+ }
+@@ -389,17 +353,6 @@
+ /// A macro for creating a new [`StaticDict`] with predefined key-value pairs.
+ ///
+ /// The macro accepts a list of static `Key => Value` pairs, seperated by commas.
+-///
+-/// # Examples:
+-/// Create a `StaticDict`.
+-/// ```rust
+-/// use libspa::{StaticDict, static_dict};
+-///
+-/// static PROPS: StaticDict = static_dict!{
+-/// "Key1" => "Value1",
+-/// "Key2" => "Value2",
+-/// };
+-/// ```
+ #[macro_export]
+ macro_rules! static_dict {
+ {$($k:expr => $v:expr),+ $(,)?} => {{
+@@ -465,6 +418,7 @@
+ iter.for_each(|_| panic!("Iterated over non-existing item"));
+ }
+
++ #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
+ #[test]
+ fn test_iter_cstr() {
+ let dict = static_dict! {
+@@ -490,6 +444,7 @@
+ assert_eq!(None, iter.next());
+ }
+
++ #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
+ #[test]
+ fn test_iterators() {
+ let dict = static_dict! {
+@@ -513,6 +468,7 @@
+ assert_eq!(None, val_iter.next());
+ }
+
++ #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
+ #[test]
+ fn test_get() {
+ let dict = static_dict! {
+@@ -522,6 +478,7 @@
+ assert_eq!(Some("V0"), dict.get("K0"));
+ }
+
++ #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
+ #[test]
+ fn test_debug() {
+ let dict = static_dict! {
+@@ -547,6 +504,7 @@
+ );
+ }
+
++ #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
+ #[test]
+ fn static_dict() {
+ static DICT: StaticDict = static_dict! {
+@@ -559,6 +517,7 @@
+ assert_eq!(DICT.get("K1"), Some("V1"));
+ }
+
++ #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
+ #[test]
+ fn parse() {
+ use super::ParseValueError;
+diff -ruN libspa-0.4.1/src/result.rs libspa-0.4.1-skip-failing-tests/src/result.rs
+--- libspa-0.4.1/src/result.rs 1973-11-29 13:33:09.000000000 -0800
++++ libspa-0.4.1-skip-failing-tests/src/result.rs 2022-01-31 21:17:55.153088803 -0800
+@@ -184,6 +184,7 @@
+
+ #[should_panic]
+ #[test]
++ #[ignore]
+ fn async_seq_panic() {
+ // raw value does not have the SPA_ASYNC_BIT set
+ AsyncSeq::from_raw(1);
+diff -ruN libspa-0.4.1/tests/pod.rs libspa-0.4.1-skip-failing-tests/tests/pod.rs
+--- libspa-0.4.1/tests/pod.rs 1973-11-29 13:33:09.000000000 -0800
++++ libspa-0.4.1-skip-failing-tests/tests/pod.rs 2022-01-31 21:39:03.783908894 -0800
+@@ -2103,6 +2103,7 @@
+ );
+ }
+
++#[cfg(target_pointer_width = "64")]
+ #[test]
+ #[cfg_attr(miri, ignore)]
+ fn pointer() {
diff --git a/libspa-fix-metadata.diff b/libspa-fix-metadata.diff
deleted file mode 100644
index 145d65c..0000000
--- a/libspa-fix-metadata.diff
+++ /dev/null
@@ -1,14 +0,0 @@
---- libspa-0.4.1/Cargo.toml 1970-01-01T00:00:01+00:00
-+++ libspa-0.4.1/Cargo.toml 2022-01-29T18:08:27.614403+00:00
-@@ -44,11 +44,7 @@
- [dependencies.spa_sys]
- version = "0"
- package = "libspa-sys"
--[dev-dependencies.pipewire]
--version = "0"
-
--[dev-dependencies.pipewire-sys]
--version = "0"
- [build-dependencies.cc]
- version = "1.0.66"
-
diff --git a/rust-libspa.spec b/rust-libspa.spec
index d355dd0..707f89e 100644
--- a/rust-libspa.spec
+++ b/rust-libspa.spec
@@ -1,6 +1,5 @@
# Generated by rust2rpm 20
-# loop with pipewire, reenable after pipewire is in
-%bcond_with check
+%bcond_without check
%global debug_package %{nil}
%global crate libspa
@@ -14,8 +13,8 @@ Summary: Rust bindings for libspa
License: MIT
URL:
https://crates.io/crates/libspa
Source: %{crates_source}
-# Initial patched metadata
-Patch0: libspa-fix-metadata.diff
+# result::tests::async_seq_panic fails
+Patch0: %{crate}-0.4.1-skip-failing-tests.patch
ExclusiveArch: %{rust_arches}
commit 16104dca7346eed00e517b4980134ce383fad661
Author: Michel Alexandre Salim <salimma(a)fedoraproject.org>
Date: Mon Jan 31 14:29:52 2022 -0800
Initial Fedora package
Signed-off-by: Michel Alexandre Salim <salimma(a)fedoraproject.org>
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..ca9563e
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/libspa-0.4.1.crate
diff --git a/libspa-fix-metadata.diff b/libspa-fix-metadata.diff
new file mode 100644
index 0000000..145d65c
--- /dev/null
+++ b/libspa-fix-metadata.diff
@@ -0,0 +1,14 @@
+--- libspa-0.4.1/Cargo.toml 1970-01-01T00:00:01+00:00
++++ libspa-0.4.1/Cargo.toml 2022-01-29T18:08:27.614403+00:00
+@@ -44,11 +44,7 @@
+ [dependencies.spa_sys]
+ version = "0"
+ package = "libspa-sys"
+-[dev-dependencies.pipewire]
+-version = "0"
+
+-[dev-dependencies.pipewire-sys]
+-version = "0"
+ [build-dependencies.cc]
+ version = "1.0.66"
+
diff --git a/rust-libspa.spec b/rust-libspa.spec
new file mode 100644
index 0000000..d355dd0
--- /dev/null
+++ b/rust-libspa.spec
@@ -0,0 +1,73 @@
+# Generated by rust2rpm 20
+# loop with pipewire, reenable after pipewire is in
+%bcond_with check
+%global debug_package %{nil}
+
+%global crate libspa
+
+Name: rust-%{crate}
+Version: 0.4.1
+Release: %autorelease
+Summary: Rust bindings for libspa
+
+# Upstream license specification: MIT
+License: MIT
+URL:
https://crates.io/crates/libspa
+Source: %{crates_source}
+# Initial patched metadata
+Patch0: libspa-fix-metadata.diff
+
+ExclusiveArch: %{rust_arches}
+
+BuildRequires: rust-packaging
+
+%global _description %{expand:
+Rust bindings for libspa.}
+
+%description %{_description}
+
+%package devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description devel %{_description}
+
+This package contains library source intended for building other packages which
+use the "%{crate}" crate.
+
+%files devel
+%doc README.md
+%{cargo_registry}/%{crate}-%{version_no_tilde}/
+
+%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 the "default" feature of the "%{crate}" crate.
+
+%files -n %{name}+default-devel
+%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
+
+%prep
+%autosetup -n %{crate}-%{version_no_tilde} -p1
+%cargo_prep
+
+%generate_buildrequires
+%cargo_generate_buildrequires
+
+%build
+%cargo_build
+
+%install
+%cargo_install
+
+%if %{with check}
+%check
+%cargo_test
+%endif
+
+%changelog
+%autochangelog
diff --git a/sources b/sources
new file mode 100644
index 0000000..7b430e4
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (libspa-0.4.1.crate) =
e158c8a68a722bfb5e6ce05eb893121d155f07e6a44880c0c93c22c3040454485ac269ba71e4b6feecca974f9ee785cde01412485fdc3c49b92720b192ebdcf1