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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/exe/rb-sys-dock +11 -13
- data/lib/rb_sys/cargo_builder/link_flag_converter.rb +14 -2
- data/lib/rb_sys/cargo_builder.rb +2 -0
- data/lib/rb_sys/version.rb +1 -1
- data.tar.gz.sig +3 -3
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b74d52f8db6d2d17f777a1eda0222ea8ad9960475fed697afacdd35f8e7ae79
|
4
|
+
data.tar.gz: fb24cccae1c2a1ae04e1dad6764c7c454e8e87e5f3d1cddbc118fd9d28281447
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
117
|
-
|
118
|
-
|
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
|
-
|
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
|
-
|
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}
|
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"]
|
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
|
-
|
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}"]
|
data/lib/rb_sys/cargo_builder.rb
CHANGED
data/lib/rb_sys/version.rb
CHANGED
data.tar.gz.sig
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
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.
|
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-
|
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
|