[ruby] Fix issues with wrong value of Rubygem's shebang introduced in r39267.

Vít Ondruch vondruch at fedoraproject.org
Fri Feb 22 20:56:09 UTC 2013


commit 12131c17275d4efc43fc83adf6c8dfd797f540d2
Author: Vít Ondruch <vondruch at redhat.com>
Date:   Fri Feb 22 21:54:38 2013 +0100

    Fix issues with wrong value of Rubygem's shebang introduced in r39267.

 ruby-2.0.0-revert-unexpand-exec-prefix.patch |   43 ++++++++++++++++++++++++++
 ruby.spec                                    |    9 +++++-
 2 files changed, 51 insertions(+), 1 deletions(-)
---
diff --git a/ruby-2.0.0-revert-unexpand-exec-prefix.patch b/ruby-2.0.0-revert-unexpand-exec-prefix.patch
new file mode 100644
index 0000000..2a38296
--- /dev/null
+++ b/ruby-2.0.0-revert-unexpand-exec-prefix.patch
@@ -0,0 +1,43 @@
+* Unmerged path ChangeLog
+diff --git a/configure.in b/configure.in
+index be7d4fe..2d511e5 100644
+--- a/configure.in
++++ b/configure.in
+@@ -2597,14 +2597,9 @@ AS_CASE(["$target_os"],
+ 
+ AC_SUBST(setup)
+ 
+-test x"$prefix" = xNONE && prefix=$ac_default_prefix
+-test x"${exec_prefix}" = xNONE && exec_prefix="$prefix"
+-pat=`echo "${exec_prefix}" | tr -c '\012' .`'\(.*\)'
+-for var in bindir libdir; do
+-    eval val='"$'$var'"'
+-    AS_CASE(["$val"], ["${exec_prefix}"*], [val='${exec_prefix}'"`expr \"$val\" : \"$pat\"`"])
+-    eval $var='"$val"'
+-done
++if test "$prefix" = NONE; then
++  prefix=$ac_default_prefix
++fi
+ 
+ BTESTRUBY='$(MINIRUBY)'
+ if test x"$cross_compiling" = xyes; then
+@@ -3244,9 +3239,6 @@ AS_CASE(["$target_os"],
+ 
+ shvar_to_cpp() {
+     local var="$1" val="$2"
+-    local exec_prefix_pat="`echo \"${exec_prefix}\" | sed 's/\\./\\\\./g'`"
+-    local arch_pat="`echo \"${arch}\" | sed 's/\\./\\\\./g'`"
+-    local sitearch_pat="`echo \"${sitearch}\" | sed 's/\\./\\\\./g'`"
+     val="`echo '"'"${val}"'"' |
+ 	sed \
+ 	    -e 's/\${\([[A-Z][A-Z_]]*\)}/"\1"/g' \
+@@ -3269,9 +3261,6 @@ shvar_to_cpp() {
+ 	    -e 's/\${rubyarchprefix}/"RUBY_ARCH_PREFIX_FOR(arch)"/g' \
+ 	    -e 's/\${rubysitearchprefix}/"RUBY_SITEARCH_PREFIX_FOR(arch)"/g' \
+ 	    -e 's/\${exec_prefix}/"RUBY_EXEC_PREFIX"/g' \
+-	    -e "s|${exec_prefix_pat}/|"'"RUBY_EXEC_PREFIX"/|g' \
+-	    -e "s|${arch_pat}|"'"arch"|g' \
+-	    -e "s|${sitearch_pat}|"'"sitearch"|g' \
+ 	    -e 's|^\"NONE/|RUBY_EXEC_PREFIX\"/|' \
+ 	    -e 's|^\"NONE\"|\"'"${prefix}"'\"|' \
+ 	    -e 's/^\"\"\(.\)/\1/;s/\(.\)\"\"$/\1/'
diff --git a/ruby.spec b/ruby.spec
index e1b8db0..b03f72d 100644
--- a/ruby.spec
+++ b/ruby.spec
@@ -26,7 +26,7 @@
 %endif
 
 
-%global release 1
+%global release 2
 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}}
 
 %global ruby_libdir %{_datadir}/%{name}
@@ -123,6 +123,9 @@ Patch13: rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.pat
 # This prevents issues, when ruby configuration specifies --with-ruby-version=''.
 # https://github.com/rubygems/rubygems/pull/455
 Patch14: rubygems-2.0.0-Fixes-for-empty-ruby-version.patch
+# Fixes issues with wrong value of Rubygem's shebang introduced in r39267.
+# https://bugs.ruby-lang.org/issues/7915
+Patch15: ruby-2.0.0-revert-unexpand-exec-prefix.patch
 
 Requires: %{name}-libs%{?_isa} = %{version}-%{release}
 Requires: ruby(rubygems) >= %{rubygems_version}
@@ -386,6 +389,7 @@ Tcl/Tk interface for the object-oriented scripting language Ruby.
 %patch12 -p1
 %patch13 -p1
 %patch14 -p1
+%patch15 -p1
 
 # Provide an example of usage of the tapset:
 cp -a %{SOURCE3} .
@@ -850,6 +854,9 @@ make check TESTS="-v $DISABLE_TESTS"
 %{ruby_libdir}/tkextlib
 
 %changelog
+* Fri Feb 22 2013 Vít Ondruch <vondruch at redhat.com> - 2.0.0.0-0.2.r39387
+- Fix issues with wrong value of Rubygem's shebang introduced in r39267.
+
 * Fri Feb 22 2013 Vít Ondruch <vondruch at redhat.com> - 2.0.0.0-0.1.r39387
 - Upgrade to Ruby 2.0.0 (r39387).
 - Introduce %%gem_install macro.


More information about the scm-commits mailing list