From 58a27c6cd997b83932efa13a87920883bfbfe119 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 3 Jul 2019 13:32:56 +0200 Subject: [PATCH 01/26] Upgrade to Ruby 2.7.0 (76851381cb). --- ruby-1.9.3-mkmf-verbose.patch | 2 +- ...-additional-preludes-by-configuratio.patch | 36 +- ...0-Enable-configuration-of-archlibdir.patch | 2 +- ...ed-paths-when-empty-version-string-i.patch | 2 +- ruby-2.1.0-always-use-i386.patch | 2 +- ruby-2.1.0-custom-rubygems-location.patch | 8 +- ...2.3-Generate-preludes-using-miniruby.patch | 2 +- ruby-2.3.0-ruby_version.patch | 30 +- ...-2.6.0-use-larger-keys-for-SSL-tests.patch | 486 ------------------ ruby.spec | 78 +-- ...when-its-failed-to-load-rdoc-library.patch | 24 - ...nd-introdcue-the-C-flag-to-gem-build.patch | 88 ---- 12 files changed, 83 insertions(+), 677 deletions(-) delete mode 100644 ruby-2.6.0-use-larger-keys-for-SSL-tests.patch delete mode 100644 rubygems-3.0.3-Avoid-rdoc-hook-when-its-failed-to-load-rdoc-library.patch delete mode 100644 rubygems-3.0.3-Restore-gem-build-behavior-and-introdcue-the-C-flag-to-gem-build.patch diff --git a/ruby-1.9.3-mkmf-verbose.patch b/ruby-1.9.3-mkmf-verbose.patch index dc8e9da..2ecdfcd 100644 --- a/ruby-1.9.3-mkmf-verbose.patch +++ b/ruby-1.9.3-mkmf-verbose.patch @@ -11,7 +11,7 @@ diff --git a/lib/mkmf.rb b/lib/mkmf.rb index 682eb46..e6b1445 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb -@@ -1911,7 +1911,7 @@ def configuration(srcdir) +@@ -1918,7 +1918,7 @@ def configuration(srcdir) SHELL = /bin/sh # V=0 quiet, V=1 verbose. other values don't work. diff --git a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch index 0770723..198c34c 100644 --- a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch +++ b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch @@ -4,29 +4,16 @@ Date: Fri, 4 Oct 2013 22:13:11 +0200 Subject: [PATCH] Allow to specify addition preludes by configuration option. --- - Makefile.in | 2 ++ - common.mk | 2 +- - configure.ac | 7 +++++++ + common.mk | 2 +- + configure.ac | 7 +++++++ + template/Makefile.in | 2 ++ 3 files changed, 10 insertions(+), 1 deletion(-) -diff --git a/Makefile.in b/Makefile.in -index 7e8ed82..7916993 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -154,6 +154,8 @@ BOOTSTRAPRUBY = @BOOTSTRAPRUBY@ - COROUTINE_H = @X_FIBER_COROUTINE_H@ - COROUTINE_OBJ = $(COROUTINE_H:.h=.@OBJEXT@) - -+OPTIONAL_PRELUDES = @OPTIONAL_PRELUDES@ -+ - #### End of system configuration section. #### - - MAJOR= @MAJOR@ diff --git a/common.mk b/common.mk index 5cfbc3d..3f0a82e 100644 --- a/common.mk +++ b/common.mk -@@ -156,7 +156,7 @@ ALLOBJS = $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(INITOBJS) +@@ -162,7 +162,7 @@ ALLOBJS = $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(INITOBJS) GOLFOBJS = goruby.$(OBJEXT) golf_prelude.$(OBJEXT) DEFAULT_PRELUDES = $(GEM_PRELUDE) @@ -39,7 +26,7 @@ diff --git a/configure.ac b/configure.ac index 028ef7ca3e..cdeff87871 100644 --- a/configure.ac +++ b/configure.ac -@@ -3855,6 +3855,13 @@ AC_SUBST(rubyarchhdrdir)dnl +@@ -3820,6 +3820,13 @@ AC_SUBST(rubyarchhdrdir)dnl AC_SUBST(sitearchhdrdir)dnl AC_SUBST(vendorarchhdrdir)dnl @@ -53,6 +40,19 @@ index 028ef7ca3e..cdeff87871 100644 AC_ARG_WITH(mantype, AS_HELP_STRING([--with-mantype=TYPE], [specify man page type; TYPE is one of man and doc]), [ +diff --git a/template/Makefile.in b/template/Makefile.in +index 110071de6a..a83500b5af 100644 +--- a/template/Makefile.in ++++ b/template/Makefile.in +@@ -155,6 +155,8 @@ BOOTSTRAPRUBY = @BOOTSTRAPRUBY@ + COROUTINE_H = @X_FIBER_COROUTINE_H@ + COROUTINE_OBJ = $(COROUTINE_H:.h=.@OBJEXT@) + ++OPTIONAL_PRELUDES = @OPTIONAL_PRELUDES@ ++ + #### End of system configuration section. #### + + MAJOR= @MAJOR@ -- 1.8.3.1 diff --git a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch index 116bb66..3300849 100644 --- a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch +++ b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch @@ -11,7 +11,7 @@ diff --git a/configure.ac b/configure.ac index 11fc237552..b77e88fc37 100644 --- a/configure.ac +++ b/configure.ac -@@ -3085,6 +3085,11 @@ AS_IF([test ${multiarch+set}], [ +@@ -3037,6 +3037,11 @@ AS_IF([test ${multiarch+set}], [ ]) archlibdir='${libdir}/${arch}' diff --git a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch index bfb197f..a192018 100644 --- a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch +++ b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch @@ -14,7 +14,7 @@ diff --git a/configure.ac b/configure.ac index 999e2d6d5d..11fc237552 100644 --- a/configure.ac +++ b/configure.ac -@@ -3710,7 +3710,8 @@ AS_CASE(["$ruby_version_dir_name"], +@@ -3675,7 +3675,8 @@ AS_CASE(["$ruby_version_dir_name"], ruby_version_dir=/'${ruby_version_dir_name}' if test -z "${ruby_version_dir_name}"; then diff --git a/ruby-2.1.0-always-use-i386.patch b/ruby-2.1.0-always-use-i386.patch index d63752a..26d585f 100644 --- a/ruby-2.1.0-always-use-i386.patch +++ b/ruby-2.1.0-always-use-i386.patch @@ -11,7 +11,7 @@ diff --git a/configure.ac b/configure.ac index b77e88fc37..6bba453e3c 100644 --- a/configure.ac +++ b/configure.ac -@@ -3774,6 +3774,8 @@ AC_SUBST(vendorarchdir)dnl +@@ -3739,6 +3739,8 @@ AC_SUBST(vendorarchdir)dnl AC_SUBST(CONFIGURE, "`echo $0 | sed 's|.*/||'`")dnl AC_SUBST(configure_args, "`echo "${ac_configure_args}" | sed 's/\\$/$$/g'`")dnl diff --git a/ruby-2.1.0-custom-rubygems-location.patch b/ruby-2.1.0-custom-rubygems-location.patch index c4893da..0cebb2c 100644 --- a/ruby-2.1.0-custom-rubygems-location.patch +++ b/ruby-2.1.0-custom-rubygems-location.patch @@ -15,7 +15,7 @@ diff --git a/configure.ac b/configure.ac index 6bba453e3c..028ef7ca3e 100644 --- a/configure.ac +++ b/configure.ac -@@ -3746,6 +3746,10 @@ AC_ARG_WITH(vendorarchdir, +@@ -3711,6 +3711,10 @@ AC_ARG_WITH(vendorarchdir, [vendorarchdir=$withval], [vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby'${ruby_version_dir}}${multiarch-'${vendorlibdir}/${sitearch}'}]) @@ -26,7 +26,7 @@ index 6bba453e3c..028ef7ca3e 100644 AS_IF([test "${LOAD_RELATIVE+set}"], [ AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) RUBY_EXEC_PREFIX='' -@@ -3770,6 +3774,7 @@ AC_SUBST(sitearchdir)dnl +@@ -3735,6 +3739,7 @@ AC_SUBST(sitearchdir)dnl AC_SUBST(vendordir)dnl AC_SUBST(vendorlibdir)dnl AC_SUBST(vendorarchdir)dnl @@ -67,7 +67,7 @@ diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb index b47b6e1..0b99408 100755 --- a/tool/rbinstall.rb +++ b/tool/rbinstall.rb -@@ -334,6 +334,7 @@ def CONFIG.[](name, mandatory = false) +@@ -338,6 +338,7 @@ def CONFIG.[](name, mandatory = false) sitearchlibdir = CONFIG["sitearchdir"] vendorlibdir = CONFIG["vendorlibdir"] vendorarchlibdir = CONFIG["vendorarchdir"] @@ -75,7 +75,7 @@ index b47b6e1..0b99408 100755 mandir = CONFIG["mandir", true] docdir = CONFIG["docdir", true] enable_shared = CONFIG["ENABLE_SHARED"] == 'yes' -@@ -560,7 +561,16 @@ def stub +@@ -564,7 +565,16 @@ def stub install?(:local, :comm, :lib) do prepare "library scripts", rubylibdir noinst = %w[*.txt *.rdoc *.gemspec] diff --git a/ruby-2.2.3-Generate-preludes-using-miniruby.patch b/ruby-2.2.3-Generate-preludes-using-miniruby.patch index 7118a32..e82c681 100644 --- a/ruby-2.2.3-Generate-preludes-using-miniruby.patch +++ b/ruby-2.2.3-Generate-preludes-using-miniruby.patch @@ -11,7 +11,7 @@ diff --git a/common.mk b/common.mk index 168dc52..20c218a 100644 --- a/common.mk +++ b/common.mk -@@ -1052,9 +1052,9 @@ $(MINIPRELUDE_C): $(COMPILE_PRELUDE) +@@ -1059,9 +1059,9 @@ $(MINIPRELUDE_C): $(COMPILE_PRELUDE) $(srcdir)/template/prelude.c.tmpl $(PRELUDE_C): $(COMPILE_PRELUDE) \ diff --git a/ruby-2.3.0-ruby_version.patch b/ruby-2.3.0-ruby_version.patch index a74fb74..3bd4ead 100644 --- a/ruby-2.3.0-ruby_version.patch +++ b/ruby-2.3.0-ruby_version.patch @@ -20,7 +20,7 @@ diff --git a/configure.ac b/configure.ac index 8ea969412f..a00f2b6776 100644 --- a/configure.ac +++ b/configure.ac -@@ -3661,9 +3661,6 @@ AS_CASE(["$target_os"], +@@ -3626,9 +3626,6 @@ AS_CASE(["$target_os"], rubyw_install_name='$(RUBYW_INSTALL_NAME)' ]) @@ -30,7 +30,7 @@ index 8ea969412f..a00f2b6776 100644 rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'} AC_ARG_WITH(rubyarchprefix, AS_HELP_STRING([--with-rubyarchprefix=DIR], -@@ -3686,56 +3683,62 @@ AC_ARG_WITH(ridir, +@@ -3651,56 +3648,62 @@ AC_ARG_WITH(ridir, AC_SUBST(ridir) AC_SUBST(RI_BASE_NAME) @@ -120,7 +120,7 @@ index 8ea969412f..a00f2b6776 100644 AS_IF([test "${LOAD_RELATIVE+set}"], [ AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) -@@ -3752,6 +3755,7 @@ AC_SUBST(sitearchincludedir)dnl +@@ -3717,6 +3720,7 @@ AC_SUBST(sitearchincludedir)dnl AC_SUBST(arch)dnl AC_SUBST(sitearch)dnl AC_SUBST(ruby_version)dnl @@ -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 -@@ -424,7 +424,7 @@ def CONFIG.[](name, mandatory = false) +@@ -428,7 +428,7 @@ def CONFIG.[](name, mandatory = false) install?(:doc, :rdoc) do if $rdocdir @@ -232,7 +232,7 @@ index 55ca080..75eea2b 100644 File.join parts end -@@ -172,7 +173,7 @@ def self.vendor_dir # :nodoc: +@@ -165,7 +166,7 @@ def self.vendor_dir # :nodoc: return nil unless RbConfig::CONFIG.key? 'vendordir' File.join RbConfig::CONFIG['vendordir'], 'gems', @@ -245,7 +245,7 @@ diff --git a/test/rubygems/test_gem.rb b/test/rubygems/test_gem.rb index 0428bea..b6e090e 100644 --- a/test/rubygems/test_gem.rb +++ b/test/rubygems/test_gem.rb -@@ -1288,7 +1288,8 @@ def test_self_use_paths +@@ -1279,7 +1279,8 @@ def test_self_use_paths def test_self_user_dir parts = [@userhome, '.gem', Gem.ruby_engine] @@ -255,15 +255,15 @@ index 0428bea..b6e090e 100644 assert_equal File.join(parts), Gem.user_dir end -@@ -1365,7 +1366,7 @@ def test_self_gzip - def test_self_vendor_dir - expected = - File.join RbConfig::CONFIG['vendordir'], 'gems', -- RbConfig::CONFIG['ruby_version'] -+ RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version'] +@@ -1355,7 +1356,7 @@ def test_self_vendor_dir + vendordir(File.join(@tempdir, 'vendor')) do + expected = + File.join RbConfig::CONFIG['vendordir'], 'gems', +- RbConfig::CONFIG['ruby_version'] ++ RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version'] - assert_equal expected, Gem.vendor_dir - end + assert_equal expected, Gem.vendor_dir + end -- 2.1.0 @@ -282,7 +282,7 @@ diff --git a/configure.ac b/configure.ac index a00f2b6776..999e2d6d5d 100644 --- a/configure.ac +++ b/configure.ac -@@ -101,7 +101,7 @@ RUBY_BASE_NAME=`echo ruby | sed "$program_transform_name"` +@@ -96,7 +96,7 @@ RUBY_BASE_NAME=`echo ruby | sed "$program_transform_name"` RUBYW_BASE_NAME=`echo rubyw | sed "$program_transform_name"` AC_SUBST(RUBY_BASE_NAME) AC_SUBST(RUBYW_BASE_NAME) diff --git a/ruby-2.6.0-use-larger-keys-for-SSL-tests.patch b/ruby-2.6.0-use-larger-keys-for-SSL-tests.patch deleted file mode 100644 index 6bb8466..0000000 --- a/ruby-2.6.0-use-larger-keys-for-SSL-tests.patch +++ /dev/null @@ -1,486 +0,0 @@ -From b0bcb19cb4f95d260c5993df0aaa3667522fb99d Mon Sep 17 00:00:00 2001 -From: Kazuki Yamaguchi -Date: Thu, 16 Aug 2018 20:54:47 +0900 -Subject: [PATCH 1/2] test/openssl/test_pair: fix deadlock in - test_connect_accept_nonblock - -Call IO.select with a timeout value and limit the number of retries to -prevent stacking forever. - -Reference: https://github.com/ruby/openssl/issues/214 ---- - test/openssl/test_pair.rb | 51 +++++++++++++++++---------------------- - 1 file changed, 22 insertions(+), 29 deletions(-) - -diff --git a/test/openssl/test_pair.rb b/test/openssl/test_pair.rb -index ea5f0dcf..eac3655e 100644 ---- a/test/openssl/test_pair.rb -+++ b/test/openssl/test_pair.rb -@@ -442,7 +442,7 @@ def test_connect_accept_nonblock_no_exception - end - - def test_connect_accept_nonblock -- ctx = OpenSSL::SSL::SSLContext.new() -+ ctx = OpenSSL::SSL::SSLContext.new - ctx.cert = @svr_cert - ctx.key = @svr_key - ctx.tmp_dh_callback = proc { OpenSSL::TestUtils::Fixtures.pkey_dh("dh1024") } -@@ -451,45 +451,38 @@ def test_connect_accept_nonblock - - th = Thread.new { - s2 = OpenSSL::SSL::SSLSocket.new(sock2, ctx) -- s2.sync_close = true -- begin -+ 5.times { -+ begin -+ break s2.accept_nonblock -+ rescue IO::WaitReadable -+ IO.select([s2], nil, nil, 1) -+ rescue IO::WaitWritable -+ IO.select(nil, [s2], nil, 1) -+ end - sleep 0.2 -- s2.accept_nonblock -+ } -+ } -+ -+ s1 = OpenSSL::SSL::SSLSocket.new(sock1) -+ 5.times { -+ begin -+ break s1.connect_nonblock - rescue IO::WaitReadable -- IO.select([s2]) -- retry -+ IO.select([s1], nil, nil, 1) - rescue IO::WaitWritable -- IO.select(nil, [s2]) -- retry -+ IO.select(nil, [s1], nil, 1) - end -- s2 -- } -- -- sleep 0.1 -- ctx = OpenSSL::SSL::SSLContext.new() -- s1 = OpenSSL::SSL::SSLSocket.new(sock1, ctx) -- begin - sleep 0.2 -- s1.connect_nonblock -- rescue IO::WaitReadable -- IO.select([s1]) -- retry -- rescue IO::WaitWritable -- IO.select(nil, [s1]) -- retry -- end -- s1.sync_close = true -+ } - - s2 = th.value - - s1.print "a\ndef" - assert_equal("a\n", s2.gets) - ensure -- th.join if th -- s1.close if s1 && !s1.closed? -- s2.close if s2 && !s2.closed? -- sock1.close if sock1 && !sock1.closed? -- sock2.close if sock2 && !sock2.closed? -+ sock1&.close -+ sock2&.close -+ th&.join - end - end - - -From 5ba99ad7ae1267ed964f53906530579299f3fcc6 Mon Sep 17 00:00:00 2001 -From: Kazuki Yamaguchi -Date: Thu, 16 Aug 2018 20:04:13 +0900 -Subject: [PATCH 2/2] test: use larger keys for SSL tests - -Some systems enforce a system-wide policy to restrict key sizes used in -SSL/TLS. Use larger ones if possible so that the test suite runs -successfully. - -New PEM files test/openssl/fixtures/pkey/{dh-1,rsa-1,rsa-2,rsa-3}.pem are added -to the tree, and SSL tests now use them instead of the fixed-size keys. - -Reference: https://github.com/ruby/openssl/issues/215 ---- - test/openssl/fixtures/pkey/dh-1.pem | 13 +++++++ - test/openssl/fixtures/pkey/rsa-1.pem | 51 ++++++++++++++++++++++++++++ - test/openssl/fixtures/pkey/rsa-2.pem | 51 ++++++++++++++++++++++++++++ - test/openssl/fixtures/pkey/rsa-3.pem | 51 ++++++++++++++++++++++++++++ - test/openssl/test_pair.rb | 8 ++--- - test/openssl/test_pkey_dh.rb | 8 ++--- - test/openssl/test_ssl.rb | 11 +++--- - test/openssl/utils.rb | 14 ++++---- - 8 files changed, 186 insertions(+), 21 deletions(-) - create mode 100644 test/openssl/fixtures/pkey/dh-1.pem - create mode 100644 test/openssl/fixtures/pkey/rsa-1.pem - create mode 100644 test/openssl/fixtures/pkey/rsa-2.pem - create mode 100644 test/openssl/fixtures/pkey/rsa-3.pem - -diff --git a/test/openssl/fixtures/pkey/dh-1.pem b/test/openssl/fixtures/pkey/dh-1.pem -new file mode 100644 -index 00000000..3340a6a1 ---- /dev/null -+++ b/test/openssl/fixtures/pkey/dh-1.pem -@@ -0,0 +1,13 @@ -+-----BEGIN DH PARAMETERS----- -+MIICCAKCAgEAvRzXYxY6L2DjeYmm1eowtMDu1it3j+VwFr6s6PRWzc1apMtztr9G -+xZ2mYndUAJLgNLO3n2fUDCYVMB6ZkcekW8Siocof3xWiMA6wqZ6uw0dsE3q7ZX+6 -+TLjgSjaXeGvjutvuEwVrFeaUi83bMgfXN8ToxIQVprIF35sYFt6fpbFATKfW7qqi -+P1pQkjmCskU4tztaWvlLh0qg85wuQGnpJaQT3gS30378i0IGbA0EBvJcSpTHYbLa -+nsdI9bfN/ZVgeolVMNMU9/n8R8vRhNPcHuciFwaqS656q+HavCIyxw/LfjSwwFvR -+TngCn0wytRErkzFIXnRKckh8/BpI4S+0+l1NkOwG4WJ55KJ/9OOdZW5o/QCp2bDi -+E0JN1EP/gkSom/prq8JR/yEqtsy99uc5nUxPmzv0IgdcFHZEfiQU7iRggEbx7qfQ -+Ve55XksmmJInmpCy1bSabAEgIKp8Ckt5KLYZ0RgTXUhcEpsxEo6cuAwoSJT5o4Rp -+yG3xow2ozPcqZkvb+d2CHj1sc54w9BVFAjVANEKmRil/9WKz14bu3wxEhOPqC54n -+QojjLcoXSoT66ZUOQnYxTSiLtzoKGPy8cAVPbkBrXz2u2sj5gcvr1JjoGjdHm9/3 -+qnqC8fsTz8UndKNIQC337o4K0833bQMzRGl1/qjbAPit2B7E3b6xTZMCAQI= -+-----END DH PARAMETERS----- -diff --git a/test/openssl/fixtures/pkey/rsa-1.pem b/test/openssl/fixtures/pkey/rsa-1.pem -new file mode 100644 -index 00000000..bd5a624f ---- /dev/null -+++ b/test/openssl/fixtures/pkey/rsa-1.pem -@@ -0,0 +1,51 @@ -+-----BEGIN RSA PRIVATE KEY----- -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 -+-----END RSA PRIVATE KEY----- -diff --git a/test/openssl/fixtures/pkey/rsa-2.pem b/test/openssl/fixtures/pkey/rsa-2.pem -new file mode 100644 -index 00000000..e4fd4f43 ---- /dev/null -+++ b/test/openssl/fixtures/pkey/rsa-2.pem -@@ -0,0 +1,51 @@ -+-----BEGIN RSA PRIVATE KEY----- -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 -+-----END RSA PRIVATE KEY----- -diff --git a/test/openssl/fixtures/pkey/rsa-3.pem b/test/openssl/fixtures/pkey/rsa-3.pem -new file mode 100644 -index 00000000..6c9c9ced ---- /dev/null -+++ b/test/openssl/fixtures/pkey/rsa-3.pem -@@ -0,0 +1,51 @@ -+-----BEGIN RSA PRIVATE KEY----- -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 -+-----END RSA PRIVATE KEY----- -diff --git a/test/openssl/test_pair.rb b/test/openssl/test_pair.rb -index eac3655e..8d6ca1e9 100644 ---- a/test/openssl/test_pair.rb -+++ b/test/openssl/test_pair.rb -@@ -10,7 +10,7 @@ def setup - ee_exts = [ - ["keyUsage", "keyEncipherment,digitalSignature", true], - ] -- @svr_key = OpenSSL::TestUtils::Fixtures.pkey("rsa1024") -+ @svr_key = OpenSSL::TestUtils::Fixtures.pkey("rsa-1") - @svr_cert = issue_cert(svr_dn, @svr_key, 1, ee_exts, nil, nil) - end - -@@ -23,7 +23,7 @@ def ssl_pair - sctx = OpenSSL::SSL::SSLContext.new - sctx.cert = @svr_cert - sctx.key = @svr_key -- sctx.tmp_dh_callback = proc { OpenSSL::TestUtils::Fixtures.pkey_dh("dh1024") } -+ sctx.tmp_dh_callback = proc { OpenSSL::TestUtils::Fixtures.pkey("dh-1") } - sctx.options |= OpenSSL::SSL::OP_NO_COMPRESSION - ssls = OpenSSL::SSL::SSLServer.new(tcps, sctx) - ns = ssls.accept -@@ -397,7 +397,7 @@ def test_connect_accept_nonblock_no_exception - ctx2 = OpenSSL::SSL::SSLContext.new - ctx2.cert = @svr_cert - ctx2.key = @svr_key -- ctx2.tmp_dh_callback = proc { OpenSSL::TestUtils::Fixtures.pkey_dh("dh1024") } -+ ctx2.tmp_dh_callback = proc { OpenSSL::TestUtils::Fixtures.pkey("dh-1") } - - sock1, sock2 = tcp_pair - -@@ -445,7 +445,7 @@ def test_connect_accept_nonblock - ctx = OpenSSL::SSL::SSLContext.new - ctx.cert = @svr_cert - ctx.key = @svr_key -- ctx.tmp_dh_callback = proc { OpenSSL::TestUtils::Fixtures.pkey_dh("dh1024") } -+ ctx.tmp_dh_callback = proc { OpenSSL::TestUtils::Fixtures.pkey("dh-1") } - - sock1, sock2 = tcp_pair - -diff --git a/test/openssl/test_pkey_dh.rb b/test/openssl/test_pkey_dh.rb -index fb713813..79bf9bb7 100644 ---- a/test/openssl/test_pkey_dh.rb -+++ b/test/openssl/test_pkey_dh.rb -@@ -19,7 +19,7 @@ def test_new_break - end - - def test_DHparams -- dh1024 = Fixtures.pkey_dh("dh1024") -+ dh1024 = Fixtures.pkey("dh1024") - asn1 = OpenSSL::ASN1::Sequence([ - OpenSSL::ASN1::Integer(dh1024.p), - OpenSSL::ASN1::Integer(dh1024.g) -@@ -42,7 +42,7 @@ def test_DHparams - end - - def test_public_key -- dh = Fixtures.pkey_dh("dh1024") -+ dh = Fixtures.pkey("dh1024") - public_key = dh.public_key - assert_no_key(public_key) #implies public_key.public? is false! - assert_equal(dh.to_der, public_key.to_der) -@@ -50,14 +50,14 @@ def test_public_key - end - - def test_generate_key -- dh = Fixtures.pkey_dh("dh1024").public_key # creates a copy -+ dh = Fixtures.pkey("dh1024").public_key # creates a copy - assert_no_key(dh) - dh.generate_key! - assert_key(dh) - end - - def test_key_exchange -- dh = Fixtures.pkey_dh("dh1024") -+ dh = Fixtures.pkey("dh1024") - dh2 = dh.public_key - dh.generate_key! - dh2.generate_key! -diff --git a/test/openssl/test_ssl.rb b/test/openssl/test_ssl.rb -index 408c7d82..2633f7c4 100644 ---- a/test/openssl/test_ssl.rb -+++ b/test/openssl/test_ssl.rb -@@ -712,7 +712,7 @@ def socketpair - - def test_tlsext_hostname - fooctx = OpenSSL::SSL::SSLContext.new -- fooctx.tmp_dh_callback = proc { Fixtures.pkey_dh("dh1024") } -+ fooctx.tmp_dh_callback = proc { Fixtures.pkey("dh-1") } - fooctx.cert = @cli_cert - fooctx.key = @cli_key - -@@ -764,7 +764,7 @@ def test_servername_cb_raises_an_exception_on_unknown_objects - ctx2 = OpenSSL::SSL::SSLContext.new - ctx2.cert = @svr_cert - ctx2.key = @svr_key -- ctx2.tmp_dh_callback = proc { Fixtures.pkey_dh("dh1024") } -+ ctx2.tmp_dh_callback = proc { Fixtures.pkey("dh-1") } - ctx2.servername_cb = lambda { |args| Object.new } - - sock1, sock2 = socketpair -@@ -1144,7 +1144,7 @@ def test_alpn_protocol_selection_cancel - ctx1 = OpenSSL::SSL::SSLContext.new - ctx1.cert = @svr_cert - ctx1.key = @svr_key -- ctx1.tmp_dh_callback = proc { Fixtures.pkey_dh("dh1024") } -+ ctx1.tmp_dh_callback = proc { Fixtures.pkey("dh-1") } - ctx1.alpn_select_cb = -> (protocols) { nil } - ssl1 = OpenSSL::SSL::SSLSocket.new(sock1, ctx1) - -@@ -1386,20 +1386,21 @@ def test_fallback_scsv - def test_dh_callback - pend "TLS 1.2 is not supported" unless tls12_supported? - -+ dh = Fixtures.pkey("dh-1") - called = false - ctx_proc = -> ctx { - ctx.ssl_version = :TLSv1_2 - ctx.ciphers = "DH:!NULL" - ctx.tmp_dh_callback = ->(*args) { - called = true -- Fixtures.pkey_dh("dh1024") -+ dh - } - } - start_server(ctx_proc: ctx_proc) do |port| - server_connect(port) { |ssl| - assert called, "dh callback should be called" - if ssl.respond_to?(:tmp_key) -- assert_equal Fixtures.pkey_dh("dh1024").to_der, ssl.tmp_key.to_der -+ assert_equal dh.to_der, ssl.tmp_key.to_der - end - } - end -diff --git a/test/openssl/utils.rb b/test/openssl/utils.rb -index b7ddd891..fe626ade 100644 ---- a/test/openssl/utils.rb -+++ b/test/openssl/utils.rb -@@ -42,10 +42,8 @@ module Fixtures - - def pkey(name) - OpenSSL::PKey.read(read_file("pkey", name)) -- end -- -- def pkey_dh(name) -- # DH parameters can be read by OpenSSL::PKey.read atm -+ rescue OpenSSL::PKey::PKeyError -+ # TODO: DH parameters can be read by OpenSSL::PKey.read atm - OpenSSL::PKey::DH.new(read_file("pkey", name)) - end - -@@ -157,9 +155,9 @@ class OpenSSL::SSLTestCase < OpenSSL::TestCase - - def setup - super -- @ca_key = Fixtures.pkey("rsa2048") -- @svr_key = Fixtures.pkey("rsa1024") -- @cli_key = Fixtures.pkey("rsa2048") -+ @ca_key = Fixtures.pkey("rsa-1") -+ @svr_key = Fixtures.pkey("rsa-2") -+ @cli_key = Fixtures.pkey("rsa-3") - @ca = OpenSSL::X509::Name.parse("/DC=org/DC=ruby-lang/CN=CA") - @svr = OpenSSL::X509::Name.parse("/DC=org/DC=ruby-lang/CN=localhost") - @cli = OpenSSL::X509::Name.parse("/DC=org/DC=ruby-lang/CN=localhost") -@@ -200,7 +198,7 @@ def start_server(verify_mode: OpenSSL::SSL::VERIFY_NONE, start_immediately: true - ctx.cert_store = store - ctx.cert = @svr_cert - ctx.key = @svr_key -- ctx.tmp_dh_callback = proc { Fixtures.pkey_dh("dh1024") } -+ ctx.tmp_dh_callback = proc { Fixtures.pkey("dh-1") } - ctx.verify_mode = verify_mode - ctx_proc.call(ctx) if ctx_proc - diff --git a/ruby.spec b/ruby.spec index 2e94ada..2f7075d 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,6 +1,6 @@ %global major_version 2 -%global minor_version 6 -%global teeny_version 3 +%global minor_version 7 +%global teeny_version 0 %global major_minor_version %{major_version}.%{minor_version} %global ruby_version %{major_minor_version}.%{teeny_version} @@ -10,50 +10,51 @@ #%%global milestone rc2 # Keep the revision enabled for pre-releases from SVN. -#%%global revision 66252 +%global revision 76851381cb %global ruby_archive %{name}-%{ruby_version} # If revision and milestone are removed/commented out, the official release build is expected. %if 0%{?milestone:1}%{?revision:1} != 0 -%global development_release %{?milestone}%{?!milestone:%{?revision:r%{revision}}} -%global ruby_archive %{ruby_archive}-%{?milestone}%{?!milestone:%{?revision:r%{revision}}} +%global ruby_archive %{ruby_archive}-%{?milestone}%{?!milestone:%{?revision}} +%define ruby_archive_timestamp %%(stat --printf='@%Y' %%{ruby_archive}.tar.xz | date -f - +"%Y%m%d") +%global development_release %{?milestone}%{?!milestone:%{?revision:%{ruby_archive_timestamp}git%{revision}}} %endif -%global release 121 -%{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} +%global release 1 +%{!?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 # RubyGems should be share by all Ruby implementations. %global rubygems_dir %{_datadir}/rubygems # Bundled libraries versions -%global rubygems_version 3.0.3 +%global rubygems_version 3.1.0.pre1 %global rubygems_molinillo_version 0.5.7 -%global bundler_version 1.17.2 +%global bundler_version 2.1.0.pre.1 # FileUtils had not used to have separate versioning from Ruby :/ Lets use # date of bundling for now. The gemified version of FileUtils has already proper # version (if it's going to be bundled). -%global bundler_fileutils_version 0.20170425 +%global bundler_fileutils_version 1.2.0 %global bundler_molinillo_version 0.6.6 %global bundler_net_http_persistent_version 2.9.4 -%global bundler_thor_version 0.20.0 +%global bundler_thor_version 0.20.3 -%global bigdecimal_version 1.4.1 +%global bigdecimal_version 1.4.2 %global did_you_mean_version 1.3.0 %global io_console_version 0.4.7 -%global irb_version 1.0.0 -%global json_version 2.1.0 +%global irb_version 1.1.0.pre.1 +%global json_version 2.2.0 %global minitest_version 5.11.3 %global net_telnet_version 0.2.0 %global openssl_version 2.1.2 -%global power_assert_version 1.1.3 +%global power_assert_version 1.1.4 %global psych_version 3.1.0 %global rake_version 12.3.2 %global rdoc_version 6.1.0 -%global test_unit_version 3.2.9 +%global test_unit_version 3.3.3 %global xmlrpc_version 0.3.0 # Might not be needed in the future, if we are lucky enough. @@ -139,20 +140,10 @@ Patch7: ruby-2.2.3-Generate-preludes-using-miniruby.patch # 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 -# `gem build ../foo.gemspec` changes directory, which does not play well with -# gems unpacked by setup macro. -# https://github.com/rubygems/rubygems/issues/2587 -Patch11: rubygems-3.0.3-Restore-gem-build-behavior-and-introdcue-the-C-flag-to-gem-build.patch -# This allows to loosen the RDoc dependency again. -# https://github.com/rubygems/rubygems/pull/2604 -Patch12: rubygems-3.0.3-Avoid-rdoc-hook-when-its-failed-to-load-rdoc-library.patch # Add support for .include directive used by OpenSSL config files. # https://github.com/ruby/openssl/pull/216 Patch22: ruby-2.6.0-config-support-include-directive.patch -# Use larger keys to prevent test failures. -# https://github.com/ruby/openssl/pull/217 -Patch23: ruby-2.6.0-use-larger-keys-for-SSL-tests.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Suggests: rubypick @@ -542,10 +533,7 @@ rm -rf ext/fiddle/libffi* %patch6 -p1 %patch7 -p1 %patch9 -p1 -%patch11 -p1 -%patch12 -p1 %patch22 -p1 -%patch23 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -609,13 +597,9 @@ for cert in \ do rm %{buildroot}%{rubygems_dir}/rubygems/ssl_certs/$cert rm -r $(dirname %{buildroot}%{rubygems_dir}/rubygems/ssl_certs/$cert) - rm %{buildroot}%{ruby_libdir}/bundler/ssl_certs/$cert - rm -r $(dirname %{buildroot}%{ruby_libdir}/bundler/ssl_certs/$cert) done # Ensure there is not forgotten any certificate. test ! "$(ls -A %{buildroot}%{rubygems_dir}/rubygems/ssl_certs/ 2>/dev/null)" -test "$(ls -A %{buildroot}%{ruby_libdir}/bundler/ssl_certs/ 2>/dev/null)" \ - = "certificate_manager.rb" # Move macros file into proper place and replace the %%{name} macro, since it # would be wrongly evaluated during build of other packages. @@ -782,8 +766,11 @@ checksec -f libruby.so.%{ruby_version} | \ # Check Bundler bundled dependencies versions. # FileUtils. -# TODO: There is no version in bundled FileUtils yet. -#%%{global bundler_fileutils_version} +[ "`make runruby TESTRUN_SCRIPT=\"-e \\\" \ + module Bundler; end; \ + require 'bundler/vendor/fileutils/lib/fileutils/version'; \ + puts Bundler::FileUtils::VERSION\\\"\" | tail -1`" \ + == '%{bundler_fileutils_version}' ] # Molinillo. [ "`make runruby TESTRUN_SCRIPT=\"-e \\\" \ @@ -837,6 +824,10 @@ DISABLE_TESTS="$DISABLE_TESTS -n !/test_segv_\(setproctitle\|test\|loaded_featur # https://bugs.ruby-lang.org/issues/14175 sed -i '/def test_mdns_each_address$/,/^ end$/ s/^/#/' test/resolv/test_mdns.rb +# Disable failing TestFileExhaustive#test_birthtime test. +# https://bugs.ruby-lang.org/issues/15972 +DISABLE_TESTS="$DISABLE_TESTS -n !/test_birthtime/" + make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %files @@ -846,6 +837,9 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %license GPL %license LEGAL %{_bindir}/erb +%{_bindir}/racc +%{_bindir}/racc2y +%{_bindir}/y2racc %{_bindir}/%{name}%{?with_rubypick:-mri} %{_mandir}/man1/erb* %{_mandir}/man1/ruby* @@ -897,6 +891,7 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %{ruby_libdir}/net %{ruby_libdir}/optparse %{ruby_libdir}/racc +%{ruby_libdir}/reline %{ruby_libdir}/rexml %{ruby_libdir}/rinda %{ruby_libdir}/ripper @@ -928,6 +923,7 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %{ruby_libarchdir}/digest/sha2.so %dir %{ruby_libarchdir}/enc %{ruby_libarchdir}/enc/big5.so +%{ruby_libarchdir}/enc/cesu_8.so %{ruby_libarchdir}/enc/cp949.so %{ruby_libarchdir}/enc/emacs_mule.so %{ruby_libarchdir}/enc/encdb.so @@ -1045,7 +1041,7 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %{gem_dir}/specifications/default/etc-1.0.1.gemspec %{gem_dir}/specifications/default/fcntl-1.0.0.gemspec %{gem_dir}/specifications/default/fiddle-1.0.0.gemspec -%{gem_dir}/specifications/default/fileutils-1.1.0.gemspec +%{gem_dir}/specifications/default/fileutils-1.2.0.gemspec %{gem_dir}/specifications/default/forwardable-1.2.0.gemspec %{gem_dir}/specifications/default/gdbm-2.0.0.gemspec %{gem_dir}/specifications/default/ipaddr-1.2.2.gemspec @@ -1054,8 +1050,10 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %{gem_dir}/specifications/default/mutex_m-0.1.0.gemspec %{gem_dir}/specifications/default/ostruct-0.1.0.gemspec %{gem_dir}/specifications/default/prime-0.1.0.gemspec +%{gem_dir}/specifications/default/racc-1.4.16.pre.1.gemspec +%{gem_dir}/specifications/default/reline-0.0.0.gemspec %{gem_dir}/specifications/default/rexml-3.1.9.gemspec -%{gem_dir}/specifications/default/rss-0.2.7.gemspec +%{gem_dir}/specifications/default/rss-0.2.8.gemspec %{gem_dir}/specifications/default/scanf-1.0.0.gemspec %{gem_dir}/specifications/default/sdbm-1.0.0.gemspec %{gem_dir}/specifications/default/shell-0.7.gemspec @@ -1067,6 +1065,9 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %{gem_dir}/specifications/default/webrick-1.4.2.gemspec %{gem_dir}/specifications/default/zlib-1.0.0.gemspec +# TODO: Gemify racc +%{gem_dir}/gems/racc-1.4.16.pre.1 + %files -n rubygems-devel %{_rpmconfigdir}/macros.d/macros.rubygems %{_rpmconfigdir}/fileattrs/rubygems.attr @@ -1182,6 +1183,9 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %{_mandir}/man5/gemfile.5* %changelog +* Mon Jul 01 2019 Vít Ondruch - 2.7.0-1 +- Upgrade to Ruby 2.7.0 (76851381cb). + * Tue Jun 25 2019 Vít Ondruch - 2.6.3-121 - Properly support %%prerelease in %%gemspec_ macros. diff --git a/rubygems-3.0.3-Avoid-rdoc-hook-when-its-failed-to-load-rdoc-library.patch b/rubygems-3.0.3-Avoid-rdoc-hook-when-its-failed-to-load-rdoc-library.patch deleted file mode 100644 index 690d245..0000000 --- a/rubygems-3.0.3-Avoid-rdoc-hook-when-its-failed-to-load-rdoc-library.patch +++ /dev/null @@ -1,24 +0,0 @@ -From c16675582a68800ef17b6056110e0a8bcdb38b55 Mon Sep 17 00:00:00 2001 -From: SHIBATA Hiroshi -Date: Tue, 22 Jan 2019 09:37:23 +0900 -Subject: [PATCH] Avoid rdoc hook when it's failed to load rdoc library. - - Fixed #2483 ---- - lib/rubygems/rdoc.rb | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/lib/rubygems/rdoc.rb b/lib/rubygems/rdoc.rb -index dfaf7c55bf..4e16fbb86f 100644 ---- a/lib/rubygems/rdoc.rb -+++ b/lib/rubygems/rdoc.rb -@@ -18,7 +18,7 @@ - module Gem - RDoc = ::RDoc::RubygemsHook - end -+ -+ Gem.done_installing(&Gem::RDoc.method(:generation_hook)) - rescue LoadError - end -- --Gem.done_installing(&Gem::RDoc.method(:generation_hook)) diff --git a/rubygems-3.0.3-Restore-gem-build-behavior-and-introdcue-the-C-flag-to-gem-build.patch b/rubygems-3.0.3-Restore-gem-build-behavior-and-introdcue-the-C-flag-to-gem-build.patch deleted file mode 100644 index fa4f0c3..0000000 --- a/rubygems-3.0.3-Restore-gem-build-behavior-and-introdcue-the-C-flag-to-gem-build.patch +++ /dev/null @@ -1,88 +0,0 @@ -From f4061357d812e9033f07ae3f8f44c4e26839f1e5 Mon Sep 17 00:00:00 2001 -From: bronzdoc -Date: Mon, 14 Jan 2019 09:46:29 -0600 -Subject: [PATCH] Restore gem build behavior and introdcue the "-C" flag to gem - build - ---- - lib/rubygems/commands/build_command.rb | 41 +++++++++++++------ - .../test_gem_commands_build_command.rb | 1 + - 2 files changed, 29 insertions(+), 13 deletions(-) - -diff --git a/lib/rubygems/commands/build_command.rb b/lib/rubygems/commands/build_command.rb -index e59471e976..761b80ee94 100644 ---- a/lib/rubygems/commands/build_command.rb -+++ b/lib/rubygems/commands/build_command.rb -@@ -18,6 +18,10 @@ def initialize - add_option '-o', '--output FILE', 'output gem with the given filename' do |value, options| - options[:output] = value - end -+ -+ add_option '-C PATH', '', 'Run as if gem build was started in instead of the current working directory.' do |value, options| -+ options[:build_path] = value -+ end - end - - def arguments # :nodoc: -@@ -60,25 +64,36 @@ def execute - end - - if File.exist? gemspec -- Dir.chdir(File.dirname(gemspec)) do -- spec = Gem::Specification.load File.basename(gemspec) -- -- if spec -- Gem::Package.build( -- spec, -- options[:force], -- options[:strict], -- options[:output] -- ) -- else -- alert_error "Error loading gemspec. Aborting." -- terminate_interaction 1 -+ spec = Gem::Specification.load(gemspec) -+ -+ if options[:build_path] -+ Dir.chdir(File.dirname(gemspec)) do -+ spec = Gem::Specification.load File.basename(gemspec) -+ build_package(spec) - end -+ else -+ build_package(spec) - end -+ - else - alert_error "Gemspec file not found: #{gemspec}" - terminate_interaction 1 - end - end - -+ private -+ -+ def build_package(spec) -+ if spec -+ Gem::Package.build( -+ spec, -+ options[:force], -+ options[:strict], -+ options[:output] -+ ) -+ else -+ alert_error "Error loading gemspec. Aborting." -+ terminate_interaction 1 -+ end -+ end - end -diff --git a/test/rubygems/test_gem_commands_build_command.rb b/test/rubygems/test_gem_commands_build_command.rb -index ac82a408c7..02d1b98e8f 100644 ---- a/test/rubygems/test_gem_commands_build_command.rb -+++ b/test/rubygems/test_gem_commands_build_command.rb -@@ -207,6 +207,7 @@ def test_execute_outside_dir - gs.write @gem.to_ruby - end - -+ @cmd.options[:build_path] = gemspec_dir - @cmd.options[:args] = [gemspec_file] - - use_ui @ui do From 540626228242f0c4e3a4e741cbba651365f3c1eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 3 Jul 2019 15:10:52 +0200 Subject: [PATCH 02/26] Upgrade to Ruby 2.7.0 (e44c9b1147). --- ruby.spec | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/ruby.spec b/ruby.spec index 2f7075d..9801272 100644 --- a/ruby.spec +++ b/ruby.spec @@ -10,7 +10,7 @@ #%%global milestone rc2 # Keep the revision enabled for pre-releases from SVN. -%global revision 76851381cb +%global revision e44c9b1147 %global ruby_archive %{name}-%{ruby_version} @@ -824,10 +824,6 @@ DISABLE_TESTS="$DISABLE_TESTS -n !/test_segv_\(setproctitle\|test\|loaded_featur # https://bugs.ruby-lang.org/issues/14175 sed -i '/def test_mdns_each_address$/,/^ end$/ s/^/#/' test/resolv/test_mdns.rb -# Disable failing TestFileExhaustive#test_birthtime test. -# https://bugs.ruby-lang.org/issues/15972 -DISABLE_TESTS="$DISABLE_TESTS -n !/test_birthtime/" - make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %files @@ -1184,7 +1180,7 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %changelog * Mon Jul 01 2019 Vít Ondruch - 2.7.0-1 -- Upgrade to Ruby 2.7.0 (76851381cb). +- Upgrade to Ruby 2.7.0 (e44c9b1147). * Tue Jun 25 2019 Vít Ondruch - 2.6.3-121 - Properly support %%prerelease in %%gemspec_ macros. From 90d0b88870e547a538e9b45de15da4c6fd712ce1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 3 Jul 2019 18:15:10 +0200 Subject: [PATCH 03/26] Extract Racc into sub-package. --- ruby.spec | 41 +++++++++++++++++++++++++++++++---------- 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/ruby.spec b/ruby.spec index 9801272..82db342 100644 --- a/ruby.spec +++ b/ruby.spec @@ -52,6 +52,7 @@ %global openssl_version 2.1.2 %global power_assert_version 1.1.4 %global psych_version 3.1.0 +%global racc_version 1.4.16.pre.1 %global rake_version 12.3.2 %global rdoc_version 6.1.0 %global test_unit_version 3.3.3 @@ -517,6 +518,18 @@ Bundler manages an application's dependencies through its entire life, across many machines, systematically and repeatably. +%package -n rubygem-racc +Summary: Racc is a LALR(1) parser generator +Version: %{racc_version} +License: MIT +Requires: ruby(release) +Requires: ruby(rubygems) >= %{rubygems_version} + +%description -n rubygem-racc +Racc is a LALR(1) parser generator. It is written in Ruby itself, and +generates Ruby program. + + %prep %setup -q -n %{ruby_archive} @@ -704,6 +717,18 @@ ln -s %{gem_dir}/gems/psych-%{psych_version}/lib/psych %{buildroot}%{ruby_libdir ln -s %{gem_dir}/gems/psych-%{psych_version}/lib/psych.rb %{buildroot}%{ruby_libdir}/psych.rb ln -s %{_libdir}/gems/%{name}/psych-%{psych_version}/psych.so %{buildroot}%{ruby_libarchdir}/psych.so +# These has wrong shebangs. Exclude them for now and let's see what upstream +# thinks about them. +# https://bugs.ruby-lang.org/issues/15982 +rm %{buildroot}%{_bindir}/{racc2y,y2racc} +rm %{buildroot}%{gem_dir}/gems/racc-%{racc_version}/bin/{racc2y,y2racc} +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 +mv %{buildroot}%{ruby_libarchdir}/racc/ %{buildroot}%{_libdir}/gems/%{name}/racc-%{racc_version}/ +touch %{buildroot}%{_libdir}/gems/%{name}/racc-%{racc_version}/gem.build_complete +mv %{buildroot}%{gem_dir}/specifications/default/racc-%{racc_version}.gemspec %{buildroot}%{gem_dir}/specifications + # Move the binary extensions into proper place (if no gem has binary extension, # the extensions directory might be empty). find %{buildroot}%{gem_dir}/extensions/*-%{_target_os}/%{ruby_version}/* -maxdepth 0 \ @@ -833,9 +858,6 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %license GPL %license LEGAL %{_bindir}/erb -%{_bindir}/racc -%{_bindir}/racc2y -%{_bindir}/y2racc %{_bindir}/%{name}%{?with_rubypick:-mri} %{_mandir}/man1/erb* %{_mandir}/man1/ruby* @@ -886,7 +908,6 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %{ruby_libdir}/matrix %{ruby_libdir}/net %{ruby_libdir}/optparse -%{ruby_libdir}/racc %{ruby_libdir}/reline %{ruby_libdir}/rexml %{ruby_libdir}/rinda @@ -991,8 +1012,6 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %{ruby_libarchdir}/objspace.so %{ruby_libarchdir}/pathname.so %{ruby_libarchdir}/pty.so -%dir %{ruby_libarchdir}/racc -%{ruby_libarchdir}/racc/cparse.so %dir %{ruby_libarchdir}/rbconfig %{ruby_libarchdir}/rbconfig.rb %{ruby_libarchdir}/rbconfig/sizeof.so @@ -1046,7 +1065,6 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %{gem_dir}/specifications/default/mutex_m-0.1.0.gemspec %{gem_dir}/specifications/default/ostruct-0.1.0.gemspec %{gem_dir}/specifications/default/prime-0.1.0.gemspec -%{gem_dir}/specifications/default/racc-1.4.16.pre.1.gemspec %{gem_dir}/specifications/default/reline-0.0.0.gemspec %{gem_dir}/specifications/default/rexml-3.1.9.gemspec %{gem_dir}/specifications/default/rss-0.2.8.gemspec @@ -1061,9 +1079,6 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %{gem_dir}/specifications/default/webrick-1.4.2.gemspec %{gem_dir}/specifications/default/zlib-1.0.0.gemspec -# TODO: Gemify racc -%{gem_dir}/gems/racc-1.4.16.pre.1 - %files -n rubygems-devel %{_rpmconfigdir}/macros.d/macros.rubygems %{_rpmconfigdir}/fileattrs/rubygems.attr @@ -1178,6 +1193,12 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %{_mandir}/man1/bundle*.1* %{_mandir}/man5/gemfile.5* +%files -n rubygem-racc +%{_bindir}/racc +%{_libdir}/gems/%{name}/racc-%{racc_version} +%{gem_dir}/gems/racc-%{racc_version} +%{gem_dir}/specifications/racc-%{racc_version}.gemspec + %changelog * Mon Jul 01 2019 Vít Ondruch - 2.7.0-1 - Upgrade to Ruby 2.7.0 (e44c9b1147). From 0f9a6af4335ac31af625ae9966c1bb8916a2096a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 3 Jul 2019 18:30:52 +0200 Subject: [PATCH 04/26] Add missing rubygem(racc) provide. --- ruby.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/ruby.spec b/ruby.spec index 82db342..a2a1aa6 100644 --- a/ruby.spec +++ b/ruby.spec @@ -524,6 +524,7 @@ Version: %{racc_version} License: MIT Requires: ruby(release) Requires: ruby(rubygems) >= %{rubygems_version} +Provides: rubygem(racc) = %{version}-%{release} %description -n rubygem-racc Racc is a LALR(1) parser generator. It is written in Ruby itself, and From e1f59277c4fcf1a166bcaf366decbd8bca8c2639 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 4 Jul 2019 14:16:25 +0200 Subject: [PATCH 05/26] Upgrade to Ruby 2.7.0 (d9f8b88b47). --- ...low-to-specify-additional-preludes-by-configuratio.patch | 2 +- ruby-2.1.0-Enable-configuration-of-archlibdir.patch | 4 ++-- ...event-duplicated-paths-when-empty-version-string-i.patch | 2 +- ruby-2.1.0-always-use-i386.patch | 2 +- ruby-2.1.0-custom-rubygems-location.patch | 4 ++-- ruby-2.2.3-Generate-preludes-using-miniruby.patch | 2 +- ruby-2.3.0-ruby_version.patch | 6 +++--- ruby.spec | 4 ++-- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch index 198c34c..86c3d1d 100644 --- a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch +++ b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch @@ -26,7 +26,7 @@ diff --git a/configure.ac b/configure.ac index 028ef7ca3e..cdeff87871 100644 --- a/configure.ac +++ b/configure.ac -@@ -3820,6 +3820,13 @@ AC_SUBST(rubyarchhdrdir)dnl +@@ -3824,6 +3824,13 @@ AC_SUBST(rubyarchhdrdir)dnl AC_SUBST(sitearchhdrdir)dnl AC_SUBST(vendorarchhdrdir)dnl diff --git a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch index 3300849..728c52d 100644 --- a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch +++ b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch @@ -11,7 +11,7 @@ diff --git a/configure.ac b/configure.ac index 11fc237552..b77e88fc37 100644 --- a/configure.ac +++ b/configure.ac -@@ -3037,6 +3037,11 @@ AS_IF([test ${multiarch+set}], [ +@@ -3041,6 +3041,11 @@ AS_IF([test ${multiarch+set}], [ ]) archlibdir='${libdir}/${arch}' @@ -24,5 +24,5 @@ index 11fc237552..b77e88fc37 100644 archincludedir='${includedir}/${arch}' sitearchincludedir='${includedir}/${sitearch}' -- -1.8.3.1 +2.22.0 diff --git a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch index a192018..faa71ec 100644 --- a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch +++ b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch @@ -14,7 +14,7 @@ diff --git a/configure.ac b/configure.ac index 999e2d6d5d..11fc237552 100644 --- a/configure.ac +++ b/configure.ac -@@ -3675,7 +3675,8 @@ AS_CASE(["$ruby_version_dir_name"], +@@ -3679,7 +3679,8 @@ AS_CASE(["$ruby_version_dir_name"], ruby_version_dir=/'${ruby_version_dir_name}' if test -z "${ruby_version_dir_name}"; then diff --git a/ruby-2.1.0-always-use-i386.patch b/ruby-2.1.0-always-use-i386.patch index 26d585f..3291e5c 100644 --- a/ruby-2.1.0-always-use-i386.patch +++ b/ruby-2.1.0-always-use-i386.patch @@ -11,7 +11,7 @@ diff --git a/configure.ac b/configure.ac index b77e88fc37..6bba453e3c 100644 --- a/configure.ac +++ b/configure.ac -@@ -3739,6 +3739,8 @@ AC_SUBST(vendorarchdir)dnl +@@ -3743,6 +3743,8 @@ AC_SUBST(vendorarchdir)dnl AC_SUBST(CONFIGURE, "`echo $0 | sed 's|.*/||'`")dnl AC_SUBST(configure_args, "`echo "${ac_configure_args}" | sed 's/\\$/$$/g'`")dnl diff --git a/ruby-2.1.0-custom-rubygems-location.patch b/ruby-2.1.0-custom-rubygems-location.patch index 0cebb2c..d46aa15 100644 --- a/ruby-2.1.0-custom-rubygems-location.patch +++ b/ruby-2.1.0-custom-rubygems-location.patch @@ -15,7 +15,7 @@ diff --git a/configure.ac b/configure.ac index 6bba453e3c..028ef7ca3e 100644 --- a/configure.ac +++ b/configure.ac -@@ -3711,6 +3711,10 @@ AC_ARG_WITH(vendorarchdir, +@@ -3715,6 +3715,10 @@ AC_ARG_WITH(vendorarchdir, [vendorarchdir=$withval], [vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby'${ruby_version_dir}}${multiarch-'${vendorlibdir}/${sitearch}'}]) @@ -26,7 +26,7 @@ index 6bba453e3c..028ef7ca3e 100644 AS_IF([test "${LOAD_RELATIVE+set}"], [ AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) RUBY_EXEC_PREFIX='' -@@ -3735,6 +3739,7 @@ AC_SUBST(sitearchdir)dnl +@@ -3739,6 +3743,7 @@ AC_SUBST(sitearchdir)dnl AC_SUBST(vendordir)dnl AC_SUBST(vendorlibdir)dnl AC_SUBST(vendorarchdir)dnl diff --git a/ruby-2.2.3-Generate-preludes-using-miniruby.patch b/ruby-2.2.3-Generate-preludes-using-miniruby.patch index e82c681..a85ba7c 100644 --- a/ruby-2.2.3-Generate-preludes-using-miniruby.patch +++ b/ruby-2.2.3-Generate-preludes-using-miniruby.patch @@ -11,7 +11,7 @@ diff --git a/common.mk b/common.mk index 168dc52..20c218a 100644 --- a/common.mk +++ b/common.mk -@@ -1059,9 +1059,9 @@ $(MINIPRELUDE_C): $(COMPILE_PRELUDE) +@@ -1058,9 +1058,9 @@ $(MINIPRELUDE_C): $(COMPILE_PRELUDE) $(srcdir)/template/prelude.c.tmpl $(PRELUDE_C): $(COMPILE_PRELUDE) \ diff --git a/ruby-2.3.0-ruby_version.patch b/ruby-2.3.0-ruby_version.patch index 3bd4ead..1bad1df 100644 --- a/ruby-2.3.0-ruby_version.patch +++ b/ruby-2.3.0-ruby_version.patch @@ -20,7 +20,7 @@ diff --git a/configure.ac b/configure.ac index 8ea969412f..a00f2b6776 100644 --- a/configure.ac +++ b/configure.ac -@@ -3626,9 +3626,6 @@ AS_CASE(["$target_os"], +@@ -3630,9 +3630,6 @@ AS_CASE(["$target_os"], rubyw_install_name='$(RUBYW_INSTALL_NAME)' ]) @@ -30,7 +30,7 @@ index 8ea969412f..a00f2b6776 100644 rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'} AC_ARG_WITH(rubyarchprefix, AS_HELP_STRING([--with-rubyarchprefix=DIR], -@@ -3651,56 +3648,62 @@ AC_ARG_WITH(ridir, +@@ -3655,56 +3652,62 @@ AC_ARG_WITH(ridir, AC_SUBST(ridir) AC_SUBST(RI_BASE_NAME) @@ -120,7 +120,7 @@ index 8ea969412f..a00f2b6776 100644 AS_IF([test "${LOAD_RELATIVE+set}"], [ AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) -@@ -3717,6 +3720,7 @@ AC_SUBST(sitearchincludedir)dnl +@@ -3721,6 +3724,7 @@ AC_SUBST(sitearchincludedir)dnl AC_SUBST(arch)dnl AC_SUBST(sitearch)dnl AC_SUBST(ruby_version)dnl diff --git a/ruby.spec b/ruby.spec index a2a1aa6..8cd4802 100644 --- a/ruby.spec +++ b/ruby.spec @@ -10,7 +10,7 @@ #%%global milestone rc2 # Keep the revision enabled for pre-releases from SVN. -%global revision e44c9b1147 +%global revision d9f8b88b47 %global ruby_archive %{name}-%{ruby_version} @@ -1202,7 +1202,7 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %changelog * Mon Jul 01 2019 Vít Ondruch - 2.7.0-1 -- Upgrade to Ruby 2.7.0 (e44c9b1147). +- Upgrade to Ruby 2.7.0 (d9f8b88b47). * Tue Jun 25 2019 Vít Ondruch - 2.6.3-121 - Properly support %%prerelease in %%gemspec_ macros. From 6a28dc0a424d1a7123d3c448838f402aa66415c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 4 Jul 2019 14:25:09 +0200 Subject: [PATCH 06/26] Avoid TestJIT#test_block_handler_with_possible_frame_omitted_inlining filure This fails just on s390x and arm arches. https://bugs.ruby-lang.org/issues/15986 --- ruby.spec | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ruby.spec b/ruby.spec index 8cd4802..c7c2e8d 100644 --- a/ruby.spec +++ b/ruby.spec @@ -850,6 +850,13 @@ DISABLE_TESTS="$DISABLE_TESTS -n !/test_segv_\(setproctitle\|test\|loaded_featur # https://bugs.ruby-lang.org/issues/14175 sed -i '/def test_mdns_each_address$/,/^ end$/ s/^/#/' test/resolv/test_mdns.rb +# Avoid TestJIT#test_block_handler_with_possible_frame_omitted_inlining filure +# on s390x and arm arches. +# https://bugs.ruby-lang.org/issues/15986 +%ifarch s390x %arm +DISABLE_TESTS="$DISABLE_TESTS -n !/test_block_handler_with_possible_frame_omitted_inlining/" +%endif + make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %files From 86f04f26d9d5f2f1447fbd96f62f1c5420f136af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 15 Jul 2019 16:48:49 +0200 Subject: [PATCH 07/26] Upgrade to Ruby 2.7.0 (0c6c937904). --- ...-additional-preludes-by-configuratio.patch | 2 +- ...0-Enable-configuration-of-archlibdir.patch | 2 +- ...ed-paths-when-empty-version-string-i.patch | 2 +- ruby-2.1.0-always-use-i386.patch | 2 +- ruby-2.1.0-custom-rubygems-location.patch | 6 ++--- ...2.3-Generate-preludes-using-miniruby.patch | 2 +- ruby-2.3.0-ruby_version.patch | 6 ++--- ruby.spec | 24 ++++++++++--------- 8 files changed, 24 insertions(+), 22 deletions(-) diff --git a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch index 86c3d1d..530efa9 100644 --- a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch +++ b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch @@ -26,7 +26,7 @@ diff --git a/configure.ac b/configure.ac index 028ef7ca3e..cdeff87871 100644 --- a/configure.ac +++ b/configure.ac -@@ -3824,6 +3824,13 @@ AC_SUBST(rubyarchhdrdir)dnl +@@ -3827,6 +3827,13 @@ AC_SUBST(rubyarchhdrdir)dnl AC_SUBST(sitearchhdrdir)dnl AC_SUBST(vendorarchhdrdir)dnl diff --git a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch index 728c52d..d46928a 100644 --- a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch +++ b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch @@ -11,7 +11,7 @@ diff --git a/configure.ac b/configure.ac index 11fc237552..b77e88fc37 100644 --- a/configure.ac +++ b/configure.ac -@@ -3041,6 +3041,11 @@ AS_IF([test ${multiarch+set}], [ +@@ -3044,6 +3044,11 @@ AS_IF([test ${multiarch+set}], [ ]) archlibdir='${libdir}/${arch}' diff --git a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch index faa71ec..6c6a968 100644 --- a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch +++ b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch @@ -14,7 +14,7 @@ diff --git a/configure.ac b/configure.ac index 999e2d6d5d..11fc237552 100644 --- a/configure.ac +++ b/configure.ac -@@ -3679,7 +3679,8 @@ AS_CASE(["$ruby_version_dir_name"], +@@ -3682,7 +3682,8 @@ AS_CASE(["$ruby_version_dir_name"], ruby_version_dir=/'${ruby_version_dir_name}' if test -z "${ruby_version_dir_name}"; then diff --git a/ruby-2.1.0-always-use-i386.patch b/ruby-2.1.0-always-use-i386.patch index 3291e5c..3d8a703 100644 --- a/ruby-2.1.0-always-use-i386.patch +++ b/ruby-2.1.0-always-use-i386.patch @@ -11,7 +11,7 @@ diff --git a/configure.ac b/configure.ac index b77e88fc37..6bba453e3c 100644 --- a/configure.ac +++ b/configure.ac -@@ -3743,6 +3743,8 @@ AC_SUBST(vendorarchdir)dnl +@@ -3746,6 +3746,8 @@ AC_SUBST(vendorarchdir)dnl AC_SUBST(CONFIGURE, "`echo $0 | sed 's|.*/||'`")dnl AC_SUBST(configure_args, "`echo "${ac_configure_args}" | sed 's/\\$/$$/g'`")dnl diff --git a/ruby-2.1.0-custom-rubygems-location.patch b/ruby-2.1.0-custom-rubygems-location.patch index d46aa15..c33a772 100644 --- a/ruby-2.1.0-custom-rubygems-location.patch +++ b/ruby-2.1.0-custom-rubygems-location.patch @@ -15,7 +15,7 @@ diff --git a/configure.ac b/configure.ac index 6bba453e3c..028ef7ca3e 100644 --- a/configure.ac +++ b/configure.ac -@@ -3715,6 +3715,10 @@ AC_ARG_WITH(vendorarchdir, +@@ -3718,6 +3718,10 @@ AC_ARG_WITH(vendorarchdir, [vendorarchdir=$withval], [vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby'${ruby_version_dir}}${multiarch-'${vendorlibdir}/${sitearch}'}]) @@ -26,7 +26,7 @@ index 6bba453e3c..028ef7ca3e 100644 AS_IF([test "${LOAD_RELATIVE+set}"], [ AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) RUBY_EXEC_PREFIX='' -@@ -3739,6 +3743,7 @@ AC_SUBST(sitearchdir)dnl +@@ -3742,6 +3746,7 @@ AC_SUBST(sitearchdir)dnl AC_SUBST(vendordir)dnl AC_SUBST(vendorlibdir)dnl AC_SUBST(vendorarchdir)dnl @@ -75,7 +75,7 @@ index b47b6e1..0b99408 100755 mandir = CONFIG["mandir", true] docdir = CONFIG["docdir", true] enable_shared = CONFIG["ENABLE_SHARED"] == 'yes' -@@ -564,7 +565,16 @@ def stub +@@ -565,7 +566,16 @@ def stub install?(:local, :comm, :lib) do prepare "library scripts", rubylibdir noinst = %w[*.txt *.rdoc *.gemspec] diff --git a/ruby-2.2.3-Generate-preludes-using-miniruby.patch b/ruby-2.2.3-Generate-preludes-using-miniruby.patch index a85ba7c..fb58a90 100644 --- a/ruby-2.2.3-Generate-preludes-using-miniruby.patch +++ b/ruby-2.2.3-Generate-preludes-using-miniruby.patch @@ -11,7 +11,7 @@ diff --git a/common.mk b/common.mk index 168dc52..20c218a 100644 --- a/common.mk +++ b/common.mk -@@ -1058,9 +1058,9 @@ $(MINIPRELUDE_C): $(COMPILE_PRELUDE) +@@ -1065,9 +1065,9 @@ $(MINIPRELUDE_C): $(COMPILE_PRELUDE) $(srcdir)/template/prelude.c.tmpl $(PRELUDE_C): $(COMPILE_PRELUDE) \ diff --git a/ruby-2.3.0-ruby_version.patch b/ruby-2.3.0-ruby_version.patch index 1bad1df..c687edf 100644 --- a/ruby-2.3.0-ruby_version.patch +++ b/ruby-2.3.0-ruby_version.patch @@ -20,7 +20,7 @@ diff --git a/configure.ac b/configure.ac index 8ea969412f..a00f2b6776 100644 --- a/configure.ac +++ b/configure.ac -@@ -3630,9 +3630,6 @@ AS_CASE(["$target_os"], +@@ -3633,9 +3633,6 @@ AS_CASE(["$target_os"], rubyw_install_name='$(RUBYW_INSTALL_NAME)' ]) @@ -30,7 +30,7 @@ index 8ea969412f..a00f2b6776 100644 rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'} AC_ARG_WITH(rubyarchprefix, AS_HELP_STRING([--with-rubyarchprefix=DIR], -@@ -3655,56 +3652,62 @@ AC_ARG_WITH(ridir, +@@ -3658,56 +3655,62 @@ AC_ARG_WITH(ridir, AC_SUBST(ridir) AC_SUBST(RI_BASE_NAME) @@ -120,7 +120,7 @@ index 8ea969412f..a00f2b6776 100644 AS_IF([test "${LOAD_RELATIVE+set}"], [ AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) -@@ -3721,6 +3724,7 @@ AC_SUBST(sitearchincludedir)dnl +@@ -3724,6 +3727,7 @@ AC_SUBST(sitearchincludedir)dnl AC_SUBST(arch)dnl AC_SUBST(sitearch)dnl AC_SUBST(ruby_version)dnl diff --git a/ruby.spec b/ruby.spec index c7c2e8d..be00f79 100644 --- a/ruby.spec +++ b/ruby.spec @@ -10,7 +10,7 @@ #%%global milestone rc2 # Keep the revision enabled for pre-releases from SVN. -%global revision d9f8b88b47 +%global revision 0c6c937904 %global ruby_archive %{name}-%{ruby_version} @@ -45,7 +45,7 @@ %global bigdecimal_version 1.4.2 %global did_you_mean_version 1.3.0 %global io_console_version 0.4.7 -%global irb_version 1.1.0.pre.1 +%global irb_version 1.1.0.pre.2 %global json_version 2.2.0 %global minitest_version 5.11.3 %global net_telnet_version 0.2.0 @@ -54,7 +54,7 @@ %global psych_version 3.1.0 %global racc_version 1.4.16.pre.1 %global rake_version 12.3.2 -%global rdoc_version 6.1.0 +%global rdoc_version 6.1.1 %global test_unit_version 3.3.3 %global xmlrpc_version 0.3.0 @@ -850,11 +850,11 @@ DISABLE_TESTS="$DISABLE_TESTS -n !/test_segv_\(setproctitle\|test\|loaded_featur # https://bugs.ruby-lang.org/issues/14175 sed -i '/def test_mdns_each_address$/,/^ end$/ s/^/#/' test/resolv/test_mdns.rb -# Avoid TestJIT#test_block_handler_with_possible_frame_omitted_inlining filure -# on s390x and arm arches. -# https://bugs.ruby-lang.org/issues/15986 -%ifarch s390x %arm -DISABLE_TESTS="$DISABLE_TESTS -n !/test_block_handler_with_possible_frame_omitted_inlining/" +# Disable "Process.clock_getres matches the clock in practice for +# Process::CLOCK_{PROCESS,THREAD}_CPUTIME_ID" failing spec on arm. +# https://bugs.ruby-lang.org/issues/16007 +%ifarch %arm +MSPECOPTS="$MSPECOPTS -P 'Process.clock_getres matches the clock in practice for Process::CLOCK'" %endif make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" @@ -913,6 +913,7 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %{ruby_libdir}/fiddle %{ruby_libdir}/fileutils %{ruby_libdir}/forwardable +%{ruby_libdir}/logger %{ruby_libdir}/matrix %{ruby_libdir}/net %{ruby_libdir}/optparse @@ -978,6 +979,7 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %{ruby_libarchdir}/enc/shift_jis.so %dir %{ruby_libarchdir}/enc/trans %{ruby_libarchdir}/enc/trans/big5.so +%{ruby_libarchdir}/enc/trans/cesu_8.so %{ruby_libarchdir}/enc/trans/chinese.so %{ruby_libarchdir}/enc/trans/ebcdic.so %{ruby_libarchdir}/enc/trans/emoji.so @@ -1057,7 +1059,7 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" # 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/csv-3.1.1.gemspec %{gem_dir}/specifications/default/date-2.0.0.gemspec %{gem_dir}/specifications/default/dbm-1.0.0.gemspec %{gem_dir}/specifications/default/e2mmap-0.1.0.gemspec @@ -1073,7 +1075,7 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %{gem_dir}/specifications/default/mutex_m-0.1.0.gemspec %{gem_dir}/specifications/default/ostruct-0.1.0.gemspec %{gem_dir}/specifications/default/prime-0.1.0.gemspec -%{gem_dir}/specifications/default/reline-0.0.0.gemspec +%{gem_dir}/specifications/default/reline-0.0.1.gemspec %{gem_dir}/specifications/default/rexml-3.1.9.gemspec %{gem_dir}/specifications/default/rss-0.2.8.gemspec %{gem_dir}/specifications/default/scanf-1.0.0.gemspec @@ -1209,7 +1211,7 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %changelog * Mon Jul 01 2019 Vít Ondruch - 2.7.0-1 -- Upgrade to Ruby 2.7.0 (d9f8b88b47). +- Upgrade to Ruby 2.7.0 (0c6c937904). * Tue Jun 25 2019 Vít Ondruch - 2.6.3-121 - Properly support %%prerelease in %%gemspec_ macros. From b03757c3a262bcf4629c3de853bb21945fc2ee07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 16 Jul 2019 13:48:13 +0200 Subject: [PATCH 08/26] Drop useless %{rubygems_default_filter}. Shortly after introduction of this macro, the F20 was adjusted to ignore .so files provided by gems. The rhbz#1020810 was requesting to adjust the macro, but it will be better to drop it entirely, because no other usage for this macro was discovered in past 5 years. --- macros.rubygems | 10 ---------- ruby.spec | 1 + 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/macros.rubygems b/macros.rubygems index 2552780..b55a402 100644 --- a/macros.rubygems +++ b/macros.rubygems @@ -32,16 +32,6 @@ gem install \\\ %{nil} -# For rubygems packages we want to filter out any provides caused by private -# libs in %%{gem_archdir}. -# -# Note that this must be invoked in the spec file, preferably as -# "%{?rubygems_default_filter}", before any %description block. -%rubygems_default_filter %{expand: \ -%global __provides_exclude_from %{?__provides_exclude_from:%{__provides_exclude_from}|}^%{gem_extdir_mri}/.*\\\\.so$ \ -} - - # The 'read' command in %%gemspec_* macros is not essential, but it is usefull # to make the sript appear in build log. diff --git a/ruby.spec b/ruby.spec index be00f79..a155812 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1212,6 +1212,7 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %changelog * Mon Jul 01 2019 Vít Ondruch - 2.7.0-1 - Upgrade to Ruby 2.7.0 (0c6c937904). +- Drop useless %%{rubygems_default_filter}. * Tue Jun 25 2019 Vít Ondruch - 2.6.3-121 - Properly support %%prerelease in %%gemspec_ macros. From 298c4cdda70b3d7bbb83bcdda9e199640c1dfc4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 4 Sep 2019 11:46:44 +0200 Subject: [PATCH 09/26] Fix checksec 2.0+ compatibility. --- ruby.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index a155812..1eef6e9 100644 --- a/ruby.spec +++ b/ruby.spec @@ -773,7 +773,7 @@ rm -f %{buildroot}%{gem_dir}/gems/rake-%{rake_version}/.gitignore %check %if 0%{?with_hardening_test} # Check Ruby hardening. -checksec -f libruby.so.%{ruby_version} | \ +checksec --file=libruby.so.%{ruby_version} | \ grep "Full RELRO.*Canary found.*NX enabled.*DSO.*No RPATH.*No RUNPATH.*Yes.*\d*.*\d*.*libruby.so.%{ruby_version}" %endif @@ -1213,6 +1213,7 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" * Mon Jul 01 2019 Vít Ondruch - 2.7.0-1 - Upgrade to Ruby 2.7.0 (0c6c937904). - Drop useless %%{rubygems_default_filter}. +- Fix checksec 2.0+ compatibility. * Tue Jun 25 2019 Vít Ondruch - 2.6.3-121 - Properly support %%prerelease in %%gemspec_ macros. From 1fd79419f37524778fe0d43098fe1b35b1b64c98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 4 Sep 2019 11:47:36 +0200 Subject: [PATCH 10/26] Upgrade to Ruby 2.7.0 (36a0c668b6). --- ...-additional-preludes-by-configuratio.patch | 8 ++-- ...0-Enable-configuration-of-archlibdir.patch | 4 +- ...ed-paths-when-empty-version-string-i.patch | 4 +- ruby-2.1.0-always-use-i386.patch | 4 +- ruby-2.1.0-custom-rubygems-location.patch | 6 +-- ruby-2.3.0-ruby_version.patch | 42 ++++++++----------- ruby-2.7.0-Remove-RubyGems-dependency.patch | 32 ++++++++++++++ ruby.spec | 24 ++++++----- 8 files changed, 76 insertions(+), 48 deletions(-) create mode 100644 ruby-2.7.0-Remove-RubyGems-dependency.patch diff --git a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch index 530efa9..4b3b431 100644 --- a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch +++ b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch @@ -26,7 +26,7 @@ diff --git a/configure.ac b/configure.ac index 028ef7ca3e..cdeff87871 100644 --- a/configure.ac +++ b/configure.ac -@@ -3827,6 +3827,13 @@ AC_SUBST(rubyarchhdrdir)dnl +@@ -3846,6 +3846,13 @@ AC_SUBST(rubyarchhdrdir)dnl AC_SUBST(sitearchhdrdir)dnl AC_SUBST(vendorarchhdrdir)dnl @@ -41,12 +41,12 @@ index 028ef7ca3e..cdeff87871 100644 AS_HELP_STRING([--with-mantype=TYPE], [specify man page type; TYPE is one of man and doc]), [ diff --git a/template/Makefile.in b/template/Makefile.in -index 110071de6a..a83500b5af 100644 +index d7e139c6d4..a0171afdcc 100644 --- a/template/Makefile.in +++ b/template/Makefile.in -@@ -155,6 +155,8 @@ BOOTSTRAPRUBY = @BOOTSTRAPRUBY@ - COROUTINE_H = @X_FIBER_COROUTINE_H@ +@@ -156,6 +156,8 @@ COROUTINE_H = @X_COROUTINE_H@ COROUTINE_OBJ = $(COROUTINE_H:.h=.@OBJEXT@) + COROUTINE_SRC = @X_COROUTINE_SRC@ +OPTIONAL_PRELUDES = @OPTIONAL_PRELUDES@ + diff --git a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch index d46928a..7d58d96 100644 --- a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch +++ b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch @@ -8,10 +8,10 @@ Subject: [PATCH] Allow to configure libruby.so placement. 1 file changed, 5 insertions(+) diff --git a/configure.ac b/configure.ac -index 11fc237552..b77e88fc37 100644 +index d261ea57b5..3c13076b82 100644 --- a/configure.ac +++ b/configure.ac -@@ -3044,6 +3044,11 @@ AS_IF([test ${multiarch+set}], [ +@@ -3063,6 +3063,11 @@ AS_IF([test ${multiarch+set}], [ ]) archlibdir='${libdir}/${arch}' diff --git a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch index 6c6a968..432564b 100644 --- a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch +++ b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch @@ -11,10 +11,10 @@ Subject: [PATCH] Prevent duplicated paths when empty version string is 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac -index 999e2d6d5d..11fc237552 100644 +index c42436c23d..d261ea57b5 100644 --- a/configure.ac +++ b/configure.ac -@@ -3682,7 +3682,8 @@ AS_CASE(["$ruby_version_dir_name"], +@@ -3701,7 +3701,8 @@ AS_CASE(["$ruby_version_dir_name"], ruby_version_dir=/'${ruby_version_dir_name}' if test -z "${ruby_version_dir_name}"; then diff --git a/ruby-2.1.0-always-use-i386.patch b/ruby-2.1.0-always-use-i386.patch index 3d8a703..18514e5 100644 --- a/ruby-2.1.0-always-use-i386.patch +++ b/ruby-2.1.0-always-use-i386.patch @@ -8,10 +8,10 @@ Subject: [PATCH] Always use i386. 1 file changed, 2 insertions(+) diff --git a/configure.ac b/configure.ac -index b77e88fc37..6bba453e3c 100644 +index 3c13076b82..93af30321d 100644 --- a/configure.ac +++ b/configure.ac -@@ -3746,6 +3746,8 @@ AC_SUBST(vendorarchdir)dnl +@@ -3765,6 +3765,8 @@ AC_SUBST(vendorarchdir)dnl AC_SUBST(CONFIGURE, "`echo $0 | sed 's|.*/||'`")dnl AC_SUBST(configure_args, "`echo "${ac_configure_args}" | sed 's/\\$/$$/g'`")dnl diff --git a/ruby-2.1.0-custom-rubygems-location.patch b/ruby-2.1.0-custom-rubygems-location.patch index c33a772..0d1050a 100644 --- a/ruby-2.1.0-custom-rubygems-location.patch +++ b/ruby-2.1.0-custom-rubygems-location.patch @@ -12,10 +12,10 @@ Subject: [PATCH] Allow to install RubyGems into custom location, outside of 4 files changed, 22 insertions(+) diff --git a/configure.ac b/configure.ac -index 6bba453e3c..028ef7ca3e 100644 +index 93af30321d..bc13397e0e 100644 --- a/configure.ac +++ b/configure.ac -@@ -3718,6 +3718,10 @@ AC_ARG_WITH(vendorarchdir, +@@ -3737,6 +3737,10 @@ AC_ARG_WITH(vendorarchdir, [vendorarchdir=$withval], [vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby'${ruby_version_dir}}${multiarch-'${vendorlibdir}/${sitearch}'}]) @@ -26,7 +26,7 @@ index 6bba453e3c..028ef7ca3e 100644 AS_IF([test "${LOAD_RELATIVE+set}"], [ AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) RUBY_EXEC_PREFIX='' -@@ -3742,6 +3746,7 @@ AC_SUBST(sitearchdir)dnl +@@ -3761,6 +3765,7 @@ AC_SUBST(sitearchdir)dnl AC_SUBST(vendordir)dnl AC_SUBST(vendorlibdir)dnl AC_SUBST(vendorarchdir)dnl diff --git a/ruby-2.3.0-ruby_version.patch b/ruby-2.3.0-ruby_version.patch index c687edf..8f81c2a 100644 --- a/ruby-2.3.0-ruby_version.patch +++ b/ruby-2.3.0-ruby_version.patch @@ -17,10 +17,10 @@ string. 2 files changed, 35 insertions(+), 30 deletions(-) diff --git a/configure.ac b/configure.ac -index 8ea969412f..a00f2b6776 100644 +index 80b137e380..63cd3b4f8b 100644 --- a/configure.ac +++ b/configure.ac -@@ -3633,9 +3633,6 @@ AS_CASE(["$target_os"], +@@ -3652,9 +3652,6 @@ AS_CASE(["$target_os"], rubyw_install_name='$(RUBYW_INSTALL_NAME)' ]) @@ -30,7 +30,7 @@ index 8ea969412f..a00f2b6776 100644 rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'} AC_ARG_WITH(rubyarchprefix, AS_HELP_STRING([--with-rubyarchprefix=DIR], -@@ -3658,56 +3655,62 @@ AC_ARG_WITH(ridir, +@@ -3677,56 +3674,62 @@ AC_ARG_WITH(ridir, AC_SUBST(ridir) AC_SUBST(RI_BASE_NAME) @@ -120,7 +120,7 @@ index 8ea969412f..a00f2b6776 100644 AS_IF([test "${LOAD_RELATIVE+set}"], [ AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) -@@ -3724,6 +3727,7 @@ AC_SUBST(sitearchincludedir)dnl +@@ -3743,6 +3746,7 @@ AC_SUBST(sitearchincludedir)dnl AC_SUBST(arch)dnl AC_SUBST(sitearch)dnl AC_SUBST(ruby_version)dnl @@ -181,48 +181,40 @@ index d4c110e..d39c9a6 100755 install_recursive($rdocdir, ridatadir, :no_install => rdoc_noinst, :mode => $data_mode) end -- -2.1.0 +2.23.0 -From f8d136f9a46d1fe87eba622ab9665935d05e981b Mon Sep 17 00:00:00 2001 +From 9f0ec0233f618cbb862629816b22491c3df79578 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 31 Mar 2015 16:37:44 +0200 Subject: [PATCH 3/4] Add ruby_version_dir_name support for RubyGems. --- - lib/rubygems/defaults.rb | 11 ++++++----- - test/rubygems/test_gem.rb | 5 +++-- - 2 files changed, 9 insertions(+), 7 deletions(-) + lib/rubygems/defaults.rb | 9 +++++---- + test/rubygems/test_gem.rb | 5 +++-- + 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/rubygems/defaults.rb b/lib/rubygems/defaults.rb -index 55ca080..75eea2b 100644 +index d4ff4a262c..3f9a5bf590 100644 --- a/lib/rubygems/defaults.rb +++ b/lib/rubygems/defaults.rb -@@ -32,20 +32,20 @@ def self.default_dir +@@ -32,13 +32,13 @@ def self.default_dir [ File.dirname(RbConfig::CONFIG['sitedir']), 'Gems', - RbConfig::CONFIG['ruby_version'] + RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version'] ] - elsif RbConfig::CONFIG['rubylibprefix'] + else [ RbConfig::CONFIG['rubylibprefix'], 'gems', - RbConfig::CONFIG['ruby_version'] -+ RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version'] - ] - else - [ - RbConfig::CONFIG['libdir'], - ruby_engine, - 'gems', -- RbConfig::CONFIG['ruby_version'] + RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version'] ] end -@@ -75,7 +75,8 @@ def self.default_rubygems_dirs +@@ -75,7 +75,8 @@ def self.default_specifications_dir def self.user_dir parts = [Gem.user_home, '.gem', ruby_engine] @@ -232,7 +224,7 @@ index 55ca080..75eea2b 100644 File.join parts end -@@ -165,7 +166,7 @@ def self.vendor_dir # :nodoc: +@@ -158,7 +159,7 @@ def self.vendor_dir # :nodoc: return nil unless RbConfig::CONFIG.key? 'vendordir' File.join RbConfig::CONFIG['vendordir'], 'gems', @@ -242,10 +234,10 @@ index 55ca080..75eea2b 100644 ## diff --git a/test/rubygems/test_gem.rb b/test/rubygems/test_gem.rb -index 0428bea..b6e090e 100644 +index b25068405d..e9fef4a311 100644 --- a/test/rubygems/test_gem.rb +++ b/test/rubygems/test_gem.rb -@@ -1279,7 +1279,8 @@ def test_self_use_paths +@@ -1315,7 +1315,8 @@ def test_self_use_paths def test_self_user_dir parts = [@userhome, '.gem', Gem.ruby_engine] @@ -255,7 +247,7 @@ index 0428bea..b6e090e 100644 assert_equal File.join(parts), Gem.user_dir end -@@ -1355,7 +1356,7 @@ def test_self_vendor_dir +@@ -1391,7 +1392,7 @@ def test_self_vendor_dir vendordir(File.join(@tempdir, 'vendor')) do expected = File.join RbConfig::CONFIG['vendordir'], 'gems', diff --git a/ruby-2.7.0-Remove-RubyGems-dependency.patch b/ruby-2.7.0-Remove-RubyGems-dependency.patch new file mode 100644 index 0000000..525bb07 --- /dev/null +++ b/ruby-2.7.0-Remove-RubyGems-dependency.patch @@ -0,0 +1,32 @@ +From 6532dbecf36d1f24dab1f2143afd171e0b7699eb Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Wed, 4 Sep 2019 15:07:07 +0200 +Subject: [PATCH] Remove RubyGems dependency. + +Since `Process::RLIMIT_NOFILE` is platform specific, better to use Ruby +introspection than detecting platform. +--- + lib/net/http/persistent.rb | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb b/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +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 Net::HTTP::Persistent + ## + # The default connection pool size is 1/4 the allowed open files. + +- if Gem.win_platform? then +- DEFAULT_POOL_SIZE = 256 +- else ++ if Process.const_defined? :RLIMIT_NOFILE + DEFAULT_POOL_SIZE = Process.getrlimit(Process::RLIMIT_NOFILE).first / 4 ++ else ++ DEFAULT_POOL_SIZE = 256 + end + + ## +-- +2.23.0 + diff --git a/ruby.spec b/ruby.spec index 1eef6e9..1aa9cf4 100644 --- a/ruby.spec +++ b/ruby.spec @@ -10,7 +10,7 @@ #%%global milestone rc2 # Keep the revision enabled for pre-releases from SVN. -%global revision 0c6c937904 +%global revision 36a0c668b6 %global ruby_archive %{name}-%{ruby_version} @@ -39,22 +39,22 @@ # version (if it's going to be bundled). %global bundler_fileutils_version 1.2.0 %global bundler_molinillo_version 0.6.6 -%global bundler_net_http_persistent_version 2.9.4 +%global bundler_net_http_persistent_version 3.1.0 %global bundler_thor_version 0.20.3 %global bigdecimal_version 1.4.2 %global did_you_mean_version 1.3.0 -%global io_console_version 0.4.7 -%global irb_version 1.1.0.pre.2 +%global io_console_version 0.4.9 +%global irb_version 1.1.0.pre.3 %global json_version 2.2.0 %global minitest_version 5.11.3 %global net_telnet_version 0.2.0 %global openssl_version 2.1.2 -%global power_assert_version 1.1.4 +%global power_assert_version 1.1.5 %global psych_version 3.1.0 %global racc_version 1.4.16.pre.1 -%global rake_version 12.3.2 -%global rdoc_version 6.1.1 +%global rake_version 12.3.3 +%global rdoc_version 6.2.0 %global test_unit_version 3.3.3 %global xmlrpc_version 0.3.0 @@ -141,6 +141,9 @@ Patch7: ruby-2.2.3-Generate-preludes-using-miniruby.patch # 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 +# Revert commit which breaks bundled net-http-persistent version check. +# https://github.com/drbrain/net-http-persistent/pull/109 +Patch10: ruby-2.7.0-Remove-RubyGems-dependency.patch # Add support for .include directive used by OpenSSL config files. # https://github.com/ruby/openssl/pull/216 @@ -547,6 +550,7 @@ rm -rf ext/fiddle/libffi* %patch6 -p1 %patch7 -p1 %patch9 -p1 +%patch10 -p1 %patch22 -p1 # Provide an example of usage of the tapset: @@ -1075,8 +1079,8 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %{gem_dir}/specifications/default/mutex_m-0.1.0.gemspec %{gem_dir}/specifications/default/ostruct-0.1.0.gemspec %{gem_dir}/specifications/default/prime-0.1.0.gemspec -%{gem_dir}/specifications/default/reline-0.0.1.gemspec -%{gem_dir}/specifications/default/rexml-3.1.9.gemspec +%{gem_dir}/specifications/default/reline-0.0.2.gemspec +%{gem_dir}/specifications/default/rexml-3.2.2.gemspec %{gem_dir}/specifications/default/rss-0.2.8.gemspec %{gem_dir}/specifications/default/scanf-1.0.0.gemspec %{gem_dir}/specifications/default/sdbm-1.0.0.gemspec @@ -1211,7 +1215,7 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %changelog * Mon Jul 01 2019 Vít Ondruch - 2.7.0-1 -- Upgrade to Ruby 2.7.0 (0c6c937904). +- Upgrade to Ruby 2.7.0 (36a0c668b6). - Drop useless %%{rubygems_default_filter}. - Fix checksec 2.0+ compatibility. From 01da43c221a133153e759b974c817a1694233d3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 4 Sep 2019 15:27:23 +0200 Subject: [PATCH 11/26] Remove obsolete comment about FileUtils version. The comment does not apply since 58a27c6cd997b83932efa13a87920883bfbfe119. --- ruby.spec | 3 --- 1 file changed, 3 deletions(-) diff --git a/ruby.spec b/ruby.spec index 1aa9cf4..9768f25 100644 --- a/ruby.spec +++ b/ruby.spec @@ -34,9 +34,6 @@ %global rubygems_molinillo_version 0.5.7 %global bundler_version 2.1.0.pre.1 -# FileUtils had not used to have separate versioning from Ruby :/ Lets use -# date of bundling for now. The gemified version of FileUtils has already proper -# version (if it's going to be bundled). %global bundler_fileutils_version 1.2.0 %global bundler_molinillo_version 0.6.6 %global bundler_net_http_persistent_version 3.1.0 From ac9df35198f6ce794d0658e0bfebddb410e74150 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 4 Sep 2019 15:39:20 +0200 Subject: [PATCH 12/26] Add bundled(connection_pool) provide and check version check. --- ruby.spec | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ruby.spec b/ruby.spec index 9768f25..f5af853 100644 --- a/ruby.spec +++ b/ruby.spec @@ -34,6 +34,7 @@ %global rubygems_molinillo_version 0.5.7 %global bundler_version 2.1.0.pre.1 +%global bundler_connection_pool_version 2.2.2 %global bundler_fileutils_version 1.2.0 %global bundler_molinillo_version 0.6.6 %global bundler_net_http_persistent_version 3.1.0 @@ -507,6 +508,7 @@ Requires: ruby(rubygems) >= %{rubygems_version} Requires: rubygem(io-console) Provides: rubygem(bundler) = %{version}-%{release} # https://github.com/bundler/bundler/issues/3647 +Provides: bundled(connection_pool) = %{bundler_connection_pool_version} Provides: bundled(rubygem-fileutils) = %{bundler_fileutils_version} Provides: bundled(rubygem-molinillo) = %{bundler_molinillo_version} Provides: bundled(rubygem-net-http-persisntent) = %{bundler_net_http_persistent_version} @@ -792,6 +794,13 @@ checksec --file=libruby.so.%{ruby_version} | \ # Check Bundler bundled dependencies versions. +# connection_pool. +[ "`make runruby TESTRUN_SCRIPT=\"-e \\\" \ + module Bundler; end; \ + require 'bundler/vendor/connection_pool/lib/connection_pool/version'; \ + puts Bundler::ConnectionPool::VERSION\\\"\" | tail -1`" \ + == '%{bundler_connection_pool_version}' ] + # FileUtils. [ "`make runruby TESTRUN_SCRIPT=\"-e \\\" \ module Bundler; end; \ From 55a4aeae8f2e50a7d9efd3067f39509b04233bc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 16 Sep 2019 14:24:00 +0200 Subject: [PATCH 13/26] Upgrade to Ruby 2.7.0 (4a403e3f98). --- ...pecify-additional-preludes-by-configuratio.patch | 2 +- ruby-2.1.0-Enable-configuration-of-archlibdir.patch | 2 +- ...plicated-paths-when-empty-version-string-i.patch | 2 +- ruby-2.1.0-always-use-i386.patch | 2 +- ruby-2.1.0-custom-rubygems-location.patch | 4 ++-- ruby-2.3.0-ruby_version.patch | 6 +++--- ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch | 13 ++++++++++--- ruby-2.7.0-Remove-RubyGems-dependency.patch | 4 ++-- ruby.spec | 4 ++-- 9 files changed, 23 insertions(+), 16 deletions(-) diff --git a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch index 4b3b431..a40c037 100644 --- a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch +++ b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch @@ -26,7 +26,7 @@ diff --git a/configure.ac b/configure.ac index 028ef7ca3e..cdeff87871 100644 --- a/configure.ac +++ b/configure.ac -@@ -3846,6 +3846,13 @@ AC_SUBST(rubyarchhdrdir)dnl +@@ -3865,6 +3865,13 @@ AC_SUBST(rubyarchhdrdir)dnl AC_SUBST(sitearchhdrdir)dnl AC_SUBST(vendorarchhdrdir)dnl diff --git a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch index 7d58d96..0e428a4 100644 --- a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch +++ b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch @@ -11,7 +11,7 @@ diff --git a/configure.ac b/configure.ac index d261ea57b5..3c13076b82 100644 --- a/configure.ac +++ b/configure.ac -@@ -3063,6 +3063,11 @@ AS_IF([test ${multiarch+set}], [ +@@ -3082,6 +3082,11 @@ AS_IF([test ${multiarch+set}], [ ]) archlibdir='${libdir}/${arch}' diff --git a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch index 432564b..c684103 100644 --- a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch +++ b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch @@ -14,7 +14,7 @@ diff --git a/configure.ac b/configure.ac index c42436c23d..d261ea57b5 100644 --- a/configure.ac +++ b/configure.ac -@@ -3701,7 +3701,8 @@ AS_CASE(["$ruby_version_dir_name"], +@@ -3720,7 +3720,8 @@ AS_CASE(["$ruby_version_dir_name"], ruby_version_dir=/'${ruby_version_dir_name}' if test -z "${ruby_version_dir_name}"; then diff --git a/ruby-2.1.0-always-use-i386.patch b/ruby-2.1.0-always-use-i386.patch index 18514e5..79f7cb0 100644 --- a/ruby-2.1.0-always-use-i386.patch +++ b/ruby-2.1.0-always-use-i386.patch @@ -11,7 +11,7 @@ diff --git a/configure.ac b/configure.ac index 3c13076b82..93af30321d 100644 --- a/configure.ac +++ b/configure.ac -@@ -3765,6 +3765,8 @@ AC_SUBST(vendorarchdir)dnl +@@ -3784,6 +3784,8 @@ AC_SUBST(vendorarchdir)dnl AC_SUBST(CONFIGURE, "`echo $0 | sed 's|.*/||'`")dnl AC_SUBST(configure_args, "`echo "${ac_configure_args}" | sed 's/\\$/$$/g'`")dnl diff --git a/ruby-2.1.0-custom-rubygems-location.patch b/ruby-2.1.0-custom-rubygems-location.patch index 0d1050a..fc7084d 100644 --- a/ruby-2.1.0-custom-rubygems-location.patch +++ b/ruby-2.1.0-custom-rubygems-location.patch @@ -15,7 +15,7 @@ diff --git a/configure.ac b/configure.ac index 93af30321d..bc13397e0e 100644 --- a/configure.ac +++ b/configure.ac -@@ -3737,6 +3737,10 @@ AC_ARG_WITH(vendorarchdir, +@@ -3756,6 +3756,10 @@ AC_ARG_WITH(vendorarchdir, [vendorarchdir=$withval], [vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby'${ruby_version_dir}}${multiarch-'${vendorlibdir}/${sitearch}'}]) @@ -26,7 +26,7 @@ index 93af30321d..bc13397e0e 100644 AS_IF([test "${LOAD_RELATIVE+set}"], [ AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) RUBY_EXEC_PREFIX='' -@@ -3761,6 +3765,7 @@ AC_SUBST(sitearchdir)dnl +@@ -3780,6 +3784,7 @@ AC_SUBST(sitearchdir)dnl AC_SUBST(vendordir)dnl AC_SUBST(vendorlibdir)dnl AC_SUBST(vendorarchdir)dnl diff --git a/ruby-2.3.0-ruby_version.patch b/ruby-2.3.0-ruby_version.patch index 8f81c2a..3f86dc2 100644 --- a/ruby-2.3.0-ruby_version.patch +++ b/ruby-2.3.0-ruby_version.patch @@ -20,7 +20,7 @@ diff --git a/configure.ac b/configure.ac index 80b137e380..63cd3b4f8b 100644 --- a/configure.ac +++ b/configure.ac -@@ -3652,9 +3652,6 @@ AS_CASE(["$target_os"], +@@ -3671,9 +3671,6 @@ AS_CASE(["$target_os"], rubyw_install_name='$(RUBYW_INSTALL_NAME)' ]) @@ -30,7 +30,7 @@ index 80b137e380..63cd3b4f8b 100644 rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'} AC_ARG_WITH(rubyarchprefix, AS_HELP_STRING([--with-rubyarchprefix=DIR], -@@ -3677,56 +3674,62 @@ AC_ARG_WITH(ridir, +@@ -3696,56 +3693,62 @@ AC_ARG_WITH(ridir, AC_SUBST(ridir) AC_SUBST(RI_BASE_NAME) @@ -120,7 +120,7 @@ index 80b137e380..63cd3b4f8b 100644 AS_IF([test "${LOAD_RELATIVE+set}"], [ AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) -@@ -3743,6 +3746,7 @@ AC_SUBST(sitearchincludedir)dnl +@@ -3762,6 +3765,7 @@ AC_SUBST(sitearchincludedir)dnl AC_SUBST(arch)dnl AC_SUBST(sitearch)dnl AC_SUBST(ruby_version)dnl 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 index 1e6f83f..7aa68d0 100644 --- a/ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch +++ b/ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch @@ -8,14 +8,14 @@ on Red Hat platforms. This workaround rhbz#1361037 --- - test/fiddle/helper.rb | 89 ------------------------------------------- - 1 file changed, 89 deletions(-) + test/fiddle/helper.rb | 96 ------------------------------------------- + 1 file changed, 96 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 @@ +@@ -6,102 +6,6 @@ libc_so = libm_so = nil @@ -23,6 +23,13 @@ index 1da3d93..65148a1 100644 -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 [0].pack('L!').size diff --git a/ruby-2.7.0-Remove-RubyGems-dependency.patch b/ruby-2.7.0-Remove-RubyGems-dependency.patch index 525bb07..4205217 100644 --- a/ruby-2.7.0-Remove-RubyGems-dependency.patch +++ b/ruby-2.7.0-Remove-RubyGems-dependency.patch @@ -6,14 +6,14 @@ Subject: [PATCH] Remove RubyGems dependency. Since `Process::RLIMIT_NOFILE` is platform specific, better to use Ruby introspection than detecting platform. --- - lib/net/http/persistent.rb | 6 +++--- + .../vendor/net-http-persistent/lib/net/http/persistent.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb b/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb 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 Net::HTTP::Persistent +@@ -202,10 +202,10 @@ class Bundler::Persistent::Net::HTTP::Persistent ## # The default connection pool size is 1/4 the allowed open files. diff --git a/ruby.spec b/ruby.spec index f5af853..3f1ce90 100644 --- a/ruby.spec +++ b/ruby.spec @@ -10,7 +10,7 @@ #%%global milestone rc2 # Keep the revision enabled for pre-releases from SVN. -%global revision 36a0c668b6 +%global revision 4a403e3f98 %global ruby_archive %{name}-%{ruby_version} @@ -1221,7 +1221,7 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %changelog * Mon Jul 01 2019 Vít Ondruch - 2.7.0-1 -- Upgrade to Ruby 2.7.0 (36a0c668b6). +- Upgrade to Ruby 2.7.0 (4a403e3f98). - Drop useless %%{rubygems_default_filter}. - Fix checksec 2.0+ compatibility. From 4f0a1bc2fd2d4f17df37e9bdc249d937a79b424c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 22 Nov 2019 17:08:16 +0100 Subject: [PATCH 14/26] Upgrade to Ruby 2.7.0 (053f78e139). --- ruby-1.9.3-mkmf-verbose.patch | 2 +- ...-additional-preludes-by-configuratio.patch | 6 +- ...0-Enable-configuration-of-archlibdir.patch | 2 +- ...ed-paths-when-empty-version-string-i.patch | 2 +- ruby-2.1.0-always-use-i386.patch | 2 +- ruby-2.1.0-custom-rubygems-location.patch | 4 +- ...2.3-Generate-preludes-using-miniruby.patch | 4 +- ruby-2.3.0-ruby_version.patch | 12 +-- ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch | 4 +- ruby.spec | 75 ++++++++++++------- 10 files changed, 66 insertions(+), 47 deletions(-) diff --git a/ruby-1.9.3-mkmf-verbose.patch b/ruby-1.9.3-mkmf-verbose.patch index 2ecdfcd..b9c2c6f 100644 --- a/ruby-1.9.3-mkmf-verbose.patch +++ b/ruby-1.9.3-mkmf-verbose.patch @@ -11,7 +11,7 @@ diff --git a/lib/mkmf.rb b/lib/mkmf.rb index 682eb46..e6b1445 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb -@@ -1918,7 +1918,7 @@ def configuration(srcdir) +@@ -1930,7 +1930,7 @@ def configuration(srcdir) SHELL = /bin/sh # V=0 quiet, V=1 verbose. other values don't work. diff --git a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch index a40c037..cecfe3e 100644 --- a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch +++ b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch @@ -13,11 +13,11 @@ diff --git a/common.mk b/common.mk index 5cfbc3d..3f0a82e 100644 --- a/common.mk +++ b/common.mk -@@ -162,7 +162,7 @@ ALLOBJS = $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(INITOBJS) +@@ -163,7 +163,7 @@ ALLOBJS = $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(INITOBJS) GOLFOBJS = goruby.$(OBJEXT) golf_prelude.$(OBJEXT) DEFAULT_PRELUDES = $(GEM_PRELUDE) --PRELUDE_SCRIPTS = $(srcdir)/prelude.rb $(DEFAULT_PRELUDES) +-PRELUDE_SCRIPTS = $(DEFAULT_PRELUDES) +PRELUDE_SCRIPTS = $(srcdir)/prelude.rb $(DEFAULT_PRELUDES) $(OPTIONAL_PRELUDES) GEM_PRELUDE = $(srcdir)/gem_prelude.rb PRELUDES = {$(srcdir)}prelude.c {$(srcdir)}miniprelude.c @@ -26,7 +26,7 @@ diff --git a/configure.ac b/configure.ac index 028ef7ca3e..cdeff87871 100644 --- a/configure.ac +++ b/configure.ac -@@ -3865,6 +3865,13 @@ AC_SUBST(rubyarchhdrdir)dnl +@@ -3872,6 +3872,13 @@ AC_SUBST(rubyarchhdrdir)dnl AC_SUBST(sitearchhdrdir)dnl AC_SUBST(vendorarchhdrdir)dnl diff --git a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch index 0e428a4..b3aec19 100644 --- a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch +++ b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch @@ -11,7 +11,7 @@ diff --git a/configure.ac b/configure.ac index d261ea57b5..3c13076b82 100644 --- a/configure.ac +++ b/configure.ac -@@ -3082,6 +3082,11 @@ AS_IF([test ${multiarch+set}], [ +@@ -3089,6 +3089,11 @@ AS_IF([test ${multiarch+set}], [ ]) archlibdir='${libdir}/${arch}' diff --git a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch index c684103..ca0519c 100644 --- a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch +++ b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch @@ -14,7 +14,7 @@ diff --git a/configure.ac b/configure.ac index c42436c23d..d261ea57b5 100644 --- a/configure.ac +++ b/configure.ac -@@ -3720,7 +3720,8 @@ AS_CASE(["$ruby_version_dir_name"], +@@ -3727,7 +3727,8 @@ AS_CASE(["$ruby_version_dir_name"], ruby_version_dir=/'${ruby_version_dir_name}' if test -z "${ruby_version_dir_name}"; then diff --git a/ruby-2.1.0-always-use-i386.patch b/ruby-2.1.0-always-use-i386.patch index 79f7cb0..9eff277 100644 --- a/ruby-2.1.0-always-use-i386.patch +++ b/ruby-2.1.0-always-use-i386.patch @@ -11,7 +11,7 @@ diff --git a/configure.ac b/configure.ac index 3c13076b82..93af30321d 100644 --- a/configure.ac +++ b/configure.ac -@@ -3784,6 +3784,8 @@ AC_SUBST(vendorarchdir)dnl +@@ -3791,6 +3791,8 @@ AC_SUBST(vendorarchdir)dnl AC_SUBST(CONFIGURE, "`echo $0 | sed 's|.*/||'`")dnl AC_SUBST(configure_args, "`echo "${ac_configure_args}" | sed 's/\\$/$$/g'`")dnl diff --git a/ruby-2.1.0-custom-rubygems-location.patch b/ruby-2.1.0-custom-rubygems-location.patch index fc7084d..9abbc61 100644 --- a/ruby-2.1.0-custom-rubygems-location.patch +++ b/ruby-2.1.0-custom-rubygems-location.patch @@ -15,7 +15,7 @@ diff --git a/configure.ac b/configure.ac index 93af30321d..bc13397e0e 100644 --- a/configure.ac +++ b/configure.ac -@@ -3756,6 +3756,10 @@ AC_ARG_WITH(vendorarchdir, +@@ -3763,6 +3763,10 @@ AC_ARG_WITH(vendorarchdir, [vendorarchdir=$withval], [vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby'${ruby_version_dir}}${multiarch-'${vendorlibdir}/${sitearch}'}]) @@ -26,7 +26,7 @@ index 93af30321d..bc13397e0e 100644 AS_IF([test "${LOAD_RELATIVE+set}"], [ AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) RUBY_EXEC_PREFIX='' -@@ -3780,6 +3784,7 @@ AC_SUBST(sitearchdir)dnl +@@ -3787,6 +3791,7 @@ AC_SUBST(sitearchdir)dnl AC_SUBST(vendordir)dnl AC_SUBST(vendorlibdir)dnl AC_SUBST(vendorarchdir)dnl diff --git a/ruby-2.2.3-Generate-preludes-using-miniruby.patch b/ruby-2.2.3-Generate-preludes-using-miniruby.patch index fb58a90..625cf53 100644 --- a/ruby-2.2.3-Generate-preludes-using-miniruby.patch +++ b/ruby-2.2.3-Generate-preludes-using-miniruby.patch @@ -11,8 +11,8 @@ diff --git a/common.mk b/common.mk index 168dc52..20c218a 100644 --- a/common.mk +++ b/common.mk -@@ -1065,9 +1065,9 @@ $(MINIPRELUDE_C): $(COMPILE_PRELUDE) - $(srcdir)/template/prelude.c.tmpl +@@ -1086,9 +1086,9 @@ $(MINIPRELUDE_C): $(COMPILE_PRELUDE) $(BUILTIN_RB_SRCS) + $(srcdir)/template/prelude.c.tmpl $(BUILTIN_RB_SRCS) $(PRELUDE_C): $(COMPILE_PRELUDE) \ - $(PRELUDE_SCRIPTS) diff --git a/ruby-2.3.0-ruby_version.patch b/ruby-2.3.0-ruby_version.patch index 3f86dc2..682f27b 100644 --- a/ruby-2.3.0-ruby_version.patch +++ b/ruby-2.3.0-ruby_version.patch @@ -20,7 +20,7 @@ diff --git a/configure.ac b/configure.ac index 80b137e380..63cd3b4f8b 100644 --- a/configure.ac +++ b/configure.ac -@@ -3671,9 +3671,6 @@ AS_CASE(["$target_os"], +@@ -3678,9 +3678,6 @@ AS_CASE(["$target_os"], rubyw_install_name='$(RUBYW_INSTALL_NAME)' ]) @@ -30,7 +30,7 @@ index 80b137e380..63cd3b4f8b 100644 rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'} AC_ARG_WITH(rubyarchprefix, AS_HELP_STRING([--with-rubyarchprefix=DIR], -@@ -3696,56 +3693,62 @@ AC_ARG_WITH(ridir, +@@ -3703,56 +3700,62 @@ AC_ARG_WITH(ridir, AC_SUBST(ridir) AC_SUBST(RI_BASE_NAME) @@ -120,7 +120,7 @@ index 80b137e380..63cd3b4f8b 100644 AS_IF([test "${LOAD_RELATIVE+set}"], [ AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) -@@ -3762,6 +3765,7 @@ AC_SUBST(sitearchincludedir)dnl +@@ -3769,6 +3772,7 @@ AC_SUBST(sitearchincludedir)dnl AC_SUBST(arch)dnl AC_SUBST(sitearch)dnl AC_SUBST(ruby_version)dnl @@ -237,7 +237,7 @@ diff --git a/test/rubygems/test_gem.rb b/test/rubygems/test_gem.rb index b25068405d..e9fef4a311 100644 --- a/test/rubygems/test_gem.rb +++ b/test/rubygems/test_gem.rb -@@ -1315,7 +1315,8 @@ def test_self_use_paths +@@ -1353,7 +1353,8 @@ def test_self_use_paths def test_self_user_dir parts = [@userhome, '.gem', Gem.ruby_engine] @@ -247,7 +247,7 @@ index b25068405d..e9fef4a311 100644 assert_equal File.join(parts), Gem.user_dir end -@@ -1391,7 +1392,7 @@ def test_self_vendor_dir +@@ -1429,7 +1430,7 @@ def test_self_vendor_dir vendordir(File.join(@tempdir, 'vendor')) do expected = File.join RbConfig::CONFIG['vendordir'], 'gems', @@ -274,7 +274,7 @@ diff --git a/configure.ac b/configure.ac index a00f2b6776..999e2d6d5d 100644 --- a/configure.ac +++ b/configure.ac -@@ -96,7 +96,7 @@ RUBY_BASE_NAME=`echo ruby | sed "$program_transform_name"` +@@ -98,7 +98,7 @@ RUBY_BASE_NAME=`echo ruby | sed "$program_transform_name"` RUBYW_BASE_NAME=`echo rubyw | sed "$program_transform_name"` AC_SUBST(RUBY_BASE_NAME) AC_SUBST(RUBYW_BASE_NAME) 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 index 7aa68d0..d9786d0 100644 --- a/ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch +++ b/ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch @@ -32,7 +32,7 @@ index 1da3d93..65148a1 100644 - libm_so = File.join(libdir, "libm.so") -when /linux/ - libdir = '/lib' -- case [0].pack('L!').size +- case RbConfig::SIZEOF['void*'] - when 4 - # 32-bit ruby - libdir = '/lib32' if File.directory? '/lib32' @@ -66,7 +66,7 @@ index 1da3d93..65148a1 100644 - libm_so = "/usr/lib/libm.so" -when /solaris/ - libdir = '/lib' -- case [0].pack('L!').size +- case RbConfig::SIZEOF['void*'] - when 4 - # 32-bit ruby - libdir = '/lib' if File.directory? '/lib' diff --git a/ruby.spec b/ruby.spec index 3f1ce90..444da0a 100644 --- a/ruby.spec +++ b/ruby.spec @@ -10,7 +10,7 @@ #%%global milestone rc2 # Keep the revision enabled for pre-releases from SVN. -%global revision 4a403e3f98 +%global revision 053f78e139 %global ruby_archive %{name}-%{ruby_version} @@ -30,30 +30,30 @@ %global rubygems_dir %{_datadir}/rubygems # Bundled libraries versions -%global rubygems_version 3.1.0.pre1 +%global rubygems_version 3.1.0.pre3 %global rubygems_molinillo_version 0.5.7 -%global bundler_version 2.1.0.pre.1 +%global bundler_version 2.1.0.pre.3 %global bundler_connection_pool_version 2.2.2 -%global bundler_fileutils_version 1.2.0 +%global bundler_fileutils_version 1.3.0 %global bundler_molinillo_version 0.6.6 %global bundler_net_http_persistent_version 3.1.0 %global bundler_thor_version 0.20.3 -%global bigdecimal_version 1.4.2 -%global did_you_mean_version 1.3.0 +%global bigdecimal_version 2.0.0.dev +%global did_you_mean_version 1.3.1 %global io_console_version 0.4.9 -%global irb_version 1.1.0.pre.3 +%global irb_version 1.1.0 %global json_version 2.2.0 -%global minitest_version 5.11.3 +%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 psych_version 3.1.0 %global racc_version 1.4.16.pre.1 -%global rake_version 12.3.3 +%global rake_version 13.0.1 %global rdoc_version 6.2.0 -%global test_unit_version 3.3.3 +%global test_unit_version 3.3.4 %global xmlrpc_version 0.3.0 # Might not be needed in the future, if we are lucky enough. @@ -537,7 +537,7 @@ generates Ruby program. %setup -q -n %{ruby_archive} # Remove bundled libraries to be sure they are not used. -rm -rf ext/psych/yaml +#rm -rf ext/psych/yaml rm -rf ext/fiddle/libffi* %patch0 -p1 @@ -668,11 +668,9 @@ mkdir -p %{buildroot}%{gem_dir}/gems/bigdecimal-%{bigdecimal_version}/lib mkdir -p %{buildroot}%{_libdir}/gems/%{name}/bigdecimal-%{bigdecimal_version}/bigdecimal mv %{buildroot}%{ruby_libdir}/bigdecimal %{buildroot}%{gem_dir}/gems/bigdecimal-%{bigdecimal_version}/lib mv %{buildroot}%{ruby_libarchdir}/bigdecimal.so %{buildroot}%{_libdir}/gems/%{name}/bigdecimal-%{bigdecimal_version} -mv %{buildroot}%{ruby_libarchdir}/bigdecimal/util.so %{buildroot}%{_libdir}/gems/%{name}/bigdecimal-%{bigdecimal_version}/bigdecimal mv %{buildroot}%{gem_dir}/specifications/default/bigdecimal-%{bigdecimal_version}.gemspec %{buildroot}%{gem_dir}/specifications ln -s %{gem_dir}/gems/bigdecimal-%{bigdecimal_version}/lib/bigdecimal %{buildroot}%{ruby_libdir}/bigdecimal ln -s %{_libdir}/gems/%{name}/bigdecimal-%{bigdecimal_version}/bigdecimal.so %{buildroot}%{ruby_libarchdir}/bigdecimal.so -ln -s %{_libdir}/gems/%{name}/bigdecimal-%{bigdecimal_version}/bigdecimal/util.so %{buildroot}%{ruby_libarchdir}/bigdecimal/util.so # TODO: Put help files into proper location. # https://bugs.ruby-lang.org/issues/15359 @@ -867,6 +865,10 @@ sed -i '/def test_mdns_each_address$/,/^ end$/ s/^/#/' test/resolv/test_mdns.rb MSPECOPTS="$MSPECOPTS -P 'Process.clock_getres matches the clock in practice for Process::CLOCK'" %endif +# Avoid TestEnv#test_fetch test failure due to did_you_mean gem presence. +# https://bugs.ruby-lang.org/issues/16361 +sed -i "/'key not found: \"test\"'/ s/'/\//g" test/ruby/test_env.rb + make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %files @@ -915,26 +917,32 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %exclude %{ruby_libdir}/json.rb %exclude %{ruby_libdir}/openssl.rb %exclude %{ruby_libdir}/psych.rb +%{ruby_libdir}/benchmark %{ruby_libdir}/cgi %{ruby_libdir}/csv +%{ruby_libdir}/delegate %{ruby_libdir}/digest %{ruby_libdir}/drb %{ruby_libdir}/e2mmap %{ruby_libdir}/fiddle %{ruby_libdir}/fileutils %{ruby_libdir}/forwardable +%{ruby_libdir}/getoptlong %{ruby_libdir}/logger %{ruby_libdir}/matrix %{ruby_libdir}/net +%{ruby_libdir}/observer +%{ruby_libdir}/open3 %{ruby_libdir}/optparse +%{ruby_libdir}/pstore %{ruby_libdir}/reline %{ruby_libdir}/rexml %{ruby_libdir}/rinda %{ruby_libdir}/ripper %{ruby_libdir}/rss -%{ruby_libdir}/shell +%{ruby_libdir}/singleton %{ruby_libdir}/syslog -%{ruby_libdir}/thwait +%{ruby_libdir}/timeout %{ruby_libdir}/tracer %{ruby_libdir}/unicode_normalize %{ruby_libdir}/uri @@ -1028,6 +1036,7 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %dir %{ruby_libarchdir}/io %{ruby_libarchdir}/io/nonblock.so %{ruby_libarchdir}/io/wait.so +%{ruby_libarchdir}/monitor.so %{ruby_libarchdir}/nkf.so %{ruby_libarchdir}/objspace.so %{ruby_libarchdir}/pathname.so @@ -1068,35 +1077,45 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %exclude %{gem_dir}/cache/* # TODO: Gemify these libraries -%{gem_dir}/specifications/default/cmath-1.0.0.gemspec -%{gem_dir}/specifications/default/csv-3.1.1.gemspec +%{gem_dir}/specifications/default/benchmark-0.1.0.gemspec +%{gem_dir}/specifications/default/cgi-0.1.0.gemspec +%{gem_dir}/specifications/default/csv-3.1.2.gemspec %{gem_dir}/specifications/default/date-2.0.0.gemspec %{gem_dir}/specifications/default/dbm-1.0.0.gemspec +%{gem_dir}/specifications/default/delegate-0.1.0.gemspec %{gem_dir}/specifications/default/e2mmap-0.1.0.gemspec %{gem_dir}/specifications/default/etc-1.0.1.gemspec %{gem_dir}/specifications/default/fcntl-1.0.0.gemspec %{gem_dir}/specifications/default/fiddle-1.0.0.gemspec -%{gem_dir}/specifications/default/fileutils-1.2.0.gemspec +%{gem_dir}/specifications/default/fileutils-1.3.0.gemspec %{gem_dir}/specifications/default/forwardable-1.2.0.gemspec %{gem_dir}/specifications/default/gdbm-2.0.0.gemspec +%{gem_dir}/specifications/default/getoptlong-0.1.0.gemspec %{gem_dir}/specifications/default/ipaddr-1.2.2.gemspec %{gem_dir}/specifications/default/logger-1.3.0.gemspec %{gem_dir}/specifications/default/matrix-0.1.0.gemspec %{gem_dir}/specifications/default/mutex_m-0.1.0.gemspec +%{gem_dir}/specifications/default/net-pop-0.1.0.gemspec +%{gem_dir}/specifications/default/net-smtp-0.1.0.gemspec +%{gem_dir}/specifications/default/observer-0.1.0.gemspec +%{gem_dir}/specifications/default/open3-0.1.0.gemspec %{gem_dir}/specifications/default/ostruct-0.1.0.gemspec %{gem_dir}/specifications/default/prime-0.1.0.gemspec -%{gem_dir}/specifications/default/reline-0.0.2.gemspec -%{gem_dir}/specifications/default/rexml-3.2.2.gemspec +%{gem_dir}/specifications/default/pstore-0.1.0.gemspec +%{gem_dir}/specifications/default/readline-0.0.1.pre.1.gemspec +%{gem_dir}/specifications/default/readline-ext-0.1.0.gemspec +%{gem_dir}/specifications/default/reline-0.0.7.gemspec +%{gem_dir}/specifications/default/rexml-3.2.3.gemspec %{gem_dir}/specifications/default/rss-0.2.8.gemspec -%{gem_dir}/specifications/default/scanf-1.0.0.gemspec %{gem_dir}/specifications/default/sdbm-1.0.0.gemspec -%{gem_dir}/specifications/default/shell-0.7.gemspec -%{gem_dir}/specifications/default/stringio-0.0.2.gemspec -%{gem_dir}/specifications/default/strscan-1.0.0.gemspec -%{gem_dir}/specifications/default/sync-0.5.0.gemspec -%{gem_dir}/specifications/default/thwait-0.1.0.gemspec +%{gem_dir}/specifications/default/singleton-0.1.0.gemspec +%{gem_dir}/specifications/default/stringio-0.0.3.gemspec +%{gem_dir}/specifications/default/strscan-1.0.3.gemspec +%{gem_dir}/specifications/default/timeout-0.1.0.gemspec %{gem_dir}/specifications/default/tracer-0.1.0.gemspec -%{gem_dir}/specifications/default/webrick-1.4.2.gemspec +%{gem_dir}/specifications/default/uri-0.10.0.gemspec +%{gem_dir}/specifications/default/webrick-1.5.0.gemspec +%{gem_dir}/specifications/default/yaml-0.1.0.gemspec %{gem_dir}/specifications/default/zlib-1.0.0.gemspec %files -n rubygems-devel @@ -1221,7 +1240,7 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %changelog * Mon Jul 01 2019 Vít Ondruch - 2.7.0-1 -- Upgrade to Ruby 2.7.0 (4a403e3f98). +- Upgrade to Ruby 2.7.0 (053f78e139). - Drop useless %%{rubygems_default_filter}. - Fix checksec 2.0+ compatibility. From ad9f38f08f100fd412a3ec237cb83c60b966aeb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 10 Dec 2019 10:14:00 +0100 Subject: [PATCH 15/26] Upgrade to Ruby 2.7.0 (c2dc27d643). --- ...-additional-preludes-by-configuratio.patch | 2 +- ...0-Enable-configuration-of-archlibdir.patch | 2 +- ...ed-paths-when-empty-version-string-i.patch | 2 +- ruby-2.1.0-always-use-i386.patch | 2 +- ruby-2.1.0-custom-rubygems-location.patch | 4 +- ...2.3-Generate-preludes-using-miniruby.patch | 2 +- ruby-2.3.0-ruby_version.patch | 6 +-- ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch | 19 ++++++-- ruby.spec | 48 +++++++++---------- 9 files changed, 48 insertions(+), 39 deletions(-) diff --git a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch index cecfe3e..5c347d5 100644 --- a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch +++ b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch @@ -26,7 +26,7 @@ diff --git a/configure.ac b/configure.ac index 028ef7ca3e..cdeff87871 100644 --- a/configure.ac +++ b/configure.ac -@@ -3872,6 +3872,13 @@ AC_SUBST(rubyarchhdrdir)dnl +@@ -3884,6 +3884,13 @@ AC_SUBST(rubyarchhdrdir)dnl AC_SUBST(sitearchhdrdir)dnl AC_SUBST(vendorarchhdrdir)dnl diff --git a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch index b3aec19..f7eed39 100644 --- a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch +++ b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch @@ -11,7 +11,7 @@ diff --git a/configure.ac b/configure.ac index d261ea57b5..3c13076b82 100644 --- a/configure.ac +++ b/configure.ac -@@ -3089,6 +3089,11 @@ AS_IF([test ${multiarch+set}], [ +@@ -3101,6 +3101,11 @@ AS_IF([test ${multiarch+set}], [ ]) archlibdir='${libdir}/${arch}' diff --git a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch index ca0519c..2165aa8 100644 --- a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch +++ b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch @@ -14,7 +14,7 @@ diff --git a/configure.ac b/configure.ac index c42436c23d..d261ea57b5 100644 --- a/configure.ac +++ b/configure.ac -@@ -3727,7 +3727,8 @@ AS_CASE(["$ruby_version_dir_name"], +@@ -3739,7 +3739,8 @@ AS_CASE(["$ruby_version_dir_name"], ruby_version_dir=/'${ruby_version_dir_name}' if test -z "${ruby_version_dir_name}"; then diff --git a/ruby-2.1.0-always-use-i386.patch b/ruby-2.1.0-always-use-i386.patch index 9eff277..9d1eb76 100644 --- a/ruby-2.1.0-always-use-i386.patch +++ b/ruby-2.1.0-always-use-i386.patch @@ -11,7 +11,7 @@ diff --git a/configure.ac b/configure.ac index 3c13076b82..93af30321d 100644 --- a/configure.ac +++ b/configure.ac -@@ -3791,6 +3791,8 @@ AC_SUBST(vendorarchdir)dnl +@@ -3803,6 +3803,8 @@ AC_SUBST(vendorarchdir)dnl AC_SUBST(CONFIGURE, "`echo $0 | sed 's|.*/||'`")dnl AC_SUBST(configure_args, "`echo "${ac_configure_args}" | sed 's/\\$/$$/g'`")dnl diff --git a/ruby-2.1.0-custom-rubygems-location.patch b/ruby-2.1.0-custom-rubygems-location.patch index 9abbc61..5a1f7c5 100644 --- a/ruby-2.1.0-custom-rubygems-location.patch +++ b/ruby-2.1.0-custom-rubygems-location.patch @@ -15,7 +15,7 @@ diff --git a/configure.ac b/configure.ac index 93af30321d..bc13397e0e 100644 --- a/configure.ac +++ b/configure.ac -@@ -3763,6 +3763,10 @@ AC_ARG_WITH(vendorarchdir, +@@ -3775,6 +3775,10 @@ AC_ARG_WITH(vendorarchdir, [vendorarchdir=$withval], [vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby'${ruby_version_dir}}${multiarch-'${vendorlibdir}/${sitearch}'}]) @@ -26,7 +26,7 @@ index 93af30321d..bc13397e0e 100644 AS_IF([test "${LOAD_RELATIVE+set}"], [ AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) RUBY_EXEC_PREFIX='' -@@ -3787,6 +3791,7 @@ AC_SUBST(sitearchdir)dnl +@@ -3799,6 +3803,7 @@ AC_SUBST(sitearchdir)dnl AC_SUBST(vendordir)dnl AC_SUBST(vendorlibdir)dnl AC_SUBST(vendorarchdir)dnl diff --git a/ruby-2.2.3-Generate-preludes-using-miniruby.patch b/ruby-2.2.3-Generate-preludes-using-miniruby.patch index 625cf53..48deae6 100644 --- a/ruby-2.2.3-Generate-preludes-using-miniruby.patch +++ b/ruby-2.2.3-Generate-preludes-using-miniruby.patch @@ -11,7 +11,7 @@ diff --git a/common.mk b/common.mk index 168dc52..20c218a 100644 --- a/common.mk +++ b/common.mk -@@ -1086,9 +1086,9 @@ $(MINIPRELUDE_C): $(COMPILE_PRELUDE) $(BUILTIN_RB_SRCS) +@@ -1088,9 +1088,9 @@ $(MINIPRELUDE_C): $(COMPILE_PRELUDE) $(BUILTIN_RB_SRCS) $(srcdir)/template/prelude.c.tmpl $(BUILTIN_RB_SRCS) $(PRELUDE_C): $(COMPILE_PRELUDE) \ diff --git a/ruby-2.3.0-ruby_version.patch b/ruby-2.3.0-ruby_version.patch index 682f27b..c282fa3 100644 --- a/ruby-2.3.0-ruby_version.patch +++ b/ruby-2.3.0-ruby_version.patch @@ -20,7 +20,7 @@ diff --git a/configure.ac b/configure.ac index 80b137e380..63cd3b4f8b 100644 --- a/configure.ac +++ b/configure.ac -@@ -3678,9 +3678,6 @@ AS_CASE(["$target_os"], +@@ -3690,9 +3690,6 @@ AS_CASE(["$target_os"], rubyw_install_name='$(RUBYW_INSTALL_NAME)' ]) @@ -30,7 +30,7 @@ index 80b137e380..63cd3b4f8b 100644 rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'} AC_ARG_WITH(rubyarchprefix, AS_HELP_STRING([--with-rubyarchprefix=DIR], -@@ -3703,56 +3700,62 @@ AC_ARG_WITH(ridir, +@@ -3715,56 +3712,62 @@ AC_ARG_WITH(ridir, AC_SUBST(ridir) AC_SUBST(RI_BASE_NAME) @@ -120,7 +120,7 @@ index 80b137e380..63cd3b4f8b 100644 AS_IF([test "${LOAD_RELATIVE+set}"], [ AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) -@@ -3769,6 +3772,7 @@ AC_SUBST(sitearchincludedir)dnl +@@ -3781,6 +3784,7 @@ AC_SUBST(sitearchincludedir)dnl AC_SUBST(arch)dnl AC_SUBST(sitearch)dnl AC_SUBST(ruby_version)dnl 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 index d9786d0..4d81a84 100644 --- a/ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch +++ b/ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch @@ -8,14 +8,14 @@ on Red Hat platforms. This workaround rhbz#1361037 --- - test/fiddle/helper.rb | 96 ------------------------------------------- - 1 file changed, 96 deletions(-) + test/fiddle/helper.rb | 105 ------------------------------------------ + 1 file changed, 105 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,102 +6,6 @@ +@@ -6,111 +6,6 @@ libc_so = libm_so = nil @@ -35,7 +35,16 @@ index 1da3d93..65148a1 100644 - case RbConfig::SIZEOF['void*'] - when 4 - # 32-bit ruby -- libdir = '/lib32' if File.directory? '/lib32' +- 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' @@ -117,7 +126,7 @@ index 1da3d93..65148a1 100644 - if !libc_so || !libm_so ruby = EnvUtil.rubybin - ldd = `ldd #{ruby}` + # 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 444da0a..704a25c 100644 --- a/ruby.spec +++ b/ruby.spec @@ -10,7 +10,7 @@ #%%global milestone rc2 # Keep the revision enabled for pre-releases from SVN. -%global revision 053f78e139 +%global revision c2dc27d643 %global ruby_archive %{name}-%{ruby_version} @@ -43,7 +43,7 @@ %global bigdecimal_version 2.0.0.dev %global did_you_mean_version 1.3.1 %global io_console_version 0.4.9 -%global irb_version 1.1.0 +%global irb_version 1.2.0 %global json_version 2.2.0 %global minitest_version 5.13.0 %global net_telnet_version 0.2.0 @@ -537,7 +537,7 @@ generates Ruby program. %setup -q -n %{ruby_archive} # Remove bundled libraries to be sure they are not used. -#rm -rf ext/psych/yaml +rm -rf ext/psych/yaml rm -rf ext/fiddle/libffi* %patch0 -p1 @@ -679,6 +679,11 @@ mv %{buildroot}%{ruby_libdir}/bundler.rb %{buildroot}%{gem_dir}/gems/bundler-%{b mv %{buildroot}%{ruby_libdir}/bundler %{buildroot}%{gem_dir}/gems/bundler-%{bundler_version}/lib mv %{buildroot}%{gem_dir}/specifications/default/bundler-%{bundler_version}.gemspec %{buildroot}%{gem_dir}/specifications +mkdir -p %{buildroot}%{gem_dir}/gems/did_you_mean-%{did_you_mean_version}/lib +mv %{buildroot}%{ruby_libdir}/did_you_mean.rb %{buildroot}%{gem_dir}/gems/did_you_mean-%{did_you_mean_version}/lib +mv %{buildroot}%{ruby_libdir}/did_you_mean %{buildroot}%{gem_dir}/gems/did_you_mean-%{did_you_mean_version}/lib +mv %{buildroot}%{gem_dir}/specifications/default/did_you_mean-%{did_you_mean_version}.gemspec %{buildroot}%{gem_dir}/specifications + mkdir -p %{buildroot}%{gem_dir}/gems/io-console-%{io_console_version}/lib mkdir -p %{buildroot}%{_libdir}/gems/%{name}/io-console-%{io_console_version}/io mv %{buildroot}%{ruby_libdir}/io %{buildroot}%{gem_dir}/gems/io-console-%{io_console_version}/lib @@ -858,12 +863,10 @@ DISABLE_TESTS="$DISABLE_TESTS -n !/test_segv_\(setproctitle\|test\|loaded_featur # https://bugs.ruby-lang.org/issues/14175 sed -i '/def test_mdns_each_address$/,/^ end$/ s/^/#/' test/resolv/test_mdns.rb -# Disable "Process.clock_getres matches the clock in practice for -# Process::CLOCK_{PROCESS,THREAD}_CPUTIME_ID" failing spec on arm. -# https://bugs.ruby-lang.org/issues/16007 -%ifarch %arm -MSPECOPTS="$MSPECOPTS -P 'Process.clock_getres matches the clock in practice for Process::CLOCK'" -%endif +# Disable "File.utime allows Time instances in the far future to set +# mtime and atime". +# https://bugs.ruby-lang.org/issues/16410 +MSPECOPTS="$MSPECOPTS -P 'File.utime allows Time instances in the far future to set mtime and atime'" # Avoid TestEnv#test_fetch test failure due to did_you_mean gem presence. # https://bugs.ruby-lang.org/issues/16361 @@ -923,9 +926,7 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %{ruby_libdir}/delegate %{ruby_libdir}/digest %{ruby_libdir}/drb -%{ruby_libdir}/e2mmap %{ruby_libdir}/fiddle -%{ruby_libdir}/fileutils %{ruby_libdir}/forwardable %{ruby_libdir}/getoptlong %{ruby_libdir}/logger @@ -1080,19 +1081,18 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %{gem_dir}/specifications/default/benchmark-0.1.0.gemspec %{gem_dir}/specifications/default/cgi-0.1.0.gemspec %{gem_dir}/specifications/default/csv-3.1.2.gemspec -%{gem_dir}/specifications/default/date-2.0.0.gemspec -%{gem_dir}/specifications/default/dbm-1.0.0.gemspec +%{gem_dir}/specifications/default/date-3.0.0.gemspec +%{gem_dir}/specifications/default/dbm-1.1.0.gemspec %{gem_dir}/specifications/default/delegate-0.1.0.gemspec -%{gem_dir}/specifications/default/e2mmap-0.1.0.gemspec -%{gem_dir}/specifications/default/etc-1.0.1.gemspec +%{gem_dir}/specifications/default/etc-1.1.0.gemspec %{gem_dir}/specifications/default/fcntl-1.0.0.gemspec %{gem_dir}/specifications/default/fiddle-1.0.0.gemspec -%{gem_dir}/specifications/default/fileutils-1.3.0.gemspec -%{gem_dir}/specifications/default/forwardable-1.2.0.gemspec -%{gem_dir}/specifications/default/gdbm-2.0.0.gemspec +%{gem_dir}/specifications/default/fileutils-1.4.1.gemspec +%{gem_dir}/specifications/default/forwardable-1.3.0.gemspec +%{gem_dir}/specifications/default/gdbm-2.1.0.gemspec %{gem_dir}/specifications/default/getoptlong-0.1.0.gemspec %{gem_dir}/specifications/default/ipaddr-1.2.2.gemspec -%{gem_dir}/specifications/default/logger-1.3.0.gemspec +%{gem_dir}/specifications/default/logger-1.4.1.gemspec %{gem_dir}/specifications/default/matrix-0.1.0.gemspec %{gem_dir}/specifications/default/mutex_m-0.1.0.gemspec %{gem_dir}/specifications/default/net-pop-0.1.0.gemspec @@ -1103,20 +1103,20 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %{gem_dir}/specifications/default/prime-0.1.0.gemspec %{gem_dir}/specifications/default/pstore-0.1.0.gemspec %{gem_dir}/specifications/default/readline-0.0.1.pre.1.gemspec -%{gem_dir}/specifications/default/readline-ext-0.1.0.gemspec +%{gem_dir}/specifications/default/readline-ext-0.1.0.pre.1.gemspec %{gem_dir}/specifications/default/reline-0.0.7.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 %{gem_dir}/specifications/default/singleton-0.1.0.gemspec -%{gem_dir}/specifications/default/stringio-0.0.3.gemspec +%{gem_dir}/specifications/default/stringio-0.1.0.gemspec %{gem_dir}/specifications/default/strscan-1.0.3.gemspec %{gem_dir}/specifications/default/timeout-0.1.0.gemspec %{gem_dir}/specifications/default/tracer-0.1.0.gemspec %{gem_dir}/specifications/default/uri-0.10.0.gemspec -%{gem_dir}/specifications/default/webrick-1.5.0.gemspec +%{gem_dir}/specifications/default/webrick-1.6.0.gemspec %{gem_dir}/specifications/default/yaml-0.1.0.gemspec -%{gem_dir}/specifications/default/zlib-1.0.0.gemspec +%{gem_dir}/specifications/default/zlib-1.1.0.gemspec %files -n rubygems-devel %{_rpmconfigdir}/macros.d/macros.rubygems @@ -1240,7 +1240,7 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %changelog * Mon Jul 01 2019 Vít Ondruch - 2.7.0-1 -- Upgrade to Ruby 2.7.0 (053f78e139). +- Upgrade to Ruby 2.7.0 (c2dc27d643). - Drop useless %%{rubygems_default_filter}. - Fix checksec 2.0+ compatibility. From fe89ec49cc6e09f8f308b1e8dfaf38c492c06836 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 10 Dec 2019 12:14:08 +0100 Subject: [PATCH 16/26] Upgrade to Ruby 2.7.0 (af11efd377). --- ruby.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ruby.spec b/ruby.spec index 704a25c..8b31ba2 100644 --- a/ruby.spec +++ b/ruby.spec @@ -10,7 +10,7 @@ #%%global milestone rc2 # Keep the revision enabled for pre-releases from SVN. -%global revision c2dc27d643 +%global revision af11efd377 %global ruby_archive %{name}-%{ruby_version} @@ -42,7 +42,7 @@ %global bigdecimal_version 2.0.0.dev %global did_you_mean_version 1.3.1 -%global io_console_version 0.4.9 +%global io_console_version 0.5.1 %global irb_version 1.2.0 %global json_version 2.2.0 %global minitest_version 5.13.0 @@ -50,7 +50,7 @@ %global openssl_version 2.1.2 %global power_assert_version 1.1.5 %global psych_version 3.1.0 -%global racc_version 1.4.16.pre.1 +%global racc_version 1.4.16 %global rake_version 13.0.1 %global rdoc_version 6.2.0 %global test_unit_version 3.3.4 @@ -1240,7 +1240,7 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %changelog * Mon Jul 01 2019 Vít Ondruch - 2.7.0-1 -- Upgrade to Ruby 2.7.0 (c2dc27d643). +- Upgrade to Ruby 2.7.0 (af11efd377). - Drop useless %%{rubygems_default_filter}. - Fix checksec 2.0+ compatibility. From 910b85f7fa12692a1e570d8020cb689acbfa87be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 6 Jan 2020 18:06:12 +0100 Subject: [PATCH 17/26] Upgrade to Ruby 2.7.0-rc1. --- abrt_prelude.rb | 8 -- ...-additional-preludes-by-configuratio.patch | 58 -------------- ...0-Enable-configuration-of-archlibdir.patch | 2 +- ...ed-paths-when-empty-version-string-i.patch | 2 +- ruby-2.1.0-always-use-i386.patch | 2 +- ruby-2.1.0-custom-rubygems-location.patch | 4 +- ...2.3-Generate-preludes-using-miniruby.patch | 28 ------- ruby-2.3.0-ruby_version.patch | 6 +- ruby-2.7.0-Initialize-ABRT-hook.patch | 77 +++++++++++++++++++ ruby.spec | 40 ++++------ 10 files changed, 102 insertions(+), 125 deletions(-) delete mode 100644 abrt_prelude.rb delete mode 100644 ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch delete mode 100644 ruby-2.2.3-Generate-preludes-using-miniruby.patch create mode 100644 ruby-2.7.0-Initialize-ABRT-hook.patch diff --git a/abrt_prelude.rb b/abrt_prelude.rb deleted file mode 100644 index 587c6a6..0000000 --- a/abrt_prelude.rb +++ /dev/null @@ -1,8 +0,0 @@ -if defined?(Gem) - require 'rubygems.rb' - - begin - require 'abrt' - rescue LoadError - end -end diff --git a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch deleted file mode 100644 index 5c347d5..0000000 --- a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 996012f6abe0ce4d68a2de9f249935c6d5b467bc Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Fri, 4 Oct 2013 22:13:11 +0200 -Subject: [PATCH] Allow to specify addition preludes by configuration option. - ---- - common.mk | 2 +- - configure.ac | 7 +++++++ - template/Makefile.in | 2 ++ - 3 files changed, 10 insertions(+), 1 deletion(-) - -diff --git a/common.mk b/common.mk -index 5cfbc3d..3f0a82e 100644 ---- a/common.mk -+++ b/common.mk -@@ -163,7 +163,7 @@ ALLOBJS = $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(INITOBJS) - GOLFOBJS = goruby.$(OBJEXT) golf_prelude.$(OBJEXT) - - DEFAULT_PRELUDES = $(GEM_PRELUDE) --PRELUDE_SCRIPTS = $(DEFAULT_PRELUDES) -+PRELUDE_SCRIPTS = $(srcdir)/prelude.rb $(DEFAULT_PRELUDES) $(OPTIONAL_PRELUDES) - GEM_PRELUDE = $(srcdir)/gem_prelude.rb - PRELUDES = {$(srcdir)}prelude.c {$(srcdir)}miniprelude.c - GOLFPRELUDES = {$(srcdir)}golf_prelude.c -diff --git a/configure.ac b/configure.ac -index 028ef7ca3e..cdeff87871 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -3884,6 +3884,13 @@ AC_SUBST(rubyarchhdrdir)dnl - AC_SUBST(sitearchhdrdir)dnl - AC_SUBST(vendorarchhdrdir)dnl - -+AC_ARG_WITH(prelude, -+ AS_HELP_STRING([--with-prelude=FILE-LIST], [specify additional preludes separated by space]), -+ [prelude=$withval]) -+if test "$prelude" != ""; then -+ AC_SUBST(OPTIONAL_PRELUDES, $prelude) -+fi -+ - AC_ARG_WITH(mantype, - AS_HELP_STRING([--with-mantype=TYPE], [specify man page type; TYPE is one of man and doc]), - [ -diff --git a/template/Makefile.in b/template/Makefile.in -index d7e139c6d4..a0171afdcc 100644 ---- a/template/Makefile.in -+++ b/template/Makefile.in -@@ -156,6 +156,8 @@ COROUTINE_H = @X_COROUTINE_H@ - COROUTINE_OBJ = $(COROUTINE_H:.h=.@OBJEXT@) - COROUTINE_SRC = @X_COROUTINE_SRC@ - -+OPTIONAL_PRELUDES = @OPTIONAL_PRELUDES@ -+ - #### End of system configuration section. #### - - MAJOR= @MAJOR@ --- -1.8.3.1 - diff --git a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch index f7eed39..6352db3 100644 --- a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch +++ b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch @@ -11,7 +11,7 @@ diff --git a/configure.ac b/configure.ac index d261ea57b5..3c13076b82 100644 --- a/configure.ac +++ b/configure.ac -@@ -3101,6 +3101,11 @@ AS_IF([test ${multiarch+set}], [ +@@ -3102,6 +3102,11 @@ AS_IF([test ${multiarch+set}], [ ]) archlibdir='${libdir}/${arch}' diff --git a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch index 2165aa8..d48f74e 100644 --- a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch +++ b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch @@ -14,7 +14,7 @@ diff --git a/configure.ac b/configure.ac index c42436c23d..d261ea57b5 100644 --- a/configure.ac +++ b/configure.ac -@@ -3739,7 +3739,8 @@ AS_CASE(["$ruby_version_dir_name"], +@@ -3740,7 +3740,8 @@ AS_CASE(["$ruby_version_dir_name"], ruby_version_dir=/'${ruby_version_dir_name}' if test -z "${ruby_version_dir_name}"; then diff --git a/ruby-2.1.0-always-use-i386.patch b/ruby-2.1.0-always-use-i386.patch index 9d1eb76..d156a73 100644 --- a/ruby-2.1.0-always-use-i386.patch +++ b/ruby-2.1.0-always-use-i386.patch @@ -11,7 +11,7 @@ diff --git a/configure.ac b/configure.ac index 3c13076b82..93af30321d 100644 --- a/configure.ac +++ b/configure.ac -@@ -3803,6 +3803,8 @@ AC_SUBST(vendorarchdir)dnl +@@ -3804,6 +3804,8 @@ AC_SUBST(vendorarchdir)dnl AC_SUBST(CONFIGURE, "`echo $0 | sed 's|.*/||'`")dnl AC_SUBST(configure_args, "`echo "${ac_configure_args}" | sed 's/\\$/$$/g'`")dnl diff --git a/ruby-2.1.0-custom-rubygems-location.patch b/ruby-2.1.0-custom-rubygems-location.patch index 5a1f7c5..14e20ec 100644 --- a/ruby-2.1.0-custom-rubygems-location.patch +++ b/ruby-2.1.0-custom-rubygems-location.patch @@ -15,7 +15,7 @@ diff --git a/configure.ac b/configure.ac index 93af30321d..bc13397e0e 100644 --- a/configure.ac +++ b/configure.ac -@@ -3775,6 +3775,10 @@ AC_ARG_WITH(vendorarchdir, +@@ -3776,6 +3776,10 @@ AC_ARG_WITH(vendorarchdir, [vendorarchdir=$withval], [vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby'${ruby_version_dir}}${multiarch-'${vendorlibdir}/${sitearch}'}]) @@ -26,7 +26,7 @@ index 93af30321d..bc13397e0e 100644 AS_IF([test "${LOAD_RELATIVE+set}"], [ AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) RUBY_EXEC_PREFIX='' -@@ -3799,6 +3803,7 @@ AC_SUBST(sitearchdir)dnl +@@ -3800,6 +3804,7 @@ AC_SUBST(sitearchdir)dnl AC_SUBST(vendordir)dnl AC_SUBST(vendorlibdir)dnl AC_SUBST(vendorarchdir)dnl diff --git a/ruby-2.2.3-Generate-preludes-using-miniruby.patch b/ruby-2.2.3-Generate-preludes-using-miniruby.patch deleted file mode 100644 index 48deae6..0000000 --- a/ruby-2.2.3-Generate-preludes-using-miniruby.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 07eb5f5e775dec01a92a8b13910eaced9e8ee0cd Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Tue, 2 Dec 2014 10:56:58 +0100 -Subject: [PATCH] Generate preludes using miniruby. - ---- - common.mk | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/common.mk b/common.mk -index 168dc52..20c218a 100644 ---- a/common.mk -+++ b/common.mk -@@ -1088,9 +1088,9 @@ $(MINIPRELUDE_C): $(COMPILE_PRELUDE) $(BUILTIN_RB_SRCS) - $(srcdir)/template/prelude.c.tmpl $(BUILTIN_RB_SRCS) - - $(PRELUDE_C): $(COMPILE_PRELUDE) \ -- $(PRELUDE_SCRIPTS) -+ $(PRELUDE_SCRIPTS) $(PREP) - $(ECHO) generating $@ -- $(Q) $(BASERUBY) $(srcdir)/tool/generic_erb.rb -I$(srcdir) -c -o $@ \ -+ $(Q) $(MINIRUBY) $(srcdir)/tool/generic_erb.rb -I$(srcdir) -c -o $@ \ - $(srcdir)/template/prelude.c.tmpl $(PRELUDE_SCRIPTS) - - $(GOLF_PRELUDE_C): $(COMPILE_PRELUDE) {$(srcdir)}golf_prelude.rb --- -2.6.3 - diff --git a/ruby-2.3.0-ruby_version.patch b/ruby-2.3.0-ruby_version.patch index c282fa3..11f73f3 100644 --- a/ruby-2.3.0-ruby_version.patch +++ b/ruby-2.3.0-ruby_version.patch @@ -20,7 +20,7 @@ diff --git a/configure.ac b/configure.ac index 80b137e380..63cd3b4f8b 100644 --- a/configure.ac +++ b/configure.ac -@@ -3690,9 +3690,6 @@ AS_CASE(["$target_os"], +@@ -3691,9 +3691,6 @@ AS_CASE(["$target_os"], rubyw_install_name='$(RUBYW_INSTALL_NAME)' ]) @@ -30,7 +30,7 @@ index 80b137e380..63cd3b4f8b 100644 rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'} AC_ARG_WITH(rubyarchprefix, AS_HELP_STRING([--with-rubyarchprefix=DIR], -@@ -3715,56 +3712,62 @@ AC_ARG_WITH(ridir, +@@ -3716,56 +3713,62 @@ AC_ARG_WITH(ridir, AC_SUBST(ridir) AC_SUBST(RI_BASE_NAME) @@ -120,7 +120,7 @@ index 80b137e380..63cd3b4f8b 100644 AS_IF([test "${LOAD_RELATIVE+set}"], [ AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) -@@ -3781,6 +3784,7 @@ AC_SUBST(sitearchincludedir)dnl +@@ -3782,6 +3785,7 @@ AC_SUBST(sitearchincludedir)dnl AC_SUBST(arch)dnl AC_SUBST(sitearch)dnl AC_SUBST(ruby_version)dnl diff --git a/ruby-2.7.0-Initialize-ABRT-hook.patch b/ruby-2.7.0-Initialize-ABRT-hook.patch new file mode 100644 index 0000000..f4ac102 --- /dev/null +++ b/ruby-2.7.0-Initialize-ABRT-hook.patch @@ -0,0 +1,77 @@ +From eca084e4079c77c061045df9c21b219175b05228 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Mon, 6 Jan 2020 13:56:04 +0100 +Subject: [PATCH] Initialize ABRT hook. + +The ABRT hook used to be initialized by preludes via patches [[1], [2]]. +Unfortunately, due to [[3]] and especially since [[4]], this would +require boostrapping [[5]]. + +To keep the things simple for now, load the ABRT hook via C. + +[1]: https://bugs.ruby-lang.org/issues/8566 +[2]: https://bugs.ruby-lang.org/issues/15306 +[3]: https://bugs.ruby-lang.org/issues/16254 +[4]: https://github.com/ruby/ruby/pull/2735 +[5]: https://lists.fedoraproject.org/archives/list/ruby-sig@lists.fedoraproject.org/message/LH6L6YJOYQT4Y5ZNOO4SLIPTUWZ5V45Q/ +--- + abrt.c | 12 ++++++++++++++ + common.mk | 3 ++- + ruby.c | 4 ++++ + 3 files changed, 18 insertions(+), 1 deletion(-) + create mode 100644 abrt.c + +diff --git a/abrt.c b/abrt.c +new file mode 100644 +index 0000000000..74b0bd5c0f +--- /dev/null ++++ b/abrt.c +@@ -0,0 +1,12 @@ ++#include "internal.h" ++ ++void ++Init_abrt(void) ++{ ++ rb_eval_string( ++ " begin\n" ++ " require 'abrt'\n" ++ " rescue LoadError\n" ++ " end\n" ++ ); ++} +diff --git a/common.mk b/common.mk +index b2e5b2b6d0..f39f81da5c 100644 +--- a/common.mk ++++ b/common.mk +@@ -81,7 +81,8 @@ ENC_MK = enc.mk + MAKE_ENC = -f $(ENC_MK) V="$(V)" UNICODE_HDR_DIR="$(UNICODE_HDR_DIR)" \ + RUBY="$(MINIRUBY)" MINIRUBY="$(MINIRUBY)" $(mflags) + +-COMMONOBJS = array.$(OBJEXT) \ ++COMMONOBJS = abrt.$(OBJEXT) \ ++ array.$(OBJEXT) \ + ast.$(OBJEXT) \ + bignum.$(OBJEXT) \ + class.$(OBJEXT) \ +diff --git a/ruby.c b/ruby.c +index 60c57d6259..1eec16f2c8 100644 +--- a/ruby.c ++++ b/ruby.c +@@ -1410,10 +1410,14 @@ proc_options(long argc, char **argv, ruby_cmdline_options_t *opt, int envopt) + + void Init_builtin_features(void); + ++/* abrt.c */ ++void Init_abrt(void); ++ + static void + ruby_init_prelude(void) + { + Init_builtin_features(); ++ Init_abrt(); + rb_const_remove(rb_cObject, rb_intern_const("TMP_RUBY_PREFIX")); + } + +-- +2.24.1 + diff --git a/ruby.spec b/ruby.spec index 8b31ba2..bb45929 100644 --- a/ruby.spec +++ b/ruby.spec @@ -7,7 +7,7 @@ %global ruby_release %{ruby_version} # Specify the named version. It has precedense to revision. -#%%global milestone rc2 +%global milestone rc1 # Keep the revision enabled for pre-releases from SVN. %global revision af11efd377 @@ -30,21 +30,21 @@ %global rubygems_dir %{_datadir}/rubygems # Bundled libraries versions -%global rubygems_version 3.1.0.pre3 +%global rubygems_version 3.1.1 %global rubygems_molinillo_version 0.5.7 -%global bundler_version 2.1.0.pre.3 +%global bundler_version 2.1.0 %global bundler_connection_pool_version 2.2.2 %global bundler_fileutils_version 1.3.0 %global bundler_molinillo_version 0.6.6 %global bundler_net_http_persistent_version 3.1.0 -%global bundler_thor_version 0.20.3 +%global bundler_thor_version 1.0.0 %global bigdecimal_version 2.0.0.dev %global did_you_mean_version 1.3.1 -%global io_console_version 0.5.1 +%global io_console_version 0.5.2 %global irb_version 1.2.0 -%global json_version 2.2.0 +%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 @@ -95,7 +95,6 @@ Source2: libruby.stp Source3: ruby-exercise.stp Source4: macros.ruby Source5: macros.rubygems -Source6: abrt_prelude.rb # RPM dependency generators. Source8: rubygems.attr Source9: rubygems.req @@ -128,13 +127,15 @@ Patch3: ruby-2.1.0-always-use-i386.patch Patch4: ruby-2.1.0-custom-rubygems-location.patch # Make mkmf verbose by default Patch5: ruby-1.9.3-mkmf-verbose.patch -# Adds support for '--with-prelude' configuration option. This allows to built -# in support for ABRT. -# http://bugs.ruby-lang.org/issues/8566 -Patch6: ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch -# Use miniruby to regenerate prelude.c. +# The ABRT hook used to be initialized by preludes via following patches: +# https://bugs.ruby-lang.org/issues/8566 # https://bugs.ruby-lang.org/issues/15306 -Patch7: ruby-2.2.3-Generate-preludes-using-miniruby.patch +# Unfortunately, due to https://bugs.ruby-lang.org/issues/16254 +# and especially since https://github.com/ruby/ruby/pull/2735 +# this would require boostrapping: +# 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 @@ -547,7 +548,6 @@ rm -rf ext/fiddle/libffi* %patch4 -p1 %patch5 -p1 %patch6 -p1 -%patch7 -p1 %patch9 -p1 %patch10 -p1 %patch22 -p1 @@ -555,11 +555,6 @@ rm -rf ext/fiddle/libffi* # Provide an example of usage of the tapset: cp -a %{SOURCE3} . -# Make abrt_prelude.rb available for compilation process. The prelude must be -# available together with Ruby's source due to -# https://github.com/ruby/ruby/blob/trunk/tool/compile_prelude.rb#L26 -cp -a %{SOURCE6} . - %build autoconf @@ -582,7 +577,6 @@ autoconf --enable-shared \ --with-ruby-version='' \ --enable-multiarch \ - --with-prelude=./abrt_prelude.rb \ # Q= makes the build output more verbose and allows to check Fedora # compiler options. @@ -1088,11 +1082,11 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %{gem_dir}/specifications/default/fcntl-1.0.0.gemspec %{gem_dir}/specifications/default/fiddle-1.0.0.gemspec %{gem_dir}/specifications/default/fileutils-1.4.1.gemspec -%{gem_dir}/specifications/default/forwardable-1.3.0.gemspec +%{gem_dir}/specifications/default/forwardable-1.3.1.gemspec %{gem_dir}/specifications/default/gdbm-2.1.0.gemspec %{gem_dir}/specifications/default/getoptlong-0.1.0.gemspec %{gem_dir}/specifications/default/ipaddr-1.2.2.gemspec -%{gem_dir}/specifications/default/logger-1.4.1.gemspec +%{gem_dir}/specifications/default/logger-1.4.2.gemspec %{gem_dir}/specifications/default/matrix-0.1.0.gemspec %{gem_dir}/specifications/default/mutex_m-0.1.0.gemspec %{gem_dir}/specifications/default/net-pop-0.1.0.gemspec @@ -1240,7 +1234,7 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %changelog * Mon Jul 01 2019 Vít Ondruch - 2.7.0-1 -- Upgrade to Ruby 2.7.0 (af11efd377). +- Upgrade to Ruby 2.7.0-rc1. - Drop useless %%{rubygems_default_filter}. - Fix checksec 2.0+ compatibility. From 0fb01be98cf32bb98c14f452fbfcf6ea0a7c9fb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 7 Jan 2020 13:05:52 +0100 Subject: [PATCH 18/26] Upgrade to Ruby 2.7.0. --- ruby-2.7.0-Initialize-ABRT-hook.patch | 2 +- ruby.spec | 35 ++++++++++++++------------- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/ruby-2.7.0-Initialize-ABRT-hook.patch b/ruby-2.7.0-Initialize-ABRT-hook.patch index f4ac102..58c92cf 100644 --- a/ruby-2.7.0-Initialize-ABRT-hook.patch +++ b/ruby-2.7.0-Initialize-ABRT-hook.patch @@ -57,7 +57,7 @@ diff --git a/ruby.c b/ruby.c index 60c57d6259..1eec16f2c8 100644 --- a/ruby.c +++ b/ruby.c -@@ -1410,10 +1410,14 @@ proc_options(long argc, char **argv, ruby_cmdline_options_t *opt, int envopt) +@@ -1439,10 +1439,14 @@ proc_options(long argc, char **argv, ruby_cmdline_options_t *opt, int envopt) void Init_builtin_features(void); diff --git a/ruby.spec b/ruby.spec index bb45929..fdc4115 100644 --- a/ruby.spec +++ b/ruby.spec @@ -7,10 +7,10 @@ %global ruby_release %{ruby_version} # Specify the named version. It has precedense to revision. -%global milestone rc1 +#%%global milestone rc1 # Keep the revision enabled for pre-releases from SVN. -%global revision af11efd377 +#%%global revision af11efd377 %global ruby_archive %{name}-%{ruby_version} @@ -30,20 +30,20 @@ %global rubygems_dir %{_datadir}/rubygems # Bundled libraries versions -%global rubygems_version 3.1.1 +%global rubygems_version 3.1.2 %global rubygems_molinillo_version 0.5.7 -%global bundler_version 2.1.0 +%global bundler_version 2.1.2 %global bundler_connection_pool_version 2.2.2 %global bundler_fileutils_version 1.3.0 %global bundler_molinillo_version 0.6.6 %global bundler_net_http_persistent_version 3.1.0 %global bundler_thor_version 1.0.0 -%global bigdecimal_version 2.0.0.dev -%global did_you_mean_version 1.3.1 -%global io_console_version 0.5.2 -%global irb_version 1.2.0 +%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 json_version 2.3.0 %global minitest_version 5.13.0 %global net_telnet_version 0.2.0 @@ -52,7 +52,7 @@ %global psych_version 3.1.0 %global racc_version 1.4.16 %global rake_version 13.0.1 -%global rdoc_version 6.2.0 +%global rdoc_version 6.2.1 %global test_unit_version 3.3.4 %global xmlrpc_version 0.3.0 @@ -929,6 +929,7 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %{ruby_libdir}/observer %{ruby_libdir}/open3 %{ruby_libdir}/optparse +%{ruby_libdir}/ostruct %{ruby_libdir}/pstore %{ruby_libdir}/reline %{ruby_libdir}/rexml @@ -1087,18 +1088,18 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %{gem_dir}/specifications/default/getoptlong-0.1.0.gemspec %{gem_dir}/specifications/default/ipaddr-1.2.2.gemspec %{gem_dir}/specifications/default/logger-1.4.2.gemspec -%{gem_dir}/specifications/default/matrix-0.1.0.gemspec +%{gem_dir}/specifications/default/matrix-0.2.0.gemspec %{gem_dir}/specifications/default/mutex_m-0.1.0.gemspec %{gem_dir}/specifications/default/net-pop-0.1.0.gemspec %{gem_dir}/specifications/default/net-smtp-0.1.0.gemspec %{gem_dir}/specifications/default/observer-0.1.0.gemspec %{gem_dir}/specifications/default/open3-0.1.0.gemspec -%{gem_dir}/specifications/default/ostruct-0.1.0.gemspec -%{gem_dir}/specifications/default/prime-0.1.0.gemspec +%{gem_dir}/specifications/default/ostruct-0.2.0.gemspec +%{gem_dir}/specifications/default/prime-0.1.1.gemspec %{gem_dir}/specifications/default/pstore-0.1.0.gemspec -%{gem_dir}/specifications/default/readline-0.0.1.pre.1.gemspec -%{gem_dir}/specifications/default/readline-ext-0.1.0.pre.1.gemspec -%{gem_dir}/specifications/default/reline-0.0.7.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/rexml-3.2.3.gemspec %{gem_dir}/specifications/default/rss-0.2.8.gemspec %{gem_dir}/specifications/default/sdbm-1.0.0.gemspec @@ -1233,8 +1234,8 @@ make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %{gem_dir}/specifications/racc-%{racc_version}.gemspec %changelog -* Mon Jul 01 2019 Vít Ondruch - 2.7.0-1 -- Upgrade to Ruby 2.7.0-rc1. +* Tue Jan 07 2020 Vít Ondruch - 2.7.0-1 +- Upgrade to Ruby 2.7.0. - Drop useless %%{rubygems_default_filter}. - Fix checksec 2.0+ compatibility. From edf91e2b8a0170cc4fa2e40ff193106d1aef60db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 8 Jan 2020 15:11:16 +0100 Subject: [PATCH 19/26] Fix wrong evaluation of pre-release timestamps. It seems that the variables might be evaluated in wrong order, causing the `%{release_string}` to not be expanded properly, probably depending on RPM version. It seems that `%define`s are lazy evaluated, which fixes the situation. --- ruby.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ruby.spec b/ruby.spec index fdc4115..4ee7d8f 100644 --- a/ruby.spec +++ b/ruby.spec @@ -17,8 +17,8 @@ # If revision and milestone are removed/commented out, the official release build is expected. %if 0%{?milestone:1}%{?revision:1} != 0 %global ruby_archive %{ruby_archive}-%{?milestone}%{?!milestone:%{?revision}} -%define ruby_archive_timestamp %%(stat --printf='@%Y' %%{ruby_archive}.tar.xz | date -f - +"%Y%m%d") -%global development_release %{?milestone}%{?!milestone:%{?revision:%{ruby_archive_timestamp}git%{revision}}} +%define ruby_archive_timestamp %(stat --printf='@%Y' %{ruby_archive}.tar.xz | date -f - +"%Y%m%d") +%define development_release %{?milestone}%{?!milestone:%{?revision:%{ruby_archive_timestamp}git%{revision}}} %endif From a530c02102c72e6c37aa67b3047323eca5bd81a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 8 Jan 2020 15:26:09 +0100 Subject: [PATCH 20/26] Install Bundler by default. It might be required by RubyGems. --- ruby.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/ruby.spec b/ruby.spec index 4ee7d8f..b524d2d 100644 --- a/ruby.spec +++ b/ruby.spec @@ -226,6 +226,7 @@ Summary: The Ruby standard for packaging ruby libraries Version: %{rubygems_version} License: Ruby or MIT Requires: ruby(release) +Recommends: rubygem(bundler) >= %{bundler_version} Recommends: rubygem(rdoc) >= %{rdoc_version} Recommends: rubygem(io-console) >= %{io_console_version} Requires: rubygem(openssl) >= %{openssl_version} From 340daad2c53e03fdc65eebe426bda0ad4f505141 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 8 Jan 2020 17:54:21 +0100 Subject: [PATCH 21/26] Enable 'TestEnv#test_fetch' test fixed upstream. --- ruby.spec | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ruby.spec b/ruby.spec index b524d2d..70611aa 100644 --- a/ruby.spec +++ b/ruby.spec @@ -863,10 +863,6 @@ sed -i '/def test_mdns_each_address$/,/^ end$/ s/^/#/' test/resolv/test_mdns.rb # https://bugs.ruby-lang.org/issues/16410 MSPECOPTS="$MSPECOPTS -P 'File.utime allows Time instances in the far future to set mtime and atime'" -# Avoid TestEnv#test_fetch test failure due to did_you_mean gem presence. -# https://bugs.ruby-lang.org/issues/16361 -sed -i "/'key not found: \"test\"'/ s/'/\//g" test/ruby/test_env.rb - make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %files From 03b2317add71bcae4fac6b3e7d36cb83c468530a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 8 Jan 2020 17:55:54 +0100 Subject: [PATCH 22/26] Enable TestResolvMDNS#test_mdns_each_address test fixed upstream. --- ruby.spec | 5 ----- 1 file changed, 5 deletions(-) diff --git a/ruby.spec b/ruby.spec index 70611aa..b450762 100644 --- a/ruby.spec +++ b/ruby.spec @@ -853,11 +853,6 @@ MSPECOPTS="" DISABLE_TESTS="$DISABLE_TESTS -n !/test_segv_\(setproctitle\|test\|loaded_features\)/" %endif -# Disable failing TestResolvMDNS#test_mdns_each_address test, -# which fails on Koji. -# https://bugs.ruby-lang.org/issues/14175 -sed -i '/def test_mdns_each_address$/,/^ end$/ s/^/#/' test/resolv/test_mdns.rb - # Disable "File.utime allows Time instances in the far future to set # mtime and atime". # https://bugs.ruby-lang.org/issues/16410 From 75856ffd497fbfa299b862541d985734e683f5b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 9 Jan 2020 12:29:59 +0100 Subject: [PATCH 23/26] Increase timeout for TestBugReporter#test_bug_reporter_add This test case fails quite often on s390x. --- ruby.spec | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ruby.spec b/ruby.spec index b450762..b6a1766 100644 --- a/ruby.spec +++ b/ruby.spec @@ -858,6 +858,13 @@ DISABLE_TESTS="$DISABLE_TESTS -n !/test_segv_\(setproctitle\|test\|loaded_featur # https://bugs.ruby-lang.org/issues/16410 MSPECOPTS="$MSPECOPTS -P 'File.utime allows Time instances in the far future to set mtime and atime'" +# Increase timeout for TestBugReporter#test_bug_reporter_add test, which fails +# quite often. +# https://bugs.ruby-lang.org/issues/16492 +%ifarch s390x +sed -i '/assert_in_out_err/ s/)/, timeout: 30)/' test/-ext-/bug_reporter/test_bug_reporter.rb +%endif + make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS" %files From 2f49f603adc100f87dd7f845638ad5d4cda5b6bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 10 Jan 2020 14:27:00 +0100 Subject: [PATCH 24/26] Enable SIGSEV handler tests on AArch64. During the testing, I have not seen those. Not sure if anything changed or it was just pure luck. In worst case, this can always be reverted :) --- ruby.spec | 6 ------ 1 file changed, 6 deletions(-) diff --git a/ruby.spec b/ruby.spec index b6a1766..ba73f73 100644 --- a/ruby.spec +++ b/ruby.spec @@ -847,12 +847,6 @@ MSPECOPTS="" # Avoid `hostname' dependency. %{!?with_hostname:MSPECOPTS="-P 'Socket.gethostname returns the host name'"} -# SIGSEV handler does not provide correct output on AArch64. -# https://bugs.ruby-lang.org/issues/13758 -%ifarch aarch64 -DISABLE_TESTS="$DISABLE_TESTS -n !/test_segv_\(setproctitle\|test\|loaded_features\)/" -%endif - # Disable "File.utime allows Time instances in the far future to set # mtime and atime". # https://bugs.ruby-lang.org/issues/16410 From ca5296f757b8e0b267ebd50a47754c8fb97eb490 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 10 Jan 2020 15:49:07 +0100 Subject: [PATCH 25/26] Upload sources. --- sources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources b/sources index be8cf52..d32bf72 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ruby-2.6.3.tar.xz) = 959a613f5cf5b3185a1d7a7ba0e1921166b3930f30461b391b1c9fcfe396f56dc3c736123dfc7b4e72c32a97dc5a1eb1fd7f09bcc3793a3c5526f6644ba421c8 +SHA512 (ruby-2.7.0.tar.xz) = dd5690c631bf3a2b76cdc06902bcd76a89713a045e136debab9b8a81ff8c433bbb254aa09e4014ca1cf85a69ff4bcb13de11da5e40c224e7268be43ef2194af7 From b80da91f52ff1cfd5e807f4a97bbdc43bf8f7547 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 14 Jan 2020 17:03:46 +0100 Subject: [PATCH 26/26] Properly escape macro in comment. --- ruby.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index ba73f73..8e1cf6a 100644 --- a/ruby.spec +++ b/ruby.spec @@ -590,7 +590,7 @@ make install DESTDIR=%{buildroot} # Rename ruby/config.h to ruby/config-.h to avoid file conflicts on # multilib systems and install config.h wrapper %multilib_fix_c_header --file %{_includedir}/%{name}/config.h -# TODO: The correct patch should be %%{_includedir}/%%{name}/rb_mjit_min_header-%{ruby_version}.h +# TODO: The correct patch should be %%{_includedir}/%%{name}/rb_mjit_min_header-%%{ruby_version}.h # https://bugs.ruby-lang.org/issues/15425 %multilib_fix_c_header --file %{_includedir}/rb_mjit_min_header-%{ruby_version}.h