From 21403077756f1e1b13fb4edf9dfec4240528d604 Mon Sep 17 00:00:00 2001 From: Vít Ondruch Date: Dec 16 2020 17:01:07 +0000 Subject: Upgrade to Ruby 3.0.0 (a9a7f4d8b8). --- diff --git a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch index 0b8100a..3b354fd 100644 --- a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch +++ b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch @@ -11,7 +11,7 @@ diff --git a/configure.ac b/configure.ac index d261ea57b5..3c13076b82 100644 --- a/configure.ac +++ b/configure.ac -@@ -3286,6 +3286,11 @@ AS_IF([test ${multiarch+set}], [ +@@ -3216,6 +3216,11 @@ AS_IF([test ${multiarch+set}], [ ]) archlibdir='${libdir}/${arch}' diff --git a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch index 7cda4fa..c14dbff 100644 --- a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch +++ b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch @@ -14,7 +14,7 @@ diff --git a/configure.ac b/configure.ac index c42436c23d..d261ea57b5 100644 --- a/configure.ac +++ b/configure.ac -@@ -3924,7 +3924,8 @@ AS_CASE(["$ruby_version_dir_name"], +@@ -3854,7 +3854,8 @@ AS_CASE(["$ruby_version_dir_name"], ruby_version_dir=/'${ruby_version_dir_name}' if test -z "${ruby_version_dir_name}"; then diff --git a/ruby-2.1.0-always-use-i386.patch b/ruby-2.1.0-always-use-i386.patch index b79c010..63c0738 100644 --- a/ruby-2.1.0-always-use-i386.patch +++ b/ruby-2.1.0-always-use-i386.patch @@ -11,7 +11,7 @@ diff --git a/configure.ac b/configure.ac index 3c13076b82..93af30321d 100644 --- a/configure.ac +++ b/configure.ac -@@ -3988,6 +3988,8 @@ AC_SUBST(vendorarchdir)dnl +@@ -3918,6 +3918,8 @@ AC_SUBST(vendorarchdir)dnl AC_SUBST(CONFIGURE, "`echo $0 | sed 's|.*/||'`")dnl AC_SUBST(configure_args, "`echo "${ac_configure_args}" | sed 's/\\$/$$/g'`")dnl diff --git a/ruby-2.1.0-custom-rubygems-location.patch b/ruby-2.1.0-custom-rubygems-location.patch index cd25be2..c9886d3 100644 --- a/ruby-2.1.0-custom-rubygems-location.patch +++ b/ruby-2.1.0-custom-rubygems-location.patch @@ -15,7 +15,7 @@ diff --git a/configure.ac b/configure.ac index 93af30321d..bc13397e0e 100644 --- a/configure.ac +++ b/configure.ac -@@ -3960,6 +3960,10 @@ AC_ARG_WITH(vendorarchdir, +@@ -3890,6 +3890,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='' -@@ -3984,6 +3988,7 @@ AC_SUBST(sitearchdir)dnl +@@ -3914,6 +3918,7 @@ AC_SUBST(sitearchdir)dnl AC_SUBST(vendordir)dnl AC_SUBST(vendorlibdir)dnl AC_SUBST(vendorarchdir)dnl diff --git a/ruby-2.3.0-ruby_version.patch b/ruby-2.3.0-ruby_version.patch index a5a7ad2..cebe53e 100644 --- a/ruby-2.3.0-ruby_version.patch +++ b/ruby-2.3.0-ruby_version.patch @@ -20,7 +20,7 @@ diff --git a/configure.ac b/configure.ac index 80b137e380..63cd3b4f8b 100644 --- a/configure.ac +++ b/configure.ac -@@ -3875,9 +3875,6 @@ AS_CASE(["$target_os"], +@@ -3805,9 +3805,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], -@@ -3900,56 +3897,62 @@ AC_ARG_WITH(ridir, +@@ -3830,56 +3827,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) -@@ -3966,6 +3969,7 @@ AC_SUBST(sitearchincludedir)dnl +@@ -3896,6 +3899,7 @@ AC_SUBST(sitearchincludedir)dnl AC_SUBST(arch)dnl AC_SUBST(sitearch)dnl AC_SUBST(ruby_version)dnl @@ -202,14 +202,14 @@ index d4ff4a262c..3f9a5bf590 100644 [ File.dirname(RbConfig::CONFIG['sitedir']), 'Gems', -- RbConfig::CONFIG['ruby_version'] +- RbConfig::CONFIG['ruby_version'], + RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version'] ] else [ RbConfig::CONFIG['rubylibprefix'], 'gems', -- RbConfig::CONFIG['ruby_version'] +- RbConfig::CONFIG['ruby_version'], + RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version'] ] end diff --git a/ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch b/ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch index 09c6b22..db6737d 100644 --- a/ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch +++ b/ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch @@ -15,7 +15,7 @@ diff --git a/test/fiddle/helper.rb b/test/fiddle/helper.rb index 1da3d93..65148a1 100644 --- a/test/fiddle/helper.rb +++ b/test/fiddle/helper.rb -@@ -127,6 +127,9 @@ +@@ -139,6 +139,9 @@ libc_so = libm_so = "/usr/lib/libSystem.B.dylib" end diff --git a/ruby-2.8.0-Annotate-execstack.patch b/ruby-2.8.0-Annotate-execstack.patch deleted file mode 100644 index fd0be1f..0000000 --- a/ruby-2.8.0-Annotate-execstack.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/coroutine/arm32/Context.S b/coroutine/arm32/Context.S -index b66db29622..596284b5cf 100644 ---- a/coroutine/arm32/Context.S -+++ b/coroutine/arm32/Context.S -@@ -27,3 +27,7 @@ coroutine_transfer: - - # Restore callee state (8 registers program counter) - pop {r4-r11,pc} -+ -+#if defined(__linux__) && defined(__ELF__) -+.section .note.GNU-stack,"",%progbits -+#endif diff --git a/ruby.spec b/ruby.spec index 9244aa9..b77b6a7 100644 --- a/ruby.spec +++ b/ruby.spec @@ -10,7 +10,7 @@ #%%global milestone preview1 # Keep the revision enabled for pre-releases from GIT. -%global revision 1cfc6e7b7a +%global revision a9a7f4d8b8 %global ruby_archive %{name}-%{ruby_version} @@ -30,26 +30,26 @@ %global rubygems_dir %{_datadir}/rubygems # Bundled libraries versions -%global rubygems_version 3.2.0.rc.2 -%global rubygems_molinillo_version 0.5.7 +%global rubygems_version 3.2.1 +%global rubygems_molinillo_version 0.7.0 # Default gems. -%global bundler_version 2.2.0.rc.2 +%global bundler_version 2.2.1 %global bundler_connection_pool_version 2.2.2 %global bundler_fileutils_version 1.4.1 -%global bundler_molinillo_version 0.6.6 +%global bundler_molinillo_version 0.7.0 %global bundler_net_http_persistent_version 4.0.0 %global bundler_thor_version 1.0.1 %global bundler_uri_version 0.10.0 -%global bigdecimal_version 2.0.1 +%global bigdecimal_version 2.0.2 %global did_you_mean_version 1.4.0 %global erb_version 2.2.0 %global io_console_version 0.5.6 %global irb_version 1.2.7 -%global json_version 2.3.1 +%global json_version 2.4.0 %global openssl_version 2.2.0 -%global psych_version 3.2.0 +%global psych_version 3.2.1 %global racc_version 1.5.1 %global rdoc_version 6.2.1 @@ -57,11 +57,11 @@ %global minitest_version 5.14.2 %global power_assert_version 1.2.0 %global rake_version 13.0.1 -%global rbs_version 0.19.0 -%global test_unit_version 3.3.6 +%global rbs_version 0.20.1 +%global test_unit_version 3.3.7 %global rexml_version 3.2.4 %global rss_version 0.2.9 -%global typeprof_version 0.7.0 +%global typeprof_version 0.9.0 %global tapset_libdir %(echo %{_libdir} | sed 's/64//')* @@ -145,13 +145,6 @@ Patch6: ruby-2.7.0-Initialize-ABRT-hook.patch # hardening features of glibc (rhbz#1361037). # https://bugs.ruby-lang.org/issues/12666 Patch9: ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch -# Fix fortifications on armv7hl. -# https://bugs.ruby-lang.org/issues/16762 -Patch11: ruby-2.8.0-Annotate-execstack.patch -# Fix `Permission denied @ dir_s_mkdir - /usr/share/gems/plugins` issues -# building rubygem- packages. -# https://github.com/rubygems/rubygems/pull/3972 -Patch12: rubygems-3.2.0-Install-to-correct-plugins-dir-when-using-build-root.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 @@ -605,8 +598,6 @@ rm -rf ext/fiddle/libffi* %patch5 -p1 %patch6 -p1 %patch9 -p1 -%patch11 -p1 -%patch12 -p1 %patch19 -p1 # Provide an example of usage of the tapset: @@ -661,12 +652,11 @@ sed -i 's/Version: \${ruby_version}/Version: %{ruby_version}/' %{buildroot}%{_li # Kill bundled certificates, as they should be part of ca-certificates. for cert in \ - rubygems.global.ssl.fastly.net/DigiCertHighAssuranceEVRootCA.pem \ - rubygems.org/AddTrustExternalCARoot.pem \ - index.rubygems.org/GlobalSignRootCA.pem + rubygems.org/GlobalSignRootCA.pem \ + rubygems.org/GlobalSignRootCA_R3.pem do rm %{buildroot}%{rubygems_dir}/rubygems/ssl_certs/$cert - rm -r $(dirname %{buildroot}%{rubygems_dir}/rubygems/ssl_certs/$cert) + rm -d $(dirname %{buildroot}%{rubygems_dir}/rubygems/ssl_certs/$cert) || : done # Ensure there is not forgotten any certificate. test ! "$(ls -A %{buildroot}%{rubygems_dir}/rubygems/ssl_certs/ 2>/dev/null)" @@ -1008,7 +998,6 @@ MSPECOPTS="$MSPECOPTS -P 'raises TypeError if one of the passed exceptions is no %{ruby_libdir}/un.rb %{ruby_libdir}/uri* %{ruby_libdir}/weakref* -%{ruby_libdir}/webrick* %{ruby_libdir}/yaml* # Platform specific libraries. @@ -1167,7 +1156,7 @@ MSPECOPTS="$MSPECOPTS -P 'raises TypeError if one of the passed exceptions is no %{gem_dir}/specifications/default/erb-%{erb_version}.gemspec %{gem_dir}/specifications/default/etc-1.1.0.gemspec %{gem_dir}/specifications/default/fcntl-1.0.0.gemspec -%{gem_dir}/specifications/default/fiddle-1.0.2.gemspec +%{gem_dir}/specifications/default/fiddle-1.0.4.gemspec %{gem_dir}/specifications/default/fileutils-1.4.1.gemspec %{gem_dir}/specifications/default/find-0.1.0.gemspec %{gem_dir}/specifications/default/forwardable-1.3.1.gemspec @@ -1177,7 +1166,7 @@ MSPECOPTS="$MSPECOPTS -P 'raises TypeError if one of the passed exceptions is no %{gem_dir}/specifications/default/io-wait-0.1.0.gemspec %{gem_dir}/specifications/default/ipaddr-1.2.2.gemspec %{gem_dir}/specifications/default/logger-1.4.2.gemspec -%{gem_dir}/specifications/default/matrix-0.3.0.gemspec +%{gem_dir}/specifications/default/matrix-0.3.1.gemspec %{gem_dir}/specifications/default/mutex_m-0.1.0.gemspec %{gem_dir}/specifications/default/net-ftp-0.1.0.gemspec %{gem_dir}/specifications/default/net-http-0.1.0.gemspec @@ -1194,12 +1183,12 @@ MSPECOPTS="$MSPECOPTS -P 'raises TypeError if one of the passed exceptions is no %{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/prime-0.1.1.gemspec +%{gem_dir}/specifications/default/prime-0.1.2.gemspec %{gem_dir}/specifications/default/pstore-0.1.0.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.1.5.gemspec +%{gem_dir}/specifications/default/reline-0.1.9.gemspec %{gem_dir}/specifications/default/resolv-0.1.0.gemspec %{gem_dir}/specifications/default/resolv-replace-0.1.0.gemspec %{gem_dir}/specifications/default/rinda-0.1.0.gemspec @@ -1219,7 +1208,6 @@ MSPECOPTS="$MSPECOPTS -P 'raises TypeError if one of the passed exceptions is no %{gem_dir}/specifications/default/un-0.1.0.gemspec %{gem_dir}/specifications/default/uri-0.10.0.gemspec %{gem_dir}/specifications/default/weakref-0.1.0.gemspec -%{gem_dir}/specifications/default/webrick-1.6.0.gemspec #%%{gem_dir}/specifications/default/win32ole-1.8.8.gemspec %{gem_dir}/specifications/default/yaml-0.1.0.gemspec %{gem_dir}/specifications/default/zlib-1.1.0.gemspec @@ -1316,9 +1304,25 @@ MSPECOPTS="$MSPECOPTS -P 'raises TypeError if one of the passed exceptions is no %files -n rubygem-rbs %{_bindir}/rbs -%{gem_dir}/gems/rbs-%{rbs_version} +%dir %{gem_dir}/gems/rbs-%{rbs_version} +%exclude %{gem_dir}/gems/rbs-%{rbs_version}/.* %license %{gem_dir}/gems/rbs-%{rbs_version}/BSDL +%doc %{gem_dir}/gems/rbs-%{rbs_version}/CHANGELOG.md %license %{gem_dir}/gems/rbs-%{rbs_version}/COPYING +%{gem_dir}/gems/rbs-%{rbs_version}/Gemfile +%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 +%{gem_dir}/gems/rbs-%{rbs_version}/goodcheck.yml +%{gem_dir}/gems/rbs-%{rbs_version}/lib +%{gem_dir}/gems/rbs-%{rbs_version}/schema +%{gem_dir}/gems/rbs-%{rbs_version}/sig +%{gem_dir}/gems/rbs-%{rbs_version}/stdlib +%{gem_dir}/gems/rbs-%{rbs_version}/steep %{gem_dir}/specifications/rbs-%{rbs_version}.gemspec %files -n rubygem-test-unit @@ -1335,7 +1339,6 @@ MSPECOPTS="$MSPECOPTS -P 'raises TypeError if one of the passed exceptions is no %doc %{gem_dir}/gems/rexml-%{rexml_version}/Gemfile %doc %{gem_dir}/gems/rexml-%{rexml_version}/README.md %doc %{gem_dir}/gems/rexml-%{rexml_version}/Rakefile -%doc %{gem_dir}/gems/rexml-%{rexml_version}/rexml.gemspec %files -n rubygem-rss %dir %{gem_dir}/gems/rss-%{rss_version} @@ -1347,7 +1350,6 @@ MSPECOPTS="$MSPECOPTS -P 'raises TypeError if one of the passed exceptions is no %doc %{gem_dir}/gems/rss-%{rss_version}/Gemfile %doc %{gem_dir}/gems/rss-%{rss_version}/README.md %doc %{gem_dir}/gems/rss-%{rss_version}/Rakefile -%doc %{gem_dir}/gems/rss-%{rss_version}/rss.gemspec %doc %{gem_dir}/gems/rss-%{rss_version}/test %files -n rubygem-typeprof @@ -1366,12 +1368,11 @@ MSPECOPTS="$MSPECOPTS -P 'raises TypeError if one of the passed exceptions is no %doc %{gem_dir}/gems/typeprof-%{typeprof_version}/doc %lang(ja) %doc %{gem_dir}/gems/typeprof-%{typeprof_version}/doc/doc.ja.md %doc %{gem_dir}/gems/typeprof-%{typeprof_version}/testbed -%doc %{gem_dir}/gems/typeprof-%{typeprof_version}/typeprof.gemspec %changelog * Wed Oct 07 2020 Vít Ondruch - 3.0.0-1 -- Upgrade to Ruby 3.0.0 (1cfc6e7b7a). +- Upgrade to Ruby 3.0.0 (a9a7f4d8b8). - Extract RSS and REXML into separate subpackages, because they were moved from default gems to bundled gems. - Obsolete Net::Telnet and XMLRPC packages, because they were dropped from Ruby. diff --git a/rubygems-3.2.0-Install-to-correct-plugins-dir-when-using-build-root.patch b/rubygems-3.2.0-Install-to-correct-plugins-dir-when-using-build-root.patch deleted file mode 100644 index 88a033e..0000000 --- a/rubygems-3.2.0-Install-to-correct-plugins-dir-when-using-build-root.patch +++ /dev/null @@ -1,143 +0,0 @@ -From c3995fb9f5b520f05936ea6ec99d8d4fad18f024 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?David=20Rodr=C3=ADguez?= -Date: Mon, 28 Sep 2020 11:46:15 +0200 -Subject: [PATCH 1/3] Add tests for build_root ui messages - ---- - test/rubygems/test_gem_installer.rb | 15 ++++++++++++--- - 1 file changed, 12 insertions(+), 3 deletions(-) - -diff --git a/test/rubygems/test_gem_installer.rb b/test/rubygems/test_gem_installer.rb -index 1424b140d24..034a187fc0f 100644 ---- a/test/rubygems/test_gem_installer.rb -+++ b/test/rubygems/test_gem_installer.rb -@@ -1781,13 +1781,22 @@ def test_process_options - - def test_process_options_build_root - build_root = File.join @tempdir, 'build_root' -+ bin_dir = File.join(build_root, @gemhome.gsub(/^[a-zA-Z]:/, ''), 'bin') -+ gem_home = File.join(build_root, @gemhome.gsub(/^[a-zA-Z]:/, '')) - - @gem = setup_base_gem -- installer = Gem::Installer.at @gem, :build_root => build_root -+ installer = use_ui(@ui) { Gem::Installer.at @gem, :build_root => build_root } - - assert_equal Pathname(build_root), installer.build_root -- assert_equal File.join(build_root, @gemhome, 'bin'), installer.bin_dir -- assert_equal File.join(build_root, @gemhome), installer.gem_home -+ assert_equal bin_dir, installer.bin_dir -+ assert_equal gem_home, installer.gem_home -+ -+ errors = @ui.error.split("\n") -+ -+ assert_equal "WARNING: You build with buildroot.", errors.shift -+ assert_equal " Build root: #{build_root}", errors.shift -+ assert_equal " Bin dir: #{bin_dir}", errors.shift -+ assert_equal " Gem home: #{gem_home}", errors.shift - end - - def test_shebang_arguments - -From e1528db2c7dc8c7e5850e0754a7bb6e6dbc9009e Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?David=20Rodr=C3=ADguez?= -Date: Mon, 28 Sep 2020 11:48:52 +0200 -Subject: [PATCH 2/3] Correctly set plugins dir when using `--build-root` - ---- - lib/rubygems/installer.rb | 1 + - test/rubygems/test_gem_installer.rb | 25 +++++++++++++++++++++++++ - 2 files changed, 26 insertions(+) - -diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb -index f4c4be4ac93..e982d2fd2ce 100644 ---- a/lib/rubygems/installer.rb -+++ b/lib/rubygems/installer.rb -@@ -697,6 +697,7 @@ def process_options # :nodoc: - @build_root = Pathname.new(@build_root).expand_path - @bin_dir = File.join(@build_root, options[:bin_dir] || Gem.bindir(@gem_home)) - @gem_home = File.join(@build_root, @gem_home) -+ @plugins_dir = File.join(@build_root, @plugins_dir.gsub(/^[a-zA-Z]:/, '')) - alert_warning "You build with buildroot.\n Build root: #{@build_root}\n Bin dir: #{@bin_dir}\n Gem home: #{@gem_home}" - end - end -diff --git a/test/rubygems/test_gem_installer.rb b/test/rubygems/test_gem_installer.rb -index 034a187fc0f..ef6003c28fb 100644 ---- a/test/rubygems/test_gem_installer.rb -+++ b/test/rubygems/test_gem_installer.rb -@@ -798,6 +798,31 @@ def test_generate_plugins_with_user_install - assert File.exist?(user_path), 'plugin not written to user plugins_dir' - end - -+ def test_generate_plugins_with_build_root -+ spec = quick_gem 'a' do |s| -+ write_file File.join(@tempdir, 'lib', 'rubygems_plugin.rb') do |io| -+ io.write "puts __FILE__" -+ end -+ -+ s.files += %w[lib/rubygems_plugin.rb] -+ end -+ -+ util_build_gem spec -+ -+ File.chmod(0555, Gem.plugindir) -+ system_path = File.join(Gem.plugindir, 'a_plugin.rb') -+ -+ build_root = File.join(@tempdir, 'build_root') -+ build_root_path = File.join(build_root, Gem.plugindir.gsub(/^[a-zA-Z]:/, ''), 'a_plugin.rb') -+ -+ installer = Gem::Installer.at spec.cache_file, :build_root => build_root -+ -+ assert_equal spec, installer.install -+ -+ assert !File.exist?(system_path), 'plugin written incorrect written to system plugins_dir' -+ assert File.exist?(build_root_path), 'plugin not written to build_root' -+ end -+ - def test_keeps_plugins_up_to_date - # NOTE: version a-2 is already installed by setup hooks - - -From ba4df51949474a09479baf84374131ca095eda98 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?David=20Rodr=C3=ADguez?= -Date: Mon, 28 Sep 2020 11:51:00 +0200 -Subject: [PATCH 3/3] Also print plugins dir when using `--build-root` - -For consistency. ---- - lib/rubygems/installer.rb | 2 +- - test/rubygems/test_gem_installer.rb | 2 ++ - 2 files changed, 3 insertions(+), 1 deletion(-) - -diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb -index e982d2fd2ce..b1c2ae4f237 100644 ---- a/lib/rubygems/installer.rb -+++ b/lib/rubygems/installer.rb -@@ -698,7 +698,7 @@ def process_options # :nodoc: - @bin_dir = File.join(@build_root, options[:bin_dir] || Gem.bindir(@gem_home)) - @gem_home = File.join(@build_root, @gem_home) - @plugins_dir = File.join(@build_root, @plugins_dir.gsub(/^[a-zA-Z]:/, '')) -- alert_warning "You build with buildroot.\n Build root: #{@build_root}\n Bin dir: #{@bin_dir}\n Gem home: #{@gem_home}" -+ alert_warning "You build with buildroot.\n Build root: #{@build_root}\n Bin dir: #{@bin_dir}\n Gem home: #{@gem_home}\n Plugins dir: #{@plugins_dir}" - end - end - -diff --git a/test/rubygems/test_gem_installer.rb b/test/rubygems/test_gem_installer.rb -index ef6003c28fb..0a9a2e38dd8 100644 ---- a/test/rubygems/test_gem_installer.rb -+++ b/test/rubygems/test_gem_installer.rb -@@ -1808,6 +1808,7 @@ def test_process_options_build_root - build_root = File.join @tempdir, 'build_root' - bin_dir = File.join(build_root, @gemhome.gsub(/^[a-zA-Z]:/, ''), 'bin') - gem_home = File.join(build_root, @gemhome.gsub(/^[a-zA-Z]:/, '')) -+ plugins_dir = File.join(build_root, @gemhome.gsub(/^[a-zA-Z]:/, ''), 'plugins') - - @gem = setup_base_gem - installer = use_ui(@ui) { Gem::Installer.at @gem, :build_root => build_root } -@@ -1822,6 +1823,7 @@ def test_process_options_build_root - assert_equal " Build root: #{build_root}", errors.shift - assert_equal " Bin dir: #{bin_dir}", errors.shift - assert_equal " Gem home: #{gem_home}", errors.shift -+ assert_equal " Plugins dir: #{plugins_dir}", errors.shift - end - - def test_shebang_arguments