Upgrade to Ruby 3.0.3.

Resolves: rhbz#2049693
This commit is contained in:
Vít Ondruch 2021-11-25 17:46:12 +01:00
parent a796603d8c
commit 89603e3d2f
12 changed files with 288 additions and 79 deletions

View File

@ -26,7 +26,7 @@ index 93af30321d..bc13397e0e 100644
AS_IF([test "${LOAD_RELATIVE+set}"], [
AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE)
RUBY_EXEC_PREFIX=''
@@ -3941,6 +3941,7 @@ AC_SUBST(sitearchdir)dnl
@@ -3941,6 +3945,7 @@ AC_SUBST(sitearchdir)dnl
AC_SUBST(vendordir)dnl
AC_SUBST(vendorlibdir)dnl
AC_SUBST(vendorarchdir)dnl
@ -75,7 +75,7 @@ index e9110a17ca..76a1f0a315 100755
mandir = CONFIG["mandir", true]
docdir = CONFIG["docdir", true]
enable_shared = CONFIG["ENABLE_SHARED"] == 'yes'
@@ -581,7 +581,16 @@ def stub
@@ -581,7 +582,16 @@ def stub
install?(:local, :comm, :lib) do
prepare "library scripts", rubylibdir
noinst = %w[*.txt *.rdoc *.gemspec]

View File

@ -30,7 +30,7 @@ index 80b137e380..63cd3b4f8b 100644
rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'}
AC_ARG_WITH(rubyarchprefix,
AS_HELP_STRING([--with-rubyarchprefix=DIR],
@@ -3857,56 +3857,62 @@ AC_ARG_WITH(ridir,
@@ -3857,56 +3854,62 @@ AC_ARG_WITH(ridir,
AC_SUBST(ridir)
AC_SUBST(RI_BASE_NAME)
@ -120,7 +120,7 @@ index 80b137e380..63cd3b4f8b 100644
AS_IF([test "${LOAD_RELATIVE+set}"], [
AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE)
@@ -3923,6 +3923,7 @@ AC_SUBST(sitearchincludedir)dnl
@@ -3923,6 +3926,7 @@ AC_SUBST(sitearchincludedir)dnl
AC_SUBST(arch)dnl
AC_SUBST(sitearch)dnl
AC_SUBST(ruby_version)dnl
@ -237,7 +237,7 @@ diff --git a/test/rubygems/test_gem.rb b/test/rubygems/test_gem.rb
index b25068405d..e9fef4a311 100644
--- a/test/rubygems/test_gem.rb
+++ b/test/rubygems/test_gem.rb
@@ -1452,7 +1452,8 @@ def test_self_use_paths
@@ -1440,7 +1440,8 @@ def test_self_use_paths
def test_self_user_dir
parts = [@userhome, '.gem', Gem.ruby_engine]
@ -247,7 +247,7 @@ index b25068405d..e9fef4a311 100644
FileUtils.mkdir_p File.join(parts)
@@ -1530,7 +1531,7 @@ def test_self_vendor_dir
@@ -1516,7 +1517,7 @@ def test_self_vendor_dir
vendordir(File.join(@tempdir, 'vendor')) do
expected =
File.join RbConfig::CONFIG['vendordir'], 'gems',

View File

@ -8,7 +8,7 @@ on Red Hat platforms.
This workaround rhbz#1361037
---
test/fiddle/helper.rb | 3 +++
test/fiddle/helper.rb | 3 +++
1 file changed, 3 insertions(+)
diff --git a/test/fiddle/helper.rb b/test/fiddle/helper.rb

View File

@ -245,7 +245,7 @@ diff --git a/ext/openssl/ossl_ts.c b/ext/openssl/ossl_ts.c
index 4654babf..9d91710a 100644
--- a/ext/openssl/ossl_ts.c
+++ b/ext/openssl/ossl_ts.c
@@ -816,7 +816,7 @@ ossl_ts_resp_verify(int argc, VALUE *argv, VALUE self)
@@ -820,7 +820,7 @@ ossl_ts_resp_verify(int argc, VALUE *argv, VALUE self)
X509_up_ref(cert);
}
@ -283,7 +283,7 @@ diff --git a/ext/openssl/ossl_ssl.c b/ext/openssl/ossl_ssl.c
index 76db821e..c80c939e 100644
--- a/ext/openssl/ossl_ssl.c
+++ b/ext/openssl/ossl_ssl.c
@@ -886,10 +886,17 @@ ossl_sslctx_setup(VALUE self)
@@ -899,10 +899,17 @@ ossl_sslctx_setup(VALUE self)
ca_file = NIL_P(val) ? NULL : StringValueCStr(val);
val = rb_attr_get(self, id_i_ca_path);
ca_path = NIL_P(val) ? NULL : StringValueCStr(val);
@ -338,7 +338,7 @@ diff --git a/ext/openssl/ossl_bn.c b/ext/openssl/ossl_bn.c
index 02530789..e0eef4cd 100644
--- a/ext/openssl/ossl_bn.c
+++ b/ext/openssl/ossl_bn.c
@@ -1058,34 +1058,29 @@ ossl_bn_hash(VALUE self)
@@ -1068,34 +1068,29 @@ ossl_bn_hash(VALUE self)
* bn.prime? => true | false
* bn.prime?(checks) => true | false
*
@ -388,7 +388,7 @@ index 02530789..e0eef4cd 100644
}
/*
@@ -1094,40 +1089,18 @@ ossl_bn_is_prime(int argc, VALUE *argv, VALUE self)
@@ -1104,40 +1099,18 @@ ossl_bn_is_prime(int argc, VALUE *argv, VALUE self)
* bn.prime_fasttest?(checks) => true | false
* bn.prime_fasttest?(checks, trial_div) => true | false
*
@ -1188,7 +1188,7 @@ diff --git a/test/openssl/test_ssl.rb b/test/openssl/test_ssl.rb
index f24aabe7..6c9547dc 100644
--- a/test/openssl/test_ssl.rb
+++ b/test/openssl/test_ssl.rb
@@ -955,7 +955,9 @@ def test_connect_certificate_verify_failed_exception_message
@@ -964,7 +964,9 @@ def test_connect_certificate_verify_failed_exception_message
start_server(ignore_listener_error: true) { |port|
ctx = OpenSSL::SSL::SSLContext.new
ctx.set_params
@ -1922,7 +1922,7 @@ diff --git a/ext/openssl/ossl_ssl.c b/ext/openssl/ossl_ssl.c
index c80c939e..06bfd96d 100644
--- a/ext/openssl/ossl_ssl.c
+++ b/ext/openssl/ossl_ssl.c
@@ -1529,8 +1529,8 @@ ossl_sslctx_flush_sessions(int argc, VALUE *argv, VALUE self)
@@ -1542,8 +1542,8 @@ ossl_sslctx_flush_sessions(int argc, VALUE *argv, VALUE self)
static inline int
ssl_started(SSL *ssl)
{
@ -2051,7 +2051,7 @@ diff --git a/ext/openssl/ossl_bn.c b/ext/openssl/ossl_bn.c
index e0eef4cd..fe62442f 100644
--- a/ext/openssl/ossl_bn.c
+++ b/ext/openssl/ossl_bn.c
@@ -794,12 +794,6 @@ BIGNUM_SELF_SHIFT(rshift)
@@ -804,12 +804,6 @@ BIGNUM_SELF_SHIFT(rshift)
*/
BIGNUM_RAND(rand)
@ -2064,7 +2064,7 @@ index e0eef4cd..fe62442f 100644
#define BIGNUM_RAND_RANGE(func) \
static VALUE \
ossl_bn_s_##func##_range(VALUE klass, VALUE range) \
@@ -825,14 +819,6 @@ BIGNUM_RAND(pseudo_rand)
@@ -835,14 +829,6 @@ BIGNUM_RAND(pseudo_rand)
*/
BIGNUM_RAND_RANGE(rand)
@ -2079,7 +2079,7 @@ index e0eef4cd..fe62442f 100644
/*
* call-seq:
* BN.generate_prime(bits, [, safe [, add [, rem]]]) => bn
@@ -1182,9 +1168,9 @@ Init_ossl_bn(void)
@@ -1192,9 +1178,9 @@ Init_ossl_bn(void)
* get_word */
rb_define_singleton_method(cBN, "rand", ossl_bn_s_rand, -1);
@ -2122,7 +2122,7 @@ diff --git a/test/openssl/test_ssl.rb b/test/openssl/test_ssl.rb
index 6c9547dc..60520b22 100644
--- a/test/openssl/test_ssl.rb
+++ b/test/openssl/test_ssl.rb
@@ -551,8 +551,7 @@ def test_post_connection_check
@@ -557,8 +557,7 @@ def test_post_connection_check
exts = [
["keyUsage","keyEncipherment,digitalSignature",true],

View File

@ -0,0 +1,84 @@
From 202ff1372a40a8adf9aac74bfe8a39141b0c57e5 Mon Sep 17 00:00:00 2001
From: Kazuki Yamaguchi <k@rhe.jp>
Date: Mon, 27 Sep 2021 00:38:38 +0900
Subject: [PATCH] ext/openssl/extconf.rb: require OpenSSL version >= 1.0.1, < 3
Ruby/OpenSSL 2.1.x and 2.2.x will not support OpenSSL 3.0 API. Let's
make extconf.rb explicitly check the version number to be within the
acceptable range, since it will not compile anyway.
Reference: https://bugs.ruby-lang.org/issues/18192
---
ext/openssl/extconf.rb | 43 ++++++++++++++++++++++++------------------
1 file changed, 25 insertions(+), 18 deletions(-)
diff --git a/ext/openssl/extconf.rb b/ext/openssl/extconf.rb
index 264130bb..7e817ae2 100644
--- a/ext/openssl/extconf.rb
+++ b/ext/openssl/extconf.rb
@@ -33,9 +33,6 @@
have_library("ws2_32")
end
-Logging::message "=== Checking for required stuff... ===\n"
-result = pkg_config("openssl") && have_header("openssl/ssl.h")
-
if $mingw
append_cflags '-D_FORTIFY_SOURCE=2'
append_ldflags '-fstack-protector'
@@ -92,19 +89,33 @@ def find_openssl_library
return false
end
-unless result
- unless find_openssl_library
- Logging::message "=== Checking for required stuff failed. ===\n"
- Logging::message "Makefile wasn't created. Fix the errors above.\n"
- raise "OpenSSL library could not be found. You might want to use " \
- "--with-openssl-dir=<dir> option to specify the prefix where OpenSSL " \
- "is installed."
- end
+Logging::message "=== Checking for required stuff... ===\n"
+pkg_config_found = pkg_config("openssl") && have_header("openssl/ssl.h")
+
+if !pkg_config_found && !find_openssl_library
+ Logging::message "=== Checking for required stuff failed. ===\n"
+ Logging::message "Makefile wasn't created. Fix the errors above.\n"
+ raise "OpenSSL library could not be found. You might want to use " \
+ "--with-openssl-dir=<dir> option to specify the prefix where OpenSSL " \
+ "is installed."
end
-unless checking_for("OpenSSL version is 1.0.1 or later") {
- try_static_assert("OPENSSL_VERSION_NUMBER >= 0x10001000L", "openssl/opensslv.h") }
- raise "OpenSSL >= 1.0.1 or LibreSSL is required"
+version_ok = if have_macro("LIBRESSL_VERSION_NUMBER", "openssl/opensslv.h")
+ is_libressl = true
+ checking_for("LibreSSL version >= 2.5.0") {
+ try_static_assert("LIBRESSL_VERSION_NUMBER >= 0x20500000L", "openssl/opensslv.h") }
+else
+ checking_for("OpenSSL version >= 1.0.1 and < 3.0.0") {
+ try_static_assert("OPENSSL_VERSION_NUMBER >= 0x10001000L", "openssl/opensslv.h") &&
+ !try_static_assert("OPENSSL_VERSION_MAJOR >= 3", "openssl/opensslv.h") }
+end
+unless version_ok
+ raise "OpenSSL >= 1.0.1, < 3.0.0 or LibreSSL >= 2.5.0 is required"
+end
+
+# Prevent wincrypt.h from being included, which defines conflicting macro with openssl/x509.h
+if is_libressl && ($mswin || $mingw)
+ $defs.push("-DNOCRYPT")
end
Logging::message "=== Checking for OpenSSL features... ===\n"
@@ -116,10 +127,6 @@ def find_openssl_library
have_func("ENGINE_load_#{name}()", "openssl/engine.h")
}
-if ($mswin || $mingw) && have_macro("LIBRESSL_VERSION_NUMBER", "openssl/opensslv.h")
- $defs.push("-DNOCRYPT")
-end
-
# added in 1.0.2
have_func("EC_curve_nist2nid")
have_func("X509_REVOKED_dup")

View File

@ -6,7 +6,7 @@ Subject: [PATCH] Get rid of type-punning pointer casts [Bug #18062]
---
vm_eval.c | 4 +++-
vm_insnhelper.c | 7 +++++--
vm_method.c | 41 +++++++++++++++++++++++++---------------
vm_method.c | 41 ++++++++++++++++++++++++++---------------
3 files changed, 34 insertions(+), 18 deletions(-)
diff --git a/vm_eval.c b/vm_eval.c
@ -30,7 +30,7 @@ diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index 14928b2afe8e..e186376b24d7 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -1636,9 +1636,11 @@ vm_search_cc(const VALUE klass, const struct rb_callinfo * const ci)
@@ -1637,9 +1637,11 @@ vm_search_cc(const VALUE klass, const struct rb_callinfo * const ci)
const ID mid = vm_ci_mid(ci);
struct rb_id_table *cc_tbl = RCLASS_CC_TBL(klass);
struct rb_class_cc_entries *ccs = NULL;
@ -43,7 +43,7 @@ index 14928b2afe8e..e186376b24d7 100644
const int ccs_len = ccs->len;
VM_ASSERT(vm_ccs_verify(ccs, mid, klass));
@@ -1705,8 +1707,9 @@ vm_search_cc(const VALUE klass, const struct rb_callinfo * const ci)
@@ -1706,8 +1708,9 @@ vm_search_cc(const VALUE klass, const struct rb_callinfo * const ci)
if (ccs == NULL) {
VM_ASSERT(cc_tbl != NULL);
@ -123,7 +123,7 @@ index 016dba1dbb18..1fd0bd57f7ca 100644
RB_DEBUG_COUNTER_INC(cc_invalidate_negative);
}
@@ -1023,6 +1024,7 @@ prepare_callable_method_entry(VALUE defined_class, ID id, const rb_method_entry_
@@ -1023,6 +1025,7 @@ prepare_callable_method_entry(VALUE defined_class, ID id, const rb_method_entry_
{
struct rb_id_table *mtbl;
const rb_callable_method_entry_t *cme;
@ -131,7 +131,7 @@ index 016dba1dbb18..1fd0bd57f7ca 100644
if (me) {
if (me->defined_class == 0) {
@@ -1032,7 +1034,8 @@ prepare_callable_method_entry(VALUE defined_class, ID id, const rb_method_entry_
@@ -1032,7 +1035,8 @@ prepare_callable_method_entry(VALUE defined_class, ID id, const rb_method_entry_
mtbl = RCLASS_CALLABLE_M_TBL(defined_class);
@ -141,7 +141,7 @@ index 016dba1dbb18..1fd0bd57f7ca 100644
RB_DEBUG_COUNTER_INC(mc_cme_complement_hit);
VM_ASSERT(callable_method_entry_p(cme));
VM_ASSERT(!METHOD_ENTRY_INVALIDATED(cme));
@@ -1076,9 +1079,10 @@ cached_callable_method_entry(VALUE klass, ID mid)
@@ -1076,9 +1080,10 @@ cached_callable_method_entry(VALUE klass, ID mid)
ASSERT_vm_locking();
struct rb_id_table *cc_tbl = RCLASS_CC_TBL(klass);
@ -154,7 +154,7 @@ index 016dba1dbb18..1fd0bd57f7ca 100644
VM_ASSERT(vm_ccs_p(ccs));
if (LIKELY(!METHOD_ENTRY_INVALIDATED(ccs->cme))) {
@@ -1104,12 +1108,14 @@ cache_callable_method_entry(VALUE klass, ID mid, const rb_callable_method_entry_
@@ -1104,12 +1109,14 @@ cache_callable_method_entry(VALUE klass, ID mid, const rb_callable_method_entry_
struct rb_id_table *cc_tbl = RCLASS_CC_TBL(klass);
struct rb_class_cc_entries *ccs;
@ -170,7 +170,7 @@ index 016dba1dbb18..1fd0bd57f7ca 100644
VM_ASSERT(ccs->cme == cme);
}
else {
@@ -1123,8 +1129,12 @@ negative_cme(ID mid)
@@ -1123,8 +1130,12 @@ negative_cme(ID mid)
{
rb_vm_t *vm = GET_VM();
const rb_callable_method_entry_t *cme;

View File

@ -13,7 +13,7 @@ diff --git a/addr2line.c b/addr2line.c
index fed1a8da84e5..92c6da5e3bea 100644
--- a/addr2line.c
+++ b/addr2line.c
@@ -1592,14 +1592,31 @@ di_read_cu(DebugInfoReader *reader)
@@ -1593,14 +1593,31 @@ di_read_cu(DebugInfoReader *reader)
}
static void
@ -47,7 +47,7 @@ index fed1a8da84e5..92c6da5e3bea 100644
if (!di_read_die(reader, &die)) goto finish;
/* enumerate abbrev */
@@ -1664,7 +1681,7 @@ debug_info_read(DebugInfoReader *reader, int num_traces, void **traces,
@@ -1665,7 +1682,7 @@ debug_info_read(DebugInfoReader *reader, int num_traces, void **traces,
/* 1 or 3 */
break; /* goto skip_die; */
case DW_AT_abstract_origin:

View File

@ -0,0 +1,93 @@
From 96684439e96aa92e10376b5be45f006772028295 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Thu, 21 Oct 2021 13:02:38 +0200
Subject: [PATCH] Properly exclude test cases.
Lets consider the following scenario:
~~~
irb(#<Test::Unit::AutoRunner::Runner:0x0000560f68afc3c8>):001:0> p suite
OpenSSL::TestEC
=> OpenSSL::TestEC
irb(#<Test::Unit::AutoRunner::Runner:0x0000560f68afc3c8>):002:0> p all_test_methods
["test_ECPrivateKey", "test_ECPrivateKey_encrypted", "test_PUBKEY", "test_check_key", "test_derive_key", "test_dh_compute_key", "test_dsa_sign_asn1_FIPS186_3", "test_ec_group", "test_ec_key", "test_ec_point", "test_ec_point_add", "test_ec_point_mul", "test_generate", "test_marshal", "test_sign_verify", "test_sign_verify_raw"]
=>
["test_ECPrivateKey",
"test_ECPrivateKey_encrypted",
"test_PUBKEY",
"test_check_key",
"test_derive_key",
"test_dh_compute_key",
"test_dsa_sign_asn1_FIPS186_3",
"test_ec_group",
"test_ec_key",
"test_ec_point",
"test_ec_point_add",
"test_ec_point_mul",
"test_generate",
"test_marshal",
"test_sign_verify",
"test_sign_verify_raw"]
irb(#<Test::Unit::AutoRunner::Runner:0x0000560f68afc3c8>):003:0> p filter
/\A(?=.*)(?!.*(?-mix:(?-mix:memory_leak)|(?-mix:OpenSSL::TestEC.test_check_key)))/
=> /\A(?=.*)(?!.*(?-mix:(?-mix:memory_leak)|(?-mix:OpenSSL::TestEC.test_check_key)))/
irb(#<Test::Unit::AutoRunner::Runner:0x0000560f68afc3c8>):004:0> method = "test_check_key"
=> "test_check_key"
~~~
The intention here is to exclude the `test_check_key` test case.
Unfortunately this does not work as expected, because the negative filter
is never checked:
~~~
irb(#<Test::Unit::AutoRunner::Runner:0x0000560f68afc3c8>):005:0> filter === method
=> true
irb(#<Test::Unit::AutoRunner::Runner:0x0000560f68afc3c8>):006:0> filter === "#{suite}##{method}"
=> false
irb(#<Test::Unit::AutoRunner::Runner:0x0000560f68afc3c8>):007:0> filter === method || filter === "#{suite}##{method}"
=> true
~~~
Therefore always filter against the fully qualified method name
`#{suite}##{method}`, which should provide the expected result.
However, if plain string filter is used, keep checking also only the
method name.
This resolves [Bug #16936].
---
tool/lib/minitest/unit.rb | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/tool/lib/minitest/unit.rb b/tool/lib/minitest/unit.rb
index c58a609bfa..d5af6cb906 100644
--- a/tool/lib/minitest/unit.rb
+++ b/tool/lib/minitest/unit.rb
@@ -956,9 +956,15 @@ def _run_suite suite, type
all_test_methods = suite.send "#{type}_methods"
- filtered_test_methods = all_test_methods.find_all { |m|
- filter === m || filter === "#{suite}##{m}"
- }
+ filtered_test_methods = if Regexp === filter
+ all_test_methods.find_all { |m|
+ filter === "#{suite}##{m}"
+ }
+ else
+ all_test_methods.find_all {|m|
+ filter === m || filter === "#{suite}##{m}"
+ }
+ end
leakchecker = LeakChecker.new
--
2.32.0

View File

@ -1,6 +1,18 @@
From 3b91792d3d644d6d6b0059cb315c9fe5d3626bab Mon Sep 17 00:00:00 2001
From: Yusuke Endoh <mame@ruby-lang.org>
Date: Sat, 6 Mar 2021 00:03:57 +0900
Subject: [PATCH] Support GCC's DWARF 5 [Bug #17585]
Co-Authored-By: xtkoba (Tee KOBAYASHI) <xtkoba+ruby@gmail.com>
---
addr2line.c | 119 ++++++++++++++++++++++++++++++++++++++++++----------
1 file changed, 97 insertions(+), 22 deletions(-)
diff --git a/addr2line.c b/addr2line.c
index 0029cffbca..855efb40d4 100644
--- a/addr2line.c
+++ b/addr2line.c
@@ -159,11 +159,12 @@
@@ -159,11 +159,12 @@ typedef struct obj_info {
struct dwarf_section debug_info;
struct dwarf_section debug_line;
struct dwarf_section debug_ranges;
@ -14,7 +26,7 @@
static struct dwarf_section *
obj_dwarf_section_at(obj_info_t *obj, int n)
@@ -173,6 +174,7 @@
@@ -173,6 +174,7 @@ obj_dwarf_section_at(obj_info_t *obj, int n)
&obj->debug_info,
&obj->debug_line,
&obj->debug_ranges,
@ -22,7 +34,7 @@
&obj->debug_str
};
if (n < 0 || DWARF_SECTION_COUNT <= n) {
@@ -411,7 +413,7 @@
@@ -411,7 +413,7 @@ parse_debug_line_cu(int num_traces, void **traces, char **debug_line,
FILL_LINE();
break;
case DW_LNS_advance_pc:
@ -31,7 +43,7 @@
addr += a;
break;
case DW_LNS_advance_line: {
@@ -450,7 +452,7 @@
@@ -451,7 +453,7 @@ parse_debug_line_cu(int num_traces, void **traces, char **debug_line,
/* isa = (unsigned int)*/(void)uleb128((char **)&p);
break;
case 0:
@ -40,7 +52,7 @@
op = *p++;
switch (op) {
case DW_LNE_end_sequence:
@@ -807,6 +809,18 @@
@@ -808,6 +810,18 @@ enum
DW_FORM_addrx4 = 0x2c
};
@ -59,10 +71,11 @@
enum {
VAL_none = 0,
VAL_cstr = 1,
@@ -961,6 +975,23 @@
@@ -961,6 +975,23 @@ debug_info_reader_init(DebugInfoReader *reader, obj_info_t *obj)
reader->current_low_pc = 0;
}
static void
+static void
+di_skip_die_attributes(char **p)
+{
+ for (;;) {
@ -79,11 +92,10 @@
+ }
+}
+
+static void
static void
di_read_debug_abbrev_cu(DebugInfoReader *reader)
{
uint64_t prev = 0;
@@ -974,12 +1005,7 @@
@@ -975,12 +1006,7 @@ di_read_debug_abbrev_cu(DebugInfoReader *reader)
prev = abbrev_number;
uleb128(&p); /* tag */
p++; /* has_children */
@ -97,7 +109,7 @@
}
}
@@ -1243,12 +1269,7 @@
@@ -1244,12 +1270,7 @@ di_find_abbrev(DebugInfoReader *reader, uint64_t abbrev_number)
/* skip 255th record */
uleb128(&p); /* tag */
p++; /* has_children */
@ -111,7 +123,7 @@
for (uint64_t n = uleb128(&p); abbrev_number != n; n = uleb128(&p)) {
if (n == 0) {
fprintf(stderr,"%d: Abbrev Number %"PRId64" not found\n",__LINE__, abbrev_number);
@@ -1256,12 +1277,7 @@
@@ -1257,12 +1278,7 @@ di_find_abbrev(DebugInfoReader *reader, uint64_t abbrev_number)
}
uleb128(&p); /* tag */
p++; /* has_children */
@ -125,7 +137,7 @@
}
return p;
}
@@ -1389,6 +1405,21 @@
@@ -1390,6 +1406,21 @@ ranges_set(ranges_t *ptr, DebugInfoValue *v)
}
}
@ -147,7 +159,7 @@
static uintptr_t
ranges_include(DebugInfoReader *reader, ranges_t *ptr, uint64_t addr)
{
@@ -1402,8 +1433,50 @@
@@ -1403,8 +1434,50 @@ ranges_include(DebugInfoReader *reader, ranges_t *ptr, uint64_t addr)
}
else if (ptr->ranges_set) {
/* TODO: support base address selection entry */
@ -199,7 +211,7 @@
for (;;) {
uintptr_t from = read_uintptr(&p);
uintptr_t to = read_uintptr(&p);
@@ -1747,6 +1820,7 @@
@@ -1750,6 +1823,7 @@ fill_lines(int num_traces, void **traces, int check_debuglink,
".debug_info",
".debug_line",
".debug_ranges",
@ -207,7 +219,7 @@
".debug_str"
};
@@ -2003,6 +2077,7 @@
@@ -2006,6 +2080,7 @@ found_mach_header:
"__debug_info",
"__debug_line",
"__debug_ranges",

View File

@ -11,7 +11,7 @@ diff --git a/addr2line.c b/addr2line.c
index 8ee4416650d3..fed1a8da84e5 100644
--- a/addr2line.c
+++ b/addr2line.c
@@ -1137,12 +1137,12 @@ debug_info_reader_read_value(DebugInfoReader *reader, uint64_t form, DebugInfoVa
@@ -1138,12 +1138,12 @@ debug_info_reader_read_value(DebugInfoReader *reader, uint64_t form, DebugInfoVa
set_uint_value(v, read_uleb128(reader));
break;
case DW_FORM_ref_addr:

View File

@ -1,6 +1,6 @@
%global major_version 3
%global minor_version 0
%global teeny_version 2
%global teeny_version 3
%global major_minor_version %{major_version}.%{minor_version}
%global ruby_version %{major_minor_version}.%{teeny_version}
@ -30,12 +30,12 @@
%global rubygems_dir %{_datadir}/rubygems
# Bundled libraries versions
%global rubygems_version 3.2.22
%global rubygems_version 3.2.32
%global rubygems_molinillo_version 0.7.0
# Default gems.
%global bundler_version 2.2.22
%global bundler_connection_pool_version 2.2.2
%global bundler_version 2.2.32
%global bundler_connection_pool_version 2.3.0
%global bundler_fileutils_version 1.4.1
%global bundler_molinillo_version 0.7.0
%global bundler_net_http_persistent_version 4.0.0
@ -49,20 +49,20 @@
%global io_console_version 0.5.7
%global irb_version 1.3.5
%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.1
%global openssl_version 2.2.1
%global psych_version 3.3.2
%global racc_version 1.5.2
%global rdoc_version 6.3.3
# 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.4
%global rbs_version 1.4.0
%global test_unit_version 3.3.7
%global rexml_version 3.2.5
%global rss_version 0.2.9
%global typeprof_version 0.12.0
%global typeprof_version 0.15.2
%global tapset_libdir %(echo %{_libdir} | sed 's/64//')*
@ -148,7 +148,8 @@ Patch9: ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch
# Fix DWARF5 support.
# https://bugzilla.redhat.com/show_bug.cgi?id=1920533
# https://bugs.ruby-lang.org/issues/17585
Patch15: ruby-dwarf5-avoid_crash-r1.patch
# https://github.com/ruby/ruby/pull/4240
Patch15: ruby-3.1.0-Support-GCCs-DWARF-5.patch
# Fix segfaults with enabled LTO.
# https://bugs.ruby-lang.org/issues/18062
# https://github.com/ruby/ruby/pull/4716
@ -164,10 +165,21 @@ Patch18: ruby-3.1.0-addr2line-DW_FORM_ref_addr.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
# Allow to exclude test with fully qualified name.
# https://bugs.ruby-lang.org/issues/16936
# https://github.com/ruby/ruby/pull/5026
Patch21: ruby-3.1.0-Properly-exclude-test-cases.patch
# OpenSSL 3.0 compatibility patches
# Support openssl 3.0
# Revert OpenSSL < 3.x enforcement.
# https://github.com/ruby/openssl/commit/202ff1372a40a8adf9aac74bfe8a39141b0c57e5
Patch30: ruby-3.0.3-ext-openssl-extconf.rb-require-OpenSSL-version-1.0.1.patch
# https://github.com/ruby/openssl/commit/d963d4e276658d110bcb796722d76efa7fb68efa
# https://github.com/ruby/openssl/pull/399/
Patch20: ruby-3.0-support-openssl-3.0-pr399.patch
Patch40: ruby-3.0-support-openssl-3.0-pr399.patch
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
Suggests: rubypick
@ -607,7 +619,9 @@ rm -rf ext/fiddle/libffi*
%patch17 -p1
%patch18 -p1
%patch19 -p1
%patch20 -p1
%patch21 -p1
%patch30 -p1 -R
%patch40 -p1
# Provide an example of usage of the tapset:
cp -a %{SOURCE3} .
@ -897,7 +911,7 @@ for vname in \
PUBLIC_KEY \
;do
sed -i "s/^\(\s*${vname}\s*=\s*\).*$/\1nil/" \
lib/rubygems/test_case.rb
test/rubygems/helper.rb
done
# Missing openssl certificate methods (e.g. '.to_pem'),
# or certificates completely. Caused by disabling certificates above.
@ -926,6 +940,9 @@ sed -i "/^\s*def test_do_not_allow_invalid_client_cert_auth_connection$/ a \
sed -i "/^\s*def test_ssl_client_cert_auth_connection$/ a \
skip 'Missing a certificate.'" \
test/rubygems/test_gem_remote_fetcher.rb
sed -i "/pend 'openssl is missing'/ a \
skip 'Segfault.'" \
test/rubygems/test_gem_commands_build_command.rb
# Different output for Invalid CA certificate error.
sed -i "/^\s*def test_verify_certificate_extra_message$/ a \
@ -1201,30 +1218,30 @@ mv test/fiddle/test_import.rb{,.disable}
%{_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/cgi-0.2.1.gemspec
%{gem_dir}/specifications/default/csv-3.1.9.gemspec
%{gem_dir}/specifications/default/date-3.1.0.gemspec
%{gem_dir}/specifications/default/date-3.1.3.gemspec
%{gem_dir}/specifications/default/dbm-1.1.0.gemspec
%{gem_dir}/specifications/default/debug-0.1.0.gemspec
%{gem_dir}/specifications/default/debug-0.2.1.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/drb-2.0.5.gemspec
%{gem_dir}/specifications/default/english-0.7.1.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.6.gemspec
%{gem_dir}/specifications/default/etc-1.3.0.gemspec
%{gem_dir}/specifications/default/fcntl-1.0.1.gemspec
%{gem_dir}/specifications/default/fiddle-1.0.8.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.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/io-wait-0.2.0.gemspec
%{gem_dir}/specifications/default/ipaddr-1.2.2.gemspec
%{gem_dir}/specifications/default/logger-1.4.3.gemspec
%{gem_dir}/specifications/default/matrix-0.3.1.gemspec
@ -1233,33 +1250,33 @@ mv test/fiddle/test_import.rb{,.disable}
%{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-protocol-0.1.1.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/optparse-0.1.1.gemspec
%{gem_dir}/specifications/default/openssl-%{openssl_version}.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/pp-0.2.1.gemspec
%{gem_dir}/specifications/default/prettyprint-0.1.1.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.1.gemspec
%{gem_dir}/specifications/default/reline-0.2.5.gemspec
%{gem_dir}/specifications/default/resolv-0.2.0.gemspec
%{gem_dir}/specifications/default/resolv-0.2.1.gemspec
%{gem_dir}/specifications/default/resolv-replace-0.1.0.gemspec
%{gem_dir}/specifications/default/rinda-0.1.0.gemspec
%{gem_dir}/specifications/default/rinda-0.1.1.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/stringio-3.0.1.gemspec
%{gem_dir}/specifications/default/strscan-3.0.1.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
@ -1272,7 +1289,7 @@ mv test/fiddle/test_import.rb{,.disable}
%{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
%{gem_dir}/specifications/default/zlib-2.0.0.gemspec
%{gem_dir}/gems/erb-%{erb_version}
# Use standalone rubygem-racc if Racc binary is required. Shipping this
@ -1366,7 +1383,6 @@ mv test/fiddle/test_import.rb{,.disable}
%doc %{gem_dir}/gems/rbs-%{rbs_version}/README.md
%{gem_dir}/gems/rbs-%{rbs_version}/Rakefile
%{gem_dir}/gems/rbs-%{rbs_version}/Steepfile
%{gem_dir}/gems/rbs-%{rbs_version}/bin
%{gem_dir}/gems/rbs-%{rbs_version}/core
%doc %{gem_dir}/gems/rbs-%{rbs_version}/docs
%{gem_dir}/gems/rbs-%{rbs_version}/exe
@ -1422,6 +1438,10 @@ mv test/fiddle/test_import.rb{,.disable}
%changelog
* Thu Nov 25 2021 Vít Ondruch <vondruch@redhat.com> - 3.0.2-156
- Upgrade to Ruby 3.0.3.
Resolves: rhbz#2049693
* Wed Aug 25 2021 Vít Ondruch <vondruch@redhat.com> - 3.0.2-156
- Enable LTO.
Resolves: rhbz#1990108
@ -1430,7 +1450,7 @@ mv test/fiddle/test_import.rb{,.disable}
- Rebuilt for libffi 3.4.2 SONAME transition (second attempt).
Related: rhbz#1891914
* Mon Aug 16 2021 Pavel Valena <pvalena@redhat.com> - 3.0.1-154
* Fri Aug 20 2021 Pavel Valena <pvalena@redhat.com> - 3.0.1-154
- Upgrade to Ruby 3.0.2.
- Fix command injection vulnerability in RDoc.
Resolves: CVE-2021-31799

View File

@ -1 +1 @@
SHA512 (ruby-3.0.2.tar.xz) = 0f702e2d8ca1342a9d4284dbdd234a3588e057b92566353aa7c21835cf09a3932864b2acf459a976960a1704e9befa562155d36b98b7cda8bd99526e10a374c4
SHA512 (ruby-3.0.3.tar.xz) = bb9ea426278d5a7ac46595296f03b82d43df8b7db41045cdf85611e05e26c703c53f700494cd7cf5d4c27fa953bdc5c144317d7720812db0a6e3b6f4bc4d2e00