From 992ec95d8bec4b7de1c241083b94ffb7d364710b Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Sep 27 2022 09:17:26 +0000 Subject: import ruby-2.7.6-138.module+el8.6.0+16148+54b2ba8f --- diff --git a/.gitignore b/.gitignore index a24978b..1dfa940 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -SOURCES/ruby-2.7.4.tar.xz +SOURCES/ruby-2.7.6.tar.xz SOURCES/ruby-rubygems-bundler-v2.2.24.txz diff --git a/.ruby.metadata b/.ruby.metadata index 9907499..72f3175 100644 --- a/.ruby.metadata +++ b/.ruby.metadata @@ -1,2 +1,2 @@ -6e044d835f9f432cfa9441241c1ef66e3d607cbf SOURCES/ruby-2.7.4.tar.xz +068e3e11799250781ba4a68eb4f015bab35966e3 SOURCES/ruby-2.7.6.tar.xz da17623116cb189baeb3251f828d679e5570a938 SOURCES/ruby-rubygems-bundler-v2.2.24.txz 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 9718d6e..0000000 --- a/SOURCES/ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch +++ /dev/null @@ -1,136 +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 | 111 ------------------------------------------ - 1 file changed, 111 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,115 +6,6 @@ - - libc_so = libm_so = nil - --case RUBY_PLATFORM --when /cygwin/ -- libc_so = "cygwin1.dll" -- libm_so = "cygwin1.dll" --when /android/ -- libdir = '/system/lib' -- if [0].pack('L!').size == 8 -- libdir = '/system/lib64' -- end -- libc_so = File.join(libdir, "libc.so") -- libm_so = File.join(libdir, "libm.so") --when /linux/ -- libdir = '/lib' -- case RbConfig::SIZEOF['void*'] -- when 4 -- # 32-bit ruby -- case RUBY_PLATFORM -- when /armv\w+-linux/ -- # In the ARM 32-bit libc package such as libc6:armhf libc6:armel, -- # libc.so and libm.so are installed to /lib/arm-linux-gnu*. -- # It's not installed to /lib32. -- dirs = Dir.glob('/lib/arm-linux-gnu*') -- libdir = dirs[0] if dirs && File.directory?(dirs[0]) -- else -- libdir = '/lib32' if File.directory? '/lib32' -- end -- 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 = libm_so = "/usr/lib/libSystem.B.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 RbConfig::SIZEOF['void*'] -- 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)) -- --# macOS 11.0+ removed libSystem.B.dylib from /usr/lib. But It works with dlopen. --if RUBY_PLATFORM =~ /darwin/ -- libc_so = libm_so = "/usr/lib/libSystem.B.dylib" --end -- - 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/SOURCES/ruby-2.8.0-remove-unneeded-gem-require-for-ipaddr.patch b/SOURCES/ruby-2.8.0-remove-unneeded-gem-require-for-ipaddr.patch index c6923ee..ddd70e6 100644 --- a/SOURCES/ruby-2.8.0-remove-unneeded-gem-require-for-ipaddr.patch +++ b/SOURCES/ruby-2.8.0-remove-unneeded-gem-require-for-ipaddr.patch @@ -12,11 +12,11 @@ diff --git a/ext/openssl/openssl.gemspec b/ext/openssl/openssl.gemspec index 7c17cd54..f721f247 100644 --- a/ext/openssl/openssl.gemspec +++ b/ext/openssl/openssl.gemspec -@@ -21,7 +21,6 @@ Gem::Specification.new do |spec| - s.rubygems_version = "3.0.0.beta1" - s.summary = "OpenSSL provides SSL, TLS and general purpose cryptography." +@@ -17,7 +17,6 @@ Gem::Specification.new do |spec| -- s.add_runtime_dependency("ipaddr", [">= 0"]) - s.add_development_dependency("rake", [">= 0"]) - s.add_development_dependency("rake-compiler", [">= 0"]) - s.add_development_dependency("test-unit", ["~> 3.0"]) + spec.required_ruby_version = ">= 2.3.0" + +- spec.add_runtime_dependency "ipaddr" + spec.add_development_dependency "rake" + spec.add_development_dependency "rake-compiler" + spec.add_development_dependency "test-unit", "~> 3.0" 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 77aac55..509673d 100644 --- a/SPECS/ruby.spec +++ b/SPECS/ruby.spec @@ -1,6 +1,6 @@ %global major_version 2 %global minor_version 7 -%global teeny_version 4 +%global teeny_version 6 %global major_minor_version %{major_version}.%{minor_version} %global ruby_version %{major_minor_version}.%{teeny_version} @@ -22,7 +22,7 @@ %endif -%global release 137 +%global release 138 %{!?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 @@ -49,7 +49,7 @@ %global irb_version 1.2.6 %global json_version 2.3.0 %global net_telnet_version 0.2.0 -%global openssl_version 2.1.2 +%global openssl_version 2.1.3 %global psych_version 3.1.0 %global racc_version 1.4.16 %global rdoc_version 6.2.1.1 @@ -117,8 +117,8 @@ Source15: ruby-rubygems-bundler-v%{bundler_version}.txz # 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 @@ -146,10 +146,9 @@ 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 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 # Prevent issues with openssl loading when RubyGems are disabled. # https://github.com/ruby/openssl/pull/242 Patch13: ruby-2.8.0-remove-unneeded-gem-require-for-ipaddr.patch @@ -885,35 +884,6 @@ MSPECOPTS="" # https://bugs.ruby-lang.org/issues/16410 MSPECOPTS="$MSPECOPTS -P 'File.utime allows Time instances in the far future to set mtime and atime'" -# Disable File.lchmod specs, which fails when building against glibc 2.31.9000. -# https://bugs.ruby-lang.org/issues/16749 -MSPECOPTS="$MSPECOPTS -P 'File.lchmod changes the file mode of the link and not of the file'" - -# For now, disable JIT tests in RHEL 8. -# https://bugzilla.redhat.com/show_bug.cgi?id=1721553 -mv test/ruby/test_jit.rb{,.disabled} -sed \ - -e '/^ def test_pause$/,/^ end$/ s/^/#/' \ - -e '/^ def test_pause_waits_until_compaction$/,/^ end$/ s/^/#/' \ - -i test/ruby/test_rubyvm_mjit.rb - -%ifarch s390x -# Increase timeout for Fiddle::TestFunction#test_nogvl_poll test, which fails -# sometimes. -sed -i '/^ def test_nogvl_poll$/,/^ end$/ s/ 180,/ 1000,/' \ - test/fiddle/test_function.rb -# Skip tests which fail sometimes due to timeout. -sed -i '/^ def test_status_quit$/,/^ end$/ s/^/#/' \ - test/ruby/test_process.rb -sed \ - -e '/^ def test_segv_test$/,/^ end$/ s/^/#/' \ - -e '/^ def test_segv_loaded_features$/,/^ end$/ s/^/#/' \ - -e '/^ def test_segv_setproctitle$/,/^ end$/ s/^/#/' \ - -i test/ruby/test_rubyoptions.rb -sed -i '/^ def test_ignored_interrupt$/,/^ end$/ s/^/#/' \ - test/ruby/test_signal.rb -%endif - # Give an option to increase the timeout in tests. # https://bugs.ruby-lang.org/issues/16921 %{?test_timeout_scale:RUBY_TEST_TIMEOUT_SCALE="%{test_timeout_scale}"} \ @@ -1176,9 +1146,9 @@ sed -i '/^ def test_ignored_interrupt$/,/^ end$/ s/^/#/' \ %files default-gems %{gem_dir}/specifications/default/benchmark-0.1.0.gemspec -%{gem_dir}/specifications/default/cgi-0.1.0.gemspec +%{gem_dir}/specifications/default/cgi-0.1.0.1.gemspec %{gem_dir}/specifications/default/csv-3.1.2.gemspec -%{gem_dir}/specifications/default/date-3.0.0.gemspec +%{gem_dir}/specifications/default/date-3.0.3.gemspec %{gem_dir}/specifications/default/dbm-1.1.0.gemspec %{gem_dir}/specifications/default/delegate-0.1.0.gemspec %{gem_dir}/specifications/default/did_you_mean-%{did_you_mean_version}.gemspec @@ -1328,23 +1298,37 @@ sed -i '/^ def test_ignored_interrupt$/,/^ end$/ s/^/#/' \ %changelog +* Tue Jul 19 2022 Jarek Prokop - 2.7.6-138 +- Upgrade to Ruby 2.7.6. + Resolves: rhbz#2109424 +- Fix FTBFS due to an incompatible load directive. + Related: rhbz#2109424 +- Fix a fiddle import test on an optimized glibc on Power 9. + Related: rhbz#2109424 +- Fix regular Expression Denial of Service Vulnerability of Date Parsing Methods. + Resolves: CVE-2021-41817 +- Fix cookie prefix spoofing in CGI::Cookie.parse. + Resolves: CVE-2021-41819 +- Fix buffer overrun in String-to-Float conversion. + Resolves: CVE-2022-28739 + * Thu Jul 15 2021 Jun Aruga - 2.7.4-137 - Upgrade to Ruby 2.7.4. - Fix command injection vulnerability in RDoc. - Resolves: rhbz#1986768 + Resolves: CVE-2021-31799 - Fix FTP PASV command response can cause Net::FTP to connect to arbitrary host. - Resolves: rhbz#1986812 + Resolves: CVE-2021-31810 - Fix StartTLS stripping vulnerability in Net::IMAP. - Resolves: rhbz#1986813 + Resolves: CVE-2021-32066 - Upgrade to Bundler 2.2.24. Resolves: CVE-2020-36327 * Wed Apr 07 2021 Pavel Valena - 2.7.3-136 - Upgrade to Ruby 2.7.3. - Resolves: rhbz#1951999 + Resolves: rhbz#1947938 - Resolv::DNS: timeouts if multiple IPv6 name servers are given and address contains leading zero - Resolves: rhbz#1952000 + Resolves: rhbz#1944227 * Tue Oct 13 2020 Vít Ondruch - 2.7.2-135 - Upgrade to Ruby 2.7.2.