All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] package/nodejs: fix build error without OpenSSL support
@ 2014-11-17 11:41 Jörg Krause
  2014-11-17 11:41 ` [Buildroot] [PATCH 2/2] package/nodejs: remove config options --without-ssl2 and --without-ssl3 Jörg Krause
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Jörg Krause @ 2014-11-17 11:41 UTC (permalink / raw)
  To: buildroot

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...

Signed-off-by: J?rg Krause <jkrause@posteo.de>
---
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

diff --git a/package/nodejs/nodejs-0004-fix-build-error-without-OpenSSL-support.patch b/package/nodejs/nodejs-0004-fix-build-error-without-OpenSSL-support.patch
new file mode 100644
index 0000000..9d41516
--- /dev/null
+++ b/package/nodejs/nodejs-0004-fix-build-error-without-OpenSSL-support.patch
@@ -0,0 +1,54 @@
+From d9acdddb42aef48a9504368019beb1ad91c9a0c4 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?J=C3=B6rg=20Krause?= <jkrause@posteo.de>
+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 <jkrause@posteo.de>
+---
+ 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
+
-- 
2.1.3

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH 2/2] package/nodejs: remove config options --without-ssl2 and --without-ssl3
  2014-11-17 11:41 [Buildroot] [PATCH 1/2] package/nodejs: fix build error without OpenSSL support Jörg Krause
@ 2014-11-17 11:41 ` Jörg Krause
  2014-11-17 17:38   ` Fabio Porcedda
  2014-11-18 21:06   ` Peter Korsgaard
  2014-11-17 17:43 ` [Buildroot] [PATCH 1/2] package/nodejs: fix build error without OpenSSL support Fabio Porcedda
  2014-11-18 21:03 ` Peter Korsgaard
  2 siblings, 2 replies; 8+ messages in thread
From: Jörg Krause @ 2014-11-17 11:41 UTC (permalink / raw)
  To: buildroot

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/

Signed-off-by: J?rg Krause <jkrause@posteo.de>
---
 package/nodejs/nodejs.mk | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/package/nodejs/nodejs.mk b/package/nodejs/nodejs.mk
index 32e19b7..312aaa9 100644
--- a/package/nodejs/nodejs.mk
+++ b/package/nodejs/nodejs.mk
@@ -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 \
-- 
2.1.3

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH 2/2] package/nodejs: remove config options --without-ssl2 and --without-ssl3
  2014-11-17 11:41 ` [Buildroot] [PATCH 2/2] package/nodejs: remove config options --without-ssl2 and --without-ssl3 Jörg Krause
@ 2014-11-17 17:38   ` Fabio Porcedda
  2014-11-17 18:01     ` Fabio Porcedda
  2014-11-18 21:06   ` Peter Korsgaard
  1 sibling, 1 reply; 8+ messages in thread
From: Fabio Porcedda @ 2014-11-17 17:38 UTC (permalink / raw)
  To: buildroot

On Mon, Nov 17, 2014 at 12:41 PM, J?rg Krause <jkrause@posteo.de> wrote:
> 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/
>
> Signed-off-by: J?rg Krause <jkrause@posteo.de>

Tested-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Acked-by: Fabio Porcedda <fabio.porcedda@gmail.com>

My fault for sending that patch, i was sure to have tested it well.

Thanks
-- 
Fabio Porcedda

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH 1/2] package/nodejs: fix build error without OpenSSL support
  2014-11-17 11:41 [Buildroot] [PATCH 1/2] package/nodejs: fix build error without OpenSSL support Jörg Krause
  2014-11-17 11:41 ` [Buildroot] [PATCH 2/2] package/nodejs: remove config options --without-ssl2 and --without-ssl3 Jörg Krause
@ 2014-11-17 17:43 ` Fabio Porcedda
  2014-11-17 18:39   ` Jörg Krause
  2014-11-18 21:03 ` Peter Korsgaard
  2 siblings, 1 reply; 8+ messages in thread
From: Fabio Porcedda @ 2014-11-17 17:43 UTC (permalink / raw)
  To: buildroot

On Mon, Nov 17, 2014 at 12:41 PM, J?rg Krause <jkrause@posteo.de> wrote:
> 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...
>
> Signed-off-by: J?rg Krause <jkrause@posteo.de>

Have you sent this patch upstream?

Thanks and BR
-- 
Fabio Porcedda

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH 2/2] package/nodejs: remove config options --without-ssl2 and --without-ssl3
  2014-11-17 17:38   ` Fabio Porcedda
@ 2014-11-17 18:01     ` Fabio Porcedda
  0 siblings, 0 replies; 8+ messages in thread
From: Fabio Porcedda @ 2014-11-17 18:01 UTC (permalink / raw)
  To: buildroot

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.


On Mon, Nov 17, 2014 at 6:38 PM, Fabio Porcedda
<fabio.porcedda@gmail.com> wrote:
> On Mon, Nov 17, 2014 at 12:41 PM, J?rg Krause <jkrause@posteo.de> wrote:
>> 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/
>>
>> Signed-off-by: J?rg Krause <jkrause@posteo.de>
>
> Tested-by: Fabio Porcedda <fabio.porcedda@gmail.com>
> Acked-by: Fabio Porcedda <fabio.porcedda@gmail.com>
>
> My fault for sending that patch, i was sure to have tested it well.
>
> Thanks
> --
> Fabio Porcedda



-- 
Fabio Porcedda

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH 1/2] package/nodejs: fix build error without OpenSSL support
  2014-11-17 17:43 ` [Buildroot] [PATCH 1/2] package/nodejs: fix build error without OpenSSL support Fabio Porcedda
@ 2014-11-17 18:39   ` Jörg Krause
  0 siblings, 0 replies; 8+ messages in thread
From: Jörg Krause @ 2014-11-17 18:39 UTC (permalink / raw)
  To: buildroot

On Mo, 2014-11-17 at 18:43 +0100, Fabio Porcedda wrote:
> On Mon, Nov 17, 2014 at 12:41 PM, J?rg Krause <jkrause@posteo.de> wrote:
> > 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...
> >
> > Signed-off-by: J?rg Krause <jkrause@posteo.de>
> 
> Have you sent this patch upstream?

Not yet, I want to do it after someone else has reviewed and tested the
patch.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH 1/2] package/nodejs: fix build error without OpenSSL support
  2014-11-17 11:41 [Buildroot] [PATCH 1/2] package/nodejs: fix build error without OpenSSL support Jörg Krause
  2014-11-17 11:41 ` [Buildroot] [PATCH 2/2] package/nodejs: remove config options --without-ssl2 and --without-ssl3 Jörg Krause
  2014-11-17 17:43 ` [Buildroot] [PATCH 1/2] package/nodejs: fix build error without OpenSSL support Fabio Porcedda
@ 2014-11-18 21:03 ` Peter Korsgaard
  2 siblings, 0 replies; 8+ messages in thread
From: Peter Korsgaard @ 2014-11-18 21:03 UTC (permalink / raw)
  To: buildroot

>>>>> "J?rg" == J?rg Krause <jkrause@posteo.de> 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/8676

 > 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 <jkrause@posteo.de>
 > ---
 > 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.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH 2/2] package/nodejs: remove config options --without-ssl2 and --without-ssl3
  2014-11-17 11:41 ` [Buildroot] [PATCH 2/2] package/nodejs: remove config options --without-ssl2 and --without-ssl3 Jörg Krause
  2014-11-17 17:38   ` Fabio Porcedda
@ 2014-11-18 21:06   ` Peter Korsgaard
  1 sibling, 0 replies; 8+ messages in thread
From: Peter Korsgaard @ 2014-11-18 21:06 UTC (permalink / raw)
  To: buildroot

>>>>> "J?rg" == J?rg Krause <jkrause@posteo.de> 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']

 > This patch reverts commit e712638b4adc6e18b3ce99ab37b94530e9aa786f which does
 > not help to fix the build errors, eg.:
 > http://autobuild.buildroot.net/results/0bf/0bf17bf710db051d491123482c90f2f72810804b/

 > Signed-off-by: J?rg Krause <jkrause@posteo.de>

Committed with the commit message tweaked as suggested by Fabio, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-11-18 21:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-17 11:41 [Buildroot] [PATCH 1/2] package/nodejs: fix build error without OpenSSL support Jörg Krause
2014-11-17 11:41 ` [Buildroot] [PATCH 2/2] package/nodejs: remove config options --without-ssl2 and --without-ssl3 Jörg Krause
2014-11-17 17:38   ` Fabio Porcedda
2014-11-17 18:01     ` Fabio Porcedda
2014-11-18 21:06   ` Peter Korsgaard
2014-11-17 17:43 ` [Buildroot] [PATCH 1/2] package/nodejs: fix build error without OpenSSL support Fabio Porcedda
2014-11-17 18:39   ` Jörg Krause
2014-11-18 21:03 ` Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.