rake-compiler-dock 1.11.0 → 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.
- checksums.yaml +4 -4
- data/.github/workflows/publish-images.yml +226 -188
- data/.github/workflows/publish-images.yml.erb +23 -30
- data/.github/workflows/release-images.yml +225 -193
- data/CHANGELOG.md +18 -3
- data/Dockerfile.jruby +4 -4
- data/Dockerfile.mri.erb +12 -11
- data/Rakefile +11 -0
- data/build/gem_helper.rb +0 -4
- data/build/mk_musl_cross.sh +1 -1
- data/build/parallel_docker_build.rb +6 -0
- data/lib/rake_compiler_dock/version.rb +2 -2
- data/lib/rake_compiler_dock.rb +11 -12
- data/test/test_parallel_docker_build.rb +21 -0
- data/test/test_rubygems_plugins.rb +12 -0
- metadata +5 -28
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- metadata.gz.sig +0 -7
data/CHANGELOG.md
CHANGED
|
@@ -1,14 +1,29 @@
|
|
|
1
1
|
# `rake-compiler/rake-compiler-dock` Changelog
|
|
2
2
|
|
|
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
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## 1.11.1 / 2025-12-26
|
|
14
|
+
|
|
15
|
+
- Replace JRuby 9.4 with JRuby 10.0 in the JRuby build container. #185 @flavorjones
|
|
16
|
+
|
|
17
|
+
|
|
3
18
|
## 1.11.0 / 2025-12-25
|
|
4
19
|
|
|
5
20
|
- Bump Ruby 4 cross-compilation support to 4.0.0.
|
|
6
|
-
- Drop support for Ruby 2.7. #180
|
|
7
|
-
- Remove native Ruby 3.4.8 from the host environment. #178
|
|
21
|
+
- Drop support for Ruby 2.7. #180 @larskanis
|
|
22
|
+
- Remove native Ruby 3.4.8 from the host environment. #178 @larskanis
|
|
8
23
|
|
|
9
24
|
### CRuby container summary
|
|
10
25
|
|
|
11
|
-
- native rubies: 4.0.0
|
|
26
|
+
- native rubies: 4.0.0 (default), 3.1.7
|
|
12
27
|
- `RUBY_CC_VERSION=4.0.0:3.4.8:3.3.10:3.2.9:3.1.7:3.0.7`
|
|
13
28
|
|
|
14
29
|
|
data/Dockerfile.jruby
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
FROM ubuntu:
|
|
1
|
+
FROM ubuntu:24.04
|
|
2
2
|
|
|
3
3
|
ENV DEBIAN_FRONTEND noninteractive
|
|
4
4
|
RUN apt-get -y update && \
|
|
5
5
|
apt-get install -y sudo wget curl git-core build-essential xz-utils unzip dirmngr && \
|
|
6
|
-
apt-get install -y openjdk-
|
|
6
|
+
apt-get install -y openjdk-21-jdk-headless maven && \
|
|
7
7
|
rm -rf /var/lib/apt/lists/*
|
|
8
8
|
|
|
9
9
|
##
|
|
@@ -11,7 +11,7 @@ RUN apt-get -y update && \
|
|
|
11
11
|
##
|
|
12
12
|
RUN groupadd -r rubyuser && useradd -r -g rubyuser -G sudo -p "" --create-home rubyuser
|
|
13
13
|
|
|
14
|
-
ENV RBENV_ROOT=/usr/local/rbenv RBENV_RUBIES="jruby-
|
|
14
|
+
ENV RBENV_ROOT=/usr/local/rbenv RBENV_RUBIES="jruby-10.0.0.0"
|
|
15
15
|
|
|
16
16
|
# chown after running `rbenv init` because that command creates some subdirectories
|
|
17
17
|
RUN git clone https://github.com/rbenv/rbenv.git ${RBENV_ROOT} && \
|
|
@@ -74,6 +74,6 @@ COPY build/runas /usr/local/bin/
|
|
|
74
74
|
# Install sudoers configuration
|
|
75
75
|
COPY build/sudoers /etc/sudoers.d/rake-compiler-dock
|
|
76
76
|
|
|
77
|
-
RUN bash -c "rbenv global jruby-
|
|
77
|
+
RUN bash -c "rbenv global jruby-10.0.0.0"
|
|
78
78
|
|
|
79
79
|
CMD bash
|
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.
|
|
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.
|
|
155
|
-
["4.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.
|
|
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.
|
|
170
|
-
["3.4.
|
|
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.
|
|
175
|
-
["4.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.
|
|
278
|
+
RUN bash -c "rbenv global 4.0.2"
|
|
278
279
|
|
|
279
|
-
ENV RUBY_CC_VERSION=4.0.
|
|
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"
|
data/build/gem_helper.rb
CHANGED
data/build/mk_musl_cross.sh
CHANGED
|
@@ -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
|
|
data/lib/rake_compiler_dock.rb
CHANGED
|
@@ -82,20 +82,19 @@ module RakeCompilerDock
|
|
|
82
82
|
#
|
|
83
83
|
# RakeCompilerDock.cross_rubies
|
|
84
84
|
# # => {
|
|
85
|
-
# # "3.4" => "3.4.
|
|
86
|
-
# # "3.3" => "3.3.
|
|
87
|
-
# # "3.2" => "3.2.
|
|
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.
|
|
96
|
-
"3.4" => "3.4.
|
|
97
|
-
"3.3" => "3.3.
|
|
98
|
-
"3.2" => "3.2.
|
|
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("
|
|
115
|
-
# # => "3.4.
|
|
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.
|
|
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.
|
|
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,37 +1,12 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rake-compiler-dock
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.12.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Lars Kanis
|
|
8
8
|
bindir: bin
|
|
9
|
-
cert_chain:
|
|
10
|
-
- |
|
|
11
|
-
-----BEGIN CERTIFICATE-----
|
|
12
|
-
MIIEBD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l1WiVPszr6HavQ//2I2UcSRSS5AGDdiSXcfyFmHtMBdtJHhTPcn7
|
|
27
|
-
4DLliB0szpvwG+ltGD8PI8eWkLaTQeFzs+0QCTavgKV+Zw56Q0J5zZvHHUMrLkUD
|
|
28
|
-
qhwKjdTdkrRTn9Sqi0BrIRRZGTUDdrt8qoWm35aES5arKZzytgrRD/kXfFW2LCg0
|
|
29
|
-
FzgTKibR4/3g8ph94kQLg/D2SMlVPkQ3ECi036mZxDC2n8V6u3rDkG5923wmrRZB
|
|
30
|
-
J6cqz475Q8HYORQCB68OPzkWMfC7mBo3vpSsIqRoNs1FE4FJu4FGwZG8fBSrDC4H
|
|
31
|
-
bZe+GtyS3e2SMjgT65zp35gLO9I7MquzYN9P6V2u1iBpTycchk5z9R1ghxzZSBT8
|
|
32
|
-
DrkJ9tVlPQtJB0LqT0tvBap4upnwT1xYq721b5dwH6AF4Pi6iz/dc5vnq1/MH8bV
|
|
33
|
-
8VbbBzzeE7MsvgkP3sHlLmY8PtuyViJ8
|
|
34
|
-
-----END CERTIFICATE-----
|
|
9
|
+
cert_chain: []
|
|
35
10
|
date: 1980-01-02 00:00:00.000000000 Z
|
|
36
11
|
dependencies:
|
|
37
12
|
- !ruby/object:Gem::Dependency
|
|
@@ -151,6 +126,7 @@ files:
|
|
|
151
126
|
- test/test_environment_variables.rb
|
|
152
127
|
- test/test_mig.rb
|
|
153
128
|
- test/test_parallel_docker_build.rb
|
|
129
|
+
- test/test_rubygems_plugins.rb
|
|
154
130
|
- test/test_starter.rb
|
|
155
131
|
- test/test_versions.rb
|
|
156
132
|
homepage: https://github.com/rake-compiler/rake-compiler-dock
|
|
@@ -171,7 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
171
147
|
- !ruby/object:Gem::Version
|
|
172
148
|
version: '0'
|
|
173
149
|
requirements: []
|
|
174
|
-
rubygems_version: 4.0.
|
|
150
|
+
rubygems_version: 4.0.6
|
|
175
151
|
specification_version: 4
|
|
176
152
|
summary: Easy to use and reliable cross compiler environment for building Windows
|
|
177
153
|
and Linux binary gems.
|
|
@@ -192,5 +168,6 @@ test_files:
|
|
|
192
168
|
- test/test_environment_variables.rb
|
|
193
169
|
- test/test_mig.rb
|
|
194
170
|
- test/test_parallel_docker_build.rb
|
|
171
|
+
- test/test_rubygems_plugins.rb
|
|
195
172
|
- test/test_starter.rb
|
|
196
173
|
- test/test_versions.rb
|
checksums.yaml.gz.sig
DELETED
|
Binary file
|
data.tar.gz.sig
DELETED
|
Binary file
|
metadata.gz.sig
DELETED