From a96f9182a802e9924bfe0236ede0891f4bd0cc60 Mon Sep 17 00:00:00 2001 From: Pavel Valena Date: Nov 15 2021 09:31:36 +0000 Subject: Upgrade Ruby to 2.6.8. --- diff --git a/ruby-2.6.3-fiddle-1.0.0-ffi-closure-alloc-default.patch b/ruby-2.6.3-fiddle-1.0.0-ffi-closure-alloc-default.patch index c54f1e4..ec99472 100644 --- a/ruby-2.6.3-fiddle-1.0.0-ffi-closure-alloc-default.patch +++ b/ruby-2.6.3-fiddle-1.0.0-ffi-closure-alloc-default.patch @@ -2,15 +2,12 @@ diff --git a/ext/fiddle/closure.c b/ext/fiddle/closure.c index 1a80b2b..b997e23 100644 --- a/ext/fiddle/closure.c +++ b/ext/fiddle/closure.c -@@ -13,25 +13,11 @@ typedef struct { +@@ -13,22 +13,11 @@ typedef struct { ffi_type **argv; } fiddle_closure; -#if defined(USE_FFI_CLOSURE_ALLOC) --#elif defined(__OpenBSD__) || defined(__APPLE__) || defined(__linux__) --# define USE_FFI_CLOSURE_ALLOC 0 --#elif defined(RUBY_LIBFFI_MODVERSION) && RUBY_LIBFFI_MODVERSION < 3000005 && \ -- (defined(__i386__) || defined(__x86_64__) || defined(_M_IX86) || defined(_M_AMD64)) +-#elif !defined(HAVE_FFI_CLOSURE_ALLOC) -# define USE_FFI_CLOSURE_ALLOC 0 -#else -# define USE_FFI_CLOSURE_ALLOC 1 @@ -28,7 +25,7 @@ index 1a80b2b..b997e23 100644 if (cls->argv) xfree(cls->argv); xfree(cls); } -@@ -205,12 +191,7 @@ allocate(VALUE klass) +@@ -202,12 +188,7 @@ allocate(VALUE klass) VALUE i = TypedData_Make_Struct(klass, fiddle_closure, &closure_data_type, closure); @@ -41,7 +38,7 @@ index 1a80b2b..b997e23 100644 return i; } -@@ -257,17 +238,8 @@ initialize(int rbargc, VALUE argv[], VALUE self) +@@ -254,17 +238,8 @@ initialize(int rbargc, VALUE argv[], VALUE self) if (FFI_OK != result) rb_raise(rb_eRuntimeError, "error prepping CIF %d", result); diff --git a/ruby-2.7.2-psych-fix-yaml-tests.patch b/ruby-2.7.2-psych-fix-yaml-tests.patch deleted file mode 100644 index 5a4be77..0000000 --- a/ruby-2.7.2-psych-fix-yaml-tests.patch +++ /dev/null @@ -1,162 +0,0 @@ -From 3c55d93cf68b1a969b90b306de4dd8b88d74a2f2 Mon Sep 17 00:00:00 2001 -From: nagachika -Date: Sat, 13 Jun 2020 11:29:51 +0900 -Subject: [PATCH] merge revision(s) 7e289cdf3fed588b2d5a6973e29f9ff95cb8d76c: - [Backport #16949] - - [ruby/psych] Fixing compatibility with libyaml 0.2.5 - - The main issue is that commas aren't allowed in local tags. libyaml - was updated to follow the spec, and our tests were out of date. - - See: https://github.com/yaml/libyaml/issues/196 - - https://github.com/ruby/psych/commit/3f5e520fd3 ---- - test/psych/test_nil.rb | 4 ++-- - test/psych/test_psych.rb | 17 +++++++---------- - test/psych/test_yaml.rb | 24 ++++++++++++------------ - version.h | 4 ++-- - 4 files changed, 23 insertions(+), 26 deletions(-) - -diff --git a/test/psych/test_nil.rb b/test/psych/test_nil.rb -index 910a2e697def..bcbbcb9c9397 100644 ---- a/test/psych/test_nil.rb -+++ b/test/psych/test_nil.rb -@@ -5,13 +5,13 @@ module Psych - class TestNil < TestCase - def test_nil - yml = Psych.dump nil -- assert_match(/--- \n(?:\.\.\.\n)?/, yml) -+ assert_match(/---[ ]?\n(?:\.\.\.\n)?/, yml) - assert_nil Psych.load(yml) - end - - def test_array_nil - yml = Psych.dump [nil] -- assert_equal "---\n- \n", yml -+ assert_match(/---\n-[ ]?\n/, yml) - assert_equal [nil], Psych.load(yml) - end - -diff --git a/test/psych/test_psych.rb b/test/psych/test_psych.rb -index eeadc864ef4e..e557feffb76a 100644 ---- a/test/psych/test_psych.rb -+++ b/test/psych/test_psych.rb -@@ -178,17 +178,17 @@ def test_add_builtin_type - - def test_domain_types - got = nil -- Psych.add_domain_type 'foo.bar,2002', 'foo' do |type, val| -+ Psych.add_domain_type 'foo.bar/2002', 'foo' do |type, val| - got = val - end - -- Psych.load('--- !foo.bar,2002/foo hello') -+ Psych.load('--- !foo.bar/2002:foo hello') - assert_equal 'hello', got - -- Psych.load("--- !foo.bar,2002/foo\n- hello\n- world") -+ Psych.load("--- !foo.bar/2002:foo\n- hello\n- world") - assert_equal %w{ hello world }, got - -- Psych.load("--- !foo.bar,2002/foo\nhello: world") -+ Psych.load("--- !foo.bar/2002:foo\nhello: world") - assert_equal({ 'hello' => 'world' }, got) - end - -@@ -295,16 +295,13 @@ def test_callbacks - types = [] - appender = lambda { |*args| types << args } - -- Psych.add_builtin_type('foo', &appender) -- Psych.add_domain_type('example.com,2002', 'foo', &appender) -+ Psych.add_domain_type('example.com:2002', 'foo', &appender) - Psych.load <<-eoyml --- !tag:yaml.org,2002:foo bar --- !tag:example.com,2002:foo bar -+- !tag:example.com:2002:foo bar - eoyml - - assert_equal [ -- ["tag:yaml.org,2002:foo", "bar"], -- ["tag:example.com,2002:foo", "bar"] -+ ["tag:example.com:2002:foo", "bar"] - ], types - end - -diff --git a/test/psych/test_yaml.rb b/test/psych/test_yaml.rb -index 5fa759c981b2..0dfd60f89434 100644 ---- a/test/psych/test_yaml.rb -+++ b/test/psych/test_yaml.rb -@@ -617,11 +617,11 @@ def test_spec_domain_prefix - raise ArgumentError, "Not a Hash in domain.tld,2002/invoice: " + val.inspect - end - } -- Psych.add_domain_type( "domain.tld,2002", 'invoice', &customer_proc ) -- Psych.add_domain_type( "domain.tld,2002", 'customer', &customer_proc ) -+ Psych.add_domain_type( "domain.tld/2002", 'invoice', &customer_proc ) -+ Psych.add_domain_type( "domain.tld/2002", 'customer', &customer_proc ) - assert_parse_only( { "invoice"=> { "customers"=> [ { "given"=>"Chris", "type"=>"domain customer", "family"=>"Dumars" } ], "type"=>"domain invoice" } }, <7, "center"=>{"x"=>73, "y"=>129}, "TYPE"=>"Shape: graph/circle"}, {"finish"=>{"x"=>89, "y"=>102}, "TYPE"=>"Shape: graph/line", "start"=>{"x"=>73, "y"=>129}}, {"TYPE"=>"Shape: graph/text", "value"=>"Pretty vector drawing.", "start"=>{"x"=>73, "y"=>129}, "color"=>16772795}, "Shape Container"]], < -Date: Thu, 23 Jan 2020 15:33:42 +0900 -Subject: [PATCH 1/2] 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 8981ef98e8..6332fcd6f1 100644 ---- a/lib/fileutils.rb -+++ b/lib/fileutils.rb -@@ -1320,6 +1320,7 @@ def chmod(mode) - else - File.chmod mode, path() - end -+ rescue Errno::EOPNOTSUPP - end - - def chown(uid, gid) -@@ -1411,7 +1412,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 f8e4937802..750fabf039 100644 ---- a/test/pathname/test_pathname.rb -+++ b/test/pathname/test_pathname.rb -@@ -824,7 +824,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 ddebb657bf..daa5a82d7b 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 --- -2.26.2 - diff --git a/ruby.spec b/ruby.spec index 47b8e6d..9751468 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,6 +1,6 @@ %global major_version 2 %global minor_version 6 -%global teeny_version 7 +%global teeny_version 8 %global major_minor_version %{major_version}.%{minor_version} %global ruby_version %{major_minor_version}.%{teeny_version} @@ -21,7 +21,7 @@ %endif -%global release 128 +%global release 129 %{!?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 @@ -49,7 +49,7 @@ %global power_assert_version 1.1.3 %global psych_version 3.1.0 %global rake_version 12.3.3 -%global rdoc_version 6.1.2 +%global rdoc_version 6.1.2.1 %global test_unit_version 3.2.9 %global xmlrpc_version 0.3.0 @@ -148,9 +148,6 @@ Patch11: rubygems-3.0.3-Restore-gem-build-behavior-and-introdcue-the-C-flag-to-g # https://github.com/rubygems/rubygems/pull/2604 Patch12: rubygems-3.0.3-Avoid-rdoc-hook-when-its-failed-to-load-rdoc-library.patch -# Fix compatibility with libyaml 0.2.5 -# https://bugs.ruby-lang.org/issues/16949 -Patch14: ruby-2.7.2-psych-fix-yaml-tests.patch # Fix DWARF5 support. # https://bugzilla.redhat.com/show_bug.cgi?id=1920533 # https://bugs.ruby-lang.org/issues/17585 @@ -182,8 +179,6 @@ Patch26: ruby-3.0.0-Convert-ip-addresses-to-canonical-form.patch # https://github.com/rubygems/bundler/pull/7416 Patch27: rubygem-bundler-2.1.0-dont-use-insecure-temporary-directory-as-home-directory.patch # Fix lchmod test failures. -# https://github.com/ruby/ruby/commit/a19228f878d955eaf2cce086bcf53f46fdf894b9 -Patch41: ruby-2.8.0-Brace-the-fact-that-lchmod-can-EOPNOTSUPP.patch # https://github.com/ruby/ruby/commit/72c02aa4b79731c7f25c9267f74b347f1946c704 Patch42: ruby-2.8.0-Moved-not-implemented-method-tests.patch @@ -577,7 +572,6 @@ rm -rf ext/fiddle/libffi* %patch9 -p1 %patch11 -p1 %patch12 -p1 -%patch14 -p1 %patch15 -p1 %patch19 -p1 %patch22 -p1 @@ -585,7 +579,6 @@ rm -rf ext/fiddle/libffi* %patch25 -p1 %patch26 -p1 %patch27 -p1 -%patch41 -p1 %patch42 -p1 # Provide an example of usage of the tapset: @@ -1245,8 +1238,8 @@ MSPECOPTS="$MSPECOPTS -P 'File.lchmod raises a NotImplementedError when called'" %{_mandir}/man5/gemfile.5* %changelog -* Wed Apr 14 2021 Jarek Prokop - 2.6.7-128 -- Upgrade to Ruby 2.6.7. +* Fri Nov 12 2021 Pavel Valena - 2.6.8-129 +- Upgrade Ruby to 2.6.8. - Resolv::DNS: timeouts if multiple IPv6 name servers are given an address containing leading zero - Fix: Rubygem-bundler: Don't use insecure tmp directory as home diff --git a/rubygem-bundler-2.1.0-dont-use-insecure-temporary-directory-as-home-directory.patch b/rubygem-bundler-2.1.0-dont-use-insecure-temporary-directory-as-home-directory.patch index 948f79d..794a65d 100644 --- a/rubygem-bundler-2.1.0-dont-use-insecure-temporary-directory-as-home-directory.patch +++ b/rubygem-bundler-2.1.0-dont-use-insecure-temporary-directory-as-home-directory.patch @@ -67,7 +67,7 @@ diff --git a/spec/bundler/bundler/bundler_spec.rb b/spec/bundler/bundler/bundler index 74cf7ae05d3..247838600bf 100644 --- a/spec/bundler/bundler/bundler_spec.rb +++ b/spec/bundler/bundler/bundler_spec.rb -@@ -232,16 +232,13 @@ +@@ -233,16 +233,13 @@ path = "/home/oggy" allow(Bundler.rubygems).to receive(:user_home).and_return(path) allow(File).to receive(:directory?).with(path).and_return false @@ -87,7 +87,7 @@ index 74cf7ae05d3..247838600bf 100644 end end -@@ -254,16 +251,13 @@ +@@ -255,16 +252,13 @@ allow(File).to receive(:directory?).with(path).and_return true allow(File).to receive(:writable?).with(path).and_return false allow(File).to receive(:directory?).with(dotbundle).and_return false @@ -107,7 +107,7 @@ index 74cf7ae05d3..247838600bf 100644 end context ".bundle exists and have correct permissions" do -@@ -282,31 +276,17 @@ +@@ -283,31 +277,17 @@ context "home directory is not set" do it "should issue warning and return a temporary user home" do allow(Bundler.rubygems).to receive(:user_home).and_return(nil) diff --git a/sources b/sources index 46f9d39..01ed2dc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ruby-2.6.7.tar.xz) = ba6fc0a36af2a08cf1b008851e805f59ea1047724fc7b61d4bc674533b8f123cb12fa0969e9a3f57290477c0d75f974ca7e304836e4905bd96a737211df9bd21 +SHA512 (ruby-2.6.8.tar.xz) = d040ad2238523587d8f356fcb796b8b6ad7f8caff7dd6df09e3f7efcbfa0369e33600e78c7f2bc713ae77c040757cce5c4fec223cb9070209f2bf741899c556d