Hello community, here is the log from the commit of package rubygem-bootsnap for openSUSE:Factory checked in at 2019-11-13 13:27:05 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-bootsnap (Old) and /work/SRC/openSUSE:Factory/.rubygem-bootsnap.new.2990 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-bootsnap" Wed Nov 13 13:27:05 2019 rev:4 rq:747813 version:1.4.5 Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-bootsnap/rubygem-bootsnap.changes 2019-06-19 20:59:23.594034448 +0200 +++ /work/SRC/openSUSE:Factory/.rubygem-bootsnap.new.2990/rubygem-bootsnap.changes 2019-11-13 13:27:09.255624296 +0100 @@ -1,0 +2,8 @@ +Tue Nov 12 16:42:47 UTC 2019 - Manuel Schnitzer <mschnit...@suse.com> + +- updated to version 1.4.5 + + * MRI 2.7 support + * Fixed concurrency bugs + +------------------------------------------------------------------- Old: ---- bootsnap-1.4.4.gem New: ---- bootsnap-1.4.5.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-bootsnap.spec ++++++ --- /var/tmp/diff_new_pack.c54asJ/_old 2019-11-13 13:27:09.807624871 +0100 +++ /var/tmp/diff_new_pack.c54asJ/_new 2019-11-13 13:27:09.807624871 +0100 @@ -24,7 +24,7 @@ # Name: rubygem-bootsnap -Version: 1.4.4 +Version: 1.4.5 Release: 0 %define mod_name bootsnap %define mod_full_name %{mod_name}-%{version} ++++++ bootsnap-1.4.4.gem -> bootsnap-1.4.5.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CHANGELOG.md new/CHANGELOG.md --- old/CHANGELOG.md 2019-04-24 19:57:39.000000000 +0200 +++ new/CHANGELOG.md 2019-08-28 18:01:30.000000000 +0200 @@ -1,3 +1,8 @@ +# 1.4.5 + +* MRI 2.7 support +* Fixed concurrency bugs + # 1.4.4 * Disable ISeq cache in `bootsnap/setup` by default in Ruby 2.5 Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ext/bootsnap/bootsnap.c new/ext/bootsnap/bootsnap.c --- old/ext/bootsnap/bootsnap.c 2019-04-24 19:57:39.000000000 +0200 +++ new/ext/bootsnap/bootsnap.c 2019-08-28 18:01:30.000000000 +0200 @@ -96,6 +96,7 @@ static VALUE bs_fetch(char * path, VALUE path_v, char * cache_path, VALUE handler); static int open_current_file(char * path, struct bs_cache_key * key, char ** errno_provenance); static int fetch_cached_data(int fd, ssize_t data_size, VALUE handler, VALUE * output_data, int * exception_tag, char ** errno_provenance); +static uint32_t get_ruby_revision(void); static uint32_t get_ruby_platform(void); /* @@ -136,7 +137,7 @@ rb_mBootsnap_CompileCache_Native = rb_define_module_under(rb_mBootsnap_CompileCache, "Native"); rb_eBootsnap_CompileCache_Uncompilable = rb_define_class_under(rb_mBootsnap_CompileCache, "Uncompilable", rb_eStandardError); - current_ruby_revision = FIX2INT(rb_const_get(rb_cObject, rb_intern("RUBY_REVISION"))); + current_ruby_revision = get_ruby_revision(); current_ruby_platform = get_ruby_platform(); uncompilable = rb_intern("__bootsnap_uncompilable__"); @@ -197,6 +198,26 @@ } /* + * Ruby's revision may be Integer or String. CRuby 2.7 or later uses + * Git commit ID as revision. It's String. + */ +static uint32_t +get_ruby_revision(void) +{ + VALUE ruby_revision; + + ruby_revision = rb_const_get(rb_cObject, rb_intern("RUBY_REVISION")); + if (RB_TYPE_P(ruby_revision, RUBY_T_FIXNUM)) { + return FIX2INT(ruby_revision); + } else { + uint64_t hash; + + hash = fnv1a_64(StringValueCStr(ruby_revision)); + return (uint32_t)(hash >> 32); + } +} + +/* * When ruby's version doesn't change, but it's recompiled on a different OS * (or OS version), we need to invalidate the cache. * diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/bootsnap/compile_cache.rb new/lib/bootsnap/compile_cache.rb --- old/lib/bootsnap/compile_cache.rb 2019-04-24 19:57:39.000000000 +0200 +++ new/lib/bootsnap/compile_cache.rb 2019-08-28 18:01:30.000000000 +0200 @@ -28,7 +28,7 @@ raise( PermissionError, "bootsnap doesn't have permission to write cache entries in '#{cpath}' " \ - "(or, less likely, doesn't have permisison to read '#{path}')", + "(or, less likely, doesn't have permission to read '#{path}')", ) end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/bootsnap/load_path_cache/store.rb new/lib/bootsnap/load_path_cache/store.rb --- old/lib/bootsnap/load_path_cache/store.rb 2019-04-24 19:57:39.000000000 +0200 +++ new/lib/bootsnap/load_path_cache/store.rb 2019-08-28 18:01:30.000000000 +0200 @@ -11,7 +11,8 @@ def initialize(store_path) @store_path = store_path - @in_txn = false + # TODO: Remove conditional once Ruby 2.2 support is dropped. + @txn_mutex = defined?(::Mutex) ? ::Mutex.new : ::Thread::Mutex.new @dirty = false load_data end @@ -21,7 +22,7 @@ end def fetch(key) - raise(SetOutsideTransactionNotAllowed) unless @in_txn + raise(SetOutsideTransactionNotAllowed) unless @txn_mutex.owned? v = get(key) unless v @dirty = true @@ -32,7 +33,7 @@ end def set(key, value) - raise(SetOutsideTransactionNotAllowed) unless @in_txn + raise(SetOutsideTransactionNotAllowed) unless @txn_mutex.owned? if value != @data[key] @dirty = true @data[key] = value @@ -40,12 +41,14 @@ end def transaction - raise(NestedTransactionError) if @in_txn - @in_txn = true - yield - ensure - commit_transaction - @in_txn = false + raise(NestedTransactionError) if @txn_mutex.owned? + @txn_mutex.synchronize do + begin + yield + ensure + commit_transaction + end + end end private diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/bootsnap/version.rb new/lib/bootsnap/version.rb --- old/lib/bootsnap/version.rb 2019-04-24 19:57:39.000000000 +0200 +++ new/lib/bootsnap/version.rb 2019-08-28 18:01:30.000000000 +0200 @@ -1,3 +1,3 @@ module Bootsnap - VERSION = "1.4.4" + VERSION = "1.4.5" end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2019-04-24 19:57:39.000000000 +0200 +++ new/metadata 2019-08-28 18:01:30.000000000 +0200 @@ -1,14 +1,14 @@ --- !ruby/object:Gem::Specification name: bootsnap version: !ruby/object:Gem::Version - version: 1.4.4 + version: 1.4.5 platform: ruby authors: - Burke Libbey autorequire: bindir: bin cert_chain: [] -date: 2019-04-24 00:00:00.000000000 Z +date: 2019-08-28 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: bundler @@ -167,8 +167,7 @@ - !ruby/object:Gem::Version version: '0' requirements: [] -rubyforge_project: -rubygems_version: 2.7.6 +rubygems_version: 3.0.2 signing_key: specification_version: 4 summary: Boot large ruby/rails apps faster