Skip to content

Commit 2094504

Browse files
committed
bundler: Test bundle config set --local ssl_ca_cert
* Install bundler from junaruga/rubygems fork branch wip/bundler-fix-bundle-config-set-ssl_ca_cert in all CI jobs * Use bundle config set --local ssl_ca_cert instead of SSL_CERT_FILE * Workaround for ruby/rubygems#9610 Assisted-by: Claude Code
1 parent 05679fe commit 2094504

2 files changed

Lines changed: 37 additions & 10 deletions

File tree

.github/workflows/bundler.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,17 @@ jobs:
3131
- name: Setup
3232
run: ../rubygems/script/setup.sh
3333

34+
# Workaround to use `bundle config set ssl_ca_cert`.
35+
# https://github.com/ruby/rubygems/pull/9610
36+
- &install-bundler-from-fork
37+
name: Install bundler from fork
38+
run: |
39+
git clone -b wip/bundler-fix-bundle-config-set-ssl_ca_cert --depth 1 \
40+
https://github.com/junaruga/rubygems.git ~/git/junaruga/rubygems
41+
cd ~/git/junaruga/rubygems/bundler
42+
gem build bundler.gemspec
43+
gem install bundler-*.gem --no-document
44+
3445
- name: Run HTTPS server and client
3546
run: |
3647
../rubygems/script/run_https_server.rb &
@@ -55,6 +66,8 @@ jobs:
5566
- name: Setup
5667
run: ../rubygems/script/setup.sh
5768

69+
- *install-bundler-from-fork
70+
5871
- &clone-rubygems-server
5972
name: Clone rubygems-server (workaround for ruby-head)
6073
if: matrix.ruby-version == 'head'
@@ -86,6 +99,8 @@ jobs:
8699
- name: Setup
87100
run: ../rubygems/script/setup_nginx.sh
88101

102+
- *install-bundler-from-fork
103+
89104
- *clone-rubygems-server
90105

91106
- name: Run HTTP server, Nginx TLS proxy, and client
@@ -114,6 +129,8 @@ jobs:
114129
- name: Setup
115130
run: ../rubygems/script/setup.sh
116131

132+
- *install-bundler-from-fork
133+
117134
- name: Run PQC single HTTPS server and client
118135
run: |
119136
../rubygems/script/run_https_server.rb -s &
@@ -138,6 +155,8 @@ jobs:
138155
- name: Setup
139156
run: ../rubygems/script/setup.sh
140157

158+
- *install-bundler-from-fork
159+
141160
- *clone-rubygems-server
142161

143162
- name: Run HTTP server, PQC single TLS proxy, and client
@@ -166,6 +185,8 @@ jobs:
166185
- name: Setup
167186
run: ../rubygems/script/setup_nginx.sh
168187

188+
- *install-bundler-from-fork
189+
169190
- *clone-rubygems-server
170191

171192
- name: Run HTTP server, PQC single Nginx TLS proxy, and client
@@ -194,6 +215,8 @@ jobs:
194215
- name: Setup
195216
run: ../rubygems/script/setup.sh
196217

218+
- *install-bundler-from-fork
219+
197220
- name: Run PQC dual HTTPS server and client
198221
run: |
199222
../rubygems/script/run_https_server.rb -d &
@@ -218,6 +241,8 @@ jobs:
218241
- name: Setup
219242
run: ../rubygems/script/setup.sh
220243

244+
- *install-bundler-from-fork
245+
221246
- *clone-rubygems-server
222247

223248
- name: Run HTTP server, PQC dual TLS proxy, and client
@@ -246,6 +271,8 @@ jobs:
246271
- name: Setup
247272
run: ../rubygems/script/setup_nginx.sh
248273

274+
- *install-bundler-from-fork
275+
249276
- *clone-rubygems-server
250277

251278
- name: Run HTTP server, PQC dual Nginx TLS proxy, and client

bundler/script/run_client.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ if [[ "${PQC_DUAL}" = true ]]; then
7474
"(equivalent to ctx.sigalgs = 'mldsa65') ==="
7575
# FIXME: The `bundle config set ssl_ca_cert` command doesn't work.
7676
# https://bundler.io/man/bundle-config.1.html - ssl_ca_cert
77-
# bundle config set --local ssl_ca_cert "${SSL_DIR}/mldsa65-1.crt"
78-
export SSL_CERT_FILE="${SSL_DIR}/mldsa65-1.crt"
77+
bundle config set --local ssl_ca_cert "${SSL_DIR}/mldsa65-1.crt"
78+
# export SSL_CERT_FILE="${SSL_DIR}/mldsa65-1.crt"
7979
export OPENSSL_CONF="${SSL_DIR}/mldsa65-client.cnf"
8080
bundle config set --local \
8181
mirror.https://localhost:${PORT_HTTPS_NON_PQC} \
@@ -104,8 +104,8 @@ if [[ "${PQC_DUAL}" = true ]]; then
104104
"(equivalent to ctx.sigalgs = 'rsa_pss_rsae_sha256') ==="
105105
# FIXME: The `bundle config set ssl_ca_cert` command doesn't work.
106106
# https://bundler.io/man/bundle-config.1.html - ssl_ca_cert
107-
# bundle config set --local ssl_ca_cert "${SSL_DIR}/rsa-1.crt"
108-
export SSL_CERT_FILE="${SSL_DIR}/rsa-1.crt"
107+
bundle config set --local ssl_ca_cert "${SSL_DIR}/rsa-1.crt"
108+
# export SSL_CERT_FILE="${SSL_DIR}/rsa-1.crt"
109109
export OPENSSL_CONF="${SSL_DIR}/rsa-client.cnf"
110110
bundle config set --local \
111111
mirror.https://localhost:${PORT_HTTPS_NON_PQC} \
@@ -127,8 +127,8 @@ elif [[ "${PQC_SINGLE}" = true ]]; then
127127
"to port ${PORT_HTTPS} ==="
128128
# FIXME: The `bundle config set ssl_ca_cert` command doesn't work.
129129
# https://bundler.io/man/bundle-config.1.html - ssl_ca_cert
130-
# bundle config set --local ssl_ca_cert "${SSL_DIR}/mldsa65-1.crt"
131-
export SSL_CERT_FILE="${SSL_DIR}/mldsa65-1.crt"
130+
bundle config set --local ssl_ca_cert "${SSL_DIR}/mldsa65-1.crt"
131+
# export SSL_CERT_FILE="${SSL_DIR}/mldsa65-1.crt"
132132
bundle config set --local \
133133
mirror.https://localhost:${PORT_HTTPS_NON_PQC} \
134134
https://localhost:${PORT_HTTPS}
@@ -155,8 +155,8 @@ elif [[ "${PQC_SINGLE}" = true ]]; then
155155
"to port ${PORT_HTTPS_NON_PQC} ==="
156156
# FIXME: The `bundle config set ssl_ca_cert` command doesn't work.
157157
# https://bundler.io/man/bundle-config.1.html - ssl_ca_cert
158-
# bundle config set --local ssl_ca_cert "${SSL_DIR}/rsa-1.crt"
159-
export SSL_CERT_FILE="${SSL_DIR}/rsa-1.crt"
158+
bundle config set --local ssl_ca_cert "${SSL_DIR}/rsa-1.crt"
159+
# export SSL_CERT_FILE="${SSL_DIR}/rsa-1.crt"
160160
bundle config set --local path vendor/bundle
161161
bundle config list
162162
cp -p "${TOP_DIR}/client/Gemfile.1" Gemfile
@@ -172,8 +172,8 @@ else
172172

173173
# FIXME: The `bundle config set ssl_ca_cert` command doesn't work.
174174
# https://bundler.io/man/bundle-config.1.html - ssl_ca_cert
175-
# bundle config set --local ssl_ca_cert "${SSL_DIR}/rsa-1.crt"
176-
export SSL_CERT_FILE="${SSL_DIR}/rsa-1.crt"
175+
bundle config set --local ssl_ca_cert "${SSL_DIR}/rsa-1.crt"
176+
# export SSL_CERT_FILE="${SSL_DIR}/rsa-1.crt"
177177
bundle config set --local \
178178
mirror.https://localhost:${PORT_HTTPS_NON_PQC} \
179179
https://localhost:${PORT_HTTPS}

0 commit comments

Comments
 (0)