diff --git a/macros.rubygems b/macros.rubygems index 6d99ac3..45c59c4 100644 --- a/macros.rubygems +++ b/macros.rubygems @@ -10,9 +10,14 @@ %gem_spec %{gem_dir}/specifications/%{gem_name}-%{version}.gemspec %gem_docdir %{gem_dir}/doc/%{gem_name}-%{version} -# Install gem into appropriate directory. -# -n Overrides gem file name for installation. -# -d Set installation directory. + +# %gem_install - Install gem into appropriate directory. +# +# Usage: %gem_install [options] +# +# -n Overrides gem file name for installation. +# -d Set installation directory. +# %gem_install(d:n:) \ mkdir -p %{-d*}%{!?-d:.%{gem_dir}} \ \ @@ -26,6 +31,7 @@ gem install \\\ %{-n*}%{!?-n:%{gem_name}-%{version}.gem} \ %{nil} + # For rubygems packages we want to filter out any provides caused by private # libs in %%{gem_archdir}. # @@ -34,3 +40,91 @@ gem install \\\ %rubygems_default_filter %{expand: \ %global __provides_exclude_from %{?__provides_exclude_from:%{__provides_exclude_from}|}^%{gem_extdir_mri}/.*\\\\.so$ \ } + + +# The 'read' command in gemspec_add _depand gemspec_remove_dep macros is not +# essential, but it is usefull to make the sript appear in build log. + + +# %gemspec_add_dep - Add dependency into .gemspec. +# +# Usage: %gemspec_add_dep -g [options] [requirements] +# +# Add dependency named to .gemspec file. The macro adds runtime +# dependency by default. The [requirements] argument can be used to specify +# the dependency constraints more precisely. It is expected to be valid Ruby +# code. +# +# -s Overrides the default .gemspec location. +# -d Add development dependecy. +# +%gemspec_add_dep(g:s:d) \ +read -d '' gemspec_add_dep_script << 'EOR' || : \ + gemspec_file = '%{-s*}%{!?-s:./%{gem_name}.gemspec}' \ + \ + name = '%{-g*}' \ + requirements = %{*}%{!?1:nil} \ + \ + type = :%{!?-d:runtime}%{?-d:development} \ + \ + spec = Gem::Specification.load(gemspec_file) \ + abort("#{gemspec_file} is not accessible.") unless spec \ + \ + dep = spec.dependencies.detect { |d| d.type == type && d.name == name } \ + if dep \ + dep.requirement.concat requirements \ + else \ + spec.public_send "add_#{type}_dependency", name, requirements \ + end \ + File.write gemspec_file, spec.to_ruby \ +EOR\ +echo "$gemspec_add_dep_script" | ruby \ +unset -v gemspec_add_dep_script \ +%{nil} + + +# %gemspec_remove_dep - Remove dependency from .gemspec. +# +# Usage: %gemspec_remove_dep -g [options] [requirements] +# +# Remove dependency named from .gemspec file. The macro removes runtime +# dependency by default. The [requirements] argument can be used to specify +# the dependency constraints more precisely. It is expected to be valid Ruby +# code. The macro fails if these specific requirements can't be removed. +# +# -s Overrides the default .gemspec location. +# -d Remove development dependecy. +# +%gemspec_remove_dep(g:s:d) \ +read -d '' gemspec_remove_dep_script << 'EOR' || : \ + gemspec_file = '%{-s*}%{!?-s:./%{gem_name}.gemspec}' \ + \ + name = '%{-g*}' \ + requirements = %{*}%{!?1:nil} \ + \ + type = :%{!?-d:runtime}%{?-d:development} \ + \ + spec = Gem::Specification.load(gemspec_file) \ + abort("#{gemspec_file} is not accessible.") unless spec \ + \ + dep = spec.dependencies.detect { |d| d.type == type && d.name == name } \ + if dep \ + if requirements \ + requirements = Gem::Requirement.create(requirements).requirements \ + requirements.each do |r| \ + unless dep.requirement.requirements.reject! { |dependency_requirements| dependency_requirements == r } \ + abort("Requirement '#{r.first} #{r.last}' was not possible to remove for dependency '#{dep}'!") \ + end \ + end \ + spec.dependencies.delete dep if dep.requirement.requirements.empty? \ + else \ + spec.dependencies.delete dep \ + end \ + else \ + abort("Dependency '#{name}' was not found!") \ + end \ + File.write gemspec_file, spec.to_ruby \ +EOR\ +echo "$gemspec_remove_dep_script" | ruby \ +unset -v gemspec_remove_dep_script \ +%{nil} 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 75eb363..6dd21d3 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 @@ -39,7 +39,7 @@ diff --git a/configure.in b/configure.in index 0e371e2..d4f1dcb 100644 --- a/configure.in +++ b/configure.in -@@ -4374,6 +4374,13 @@ AC_SUBST(rubyarchhdrdir)dnl +@@ -4402,6 +4402,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 43fa7f6..3d3b4fc 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.in b/configure.in index 37d9a62..553d4d0 100644 --- a/configure.in +++ b/configure.in -@@ -3632,6 +3632,11 @@ if test ${multiarch+set}; then +@@ -3666,6 +3666,11 @@ if test ${multiarch+set}; then fi 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 eb34107..dd588ab 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.in b/configure.in index db37cd6..ce8d149 100644 --- a/configure.in +++ b/configure.in -@@ -4228,7 +4228,8 @@ AS_CASE(["$ruby_version_dir_name"], +@@ -4256,7 +4256,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 9d78b05..58689fd 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.in b/configure.in index 553d4d0..03a4152 100644 --- a/configure.in +++ b/configure.in -@@ -4292,6 +4292,8 @@ AC_SUBST(vendorarchdir)dnl +@@ -4320,6 +4320,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 e82f172..5134e3e 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.in b/configure.in index 03a4152..0e371e2 100644 --- a/configure.in +++ b/configure.in -@@ -4264,6 +4264,10 @@ AC_ARG_WITH(vendorarchdir, +@@ -4292,6 +4292,10 @@ AC_ARG_WITH(vendorarchdir, [vendorarchdir=$withval], [vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby'${ruby_version_dir}}${multiarch-'${vendorlibdir}/${sitearch}'}]) @@ -26,7 +26,7 @@ index 03a4152..0e371e2 100644 if test "${LOAD_RELATIVE+set}"; then AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) RUBY_EXEC_PREFIX='' -@@ -4288,6 +4292,7 @@ AC_SUBST(sitearchdir)dnl +@@ -4316,6 +4320,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 cdd016c..019b542 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.in b/configure.in index db37cd6..6e73fae 100644 --- a/configure.in +++ b/configure.in -@@ -4177,9 +4177,6 @@ AS_CASE(["$target_os"], +@@ -4205,9 +4205,6 @@ AS_CASE(["$target_os"], rubyw_install_name='$(RUBYW_INSTALL_NAME)' ]) @@ -30,7 +30,7 @@ index db37cd6..6e73fae 100644 rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'} AC_ARG_WITH(rubyarchprefix, AS_HELP_STRING([--with-rubyarchprefix=DIR], -@@ -4202,58 +4199,64 @@ AC_ARG_WITH(ridir, +@@ -4230,58 +4227,64 @@ AC_ARG_WITH(ridir, AC_SUBST(ridir) AC_SUBST(RI_BASE_NAME) @@ -124,7 +124,7 @@ index db37cd6..6e73fae 100644 if test "${LOAD_RELATIVE+set}"; then AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) -@@ -4270,6 +4273,7 @@ AC_SUBST(sitearchincludedir)dnl +@@ -4298,6 +4301,7 @@ AC_SUBST(sitearchincludedir)dnl AC_SUBST(arch)dnl AC_SUBST(sitearch)dnl AC_SUBST(ruby_version)dnl @@ -249,7 +249,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 -@@ -963,7 +963,8 @@ def test_self_use_paths +@@ -962,7 +962,8 @@ def test_self_use_paths def test_self_user_dir parts = [@userhome, '.gem', Gem.ruby_engine] @@ -259,7 +259,7 @@ index 0428bea..b6e090e 100644 assert_equal File.join(parts), Gem.user_dir end -@@ -1090,7 +1091,7 @@ def test_self_user_home_user_drive_and_path +@@ -1089,7 +1090,7 @@ def test_self_user_home_user_drive_and_path def test_self_vendor_dir expected = File.join RbConfig::CONFIG['vendordir'], 'gems', diff --git a/ruby-2.3.3-Revert-use-frozen-strings-in-serialized-specs.patch b/ruby-2.3.3-Revert-use-frozen-strings-in-serialized-specs.patch new file mode 100644 index 0000000..e9e5819 --- /dev/null +++ b/ruby-2.3.3-Revert-use-frozen-strings-in-serialized-specs.patch @@ -0,0 +1,245 @@ +From b073f9af733254ea14111f6a9a6785acdbba8fd7 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Thu, 1 Dec 2016 12:10:00 +0100 +Subject: [PATCH] Revert "use frozen strings in serialized specs" + +This reverts commit 8eda3272d28010c768a05620de776e5a8195c1ae. +--- + lib/rubygems/specification.rb | 8 +-- + test/rubygems/test_gem_specification.rb | 120 ++++++++++++++++---------------- + 2 files changed, 64 insertions(+), 64 deletions(-) + +diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb +index 7128532..654996a 100644 +--- a/lib/rubygems/specification.rb ++++ b/lib/rubygems/specification.rb +@@ -2337,7 +2337,7 @@ class Gem::Specification < Gem::BasicSpecification + + def ruby_code(obj) + case obj +- when String then obj.dump + ".freeze" ++ when String then obj.dump + when Array then '[' + obj.map { |x| ruby_code x }.join(", ") + ']' + when Hash then + seg = obj.keys.sort.map { |k| "#{k.to_s.dump} => #{obj[k].to_s.dump}" } +@@ -2527,14 +2527,14 @@ class Gem::Specification < Gem::BasicSpecification + dependencies.each do |dep| + req = dep.requirements_list.inspect + dep.instance_variable_set :@type, :runtime if dep.type.nil? # HACK +- result << " s.add_#{dep.type}_dependency(%q<#{dep.name}>.freeze, #{req})" ++ result << " s.add_#{dep.type}_dependency(%q<#{dep.name}>, #{req})" + end + + result << " else" + + dependencies.each do |dep| + version_reqs_param = dep.requirements_list.inspect +- result << " s.add_dependency(%q<#{dep.name}>.freeze, #{version_reqs_param})" ++ result << " s.add_dependency(%q<#{dep.name}>, #{version_reqs_param})" + end + + result << ' end' +@@ -2542,7 +2542,7 @@ class Gem::Specification < Gem::BasicSpecification + result << " else" + dependencies.each do |dep| + version_reqs_param = dep.requirements_list.inspect +- result << " s.add_dependency(%q<#{dep.name}>.freeze, #{version_reqs_param})" ++ result << " s.add_dependency(%q<#{dep.name}>, #{version_reqs_param})" + end + result << " end" + end +diff --git a/test/rubygems/test_gem_specification.rb b/test/rubygems/test_gem_specification.rb +index dc7b134..204e100 100644 +--- a/test/rubygems/test_gem_specification.rb ++++ b/test/rubygems/test_gem_specification.rb +@@ -2284,30 +2284,30 @@ dependencies: [] + # stub: a 2 ruby lib\0other + + Gem::Specification.new do |s| +- s.name = "a".freeze ++ s.name = "a" + s.version = "2" + +- s.required_rubygems_version = Gem::Requirement.new(\"> 0\".freeze) if s.respond_to? :required_rubygems_version= +- s.require_paths = ["lib".freeze, "other".freeze] +- s.authors = ["A User".freeze] ++ s.required_rubygems_version = Gem::Requirement.new(\"> 0\") if s.respond_to? :required_rubygems_version= ++ s.require_paths = ["lib", "other"] ++ s.authors = ["A User"] + s.date = "#{Gem::Specification::TODAY.strftime "%Y-%m-%d"}" +- s.description = "This is a test description".freeze +- s.email = "example@example.com".freeze +- s.files = ["lib/code.rb".freeze] +- s.homepage = "http://example.com".freeze +- s.rubygems_version = "#{Gem::VERSION}".freeze +- s.summary = "this is a summary".freeze ++ s.description = "This is a test description" ++ s.email = "example@example.com" ++ s.files = ["lib/code.rb"] ++ s.homepage = "http://example.com" ++ s.rubygems_version = "#{Gem::VERSION}" ++ s.summary = "this is a summary" + + if s.respond_to? :specification_version then + s.specification_version = #{Gem::Specification::CURRENT_SPECIFICATION_VERSION} + + if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then +- s.add_runtime_dependency(%q.freeze, [\"= 1\"]) ++ s.add_runtime_dependency(%q, [\"= 1\"]) + else +- s.add_dependency(%q.freeze, [\"= 1\"]) ++ s.add_dependency(%q, [\"= 1\"]) + end + else +- s.add_dependency(%q.freeze, [\"= 1\"]) ++ s.add_dependency(%q, [\"= 1\"]) + end + end + SPEC +@@ -2333,18 +2333,18 @@ end + # stub: a 2 ruby lib + + Gem::Specification.new do |s| +- s.name = "a".freeze ++ s.name = "a" + s.version = "2" + +- s.required_rubygems_version = Gem::Requirement.new(\"> 0\".freeze) if s.respond_to? :required_rubygems_version= +- s.require_paths = ["lib".freeze] +- s.authors = ["A User".freeze] ++ s.required_rubygems_version = Gem::Requirement.new(\"> 0\") if s.respond_to? :required_rubygems_version= ++ s.require_paths = ["lib"] ++ s.authors = ["A User"] + s.date = "#{Gem::Specification::TODAY.strftime "%Y-%m-%d"}" +- s.description = "This is a test description".freeze +- s.email = "example@example.com".freeze +- s.homepage = "http://example.com".freeze +- s.rubygems_version = "#{Gem::VERSION}".freeze +- s.summary = "this is a summary".freeze ++ s.description = "This is a test description" ++ s.email = "example@example.com" ++ s.homepage = "http://example.com" ++ s.rubygems_version = "#{Gem::VERSION}" ++ s.summary = "this is a summary" + + s.installed_by_version = "#{Gem::VERSION}" if s.respond_to? :installed_by_version + +@@ -2352,12 +2352,12 @@ Gem::Specification.new do |s| + s.specification_version = #{Gem::Specification::CURRENT_SPECIFICATION_VERSION} + + if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then +- s.add_runtime_dependency(%q.freeze, [\"= 1\"]) ++ s.add_runtime_dependency(%q, [\"= 1\"]) + else +- s.add_dependency(%q.freeze, [\"= 1\"]) ++ s.add_dependency(%q, [\"= 1\"]) + end + else +- s.add_dependency(%q.freeze, [\"= 1\"]) ++ s.add_dependency(%q, [\"= 1\"]) + end + end + SPEC +@@ -2389,43 +2389,43 @@ end + # stub: #{extensions} + + Gem::Specification.new do |s| +- s.name = "a".freeze ++ s.name = "a" + s.version = "1" + s.platform = Gem::Platform.new(#{expected_platform}) + +- s.required_rubygems_version = Gem::Requirement.new(\">= 0\".freeze) if s.respond_to? :required_rubygems_version= +- s.require_paths = ["lib".freeze] +- s.authors = ["A User".freeze] ++ s.required_rubygems_version = Gem::Requirement.new(\">= 0\") if s.respond_to? :required_rubygems_version= ++ s.require_paths = ["lib"] ++ s.authors = ["A User"] + s.date = "#{Gem::Specification::TODAY.strftime "%Y-%m-%d"}" +- s.description = "This is a test description".freeze +- s.email = "example@example.com".freeze +- s.executables = ["exec".freeze] +- s.extensions = ["ext/a/extconf.rb".freeze] +- s.files = ["bin/exec".freeze, "ext/a/extconf.rb".freeze, "lib/code.rb".freeze, "test/suite.rb".freeze] +- s.homepage = "http://example.com".freeze +- s.licenses = ["MIT".freeze] +- s.requirements = ["A working computer".freeze] +- s.rubyforge_project = "example".freeze +- s.rubygems_version = "#{Gem::VERSION}".freeze +- s.summary = "this is a summary".freeze +- s.test_files = ["test/suite.rb".freeze] ++ s.description = "This is a test description" ++ s.email = "example@example.com" ++ s.executables = ["exec"] ++ s.extensions = ["ext/a/extconf.rb"] ++ s.files = ["bin/exec", "ext/a/extconf.rb", "lib/code.rb", "test/suite.rb"] ++ s.homepage = "http://example.com" ++ s.licenses = ["MIT"] ++ s.requirements = ["A working computer"] ++ s.rubyforge_project = "example" ++ s.rubygems_version = "#{Gem::VERSION}" ++ s.summary = "this is a summary" ++ s.test_files = ["test/suite.rb"] + + if s.respond_to? :specification_version then + s.specification_version = 4 + + if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then +- s.add_runtime_dependency(%q.freeze, [\"> 0.4\"]) +- s.add_runtime_dependency(%q.freeze, [\"> 0.0.0\"]) +- s.add_runtime_dependency(%q.freeze, [\"<= 0.6\", \"> 0.4\"]) ++ s.add_runtime_dependency(%q, [\"> 0.4\"]) ++ s.add_runtime_dependency(%q, [\"> 0.0.0\"]) ++ s.add_runtime_dependency(%q, [\"<= 0.6\", \"> 0.4\"]) + else +- s.add_dependency(%q.freeze, [\"> 0.4\"]) +- s.add_dependency(%q.freeze, [\"> 0.0.0\"]) +- s.add_dependency(%q.freeze, [\"<= 0.6\", \"> 0.4\"]) ++ s.add_dependency(%q, [\"> 0.4\"]) ++ s.add_dependency(%q, [\"> 0.0.0\"]) ++ s.add_dependency(%q, [\"<= 0.6\", \"> 0.4\"]) + end + else +- s.add_dependency(%q.freeze, [\"> 0.4\"]) +- s.add_dependency(%q.freeze, [\"> 0.0.0\"]) +- s.add_dependency(%q.freeze, [\"<= 0.6\", \"> 0.4\"]) ++ s.add_dependency(%q, [\"> 0.4\"]) ++ s.add_dependency(%q, [\"> 0.0.0\"]) ++ s.add_dependency(%q, [\"<= 0.6\", \"> 0.4\"]) + end + end + SPEC +@@ -3324,20 +3324,20 @@ Did you mean 'Ruby'? + # stub: m 1 ruby lib + + Gem::Specification.new do |s| +- s.name = "m".freeze ++ s.name = "m" + s.version = "1" + +- s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version= ++ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= + s.metadata = { "one" => "two", "two" => "three" } if s.respond_to? :metadata= +- s.require_paths = ["lib".freeze] +- s.authors = ["A User".freeze] ++ s.require_paths = ["lib"] ++ s.authors = ["A User"] + s.date = "#{Gem::Specification::TODAY.strftime("%Y-%m-%d")}" +- s.description = "This is a test description".freeze +- s.email = "example@example.com".freeze +- s.files = ["lib/code.rb".freeze] +- s.homepage = "http://example.com".freeze +- s.rubygems_version = "#{Gem::VERSION}".freeze +- s.summary = "this is a summary".freeze ++ s.description = "This is a test description" ++ s.email = "example@example.com" ++ s.files = ["lib/code.rb"] ++ s.homepage = "http://example.com" ++ s.rubygems_version = "#{Gem::VERSION}" ++ s.summary = "this is a summary" + end + EOF + +-- +2.10.2 + diff --git a/ruby-2.3.5-Revert-experimental-rounding-on-i686.patch b/ruby-2.3.5-Revert-experimental-rounding-on-i686.patch new file mode 100644 index 0000000..9a35f69 --- /dev/null +++ b/ruby-2.3.5-Revert-experimental-rounding-on-i686.patch @@ -0,0 +1,81 @@ +From 2dfde7e8586cf35318b6053410dba74fe9f06f8d Mon Sep 17 00:00:00 2001 +From: usa +Date: Sun, 30 Apr 2017 13:27:17 +0000 +Subject: [PATCH] REVERTED: merge revision(s) 55604,55612: [Backport #13138] + + * numeric.c (flo_round): [EXPERIMENTAL] adjust the case that the + receiver is close to the exact but unrepresentable middle value + of two values in the given precision. + http://d.hatena.ne.jp/hnw/20160702 + + numeric.c: round as double + + * numeric.c (flo_round): compare as double, not long double with + i387. + +git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e +--- + ChangeLog | 7 ------- + test/ruby/test_float.rb | 5 ----- + 2 files changed, 12 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +--- a/ChangeLog ++++ b/ChangeLog +@@ -604,13 +604,6 @@ + to check if no library is required, instead of AC_CHECK_LIB. + [ruby-core:79368] [Bug #13175] + +-Sun Apr 30 22:24:25 2017 Nobuyoshi Nakada +- +- * numeric.c (flo_round): [EXPERIMENTAL] adjust the case that the +- receiver is close to the exact but unrepresentable middle value +- of two values in the given precision. +- http://d.hatena.ne.jp/hnw/20160702 +- + Sun Apr 9 22:21:23 2017 NAKAMURA Usaku + + thread.c: rb_thread_fd_close [ci skip] +diff --git a/numeric.c b/numeric.c ++-- a/numeric.c +@@ -1786,7 +1786,7 @@ + flo_round(int argc, VALUE *argv, VALUE num) + { + VALUE nd; ++ double number, f; +- double number, f, x; + int ndigits = 0; + int binexp; + enum {float_dig = DBL_DIG+2}; +@@ -1828,14 +1821,8 @@ + return DBL2NUM(0); + } + f = pow(10, ndigits); ++ return DBL2NUM(round(number * f) / f); ++} +- x = round(number * f); +- if (x > 0) { +- if ((double)((x + 0.5) / f) <= number) x += 1; +- } +- else { +- if ((double)((x - 0.5) / f) >= number) x -= 1; +- } +- return DBL2NUM(x / f);} + + /* + * call-seq: +diff --git a/test/ruby/test_float.rb b/test/ruby/test_float.rb +--- a/test/ruby/test_float.rb ++++ b/test/ruby/test_float.rb +@@ -444,11 +444,6 @@ + assert_raise(TypeError) {1.0.round(nil)} + def (prec = Object.new).to_int; 2; end + assert_equal(1.0, 0.998.round(prec)) +- +- assert_equal(+5.02, +5.015.round(2)) +- assert_equal(-5.02, -5.015.round(2)) +- assert_equal(+1.26, +1.255.round(2)) +- assert_equal(-1.26, -1.255.round(2)) + end + + VS = [ diff --git a/ruby-2.4.0-increase-timeout-for-ARMv7.patch b/ruby-2.4.0-increase-timeout-for-ARMv7.patch deleted file mode 100644 index d0dfcb2..0000000 --- a/ruby-2.4.0-increase-timeout-for-ARMv7.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 35568b41699ca1cd466fc8d23a84139b73ad0f1b Mon Sep 17 00:00:00 2001 -From: naruse -Date: Tue, 19 Jan 2016 02:52:37 +0000 -Subject: [PATCH] increase timeout for ARMv7 - -http://rubyci.s3.amazonaws.com/scw-9d6766/ruby-trunk/log/20160113T091704Z.diff.html.gz - -git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e ---- - test/ruby/test_iseq.rb | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/test/ruby/test_iseq.rb b/test/ruby/test_iseq.rb -index 7af8c1b..4561eeb 100644 ---- a/test/ruby/test_iseq.rb -+++ b/test/ruby/test_iseq.rb -@@ -187,7 +187,7 @@ def test_safe_call_chain - end - - def test_parent_iseq_mark -- assert_separately([], <<-'end;') -+ assert_separately([], <<-'end;', timeout: 20) - ->{ - ->{ - ->{ diff --git a/ruby.spec b/ruby.spec index 829f506..beb3ce8 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,6 +1,6 @@ %global major_version 2 %global minor_version 3 -%global teeny_version 1 +%global teeny_version 5 %global major_minor_version %{major_version}.%{minor_version} %global ruby_version %{major_minor_version}.%{teeny_version} @@ -21,7 +21,7 @@ %endif -%global release 58 +%global release 65 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} # The RubyGems library has to stay out of Ruby directory three, since the @@ -29,8 +29,8 @@ %global rubygems_dir %{_datadir}/rubygems # Bundled libraries versions -%global rubygems_version 2.5.1 -%global molinillo_version 0.4.0 +%global rubygems_version 2.5.2.1 +%global molinillo_version 0.4.1 # TODO: The IRB has strange versioning. Keep the Ruby's versioning ATM. # http://redmine.ruby-lang.org/issues/5313 @@ -39,10 +39,10 @@ %global bigdecimal_version 1.2.8 %global did_you_mean_version 1.0.0 %global io_console_version 0.4.5 -%global json_version 1.8.3 -%global minitest_version 5.8.3 +%global json_version 1.8.3.1 +%global minitest_version 5.8.5 %global power_assert_version 0.2.6 -%global psych_version 2.0.17 +%global psych_version 2.1.0.1 %global rake_version 10.4.2 %global rdoc_version 4.2.1 %global net_telnet_version 0.1.1 @@ -122,13 +122,18 @@ Patch6: ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch # Use miniruby to regenerate prelude.c. # https://bugs.ruby-lang.org/issues/10554 Patch7: ruby-2.2.3-Generate-preludes-using-miniruby.patch -# Prevent test failures on ARM. -# https://bugs.ruby-lang.org/issues/12331 -Patch8: ruby-2.4.0-increase-timeout-for-ARMv7.patch # Workaround "an invalid stdio handle" error on PPC, due to recently introduced # hardening features of glibc (rhbz#1361037). # https://bugs.ruby-lang.org/issues/12666 Patch9: ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch +# Revert experimental rounding that does not work on i686: +# https://bugs.ruby-lang.org/issues/13980 +Patch10: ruby-2.3.5-Revert-experimental-rounding-on-i686.patch +# Do not freeze strings in generated .gemspec. This causes regressions +# and FTBFS in Fedora packages. This is revert of: +# https://github.com/rubygems/rubygems/commit/8eda3272d28010c768a05620de776e5a8195c1ae +# https://lists.fedoraproject.org/archives/list/ruby-sig@lists.fedoraproject.org/message/NLZRTNIMG7NB5V3D4PAQKQLYEKC2TQSY/ +Patch100: ruby-2.3.3-Revert-use-frozen-strings-in-serialized-specs.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Suggests: rubypick @@ -476,8 +481,9 @@ rm -rf ext/fiddle/libffi* %patch5 -p1 %patch6 -p1 %patch7 -p1 -%patch8 -p1 %patch9 -p1 +%patch10 -p1 +%patch100 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -537,10 +543,13 @@ for cert in \ EntrustnetSecureServerCertificationAuthority.pem \ GeoTrustGlobalCA.pem \ AddTrustExternalCARoot.pem \ - AddTrustExternalCARoot-2048.pem + AddTrustExternalCARoot-2048.pem \ + GlobalSignRootCA.pem do rm %{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)" # Move macros file into proper place and replace the %%{name} macro, since it # would be wrongly evaluated during build of other packages. @@ -713,6 +722,7 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/*.rb %exclude %{ruby_libdir}/*-tk.rb %exclude %{ruby_libdir}/irb.rb +%exclude %{ruby_libdir}/json.rb %exclude %{ruby_libdir}/tcltk.rb %exclude %{ruby_libdir}/tk*.rb %exclude %{ruby_libdir}/psych.rb @@ -963,6 +973,36 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Mon Oct 02 2017 Pavel Valena - 2.3.5-65 +- Update to Ruby 2.3.5. + +* Wed Sep 06 2017 Vít Ondruch - 2.3.4-64 +- Fix ANSI escape sequence vulnerability (rhbz#1487590). +- Fix DoS vulnerability in the query command (rhbz#1487588). +- Fix a vulnerability in the gem installer that allowed a malicious gem + to overwrite arbitrary files (rhbz#1487587). +- Fix DNS request hijacking vulnerability (rhbz#1487589). +- Fix arbitrary heap exposure during a JSON.generate call (rhbz#1487552). + +* Tue Aug 08 2017 Vít Ondruch - 2.3.4-63 +- Update to Ruby 2.3.4. +- Fix SMTP command injection via CRLF sequences in RCPT TO or MAIL FROM + commands in Net::SMTP (rhbz#1461848). + +* Thu Jul 27 2017 Vít Ondruch - 2.3.3-62 +- Fix IV Reuse in GCM Mode (rhbz#1381527). + +* Thu Dec 01 2016 Vít Ondruch - 2.3.3-61.1 +- Do not freeze strings in generated .gemspec. + +* Tue Nov 22 2016 Vít Ondruch - 2.3.3-61 +- Update to Ruby 2.3.3. +- Exclude json.rb from ruby-libs (rhbz#1397370). + +* Fri Nov 18 2016 Vít Ondruch - 2.3.2-60 +- Update to Ruby 2.3.2. +- Add gemspec_add_dep and gemspec_remove_dep macros. + * Wed Aug 10 2016 Vít Ondruch - 2.3.1-58 - Workaround "an invalid stdio handle" error on PPC (rhbz#1361037). diff --git a/sources b/sources index 6eb7405..b202e1f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -01e9d172a5c33b385e92fc0cc2899766 ruby-2.3.1.tar.xz +SHA512 (ruby-2.3.5.tar.xz) = c55e3b71241f505b6bbad78b3bd40235064faae3443ca14b77b6356556caed6a0d055dc2e2cd7ebdb5290ab908e06d2b7d68f72469af5017eda4b29664b0d889