upgrade version to 3.2.2

This commit is contained in:
shixuantong 2023-07-27 20:53:19 +08:00
parent 56829119f6
commit 503819225c
17 changed files with 76 additions and 328 deletions

View File

@ -1,28 +0,0 @@
From b57db51f577875d3e896dcd2ef1dcaf97f23e943 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@ruby-lang.org>
Date: Tue, 29 Nov 2022 16:22:15 +0900
Subject: [PATCH] Fix quadratic backtracking on invalid time
https://hackerone.com/reports/1485501
---
lib/time.rb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/time.rb b/lib/time.rb
index 43c4d80..2c85f94 100644
--- a/lib/time.rb
+++ b/lib/time.rb
@@ -509,8 +509,8 @@ class Time
(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s+
(\d{2,})\s+
(\d{2})\s*
- :\s*(\d{2})\s*
- (?::\s*(\d{2}))?\s+
+ :\s*(\d{2})
+ (?:\s*:\s*(\d{2}))?\s+
([+-]\d{4}|
UT|GMT|EST|EDT|CST|CDT|MST|MDT|PST|PDT|[A-IK-Z])/ix =~ date
# Since RFC 2822 permit comments, the regexp has no right anchor.
--
2.33.0

View File

@ -1,26 +0,0 @@
From 3dce6f73d14f5fad6d9b302393fd02df48797b11 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@ruby-lang.org>
Date: Fri, 30 Dec 2022 14:32:05 +0900
Subject: [PATCH] Make RFC2822 regexp linear
https://hackerone.com/reports/1485501
---
lib/time.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/time.rb b/lib/time.rb
index 2c85f94..6a13212 100644
--- a/lib/time.rb
+++ b/lib/time.rb
@@ -510,7 +510,7 @@ class Time
(\d{2,})\s+
(\d{2})\s*
:\s*(\d{2})
- (?:\s*:\s*(\d{2}))?\s+
+ (?:\s*:\s*(\d\d))?\s+
([+-]\d{4}|
UT|GMT|EST|EDT|CST|CDT|MST|MDT|PST|PDT|[A-IK-Z])/ix =~ date
# Since RFC 2822 permit comments, the regexp has no right anchor.
--
2.33.0

View File

@ -1,28 +0,0 @@
From eaf89cc31619d49e67c64d0b58ea9dc38892d175 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@ruby-lang.org>
Date: Mon, 10 Jan 2022 01:12:57 +0900
Subject: [PATCH] Fix quadratic backtracking on invalid URI
https://hackerone.com/reports/1444501
---
lib/uri/rfc3986_parser.rb | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/uri/rfc3986_parser.rb b/lib/uri/rfc3986_parser.rb
index 3e07de4..3c89311 100644
--- a/lib/uri/rfc3986_parser.rb
+++ b/lib/uri/rfc3986_parser.rb
@@ -3,8 +3,8 @@ module URI
class RFC3986_Parser # :nodoc:
# URI defined in RFC3986
# this regexp is modified not to host is not empty string
- RFC3986_URI = /\A(?<URI>(?<scheme>[A-Za-z][+\-.0-9A-Za-z]*):(?<hier-part>\/\/(?<authority>(?:(?<userinfo>(?:%\h\h|[!$&-.0-;=A-Z_a-z~])*)@)?(?<host>(?<IP-literal>\[(?:(?<IPv6address>(?:\h{1,4}:){6}(?<ls32>\h{1,4}:\h{1,4}|(?<IPv4address>(?<dec-octet>[1-9]\d|1\d{2}|2[0-4]\d|25[0-5]|\d)\.\g<dec-octet>\.\g<dec-octet>\.\g<dec-octet>))|::(?:\h{1,4}:){5}\g<ls32>|\h{1,4}?::(?:\h{1,4}:){4}\g<ls32>|(?:(?:\h{1,4}:)?\h{1,4})?::(?:\h{1,4}:){3}\g<ls32>|(?:(?:\h{1,4}:){,2}\h{1,4})?::(?:\h{1,4}:){2}\g<ls32>|(?:(?:\h{1,4}:){,3}\h{1,4})?::\h{1,4}:\g<ls32>|(?:(?:\h{1,4}:){,4}\h{1,4})?::\g<ls32>|(?:(?:\h{1,4}:){,5}\h{1,4})?::\h{1,4}|(?:(?:\h{1,4}:){,6}\h{1,4})?::)|(?<IPvFuture>v\h+\.[!$&-.0-;=A-Z_a-z~]+))\])|\g<IPv4address>|(?<reg-name>(?:%\h\h|[!$&-.0-9;=A-Z_a-z~])+))?(?::(?<port>\d*))?)(?<path-abempty>(?:\/(?<segment>(?:%\h\h|[!$&-.0-;=@-Z_a-z~])*))*)|(?<path-absolute>\/(?:(?<segment-nz>(?:%\h\h|[!$&-.0-;=@-Z_a-z~])+)(?:\/\g<segment>)*)?)|(?<path-rootless>\g<segment-nz>(?:\/\g<segment>)*)|(?<path-empty>))(?:\?(?<query>[^#]*))?(?:\#(?<fragment>(?:%\h\h|[!$&-.0-;=@-Z_a-z~\/?])*))?)\z/
- RFC3986_relative_ref = /\A(?<relative-ref>(?<relative-part>\/\/(?<authority>(?:(?<userinfo>(?:%\h\h|[!$&-.0-;=A-Z_a-z~])*)@)?(?<host>(?<IP-literal>\[(?<IPv6address>(?:\h{1,4}:){6}(?<ls32>\h{1,4}:\h{1,4}|(?<IPv4address>(?<dec-octet>[1-9]\d|1\d{2}|2[0-4]\d|25[0-5]|\d)\.\g<dec-octet>\.\g<dec-octet>\.\g<dec-octet>))|::(?:\h{1,4}:){5}\g<ls32>|\h{1,4}?::(?:\h{1,4}:){4}\g<ls32>|(?:(?:\h{1,4}:){,1}\h{1,4})?::(?:\h{1,4}:){3}\g<ls32>|(?:(?:\h{1,4}:){,2}\h{1,4})?::(?:\h{1,4}:){2}\g<ls32>|(?:(?:\h{1,4}:){,3}\h{1,4})?::\h{1,4}:\g<ls32>|(?:(?:\h{1,4}:){,4}\h{1,4})?::\g<ls32>|(?:(?:\h{1,4}:){,5}\h{1,4})?::\h{1,4}|(?:(?:\h{1,4}:){,6}\h{1,4})?::)|(?<IPvFuture>v\h+\.[!$&-.0-;=A-Z_a-z~]+)\])|\g<IPv4address>|(?<reg-name>(?:%\h\h|[!$&-.0-9;=A-Z_a-z~])+))?(?::(?<port>\d*))?)(?<path-abempty>(?:\/(?<segment>(?:%\h\h|[!$&-.0-;=@-Z_a-z~])*))*)|(?<path-absolute>\/(?:(?<segment-nz>(?:%\h\h|[!$&-.0-;=@-Z_a-z~])+)(?:\/\g<segment>)*)?)|(?<path-noscheme>(?<segment-nz-nc>(?:%\h\h|[!$&-.0-9;=@-Z_a-z~])+)(?:\/\g<segment>)*)|(?<path-empty>))(?:\?(?<query>[^#]*))?(?:\#(?<fragment>(?:%\h\h|[!$&-.0-;=@-Z_a-z~\/?])*))?)\z/
+ RFC3986_URI = /\A(?<URI>(?<scheme>[A-Za-z][+\-.0-9A-Za-z]*+):(?<hier-part>\/\/(?<authority>(?:(?<userinfo>(?:%\h\h|[!$&-.0-;=A-Z_a-z~])*+)@)?(?<host>(?<IP-literal>\[(?:(?<IPv6address>(?:\h{1,4}:){6}(?<ls32>\h{1,4}:\h{1,4}|(?<IPv4address>(?<dec-octet>[1-9]\d|1\d{2}|2[0-4]\d|25[0-5]|\d)\.\g<dec-octet>\.\g<dec-octet>\.\g<dec-octet>))|::(?:\h{1,4}:){5}\g<ls32>|\h{1,4}?::(?:\h{1,4}:){4}\g<ls32>|(?:(?:\h{1,4}:)?\h{1,4})?::(?:\h{1,4}:){3}\g<ls32>|(?:(?:\h{1,4}:){,2}\h{1,4})?::(?:\h{1,4}:){2}\g<ls32>|(?:(?:\h{1,4}:){,3}\h{1,4})?::\h{1,4}:\g<ls32>|(?:(?:\h{1,4}:){,4}\h{1,4})?::\g<ls32>|(?:(?:\h{1,4}:){,5}\h{1,4})?::\h{1,4}|(?:(?:\h{1,4}:){,6}\h{1,4})?::)|(?<IPvFuture>v\h++\.[!$&-.0-;=A-Z_a-z~]++))\])|\g<IPv4address>|(?<reg-name>(?:%\h\h|[!$&-.0-9;=A-Z_a-z~])*+))(?::(?<port>\d*+))?)(?<path-abempty>(?:\/(?<segment>(?:%\h\h|[!$&-.0-;=@-Z_a-z~])*+))*+)|(?<path-absolute>\/(?:(?<segment-nz>(?:%\h\h|[!$&-.0-;=@-Z_a-z~])++)(?:\/\g<segment>)*+)?)|(?<path-rootless>\g<segment-nz>(?:\/\g<segment>)*+)|(?<path-empty>))(?:\?(?<query>[^#]*+))?(?:\#(?<fragment>(?:%\h\h|[!$&-.0-;=@-Z_a-z~\/?])*+))?)\z/
+ RFC3986_relative_ref = /\A(?<relative-ref>(?<relative-part>\/\/(?<authority>(?:(?<userinfo>(?:%\h\h|[!$&-.0-;=A-Z_a-z~])*+)@)?(?<host>(?<IP-literal>\[(?:(?<IPv6address>(?:\h{1,4}:){6}(?<ls32>\h{1,4}:\h{1,4}|(?<IPv4address>(?<dec-octet>[1-9]\d|1\d{2}|2[0-4]\d|25[0-5]|\d)\.\g<dec-octet>\.\g<dec-octet>\.\g<dec-octet>))|::(?:\h{1,4}:){5}\g<ls32>|\h{1,4}?::(?:\h{1,4}:){4}\g<ls32>|(?:(?:\h{1,4}:){,1}\h{1,4})?::(?:\h{1,4}:){3}\g<ls32>|(?:(?:\h{1,4}:){,2}\h{1,4})?::(?:\h{1,4}:){2}\g<ls32>|(?:(?:\h{1,4}:){,3}\h{1,4})?::\h{1,4}:\g<ls32>|(?:(?:\h{1,4}:){,4}\h{1,4})?::\g<ls32>|(?:(?:\h{1,4}:){,5}\h{1,4})?::\h{1,4}|(?:(?:\h{1,4}:){,6}\h{1,4})?::)|(?<IPvFuture>v\h++\.[!$&-.0-;=A-Z_a-z~]++))\])|\g<IPv4address>|(?<reg-name>(?:%\h\h|[!$&-.0-9;=A-Z_a-z~])++))?(?::(?<port>\d*+))?)(?<path-abempty>(?:\/(?<segment>(?:%\h\h|[!$&-.0-;=@-Z_a-z~])*+))*+)|(?<path-absolute>\/(?:(?<segment-nz>(?:%\h\h|[!$&-.0-;=@-Z_a-z~])++)(?:\/\g<segment>)*+)?)|(?<path-noscheme>(?<segment-nz-nc>(?:%\h\h|[!$&-.0-9;=@-Z_a-z~])++)(?:\/\g<segment>)*+)|(?<path-empty>))(?:\?(?<query>[^#]*+))?(?:\#(?<fragment>(?:%\h\h|[!$&-.0-;=@-Z_a-z~\/?])*+))?)\z/
attr_reader :regexp
def initialize
--
2.39.1

View File

@ -15,10 +15,10 @@ Subject: [PATCH] CVE-2023-36617 for Ruby 3.1 (#7996)
5 files changed, 28 insertions(+), 6 deletions(-)
diff --git a/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb b/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb
index e48e164..09ed407 100644
index 2f8d553..09c22c9 100644
--- a/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb
+++ b/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb
@@ -491,8 +491,8 @@ module Bundler::URI
@@ -497,8 +497,8 @@ module Bundler::URI
ret = {}
# for Bundler::URI::split
@ -30,10 +30,10 @@ index e48e164..09ed407 100644
# for Bundler::URI::extract
ret[:URI_REF] = Regexp.new(pattern[:URI_REF])
diff --git a/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb b/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb
index 2029cfd..e11f622 100644
index d527072..a85511c 100644
--- a/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb
+++ b/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb
@@ -95,7 +95,7 @@ module Bundler::URI
@@ -100,7 +100,7 @@ module Bundler::URI
QUERY: /\A(?:%\h\h|[!$&-.0-;=@-Z_a-z~\/?])*\z/,
FRAGMENT: /\A(?:%\h\h|[!$&-.0-;=@-Z_a-z~\/?])*\z/,
OPAQUE: /\A(?:[^\/].*)?\z/,
@ -58,10 +58,10 @@ index 76a8f99..00c66cf 100644
# for URI::extract
ret[:URI_REF] = Regexp.new(pattern[:URI_REF])
diff --git a/lib/uri/rfc3986_parser.rb b/lib/uri/rfc3986_parser.rb
index 3c89311..cde3ea7 100644
index dd24a40..9b1663d 100644
--- a/lib/uri/rfc3986_parser.rb
+++ b/lib/uri/rfc3986_parser.rb
@@ -101,7 +101,7 @@ module URI
@@ -100,7 +100,7 @@ module URI
QUERY: /\A(?:%\h\h|[!$&-.0-;=@-Z_a-z~\/?])*\z/,
FRAGMENT: /\A(?:%\h\h|[!$&-.0-;=@-Z_a-z~\/?])*\z/,
OPAQUE: /\A(?:[^\/].*)?\z/,
@ -71,12 +71,12 @@ index 3c89311..cde3ea7 100644
end
diff --git a/test/uri/test_parser.rb b/test/uri/test_parser.rb
index 03de137..81c2210 100644
index 72fb590..cee0acb 100644
--- a/test/uri/test_parser.rb
+++ b/test/uri/test_parser.rb
@@ -63,4 +63,26 @@ class URI::TestParser < Test::Unit::TestCase
assert_equal("\u3042", p1.unescape('%e3%81%82'.force_encoding(Encoding::US_ASCII)))
assert_equal("\xe3\x83\x90\xe3\x83\x90", p1.unescape("\xe3\x83\x90%e3%83%90"))
@@ -79,4 +79,26 @@ class URI::TestParser < Test::Unit::TestCase
assert_equal([nil, nil, "example.com", nil, nil, "", nil, nil, nil], URI.split("//example.com"))
assert_equal([nil, nil, "[0::0]", nil, nil, "", nil, nil, nil], URI.split("//[0::0]"))
end
+
+ def test_rfc2822_parse_relative_uri
@ -102,5 +102,5 @@ index 03de137..81c2210 100644
+ end
end
--
2.27.0
2.33.0

View File

@ -1,39 +0,0 @@
From 05f0c58048540e868d9bbc6e49151b27e1bc89e9 Mon Sep 17 00:00:00 2001
From: Jean Boussier <jean.boussier@gmail.com>
Date: Wed, 23 Nov 2022 12:10:36 +0100
Subject: [PATCH] Fix test_cgi_cookie_new_with_domain to pass on older rubies
---
test/cgi/test_cgi_cookie.rb | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/test/cgi/test_cgi_cookie.rb b/test/cgi/test_cgi_cookie.rb
index e3ec4be..6d31932 100644
--- a/test/cgi/test_cgi_cookie.rb
+++ b/test/cgi/test_cgi_cookie.rb
@@ -62,18 +62,18 @@ class CGICookieTest < Test::Unit::TestCase
def test_cgi_cookie_new_with_domain
h = {'name'=>'name1', 'value'=>'value1'}
- cookie = CGI::Cookie.new('domain'=>'a.example.com', **h)
+ cookie = CGI::Cookie.new(h.merge('domain'=>'a.example.com'))
assert_equal('a.example.com', cookie.domain)
- cookie = CGI::Cookie.new('domain'=>'1.example.com', **h)
+ cookie = CGI::Cookie.new(h.merge('domain'=>'1.example.com'))
assert_equal('1.example.com', cookie.domain, 'enhanced by RFC 1123')
assert_raise(ArgumentError) {
- CGI::Cookie.new('domain'=>'-a.example.com', **h)
+ CGI::Cookie.new(h.merge('domain'=>'-a.example.com'))
}
assert_raise(ArgumentError) {
- CGI::Cookie.new('domain'=>'a-.example.com', **h)
+ CGI::Cookie.new(h.merge('domain'=>'a-.example.com'))
}
end
--
2.33.0

View File

@ -1,44 +0,0 @@
From 5e09d632f3b56d85b2659ab47d5571ae9e270e10 Mon Sep 17 00:00:00 2001
From: Xenor Chang <tubaxenor@gmail.com>
Date: Mon, 28 Nov 2022 12:34:06 +0800
Subject: [PATCH] Loosen the domain regex to accept '.' (#29)
* Loosen the domain regex to accept '.'
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
Co-authored-by: Hiroshi SHIBATA <hsbt@ruby-lang.org>
---
lib/cgi/cookie.rb | 2 +-
test/cgi/test_cgi_cookie.rb | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/lib/cgi/cookie.rb b/lib/cgi/cookie.rb
index 1a9c1a8..9498e2f 100644
--- a/lib/cgi/cookie.rb
+++ b/lib/cgi/cookie.rb
@@ -42,7 +42,7 @@ class CGI
TOKEN_RE = %r"\A[[!-~]&&[^()<>@,;:\\\"/?=\[\]{}]]+\z"
PATH_VALUE_RE = %r"\A[[ -~]&&[^;]]*\z"
- DOMAIN_VALUE_RE = %r"\A(?<label>(?!-)[-A-Za-z0-9]+(?<!-))(?:\.\g<label>)*\z"
+ DOMAIN_VALUE_RE = %r"\A\.?(?<label>(?!-)[-A-Za-z0-9]+(?<!-))(?:\.\g<label>)*\z"
# Create a new CGI::Cookie object.
#
diff --git a/test/cgi/test_cgi_cookie.rb b/test/cgi/test_cgi_cookie.rb
index 6d31932..eadae45 100644
--- a/test/cgi/test_cgi_cookie.rb
+++ b/test/cgi/test_cgi_cookie.rb
@@ -65,6 +65,9 @@ class CGICookieTest < Test::Unit::TestCase
cookie = CGI::Cookie.new(h.merge('domain'=>'a.example.com'))
assert_equal('a.example.com', cookie.domain)
+ cookie = CGI::Cookie.new(h.merge('domain'=>'.example.com'))
+ assert_equal('.example.com', cookie.domain)
+
cookie = CGI::Cookie.new(h.merge('domain'=>'1.example.com'))
assert_equal('1.example.com', cookie.domain, 'enhanced by RFC 1123')
--
2.33.0

View File

@ -1,38 +0,0 @@
From 0b262057287952e4dbd5171bc958eaf709276b29 Mon Sep 17 00:00:00 2001
From: Sutou Kouhei <kou@clear-code.com>
Date: Tue, 11 Oct 2022 10:52:48 +0000
Subject: [PATCH] Make `io/console/size` as optional dependency
Because `io/console` family is unavailable on WebAssembly and WASI due
to missing termio APIs.
---
.../gems/power_assert-2.0.1/lib/power_assert/inspector.rb | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/.bundle/gems/power_assert-2.0.1/lib/power_assert/inspector.rb b/.bundle/gems/power_assert-2.0.1/lib/power_assert/inspector.rb
index 50bb646..6a4d8b6 100644
--- a/.bundle/gems/power_assert-2.0.1/lib/power_assert/inspector.rb
+++ b/.bundle/gems/power_assert-2.0.1/lib/power_assert/inspector.rb
@@ -1,5 +1,8 @@
require 'power_assert/configuration'
-require 'io/console/size'
+begin
+ require 'io/console/size'
+rescue LoadError
+end
module PowerAssert
class InspectedValue
@@ -44,7 +47,8 @@ module PowerAssert
def inspect
if PowerAssert.configuration.colorize_message
if PowerAssert.configuration.inspector == :pp
- width = [IO.console_size[1] - 1 - @indent, 10].max
+ console_width = IO.respond_to?(:console_size) ? IO.console_size[1] : 80
+ width = [console_width - 1 - @indent, 10].max
IRB::ColorPrinter.pp(@value, '', width)
else
IRB::Color.colorize_code(@value.to_s, ignore_error: true)
--
2.39.1

View File

@ -1,26 +0,0 @@
From 46c3a93982d0b81668668a65c10bc3670a488d8a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Tue, 23 Aug 2022 10:41:28 +0200
Subject: [PATCH] [ruby/irb] Drop hard dependency on RDoc.
This has been introduced in https://github.com/ruby/irb/commit/026700499dfd,
but it seems that this is just be mistake, otherwise the later handling
of `LoadError` would not be needed.
https://github.com/ruby/irb/commit/54c8df06ff
---
lib/irb/input-method.rb | 1 -
1 file changed, 1 deletion(-)
diff --git a/lib/irb/input-method.rb b/lib/irb/input-method.rb
index fd68239ee38d6..a8227caa9c32d 100644
--- a/lib/irb/input-method.rb
+++ b/lib/irb/input-method.rb
@@ -14,7 +14,6 @@
require_relative 'completion'
require 'io/console'
require 'reline'
-require 'rdoc'
module IRB
STDIN_FILE_NAME = "(line)" # :nodoc:

View File

@ -11,7 +11,7 @@ diff --git a/configure.ac b/configure.ac
index d261ea57b5..3c13076b82 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3240,6 +3240,11 @@ AS_IF([test ${multiarch+set}], [
@@ -3411,6 +3411,11 @@ AS_IF([test ${multiarch+set}], [
])
archlibdir='${libdir}/${arch}'
@ -23,6 +23,3 @@ index d261ea57b5..3c13076b82 100644
sitearchlibdir='${libdir}/${sitearch}'
archincludedir='${includedir}/${arch}'
sitearchincludedir='${includedir}/${sitearch}'
--
2.22.0

View File

@ -14,7 +14,7 @@ diff --git a/configure.ac b/configure.ac
index c42436c23d..d261ea57b5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3881,7 +3881,8 @@ AS_CASE(["$ruby_version_dir_name"],
@@ -4196,7 +4196,8 @@ AS_CASE(["$ruby_version_dir_name"],
ruby_version_dir=/'${ruby_version_dir_name}'
if test -z "${ruby_version_dir_name}"; then
@ -66,7 +66,7 @@ diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb
index 07076d4..35e6c3c 100755
--- a/tool/mkconfig.rb
+++ b/tool/mkconfig.rb
@@ -114,7 +114,7 @@
@@ -115,7 +115,7 @@
val = val.gsub(/\$(?:\$|\{?(\w+)\}?)/) {$1 ? "$(#{$1})" : $&}.dump
case name
when /^prefix$/
@ -75,6 +75,3 @@ index 07076d4..35e6c3c 100755
when /^ARCH_FLAG$/
val = "arch_flag || #{val}" if universal
when /^UNIVERSAL_ARCHNAMES$/
--
1.9.0

View File

@ -11,7 +11,7 @@ diff --git a/configure.ac b/configure.ac
index 3c13076b82..93af30321d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3945,6 +3945,8 @@ AC_SUBST(vendorarchdir)dnl
@@ -4260,6 +4260,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
@ -20,6 +20,3 @@ index 3c13076b82..93af30321d 100644
AS_IF([test "${universal_binary-no}" = yes ], [
arch="universal-${target_os}"
AS_IF([test "${rb_cv_architecture_available}" = yes], [
--
1.8.3.1

View File

@ -15,7 +15,7 @@ diff --git a/configure.ac b/configure.ac
index 93af30321d..bc13397e0e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3917,6 +3917,10 @@ AC_ARG_WITH(vendorarchdir,
@@ -4232,6 +4232,10 @@ AC_ARG_WITH(vendorarchdir,
[vendorarchdir=$withval],
[vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby'${ruby_version_dir}}${multiarch-'${vendorlibdir}/${sitearch}'}])
@ -26,7 +26,7 @@ index 93af30321d..bc13397e0e 100644
AS_IF([test "${LOAD_RELATIVE+set}"], [
AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE)
RUBY_EXEC_PREFIX=''
@@ -3941,6 +3945,7 @@ AC_SUBST(sitearchdir)dnl
@@ -4256,6 +4260,7 @@ AC_SUBST(sitearchdir)dnl
AC_SUBST(vendordir)dnl
AC_SUBST(vendorlibdir)dnl
AC_SUBST(vendorarchdir)dnl
@ -67,7 +67,7 @@ diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
index e9110a17ca..76a1f0a315 100755
--- a/tool/rbinstall.rb
+++ b/tool/rbinstall.rb
@@ -349,6 +349,7 @@ def CONFIG.[](name, mandatory = false)
@@ -359,6 +359,7 @@ def CONFIG.[](name, mandatory = false)
vendorlibdir = CONFIG["vendorlibdir"]
vendorarchlibdir = CONFIG["vendorarchdir"]
end
@ -75,7 +75,7 @@ index e9110a17ca..76a1f0a315 100755
mandir = CONFIG["mandir", true]
docdir = CONFIG["docdir", true]
enable_shared = CONFIG["ENABLE_SHARED"] == 'yes'
@@ -581,7 +582,16 @@ def stub
@@ -595,7 +596,16 @@ def stub
install?(:local, :comm, :lib) do
prepare "library scripts", rubylibdir
noinst = %w[*.txt *.rdoc *.gemspec]
@ -92,6 +92,3 @@ index e9110a17ca..76a1f0a315 100755
end
install?(:local, :comm, :hdr, :'comm-hdr') do
--
1.8.3.1

View File

@ -12,15 +12,15 @@ ruby_version_dir_name now specifies custom version string for versioned
directories, e.g. instead of default X.Y.Z, you can specify whatever
string.
---
configure.ac | 64 ++++++++++++++++++++++++---------------------
configure.ac | 66 ++++++++++++++++++++++++---------------------
template/ruby.pc.in | 1 +
2 files changed, 35 insertions(+), 30 deletions(-)
2 files changed, 36 insertions(+), 31 deletions(-)
diff --git a/configure.ac b/configure.ac
index 80b137e380..63cd3b4f8b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3983,9 +3983,6 @@ AS_CASE(["$target_os"],
@@ -4146,9 +4146,6 @@ AS_CASE(["$target_os"],
rubyw_install_name='$(RUBYW_INSTALL_NAME)'
])
@ -30,7 +30,7 @@ index 80b137e380..63cd3b4f8b 100644
rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'}
AC_ARG_WITH(rubyarchprefix,
AS_HELP_STRING([--with-rubyarchprefix=DIR],
@@ -4008,56 +4005,62 @@ AC_ARG_WITH(ridir,
@@ -4171,57 +4168,63 @@ AC_ARG_WITH(ridir,
AC_SUBST(ridir)
AC_SUBST(RI_BASE_NAME)
@ -46,6 +46,7 @@ index 80b137e380..63cd3b4f8b 100644
-AS_IF([test ${RUBY_LIB_VERSION_STYLE+set}], [
- {
- echo "#define RUBY_LIB_VERSION_STYLE $RUBY_LIB_VERSION_STYLE"
- echo '@%:@include "confdefs.h"'
- echo '#define STRINGIZE(x) x'
- test -f revision.h -o -f "${srcdir}/revision.h" || echo '#define RUBY_REVISION 0'
- echo '#include "version.h"'
@ -61,6 +62,7 @@ index 80b137e380..63cd3b4f8b 100644
+RUBY_LIB_VERSION_STYLE='3 /* full */'
+{
+echo "#define RUBY_LIB_VERSION_STYLE $RUBY_LIB_VERSION_STYLE"
+echo '@%:@include "confdefs.h"'
+echo '#define STRINGIZE(x) x'
+test -f revision.h -o -f "${srcdir}/revision.h" || echo '#define RUBY_REVISION 0'
+echo '#include "version.h"'
@ -120,7 +122,7 @@ index 80b137e380..63cd3b4f8b 100644
AS_IF([test "${LOAD_RELATIVE+set}"], [
AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE)
@@ -4074,6 +4077,7 @@ AC_SUBST(sitearchincludedir)dnl
@@ -4238,6 +4241,7 @@ AC_SUBST(sitearchincludedir)dnl
AC_SUBST(arch)dnl
AC_SUBST(sitearch)dnl
AC_SUBST(ruby_version)dnl
@ -140,8 +142,6 @@ index 8a2c066..c81b211 100644
RUBY_API_VERSION=@RUBY_API_VERSION@
RUBY_PROGRAM_VERSION=@RUBY_PROGRAM_VERSION@
arch=@arch@
--
2.1.0
From 518850aba6eee76de7715aae8d37330e34b01983 Mon Sep 17 00:00:00 2001
@ -171,7 +171,7 @@ diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
index d4c110e..d39c9a6 100755
--- a/tool/rbinstall.rb
+++ b/tool/rbinstall.rb
@@ -448,7 +448,7 @@ def CONFIG.[](name, mandatory = false)
@@ -453,7 +453,7 @@ def CONFIG.[](name, mandatory = false)
install?(:doc, :rdoc) do
if $rdocdir
@ -180,9 +180,6 @@ index d4c110e..d39c9a6 100755
prepare "rdoc", ridatadir
install_recursive($rdocdir, ridatadir, :no_install => rdoc_noinst, :mode => $data_mode)
end
--
2.23.0
From 9f0ec0233f618cbb862629816b22491c3df79578 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
@ -217,7 +214,7 @@ index d4ff4a262c..3f9a5bf590 100644
File.join parts
end
@@ -234,7 +235,7 @@ def self.vendor_dir # :nodoc:
@@ -248,7 +249,7 @@ def self.vendor_dir # :nodoc:
return nil unless RbConfig::CONFIG.key? "vendordir"
File.join RbConfig::CONFIG["vendordir"], "gems",
@ -230,7 +227,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
@@ -1395,7 +1395,8 @@ def test_self_use_paths
@@ -1337,7 +1337,8 @@ def test_self_use_paths
def test_self_user_dir
parts = [@userhome, ".gem", Gem.ruby_engine]
@ -240,7 +237,7 @@ index b25068405d..e9fef4a311 100644
FileUtils.mkdir_p File.join(parts)
@@ -1471,7 +1472,7 @@ def test_self_vendor_dir
@@ -1413,7 +1414,7 @@ def test_self_vendor_dir
vendordir(File.join(@tempdir, "vendor")) do
expected =
File.join RbConfig::CONFIG["vendordir"], "gems",
@ -249,8 +246,6 @@ index b25068405d..e9fef4a311 100644
assert_equal expected, Gem.vendor_dir
end
--
2.1.0
From 88c38a030c22dbf9422ece847bdfbf87d6659313 Mon Sep 17 00:00:00 2001
@ -267,7 +262,7 @@ diff --git a/configure.ac b/configure.ac
index a00f2b6776..999e2d6d5d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -115,7 +115,7 @@ RUBY_BASE_NAME=`echo ruby | sed "$program_transform_name"`
@@ -124,7 +124,7 @@ RUBY_BASE_NAME=`echo ruby | sed "$program_transform_name"`
RUBYW_BASE_NAME=`echo rubyw | sed "$program_transform_name"`
AC_SUBST(RUBY_BASE_NAME)
AC_SUBST(RUBYW_BASE_NAME)
@ -276,6 +271,3 @@ index a00f2b6776..999e2d6d5d 100644
dnl checks for alternative programs
AC_CANONICAL_BUILD
--
2.1.0

View File

@ -43,7 +43,7 @@ diff --git a/common.mk b/common.mk
index b2e5b2b6d0..f39f81da5c 100644
--- a/common.mk
+++ b/common.mk
@@ -82,7 +82,8 @@ ENC_MK = enc.mk
@@ -86,7 +86,8 @@ ENC_MK = enc.mk
MAKE_ENC = -f $(ENC_MK) V="$(V)" UNICODE_HDR_DIR="$(UNICODE_HDR_DIR)" \
RUBY="$(BOOTSTRAPRUBY)" MINIRUBY="$(BOOTSTRAPRUBY)" $(mflags)
@ -57,7 +57,7 @@ diff --git a/ruby.c b/ruby.c
index 60c57d6259..1eec16f2c8 100644
--- a/ruby.c
+++ b/ruby.c
@@ -1623,10 +1623,14 @@ proc_options(long argc, char **argv, ruby_cmdline_options_t *opt, int envopt)
@@ -1572,10 +1572,14 @@ proc_options(long argc, char **argv, ruby_cmdline_options_t *opt, int envopt)
void Init_builtin_features(void);
@ -72,6 +72,3 @@ index 60c57d6259..1eec16f2c8 100644
rb_const_remove(rb_cObject, rb_intern_const("TMP_RUBY_PREFIX"));
}
--
2.24.1

View File

@ -20,15 +20,12 @@ diff --git a/test/-ext-/bug_reporter/test_bug_reporter.rb b/test/-ext-/bug_repor
index 628fcd0340..2c677cc8a7 100644
--- a/test/-ext-/bug_reporter/test_bug_reporter.rb
+++ b/test/-ext-/bug_reporter/test_bug_reporter.rb
@@ -21,7 +21,7 @@ def test_bug_reporter_add
args = ["--disable-gems", "-r-test-/bug_reporter",
@@ -28,7 +28,7 @@ def test_bug_reporter_add
"-C", tmpdir]
stdin = "register_sample_bug_reporter(12345); Process.kill :SEGV, $$"
args.push("--yjit") if yjit_enabled? # We want the printed description to match this process's RUBY_DESCRIPTION
stdin = "#{no_core}register_sample_bug_reporter(12345); Process.kill :SEGV, $$"
- assert_in_out_err(args, stdin, [], expected_stderr, encoding: "ASCII-8BIT")
+ assert_in_out_err(args, stdin, [], expected_stderr, encoding: "ASCII-8BIT", timeout_error: nil)
ensure
FileUtils.rm_rf(tmpdir) if tmpdir
end
--
2.27.0

View File

@ -1,36 +1,39 @@
%global ruby_version 3.1.3
%global ruby_version 3.2.2
# Bundled libraries versions
%global rubygems_version 3.3.26
%global rubygems_molinillo_version 0.7.0
%global rubygems_version 3.4.10
%global rubygems_molinillo_version 0.8.0
%global bigdecimal_version 3.1.1
%global did_you_mean_version 1.6.1
%global io_console_version 0.5.11
%global json_version 2.6.1
%global openssl_version 3.0.1
%global psych_version 4.0.4
%global rdoc_version 6.4.0
%global minitest_version 5.15.0
%global power_assert_version 2.0.1
%global bundler_version 2.4.10
%global bigdecimal_version 3.1.3
%global did_you_mean_version 1.6.3
%global erb_version 4.0.2
%global irb_version 1.6.2
%global racc_version 1.6.2
%global io_console_version 0.6.0
%global json_version 2.6.3
%global openssl_version 3.1.0
%global psych_version 5.0.1
%global rdoc_version 6.5.0
%global minitest_version 5.16.3
%global power_assert_version 2.0.3
%global rake_version 13.0.6
%global rbs_version 2.7.0
%global test_unit_version 3.5.3
%global rbs_version 2.8.2
%global test_unit_version 3.5.7
%global rexml_version 3.2.5
%global rss_version 0.2.9
%global typeprof_version 0.21.3
%global net_ftp_version 0.1.3
%global net_imap_version 0.2.3
%global net_pop_version 0.1.1
%global net_smtp_version 0.3.1
%global net_ftp_version 0.2.0
%global net_imap_version 0.3.4
%global net_pop_version 0.1.2
%global net_smtp_version 0.3.3
%global matrix_version 0.4.2
%global prime_version 0.1.2
%global debug_version 1.6.3
%global debug_version 1.7.1
Name: ruby
Version: %{ruby_version}
Release: 136
Release: 137
Summary: Object-oriented scripting language interpreter
License: (Ruby or BSD) and Public Domain and MIT and CC0 and zlib and UCD
URL: https://www.ruby-lang.org/en/
@ -85,13 +88,6 @@ Patch6004: backport-CVE-2019-19246.patch
Patch6005: backport-CVE-2019-16161.patch
Patch6006: backport-CVE-2019-16162.patch
Patch6007: backport-CVE-2019-16163.patch
Patch6008: backport-Fix-test_cgi_cookie_new_with_domain-to-pass-on-older.patch
Patch6009: backport-Loosen-the-domain-regex-to-accept-.-29.patch
Patch6010: backport-irb-Drop-hard-dependency-on-RDoc.patch
Patch6011: backport-Make-io-console-size-as-optional-dependency.patch
Patch6012: backport-CVE-2023-28755.patch
Patch6013: backport-0001-CVE-2023-28756.patch
Patch6014: backport-0002-CVE-2023-28756.patch
Patch6015: backport-CVE-2023-36617.patch
Provides: %{name}-libs = %{version}-%{release}
@ -499,6 +495,7 @@ echo 'doc/pty' >> .ruby-doc.ja
sed -i 's/^/%doc /' .ruby-doc.*
sed -i 's/^/%lang(ja) /' .ruby-doc.ja
cp -a %{_libdir}/libruby.so.3.1* %{buildroot}%{_libdir}
%check
@ -551,6 +548,7 @@ make runruby TESTRUN_SCRIPT=%{SOURCE13}
%{ruby_libarchdir}/rbconfig.rb
%{ruby_libarchdir}/rbconfig/sizeof.so
%{ruby_libarchdir}/erb/escape.so
%{ruby_libarchdir}/{continuation.so,coverage.so,date_core.so,dbm.so,monitor.so}
%{ruby_libarchdir}/{etc.so,fcntl.so,fiber.so,fiddle.so,gdbm.so,digest.so,nkf.so,objspace.so,pathname.so,pty.so}
%{ruby_libarchdir}/{readline.so,ripper.so,sdbm.so,socket.so,stringio.so,strscan.so,syslog.so,zlib.so}
@ -564,11 +562,15 @@ make runruby TESTRUN_SCRIPT=%{SOURCE13}
%exclude %{ruby_libdir}/openssl.rb
%exclude %{ruby_libdir}/psych.rb
%exclude %{ruby_libdir}/irb
# https://bugs.ruby-lang.org/issue/19298
%exclude %{ruby_libdir}/mjit
%dir %{ruby_libdir}/ruby_vm
%{ruby_libdir}/ruby_vm/mjit
%exclude %{_bindir}/racc
%{gem_dir}/gems/erb-2.2.3/libexec/erb
%{gem_dir}/gems/irb-1.4.1/exe/irb
%exclude %{gem_dir}/gems/racc-1.6.0/bin
%{gem_dir}/gems/erb-%{erb_version}/libexec/erb
%{gem_dir}/gems/irb-%{irb_version}/exe/irb
%exclude %{gem_dir}/gems/racc-%{racc_version}/bin
%{ruby_libdir}/benchmark/version.rb
%{ruby_libdir}/csv/core_ext/array.rb
%{ruby_libdir}/csv/core_ext/string.rb
@ -604,7 +606,8 @@ make runruby TESTRUN_SCRIPT=%{SOURCE13}
%{ruby_libdir}/reline/version.rb
%{ruby_libdir}/reline/windows.rb
%{ruby_libdir}/set/sorted_set.rb
%{ruby_libdir}/erb/version.rb
%{ruby_libdir}/syntax_suggest*
%{ruby_libdir}/erb*
%{ruby_libdir}/objspace/trace.rb
%{ruby_libdir}/open3/version.rb
%{ruby_libdir}/random/formatter.rb
@ -776,7 +779,7 @@ make runruby TESTRUN_SCRIPT=%{SOURCE13}
%exclude %{_bindir}/bundle
%exclude %{_bindir}/bundler
%exclude %{gem_dir}/gems/bundler-2.3.26/
%exclude %{gem_dir}/gems/bundler-%{bundler_version}/
%exclude %{ruby_libdir}/bundler/
%files -n rubygem-test-unit
@ -843,7 +846,6 @@ make runruby TESTRUN_SCRIPT=%{SOURCE13}
%license %{gem_dir}/gems/net-ftp-%{net_ftp_version}/LICENSE.txt
%doc %{gem_dir}/gems/net-ftp-%{net_ftp_version}/README.md
%{gem_dir}/gems/net-ftp-%{net_ftp_version}/Rakefile
%{gem_dir}/gems/net-ftp-%{net_ftp_version}/bin
%{gem_dir}/gems/net-ftp-%{net_ftp_version}/lib
%{gem_dir}/specifications/net-ftp-%{net_ftp_version}.gemspec
@ -851,8 +853,7 @@ make runruby TESTRUN_SCRIPT=%{SOURCE13}
%{gem_dir}/gems/net-imap-%{net_imap_version}/Gemfile
%license %{gem_dir}/gems/net-imap-%{net_imap_version}/LICENSE.txt
%doc %{gem_dir}/gems/net-imap-%{net_imap_version}/README.md
%{gem_dir}/gems/net-imap-%{net_imap_version}/Rakefile
%{gem_dir}/gems/net-imap-%{net_imap_version}/lib
%{gem_dir}/gems/net-imap-%{net_imap_version}
%{gem_dir}/specifications/net-imap-%{net_imap_version}.gemspec
%dir %{gem_dir}/gems/net-pop-%{net_pop_version}
@ -860,7 +861,6 @@ make runruby TESTRUN_SCRIPT=%{SOURCE13}
%license %{gem_dir}/gems/net-pop-%{net_pop_version}/LICENSE.txt
%doc %{gem_dir}/gems/net-pop-%{net_pop_version}/README.md
%{gem_dir}/gems/net-pop-%{net_pop_version}/Rakefile
%{gem_dir}/gems/net-pop-%{net_pop_version}/bin
%{gem_dir}/gems/net-pop-%{net_pop_version}/lib
%{gem_dir}/specifications/net-pop-%{net_pop_version}.gemspec
@ -875,6 +875,9 @@ make runruby TESTRUN_SCRIPT=%{SOURCE13}
%{gem_dir}/specifications/matrix-%{matrix_version}.gemspec
%changelog
* Fri Jul 28 2023 shixuantong <shixuantong1@huawei.com> - 3.2.2-137
- upgrade version to 3.2.2
* Sat Jul 08 2023 shixuantong <shixuantong1@huawei.com> - 3.1.3-136
- fix CVE-2023-36617