zowe / explorer-ui-server

Simple HTTPS web server, used by explorer UI plugins
Eclipse Public License 2.0
0 stars 2 forks source link

node-gyp added to builds with a non-resolving symlink #35

Closed stevenhorsman closed 4 years ago

stevenhorsman commented 4 years ago

In a recent update to the explorer ui servers (0.2.13), node_gyp has been added (via keyring_js). In the explorer-server paxes created this results in a new directory being created: <runtime>/components/explorer-mvs/bin/server/node_modules/.bin/ which containing symbolic links to the folders that don’t exist:

ls -al lrwxrwxrwx 1 STEVENH TSOUSER 24 Jul 20 13:56 node-gyp-build -> ../node-gyp-build/bin.js lrwxrwxrwx 1 STEVENH TSOUSER 29 Jul 20 13:56 node-gyp-build-optional -> ../node-gyp-build/optional.js lrwxrwxrwx 1 STEVENH TSOUSER 31 Jul 20 13:56 node-gyp-build-test -> ../node-gyp-build/build-test.js Part of our build process trying to chown the runtime files, so it attempts to follow these links which don't exist and then fails: chown: FSUM6180 file "/ZOWE/tmp/zowe-packaging-20200720035647/zowe/stage/components/explorer-jes/bin/server/node_modules/.bin/node-gyp-build": EDC5129I No such file or directory. (errno2=0x0594003D)

NakulManchanda commented 4 years ago

i believe change should go in packaging script to include the pre build binaries:

https://github.com/zowe/explorer-jes/blob/de87830f3493b17e7c36377316feb5281c3783e1/.pax/prepare-workspace.sh#L60

As per instructions on this page - https://www.npmjs.com/package/keyring_js

npm install
npm run prebuild

Installation
# The prebuildify tool is used to include prebuilt binaries to the package that is published to npm. That means, you can simply # #  install the native addon from npm using the following command.

npm install keyring_js
vit-tomica commented 4 years ago
npm install 
npm run prebuild

The above commands are used when building from sources. The npm package published in the npmjs registry contains the pre-built binaries so npm install keyring_js should be sufficient.

stevenhorsman commented 4 years ago

From Nakul: ~>i checked keyring_js, it has a folder called prebuilds/os390-s390x, and that's the only prebuilds. To use this prebuilds, any projects depend on keyring_js should run npm install on zos, not linux/windows. because it  doesn't ship other prebuilds on other platforms so basically, if we want to properly package keyring_js into explorer-ui-server and explorer-jes, they all need to change them to build on zos, instead what we are doing in linux container that's the proper way and when we build zowe, and put explorer-jes into zowe pax, we run npm install keyring_js again on zos i think should be in .pax/pre-packaging.sh located in zowe-install-packaging~

~I need more info and issues created so that I understand it, but so far it sounds like ~explorer-ui-server~ explorer-jes, explorer-uss & explorer-mvs builds need moving to run on z/OS and then zip build needs an extra npm install done somewhere?~

https://github.com/zowe/zlux/issues/500 covered with the new instructions

NakulManchanda commented 4 years ago

Explorer ui server, node_modules installation has been moved to z/os. Current, open issue for packaging is this: https://github.com/zowe/explorer-ui-server/issues/38

This particular issue can be closed now, as its resolved