From 8065dd8456913457a0114ddb2b4bd4842847b2a3 Mon Sep 17 00:00:00 2001 From: Jackie Huang Date: Mon, 11 Aug 2014 22:26:14 -0400 Subject: ruby: fix race conditions at install-ext * lib/mkmf.rb (create_makefile): fix race conditions at install-ext. target files need to depend on destination directory timestamp files, not phony trgets. Signed-off-by: Jackie Huang Signed-off-by: Martin Jansa Acked-by: Cliff Brake --- ...kmf.rb-fix-race-conditions-at-install-ext.patch | 31 ++++++++++++++++++++++ meta-ruby/recipes-devtools/ruby/ruby_1.9.3-p429.bb | 1 + 2 files changed, 32 insertions(+) create mode 100644 meta-ruby/recipes-devtools/ruby/ruby/ruby-mkmf.rb-fix-race-conditions-at-install-ext.patch diff --git a/meta-ruby/recipes-devtools/ruby/ruby/ruby-mkmf.rb-fix-race-conditions-at-install-ext.patch b/meta-ruby/recipes-devtools/ruby/ruby/ruby-mkmf.rb-fix-race-conditions-at-install-ext.patch new file mode 100644 index 0000000000..5ac5d54a3f --- /dev/null +++ b/meta-ruby/recipes-devtools/ruby/ruby/ruby-mkmf.rb-fix-race-conditions-at-install-ext.patch @@ -0,0 +1,31 @@ +Subject: [PATCH] mkmf.rb: fix race conditions at install-ext + +Upstream-Status: backport + +* lib/mkmf.rb (create_makefile): fix race conditions at install-ext. + target files need to depend on destination directory timestamp + files, not phony trgets. + +git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e + +Signed-off-by: Jackie Huang +--- + lib/mkmf.rb | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/mkmf.rb b/lib/mkmf.rb +index 556684c..a277354 100644 +--- a/lib/mkmf.rb ++++ b/lib/mkmf.rb +@@ -2055,7 +2055,7 @@ static: $(STATIC_LIB)#{$extout ? " install-rb" : ""} + for f in files + dest = "#{dir}/#{File.basename(f)}" + mfile.print("install-rb#{sfx}: #{dest}\n") +- mfile.print("#{dest}: #{f}\n") ++ mfile.print("#{dest}: #{f} #{timestamp_file(dir)}\n") + mfile.print("\t$(Q) $(#{$extout ? 'COPY' : 'INSTALL_DATA'}) #{f} $(@D#{sep})\n") + if defined?($installed_list) and !$extout + mfile.print("\t@echo #{dest}>>$(INSTALLED_LIST)\n") +-- +2.0.0 + diff --git a/meta-ruby/recipes-devtools/ruby/ruby_1.9.3-p429.bb b/meta-ruby/recipes-devtools/ruby/ruby_1.9.3-p429.bb index 7610602dc6..a57c89530f 100644 --- a/meta-ruby/recipes-devtools/ruby/ruby_1.9.3-p429.bb +++ b/meta-ruby/recipes-devtools/ruby/ruby_1.9.3-p429.bb @@ -12,6 +12,7 @@ SRC_URI += "\ file://ruby-1.9.3-mkmf-verbose.patch \ file://ruby-1.9.3-install-cross.patch \ file://remove-the-dependency-on-dir.patch \ + file://ruby-mkmf.rb-fix-race-conditions-at-install-ext.patch \ " SRC_URI[md5sum] = "993c72f7f805a9eb453f90b0b7fe0d2b" SRC_URI[sha256sum] = "d192d1afc46a7ef27b9d0a3c7a67b509048984db2c38907aa82641bdf980acf4" -- cgit 1.2.3-korg