From a9581aca36930c68f3145235f0b019ecc35fc7ef956da8ef91e60b74cdf60eca Mon Sep 17 00:00:00 2001 From: Johannes Kastl Date: Tue, 19 May 2020 04:59:51 +0000 Subject: [PATCH] Accepting request 806993 from home:dancermak:branches:Virtualization:vagrant Use the correct ruby in the vagrant binstub as well OBS-URL: https://build.opensuse.org/request/show/806993 OBS-URL: https://build.opensuse.org/package/show/Virtualization:vagrant/vagrant?expand=0&rev=44 --- binstub | 3 +-- vagrant.changes | 5 +++++ vagrant.spec | 17 ++++++++++------- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/binstub b/binstub index 6795570..1716953 100644 --- a/binstub +++ b/binstub @@ -57,5 +57,4 @@ fi export VAGRANT_DISABLE_VBOXSYMLINKCREATE # Call the actual Vagrant bin with our arguments -exec ruby "${VAGRANT_EXECUTABLE}" "$@" - +exec /usr/bin/ruby.@vagrant_rb_ruby_suffix@ "${VAGRANT_EXECUTABLE}" "$@" diff --git a/vagrant.changes b/vagrant.changes index 7ad7584..9cf798b 100644 --- a/vagrant.changes +++ b/vagrant.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon May 18 14:17:46 UTC 2020 - Dan Čermák + +- Use the correct ruby in the vagrant binstub as well + ------------------------------------------------------------------- Mon May 11 17:58:59 UTC 2020 - Dan Čermák diff --git a/vagrant.spec b/vagrant.spec index b97f2bc..0f75106 100644 --- a/vagrant.spec +++ b/vagrant.spec @@ -306,18 +306,21 @@ CONFIGURE_ARGS="--with-cflags='%{optflags}' $CONFIGURE_ARGS" # the actual vagrant binary generated from the binstub install -D -m 755 %{SOURCE96} %{buildroot}%{_bindir}/vagrant -sed -i 's|@vagrant_embedded_dir@|%{vagrant_embedded_dir}|' %{buildroot}%{_bindir}/vagrant gem_path=$(ruby.%{rb_ruby_suffix} -e "print Gem.path.reject{|path| path.include? 'home'}.join(':')") -sed -i "s|@ruby_vagrant_gem_path@|$gem_path:%{vagrant_plugin_dir}|" %{buildroot}%{_bindir}/vagrant +sed -i -e "s|@vagrant_embedded_dir@|%{vagrant_embedded_dir}|" \ + -e "s|@ruby_vagrant_gem_path@|$gem_path:%{vagrant_plugin_dir}|" \ + -e "s|@vagrant_rb_ruby_suffix@|%{vagrant_rb_ruby_suffix}|" \ + %{buildroot}%{_bindir}/%{name} # install the rpm macros & expand the name, name-version and vagrant_rb_* macros %global macros_vagrant %{_rpmconfigdir}/macros.d/macros.%{name} install -D -m 0644 %{SOURCE97} %{buildroot}%{macros_vagrant} -sed -i "s|%%{name}|%{name}|" %{buildroot}%{macros_vagrant} -sed -i "s|%{name}-%%{version}|%{name}-%{version}|" %{buildroot}%{macros_vagrant} -sed -i "s|%%{rb_build_versions}|%{rb_build_versions}|" %{buildroot}%{macros_vagrant} -sed -i "s|%%{rb_build_abi}|%{rb_build_abi}|" %{buildroot}%{macros_vagrant} -sed -i "s|%%{rb_ruby_suffix}|%{rb_ruby_suffix}|" %{buildroot}%{macros_vagrant} +sed -i -e "s|%%{name}|%{name}|" \ + -e "s|%{name}-%%{version}|%{name}-%{version}|" \ + -e "s|%%{rb_build_versions}|%{rb_build_versions}|" \ + -e "s|%%{rb_build_abi}|%{rb_build_abi}|" \ + -e "s|%%{rb_ruby_suffix}|%{rb_ruby_suffix}|" \ + %{buildroot}%{macros_vagrant} # install post, transfiletrigerin & transfiletriggerun scriptlets %global post_rb %{vagrant_embedded_dir}/bin/vagrant_post.rb