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=51c4...
https://src.fedoraproject.org/cgit/rpms/rust-pipewire.git/commit/?id=e23b...
https://src.fedoraproject.org/cgit/rpms/rust-pipewire.git/commit/?id=aebf...
https://src.fedoraproject.org/cgit/rpms/rust-pipewire.git/commit/?id=1788....
Change:
-%ifarch %{arm} %{ix86}
+%ifarch %{ix86} x86_64
+%ifarch %{arm} %{ix86}
-ExclusiveArch: %{rust_arches}
Thanks.
Full change:
============
commit 51c46d5d48507ae44f565bcfc5a7ae9de5169078
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 e23bc57df96e6ad7a270d95699e1e4e35bb5cea2
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 aebfebf492234e48d7d56928c8ece95c79de83cf
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
commit 1788bce1de304b8b7d9c7537a201ebb82aa89f43
Author: Michel Alexandre Salim <salimma(a)fedoraproject.org>
Date: Thu Apr 21 09:52:43 2022 -0700
Revert to empty repo
F35 is not meant to be upgraded to 0.5.0 and F34 did not have any build.
Need to revert to this with an empty changelog so `rpmautospec` will
generate the correct changelog entries
This reverts commit ae205384fcfaa9784b761e25c043c78561dc7199.
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index f9c9b16..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/pipewire-0.5.0.crate
-/LICENSE
diff --git a/changelog b/changelog
new file mode 100644
index 0000000..e69de29
diff --git a/rust-pipewire.spec b/rust-pipewire.spec
deleted file mode 100644
index 84524b7..0000000
--- a/rust-pipewire.spec
+++ /dev/null
@@ -1,74 +0,0 @@
-# Generated by rust2rpm 21
-%bcond_without check
-%global debug_package %{nil}
-
-%global crate pipewire
-
-Name: rust-%{crate}
-Version: 0.5.0
-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
-Source0: %{crates_source}
-Source1:
https://gitlab.freedesktop.org/pipewire/pipewire-rs/-/raw/v%{version}/LIC...
-
-ExclusiveArch: %{rust_arches}
-
-BuildRequires: rust-packaging >= 21
-
-%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
-%license LICENSE
-%doc %{crate_instdir}/README.md
-%{crate_instdir}/
-
-%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 %{crate_instdir}/Cargo.toml
-
-%prep
-%autosetup -n %{crate}-%{version_no_tilde} -p1
-cp %{SOURCE1} .
-%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
deleted file mode 100644
index 92af5e3..0000000
--- a/sources
+++ /dev/null
@@ -1,2 +0,0 @@
-SHA512 (pipewire-0.5.0.crate) =
fbd9fee97c607c2912370f1a48739bea369f1754737b49e32038eca1bafb83a2bed73db1e5b12a0b35ebf3bf72ab636dc86283e8a382c5b8de312ecba3b71a64
-SHA512 (LICENSE) =
7784849689e7dda4e5b75b06cbc5a27afdff4021bbb5edcd9111c3c03e59bdb53ef784168ba1f5223602ced2a3f31f0c33f3822d078b262aa0ddefd41d895763