Upgrade to Ruby 2.7.1.
This commit is contained in:
parent
79683d7d62
commit
f2d727806b
@ -67,15 +67,15 @@ diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
|
||||
index b47b6e1..0b99408 100755
|
||||
--- a/tool/rbinstall.rb
|
||||
+++ b/tool/rbinstall.rb
|
||||
@@ -338,6 +338,7 @@ def CONFIG.[](name, mandatory = false)
|
||||
sitearchlibdir = CONFIG["sitearchdir"]
|
||||
@@ -343,6 +343,7 @@ def CONFIG.[](name, mandatory = false)
|
||||
vendorlibdir = CONFIG["vendorlibdir"]
|
||||
vendorarchlibdir = CONFIG["vendorarchdir"]
|
||||
end
|
||||
+rubygemsdir = CONFIG["rubygemsdir"]
|
||||
mandir = CONFIG["mandir", true]
|
||||
docdir = CONFIG["docdir", true]
|
||||
enable_shared = CONFIG["ENABLE_SHARED"] == 'yes'
|
||||
@@ -565,7 +566,16 @@ def stub
|
||||
@@ -570,7 +571,16 @@ def stub
|
||||
install?(:local, :comm, :lib) do
|
||||
prepare "library scripts", rubylibdir
|
||||
noinst = %w[*.txt *.rdoc *.gemspec]
|
||||
|
@ -171,7 +171,7 @@ diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
|
||||
index d4c110e..d39c9a6 100755
|
||||
--- a/tool/rbinstall.rb
|
||||
+++ b/tool/rbinstall.rb
|
||||
@@ -428,7 +428,7 @@ def CONFIG.[](name, mandatory = false)
|
||||
@@ -433,7 +433,7 @@ def CONFIG.[](name, mandatory = false)
|
||||
|
||||
install?(:doc, :rdoc) do
|
||||
if $rdocdir
|
||||
|
@ -13,7 +13,7 @@ diff --git a/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb b
|
||||
index a54be2a..06739f1 100644
|
||||
--- a/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb
|
||||
+++ b/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb
|
||||
@@ -202,10 +202,10 @@ class Bundler::Persistent::Net::HTTP::Persistent
|
||||
@@ -197,10 +197,10 @@ class Bundler::Persistent::Net::HTTP::Persistent
|
||||
##
|
||||
# The default connection pool size is 1/4 the allowed open files.
|
||||
|
||||
|
88
ruby-2.8.0-Brace-the-fact-that-lchmod-can-EOPNOTSUPP.patch
Normal file
88
ruby-2.8.0-Brace-the-fact-that-lchmod-can-EOPNOTSUPP.patch
Normal file
@ -0,0 +1,88 @@
|
||||
From a19228f878d955eaf2cce086bcf53f46fdf894b9 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?=
|
||||
<shyouhei@ruby-lang.org>
|
||||
Date: Thu, 23 Jan 2020 15:33:42 +0900
|
||||
Subject: [PATCH] brace the fact that lchmod(2) can EOPNOTSUPP
|
||||
|
||||
Musl libc has this function as a tiny wrapper of fchmodat(3posix). On
|
||||
the other hand Linux kernel does not support changing modes of a symlink.
|
||||
The operation always fails with EOPNOTSUPP. This fchmodat behaviour is
|
||||
defined in POSIX. We have to take care of such exceptions.
|
||||
---
|
||||
lib/fileutils.rb | 3 ++-
|
||||
test/pathname/test_pathname.rb | 2 +-
|
||||
test/ruby/test_notimp.rb | 19 ++++++++++++-------
|
||||
3 files changed, 15 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/lib/fileutils.rb b/lib/fileutils.rb
|
||||
index a7ad65ae5e98..04788e26ca9c 100644
|
||||
--- a/lib/fileutils.rb
|
||||
+++ b/lib/fileutils.rb
|
||||
@@ -1345,6 +1345,7 @@ def chmod(mode)
|
||||
else
|
||||
File.chmod mode, path()
|
||||
end
|
||||
+ rescue Errno::EOPNOTSUPP
|
||||
end
|
||||
|
||||
def chown(uid, gid)
|
||||
@@ -1439,7 +1440,7 @@ def copy_metadata(path)
|
||||
if st.symlink?
|
||||
begin
|
||||
File.lchmod mode, path
|
||||
- rescue NotImplementedError
|
||||
+ rescue NotImplementedError, Errno::EOPNOTSUPP
|
||||
end
|
||||
else
|
||||
File.chmod mode, path
|
||||
diff --git a/test/pathname/test_pathname.rb b/test/pathname/test_pathname.rb
|
||||
index 792510bdfb2d..2ce32a6c1208 100644
|
||||
--- a/test/pathname/test_pathname.rb
|
||||
+++ b/test/pathname/test_pathname.rb
|
||||
@@ -818,7 +818,7 @@ def test_lchmod
|
||||
old = path.lstat.mode
|
||||
begin
|
||||
path.lchmod(0444)
|
||||
- rescue NotImplementedError
|
||||
+ rescue NotImplementedError, Errno::EOPNOTSUPP
|
||||
next
|
||||
end
|
||||
assert_equal(0444, path.lstat.mode & 0777)
|
||||
diff --git a/test/ruby/test_notimp.rb b/test/ruby/test_notimp.rb
|
||||
index b069154cfc3f..e13db692b50d 100644
|
||||
--- a/test/ruby/test_notimp.rb
|
||||
+++ b/test/ruby/test_notimp.rb
|
||||
@@ -13,11 +13,11 @@ def test_respond_to_fork
|
||||
|
||||
def test_respond_to_lchmod
|
||||
assert_include(File.methods, :lchmod)
|
||||
- if /linux/ =~ RUBY_PLATFORM
|
||||
- assert_equal(false, File.respond_to?(:lchmod))
|
||||
- end
|
||||
- if /freebsd/ =~ RUBY_PLATFORM
|
||||
+ case RUBY_PLATFORM
|
||||
+ when /freebsd/, /linux-musl/
|
||||
assert_equal(true, File.respond_to?(:lchmod))
|
||||
+ when /linux/
|
||||
+ assert_equal(false, File.respond_to?(:lchmod))
|
||||
end
|
||||
end
|
||||
|
||||
@@ -57,9 +57,14 @@ def test_call_lchmod
|
||||
File.open(f, "w") {}
|
||||
File.symlink f, g
|
||||
newmode = 0444
|
||||
- File.lchmod newmode, "#{d}/g"
|
||||
- snew = File.lstat(g)
|
||||
- assert_equal(newmode, snew.mode & 0777)
|
||||
+ begin
|
||||
+ File.lchmod newmode, "#{d}/g"
|
||||
+ rescue Errno::EOPNOTSUPP
|
||||
+ skip $!
|
||||
+ else
|
||||
+ snew = File.lstat(g)
|
||||
+ assert_equal(newmode, snew.mode & 0777)
|
||||
+ end
|
||||
}
|
||||
end
|
||||
end
|
131
ruby-2.8.0-Moved-not-implemented-method-tests.patch
Normal file
131
ruby-2.8.0-Moved-not-implemented-method-tests.patch
Normal file
@ -0,0 +1,131 @@
|
||||
From 72c02aa4b79731c7f25c9267f74b347f1946c704 Mon Sep 17 00:00:00 2001
|
||||
From: Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
Date: Fri, 28 Feb 2020 21:15:37 +0900
|
||||
Subject: [PATCH] Moved not-implemented method tests [Bug #16662]
|
||||
|
||||
Test not-implemented method with the dedicated methods, instead of
|
||||
platform dependent features.
|
||||
---
|
||||
test/-ext-/test_notimplement.rb | 7 +++
|
||||
test/ruby/test_notimp.rb | 90 ---------------------------------
|
||||
2 files changed, 7 insertions(+), 90 deletions(-)
|
||||
delete mode 100644 test/ruby/test_notimp.rb
|
||||
|
||||
diff --git a/test/-ext-/test_notimplement.rb b/test/-ext-/test_notimplement.rb
|
||||
index 92a2fd22b8d6..038b507b7312 100644
|
||||
--- a/test/-ext-/test_notimplement.rb
|
||||
+++ b/test/-ext-/test_notimplement.rb
|
||||
@@ -13,10 +13,17 @@ def test_funcall_notimplement
|
||||
end
|
||||
|
||||
def test_respond_to
|
||||
+ assert_include(Bug.methods(false), :notimplement)
|
||||
+ assert_include(Bug::NotImplement.instance_methods(false), :notimplement)
|
||||
assert_not_respond_to(Bug, :notimplement)
|
||||
assert_not_respond_to(Bug::NotImplement.new, :notimplement)
|
||||
end
|
||||
|
||||
+ def test_method_inspect_notimplement
|
||||
+ assert_match(/not-implemented/, Bug.method(:notimplement).inspect)
|
||||
+ assert_match(/not-implemented/, Bug::NotImplement.instance_method(:notimplement).inspect)
|
||||
+ end
|
||||
+
|
||||
def test_not_method_defined
|
||||
assert !Bug::NotImplement.method_defined?(:notimplement)
|
||||
assert !Bug::NotImplement.method_defined?(:notimplement, true)
|
||||
diff --git a/test/ruby/test_notimp.rb b/test/ruby/test_notimp.rb
|
||||
deleted file mode 100644
|
||||
index e13db692b50d..000000000000
|
||||
--- a/test/ruby/test_notimp.rb
|
||||
+++ /dev/null
|
||||
@@ -1,90 +0,0 @@
|
||||
-# frozen_string_literal: false
|
||||
-require 'test/unit'
|
||||
-require 'timeout'
|
||||
-require 'tmpdir'
|
||||
-
|
||||
-class TestNotImplement < Test::Unit::TestCase
|
||||
- def test_respond_to_fork
|
||||
- assert_include(Process.methods, :fork)
|
||||
- if /linux/ =~ RUBY_PLATFORM
|
||||
- assert_equal(true, Process.respond_to?(:fork))
|
||||
- end
|
||||
- end
|
||||
-
|
||||
- def test_respond_to_lchmod
|
||||
- assert_include(File.methods, :lchmod)
|
||||
- case RUBY_PLATFORM
|
||||
- when /freebsd/, /linux-musl/
|
||||
- assert_equal(true, File.respond_to?(:lchmod))
|
||||
- when /linux/
|
||||
- assert_equal(false, File.respond_to?(:lchmod))
|
||||
- end
|
||||
- end
|
||||
-
|
||||
- def test_call_fork
|
||||
- GC.start
|
||||
- pid = nil
|
||||
- ps =
|
||||
- case RUBY_PLATFORM
|
||||
- when /linux/ # assume Linux Distribution uses procps
|
||||
- proc {`ps -eLf #{pid}`}
|
||||
- when /freebsd/
|
||||
- proc {`ps -lH #{pid}`}
|
||||
- when /darwin/
|
||||
- proc {`ps -lM #{pid}`}
|
||||
- else
|
||||
- proc {`ps -l #{pid}`}
|
||||
- end
|
||||
- assert_nothing_raised(Timeout::Error, ps) do
|
||||
- EnvUtil.timeout(20) {
|
||||
- pid = fork {}
|
||||
- Process.wait pid
|
||||
- pid = nil
|
||||
- }
|
||||
- end
|
||||
- ensure
|
||||
- if pid
|
||||
- Process.kill(:KILL, pid)
|
||||
- Process.wait pid
|
||||
- end
|
||||
- end if Process.respond_to?(:fork)
|
||||
-
|
||||
- def test_call_lchmod
|
||||
- if File.respond_to?(:lchmod)
|
||||
- Dir.mktmpdir {|d|
|
||||
- f = "#{d}/f"
|
||||
- g = "#{d}/g"
|
||||
- File.open(f, "w") {}
|
||||
- File.symlink f, g
|
||||
- newmode = 0444
|
||||
- begin
|
||||
- File.lchmod newmode, "#{d}/g"
|
||||
- rescue Errno::EOPNOTSUPP
|
||||
- skip $!
|
||||
- else
|
||||
- snew = File.lstat(g)
|
||||
- assert_equal(newmode, snew.mode & 0777)
|
||||
- end
|
||||
- }
|
||||
- end
|
||||
- end
|
||||
-
|
||||
- def test_method_inspect_fork
|
||||
- m = Process.method(:fork)
|
||||
- if Process.respond_to?(:fork)
|
||||
- assert_not_match(/not-implemented/, m.inspect)
|
||||
- else
|
||||
- assert_match(/not-implemented/, m.inspect)
|
||||
- end
|
||||
- end
|
||||
-
|
||||
- def test_method_inspect_lchmod
|
||||
- m = File.method(:lchmod)
|
||||
- if File.respond_to?(:lchmod)
|
||||
- assert_not_match(/not-implemented/, m.inspect)
|
||||
- else
|
||||
- assert_match(/not-implemented/, m.inspect)
|
||||
- end
|
||||
- end
|
||||
-
|
||||
-end
|
18
ruby.spec
18
ruby.spec
@ -1,6 +1,6 @@
|
||||
%global major_version 2
|
||||
%global minor_version 7
|
||||
%global teeny_version 0
|
||||
%global teeny_version 1
|
||||
%global major_minor_version %{major_version}.%{minor_version}
|
||||
|
||||
%global ruby_version %{major_minor_version}.%{teeny_version}
|
||||
@ -33,7 +33,7 @@
|
||||
%global rubygems_version 3.1.2
|
||||
%global rubygems_molinillo_version 0.5.7
|
||||
|
||||
%global bundler_version 2.1.2
|
||||
%global bundler_version 2.1.4
|
||||
%global bundler_connection_pool_version 2.2.2
|
||||
%global bundler_fileutils_version 1.3.0
|
||||
%global bundler_molinillo_version 0.6.6
|
||||
@ -42,13 +42,13 @@
|
||||
|
||||
%global bigdecimal_version 2.0.0
|
||||
%global did_you_mean_version 1.4.0
|
||||
%global io_console_version 0.5.3
|
||||
%global irb_version 1.2.1
|
||||
%global io_console_version 0.5.6
|
||||
%global irb_version 1.2.3
|
||||
%global json_version 2.3.0
|
||||
%global minitest_version 5.13.0
|
||||
%global net_telnet_version 0.2.0
|
||||
%global openssl_version 2.1.2
|
||||
%global power_assert_version 1.1.5
|
||||
%global power_assert_version 1.1.7
|
||||
%global psych_version 3.1.0
|
||||
%global racc_version 1.4.16
|
||||
%global rake_version 13.0.1
|
||||
@ -734,9 +734,6 @@ ln -s %{_libdir}/gems/%{name}/psych-%{psych_version}/psych.so %{buildroot}%{ruby
|
||||
# https://bugs.ruby-lang.org/issues/15982
|
||||
rm %{buildroot}%{_bindir}/{racc2y,y2racc}
|
||||
rm %{buildroot}%{gem_dir}/gems/racc-%{racc_version}/bin/{racc2y,y2racc}
|
||||
# The 'rdoc' directory is empty and useless ATM.
|
||||
# https://bugs.ruby-lang.org/issues/16596
|
||||
rm -r %{buildroot}%{ruby_libdir}/racc/rdoc
|
||||
mkdir -p %{buildroot}%{gem_dir}/gems/racc-%{racc_version}/lib
|
||||
mkdir -p %{buildroot}%{_libdir}/gems/%{name}/racc-%{racc_version}
|
||||
mv %{buildroot}%{ruby_libdir}/racc* %{buildroot}%{gem_dir}/gems/racc-%{racc_version}/lib
|
||||
@ -1114,7 +1111,7 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS"
|
||||
%{gem_dir}/specifications/default/pstore-0.1.0.gemspec
|
||||
%{gem_dir}/specifications/default/readline-0.0.2.gemspec
|
||||
%{gem_dir}/specifications/default/readline-ext-0.1.0.gemspec
|
||||
%{gem_dir}/specifications/default/reline-0.1.2.gemspec
|
||||
%{gem_dir}/specifications/default/reline-0.1.3.gemspec
|
||||
%{gem_dir}/specifications/default/rexml-3.2.3.gemspec
|
||||
%{gem_dir}/specifications/default/rss-0.2.8.gemspec
|
||||
%{gem_dir}/specifications/default/sdbm-1.0.0.gemspec
|
||||
@ -1251,7 +1248,8 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS"
|
||||
%{gem_dir}/specifications/racc-%{racc_version}.gemspec
|
||||
|
||||
%changelog
|
||||
* Wed Apr 01 2020 Vít Ondruch <vondruch@redhat.com> - 2.7.0-128
|
||||
* Wed Apr 01 2020 Vít Ondruch <vondruch@redhat.com> - 2.7.1-128
|
||||
- Upgrade to Ruby 2.7.1.
|
||||
- Fix FTBFS due to glibc 2.31.9000 implementing lchmod(2).
|
||||
|
||||
* Tue Jan 28 2020 Vít Ondruch <vondruch@redhat.com> - 2.7.0-127
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (ruby-2.7.0.tar.xz) = dd5690c631bf3a2b76cdc06902bcd76a89713a045e136debab9b8a81ff8c433bbb254aa09e4014ca1cf85a69ff4bcb13de11da5e40c224e7268be43ef2194af7
|
||||
SHA512 (ruby-2.7.1.tar.xz) = 79f98b1ea98e0b10ec79da1883e8fc84d48ffe5c09ae945cbebde94365e35a589d919aac965f74d70ca7e21370ecee631ac5a8f9c4eac61d62f5aa629f27bf31
|
||||
|
Loading…
Reference in New Issue
Block a user