diff --git a/dist/obs-bundled-gems.spec b/dist/obs-bundled-gems.spec index c94a1b5221b..a75479ec55c 100644 --- a/dist/obs-bundled-gems.spec +++ b/dist/obs-bundled-gems.spec @@ -40,12 +40,10 @@ BuildRequires: mysql-devel BuildRequires: nodejs BuildRequires: python-devel %if 0%{?suse_version} -%define __obs_ruby_version 3.1.1 %define __obs_ruby_interpreter /usr/bin/ruby.ruby3.1 BuildRequires: ruby3.1-devel BuildRequires: openldap2-devel %else -%define __obs_ruby_version 2.6.0 %define __obs_ruby_interpreter /usr/bin/ruby BuildRequires: ruby-devel BuildRequires: rubygem-bundler @@ -59,8 +57,6 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build This package bundles all the gems required by the Open Build Service to make it easier to deploy the obs-server package. -%define rack_version 2.2.3 - %package -n obs-api-deps Summary: Holding dependencies required to run the OBS frontend Group: Productivity/Networking/Web/Utilities @@ -75,7 +71,7 @@ Requires: obs-bundled-gems = %{version} Requires: sphinx >= 2.2.11 Requires: perl(GD) %if 0%{?suse_version} -Requires: rubygem(ruby:%{__obs_ruby_version}:rack:%{rack_version}) +Requires: rubygem(ruby:3.1.0:rack) %else Requires: rubygem-bundler Requires: rubygem-rake @@ -125,9 +121,6 @@ bundle config force_ruby_platform true bundle --local --path %{buildroot}%_libdir/obs-api/ popd -# test that the rake and rack macros is still matching our Gemfile -test -f %{buildroot}%_libdir/obs-api/ruby/%{__obs_ruby_version}/gems/rack-%{rack_version}/rack.gemspec - pushd %{_sourcedir}/open-build-service-*/dist # run gem clean up script chmod 755 gem_build_cleanup.sh @@ -155,7 +148,7 @@ find %{buildroot}%_libdir/obs-api -name .gitignore | xargs rm -rf # fix interpreter in installed binaries for bin in %{buildroot}%_libdir/obs-api/ruby/*/bin/*; do - sed -i -e 's,/usr/bin/env ruby.ruby2.5,%{__obs_ruby_interpreter},' $bin + sed -i -e 's,/usr/bin/env ruby.ruby3.1,%{__obs_ruby_interpreter},' $bin done # remove exec bit from all other files still containing /usr/bin/env - mostly helper scripts