Accepting request 1128358 from devel:languages:ruby
Automatic submission by obs-autosubmit OBS-URL: https://build.opensuse.org/request/show/1128358 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ruby-common?expand=0&rev=27
This commit is contained in:
commit
d9847defac
@ -7,6 +7,7 @@ export LC_ALL="en_US.UTF-8"
|
||||
export LANG="en_US.UTF-8"
|
||||
shopt -s nullglob
|
||||
for ruby in $(/usr/bin/ruby-find-versioned) ; do
|
||||
export GEM_HOME="$(${ruby} -r rubygems -e 'puts Gem.default_dir')"
|
||||
$ruby -x $0 "$@"
|
||||
done
|
||||
exit $?
|
||||
|
@ -57,5 +57,7 @@ export LC_ALL="en_US.UTF-8"
|
||||
export LANG="en_US.UTF-8"
|
||||
set -x
|
||||
for gr in $(/usr/bin/ruby-find-versioned gem2rpm) ; do
|
||||
ruby_suffix=${gr##/usr/bin/gem2rpm}
|
||||
export GEM_HOME="$(/usr/bin/ruby${ruby_suffix} -r rubygems -e 'puts Gem.default_dir')"
|
||||
$gr $otheropts
|
||||
done
|
||||
|
@ -13,6 +13,33 @@
|
||||
path
|
||||
end
|
||||
|
||||
def self.rpm_jemalloc_prefix
|
||||
jemalloc_prefix = nil
|
||||
|
||||
package_name = RbConfig::CONFIG['RUBY_SO_NAME']
|
||||
|
||||
IO.popen("rpm -q --provides #{package_name}") {|rpm_io|
|
||||
rpm_provides = rpm_io.read
|
||||
mo = /(?<jemalloc_prefix>with(out)?-jemalloc)/.match(rpm_provides)
|
||||
|
||||
if mo
|
||||
jemalloc_prefix = mo[:jemalloc_prefix]
|
||||
end
|
||||
}
|
||||
|
||||
jemalloc_prefix
|
||||
end
|
||||
|
||||
def self.jemalloc_requires
|
||||
jemalloc_prefix = rpm_jemalloc_prefix
|
||||
|
||||
if jemalloc_prefix
|
||||
return "Requires: #{RbConfig::CONFIG['RUBY_SO_NAME']}-#{jemalloc_prefix} >= #{RbConfig::CONFIG['RUBY_PROGRAM_VERSION']}"
|
||||
end
|
||||
#
|
||||
return ""
|
||||
end
|
||||
|
||||
def self.get_extension_doc_dir(gem_spec)
|
||||
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)
|
||||
@ -121,6 +148,9 @@
|
||||
<%= fix_up_rubygem_requires_with_rb_api(rb_api, config[:main][:preamble]) %>
|
||||
<% end -%>
|
||||
# /MANUAL
|
||||
<% unless spec.extensions.empty? -%>
|
||||
<%= jemalloc_requires %>
|
||||
<% end -%>
|
||||
Summary: <%= config[:summary] or spec.summary %>
|
||||
Group: Development/Languages/Ruby
|
||||
<% unless spec.executables.empty? -%>
|
||||
|
@ -1,3 +1,29 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Nov 16 14:20:31 UTC 2023 - Marcus Rueckert <mrueckert@suse.de>
|
||||
|
||||
- gem_cleanup macro: yet another place which got hit by ruby 3.3
|
||||
replace `gem env gemdir` with
|
||||
`ruby -r rubygems -e 'puts Gem.default_dir'`
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Nov 14 10:29:27 UTC 2023 - Marcus Rueckert <mrueckert@suse.de>
|
||||
|
||||
- Fix for the previous change. we need to set the GEM_HOME before
|
||||
even wrapping into the re-exec with ruby.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 13 20:51:12 UTC 2023 - Marcus Rueckert <mrueckert@suse.de>
|
||||
|
||||
- add workaround for https://github.com/rubygems/rubygems/commit/64273fd7e3
|
||||
for now we will always set GEM_HOME to ensure that this new logic
|
||||
does not break our paths
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Nov 4 00:41:49 UTC 2023 - Marcus Rueckert <mrueckert@suse.de>
|
||||
|
||||
- ensure that gems built against an jemalloc enabled ruby
|
||||
also pulls a ruby version that is built with jemalloc
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri May 12 21:28:54 UTC 2023 - Marcus Rueckert <mrueckert@suse.de>
|
||||
|
||||
|
@ -78,8 +78,8 @@ cd $GEMSPEC_SOURCE_DIR && %{gem_binary} build --verbose %{mod_name}-%{version}.g
|
||||
|
||||
# we need to copy parts of the %fdupes macro as rpm can't expand parameters in macro "calls" ;(
|
||||
%gem_cleanup() \
|
||||
for gem in $(/usr/bin/ruby-find-versioned gem) ; do \
|
||||
gem_base="$($gem env gemdir)" \
|
||||
for ruby in $(/usr/bin/ruby-find-versioned ruby) ; do \
|
||||
gem_base="$(${ruby} -r rubygems -e 'puts Gem.default_dir')" \
|
||||
/usr/lib/rpm/gem_build_cleanup.sh %{buildroot}${gem_base} \
|
||||
fdupes -q -p -n -r -o name %{buildroot}${gem_base} | \
|
||||
while read _file; do \
|
||||
|
Loading…
Reference in New Issue
Block a user