Hello community,

here is the log from the commit of package ruby-common for openSUSE:Factory 
checked in at 2015-05-07 08:28:03
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ruby-common (Old)
 and      /work/SRC/openSUSE:Factory/.ruby-common.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ruby-common"

Changes:
--------
--- /work/SRC/openSUSE:Factory/ruby-common/ruby-common.changes  2015-01-23 
15:46:07.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.ruby-common.new/ruby-common.changes     
2015-05-07 08:28:04.000000000 +0200
@@ -1,0 +2,81 @@
+Sat May  2 11:55:31 UTC 2015 - [email protected]
+
+- Fix patching of the shebang line
+
+-------------------------------------------------------------------
+Thu Apr 16 21:45:29 UTC 2015 - [email protected]
+
+- The script sometimes returned from gem install already although
+  the install wasn't finished yet. This broke e.g. the binary
+  rename part.
+
+-------------------------------------------------------------------
+Fri Mar 13 18:20:33 UTC 2015 - [email protected]
+
+- Fail early if gem install fails
+  This avoids confusing error messages at the end of the build.
+
+-------------------------------------------------------------------
+Fri Mar 13 14:56:55 UTC 2015 - [email protected]
+
+- More fixes for ruby 1.8
+
+-------------------------------------------------------------------
+Fri Mar 13 14:06:32 UTC 2015 - [email protected]
+
+- Ruby 1.8 insists on the () for the parameter
+
+-------------------------------------------------------------------
+Fri Mar 13 13:55:20 UTC 2015 - [email protected]
+
+- Cleaner solution for the extensions doc dir
+  The other solution was also failing on 1.8
+
+-------------------------------------------------------------------
+Fri Mar 13 13:28:52 UTC 2015 - [email protected]
+
+- Forgot another option for forwarding
+
+-------------------------------------------------------------------
+Fri Mar 13 09:19:52 UTC 2015 - [email protected]
+
+- Do not overwrite options.otheropts
+
+-------------------------------------------------------------------
+Fri Mar 13 02:48:50 UTC 2015 - [email protected]
+
+- Fixed forwarding of options to gem install
+
+-------------------------------------------------------------------
+Fri Mar 13 02:26:12 UTC 2015 - [email protected]
+
+- Only use the extensions doc dir on MRI 2.1.x
+
+-------------------------------------------------------------------
+Fri Mar 13 01:58:02 UTC 2015 - [email protected]
+
+- Fix the ruby suffix for distributions before 13.2
+- Do not fail with --gem-binary
+
+-------------------------------------------------------------------
+Fri Mar 13 01:28:08 UTC 2015 - [email protected]
+
+- switch to ruby version of gem_install.sh
+- added ruby-find-versioned to make it easier to find versioned
+  binaries.
+  - all for loops in the shell scripts and macros are now using
+    this script
+
+-------------------------------------------------------------------
+Thu Mar 12 16:17:20 UTC 2015 - [email protected]
+
+- call ruby with -x from shell wrappers otherwise we run into an
+  endless loop
+
+-------------------------------------------------------------------
+Thu Jan 15 10:59:59 UTC 2015 - [email protected]
+
+- rubygemsdeps.rb: add shell-launcher to avoid dependency on
+  a fixed ruby version
+
+-------------------------------------------------------------------

New:
----
  ruby-find-versioned

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ruby-common.spec ++++++
--- /var/tmp/diff_new_pack.IfFIdi/_old  2015-05-07 08:28:05.000000000 +0200
+++ /var/tmp/diff_new_pack.IfFIdi/_new  2015-05-07 08:28:05.000000000 +0200
@@ -37,9 +37,11 @@
 Source9:        ruby.rpm-macros
 Source10:       gem_packages.sh
 Source11:       opensuse.spec.erb
+Source12:       ruby-find-versioned
 Summary:        Collection of scripts and macros for ruby packaging
 License:        MIT
 Group:          Development/Languages/Ruby
+Url:            https://github.com/openSUSE/ruby-packaging/
 Requires:       /usr/bin/getopt
 #Requires:       ruby-devel
 Requires:       rubygem(gem2rpm)
@@ -74,6 +76,7 @@
 install -D -m 0755 %{S:7}  %{buildroot}/usr/lib/rpm/generate_buildrequires.sh
 install -D -m 0755 %{S:10} %{buildroot}/usr/lib/rpm/gem_packages.sh
 install -D -m 0644 %{S:11} %{buildroot}/usr/lib/rpm/gem_packages.template
+install -D -m 0755 %{S:12} %{buildroot}%{_bindir}/ruby-find-versioned
 
 %files
 %defattr(-,root,root)
@@ -88,5 +91,6 @@
 /usr/lib/rpm/gem_build_cleanup.sh
 /usr/lib/rpm/generate_buildrequires.sh
 /usr/lib/rpm/gem_packages.*
+%{_bindir}/ruby-find-versioned
 
 %changelog

++++++ gem_install.sh ++++++
--- /var/tmp/diff_new_pack.IfFIdi/_old  2015-05-07 08:28:05.000000000 +0200
+++ /var/tmp/diff_new_pack.IfFIdi/_new  2015-05-07 08:28:05.000000000 +0200
@@ -1,129 +1,249 @@
-#! /bin/bash
-
-set -e
+#!/bin/sh
+# vim: set sw=2 sts=2 et tw=80 ft=ruby:
+=begin &>/dev/null
+# workaround for rubinius bug
+# https://github.com/rubinius/rubinius/issues/2732
+export LC_ALL="en_US.UTF-8"
+export LANG="en_US.UTF-8"
 shopt -s nullglob
-
-# options may be followed by one colon to indicate they have a required 
argument
-if ! options=$(getopt -o dEf -l 
ignore-dependencies,force,no-rdoc,rdoc,no-ri,ri,env-shebang,no-env-shebang,symlink-binaries,default-gem:,build-root:,doc-files:,gem-name:,gem-version:,gem-suffix:,gem-binary:
 -- "$@")
-then
-    # something went wrong, getopt will put out an error message for us
-    exit 1
-fi
-
-eval set -- "$options"
-
-gem_binary="/usr/bin/gem.* /usr/bin/gem[0-9].[0-9]"
-defaultgem=
-gemfile=
-otheropts=
-buildroot=
-docfiles=
-gemname=
-gemversion=
-gemsuffix=
-ua_dir="/etc/alternatives"
-docdir="/usr/share/doc/packages"
-# once we start fixing packages set this to true
-symlinkbinaries="false"
-
-while [ $# -gt 0 ]
-do
-    case $1 in
-    --default-gem) defaultgem=$2 ; shift;;
-    --gem-binary) echo "Ignored --gem-binary option" >&2 ; shift;;
-    --doc-files) docfiles="$2" ; shift;;
-    --gem-name) gemname="$2" ; shift;;
-    --gem-version) gemversion="$2" ; shift;;
-    --gem-suffix) gemsuffix="$2" ; shift;;
-    --symlink-binaries) symlinkbinaries="true" ;;
-    --build-root) otheropts="$otheropts $1=$2"; buildroot=$2; shift;;
-    (--) ;;
-    (-*) otheropts="$otheropts $1";;
-    (*) gemfile=$1; otheropts="$otheropts $1"; break;;
-    esac
-    shift
+for ruby in $(/usr/bin/ruby-find-versioned) ; do
+  $ruby -x $0 "$@"
 done
-
-if [ "x$gemfile" = "x" ] ; then 
-  gemfile=$(find . -maxdepth 2 -type f -name "$defaultgem")
-  # if still empty, we pick the sources
-  if [ "x$gemfile" = "x" ] ; then
-    gemfile=$(find $RPM_SOURCE_DIR -name "$defaultgem")
-  fi
-  otheropts="$otheropts $gemfile"
-fi
-set -x
-
-mkdir -p "${RPM_BUILD_ROOT}${ua_dir}"
-mkdir -p "${RPM_BUILD_ROOT}$docdir"
-
-for gem in $gem_binary ; do
-  $gem install --verbose --local $otheropts
-  # get the ruby interpreter
-  ruby="${gem#/usr/bin/gem}"
-  if [[ $ruby == [0-9]* ]] ; then
-    destruby=".ruby$ruby"
+exit $?
+=end
+#!/usr/bin/ruby
+require 'rbconfig'
+require 'optparse'
+require 'optparse/time'
+require 'ostruct'
+require 'fileutils'
+require 'find'
+require 'tempfile'
+require 'logger'
+require 'rubygems'
+require 'rubygems/package'
+begin
+  require 'rubygems/format'
+rescue LoadError => ex
+end
+begin
+  require 'rbconfigpackagingsupport'
+rescue LoadError => ex
+end
+
+options=OpenStruct.new
+options.defaultgem=nil
+options.gemfile=nil
+options.otheropts=nil
+options.buildroot=nil
+options.docfiles=[]
+options.gemname=nil
+options.gemversion=nil
+options.gemsuffix=nil
+options.otheropts=[]
+options.ua_dir='/etc/alternatives'
+options.docdir='/usr/share/doc/packages'
+# once we start fixing packages set this to true
+options.symlinkbinaries=false
+options.verbose = false
+options.rpmsourcedir = ENV['RPM_SOURCE_DIR'] || '/home/abuild/rpmbuild/SOURCES'
+options.rpmbuildroot = ENV['RPM_BUILD_ROOT'] || 
'/home/abuild/rpmbuild/BUILDROOT/just-testing'
+
+GILogger = Logger.new(STDERR)
+GILogger.level=Logger::DEBUG
+def bail_out(msg)
+  GILogger.error(msg)
+  exit 1
+end
+
+def patchfile(fname, needle, replace)
+    tmpdir = File.dirname(fname)
+    tmp = Tempfile.new('snapshot', tmpdir)
+    begin
+      stat = File.stat(fname)
+      tmp.chmod(stat.mode)
+      fc = File.read(fname)
+      # fc.gsub!(/^(#!\s*.*?)(\s+-.*)?$/, "#!#{ruby} \2")
+      fc.gsub!(needle, replace)
+      tmp.write(fc)
+      tmp.close
+      File.rename(tmp.path, fname)
+    rescue ArgumentError => ex
+      GILogger.error "Exception while patching '#{fname}'. (#{ex}) Skipping 
..."
+    ensure
+      tmp.close
+    end
+end
+
+opt_parser = OptionParser.new do |opts|
+  opts.banner = "Usage: gem_install.rb [options]"
+
+  opts.separator ""
+  opts.separator "Specific options:"
+
+  opts.on('--config [FILENAME]', 'path to gem2rpm.yml') do |name|
+    options.config = name
+  end
+
+  opts.on('--default-gem [FILENAME]', 'Which filename to use when we dont find 
another gem file.') do |fname|
+    options.defaultgem=fname
+  end
+  opts.on('--gem-binary [PATH]', 'Path to gem. By default we loop over all gem 
binaries we find') do |fname|
+    GILogger.warn("The --gem-binary option is deprecated.")
+  end
+  opts.on('--doc-files [FILES]', 'Whitespace separated list of documentation 
files we should link to /usr/share/doc/packages/<subpackage>') do |files|
+    options.docfiles = files.split(/\s+/)
+  end
+  opts.on('--gem-name [NAME]', 'Name of them gem') do |name|
+    options.gemname = name
+  end
+  opts.on('--gem-version [VERSION]', 'Version of them gem') do |version|
+    options.gemversion = version
+  end
+  opts.on('--gem-suffix [SUFFIX]', 'Suffix we should append to the subpackage 
names') do |suffix|
+    options.gemsuffix = suffix
+  end
+  opts.on('--build-root [BUILDROOT]', 'Path to rpm buildroot') do |buildroot|
+    options.buildroot = buildroot
+  end
+  # Boolean switches
+  opts.on('--[no-]symlink-binaries', 'Create all the version symlinks for the 
binaries') do |v|
+    options.symlinkbinaries = v
+  end
+  opts.on('-d', 'Forwarded to gem install') do |v|
+    options.otheropts << '-d'
+  end
+  opts.on('-f', 'Forwarded to gem install') do |v|
+    options.otheropts << '-f'
+  end
+  opts.on('-E', 'Forwarded to gem install') do |v|
+    options.otheropts << '-E'
+  end
+  opts.on('--no-ri', 'Forwarded to gem install') do |v|
+    options.otheropts << '--no-ri'
+  end
+  opts.on('--no-rdoc', 'Forwarded to gem install') do |v|
+    options.otheropts << '--no-rdoc'
+  end
+  opts.separator ""
+  opts.separator "Common options:"
+  opts.on("-v", "--[no-]verbose", "Run verbosely") do |v|
+    options.verbose = v
+  end
+  opts.on_tail('-h', '--help', 'Show this message') do
+    puts opts
+    exit
+  end
+end
+
+options.otheropts+=opt_parser.parse!(ARGV)
+GILogger.info "unhandled options: #{options.otheropts.inspect}"
+if options.gemfile.nil?
+  # we are in /home/abuild/rpmbuild/BUILD/
+  # search for rebuild gem files
+  gemlist = Dir['*/*.gem', '*/*/.gem', "#{options.rpmsourcedir}/*.gem"]
+  if gemlist.empty?
+     bail_out("Can not find any gem file")
+  end
+  options.gemfile = gemlist.first
+  GILogger.info "Found gem #{options.gemfile}"
+end
+
+package   = Gem::Package.new(options.gemfile) rescue 
Gem::Format.from_file_by_path(options.gemfile)
+spec      = package.spec
+gemdir    = File.join(Gem.dir, 'gems', 
"#{options.gemname}-#{options.gemversion}")
+# TODO: ruby = 
"#{File.join(RbConfig::CONFIG['bindir'],RbConfig::CONFIG['ruby_install_name'])}mo"
+ruby      = Gem.ruby
+gembinary = Gem.default_exec_format % "/usr/bin/gem"
+
+rubysuffix = Gem.default_exec_format % ''
+case rubysuffix
+  when /\A\d+.\d+\z/
+    options.rubysuffix = ".ruby#{rubysuffix}"
+    options.rubyprefix = "ruby#{rubysuffix}"
+  when /\A\.(.*)\z/
+    options.rubysuffix = ".#{$1}"
+    options.rubyprefix = $1
+  when ''
+    # TODO: case seems broken
+    rb_ver = RbConfig::CONFIG['ruby_version'].gsub(/^(\d+\.\d+).*$/, "\1")
+    options.rubysuffix = ".ruby#{rb_ver}"
+    options.rubyprefix = "ruby#{rb_ver}"
   else
-    destruby="$ruby"
-  fi
-  rpmname="${destruby#.}-rubygem-${gemname}${gemsuffix:+$gemsuffix}"
-  if test -d $RPM_BUILD_ROOT/usr/bin; then
-    pushd $RPM_BUILD_ROOT/usr/bin
-    if [ "x$symlinkbinaries" = "xtrue" ] ; then
-      for i in *$ruby ; do
-        unversioned="${i%$ruby}"
-        fullyversioned="$unversioned$destruby-${gemversion}"
-        rubyversioned="$unversioned$destruby"
-        gemversioned="$unversioned-$gemversion"
-        mv -v ${i} $fullyversioned
-        perl -p -i -e "s/>= 0/= $gemversion/" $fullyversioned
-        if [ ! -L ${RPM_BUILD_ROOT}${ua_dir}/${unversioned} ] ; then
-          ln -sv ${unversioned} ${RPM_BUILD_ROOT}${ua_dir}/${unversioned}
-        fi
-        # unversioned
-        if [ ! -L $unversioned ] ; then
-          ln -sv ${ua_dir}/${unversioned} $unversioned
-        fi
-
-        # ruby versioned
-        if [ ! -L ${RPM_BUILD_ROOT}${ua_dir}/$rubyversioned ] ; then
-          ln -sv ${rubyversioned} ${RPM_BUILD_ROOT}${ua_dir}/$rubyversioned
-        fi
-        if [ ! -L $rubyversioned ] ; then
-          ln -sv ${ua_dir}/${rubyversioned} $rubyversioned
-        fi
-        # gem versioned
-        if [ ! -L ${RPM_BUILD_ROOT}${ua_dir}/$gemversioned ] ; then
-          ln -sv $gemversioned ${RPM_BUILD_ROOT}${ua_dir}/$gemversioned
-        fi
-        if [ ! -L $gemversioned ] ; then
-          ln -sv ${ua_dir}/$gemversioned $gemversioned
-        fi
-      done ;
-    else
-      for i in *$ruby ; do
-        # lets undo the format-executable to avoid breaking more spec files
-        unversioned="${i%$ruby}"
-        mv -v $i $unversioned 
-      done
-    fi
-    popd
-  fi
-  gemdir="$($gem env gemdir)"
-  if [ "x$docfiles" != "x" ] ; then
-    mkdir -p "${RPM_BUILD_ROOT}${docdir}/${rpmname}"
-    for i in $docfiles ; do
-      ln -sfv "${gemdir}/gems/${gemname}-${gemversion}/${i}" 
"${RPM_BUILD_ROOT}${docdir}/${rpmname}/${i}"
-    done
-  fi
-  if [ -d "$buildroot" ]; then
-    find ${buildroot}${gemdir} -type f -perm /u+x | while read file; do
-      # TODO: scripts in ruby/1.9.1 should call ruby1.9 for consistency
-      perl -p -i -e "s,^#!/usr/bin/env ruby,#!/usr/bin/ruby,; s,^#! *[^ 
]*/ruby\S*,#!/usr/bin/ruby$ruby," "$file"
-    done
-    # some windows made gems are broken
-    find $buildroot -ls
-    chmod -R u+w $buildroot
-    chmod -R o-w $buildroot
-  fi
-done
+    bail_out "unknown binary naming scheme: #{rubysuffix}"
+end
+GILogger.info "Using prefix #{options.rubyprefix}"
+GILogger.info "Using suffix #{options.rubysuffix}"
+
+cmdline = [gembinary, 'install', '--verbose', '--local', '--build-root', 
options.buildroot]
+cmdline += options.otheropts
+cmdline << options.gemfile
+GILogger.info "install cmdline: #{cmdline.inspect}"
+if Process.respond_to? :spawn
+  pid = Process.spawn(*cmdline)
+  pid, status = Process.wait2(pid)
+else
+  system(*cmdline)
+  status = $?
+end
+exit status.exitstatus unless 0 == status.exitstatus
+
+rpmname="#{options.rubyprefix}-rubygem-#{options.gemname}#{options.gemsuffix}"
+GILogger.info "RPM name: #{rpmname}"
+pwd = Dir.pwd
+bindir = File.join(options.rpmbuildroot, Gem.bindir)
+GILogger.info "bindir: #{bindir}"
+if options.symlinkbinaries && File.exists?(bindir)
+  br_ua_dir = File.join(options.rpmbuildroot, options.ua_dir)
+  GILogger.info "Creating upate-alternatives dir: #{br_ua_dir}"
+  FileUtils.mkdir_p(br_ua_dir)
+  begin
+    Dir.chdir(bindir)
+    GILogger.info "executables: #{spec.executables.inspect}"
+    spec.executables.each do |unversioned|
+      default_path   = Gem.default_exec_format % unversioned
+      full_versioned = "#{unversioned}#{options.rubysuffix}-#{spec.version}"
+      ruby_versioned = "#{unversioned}#{options.rubysuffix}"
+      gem_versioned  = "#{unversioned}-#{spec.version}"
+      File.rename(default_path, full_versioned)
+      patchfile(full_versioned,  />= 0/, "= #{options.gemversion}")
+      # unversioned
+      [unversioned, ruby_versioned, gem_versioned].each do |linkname|
+        full_path = File.join(br_ua_dir, linkname)
+        ua_path   = File.join(options.ua_dir, linkname)
+        GILogger.info "Linking '#{linkname}' to '#{full_path}'"
+        File.symlink(linkname, full_path) unless File.symlink? full_path
+        GILogger.info "Linking '#{ua_path}' to '#{linkname}'"
+        File.symlink(ua_path, linkname) unless File.symlink? linkname
+      end
+    end
+  ensure
+    Dir.chdir(pwd)
+  end
+end
+
+# shebang line fix
+Find.find(File.join(options.buildroot, gemdir)) do |fname|
+  if File.file?(fname) && File.executable?(fname)
+    next if fname =~ /\.so$/
+    GILogger.info "Looking at #{fname}"
+    patchfile(fname, /^(#!\s*.*(?:rub|rbx).*?)(\s+-.*)?$/, "#!#{ruby} \\2")
+  else
+    next
+  end
+end
+
+unless options.docfiles.empty?
+  GILogger.info "Linking documentation"
+  docdir = File.join(options.rpmbuildroot, options.docdir, rpmname)
+  FileUtils.mkdir_p(docdir)
+
+  options.docfiles.each do |fname|
+    fullpath = File.join(gemdir, fname)
+    GILogger.info "- #{fullpath}"
+    File.symlink(fullpath, File.join(docdir,fname))
+  end
+end
+
+system("chmod -R u+w,go+rX,go-w #{options.rpmbuildroot}")
+#system("find #{options.rpmbuildroot} -ls")

++++++ gem_packages.sh ++++++
--- /var/tmp/diff_new_pack.IfFIdi/_old  2015-05-07 08:28:05.000000000 +0200
+++ /var/tmp/diff_new_pack.IfFIdi/_new  2015-05-07 08:28:05.000000000 +0200
@@ -56,11 +56,6 @@
 export LC_ALL="en_US.UTF-8"
 export LANG="en_US.UTF-8"
 set -x
-for ruby in /usr/bin/ruby.* /usr/bin/ruby[0-9].[0-9] ; do
-  ruby="${ruby#/usr/bin/ruby}"
-  if [[ $ruby == [0-9]* ]] ; then
-    ruby=".ruby$ruby"
-  fi
-  gemrpm="/usr/bin/gem2rpm${ruby}"
-  $gemrpm $otheropts
+for gr in $(/usr/bin/ruby-find-versioned gem2rpm) ; do
+  $gr $otheropts
 done

++++++ opensuse.spec.erb ++++++
--- /var/tmp/diff_new_pack.IfFIdi/_old  2015-05-07 08:28:05.000000000 +0200
+++ /var/tmp/diff_new_pack.IfFIdi/_new  2015-05-07 08:28:05.000000000 +0200
@@ -14,7 +14,8 @@
   end
 
   def self.get_extension_doc_dir(gem_spec)
-    if gem_spec.respond_to?(:extensions_dir) && RUBY_ENGINE != 'rbx'
+    return nil unless Gem.ruby_engine == 'ruby' && Gem::Requirement.new("~> 
2.1.0").satisfied_by?(Gem.ruby_version)
+    if gem_spec.respond_to?(:extensions_dir)
       rp = gem_spec.extensions_dir.rpartition(gem_spec.base_dir)
       return File.join(rp[1], 'doc', rp[2]) 
     end
@@ -120,8 +121,20 @@
      %w(test spec).each { |framework|
        test_frameworks[framework] = 1 if path.index(framework + "/") == 0
      }
-     %w(changes copying history legal license mit-license changelog 
readme).each { |file|
-      bpath = path.downcase.gsub(%r{\.rdoc$}, '').gsub(%r{\.txt$}, 
'').gsub(%r{\.md$}, '')
+     %w(changes
+        copying
+        history
+        legal
+        licence
+        license
+        license-mit
+        mit-license
+        changelog
+        news
+        release_notes
+        readme
+       ).each { |file|
+      bpath = path.downcase.gsub(%r{\.rdoc$}, '').gsub(%r{\.txt$}, 
'').gsub(%r{\.md$}, '').gsub(%r{\.markdown$}, '')
       #$stderr.puts "PATH #{path} #{bpath} #{file}"
       docdirfiles << path if bpath == file
      }

++++++ ruby-find-versioned ++++++
#!/bin/bash
shopt -s nullglob
binary="ruby"
if [ "x$1" != "x" ] ; then
  binary="$1"
fi
ls -1 /usr/bin/$binary.{ruby,rbx,jruby}[0-9].[0-9] /usr/bin/$binary[0-9].[0-9]
++++++ ruby.rpm-macros ++++++
--- /var/tmp/diff_new_pack.IfFIdi/_old  2015-05-07 08:28:05.000000000 +0200
+++ /var/tmp/diff_new_pack.IfFIdi/_new  2015-05-07 08:28:05.000000000 +0200
@@ -65,10 +65,8 @@
 
 # we need to copy parts of the %fdupes macro as rpm can't expand parameters in 
macro "calls" ;(
 %gem_cleanup() \
-shopt -s nullglob \
-for ruby in /usr/bin/ruby.* /usr/bin/ruby[0-9].[0-9] ; do \
-  rb_suffix="${ruby#/usr/bin/ruby}" \
-  gem_base="$(/usr/bin/gem$rb_suffix env gemdir)" \
+for gem in $(/usr/bin/ruby-find-versioned gem) ; do \
+  gem_base="$($gem env gemdir)" \
   /usr/lib/rpm/gem_build_cleanup.sh %{buildroot}${gem_base} \
   fdupes -q -p -n -r %{buildroot}${gem_base} | \
     while read _file; do \

++++++ rubygemsdeps.rb ++++++
--- /var/tmp/diff_new_pack.IfFIdi/_old  2015-05-07 08:28:05.000000000 +0200
+++ /var/tmp/diff_new_pack.IfFIdi/_new  2015-05-07 08:28:05.000000000 +0200
@@ -1,3 +1,14 @@
+#!/bin/sh
+=begin &>/dev/null
+# workaround for rubinius bug
+# https://github.com/rubinius/rubinius/issues/2732
+export LC_ALL="en_US.UTF-8"
+export LANG="en_US.UTF-8"
+for ruby in $(/usr/bin/ruby-find-versioned) ; do
+  test -x "$ruby" && break
+done
+exec $ruby -x $0 "$@"
+=end
 #!/usr/bin/ruby
 
 # Copyright (c) 2012 Stephan Kulow


Reply via email to