From b24ebf5ec1c6ad3a3ea5ac8858d34f3f75765390 Mon Sep 17 00:00:00 2001 From: Jun Aruga Date: Jan 11 2022 10:50:01 +0000 Subject: Remove the patch applied to pass the test/fiddle/test_import.rb on PPC. In Ruby 3.0.3, a new logic with the hard-coded "libc.so.6" to detect glibc works on PPC, both Power 8 and 9. See . Note the logic also fixes the following error on a Power 9 environment where the path is `/lib64/glibc-hwcaps/power9/libc-2.28.so`. ``` /builddir/build/BUILD/ruby-2.6.9/.ext/common/fiddle/import.rb:299:in `import_function': cannot find the function: strcpy() (Fiddle::DLError) from /builddir/build/BUILD/ruby-2.6.9/.ext/common/fiddle/import.rb:172:in `extern' from /builddir/build/BUILD/ruby-2.6.9/test/fiddle/test_import.rb:17:in `' from /builddir/build/BUILD/ruby-2.6.9/test/fiddle/test_import.rb:10:in `' from /builddir/build/BUILD/ruby-2.6.9/test/fiddle/test_import.rb:9:in `' from /builddir/build/BUILD/ruby-2.6.9/test/lib/test/unit.rb:958:in `require' from /builddir/build/BUILD/ruby-2.6.9/test/lib/test/unit.rb:958:in `block in non_options' from /builddir/build/BUILD/ruby-2.6.9/test/lib/test/unit.rb:952:in `each' from /builddir/build/BUILD/ruby-2.6.9/test/lib/test/unit.rb:952:in `non_options' from /builddir/build/BUILD/ruby-2.6.9/test/lib/test/unit.rb:64:in `process_args' from /builddir/build/BUILD/ruby-2.6.9/test/lib/test/unit.rb:130:in `process_args' from /builddir/build/BUILD/ruby-2.6.9/test/lib/test/unit.rb:1136:in `process_args' from /builddir/build/BUILD/ruby-2.6.9/test/lib/test/unit.rb:1141:in `run' from /builddir/build/BUILD/ruby-2.6.9/test/lib/test/unit.rb:1148:in `run' from ./test/runner.rb:33:in `
' ``` --- diff --git a/ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch b/ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch deleted file mode 100644 index 599a6e6..0000000 --- a/ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 346e147ba6480839b87046e9a9efab0bf6ed3660 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Wed, 10 Aug 2016 17:35:48 +0200 -Subject: [PATCH] Rely on ldd to detect glibc. - -This is just workaround, since we know we are quite sure this will be successful -on Red Hat platforms. - -This workaround rhbz#1361037 ---- - test/fiddle/helper.rb | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/test/fiddle/helper.rb b/test/fiddle/helper.rb -index 1da3d93..65148a1 100644 ---- a/test/fiddle/helper.rb -+++ b/test/fiddle/helper.rb -@@ -139,6 +139,9 @@ - libc_so = libm_so = "/usr/lib/libSystem.B.dylib" - end - -+# Just ignore the heuristic, because it is not reliable on all platforms. -+libc_so = libm_so = nil -+ - if !libc_so || !libm_so - ruby = EnvUtil.rubybin - # When the ruby binary is 32-bit and the host is 64-bit, --- -2.9.2 - diff --git a/ruby.spec b/ruby.spec index 44319e7..0f81795 100644 --- a/ruby.spec +++ b/ruby.spec @@ -22,7 +22,7 @@ %endif -%global release 156 +%global release 157 %{!?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 @@ -138,10 +138,6 @@ Patch5: ruby-1.9.3-mkmf-verbose.patch # https://lists.fedoraproject.org/archives/list/ruby-sig@lists.fedoraproject.org/message/LH6L6YJOYQT4Y5ZNOO4SLIPTUWZ5V45Q/ # For now, load the ABRT hook via this simple patch: Patch6: ruby-2.7.0-Initialize-ABRT-hook.patch -# Workaround "an invalid stdio handle" error on PPC, due to recently introduced -# hardening features of glibc (rhbz#1361037). -# https://bugs.ruby-lang.org/issues/12666 -Patch9: ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch # Fix DWARF5 support. # https://bugzilla.redhat.com/show_bug.cgi?id=1920533 # https://bugs.ruby-lang.org/issues/17585 @@ -674,7 +670,6 @@ rm -rf ext/fiddle/libffi* %patch4 -p1 %patch5 -p1 %patch6 -p1 -%patch9 -p1 %patch15 -p1 %patch16 -p1 %patch17 -p1 @@ -1461,6 +1456,9 @@ DISABLE_TESTS="$DISABLE_TESTS -n !/OpenSSL::TestCipher#test_ciphers/" %changelog +* Tue Jan 11 2022 Jun Aruga - 3.0.3-157 +- Remove the patch applied to pass the test/fiddle/test_import.rb on PPC. + * Mon Jan 10 2022 Miro HronĨok - 3.0.3-156 - Rebuilt for https://fedoraproject.org/wiki/Changes/LIBFFI34