Source: ruby-msgpack
Version: 1.4.2-2
Severity: serious
Justification: ftbfs patch
Control: block 1082419 by -1

Hi,

Bug 1082419 is blocked by a FTBFS on ppc64el. The issue seems to be (judging from the error log) that auto_compact is used during testing, but that isn't implemented on ppc64el. My attached proposed fix is to *try* to do auto_compact, but don't fail if that fails (inspired by the several lines higher). I've tested that amd64 still builds. My test builds on ppc64el on debomatic-ppc64el.d.n seem to be blocked by issues with the infrastructure, so I have not tested my fix yet.

If you think my fix is good, please upload. If not, I'll probably NMU once I confirm it builds on debomatic.

Paul
diff --git a/debian/changelog b/debian/changelog
index ec546c0..2e8b8ac 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+ruby-msgpack (1.7.2-1.1) unstable; urgency=medium
+
+  * tests: avoid FTBFS on ppc64el by *trying* auto_compact
+
+ -- Paul Gevers <elb...@debian.org>  Sun, 01 Dec 2024 09:23:35 +0100
+
 ruby-msgpack (1.7.2-1) unstable; urgency=medium
 
   * Team upload.
diff --git a/debian/patches/series b/debian/patches/series
index f9db7b8..d44a588 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 0001-Fix-paths-for-spec_helper-random_compat.patch
+tests-avoid-ftbfs-on-ppc64el-by-trying-a.patch
diff --git a/debian/patches/tests-avoid-ftbfs-on-ppc64el-by-trying-a.patch 
b/debian/patches/tests-avoid-ftbfs-on-ppc64el-by-trying-a.patch
new file mode 100644
index 0000000..d600b64
--- /dev/null
+++ b/debian/patches/tests-avoid-ftbfs-on-ppc64el-by-trying-a.patch
@@ -0,0 +1,29 @@
+From: Paul Gevers <elb...@debian.org>
+Date: Sun, 1 Dec 2024 09:21:29 +0100
+X-Dgit-Generated: 1.7.2-1.1 2b812939884458fb0a45ded7c38a1dcb0128d1d2
+Subject: tests: avoid FTBFS on ppc64el by *trying* auto_compact
+
+The current version fails to build on ppc64el with the following error:
+`auto_compact=': Automatic compaction isn't available on this platform 
(NotImplementedError)
+
+So, to avoid failure, catch the exception.
+
+---
+
+diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
+index c3935ed..c2382ac 100644
+--- a/spec/spec_helper.rb
++++ b/spec/spec_helper.rb
+@@ -30,7 +30,11 @@ if GC.respond_to?(:verify_compaction_references)
+ end
+ 
+ if GC.respond_to?(:auto_compact=)
+-  GC.auto_compact = true
++  begin
++    GC.auto_compact = true
++  rescue NotImplementedError
++    # FTBFS on ppc64el otherwise
++  end
+ end
+ 
+ IS_JRUBY = RUBY_ENGINE == 'jruby'

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to