bootsnap 1.4.2 → 1.4.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 53b49581be59c8137e2d6093fb7706b2ec9846185fa5b443d8d63e74bb9e9926
4
- data.tar.gz: b45d5d8dc92c81f2749f546c7244fd8d0d968ed152c9c35365389d6226056e03
3
+ metadata.gz: dcfde20655817d38584e7bb6181dfa1a0e449727f04b0f74dec2b0896c6a0080
4
+ data.tar.gz: a0fb770ce0b63970d571ae0de6c55d3c2a67745365410405227984119f389661
5
5
  SHA512:
6
- metadata.gz: b348f404b75266017a81355a1b6cf0053474c088b8fac2cd991cff3cf44c468373573892677a39982fb4a9c58ad22005488e8b481b2a5b41bfbd1b9cdf227ace
7
- data.tar.gz: a20cc7e1e3c32784c808618883654782c94afef692a19d413a2374ee54ea566e7a646280d0360b6f5296149e5c322d33ac1379671ec94e0e94e4afdb5c4a7ff0
6
+ metadata.gz: 37ffec1d9c0475149010ba8f361b306c3b4bdd631b2a8d1365c97ea94e40ae4e2af237f37f20a107707ab2735810a3e8fd9a55f00e277633d5c169e1e8d03d71
7
+ data.tar.gz: 2855cdfeb7eb491ba0e8b4dc7ddfba0a4a203afcdf4f0557240fc576cd9fe99e6f26210a23573f0aa5f5b23a551d588dd6c38b032d7464545cadde71f99c0f08
@@ -1,3 +1,7 @@
1
+ # 1.4.3
2
+
3
+ * Fix some cache permissions and umask issues after switch to mkstemp
4
+
1
5
  # 1.4.2
2
6
 
3
7
  * Fix bug when removing features loaded by relative path from `$LOADED_FEATURES`
@@ -74,6 +74,8 @@ static uint32_t current_ruby_platform;
74
74
  static uint32_t current_ruby_revision;
75
75
  /* Invalidates cache when RubyVM::InstructionSequence.compile_option changes */
76
76
  static uint32_t current_compile_option_crc32 = 0;
77
+ /* Current umask */
78
+ static mode_t current_umask;
77
79
 
78
80
  /* Bootsnap::CompileCache::{Native, Uncompilable} */
79
81
  static VALUE rb_mBootsnap;
@@ -142,6 +144,9 @@ Init_bootsnap(void)
142
144
  rb_define_module_function(rb_mBootsnap_CompileCache_Native, "coverage_running?", bs_rb_coverage_running, 0);
143
145
  rb_define_module_function(rb_mBootsnap_CompileCache_Native, "fetch", bs_rb_fetch, 3);
144
146
  rb_define_module_function(rb_mBootsnap_CompileCache_Native, "compile_option_crc32=", bs_compile_option_crc32_set, 1);
147
+
148
+ current_umask = umask(0777);
149
+ umask(current_umask);
145
150
  }
146
151
 
147
152
  /*
@@ -482,7 +487,6 @@ atomic_write_cache_file(char * path, struct bs_cache_key * key, VALUE data, char
482
487
  *errno_provenance = (char *)"bs_fetch:atomic_write_cache_file:mkpath";
483
488
  return -1;
484
489
  }
485
- close(fd);
486
490
  fd = open(tmp_path, O_WRONLY | O_CREAT, 0664);
487
491
  if (fd < 0) {
488
492
  *errno_provenance = (char *)"bs_fetch:atomic_write_cache_file:open";
@@ -517,6 +521,11 @@ atomic_write_cache_file(char * path, struct bs_cache_key * key, VALUE data, char
517
521
  ret = rename(tmp_path, path);
518
522
  if (ret < 0) {
519
523
  *errno_provenance = (char *)"bs_fetch:atomic_write_cache_file:rename";
524
+ return -1;
525
+ }
526
+ ret = chmod(path, 0664 & ~current_umask);
527
+ if (ret < 0) {
528
+ *errno_provenance = (char *)"bs_fetch:atomic_write_cache_file:chmod";
520
529
  }
521
530
  return ret;
522
531
  }
@@ -1,3 +1,3 @@
1
1
  module Bootsnap
2
- VERSION = "1.4.2"
2
+ VERSION = "1.4.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bootsnap
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.2
4
+ version: 1.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Burke Libbey
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-26 00:00:00.000000000 Z
11
+ date: 2019-04-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -167,8 +167,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
167
167
  - !ruby/object:Gem::Version
168
168
  version: '0'
169
169
  requirements: []
170
- rubyforge_project:
171
- rubygems_version: 2.7.6
170
+ rubygems_version: 3.0.2
172
171
  signing_key:
173
172
  specification_version: 4
174
173
  summary: Boot large ruby/rails apps faster