FreeBSD Bugzilla – Attachment 228695 Details for
Bug 258108
[exp-run] devel/ruby-gems: Update to 3.3.7 (Fixes for Ruby 3.0)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
update to 3.2.29 - with new plugins system handling
devel_ruby-gems-3.2.29.patch (text/plain), 12.75 KB, created by
Thibault Jouan
on 2021-10-14 12:53:42 UTC
(
hide
)
Description:
update to 3.2.29 - with new plugins system handling
Filename:
MIME Type:
Creator:
Thibault Jouan
Created:
2021-10-14 12:53:42 UTC
Size:
12.75 KB
patch
obsolete
>commit 3979db22f22723bf8a963c45ecd2afc119897f62 >Author: Thibault Jouan <tj+freebsd_ports@a13.fr> >AuthorDate: Mon Oct 11 23:24:57 2021 +0000 >Commit: Thibault Jouan <tj+freebsd_ports@a13.fr> >CommitDate: Thu Oct 14 12:27:10 2021 +0000 > > devel/ruby-gems: Update to 3.2.29 > > * Remove bundler manually following `USE_BUNDLER_FOR_GEMDEPS' > environment variable removal; > * Use new `--no-regenerate-plugins' option flag which is similar to > `--no-regenerate-binstubs': there is nothing to "regenerate" during a > fresh install (See upstream 27d786e8); > * Use new `--format-executable' option flag to preserve original > behavior of generating executables with Ruby "short version" suffix > (26, 27, 30â¦) appended (See upstream 00de0054); > * Remove new x509 certificates: They should probably not be vendored, > they are already provided by `security/ca_root_nss' port anyway. > > Notable changes, affecting how ruby gems works in FreeBSD ports system: > ----------------------------------------------------------------------- > > * Gem specification generation changed the output, which broke the > `stage-qa' step. `gemdeps()' function searches for > `add_runtime_dependency' strings, expecting each match to be an actual > usage of the method, but that's not the case anymore: > if s.respond_to? :add_runtime_dependency then > s.add_development_dependency(%q<rake>.freeze, [">= 0"]) > else > s.add_dependency(%q<rake>.freeze, [">= 0"]) > end > See upstream 5cccc2b8. > > * RubyGems reworked the plugins system (see upstream 27d786e8). There > isn't a lot of info, but by looking at upstream change f5bd2fe0 we can > guess that the idea is to generate wrappers in the new "global" > plugins directory (${GEMS_BASE_DIR}/plugins) with code to require the > actual plugin in the gem own directory. For example with the `yard' > gem (`textproc/rubygem-yard' port): > % cat /usr/local/lib/ruby/gems/2.7/plugins/yard_plugin.rb > require_relative '../gems/yard-0.9.26/lib/rubygems_plugin.rb' > We handle plugins like extensions: if the gem has no plugin, we remove > the empty directory at the end of `do-install' target; if the gem has > a plugin, we add it to the plist at the end of `gem-autoplist' target. > > Notable changes, unrelated to FreeBSD: > -------------------------------------- > > * `ubygems' ruby feature was removed, preventing this kind of idiom: > `ruby -rubygems` > But it only made sense with Ruby 1.8 anyway (See upstream 7ac54d5b). > > * There is a "breaking" change regarding users' directories, before: > USER INSTALLATION DIRECTORY: ${HOME}/.gem/ruby/2.7 > SPEC CACHE DIRECTORY: ${HOME}/.gem/specs > GEM PATHS: [â¦], ${HOME}/.gem/ruby/2.7 > after: > USER INSTALLATION DIRECTORY: ${HOME}/.local/share/gem/ruby/2.7 > SPEC CACHE DIRECTORY: ${HOME}/.local/share/gem/specs > GEM PATHS: [â¦], ${HOME}/.local/share/gem/ruby/2.7 > It is described as "supporting" XDG but seems to enforce it, a > possible workaround is to create `~/.gem' directory or a `~/.gemrc' > run control file (See upstream b46dddec). > >diff --git Mk/Scripts/qa.sh Mk/Scripts/qa.sh >index 13548ddb38c7..d62475d4678b 100644 >--- Mk/Scripts/qa.sh >+++ Mk/Scripts/qa.sh >@@ -846,7 +846,7 @@ gemdeps() > EOF > fi > done <<-EOF >- $(grep -a 'add_runtime_dependency' ${STAGEDIR}${PREFIX}/lib/ruby/gems/*/specifications/${PORTNAME}-*.gemspec \ >+ $(grep -a 's.add_runtime_dependency' ${STAGEDIR}${PREFIX}/lib/ruby/gems/*/specifications/${PORTNAME}-*.gemspec \ > | sed 's|.*<\(.*\)>.*\[\(.*\)\])|\1 \2|' \ > | sort -u) > EOF >diff --git Mk/Uses/gem.mk Mk/Uses/gem.mk >index c0e8fe72010d..2a581b1b38e9 100644 >--- Mk/Uses/gem.mk >+++ Mk/Uses/gem.mk >@@ -34,6 +34,7 @@ DOC_DIR= ${GEMS_BASE_DIR}/doc > CACHE_DIR= ${GEMS_BASE_DIR}/cache > SPEC_DIR= ${GEMS_BASE_DIR}/specifications > EXT_DIR= ${GEMS_BASE_DIR}/extensions >+PLUGINS_DIR= ${GEMS_BASE_DIR}/plugins > GEM_NAME?= ${DISTNAME} > GEM_LIB_DIR?= ${GEMS_DIR}/${GEM_NAME} > GEM_DOC_DIR?= ${DOC_DIR}/${GEM_NAME} >@@ -53,6 +54,7 @@ PLIST_SUB+= PORTVERSION="${PORTVERSION}" \ > CACHE_DIR="${CACHE_DIR}" \ > SPEC_DIR="${SPEC_DIR}" \ > EXT_DIR="${EXT_DIR}" \ >+ PLUGINS_DIR="${PLUGINS_DIR}" \ > PORT="${PORTNAME}-${PORTVERSION}" \ > GEM_NAME="${GEM_NAME}" \ > GEM_LIB_DIR="${GEM_LIB_DIR}" \ >@@ -111,6 +113,7 @@ do-install: > ${FIND} ${STAGEDIR}${PREFIX}/${GEM_LIB_DIR}/ext -type d -empty -delete 2> /dev/null || ${TRUE} > ${RM} -r ${STAGEDIR}${PREFIX}/${CACHE_DIR} 2> /dev/null || ${TRUE} > ${RMDIR} ${STAGEDIR}${PREFIX}/${EXT_DIR} 2> /dev/null || ${TRUE} >+ ${RMDIR} ${STAGEDIR}${PREFIX}/${PLUGINS_DIR} 2> /dev/null || ${TRUE} > .if !${PORT_OPTIONS:MDOCS} > -@${RMDIR} ${STAGEDIR}${PREFIX}/${DOC_DIR} > .endif >@@ -130,6 +133,10 @@ gem-autoplist: > ${FIND} -ds ${STAGEDIR}${PREFIX}/${EXT_DIR} -type f -print | ${SED} -E -e \ > 's,^${STAGEDIR}${PREFIX}/?,,' >> ${TMPPLIST} ; \ > fi >+ @if [ -d ${STAGEDIR}${PREFIX}/${PLUGINS_DIR} ]; then \ >+ ${FIND} -ds ${STAGEDIR}${PREFIX}/${PLUGINS_DIR} -type f -print | ${SED} -E -e \ >+ 's,^${STAGEDIR}${PREFIX}/?,,' >> ${TMPPLIST} ; \ >+ fi > .endif > > .endif >diff --git devel/ruby-gems/Makefile devel/ruby-gems/Makefile >index 8f6eceea3a04..dc30f64b5969 100644 >--- devel/ruby-gems/Makefile >+++ devel/ruby-gems/Makefile >@@ -1,7 +1,7 @@ > # Created by: Alexander Novitsky <alecn2002@yandex.ru> > > PORTNAME= gems >-PORTVERSION= 3.0.8 >+PORTVERSION= 3.2.29 > CATEGORIES= devel ruby > MASTER_SITES= https://rubygems.org/rubygems/ > PKGNAMEPREFIX= ${RUBY_PKGNAMEPREFIX} >@@ -16,15 +16,20 @@ LICENSE_COMB= dual > LICENSE_FILE_MIT= ${WRKSRC}/MIT.txt > LICENSE_FILE_RUBY= ${WRKSRC}/LICENSE.txt > >+RUN_DEPENDS= ca_root_nss>=0:security/ca_root_nss >+ > USES= cpe tar:tgz > USE_RUBY= yes > > GEMS_BASE_DIR= lib/ruby/gems/${RUBY_VER} >-GEMS_ENV= DONT_USE_BUNDLER_FOR_GEMDEPS=true GEM_HOME=${STAGEDIR}${PREFIX}/${GEMS_BASE_DIR} >+GEMS_ENV= GEM_HOME=${STAGEDIR}${PREFIX}/${GEMS_BASE_DIR} > NO_ARCH= yes > NO_BUILD= yes > RUBY_SETUP= setup.rb >-RUBY_SETUP_OPTIONS= --destdir=${STAGEDIR} --no-regenerate-binstubs >+RUBY_SETUP_OPTIONS= --destdir=${STAGEDIR} \ >+ --no-regenerate-binstubs \ >+ --no-regenerate-plugins \ >+ --format-executable > > CACHE_DIR= ${GEMS_BASE_DIR}/cache > DOC_DIR= ${GEMS_BASE_DIR}/doc >@@ -45,9 +50,14 @@ OPTIONS_DEFINE= DOCS > > DOCS_VARS_OFF= RUBY_SETUP_OPTIONS+="--no-ri --no-rdoc" > >+post-extract: >+ ${RM} -r ${WRKSRC}/bundler >+ ${RM} -r ${WRKSRC}/lib/rubygems/ssl_certs >+ > do-install: > ${MKDIR} ${STAGEDIR}${PREFIX}/${GEMS_BASE_DIR} > ${MKDIR} ${STAGEDIR}${PREFIX}/${GEMS_BASE_DIR}/build_info >+ ${MKDIR} ${STAGEDIR}${PREFIX}/${GEMS_BASE_DIR}/plugins > ${MKDIR} ${STAGEDIR}${PREFIX}/${CACHE_DIR} > ${MKDIR} ${STAGEDIR}${PREFIX}/${DOC_DIR} > ${MKDIR} ${STAGEDIR}${PREFIX}/${EXT_DIR} >diff --git devel/ruby-gems/distinfo devel/ruby-gems/distinfo >index b39eec5b0356..4072afbc2275 100644 >--- devel/ruby-gems/distinfo >+++ devel/ruby-gems/distinfo >@@ -1,3 +1,3 @@ >-TIMESTAMP = 1602602939 >-SHA256 (ruby/rubygems-3.0.8.tgz) = d9d3fa3f6fed192f408e551617f64cc615024edc70828b45edf88b0591987263 >-SIZE (ruby/rubygems-3.0.8.tgz) = 888058 >+TIMESTAMP = 1633989475 >+SHA256 (ruby/rubygems-3.2.29.tgz) = 878ed074fab60e148401dd8772c4e993d8cd44eadd565e1ce20c91d45eec4850 >+SIZE (ruby/rubygems-3.2.29.tgz) = 1238459 >diff --git devel/ruby-gems/files/patch-bundler-remove.patch devel/ruby-gems/files/patch-bundler-remove.patch >new file mode 100644 >index 000000000000..cc0c271578b8 >--- /dev/null >+++ devel/ruby-gems/files/patch-bundler-remove.patch >@@ -0,0 +1,42 @@ >+commit b110d12e9c3bd2d153886681ff42c53c59ecd12d >+Author: Thibault Jouan <tj@a13.fr> >+AuthorDate: Mon Oct 11 23:54:27 2021 +0000 >+Commit: Thibault Jouan <tj@a13.fr> >+CommitDate: Wed Oct 13 11:49:25 2021 +0000 >+ >+ Prevent bundler installation >+ >+ Since RubyGems 3.1 the `setup' command also installs bundler and the >+ `USE_BUNDLER_FOR_GEMDEPS' environment variable has been removed. >+ >+ We have to manually patch this command to remove bundler installation. >+ >+diff --git lib/rubygems/commands/setup_command.rb lib/rubygems/commands/setup_command.rb >+index 2f7f29575..8fef1c539 100644 >+--- lib/rubygems/commands/setup_command.rb >++++ lib/rubygems/commands/setup_command.rb >+@@ -180,8 +180,6 @@ def execute >+ # Can be removed one we drop support for bundler 2.2.3 (the last version installing man files to man_dir) >+ remove_old_man_files man_dir if man_dir && File.exist?(man_dir) >+ >+- install_default_bundler_gem bin_dir >+- >+ if mode = options[:dir_mode] >+ @mkdirs.uniq! >+ File.chmod(mode, @mkdirs) >+@@ -311,7 +309,6 @@ def shebang >+ >+ def install_lib(lib_dir) >+ libs = { 'RubyGems' => 'lib' } >+- libs['Bundler'] = 'bundler/lib' >+ libs.each do |tool, path| >+ say "Installing #{tool}" if @verbose >+ >+@@ -520,7 +517,6 @@ def remove_old_bin_files(bin_dir) >+ >+ def remove_old_lib_files(lib_dir) >+ lib_dirs = { File.join(lib_dir, 'rubygems') => 'lib/rubygems' } >+- lib_dirs[File.join(lib_dir, 'bundler')] = 'bundler/lib/bundler' >+ lib_dirs.each do |old_lib_dir, new_lib_dir| >+ lib_files = files_in(new_lib_dir) >+ >diff --git devel/ruby-gems/pkg-plist devel/ruby-gems/pkg-plist >index 3e04be24e353..d569fed64677 100644 >--- devel/ruby-gems/pkg-plist >+++ devel/ruby-gems/pkg-plist >@@ -46,6 +46,7 @@ bin/gem%%RUBY_SUFFIX%% > %%RUBY_SITELIBDIR%%/rubygems/core_ext/kernel_gem.rb > %%RUBY_SITELIBDIR%%/rubygems/core_ext/kernel_require.rb > %%RUBY_SITELIBDIR%%/rubygems/core_ext/kernel_warn.rb >+%%RUBY_SITELIBDIR%%/rubygems/core_ext/tcpsocket_init.rb > %%RUBY_SITELIBDIR%%/rubygems/defaults.rb > %%RUBY_SITELIBDIR%%/rubygems/dependency.rb > %%RUBY_SITELIBDIR%%/rubygems/dependency_installer.rb >@@ -68,10 +69,11 @@ bin/gem%%RUBY_SUFFIX%% > %%RUBY_SITELIBDIR%%/rubygems/install_message.rb > %%RUBY_SITELIBDIR%%/rubygems/install_update_options.rb > %%RUBY_SITELIBDIR%%/rubygems/installer.rb >-%%RUBY_SITELIBDIR%%/rubygems/installer_test_case.rb >+%%RUBY_SITELIBDIR%%/rubygems/installer_uninstaller_utils.rb > %%RUBY_SITELIBDIR%%/rubygems/local_remote_options.rb > %%RUBY_SITELIBDIR%%/rubygems/mock_gem_ui.rb > %%RUBY_SITELIBDIR%%/rubygems/name_tuple.rb >+%%RUBY_SITELIBDIR%%/rubygems/openssl.rb > %%RUBY_SITELIBDIR%%/rubygems/package.rb > %%RUBY_SITELIBDIR%%/rubygems/package/digest_io.rb > %%RUBY_SITELIBDIR%%/rubygems/package/file_source.rb >@@ -81,13 +83,13 @@ bin/gem%%RUBY_SUFFIX%% > %%RUBY_SITELIBDIR%%/rubygems/package/tar_header.rb > %%RUBY_SITELIBDIR%%/rubygems/package/tar_reader.rb > %%RUBY_SITELIBDIR%%/rubygems/package/tar_reader/entry.rb >-%%RUBY_SITELIBDIR%%/rubygems/package/tar_test_case.rb > %%RUBY_SITELIBDIR%%/rubygems/package/tar_writer.rb > %%RUBY_SITELIBDIR%%/rubygems/package_task.rb > %%RUBY_SITELIBDIR%%/rubygems/path_support.rb > %%RUBY_SITELIBDIR%%/rubygems/platform.rb > %%RUBY_SITELIBDIR%%/rubygems/psych_additions.rb > %%RUBY_SITELIBDIR%%/rubygems/psych_tree.rb >+%%RUBY_SITELIBDIR%%/rubygems/query_utils.rb > %%RUBY_SITELIBDIR%%/rubygems/rdoc.rb > %%RUBY_SITELIBDIR%%/rubygems/remote_fetcher.rb > %%RUBY_SITELIBDIR%%/rubygems/request.rb >@@ -103,6 +105,7 @@ bin/gem%%RUBY_SUFFIX%% > %%RUBY_SITELIBDIR%%/rubygems/resolver.rb > %%RUBY_SITELIBDIR%%/rubygems/resolver/activation_request.rb > %%RUBY_SITELIBDIR%%/rubygems/resolver/api_set.rb >+%%RUBY_SITELIBDIR%%/rubygems/resolver/api_set/gem_parser.rb > %%RUBY_SITELIBDIR%%/rubygems/resolver/api_specification.rb > %%RUBY_SITELIBDIR%%/rubygems/resolver/best_set.rb > %%RUBY_SITELIBDIR%%/rubygems/resolver/composed_set.rb >@@ -164,20 +167,13 @@ bin/gem%%RUBY_SUFFIX%% > %%RUBY_SITELIBDIR%%/rubygems/source/specific_file.rb > %%RUBY_SITELIBDIR%%/rubygems/source/vendor.rb > %%RUBY_SITELIBDIR%%/rubygems/source_list.rb >-%%RUBY_SITELIBDIR%%/rubygems/source_local.rb >-%%RUBY_SITELIBDIR%%/rubygems/source_specific_file.rb > %%RUBY_SITELIBDIR%%/rubygems/spec_fetcher.rb > %%RUBY_SITELIBDIR%%/rubygems/specification.rb > %%RUBY_SITELIBDIR%%/rubygems/specification_policy.rb >-%%RUBY_SITELIBDIR%%/rubygems/ssl_certs/index.rubygems.org/GlobalSignRootCA.pem >-%%RUBY_SITELIBDIR%%/rubygems/ssl_certs/rubygems.global.ssl.fastly.net/DigiCertHighAssuranceEVRootCA.pem >-%%RUBY_SITELIBDIR%%/rubygems/ssl_certs/rubygems.org/AddTrustExternalCARoot.pem > %%RUBY_SITELIBDIR%%/rubygems/stub_specification.rb >-%%RUBY_SITELIBDIR%%/rubygems/syck_hack.rb >-%%RUBY_SITELIBDIR%%/rubygems/test_case.rb >-%%RUBY_SITELIBDIR%%/rubygems/test_utilities.rb > %%RUBY_SITELIBDIR%%/rubygems/text.rb > %%RUBY_SITELIBDIR%%/rubygems/uninstaller.rb >+%%RUBY_SITELIBDIR%%/rubygems/uri.rb > %%RUBY_SITELIBDIR%%/rubygems/uri_formatter.rb > %%RUBY_SITELIBDIR%%/rubygems/user_interaction.rb > %%RUBY_SITELIBDIR%%/rubygems/util.rb >@@ -186,8 +182,8 @@ bin/gem%%RUBY_SUFFIX%% > %%RUBY_SITELIBDIR%%/rubygems/validator.rb > %%RUBY_SITELIBDIR%%/rubygems/version.rb > %%RUBY_SITELIBDIR%%/rubygems/version_option.rb >-%%RUBY_SITELIBDIR%%/ubygems.rb > @dir lib/ruby/gems/%%RUBY_VER%%/build_info >+@dir lib/ruby/gems/%%RUBY_VER%%/plugins > @dir %%CACHE_DIR%% > @dir %%DOC_DIR%% > @dir %%EXT_DIR%%
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 258108
:
227498
|
228469
|
228480
|
228666
|
228667
|
228695
|
229025
|
229026
|
229073
|
229114
|
229210
|
229958
|
229977
|
230305
|
231355
|
231387
|
231896
|
231942