From 94a8d2bf8d8690b999e70fa51284041a37c8454e Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Mon, 30 May 2022 18:29:11 +0000 Subject: [PATCH] import ruby-2.6.10-109.module+el8.6.0+15475+c55337b4 --- .gitignore | 2 +- .ruby.metadata | 2 +- ...by-2.3.1-Rely-on-ldd-to-detect-glibc.patch | 116 ------------------ ...-hard-coded-lib-name-to-detect-glibc.patch | 25 ++++ SPECS/ruby.spec | 25 ++-- 5 files changed, 43 insertions(+), 127 deletions(-) delete mode 100644 SOURCES/ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch create mode 100644 SOURCES/ruby-3.0.3-fiddle-1.0.8-Rely-on-hard-coded-lib-name-to-detect-glibc.patch diff --git a/.gitignore b/.gitignore index 6e53f5b..b15669c 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/ruby-2.6.9.tar.xz +SOURCES/ruby-2.6.10.tar.xz diff --git a/.ruby.metadata b/.ruby.metadata index 097b7c7..1cdbf0b 100644 --- a/.ruby.metadata +++ b/.ruby.metadata @@ -1 +1 @@ -fc67ca162010aac4af49d73a8c48be5cb2fb5907 SOURCES/ruby-2.6.9.tar.xz +e91de95735d0af32238903c7c58d2b660433e0cc SOURCES/ruby-2.6.10.tar.xz diff --git a/SOURCES/ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch b/SOURCES/ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch deleted file mode 100644 index 1e6f83f..0000000 --- a/SOURCES/ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch +++ /dev/null @@ -1,116 +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 | 89 ------------------------------------------- - 1 file changed, 89 deletions(-) - -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 -@@ -6,95 +6,6 @@ - - libc_so = libm_so = nil - --case RUBY_PLATFORM --when /cygwin/ -- libc_so = "cygwin1.dll" -- libm_so = "cygwin1.dll" --when /linux/ -- libdir = '/lib' -- case [0].pack('L!').size -- when 4 -- # 32-bit ruby -- libdir = '/lib32' if File.directory? '/lib32' -- when 8 -- # 64-bit ruby -- libdir = '/lib64' if File.directory? '/lib64' -- end -- libc_so = File.join(libdir, "libc.so.6") -- libm_so = File.join(libdir, "libm.so.6") --when /mingw/, /mswin/ -- require "rbconfig" -- crtname = RbConfig::CONFIG["RUBY_SO_NAME"][/msvc\w+/] || 'ucrtbase' -- libc_so = libm_so = "#{crtname}.dll" --when /darwin/ -- libc_so = "/usr/lib/libc.dylib" -- libm_so = "/usr/lib/libm.dylib" --when /kfreebsd/ -- libc_so = "/lib/libc.so.0.1" -- libm_so = "/lib/libm.so.1" --when /gnu/ #GNU/Hurd -- libc_so = "/lib/libc.so.0.3" -- libm_so = "/lib/libm.so.6" --when /mirbsd/ -- libc_so = "/usr/lib/libc.so.41.10" -- libm_so = "/usr/lib/libm.so.7.0" --when /freebsd/ -- libc_so = "/lib/libc.so.7" -- libm_so = "/lib/libm.so.5" --when /bsd|dragonfly/ -- libc_so = "/usr/lib/libc.so" -- libm_so = "/usr/lib/libm.so" --when /solaris/ -- libdir = '/lib' -- case [0].pack('L!').size -- when 4 -- # 32-bit ruby -- libdir = '/lib' if File.directory? '/lib' -- when 8 -- # 64-bit ruby -- libdir = '/lib/64' if File.directory? '/lib/64' -- end -- libc_so = File.join(libdir, "libc.so") -- libm_so = File.join(libdir, "libm.so") --when /aix/ -- pwd=Dir.pwd -- libc_so = libm_so = "#{pwd}/libaixdltest.so" -- unless File.exist? libc_so -- cobjs=%w!strcpy.o! -- mobjs=%w!floats.o sin.o! -- funcs=%w!sin sinf strcpy strncpy! -- expfile='dltest.exp' -- require 'tmpdir' -- Dir.mktmpdir do |dir| -- begin -- Dir.chdir dir -- %x!/usr/bin/ar x /usr/lib/libc.a #{cobjs.join(' ')}! -- %x!/usr/bin/ar x /usr/lib/libm.a #{mobjs.join(' ')}! -- %x!echo "#{funcs.join("\n")}\n" > #{expfile}! -- require 'rbconfig' -- if RbConfig::CONFIG["GCC"] = 'yes' -- lflag='-Wl,' -- else -- lflag='' -- end -- flags="#{lflag}-bE:#{expfile} #{lflag}-bnoentry -lm" -- %x!#{RbConfig::CONFIG["LDSHARED"]} -o #{libc_so} #{(cobjs+mobjs).join(' ')} #{flags}! -- ensure -- Dir.chdir pwd -- end -- end -- end --else -- libc_so = ARGV[0] if ARGV[0] && ARGV[0][0] == ?/ -- libm_so = ARGV[1] if ARGV[1] && ARGV[1][0] == ?/ -- if( !(libc_so && libm_so) ) -- $stderr.puts("libc and libm not found: #{$0} ") -- end --end -- --libc_so = nil if !libc_so || (libc_so[0] == ?/ && !File.file?(libc_so)) --libm_so = nil if !libm_so || (libm_so[0] == ?/ && !File.file?(libm_so)) -- - if !libc_so || !libm_so - ruby = EnvUtil.rubybin - ldd = `ldd #{ruby}` --- -2.9.2 - diff --git a/SOURCES/ruby-3.0.3-fiddle-1.0.8-Rely-on-hard-coded-lib-name-to-detect-glibc.patch b/SOURCES/ruby-3.0.3-fiddle-1.0.8-Rely-on-hard-coded-lib-name-to-detect-glibc.patch new file mode 100644 index 0000000..3fa0747 --- /dev/null +++ b/SOURCES/ruby-3.0.3-fiddle-1.0.8-Rely-on-hard-coded-lib-name-to-detect-glibc.patch @@ -0,0 +1,25 @@ +From a267a40be7844224c5f000530bd3e8e906f1acea Mon Sep 17 00:00:00 2001 +From: Jeremy Evans +Date: Wed, 10 Mar 2021 13:48:00 -0800 +Subject: [PATCH] Do not use a libdir for glibc, it breaks Linux PPC64 (#70) + +Fixes [Bug #12666] +--- + test/fiddle/helper.rb | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/test/fiddle/helper.rb b/test/fiddle/helper.rb +index f38f903..a6e2019 100644 +--- a/test/fiddle/helper.rb ++++ b/test/fiddle/helper.rb +@@ -20,8 +20,8 @@ + # 64-bit ruby + libdir = '/lib64' if File.directory? '/lib64' + end +- libc_so = File.join(libdir, "libc.so.6") +- libm_so = File.join(libdir, "libm.so.6") ++ libc_so = "libc.so.6" ++ libm_so = "libm.so.6" + when /mingw/, /mswin/ + require "rbconfig" + crtname = RbConfig::CONFIG["RUBY_SO_NAME"][/msvc\w+/] || 'ucrtbase' diff --git a/SPECS/ruby.spec b/SPECS/ruby.spec index ee7c9ca..2f405d7 100644 --- a/SPECS/ruby.spec +++ b/SPECS/ruby.spec @@ -1,6 +1,6 @@ %global major_version 2 %global minor_version 6 -%global teeny_version 9 +%global teeny_version 10 %global major_minor_version %{major_version}.%{minor_version} %global ruby_version %{major_minor_version}.%{teeny_version} @@ -21,7 +21,7 @@ %endif -%global release 108 +%global release 109 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} # The RubyGems library has to stay out of Ruby directory tree, since the @@ -107,8 +107,8 @@ Source14: test_systemtap.rb # The load directive is supported since RPM 4.12, i.e. F21+. The build process # fails on older Fedoras. -%{?load:%{SOURCE4}} -%{?load:%{SOURCE5}} +%{load:%{SOURCE4}} +%{load:%{SOURCE5}} # Fix ruby_version abuse. # https://bugs.ruby-lang.org/issues/11002 @@ -134,10 +134,9 @@ Patch6: ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch # Use miniruby to regenerate prelude.c. # https://bugs.ruby-lang.org/issues/15306 Patch7: ruby-2.2.3-Generate-preludes-using-miniruby.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 a fiddle import test on an optimized glibc on Power 9. +# https://bugs.ruby-lang.org/issues/12666#note-13 +Patch9: ruby-3.0.3-fiddle-1.0.8-Rely-on-hard-coded-lib-name-to-detect-glibc.patch # `gem build ../foo.gemspec` changes directory, which does not play well with # gems unpacked by setup macro. # https://github.com/rubygems/rubygems/issues/2587 @@ -1102,7 +1101,7 @@ make test-bundler V=1 RSPECOPTS="--format d" BUNDLER_SPECS=bundler/definition_de # TODO: Gemify these libraries %{gem_dir}/specifications/default/cmath-1.0.0.gemspec %{gem_dir}/specifications/default/csv-3.0.9.gemspec -%{gem_dir}/specifications/default/date-2.0.2.gemspec +%{gem_dir}/specifications/default/date-2.0.3.gemspec %{gem_dir}/specifications/default/dbm-1.0.0.gemspec %{gem_dir}/specifications/default/e2mmap-0.1.0.gemspec %{gem_dir}/specifications/default/etc-1.0.1.gemspec @@ -1245,6 +1244,14 @@ make test-bundler V=1 RSPECOPTS="--format d" BUNDLER_SPECS=bundler/definition_de %{_mandir}/man5/gemfile.5* %changelog +* Thu May 19 2022 Vít Ondruch - 2.6.10-109 +- Upgrade to Ruby 2.6.10. + Resolves: rhbz#2088415 +- Fix buffer overrun in String-to-Float conversion. + Resolves: CVE-2022-28739 +- Fix FTBFS due to an incompatible load directive. +- Fix a fiddle import test on an optimized glibc on Power 9. + * Wed Dec 08 2021 Jun Aruga - 2.6.9-108 - Upgrade to Ruby 2.6.9. - Skip JIT tests in RHEL 8.