The package rpms/rust-libspa0.7.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-libspa0.7.git/commit/?id=d59e72....
Change: +%ifarch i686
Thanks.
Full change: ============
commit d59e72fd556d3c72d88eb68ef12f3530f5417d50 Author: Fabio Valentini decathorpe@gmail.com Date: Mon Apr 1 00:04:11 2024 +0200
Initial import (libspa 0.7 compat package)
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9c67e6a --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/libspa-0.7.2.crate diff --git a/README.md b/README.md deleted file mode 100644 index 87cbc95..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# rust-libspa0.7 - -The rust-libspa0.7 package diff --git a/libspa-fix-32bit-compilation.diff b/libspa-fix-32bit-compilation.diff new file mode 100644 index 0000000..f01945e --- /dev/null +++ b/libspa-fix-32bit-compilation.diff @@ -0,0 +1,20 @@ +--- a/src/pod/parser.rs ++++ b/src/pod/parser.rs +@@ -177,7 +177,7 @@ impl<'d> Parser<'d> { + pub fn get_long(&mut self) -> Result<c_long, Errno> { + unsafe { + let mut long: MaybeUninit<c_long> = MaybeUninit::uninit(); +- let res = spa_sys::spa_pod_parser_get_long(self.as_raw_ptr(), long.as_mut_ptr()); ++ let res = spa_sys::spa_pod_parser_get_long(self.as_raw_ptr(), long.as_mut_ptr() as *mut _); + if res >= 0 { + Ok(long.assume_init()) + } else { +@@ -429,7 +429,7 @@ macro_rules! __parser_get__ { + let val: &mut i64 = $val; + let res = $crate::pod::parser::Parser::get_long($parser); + if let Ok(long) = res { +- *val = long; ++ *val = long as i64; + } + res.map(|_| {}) + } diff --git a/libspa-fix-metadata.diff b/libspa-fix-metadata.diff new file mode 100644 index 0000000..3196f11 --- /dev/null +++ b/libspa-fix-metadata.diff @@ -0,0 +1,20 @@ +--- libspa-0.7.2/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ libspa-0.7.2/Cargo.toml 2024-03-30T11:28:29.241951+00:00 +@@ -56,14 +56,14 @@ + version = "7" + + [dependencies.spa_sys] +-version = "0" ++version = "0.7" + package = "libspa-sys" + + [dev-dependencies.pipewire] +-version = "0" ++version = "0.7" + + [dev-dependencies.pipewire-sys] +-version = "0" ++version = "0.7" + + [build-dependencies.cc] + version = "1.0.66" diff --git a/rust-libspa0.7.spec b/rust-libspa0.7.spec new file mode 100644 index 0000000..27874ea --- /dev/null +++ b/rust-libspa0.7.spec @@ -0,0 +1,107 @@ +# Generated by rust2rpm 26 +# * resolve dependency loop with pipewire +%bcond_with check +%global debug_package %{nil} + +%global crate libspa + +Name: rust-libspa0.7 +Version: 0.7.2 +Release: %autorelease +Summary: Rust bindings for libspa + +License: MIT +URL: https://crates.io/crates/libspa +Source: %{crates_source} +# Manually created patch for downstream crate metadata changes +# * tighten libspa-sys, pipewire, pipewire-sys dependency from 0 to 0.7 +Patch: libspa-fix-metadata.diff +# coerce pointers to *mut i64 even on i686 +# for functions that expect 64-bit values +# https://gitlab.freedesktop.org/pipewire/pipewire-rs/-/issues/98 +Patch: libspa-fix-32bit-compilation.diff + +BuildRequires: cargo-rpm-macros >= 24 + +%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 +%license %{crate_instdir}/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 + +%package -n %{name}+v0_3_33-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+v0_3_33-devel %{_description} + +This package contains library source intended for building other packages which +use the "v0_3_33" feature of the "%{crate}" crate. + +%files -n %{name}+v0_3_33-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+v0_3_75-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+v0_3_75-devel %{_description} + +This package contains library source intended for building other packages which +use the "v0_3_75" feature of the "%{crate}" crate. + +%files -n %{name}+v0_3_75-devel +%ghost %{crate_instdir}/Cargo.toml + +%prep +%autosetup -n %{crate}-%{version} -p1 +%cargo_prep + +%generate_buildrequires +%cargo_generate_buildrequires + +%build +%cargo_build + +%install +%cargo_install + +%if %{with check} +%check +%ifarch i686 +# * pointer test panicked +# * test does not panic +%cargo_test -- -- --exact --skip pointer --skip result::tests::async_seq_panic +%else +# * test does not panic +%cargo_test -- -- --exact --skip result::tests::async_seq_panic +%endif +%endif + +%changelog +%autochangelog diff --git a/rust2rpm.toml b/rust2rpm.toml new file mode 100644 index 0000000..c543a56 --- /dev/null +++ b/rust2rpm.toml @@ -0,0 +1,11 @@ +[package] +cargo-toml-patch-comments = [ + "tighten libspa-sys, pipewire, pipewire-sys dependency from 0 to 0.7", +] + +[tests] +skip = [ + "result::tests::async_seq_panic", +] +skip-exact = true +comments = ["test does not panic"] diff --git a/sources b/sources new file mode 100644 index 0000000..240b64c --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (libspa-0.7.2.crate) = df09cd4d71f2d806967a7a18cb0eecdc2771cad271320e4c2479884aeae94d5c78c27ae37cdc55bc33c1a7c030b40982f3937e6027f7bf92f6ae20c94eb29075
arch-excludes@lists.fedoraproject.org