Architecture specific change in rpms/rust-libspa.git
by githook-noreply@fedoraproject.org
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=631212...
https://src.fedoraproject.org/cgit/rpms/rust-libspa.git/commit/?id=90c351....
Change:
+ExclusiveArch: %{rust_arches}
-%ifarch %{ix86}
Thanks.
Full change:
============
commit f414db3135a8ef44869413f1643d96b31b656b41
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 63121224ccee408cc479dcdcef9d00cdb0855b94
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
commit 90c3516cd70a34002e34107227b6ede13b2168ca
Author: Michel Alexandre Salim <salimma(a)fedoraproject.org>
Date: Thu Apr 21 09:41:58 2022 -0700
Revert to empty repo
F35 is not meant to be upgraded to 0.5.0 (system-deps is too old)
and F34 did not have any libspa build.
Need to revert to this with an empty changelog so `rpmautospec` will
generate the correct changelog entries
This reverts commit 16104dca7346eed00e517b4980134ce383fad661.
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index f70b9e0..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/libspa-0.5.0.crate
-/LICENSE
diff --git a/changelog b/changelog
new file mode 100644
index 0000000..e69de29
diff --git a/libspa-use_platform_indep_c_char.patch b/libspa-use_platform_indep_c_char.patch
deleted file mode 100644
index 9d72947..0000000
--- a/libspa-use_platform_indep_c_char.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-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
deleted file mode 100644
index ec19f1a..0000000
--- a/rust-libspa.spec
+++ /dev/null
@@ -1,82 +0,0 @@
-# Generated by rust2rpm 21
-%bcond_without check
-%global debug_package %{nil}
-
-%global crate libspa
-
-Name: rust-%{crate}
-Version: 0.5.0
-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
-Source0: %{crates_source}
-Source1: https://gitlab.freedesktop.org/pipewire/pipewire-rs/-/raw/v%{version}/LIC...
-
-# * work around architecture-specific test failures:
-# https://gitlab.freedesktop.org/pipewire/pipewire-rs/-/issues/35
-Patch: https://gitlab.freedesktop.org/pipewire/pipewire-rs/-/merge_requests/122....
-
-ExclusiveArch: %{rust_arches}
-
-BuildRequires: rust-packaging >= 21
-
-%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 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} -p2
-cp %{SOURCE1} .
-%cargo_prep
-
-%generate_buildrequires
-%cargo_generate_buildrequires
-
-%build
-%cargo_build
-
-%install
-%cargo_install
-
-%if %{with check}
-%check
-%ifarch %{ix86}
-%cargo_test -- -- --skip 'result::tests::async_seq_panic' --skip 'pointer'
-%else
-%cargo_test -- -- --skip 'result::tests::async_seq_panic'
-%endif
-%endif
-
-%changelog
-%autochangelog
diff --git a/sources b/sources
deleted file mode 100644
index 1254c79..0000000
--- a/sources
+++ /dev/null
@@ -1,2 +0,0 @@
-SHA512 (libspa-0.5.0.crate) = 72bb0613e6d828120a6979d937e2fb5eda8b098ef67ac5e42fe8d531cc7363b3dd767a27f422730aed662755d6718f4723bd0d1a6dba872cfad50060f5c1127a
-SHA512 (LICENSE) = 7784849689e7dda4e5b75b06cbc5a27afdff4021bbb5edcd9111c3c03e59bdb53ef784168ba1f5223602ced2a3f31f0c33f3822d078b262aa0ddefd41d895763
1 year, 11 months
Architecture specific change in rpms/rust-libspa.git
by githook-noreply@fedoraproject.org
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=90c351....
Change:
-%ifarch %{ix86}
Thanks.
Full change:
============
commit 90c3516cd70a34002e34107227b6ede13b2168ca
Author: Michel Alexandre Salim <salimma(a)fedoraproject.org>
Date: Thu Apr 21 09:41:58 2022 -0700
Revert to empty repo
F35 is not meant to be upgraded to 0.5.0 (system-deps is too old)
and F34 did not have any libspa build.
Need to revert to this with an empty changelog so `rpmautospec` will
generate the correct changelog entries
This reverts commit 16104dca7346eed00e517b4980134ce383fad661.
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index f70b9e0..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/libspa-0.5.0.crate
-/LICENSE
diff --git a/changelog b/changelog
new file mode 100644
index 0000000..e69de29
diff --git a/libspa-use_platform_indep_c_char.patch b/libspa-use_platform_indep_c_char.patch
deleted file mode 100644
index 9d72947..0000000
--- a/libspa-use_platform_indep_c_char.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-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
deleted file mode 100644
index ec19f1a..0000000
--- a/rust-libspa.spec
+++ /dev/null
@@ -1,82 +0,0 @@
-# Generated by rust2rpm 21
-%bcond_without check
-%global debug_package %{nil}
-
-%global crate libspa
-
-Name: rust-%{crate}
-Version: 0.5.0
-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
-Source0: %{crates_source}
-Source1: https://gitlab.freedesktop.org/pipewire/pipewire-rs/-/raw/v%{version}/LIC...
-
-# * work around architecture-specific test failures:
-# https://gitlab.freedesktop.org/pipewire/pipewire-rs/-/issues/35
-Patch: https://gitlab.freedesktop.org/pipewire/pipewire-rs/-/merge_requests/122....
-
-ExclusiveArch: %{rust_arches}
-
-BuildRequires: rust-packaging >= 21
-
-%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 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} -p2
-cp %{SOURCE1} .
-%cargo_prep
-
-%generate_buildrequires
-%cargo_generate_buildrequires
-
-%build
-%cargo_build
-
-%install
-%cargo_install
-
-%if %{with check}
-%check
-%ifarch %{ix86}
-%cargo_test -- -- --skip 'result::tests::async_seq_panic' --skip 'pointer'
-%else
-%cargo_test -- -- --skip 'result::tests::async_seq_panic'
-%endif
-%endif
-
-%changelog
-%autochangelog
diff --git a/sources b/sources
deleted file mode 100644
index 1254c79..0000000
--- a/sources
+++ /dev/null
@@ -1,2 +0,0 @@
-SHA512 (libspa-0.5.0.crate) = 72bb0613e6d828120a6979d937e2fb5eda8b098ef67ac5e42fe8d531cc7363b3dd767a27f422730aed662755d6718f4723bd0d1a6dba872cfad50060f5c1127a
-SHA512 (LICENSE) = 7784849689e7dda4e5b75b06cbc5a27afdff4021bbb5edcd9111c3c03e59bdb53ef784168ba1f5223602ced2a3f31f0c33f3822d078b262aa0ddefd41d895763
1 year, 11 months
Architecture specific change in rpms/python-elephant.git
by githook-noreply@fedoraproject.org
The package rpms/python-elephant.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/python-elephant.git/commit/?id=fb....
Change:
+%ifarch %{arm64}
Thanks.
Full change:
============
commit fbcc094b021755f0b3d18732645a1dc46cb80972
Author: Ankur Sinha (Ankur Sinha Gmail) <sanjay.ankur(a)gmail.com>
Date: Thu Apr 21 13:47:12 2022 +0100
feat: update to 0.11.0 (Fixes rhbz#2070262)
diff --git a/.gitignore b/.gitignore
index e9bc94a..46fa8ee 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
/elephant-0.6.2.tar.gz
/elephant-0.6.4.tar.gz
/elephant-0.10.0.tar.gz
+/elephant-0.11.0.tar.gz
diff --git a/0001-Do-not-download-fim-so.patch b/0001-Do-not-download-fim-so.patch
deleted file mode 100644
index 8b4aa2f..0000000
--- a/0001-Do-not-download-fim-so.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 18c9e30f925240d64b02daec31c48cfa65368f77 Mon Sep 17 00:00:00 2001
-From: "Ankur Sinha (Ankur Sinha Gmail)" <sanjay.ankur(a)gmail.com>
-Date: Fri, 14 Jun 2019 16:26:22 +0100
-Subject: [PATCH] Do not download fim so
-
----
- setup.py | 27 ---------------------------
- 1 file changed, 27 deletions(-)
-
-diff --git a/setup.py b/setup.py
-index e0a4b93..7b22001 100644
---- a/setup.py
-+++ b/setup.py
-@@ -17,33 +17,6 @@ for extra in ['extras', 'docs', 'tests']:
- with open('requirements-{0}.txt'.format(extra), 'r') as fp:
- extras_require[extra] = fp.read()
-
--# spade specific
--is_64bit = sys.maxsize > 2 ** 32
--is_python3 = float(sys.version[0:3]) > 2.7
--if platform.uname()[0] == "Windows":
-- oext = ".pyd"
--elif platform.uname()[0] == "Linux":
-- oext = ".so"
--else:
-- oext = None
--
--if oext:
-- if is_python3:
-- py_ver = '3'
-- else:
-- py_ver = '2'
-- if is_64bit:
-- arch = '64'
-- else:
-- arch = '32'
--
-- try:
-- urlretrieve('http://www.borgelt.net/bin' +
-- arch + '/py' + py_ver + '/fim' + oext,
-- 'elephant/spade_src/fim' + oext)
-- except:
-- print("Unable to download fim" + oext + " module.")
--
- setup(
- name="elephant",
- version='0.6.2',
---
-2.21.0
-
diff --git a/0001-use-fedora-build-flags.patch b/0001-use-fedora-build-flags.patch
new file mode 100644
index 0000000..b3fb225
--- /dev/null
+++ b/0001-use-fedora-build-flags.patch
@@ -0,0 +1,27 @@
+From 9e38be2effa193c32a5cf44601f51612c15137f1 Mon Sep 17 00:00:00 2001
+From: "Ankur Sinha (Ankur Sinha Gmail)" <sanjay.ankur(a)gmail.com>
+Date: Wed, 20 Apr 2022 14:25:56 +0100
+Subject: [PATCH] use fedora build flags
+
+---
+ setup.py | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index f972085..96cce0b 100644
+--- a/setup.py
++++ b/setup.py
+@@ -49,9 +49,7 @@ else:
+ libraries=['pthread', 'gomp'],
+ extra_compile_args=[
+ '-DMODULE_NAME=fim', '-DUSE_OPENMP', '-DWITH_SIG_TERM',
+- '-Dfim_EXPORTS', '-O3', '-pedantic', '-Wextra',
+- '-Weffc++', '-Wunused-result', '-Werror',
+- '-fopenmp', '-std=gnu++17'])
++ '-Dfim_EXPORTS', '-Weffc++', '-fopenmp', '-std=gnu++17'])
+
+ setup(
+ name="elephant",
+--
+2.35.1
+
diff --git a/python-elephant.spec b/python-elephant.spec
index f10b7f2..b6b9a48 100644
--- a/python-elephant.spec
+++ b/python-elephant.spec
@@ -1,84 +1,45 @@
-# Issue filed upstream asking them to not use nose
-# https://github.com/NeuralEnsemble/elephant/issues/408
-
-# Disabled by default
-%bcond_with docs
-
# Try to download data, so a few are disabled.
# We test these in mock using --with=net_tests --enable-network
%bcond_with net_tests
%global pypi_name elephant
-Name: python-%{pypi_name}
-Version: 0.10.0
+Name: python-elephant
+Version: 0.11.0
Release: %autorelease
Summary: Elephant is a package for analysis of electrophysiology data in Python
License: BSD
URL: http://neuralensemble.org/elephant
-Source0: %{pypi_source}
-BuildArch: noarch
+Source0: %{pypi_source elephant}
+# All changes are here
+# https://github.com/sanjayankur31/elephant/tree/fedora-0.11.0
+Patch0: 0001-use-fedora-build-flags.patch
-# Remove bits from setup.py that try to download fim.
-# we use the packaged version
-# Patch0: 0001-Do-not-download-fim-so.patch
+# Includes a modified copy of fim, so we cannot use the system copy of pyfim.
+# https://github.com/NeuralEnsemble/elephant/issues/471#issuecomment-109890...
BuildRequires: git-core
+BuildRequires: gcc-c++
BuildRequires: python3-devel
-BuildRequires: python3dist(neo)
-BuildRequires: python3dist(numpy)
-BuildRequires: python3dist(pandas)
-BuildRequires: python3dist(quantities)
-BuildRequires: python3dist(scikit-learn)
-BuildRequires: python3dist(scipy)
-BuildRequires: python3dist(statsmodels)
-BuildRequires: python3dist(setuptools)
-BuildRequires: python3dist(six)
-BuildRequires: python3dist(fim)
-BuildRequires: python3dist(pytest)
-BuildRequires: python3dist(tqdm)
-
-%if %{with docs}
-BuildRequires: python3dist(nbsphinx)
-BuildRequires: python3dist(numpydoc)
-BuildRequires: python3dist(sphinx)
-BuildRequires: python3-sphinx_rtd_theme
-BuildRequires: python3dist(sphinx-gallery)
-BuildRequires: python3dist(sphinxcontrib-bibtex)
-%endif
%description
Elephant - Electrophysiology Analysis Toolkit Elephant is a package for the
analysis of neurophysiology data, based on Neo.
-%{?python_enable_dependency_generator}
-
-%package -n python3-%{pypi_name}
+%package -n python3-elephant
Summary: %{summary}
-# For F32
-%py_provides python3-%{pypi_name}
-
-%description -n python3-%{pypi_name}
+%description -n python3-elephant
Elephant - Electrophysiology Analysis Toolkit Elephant is a package for the
analysis of neurophysiology data, based on Neo.
-%if %{with docs}
-%package -n python-%{pypi_name}-doc
-Summary: elephant documentation
-
-%description -n python-%{pypi_name}-doc
-Documentation for elephant
-
-%endif
-
%prep
-%autosetup -n %{pypi_name}-%{version} -S git
-# Remove bundled egg-info
-rm -rf %{pypi_name}.egg-info
+%autosetup -n elephant-%{version} -S git
-rm -frv doc/_build
+# Loosen scipy version cap
+# https://github.com/NeuralEnsemble/elephant/issues/47
+sed -i 's/scipy.*/scipy/' requirements/requirements.txt
for lib in $(find . -type f -name "*.py"); do
sed '1{\@^#!/usr/bin/env python@d}' $lib > $lib.new &&
@@ -86,47 +47,42 @@ for lib in $(find . -type f -name "*.py"); do
mv $lib.new $lib
done
-# Use fim from python-pyfim which is faster
-sed -i 's|from elephant.spade_src import fim|import fim|' elephant/spade.py
+# collect all test requirements in one file
+echo >> requirements/requirements-tests.txt
+cat requirements/requirements-extras.txt >> requirements/requirements-tests.txt
+
+%generate_buildrequires
+%pyproject_buildrequires -r requirements/requirements-tests.txt
%build
-%py3_build
-
-%if %{with docs}
-pushd doc
- make SPHINXBUILD=sphinx-build-3 html
- rm -rf build/.doctrees
- rm -rf build/.buildinfo
-popd
-%endif
+%pyproject_wheel
%install
-%py3_install
+%pyproject_install
+%pyproject_save_files elephant
%check
# One test fails generally: reported upstream
-# https://github.com/NeuralEnsemble/elephant/issues/409
-# Another fails on 32 bit builders: reported upstream
# https://github.com/NeuralEnsemble/elephant/issues/410
-%if %{with net_tests}
-pytest-%{python3_version} -k "not test_repr and not test__UE_surrogate"
-%else
-# Disable tests that download bits
-pytest-%{python3_version} -k "not test_repr and not test__UE_surrogate and not test_spike_contrast_with_Izhikevich_network_auto and not test_Riehle_et_al_97_UE"
+#k="not test__UE_surrogate"
+
+# fails on aarch64
+# reported upstream: https://github.com/NeuralEnsemble/elephant/issues/479
+%ifarch %{arm64}
+k="${k:-}${k:+ and }not test_welch_psd_multidim_input and not test_welch_cohere_multidim_input"
%endif
+%if %{without net_tests}
+# Disable tests that download bits
+k="${k:-}${k:+ and }not test_repr and not test__UE_surrogate and not test_spike_contrast_with_Izhikevich_network_auto and not test_Riehle_et_al_97_UE and not test_multitaper_psd_against_nitime"
+%endif
-%files -n python3-%{pypi_name}
-%license LICENSE.txt elephant/spade_src/LICENSE
-%doc README.md elephant/current_source_density_src/README.md
-%{python3_sitelib}/%{pypi_name}
-%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info
+# serial
+# MPI tests hang in mock and builders, not sure why, so we skip them for the moment
+%pytest -v -k "${k} and not test_parallel"
-%if %{with docs}
-%files -n python-%{pypi_name}-doc
-%doc doc/_build/html
+%files -n python3-elephant -f %{pyproject_files}
%license LICENSE.txt elephant/spade_src/LICENSE
-%endif
%changelog
%autochangelog
diff --git a/sources b/sources
index f426633..a1e7172 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (elephant-0.10.0.tar.gz) = cc10c0e9e44346a97b183408e92b4c5f55b0887e029c1bf4222473253297507e89f2af15210fb58e84adc90d7448bff97b28f814f2b6a072f06ae9049eaa6580
+SHA512 (elephant-0.11.0.tar.gz) = 47ed7d4b348c9050cebcc63fd90835600ffef429c8960df5090cba3384daa2dc83a72b147a25a3ce9264b0eb4488b22f6182dd86ae57fd4dbecdf7b3e6c32103
commit 024274ecf5e4573c5a88e6bed9a31cd1b74293f6
Author: Ankur Sinha (Ankur Sinha Gmail) <sanjay.ankur(a)gmail.com>
Date: Mon Apr 11 17:18:34 2022 +0100
chore: use rpmautospec
diff --git a/changelog b/changelog
new file mode 100644
index 0000000..2d55669
--- /dev/null
+++ b/changelog
@@ -0,0 +1,53 @@
+* Fri Jan 21 2022 Fedora Release Engineering <releng(a)fedoraproject.org> - 0.10.0-5
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
+
+* Fri Jul 23 2021 Fedora Release Engineering <releng(a)fedoraproject.org> - 0.10.0-4
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
+
+* Fri Jun 04 2021 Python Maint <python-maint(a)redhat.com> - 0.10.0-3
+- Rebuilt for Python 3.10
+
+* Fri Mar 12 2021 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.10.0-2
+- Add py_provides macro for F32
+
+* Thu Mar 11 2021 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.10.0-1
+- Update to new release
+- Enable all non-network dependent tests
+- File bug for failing tests
+- Update fim tweak: no longer required in the test file
+- include statsmodels dependency
+
+* Wed Jan 27 2021 Fedora Release Engineering <releng(a)fedoraproject.org> - 0.6.4-5
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
+
+* Wed Jul 29 2020 Fedora Release Engineering <releng(a)fedoraproject.org> - 0.6.4-4
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
+
+* Tue May 26 2020 Miro Hrončok <mhroncok(a)redhat.com> - 0.6.4-3
+- Rebuilt for Python 3.9
+
+* Thu Jan 30 2020 Fedora Release Engineering <releng(a)fedoraproject.org> - 0.6.4-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
+
+* Mon Dec 23 2019 Luis Bazan <lbazan(a)fedoraproject.org> - 0.6.4-1
+- New upstream version
+
+* Mon Aug 19 2019 Miro Hrončok <mhroncok(a)redhat.com> - 0.6.2-5
+- Rebuilt for Python 3.8
+
+* Fri Jul 26 2019 Fedora Release Engineering <releng(a)fedoraproject.org> - 0.6.2-4
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
+
+* Fri Jun 14 2019 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.6.2-3
+- Use pyfim which is 10 times faster than the python fast_fca according to docs
+- Patch out bits that try to download fim
+- Version neo requirements
+
+* Fri Jun 14 2019 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.6.2-2
+- Report issues upstream and add links to spec file
+
+* Tue Jun 11 2019 Luis Bazan <lbazan(a)fedoraproject.org> - 0.6.2-2
+- Fix comment #11 BZ#1651824
+
+* Fri Jun 07 2019 Luis Bazan <lbazan(a)fedoraproject.org> - 0.6.2-1
+- Initial package.
diff --git a/python-elephant.spec b/python-elephant.spec
index b3c3b97..f10b7f2 100644
--- a/python-elephant.spec
+++ b/python-elephant.spec
@@ -12,7 +12,7 @@
Name: python-%{pypi_name}
Version: 0.10.0
-Release: 5%{?dist}
+Release: %autorelease
Summary: Elephant is a package for analysis of electrophysiology data in Python
License: BSD
URL: http://neuralensemble.org/elephant
@@ -129,56 +129,4 @@ pytest-%{python3_version} -k "not test_repr and not test__UE_surrogate and not t
%endif
%changelog
-* Fri Jan 21 2022 Fedora Release Engineering <releng(a)fedoraproject.org> - 0.10.0-5
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
-
-* Fri Jul 23 2021 Fedora Release Engineering <releng(a)fedoraproject.org> - 0.10.0-4
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
-
-* Fri Jun 04 2021 Python Maint <python-maint(a)redhat.com> - 0.10.0-3
-- Rebuilt for Python 3.10
-
-* Fri Mar 12 2021 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.10.0-2
-- Add py_provides macro for F32
-
-* Thu Mar 11 2021 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.10.0-1
-- Update to new release
-- Enable all non-network dependent tests
-- File bug for failing tests
-- Update fim tweak: no longer required in the test file
-- include statsmodels dependency
-
-* Wed Jan 27 2021 Fedora Release Engineering <releng(a)fedoraproject.org> - 0.6.4-5
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
-
-* Wed Jul 29 2020 Fedora Release Engineering <releng(a)fedoraproject.org> - 0.6.4-4
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
-
-* Tue May 26 2020 Miro Hrončok <mhroncok(a)redhat.com> - 0.6.4-3
-- Rebuilt for Python 3.9
-
-* Thu Jan 30 2020 Fedora Release Engineering <releng(a)fedoraproject.org> - 0.6.4-2
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
-
-* Mon Dec 23 2019 Luis Bazan <lbazan(a)fedoraproject.org> - 0.6.4-1
-- New upstream version
-
-* Mon Aug 19 2019 Miro Hrončok <mhroncok(a)redhat.com> - 0.6.2-5
-- Rebuilt for Python 3.8
-
-* Fri Jul 26 2019 Fedora Release Engineering <releng(a)fedoraproject.org> - 0.6.2-4
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
-
-* Fri Jun 14 2019 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.6.2-3
-- Use pyfim which is 10 times faster than the python fast_fca according to docs
-- Patch out bits that try to download fim
-- Version neo requirements
-
-* Fri Jun 14 2019 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.6.2-2
-- Report issues upstream and add links to spec file
-
-* Tue Jun 11 2019 Luis Bazan <lbazan(a)fedoraproject.org> - 0.6.2-2
-- Fix comment #11 BZ#1651824
-
-* Fri Jun 07 2019 Luis Bazan <lbazan(a)fedoraproject.org> - 0.6.2-1
-- Initial package.
+%autochangelog
commit 9482c830621bb449d049dfc6be5314334030de79
Author: Fedora Release Engineering <releng(a)fedoraproject.org>
Date: Fri Jan 21 11:55:34 2022 +0000
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng(a)fedoraproject.org>
diff --git a/python-elephant.spec b/python-elephant.spec
index 3785089..b3c3b97 100644
--- a/python-elephant.spec
+++ b/python-elephant.spec
@@ -12,7 +12,7 @@
Name: python-%{pypi_name}
Version: 0.10.0
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: Elephant is a package for analysis of electrophysiology data in Python
License: BSD
URL: http://neuralensemble.org/elephant
@@ -129,6 +129,9 @@ pytest-%{python3_version} -k "not test_repr and not test__UE_surrogate and not t
%endif
%changelog
+* Fri Jan 21 2022 Fedora Release Engineering <releng(a)fedoraproject.org> - 0.10.0-5
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
+
* Fri Jul 23 2021 Fedora Release Engineering <releng(a)fedoraproject.org> - 0.10.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
1 year, 11 months
Architecture specific change in rpms/python-elephant.git
by githook-noreply@fedoraproject.org
The package rpms/python-elephant.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/python-elephant.git/commit/?id=fb....
Change:
+%ifarch %{arm64}
Thanks.
Full change:
============
commit fbcc094b021755f0b3d18732645a1dc46cb80972
Author: Ankur Sinha (Ankur Sinha Gmail) <sanjay.ankur(a)gmail.com>
Date: Thu Apr 21 13:47:12 2022 +0100
feat: update to 0.11.0 (Fixes rhbz#2070262)
diff --git a/.gitignore b/.gitignore
index e9bc94a..46fa8ee 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
/elephant-0.6.2.tar.gz
/elephant-0.6.4.tar.gz
/elephant-0.10.0.tar.gz
+/elephant-0.11.0.tar.gz
diff --git a/0001-Do-not-download-fim-so.patch b/0001-Do-not-download-fim-so.patch
deleted file mode 100644
index 8b4aa2f..0000000
--- a/0001-Do-not-download-fim-so.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 18c9e30f925240d64b02daec31c48cfa65368f77 Mon Sep 17 00:00:00 2001
-From: "Ankur Sinha (Ankur Sinha Gmail)" <sanjay.ankur(a)gmail.com>
-Date: Fri, 14 Jun 2019 16:26:22 +0100
-Subject: [PATCH] Do not download fim so
-
----
- setup.py | 27 ---------------------------
- 1 file changed, 27 deletions(-)
-
-diff --git a/setup.py b/setup.py
-index e0a4b93..7b22001 100644
---- a/setup.py
-+++ b/setup.py
-@@ -17,33 +17,6 @@ for extra in ['extras', 'docs', 'tests']:
- with open('requirements-{0}.txt'.format(extra), 'r') as fp:
- extras_require[extra] = fp.read()
-
--# spade specific
--is_64bit = sys.maxsize > 2 ** 32
--is_python3 = float(sys.version[0:3]) > 2.7
--if platform.uname()[0] == "Windows":
-- oext = ".pyd"
--elif platform.uname()[0] == "Linux":
-- oext = ".so"
--else:
-- oext = None
--
--if oext:
-- if is_python3:
-- py_ver = '3'
-- else:
-- py_ver = '2'
-- if is_64bit:
-- arch = '64'
-- else:
-- arch = '32'
--
-- try:
-- urlretrieve('http://www.borgelt.net/bin' +
-- arch + '/py' + py_ver + '/fim' + oext,
-- 'elephant/spade_src/fim' + oext)
-- except:
-- print("Unable to download fim" + oext + " module.")
--
- setup(
- name="elephant",
- version='0.6.2',
---
-2.21.0
-
diff --git a/0001-use-fedora-build-flags.patch b/0001-use-fedora-build-flags.patch
new file mode 100644
index 0000000..b3fb225
--- /dev/null
+++ b/0001-use-fedora-build-flags.patch
@@ -0,0 +1,27 @@
+From 9e38be2effa193c32a5cf44601f51612c15137f1 Mon Sep 17 00:00:00 2001
+From: "Ankur Sinha (Ankur Sinha Gmail)" <sanjay.ankur(a)gmail.com>
+Date: Wed, 20 Apr 2022 14:25:56 +0100
+Subject: [PATCH] use fedora build flags
+
+---
+ setup.py | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index f972085..96cce0b 100644
+--- a/setup.py
++++ b/setup.py
+@@ -49,9 +49,7 @@ else:
+ libraries=['pthread', 'gomp'],
+ extra_compile_args=[
+ '-DMODULE_NAME=fim', '-DUSE_OPENMP', '-DWITH_SIG_TERM',
+- '-Dfim_EXPORTS', '-O3', '-pedantic', '-Wextra',
+- '-Weffc++', '-Wunused-result', '-Werror',
+- '-fopenmp', '-std=gnu++17'])
++ '-Dfim_EXPORTS', '-Weffc++', '-fopenmp', '-std=gnu++17'])
+
+ setup(
+ name="elephant",
+--
+2.35.1
+
diff --git a/python-elephant.spec b/python-elephant.spec
index f10b7f2..b6b9a48 100644
--- a/python-elephant.spec
+++ b/python-elephant.spec
@@ -1,84 +1,45 @@
-# Issue filed upstream asking them to not use nose
-# https://github.com/NeuralEnsemble/elephant/issues/408
-
-# Disabled by default
-%bcond_with docs
-
# Try to download data, so a few are disabled.
# We test these in mock using --with=net_tests --enable-network
%bcond_with net_tests
%global pypi_name elephant
-Name: python-%{pypi_name}
-Version: 0.10.0
+Name: python-elephant
+Version: 0.11.0
Release: %autorelease
Summary: Elephant is a package for analysis of electrophysiology data in Python
License: BSD
URL: http://neuralensemble.org/elephant
-Source0: %{pypi_source}
-BuildArch: noarch
+Source0: %{pypi_source elephant}
+# All changes are here
+# https://github.com/sanjayankur31/elephant/tree/fedora-0.11.0
+Patch0: 0001-use-fedora-build-flags.patch
-# Remove bits from setup.py that try to download fim.
-# we use the packaged version
-# Patch0: 0001-Do-not-download-fim-so.patch
+# Includes a modified copy of fim, so we cannot use the system copy of pyfim.
+# https://github.com/NeuralEnsemble/elephant/issues/471#issuecomment-109890...
BuildRequires: git-core
+BuildRequires: gcc-c++
BuildRequires: python3-devel
-BuildRequires: python3dist(neo)
-BuildRequires: python3dist(numpy)
-BuildRequires: python3dist(pandas)
-BuildRequires: python3dist(quantities)
-BuildRequires: python3dist(scikit-learn)
-BuildRequires: python3dist(scipy)
-BuildRequires: python3dist(statsmodels)
-BuildRequires: python3dist(setuptools)
-BuildRequires: python3dist(six)
-BuildRequires: python3dist(fim)
-BuildRequires: python3dist(pytest)
-BuildRequires: python3dist(tqdm)
-
-%if %{with docs}
-BuildRequires: python3dist(nbsphinx)
-BuildRequires: python3dist(numpydoc)
-BuildRequires: python3dist(sphinx)
-BuildRequires: python3-sphinx_rtd_theme
-BuildRequires: python3dist(sphinx-gallery)
-BuildRequires: python3dist(sphinxcontrib-bibtex)
-%endif
%description
Elephant - Electrophysiology Analysis Toolkit Elephant is a package for the
analysis of neurophysiology data, based on Neo.
-%{?python_enable_dependency_generator}
-
-%package -n python3-%{pypi_name}
+%package -n python3-elephant
Summary: %{summary}
-# For F32
-%py_provides python3-%{pypi_name}
-
-%description -n python3-%{pypi_name}
+%description -n python3-elephant
Elephant - Electrophysiology Analysis Toolkit Elephant is a package for the
analysis of neurophysiology data, based on Neo.
-%if %{with docs}
-%package -n python-%{pypi_name}-doc
-Summary: elephant documentation
-
-%description -n python-%{pypi_name}-doc
-Documentation for elephant
-
-%endif
-
%prep
-%autosetup -n %{pypi_name}-%{version} -S git
-# Remove bundled egg-info
-rm -rf %{pypi_name}.egg-info
+%autosetup -n elephant-%{version} -S git
-rm -frv doc/_build
+# Loosen scipy version cap
+# https://github.com/NeuralEnsemble/elephant/issues/47
+sed -i 's/scipy.*/scipy/' requirements/requirements.txt
for lib in $(find . -type f -name "*.py"); do
sed '1{\@^#!/usr/bin/env python@d}' $lib > $lib.new &&
@@ -86,47 +47,42 @@ for lib in $(find . -type f -name "*.py"); do
mv $lib.new $lib
done
-# Use fim from python-pyfim which is faster
-sed -i 's|from elephant.spade_src import fim|import fim|' elephant/spade.py
+# collect all test requirements in one file
+echo >> requirements/requirements-tests.txt
+cat requirements/requirements-extras.txt >> requirements/requirements-tests.txt
+
+%generate_buildrequires
+%pyproject_buildrequires -r requirements/requirements-tests.txt
%build
-%py3_build
-
-%if %{with docs}
-pushd doc
- make SPHINXBUILD=sphinx-build-3 html
- rm -rf build/.doctrees
- rm -rf build/.buildinfo
-popd
-%endif
+%pyproject_wheel
%install
-%py3_install
+%pyproject_install
+%pyproject_save_files elephant
%check
# One test fails generally: reported upstream
-# https://github.com/NeuralEnsemble/elephant/issues/409
-# Another fails on 32 bit builders: reported upstream
# https://github.com/NeuralEnsemble/elephant/issues/410
-%if %{with net_tests}
-pytest-%{python3_version} -k "not test_repr and not test__UE_surrogate"
-%else
-# Disable tests that download bits
-pytest-%{python3_version} -k "not test_repr and not test__UE_surrogate and not test_spike_contrast_with_Izhikevich_network_auto and not test_Riehle_et_al_97_UE"
+#k="not test__UE_surrogate"
+
+# fails on aarch64
+# reported upstream: https://github.com/NeuralEnsemble/elephant/issues/479
+%ifarch %{arm64}
+k="${k:-}${k:+ and }not test_welch_psd_multidim_input and not test_welch_cohere_multidim_input"
%endif
+%if %{without net_tests}
+# Disable tests that download bits
+k="${k:-}${k:+ and }not test_repr and not test__UE_surrogate and not test_spike_contrast_with_Izhikevich_network_auto and not test_Riehle_et_al_97_UE and not test_multitaper_psd_against_nitime"
+%endif
-%files -n python3-%{pypi_name}
-%license LICENSE.txt elephant/spade_src/LICENSE
-%doc README.md elephant/current_source_density_src/README.md
-%{python3_sitelib}/%{pypi_name}
-%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info
+# serial
+# MPI tests hang in mock and builders, not sure why, so we skip them for the moment
+%pytest -v -k "${k} and not test_parallel"
-%if %{with docs}
-%files -n python-%{pypi_name}-doc
-%doc doc/_build/html
+%files -n python3-elephant -f %{pyproject_files}
%license LICENSE.txt elephant/spade_src/LICENSE
-%endif
%changelog
%autochangelog
diff --git a/sources b/sources
index f426633..a1e7172 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (elephant-0.10.0.tar.gz) = cc10c0e9e44346a97b183408e92b4c5f55b0887e029c1bf4222473253297507e89f2af15210fb58e84adc90d7448bff97b28f814f2b6a072f06ae9049eaa6580
+SHA512 (elephant-0.11.0.tar.gz) = 47ed7d4b348c9050cebcc63fd90835600ffef429c8960df5090cba3384daa2dc83a72b147a25a3ce9264b0eb4488b22f6182dd86ae57fd4dbecdf7b3e6c32103
commit 024274ecf5e4573c5a88e6bed9a31cd1b74293f6
Author: Ankur Sinha (Ankur Sinha Gmail) <sanjay.ankur(a)gmail.com>
Date: Mon Apr 11 17:18:34 2022 +0100
chore: use rpmautospec
diff --git a/changelog b/changelog
new file mode 100644
index 0000000..2d55669
--- /dev/null
+++ b/changelog
@@ -0,0 +1,53 @@
+* Fri Jan 21 2022 Fedora Release Engineering <releng(a)fedoraproject.org> - 0.10.0-5
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
+
+* Fri Jul 23 2021 Fedora Release Engineering <releng(a)fedoraproject.org> - 0.10.0-4
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
+
+* Fri Jun 04 2021 Python Maint <python-maint(a)redhat.com> - 0.10.0-3
+- Rebuilt for Python 3.10
+
+* Fri Mar 12 2021 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.10.0-2
+- Add py_provides macro for F32
+
+* Thu Mar 11 2021 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.10.0-1
+- Update to new release
+- Enable all non-network dependent tests
+- File bug for failing tests
+- Update fim tweak: no longer required in the test file
+- include statsmodels dependency
+
+* Wed Jan 27 2021 Fedora Release Engineering <releng(a)fedoraproject.org> - 0.6.4-5
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
+
+* Wed Jul 29 2020 Fedora Release Engineering <releng(a)fedoraproject.org> - 0.6.4-4
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
+
+* Tue May 26 2020 Miro Hrončok <mhroncok(a)redhat.com> - 0.6.4-3
+- Rebuilt for Python 3.9
+
+* Thu Jan 30 2020 Fedora Release Engineering <releng(a)fedoraproject.org> - 0.6.4-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
+
+* Mon Dec 23 2019 Luis Bazan <lbazan(a)fedoraproject.org> - 0.6.4-1
+- New upstream version
+
+* Mon Aug 19 2019 Miro Hrončok <mhroncok(a)redhat.com> - 0.6.2-5
+- Rebuilt for Python 3.8
+
+* Fri Jul 26 2019 Fedora Release Engineering <releng(a)fedoraproject.org> - 0.6.2-4
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
+
+* Fri Jun 14 2019 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.6.2-3
+- Use pyfim which is 10 times faster than the python fast_fca according to docs
+- Patch out bits that try to download fim
+- Version neo requirements
+
+* Fri Jun 14 2019 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.6.2-2
+- Report issues upstream and add links to spec file
+
+* Tue Jun 11 2019 Luis Bazan <lbazan(a)fedoraproject.org> - 0.6.2-2
+- Fix comment #11 BZ#1651824
+
+* Fri Jun 07 2019 Luis Bazan <lbazan(a)fedoraproject.org> - 0.6.2-1
+- Initial package.
diff --git a/python-elephant.spec b/python-elephant.spec
index b3c3b97..f10b7f2 100644
--- a/python-elephant.spec
+++ b/python-elephant.spec
@@ -12,7 +12,7 @@
Name: python-%{pypi_name}
Version: 0.10.0
-Release: 5%{?dist}
+Release: %autorelease
Summary: Elephant is a package for analysis of electrophysiology data in Python
License: BSD
URL: http://neuralensemble.org/elephant
@@ -129,56 +129,4 @@ pytest-%{python3_version} -k "not test_repr and not test__UE_surrogate and not t
%endif
%changelog
-* Fri Jan 21 2022 Fedora Release Engineering <releng(a)fedoraproject.org> - 0.10.0-5
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
-
-* Fri Jul 23 2021 Fedora Release Engineering <releng(a)fedoraproject.org> - 0.10.0-4
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
-
-* Fri Jun 04 2021 Python Maint <python-maint(a)redhat.com> - 0.10.0-3
-- Rebuilt for Python 3.10
-
-* Fri Mar 12 2021 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.10.0-2
-- Add py_provides macro for F32
-
-* Thu Mar 11 2021 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.10.0-1
-- Update to new release
-- Enable all non-network dependent tests
-- File bug for failing tests
-- Update fim tweak: no longer required in the test file
-- include statsmodels dependency
-
-* Wed Jan 27 2021 Fedora Release Engineering <releng(a)fedoraproject.org> - 0.6.4-5
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
-
-* Wed Jul 29 2020 Fedora Release Engineering <releng(a)fedoraproject.org> - 0.6.4-4
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
-
-* Tue May 26 2020 Miro Hrončok <mhroncok(a)redhat.com> - 0.6.4-3
-- Rebuilt for Python 3.9
-
-* Thu Jan 30 2020 Fedora Release Engineering <releng(a)fedoraproject.org> - 0.6.4-2
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
-
-* Mon Dec 23 2019 Luis Bazan <lbazan(a)fedoraproject.org> - 0.6.4-1
-- New upstream version
-
-* Mon Aug 19 2019 Miro Hrončok <mhroncok(a)redhat.com> - 0.6.2-5
-- Rebuilt for Python 3.8
-
-* Fri Jul 26 2019 Fedora Release Engineering <releng(a)fedoraproject.org> - 0.6.2-4
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
-
-* Fri Jun 14 2019 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.6.2-3
-- Use pyfim which is 10 times faster than the python fast_fca according to docs
-- Patch out bits that try to download fim
-- Version neo requirements
-
-* Fri Jun 14 2019 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.6.2-2
-- Report issues upstream and add links to spec file
-
-* Tue Jun 11 2019 Luis Bazan <lbazan(a)fedoraproject.org> - 0.6.2-2
-- Fix comment #11 BZ#1651824
-
-* Fri Jun 07 2019 Luis Bazan <lbazan(a)fedoraproject.org> - 0.6.2-1
-- Initial package.
+%autochangelog
1 year, 11 months
Architecture specific change in rpms/kdevelop-python.git
by githook-noreply@fedoraproject.org
The package rpms/kdevelop-python.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/kdevelop-python.git/commit/?id=d1....
Change:
-ExcludeArch: s390x
Thanks.
Full change:
============
commit d1c149e5dce8f6c3836378d6a84dcf499d0a8d0e
Author: Than Ngo <than(a)redhat.com>
Date: Thu Apr 21 13:38:25 2022 +0200
update to 22.04.0
diff --git a/.gitignore b/.gitignore
index 7ab4658..a1d5f34 100644
--- a/.gitignore
+++ b/.gitignore
@@ -36,3 +36,4 @@
/kdev-python-5.6.0.tar.xz
/kdev-python-5.6.1.tar.xz
/kdev-python-5.6.2.tar.xz
+/kdev-python-22.04.0.tar.xz
diff --git a/kdev-python-1.7.0-py3-shebang.patch b/kdev-python-1.7.0-py3-shebang.patch
index b2680dd..4d68898 100644
--- a/kdev-python-1.7.0-py3-shebang.patch
+++ b/kdev-python-1.7.0-py3-shebang.patch
@@ -151,12 +151,12 @@ diff -ur kdev-python-1.7.0-py3/documentation_files/zipimport.py kdev-python-1.7.
# -*- coding: utf-8 -*-
""":synopsis: support for importing Python modules from ZIP archives.
"""
-diff -ur kdev-python-1.7.0-py3/documentation_src/introspection/introspect.py kdev-python-1.7.0-py3-shebang/documentation_src/introspection/introspect.py
---- kdev-python-1.7.0-py3/documentation_src/introspection/introspect.py 2014-08-30 16:49:01.000000000 +0200
-+++ kdev-python-1.7.0-py3-shebang/documentation_src/introspection/introspect.py 2014-09-27 02:47:35.000000000 +0200
+diff -up kdev-python-21.12.0/documentation_src/introspection/introspect.py.orig kdev-python-21.12.0/documentation_src/introspection/introspect.py
+--- kdev-python-21.12.0/documentation_src/introspection/introspect.py.orig 2021-12-15 15:04:24.568355961 +0100
++++ kdev-python-21.12.0/documentation_src/introspection/introspect.py 2021-12-15 15:04:51.584501669 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# -*- Coding:utf-8 -*-
- # Copyright 2013 by Sven Brauch <svenbrauch(a)googlemail.com>
+ # SPDX-FileCopyrightText: 2013 Sven Brauch <svenbrauch(a)googlemail.com>
diff --git a/kdevelop-python.spec b/kdevelop-python.spec
index d743ec4..1fedef0 100644
--- a/kdevelop-python.spec
+++ b/kdevelop-python.spec
@@ -1,15 +1,12 @@
%undefine __cmake_in_source_build
Name: kdevelop-python
-Version: 5.6.2
+Version: 22.04.0
%global py3_suffix -py3
%global py3_tag .py3
-Release: 3%{?dist}
+Release: 1%{?dist}
License: GPLv2
-Source0: http://download.kde.org/stable/kdevelop/%{version}/src/kdev-python-%{vers...
-
-## kdevelop-pg-qt FTBFS s390x
-ExcludeArch: s390x
+Source0: https://download.kde.org/stable/release-service/%{version}/src/kdev-pytho...
# ensure the installed Python 3 scripts have #!/usr/bin/env python3
Patch0: kdev-python-1.7.0-py3-shebang.patch
@@ -27,7 +24,7 @@ Summary: Python 3 Plugin for KDevelop
URL: https://www.kdevelop.org/
BuildRequires: kdevelop-devel >= %{version}
-BuildRequires: python3-devel >= 3.4
+BuildRequires: python3-devel >= 3.9
BuildRequires: gettext
BuildRequires: kf5-rpm-macros
@@ -96,6 +93,12 @@ rm -f %{buildroot}%{_datadir}/kdevpythonsupport/documentation_files/PyKDE4/parse
%{_datadir}/metainfo/org.kde.kdev-python.metainfo.xml
%changelog
+* Thu Apr 21 2022 Than Ngo <than(a)redhat.com> - 22.04.0-1
+- update to 22.04.0
+
+* Wed Dec 15 2021 Than Ngo <than(a)redhat.com> - 21.12.0-1
+- update to 21.12.0
+
* Thu Jul 22 2021 Fedora Release Engineering <releng(a)fedoraproject.org> - 5.6.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
diff --git a/sources b/sources
index 0add470..aa04ca1 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (kdev-python-5.6.2.tar.xz) = c0ecf9c075fe8c18e31152b774e76596367bb5eca8bb5ec976e9ce90ce78512d9e42bc95daea0f1de18474ef4deee430674e186263736df0de67d7d26c81f6a0
+SHA512 (kdev-python-22.04.0.tar.xz) = 4b271bb15a02cf8de70c527fdbbd5aac391acd1e3e59cf65340289891fd02b0767538f1bdd583e1f64c04969d2d18f1405022b17e3b7718a07b9572038e64b38
1 year, 11 months
Architecture specific change in rpms/ruby.git
by githook-noreply@fedoraproject.org
The package rpms/ruby.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/ruby.git/commit/?id=da89057b70502...
https://src.fedoraproject.org/cgit/rpms/ruby.git/commit/?id=4f392def2643c....
Change:
-%ifarch ppc64le
+%ifarch ppc64le
Thanks.
Full change:
============
commit da89057b7050262c877500341a8e51f2bb851fb8
Author: Vít Ondruch <vondruch(a)redhat.com>
Date: Thu Apr 21 11:42:08 2022 +0200
Fix GC test failures on ppc64le.
Fix /test_\(ast_compacts\|compact_count\|complex_hash_keys\|gc_compact_stats\)/
test failures on ppc64le. It seems that upstream forgot to backport
this patch.
https://bugs.ruby-lang.org/issues/18394
diff --git a/ruby-3.1.0-Use-mmap-for-allocating-heap-pages-in-the-GC.patch b/ruby-3.1.0-Use-mmap-for-allocating-heap-pages-in-the-GC.patch
new file mode 100644
index 0000000..512be18
--- /dev/null
+++ b/ruby-3.1.0-Use-mmap-for-allocating-heap-pages-in-the-GC.patch
@@ -0,0 +1,359 @@
+From bcab8c3cd877506de75f50e0f9ed98827ed554b0 Mon Sep 17 00:00:00 2001
+From: Peter Zhu <peter(a)peterzhu.ca>
+Date: Tue, 23 Feb 2021 16:28:56 -0500
+Subject: [PATCH] Use mmap for allocating heap pages
+
+---
+ configure.ac | 16 ++++
+ gc.c | 149 ++++++++++++++++++++++++++---------
+ test/ruby/test_gc_compact.rb | 41 ++++++----
+ 3 files changed, 155 insertions(+), 51 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 2dcebdde9f..b1b190004d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1944,6 +1944,7 @@ AC_CHECK_FUNCS(memmem)
+ AC_CHECK_FUNCS(mkfifo)
+ AC_CHECK_FUNCS(mknod)
+ AC_CHECK_FUNCS(mktime)
++AC_CHECK_FUNCS(mmap)
+ AC_CHECK_FUNCS(openat)
+ AC_CHECK_FUNCS(pipe2)
+ AC_CHECK_FUNCS(poll)
+@@ -2666,6 +2667,21 @@ main(int argc, char *argv[])
+ rb_cv_fork_with_pthread=yes)])
+ test x$rb_cv_fork_with_pthread = xyes || AC_DEFINE(CANNOT_FORK_WITH_PTHREAD)
+ ])
++
++AC_CHECK_HEADERS([sys/user.h])
++AS_IF([test "x$ac_cv_func_mmap" = xyes], [
++ AC_CACHE_CHECK([whether PAGE_SIZE is compile-time const], rb_cv_const_page_size,
++ [malloc_headers=`sed -n '/MALLOC_HEADERS_BEGIN/,/MALLOC_HEADERS_END/p' ${srcdir}/gc.c`
++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$malloc_headers
++ typedef char conftest_page[PAGE_SIZE];
++ ]], [[]])],
++ [rb_cv_const_page_size=yes],
++ [rb_cv_const_page_size=no])])
++])
++AS_IF([test "x$rb_cv_const_page_size" = xyes],
++ [AC_DEFINE(HAVE_CONST_PAGE_SIZE, 1)],
++ [AC_DEFINE(HAVE_CONST_PAGE_SIZE, 0)]
++)
+ }
+
+ : "runtime section" && {
+diff --git a/gc.c b/gc.c
+index f6acf3e117..6f8e5f242d 100644
+--- a/gc.c
++++ b/gc.c
+@@ -32,6 +32,7 @@
+ #include <stdarg.h>
+ #include <stdio.h>
+
++/* MALLOC_HEADERS_BEGIN */
+ #ifndef HAVE_MALLOC_USABLE_SIZE
+ # ifdef _WIN32
+ # define HAVE_MALLOC_USABLE_SIZE
+@@ -54,6 +55,12 @@
+ # endif
+ #endif
+
++#if !defined(PAGE_SIZE) && defined(HAVE_SYS_USER_H)
++/* LIST_HEAD conflicts with sys/queue.h on macOS */
++# include <sys/user.h>
++#endif
++/* MALLOC_HEADERS_END */
++
+ #ifdef HAVE_SYS_TIME_H
+ # include <sys/time.h>
+ #endif
+@@ -821,6 +828,25 @@ enum {
+ HEAP_PAGE_BITMAP_SIZE = (BITS_SIZE * HEAP_PAGE_BITMAP_LIMIT),
+ HEAP_PAGE_BITMAP_PLANES = 4 /* RGENGC: mark, unprotected, uncollectible, marking */
+ };
++#define HEAP_PAGE_ALIGN (1 << HEAP_PAGE_ALIGN_LOG)
++#define HEAP_PAGE_SIZE HEAP_PAGE_ALIGN
++
++#ifdef HAVE_MMAP
++# if HAVE_CONST_PAGE_SIZE
++/* If we have the HEAP_PAGE and it is a constant, then we can directly use it. */
++static const bool USE_MMAP_ALIGNED_ALLOC = (PAGE_SIZE <= HEAP_PAGE_SIZE);
++# elif defined(PAGE_MAX_SIZE) && (PAGE_MAX_SIZE <= HEAP_PAGE_SIZE)
++/* PAGE_SIZE <= HEAP_PAGE_SIZE */
++static const bool USE_MMAP_ALIGNED_ALLOC = true;
++# else
++/* Otherwise, fall back to determining if we can use mmap during runtime. */
++# define USE_MMAP_ALIGNED_ALLOC (use_mmap_aligned_alloc != false)
++
++static bool use_mmap_aligned_alloc;
++# endif
++#elif !defined(__MINGW32__) && !defined(_WIN32)
++static const bool USE_MMAP_ALIGNED_ALLOC = false;
++#endif
+
+ struct heap_page {
+ short total_slots;
+@@ -1760,14 +1786,14 @@ heap_unlink_page(rb_objspace_t *objspace, rb_heap_t *heap, struct heap_page *pag
+ heap->total_slots -= page->total_slots;
+ }
+
+-static void rb_aligned_free(void *ptr);
++static void rb_aligned_free(void *ptr, size_t size);
+
+ static void
+ heap_page_free(rb_objspace_t *objspace, struct heap_page *page)
+ {
+ heap_allocated_pages--;
+ objspace->profile.total_freed_pages++;
+- rb_aligned_free(GET_PAGE_BODY(page->start));
++ rb_aligned_free(GET_PAGE_BODY(page->start), HEAP_PAGE_SIZE);
+ free(page);
+ }
+
+@@ -1819,7 +1845,7 @@ heap_page_allocate(rb_objspace_t *objspace)
+ /* assign heap_page entry */
+ page = calloc1(sizeof(struct heap_page));
+ if (page == 0) {
+- rb_aligned_free(page_body);
++ rb_aligned_free(page_body, HEAP_PAGE_SIZE);
+ rb_memerror();
+ }
+
+@@ -3159,15 +3185,18 @@ Init_heap(void)
+ {
+ rb_objspace_t *objspace = &rb_objspace;
+
+-#if defined(HAVE_SYSCONF) && defined(_SC_PAGE_SIZE)
+- /* If Ruby's heap pages are not a multiple of the system page size, we
+- * cannot use mprotect for the read barrier, so we must disable automatic
+- * compaction. */
+- int pagesize;
+- pagesize = (int)sysconf(_SC_PAGE_SIZE);
+- if ((HEAP_PAGE_SIZE % pagesize) != 0) {
+- ruby_enable_autocompact = 0;
+- }
++#if defined(HAVE_MMAP) && !HAVE_CONST_PAGE_SIZE && !defined(PAGE_MAX_SIZE)
++ /* Need to determine if we can use mmap at runtime. */
++# ifdef PAGE_SIZE
++ /* If the PAGE_SIZE macro can be used. */
++ use_mmap_aligned_alloc = PAGE_SIZE <= HEAP_PAGE_SIZE;
++# elif defined(HAVE_SYSCONF) && defined(_SC_PAGE_SIZE)
++ /* If we can use sysconf to determine the page size. */
++ use_mmap_aligned_alloc = sysconf(_SC_PAGE_SIZE) <= HEAP_PAGE_SIZE;
++# else
++ /* Otherwise we can't determine the system page size, so don't use mmap. */
++ use_mmap_aligned_alloc = FALSE;
++# endif
+ #endif
+
+ objspace->next_object_id = INT2FIX(OBJ_ID_INITIAL);
+@@ -8533,6 +8562,14 @@ gc_start_internal(rb_execution_context_t *ec, VALUE self, VALUE full_mark, VALUE
+
+ /* For now, compact implies full mark / sweep, so ignore other flags */
+ if (RTEST(compact)) {
++ /* If not MinGW, Windows, or does not have mmap, we cannot use mprotect for
++ * the read barrier, so we must disable compaction. */
++#if !defined(__MINGW32__) && !defined(_WIN32)
++ if (!USE_MMAP_ALIGNED_ALLOC) {
++ rb_raise(rb_eNotImpError, "Compaction isn't available on this platform");
++ }
++#endif
++
+ reason |= GPR_FLAG_COMPACT;
+ } else {
+ if (!RTEST(full_mark)) reason &= ~GPR_FLAG_FULL_MARK;
+@@ -9944,16 +9981,14 @@ gc_disable(rb_execution_context_t *ec, VALUE _)
+ static VALUE
+ gc_set_auto_compact(rb_execution_context_t *ec, VALUE _, VALUE v)
+ {
+-#if defined(HAVE_SYSCONF) && defined(_SC_PAGE_SIZE)
+- /* If Ruby's heap pages are not a multiple of the system page size, we
+- * cannot use mprotect for the read barrier, so we must disable automatic
+- * compaction. */
+- int pagesize;
+- pagesize = (int)sysconf(_SC_PAGE_SIZE);
+- if ((HEAP_PAGE_SIZE % pagesize) != 0) {
++ /* If not MinGW, Windows, or does not have mmap, we cannot use mprotect for
++ * the read barrier, so we must disable automatic compaction. */
++#if !defined(__MINGW32__) && !defined(_WIN32)
++ if (!USE_MMAP_ALIGNED_ALLOC) {
+ rb_raise(rb_eNotImpError, "Automatic compaction isn't available on this platform");
+ }
+ #endif
++
+ ruby_enable_autocompact = RTEST(v);
+ return v;
+ }
+@@ -10350,22 +10385,54 @@ rb_aligned_malloc(size_t alignment, size_t size)
+ #elif defined _WIN32
+ void *_aligned_malloc(size_t, size_t);
+ res = _aligned_malloc(size, alignment);
+-#elif defined(HAVE_POSIX_MEMALIGN)
+- if (posix_memalign(&res, alignment, size) == 0) {
+- return res;
++#else
++ if (USE_MMAP_ALIGNED_ALLOC) {
++ GC_ASSERT(alignment % sysconf(_SC_PAGE_SIZE) == 0);
++
++ char *ptr = mmap(NULL, alignment + size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
++ if (ptr == MAP_FAILED) {
++ return NULL;
++ }
++
++ char *aligned = ptr + alignment;
++ aligned -= ((VALUE)aligned & (alignment - 1));
++ GC_ASSERT(aligned > ptr);
++ GC_ASSERT(aligned <= ptr + alignment);
++
++ size_t start_out_of_range_size = aligned - ptr;
++ GC_ASSERT(start_out_of_range_size % sysconf(_SC_PAGE_SIZE) == 0);
++ if (start_out_of_range_size > 0) {
++ if (munmap(ptr, start_out_of_range_size)) {
++ rb_bug("rb_aligned_malloc: munmap failed for start");
++ }
++ }
++
++ size_t end_out_of_range_size = alignment - start_out_of_range_size;
++ GC_ASSERT(end_out_of_range_size % sysconf(_SC_PAGE_SIZE) == 0);
++ if (end_out_of_range_size > 0) {
++ if (munmap(aligned + size, end_out_of_range_size)) {
++ rb_bug("rb_aligned_malloc: munmap failed for end");
++ }
++ }
++
++ res = (void *)aligned;
+ }
+ else {
+- return NULL;
++# if defined(HAVE_POSIX_MEMALIGN)
++ if (posix_memalign(&res, alignment, size) != 0) {
++ return NULL;
++ }
++# elif defined(HAVE_MEMALIGN)
++ res = memalign(alignment, size);
++# else
++ char* aligned;
++ res = malloc(alignment + size + sizeof(void*));
++ aligned = (char*)res + alignment + sizeof(void*);
++ aligned -= ((VALUE)aligned & (alignment - 1));
++ ((void**)aligned)[-1] = res;
++ res = (void*)aligned;
++# endif
+ }
+-#elif defined(HAVE_MEMALIGN)
+- res = memalign(alignment, size);
+-#else
+- char* aligned;
+- res = malloc(alignment + size + sizeof(void*));
+- aligned = (char*)res + alignment + sizeof(void*);
+- aligned -= ((VALUE)aligned & (alignment - 1));
+- ((void**)aligned)[-1] = res;
+- res = (void*)aligned;
+ #endif
+
+ /* alignment must be a power of 2 */
+@@ -10375,16 +10442,26 @@ rb_aligned_malloc(size_t alignment, size_t size)
+ }
+
+ static void
+-rb_aligned_free(void *ptr)
++rb_aligned_free(void *ptr, size_t size)
+ {
+ #if defined __MINGW32__
+ __mingw_aligned_free(ptr);
+ #elif defined _WIN32
+ _aligned_free(ptr);
+-#elif defined(HAVE_MEMALIGN) || defined(HAVE_POSIX_MEMALIGN)
+- free(ptr);
+ #else
+- free(((void**)ptr)[-1]);
++ if (USE_MMAP_ALIGNED_ALLOC) {
++ GC_ASSERT(size % sysconf(_SC_PAGE_SIZE) == 0);
++ if (munmap(ptr, size)) {
++ rb_bug("rb_aligned_free: munmap failed");
++ }
++ }
++ else {
++# if defined(HAVE_POSIX_MEMALIGN) || defined(HAVE_MEMALIGN)
++ free(ptr);
++# else
++ free(((void**)ptr)[-1]);
++# endif
++ }
+ #endif
+ }
+
+diff --git a/test/ruby/test_gc_compact.rb b/test/ruby/test_gc_compact.rb
+index 4a8cff33f4..f5cab55ba7 100644
+--- a/test/ruby/test_gc_compact.rb
++++ b/test/ruby/test_gc_compact.rb
+@@ -4,12 +4,32 @@
+ require 'etc'
+
+ class TestGCCompact < Test::Unit::TestCase
+- class AutoCompact < Test::Unit::TestCase
++ module SupportsCompact
+ def setup
+ skip "autocompact not supported on this platform" unless supports_auto_compact?
+ super
+ end
+
++ private
++
++ def supports_auto_compact?
++ return true unless defined?(Etc::SC_PAGE_SIZE)
++
++ begin
++ return GC::INTERNAL_CONSTANTS[:HEAP_PAGE_SIZE] % Etc.sysconf(Etc::SC_PAGE_SIZE) == 0
++ rescue NotImplementedError
++ rescue ArgumentError
++ end
++
++ true
++ end
++ end
++
++ include SupportsCompact
++
++ class AutoCompact < Test::Unit::TestCase
++ include SupportsCompact
++
+ def test_enable_autocompact
+ before = GC.auto_compact
+ GC.auto_compact = true
+@@ -59,26 +79,17 @@ def test_implicit_compaction_does_something
+ ensure
+ GC.auto_compact = before
+ end
+-
+- private
+-
+- def supports_auto_compact?
+- return true unless defined?(Etc::SC_PAGE_SIZE)
+-
+- begin
+- return GC::INTERNAL_CONSTANTS[:HEAP_PAGE_SIZE] % Etc.sysconf(Etc::SC_PAGE_SIZE) == 0
+- rescue NotImplementedError
+- rescue ArgumentError
+- end
+-
+- true
+- end
+ end
+
+ def os_page_size
+ return true unless defined?(Etc::SC_PAGE_SIZE)
+ end
+
++ def setup
++ skip "autocompact not supported on this platform" unless supports_auto_compact?
++ super
++ end
++
+ def test_gc_compact_stats
+ list = []
+
+--
+2.30.1 (Apple Git-130)
+
diff --git a/ruby.spec b/ruby.spec
index a68ad9f..7218bf3 100644
--- a/ruby.spec
+++ b/ruby.spec
@@ -153,6 +153,11 @@ Patch15: ruby-dwarf5-avoid_crash-r1.patch
# Avoid possible timeout errors in TestBugReporter#test_bug_reporter_add.
# https://bugs.ruby-lang.org/issues/16492
Patch19: ruby-2.7.1-Timeout-the-test_bug_reporter_add-witout-raising-err.patch
+# Fix /test_\(ast_compacts\|compact_count\|complex_hash_keys\|gc_compact_stats\)/
+# test failures on ppc64le.
+# https://bugs.ruby-lang.org/issues/18746
+# https://bugs.ruby-lang.org/issues/18394
+Patch20: ruby-3.1.0-Use-mmap-for-allocating-heap-pages-in-the-GC.patch
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
Suggests: rubypick
@@ -599,6 +604,7 @@ rm -rf ext/fiddle/libffi*
%patch9 -p1
%patch15 -p1
%patch19 -p1
+%patch20 -p1
# Provide an example of usage of the tapset:
cp -a %{SOURCE3} .
@@ -874,12 +880,6 @@ make runruby TESTRUN_SCRIPT="--enable-gems %{SOURCE13}"
DISABLE_TESTS=""
MSPECOPTS=""
-%ifarch ppc64le
-# `Couldn't unprotect page` error.
-# https://bugs.ruby-lang.org/issues/18746
-DISABLE_TESTS="$DISABLE_TESTS -n !/test_\(ast_compacts\|compact_count\|complex_hash_keys\|gc_compact_stats\)/"
-%endif
-
# Avoid `hostname' dependency.
%{!?with_hostname:MSPECOPTS="-P 'Socket.gethostname returns the host name'"}
commit 4f392def2643c04a48416e14e3ebbee3945029f4
Author: Vít Ondruch <vondruch(a)redhat.com>
Date: Tue Apr 19 14:11:12 2022 +0200
Upgrade to Ruby 3.0.4.
diff --git a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch
index 118203c..437d09f 100644
--- a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch
+++ b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch
@@ -14,7 +14,7 @@ diff --git a/configure.ac b/configure.ac
index c42436c23d..d261ea57b5 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -3881,7 +3881,8 @@ AS_CASE(["$ruby_version_dir_name"],
+@@ -3886,7 +3886,8 @@ AS_CASE(["$ruby_version_dir_name"],
ruby_version_dir=/'${ruby_version_dir_name}'
if test -z "${ruby_version_dir_name}"; then
diff --git a/ruby-2.1.0-always-use-i386.patch b/ruby-2.1.0-always-use-i386.patch
index de58295..46584d7 100644
--- a/ruby-2.1.0-always-use-i386.patch
+++ b/ruby-2.1.0-always-use-i386.patch
@@ -11,7 +11,7 @@ diff --git a/configure.ac b/configure.ac
index 3c13076b82..93af30321d 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -3945,6 +3945,8 @@ AC_SUBST(vendorarchdir)dnl
+@@ -3950,6 +3950,8 @@ AC_SUBST(vendorarchdir)dnl
AC_SUBST(CONFIGURE, "`echo $0 | sed 's|.*/||'`")dnl
AC_SUBST(configure_args, "`echo "${ac_configure_args}" | sed 's/\\$/$$/g'`")dnl
diff --git a/ruby-2.1.0-custom-rubygems-location.patch b/ruby-2.1.0-custom-rubygems-location.patch
index b7157ff..6946429 100644
--- a/ruby-2.1.0-custom-rubygems-location.patch
+++ b/ruby-2.1.0-custom-rubygems-location.patch
@@ -15,7 +15,7 @@ diff --git a/configure.ac b/configure.ac
index 93af30321d..bc13397e0e 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -3917,6 +3917,10 @@ AC_ARG_WITH(vendorarchdir,
+@@ -3922,6 +3922,10 @@ AC_ARG_WITH(vendorarchdir,
[vendorarchdir=$withval],
[vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby'${ruby_version_dir}}${multiarch-'${vendorlibdir}/${sitearch}'}])
@@ -26,7 +26,7 @@ index 93af30321d..bc13397e0e 100644
AS_IF([test "${LOAD_RELATIVE+set}"], [
AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE)
RUBY_EXEC_PREFIX=''
-@@ -3941,6 +3941,7 @@ AC_SUBST(sitearchdir)dnl
+@@ -3946,6 +3950,7 @@ AC_SUBST(sitearchdir)dnl
AC_SUBST(vendordir)dnl
AC_SUBST(vendorlibdir)dnl
AC_SUBST(vendorarchdir)dnl
@@ -75,7 +75,7 @@ index e9110a17ca..76a1f0a315 100755
mandir = CONFIG["mandir", true]
docdir = CONFIG["docdir", true]
enable_shared = CONFIG["ENABLE_SHARED"] == 'yes'
-@@ -581,7 +581,16 @@ def stub
+@@ -581,7 +582,16 @@ def stub
install?(:local, :comm, :lib) do
prepare "library scripts", rubylibdir
noinst = %w[*.txt *.rdoc *.gemspec]
diff --git a/ruby-2.3.0-ruby_version.patch b/ruby-2.3.0-ruby_version.patch
index 4fd6530..fd545e5 100644
--- a/ruby-2.3.0-ruby_version.patch
+++ b/ruby-2.3.0-ruby_version.patch
@@ -20,7 +20,7 @@ diff --git a/configure.ac b/configure.ac
index 80b137e380..63cd3b4f8b 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -3832,9 +3832,6 @@ AS_CASE(["$target_os"],
+@@ -3837,9 +3837,6 @@ AS_CASE(["$target_os"],
rubyw_install_name='$(RUBYW_INSTALL_NAME)'
])
@@ -30,7 +30,7 @@ index 80b137e380..63cd3b4f8b 100644
rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'}
AC_ARG_WITH(rubyarchprefix,
AS_HELP_STRING([--with-rubyarchprefix=DIR],
-@@ -3857,56 +3857,62 @@ AC_ARG_WITH(ridir,
+@@ -3862,56 +3859,62 @@ AC_ARG_WITH(ridir,
AC_SUBST(ridir)
AC_SUBST(RI_BASE_NAME)
@@ -120,7 +120,7 @@ index 80b137e380..63cd3b4f8b 100644
AS_IF([test "${LOAD_RELATIVE+set}"], [
AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE)
-@@ -3923,6 +3923,7 @@ AC_SUBST(sitearchincludedir)dnl
+@@ -3928,6 +3931,7 @@ AC_SUBST(sitearchincludedir)dnl
AC_SUBST(arch)dnl
AC_SUBST(sitearch)dnl
AC_SUBST(ruby_version)dnl
@@ -237,7 +237,7 @@ diff --git a/test/rubygems/test_gem.rb b/test/rubygems/test_gem.rb
index b25068405d..e9fef4a311 100644
--- a/test/rubygems/test_gem.rb
+++ b/test/rubygems/test_gem.rb
-@@ -1452,7 +1452,8 @@ def test_self_use_paths
+@@ -1440,7 +1440,8 @@ def test_self_use_paths
def test_self_user_dir
parts = [@userhome, '.gem', Gem.ruby_engine]
@@ -247,7 +247,7 @@ index b25068405d..e9fef4a311 100644
FileUtils.mkdir_p File.join(parts)
-@@ -1530,7 +1531,7 @@ def test_self_vendor_dir
+@@ -1516,7 +1517,7 @@ def test_self_vendor_dir
vendordir(File.join(@tempdir, 'vendor')) do
expected =
File.join RbConfig::CONFIG['vendordir'], 'gems',
diff --git a/ruby-dwarf5-avoid_crash-r1.patch b/ruby-dwarf5-avoid_crash-r1.patch
index c14642b..b183f8f 100644
--- a/ruby-dwarf5-avoid_crash-r1.patch
+++ b/ruby-dwarf5-avoid_crash-r1.patch
@@ -31,7 +31,7 @@
addr += a;
break;
case DW_LNS_advance_line: {
-@@ -450,7 +452,7 @@
+@@ -451,7 +453,7 @@
/* isa = (unsigned int)*/(void)uleb128((char **)&p);
break;
case 0:
@@ -40,7 +40,7 @@
op = *p++;
switch (op) {
case DW_LNE_end_sequence:
-@@ -807,6 +809,18 @@
+@@ -808,6 +810,18 @@
DW_FORM_addrx4 = 0x2c
};
@@ -59,7 +59,7 @@
enum {
VAL_none = 0,
VAL_cstr = 1,
-@@ -961,6 +975,23 @@
+@@ -962,6 +976,23 @@
}
static void
@@ -83,7 +83,7 @@
di_read_debug_abbrev_cu(DebugInfoReader *reader)
{
uint64_t prev = 0;
-@@ -974,12 +1005,7 @@
+@@ -975,12 +1006,7 @@
prev = abbrev_number;
uleb128(&p); /* tag */
p++; /* has_children */
@@ -97,7 +97,7 @@
}
}
-@@ -1243,12 +1269,7 @@
+@@ -1244,12 +1270,7 @@
/* skip 255th record */
uleb128(&p); /* tag */
p++; /* has_children */
@@ -111,7 +111,7 @@
for (uint64_t n = uleb128(&p); abbrev_number != n; n = uleb128(&p)) {
if (n == 0) {
fprintf(stderr,"%d: Abbrev Number %"PRId64" not found\n",__LINE__, abbrev_number);
-@@ -1256,12 +1277,7 @@
+@@ -1257,12 +1278,7 @@
}
uleb128(&p); /* tag */
p++; /* has_children */
@@ -125,7 +125,7 @@
}
return p;
}
-@@ -1389,6 +1405,21 @@
+@@ -1390,6 +1406,21 @@
}
}
@@ -147,7 +147,7 @@
static uintptr_t
ranges_include(DebugInfoReader *reader, ranges_t *ptr, uint64_t addr)
{
-@@ -1402,8 +1433,50 @@
+@@ -1403,8 +1434,50 @@
}
else if (ptr->ranges_set) {
/* TODO: support base address selection entry */
@@ -199,7 +199,7 @@
for (;;) {
uintptr_t from = read_uintptr(&p);
uintptr_t to = read_uintptr(&p);
-@@ -1747,6 +1820,7 @@
+@@ -1750,6 +1823,7 @@
".debug_info",
".debug_line",
".debug_ranges",
@@ -207,7 +207,7 @@
".debug_str"
};
-@@ -2003,6 +2077,7 @@
+@@ -2006,6 +2080,7 @@
"__debug_info",
"__debug_line",
"__debug_ranges",
diff --git a/ruby.spec b/ruby.spec
index 347dc48..a68ad9f 100644
--- a/ruby.spec
+++ b/ruby.spec
@@ -1,6 +1,6 @@
%global major_version 3
%global minor_version 0
-%global teeny_version 2
+%global teeny_version 4
%global major_minor_version %{major_version}.%{minor_version}
%global ruby_version %{major_minor_version}.%{teeny_version}
@@ -22,7 +22,7 @@
%endif
-%global release 149
+%global release 152
%{!?release_string:%define release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}}
# The RubyGems library has to stay out of Ruby directory tree, since the
@@ -30,12 +30,12 @@
%global rubygems_dir %{_datadir}/rubygems
# Bundled libraries versions
-%global rubygems_version 3.2.22
+%global rubygems_version 3.2.33
%global rubygems_molinillo_version 0.7.0
# Default gems.
-%global bundler_version 2.2.22
-%global bundler_connection_pool_version 2.2.2
+%global bundler_version 2.2.33
+%global bundler_connection_pool_version 2.3.0
%global bundler_fileutils_version 1.4.1
%global bundler_molinillo_version 0.7.0
%global bundler_net_http_persistent_version 4.0.0
@@ -49,20 +49,20 @@
%global io_console_version 0.5.7
%global irb_version 1.3.5
%global json_version 2.5.1
-%global openssl_version 2.2.0
-%global psych_version 3.3.0
-%global racc_version 1.5.1
-%global rdoc_version 6.3.1
+%global openssl_version 2.2.1
+%global psych_version 3.3.2
+%global racc_version 1.5.2
+%global rdoc_version 6.3.3
# Bundled gems.
%global minitest_version 5.14.2
%global power_assert_version 1.2.0
%global rake_version 13.0.3
-%global rbs_version 1.0.4
+%global rbs_version 1.4.0
%global test_unit_version 3.3.7
%global rexml_version 3.2.5
%global rss_version 0.2.9
-%global typeprof_version 0.12.0
+%global typeprof_version 0.15.2
%global tapset_libdir %(echo %{_libdir} | sed 's/64//')*
@@ -874,6 +874,12 @@ make runruby TESTRUN_SCRIPT="--enable-gems %{SOURCE13}"
DISABLE_TESTS=""
MSPECOPTS=""
+%ifarch ppc64le
+# `Couldn't unprotect page` error.
+# https://bugs.ruby-lang.org/issues/18746
+DISABLE_TESTS="$DISABLE_TESTS -n !/test_\(ast_compacts\|compact_count\|complex_hash_keys\|gc_compact_stats\)/"
+%endif
+
# Avoid `hostname' dependency.
%{!?with_hostname:MSPECOPTS="-P 'Socket.gethostname returns the host name'"}
@@ -1138,26 +1144,26 @@ MSPECOPTS=""
%{gem_dir}/specifications/default/abbrev-0.1.0.gemspec
%{gem_dir}/specifications/default/base64-0.1.0.gemspec
%{gem_dir}/specifications/default/benchmark-0.1.1.gemspec
-%{gem_dir}/specifications/default/cgi-0.2.0.gemspec
+%{gem_dir}/specifications/default/cgi-0.2.1.gemspec
%{gem_dir}/specifications/default/csv-3.1.9.gemspec
-%{gem_dir}/specifications/default/date-3.1.0.gemspec
+%{gem_dir}/specifications/default/date-3.1.3.gemspec
%{gem_dir}/specifications/default/dbm-1.1.0.gemspec
-%{gem_dir}/specifications/default/debug-0.1.0.gemspec
+%{gem_dir}/specifications/default/debug-0.2.1.gemspec
%{gem_dir}/specifications/default/delegate-0.2.0.gemspec
%{gem_dir}/specifications/default/did_you_mean-%{did_you_mean_version}.gemspec
%{gem_dir}/specifications/default/digest-3.0.0.gemspec
-%{gem_dir}/specifications/default/drb-2.0.4.gemspec
+%{gem_dir}/specifications/default/drb-2.0.5.gemspec
%{gem_dir}/specifications/default/erb-%{erb_version}.gemspec
-%{gem_dir}/specifications/default/etc-1.2.0.gemspec
-%{gem_dir}/specifications/default/fcntl-1.0.0.gemspec
-%{gem_dir}/specifications/default/fiddle-1.0.6.gemspec
+%{gem_dir}/specifications/default/etc-1.3.0.gemspec
+%{gem_dir}/specifications/default/fcntl-1.0.1.gemspec
+%{gem_dir}/specifications/default/fiddle-1.0.8.gemspec
%{gem_dir}/specifications/default/fileutils-1.5.0.gemspec
%{gem_dir}/specifications/default/find-0.1.0.gemspec
%{gem_dir}/specifications/default/forwardable-1.3.2.gemspec
%{gem_dir}/specifications/default/gdbm-2.1.0.gemspec
%{gem_dir}/specifications/default/getoptlong-0.1.1.gemspec
%{gem_dir}/specifications/default/io-nonblock-0.1.0.gemspec
-%{gem_dir}/specifications/default/io-wait-0.1.0.gemspec
+%{gem_dir}/specifications/default/io-wait-0.2.0.gemspec
%{gem_dir}/specifications/default/ipaddr-1.2.2.gemspec
%{gem_dir}/specifications/default/logger-1.4.3.gemspec
%{gem_dir}/specifications/default/matrix-0.3.1.gemspec
@@ -1166,33 +1172,33 @@ MSPECOPTS=""
%{gem_dir}/specifications/default/net-http-0.1.1.gemspec
%{gem_dir}/specifications/default/net-imap-0.1.1.gemspec
%{gem_dir}/specifications/default/net-pop-0.1.1.gemspec
-%{gem_dir}/specifications/default/net-protocol-0.1.0.gemspec
+%{gem_dir}/specifications/default/net-protocol-0.1.1.gemspec
%{gem_dir}/specifications/default/net-smtp-0.2.1.gemspec
%{gem_dir}/specifications/default/nkf-0.1.0.gemspec
%{gem_dir}/specifications/default/observer-0.1.1.gemspec
%{gem_dir}/specifications/default/open3-0.1.1.gemspec
%{gem_dir}/specifications/default/open-uri-0.1.0.gemspec
-%{gem_dir}/specifications/default/optparse-0.1.0.gemspec
+%{gem_dir}/specifications/default/optparse-0.1.1.gemspec
%{gem_dir}/specifications/default/openssl-%{openssl_version}.gemspec
%{gem_dir}/specifications/default/ostruct-0.3.1.gemspec
%{gem_dir}/specifications/default/pathname-0.1.0.gemspec
-%{gem_dir}/specifications/default/pp-0.1.0.gemspec
-%{gem_dir}/specifications/default/prettyprint-0.1.0.gemspec
+%{gem_dir}/specifications/default/pp-0.2.1.gemspec
+%{gem_dir}/specifications/default/prettyprint-0.1.1.gemspec
%{gem_dir}/specifications/default/prime-0.1.2.gemspec
%{gem_dir}/specifications/default/pstore-0.1.1.gemspec
%{gem_dir}/specifications/default/racc-%{racc_version}.gemspec
%{gem_dir}/specifications/default/readline-0.0.2.gemspec
%{gem_dir}/specifications/default/readline-ext-0.1.1.gemspec
%{gem_dir}/specifications/default/reline-0.2.5.gemspec
-%{gem_dir}/specifications/default/resolv-0.2.0.gemspec
+%{gem_dir}/specifications/default/resolv-0.2.1.gemspec
%{gem_dir}/specifications/default/resolv-replace-0.1.0.gemspec
-%{gem_dir}/specifications/default/rinda-0.1.0.gemspec
+%{gem_dir}/specifications/default/rinda-0.1.1.gemspec
%{gem_dir}/specifications/default/securerandom-0.1.0.gemspec
%{gem_dir}/specifications/default/set-1.0.1.gemspec
%{gem_dir}/specifications/default/shellwords-0.1.0.gemspec
%{gem_dir}/specifications/default/singleton-0.1.1.gemspec
-%{gem_dir}/specifications/default/stringio-3.0.0.gemspec
-%{gem_dir}/specifications/default/strscan-3.0.0.gemspec
+%{gem_dir}/specifications/default/stringio-3.0.1.gemspec
+%{gem_dir}/specifications/default/strscan-3.0.1.gemspec
%{gem_dir}/specifications/default/syslog-0.1.0.gemspec
%{gem_dir}/specifications/default/tempfile-0.1.1.gemspec
%{gem_dir}/specifications/default/time-0.1.0.gemspec
@@ -1205,7 +1211,7 @@ MSPECOPTS=""
%{gem_dir}/specifications/default/weakref-0.1.1.gemspec
#%%{gem_dir}/specifications/default/win32ole-1.8.8.gemspec
%{gem_dir}/specifications/default/yaml-0.1.1.gemspec
-%{gem_dir}/specifications/default/zlib-1.1.0.gemspec
+%{gem_dir}/specifications/default/zlib-2.0.0.gemspec
%{gem_dir}/gems/erb-%{erb_version}
# Use standalone rubygem-racc if Racc binary is required. Shipping this
@@ -1299,7 +1305,6 @@ MSPECOPTS=""
%doc %{gem_dir}/gems/rbs-%{rbs_version}/README.md
%{gem_dir}/gems/rbs-%{rbs_version}/Rakefile
%{gem_dir}/gems/rbs-%{rbs_version}/Steepfile
-%{gem_dir}/gems/rbs-%{rbs_version}/bin
%{gem_dir}/gems/rbs-%{rbs_version}/core
%doc %{gem_dir}/gems/rbs-%{rbs_version}/docs
%{gem_dir}/gems/rbs-%{rbs_version}/exe
@@ -1355,6 +1360,9 @@ MSPECOPTS=""
%changelog
+* Tue Apr 19 2022 Vít Ondruch <vondruch(a)redhat.com> - 3.0.2-152
+- Upgrade to Ruby 3.0.4.
+
* Tue Jul 13 2021 Jarek Prokop <jprokop(a)redhat.com> - 3.0.2-149
- Upgrade to Ruby 3.0.2.
- Fix command injection vulnerability in RDoc.
diff --git a/sources b/sources
index fc750ca..acb6fbe 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (ruby-3.0.2.tar.xz) = 0f702e2d8ca1342a9d4284dbdd234a3588e057b92566353aa7c21835cf09a3932864b2acf459a976960a1704e9befa562155d36b98b7cda8bd99526e10a374c4
+SHA512 (ruby-3.0.4.tar.xz) = 53bf7dd403b0c68af9691882ad8ed7422c8d1f496627428fb4c3caf0b0313715524b744c5f453aced2d49e16e55f3f45b46b9a77aa3097dbfcae7caa0208194b
1 year, 11 months
Architecture specific change in rpms/ruby.git
by githook-noreply@fedoraproject.org
The package rpms/ruby.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/ruby.git/commit/?id=004364fd97a3d....
Change:
-%ifarch ppc64le
Thanks.
Full change:
============
commit 004364fd97a3def5838b70491bf2947c218b081e
Author: Vít Ondruch <vondruch(a)redhat.com>
Date: Thu Apr 21 11:42:08 2022 +0200
Fix GC test failures on ppc64le.
Fix /test_\(ast_compacts\|compact_count\|complex_hash_keys\|gc_compact_stats\)/
test failures on ppc64le. It seems that upstream forgot to backport
this patch.
https://bugs.ruby-lang.org/issues/18394
diff --git a/ruby-3.1.0-Use-mmap-for-allocating-heap-pages-in-the-GC.patch b/ruby-3.1.0-Use-mmap-for-allocating-heap-pages-in-the-GC.patch
new file mode 100644
index 0000000..512be18
--- /dev/null
+++ b/ruby-3.1.0-Use-mmap-for-allocating-heap-pages-in-the-GC.patch
@@ -0,0 +1,359 @@
+From bcab8c3cd877506de75f50e0f9ed98827ed554b0 Mon Sep 17 00:00:00 2001
+From: Peter Zhu <peter(a)peterzhu.ca>
+Date: Tue, 23 Feb 2021 16:28:56 -0500
+Subject: [PATCH] Use mmap for allocating heap pages
+
+---
+ configure.ac | 16 ++++
+ gc.c | 149 ++++++++++++++++++++++++++---------
+ test/ruby/test_gc_compact.rb | 41 ++++++----
+ 3 files changed, 155 insertions(+), 51 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 2dcebdde9f..b1b190004d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1944,6 +1944,7 @@ AC_CHECK_FUNCS(memmem)
+ AC_CHECK_FUNCS(mkfifo)
+ AC_CHECK_FUNCS(mknod)
+ AC_CHECK_FUNCS(mktime)
++AC_CHECK_FUNCS(mmap)
+ AC_CHECK_FUNCS(openat)
+ AC_CHECK_FUNCS(pipe2)
+ AC_CHECK_FUNCS(poll)
+@@ -2666,6 +2667,21 @@ main(int argc, char *argv[])
+ rb_cv_fork_with_pthread=yes)])
+ test x$rb_cv_fork_with_pthread = xyes || AC_DEFINE(CANNOT_FORK_WITH_PTHREAD)
+ ])
++
++AC_CHECK_HEADERS([sys/user.h])
++AS_IF([test "x$ac_cv_func_mmap" = xyes], [
++ AC_CACHE_CHECK([whether PAGE_SIZE is compile-time const], rb_cv_const_page_size,
++ [malloc_headers=`sed -n '/MALLOC_HEADERS_BEGIN/,/MALLOC_HEADERS_END/p' ${srcdir}/gc.c`
++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$malloc_headers
++ typedef char conftest_page[PAGE_SIZE];
++ ]], [[]])],
++ [rb_cv_const_page_size=yes],
++ [rb_cv_const_page_size=no])])
++])
++AS_IF([test "x$rb_cv_const_page_size" = xyes],
++ [AC_DEFINE(HAVE_CONST_PAGE_SIZE, 1)],
++ [AC_DEFINE(HAVE_CONST_PAGE_SIZE, 0)]
++)
+ }
+
+ : "runtime section" && {
+diff --git a/gc.c b/gc.c
+index f6acf3e117..6f8e5f242d 100644
+--- a/gc.c
++++ b/gc.c
+@@ -32,6 +32,7 @@
+ #include <stdarg.h>
+ #include <stdio.h>
+
++/* MALLOC_HEADERS_BEGIN */
+ #ifndef HAVE_MALLOC_USABLE_SIZE
+ # ifdef _WIN32
+ # define HAVE_MALLOC_USABLE_SIZE
+@@ -54,6 +55,12 @@
+ # endif
+ #endif
+
++#if !defined(PAGE_SIZE) && defined(HAVE_SYS_USER_H)
++/* LIST_HEAD conflicts with sys/queue.h on macOS */
++# include <sys/user.h>
++#endif
++/* MALLOC_HEADERS_END */
++
+ #ifdef HAVE_SYS_TIME_H
+ # include <sys/time.h>
+ #endif
+@@ -821,6 +828,25 @@ enum {
+ HEAP_PAGE_BITMAP_SIZE = (BITS_SIZE * HEAP_PAGE_BITMAP_LIMIT),
+ HEAP_PAGE_BITMAP_PLANES = 4 /* RGENGC: mark, unprotected, uncollectible, marking */
+ };
++#define HEAP_PAGE_ALIGN (1 << HEAP_PAGE_ALIGN_LOG)
++#define HEAP_PAGE_SIZE HEAP_PAGE_ALIGN
++
++#ifdef HAVE_MMAP
++# if HAVE_CONST_PAGE_SIZE
++/* If we have the HEAP_PAGE and it is a constant, then we can directly use it. */
++static const bool USE_MMAP_ALIGNED_ALLOC = (PAGE_SIZE <= HEAP_PAGE_SIZE);
++# elif defined(PAGE_MAX_SIZE) && (PAGE_MAX_SIZE <= HEAP_PAGE_SIZE)
++/* PAGE_SIZE <= HEAP_PAGE_SIZE */
++static const bool USE_MMAP_ALIGNED_ALLOC = true;
++# else
++/* Otherwise, fall back to determining if we can use mmap during runtime. */
++# define USE_MMAP_ALIGNED_ALLOC (use_mmap_aligned_alloc != false)
++
++static bool use_mmap_aligned_alloc;
++# endif
++#elif !defined(__MINGW32__) && !defined(_WIN32)
++static const bool USE_MMAP_ALIGNED_ALLOC = false;
++#endif
+
+ struct heap_page {
+ short total_slots;
+@@ -1760,14 +1786,14 @@ heap_unlink_page(rb_objspace_t *objspace, rb_heap_t *heap, struct heap_page *pag
+ heap->total_slots -= page->total_slots;
+ }
+
+-static void rb_aligned_free(void *ptr);
++static void rb_aligned_free(void *ptr, size_t size);
+
+ static void
+ heap_page_free(rb_objspace_t *objspace, struct heap_page *page)
+ {
+ heap_allocated_pages--;
+ objspace->profile.total_freed_pages++;
+- rb_aligned_free(GET_PAGE_BODY(page->start));
++ rb_aligned_free(GET_PAGE_BODY(page->start), HEAP_PAGE_SIZE);
+ free(page);
+ }
+
+@@ -1819,7 +1845,7 @@ heap_page_allocate(rb_objspace_t *objspace)
+ /* assign heap_page entry */
+ page = calloc1(sizeof(struct heap_page));
+ if (page == 0) {
+- rb_aligned_free(page_body);
++ rb_aligned_free(page_body, HEAP_PAGE_SIZE);
+ rb_memerror();
+ }
+
+@@ -3159,15 +3185,18 @@ Init_heap(void)
+ {
+ rb_objspace_t *objspace = &rb_objspace;
+
+-#if defined(HAVE_SYSCONF) && defined(_SC_PAGE_SIZE)
+- /* If Ruby's heap pages are not a multiple of the system page size, we
+- * cannot use mprotect for the read barrier, so we must disable automatic
+- * compaction. */
+- int pagesize;
+- pagesize = (int)sysconf(_SC_PAGE_SIZE);
+- if ((HEAP_PAGE_SIZE % pagesize) != 0) {
+- ruby_enable_autocompact = 0;
+- }
++#if defined(HAVE_MMAP) && !HAVE_CONST_PAGE_SIZE && !defined(PAGE_MAX_SIZE)
++ /* Need to determine if we can use mmap at runtime. */
++# ifdef PAGE_SIZE
++ /* If the PAGE_SIZE macro can be used. */
++ use_mmap_aligned_alloc = PAGE_SIZE <= HEAP_PAGE_SIZE;
++# elif defined(HAVE_SYSCONF) && defined(_SC_PAGE_SIZE)
++ /* If we can use sysconf to determine the page size. */
++ use_mmap_aligned_alloc = sysconf(_SC_PAGE_SIZE) <= HEAP_PAGE_SIZE;
++# else
++ /* Otherwise we can't determine the system page size, so don't use mmap. */
++ use_mmap_aligned_alloc = FALSE;
++# endif
+ #endif
+
+ objspace->next_object_id = INT2FIX(OBJ_ID_INITIAL);
+@@ -8533,6 +8562,14 @@ gc_start_internal(rb_execution_context_t *ec, VALUE self, VALUE full_mark, VALUE
+
+ /* For now, compact implies full mark / sweep, so ignore other flags */
+ if (RTEST(compact)) {
++ /* If not MinGW, Windows, or does not have mmap, we cannot use mprotect for
++ * the read barrier, so we must disable compaction. */
++#if !defined(__MINGW32__) && !defined(_WIN32)
++ if (!USE_MMAP_ALIGNED_ALLOC) {
++ rb_raise(rb_eNotImpError, "Compaction isn't available on this platform");
++ }
++#endif
++
+ reason |= GPR_FLAG_COMPACT;
+ } else {
+ if (!RTEST(full_mark)) reason &= ~GPR_FLAG_FULL_MARK;
+@@ -9944,16 +9981,14 @@ gc_disable(rb_execution_context_t *ec, VALUE _)
+ static VALUE
+ gc_set_auto_compact(rb_execution_context_t *ec, VALUE _, VALUE v)
+ {
+-#if defined(HAVE_SYSCONF) && defined(_SC_PAGE_SIZE)
+- /* If Ruby's heap pages are not a multiple of the system page size, we
+- * cannot use mprotect for the read barrier, so we must disable automatic
+- * compaction. */
+- int pagesize;
+- pagesize = (int)sysconf(_SC_PAGE_SIZE);
+- if ((HEAP_PAGE_SIZE % pagesize) != 0) {
++ /* If not MinGW, Windows, or does not have mmap, we cannot use mprotect for
++ * the read barrier, so we must disable automatic compaction. */
++#if !defined(__MINGW32__) && !defined(_WIN32)
++ if (!USE_MMAP_ALIGNED_ALLOC) {
+ rb_raise(rb_eNotImpError, "Automatic compaction isn't available on this platform");
+ }
+ #endif
++
+ ruby_enable_autocompact = RTEST(v);
+ return v;
+ }
+@@ -10350,22 +10385,54 @@ rb_aligned_malloc(size_t alignment, size_t size)
+ #elif defined _WIN32
+ void *_aligned_malloc(size_t, size_t);
+ res = _aligned_malloc(size, alignment);
+-#elif defined(HAVE_POSIX_MEMALIGN)
+- if (posix_memalign(&res, alignment, size) == 0) {
+- return res;
++#else
++ if (USE_MMAP_ALIGNED_ALLOC) {
++ GC_ASSERT(alignment % sysconf(_SC_PAGE_SIZE) == 0);
++
++ char *ptr = mmap(NULL, alignment + size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
++ if (ptr == MAP_FAILED) {
++ return NULL;
++ }
++
++ char *aligned = ptr + alignment;
++ aligned -= ((VALUE)aligned & (alignment - 1));
++ GC_ASSERT(aligned > ptr);
++ GC_ASSERT(aligned <= ptr + alignment);
++
++ size_t start_out_of_range_size = aligned - ptr;
++ GC_ASSERT(start_out_of_range_size % sysconf(_SC_PAGE_SIZE) == 0);
++ if (start_out_of_range_size > 0) {
++ if (munmap(ptr, start_out_of_range_size)) {
++ rb_bug("rb_aligned_malloc: munmap failed for start");
++ }
++ }
++
++ size_t end_out_of_range_size = alignment - start_out_of_range_size;
++ GC_ASSERT(end_out_of_range_size % sysconf(_SC_PAGE_SIZE) == 0);
++ if (end_out_of_range_size > 0) {
++ if (munmap(aligned + size, end_out_of_range_size)) {
++ rb_bug("rb_aligned_malloc: munmap failed for end");
++ }
++ }
++
++ res = (void *)aligned;
+ }
+ else {
+- return NULL;
++# if defined(HAVE_POSIX_MEMALIGN)
++ if (posix_memalign(&res, alignment, size) != 0) {
++ return NULL;
++ }
++# elif defined(HAVE_MEMALIGN)
++ res = memalign(alignment, size);
++# else
++ char* aligned;
++ res = malloc(alignment + size + sizeof(void*));
++ aligned = (char*)res + alignment + sizeof(void*);
++ aligned -= ((VALUE)aligned & (alignment - 1));
++ ((void**)aligned)[-1] = res;
++ res = (void*)aligned;
++# endif
+ }
+-#elif defined(HAVE_MEMALIGN)
+- res = memalign(alignment, size);
+-#else
+- char* aligned;
+- res = malloc(alignment + size + sizeof(void*));
+- aligned = (char*)res + alignment + sizeof(void*);
+- aligned -= ((VALUE)aligned & (alignment - 1));
+- ((void**)aligned)[-1] = res;
+- res = (void*)aligned;
+ #endif
+
+ /* alignment must be a power of 2 */
+@@ -10375,16 +10442,26 @@ rb_aligned_malloc(size_t alignment, size_t size)
+ }
+
+ static void
+-rb_aligned_free(void *ptr)
++rb_aligned_free(void *ptr, size_t size)
+ {
+ #if defined __MINGW32__
+ __mingw_aligned_free(ptr);
+ #elif defined _WIN32
+ _aligned_free(ptr);
+-#elif defined(HAVE_MEMALIGN) || defined(HAVE_POSIX_MEMALIGN)
+- free(ptr);
+ #else
+- free(((void**)ptr)[-1]);
++ if (USE_MMAP_ALIGNED_ALLOC) {
++ GC_ASSERT(size % sysconf(_SC_PAGE_SIZE) == 0);
++ if (munmap(ptr, size)) {
++ rb_bug("rb_aligned_free: munmap failed");
++ }
++ }
++ else {
++# if defined(HAVE_POSIX_MEMALIGN) || defined(HAVE_MEMALIGN)
++ free(ptr);
++# else
++ free(((void**)ptr)[-1]);
++# endif
++ }
+ #endif
+ }
+
+diff --git a/test/ruby/test_gc_compact.rb b/test/ruby/test_gc_compact.rb
+index 4a8cff33f4..f5cab55ba7 100644
+--- a/test/ruby/test_gc_compact.rb
++++ b/test/ruby/test_gc_compact.rb
+@@ -4,12 +4,32 @@
+ require 'etc'
+
+ class TestGCCompact < Test::Unit::TestCase
+- class AutoCompact < Test::Unit::TestCase
++ module SupportsCompact
+ def setup
+ skip "autocompact not supported on this platform" unless supports_auto_compact?
+ super
+ end
+
++ private
++
++ def supports_auto_compact?
++ return true unless defined?(Etc::SC_PAGE_SIZE)
++
++ begin
++ return GC::INTERNAL_CONSTANTS[:HEAP_PAGE_SIZE] % Etc.sysconf(Etc::SC_PAGE_SIZE) == 0
++ rescue NotImplementedError
++ rescue ArgumentError
++ end
++
++ true
++ end
++ end
++
++ include SupportsCompact
++
++ class AutoCompact < Test::Unit::TestCase
++ include SupportsCompact
++
+ def test_enable_autocompact
+ before = GC.auto_compact
+ GC.auto_compact = true
+@@ -59,26 +79,17 @@ def test_implicit_compaction_does_something
+ ensure
+ GC.auto_compact = before
+ end
+-
+- private
+-
+- def supports_auto_compact?
+- return true unless defined?(Etc::SC_PAGE_SIZE)
+-
+- begin
+- return GC::INTERNAL_CONSTANTS[:HEAP_PAGE_SIZE] % Etc.sysconf(Etc::SC_PAGE_SIZE) == 0
+- rescue NotImplementedError
+- rescue ArgumentError
+- end
+-
+- true
+- end
+ end
+
+ def os_page_size
+ return true unless defined?(Etc::SC_PAGE_SIZE)
+ end
+
++ def setup
++ skip "autocompact not supported on this platform" unless supports_auto_compact?
++ super
++ end
++
+ def test_gc_compact_stats
+ list = []
+
+--
+2.30.1 (Apple Git-130)
+
diff --git a/ruby.spec b/ruby.spec
index 7077d07..de0a07b 100644
--- a/ruby.spec
+++ b/ruby.spec
@@ -153,6 +153,11 @@ Patch15: ruby-dwarf5-avoid_crash-r1.patch
# Avoid possible timeout errors in TestBugReporter#test_bug_reporter_add.
# https://bugs.ruby-lang.org/issues/16492
Patch19: ruby-2.7.1-Timeout-the-test_bug_reporter_add-witout-raising-err.patch
+# Fix /test_\(ast_compacts\|compact_count\|complex_hash_keys\|gc_compact_stats\)/
+# test failures on ppc64le.
+# https://bugs.ruby-lang.org/issues/18746
+# https://bugs.ruby-lang.org/issues/18394
+Patch20: ruby-3.1.0-Use-mmap-for-allocating-heap-pages-in-the-GC.patch
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
Suggests: rubypick
@@ -599,6 +604,7 @@ rm -rf ext/fiddle/libffi*
%patch9 -p1
%patch15 -p1
%patch19 -p1
+%patch20 -p1
# Provide an example of usage of the tapset:
cp -a %{SOURCE3} .
@@ -874,12 +880,6 @@ make runruby TESTRUN_SCRIPT="--enable-gems %{SOURCE13}"
DISABLE_TESTS=""
MSPECOPTS=""
-%ifarch ppc64le
-# `Couldn't unprotect page` error.
-# https://bugs.ruby-lang.org/issues/18746
-DISABLE_TESTS="$DISABLE_TESTS -n !/test_\(ast_compacts\|compact_count\|complex_hash_keys\|gc_compact_stats\)/"
-%endif
-
# Avoid `hostname' dependency.
%{!?with_hostname:MSPECOPTS="-P 'Socket.gethostname returns the host name'"}
1 year, 11 months
Architecture specific change in rpms/rust-libspa.git
by githook-noreply@fedoraproject.org
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=c32c10....
Change:
+%ifarch %{arm} %{ix86}
Thanks.
Full change:
============
commit c32c100789f652d0309f178360eccd17ead07636
Author: Michel Alexandre Salim <salimma(a)fedoraproject.org>
Date: Wed Apr 20 22:08:41 2022 -0700
Also skip pointer test on 32-bit ARM
Signed-off-by: Michel Alexandre Salim <salimma(a)fedoraproject.org>
diff --git a/rust-libspa.spec b/rust-libspa.spec
index ec19f1a..977bd25 100644
--- a/rust-libspa.spec
+++ b/rust-libspa.spec
@@ -71,7 +71,7 @@ cp %{SOURCE1} .
%if %{with check}
%check
-%ifarch %{ix86}
+%ifarch %{arm} %{ix86}
%cargo_test -- -- --skip 'result::tests::async_seq_panic' --skip 'pointer'
%else
%cargo_test -- -- --skip 'result::tests::async_seq_panic'
1 year, 11 months
Architecture specific change in rpms/rust-pipewire.git
by githook-noreply@fedoraproject.org
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
1 year, 11 months
Architecture specific change in rpms/rust-libspa.git
by githook-noreply@fedoraproject.org
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
1 year, 11 months