rb_sys 0.9.49 → 0.9.50

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: d65319f94ce1b79cc27ed5b42a61246d7183cb7f9616fafc6f60ce023fe3b687
4
- data.tar.gz: 0e3fe62efd6b9f0f8246f182b91d6918b0161b89691f1df8ded5628fa26ad105
3
+ metadata.gz: 3b74d52f8db6d2d17f777a1eda0222ea8ad9960475fed697afacdd35f8e7ae79
4
+ data.tar.gz: fb24cccae1c2a1ae04e1dad6764c7c454e8e87e5f3d1cddbc118fd9d28281447
5
5
  SHA512:
6
- metadata.gz: 307b71b55f1602546201f8380b101824f2b241eb219041f36938c6316d315b0094d1fc5e1fd41412c37be90afdcc42dffa308042e6038f05f187109d80128b0e
7
- data.tar.gz: 0c7162a722fdfbdfd483f342f7d737284539b5d5b3c8b303a0f55d107c2b32fd5346617a224ed15475326ae2fb474603dfcfbbf6f6840d993b8a093b40a13838
6
+ metadata.gz: b6273e7a26eaff960d8e0f95f8d2d3601b70a438ac48969588299336f97fae8a8d80c7be2de4d4b32e8054b048da608f397c32e2b0bc810adec4c05b65b7a967
7
+ data.tar.gz: 111dc76d283d514786da3661ec73753c6cabf9aaf6e62e14b8b9b27d5e93943c7b1881457adf2058227cb17cfda0ed4066344b87a51c6d2ff42eaa60d3acea41
checksums.yaml.gz.sig CHANGED
Binary file
data/exe/rb-sys-dock CHANGED
@@ -96,6 +96,10 @@ def determine_cache_dir
96
96
  File.join(ENV["HOME"], ".cache", "rb-sys-dock")
97
97
  end
98
98
 
99
+ def docker_tmp
100
+ @docker_tmp ||= "/tmp/rb-sys-dock"
101
+ end
102
+
99
103
  def cache_dir
100
104
  return @cache_dir if defined?(@cache_dir)
101
105
 
@@ -113,24 +117,18 @@ def mount_cargo_registry
113
117
  File.join(cache_dir, "cargo")
114
118
  end
115
119
 
116
- dirs = []
117
- dirs << File.join(local_registry_dir, "registry", "index")
118
- dirs << File.join(local_registry_dir, "registry", "cache")
119
- dirs << File.join(local_registry_dir, "registry", "git", "db")
120
+ dir = File.join("registry")
121
+ log(:trace, "Mounting cargo registry dir: #{dir}")
122
+ FileUtils.mkdir_p(dir)
120
123
 
121
- dirs.each do |dir|
122
- log(:trace, "Mounting cargo registry dir: #{dir}")
123
- FileUtils.mkdir_p(dir)
124
- end
125
- dirs.map { |dir| "-v #{dir}:#{dir}" }.join(" ")
124
+ "--mount type=bind,source=#{File.join(local_registry_dir, dir)},target=#{File.join("/usr/local/cargo", dir)},readonly=false"
126
125
  end
127
126
 
128
127
  def mount_bundle_cache(options, extra_env)
129
128
  dir = File.join(cache_dir, options.fetch(:platform), "bundle")
130
129
  FileUtils.mkdir_p(dir)
131
130
  log(:trace, "Mounting bundle cache: #{dir}")
132
- extra_env << "BUNDLE_PATH=\"/tmp/bundle\""
133
- "-v #{dir}:/tmp/bundle"
131
+ "-v #{dir}:#{File.join(docker_tmp, "bundle")}"
134
132
  end
135
133
 
136
134
  def mount_target_dir(options, _extra_env)
@@ -143,7 +141,7 @@ def mount_command_history(options)
143
141
  return unless $stdin.tty?
144
142
 
145
143
  history_dir = File.join(cache_dir, options.fetch(:platform), "commandhistory")
146
- "-v #{history_dir}:/tmp/commandhistory"
144
+ "-v #{history_dir}:#{File.join(docker_tmp, "commandhistory")}"
147
145
  end
148
146
 
149
147
  def rcd(input_args, options)
@@ -215,7 +213,7 @@ def log_some_useful_info(_options)
215
213
  end
216
214
 
217
215
  def set_env(options)
218
- ENV["RCD_IMAGE"] = "rbsys/#{options[:toolchain_info]}:#{options[:version]}"
216
+ ENV["RCD_IMAGE"] ||= "rbsys/#{options[:toolchain_info].platform}:#{options[:version]}"
219
217
  end
220
218
 
221
219
  set_env(options)
@@ -1,10 +1,22 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "shellwords"
4
+
3
5
  module RbSys
4
- class CargoBuilder
6
+ class CargoBuilder < Gem::Ext::Builder
5
7
  # Converts Ruby link flags into something cargo understands
6
8
  class LinkFlagConverter
7
- def self.convert(arg)
9
+ FILTERED_PATTERNS = [
10
+ /compress-debug-sections/ # Not supported by all linkers, and not required for Rust
11
+ ]
12
+
13
+ def self.convert(args)
14
+ Shellwords.split(args).flat_map { |arg| convert_arg(arg) }
15
+ end
16
+
17
+ def self.convert_arg(arg)
18
+ return [] if FILTERED_PATTERNS.any? { |p| p.match?(arg) }
19
+
8
20
  case arg.chomp
9
21
  when /^-L\s*(.+)$/
10
22
  ["-L", "native=#{$1}"]
@@ -1,3 +1,5 @@
1
+ require_relative "cargo_builder/link_flag_converter"
2
+
1
3
  module RbSys
2
4
  # A class to build a Ruby gem Cargo. Extracted from `rubygems` gem, with some modifications.
3
5
  class CargoBuilder < Gem::Ext::Builder
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RbSys
4
- VERSION = "0.9.49"
4
+ VERSION = "0.9.50"
5
5
  end
data.tar.gz.sig CHANGED
@@ -1,3 +1,3 @@
1
- dV�hٲ���/�º�lP
2
- �]��;j%��el(�����&#G�H�H����}��P�X�@Imʯ�_�Y��\��kgn��`�=��:��ɐb��.R[�4 ����Ƃ ����w�NlRt餩7趑�VA� J}I�'�0�s<XD�/v��gl���Eѥ��a%�|F,I�2l�T֠4���P{��#s��S7��^�>����_0�Z(% �m7�*J�QY����taV�$�
3
- 6���A��� z3"]�
1
+ v������/u'!�6� t��<b.ߠQ֍c��ޱˏR�~ojP�Q��h�(��Ưh�Ջ����k]�K+8T7�Ic>�QHϭno��PKςz��z"9} t^!�>kM���h����Y��)��K��<;ٻO��aa��R4y“=D%$D��u���.6�V��
2
+ �<7���`
3
+ y��y#�����Z��`
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rb_sys
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.49
4
+ version: 0.9.50
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ian Ker-Seymer
@@ -30,7 +30,7 @@ cert_chain:
30
30
  Rl+ASkq2/1i07TkBpCf+2hq66+h/hx+/Y/KrUzXfe0jtvil0WESkJT2kqRqHWNhD
31
31
  9GKBxaQlXokNDtWCm1/gl6cD8WRZ0N5S4ZGJT1FLLsA=
32
32
  -----END CERTIFICATE-----
33
- date: 2022-12-12 00:00:00.000000000 Z
33
+ date: 2022-12-13 00:00:00.000000000 Z
34
34
  dependencies: []
35
35
  description:
36
36
  email:
metadata.gz.sig CHANGED
Binary file