rake-compiler-dock 1.9.1 → 1.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -82,28 +82,22 @@ module RakeCompilerDock
82
82
  #
83
83
  # RakeCompilerDock.cross_rubies
84
84
  # # => {
85
- # # "3.4" => "3.4.1",
86
- # # "3.3" => "3.3.5",
87
- # # "3.2" => "3.2.6",
88
- # # "3.1" => "3.1.6",
85
+ # # "3.4" => "3.4.5",
86
+ # # "3.3" => "3.3.9",
87
+ # # "3.2" => "3.2.9",
88
+ # # "3.1" => "3.1.7",
89
89
  # # "3.0" => "3.0.7",
90
90
  # # "2.7" => "2.7.8",
91
- # # "2.6" => "2.6.10",
92
- # # "2.5" => "2.5.9",
93
- # # "2.4" => "2.4.10",
94
91
  # # }
95
92
  #
96
93
  def cross_rubies
97
94
  {
98
- "3.4" => "3.4.1",
99
- "3.3" => "3.3.7",
100
- "3.2" => "3.2.6",
101
- "3.1" => "3.1.6",
95
+ "3.4" => "3.4.5",
96
+ "3.3" => "3.3.9",
97
+ "3.2" => "3.2.9",
98
+ "3.1" => "3.1.7",
102
99
  "3.0" => "3.0.7",
103
100
  "2.7" => "2.7.8",
104
- "2.6" => "2.6.10",
105
- "2.5" => "2.5.9",
106
- "2.4" => "2.4.10",
107
101
  }
108
102
  end
109
103
 
@@ -118,13 +112,13 @@ module RakeCompilerDock
118
112
  #
119
113
  # For example:
120
114
  # RakeCompilerDock.ruby_cc_version("2.7", "3.4")
121
- # # => "3.4.1:2.7.8"
115
+ # # => "3.4.5:2.7.8"
122
116
  #
123
117
  # RakeCompilerDock.ruby_cc_version("~> 3.2")
124
- # # => "3.4.1:3.3.7:3.2.6"
118
+ # # => "3.4.5:3.3.9:3.2.9"
125
119
  #
126
120
  # RakeCompilerDock.ruby_cc_version(Gem::Requirement.new("~> 3.2"))
127
- # # => "3.4.1:3.3.7:3.2.6"
121
+ # # => "3.4.5:3.3.9:3.2.9"
128
122
  #
129
123
  def ruby_cc_version(*requirements)
130
124
  cross = cross_rubies
@@ -12,47 +12,3 @@ They are built by the following command:
12
12
  ```sh
13
13
  docker buildx build . -t larskanis/mingw64-ucrt:20.04 --platform linux/arm64,linux/amd64 --push
14
14
  ```
15
-
16
-
17
- Create builder instance for two architectures
18
- ------------------
19
-
20
- Building with qemu emulation fails currently with a segfault, so that it must be built by a builder instance with at least one remote node for the other architecture.
21
- Building on native hardware is also much faster (~30 minutes) than on qemu.
22
- A two-nodes builder requires obviously a ARM and a Intel/AMD device.
23
- It can be created like this:
24
-
25
- ```sh
26
- # Make sure the remote instance can be connected
27
- $ docker -H ssh://isa info
28
-
29
- # Create a new builder with the local instance
30
- $ docker buildx create --name isayoga
31
-
32
- # Add the remote instance
33
- $ docker buildx create --name isayoga --append ssh://isa
34
-
35
- # They are inactive from the start
36
- $ docker buildx ls
37
- NAME/NODE DRIVER/ENDPOINT STATUS BUILDKIT PLATFORMS
38
- isayoga docker-container
39
- \_ isayoga0 \_ unix:///var/run/docker.sock inactive
40
- \_ isayoga1 \_ ssh://isa inactive
41
- default* docker
42
- \_ default \_ default running v0.13.2 linux/arm64
43
-
44
- # Bootstrap the instances
45
- $ docker buildx inspect --bootstrap --builder isayoga
46
-
47
- # Set the new builder as default
48
- $ docker buildx use isayoga
49
-
50
- # Now it should be default and in state "running"
51
- $ docker buildx ls
52
- NAME/NODE DRIVER/ENDPOINT STATUS BUILDKIT PLATFORMS
53
- isayoga* docker-container
54
- \_ isayoga0 \_ unix:///var/run/docker.sock running v0.18.2 linux/arm64
55
- \_ isayoga1 \_ ssh://isa running v0.18.2 linux/amd64, linux/amd64/v2, linux/amd64/v3, linux/386
56
- default docker
57
- \_ default \_ default running v0.13.2 linux/arm64
58
- ```
@@ -2,7 +2,7 @@ ARG from_image
2
2
  FROM ${from_image}
3
3
 
4
4
  RUN uname -a
5
- RUN apk add ruby ruby-etc ruby-rake git
5
+ RUN apk add ruby ruby-rake git
6
6
 
7
7
  RUN ruby --version
8
8
  RUN gem env
@@ -0,0 +1,8 @@
1
+ #include <mach/std_types.defs>
2
+ #include <mach/mach_types.defs>
3
+
4
+ subsystem mig_test_ipc 1;
5
+
6
+ routine mig_test_call(
7
+ server_port : mach_port_t;
8
+ out returnvalue : int);
@@ -22,6 +22,7 @@ else
22
22
  aarch64-linux
23
23
  aarch64-linux-gnu
24
24
  aarch64-linux-musl
25
+ aarch64-mingw-ucrt
25
26
  arm-linux
26
27
  arm-linux-gnu
27
28
  arm-linux-musl
@@ -18,6 +18,8 @@ else
18
18
  puts "cc --version: #{ %x[#{CONFIG['CC']} --version].lines.first}"
19
19
  puts "-"*70
20
20
 
21
+ $CFLAGS << " -Wall -Werror"
22
+
21
23
  have_func('rb_thread_call_without_gvl', 'ruby/thread.h') ||
22
24
  raise("rb_thread_call_without_gvl() not found")
23
25
 
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
9
9
  spec.summary = "C extension for testing rake-compiler-dock"
10
10
  spec.description = "This gem has no real use other than testing builds of binary gems."
11
11
  spec.homepage = "https://github.com/rake-compiler/rake-compiler-dock"
12
- spec.required_ruby_version = ">= 2.0.0"
12
+ spec.required_ruby_version = ">= 2.7.0"
13
13
  spec.license = "MIT"
14
14
 
15
15
  spec.files = [
@@ -35,4 +35,15 @@ class TestBasic < Minitest::Test
35
35
  is_linux = RUBY_PLATFORM.include?("linux")
36
36
  assert_equal(is_linux, RcdTest.largefile_op_removed_from_musl)
37
37
  end
38
+
39
+ def test_disabled_rpath
40
+ skip("jruby uses jar files without rpath") if RUBY_ENGINE == "jruby"
41
+
42
+ cext_fname = $LOADED_FEATURES.grep(/rcd_test_ext/).first
43
+ refute_nil(cext_fname, "the C-ext should be loaded")
44
+ cext_text = File.binread(cext_fname)
45
+ assert_match(/Init_rcd_test_ext/, cext_text, "C-ext shoud contain the init function")
46
+ refute_match(/usr\/local/, cext_text, "there should be no rpath to /usr/local/rake-compiler/ruby/x86_64-unknown-linux-musl/ruby-3.4.5/lib or so")
47
+ refute_match(/home\//, cext_text, "there should be no path to /home/ or so")
48
+ end
38
49
  end
@@ -85,6 +85,19 @@ class TestEnvironmentVariables
85
85
  end
86
86
  end
87
87
 
88
+ class UsingWrapperSpecifyingRuby < UsingWrapper
89
+ include Common
90
+
91
+ def invocation(command)
92
+ idir = File.join(File.dirname(__FILE__), '../lib')
93
+ "RCD_RUBY_VERSION=3.1.6 RCD_PLATFORM=#{TEST_PLATFORM} RCD_RUBYVM=#{IS_JRUBY ? 'jruby' : 'mri'} #{RbConfig::CONFIG['RUBY_INSTALL_NAME']} -I#{idir.inspect} bin/rake-compiler-dock bash -c '#{command}'"
94
+ end
95
+
96
+ def test_RUBY_VERSION
97
+ assert_equal "3.1.6", rcd_env['RBENV_VERSION']
98
+ end
99
+ end
100
+
88
101
  class AsIfContinuousIntegration < Test::Unit::TestCase
89
102
  include Common
90
103
 
data/test/test_mig.rb ADDED
@@ -0,0 +1,18 @@
1
+ require 'rake_compiler_dock'
2
+ require 'test/unit'
3
+
4
+ class TestMigCompile < Test::Unit::TestCase
5
+ TEST_PLATFORM = ENV["TEST_PLATFORM"] || 'arm64-darwin'
6
+
7
+ def test_mig_compile
8
+ omit "only on darwin platform" unless TEST_PLATFORM =~ /darwin/
9
+
10
+ RakeCompilerDock::Starter.sh "mig -header tmp/mig_test_rpc.h -user tmp/mig_test_rpc.c -sheader /dev/null -server /dev/null -I. test/fixtures/mig_test_rpc.defs ", platform: TEST_PLATFORM, verbose: false
11
+
12
+ h_file = File.read("tmp/mig_test_rpc.h")
13
+ assert_match /Request_mig_test_call/, h_file
14
+
15
+ c_file = File.read("tmp/mig_test_rpc.c")
16
+ assert_match /Reply__mig_test_call/, c_file
17
+ end
18
+ end
data/test/test_starter.rb CHANGED
@@ -38,6 +38,12 @@ class TestStarter < Test::Unit::TestCase
38
38
  with_env({"RAKE_COMPILER_DOCK_IMAGE" => "env-var-value"}) do
39
39
  assert_equal("env-var-value", Starter.container_image_name)
40
40
  end
41
+ with_env({"CONTAINER_REGISTRY" => "env-var-value"}) do
42
+ assert_match(/env-var-value\//, Starter.container_image_name(platform: "x64-mingw-ucrt"))
43
+ end
44
+ with_env({"RCD_IMAGE_VERSION" => "env-var-value"}) do
45
+ assert_match(/:env-var-value-/, Starter.container_image_name(platform: "x64-mingw-ucrt"))
46
+ end
41
47
 
42
48
  # with image option
43
49
  assert_equal("option-value", Starter.container_image_name({:image => "option-value"}))
data.tar.gz.sig ADDED
@@ -0,0 +1,3 @@
1
+ N���X�|��+����"�x��둴2�M[L퉺��
2
+ g��7����$,#�F�K$��ME!r{����>)l-Z?���hR�1��lƄ^�;�1Ѹ�44�ux�����~k�>��L������K�5=����|�إ-�$���p��pQE�K� �ʊe�>�[��Qo��W�(��U�z^�ԉA}>���@�d�'�| ���1���$�
3
+ ��h���
metadata CHANGED
@@ -1,13 +1,38 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rake-compiler-dock
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.1
4
+ version: 1.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lars Kanis
8
8
  bindir: bin
9
- cert_chain: []
10
- date: 2025-01-20 00:00:00.000000000 Z
9
+ cert_chain:
10
+ - |
11
+ -----BEGIN CERTIFICATE-----
12
+ MIIEBDCCAmygAwIBAgIBAzANBgkqhkiG9w0BAQsFADAoMSYwJAYDVQQDDB1sYXJz
13
+ L0RDPWdyZWl6LXJlaW5zZG9yZi9EQz1kZTAeFw0yNDEyMjkxOTU2NTZaFw0yNTEy
14
+ MjkxOTU2NTZaMCgxJjAkBgNVBAMMHWxhcnMvREM9Z3JlaXotcmVpbnNkb3JmL0RD
15
+ PWRlMIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEAwum6Y1KznfpzXOT/
16
+ mZgJTBbxZuuZF49Fq3K0WA67YBzNlDv95qzSp7V/7Ek3NCcnT7G+2kSuhNo1FhdN
17
+ eSDO/moYebZNAcu3iqLsuzuULXPLuoU0GsMnVMqV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
+ 8VbbBzzeE7MsvgkP3sHlLmY8PtuyViJ8
34
+ -----END CERTIFICATE-----
35
+ date: 1980-01-02 00:00:00.000000000 Z
11
36
  dependencies:
12
37
  - !ruby/object:Gem::Dependency
13
38
  name: bundler
@@ -72,15 +97,16 @@ files:
72
97
  - ".github/workflows/publish-images.yml"
73
98
  - ".github/workflows/release-images.yml"
74
99
  - ".gitignore"
100
+ - CHANGELOG.md
75
101
  - CONTRIBUTING.md
76
102
  - Dockerfile.jruby
77
103
  - Dockerfile.mri.erb
78
104
  - Gemfile
79
- - History.md
80
105
  - LICENSE.txt
81
106
  - README.md
82
107
  - Rakefile
83
108
  - bin/rake-compiler-dock
109
+ - build/buildkitd.toml
84
110
  - build/gem_helper.rb
85
111
  - build/mk_i686.rb
86
112
  - build/mk_musl_cross.sh
@@ -108,8 +134,8 @@ files:
108
134
  - mingw64-ucrt/mingw-w64-enable-ucrt.patch
109
135
  - rake-compiler-dock.gemspec
110
136
  - test/env/Dockerfile.alpine
111
- - test/env/Dockerfile.centos
112
137
  - test/env/Dockerfile.debian
138
+ - test/fixtures/mig_test_rpc.defs
113
139
  - test/rcd_test/Gemfile
114
140
  - test/rcd_test/Rakefile
115
141
  - test/rcd_test/ext/java/RcdTestExtService.java
@@ -121,6 +147,7 @@ files:
121
147
  - test/rcd_test/rcd_test.gemspec
122
148
  - test/rcd_test/test/test_basic.rb
123
149
  - test/test_environment_variables.rb
150
+ - test/test_mig.rb
124
151
  - test/test_parallel_docker_build.rb
125
152
  - test/test_starter.rb
126
153
  - test/test_versions.rb
@@ -142,14 +169,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
142
169
  - !ruby/object:Gem::Version
143
170
  version: '0'
144
171
  requirements: []
145
- rubygems_version: 3.6.2
172
+ rubygems_version: 3.6.9
146
173
  specification_version: 4
147
174
  summary: Easy to use and reliable cross compiler environment for building Windows
148
175
  and Linux binary gems.
149
176
  test_files:
150
177
  - test/env/Dockerfile.alpine
151
- - test/env/Dockerfile.centos
152
178
  - test/env/Dockerfile.debian
179
+ - test/fixtures/mig_test_rpc.defs
153
180
  - test/rcd_test/Gemfile
154
181
  - test/rcd_test/Rakefile
155
182
  - test/rcd_test/ext/java/RcdTestExtService.java
@@ -161,6 +188,7 @@ test_files:
161
188
  - test/rcd_test/rcd_test.gemspec
162
189
  - test/rcd_test/test/test_basic.rb
163
190
  - test/test_environment_variables.rb
191
+ - test/test_mig.rb
164
192
  - test/test_parallel_docker_build.rb
165
193
  - test/test_starter.rb
166
194
  - test/test_versions.rb
metadata.gz.sig ADDED
Binary file
@@ -1,24 +0,0 @@
1
- ARG from_image
2
- FROM ${from_image}
3
-
4
- RUN uname -a
5
-
6
- # Change download address of Centos-8 which is EOL
7
- RUN sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
8
- RUN sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
9
-
10
- RUN yum install -y ruby git
11
-
12
- RUN ruby --version
13
- RUN gem env
14
-
15
- # centos-8 comes with Ruby 2.5, and this is the last version of bundler that supports it
16
- RUN gem install bundler -v2.2.28
17
-
18
- WORKDIR /build
19
-
20
- CMD ruby -e "puts Gem::Platform.local.to_s" && \
21
- gem install --local *.gem --verbose --no-document && \
22
- cd test/rcd_test/ && \
23
- bundle install && \
24
- rake test