ruby-changes:71572
From: Nobuyoshi <ko1@a...>
Date: Thu, 31 Mar 2022 10:52:58 +0900 (JST)
Subject: [ruby-changes:71572] abfd859b13 (master): Remove github and git related files from extracted bundled gems
https://git.ruby-lang.org/ruby.git/commit/?id=abfd859b13 From abfd859b139545110e1fcdd8e99575d5e0bfb4e4 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Thu, 31 Mar 2022 09:49:41 +0900 Subject: Remove github and git related files from extracted bundled gems --- common.mk | 3 ++- defs/gmake.mk | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/common.mk b/common.mk index 0ea274179e..9068a298a6 100644 --- a/common.mk +++ b/common.mk @@ -1358,12 +1358,13 @@ update-gems$(gnumake:yes=-nongnumake): PHONY https://github.com/ruby/ruby/blob/trunk/common.mk#L1358 extract-gems$(gnumake:yes=-nongnumake): PHONY $(ECHO) Extracting bundled gem files... $(Q) $(RUNRUBY) -C "$(srcdir)" \ - -Itool -rgem-unpack -answ \ + -Itool -rfileutils -rgem-unpack -answ \ -e 'BEGIN {FileUtils.mkdir_p(d = ".bundle/gems")}' \ -e 'gem, ver = *$$F' \ -e 'next if !ver or /^#/=~gem' \ -e 'g = "#{gem}-#{ver}"' \ -e 'File.directory?("#{d}/#{g}") or Gem.unpack("gems/#{g}.gem", d)' \ + -e 'FileUtils.rm_rf("#{d}/#{g}/.github")' \ gems/bundled_gems update-bundled_gems: PHONY diff --git a/defs/gmake.mk b/defs/gmake.mk index c32fee0a6c..a625379a68 100644 --- a/defs/gmake.mk +++ b/defs/gmake.mk @@ -296,6 +296,7 @@ extract-gems: | $(patsubst %,.bundle/gems/%,$(bundled-gems)) https://github.com/ruby/ruby/blob/trunk/defs/gmake.mk#L296 $(Q) $(BASERUBY) -C "$(srcdir)" \ -Itool -rgem-unpack \ -e 'Gem.unpack("gems/$(@F).gem", ".bundle/gems")' + $(RMALL) "$(srcdir)/$(@:.gem=)/".git* $(srcdir)/.bundle/gems: $(MAKEDIRS) $@ -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/