summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2023-01-25 23:32:01 +0900
committerGitHub <noreply@github.com>2023-01-25 23:32:01 +0900
commita22eca82314ae36668d8c1a591ffbbfa8f93147c (patch)
treeb855091cbc6d28deba95467610017985dd30f78b /tool
parentfee5b8f263211faef10ed9f3e43c1e8b34548bbd (diff)
Merge the latest stable versions of RubyGems and Bundler to Ruby 3.2.x (#7061)
[Bug #19350] * Merge RubyGems-3.4.2 and Bundler-2.4.2 * Merge RubyGems-3.4.3 and Bundler-2.4.3 * Generate parser-text.rb of racc when sync it * Ignore LICENSE files of libraries vendored in rubygems [ci skip] * Adjust spec of bundler like as `sync_default_gems` [ci skip] * Fixed a typo * Removed vendored LICENSE file. * Update LEGAL sections for pub_grub * Merge RubyGems-3.4.4 and Bundler-2.4.4 * Merge RubyGems-3.4.5 and Bundler-2.4.5 Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
Diffstat (limited to 'tool')
-rw-r--r--tool/bundler/dev_gems.rb.lock2
-rw-r--r--tool/bundler/rubocop_gems.rb.lock2
-rw-r--r--tool/bundler/standard_gems.rb.lock2
-rw-r--r--tool/bundler/test_gems.rb.lock2
-rwxr-xr-xtool/sync_default_gems.rb36
5 files changed, 26 insertions, 18 deletions
diff --git a/tool/bundler/dev_gems.rb.lock b/tool/bundler/dev_gems.rb.lock
index 0e266cdcb5..fc14020890 100644
--- a/tool/bundler/dev_gems.rb.lock
+++ b/tool/bundler/dev_gems.rb.lock
@@ -54,4 +54,4 @@ DEPENDENCIES
webrick (~> 1.6)
BUNDLED WITH
- 2.4.1
+ 2.4.5
diff --git a/tool/bundler/rubocop_gems.rb.lock b/tool/bundler/rubocop_gems.rb.lock
index 00300554d0..4ead894c1f 100644
--- a/tool/bundler/rubocop_gems.rb.lock
+++ b/tool/bundler/rubocop_gems.rb.lock
@@ -70,4 +70,4 @@ DEPENDENCIES
test-unit
BUNDLED WITH
- 2.4.1
+ 2.4.5
diff --git a/tool/bundler/standard_gems.rb.lock b/tool/bundler/standard_gems.rb.lock
index aaeae355d9..350d0ef4ea 100644
--- a/tool/bundler/standard_gems.rb.lock
+++ b/tool/bundler/standard_gems.rb.lock
@@ -78,4 +78,4 @@ DEPENDENCIES
test-unit
BUNDLED WITH
- 2.4.1
+ 2.4.5
diff --git a/tool/bundler/test_gems.rb.lock b/tool/bundler/test_gems.rb.lock
index 4918f113ae..a99ba0be60 100644
--- a/tool/bundler/test_gems.rb.lock
+++ b/tool/bundler/test_gems.rb.lock
@@ -42,4 +42,4 @@ DEPENDENCIES
webrick (= 1.7.0)
BUNDLED WITH
- 2.4.1
+ 2.4.5
diff --git a/tool/sync_default_gems.rb b/tool/sync_default_gems.rb
index 15f651ca06..50c35761f3 100755
--- a/tool/sync_default_gems.rb
+++ b/tool/sync_default_gems.rb
@@ -159,19 +159,7 @@ module SyncDefaultGems
cp_r(Dir.glob("#{upstream}/bundler/tool/bundler/rubocop_gems*"), "tool/bundler")
cp_r(Dir.glob("#{upstream}/bundler/tool/bundler/standard_gems*"), "tool/bundler")
rm_rf(%w[spec/bundler/support/artifice/vcr_cassettes])
- license_files = %w[
- lib/bundler/vendor/thor/LICENSE.md
- lib/rubygems/resolver/molinillo/LICENSE
- lib/bundler/vendor/molinillo/LICENSE
- lib/bundler/vendor/connection_pool/LICENSE
- lib/bundler/vendor/net-http-persistent/README.rdoc
- lib/bundler/vendor/fileutils/LICENSE.txt
- lib/bundler/vendor/tsort/LICENSE.txt
- lib/bundler/vendor/uri/LICENSE.txt
- lib/rubygems/optparse/COPYING
- lib/rubygems/tsort/LICENSE.txt
- ]
- rm_rf license_files
+ rm_rf Dir.glob("lib/{bundler,rubygems}/**/{COPYING,LICENSE,README}{,.{md,txt,rdoc}}")
when "rdoc"
rm_rf(%w[lib/rdoc lib/rdoc.rb test/rdoc libexec/rdoc libexec/ri])
cp_r(Dir.glob("#{upstream}/lib/rdoc*"), "lib")
@@ -302,6 +290,15 @@ module SyncDefaultGems
`git checkout ext/strscan/depend`
when "racc"
rm_rf(%w[lib/racc lib/racc.rb ext/racc test/racc])
+ parser_files = %w[
+ lib/racc/parser-text.rb
+ ]
+ Dir.chdir(upstream) do
+ `bundle install`
+ parser_files.each do |file|
+ `bundle exec rake #{file}`
+ end
+ end
cp_r(Dir.glob("#{upstream}/lib/racc*"), "lib")
mkdir_p("ext/racc/cparse")
cp_r(Dir.glob("#{upstream}/ext/racc/cparse/*"), "ext/racc/cparse")
@@ -543,11 +540,22 @@ module SyncDefaultGems
end
next if skipped
+ case gem
+ when "rubygems"
+ %w[bundler/spec/support/artifice/vcr_cassettes].each do |rem|
+ if File.exist?(rem)
+ system("git", "reset", rem)
+ rm_rf(rem)
+ end
+ end
+ system(*%w[git add spec/bundler])
+ end
+
if result.empty?
skipped = true
elsif /^CONFLICT/ =~ result
result = pipe_readlines(%W"git status --porcelain -z")
- result.map! {|line| line[/\A(?:.U|AA) (.*)/, 1]}
+ result.map! {|line| line[/\A(?:.U|[UA]A) (.*)/, 1]}
result.compact!
ignore, conflict = result.partition {|name| IGNORE_FILE_PATTERN =~ name}
unless ignore.empty?