Skip to contentSkip to conversation

package/nodejs: bump to version 5.5.0

PATCH New Martin Bark 2 participants 3 messages Jan 30, 2016 – Feb 8, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 package/nodejs: bump to version 5.5.0

Patches from 5.3.0 have been copied over with the following exceptions:
- Removed 0005-Fix-crash-in-GetInterfaceAddresses.patch as this has been applied upstream
- Renamed 0006-Fix-support-for-uClibc-ng.patch to 0005-Fix-support-for-uClibc-ng.patch

---
 .../0005-Fix-crash-in-GetInterfaceAddresses.patch  | 37 ----------------------
 ...01-Remove-dependency-on-Python-bz2-module.patch |  0
 .../0002-gyp-force-link-command-to-use-CXX.patch   |  0
 ...hon-variable-instead-of-hardcoding-Python.patch |  0
 .../0004-Fix-va_list-not-declared.patch            |  0
 .../0005-Fix-support-for-uClibc-ng.patch}          |  0
 package/nodejs/Config.in                           |  6 ++--
 package/nodejs/nodejs.hash                         |  4 +--
 8 files changed, 5 insertions(+), 42 deletions(-)
 delete mode 100644 package/nodejs/5.3.0/0005-Fix-crash-in-GetInterfaceAddresses.patch
 rename package/nodejs/{5.3.0 => 5.5.0}/0001-Remove-dependency-on-Python-bz2-module.patch (100%)
 rename package/nodejs/{5.3.0 => 5.5.0}/0002-gyp-force-link-command-to-use-CXX.patch (100%)
 rename package/nodejs/{5.3.0 => 5.5.0}/0003-Use-a-python-variable-instead-of-hardcoding-Python.patch (100%)
 rename package/nodejs/{5.3.0 => 5.5.0}/0004-Fix-va_list-not-declared.patch (100%)
 rename package/nodejs/{5.3.0/0006-Fix-support-for-uClibc-ng.patch => 5.5.0/0005-Fix-support-for-uClibc-ng.patch} (100%)
package/nodejs/5.3.0/0005-Fix-crash-in-GetInterfaceAddresses.patch deleted +0 -37
deleted file mode 100644
index d964290..0000000
@@ -1,37 +0,0 @@
-From 839bd9d147b2c85fe70196c86dbdbed504762caf Mon Sep 17 00:00:00 2001
-From: "Bark, Martin" <[email protected]>
-Date: Mon, 14 Dec 2015 13:27:51 +0000
-Subject: [PATCH 1/2] Fix crash in GetInterfaceAddresses
-
-If uv_interface_addresses() returns UV_ENOSYS then interfaces and count are
-uninitialised. This can cause a segmentation fault inside
-GetInterfaceAddresses when it tries to use the invalid interfaces[]. Fix
-the issue by returning from GetInterfaceAddresses on the UV_ENOSYS error.
-
-This issue was observed when using uCLibc-ng version 1.0.9 because
-uv_interface_addresses() in deps/uv/src/unix/linux-core.c incorrectly
-undefines HAVE_IFADDRS_H.
-
-Submitted upstream, see https://github.com/nodejs/node/pull/4272
-
-Signed-off-by: Martin Bark <[email protected]>
----
- src/node_os.cc | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/node_os.cc b/src/node_os.cc
-index a100090..92f53a9 100644
---- a/src/node_os.cc
-+++ b/src/node_os.cc
-@@ -200,7 +200,7 @@ static void GetInterfaceAddresses(const FunctionCallbackInfo<Value>& args) {
-   ret = Object::New(env->isolate());
- 
-   if (err == UV_ENOSYS) {
--    args.GetReturnValue().Set(ret);
-+    return args.GetReturnValue().Set(ret);
-   } else if (err) {
-     return env->ThrowUVException(err, "uv_interface_addresses");
-   }
--- 
-2.6.2
-
package/nodejs/5.5.0/0001-Remove-dependency-on-Python-bz2-module.patch renamed from package/nodejs/5.3.0/0001-Remove-dependency-on-Python-bz2-module.patch +0 -0
similarity index 100%
rename from package/nodejs/5.3.0/0001-Remove-dependency-on-Python-bz2-module.patch
rename to package/nodejs/5.5.0/0001-Remove-dependency-on-Python-bz2-module.patch
package/nodejs/5.5.0/0002-gyp-force-link-command-to-use-CXX.patch renamed from package/nodejs/5.3.0/0002-gyp-force-link-command-to-use-CXX.patch +0 -0
similarity index 100%
rename from package/nodejs/5.3.0/0002-gyp-force-link-command-to-use-CXX.patch
rename to package/nodejs/5.5.0/0002-gyp-force-link-command-to-use-CXX.patch
package/nodejs/5.5.0/0003-Use-a-python-variable-instead-of-hardcoding-Python.patch renamed from package/nodejs/5.3.0/0003-Use-a-python-variable-instead-of-hardcoding-Python.patch +0 -0
similarity index 100%
rename from package/nodejs/5.3.0/0003-Use-a-python-variable-instead-of-hardcoding-Python.patch
rename to package/nodejs/5.5.0/0003-Use-a-python-variable-instead-of-hardcoding-Python.patch
package/nodejs/5.5.0/0004-Fix-va_list-not-declared.patch renamed from package/nodejs/5.3.0/0004-Fix-va_list-not-declared.patch +0 -0
similarity index 100%
rename from package/nodejs/5.3.0/0004-Fix-va_list-not-declared.patch
rename to package/nodejs/5.5.0/0004-Fix-va_list-not-declared.patch
package/nodejs/5.5.0/0005-Fix-support-for-uClibc-ng.patch renamed from package/nodejs/5.3.0/0006-Fix-support-for-uClibc-ng.patch +0 -0
similarity index 100%
rename from package/nodejs/5.3.0/0006-Fix-support-for-uClibc-ng.patch
rename to package/nodejs/5.5.0/0005-Fix-support-for-uClibc-ng.patch
package/nodejs/Config.in +3 -3
index 3dfccac..4385646 100644
@@ -46,13 +46,13 @@ config BR2_PACKAGE_NODEJS_0_10_X
 	bool "v0.10.41"
 
 config BR2_PACKAGE_NODEJS_5_X
-	bool "v5.3.0"
+	bool "v5.5.0"
 	depends on BR2_PACKAGE_NODEJS_V8_ARCH_SUPPORTS
 	depends on BR2_HOST_GCC_AT_LEAST_4_8
 	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
 	depends on BR2_USE_WCHAR
 
-comment "v5.3.0 needs a toolchain w/ gcc >= 4.8, wchar"
+comment "v5.5.0 needs a toolchain w/ gcc >= 4.8, wchar"
 	depends on BR2_PACKAGE_NODEJS_V8_ARCH_SUPPORTS
 	depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 || !BR2_USE_WCHAR
 	depends on BR2_HOST_GCC_AT_LEAST_4_8
@@ -62,7 +62,7 @@ endchoice
 config BR2_PACKAGE_NODEJS_VERSION_STRING
 	string
 	default "0.10.41"	if BR2_PACKAGE_NODEJS_0_10_X
-	default "5.3.0"		if BR2_PACKAGE_NODEJS_5_X
+	default "5.5.0"		if BR2_PACKAGE_NODEJS_5_X
 
 menu "Module Selection"
 
package/nodejs/nodejs.hash +2 -2
index dc56efa..e65f14a 100644
@@ -1,5 +1,5 @@
 # From upstream URL: http://nodejs.org/dist/v0.10.41/SHASUMS256.txt
 sha256	79f694e2a5c42543b75d0c69f6860499d7593136d0f6b59e7163b9e66fb2c995  node-v0.10.41.tar.gz
 
-# From upstream URL: http://nodejs.org/dist/v5.3.0/SHASUMS256.txt
-sha256  e5115ee78c31ac3af0f2b3553aa84fff2f49ae59bd6e01e11d78ce86c544569e  node-v5.3.0.tar.xz
+# From upstream URL: http://nodejs.org/dist/v5.5.0/SHASUMS256.txt
+sha256  9c46b4dc9548e43826f71f6571f56e39783c456b9516045b496ea73321731e22  node-v5.5.0.tar.xz
Signature · 1 line
2.5.0
#1 lore raw

PATCH 2/2 package/nodejs: remove version choice

Remove the choice of nodejs version. Now automatically pick nodejs 0.10.x for armv5 architectures only and the latest nodejs for all other supported architectures.

Note that the removal of BR2_PACKAGE_NODEJS_5_X is not handled in Config.in.legacy because buildroot has never been released with this option included.

Cc Thomas Petazzoni <[email protected]>
Cc Arnout Vandecappelle <[email protected]>

---
Apologies for not submitting an updated patch for a while.

I've reworked the patch based on your comments from my previous patch
(http://patchwork.ozlabs.org/patch/560487/). Hopefully it is now acceptable.

Thanks, Martin

---
 Config.in.legacy         |  8 +++++---
 package/nodejs/Config.in | 38 ++++++++++----------------------------
 package/nodejs/nodejs.mk |  2 +-
 3 files changed, 16 insertions(+), 32 deletions(-)
Config.in.legacy +5 -3
index 793b116..1e92467 100644
@@ -281,12 +281,14 @@ config BR2_PACKAGE_INFOZIP
 	  in the unzip package.
 
 config BR2_BR2_PACKAGE_NODEJS_0_10_X
-	bool "nodejs 0.10.x option renamed"
+	bool "nodejs 0.10.x option removed"
 	select BR2_LEGACY
 	select BR2_PACKAGE_NODEJS
 	help
-	  nodejs 0.10.x option was named incorrectly and has been renamed
-	  to BR2_PACKAGE_NODEJS_0_10_X.
+	  nodejs 0.10.x option has been removed.  0.10.x is now
+	  automatically chosen for ARMv5 architectures only and the latest
+	  nodejs for all other supported architectures. The correct nodejs
+	  version has been automatically selected in your configuration.
 
 config BR2_BR2_PACKAGE_NODEJS_0_12_X
 	bool "nodejs version 0.12.x has been removed"
package/nodejs/Config.in +10 -28
index 4385646..cdf7705 100644
@@ -1,9 +1,10 @@
-comment "nodejs needs a toolchain w/ C++, dynamic library, threads"
+comment "nodejs needs a toolchain w/ C++, dynamic library, threads, gcc >= 4.8, wchar"
 	depends on BR2_USE_MMU
 	depends on BR2_arm || BR2_i386 || BR2_x86_64 || BR2_mipsel
 	depends on !BR2_MIPS_SOFT_FLOAT
 	depends on !BR2_ARM_CPU_ARMV4
-	depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS
+	depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS || \
+		!BR2_HOST_GCC_AT_LEAST_4_8 || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 || !BR2_USE_WCHAR
 
 config BR2_PACKAGE_NODEJS
 	bool "nodejs"
@@ -13,6 +14,11 @@ config BR2_PACKAGE_NODEJS
 	depends on !BR2_MIPS_SOFT_FLOAT
 	# ARM needs BLX, so v5t+
 	depends on !BR2_ARM_CPU_ARMV4
+	# 0.10.x could be built without the following toolchain dependencies but
+	# simplify things by requiring these basic dependencies for all versions.
+	depends on BR2_HOST_GCC_AT_LEAST_4_8
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
+	depends on BR2_USE_WCHAR
 	# uses fork()
 	depends on BR2_USE_MMU
 	# uses dlopen(). On ARMv5, we could technically support static
@@ -35,34 +41,10 @@ config BR2_PACKAGE_NODEJS_V8_ARCH_SUPPORTS
 	# On ARM, at least ARMv6+ with VFPv2+ is needed
 	default y if !BR2_ARM_CPU_ARMV5 && BR2_ARM_CPU_HAS_VFPV2
 
-choice
-	prompt "Node.js version"
-	default BR2_PACKAGE_NODEJS_0_10_X if BR2_ARM_CPU_ARMV5
-	default BR2_PACKAGE_NODEJS_5_X
-	help
-	  Select the version of Node.js you wish to use.
-
-config BR2_PACKAGE_NODEJS_0_10_X
-	bool "v0.10.41"
-
-config BR2_PACKAGE_NODEJS_5_X
-	bool "v5.5.0"
-	depends on BR2_PACKAGE_NODEJS_V8_ARCH_SUPPORTS
-	depends on BR2_HOST_GCC_AT_LEAST_4_8
-	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
-	depends on BR2_USE_WCHAR
-
-comment "v5.5.0 needs a toolchain w/ gcc >= 4.8, wchar"
-	depends on BR2_PACKAGE_NODEJS_V8_ARCH_SUPPORTS
-	depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 || !BR2_USE_WCHAR
-	depends on BR2_HOST_GCC_AT_LEAST_4_8
-
-endchoice
-
 config BR2_PACKAGE_NODEJS_VERSION_STRING
 	string
-	default "0.10.41"	if BR2_PACKAGE_NODEJS_0_10_X
-	default "5.5.0"		if BR2_PACKAGE_NODEJS_5_X
+	default "5.5.0"		if BR2_PACKAGE_NODEJS_V8_ARCH_SUPPORTS
+	default "0.10.41"
 
 menu "Module Selection"
 
package/nodejs/nodejs.mk +1 -1
index af47b26..37de331 100644
@@ -5,7 +5,7 @@
 ################################################################################
 
 NODEJS_VERSION = $(call qstrip,$(BR2_PACKAGE_NODEJS_VERSION_STRING))
-ifeq ($(BR2_PACKAGE_NODEJS_5_X),y)
+ifeq ($(findstring 0.10.,$(NODEJS_VERSION)),)
 NODEJS_SOURCE = node-v$(NODEJS_VERSION).tar.xz
 else
 NODEJS_SOURCE = node-v$(NODEJS_VERSION).tar.gz
Signature · 1 line
2.5.0
#2 lore raw

PATCH 1/2 package/nodejs: bump to version 5.5.0

In reply to Martin Bark

Dear Martin Bark,

Quoted 7 lines · Martin Bark

Patches from 5.3.0 have been copied over with the following exceptions:
- Removed 0005-Fix-crash-in-GetInterfaceAddresses.patch as this has been applied upstream
- Renamed 0006-Fix-support-for-uClibc-ng.patch to 0005-Fix-support-for-uClibc-ng.patch

Quoted 16 lines
---
 .../0005-Fix-crash-in-GetInterfaceAddresses.patch  | 37 ----------------------
 ...01-Remove-dependency-on-Python-bz2-module.patch |  0
 .../0002-gyp-force-link-command-to-use-CXX.patch   |  0
 ...hon-variable-instead-of-hardcoding-Python.patch |  0
 .../0004-Fix-va_list-not-declared.patch            |  0
 .../0005-Fix-support-for-uClibc-ng.patch}          |  0
 package/nodejs/Config.in                           |  6 ++--
 package/nodejs/nodejs.hash                         |  4 +--
 8 files changed, 5 insertions(+), 42 deletions(-)
 delete mode 100644 package/nodejs/5.3.0/0005-Fix-crash-in-GetInterfaceAddresses.patch
 rename package/nodejs/{5.3.0 => 5.5.0}/0001-Remove-dependency-on-Python-bz2-module.patch (100%)
 rename package/nodejs/{5.3.0 => 5.5.0}/0002-gyp-force-link-command-to-use-CXX.patch (100%)
 rename package/nodejs/{5.3.0 => 5.5.0}/0003-Use-a-python-variable-instead-of-hardcoding-Python.patch (100%)
 rename package/nodejs/{5.3.0 => 5.5.0}/0004-Fix-va_list-not-declared.patch (100%)
 rename package/nodejs/{5.3.0/0006-Fix-support-for-uClibc-ng.patch => 5.5.0/0005-Fix-support-for-uClibc-ng.patch} (100%)

Both patches applied, thanks!

Thomas

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