Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support build with openssl-1.1.x #433

Merged
merged 7 commits into from
Oct 17, 2019

Conversation

takumakume
Copy link
Collaborator

This PR will be able to build the ngx_mruby with openssl-1.1.x.

CI using openssl-1.0.x is gone.
I thought about doing both 1.0 and 1.1, but I thought it would be complicated.

Instead,
I performed a test overwriting this fix with 1.0.2. passed it.
takumakume#1

Pull-Request Check List

@matsumotory
Copy link
Owner

matsumotory commented Oct 16, 2019

@takumakume Thank you for your PR. These patches almost look good to me. Could you try to build on Vagrant using ngx_mruby vagrant environment?
And, if you need more patches to Vagrantfile, please write the code.

@takumakume
Copy link
Collaborator Author

takumakume commented Oct 16, 2019

@matsumotory

Thank you for check!
I forgot Vagrant.

I confirmed that the test passed with vagrant.

commit: dd51be5

vagrant@vagrant:~/ngx_mruby$ sh test.sh
:
: (snip)
:
Total: 92
   OK: 92
   KO: 0
Crash: 0
 Time: 17.225444 seconds

"[28403] exit worker process from inline code"
"ngx_mruby: STREAM: mruby_stream_exit_worker_code"
ngx_mruby testing ... Done
test.sh ... successful

vagrant@vagrant:~/ngx_mruby$ ./build/nginx/sbin/nginx -V
nginx version: nginx/1.17.4
built by gcc 4.9.3 (Ubuntu 4.9.3-13ubuntu2)
built with OpenSSL 1.1.1  11 Sep 2018
TLS SNI support enabled
configure arguments: --add-module=/home/vagrant/ngx_mruby --add-module=/home/vagrant/ngx_mruby/dependence/ngx_devel_kit --prefix=/home/vagrant/ngx_mruby/build/nginx --with-debug --with-http_stub_status_module --with-http_ssl_module --with-cc-opt='-g -O0' --with-stream --without-stream_access_module

@matsumotory
Copy link
Owner

Do we need the new openssl test in vagrant?

@matsumotory
Copy link
Owner

Or ngx_mruby vagrant already supports openssl-1.1.x, right?

@takumakume
Copy link
Collaborator Author

Do we need the new openssl test in vagrant?

As you said.

It may not need for everyone.
I revert it.

Or ngx_mruby vagrant already supports openssl-1.1.x, right?

The current vagrant image is not supported openssl-1.1.x.
using 1.0.2 .

vagrant@vagrant:~/ngx_mruby$ ./build/nginx/sbin/nginx -V
nginx version: nginx/1.17.4
built by gcc 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.11)
built with OpenSSL 1.0.2g  1 Mar 2016
TLS SNI support enabled
configure arguments: --add-module=/home/vagrant/ngx_mruby --add-module=/home/vagrant/ngx_mruby/dependence/ngx_devel_kit --prefix=/home/vagrant/ngx_mruby/build/nginx --with-debug --with-http_stub_status_module --with-http_ssl_module --with-cc-opt='-g -O0' --with-stream --without-stream_access_module

@matsumotory
Copy link
Owner

If ngx_mruby test supports openssl 1.1.x by default, ngx_mruby vagrant test also should support openssl 1.1.x, or ngx_mruby test supports both openssl 1.0.x and 1.1.x for compatibility.

@matsumotory
Copy link
Owner

@yyamano How do you think?

@matsumotory matsumotory requested a review from yyamano October 16, 2019 09:41
@yyamano
Copy link
Collaborator

yyamano commented Oct 16, 2019

I don't use openssl with ngx_mruby, so no strong opinions.

  • Do we want to support both versions of openssl? Supporting multiple versions may increase maintenance cost.
  • We should use same version of openssl on travis and vagrant.

@takumakume
Copy link
Collaborator Author

Do we want to support both versions of openssl? Supporting multiple versions may increase maintenance cost.

I agree.
but, openssl-1.0.2 supports up to 2019-12-31..

I am difficult to judge.

If support openssl-1.0.x, be able to test for openssl-1.0.x using the travis matrix .

We should use same version of openssl on travis and vagrant.

Yes! I understand.

@matsumotory
Copy link
Owner

@yyamano Thank you for your suggestion. I agree with you. So @takumakume , cloud you implement the vagrant configuration which uses openssl 1.1.x for test as Travis CI?

@takumakume
Copy link
Collaborator Author

So @takumakume , cloud you implement the vagrant configuration which uses openssl 1.1.x for test as Travis CI?

Installed same OpenSSL as Travis CI in vagrant:

vagrant@vagrant:~/ngx_mruby$ openssl version
OpenSSL 1.1.1d  10 Sep 2019

vagrant@vagrant:~/ngx_mruby$ ./build/nginx/sbin/nginx -V
nginx version: nginx/1.17.4
built by gcc 4.9.3 (Ubuntu 4.9.3-13ubuntu2)
built with OpenSSL 1.1.1d  10 Sep 2019
TLS SNI support enabled
configure arguments: --add-module=/home/vagrant/ngx_mruby --add-module=/home/vagrant/ngx_mruby/dependence/ngx_devel_kit --prefix=/home/vagrant/ngx_mruby/build/nginx --with-debug --with-http_stub_status_module --with-http_ssl_module --with-cc-opt='-g -O0' --with-stream --without-stream_access_module

And test passed in vagrant.

commit: 6403fcf

Copy link
Owner

@matsumotory matsumotory left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logs are very important.

tar -xzf openssl-${openssl_version}.tar.gz
rm openssl-${openssl_version}.tar.gz
cd openssl-${openssl_version}*
./config --prefix=/usr/local --shared zlib -fPIC >> /dev/null 2>&1
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you remove these logs? These logs are important to investigate the error.

Travis limited the number of stdout line, but the local build is no limitation.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand.
Fixed: e88ed19

@matsumotory
Copy link
Owner

Thank you for your proposal! Merged this PR now.

@matsumotory matsumotory merged commit 0b94fff into matsumotory:master Oct 17, 2019
@takumakume
Copy link
Collaborator Author

Thank you for check!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants