package/nodejs: fix build error without OpenSSL support
PATCH 1/2 package/nodejs: fix build error without OpenSSL support
Add a patch to fix broken build of nodejs without OpenSSL support.
Version 0.10.33 of nodejs introduced a bug which prevents us from building nodejs without OpenSSL support. The bug is reported upstream:
https://github.com/joyent/node/issues/8676
This bug caused some build errors:
* http://autobuild.buildroot.net/results/0bf/0bf17bf710db051d491123482c90f2f72810804b/
* http://autobuild.buildroot.net/results/e1f/e1fb34818ff1167aa008b4011befb9fd14c81293/
and more...
---
Changes v1 -> v2:
- patch nodejs to allow building without OpenSSL support (Thomas)
- adapt commit log
--- ...4-fix-build-error-without-OpenSSL-support.patch | 54 ++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 package/nodejs/nodejs-0004-fix-build-error-without-OpenSSL-support.patch
package/nodejs/nodejs-0004-fix-build-error-without-OpenSSL-support.patch new file +54 -0
@@ -0,0 +1,54 @@ +From d9acdddb42aef48a9504368019beb1ad91c9a0c4 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B6rg=20Krause?= <[email protected]> +Date: Mon, 17 Nov 2014 12:34:05 +0100 +Subject: [PATCH 1/1] src/node.cc: fix build error without OpenSSL support +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: J?rg Krause <[email protected]> +--- + src/node.cc | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/node.cc b/src/node.cc +index 18c743f..cb77f08 100644 +--- a/src/node.cc ++++ b/src/node.cc +@@ -82,7 +82,6 @@ typedef int mode_t; + #include "node_script.h" + #include "v8_typed_array.h" + +-#include "node_crypto.h" + #include "util.h" + + using namespace v8; +@@ -2544,8 +2543,10 @@ static void PrintHelp() { + " --trace-deprecation show stack traces on deprecations\n" + " --v8-options print v8 command line options\n" + " --max-stack-size=val set max v8 stack size (bytes)\n" ++#if HAVE_OPENSSL + " --enable-ssl2 enable ssl2\n" + " --enable-ssl3 enable ssl3\n" ++#endif + "\n" + "Environment variables:\n" + #ifdef _WIN32 +@@ -2579,12 +2580,14 @@ static void ParseArgs(int argc, char **argv) { + p = 1 + strchr(arg, '='); + max_stack_size = atoi(p); + argv[i] = const_cast<char*>(""); ++#if HAVE_OPENSSL + } else if (strcmp(arg, "--enable-ssl2") == 0) { + SSL2_ENABLE = true; + argv[i] = const_cast<char*>(""); + } else if (strcmp(arg, "--enable-ssl3") == 0) { + SSL3_ENABLE = true; + argv[i] = const_cast<char*>(""); ++#endif + } else if (strcmp(arg, "--help") == 0 || strcmp(arg, "-h") == 0) { + PrintHelp(); + exit(0); +-- +2.1.3 +
Signature · 1 line
2.1.3
PATCH 2/2 package/nodejs: remove config options --without-ssl2 and --without-ssl3
The config options --without-ssl2 and --without-ssl3 are intended to be used if nodejs is build with the bundled OpenSSL library for excluding the SSL2 and SSL3 features.
Both options are actual only evaluated if --without-ssl is not set:
$ cat configure | grep configure_openssl -n -A 13 619:def configure_openssl(o): 620- o['variables']['node_use_openssl'] = b(not options.without_ssl) 621- o['variables']['node_shared_openssl'] = b(options.shared_openssl) 622- o['variables']['openssl_no_asm'] = ( 623- 1 if options.openssl_no_asm else 0) 624- 625- if options.without_ssl: 626- return 627- 628- if options.ssl2: 629- o['defines'] += ['OPENSSL_NO_SSL2=1'] 630- 631- if options.ssl3: 632- o['defines'] += ['OPENSSL_NO_SSL3=1']
This patch reverts commit e712638b4adc6e18b3ce99ab37b94530e9aa786f which does not help to fix the build errors, eg.:
http://autobuild.buildroot.net/results/0bf/0bf17bf710db051d491123482c90f2f72810804b/
--- package/nodejs/nodejs.mk | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
package/nodejs/nodejs.mk +1 -2
@@ -75,8 +75,7 @@ define NODEJS_CONFIGURE_CMDS --prefix=/usr \ --without-snapshot \ --shared-zlib \ - $(if $(BR2_PACKAGE_OPENSSL),--shared-openssl,\ - --without-ssl --without-ssl2 --without-ssl3) \ + $(if $(BR2_PACKAGE_OPENSSL),--shared-openssl,--without-ssl) \ $(if $(BR2_PACKAGE_NODEJS_NPM),,--without-npm) \ --without-dtrace \ --without-etw \
Signature · 1 line
2.1.3
PATCH 2/2 package/nodejs: remove config options --without-ssl2 and --without-ssl3
Quoted 22 lines · J?rg Krause
The config options --without-ssl2 and --without-ssl3 are intended to be used if nodejs is build with the bundled OpenSSL library for excluding the SSL2 and SSL3 features.
Both options are actual only evaluated if --without-ssl is not set:
$ cat configure | grep configure_openssl -n -A 13 619:def configure_openssl(o): 620- o['variables']['node_use_openssl'] = b(not options.without_ssl) 621- o['variables']['node_shared_openssl'] = b(options.shared_openssl) 622- o['variables']['openssl_no_asm'] = ( 623- 1 if options.openssl_no_asm else 0) 624- 625- if options.without_ssl: 626- return 627- 628- if options.ssl2: 629- o['defines'] += ['OPENSSL_NO_SSL2=1'] 630- 631- if options.ssl3: 632- o['defines'] += ['OPENSSL_NO_SSL3=1']
Quoted 5 lines
This patch reverts commit
e712638b4adc6e18b3ce99ab37b94530e9aa786fwhich does not help to fix the build errors, eg.:
http://autobuild.buildroot.net/results/0bf/0bf17bf710db051d491123482c90f2f72810804b/Signed-off-by J?rg Krause <[email protected]>
My fault for sending that patch, i was sure to have tested it well.
Thanks
Signature · 1 line
Fabio Porcedda
PATCH 2/2 package/nodejs: remove config options --without-ssl2 and --without-ssl3
What about using the standard msg for reverting commits? something like:
Revert "nodejs: disable ssl2 and ssl3 when openssl is not built"
This reverts commit e712638b4adc6e18b3ce99ab37b94530e9aa786f.
<rest of the description>
I think it helps to understand easily that it's just revert a commit.
Quoted 37 lines · Fabio Porcedda
Quoted 22 lines · J?rg Krause
The config options --without-ssl2 and --without-ssl3 are intended to be used if nodejs is build with the bundled OpenSSL library for excluding the SSL2 and SSL3 features.
Both options are actual only evaluated if --without-ssl is not set:
$ cat configure | grep configure_openssl -n -A 13 619:def configure_openssl(o): 620- o['variables']['node_use_openssl'] = b(not options.without_ssl) 621- o['variables']['node_shared_openssl'] = b(options.shared_openssl) 622- o['variables']['openssl_no_asm'] = ( 623- 1 if options.openssl_no_asm else 0) 624- 625- if options.without_ssl: 626- return 627- 628- if options.ssl2: 629- o['defines'] += ['OPENSSL_NO_SSL2=1'] 630- 631- if options.ssl3: 632- o['defines'] += ['OPENSSL_NO_SSL3=1']Quoted 5 lines
This patch reverts commit
e712638b4adc6e18b3ce99ab37b94530e9aa786fwhich does not help to fix the build errors, eg.:
http://autobuild.buildroot.net/results/0bf/0bf17bf710db051d491123482c90f2f72810804b/Signed-off-by J?rg Krause <[email protected]>Tested-by Fabio Porcedda <[email protected]>Acked-by Fabio Porcedda <[email protected]>My fault for sending that patch, i was sure to have tested it well.
Thanks
--
Fabio Porcedda
Signature · 1 line
Fabio Porcedda
PATCH 2/2 package/nodejs: remove config options --without-ssl2 and --without-ssl3
In reply to Jörg KrauseQuoted 24 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"J?rg" == J?rg Krause <[email protected]> writes:
The config options --without-ssl2 and --without-ssl3 are intended to be used if nodejs is build with the bundled OpenSSL library for excluding the SSL2 and SSL3 features.
Both options are actual only evaluated if --without-ssl is not set:
$ cat configure | grep configure_openssl -n -A 13 619:def configure_openssl(o): 620- o['variables']['node_use_openssl'] = b(not options.without_ssl) 621- o['variables']['node_shared_openssl'] = b(options.shared_openssl) 622- o['variables']['openssl_no_asm'] = ( 623- 1 if options.openssl_no_asm else 0) 624- 625- if options.without_ssl: 626- return 627- 628- if options.ssl2: 629- o['defines'] += ['OPENSSL_NO_SSL2=1'] 630- 631- if options.ssl3: 632- o['defines'] += ['OPENSSL_NO_SSL3=1']
Quoted 5 lines
This patch reverts commit
e712638b4adc6e18b3ce99ab37b94530e9aa786fwhich does not help to fix the build errors, eg.:
http://autobuild.buildroot.net/results/0bf/0bf17bf710db051d491123482c90f2f72810804b/Signed-off-by J?rg Krause <[email protected]>
Committed with the commit message tweaked as suggested by Fabio, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/2 package/nodejs: fix build error without OpenSSL support
In reply to Jörg KrauseQuoted 6 lines · J?rg Krause
Add a patch to fix broken build of nodejs without OpenSSL support.
Version 0.10.33 of nodejs introduced a bug which prevents us from building nodejs without OpenSSL support. The bug is reported upstream:
https://github.com/joyent/node/issues/8676
Quoted 7 lines
This bug caused some build errors:
* http://autobuild.buildroot.net/results/0bf/0bf17bf710db051d491123482c90f2f72810804b/
* http://autobuild.buildroot.net/results/e1f/e1fb34818ff1167aa008b4011befb9fd14c81293/and more...
Signed-off-by J?rg Krause <[email protected]>
Have you sent this patch upstream?
Thanks and BR
Signature · 1 line
Fabio Porcedda
PATCH 1/2 package/nodejs: fix build error without OpenSSL support
Quoted 11 lines · Fabio Porcedda
Quoted 10 lines · J?rg Krause
Add a patch to fix broken build of nodejs without OpenSSL support.
Version 0.10.33 of nodejs introduced a bug which prevents us from building nodejs without OpenSSL support. The bug is reported upstream:
https://github.com/joyent/node/issues/8676This bug caused some build errors:
* http://autobuild.buildroot.net/results/0bf/0bf17bf710db051d491123482c90f2f72810804b/
* http://autobuild.buildroot.net/results/e1f/e1fb34818ff1167aa008b4011befb9fd14c81293/
Quoted 5 lines
Quoted 3 lines
and more...
Signed-off-by J?rg Krause <[email protected]>Have you sent this patch upstream?
Not yet, I want to do it after someone else has reviewed and tested the patch.
PATCH 1/2 package/nodejs: fix build error without OpenSSL support
In reply to Jörg KrauseQuoted 11 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"J?rg" == J?rg Krause <[email protected]> writes:
Add a patch to fix broken build of nodejs without OpenSSL support. Version 0.10.33 of nodejs introduced a bug which prevents us from building nodejs without OpenSSL support. The bug is reported upstream:
https://github.com/joyent/node/issues/8676This bug caused some build errors:
* http://autobuild.buildroot.net/results/0bf/0bf17bf710db051d491123482c90f2f72810804b/
* http://autobuild.buildroot.net/results/e1f/e1fb34818ff1167aa008b4011befb9fd14c81293/
Quoted 7 lines
and more...
Signed-off-by J?rg Krause <[email protected]>---
Changes v1 -> v2:
- patch nodejs to allow building without OpenSSL support (Thomas)
- adapt commit log
Committed, thanks. Please don't forget to send the patch upstream.
Signature · 1 line
Bye, Peter Korsgaard