The package rpms/rust-pipewire.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-pipewire.git/commit/?id=e518...
https://src.fedoraproject.org/cgit/rpms/rust-pipewire.git/commit/?id=4b30...
https://src.fedoraproject.org/cgit/rpms/rust-pipewire.git/commit/?id=ae20....
Change:
-%ifarch %{arm} %{ix86}
+%ifarch %{ix86} x86_64
+%ifarch %{arm} %{ix86}
Thanks.
Full change:
============
commit d5785be6963b0caaf819c74f15dee13db65c73ed
Author: Michel Alexandre Salim <salimma(a)fedoraproject.org>
Date: Wed Apr 20 20:37:38 2022 -0700
Ungate tests nwo that libspa is fixed
Signed-off-by: Michel Alexandre Salim <salimma(a)fedoraproject.org>
diff --git a/pipewire-0.4.1-gate-x86-tests.patch b/pipewire-0.4.1-gate-x86-tests.patch
deleted file mode 100644
index 106d5d7..0000000
--- a/pipewire-0.4.1-gate-x86-tests.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-diff -ruN pipewire-0.4.1/src/properties.rs
pipewire-0.4.1-gate-x86-tests/src/properties.rs
---- pipewire-0.4.1/src/properties.rs 1973-11-29 13:33:09.000000000 -0800
-+++ pipewire-0.4.1-gate-x86-tests/src/properties.rs 2022-01-31 17:34:53.086613397 -0800
-@@ -262,6 +262,19 @@
- assert_eq!(Some("V1"), props2.get("K1"));
- }
-
-+ // fails outside x86* arches with:
-+ // error[E0308]: mismatched types
-+ // --> src/properties.rs:270:24
-+ // |
-+ // 270 | let dict = static_dict! { "K0" => "V0"
};
-+ // | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u8`, found
`i8`
-+ // |
-+ // = note: expected raw pointer `*const u8`
-+ // found raw pointer `*const i8`
-+ // = note: this error originates in the macro `static_dict` (in Nightly builds,
run with -Z macro-backtrace for more info)
-+ //
-+ // For more information about this error, try `rustc --explain E0308`.
-+ #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
- #[test]
- fn from_dict() {
- use spa::static_dict;
diff --git a/rust-pipewire.spec b/rust-pipewire.spec
index 8d4b0df..84524b7 100644
--- a/rust-pipewire.spec
+++ b/rust-pipewire.spec
@@ -14,10 +14,7 @@ Summary: Rust bindings for PipeWire
License: MIT
URL:
https://crates.io/crates/pipewire
Source0: %{crates_source}
-Source1:
https://gitlab.freedesktop.org/pipewire/pipewire-rs/-/raw/v0.4.1/LICENSE
-# the test using static_dict! is failing with E0308
-# expected *const u8, got *const i8
-Patch: %{crate}-0.4.1-gate-x86-tests.patch
+Source1:
https://gitlab.freedesktop.org/pipewire/pipewire-rs/-/raw/v%{version}/LIC...
ExclusiveArch: %{rust_arches}
commit a40c4636ca12b4da4b6a0301fdf8882b317320d1
Author: Michel Alexandre Salim <salimma(a)fedoraproject.org>
Date: Wed Mar 30 16:33:06 2022 -0700
Update to 0.5.0
Signed-off-by: Michel Alexandre Salim <salimma(a)fedoraproject.org>
diff --git a/.gitignore b/.gitignore
index 7c74a3f..f9c9b16 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,2 @@
-/pipewire-0.4.1.crate
+/pipewire-0.5.0.crate
/LICENSE
diff --git a/pipewire-0.4.1-cast-on-32bit.patch b/pipewire-0.4.1-cast-on-32bit.patch
deleted file mode 100644
index c48133d..0000000
--- a/pipewire-0.4.1-cast-on-32bit.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-diff -ruN pipewire-0.4.1/src/loop_.rs pipewire-0.4.1-cast-on-32bit/src/loop_.rs
---- pipewire-0.4.1/src/loop_.rs 1973-11-29 13:33:09.000000000 -0800
-+++ pipewire-0.4.1-cast-on-32bit/src/loop_.rs 2022-01-31 18:10:51.007062309 -0800
-@@ -408,12 +408,34 @@
- /// # Panics
- /// The provided durations seconds must fit in an i64. Otherwise, this function will
panic.
- pub fn update_timer(&self, value: Option<Duration>, interval:
Option<Duration>) -> SpaResult {
-+ #[cfg(target_pointer_width = "64")]
- fn duration_to_timespec(duration: Duration) -> spa_sys::timespec {
- spa_sys::timespec {
- tv_sec: duration.as_secs().try_into().expect("Duration too
long"),
- tv_nsec: duration.subsec_nanos().into(),
- }
- }
-+ // fix for this error on 32-bit architectures
-+ // error[E0277]: the trait bound `i32: From<u32>` is not satisfied
-+ // --> src/loop_.rs:414:50
-+ // |
-+ // 414 | tv_nsec: duration.subsec_nanos().into(),
-+ // | ^^^^ the trait
`From<u32>` is not implemented for `i32`
-+ // |
-+ // = help: the following implementations were found:
-+ // <i32 as From<NonZeroI32>>
-+ // <i32 as From<bool>>
-+ // <i32 as From<i16>>
-+ // <i32 as From<i8>>
-+ // and 3 others
-+ // = note: required because of the requirements on the impl of
`Into<i32>` for `u32`
-+ #[cfg(target_pointer_width = "32")]
-+ fn duration_to_timespec(duration: Duration) -> spa_sys::timespec {
-+ spa_sys::timespec {
-+ tv_sec: duration.as_secs().try_into().expect("Duration too
long"),
-+ tv_nsec: (duration.subsec_nanos() as i32).into(),
-+ }
-+ }
-
- let value = duration_to_timespec(value.unwrap_or_default());
- let interval = duration_to_timespec(interval.unwrap_or_default());
diff --git a/rust-pipewire.spec b/rust-pipewire.spec
index 4e1f0b4..8d4b0df 100644
--- a/rust-pipewire.spec
+++ b/rust-pipewire.spec
@@ -1,11 +1,11 @@
-# Generated by rust2rpm 20
+# Generated by rust2rpm 21
%bcond_without check
%global debug_package %{nil}
%global crate pipewire
Name: rust-%{crate}
-Version: 0.4.1
+Version: 0.5.0
Release: %autorelease
Summary: Rust bindings for PipeWire
@@ -15,15 +15,13 @@ License: MIT
URL:
https://crates.io/crates/pipewire
Source0: %{crates_source}
Source1:
https://gitlab.freedesktop.org/pipewire/pipewire-rs/-/raw/v0.4.1/LICENSE
-# duration.subsec_nanos() is u32 on 32-bit, needs casting
-Patch0: %{crate}-0.4.1-cast-on-32bit.patch
# the test using static_dict! is failing with E0308
# expected *const u8, got *const i8
-Patch1: %{crate}-0.4.1-gate-x86-tests.patch
+Patch: %{crate}-0.4.1-gate-x86-tests.patch
ExclusiveArch: %{rust_arches}
-BuildRequires: rust-packaging
+BuildRequires: rust-packaging >= 21
%global _description %{expand:
Rust bindings for PipeWire.}
@@ -41,8 +39,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}
@@ -54,7 +52,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 cb12783..92af5e3 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-SHA512 (pipewire-0.4.1.crate) =
68b7d7932effd327411901b7348a64a6be8fe0cb0b4586b62c5c6397afc7d3a8f4975a8df2b2084b9e1a81ea621269aeba18982275cf09142e86fb5318f96c0e
+SHA512 (pipewire-0.5.0.crate) =
fbd9fee97c607c2912370f1a48739bea369f1754737b49e32038eca1bafb83a2bed73db1e5b12a0b35ebf3bf72ab636dc86283e8a382c5b8de312ecba3b71a64
SHA512 (LICENSE) =
7784849689e7dda4e5b75b06cbc5a27afdff4021bbb5edcd9111c3c03e59bdb53ef784168ba1f5223602ced2a3f31f0c33f3822d078b262aa0ddefd41d895763
commit 54acff171a4be4343d0e4a91317d979fa035def6
Author: Fabio Valentini <decathorpe(a)gmail.com>
Date: Sat Feb 12 23:05:04 2022 +0100
Add missing LICENSE file
diff --git a/.gitignore b/.gitignore
index b685cee..7c74a3f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
/pipewire-0.4.1.crate
+/LICENSE
diff --git a/rust-pipewire.spec b/rust-pipewire.spec
index 57bb737..4e1f0b4 100644
--- a/rust-pipewire.spec
+++ b/rust-pipewire.spec
@@ -10,9 +10,11 @@ Release: %autorelease
Summary: Rust bindings for PipeWire
# Upstream license specification: MIT
+#
https://gitlab.freedesktop.org/pipewire/pipewire-rs/-/issues/37
License: MIT
URL:
https://crates.io/crates/pipewire
-Source: %{crates_source}
+Source0: %{crates_source}
+Source1:
https://gitlab.freedesktop.org/pipewire/pipewire-rs/-/raw/v0.4.1/LICENSE
# duration.subsec_nanos() is u32 on 32-bit, needs casting
Patch0: %{crate}-0.4.1-cast-on-32bit.patch
# the test using static_dict! is failing with E0308
@@ -38,6 +40,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}/
@@ -55,6 +58,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 9da7f1f..cb12783 100644
--- a/sources
+++ b/sources
@@ -1 +1,2 @@
SHA512 (pipewire-0.4.1.crate) =
68b7d7932effd327411901b7348a64a6be8fe0cb0b4586b62c5c6397afc7d3a8f4975a8df2b2084b9e1a81ea621269aeba18982275cf09142e86fb5318f96c0e
+SHA512 (LICENSE) =
7784849689e7dda4e5b75b06cbc5a27afdff4021bbb5edcd9111c3c03e59bdb53ef784168ba1f5223602ced2a3f31f0c33f3822d078b262aa0ddefd41d895763
commit e51821d41698b1f5c426eaf27c5057f460e972f8
Author: Michel Alexandre Salim <salimma(a)fedoraproject.org>
Date: Mon Jan 31 17:45:38 2022 -0800
Rework patches
Signed-off-by: Michel Alexandre Salim <salimma(a)fedoraproject.org>
diff --git a/pipewire-0.4.1-cast-on-32bit.patch b/pipewire-0.4.1-cast-on-32bit.patch
index ff5f19f..c48133d 100644
--- a/pipewire-0.4.1-cast-on-32bit.patch
+++ b/pipewire-0.4.1-cast-on-32bit.patch
@@ -1,12 +1,38 @@
diff -ruN pipewire-0.4.1/src/loop_.rs pipewire-0.4.1-cast-on-32bit/src/loop_.rs
--- pipewire-0.4.1/src/loop_.rs 1973-11-29 13:33:09.000000000 -0800
-+++ pipewire-0.4.1-cast-on-32bit/src/loop_.rs 2022-01-31 16:03:11.772091123 -0800
-@@ -411,7 +411,7 @@
++++ pipewire-0.4.1-cast-on-32bit/src/loop_.rs 2022-01-31 18:10:51.007062309 -0800
+@@ -408,12 +408,34 @@
+ /// # Panics
+ /// The provided durations seconds must fit in an i64. Otherwise, this function will
panic.
+ pub fn update_timer(&self, value: Option<Duration>, interval:
Option<Duration>) -> SpaResult {
++ #[cfg(target_pointer_width = "64")]
fn duration_to_timespec(duration: Duration) -> spa_sys::timespec {
spa_sys::timespec {
tv_sec: duration.as_secs().try_into().expect("Duration too
long"),
-- tv_nsec: duration.subsec_nanos().into(),
-+ tv_nsec: (duration.subsec_nanos() as i32).into(),
+ tv_nsec: duration.subsec_nanos().into(),
}
}
++ // fix for this error on 32-bit architectures
++ // error[E0277]: the trait bound `i32: From<u32>` is not satisfied
++ // --> src/loop_.rs:414:50
++ // |
++ // 414 | tv_nsec: duration.subsec_nanos().into(),
++ // | ^^^^ the trait
`From<u32>` is not implemented for `i32`
++ // |
++ // = help: the following implementations were found:
++ // <i32 as From<NonZeroI32>>
++ // <i32 as From<bool>>
++ // <i32 as From<i16>>
++ // <i32 as From<i8>>
++ // and 3 others
++ // = note: required because of the requirements on the impl of
`Into<i32>` for `u32`
++ #[cfg(target_pointer_width = "32")]
++ fn duration_to_timespec(duration: Duration) -> spa_sys::timespec {
++ spa_sys::timespec {
++ tv_sec: duration.as_secs().try_into().expect("Duration too
long"),
++ tv_nsec: (duration.subsec_nanos() as i32).into(),
++ }
++ }
+ let value = duration_to_timespec(value.unwrap_or_default());
+ let interval = duration_to_timespec(interval.unwrap_or_default());
diff --git a/pipewire-0.4.1-gate-x86-tests.patch b/pipewire-0.4.1-gate-x86-tests.patch
new file mode 100644
index 0000000..106d5d7
--- /dev/null
+++ b/pipewire-0.4.1-gate-x86-tests.patch
@@ -0,0 +1,23 @@
+diff -ruN pipewire-0.4.1/src/properties.rs
pipewire-0.4.1-gate-x86-tests/src/properties.rs
+--- pipewire-0.4.1/src/properties.rs 1973-11-29 13:33:09.000000000 -0800
++++ pipewire-0.4.1-gate-x86-tests/src/properties.rs 2022-01-31 17:34:53.086613397 -0800
+@@ -262,6 +262,19 @@
+ assert_eq!(Some("V1"), props2.get("K1"));
+ }
+
++ // fails outside x86* arches with:
++ // error[E0308]: mismatched types
++ // --> src/properties.rs:270:24
++ // |
++ // 270 | let dict = static_dict! { "K0" => "V0"
};
++ // | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u8`, found
`i8`
++ // |
++ // = note: expected raw pointer `*const u8`
++ // found raw pointer `*const i8`
++ // = note: this error originates in the macro `static_dict` (in Nightly builds,
run with -Z macro-backtrace for more info)
++ //
++ // For more information about this error, try `rustc --explain E0308`.
++ #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
+ #[test]
+ fn from_dict() {
+ use spa::static_dict;
diff --git a/rust-pipewire.spec b/rust-pipewire.spec
index 33b8314..57bb737 100644
--- a/rust-pipewire.spec
+++ b/rust-pipewire.spec
@@ -1,12 +1,5 @@
# Generated by rust2rpm 20
-%ifarch %{ix86} x86_64
%bcond_without check
-%else
-# armv7hl, aarch64, ppc64le, s390:
-# the test using static_dict! is failing with E0308
-# expected *const u8, got *const i8
-%bcond_without check
-%endif
%global debug_package %{nil}
%global crate pipewire
@@ -20,20 +13,11 @@ Summary: Rust bindings for PipeWire
License: MIT
URL:
https://crates.io/crates/pipewire
Source: %{crates_source}
-# error[E0277]: the trait bound `i32: From<u32>` is not satisfied
-# --> src/loop_.rs:414:50
-# |
-# 414 | tv_nsec: duration.subsec_nanos().into(),
-# | ^^^^ the trait `From<u32>`
is not implemented for `i32`
-# |
-# = help: the following implementations were found:
-# <i32 as From<NonZeroI32>>
-# <i32 as From<bool>>
-# <i32 as From<i16>>
-# <i32 as From<i8>>
-# and 3 others
-# = note: required because of the requirements on the impl of `Into<i32>` for
`u32`
+# duration.subsec_nanos() is u32 on 32-bit, needs casting
Patch0: %{crate}-0.4.1-cast-on-32bit.patch
+# the test using static_dict! is failing with E0308
+# expected *const u8, got *const i8
+Patch1: %{crate}-0.4.1-gate-x86-tests.patch
ExclusiveArch: %{rust_arches}
@@ -70,10 +54,7 @@ use the "default" feature of the "%{crate}" crate.
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
%prep
-%setup -n %{crate}-%{version_no_tilde} -q
-%ifarch %{arm} %{ix86}
-%patch0 -p1
-%endif
+%autosetup -n %{crate}-%{version_no_tilde} -p1
%cargo_prep
%generate_buildrequires
commit 4b30edc116f7e33a7a16b9ba2e6e61dc7f6663b6
Author: Michel Alexandre Salim <salimma(a)fedoraproject.org>
Date: Mon Jan 31 16:40:06 2022 -0800
Flip the test gating
Signed-off-by: Michel Alexandre Salim <salimma(a)fedoraproject.org>
diff --git a/rust-pipewire.spec b/rust-pipewire.spec
index 30c7d3c..33b8314 100644
--- a/rust-pipewire.spec
+++ b/rust-pipewire.spec
@@ -1,5 +1,5 @@
# Generated by rust2rpm 20
-%ifnarch %{ix86} x86_64
+%ifarch %{ix86} x86_64
%bcond_without check
%else
# armv7hl, aarch64, ppc64le, s390:
commit ae205384fcfaa9784b761e25c043c78561dc7199
Author: Michel Alexandre Salim <salimma(a)fedoraproject.org>
Date: Mon Jan 31 14:42:59 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..b685cee
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/pipewire-0.4.1.crate
diff --git a/pipewire-0.4.1-cast-on-32bit.patch b/pipewire-0.4.1-cast-on-32bit.patch
new file mode 100644
index 0000000..ff5f19f
--- /dev/null
+++ b/pipewire-0.4.1-cast-on-32bit.patch
@@ -0,0 +1,12 @@
+diff -ruN pipewire-0.4.1/src/loop_.rs pipewire-0.4.1-cast-on-32bit/src/loop_.rs
+--- pipewire-0.4.1/src/loop_.rs 1973-11-29 13:33:09.000000000 -0800
++++ pipewire-0.4.1-cast-on-32bit/src/loop_.rs 2022-01-31 16:03:11.772091123 -0800
+@@ -411,7 +411,7 @@
+ fn duration_to_timespec(duration: Duration) -> spa_sys::timespec {
+ spa_sys::timespec {
+ tv_sec: duration.as_secs().try_into().expect("Duration too
long"),
+- tv_nsec: duration.subsec_nanos().into(),
++ tv_nsec: (duration.subsec_nanos() as i32).into(),
+ }
+ }
+
diff --git a/rust-pipewire.spec b/rust-pipewire.spec
new file mode 100644
index 0000000..30c7d3c
--- /dev/null
+++ b/rust-pipewire.spec
@@ -0,0 +1,94 @@
+# Generated by rust2rpm 20
+%ifnarch %{ix86} x86_64
+%bcond_without check
+%else
+# armv7hl, aarch64, ppc64le, s390:
+# the test using static_dict! is failing with E0308
+# expected *const u8, got *const i8
+%bcond_without check
+%endif
+%global debug_package %{nil}
+
+%global crate pipewire
+
+Name: rust-%{crate}
+Version: 0.4.1
+Release: %autorelease
+Summary: Rust bindings for PipeWire
+
+# Upstream license specification: MIT
+License: MIT
+URL:
https://crates.io/crates/pipewire
+Source: %{crates_source}
+# error[E0277]: the trait bound `i32: From<u32>` is not satisfied
+# --> src/loop_.rs:414:50
+# |
+# 414 | tv_nsec: duration.subsec_nanos().into(),
+# | ^^^^ the trait `From<u32>`
is not implemented for `i32`
+# |
+# = help: the following implementations were found:
+# <i32 as From<NonZeroI32>>
+# <i32 as From<bool>>
+# <i32 as From<i16>>
+# <i32 as From<i8>>
+# and 3 others
+# = note: required because of the requirements on the impl of `Into<i32>` for
`u32`
+Patch0: %{crate}-0.4.1-cast-on-32bit.patch
+
+ExclusiveArch: %{rust_arches}
+
+BuildRequires: rust-packaging
+
+%global _description %{expand:
+Rust bindings for PipeWire.}
+
+%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
+%setup -n %{crate}-%{version_no_tilde} -q
+%ifarch %{arm} %{ix86}
+%patch0 -p1
+%endif
+%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..9da7f1f
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (pipewire-0.4.1.crate) =
68b7d7932effd327411901b7348a64a6be8fe0cb0b4586b62c5c6397afc7d3a8f4975a8df2b2084b9e1a81ea621269aeba18982275cf09142e86fb5318f96c0e