All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe][dunfell][PATCH 1/2] nodejs_12.21.0.bb: only handle npm if configured
@ 2022-01-13  8:13 Nisha Parrakat
  2022-01-13  8:13 ` [meta-oe][dunfell][PATCH 2/2] nodejs: upgrade to 12.22.2 Nisha Parrakat
  2022-01-14 13:25 ` [oe] [meta-oe][dunfell][PATCH 1/2] nodejs_12.21.0.bb: only handle npm if configured Peter Kjellerstedt
  0 siblings, 2 replies; 5+ messages in thread
From: Nisha Parrakat @ 2022-01-13  8:13 UTC (permalink / raw)
  To: openembedded-devel, raj.khem; +Cc: nishaparrakat

npm-cli.js should be symlinked only when the file is present
the file may not be available if the configure option is --without-npm

Signed-off-by: Nisha Parrakat <nishaparrakat@gmail.com>
---
 meta-oe/recipes-devtools/nodejs/nodejs_12.21.0.bb | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/meta-oe/recipes-devtools/nodejs/nodejs_12.21.0.bb b/meta-oe/recipes-devtools/nodejs/nodejs_12.21.0.bb
index b9e382177..22191a157 100644
--- a/meta-oe/recipes-devtools/nodejs/nodejs_12.21.0.bb
+++ b/meta-oe/recipes-devtools/nodejs/nodejs_12.21.0.bb
@@ -133,7 +133,9 @@ do_install_append_class-native() {
     # /usr/bin/npm is symlink to /usr/lib/node_modules/npm/bin/npm-cli.js
     # use sed on npm-cli.js because otherwise symlink is replaced with normal file and
     # npm-cli.js continues to use old shebang
-    sed "1s^.*^#\!/usr/bin/env node^g" -i ${D}${exec_prefix}/lib/node_modules/npm/bin/npm-cli.js
+    if [[ -f "${D}${exec_prefix}/lib/node_modules/npm/bin/npm-cli.js" ]]; then
+        sed "1s^.*^#\!/usr/bin/env node^g" -i ${D}${exec_prefix}/lib/node_modules/npm/bin/npm-cli.js
+    fi
 
     # Install the native binaries to provide it within sysroot for the target compilation
     install -d ${D}${bindir}
@@ -147,7 +149,9 @@ do_install_append_class-native() {
 }
 
 do_install_append_class-target() {
-    sed "1s^.*^#\!${bindir}/env node^g" -i ${D}${exec_prefix}/lib/node_modules/npm/bin/npm-cli.js
+    if [[ -f "${D}${exec_prefix}/lib/node_modules/npm/bin/npm-cli.js" ]]; then
+        sed "1s^.*^#\!${bindir}/env node^g" -i ${D}${exec_prefix}/lib/node_modules/npm/bin/npm-cli.js
+    fi
 }
 
 PACKAGES =+ "${PN}-npm"
-- 
2.17.1



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

* [meta-oe][dunfell][PATCH 2/2] nodejs: upgrade to 12.22.2
  2022-01-13  8:13 [meta-oe][dunfell][PATCH 1/2] nodejs_12.21.0.bb: only handle npm if configured Nisha Parrakat
@ 2022-01-13  8:13 ` Nisha Parrakat
  2022-04-05 13:56   ` Ranjitsinh Rathod
  2022-01-14 13:25 ` [oe] [meta-oe][dunfell][PATCH 1/2] nodejs_12.21.0.bb: only handle npm if configured Peter Kjellerstedt
  1 sibling, 1 reply; 5+ messages in thread
From: Nisha Parrakat @ 2022-01-13  8:13 UTC (permalink / raw)
  To: openembedded-devel, raj.khem; +Cc: nishaparrakat

upgrading to next maintainence LTS version

Signed-off-by: Nisha Parrakat <nishaparrakat@gmail.com>
---
 .../nodejs/{nodejs_12.21.0.bb => nodejs_12.22.2.bb}             | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename meta-oe/recipes-devtools/nodejs/{nodejs_12.21.0.bb => nodejs_12.22.2.bb} (98%)

diff --git a/meta-oe/recipes-devtools/nodejs/nodejs_12.21.0.bb b/meta-oe/recipes-devtools/nodejs/nodejs_12.22.2.bb
similarity index 98%
rename from meta-oe/recipes-devtools/nodejs/nodejs_12.21.0.bb
rename to meta-oe/recipes-devtools/nodejs/nodejs_12.22.2.bb
index 22191a157..8d533199b 100644
--- a/meta-oe/recipes-devtools/nodejs/nodejs_12.21.0.bb
+++ b/meta-oe/recipes-devtools/nodejs/nodejs_12.22.2.bb
@@ -26,7 +26,7 @@ SRC_URI = "http://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz \
 SRC_URI_append_class-target = " \
            file://0002-Using-native-binaries.patch \
            "
-SRC_URI[sha256sum] = "052f37ace6f569b513b5a1154b2a45d3c4d8b07d7d7c807b79f1566db61e979d"
+SRC_URI[sha256sum] = "7fd805571df106f086f4c45e131efed98bfd62628d9dec96bd62f8c11b0c48dc"
 
 S = "${WORKDIR}/node-v${PV}"
 
-- 
2.17.1



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

* RE: [oe] [meta-oe][dunfell][PATCH 1/2] nodejs_12.21.0.bb: only handle npm if configured
  2022-01-13  8:13 [meta-oe][dunfell][PATCH 1/2] nodejs_12.21.0.bb: only handle npm if configured Nisha Parrakat
  2022-01-13  8:13 ` [meta-oe][dunfell][PATCH 2/2] nodejs: upgrade to 12.22.2 Nisha Parrakat
@ 2022-01-14 13:25 ` Peter Kjellerstedt
  2022-01-14 17:50   ` Martin Jansa
  1 sibling, 1 reply; 5+ messages in thread
From: Peter Kjellerstedt @ 2022-01-14 13:25 UTC (permalink / raw)
  To: Nisha Parrakat, openembedded-devel@lists.openembedded.org,
	raj.khem@gmail.com

> -----Original Message-----
> From: openembedded-devel@lists.openembedded.org <openembedded-devel@lists.openembedded.org> On Behalf Of Nisha Parrakat
> Sent: den 13 januari 2022 09:13
> To: openembedded-devel@lists.openembedded.org; raj.khem@gmail.com
> Cc: nishaparrakat@gmail.com
> Subject: [oe] [meta-oe][dunfell][PATCH 1/2] nodejs_12.21.0.bb: only handle npm if configured
> 
> npm-cli.js should be symlinked only when the file is present
> the file may not be available if the configure option is --without-npm
> 
> Signed-off-by: Nisha Parrakat <nishaparrakat@gmail.com>
> ---
>  meta-oe/recipes-devtools/nodejs/nodejs_12.21.0.bb | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/meta-oe/recipes-devtools/nodejs/nodejs_12.21.0.bb b/meta-oe/recipes-devtools/nodejs/nodejs_12.21.0.bb
> index b9e382177..22191a157 100644
> --- a/meta-oe/recipes-devtools/nodejs/nodejs_12.21.0.bb
> +++ b/meta-oe/recipes-devtools/nodejs/nodejs_12.21.0.bb
> @@ -133,7 +133,9 @@ do_install_append_class-native() {
>      # /usr/bin/npm is symlink to /usr/lib/node_modules/npm/bin/npm-cli.js
>      # use sed on npm-cli.js because otherwise symlink is replaced with normal file and
>      # npm-cli.js continues to use old shebang
> -    sed "1s^.*^#\!/usr/bin/env node^g" -i ${D}${exec_prefix}/lib/node_modules/npm/bin/npm-cli.js
> +    if [[ -f "${D}${exec_prefix}/lib/node_modules/npm/bin/npm-cli.js" ]]; then
> +        sed "1s^.*^#\!/usr/bin/env node^g" -i ${D}${exec_prefix}/lib/node_modules/npm/bin/npm-cli.js
> +    fi
> 
>      # Install the native binaries to provide it within sysroot for the target compilation
>      install -d ${D}${bindir}
> @@ -147,7 +149,9 @@ do_install_append_class-native() {
>  }
> 
>  do_install_append_class-target() {
> -    sed "1s^.*^#\!${bindir}/env node^g" -i ${D}${exec_prefix}/lib/node_modules/npm/bin/npm-cli.js
> +    if [[ -f "${D}${exec_prefix}/lib/node_modules/npm/bin/npm-cli.js" ]]; then
> +        sed "1s^.*^#\!${bindir}/env node^g" -i ${D}${exec_prefix}/lib/node_modules/npm/bin/npm-cli.js
> +    fi
>  }
> 
>  PACKAGES =+ "${PN}-npm"
> --
> 2.17.1

This patch should not be applied because it a) contains bashisms and b) 
it is better to just remove the workaround as it is no longer needed (see 
the patches I just sent for master).

//Peter



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

* Re: [oe] [meta-oe][dunfell][PATCH 1/2] nodejs_12.21.0.bb: only handle npm if configured
  2022-01-14 13:25 ` [oe] [meta-oe][dunfell][PATCH 1/2] nodejs_12.21.0.bb: only handle npm if configured Peter Kjellerstedt
@ 2022-01-14 17:50   ` Martin Jansa
  0 siblings, 0 replies; 5+ messages in thread
From: Martin Jansa @ 2022-01-14 17:50 UTC (permalink / raw)
  To: Peter Kjellerstedt
  Cc: Nisha Parrakat, openembedded-devel@lists.openembedded.org,
	raj.khem@gmail.com

[-- Attachment #1: Type: text/plain, Size: 3239 bytes --]

On Fri, Jan 14, 2022 at 01:25:24PM +0000, Peter Kjellerstedt wrote:
> > -----Original Message-----
> > From: openembedded-devel@lists.openembedded.org <openembedded-devel@lists.openembedded.org> On Behalf Of Nisha Parrakat
> > Sent: den 13 januari 2022 09:13
> > To: openembedded-devel@lists.openembedded.org; raj.khem@gmail.com
> > Cc: nishaparrakat@gmail.com
> > Subject: [oe] [meta-oe][dunfell][PATCH 1/2] nodejs_12.21.0.bb: only handle npm if configured
> > 
> > npm-cli.js should be symlinked only when the file is present
> > the file may not be available if the configure option is --without-npm
> > 
> > Signed-off-by: Nisha Parrakat <nishaparrakat@gmail.com>
> > ---
> >  meta-oe/recipes-devtools/nodejs/nodejs_12.21.0.bb | 8 ++++++--
> >  1 file changed, 6 insertions(+), 2 deletions(-)
> > 
> > diff --git a/meta-oe/recipes-devtools/nodejs/nodejs_12.21.0.bb b/meta-oe/recipes-devtools/nodejs/nodejs_12.21.0.bb
> > index b9e382177..22191a157 100644
> > --- a/meta-oe/recipes-devtools/nodejs/nodejs_12.21.0.bb
> > +++ b/meta-oe/recipes-devtools/nodejs/nodejs_12.21.0.bb
> > @@ -133,7 +133,9 @@ do_install_append_class-native() {
> >      # /usr/bin/npm is symlink to /usr/lib/node_modules/npm/bin/npm-cli.js
> >      # use sed on npm-cli.js because otherwise symlink is replaced with normal file and
> >      # npm-cli.js continues to use old shebang
> > -    sed "1s^.*^#\!/usr/bin/env node^g" -i ${D}${exec_prefix}/lib/node_modules/npm/bin/npm-cli.js
> > +    if [[ -f "${D}${exec_prefix}/lib/node_modules/npm/bin/npm-cli.js" ]]; then
> > +        sed "1s^.*^#\!/usr/bin/env node^g" -i ${D}${exec_prefix}/lib/node_modules/npm/bin/npm-cli.js
> > +    fi
> > 
> >      # Install the native binaries to provide it within sysroot for the target compilation
> >      install -d ${D}${bindir}
> > @@ -147,7 +149,9 @@ do_install_append_class-native() {
> >  }
> > 
> >  do_install_append_class-target() {
> > -    sed "1s^.*^#\!${bindir}/env node^g" -i ${D}${exec_prefix}/lib/node_modules/npm/bin/npm-cli.js
> > +    if [[ -f "${D}${exec_prefix}/lib/node_modules/npm/bin/npm-cli.js" ]]; then
> > +        sed "1s^.*^#\!${bindir}/env node^g" -i ${D}${exec_prefix}/lib/node_modules/npm/bin/npm-cli.js
> > +    fi
> >  }
> > 
> >  PACKAGES =+ "${PN}-npm"
> > --
> > 2.17.1
> 
> This patch should not be applied because it a) contains bashisms and b) 
> it is better to just remove the workaround as it is no longer needed (see 
> the patches I just sent for master).

agreed, with dash nodejs do_install fails with dash:

tmp-glibc/work/x86_64-linux/nodejs-native/16.11.1-r0/temp/run.do_install.2837733:169: [[: not found

but unfortunately it doesn't cause do_install to fail, because [[ is in
if expression.

> 
> //Peter
> 

> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#94833): https://lists.openembedded.org/g/openembedded-devel/message/94833
> Mute This Topic: https://lists.openembedded.org/mt/88392913/3617156
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [Martin.Jansa@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
> 


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

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

* Re: [meta-oe][dunfell][PATCH 2/2] nodejs: upgrade to 12.22.2
  2022-01-13  8:13 ` [meta-oe][dunfell][PATCH 2/2] nodejs: upgrade to 12.22.2 Nisha Parrakat
@ 2022-04-05 13:56   ` Ranjitsinh Rathod
  0 siblings, 0 replies; 5+ messages in thread
From: Ranjitsinh Rathod @ 2022-04-05 13:56 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 106 bytes --]

Is there any reason why we have not merged this yet on the dunfell branch?

Thanks,
Ranjitsinh Rathod

[-- Attachment #2: Type: text/html, Size: 118 bytes --]

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

end of thread, other threads:[~2022-04-05 17:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-13  8:13 [meta-oe][dunfell][PATCH 1/2] nodejs_12.21.0.bb: only handle npm if configured Nisha Parrakat
2022-01-13  8:13 ` [meta-oe][dunfell][PATCH 2/2] nodejs: upgrade to 12.22.2 Nisha Parrakat
2022-04-05 13:56   ` Ranjitsinh Rathod
2022-01-14 13:25 ` [oe] [meta-oe][dunfell][PATCH 1/2] nodejs_12.21.0.bb: only handle npm if configured Peter Kjellerstedt
2022-01-14 17:50   ` Martin Jansa

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.