rake-compiler-dock 1.11.1 → 1.12.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.
data/CHANGELOG.md CHANGED
@@ -1,8 +1,13 @@
1
1
  # `rake-compiler/rake-compiler-dock` Changelog
2
2
 
3
- ## next / unreleased
4
-
5
- ...
3
+ ## 1.12.0 / 2026-04-15
4
+
5
+ - Fix `gem install rdoc` which failed due to insufficient permissions. #187 #192 @larskanis @flavorjones
6
+ - Fix musl cross-compiler build by removing dead mirror URL for linux-headers. @flavorjones
7
+ - Bump Ruby 4.0 to v4.0.2 (from v4.0.0). @marcoroth @flavorjones
8
+ - Bump Ruby 3.4 to v3.4.9 (from v3.4.8). @flavorjones
9
+ - Bump Ruby 3.3 to v3.3.11 (from v3.3.10). @flavorjones
10
+ - Bump Ruby 3.2 to v3.2.11 (from v3.2.9). @marcoroth @flavorjones
6
11
 
7
12
 
8
13
  ## 1.11.1 / 2025-12-26
data/Dockerfile.mri.erb CHANGED
@@ -39,7 +39,7 @@ ENV BASH_ENV=/etc/rubybashrc
39
39
  ##
40
40
  USER rubyuser
41
41
 
42
- ENV RBENV_RUBIES="3.1.7 4.0.0"
42
+ ENV RBENV_RUBIES="3.1.7 4.0.2"
43
43
 
44
44
  # Install the bootstrap rubies
45
45
  RUN bash -c " \
@@ -48,7 +48,8 @@ RUN bash -c " \
48
48
  for v in ${RBENV_RUBIES} ; do \
49
49
  rbenv install \$v -- --disable-install-doc ; \
50
50
  done && \
51
- find ${RBENV_ROOT} -type d -print0 | sudo xargs -0 chmod g+w \
51
+ find ${RBENV_ROOT} -type d -print0 | sudo xargs -0 chmod g+w && \
52
+ find ${RBENV_ROOT} -path '*/plugins/*.rb' -print0 | sudo xargs -0 chmod g+w \
52
53
  "
53
54
 
54
55
  # Install rake-compiler and patch it to build and install static libraries for Linux rubies
@@ -151,12 +152,12 @@ USER rubyuser
151
152
  xrubies_build_plan = if platform =~ /x64-mingw-ucrt/
152
153
  [
153
154
  # Rubyinstaller-3.1+ is platform x64-mingw-ucrt
154
- ["3.3.10:3.2.9:3.1.7", "3.1.7"],
155
- ["4.0.0:3.4.8", "4.0.0"],
155
+ ["3.3.11:3.2.11:3.1.7", "3.1.7"],
156
+ ["4.0.2:3.4.9", "4.0.2"],
156
157
  ]
157
158
  elsif platform =~ /aarch64-mingw-ucrt/
158
159
  [
159
- ["4.0.0:3.4.8", "4.0.0"],
160
+ ["4.0.2:3.4.9", "4.0.2"],
160
161
  ]
161
162
  elsif platform =~ /x64-mingw32/
162
163
  [
@@ -166,13 +167,13 @@ elsif platform =~ /x64-mingw32/
166
167
  elsif platform =~ /x86-mingw32/
167
168
  [
168
169
  # There's no Rubyinstaller-4.x for platform x86-mingw32
169
- ["3.3.10:3.2.9:3.1.7:3.0.7", "3.1.7"],
170
- ["3.4.8", "4.0.0"],
170
+ ["3.3.11:3.2.11:3.1.7:3.0.7", "3.1.7"],
171
+ ["3.4.9", "4.0.2"],
171
172
  ]
172
173
  else
173
174
  [
174
- ["3.3.10:3.2.9:3.1.7:3.0.7", "3.1.7"],
175
- ["4.0.0:3.4.8", "4.0.0"],
175
+ ["3.3.11:3.2.11:3.1.7:3.0.7", "3.1.7"],
176
+ ["4.0.2:3.4.9", "4.0.2"],
176
177
  ]
177
178
  end
178
179
 
@@ -274,8 +275,8 @@ RUN echo 'source /etc/profile.d/rcd-env.sh' >> /etc/rubybashrc
274
275
  # Install sudoers configuration
275
276
  COPY build/sudoers /etc/sudoers.d/rake-compiler-dock
276
277
 
277
- RUN bash -c "rbenv global 4.0.0"
278
+ RUN bash -c "rbenv global 4.0.2"
278
279
 
279
- ENV RUBY_CC_VERSION=4.0.0:3.4.8:3.3.10:3.2.9:3.1.7:3.0.7
280
+ ENV RUBY_CC_VERSION=4.0.2:3.4.9:3.3.11:3.2.11:3.1.7:3.0.7
280
281
 
281
282
  CMD bash
data/Rakefile CHANGED
@@ -135,6 +135,17 @@ namespace :release do
135
135
  multitask :images => platform
136
136
  end
137
137
 
138
+ # Add a manifest for automatic selection of ARM64 or X86_64 host image
139
+ task :manifests do
140
+ platforms.each do |platform,|
141
+ tag = RakeCompilerDock::Starter.container_image_name(platform: platform)
142
+ sh "docker buildx imagetools create -t #{tag} #{tag}-ARM64 #{tag}-X64"
143
+ if tag.include?("linux-gnu")
144
+ sh "docker buildx imagetools create -t #{tag.sub("linux-gnu", "linux")} #{tag}-ARM64 #{tag}-X64"
145
+ end
146
+ end
147
+ end
148
+
138
149
  desc "Show download sizes of the release images"
139
150
  task :sizes do
140
151
  require "yaml"
@@ -29,7 +29,7 @@ GCC_CONFIG += --disable-libquadmath --disable-decimal-float
29
29
  GCC_CONFIG += --disable-multilib
30
30
  EOF
31
31
 
32
- make -j$(nproc) install LINUX_HEADERS_SITE=http://mirrors.2f30.org/sabotage/tarballs/
32
+ make -j$(nproc) install
33
33
 
34
34
  popd
35
35
 
@@ -40,6 +40,12 @@ module RakeCompilerDock
40
40
  attr_reader :tree_deps
41
41
  attr_reader :final_deps
42
42
 
43
+ # All intermediate build nodes, including isolated ones with no tree dependencies.
44
+ # Use this instead of tree_deps when iterating all CI build jobs.
45
+ def all_deps
46
+ file_deps.keys
47
+ end
48
+
43
49
  def initialize(dockerfiles, workdir: "tmp/docker", inputdir: ".", task_prefix: "common-")
44
50
  FileUtils.mkdir_p(workdir)
45
51
 
@@ -1,4 +1,4 @@
1
1
  module RakeCompilerDock
2
- VERSION = "1.11.1"
3
- IMAGE_VERSION = "1.11.1"
2
+ VERSION = "1.12.0"
3
+ IMAGE_VERSION = "1.12.0"
4
4
  end
@@ -82,20 +82,19 @@ module RakeCompilerDock
82
82
  #
83
83
  # RakeCompilerDock.cross_rubies
84
84
  # # => {
85
- # # "3.4" => "3.4.8",
86
- # # "3.3" => "3.3.10",
87
- # # "3.2" => "3.2.9",
85
+ # # "3.4" => "3.4.9",
86
+ # # "3.3" => "3.3.11",
87
+ # # "3.2" => "3.2.11",
88
88
  # # "3.1" => "3.1.7",
89
89
  # # "3.0" => "3.0.7",
90
- # # "2.7" => "2.7.8",
91
90
  # # }
92
91
  #
93
92
  def cross_rubies
94
93
  {
95
- "4.0" => "4.0.0",
96
- "3.4" => "3.4.8",
97
- "3.3" => "3.3.10",
98
- "3.2" => "3.2.9",
94
+ "4.0" => "4.0.2",
95
+ "3.4" => "3.4.9",
96
+ "3.3" => "3.3.11",
97
+ "3.2" => "3.2.11",
99
98
  "3.1" => "3.1.7",
100
99
  "3.0" => "3.0.7",
101
100
  }
@@ -111,14 +110,14 @@ module RakeCompilerDock
111
110
  # Note that the returned string will contain versions sorted in descending order.
112
111
  #
113
112
  # For example:
114
- # RakeCompilerDock.ruby_cc_version("2.7", "3.4")
115
- # # => "3.4.8:2.7.8"
113
+ # RakeCompilerDock.ruby_cc_version("3.0", "3.4")
114
+ # # => "3.4.9:3.0.7"
116
115
  #
117
116
  # RakeCompilerDock.ruby_cc_version("~> 3.2")
118
- # # => "3.4.8:3.3.10:3.2.9"
117
+ # # => "3.4.9:3.3.11:3.2.11"
119
118
  #
120
119
  # RakeCompilerDock.ruby_cc_version(Gem::Requirement.new("~> 3.2"))
121
- # # => "3.4.8:3.3.10:3.2.9"
120
+ # # => "3.4.9:3.3.11:3.2.11"
122
121
  #
123
122
  def ruby_cc_version(*requirements)
124
123
  cross = cross_rubies
@@ -68,6 +68,27 @@ class TestParallelDockerBuild < Test::Unit::TestCase
68
68
  assert_equal "FROM a\n", read_df(hd "File0File1File2File3")
69
69
  end
70
70
 
71
+ def test_all_deps_includes_isolated_file
72
+ # File5 shares no common prefix with File0-File3, simulating the jruby Dockerfile
73
+ # which shares no common layers with MRI Dockerfiles.
74
+ Dir.chdir(@tmpdir) do
75
+ File.write "File5", <<-EOT
76
+ FROM b
77
+ RUN x
78
+ EOT
79
+ end
80
+
81
+ pdb = Dir.chdir(@tmpdir) do
82
+ RakeCompilerDock::ParallelDockerBuild.new(%w[ File0 File1 File2 File3 File5 ], task_prefix: "y")
83
+ end
84
+
85
+ file5_final_dep = pdb.final_deps["File5"]
86
+ assert_not_nil file5_final_dep
87
+
88
+ assert_operator pdb.all_deps, :include?, file5_final_dep,
89
+ "all_deps should include every final_dep value so CI generates build jobs for all images"
90
+ end
91
+
71
92
  def read_df(fn)
72
93
  File.read(File.join(@tmpdir, "/tmp/docker", fn)).each_line.map(&:lstrip).join
73
94
  end
@@ -0,0 +1,12 @@
1
+ require 'rake_compiler_dock'
2
+ require 'test/unit'
3
+
4
+ class TestRubygemsPlugins < Test::Unit::TestCase
5
+ TEST_PLATFORM = ENV["TEST_PLATFORM"] || 'x86_64-linux'
6
+
7
+ def test_gem_inst_with_plugin
8
+ # This verifies that gem install doesn't fail due to insufficient permissions to some rubygems plugin file like:
9
+ # /usr/local/rbenv/versions/4.0.0/lib/ruby/gems/4.0.0/plugins/rdoc_plugin.rb
10
+ RakeCompilerDock::Starter.sh "gem inst --silent rdoc gem-wrappers", platform: TEST_PLATFORM, verbose: false
11
+ end
12
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rake-compiler-dock
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.11.1
4
+ version: 1.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lars Kanis
@@ -126,6 +126,7 @@ files:
126
126
  - test/test_environment_variables.rb
127
127
  - test/test_mig.rb
128
128
  - test/test_parallel_docker_build.rb
129
+ - test/test_rubygems_plugins.rb
129
130
  - test/test_starter.rb
130
131
  - test/test_versions.rb
131
132
  homepage: https://github.com/rake-compiler/rake-compiler-dock
@@ -146,7 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
146
147
  - !ruby/object:Gem::Version
147
148
  version: '0'
148
149
  requirements: []
149
- rubygems_version: 4.0.3
150
+ rubygems_version: 4.0.6
150
151
  specification_version: 4
151
152
  summary: Easy to use and reliable cross compiler environment for building Windows
152
153
  and Linux binary gems.
@@ -167,5 +168,6 @@ test_files:
167
168
  - test/test_environment_variables.rb
168
169
  - test/test_mig.rb
169
170
  - test/test_parallel_docker_build.rb
171
+ - test/test_rubygems_plugins.rb
170
172
  - test/test_starter.rb
171
173
  - test/test_versions.rb