Skip to contentSkip to conversation

ruby: fix build with recent openssl versions

PATCH New Fatih Aşıcı 4 participants 6 messages May 20, 2014 – May 23, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ruby: fix build with recent openssl versions

---
 ...declare-OP_MSIE_SSLV2_RSA_PADDING-only-if.patch | 37 ++++++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100644 package/ruby/ruby-0001-ossl_ssl.c-declare-OP_MSIE_SSLV2_RSA_PADDING-only-if.patch
package/ruby/ruby-0001-ossl_ssl.c-declare-OP_MSIE_SSLV2_RSA_PADDING-only-if.patch new file +37 -0
new file mode 100644
index 0000000..8019647
@@ -0,0 +1,37 @@
+From 32e5a572d3ade888c3f8b4dfebd490e343f387ad Mon Sep 17 00:00:00 2001
+From: nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
+Date: Wed, 25 Dec 2013 01:42:09 +0000
+Subject: [PATCH] ossl_ssl.c: declare OP_MSIE_SSLV2_RSA_PADDING only if defined
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+* ext/openssl/ossl_ssl.c (Init_ossl_ssl): Declare a constant
+  `OP_MSIE_SSLV2_RSA_PADDING` only if the macro is defined.  The
+  `SSL_OP_MSIE_SSLV2_RSA_PADDING` has been removed from latest
+  snapshot of OpenSSL 1.0.1.  [Fixes GH-488]
+
+git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk at 44402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
+(cherry picked from commit 1e7a929c1d44d7a368fbe379211183ac6c972920)
+Signed-off-by: Fatih A??c? <[email protected]>
+---
+ ext/openssl/ossl_ssl.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/ext/openssl/ossl_ssl.c b/ext/openssl/ossl_ssl.c
+index e437e7e..01e8c06 100644
+--- a/ext/openssl/ossl_ssl.c
++++ b/ext/openssl/ossl_ssl.c
+@@ -1985,7 +1985,9 @@ Init_ossl_ssl()
+     ossl_ssl_def_const(OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG);
+     ossl_ssl_def_const(OP_SSLREF2_REUSE_CERT_TYPE_BUG);
+     ossl_ssl_def_const(OP_MICROSOFT_BIG_SSLV3_BUFFER);
++#if defined(SSL_OP_MSIE_SSLV2_RSA_PADDING)
+     ossl_ssl_def_const(OP_MSIE_SSLV2_RSA_PADDING);
++#endif
+     ossl_ssl_def_const(OP_SSLEAY_080_CLIENT_DH_BUG);
+     ossl_ssl_def_const(OP_TLS_D5_BUG);
+     ossl_ssl_def_const(OP_TLS_BLOCK_PADDING_BUG);
+-- 
+1.9.1
+
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 ruby: fix build with recent openssl versions

Quoted 3 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Fatih" == Fatih A??c? <[email protected]> writes:

What exact problem is it fixing? I just tried building ruby+openssl without problems.

Signature · 1 line
Bye, Peter Korsgaard
#2 lore raw

PATCH 1/1 ruby: fix build with recent openssl versions

Quoted 5 lines · On Tuesday 20 May 2014 23:50:21 Peter Korsgaard wrote:
Quoted 2 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Fatih" == Fatih A??c? <[email protected]> writes:

What exact problem is it fixing? I just tried building ruby+openssl without problems.

OpenSSL version on my system (Debian Wheezy) is 1.0.1e-2+deb7u9. When building host-ruby it fails because of an undefined macro:

make[3]: Entering directory `/home/fatih/git/buildroot/output/build/host-ruby-1.9.3-p545/ext/openssl' compiling ossl_ssl.c
ossl_ssl.c: In function ?Init_ossl_ssl?:
ossl_ssl.c:1988:79: error: ?SSL_OP_MSIE_SSLV2_RSA_PADDING? undeclared (first use in this function) ossl_ssl.c:1988:79: note: each undeclared identifier is reported only once for each function it appears in make[3]: *** [ossl_ssl.o] Error 1
make[3]: Leaving directory `/home/fatih/git/buildroot/output/build/host-ruby-1.9.3-p545/ext/openssl'

#3 lore raw

PATCH 1/1 ruby: fix build with recent openssl versions

Dear Fatih A??c?,

Quoted 2 lines · Fatih A??c?

OpenSSL version on my system (Debian Wheezy) is 1.0.1e-2+deb7u9. When building host-ruby it fails because of an undefined macro:

Then we should either:

1) Build host-ruby without openssl support, if it's possible and not necessary.

2) Make host-ruby depend on host-openssl, but that wouldn't be really nice.

No? I don't think we have OpenSSL development files as part of the mandatory requirements to run Buildroot, so we shouldn't rely on them. I believe option (1) above is possible, because my autobuilders don't have the openssl development files installed IIRC, but we don't see any ruby issue.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#4 lore raw

PATCH 1/1 ruby: fix build with recent openssl versions

Quoted 12 lines · Thomas Petazzoni

Dear Fatih A??c?,

Quoted 2 lines · Fatih A??c?

OpenSSL version on my system (Debian Wheezy) is 1.0.1e-2+deb7u9. When building host-ruby it fails because of an undefined macro:

Then we should either:

1) Build host-ruby without openssl support, if it's possible and not necessary.

Quoted 8 lines

2) Make host-ruby depend on host-openssl, but that wouldn't be really nice.

No? I don't think we have OpenSSL development files as part of the mandatory requirements to run Buildroot, so we shouldn't rely on them. I believe option (1) above is possible, because my autobuilders don't have the openssl development files installed IIRC, but we don't see any ruby issue.

Patch sent to disable openssl for host-ruby (option 1) since there's really no need for it at the moment.
Fatih can you give it a shot and report back?
Thanks.
Regards.

#5 lore raw

PATCH 1/1 ruby: fix build with recent openssl versions

Quoted 22 lines · On Thursday 22 May 2014 21:28:19 Gustavo Zacarias wrote:
Quoted 13 lines · Thomas Petazzoni

Dear Fatih A??c?,

Quoted 3 lines · Fatih A??c?

OpenSSL version on my system (Debian Wheezy) is 1.0.1e-2+deb7u9. When

building host-ruby it fails because of an undefined macro:

Then we should either:
1) Build host-ruby without openssl support, if it's possible and not

necessary.

2) Make host-ruby depend on host-openssl, but that wouldn't be really

Quoted 7 lines

nice.

No? I don't think we have OpenSSL development files as part of the mandatory requirements to run Buildroot, so we shouldn't rely on them. I believe option (1) above is possible, because my autobuilders don't have the openssl development files installed IIRC, but we don't see any ruby issue.

Quoted 3 lines

Patch sent to disable openssl for host-ruby (option 1) since there's really no need for it at the moment.
Fatih can you give it a shot and report back?

Tested your patch. It fixes the issue.

Thanks,
Fatih