package/nodejs: Bump version to 0.10.39
PATCH v2 1/6 package/nodejs: Bump version to 0.10.39
---
Changed v1 -> v2
- No changes, added in v2
--- package/nodejs/nodejs.hash | 4 ++-- package/nodejs/nodejs.mk | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
package/nodejs/nodejs.hash +2 -2
@@ -1,2 +1,2 @@ -# From upstream URL: http://nodejs.org/dist/v0.10.38/SHASUMS256.txt -sha256 513da8ed5e48abefdfab664f1cabc160238d314a0481148804aff8fc6552b78b node-v0.10.38.tar.gz +# From upstream URL: http://nodejs.org/dist/v0.10.39/SHASUMS256.txt +sha256 68f8d8f9515c4e77e2a06034b742e19e9848c1fee5bcadedc1d68f3e4302df37 node-v0.10.39.tar.gz
package/nodejs/nodejs.mk +1 -1
@@ -4,7 +4,7 @@ # ################################################################################ -NODEJS_VERSION = 0.10.38 +NODEJS_VERSION = 0.10.39 NODEJS_SOURCE = node-v$(NODEJS_VERSION).tar.gz NODEJS_SITE = http://nodejs.org/dist/v$(NODEJS_VERSION) NODEJS_DEPENDENCIES = host-python host-nodejs zlib \
Signature · 1 line
2.1.4
PATCH v2 2/6 package/nodejs: Update to allow selecting node.js version
---
Changes v1 -> v2
- Updated to node.js v0.10.39
---
.../{ => 0.10.39}/0001-remove-python-bz2-dependency.patch | 0
.../0002-gyp-force-link-command-to-use-CXX.patch | 0
.../nodejs/{ => 0.10.39}/0003-use-python-variable.patch | 0
.../0004-fix-build-error-without-OpenSSL-support.patch | 0
package/nodejs/Config.in | 14 ++++++++++++++
package/nodejs/nodejs.mk | 2 +-
6 files changed, 15 insertions(+), 1 deletion(-)
rename package/nodejs/{ => 0.10.39}/0001-remove-python-bz2-dependency.patch (100%)
rename package/nodejs/{ => 0.10.39}/0002-gyp-force-link-command-to-use-CXX.patch (100%)
rename package/nodejs/{ => 0.10.39}/0003-use-python-variable.patch (100%)
rename package/nodejs/{ => 0.10.39}/0004-fix-build-error-without-OpenSSL-support.patch (100%)package/nodejs/0.10.39/0001-remove-python-bz2-dependency.patch renamed from package/nodejs/0001-remove-python-bz2-dependency.patch +0 -0
package/nodejs/0.10.39/0002-gyp-force-link-command-to-use-CXX.patch renamed from package/nodejs/0002-gyp-force-link-command-to-use-CXX.patch +0 -0
package/nodejs/0.10.39/0003-use-python-variable.patch renamed from package/nodejs/0003-use-python-variable.patch +0 -0
package/nodejs/0.10.39/0004-fix-build-error-without-OpenSSL-support.patch renamed from package/nodejs/0004-fix-build-error-without-OpenSSL-support.patch +0 -0
package/nodejs/Config.in +14 -0
@@ -22,6 +22,20 @@ comment "nodejs needs a toolchain w/ C++, threads" if BR2_PACKAGE_NODEJS +choice + prompt "Node.js Version" + default BR2_BR2_PACKAGE_NODEJS_0_10_39 + help + Select the version of Node.js you wish to use. + + config BR2_BR2_PACKAGE_NODEJS_0_10_39 + bool "v0.10.39" + +endchoice + +config BR2_PACKAGE_NODEJS_VERSION_STRING + string + default "0.10.39" if BR2_BR2_PACKAGE_NODEJS_0_10_39 menu "Module Selection" config BR2_PACKAGE_NODEJS_NPM
package/nodejs/nodejs.mk +1 -1
@@ -4,7 +4,7 @@ # ################################################################################ -NODEJS_VERSION = 0.10.39 +NODEJS_VERSION = $(call qstrip,$(BR2_PACKAGE_NODEJS_VERSION_STRING)) NODEJS_SOURCE = node-v$(NODEJS_VERSION).tar.gz NODEJS_SITE = http://nodejs.org/dist/v$(NODEJS_VERSION) NODEJS_DEPENDENCIES = host-python host-nodejs zlib \
Signature · 1 line
2.1.4
PATCH v2 2/6 package/nodejs: Update to allow selecting node.js version
Martin, All,
On 2015-06-27 03:01 +0100, Martin Bark spake thusly:
Quoted 1 line
Signed-off-by Martin Bark <[email protected]>
[--SNIP--]
Quoted 6 lines
package/nodejs/Config.in +0
-0@@ -22,6 +22,20 @@ comment "nodejs needs a toolchain w/ C++, threads"
package/nodejs/Config.in comment "nodejs needs a toolchain w/ C++, threads" · line 32
Quoted 10 lines
package/nodejs/Config.in +8
-0if BR2_PACKAGE_NODEJS +choice + prompt "Node.js Version" + default BR2_BR2_PACKAGE_NODEJS_0_10_39 + help + Select the version of Node.js you wish to use. + + config BR2_BR2_PACKAGE_NODEJS_0_10_39 + bool "v0.10.39"
We normally do not indent the config options in a choice block.
package/nodejs/Config.in comment "nodejs needs a toolchain w/ C++, threads" · line 39
Quoted 6 lines
package/nodejs/Config.in +5
-0+endchoice + +config BR2_PACKAGE_NODEJS_VERSION_STRING + string + default "0.10.39" if BR2_BR2_PACKAGE_NODEJS_0_10_39 menu "Module Selection"
Missinge empty line before the menu definition.
Otherwise, looks good; when you fix the above, you can add my:
Reviewed-by: "Yann E. MORIN" <[email protected]>
Regards,
Yann E. MORIN.
Quoted 21 lines
package/nodejs/Config.in +0
-0config BR2_PACKAGE_NODEJS_NPMpackage/nodejs/nodejs.mk +1
-1@@ -4,7 +4,7 @@ # ################################################################################ -NODEJS_VERSION = 0.10.39 +NODEJS_VERSION = $(call qstrip,$(BR2_PACKAGE_NODEJS_VERSION_STRING)) NODEJS_SOURCE = node-v$(NODEJS_VERSION).tar.gz NODEJS_SITE = http://nodejs.org/dist/v$(NODEJS_VERSION) NODEJS_DEPENDENCIES = host-python host-nodejs zlib \Signature · 6 lines
2.1.4 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
Thomas Petazzoni
AppliedPATCH v2 2/6 package/nodejs: Update to allow selecting node.js version
In reply to Martin BarkDear Martin Bark,
Quoted 5 lines · Martin Bark
Signed-off-by Martin Bark <[email protected]>---
Changes v1 -> v2
- Updated to node.js v0.10.39
Thanks, applied after fixing the minor Config.in formatting issues pointed by Yann.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v2 3/6 package/nodejs: Add node.js v0.12.5 and set as the default version
In reply to Martin Bark---
Changed v1 -> v2
- Added depends on !BR2_ARM_CPU_ARMV5
- Updated from node.js v0.12.4 to v0.12.5
--- ...01-Remove-dependency-on-Python-bz2-module.patch | 38 +++++++++++++ .../0002-gyp-force-link-command-to-use-CXX.patch | 27 ++++++++++ ...hon-variable-instead-of-hardcoding-Python.patch | 62 ++++++++++++++++++++++ ...4-fix-build-error-without-OpenSSL-support.patch | 45 ++++++++++++++++ package/nodejs/Config.in | 8 ++- package/nodejs/nodejs.hash | 3 ++ 6 files changed, 182 insertions(+), 1 deletion(-) create mode 100644 package/nodejs/0.12.5/0001-Remove-dependency-on-Python-bz2-module.patch create mode 100644 package/nodejs/0.12.5/0002-gyp-force-link-command-to-use-CXX.patch create mode 100644 package/nodejs/0.12.5/0003-Use-a-python-variable-instead-of-hardcoding-Python.patch create mode 100644 package/nodejs/0.12.5/0004-fix-build-error-without-OpenSSL-support.patch
package/nodejs/0.12.5/0001-Remove-dependency-on-Python-bz2-module.patch new file +38 -0
@@ -0,0 +1,38 @@ +From 2f57d17b8b1a8cb78bd9cff874a006adba3afd4a Mon Sep 17 00:00:00 2001 +From: Martin Bark <[email protected]> +Date: Thu, 11 Jun 2015 20:05:11 +0100 +Subject: [PATCH 1/4] Remove dependency on Python bz2 module + +The Python bz2 module is only needed in certain cases, so only import +it when needed. In the normal nodejs build, this allows to remove the +dependency on this module. + +Cc: Thomas Petazzoni <[email protected]> +Signed-off-by: Martin Bark <[email protected]> +--- + deps/v8/tools/js2c.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/deps/v8/tools/js2c.py b/deps/v8/tools/js2c.py +index 77485f6..371caf5 100755 +--- a/deps/v8/tools/js2c.py ++++ b/deps/v8/tools/js2c.py +@@ -34,7 +34,6 @@ + import os, re, sys, string + import optparse + import jsmin +-import bz2 + import textwrap + + +@@ -492,6 +491,7 @@ def CompressMaybe(sources, compression_type): + if compression_type == "off": + return sources_bytes + elif compression_type == "bz2": ++ import bz2 + return bz2.compress(sources_bytes) + else: + raise Error("Unknown compression type %s." % compression_type) +-- +2.1.4 +
package/nodejs/0.12.5/0002-gyp-force-link-command-to-use-CXX.patch new file +27 -0
@@ -0,0 +1,27 @@ +From 04bda7143f7ea6c6e6b659b73547b463f7e28c65 Mon Sep 17 00:00:00 2001 +From: Martin Bark <[email protected]> +Date: Thu, 11 Jun 2015 19:27:46 +0100 +Subject: [PATCH 2/4] gyp: force link command to use CXX + +Cc: Samuel Martin <[email protected]> +Signed-off-by: Martin Bark <[email protected]> +--- + tools/gyp/pylib/gyp/generator/make.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tools/gyp/pylib/gyp/generator/make.py b/tools/gyp/pylib/gyp/generator/make.py +index b88a433..0a1f2e0 100644 +--- a/tools/gyp/pylib/gyp/generator/make.py ++++ b/tools/gyp/pylib/gyp/generator/make.py +@@ -141,7 +141,7 @@ cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^) + # special "figure out circular dependencies" flags around the entire + # input list during linking. + quiet_cmd_link = LINK($(TOOLSET)) $@ +-cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ -Wl,--start-group $(LD_INPUTS) -Wl,--end-group $(LIBS) ++cmd_link = $(CXX.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ -Wl,--start-group $(LD_INPUTS) -Wl,--end-group $(LIBS) + + # We support two kinds of shared objects (.so): + # 1) shared_library, which is just bundling together many dependent libraries +-- +2.1.4 +
package/nodejs/0.12.5/0003-Use-a-python-variable-instead-of-hardcoding-Python.patch new file +62 -0
62 lines not on this page · raw message
package/nodejs/0.12.5/0004-fix-build-error-without-OpenSSL-support.patch new file +45 -0
45 lines not on this page · raw message
package/nodejs/Config.in +7 -1
@@ -24,18 +24,24 @@ if BR2_PACKAGE_NODEJS choice prompt "Node.js Version" - default BR2_BR2_PACKAGE_NODEJS_0_10_39 + default BR2_BR2_PACKAGE_NODEJS_0_12_5 help Select the version of Node.js you wish to use. config BR2_BR2_PACKAGE_NODEJS_0_10_39 bool "v0.10.39" + config BR2_BR2_PACKAGE_NODEJS_0_12_5 + # Needs minimum of ARMv6 with VFPv2 + depends on !BR2_ARM_CPU_ARMV5 + bool "v0.12.5" endchoice config BR2_PACKAGE_NODEJS_VERSION_STRING string default "0.10.39" if BR2_BR2_PACKAGE_NODEJS_0_10_39 + default "0.12.5" if BR2_BR2_PACKAGE_NODEJS_0_12_5 + menu "Module Selection" config BR2_PACKAGE_NODEJS_NPM
package/nodejs/nodejs.hash +3 -0
@@ -1,2 +1,5 @@ # From upstream URL: http://nodejs.org/dist/v0.10.39/SHASUMS256.txt sha256 68f8d8f9515c4e77e2a06034b742e19e9848c1fee5bcadedc1d68f3e4302df37 node-v0.10.39.tar.gz + +# From upstream URL: http://nodejs.org/dist/v0.12.5/SHASUMS256.txt +sha256 4bc1e25f4c62ac65324d3cf4aa9de2d801cd708757c3567b6ad2ced7df30cdd2 node-v0.12.5.tar.gz
Signature · 1 line
2.1.4
PATCH v2 3/6 package/nodejs: Add node.js v0.12.5 and set as the default version
Martin, All,
On 2015-06-27 03:01 +0100, Martin Bark spake thusly:
Quoted 1 line
Signed-off-by Martin Bark <[email protected]>
[--SNIP--]
Quoted 7 lines
package/nodejs/0.12.5/0001-Remove-dependency-on-Python-bz2-module.patch new file +1
-0@@ -0,0 +1,38 @@ +From 2f57d17b8b1a8cb78bd9cff874a006adba3afd4a Mon Sep 17 00:00:00 2001
package/nodejs/0.12.5/0001-Remove-dependency-on-Python-bz2-module.patch line 11
Quoted 10 lines
package/nodejs/0.12.5/0001-Remove-dependency-on-Python-bz2-module.patch new file +10
-0+From: Martin Bark <[email protected]> +Date: Thu, 11 Jun 2015 20:05:11 +0100 +Subject: [PATCH 1/4] Remove dependency on Python bz2 module + +The Python bz2 module is only needed in certain cases, so only import +it when needed. In the normal nodejs build, this allows to remove the +dependency on this module. + +Cc: Thomas Petazzoni <[email protected]> +Signed-off-by: Martin Bark <[email protected]>
Since you're taking the original patch from 0.10 by Thomas, and adapt it to 0.12, you should have kept the attribution and add yourself to the list, like so:
[--SNIP--]
package/nodejs/0.12.5/0002-gyp-force-link-command-to-use-CXX.patch line 7
Quoted 13 lines
package/nodejs/0.12.5/0002-gyp-force-link-command-to-use-CXX.patch new file +7
-0@@ -0,0 +1,27 @@ +From 04bda7143f7ea6c6e6b659b73547b463f7e28c65 Mon Sep 17 00:00:00 2001 +From: Martin Bark <[email protected]> +Date: Thu, 11 Jun 2015 19:27:46 +0100 +Subject: [PATCH 2/4] gyp: force link command to use CXX + +Cc: Samuel Martin <[email protected]> +Signed-off-by: Martin Bark <[email protected]>
Ditto, but this time the patch is (AFAICS) exactly the same as the patch for 0.10, so you should have kept attribution and add yourself to the list, too:
[--SNIP--]
Quoted 11 lines
package/nodejs/0.12.5/0003-Use-a-python-variable-instead-of-hardcoding-Python.patch new file +5
-0@@ -0,0 +1,62 @@ +From d6cc10f0765c97c402b1c1be0968f9d9eb112da9 Mon Sep 17 00:00:00 2001 +From: Martin Bark <[email protected]> +Date: Thu, 11 Jun 2015 19:25:09 +0100 +Subject: [PATCH 3/4] Use a python variable instead of hardcoding Python +
package/nodejs/0.12.5/0003-Use-a-python-variable-instead-of-hardcoding-Python.patch line 15
Quoted 10 lines
package/nodejs/0.12.5/0003-Use-a-python-variable-instead-of-hardcoding-Python.patch new file +10
-0+The nodejs build system uses python in a number of locations. However, +there are some locations where it hardcodes 'python' as the Python +interpreter. However, this causes problems when we need to use python2 +instead of just python. + +This patch fixes that by using the python variable already in place in +the nodejs build system. + +Cc: Thomas Petazzoni <[email protected]> +Signed-off-by: Martin Bark <[email protected]>
Ditto:
[--SNIP--]
Quoted 6 lines
package/nodejs/0.12.5/0004-fix-build-error-without-OpenSSL-support.patch new file +0
-0
package/nodejs/0.12.5/0004-fix-build-error-without-OpenSSL-support.patch line 10
Quoted 10 lines
package/nodejs/0.12.5/0004-fix-build-error-without-OpenSSL-support.patch new file +10
-0@@ -0,0 +1,45 @@ +From ce288a677d89c72c2f4cd832dc4afb2e21ae060e Mon Sep 17 00:00:00 2001 +From: Martin Bark <[email protected]> +Date: Thu, 11 Jun 2015 19:57:40 +0100 +Subject: [PATCH 4/4] fix build error without OpenSSL support +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Cc: J?rg Krause <[email protected]> +Signed-off-by: Martin Bark <[email protected]>
Ditto:
[--SNIP--]
package/nodejs/Config.in if BR2_PACKAGE_NODEJS · line 27
Quoted 10 lines
package/nodejs/Config.in +1
-1@@ -24,18 +24,24 @@ if BR2_PACKAGE_NODEJS choice prompt "Node.js Version" - default BR2_BR2_PACKAGE_NODEJS_0_10_39 + default BR2_BR2_PACKAGE_NODEJS_0_12_5
Actually, that's semantically incorrect, even though it's technically working. OK, I'll explain! ;-) :
You should keep both defaults
default BR2_BR2_PACKAGE_NODEJS_0_10_39 if BR2_ARM_CPU_ARMV5
default BR2_BR2_PACKAGE_NODEJS_0_12_5Kconfig will stop at the first default that matches its conditions, so in case you have an armv5, 0.10.39 will be the default; otherwise the default will be 0.12.5.
(note that we don't care about armv4 because nodejs as a whole depends on !armv4.
So, even though 0.12.5 is hidden for armv5, and thus can't be sledted, it feels wrong to have as an unconditional default (what does it mean to default to something that is not available?).
Quoted 7 lines
package/nodejs/Config.in +1
-0help Select the version of Node.js you wish to use. config BR2_BR2_PACKAGE_NODEJS_0_10_39 bool "v0.10.39" + config BR2_BR2_PACKAGE_NODEJS_0_12_5
package/nodejs/Config.in if BR2_PACKAGE_NODEJS · line 44
Quoted 10 lines
package/nodejs/Config.in +5
-0+ # Needs minimum of ARMv6 with VFPv2 + depends on !BR2_ARM_CPU_ARMV5 + bool "v0.12.5" endchoice config BR2_PACKAGE_NODEJS_VERSION_STRING string default "0.10.39" if BR2_BR2_PACKAGE_NODEJS_0_10_39 + default "0.12.5" if BR2_BR2_PACKAGE_NODEJS_0_12_5 +
Oh, look! An empty line! Hehe! ;-)
package/nodejs/nodejs.hash line 5
Quoted 13 lines
package/nodejs/Config.in +0
-0menu "Module Selection" config BR2_PACKAGE_NODEJS_NPMpackage/nodejs/nodejs.hash +3
-0@@ -1,2 +1,5 @@ # From upstream URL: http://nodejs.org/dist/v0.10.39/SHASUMS256.txt sha256 68f8d8f9515c4e77e2a06034b742e19e9848c1fee5bcadedc1d68f3e4302df37 node-v0.10.39.tar.gz + +# From upstream URL: http://nodejs.org/dist/v0.12.5/SHASUMS256.txt +sha256 4bc1e25f4c62ac65324d3cf4aa9de2d801cd708757c3567b6ad2ced7df30cdd2 node-v0.12.5.tar.gz
Hash correct.
Regards,
Yann E. MORIN.
Quoted 7 lines
Signature · 6 lines
2.1.4 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 13 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20150628/f4bf6d90/attachment.asc>
PATCH v2 3/6 package/nodejs: Add node.js v0.12.5 and set as the default version
Yann,
Thanks for the feedback and explanation, I'll get an updated patch set send out soon.
Thanks,
Martin
Quoted 191 lines · Yann E. MORIN
Martin, All,
On 2015-06-27 03:01 +0100, Martin Bark spake thusly:
Quoted 1 line
Signed-off-by Martin Bark <[email protected]>[--SNIP--]
Quoted 7 lines
package/nodejs/0.12.5/0001-Remove-dependency-on-Python-bz2-module.patch new file +1
-0@@ -0,0 +1,38 @@ +From 2f57d17b8b1a8cb78bd9cff874a006adba3afd4a Mon Sep 17 00:00:00 2001package/nodejs/0.12.5/0001-Remove-dependency-on-Python-bz2-module.patch line 11
Quoted 10 lines
package/nodejs/0.12.5/0001-Remove-dependency-on-Python-bz2-module.patch new file +10
-0+From: Martin Bark <[email protected]> +Date: Thu, 11 Jun 2015 20:05:11 +0100 +Subject: [PATCH 1/4] Remove dependency on Python bz2 module + +The Python bz2 module is only needed in certain cases, so only import +it when needed. In the normal nodejs build, this allows to remove the +dependency on this module. + +Cc: Thomas Petazzoni <[email protected]> +Signed-off-by: Martin Bark <[email protected]>Since you're taking the original patch from 0.10 by Thomas, and adapt it to 0.12, you should have kept the attribution and add yourself to the list, like so:
Signed-off-by Thomas Petazzoni <[email protected]>[Martin: adapt to 0.12.5]Signed-off-by Martin Bark <[email protected]>[--SNIP--]
package/nodejs/0.12.5/0002-gyp-force-link-command-to-use-CXX.patch line 7
Quoted 13 lines
package/nodejs/0.12.5/0002-gyp-force-link-command-to-use-CXX.patch new file +7
-0@@ -0,0 +1,27 @@ +From 04bda7143f7ea6c6e6b659b73547b463f7e28c65 Mon Sep 17 00:00:00 2001 +From: Martin Bark <[email protected]> +Date: Thu, 11 Jun 2015 19:27:46 +0100 +Subject: [PATCH 2/4] gyp: force link command to use CXX + +Cc: Samuel Martin <[email protected]> +Signed-off-by: Martin Bark <[email protected]>Ditto, but this time the patch is (AFAICS) exactly the same as the patch for 0.10, so you should have kept attribution and add yourself to the list, too:
Signed-off-by Samuel Martin <[email protected]>Signed-off-by Martin Bark <[email protected]>[--SNIP--]
Quoted 11 lines
package/nodejs/0.12.5/0003-Use-a-python-variable-instead-of-hardcoding-Python.patch new file +5
-0@@ -0,0 +1,62 @@ +From d6cc10f0765c97c402b1c1be0968f9d9eb112da9 Mon Sep 17 00:00:00 2001 +From: Martin Bark <[email protected]> +Date: Thu, 11 Jun 2015 19:25:09 +0100 +Subject: [PATCH 3/4] Use a python variable instead of hardcoding Python +package/nodejs/0.12.5/0003-Use-a-python-variable-instead-of-hardcoding-Python.patch line 15
Quoted 10 lines
package/nodejs/0.12.5/0003-Use-a-python-variable-instead-of-hardcoding-Python.patch new file +10
-0+The nodejs build system uses python in a number of locations. However, +there are some locations where it hardcodes 'python' as the Python +interpreter. However, this causes problems when we need to use python2 +instead of just python. + +This patch fixes that by using the python variable already in place in +the nodejs build system. + +Cc: Thomas Petazzoni <[email protected]> +Signed-off-by: Martin Bark <[email protected]>Ditto:
Signed-off-by Thomas Petazzoni <[email protected]>[Martin: adapt to 0.12.5]Signed-off-by Martin Bark <[email protected]>[--SNIP--]
Quoted 6 lines
package/nodejs/0.12.5/0004-fix-build-error-without-OpenSSL-support.patch new file +0
-0package/nodejs/0.12.5/0004-fix-build-error-without-OpenSSL-support.patch line 10
Quoted 10 lines
package/nodejs/0.12.5/0004-fix-build-error-without-OpenSSL-support.patch new file +10
-0@@ -0,0 +1,45 @@ +From ce288a677d89c72c2f4cd832dc4afb2e21ae060e Mon Sep 17 00:00:00 2001 +From: Martin Bark <[email protected]> +Date: Thu, 11 Jun 2015 19:57:40 +0100 +Subject: [PATCH 4/4] fix build error without OpenSSL support +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Cc: J?rg Krause <[email protected]> +Signed-off-by: Martin Bark <[email protected]>Ditto:
Signed-off-by J?rg Krause <[email protected]>[Martin: adapt to 0.12.5]Signed-off-by Martin Bark <[email protected]>[--SNIP--]
package/nodejs/Config.in if BR2_PACKAGE_NODEJS · line 27
Quoted 10 lines
package/nodejs/Config.in +1
-1@@ -24,18 +24,24 @@ if BR2_PACKAGE_NODEJS choice prompt "Node.js Version" - default BR2_BR2_PACKAGE_NODEJS_0_10_39 + default BR2_BR2_PACKAGE_NODEJS_0_12_5Actually, that's semantically incorrect, even though it's technically working. OK, I'll explain! ;-) :
You should keep both defaults
default BR2_BR2_PACKAGE_NODEJS_0_10_39 if BR2_ARM_CPU_ARMV5 default BR2_BR2_PACKAGE_NODEJS_0_12_5
Kconfigwill stop at the first default that matches its conditions, so in case you have an armv5, 0.10.39 will be the default; otherwise the default will be 0.12.5.(note that we don't care about armv4 because nodejs as a whole depends on !armv4.
So, even though 0.12.5 is hidden for armv5, and thus can't be sledted, it feels wrong to have as an unconditional default (what does it mean to default to something that is not available?).
Quoted 7 lines
package/nodejs/Config.in +1
-0help Select the version of Node.js you wish to use. config BR2_BR2_PACKAGE_NODEJS_0_10_39 bool "v0.10.39" + config BR2_BR2_PACKAGE_NODEJS_0_12_5package/nodejs/Config.in if BR2_PACKAGE_NODEJS · line 44
Quoted 10 lines
package/nodejs/Config.in +5
-0+ # Needs minimum of ARMv6 with VFPv2 + depends on !BR2_ARM_CPU_ARMV5 + bool "v0.12.5" endchoice config BR2_PACKAGE_NODEJS_VERSION_STRING string default "0.10.39" if BR2_BR2_PACKAGE_NODEJS_0_10_39 + default "0.12.5" if BR2_BR2_PACKAGE_NODEJS_0_12_5 +Oh, look! An empty line! Hehe! ;-)
package/nodejs/nodejs.hash line 5
Quoted 13 lines
package/nodejs/Config.in +0
-0menu "Module Selection" config BR2_PACKAGE_NODEJS_NPMpackage/nodejs/nodejs.hash +3
-0@@ -1,2 +1,5 @@ # From upstream URL: http://nodejs.org/dist/v0.10.39/SHASUMS256.txt sha256 68f8d8f9515c4e77e2a06034b742e19e9848c1fee5bcadedc1d68f3e4302df37 node-v0.10.39.tar.gz + +# From upstream URL: http://nodejs.org/dist/v0.12.5/SHASUMS256.txt +sha256 4bc1e25f4c62ac65324d3cf4aa9de2d801cd708757c3567b6ad2ced7df30cdd2 node-v0.12.5.tar.gzHash correct.
Regards,
Yann E. MORIN.Quoted 7 lines
--
2.1.4_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot--
.-----------------.--------------------.------------------.--------------------.| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |'------------------------------^-------^------------------^--------------------'
PATCH v2 4/6 package/nodejs: Add /usr/lib/node_modules/.bin to PATH
In reply to Martin BarkThis patch adds /usr/lib/node_modules/.bin to PATH so that global node_modules are accessible from the command line
---
Changes v1 -> v2
- Improved commit message
--- package/nodejs/nodejs.mk | 5 +++++ 1 file changed, 5 insertions(+)
package/nodejs/nodejs.mk +5 -0
@@ -111,6 +111,11 @@ define NODEJS_INSTALL_MODULES $(HOST_DIR)/usr/bin/npm install \ $(NODEJS_MODULES_LIST) \ ) + + # Add global node_modules to PATH + $(INSTALL) -d -m 0755 $(TARGET_DIR)/etc/profile.d + printf "export PATH=\x24PATH:/usr/lib/node_modules/.bin\n" \ + >$(TARGET_DIR)/etc/profile.d/node_modules.sh endef endif
Signature · 1 line
2.1.4
PATCH v2 4/6 package/nodejs: Add /usr/lib/node_modules/.bin to PATH
Martin, All,
On 2015-06-27 03:01 +0100, Martin Bark spake thusly:
Quoted 19 lines
This patch adds
/usr/lib/node_modules/.binto PATH so that globalnode_modulesare accessible from the command lineSigned-off-by Martin Bark <[email protected]>---
Changes v1 -> v2
- Improved commit messageSigned-off-by Martin Bark <[email protected]>--- package/nodejs/nodejs.mk | 5 +++++ 1 file changed, 5 insertions(+)package/nodejs/nodejs.mk +0
-0
package/nodejs/nodejs.mk define NODEJS_INSTALL_MODULES · line 117
Quoted 7 lines
package/nodejs/nodejs.mk +4
-0@@ -111,6 +111,11 @@ define NODEJS_INSTALL_MODULES $(HOST_DIR)/usr/bin/npm install \ $(NODEJS_MODULES_LIST) \ ) + + # Add global node_modules to PATH + $(INSTALL) -d -m 0755 $(TARGET_DIR)/etc/profile.d + printf "export PATH=\x24PATH:/usr/lib/node_modules/.bin\n" \
Nice trick, but what about the slightly-more readable;
printf 'PATH="$${PATH}:/usr/lib/node_modules/.bin"\n' \
>$(TARGET_DIR)/etc/profile.d/node_modules.sh - because this is in a Makefile, so we need to $-escape the $.
- because we do not want that $ to be interpreted by the shell (at build time!), we single-quote it.
- because whoever knows what PATH is made of would be a fool (and because the world is cruel), we double-quote it (at runtime!)
Otherwise, what is the reason to have nodejs modules available as commands from a login (!) shell? (Note: nodejs-noob speaking!)
Regards,
Yann E. MORIN.
Quoted 11 lines
package/nodejs/nodejs.mk +1
-0+ >$(TARGET_DIR)/etc/profile.d/node_modules.sh endef endifSignature · 6 lines
2.1.4 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v2 4/6 package/nodejs: Add /usr/lib/node_modules/.bin to PATH
Yann,
Yes I agree your way is easier to read, I'll update my patch and resubmit it.
The reason this is useful is because there lots of node.js packages that are normal command line apps designed to be installed globally. For example, if you install http-server
(https://github.com/indexzero/http-server) then you simple need to cd into any directory, type ./http-server and it will server that directory up for you. Another example might be vtop
(https://github.com/MrRio/vtop), a graphical version of top.
If you install these apps globally then all the executables will be in the /usr/lib/node_modules/.bin directory. So this patch simply saves you typing the full path, the same as for your desktop.
You can test this out by setting BR2_PACKAGE_NODEJS_MODULES_ADDITIONAL to one of these packages. For reference these is a nice list of some useful apps here
https://github.com/sindresorhus/awesome-nodejs#command-line-apps.
Thanks
Martin
Quoted 68 lines · Yann E. MORIN
Martin, All,
On 2015-06-27 03:01 +0100, Martin Bark spake thusly:
Quoted 19 lines
This patch adds
/usr/lib/node_modules/.binto PATH so that globalnode_modulesare accessible from the command lineSigned-off-by Martin Bark <[email protected]>---
Changes v1 -> v2
- Improved commit messageSigned-off-by Martin Bark <[email protected]>--- package/nodejs/nodejs.mk | 5 +++++ 1 file changed, 5 insertions(+)package/nodejs/nodejs.mk +0
-0package/nodejs/nodejs.mk define NODEJS_INSTALL_MODULES · line 117
Quoted 7 lines
package/nodejs/nodejs.mk +4
-0@@ -111,6 +111,11 @@ define NODEJS_INSTALL_MODULES $(HOST_DIR)/usr/bin/npm install \ $(NODEJS_MODULES_LIST) \ ) + + # Add global node_modules to PATH + $(INSTALL) -d -m 0755 $(TARGET_DIR)/etc/profile.d + printf "export PATH=\x24PATH:/usr/lib/node_modules/.bin\n" \Nice trick, but what about the slightly-more readable;
printf 'PATH="$${PATH}:/usr/lib/node_modules/.bin"\n' \ >$(TARGET_DIR)/etc/profile.d/node_modules.sh- because this is in a
Makefile, so we need to $-escape the $.- because we do not want that $ to be interpreted by the shell (at build time!), we single-quote it.
- because whoever knows what PATH is made of would be a fool (and because the world is cruel), we double-quote it (at runtime!)
Otherwise, what is the reason to have nodejs modules available as commands from a login (!) shell? (Note: nodejs-noob speaking!)
Regards,
Yann E. MORIN.Quoted 11 lines
package/nodejs/nodejs.mk +1
-1+ >$(TARGET_DIR)/etc/profile.d/node_modules.sh endef endif --2.1.4
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot--
.-----------------.--------------------.------------------.--------------------.| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |'------------------------------^-------^------------------^--------------------'
PATCH v2 4/6 package/nodejs: Add /usr/lib/node_modules/.bin to PATH
Martin, All,
On 2015-06-29 10:13 +0100, Martin Bark spake thusly:
Quoted 1 line
Yes I agree your way is easier to read, I'll update my patch and resubmit it.
Great, thanls! :-)
Quoted 5 lines
The reason this is useful is because there lots of node.js packages that are normal command line apps designed to be installed globally. For example, if you install http-server
(https://github.com/indexzero/http-server) then you simple need to cd into any directory, type ./http-server and it will server that
You mean, http-server must be in the directory you want to serve? Or did you mean that you just run /path/to/http-server and it will serve the current directory? (I guess the latter.)
Quoted 6 lines
directory up for you. Another example might be vtop
(https://github.com/MrRio/vtop), a graphical version of top.If you install these apps globally then all the executables will be in the
/usr/lib/node_modules/.bindirectory. So this patch simply saves you typing the full path, the same as for your desktop.
OK, so why not make symlinks (or hadlinks) for each of them in /usr/bin instead? Something like (untested):
cd $(TARGET_DIR)/usr/bin; \
for f in ../../usr/lib/node_modules/.bin/*; do \
[ -f "$${f}" -a -x "$${f}" ] || continue; \
ln -sf "$${f}" "$${f##*/}" || exit 1; \
doneRegards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v2 4/6 package/nodejs: Add /usr/lib/node_modules/.bin to PATH
Yann,
Quoted 13 lines · Yann E. MORIN
Martin, All,
On 2015-06-29 10:13 +0100, Martin Bark spake thusly:
Quoted 1 line
Yes I agree your way is easier to read, I'll update my patch and resubmit it.
Great, thanls! :-)
Quoted 5 lines
The reason this is useful is because there lots of node.js packages that are normal command line apps designed to be installed globally. For example, if you install http-server
(https://github.com/indexzero/http-server) then you simple need to cd into any directory, type ./http-server and it will server that
Quoted 3 lines
You mean, http-server must be in the directory you want to serve? Or did you mean that you just run /path/to/http-server and it will serve the current directory? (I guess the latter.)
Yes i meant the latter
Quoted 8 lines
Quoted 7 lines
directory up for you. Another example might be vtop
(https://github.com/MrRio/vtop), a graphical version of top.If you install these apps globally then all the executables will be in the
/usr/lib/node_modules/.bindirectory. So this patch simply saves you typing the full path, the same as for your desktop.
Quoted 9 lines
OK, so why not make symlinks (or hadlinks) for each of them in
/usr/bininstead? Something like (untested):cd $(TARGET_DIR)/usr/bin; \ for f in ../../usr/lib/node_modules/.bin/*; do \ [ -f "$${f}" -a -x "$${f}" ] || continue; \ ln -sf "$${f}" "$${f##*/}" || exit 1; \ done
OK i can see that working too and it saves adjusting PATH. I'll send an updated patch using your method.
Thanks
Martin
PATCH v2 5/6 package/nodejs: Define NPM command for other packages to use
In reply to Martin Bark---
Changes v1 -> v2
- No changes
--- package/nodejs/nodejs.mk | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)
package/nodejs/nodejs.mk +8 -6
@@ -95,6 +95,13 @@ NODEJS_MODULES_LIST= $(call qstrip,\ $(if $(BR2_PACKAGE_NODEJS_MODULES_COFFEESCRIPT),coffee-script) \ $(BR2_PACKAGE_NODEJS_MODULES_ADDITIONAL)) +# Define NPM for other packages to use +NPM = $(TARGET_CONFIGURE_OPTS) \ + LD="$(TARGET_CXX)" \ + npm_config_arch=$(NODEJS_CPU) \ + npm_config_nodedir=$(BUILD_DIR)/nodejs-$(NODEJS_VERSION) \ + $(HOST_DIR)/usr/bin/npm + # # We can only call NPM if there's something to install. #
@@ -104,12 +111,7 @@ define NODEJS_INSTALL_MODULES # npm install call below and setting npm_config_rollback=false can both # help in diagnosing the problem. (cd $(TARGET_DIR)/usr/lib && mkdir -p node_modules && \ - $(TARGET_CONFIGURE_OPTS) \ - LD="$(TARGET_CXX)" \ - npm_config_arch=$(NODEJS_CPU) \ - npm_config_nodedir=$(BUILD_DIR)/nodejs-$(NODEJS_VERSION) \ - $(HOST_DIR)/usr/bin/npm install \ - $(NODEJS_MODULES_LIST) \ + $(NPM) install $(NODEJS_MODULES_LIST) \ ) # Add global node_modules to PATH
Signature · 1 line
2.1.4
PATCH v2 5/6 package/nodejs: Define NPM command for other packages to use
Martin, All,
On 2015-06-27 03:01 +0100, Martin Bark spake thusly:
Quoted 1 line
Signed-off-by Martin Bark <[email protected]>
But see below...
Quoted 28 lines
---
Changes v1 -> v2
- No changesSigned-off-by Martin Bark <[email protected]>--- package/nodejs/nodejs.mk | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)package/nodejs/nodejs.mk +7
-0@@ -95,6 +95,13 @@ NODEJS_MODULES_LIST= $(call qstrip,\ $(if $(BR2_PACKAGE_NODEJS_MODULES_COFFEESCRIPT),coffee-script) \ $(BR2_PACKAGE_NODEJS_MODULES_ADDITIONAL)) +# Define NPM for other packages to use +NPM = $(TARGET_CONFIGURE_OPTS) \ + LD="$(TARGET_CXX)" \ + npm_config_arch=$(NODEJS_CPU) \ + npm_config_nodedir=$(BUILD_DIR)/nodejs-$(NODEJS_VERSION) \ + $(HOST_DIR)/usr/bin/npm + # # We can only call NPM if there's something to install. #
package/nodejs/nodejs.mk define NODEJS_INSTALL_MODULES · line 114
Quoted 10 lines
package/nodejs/nodejs.mk +1
-6@@ -104,12 +111,7 @@ define NODEJS_INSTALL_MODULES # npm install call below and setting npm_config_rollback=false can both # help in diagnosing the problem. (cd $(TARGET_DIR)/usr/lib && mkdir -p node_modules && \ - $(TARGET_CONFIGURE_OPTS) \ - LD="$(TARGET_CXX)" \ - npm_config_arch=$(NODEJS_CPU) \ - npm_config_nodedir=$(BUILD_DIR)/nodejs-$(NODEJS_VERSION) \ - $(HOST_DIR)/usr/bin/npm install \ - $(NODEJS_MODULES_LIST) \ + $(NPM) install $(NODEJS_MODULES_LIST) \
Although the change looks trivially OK, I wonder why you introduce $(NPM) for this single user (there is no other user of $(NPM) added in your series).
Do you intend to send more patches that make use of $(NPM) ?
Regards,
Yann E. MORIN.
Quoted 10 lines
package/nodejs/nodejs.mk +0
-0) # Add global node_modules to PATHSignature · 6 lines
2.1.4 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v2 5/6 package/nodejs: Define NPM command for other packages to use
Yann,
Yes I was thinking of submitting some patches to add other node.js based packages but really I just submitted this patch because I though
$(NPM) would be useful for other people too. I was thinking of
submitting pm2 (https://www.npmjs.com/package/pm2) as a package to buildroot. pm2 is a popular process manager and I've used it to solve the issue of starting/stopping other node.js apps. Having $(NPM) defined makes writing node.js based packages for buildroot easier.
Thanks
Martin
Quoted 75 lines · Yann E. MORIN
Martin, All,
On 2015-06-27 03:01 +0100, Martin Bark spake thusly:
Quoted 1 line
Signed-off-by Martin Bark <[email protected]>Reviewed-by "Yann E. MORIN" <[email protected]>But see below...
Quoted 28 lines
---
Changes v1 -> v2
- No changesSigned-off-by Martin Bark <[email protected]>--- package/nodejs/nodejs.mk | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)package/nodejs/nodejs.mk +7
-0@@ -95,6 +95,13 @@ NODEJS_MODULES_LIST= $(call qstrip,\ $(if $(BR2_PACKAGE_NODEJS_MODULES_COFFEESCRIPT),coffee-script) \ $(BR2_PACKAGE_NODEJS_MODULES_ADDITIONAL)) +# Define NPM for other packages to use +NPM = $(TARGET_CONFIGURE_OPTS) \ + LD="$(TARGET_CXX)" \ + npm_config_arch=$(NODEJS_CPU) \ + npm_config_nodedir=$(BUILD_DIR)/nodejs-$(NODEJS_VERSION) \ + $(HOST_DIR)/usr/bin/npm + # # We can only call NPM if there's something to install. #package/nodejs/nodejs.mk define NODEJS_INSTALL_MODULES · line 114
Quoted 10 lines
package/nodejs/nodejs.mk +1
-6@@ -104,12 +111,7 @@ define NODEJS_INSTALL_MODULES # npm install call below and setting npm_config_rollback=false can both # help in diagnosing the problem. (cd $(TARGET_DIR)/usr/lib && mkdir -p node_modules && \ - $(TARGET_CONFIGURE_OPTS) \ - LD="$(TARGET_CXX)" \ - npm_config_arch=$(NODEJS_CPU) \ - npm_config_nodedir=$(BUILD_DIR)/nodejs-$(NODEJS_VERSION) \ - $(HOST_DIR)/usr/bin/npm install \ - $(NODEJS_MODULES_LIST) \ + $(NPM) install $(NODEJS_MODULES_LIST) \Although the change looks trivially OK, I wonder why you introduce $(NPM) for this single user (there is no other user of $(NPM) added in your series).
Do you intend to send more patches that make use of $(NPM) ?
Regards,
Yann E. MORIN.Quoted 10 lines
package/nodejs/nodejs.mk +0
-1) # Add global node_modules to PATH --2.1.4
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot--
.-----------------.--------------------.------------------.--------------------.| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |'------------------------------^-------^------------------^--------------------'
PATCH v2 5/6 package/nodejs: Define NPM command for other packages to use
Martin, All,
[Please, do not top-post; please interleave your answers with the part you are replying to, it makes it easier to follow...]
On 2015-06-29 11:51 +0100, Martin Bark spake thusly:
Quoted 3 lines
Yes I was thinking of submitting some patches to add other node.js based packages but really I just submitted this patch because I though $(NPM) would be useful for other people too.
OK, that's good. :-) You could have said it more explicitly in the commit log, after a three-dash line:
package/nodejs: Define NPM command for other packages to use
Other nodejs-related packages will need to call npm with the same set of arguments as is currently used by the nodejs package itself.
To avoid duplicating this code, set the NPM variable so those packages can re-use it.
---
Note: currently, this is only used in the nodejs package itself, but I plan on swnding new nodejs-related packages that will use this, like nodejs' serialport or pm2 packages which I have tested successfully using this $(NPM).
(Or something similar, choose your own words if mines are way off! ;-) )
To be noted: whatever gets added after a three-dahs line is omitted by git when the patch is applied by the maintainer, so you can basically write whatever you see fit in there.
Thanks for the explanations!
Regards,
Yann E. MORIN.
Quoted 86 lines
I was thinking of
submitting pm2 (https://www.npmjs.com/package/pm2) as a package to buildroot. pm2 is a popular process manager and I've used it to solve the issue of starting/stopping other node.js apps. Having $(NPM) defined makes writing node.js based packages for buildroot easier.Thanks
Martin
Quoted 75 lines · Yann E. MORIN
Martin, All,
On 2015-06-27 03:01 +0100, Martin Bark spake thusly:
Quoted 1 line
Signed-off-by Martin Bark <[email protected]>Reviewed-by "Yann E. MORIN" <[email protected]>But see below...
Quoted 28 lines
---
Changes v1 -> v2
- No changesSigned-off-by Martin Bark <[email protected]>--- package/nodejs/nodejs.mk | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)package/nodejs/nodejs.mk +7
-0@@ -95,6 +95,13 @@ NODEJS_MODULES_LIST= $(call qstrip,\ $(if $(BR2_PACKAGE_NODEJS_MODULES_COFFEESCRIPT),coffee-script) \ $(BR2_PACKAGE_NODEJS_MODULES_ADDITIONAL)) +# Define NPM for other packages to use +NPM = $(TARGET_CONFIGURE_OPTS) \ + LD="$(TARGET_CXX)" \ + npm_config_arch=$(NODEJS_CPU) \ + npm_config_nodedir=$(BUILD_DIR)/nodejs-$(NODEJS_VERSION) \ + $(HOST_DIR)/usr/bin/npm + # # We can only call NPM if there's something to install. #package/nodejs/nodejs.mk define NODEJS_INSTALL_MODULES · line 114
Quoted 10 lines
package/nodejs/nodejs.mk +1
-6@@ -104,12 +111,7 @@ define NODEJS_INSTALL_MODULES # npm install call below and setting npm_config_rollback=false can both # help in diagnosing the problem. (cd $(TARGET_DIR)/usr/lib && mkdir -p node_modules && \ - $(TARGET_CONFIGURE_OPTS) \ - LD="$(TARGET_CXX)" \ - npm_config_arch=$(NODEJS_CPU) \ - npm_config_nodedir=$(BUILD_DIR)/nodejs-$(NODEJS_VERSION) \ - $(HOST_DIR)/usr/bin/npm install \ - $(NODEJS_MODULES_LIST) \ + $(NPM) install $(NODEJS_MODULES_LIST) \Although the change looks trivially OK, I wonder why you introduce $(NPM) for this single user (there is no other user of $(NPM) added in your series).
Do you intend to send more patches that make use of $(NPM) ?
Regards,
Yann E. MORIN.Quoted 10 lines
package/nodejs/nodejs.mk +0
-1) # Add global node_modules to PATH --2.1.4
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot--
.-----------------.--------------------.------------------.--------------------.| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |'------------------------------^-------^------------------^--------------------'
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v2 5/6 package/nodejs: Define NPM command for other packages to use
Yann,
Quoted 4 lines · Yann E. MORIN
Martin, All,
[Please, do not top-post; please interleave your answers with the part you are replying to, it makes it easier to follow...]
oops, I meant to do that.
Quoted 27 lines
On 2015-06-29 11:51 +0100, Martin Bark spake thusly:
Quoted 3 lines
Yes I was thinking of submitting some patches to add other node.js based packages but really I just submitted this patch because I though $(NPM) would be useful for other people too.
OK, that's good. :-) You could have said it more explicitly in the commit log, after a three-dash line:
package/nodejs: Define NPM command for other packages to use
Other nodejs-related packages will need to call npm with the same set of arguments as is currently used by the nodejs package itself.
To avoid duplicating this code, set the NPM variable so those packages can re-use it.
Signed-off-by you---
Note: currently, this is only used in the nodejs package itself, but I plan on swnding new nodejs-related packages that will use this, like nodejs' serialport or pm2 packages which I have tested successfully using this $(NPM).(Or something similar, choose your own words if mines are way off! ;-) )
Quoted 8 lines
To be noted: whatever gets added after a three-dahs line is omitted by git when the patch is applied by the maintainer, so you can basically write whatever you see fit in there.
Thanks for the explanations!
Regards,
Yann E. MORIN.
Good point, I should have been more explicit with the commit message. I'll fix this.
Thanks
Martin
Quoted 95 lines
Quoted 7 lines
I was thinking of
submitting pm2 (https://www.npmjs.com/package/pm2) as a package to buildroot. pm2 is a popular process manager and I've used it to solve the issue of starting/stopping other node.js apps. Having $(NPM) defined makes writing node.js based packages for buildroot easier.Quoted 80 lines
Thanks
Martin
Quoted 75 lines · Yann E. MORIN
Martin, All,
On 2015-06-27 03:01 +0100, Martin Bark spake thusly:
Quoted 1 line
Signed-off-by Martin Bark <[email protected]>Reviewed-by "Yann E. MORIN" <[email protected]>But see below...
Quoted 28 lines
---
Changes v1 -> v2
- No changesSigned-off-by Martin Bark <[email protected]>--- package/nodejs/nodejs.mk | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)package/nodejs/nodejs.mk +7
-0@@ -95,6 +95,13 @@ NODEJS_MODULES_LIST= $(call qstrip,\ $(if $(BR2_PACKAGE_NODEJS_MODULES_COFFEESCRIPT),coffee-script) \ $(BR2_PACKAGE_NODEJS_MODULES_ADDITIONAL)) +# Define NPM for other packages to use +NPM = $(TARGET_CONFIGURE_OPTS) \ + LD="$(TARGET_CXX)" \ + npm_config_arch=$(NODEJS_CPU) \ + npm_config_nodedir=$(BUILD_DIR)/nodejs-$(NODEJS_VERSION) \ + $(HOST_DIR)/usr/bin/npm + # # We can only call NPM if there's something to install. #package/nodejs/nodejs.mk define NODEJS_INSTALL_MODULES · line 114
Quoted 10 lines
package/nodejs/nodejs.mk +1
-6@@ -104,12 +111,7 @@ define NODEJS_INSTALL_MODULES # npm install call below and setting npm_config_rollback=false can both # help in diagnosing the problem. (cd $(TARGET_DIR)/usr/lib && mkdir -p node_modules && \ - $(TARGET_CONFIGURE_OPTS) \ - LD="$(TARGET_CXX)" \ - npm_config_arch=$(NODEJS_CPU) \ - npm_config_nodedir=$(BUILD_DIR)/nodejs-$(NODEJS_VERSION) \ - $(HOST_DIR)/usr/bin/npm install \ - $(NODEJS_MODULES_LIST) \ + $(NPM) install $(NODEJS_MODULES_LIST) \Although the change looks trivially OK, I wonder why you introduce $(NPM) for this single user (there is no other user of $(NPM) added in your series).
Do you intend to send more patches that make use of $(NPM) ?
Regards,
Yann E. MORIN.Quoted 10 lines
package/nodejs/nodejs.mk +0
-1) # Add global node_modules to PATH --2.1.4
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot--
.-----------------.--------------------.------------------.--------------------.| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |'------------------------------^-------^------------------^--------------------'
--
.-----------------.--------------------.------------------.--------------------.| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |'------------------------------^-------^------------------^--------------------'
PATCH v2 6/6 package/nodejs: Add npm_config_target_arch to npm command
In reply to Martin BarkMany packages use node-pre-gpy as a way of deploying pre compiled binary dependencies with fall back to compilation for other targets. node-gyp uses the option --arch to determine its target architecture (which is already set correctly), however, node-pre-gyp uses --target-arch. Without this set node.js packages that uses node-pre-gyp will pick the wrong target architecture.
This patch sets npm_config_target_arch to solve this issue. I have tested this using the node.js package serialport.
---
Changes v1 -> v2
- No changes, new in v2
--- package/nodejs/nodejs.mk | 1 + 1 file changed, 1 insertion(+)
package/nodejs/nodejs.mk +1 -0
@@ -99,6 +99,7 @@ NODEJS_MODULES_LIST= $(call qstrip,\ NPM = $(TARGET_CONFIGURE_OPTS) \ LD="$(TARGET_CXX)" \ npm_config_arch=$(NODEJS_CPU) \ + npm_config_target_arch=$(NODEJS_CPU) \ npm_config_nodedir=$(BUILD_DIR)/nodejs-$(NODEJS_VERSION) \ $(HOST_DIR)/usr/bin/npm
Signature · 1 line
2.1.4
PATCH v2 1/6 package/nodejs: Bump version to 0.10.39
In reply to Martin BarkMartin, All,
On 2015-06-27 03:01 +0100, Martin Bark spake thusly:
Quoted 1 line
Signed-off-by Martin Bark <[email protected]>
Hash checked by Buildroot.
Regards,
Yann E. MORIN.
Quoted 39 lines
---
Changed v1 -> v2
- No changes, added in v2Signed-off-by Martin Bark <[email protected]>--- package/nodejs/nodejs.hash | 4 ++-- package/nodejs/nodejs.mk | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)package/nodejs/nodejs.hash +2
-2@@ -1,2 +1,2 @@ -# From upstream URL: http://nodejs.org/dist/v0.10.38/SHASUMS256.txt -sha256 513da8ed5e48abefdfab664f1cabc160238d314a0481148804aff8fc6552b78b node-v0.10.38.tar.gz +# From upstream URL: http://nodejs.org/dist/v0.10.39/SHASUMS256.txt +sha256 68f8d8f9515c4e77e2a06034b742e19e9848c1fee5bcadedc1d68f3e4302df37 node-v0.10.39.tar.gzpackage/nodejs/nodejs.mk +1
-1@@ -4,7 +4,7 @@ # ################################################################################ -NODEJS_VERSION = 0.10.38 +NODEJS_VERSION = 0.10.39 NODEJS_SOURCE = node-v$(NODEJS_VERSION).tar.gz NODEJS_SITE = http://nodejs.org/dist/v$(NODEJS_VERSION) NODEJS_DEPENDENCIES = host-python host-nodejs zlib \Signature · 6 lines
2.1.4 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 13 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20150628/b62e8c01/attachment.asc>
Thomas Petazzoni
AppliedPATCH v2 1/6 package/nodejs: Bump version to 0.10.39
In reply to Martin BarkDear Martin Bark,
Quoted 5 lines · Martin Bark
Signed-off-by Martin Bark <[email protected]>---
Changed v1 -> v2
- No changes, added in v2
Applied, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com