rake-compiler-dock 1.7.1 → 1.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +3 -2
- data/Dockerfile.jruby +3 -1
- data/Dockerfile.mri.erb +45 -38
- data/History.md +14 -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: d8defac75bbfdcb50e87c34ae26c04eeac94d56144481a01ea096cffe70f33ac
|
4
|
+
data.tar.gz: 5fe13b2f51bea09bb8ed3f02c170ccf2984aa6fcd74bed05b74643d658a0d615
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 94bb24cf349bc6099fc6dd07ffe860588a782ef0408af57c59001a4100a5be568489e7d8610a840949590086289a474c123be34da1193633c7ba6aaff733c2fb
|
7
|
+
data.tar.gz: 2123aa6ccb22c06ee123e58eb34e306a0f8e5b69e57fd6124b1bfe7cdd42a5f2a83a0b7c6ce63015e7c02f706f011bd46a1b0e56b823d86997a702fa7ab57525
|
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,11 +47,35 @@ 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"
|
78
|
+
|
77
79
|
# Install the bootstrap rubies
|
78
80
|
RUN bash -c " \
|
79
81
|
echo 'gem: --no-ri --no-rdoc --no-document' >> ~/.gemrc && \
|
@@ -91,7 +93,9 @@ RUN bash -c " \
|
|
91
93
|
rbenv shell \$v && \
|
92
94
|
gem install rake-compiler -v1.2.9 && \
|
93
95
|
cd ${RBENV_ROOT}/versions/\$v/lib/ruby/gems/*/gems/rake-compiler-1.2.9 && \
|
94
|
-
patch
|
96
|
+
for patch in /home/rubyuser/patches/rake-compiler-1.2.9/*.patch ; do \
|
97
|
+
patch -p1 < \$patch ; \
|
98
|
+
done \
|
95
99
|
done \
|
96
100
|
"
|
97
101
|
|
@@ -110,19 +114,19 @@ 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.5:3.2.
|
117
|
+
# Rubyinstaller-3.1+ is platform x64-mingw-ucrt
|
118
|
+
["3.4.1:3.3.5:3.2.6:3.1.6", "3.1.6"],
|
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
|
-
["3.4.1:3.3.5:3.2.
|
128
|
+
["2.6.10:2.5.9:2.4.10", "2.5.9"],
|
129
|
+
["3.4.1:3.3.5:3.2.6:3.1.6:3.0.7:2.7.8", "3.1.6"],
|
126
130
|
]
|
127
131
|
end
|
128
132
|
|
@@ -165,12 +169,15 @@ RUN find /usr/local/rake-compiler/ruby -name lib*-ruby*.dll.a | while read f ; d
|
|
165
169
|
RUN find /usr/local/rake-compiler/ruby -name rbconfig.rb | while read f ; do sed -i 's/-lcrypt//' $f ; done
|
166
170
|
|
167
171
|
<% if platform =~ /darwin/ %>
|
168
|
-
#
|
169
|
-
# -
|
170
|
-
# -
|
171
|
-
#
|
172
|
-
|
173
|
-
|
172
|
+
# for rubies which use `-bundle_loader` on darwin
|
173
|
+
# - the upstream change: https://github.com/ruby/ruby/pull/6193
|
174
|
+
# - how we got to this solution: https://github.com/rake-compiler/rake-compiler-dock/issues/87
|
175
|
+
#
|
176
|
+
# note that ruby/ruby#6193 was backported to 2.7.7, 3.0.5, and 3.1.3
|
177
|
+
# - see https://github.com/rake-compiler/rake-compiler-dock/issues/134 for more notes
|
178
|
+
RUN find /usr/local/rake-compiler/ruby/*/*/lib/ruby -name rbconfig.rb | while read f ; do \
|
179
|
+
sed -E -i 's/(\["EXTDLDFLAGS"\] = ".*)(-bundle_loader)/\1-Wl,-flat_namespace \2/' $f ; \
|
180
|
+
done
|
174
181
|
<% end %>
|
175
182
|
|
176
183
|
|
@@ -216,8 +223,8 @@ RUN echo 'source /etc/profile.d/rcd-env.sh' >> /etc/rubybashrc
|
|
216
223
|
# Install sudoers configuration
|
217
224
|
COPY build/sudoers /etc/sudoers.d/rake-compiler-dock
|
218
225
|
|
219
|
-
RUN bash -c "rbenv global 3.1.
|
226
|
+
RUN bash -c "rbenv global 3.1.6"
|
220
227
|
|
221
|
-
ENV RUBY_CC_VERSION=3.4.1:3.3.5:3.2.
|
228
|
+
ENV 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
|
222
229
|
|
223
230
|
CMD bash
|
data/History.md
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
# `rake-compiler/rake-compiler-dock` Changelog
|
2
2
|
|
3
|
+
## v1.8.0 / 2025-01-05
|
4
|
+
|
5
|
+
### Notable changes
|
6
|
+
|
7
|
+
All versions of Ruby in the build containers are the latest patch version. #135 @flavorjones
|
8
|
+
- `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`
|
9
|
+
|
10
|
+
### Other changes
|
11
|
+
|
12
|
+
- Base ruby updated to v3.1.6 (from v3.1.3), which is now the default `rbenv` ruby.
|
13
|
+
- (Darwin) Set `OSXCROSS_PKG_CONFIG_USE_NATIVE_VARIABLES=1` to successfully build the 3.0 series.
|
14
|
+
- (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.
|
15
|
+
|
16
|
+
|
3
17
|
## v1.7.1 / 2025-01-03
|
4
18
|
|
5
19
|
- 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.8.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-06 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
|