#70 [WIP] Upgrade to Ruby 3.0
Closed 9 months ago by vondruch. Opened a year ago by vondruch.

file modified
+1 -2
@@ -1,4 +1,3 @@ 

  /*/

- /ruby-2.*.tar.bz2

- /ruby-2.*.tar.xz

+ /ruby-*.tar.xz

  /*.rpm

@@ -11,7 +11,7 @@ 

  index d261ea57b5..3c13076b82 100644

  --- a/configure.ac

  +++ b/configure.ac

- @@ -3102,6 +3102,11 @@ AS_IF([test ${multiarch+set}], [

+ @@ -3211,6 +3211,11 @@ AS_IF([test ${multiarch+set}], [

   ])

   

   archlibdir='${libdir}/${arch}'

@@ -14,7 +14,7 @@ 

  index c42436c23d..d261ea57b5 100644

  --- a/configure.ac

  +++ b/configure.ac

- @@ -3740,7 +3740,8 @@ AS_CASE(["$ruby_version_dir_name"],

+ @@ -3852,7 +3852,8 @@ AS_CASE(["$ruby_version_dir_name"],

   ruby_version_dir=/'${ruby_version_dir_name}'

   

   if test -z "${ruby_version_dir_name}"; then

@@ -11,7 +11,7 @@ 

  index 3c13076b82..93af30321d 100644

  --- a/configure.ac

  +++ b/configure.ac

- @@ -3804,6 +3804,8 @@ AC_SUBST(vendorarchdir)dnl

+ @@ -3916,6 +3916,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

   

@@ -15,7 +15,7 @@ 

  index 93af30321d..bc13397e0e 100644

  --- a/configure.ac

  +++ b/configure.ac

- @@ -3776,6 +3776,10 @@ AC_ARG_WITH(vendorarchdir,

+ @@ -3888,6 +3888,10 @@ AC_ARG_WITH(vendorarchdir,

               [vendorarchdir=$withval],

               [vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby'${ruby_version_dir}}${multiarch-'${vendorlibdir}/${sitearch}'}])

   
@@ -26,7 +26,7 @@ 

   AS_IF([test "${LOAD_RELATIVE+set}"], [

       AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE)

       RUBY_EXEC_PREFIX=''

- @@ -3800,6 +3804,7 @@ AC_SUBST(sitearchdir)dnl

+ @@ -3912,6 +3916,7 @@ AC_SUBST(sitearchdir)dnl

   AC_SUBST(vendordir)dnl

   AC_SUBST(vendorlibdir)dnl

   AC_SUBST(vendorarchdir)dnl
@@ -64,18 +64,18 @@ 

   % R = {}

   % R["ruby_version"] = '"RUBY_LIB_VERSION"'

  diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb

- index b47b6e1..0b99408 100755

+ index e9110a17ca..76a1f0a315 100755

  --- a/tool/rbinstall.rb

  +++ b/tool/rbinstall.rb

- @@ -338,6 +338,7 @@ def CONFIG.[](name, mandatory = false)

-  sitearchlibdir = CONFIG["sitearchdir"]

-  vendorlibdir = CONFIG["vendorlibdir"]

-  vendorarchlibdir = CONFIG["vendorarchdir"]

+ @@ -348,6 +348,7 @@ def CONFIG.[](name, mandatory = false)

+    vendorlibdir = CONFIG["vendorlibdir"]

+    vendorarchlibdir = CONFIG["vendorarchdir"]

+  end

  +rubygemsdir = CONFIG["rubygemsdir"]

   mandir = CONFIG["mandir", true]

   docdir = CONFIG["docdir", true]

   enable_shared = CONFIG["ENABLE_SHARED"] == 'yes'

- @@ -565,7 +566,16 @@ def stub

+ @@ -580,7 +581,16 @@ def stub

   install?(:local, :comm, :lib) do

     prepare "library scripts", rubylibdir

     noinst = %w[*.txt *.rdoc *.gemspec]

file modified
+21 -21
@@ -20,7 +20,7 @@ 

  index 80b137e380..63cd3b4f8b 100644

  --- a/configure.ac

  +++ b/configure.ac

- @@ -3691,9 +3691,6 @@ AS_CASE(["$target_os"],

+ @@ -3803,9 +3803,6 @@ AS_CASE(["$target_os"],

       rubyw_install_name='$(RUBYW_INSTALL_NAME)'

       ])

   
@@ -30,7 +30,7 @@ 

   rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'}

   AC_ARG_WITH(rubyarchprefix,

   	    AS_HELP_STRING([--with-rubyarchprefix=DIR],

- @@ -3716,56 +3713,62 @@ AC_ARG_WITH(ridir,

+ @@ -3828,56 +3825,62 @@ AC_ARG_WITH(ridir,

   AC_SUBST(ridir)

   AC_SUBST(RI_BASE_NAME)

   
@@ -120,7 +120,7 @@ 

   

   AS_IF([test "${LOAD_RELATIVE+set}"], [

       AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE)

- @@ -3782,6 +3785,7 @@ AC_SUBST(sitearchincludedir)dnl

+ @@ -3894,6 +3897,7 @@ AC_SUBST(sitearchincludedir)dnl

   AC_SUBST(arch)dnl

   AC_SUBST(sitearch)dnl

   AC_SUBST(ruby_version)dnl
@@ -165,13 +165,13 @@ 

  -  version = RbConfig::CONFIG['ruby_version']

  +  version = RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version']

   

-    BASE    = if RbConfig::CONFIG.key? 'ridir' then

-                File.join RbConfig::CONFIG['ridir'], version

+    BASE    = File.join RbConfig::CONFIG['ridir'], version

+  

  diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb

  index d4c110e..d39c9a6 100755

  --- a/tool/rbinstall.rb

  +++ b/tool/rbinstall.rb

- @@ -428,7 +428,7 @@ def CONFIG.[](name, mandatory = false)

+ @@ -438,7 +438,7 @@ def CONFIG.[](name, mandatory = false)

   

   install?(:doc, :rdoc) do

     if $rdocdir
@@ -198,33 +198,33 @@ 

  index d4ff4a262c..3f9a5bf590 100644

  --- a/lib/rubygems/defaults.rb

  +++ b/lib/rubygems/defaults.rb

- @@ -32,13 +32,13 @@ def self.default_dir

+ @@ -38,13 +38,13 @@ def self.default_dir

                [

                  File.dirname(RbConfig::CONFIG['sitedir']),

                  'Gems',

- -               RbConfig::CONFIG['ruby_version']

+ -               RbConfig::CONFIG['ruby_version'],

  +               RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version']

                ]

              else

                [

                  RbConfig::CONFIG['rubylibprefix'],

                  'gems',

- -               RbConfig::CONFIG['ruby_version']

+ -               RbConfig::CONFIG['ruby_version'],

  +               RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version']

                ]

              end

   

- @@ -75,7 +75,8 @@ def self.default_specifications_dir

-  

-    def self.user_dir

-      parts = [Gem.user_home, '.gem', ruby_engine]

+ @@ -117,7 +117,8 @@ def self.user_dir

+      gem_dir = File.join(Gem.user_home, ".gem")

+      gem_dir = File.join(Gem.data_home, "gem") unless File.exist?(gem_dir)

+      parts = [gem_dir, ruby_engine]

  -    parts << RbConfig::CONFIG['ruby_version'] unless RbConfig::CONFIG['ruby_version'].empty?

  +    ruby_version_dir_name = RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version']

  +    parts << ruby_version_dir_name unless ruby_version_dir_name.empty?

       File.join parts

     end

   

- @@ -158,7 +159,7 @@ def self.vendor_dir # :nodoc:

+ @@ -252,7 +253,7 @@ def self.vendor_dir # :nodoc:

       return nil unless RbConfig::CONFIG.key? 'vendordir'

   

       File.join RbConfig::CONFIG['vendordir'], 'gems',
@@ -237,7 +237,7 @@ 

  index b25068405d..e9fef4a311 100644

  --- a/test/rubygems/test_gem.rb

  +++ b/test/rubygems/test_gem.rb

- @@ -1353,7 +1353,8 @@ def test_self_use_paths

+ @@ -1369,7 +1369,8 @@ def test_self_use_paths

   

     def test_self_user_dir

       parts = [@userhome, '.gem', Gem.ruby_engine]
@@ -245,9 +245,9 @@ 

  +    ruby_version_dir_name = RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version']

  +    parts << ruby_version_dir_name unless ruby_version_dir_name.empty?

   

-      assert_equal File.join(parts), Gem.user_dir

-    end

- @@ -1429,7 +1430,7 @@ def test_self_vendor_dir

+      FileUtils.mkdir_p File.join(parts)

+  

+ @@ -1447,7 +1448,7 @@ def test_self_vendor_dir

       vendordir(File.join(@tempdir, 'vendor')) do

         expected =

           File.join RbConfig::CONFIG['vendordir'], 'gems',
@@ -274,15 +274,15 @@ 

  index a00f2b6776..999e2d6d5d 100644

  --- a/configure.ac

  +++ b/configure.ac

- @@ -98,7 +98,7 @@ RUBY_BASE_NAME=`echo ruby | sed "$program_transform_name"`

+ @@ -81,7 +81,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)

  -AC_SUBST(RUBY_VERSION_NAME, '${RUBY_BASE_NAME}-${ruby_version}')

  +AC_SUBST(RUBY_VERSION_NAME, '${RUBY_BASE_NAME}-${ruby_version_dir_name}')

   

-  AC_CANONICAL_TARGET

-  test x"$target_alias" = x &&

+  dnl checks for alternative programs

+  AC_CANONICAL_BUILD

  -- 

  2.1.0

  

@@ -8,122 +8,20 @@ 

  

  This workaround rhbz#1361037

  ---

-  test/fiddle/helper.rb | 105 ------------------------------------------

-  1 file changed, 105 deletions(-)

+  test/fiddle/helper.rb |    3 +++

+  1 file changed, 3 insertions(+)

  

  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,111 +6,6 @@

+ @@ -139,6 +139,9 @@

+    libc_so = libm_so = "/usr/lib/libSystem.B.dylib"

+  end

   

-  libc_so = libm_so = nil

-  

- -case RUBY_PLATFORM

- -when /cygwin/

- -  libc_so = "cygwin1.dll"

- -  libm_so = "cygwin1.dll"

- -when /android/

- -  libdir = '/system/lib'

- -  if [0].pack('L!').size == 8

- -    libdir = '/system/lib64'

- -  end

- -  libc_so = File.join(libdir, "libc.so")

- -  libm_so = File.join(libdir, "libm.so")

- -when /linux/

- -  libdir = '/lib'

- -  case RbConfig::SIZEOF['void*']

- -  when 4

- -    # 32-bit ruby

- -    case RUBY_PLATFORM

- -    when /armv\w+-linux/

- -      # In the ARM 32-bit libc package such as libc6:armhf libc6:armel,

- -      # libc.so and libm.so are installed to /lib/arm-linux-gnu*.

- -      # It's not installed to /lib32.

- -      dirs = Dir.glob('/lib/arm-linux-gnu*')

- -      libdir = dirs[0] if dirs && File.directory?(dirs[0])

- -    else

- -      libdir = '/lib32' if File.directory? '/lib32'

- -    end

- -  when 8

- -    # 64-bit ruby

- -    libdir = '/lib64' if File.directory? '/lib64'

- -  end

- -  libc_so = File.join(libdir, "libc.so.6")

- -  libm_so = File.join(libdir, "libm.so.6")

- -when /mingw/, /mswin/

- -  require "rbconfig"

- -  crtname = RbConfig::CONFIG["RUBY_SO_NAME"][/msvc\w+/] || 'ucrtbase'

- -  libc_so = libm_so = "#{crtname}.dll"

- -when /darwin/

- -  libc_so = "/usr/lib/libc.dylib"

- -  libm_so = "/usr/lib/libm.dylib"

- -when /kfreebsd/

- -  libc_so = "/lib/libc.so.0.1"

- -  libm_so = "/lib/libm.so.1"

- -when /gnu/	#GNU/Hurd

- -  libc_so = "/lib/libc.so.0.3"

- -  libm_so = "/lib/libm.so.6"

- -when /mirbsd/

- -  libc_so = "/usr/lib/libc.so.41.10"

- -  libm_so = "/usr/lib/libm.so.7.0"

- -when /freebsd/

- -  libc_so = "/lib/libc.so.7"

- -  libm_so = "/lib/libm.so.5"

- -when /bsd|dragonfly/

- -  libc_so = "/usr/lib/libc.so"

- -  libm_so = "/usr/lib/libm.so"

- -when /solaris/

- -  libdir = '/lib'

- -  case RbConfig::SIZEOF['void*']

- -  when 4

- -    # 32-bit ruby

- -    libdir = '/lib' if File.directory? '/lib'

- -  when 8

- -    # 64-bit ruby

- -    libdir = '/lib/64' if File.directory? '/lib/64'

- -  end

- -  libc_so = File.join(libdir, "libc.so")

- -  libm_so = File.join(libdir, "libm.so")

- -when /aix/

- -  pwd=Dir.pwd

- -  libc_so = libm_so = "#{pwd}/libaixdltest.so"

- -  unless File.exist? libc_so

- -    cobjs=%w!strcpy.o!

- -    mobjs=%w!floats.o sin.o!

- -    funcs=%w!sin sinf strcpy strncpy!

- -    expfile='dltest.exp'

- -    require 'tmpdir'

- -    Dir.mktmpdir do |dir|

- -      begin

- -        Dir.chdir dir

- -        %x!/usr/bin/ar x /usr/lib/libc.a #{cobjs.join(' ')}!

- -        %x!/usr/bin/ar x /usr/lib/libm.a #{mobjs.join(' ')}!

- -        %x!echo "#{funcs.join("\n")}\n" > #{expfile}!

- -        require 'rbconfig'

- -        if RbConfig::CONFIG["GCC"] = 'yes'

- -          lflag='-Wl,'

- -        else

- -          lflag=''

- -        end

- -        flags="#{lflag}-bE:#{expfile} #{lflag}-bnoentry -lm"

- -        %x!#{RbConfig::CONFIG["LDSHARED"]} -o #{libc_so} #{(cobjs+mobjs).join(' ')} #{flags}!

- -      ensure

- -        Dir.chdir pwd

- -      end

- -    end

- -  end

- -else

- -  libc_so = ARGV[0] if ARGV[0] && ARGV[0][0] == ?/

- -  libm_so = ARGV[1] if ARGV[1] && ARGV[1][0] == ?/

- -  if( !(libc_so && libm_so) )

- -    $stderr.puts("libc and libm not found: #{$0} <libc> <libm>")

- -  end

- -end

- -

- -libc_so = nil if !libc_so || (libc_so[0] == ?/ && !File.file?(libc_so))

- -libm_so = nil if !libm_so || (libm_so[0] == ?/ && !File.file?(libm_so))

- -

+ +# Just ignore the heuristic, because it is not reliable on all platforms.

+ +libc_so = libm_so = nil

+ +

   if !libc_so || !libm_so

     ruby = EnvUtil.rubybin

     # When the ruby binary is 32-bit and the host is 64-bit,

@@ -1,182 +0,0 @@ 

- From f46bac1f3e8634e24c747d06b28e11b874f1e488 Mon Sep 17 00:00:00 2001

- From: Kazuki Yamaguchi <k@rhe.jp>

- Date: Thu, 16 Aug 2018 19:40:48 +0900

- Subject: [PATCH] config: support .include directive

- 

- OpenSSL 1.1.1 introduces a new '.include' directive. Update our config

- parser to support that.

- 

- As mentioned in the referenced GitHub issue, we should use the OpenSSL

- API instead of implementing the parsing logic ourselves, but it will

- need backwards-incompatible changes which we can't backport to stable

- versions. So continue to use the Ruby implementation for now.

- 

- Reference: https://github.com/ruby/openssl/issues/208

- ---

-  ext/openssl/lib/openssl/config.rb | 54 ++++++++++++++++++++-----------

-  test/openssl/test_config.rb       | 54 +++++++++++++++++++++++++++++++

-  2 files changed, 90 insertions(+), 18 deletions(-)

- 

- diff --git a/ext/openssl/lib/openssl/config.rb b/ext/openssl/lib/openssl/config.rb

- index 88225451..ba3a54c8 100644

- --- a/ext/openssl/lib/openssl/config.rb

- +++ b/ext/openssl/lib/openssl/config.rb

- @@ -77,29 +77,44 @@ def get_key_string(data, section, key) # :nodoc:

-        def parse_config_lines(io)

-          section = 'default'

-          data = {section => {}}

- -        while definition = get_definition(io)

- +        io_stack = [io]

- +        while definition = get_definition(io_stack)

-            definition = clear_comments(definition)

-            next if definition.empty?

- -          if definition[0] == ?[

- +          case definition

- +          when /\A\[/

-              if /\[([^\]]*)\]/ =~ definition

-                section = $1.strip

-                data[section] ||= {}

-              else

-                raise ConfigError, "missing close square bracket"

-              end

- -          else

- -            if /\A([^:\s]*)(?:::([^:\s]*))?\s*=(.*)\z/ =~ definition

- -              if $2

- -                section = $1

- -                key = $2

- -              else

- -                key = $1

- +          when /\A\.include (\s*=\s*)?(.+)\z/

- +            path = $2

- +            if File.directory?(path)

- +              files = Dir.glob(File.join(path, "*.{cnf,conf}"), File::FNM_EXTGLOB)

- +            else

- +              files = [path]

- +            end

- +

- +            files.each do |filename|

- +              begin

- +                io_stack << StringIO.new(File.read(filename))

- +              rescue

- +                raise ConfigError, "could not include file '%s'" % filename

-                end

- -              value = unescape_value(data, section, $3)

- -              (data[section] ||= {})[key] = value.strip

- +            end

- +          when /\A([^:\s]*)(?:::([^:\s]*))?\s*=(.*)\z/

- +            if $2

- +              section = $1

- +              key = $2

-              else

- -              raise ConfigError, "missing equal sign"

- +              key = $1

-              end

- +            value = unescape_value(data, section, $3)

- +            (data[section] ||= {})[key] = value.strip

- +          else

- +            raise ConfigError, "missing equal sign"

-            end

-          end

-          data

- @@ -212,10 +227,10 @@ def clear_comments(line)

-          scanned.join

-        end

-  

- -      def get_definition(io)

- -        if line = get_line(io)

- +      def get_definition(io_stack)

- +        if line = get_line(io_stack)

-            while /[^\\]\\\z/ =~ line

- -            if extra = get_line(io)

- +            if extra = get_line(io_stack)

-                line += extra

-              else

-                break

- @@ -225,9 +240,12 @@ def get_definition(io)

-          end

-        end

-  

- -      def get_line(io)

- -        if line = io.gets

- -          line.gsub(/[\r\n]*/, '')

- +      def get_line(io_stack)

- +        while io = io_stack.last

- +          if line = io.gets

- +            return line.gsub(/[\r\n]*/, '')

- +          end

- +          io_stack.pop

-          end

-        end

-      end

- diff --git a/test/openssl/test_config.rb b/test/openssl/test_config.rb

- index 99dcc497..5653b5d0 100644

- --- a/test/openssl/test_config.rb

- +++ b/test/openssl/test_config.rb

- @@ -120,6 +120,49 @@ def test_s_parse_format

-      assert_equal("error in line 7: missing close square bracket", excn.message)

-    end

-  

- +  def test_s_parse_include

- +    in_tmpdir("ossl-config-include-test") do |dir|

- +      Dir.mkdir("child")

- +      File.write("child/a.conf", <<~__EOC__)

- +        [default]

- +        file-a = a.conf

- +        [sec-a]

- +        a = 123

- +      __EOC__

- +      File.write("child/b.cnf", <<~__EOC__)

- +        [default]

- +        file-b = b.cnf

- +        [sec-b]

- +        b = 123

- +      __EOC__

- +      File.write("include-child.conf", <<~__EOC__)

- +        key_outside_section = value_a

- +        .include child

- +      __EOC__

- +

- +      include_file = <<~__EOC__

- +        [default]

- +        file-main = unnamed

- +        [sec-main]

- +        main = 123

- +        .include = include-child.conf

- +      __EOC__

- +

- +      # Include a file by relative path

- +      c1 = OpenSSL::Config.parse(include_file)

- +      assert_equal(["default", "sec-a", "sec-b", "sec-main"], c1.sections.sort)

- +      assert_equal(["file-main", "file-a", "file-b"], c1["default"].keys)

- +      assert_equal({"a" => "123"}, c1["sec-a"])

- +      assert_equal({"b" => "123"}, c1["sec-b"])

- +      assert_equal({"main" => "123", "key_outside_section" => "value_a"}, c1["sec-main"])

- +

- +      # Relative paths are from the working directory

- +      assert_raise(OpenSSL::ConfigError) do

- +        Dir.chdir("child") { OpenSSL::Config.parse(include_file) }

- +      end

- +    end

- +  end

- +

-    def test_s_load

-      # alias of new

-      c = OpenSSL::Config.load

- @@ -299,6 +342,17 @@ def test_clone

-      @it['newsection'] = {'a' => 'b'}

-      assert_not_equal(@it.sections.sort, c.sections.sort)

-    end

- +

- +  private

- +

- +  def in_tmpdir(*args)

- +    Dir.mktmpdir(*args) do |dir|

- +      dir = File.realpath(dir)

- +      Dir.chdir(dir) do

- +        yield dir

- +      end

- +    end

- +  end

-  end

-  

-  end

@@ -15,7 +15,7 @@ 

  [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 ++++++++++++++

+  abrt.c    | 12 ++++++++++++

   common.mk |  3 ++-

   ruby.c    |  4 ++++

   3 files changed, 18 insertions(+), 1 deletion(-)
@@ -57,7 +57,7 @@ 

  index 60c57d6259..1eec16f2c8 100644

  --- a/ruby.c

  +++ b/ruby.c

- @@ -1439,10 +1439,14 @@ proc_options(long argc, char **argv, ruby_cmdline_options_t *opt, int envopt)

+ @@ -1489,10 +1489,14 @@ proc_options(long argc, char **argv, ruby_cmdline_options_t *opt, int envopt)

   

   void Init_builtin_features(void);

   

@@ -1,32 +0,0 @@ 

- From 6532dbecf36d1f24dab1f2143afd171e0b7699eb Mon Sep 17 00:00:00 2001

- From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>

- 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.

- ---

-  .../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 Bundler::Persistent::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

- 

@@ -0,0 +1,34 @@ 

+ From 9b42fce32bff25e0569581f76f532b9d57865aef Mon Sep 17 00:00:00 2001

+ From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>

+ Date: Mon, 27 Jul 2020 14:56:05 +0200

+ Subject: [PATCH] Timeout the test_bug_reporter_add witout raising error.

+ 

+ While timeouting the threads might be still good idea, it does not seems

+ the timeout impacts the TestBugReporter#test_bug_reporter_add result,

+ because the output of the child process has been already collected

+ earlier.

+ 

+ It seems that when the system is under heavy load, the thread might not

+ be sheduled to finish its processing. Even finishing the child process

+ might take tens of seconds and therefore the test case finish might take

+ a while.

+ ---

+  test/-ext-/bug_reporter/test_bug_reporter.rb | 2 +-

+  1 file changed, 1 insertion(+), 1 deletion(-)

+ 

+ diff --git a/test/-ext-/bug_reporter/test_bug_reporter.rb b/test/-ext-/bug_reporter/test_bug_reporter.rb

+ index 628fcd0340..2c677cc8a7 100644

+ --- a/test/-ext-/bug_reporter/test_bug_reporter.rb

+ +++ b/test/-ext-/bug_reporter/test_bug_reporter.rb

+ @@ -21,7 +21,7 @@ def test_bug_reporter_add

+      args = ["--disable-gems", "-r-test-/bug_reporter",

+              "-C", tmpdir]

+      stdin = "register_sample_bug_reporter(12345); Process.kill :SEGV, $$"

+ -    assert_in_out_err(args, stdin, [], expected_stderr, encoding: "ASCII-8BIT")

+ +    assert_in_out_err(args, stdin, [], expected_stderr, encoding: "ASCII-8BIT", timeout_error: nil)

+    ensure

+      FileUtils.rm_rf(tmpdir) if tmpdir

+    end

+ -- 

+ 2.27.0

+ 

file modified
+472 -319
@@ -1,5 +1,5 @@ 

- %global major_version 2

- %global minor_version 7

+ %global major_version 3

+ %global minor_version 0

  %global teeny_version 0

  %global major_minor_version %{major_version}.%{minor_version}

  
@@ -9,20 +9,20 @@ 

  # Specify the named version. It has precedense to revision.

  #%%global milestone rc1

  

- # Keep the revision enabled for pre-releases from SVN.

- #%%global revision af11efd377

+ # Keep the revision enabled for pre-releases from GIT.

+ #%%global revision 684649ea05

  

  %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 ruby_archive %{ruby_archive}-%{?milestone}%{?!milestone:%{?revision}}

- %define ruby_archive_timestamp %(stat --printf='@%Y' %{ruby_archive}.tar.xz | date -f - +"%Y%m%d")

+ %define ruby_archive_timestamp %(stat --printf='@%Y' %{_sourcedir}/%{ruby_archive}.tar.xz | date -f - +"%Y%m%d")

  %define development_release %{?milestone}%{?!milestone:%{?revision:%{ruby_archive_timestamp}git%{revision}}}

  %endif

  

  

- %global release 127

+ %global release 138

  %{!?release_string:%define release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}}

  

  # The RubyGems library has to stay out of Ruby directory tree, since the
@@ -30,39 +30,40 @@ 

  %global rubygems_dir %{_datadir}/rubygems

  

  # Bundled libraries versions

- %global rubygems_version 3.1.2

- %global rubygems_molinillo_version 0.5.7

+ %global rubygems_version 3.2.3

+ %global rubygems_molinillo_version 0.7.0

  

- %global bundler_version 2.1.2

+ # Default gems.

+ %global bundler_version 2.2.3

  %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

- %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

- %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

- %global rake_version 13.0.1

- %global rdoc_version 6.2.1

- %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.

- # https://bugzilla.redhat.com/show_bug.cgi?id=888262

- %global tapset_root %{_datadir}/systemtap

- %global tapset_dir %{tapset_root}/tapset

- %global tapset_libdir %(echo %{_libdir} | sed 's/64//')*

+ %global bundler_fileutils_version 1.4.1

+ %global bundler_molinillo_version 0.7.0

+ %global bundler_net_http_persistent_version 4.0.0

+ %global bundler_thor_version 1.0.1

+ %global bundler_uri_version 0.10.0

+ 

+ %global bigdecimal_version 3.0.0

+ %global did_you_mean_version 1.5.0

+ %global erb_version 2.2.0

+ %global io_console_version 0.5.6

+ %global irb_version 1.3.0

+ %global json_version 2.5.1

+ %global openssl_version 2.2.0

+ %global psych_version 3.3.0

+ %global racc_version 1.5.1

+ %global rdoc_version 6.3.0

+ 

+ # Bundled gems.

+ %global minitest_version 5.14.2

+ %global power_assert_version 1.2.0

+ %global rake_version 13.0.3

+ %global rbs_version 1.0.0

+ %global test_unit_version 3.3.7

+ %global rexml_version 3.2.4

+ %global rss_version 0.2.9

+ %global typeprof_version 0.11.0

  

- %global _normalized_cpu %(echo %{_target_cpu} | sed 's/^ppc/powerpc/;s/i.86/i386/;s/sparcv./sparc/')

+ %global tapset_libdir %(echo %{_libdir} | sed 's/64//')*

  

  %if 0%{?fedora} >= 19

  %bcond_without rubypick
@@ -78,6 +79,10 @@ 

  %bcond_without hardening_test

  %endif

  

+ # LTO appears to cause some issue to SEGV handler.

+ # https://bugs.ruby-lang.org/issues/17052

+ %define _lto_cflags %{nil}

+ 

  Summary: An interpreter of object-oriented scripting language

  Name: ruby

  Version: %{ruby_version}
@@ -140,23 +145,15 @@ 

  # 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

- Patch22: ruby-2.6.0-config-support-include-directive.patch

+ # Avoid possible timeout errors in TestBugReporter#test_bug_reporter_add.

+ # https://bugs.ruby-lang.org/issues/16492

+ Patch19: ruby-2.7.1-Timeout-the-test_bug_reporter_add-witout-raising-err.patch

  

  Requires: %{name}-libs%{?_isa} = %{version}-%{release}

  Suggests: rubypick

  Recommends: ruby(rubygems) >= %{rubygems_version}

  Recommends: rubygem(bigdecimal) >= %{bigdecimal_version}

- # Change this to requires, hopefully just as temporary measure.

- # https://bugs.ruby-lang.org/issues/16431

- Requires: rubygem(did_you_mean) >= %{did_you_mean_version}

  Recommends: rubygem(openssl) >= %{openssl_version}

- Recommends: rubygem(racc) >= %{racc_version}

  

  BuildRequires: autoconf

  BuildRequires: gdbm-devel
@@ -176,6 +173,7 @@ 

  %{?with_hostname:BuildRequires: %{_bindir}/hostname}

  BuildRequires: multilib-rpm-config

  BuildRequires: gcc

+ BuildRequires: make

  BuildRequires: zlib-devel

  

  # This package provides %%{_bindir}/ruby-mri therefore it is marked by this
@@ -195,6 +193,9 @@ 

  # This would not be needed if ~50 packages depending on -devel used

  # --disable-gems

  Requires:   rubygems

+ # Users need CFLAGS from /usr/lib/rpm/redhat/redhat-hardened-cc1

+ # for building gems with binary extensions (rhbz#1905222).

+ Recommends: redhat-rpm-config

  

  %description devel

  Header files and libraries for building an extension library for the
@@ -212,12 +213,19 @@ 

  Provides: bundled(ccan-container_of)

  Provides: bundled(ccan-list)

  

- # Tcl/Tk support was removed from stdlib in Ruby 2.4, i.e. F27 timeframe

- # so lets obsolete it. This is not the best place, but we don't have

- # better, unless https://fedorahosted.org/fpc/ticket/645 provides some

- # generic solution.

+ # StdLib default gems.

+ Provides: bundled(rubygem-did_you_mean) = %{did_you_mean_version}

+ Provides: bundled(rubygem-racc) = %{racc_version}

+ 

+ # Tcl/Tk support was removed from stdlib in Ruby 2.4, i.e. F27 timeframe.

  Obsoletes: ruby-tcltk < 2.4.0

  

+ # The Net::Telnet and XMLRPC were removed in Ruby 2.8, i.e. F34 timeframe.

+ # https://bugs.ruby-lang.org/issues/16484

+ # TODO: Update the versions prior landing in Fedora.

+ Obsoletes: rubygem-net-telnet < 0.2.0-%{release}

+ Obsoletes: rubygem-xmlrpc < 0.3.0-%{release}

+ 

  

  %description libs

  This package includes the libruby, necessary to run Ruby.
@@ -249,7 +257,7 @@ 

  Summary:    Macros and development tools for packaging RubyGems

  Version:    %{rubygems_version}

  License:    Ruby or MIT

- Requires:   ruby(rubygems) = %{version}-%{release}

+ Requires:   ruby(rubygems) >= %{version}-%{release}

  # Needed for RDoc documentation format generation.

  Requires:   rubygem(json) >= %{json_version}

  Requires:   rubygem(rdoc) >= %{rdoc_version}
@@ -259,19 +267,23 @@ 

  Macros and development tools for packaging RubyGems.

  

  

- %package -n rubygem-rake

- Summary:    Ruby based make-like utility

- Version:    %{rake_version}

- License:    MIT

- Requires:   ruby(release)

+ # Default gems

+ #

+ # These packages are part of Ruby StdLib and are expected to be loadable even

+ # with disabled RubyGems.

+ 

+ %package default-gems

+ Summary:    Default gems which are part of Ruby StdLib.

  Requires:   ruby(rubygems) >= %{rubygems_version}

- Provides:   rake = %{version}-%{release}

- Provides:   rubygem(rake) = %{version}-%{release}

+ Supplements: ruby(rubygems)

+ # Obsoleted by Ruby 2.7 in F32 timeframe.

+ Obsoletes: rubygem-did_you_mean < 1.4.0-130

+ Obsoletes: rubygem-racc < 1.4.16-130

  BuildArch:  noarch

  

- %description -n rubygem-rake

- Rake is a Make-like program implemented in Ruby. Tasks and dependencies are

- specified in standard Ruby syntax.

+ %description default-gems

+ The .gemspec files and executables of default gems, which are part of Ruby

+ StdLib.

  

  

  %package -n rubygem-irb
@@ -279,6 +291,9 @@ 

  Version:    %{irb_version}

  Requires:   ruby(release)

  Requires:   ruby(rubygems) >= %{rubygems_version}

+ # ruby-default-gems is required to run irb.

+ # https://bugs.ruby-lang.org/issues/16951

+ Requires:   ruby-default-gems >= %{ruby_version}

  Provides:   irb = %{version}-%{release}

  Provides:   rubygem(irb) = %{version}-%{release}

  # Obsoleted by Ruby 2.6 in F30 timeframe.
@@ -343,20 +358,6 @@ 

  conversion between base 10 and base 2.

  

  

- %package -n rubygem-did_you_mean

- Summary:    "Did you mean?" experience in Ruby

- Version:    %{did_you_mean_version}

- License:    MIT

- Requires:   ruby(release)

- Requires:   ruby(rubygems) >= %{rubygems_version}

- Provides:   rubygem(did_you_mean) = %{version}-%{release}

- BuildArch:  noarch

- 

- %description -n rubygem-did_you_mean

- "did you mean?" experience in Ruby: the error message will tell you the right

- one when you misspelled something.

- 

- 

  %package -n rubygem-io-console

  Summary:    IO/Console is a simple console utilizing library

  Version:    %{io_console_version}
@@ -385,6 +386,61 @@ 

  markup language.

  

  

+ %package -n rubygem-openssl

+ Summary:    OpenSSL provides SSL, TLS and general purpose cryptography

+ Version:    %{openssl_version}

+ License:    Ruby or BSD

+ Requires:   ruby(release)

+ Requires:   ruby(rubygems) >= %{rubygems_version}

+ Provides:   rubygem(openssl) = %{version}-%{release}

+ 

+ %description -n rubygem-openssl

+ OpenSSL provides SSL, TLS and general purpose cryptography. It wraps the

+ OpenSSL library.

+ 

+ 

+ %package -n rubygem-psych

+ Summary:    A libyaml wrapper for Ruby

+ Version:    %{psych_version}

+ License:    MIT

+ Requires:   ruby(release)

+ Requires:   ruby(rubygems) >= %{rubygems_version}

+ Provides:   rubygem(psych) = %{version}-%{release}

+ 

+ %description -n rubygem-psych

+ Psych is a YAML parser and emitter. Psych leverages

+ libyaml[http://pyyaml.org/wiki/LibYAML] for its YAML parsing and emitting

+ capabilities. In addition to wrapping libyaml, Psych also knows how to

+ serialize and de-serialize most Ruby objects to and from the YAML format.

+ 

+ 

+ %package -n rubygem-bundler

+ Summary:    Library and utilities to manage a Ruby application's gem dependencies

+ Version:    %{bundler_version}

+ License:    MIT

+ Requires:   ruby(release)

+ 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}

+ Provides:   bundled(rubygem-thor) = %{bundler_thor_version}

+ Provides:   bundled(rubygem-uri) = %{bundler_uri_version}

+ BuildArch:  noarch

+ 

+ %description -n rubygem-bundler

+ Bundler manages an application's dependencies through its entire life, across

+ many machines, systematically and repeatably.

+ 

+ 

+ # Bundled gems

+ #

+ # These are regular packages, which might be installed just optionally. Users

+ # should list them among their dependencies (in Gemfile).

+ 

  %package -n rubygem-minitest

  Summary:    Minitest provides a complete suite of testing facilities

  Version:    %{minitest_version}
@@ -409,19 +465,6 @@ 

  output.

  

  

- %package -n rubygem-openssl

- Summary:    OpenSSL provides SSL, TLS and general purpose cryptography

- Version:    %{openssl_version}

- License:    Ruby or BSD

- Requires:   ruby(release)

- Requires:   ruby(rubygems) >= %{rubygems_version}

- Provides:   rubygem(openssl) = %{version}-%{release}

- 

- %description -n rubygem-openssl

- OpenSSL provides SSL, TLS and general purpose cryptography. It wraps the

- OpenSSL library.

- 

- 

  %package -n rubygem-power_assert

  Summary:    Power Assert for Ruby

  Version:    %{power_assert_version}
@@ -437,38 +480,33 @@ 

  condition is not satisfied.

  

  

- %package -n rubygem-psych

- Summary:    A libyaml wrapper for Ruby

- Version:    %{psych_version}

+ %package -n rubygem-rake

+ Summary:    Ruby based make-like utility

+ Version:    %{rake_version}

  License:    MIT

  Requires:   ruby(release)

  Requires:   ruby(rubygems) >= %{rubygems_version}

- Provides:   rubygem(psych) = %{version}-%{release}

+ Provides:   rake = %{version}-%{release}

+ Provides:   rubygem(rake) = %{version}-%{release}

+ BuildArch:  noarch

  

- %description -n rubygem-psych

- Psych is a YAML parser and emitter. Psych leverages

- libyaml[http://pyyaml.org/wiki/LibYAML] for its YAML parsing and emitting

- capabilities. In addition to wrapping libyaml, Psych also knows how to

- serialize and de-serialize most Ruby objects to and from the YAML format.

+ %description -n rubygem-rake

+ Rake is a Make-like program implemented in Ruby. Tasks and dependencies are

+ specified in standard Ruby syntax.

  

  

- %package -n rubygem-net-telnet

- Summary:    Provides telnet client functionality

- Version:    %{net_telnet_version}

+ %package -n rubygem-rbs

+ Summary:    Type signature for Ruby

+ Version:    %{rbs_version}

+ License:    Ruby or BSD

  Requires:   ruby(release)

  Requires:   ruby(rubygems) >= %{rubygems_version}

- Provides:   rubygem(net-telnet) = %{version}-%{release}

+ Provides:   rubygem(rbs) = %{version}-%{release}

  BuildArch:  noarch

  

- %description -n rubygem-net-telnet

- Provides telnet client functionality.

- 

- This class also has, through delegation, all the methods of a socket object

- (by default, a TCPSocket, but can be set by the Proxy option to new()). This

- provides methods such as close() to end the session and sysread() to read data

- directly from the host, instead of via the waitfor() mechanism. Note that if

- you do use sysread() directly when in telnet mode, you should probably pass

- the output through preprocess() to extract telnet command sequences.

+ %description -n rubygem-rbs

+ RBS is the language for type signatures for Ruby and standard library

+ definitions.

  

  

  %package -n rubygem-test-unit
@@ -490,52 +528,62 @@ 

  writing tests, checking results and automated testing in Ruby.

  

  

- %package -n rubygem-xmlrpc

- Summary:    XMLRPC is a lightweight protocol that enables remote procedure calls over HTTP

- Version:    %{xmlrpc_version}

- License:    Ruby or BSD

+ %package -n rubygem-rexml

+ Summary:    An XML toolkit for Ruby

+ Version:    %{rexml_version}

+ License:    BSD

+ URL:        https://github.com/ruby/rexml

  Requires:   ruby(release)

  Requires:   ruby(rubygems) >= %{rubygems_version}

- Provides:   rubygem(xmlrpc) = %{version}-%{release}

+ Provides:   rubygem(rexml) = %{version}-%{release}

  BuildArch:  noarch

  

- %description -n rubygem-xmlrpc

- XMLRPC is a lightweight protocol that enables remote procedure calls over

- HTTP.

+ %description -n rubygem-rexml

+ REXML was inspired by the Electric XML library for Java, which features an

+ easy-to-use API, small size, and speed. Hopefully, REXML, designed with the same

+ philosophy, has these same features. I've tried to keep the API as intuitive as

+ possible, and have followed the Ruby methodology for method naming and code

+ flow, rather than mirroring the Java API.

  

+ REXML supports both tree and stream document parsing. Stream parsing is faster

+ (about 1.5 times as fast). However, with stream parsing, you don't get access to

+ features such as XPath.

  

- %package -n rubygem-bundler

- Summary:    Library and utilities to manage a Ruby application's gem dependencies

- Version:    %{bundler_version}

- License:    MIT

+ 

+ %package -n rubygem-rss

+ Summary:    Family of libraries that support various formats of XML "feeds"

+ Version:    %{rss_version}

+ License:    BSD

+ URL:        https://github.com/ruby/rss

  Requires:   ruby(release)

  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}

- Provides:   bundled(rubygem-thor) = %{bundler_thor_version}

+ Provides:   rubygem(rss) = %{version}-%{release}

  BuildArch:  noarch

  

- %description -n rubygem-bundler

- Bundler manages an application's dependencies through its entire life, across

- many machines, systematically and repeatably.

+ %description -n rubygem-rss

+ Really Simple Syndication (RSS) is a family of formats that describe 'feeds',

+ specially constructed XML documents that allow an interested person to subscribe

+ and receive updates from a particular web service. This library provides tooling

+ to read and create these feeds.

  

  

- %package -n rubygem-racc

- Summary:    Racc is a LALR(1) parser generator

- Version:    %{racc_version}

+ %package -n rubygem-typeprof

+ Version:    %{typeprof_version}

+ Summary:    TypeProf is a type analysis tool for Ruby code based on abstract interpretation

  License:    MIT

+ URL:        https://github.com/ruby/typeprof

  Requires:   ruby(release)

  Requires:   ruby(rubygems) >= %{rubygems_version}

- Provides:   rubygem(racc) = %{version}-%{release}

+ Requires:   rubygem(rbs) >= %{rbs_version}

+ Provides:   rubygem(typeprof) = %{version}-%{release}

+ BuildArch:  noarch

  

- %description -n rubygem-racc

- Racc is a LALR(1) parser generator. It is written in Ruby itself, and

- generates Ruby program.

+ %description -n rubygem-typeprof

+ TypeProf performs a type analysis of non-annotated Ruby code.

+ It abstractly executes input Ruby code in a level of types instead of values,

+ gathers what types are passed to and returned by methods, and prints the

+ analysis result in RBS format, a standard type description format for Ruby

+ 3.0.

  

  

  %prep
@@ -553,8 +601,7 @@ 

  %patch5 -p1

  %patch6 -p1

  %patch9 -p1

- %patch10 -p1

- %patch22 -p1

+ %patch19 -p1

  

  # Provide an example of usage of the tapset:

  cp -a %{SOURCE3} .
@@ -584,11 +631,13 @@ 

  

  # Q= makes the build output more verbose and allows to check Fedora

  # compiler options.

- make %{?_smp_mflags} COPY="cp -p" Q=

+ %make_build COPY="cp -p" Q=

  

  %install

  rm -rf %{buildroot}

- make install DESTDIR=%{buildroot}

+ %make_install

+ 

+ # TODO: Regenerate RBS parser in lib/rbs/parser.rb

  

  # Rename ruby/config.h to ruby/config-<arch>.h to avoid file conflicts on

  # multilib systems and install config.h wrapper
@@ -606,12 +655,11 @@ 

  

  # Kill bundled certificates, as they should be part of ca-certificates.

  for cert in \

-   rubygems.global.ssl.fastly.net/DigiCertHighAssuranceEVRootCA.pem \

-   rubygems.org/AddTrustExternalCARoot.pem \

-   index.rubygems.org/GlobalSignRootCA.pem

+   rubygems.org/GlobalSignRootCA.pem \

+   rubygems.org/GlobalSignRootCA_R3.pem

  do

    rm %{buildroot}%{rubygems_dir}/rubygems/ssl_certs/$cert

-   rm -r $(dirname %{buildroot}%{rubygems_dir}/rubygems/ssl_certs/$cert)

+   rm -d $(dirname %{buildroot}%{rubygems_dir}/rubygems/ssl_certs/$cert) || :

  done

  # Ensure there is not forgotten any certificate.

  test ! "$(ls -A  %{buildroot}%{rubygems_dir}/rubygems/ssl_certs/ 2>/dev/null)"
@@ -677,11 +725,6 @@ 

  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
@@ -722,30 +765,6 @@ 

  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 have 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}

- # The 'rdoc' directory is empty and useless ATM.

- # https://bugs.ruby-lang.org/issues/16596

- rm -r %{buildroot}%{ruby_libdir}/racc/rdoc

- mkdir -p %{buildroot}%{gem_dir}/gems/racc-%{racc_version}/lib

- mkdir -p %{buildroot}%{_libdir}/gems/%{name}/racc-%{racc_version}

- mv %{buildroot}%{ruby_libdir}/racc* %{buildroot}%{gem_dir}/gems/racc-%{racc_version}/lib

- 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

- # This used to be directories when racc was integral part of StdLib => Keep

- # them as directories and link everything in them to prevent directory =>

- # symlink conversion RPM issues.

- mkdir -p %{buildroot}%{ruby_libdir}/racc

- mkdir -p %{buildroot}%{ruby_libarchdir}/racc

- find %{buildroot}%{gem_dir}/gems/racc-%{racc_version}/lib/racc -maxdepth 1 -type f -exec \

-   sh -c 'ln -s %{gem_dir}/gems/racc-%{racc_version}/lib/racc/`basename {}` %{buildroot}%{ruby_libdir}/racc' \;

- ln -s %{gem_dir}/gems/racc-%{racc_version}/lib/racc.rb %{buildroot}%{ruby_libdir}/racc.rb

- ln -s %{_libdir}/gems/%{name}/racc-%{racc_version}/racc/cparse.so %{buildroot}%{ruby_libarchdir}/racc/cparse.so

- 

  # 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 \
@@ -757,11 +776,11 @@ 

  

  %if %{with systemtap}

  # Install a tapset and fix up the path to the library.

- mkdir -p %{buildroot}%{tapset_dir}

+ mkdir -p %{buildroot}%{_systemtap_tapsetdir}

  sed -e "s|@LIBRARY_PATH@|%{tapset_libdir}/libruby.so.%{major_minor_version}|" \

-   %{SOURCE2} > %{buildroot}%{tapset_dir}/libruby.so.%{major_minor_version}.stp

+   %{SOURCE2} > %{buildroot}%{_systemtap_tapsetdir}/libruby.so.%{major_minor_version}.stp

  # Escape '*/' in comment.

- sed -i -r "s|( \*.*\*)\/(.*)|\1\\\/\2|" %{buildroot}%{tapset_dir}/libruby.so.%{major_minor_version}.stp

+ sed -i -r "s|( \*.*\*)\/(.*)|\1\\\/\2|" %{buildroot}%{_systemtap_tapsetdir}/libruby.so.%{major_minor_version}.stp

  %endif

  

  # Prepare -doc subpackage file lists.
@@ -811,7 +830,7 @@ 

  # FileUtils.

  [ "`make runruby TESTRUN_SCRIPT=\"-e \\\" \

    module Bundler; end; \

-   require 'bundler/vendor/fileutils/lib/fileutils/version'; \

+   require 'bundler/vendor/fileutils/lib/fileutils'; \

    puts Bundler::FileUtils::VERSION\\\"\" | tail -1`" \

    == '%{bundler_fileutils_version}' ]

  
@@ -837,6 +856,13 @@ 

    puts Bundler::Thor::VERSION\\\"\" | tail -1`" \

    == '%{bundler_thor_version}' ]

  

+ # URI.

+ [ "`make runruby TESTRUN_SCRIPT=\"-e \\\" \

+   module Bundler; end; \

+   require 'bundler/vendor/uri/lib/uri/version'; \

+   puts Bundler::URI::VERSION\\\"\" | tail -1`" \

+   == '%{bundler_uri_version}' ]

+ 

  

  # test_debug(TestRubyOptions) fails due to LoadError reported in debug mode,

  # when abrt.rb cannot be required (seems to be easier way then customizing
@@ -856,19 +882,14 @@ 

  # Avoid `hostname' dependency.

  %{!?with_hostname:MSPECOPTS="-P 'Socket.gethostname returns the host name'"}

  

- # 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'"

- 

- # 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

+ # The test suite gets stuck in 'C-API Kernel function rb_rescue2'.

+ # https://bugs.ruby-lang.org/issues/17338

+ MSPECOPTS="$MSPECOPTS -P 'raises TypeError if one of the passed exceptions is not a Module'"

  

- make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS"

+ # Give an option to increase the timeout in tests.

+ # https://bugs.ruby-lang.org/issues/16921

+ %{?test_timeout_scale:RUBY_TEST_TIMEOUT_SCALE="%{test_timeout_scale}"} \

+   make check TESTS="-v $DISABLE_TESTS" MSPECOPT="-fs $MSPECOPTS"

  

  %files

  %license BSDL
@@ -900,7 +921,7 @@ 

  %license GPL

  %license LEGAL

  %doc README.md

- %doc NEWS

+ %doc NEWS.md

  # Exclude /usr/local directory since it is supposed to be managed by

  # local system administrator.

  %exclude %{ruby_sitelibdir}
@@ -911,42 +932,74 @@ 

  # List all these files explicitly to prevent surprises

  # Platform independent libraries.

  %dir %{ruby_libdir}

- %{ruby_libdir}/*.rb

- %exclude %{ruby_libdir}/irb.rb

- %exclude %{ruby_libdir}/json.rb

- %exclude %{ruby_libdir}/openssl.rb

- %exclude %{ruby_libdir}/psych.rb

- %exclude %{ruby_libdir}/racc.rb

- %{ruby_libdir}/benchmark

- %{ruby_libdir}/cgi

- %{ruby_libdir}/csv

- %{ruby_libdir}/delegate

- %{ruby_libdir}/digest

- %{ruby_libdir}/drb

- %{ruby_libdir}/fiddle

- %{ruby_libdir}/forwardable

- %{ruby_libdir}/getoptlong

- %{ruby_libdir}/logger

- %{ruby_libdir}/matrix

+ %exclude %{ruby_libdir}/bigdecimal*

+ %exclude %{ruby_libdir}/irb*

+ %exclude %{ruby_libdir}/json*

+ %exclude %{ruby_libdir}/openssl*

+ %exclude %{ruby_libdir}/psych*

+ %{ruby_libdir}/abbrev.rb

+ %{ruby_libdir}/base64.rb

+ %{ruby_libdir}/benchmark*

+ %{ruby_libdir}/cgi*

+ %{ruby_libdir}/coverage.rb

+ %{ruby_libdir}/csv*

+ %{ruby_libdir}/date.rb

+ %{ruby_libdir}/debug.rb

+ %{ruby_libdir}/delegate*

+ %{ruby_libdir}/digest*

+ %{ruby_libdir}/drb*

+ %{ruby_libdir}/English.rb

+ %{ruby_libdir}/erb.rb

+ %{ruby_libdir}/expect.rb

+ %{ruby_libdir}/fiddle*

+ %{ruby_libdir}/fileutils.rb

+ %{ruby_libdir}/find.rb

+ %{ruby_libdir}/forwardable*

+ %{ruby_libdir}/getoptlong*

+ %{ruby_libdir}/io

+ %{ruby_libdir}/ipaddr.rb

+ %{ruby_libdir}/kconv.rb

+ %{ruby_libdir}/logger*

+ %{ruby_libdir}/matrix*

+ %{ruby_libdir}/mkmf.rb

+ %{ruby_libdir}/monitor.rb

+ %{ruby_libdir}/mutex_m.rb

  %{ruby_libdir}/net

- %{ruby_libdir}/observer

- %{ruby_libdir}/open3

- %{ruby_libdir}/optparse

- %{ruby_libdir}/ostruct

- %{ruby_libdir}/pstore

- %{ruby_libdir}/reline

- %{ruby_libdir}/rexml

+ %{ruby_libdir}/objspace.rb

+ %{ruby_libdir}/observer*

+ %{ruby_libdir}/open-uri.rb

+ %{ruby_libdir}/open3*

+ %{ruby_libdir}/optionparser.rb

+ %{ruby_libdir}/optparse*

+ %{ruby_libdir}/ostruct*

+ %{ruby_libdir}/pathname.rb

+ %{ruby_libdir}/pp.rb

+ %{ruby_libdir}/prettyprint.rb

+ %{ruby_libdir}/prime.rb

+ %{ruby_libdir}/pstore*

+ %{ruby_libdir}/readline.rb

+ %{ruby_libdir}/reline*

+ %{ruby_libdir}/resolv.rb

+ %{ruby_libdir}/resolv-replace.rb

  %{ruby_libdir}/rinda

- %{ruby_libdir}/ripper

- %{ruby_libdir}/rss

- %{ruby_libdir}/singleton

+ %{ruby_libdir}/ripper*

+ %{ruby_libdir}/securerandom.rb

+ %{ruby_libdir}/set*

+ %{ruby_libdir}/shellwords.rb

+ %{ruby_libdir}/singleton*

+ %{ruby_libdir}/socket.rb

  %{ruby_libdir}/syslog

- %{ruby_libdir}/timeout

- %{ruby_libdir}/tracer

+ %{ruby_libdir}/tempfile.rb

+ %{ruby_libdir}/timeout*

+ %{ruby_libdir}/time.rb

+ %{ruby_libdir}/tmpdir.rb

+ %{ruby_libdir}/tracer*

+ %{ruby_libdir}/tsort.rb

  %{ruby_libdir}/unicode_normalize

- %{ruby_libdir}/uri

- %{ruby_libdir}/webrick

- %{ruby_libdir}/yaml

+ %{ruby_libdir}/un.rb

+ %{ruby_libdir}/uri*

+ %{ruby_libdir}/weakref*

+ %{ruby_libdir}/yaml*

  

  # Platform specific libraries.

  %{_libdir}/libruby.so.*
@@ -1045,14 +1098,19 @@ 

  %{ruby_libarchdir}/rbconfig/sizeof.so

  %{ruby_libarchdir}/readline.so

  %{ruby_libarchdir}/ripper.so

- %{ruby_libarchdir}/sdbm.so

  %{ruby_libarchdir}/socket.so

  %{ruby_libarchdir}/stringio.so

  %{ruby_libarchdir}/strscan.so

  %{ruby_libarchdir}/syslog.so

  %{ruby_libarchdir}/zlib.so

  

- %{?with_systemtap:%{tapset_root}}

+ # Default gems

+ %{ruby_libdir}/did_you_mean*

+ %{ruby_libdir}/racc*

+ %dir %{ruby_libarchdir}/racc

+ %{ruby_libarchdir}/racc/cparse.so

+ 

+ %{?with_systemtap:%{_systemtap_datadir}}

  

  %files -n rubygems

  %{_bindir}/gem
@@ -1075,59 +1133,94 @@ 

  

  %exclude %{gem_dir}/cache/*

  

- # TODO: Gemify these libraries

- %{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-3.0.0.gemspec

+ %files -n rubygems-devel

+ %{_rpmconfigdir}/macros.d/macros.rubygems

+ %{_rpmconfigdir}/fileattrs/rubygems.attr

+ %{_rpmconfigdir}/rubygems.req

+ %{_rpmconfigdir}/rubygems.prov

+ %{_rpmconfigdir}/rubygems.con

+ 

+ %files default-gems

+ %{gem_dir}/specifications/default/english-0.7.1.gemspec

+ %{gem_dir}/specifications/default/abbrev-0.1.0.gemspec

+ %{gem_dir}/specifications/default/base64-0.1.0.gemspec

+ %{gem_dir}/specifications/default/benchmark-0.1.1.gemspec

+ %{gem_dir}/specifications/default/cgi-0.2.0.gemspec

+ %{gem_dir}/specifications/default/csv-3.1.9.gemspec

+ %{gem_dir}/specifications/default/date-3.1.0.gemspec

  %{gem_dir}/specifications/default/dbm-1.1.0.gemspec

- %{gem_dir}/specifications/default/delegate-0.1.0.gemspec

- %{gem_dir}/specifications/default/etc-1.1.0.gemspec

+ %{gem_dir}/specifications/default/debug-0.1.0.gemspec

+ %{gem_dir}/specifications/default/delegate-0.2.0.gemspec

+ %{gem_dir}/specifications/default/did_you_mean-%{did_you_mean_version}.gemspec

+ %{gem_dir}/specifications/default/digest-3.0.0.gemspec

+ %{gem_dir}/specifications/default/drb-2.0.4.gemspec

+ %{gem_dir}/specifications/default/erb-%{erb_version}.gemspec

+ %{gem_dir}/specifications/default/etc-1.2.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.4.1.gemspec

- %{gem_dir}/specifications/default/forwardable-1.3.1.gemspec

+ %{gem_dir}/specifications/default/fiddle-1.0.6.gemspec

+ %{gem_dir}/specifications/default/fileutils-1.5.0.gemspec

+ %{gem_dir}/specifications/default/find-0.1.0.gemspec

+ %{gem_dir}/specifications/default/forwardable-1.3.2.gemspec

  %{gem_dir}/specifications/default/gdbm-2.1.0.gemspec

- %{gem_dir}/specifications/default/getoptlong-0.1.0.gemspec

+ %{gem_dir}/specifications/default/getoptlong-0.1.1.gemspec

+ %{gem_dir}/specifications/default/io-nonblock-0.1.0.gemspec

+ %{gem_dir}/specifications/default/io-wait-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.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.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/logger-1.4.3.gemspec

+ %{gem_dir}/specifications/default/matrix-0.3.1.gemspec

+ %{gem_dir}/specifications/default/mutex_m-0.1.1.gemspec

+ %{gem_dir}/specifications/default/net-ftp-0.1.1.gemspec

+ %{gem_dir}/specifications/default/net-http-0.1.1.gemspec

+ %{gem_dir}/specifications/default/net-imap-0.1.1.gemspec

+ %{gem_dir}/specifications/default/net-pop-0.1.1.gemspec

+ %{gem_dir}/specifications/default/net-protocol-0.1.0.gemspec

+ %{gem_dir}/specifications/default/net-smtp-0.2.1.gemspec

+ %{gem_dir}/specifications/default/nkf-0.1.0.gemspec

+ %{gem_dir}/specifications/default/observer-0.1.1.gemspec

+ %{gem_dir}/specifications/default/open3-0.1.1.gemspec

+ %{gem_dir}/specifications/default/open-uri-0.1.0.gemspec

+ %{gem_dir}/specifications/default/optparse-0.1.0.gemspec

+ %{gem_dir}/specifications/default/ostruct-0.3.1.gemspec

+ %{gem_dir}/specifications/default/pathname-0.1.0.gemspec

+ %{gem_dir}/specifications/default/pp-0.1.0.gemspec

+ %{gem_dir}/specifications/default/prettyprint-0.1.0.gemspec

+ %{gem_dir}/specifications/default/prime-0.1.2.gemspec

+ %{gem_dir}/specifications/default/pstore-0.1.1.gemspec

+ %{gem_dir}/specifications/default/racc-%{racc_version}.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

- %{gem_dir}/specifications/default/singleton-0.1.0.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.6.0.gemspec

- %{gem_dir}/specifications/default/yaml-0.1.0.gemspec

+ %{gem_dir}/specifications/default/readline-ext-0.1.1.gemspec

+ %{gem_dir}/specifications/default/reline-0.2.0.gemspec

+ %{gem_dir}/specifications/default/resolv-0.2.0.gemspec

+ %{gem_dir}/specifications/default/resolv-replace-0.1.0.gemspec

+ %{gem_dir}/specifications/default/rinda-0.1.0.gemspec

+ %{gem_dir}/specifications/default/securerandom-0.1.0.gemspec

+ %{gem_dir}/specifications/default/set-1.0.1.gemspec

+ %{gem_dir}/specifications/default/shellwords-0.1.0.gemspec

+ %{gem_dir}/specifications/default/singleton-0.1.1.gemspec

+ %{gem_dir}/specifications/default/stringio-3.0.0.gemspec

+ %{gem_dir}/specifications/default/strscan-3.0.0.gemspec

+ %{gem_dir}/specifications/default/syslog-0.1.0.gemspec

+ %{gem_dir}/specifications/default/tempfile-0.1.1.gemspec

+ %{gem_dir}/specifications/default/time-0.1.0.gemspec

+ %{gem_dir}/specifications/default/timeout-0.1.1.gemspec

+ %{gem_dir}/specifications/default/tmpdir-0.1.1.gemspec

+ %{gem_dir}/specifications/default/tsort-0.1.0.gemspec

+ %{gem_dir}/specifications/default/tracer-0.1.1.gemspec

+ %{gem_dir}/specifications/default/un-0.1.0.gemspec

+ %{gem_dir}/specifications/default/uri-0.10.1.gemspec

+ %{gem_dir}/specifications/default/weakref-0.1.1.gemspec

+ #%%{gem_dir}/specifications/default/win32ole-1.8.8.gemspec

+ %{gem_dir}/specifications/default/yaml-0.1.1.gemspec

  %{gem_dir}/specifications/default/zlib-1.1.0.gemspec

  

- %files -n rubygems-devel

- %{_rpmconfigdir}/macros.d/macros.rubygems

- %{_rpmconfigdir}/fileattrs/rubygems.attr

- %{_rpmconfigdir}/rubygems.req

- %{_rpmconfigdir}/rubygems.prov

- %{_rpmconfigdir}/rubygems.con

+ %{gem_dir}/gems/erb-%{erb_version}

+ # Use standalone rubygem-racc if Racc binary is required. Shipping this

+ # executable in both packages might possibly cause conflicts. The situation

+ # could be better if Ruby generated these files:

+ # https://github.com/ruby/ruby/pull/2545

+ %exclude %{_bindir}/racc

+ %exclude %{gem_dir}/gems/racc-%{racc_version}/bin

  

- %files -n rubygem-rake

- %{_bindir}/rake

- %{gem_dir}/gems/rake-%{rake_version}

- %{gem_dir}/specifications/rake-%{rake_version}.gemspec

- %{_mandir}/man1/rake.1*