rake-compiler-dock 1.7.1 → 1.9.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/ci.yml +3 -2
- data/Dockerfile.jruby +3 -1
- data/Dockerfile.mri.erb +69 -61
- data/History.md +33 -0
- data/build/mk_osxcross.sh +2 -0
- data/build/patches/rake-compiler-1.2.9/0005-build-miniruby-first.patch +17 -0
- data/lib/rake_compiler_dock/version.rb +2 -2
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a59f63867c312521f69bb31aae8cc5d64b1386b4e0265697f2d94a8119cdb65
|
4
|
+
data.tar.gz: 6b5820fec1db079e704bc03e9e2cee3e8c7304e877c98f1bd187a3205aa6a232
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fcc064e935c6abac109883672ec3b0d087f27bc5dbe1b32ad52b467d2388c1a7dc40f97f496dd10442b98a92ac10533b493ab0763f84c2180e17f8b0cfc3e42e
|
7
|
+
data.tar.gz: e4739c09899d1f5fbaa4ebd1eb1fd5f81be132dacb64217901890937561eeb50fac4161e7133b9c90ec569766b86e2dca81fa1dfe42a307ec7e0e0a894a03f5c
|
data/.github/workflows/ci.yml
CHANGED
@@ -187,9 +187,10 @@ jobs:
|
|
187
187
|
uses: actions/download-artifact@v4
|
188
188
|
with:
|
189
189
|
name: gem-${{ matrix.platform }}
|
190
|
+
- if: matrix.rubygems
|
191
|
+
run: gem update --system ${{ matrix.rubygems }}
|
190
192
|
- name: Test gem-${{ matrix.platform }}
|
191
193
|
run: |
|
192
|
-
gem update --system ${{ matrix.rubygems }}
|
193
194
|
gem install --local *.gem --verbose
|
194
195
|
cd test/rcd_test/
|
195
196
|
bundle install
|
@@ -250,7 +251,7 @@ jobs:
|
|
250
251
|
docker run --rm -v $PWD:/work -w /work \
|
251
252
|
${{ matrix.docker_platform}} ruby:${{ matrix.ruby }}${{ matrix.docker_tag }} \
|
252
253
|
sh -c "
|
253
|
-
gem update --system ${{ matrix.rubygems }} &&
|
254
|
+
if test -n '${{ matrix.rubygems }}' ; then gem update --system ${{ matrix.rubygems }} ; fi &&
|
254
255
|
gem install --local *.gem --verbose &&
|
255
256
|
cd test/rcd_test/ &&
|
256
257
|
bundle install &&
|
data/Dockerfile.jruby
CHANGED
@@ -50,7 +50,9 @@ RUN bash -c " \
|
|
50
50
|
rbenv shell \$v && \
|
51
51
|
gem install rake-compiler -v1.2.9 && \
|
52
52
|
cd ${RBENV_ROOT}/versions/\$v/lib/ruby/gems/*/gems/rake-compiler-1.2.9 && \
|
53
|
-
patch
|
53
|
+
for patch in /home/rubyuser/patches/rake-compiler-1.2.9/*.patch ; do \
|
54
|
+
patch -p1 < \$patch ; \
|
55
|
+
done \
|
54
56
|
done \
|
55
57
|
"
|
56
58
|
|
data/Dockerfile.mri.erb
CHANGED
@@ -10,28 +10,6 @@ RUN apt-get -y update && \
|
|
10
10
|
apt-get install -y autoconf cmake pkg-config zlib1g-dev libreadline-dev libsqlite0-dev libssl-dev libyaml-dev libffi-dev && \
|
11
11
|
rm -rf /var/lib/apt/lists/*
|
12
12
|
|
13
|
-
##
|
14
|
-
## install rbenv and ruby-build
|
15
|
-
##
|
16
|
-
RUN groupadd -r rubyuser && useradd -r -g rubyuser -G sudo -p "" --create-home rubyuser
|
17
|
-
|
18
|
-
ENV RBENV_ROOT=/usr/local/rbenv RBENV_RUBIES="2.5.9 3.1.3"
|
19
|
-
|
20
|
-
# chown after running `rbenv init` because that command creates some subdirectories
|
21
|
-
RUN git clone https://github.com/rbenv/rbenv.git ${RBENV_ROOT} && \
|
22
|
-
git clone https://github.com/rbenv/ruby-build.git ${RBENV_ROOT}/plugins/ruby-build && \
|
23
|
-
\
|
24
|
-
echo "export RBENV_ROOT=/usr/local/rbenv" >> /etc/rubybashrc && \
|
25
|
-
echo "export PATH=$RBENV_ROOT/bin:\$PATH" >> /etc/rubybashrc && \
|
26
|
-
$RBENV_ROOT/bin/rbenv init - --no-rehash bash >> /etc/rubybashrc && \
|
27
|
-
echo "source /etc/rubybashrc" >> /etc/bashrc && \
|
28
|
-
echo "source /etc/rubybashrc" >> /etc/bash.bashrc && \
|
29
|
-
\
|
30
|
-
chown -R rubyuser:rubyuser ${RBENV_ROOT} && \
|
31
|
-
find ${RBENV_ROOT} -type d -print0 | sudo xargs -0 chmod g+sw
|
32
|
-
ENV BASH_ENV=/etc/rubybashrc
|
33
|
-
|
34
|
-
|
35
13
|
##
|
36
14
|
## Install cross compilers
|
37
15
|
##
|
@@ -69,31 +47,57 @@ RUN /tmp/mk_osxcross.sh
|
|
69
47
|
<% end %>
|
70
48
|
|
71
49
|
|
50
|
+
##
|
51
|
+
## install rbenv and ruby-build
|
52
|
+
##
|
53
|
+
RUN groupadd -r rubyuser && useradd -r -g rubyuser -G sudo -p "" --create-home rubyuser
|
54
|
+
|
55
|
+
ENV RBENV_ROOT=/usr/local/rbenv
|
56
|
+
|
57
|
+
# chown after running `rbenv init` because that command creates some subdirectories
|
58
|
+
RUN git clone https://github.com/rbenv/rbenv.git ${RBENV_ROOT} && \
|
59
|
+
git clone https://github.com/rbenv/ruby-build.git ${RBENV_ROOT}/plugins/ruby-build && \
|
60
|
+
\
|
61
|
+
echo "export RBENV_ROOT=/usr/local/rbenv" >> /etc/rubybashrc && \
|
62
|
+
echo "export PATH=$RBENV_ROOT/bin:\$PATH" >> /etc/rubybashrc && \
|
63
|
+
$RBENV_ROOT/bin/rbenv init - --no-rehash bash >> /etc/rubybashrc && \
|
64
|
+
echo "source /etc/rubybashrc" >> /etc/bashrc && \
|
65
|
+
echo "source /etc/rubybashrc" >> /etc/bash.bashrc && \
|
66
|
+
\
|
67
|
+
chown -R rubyuser:rubyuser ${RBENV_ROOT} && \
|
68
|
+
find ${RBENV_ROOT} -type d -print0 | sudo xargs -0 chmod g+sw
|
69
|
+
ENV BASH_ENV=/etc/rubybashrc
|
70
|
+
|
71
|
+
|
72
72
|
##
|
73
73
|
## set up rake-compiler and install bootstrap rubies
|
74
74
|
##
|
75
75
|
USER rubyuser
|
76
76
|
|
77
|
+
ENV RBENV_RUBIES="2.5.9 3.1.6 3.4.1"
|
78
|
+
|
77
79
|
# Install the bootstrap rubies
|
78
80
|
RUN bash -c " \
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
81
|
+
echo 'gem: --no-ri --no-rdoc --no-document' >> ~/.gemrc && \
|
82
|
+
export CFLAGS='-s -O3 -fno-fast-math -fPIC' && \
|
83
|
+
for v in ${RBENV_RUBIES} ; do \
|
84
|
+
rbenv install \$v -- --disable-install-doc ; \
|
85
|
+
done && \
|
86
|
+
find ${RBENV_ROOT} -type d -print0 | sudo xargs -0 chmod g+w \
|
87
|
+
"
|
86
88
|
|
87
89
|
# Install rake-compiler and patch it to build and install static libraries for Linux rubies
|
88
90
|
COPY build/patches /home/rubyuser/patches
|
89
91
|
RUN bash -c " \
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
92
|
+
for v in ${RBENV_RUBIES} ; do \
|
93
|
+
rbenv shell \$v && \
|
94
|
+
gem install rake-compiler -v1.2.9 && \
|
95
|
+
cd ${RBENV_ROOT}/versions/\$v/lib/ruby/gems/*/gems/rake-compiler-1.2.9 && \
|
96
|
+
for patch in /home/rubyuser/patches/rake-compiler-1.2.9/*.patch ; do \
|
97
|
+
patch -p1 < \$patch ; \
|
98
|
+
done \
|
99
|
+
done \
|
100
|
+
"
|
97
101
|
|
98
102
|
# Install rake-compiler's cross rubies in global dir instead of /root
|
99
103
|
RUN sudo mkdir -p /usr/local/rake-compiler && \
|
@@ -110,19 +114,20 @@ RUN sudo mkdir -p /usr/local/rake-compiler && \
|
|
110
114
|
#
|
111
115
|
xrubies_build_plan = if platform =~ /x64-mingw-ucrt/
|
112
116
|
[
|
113
|
-
# Rubyinstaller-3.1
|
114
|
-
["3.4.1:3.3.
|
117
|
+
# Rubyinstaller-3.1+ is platform x64-mingw-ucrt
|
118
|
+
["3.4.1:3.3.7:3.2.6:3.1.6", "3.4.1"],
|
115
119
|
]
|
116
120
|
elsif platform =~ /x64-mingw32/
|
117
121
|
[
|
118
|
-
# Rubyinstaller prior to 3.1
|
119
|
-
["2.6.
|
120
|
-
["3.0.
|
122
|
+
# Rubyinstaller prior to 3.1 is platform x64-mingw32
|
123
|
+
["2.6.10:2.5.9:2.4.10", "2.5.9"],
|
124
|
+
["3.0.7:2.7.8", "3.1.6"],
|
121
125
|
]
|
122
126
|
else
|
123
127
|
[
|
124
|
-
["2.6.
|
125
|
-
["
|
128
|
+
["2.6.10:2.5.9:2.4.10", "2.5.9"],
|
129
|
+
["2.7.8", "3.1.6"],
|
130
|
+
["3.4.1:3.3.7:3.2.6:3.1.6:3.0.7", "3.4.1"],
|
126
131
|
]
|
127
132
|
end
|
128
133
|
|
@@ -130,16 +135,16 @@ strip = '-s' if platform !~ /darwin/
|
|
130
135
|
|
131
136
|
xrubies_build_plan.each do |xrubies, bootstrap_ruby_version| %>
|
132
137
|
RUN bash -c " \
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
138
|
+
rbenv shell <%= bootstrap_ruby_version %> && \
|
139
|
+
export CPPFLAGS='<%= "-D__USE_MINGW_ANSI_STDIO=1" if platform =~ /x64-mingw-ucrt/ %>' && \
|
140
|
+
export CFLAGS='-O1 -fno-omit-frame-pointer -fno-fast-math -fstack-protector-strong <%= strip %>' && \
|
141
|
+
export LDFLAGS='-pipe <%= strip %>' && \
|
142
|
+
<%= "export LIBS='-l:libssp.a' &&" if platform =~ /mingw/ %> \
|
143
|
+
<%= "export CC=#{target}-clang &&" if platform =~ /darwin/ %> \
|
144
|
+
export MAKE='make V=1' && \
|
145
|
+
rake-compiler cross-ruby VERSION=<%= xrubies %> HOST=<%= target %> && \
|
146
|
+
rm -rf ~/.rake-compiler/builds ~/.rake-compiler/sources \
|
147
|
+
"
|
143
148
|
<% end %>
|
144
149
|
# "
|
145
150
|
|
@@ -165,12 +170,15 @@ RUN find /usr/local/rake-compiler/ruby -name lib*-ruby*.dll.a | while read f ; d
|
|
165
170
|
RUN find /usr/local/rake-compiler/ruby -name rbconfig.rb | while read f ; do sed -i 's/-lcrypt//' $f ; done
|
166
171
|
|
167
172
|
<% if platform =~ /darwin/ %>
|
168
|
-
#
|
169
|
-
# -
|
170
|
-
# -
|
171
|
-
#
|
172
|
-
|
173
|
-
|
173
|
+
# for rubies which use `-bundle_loader` on darwin
|
174
|
+
# - the upstream change: https://github.com/ruby/ruby/pull/6193
|
175
|
+
# - how we got to this solution: https://github.com/rake-compiler/rake-compiler-dock/issues/87
|
176
|
+
#
|
177
|
+
# note that ruby/ruby#6193 was backported to 2.7.7, 3.0.5, and 3.1.3
|
178
|
+
# - see https://github.com/rake-compiler/rake-compiler-dock/issues/134 for more notes
|
179
|
+
RUN find /usr/local/rake-compiler/ruby/*/*/lib/ruby -name rbconfig.rb | while read f ; do \
|
180
|
+
sed -E -i 's/(\["EXTDLDFLAGS"\] = ".*)(-bundle_loader)/\1-Wl,-flat_namespace \2/' $f ; \
|
181
|
+
done
|
174
182
|
<% end %>
|
175
183
|
|
176
184
|
|
@@ -216,8 +224,8 @@ RUN echo 'source /etc/profile.d/rcd-env.sh' >> /etc/rubybashrc
|
|
216
224
|
# Install sudoers configuration
|
217
225
|
COPY build/sudoers /etc/sudoers.d/rake-compiler-dock
|
218
226
|
|
219
|
-
RUN bash -c "rbenv global 3.1
|
227
|
+
RUN bash -c "rbenv global 3.4.1"
|
220
228
|
|
221
|
-
ENV RUBY_CC_VERSION=3.4.1:3.3.
|
229
|
+
ENV RUBY_CC_VERSION=3.4.1:3.3.7:3.2.6:3.1.6:3.0.7:2.7.8:2.6.10:2.5.9:2.4.10
|
222
230
|
|
223
231
|
CMD bash
|
data/History.md
CHANGED
@@ -1,5 +1,38 @@
|
|
1
1
|
# `rake-compiler/rake-compiler-dock` Changelog
|
2
2
|
|
3
|
+
## v1.9.0 / 2025-01-19
|
4
|
+
|
5
|
+
### Changes
|
6
|
+
|
7
|
+
- Bump Ruby 3.3 to v3.3.7 (from v3.3.5). #147 @flavorjones
|
8
|
+
- The default `rbenv` ruby in the container is now Ruby v3.4.1 (previously the default was 3.1.6), which allows gems to drop Ruby 3.1 from their gemspecs. Fixes #145. #146 @flavorjones
|
9
|
+
- Ruby 3.4.x, 3.3.x, 3.2.x, 3.1.x, and 3.0.x are cross-compiled using Ruby v3.4.1. #146 @flavorjones
|
10
|
+
|
11
|
+
### CRuby container summary
|
12
|
+
|
13
|
+
- native rubies: 3.4.1 (default), 3.1.6, 2.5.9
|
14
|
+
- `RUBY_CC_VERSION=3.4.1:3.3.7:3.2.6:3.1.6:3.0.7:2.7.8:2.6.10:2.5.9:2.4.10`
|
15
|
+
|
16
|
+
|
17
|
+
## v1.8.0 / 2025-01-05
|
18
|
+
|
19
|
+
### Notable changes
|
20
|
+
|
21
|
+
All versions of Ruby in the build containers are the latest patch version. #135 @flavorjones
|
22
|
+
- `RUBY_CC_VERSION=3.4.1:3.3.5:3.2.6:3.1.6:3.0.7:2.7.8:2.6.10:2.5.9:2.4.10`
|
23
|
+
|
24
|
+
### Other changes
|
25
|
+
|
26
|
+
- Base ruby updated to v3.1.6 (from v3.1.3), which is now the default `rbenv` ruby.
|
27
|
+
- (Darwin) Set `OSXCROSS_PKG_CONFIG_USE_NATIVE_VARIABLES=1` to successfully build the 3.0 series.
|
28
|
+
- (Darwin) The linker flags include `-Wl,-flat_namespace` for 2.7, 3.0, 3.1, 3.2, 3.3, and 3.4 rubies. Previously this was only needed for 3.2+, but code backported to 2.7.7, 3.0.5, and 3.1.3 required it for those versions as well.
|
29
|
+
|
30
|
+
### CRuby container summary
|
31
|
+
|
32
|
+
- native rubies: 3.1.6 (default), 2.5.9
|
33
|
+
- `RUBY_CC_VERSION=3.4.1:3.3.5:3.2.6:3.1.6:3.0.7:2.7.8:2.6.10:2.5.9:2.4.10`
|
34
|
+
|
35
|
+
|
3
36
|
## v1.7.1 / 2025-01-03
|
4
37
|
|
5
38
|
- Bump rake-compiler dependency to v1.2.9 (from v1.2.5).
|
data/build/mk_osxcross.sh
CHANGED
@@ -27,6 +27,8 @@ rm -rf *~ build tarballs/*
|
|
27
27
|
echo "export PATH=/opt/osxcross/target/bin:\$PATH" >> /etc/rubybashrc
|
28
28
|
echo "export MACOSX_DEPLOYMENT_TARGET=10.13" >> /etc/rubybashrc
|
29
29
|
echo "export OSXCROSS_MP_INC=1" >> /etc/rubybashrc
|
30
|
+
echo "export OSXCROSS_PKG_CONFIG_USE_NATIVE_VARIABLES=1" >> /etc/rubybashrc
|
31
|
+
|
30
32
|
|
31
33
|
# Add links to build tools without target version kind of:
|
32
34
|
# arm64-apple-darwin-clang => arm64-apple-darwin20.1-clang
|
@@ -0,0 +1,17 @@
|
|
1
|
+
diff --git a/tasks/bin/cross-ruby.rake b/tasks/bin/cross-ruby.rake
|
2
|
+
index d37ab97b..0df44b30 100644
|
3
|
+
--- a/tasks/bin/cross-ruby.rake
|
4
|
+
+++ b/tasks/bin/cross-ruby.rake
|
5
|
+
@@ -129,6 +129,12 @@
|
6
|
+
|
7
|
+
# make
|
8
|
+
file "#{build_dir}/ruby.exe" => ["#{build_dir}/Makefile"] do |t|
|
9
|
+
+ puts "MIKE: #{ruby_cc_version}: #{mingw_target}"
|
10
|
+
+ if ruby_cc_version.start_with?("ruby-3.1") && mingw_target =~ /darwin/
|
11
|
+
+ # for later 3.1.x releases, we need to explicitly build miniruby
|
12
|
+
+ # see https://bugs.ruby-lang.org/issues/19239
|
13
|
+
+ sh "#{MAKE} miniruby", chdir: File.dirname(t.prerequisites.first)
|
14
|
+
+ end
|
15
|
+
sh MAKE, chdir: File.dirname(t.prerequisites.first)
|
16
|
+
end
|
17
|
+
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
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.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lars Kanis
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-01-
|
10
|
+
date: 2025-01-19 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: bundler
|
@@ -88,6 +88,7 @@ files:
|
|
88
88
|
- build/mk_pkg_config.sh
|
89
89
|
- build/parallel_docker_build.rb
|
90
90
|
- build/patches/rake-compiler-1.2.9/0004-Enable-build-of-static-libruby.patch
|
91
|
+
- build/patches/rake-compiler-1.2.9/0005-build-miniruby-first.patch
|
91
92
|
- build/rcd-env.sh
|
92
93
|
- build/runas
|
93
94
|
- build/sigfw.c
|