Skip to contentSkip to conversation

nodejs: Depend on file-native

PATCH New Khem Raj 1 participant 1 message Mar 15, 2023

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 nodejs: Depend on file-native

Some older distribution e.g. alma8 has a version of file utility which is version 5.33 but more importantly missing this patch [1] from version 5.40 which causes package failures in wasm files e.g.

ERROR: nodejs-18.14.2-r0 do_package: Fatal errors occurred in subprocesses:
Command '['file', '-b', '/home/pokybuild/yocto-worker/meta-oe/build/build/tmp/work/core2-64-poky-linux/nodejs/18.14.2-r0/package/usr/lib/nodejs/ptest/test/wasi/wasm/write_file.wasm']' returned non-zero exit status 1. Subprocess output:ERROR: Bad magic format `version %#x (MVP)' (bad format char: #)
Command '['file', '-b', '/home/pokybuild/yocto-worker/meta-oe/build/build/tmp/work/core2-64-poky-linux/nodejs/18.14.2-r0/package/usr/lib/nodejs/ptest/test/wasi/wasm/symlink_loop.wasm']' returned non-zero exit status 1. Subprocess output:ERROR: Bad magic format `version %#x (MVP)' (bad format char: #)
Command '['file', '-b', '/home/pokybuild/yocto-worker/meta-oe/build/build/tmp/work/core2-64-poky-linux/nodejs/18.14.2-r0/package/usr/lib/nodejs/ptest/test/wasi/wasm/notdir.wasm']' returned non-zero exit status 1. Subprocess output:ERROR: Bad magic format `version %#x (MVP)' (bad format char: #)
Command '['file', '-b', '/home/pokybuild/yocto-worker/meta-oe/build/build/tmp/work/core2-64-poky-linux/nodejs/18.14.2-r0/package/usr/lib/nodejs/ptest/test/wasi/wasm/preopen_populates.wasm']' returned non-zero exit status 1. Subprocess output:ERROR: Bad magic format `version %#x (MVP)' (bad format char: #)
Command '['file', '-b', '/home/pokybuild/yocto-worker/meta-oe/build/build/tmp/work/core2-64-poky-linux/nodejs/18.14.2-r0/package/usr/lib/nodejs/ptest/test/wasi/wasm/clock_getres.wasm']' returned non-zero exit status 1. Subprocess output:ERROR: Bad magic format `version %#x (MVP)' (bad format char: #)
Command '['file', '-b', '/home/pokybuild/yocto-worker/meta-oe/build/build/tmp/work/core2-64-poky-linux/nodejs/18.14.2-r0/package/usr/lib/nodejs/ptest/test/wasi/wasm/main_args.wasm']' returned non-zero exit status 1.

[1] https://github.com/file/file/commit/85b7ab83257b3191a1a7ca044589a092bcef2bb3

---
 meta-oe/recipes-devtools/nodejs/nodejs_18.14.2.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta-oe/recipes-devtools/nodejs/nodejs_18.14.2.bb +3 -1
index c92c373746..7361f4039a 100644
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=2dff1ccca11e333f1388e34f7e2d1de3"
 
 CVE_PRODUCT = "nodejs node.js"
 
-DEPENDS = "openssl"
+DEPENDS = "openssl file-replacement-native"
 DEPENDS:append:class-target = " qemu-native"
 DEPENDS:append:class-native = " c-ares-native"
 
@@ -88,6 +88,8 @@ EXTRA_OEMAKE = "\
     builddir_name=./ \
 "
 
+EXTRANATIVEPATH += "file-native"
+
 python prune_sources() {
     import shutil
 
Signature · 1 line
2.40.0