From 090be3ee3b0b4b975ffe2d65bf0faeeb7bc5495d Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Nov 03 2016 06:02:41 +0000 Subject: import ruby-2.0.0.648-29.el7 --- diff --git a/.gitignore b/.gitignore index 33fe67e..ababb4a 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/ruby-2.0.0-p598.tar.bz2 +SOURCES/ruby-2.0.0-p648.tar.bz2 diff --git a/.ruby.metadata b/.ruby.metadata index e991c7c..bb08655 100644 --- a/.ruby.metadata +++ b/.ruby.metadata @@ -1 +1 @@ -992416657832c775ff41452af81c962981ddbde2 SOURCES/ruby-2.0.0-p598.tar.bz2 +504be2eae6cdfe93aa7ed02ec55e35043d067ad5 SOURCES/ruby-2.0.0-p648.tar.bz2 diff --git a/SOURCES/ruby-1.9.3-mkmf-verbose.patch b/SOURCES/ruby-1.9.3-mkmf-verbose.patch index cc93b45..ca72051 100644 --- a/SOURCES/ruby-1.9.3-mkmf-verbose.patch +++ b/SOURCES/ruby-1.9.3-mkmf-verbose.patch @@ -11,7 +11,7 @@ diff --git a/lib/mkmf.rb b/lib/mkmf.rb index 4b6c52e..67a15ee 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb -@@ -1791,7 +1791,7 @@ SRC +@@ -1784,7 +1784,7 @@ SRC SHELL = /bin/sh # V=0 quiet, V=1 verbose. other values don't work. diff --git a/SOURCES/ruby-2.0.0-p247-Revert-mkmf.rb-prefix-install_dirs-only-with-DESTDIR.patch b/SOURCES/ruby-2.0.0-p247-Revert-mkmf.rb-prefix-install_dirs-only-with-DESTDIR.patch deleted file mode 100644 index e4e7c51..0000000 --- a/SOURCES/ruby-2.0.0-p247-Revert-mkmf.rb-prefix-install_dirs-only-with-DESTDIR.patch +++ /dev/null @@ -1,70 +0,0 @@ -From 28e8a4ad0146fef37b514bde9a27ba5b6f7c34c5 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Tue, 2 Jul 2013 11:51:50 +0200 -Subject: [PATCH] Revert "mkmf.rb: prefix install_dirs only with DESTDIR" - -This reverts commit 7e1d5045943835ff906850e7b3bc71f985ae5f36. ---- - lib/mkmf.rb | 29 ++++++++++++++--------------- - 1 file changed, 14 insertions(+), 15 deletions(-) - -diff --git a/lib/mkmf.rb b/lib/mkmf.rb -index ee89198..cca487e 100644 ---- a/lib/mkmf.rb -+++ b/lib/mkmf.rb -@@ -189,21 +189,21 @@ module MakeMakefile - ] - elsif $configure_args.has_key?('--vendor') - dirs = [ -- ['BINDIR', '$(DESTDIR)$(bindir)'], -- ['RUBYCOMMONDIR', '$(DESTDIR)$(vendordir)$(target_prefix)'], -- ['RUBYLIBDIR', '$(DESTDIR)$(vendorlibdir)$(target_prefix)'], -- ['RUBYARCHDIR', '$(DESTDIR)$(vendorarchdir)$(target_prefix)'], -- ['HDRDIR', '$(DESTDIR)$(rubyhdrdir)/ruby$(target_prefix)'], -- ['ARCHHDRDIR', '$(DESTDIR)$(rubyhdrdir)/$(arch)/ruby$(target_prefix)'], -+ ['BINDIR', '$(bindir)'], -+ ['RUBYCOMMONDIR', '$(vendordir)$(target_prefix)'], -+ ['RUBYLIBDIR', '$(vendorlibdir)$(target_prefix)'], -+ ['RUBYARCHDIR', '$(vendorarchdir)$(target_prefix)'], -+ ['HDRDIR', '$(rubyhdrdir)/ruby$(target_prefix)'], -+ ['ARCHHDRDIR', '$(rubyhdrdir)/$(arch)/ruby$(target_prefix)'], - ] - else - dirs = [ -- ['BINDIR', '$(DESTDIR)$(bindir)'], -- ['RUBYCOMMONDIR', '$(DESTDIR)$(sitedir)$(target_prefix)'], -- ['RUBYLIBDIR', '$(DESTDIR)$(sitelibdir)$(target_prefix)'], -- ['RUBYARCHDIR', '$(DESTDIR)$(sitearchdir)$(target_prefix)'], -- ['HDRDIR', '$(DESTDIR)$(rubyhdrdir)/ruby$(target_prefix)'], -- ['ARCHHDRDIR', '$(DESTDIR)$(rubyhdrdir)/$(arch)/ruby$(target_prefix)'], -+ ['BINDIR', '$(bindir)'], -+ ['RUBYCOMMONDIR', '$(sitedir)$(target_prefix)'], -+ ['RUBYLIBDIR', '$(sitelibdir)$(target_prefix)'], -+ ['RUBYARCHDIR', '$(sitearchdir)$(target_prefix)'], -+ ['HDRDIR', '$(rubyhdrdir)/ruby$(target_prefix)'], -+ ['ARCHHDRDIR', '$(rubyhdrdir)/$(arch)/ruby$(target_prefix)'], - ] - end - dirs << ['target_prefix', (target_prefix ? "/#{target_prefix}" : "")] -@@ -1741,7 +1741,6 @@ SRC - end - - def with_destdir(dir) -- return dir unless $extmk - dir = dir.sub($dest_prefix_pattern, '') - /\A\$[\(\{]/ =~ dir ? dir : "$(DESTDIR)"+dir - end -@@ -1800,8 +1799,8 @@ ECHO = $(ECHO1:0=@echo) - #### Start of system configuration section. #### - #{"top_srcdir = " + $top_srcdir.sub(%r"\A#{Regexp.quote($topdir)}/", "$(topdir)/") if $extmk} - srcdir = #{srcdir.gsub(/\$\((srcdir)\)|\$\{(srcdir)\}/) {mkintpath(CONFIG[$1||$2]).unspace}} --topdir = #{mkintpath(topdir = $extmk ? CONFIG["topdir"] : $topdir).unspace} --hdrdir = #{(hdrdir = CONFIG["hdrdir"]) == topdir ? "$(topdir)" : mkintpath(hdrdir).unspace} -+topdir = #{mkintpath($extmk ? CONFIG["topdir"] : $topdir).unspace} -+hdrdir = #{mkintpath(CONFIG["hdrdir"]).unspace} - arch_hdrdir = #{$arch_hdrdir.quote} - PATH_SEPARATOR = #{CONFIG['PATH_SEPARATOR']} - VPATH = #{vpath.join(CONFIG['PATH_SEPARATOR'])} --- -1.8.2.1 - diff --git a/SOURCES/ruby-2.0.0-p607-DNS-Resolv-fall-back-if-canonicalization-fails.patch b/SOURCES/ruby-2.0.0-p607-DNS-Resolv-fall-back-if-canonicalization-fails.patch deleted file mode 100644 index 539fc7e..0000000 --- a/SOURCES/ruby-2.0.0-p607-DNS-Resolv-fall-back-if-canonicalization-fails.patch +++ /dev/null @@ -1,73 +0,0 @@ -From d52aaa5a5ebf281f96eac136ba68e63295c5bb8e Mon Sep 17 00:00:00 2001 -From: usa -Date: Wed, 14 Jan 2015 06:55:00 +0000 -Subject: [PATCH] merge revision(s) 48534: [Backport #10412] - - * lib/resolv.rb: fall back if canonicalization fails. - Thanks Vit Ondruch for the patch! [ruby-core:65836] - - * test/resolv/test_dns.rb: test for patch - - -git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@49245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e ---- - ChangeLog | 7 +++++++ - lib/resolv.rb | 4 ++++ - test/resolv/test_dns.rb | 14 ++++++++++++++ - 3 files changed, 25 insertions(+), 0 deletions(-) - -diff --git a/ChangeLog b/ChangeLog -index 1aea7c0..8ea4238 100644 ---- a/ChangeLog -+++ b/ChangeLog -@@ -1,3 +1,10 @@ -+Wed Jan 14 15:54:18 2015 Aaron Patterson -+ -+ * lib/resolv.rb: fall back if canonicalization fails. -+ Thanks Vit Ondruch for the patch! [ruby-core:65836] -+ -+ * test/resolv/test_dns.rb: test for patch -+ - Thu Nov 13 22:31:50 2014 CHIKANAGA Tomoyuki - - * lib/rexml/document.rb: add REXML::Document#document. -diff --git a/lib/resolv.rb b/lib/resolv.rb -index 53bfd54..a302d8a 100644 ---- a/lib/resolv.rb -+++ b/lib/resolv.rb -@@ -1039,6 +1039,10 @@ def generate_candidates(name) - candidates = [] - end - candidates.concat(@search.map {|domain| Name.new(name.to_a + domain)}) -+ fname = Name.create("#{name}.") -+ if !candidates.include?(fname) -+ candidates << fname -+ end - end - return candidates - end -diff --git a/test/resolv/test_dns.rb b/test/resolv/test_dns.rb -index 07396fb..4d83d88 100644 ---- a/test/resolv/test_dns.rb -+++ b/test/resolv/test_dns.rb -@@ -23,6 +23,20 @@ def with_udp(host, port) - end - end - -+ # [ruby-core:65836] -+ def test_resolve_with_2_ndots -+ conf = Resolv::DNS::Config.new :nameserver => ['127.0.0.1'], :ndots => 2 -+ assert conf.single? -+ -+ candidates = [] -+ conf.resolv('example.com') { |candidate, *args| -+ candidates << candidate -+ raise Resolv::DNS::Config::NXDomain -+ } -+ n = Resolv::DNS::Name.create 'example.com.' -+ assert_equal n, candidates.last -+ end -+ - def test_query_ipv4_address - begin - OpenSSL diff --git a/SOURCES/ruby-2.1.0-CVE-2014-4975-fix-buffer-overru-by-tail_lf.patch b/SOURCES/ruby-2.1.0-CVE-2014-4975-fix-buffer-overru-by-tail_lf.patch index 848b38b..f103780 100644 --- a/SOURCES/ruby-2.1.0-CVE-2014-4975-fix-buffer-overru-by-tail_lf.patch +++ b/SOURCES/ruby-2.1.0-CVE-2014-4975-fix-buffer-overru-by-tail_lf.patch @@ -2,7 +2,7 @@ Index: ChangeLog =================================================================== --- ChangeLog (revision 46805) +++ ChangeLog (revision 46806) -@@ -493,6 +493,11 @@ +@@ -837,6 +837,11 @@ * array.c (rb_ary_permutation): `p` is the array of size `r`, as commented at permute0(). since `n >= r` here, buffer overflow never happened, just reduce unnecessary allocation though. @@ -18,7 +18,7 @@ Index: pack.c =================================================================== --- pack.c (revision 46805) +++ pack.c (revision 46806) -@@ -1063,7 +1063,8 @@ +@@ -1088,7 +1088,8 @@ static void encodes(VALUE str, const char *s, long len, int type, int tail_lf) { @@ -28,7 +28,7 @@ Index: pack.c long i = 0; const char *trans = type == 'u' ? uu_table : b64_table; char padding; -@@ -1076,7 +1077,7 @@ +@@ -1101,7 +1102,7 @@ padding = '='; } while (len >= 3) { @@ -37,7 +37,7 @@ Index: pack.c buff[i++] = trans[077 & (*s >> 2)]; buff[i++] = trans[077 & (((*s << 4) & 060) | ((s[1] >> 4) & 017))]; buff[i++] = trans[077 & (((s[1] << 2) & 074) | ((s[2] >> 6) & 03))]; -@@ -1084,7 +1085,7 @@ +@@ -1109,7 +1110,7 @@ s += 3; len -= 3; } @@ -46,7 +46,7 @@ Index: pack.c rb_str_buf_cat(str, buff, i); i = 0; } -@@ -1104,6 +1105,7 @@ +@@ -1129,6 +1130,7 @@ } if (tail_lf) buff[i++] = '\n'; rb_str_buf_cat(str, buff, i); diff --git a/SOURCES/ruby-2.1.0-fix-hash-table-performance-slowdown-on-ppc64le.patch b/SOURCES/ruby-2.1.0-fix-hash-table-performance-slowdown-on-ppc64le.patch new file mode 100644 index 0000000..43a954b --- /dev/null +++ b/SOURCES/ruby-2.1.0-fix-hash-table-performance-slowdown-on-ppc64le.patch @@ -0,0 +1,64 @@ +From 59ed302965c5e38526ad33b13d8361859c5e7726 Mon Sep 17 00:00:00 2001 +From: nobu +Date: Sat, 30 Nov 2013 04:28:15 +0000 +Subject: [PATCH] siphash.c: fix missing condition + +* siphash.c (sip_hash24): fix for aligned word access little endian + platforms. [ruby-core:58658] [Bug #9172] + +git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e +--- + ChangeLog | 5 +++++ + siphash.c | 4 ++-- + test/ruby/test_string.rb | 2 ++ + 3 files changed, 9 insertions(+), 2 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index f732f5c..1e803ff 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,8 @@ ++Sat Nov 30 13:28:13 2013 Nobuyoshi Nakada ++ ++ * siphash.c (sip_hash24): fix for aligned word access little endian ++ platforms. [ruby-core:58658] [Bug #9172] ++ + Fri Apr 22 21:00:44 2016 Tanaka Akira + + * test/ruby/test_time_tz.rb: Tests depends on Europe/Moscow removed + +diff --git a/siphash.c b/siphash.c +index 2018ade..cd8ba62 100644 +--- a/siphash.c ++++ b/siphash.c +@@ -417,7 +417,7 @@ sip_hash24(const uint8_t key[16], const uint8_t *data, size_t len) + SIP_2_ROUND(m, v0, v1, v2, v3); + } + } +-#elif BYTE_ORDER == BIG_ENDIAN ++#else + for (; data != end; data += sizeof(uint64_t)) { + m = U8TO64_LE(data); + SIP_2_ROUND(m, v0, v1, v2, v3); +@@ -453,7 +453,7 @@ sip_hash24(const uint8_t key[16], const uint8_t *data, size_t len) + last.lo |= ((uint32_t *) end)[0]; + #endif + break; +-#elif BYTE_ORDER == BIG_ENDIAN ++#else + OR_BYTE(3); + #endif + case 3: +diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb +index 2ff8458..7ce1c06 100644 +--- a/test/ruby/test_string.rb ++++ b/test/ruby/test_string.rb +@@ -895,6 +895,8 @@ class TestString < Test::Unit::TestCase + assert(S("hello").hash != S("helLO").hash) + bug4104 = '[ruby-core:33500]' + assert_not_equal(S("a").hash, S("a\0").hash, bug4104) ++ bug9172 = '[ruby-core:58658] [Bug #9172]' ++ assert_not_equal(S("sub-setter").hash, S("discover").hash, bug9172) + end + + def test_hash_random diff --git a/SOURCES/ruby-2.1.0-fix-hostname-size-limit.patch b/SOURCES/ruby-2.1.0-fix-hostname-size-limit.patch new file mode 100644 index 0000000..6a08bcf --- /dev/null +++ b/SOURCES/ruby-2.1.0-fix-hostname-size-limit.patch @@ -0,0 +1,68 @@ +From e41ee7cf3347ced6e689c198dbf3c5900009d70f Mon Sep 17 00:00:00 2001 +From: usa +Date: Thu, 25 Feb 2016 10:58:02 +0000 +Subject: [PATCH] merge revision(s) 53677: [Backport #11877] + + * ext/socket/socket.c (sock_gethostname): support unlimited size + hostname. + + +git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@53936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e +--- + ChangeLog | 5 +++++ + ext/socket/socket.c | 26 ++++++++++++++++++++------ + version.h | 2 +- + 3 files changed, 26 insertions(+), 7 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index f407b73..2216dd4 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,8 @@ ++Thu Feb 25 19:49:31 2016 Nobuyoshi Nakada ++ ++ * ext/socket/socket.c (sock_gethostname): support unlimited size ++ hostname. ++ + Sat Feb 13 17:11:58 2016 Fabian Wiesel + + * lib/uri/generic.rb (find_proxy): exclude white-spaces and allow +diff --git a/ext/socket/socket.c b/ext/socket/socket.c +index 0592432..13006ab 100644 +--- a/ext/socket/socket.c ++++ b/ext/socket/socket.c +@@ -898,14 +898,28 @@ sock_gethostname(VALUE obj) + #ifndef HOST_NAME_MAX + # define HOST_NAME_MAX 1024 + #endif +- char buf[HOST_NAME_MAX+1]; ++ long len = HOST_NAME_MAX; ++ VALUE name; + + rb_secure(3); +- if (gethostname(buf, (int)sizeof buf - 1) < 0) +- rb_sys_fail("gethostname"); +- +- buf[sizeof buf - 1] = '\0'; +- return rb_str_new2(buf); ++ name = rb_str_new(0, len); ++ while (gethostname(RSTRING_PTR(name), len) < 0) { ++ int e = errno; ++ switch (e) { ++ case ENAMETOOLONG: ++#ifdef __linux__ ++ case EINVAL: ++ /* glibc before version 2.1 uses EINVAL instead of ENAMETOOLONG */ ++#endif ++ break; ++ default: ++ rb_syserr_fail(e, "gethostname(3)"); ++ } ++ rb_str_modify_expand(name, len); ++ len += len; ++ } ++ rb_str_resize(name, strlen(RSTRING_PTR(name))); ++ return name; + } + #else + #ifdef HAVE_UNAME diff --git a/SOURCES/ruby-2.2.0-fix-missing-declaration-of-rb_frame_last_func.patch b/SOURCES/ruby-2.2.0-fix-missing-declaration-of-rb_frame_last_func.patch new file mode 100644 index 0000000..c41d254 --- /dev/null +++ b/SOURCES/ruby-2.2.0-fix-missing-declaration-of-rb_frame_last_func.patch @@ -0,0 +1,33 @@ +From 428791543be9e13af9426970f5796f3157dd30a0 Mon Sep 17 00:00:00 2001 +From: nobu +Date: Tue, 9 Dec 2014 01:16:27 +0000 +Subject: [PATCH] thread.c: get rid of invalid ID symbol + +* eval.c (rb_frame_last_func): return the most recent frame method + name. +* thread.c (recursive_list_access): use the last method name, + instead of the current method name which can be unset in some + cases, not to use a symbol by the invalid ID. + [ruby-core:66742] [Bug #10579] + +git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e +--- + ChangeLog | 10 ++++++++++ + eval.c | 13 +++++++++++++ + test/ruby/test_objectspace.rb | 7 +++++++ + thread.c | 5 ++++- + 4 files changed, 34 insertions(+), 1 deletion(-) + +diff --git a/thread.c b/thread.c +index 25cc214..360c6cb 100644 +--- a/thread.c ++++ b/thread.c +@@ -4671,6 +4671,8 @@ threadptr_recursive_hash_set(rb_thread_t *th, VALUE hash) + /* variables for recursive traversals */ + static ID recursive_key; + ++ID rb_frame_last_func(void); ++ + /* + * Returns the current "recursive list" used to detect recursion. + * This list is a hash table, unique for the current thread and for diff --git a/SOURCES/ruby-2.3.0-test_gem_remote_fetcher.rb-get-rid-of-errors.patch b/SOURCES/ruby-2.3.0-test_gem_remote_fetcher.rb-get-rid-of-errors.patch new file mode 100644 index 0000000..e067cbd --- /dev/null +++ b/SOURCES/ruby-2.3.0-test_gem_remote_fetcher.rb-get-rid-of-errors.patch @@ -0,0 +1,30 @@ +From 6398515adfc86813686605019a3e22d49cd95517 Mon Sep 17 00:00:00 2001 +From: nobu +Date: Fri, 19 Jun 2015 06:04:00 +0000 +Subject: [PATCH] test_gem_remote_fetcher.rb: get rid of errors + +* test/rubygems/test_gem_remote_fetcher.rb (start_ssl_server): + temporary measure for "dh key too small" error of OpenSSL + 1.0.2c+. + +git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e +--- + test/rubygems/test_gem_remote_fetcher.rb | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/rubygems/test_gem_remote_fetcher.rb b/test/rubygems/test_gem_remote_fetcher.rb +index 6b29e18..63dd8fe 100644 +--- a/test/rubygems/test_gem_remote_fetcher.rb ++++ b/test/rubygems/test_gem_remote_fetcher.rb +@@ -979,7 +979,7 @@ + end + + DIR = File.expand_path(File.dirname(__FILE__)) +- DH_PARAM = OpenSSL::PKey::DH.new(128) ++ DH_PARAM = OpenSSL::PKey::DH.new(2048) + + def start_ssl_server(config = {}) + null_logger = NilLog.new +-- +2.4.3 + diff --git a/SOURCES/ruby-2.3.1-remove-tests-depending-on-europe-moscow.patch b/SOURCES/ruby-2.3.1-remove-tests-depending-on-europe-moscow.patch new file mode 100644 index 0000000..dde5de6 --- /dev/null +++ b/SOURCES/ruby-2.3.1-remove-tests-depending-on-europe-moscow.patch @@ -0,0 +1,60 @@ +From c5c60ded6dbb6256640b0308a45c42da8c7fe071 Mon Sep 17 00:00:00 2001 +From: akr +Date: Fri, 22 Apr 2016 12:20:06 +0000 +Subject: [PATCH] * test/ruby/test_time_tz.rb: Tests depends on Europe/Moscow + removed to avoid test failures due to the tzdata change. + https://github.com/eggert/tz/commit/8ee11a301cf173afb0c76e0315b9f9ec8ebb9d95 + Found by naruse. + +git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e +--- + ChangeLog | 7 +++++++ + test/ruby/test_time_tz.rb | 13 ------------- + 2 files changed, 7 insertions(+), 13 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 3b96a9b..965f296 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,10 @@ ++Fri Apr 22 21:00:44 2016 Tanaka Akira ++ ++ * test/ruby/test_time_tz.rb: Tests depends on Europe/Moscow removed ++ to avoid test failures due to the tzdata change. ++ https://github.com/eggert/tz/commit/8ee11a301cf173afb0c76e0315b9f9ec8ebb9d95 ++ Found by naruse. ++ + Wed Dec 16 21:16:55 2015 CHIKANAGA Tomoyuki + + * ext/fiddle/handle.c: check tainted string arguments. +diff --git a/test/ruby/test_time_tz.rb b/test/ruby/test_time_tz.rb +index f5d4690..b40b1ac 100644 +--- a/test/ruby/test_time_tz.rb ++++ b/test/ruby/test_time_tz.rb +@@ -161,13 +161,6 @@ def test_europe_lisbon + } + end if has_lisbon_tz + +- def test_europe_moscow +- with_tz(tz="Europe/Moscow") { +- assert_time_constructor(tz, "1992-03-29 00:00:00 +0400", :local, [1992,3,28,23,0,0]) +- assert_time_constructor(tz, "1992-03-29 00:59:59 +0400", :local, [1992,3,28,23,59,59]) +- } +- end +- + def test_pacific_kiritimati + with_tz(tz="Pacific/Kiritimati") { + assert_time_constructor(tz, "1994-12-31 23:59:59 -1000", :local, [1994,12,31,23,59,59]) +@@ -346,12 +339,6 @@ def self.gen_zdump_test(data) + Europe/London Sun Aug 10 01:00:00 1947 UTC = Sun Aug 10 02:00:00 1947 BST isdst=1 gmtoff=3600 + Europe/London Sun Nov 2 01:59:59 1947 UTC = Sun Nov 2 02:59:59 1947 BST isdst=1 gmtoff=3600 + Europe/London Sun Nov 2 02:00:00 1947 UTC = Sun Nov 2 02:00:00 1947 GMT isdst=0 gmtoff=0 +-Europe/Moscow Sat Jan 18 23:59:59 1992 UTC = Sun Jan 19 01:59:59 1992 MSK isdst=0 gmtoff=7200 +-Europe/Moscow Sun Jan 19 00:00:00 1992 UTC = Sun Jan 19 03:00:00 1992 MSK isdst=0 gmtoff=10800 +-Europe/Moscow Sat Mar 28 19:59:59 1992 UTC = Sat Mar 28 22:59:59 1992 MSK isdst=0 gmtoff=10800 +-Europe/Moscow Sat Mar 28 20:00:00 1992 UTC = Sun Mar 29 00:00:00 1992 MSD isdst=1 gmtoff=14400 +-Europe/Moscow Sat Sep 26 18:59:59 1992 UTC = Sat Sep 26 22:59:59 1992 MSD isdst=1 gmtoff=14400 +-Europe/Moscow Sat Sep 26 19:00:00 1992 UTC = Sat Sep 26 22:00:00 1992 MSK isdst=0 gmtoff=10800 + Pacific/Kiritimati Sun Jan 1 09:59:59 1995 UTC = Sat Dec 31 23:59:59 1994 LINT isdst=0 gmtoff=-36000 + Pacific/Kiritimati Sun Jan 1 10:00:00 1995 UTC = Mon Jan 2 00:00:00 1995 LINT isdst=0 gmtoff=50400 + End diff --git a/SOURCES/ruby-2.4.0-no_proxy-with-whitespaces-and-leading-dots.patch b/SOURCES/ruby-2.4.0-no_proxy-with-whitespaces-and-leading-dots.patch new file mode 100644 index 0000000..c76edb9 --- /dev/null +++ b/SOURCES/ruby-2.4.0-no_proxy-with-whitespaces-and-leading-dots.patch @@ -0,0 +1,71 @@ +From 423d042371d0402071c309dc403ea2701600a98b Mon Sep 17 00:00:00 2001 +From: nobu +Date: Sat, 13 Feb 2016 08:12:21 +0000 +Subject: [PATCH] no_proxy with whitespaces and leading dots + +* lib/uri/generic.rb (find_proxy): exclude white-spaces and allow + for a leading dot in the domain name in no_proxy. + [ruby-core:54542] [Feature #8317] + +The previous implementation wouldn't allow for white-spaces nor a leading dot +in the domain name. The latter is described in the wget documentation as a valid case. + +By being more strict on the characters, which are counted to a domainname, +we allow for white-spaces. +Also, a possible leading dot will be handled gracefully. + +[Fix GH-285] + +git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e +--- + ChangeLog | 6 ++++++ + lib/uri/generic.rb | 2 +- + test/uri/test_generic.rb | 4 ++++ + 3 files changed, 11 insertions(+), 1 deletion(-) + +diff --git a/ChangeLog b/ChangeLog +index 2945679..44116e0 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,9 @@ ++Sat Feb 13 17:11:58 2016 Fabian Wiesel ++ ++ * lib/uri/generic.rb (find_proxy): exclude white-spaces and allow ++ for a leading dot in the domain name in no_proxy. ++ [ruby-core:54542] [Feature #8317] ++ + Sat Nov 30 13:28:13 2013 Nobuyoshi Nakada + + * siphash.c (sip_hash24): fix for aligned word access little endian +diff --git a/lib/uri/generic.rb b/lib/uri/generic.rb +index aba54c1..f2a2d56 100644 +--- a/lib/uri/generic.rb ++++ b/lib/uri/generic.rb +@@ -1662,7 +1662,7 @@ def find_proxy + + name = 'no_proxy' + if no_proxy = ENV[name] || ENV[name.upcase] +- no_proxy.scan(/([^:,]*)(?::(\d+))?/) {|host, port| ++ no_proxy.scan(/(?!\.)([^:,\s]+)(?::(\d+))?/) {|host, port| + if /(\A|\.)#{Regexp.quote host}\z/i =~ self.host && + (!port || self.port == port.to_i) + return nil +diff --git a/test/uri/test_generic.rb b/test/uri/test_generic.rb +index fcfe1f9..ad189fc 100644 +--- a/test/uri/test_generic.rb ++++ b/test/uri/test_generic.rb +@@ -773,6 +773,14 @@ def test_find_proxy + assert_equal(URI('http://127.0.0.1:8080'), URI("http://192.0.2.1/").find_proxy) + assert_nil(URI("http://192.0.2.2/").find_proxy) + } ++ with_env('http_proxy'=>'http://127.0.0.1:8080', 'no_proxy'=>'example.org') { ++ assert_nil(URI("http://example.org/").find_proxy) ++ assert_nil(URI("http://www.example.org/").find_proxy) ++ } ++ with_env('http_proxy'=>'http://127.0.0.1:8080', 'no_proxy'=>'.example.org') { ++ assert_nil(URI("http://example.org/").find_proxy) ++ assert_nil(URI("http://www.example.org/").find_proxy) ++ } + with_env('http_proxy'=>'') { + assert_nil(URI("http://192.0.2.1/").find_proxy) + assert_nil(URI("ftp://192.0.2.1/").find_proxy) diff --git a/SOURCES/ruby-openssl-wrap-cipher-fix.patch b/SOURCES/ruby-openssl-wrap-cipher-fix.patch deleted file mode 100644 index 4a4f419..0000000 --- a/SOURCES/ruby-openssl-wrap-cipher-fix.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/test/openssl/test_cipher.rb b/test/openssl/test_cipher.rb -index 15cfb7b..8055ce4 100644 ---- a/test/openssl/test_cipher.rb -+++ b/test/openssl/test_cipher.rb -@@ -104,6 +104,7 @@ class OpenSSL::TestCipher < Test::Unit::TestCase - def test_ciphers - OpenSSL::Cipher.ciphers.each{|name| - next if /netbsd/ =~ RUBY_PLATFORM && /idea|rc5/i =~ name -+ next if /wrap/ =~ name - assert(OpenSSL::Cipher::Cipher.new(name).is_a?(OpenSSL::Cipher::Cipher)) - } - end diff --git a/SOURCES/ruby-trunk-tk-extconf-fix.patch b/SOURCES/ruby-trunk-tk-extconf-fix.patch new file mode 100644 index 0000000..7e6e51b --- /dev/null +++ b/SOURCES/ruby-trunk-tk-extconf-fix.patch @@ -0,0 +1,71 @@ +From 399ef04d6540bf708e5281d8e649165f03e61e1e Mon Sep 17 00:00:00 2001 +From: Josef Stribny +Date: Thu, 9 Jan 2014 14:50:36 +0100 +Subject: [PATCH] Fix tk extconf to pass arrays instead of strings to + libpathflag + +--- + ext/tk/extconf.rb | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/ext/tk/extconf.rb b/ext/tk/extconf.rb +index ca99129..5b7c19b 100644 +--- a/ext/tk/extconf.rb ++++ b/ext/tk/extconf.rb +@@ -623,7 +623,7 @@ def libcheck_for_tclConfig(tcldir, tkdir, tclconf, tkconf) + $INCFLAGS << " -I" << File.join(File.dirname(File.dirname(file)),"include") if is_win32? + else + tcllibs = append_library($libs, libname) +- tcllibs = "#{libpathflag(tcldir)} #{tcllibs}" ++ tcllibs = "#{libpathflag([tcldir])} #{tcllibs}" + + # FIX ME: avoid pathname trouble (fail to find) on MinGW. + $INCFLAGS << " -I" << File.join(File.dirname(tcldir),"include") if is_win32? +@@ -665,7 +665,7 @@ def libcheck_for_tclConfig(tcldir, tkdir, tclconf, tkconf) + else + tklibs = append_library("", libname) + #tklibs = append_library("", $1) +- tklibs = "#{libpathflag(tkdir)} #{tklibs}" ++ tklibs = "#{libpathflag([tkdir])} #{tklibs}" + + # FIX ME: avoid pathname trouble (fail to find) on MinGW. + $INCFLAGS << " -I" << File.join(File.dirname(tcldir),"include") if is_win32? +@@ -1161,7 +1161,7 @@ def find_tcl(tcllib, stubs, version, *opt_paths) + tcllibs = libs_param + " -DSTATIC_BUILD " + fname.quote + else + tcllibs = append_library($libs, lib_w_sufx) +- tcllibs = "#{libpathflag(path)} #{tcllibs}" ++ tcllibs = "#{libpathflag([path])} #{tcllibs}" + end + if try_func(func, tcllibs, ["tcl.h"]) + return [true, path, nil, tcllibs, *inc] +@@ -1300,7 +1300,7 @@ def find_tk(tklib, stubs, version, *opt_paths) + tklibs = libs_param + " -DSTATIC_BUILD " + fname.quote + else + tklibs = append_library($libs, lib_w_sufx) +- tklibs = "#{libpathflag(path)} #{tklibs}" ++ tklibs = "#{libpathflag([path])} #{tklibs}" + end + if try_func(func, tklibs, ["tcl.h", "tk.h"]) + return [true, path, nil, tklibs, *inc] +@@ -2013,7 +2013,7 @@ $defs += collect_tcltk_defs(TclConfig_Info['TCL_DEFS'], TkConfig_Info['TK_DEFS'] + # MacOS X Frameworks? + if TkLib_Config["tcltk-framework"] + puts("Use MacOS X Frameworks.") +- ($LDFLAGS ||= "") << " " << libpathflag(TkLib_Config["tcl-build-dir"]) if TkLib_Config["tcl-build-dir"] ++ ($LDFLAGS ||= "") << " " << libpathflag([TkLib_Config["tcl-build-dir"]]) if TkLib_Config["tcl-build-dir"] + + libs = '' + if tcl_cfg_dir +@@ -2039,7 +2039,7 @@ if TkLib_Config["tcltk-framework"] + end + end + +- libs << " " << libpathflag(TkLib_Config["tk-build-dir"]) if TkLib_Config["tk-build-dir"] ++ libs << " " << libpathflag([TkLib_Config["tk-build-dir"]]) if TkLib_Config["tk-build-dir"] + + if tk_cfg_dir + TkConfig_Info['TK_LIBS'] ||= "" +-- +1.8.3.1 + diff --git a/SOURCES/ruby-trunk-tk-rpath-fix.patch b/SOURCES/ruby-trunk-tk-rpath-fix.patch new file mode 100644 index 0000000..935e01f --- /dev/null +++ b/SOURCES/ruby-trunk-tk-rpath-fix.patch @@ -0,0 +1,61 @@ +diff --git a/ext/tk/extconf.rb b/ext/tk/extconf.rb +index 709e4d2..fa1bc80 100644 +--- a/ext/tk/extconf.rb ++++ b/ext/tk/extconf.rb +@@ -623,7 +623,7 @@ def libcheck_for_tclConfig(tcldir, tkdir, tclconf, tkconf) + $INCFLAGS << " -I" << File.join(File.dirname(File.dirname(file)),"include") if is_win32? + else + tcllibs = append_library($libs, libname) +- tcllibs = "-L#{tcldir.quote} -Wl,-R#{tcldir.quote} " + tcllibs ++ tcllibs = "#{libpathflag(tcldir)} #{tcllibs}" + + # FIX ME: avoid pathname trouble (fail to find) on MinGW. + $INCFLAGS << " -I" << File.join(File.dirname(tcldir),"include") if is_win32? +@@ -665,7 +665,7 @@ def libcheck_for_tclConfig(tcldir, tkdir, tclconf, tkconf) + else + tklibs = append_library("", libname) + #tklibs = append_library("", $1) +- tklibs = "-L#{tkdir.quote} -Wl,-R#{tkdir.quote} " + tklibs ++ tklibs = "#{libpathflag(tkdir)} #{tklibs}" + + # FIX ME: avoid pathname trouble (fail to find) on MinGW. + $INCFLAGS << " -I" << File.join(File.dirname(tcldir),"include") if is_win32? +@@ -1161,7 +1161,7 @@ def find_tcl(tcllib, stubs, version, *opt_paths) + tcllibs = libs_param + " -DSTATIC_BUILD " + fname.quote + else + tcllibs = append_library($libs, lib_w_sufx) +- tcllibs = "-L#{path.quote} -Wl,-R#{path.quote} " + tcllibs ++ tcllibs = "#{libpathflag(path)} #{tcllibs}" + end + if try_func(func, tcllibs, ["tcl.h"]) + return [true, path, nil, tcllibs, *inc] +@@ -1300,7 +1300,7 @@ def find_tk(tklib, stubs, version, *opt_paths) + tklibs = libs_param + " -DSTATIC_BUILD " + fname.quote + else + tklibs = append_library($libs, lib_w_sufx) +- tklibs = "-L#{path.quote} -Wl,-R#{path.quote} " + tklibs ++ tklibs = "#{libpathflag(path)} #{tklibs}" + end + if try_func(func, tklibs, ["tcl.h", "tk.h"]) + return [true, path, nil, tklibs, *inc] +@@ -2013,7 +2013,7 @@ $defs += collect_tcltk_defs(TclConfig_Info['TCL_DEFS'], TkConfig_Info['TK_DEFS'] + # MacOS X Frameworks? + if TkLib_Config["tcltk-framework"] + puts("Use MacOS X Frameworks.") +- ($LDFLAGS ||= "") << " -L#{TkLib_Config["tcl-build-dir"].quote} -Wl,-R#{TkLib_Config["tcl-build-dir"].quote}" if TkLib_Config["tcl-build-dir"] ++ ($LDFLAGS ||= "") << " " << libpathflag(TkLib_Config["tcl-build-dir"]) if TkLib_Config["tcl-build-dir"] + + libs = '' + if tcl_cfg_dir +@@ -2039,7 +2039,7 @@ if TkLib_Config["tcltk-framework"] + end + end + +- libs << " -L#{TkLib_Config["tk-build-dir"].quote} -Wl,-R#{TkLib_Config["tk-build-dir"].quote}" if TkLib_Config["tk-build-dir"] ++ libs << " " << libpathflag(TkLib_Config["tk-build-dir"]) if TkLib_Config["tk-build-dir"] + + if tk_cfg_dir + TkConfig_Info['TK_LIBS'] ||= "" +-- +1.8.5.2 + diff --git a/SOURCES/rubygem-rdoc-4.0.1-unterminated-heredoc.patch b/SOURCES/rubygem-rdoc-4.0.1-unterminated-heredoc.patch new file mode 100644 index 0000000..08fdb92 --- /dev/null +++ b/SOURCES/rubygem-rdoc-4.0.1-unterminated-heredoc.patch @@ -0,0 +1,38 @@ +t a/lib/rdoc/ruby_lex.rb b/lib/rdoc/ruby_lex.rb +index e6e0b41..da17cd5 100644 +--- a/lib/rdoc/ruby_lex.rb ++++ b/lib/rdoc/ruby_lex.rb +@@ -1028,6 +1028,8 @@ def identify_here_document + end + + if output_heredoc then ++ raise Error, "Missing terminating #{quoted} for string" unless l ++ + doc << l.chomp + else + doc << '"' +diff --git a/test/rdoc/test_rdoc_ruby_lex.rb b/test/rdoc/test_rdoc_ruby_lex.rb +index 0dcb425..56ddf60 100644 +--- a/test/rdoc/test_rdoc_ruby_lex.rb ++++ b/test/rdoc/test_rdoc_ruby_lex.rb +@@ -162,6 +162,18 @@ def test_class_tokenize_heredoc_indent + assert_equal expected, tokens + end + ++ def test_class_tokenize_heredoc_missing_end ++ e = assert_raises RDoc::RubyLex::Error do ++ RDoc::RubyLex.tokenize <<-'RUBY', nil ++>> string1 = <<-TXT ++>" That's swell ++>" TXT ++ RUBY ++ end ++ ++ assert_equal 'Missing terminating TXT for string', e.message ++ end ++ + def test_class_tokenize_heredoc_percent_N + tokens = RDoc::RubyLex.tokenize <<-'RUBY', nil + a b <<-U +-- +1.8.4 diff --git a/SOURCES/rubygems-2.1.0-Fix-test-failure-when-ruby-is-not-yet-installed.patch b/SOURCES/rubygems-2.1.0-Fix-test-failure-when-ruby-is-not-yet-installed.patch new file mode 100644 index 0000000..878cf70 --- /dev/null +++ b/SOURCES/rubygems-2.1.0-Fix-test-failure-when-ruby-is-not-yet-installed.patch @@ -0,0 +1,35 @@ +From 40ce9bfd4917f8d8aa023c92073ec5e9da898f71 Mon Sep 17 00:00:00 2001 +From: Eric Hodel +Date: Tue, 23 Jul 2013 13:47:53 -0700 +Subject: [PATCH] Fix test failure when ruby is not yet installed + +Other uses of ruby in a Makefile use ENV['RUBY'] which contains a +miniruby invocation when ruby is not yet installed (tests run during the +ruby build). +--- + test/rubygems/test_gem_ext_ext_conf_builder.rb | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/test/rubygems/test_gem_ext_ext_conf_builder.rb b/test/rubygems/test_gem_ext_ext_conf_builder.rb +index 33398ac..dfbf3fe 100644 +--- a/test/rubygems/test_gem_ext_ext_conf_builder.rb ++++ b/test/rubygems/test_gem_ext_ext_conf_builder.rb +@@ -120,8 +120,13 @@ def test_class_build_unconventional + extconf.puts <<-'EXTCONF' + include RbConfig + +-ruby_exe = "#{CONFIG['RUBY_INSTALL_NAME']}#{CONFIG['EXEEXT']}" +-ruby = File.join CONFIG['bindir'], ruby_exe ++ruby = ++ if ENV['RUBY'] then ++ ENV['RUBY'] ++ else ++ ruby_exe = "#{CONFIG['RUBY_INSTALL_NAME']}#{CONFIG['EXEEXT']}" ++ File.join CONFIG['bindir'], ruby_exe ++ end + + open 'Makefile', 'w' do |io| + io.write <<-Makefile +-- +1.8.5.5 + diff --git a/SOURCES/test_abrt.rb b/SOURCES/test_abrt.rb new file mode 100644 index 0000000..6d110ba --- /dev/null +++ b/SOURCES/test_abrt.rb @@ -0,0 +1,7 @@ +if !!$LOADED_FEATURES.detect { |f| f =~ /abrt\.rb/ } + exit true +else + puts 'ERROR: ABRT hook was not loaded.' + + exit false +end diff --git a/SOURCES/test_systemtap.rb b/SOURCES/test_systemtap.rb new file mode 100644 index 0000000..eb518df --- /dev/null +++ b/SOURCES/test_systemtap.rb @@ -0,0 +1,64 @@ +require 'set' + +LIBRUBY_SO = 'libruby.so' +PROBES_D = 'probes.d' + +### +# Detect SystemTap section headers presence. + +stap_headers = [ + '\.stapsdt\.base', + '\.note\.stapsdt' +] + +header_regexp = %r{ (#{stap_headers.join('|')}) } + +section_headers = `readelf -S "#{LIBRUBY_SO}"` +detected_stap_headers = section_headers.scan(header_regexp).flatten + +# Assume there are both headers until this is proven wrong ;) +unless detected_stap_headers.size == 2 + puts 'ERROR: SystemTap (DTrace) headers were not detected in resulting library.' + exit false +end + +### +# Find if every declared probe is propagated to resulting library. + +# Colect probes specified in probes.d file. +probes = [] + +File.open(PROBES_D) do |file| + file.each_line do |line| + if probe = line[/probe (\S+)\(.*\);/, 1] + probes << probe + end + end +end + +probes = Set.new probes + +# These probes are excluded by VM_COLLECT_USAGE_DETAILS ifdef. +EXCLUDE_PROBES = Set.new %w(insn insn__operand) +unless EXCLUDE_PROBES.subset? probes + puts 'ERROR: Change in SystemTap (DTrace) probes definition file detected.' + exit false +end + +probes -= EXCLUDE_PROBES + +# Detect probes in resulting library. +probe_regexp = %r{ +^\s*stapsdt\s*0[xX][0-9a-fA-F]+\tNT_STAPSDT \(SystemTap probe descriptors\)$ +^\s*Provider: ruby$ +^\s*Name: (\S+)$ +} + +notes = `readelf -n "#{LIBRUBY_SO}"` +detected_probes = Set.new notes.scan(probe_regexp).flatten + +# Both sets must be equal, otherwise something is wrong. +unless probes == detected_probes + puts 'ERROR: SystemTap (DTrace) probes were not correctly propagated into resulting library.' + exit false +end diff --git a/SPECS/ruby.spec b/SPECS/ruby.spec index 7cda2ca..c8baad9 100644 --- a/SPECS/ruby.spec +++ b/SPECS/ruby.spec @@ -1,7 +1,7 @@ %global major_version 2 %global minor_version 0 %global teeny_version 0 -%global patch_level 598 +%global patch_level 648 %global major_minor_version %{major_version}.%{minor_version} @@ -26,10 +26,10 @@ %endif -%global release 25 +%global release 29 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} -%global rubygems_version 2.0.14 +%global rubygems_version 2.0.14.1 # The RubyGems library has to stay out of Ruby directory three, since the # RubyGems should be share by all Ruby implementations. @@ -79,6 +79,10 @@ Source6: abrt_prelude.rb # https://fedorahosted.org/fpc/ticket/312 # https://bugzilla.redhat.com/show_bug.cgi?id=977941 Source7: config.h +# ABRT hoook test case. +Source8: test_abrt.rb +# SystemTap tests. +Source9: test_systemtap.rb # Include the constants defined in macros files. @@ -149,18 +153,44 @@ Patch16: ruby-2.0.0-p195-aarch64.patch # in support for ABRT. # http://bugs.ruby-lang.org/issues/8566 Patch17: ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch -# Fixes issues with DESTDIR. -# https://bugs.ruby-lang.org/issues/8115 -Patch18: ruby-2.0.0-p247-Revert-mkmf.rb-prefix-install_dirs-only-with-DESTDIR.patch -# Fix FTBFS due to a support for RFC 5649 in OpenSSL -# https://bugs.ruby-lang.org/issues/10229 -Patch23: ruby-openssl-wrap-cipher-fix.patch # CVE-2014-4975: Fix off-by-one stack-based buffer overflow in the encodes() function # https://bugs.ruby-lang.org/issues/10019 Patch24: ruby-2.1.0-CVE-2014-4975-fix-buffer-overru-by-tail_lf.patch -# DNS Resolv broken when resolv.conf has option ndots > 1 -# https://bugzilla.redhat.com/show_bug.cgi?id=1200419 -Patch25: ruby-2.0.0-p607-DNS-Resolv-fall-back-if-canonicalization-fails.patch +# Remove tests depending on europe/moscow to avoid failures due to tzdata change +# https://github.com/eggert/tz/commit/8ee11a301cf173afb0c76e0315b9f9ec8ebb9d95 +Patch26: ruby-2.3.1-remove-tests-depending-on-europe-moscow.patch +# Raise an Error on a unterminated heredoc +# https://github.com/rdoc/rdoc/commit/f4f5b94285aa9b20cacf78bda61450e17be63a22 +Patch27: rubygem-rdoc-4.0.1-unterminated-heredoc.patch +# Fix tk extconf not to include -rpath +# - p24 is upstream revision +# - p25 is my fix for the revision (otherwise tcl/tk won't build) +# https://bugs.ruby-lang.org/issues/9386 +Patch28: ruby-trunk-tk-rpath-fix.patch +Patch29: ruby-trunk-tk-extconf-fix.patch +# Fix test_execute_default_gem(TestGemCommandsContentsCommand) test error. +# https://github.com/rubygems/rubygems/commit/6b8681421b516be1244e17618507811923b1bb3b +Patch30: rubygems-2.1.0-Fix-test-failure-when-ruby-is-not-yet-installed.patch +# Fix "dh key too small" error of OpenSSL 1.0.2c+. +# https://github.com/rubygems/rubygems/issues/1289 +# https://github.com/ruby/ruby/commit/6398515adfc86813686605019a3e22d49cd95517 +Patch31: ruby-2.3.0-test_gem_remote_fetcher.rb-get-rid-of-errors.patch +# Fix significant hash table performance slowdown on ppc64le +# https://bugzilla.redhat.com/show_bug.cgi?id=1163032 +# https://github.com/ruby/ruby/commit/59ed302965c5e38526ad33b13d8361859c5e7726 +Patch32: ruby-2.1.0-fix-hash-table-performance-slowdown-on-ppc64le.patch +# Support in no_proxy for domain names with whitespaces and leading dots +# https://bugzilla.redhat.com/show_bug.cgi?id=1300433 +# https://github.com/ruby/ruby/commit/423d042371d0402071c309dc403ea2701600a98b +Patch33: ruby-2.4.0-no_proxy-with-whitespaces-and-leading-dots.patch +# Fix missing declaration of 'rb_frame_last_func' +# https://github.com/ruby/ruby/commit/428791543be9e13af9426970f5796f3157dd30a0 +Patch34: ruby-2.2.0-fix-missing-declaration-of-rb_frame_last_func.patch +# Fix hostname size limit +# https://bugs.ruby-lang.org/issues/11877 +# https://bugzilla.redhat.com/show_bug.cgi?id=1343945 +Patch35: ruby-2.1.0-fix-hostname-size-limit.patch + Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: ruby(rubygems) >= %{rubygems_version} # Make the bigdecimal gem a runtime dependency of Ruby to avoid problems @@ -426,10 +456,17 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %patch14 -p1 %patch16 -p1 %patch17 -p1 -%patch18 -p1 -%patch23 -p1 %patch24 -%patch25 -p1 +%patch26 -p1 +%patch27 -p1 +%patch28 -p1 +%patch29 -p1 +%patch30 -p1 +%patch31 -p1 +%patch32 -p1 +%patch33 -p1 +%patch34 -p1 +%patch35 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -584,6 +621,9 @@ sed -e "s|@LIBRARY_PATH@|%{tapset_libdir}/libruby.so.%{ruby_version}|" \ sed -i -r "s|( \*.*\*)\/(.*)|\1\\\/\2|" %{buildroot}%{tapset_dir}/libruby.so.%{ruby_version}.stp %check +# Check RubyGems version correctness. +[ "`make runruby TESTRUN_SCRIPT='bin/gem -v' | tail -1`" == '%{rubygems_version}' ] + DISABLE_TESTS="" %ifarch armv7l armv7hl armv7hnl @@ -597,6 +637,17 @@ DISABLE_TESTS="-x test_dl2.rb $DISABLE_TESTS" # the test suite). touch abrt.rb +# Check if abrt hook is required (RubyGems are disabled by default when using +# runruby, so re-enable them). +make runruby TESTRUN_SCRIPT="--enable-gems %{SOURCE8}" + +# Check if systemtap is supported. +make runruby TESTRUN_SCRIPT=%{SOURCE9} + +# Tests fail without installed Ruby, possibly due to build with prefix. +# https://bugs.ruby-lang.org/issues/11434 +sed -i "/test_try_/ a\ return;" test/mkmf/test_flags.rb + # Allow MD5 in OpenSSL. # https://bugs.ruby-lang.org/issues/9154 OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" @@ -893,6 +944,34 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Wed Jun 08 2016 Pavel Valena - 2.0.0.648-29 +- Fix hostname size limit + Resolves: rhbz#1343945 + +* Mon Jun 06 2016 Pavel Valena - 2.0.0.648-28 +- Fix missing declaration of 'rb_frame_last_func' + Related: rhbz#1197720 + +* Fri Jun 03 2016 Pavel Valena - 2.0.0.648-27 +- Apply previously unapplied patch #14 + Related: rhbz#1197720 + +* Mon May 09 2016 Pavel Valena - 2.0.0.648-26 +- Rebase to Ruby 2.0.0-p648 + Resolves: rhbz#1197720, rhbz#1298282, rhbz#1258863 + * Remove Patch18: ruby-2.0.0-p247-Revert-mkmf.rb-prefix-install_dirs-only- + with-DESTDIR.patch; subsumed + * Remove Patch23: ruby-openssl-wrap-cipher-fix.patch; subsumed + * Remove Patch25: ruby-2.0.0-p607-DNS-Resolv-fall-back-if-canonicalization- + fails.patch; subsumed +- Remove tests depending on europe/moscow to avoid failures due to tzdata change + https://github.com/eggert/tz/commit/8ee11a301cf173afb0c76e0315b9f9ec8ebb9d95 +- Add checks for systemtap, abrt hook and rubygems version +- Fix significant hash table performance slowdown on ppc64le + Resolves: rhbz#1163032 +- Support in no_proxy for domain names with whitespaces and leading dots + Resolves: rhbz#1300433 + * Mon Apr 27 2015 Vít Ondruch - 2.0.0.598-25 - Fix broken DNS Resolv when resolv.conf has option ndots > 1. Resolves: rhbz#1200419