unit/auto
Andrew Clayton 0c98353091 Node.js: Build/install fix
A user on GitHub reported an issue when trying to build/install the
nodejs language module.

Doing a

  $ ./configure nodejs --node=/usr/bin/node --npm=/usr/bin/npm --node-gyp=/usr/bin/node-gyp
  $ make install

was throwing the following error

  mv build/src//usr/bin/node/unit-http-g/unit-http-1.31.1.tgz build//usr/bin/node-unit-http-g.tar.gz
  mv: cannot move 'build/src//usr/bin/node/unit-http-g/unit-http-1.31.1.tgz' to 'build//usr/bin/node-unit-http-g.tar.gz': No such file or directory
  make: *** [build/Makefile:2061: build//usr/bin/node-unit-http-g.tar.gz] Error 1

The fact that we're using the path given by --node= to then use as
directory locations seems erroneous.

But rather than risk breaking existing expectations the simple fix is to
just use build/src in the destination path above to match that of the
source.

These paths were added in some previous commits, and the missing 'src/'
component looks like an oversight.

After this commit both the following work

  $ ./configure nodejs --node-gyp=/usr/lib/node_modules/bin/node-gyp-bin/node-gyp --local=/opt/unit/node
  $ ./configure nodejs --node=/usr/bin/node --node-gyp=/usr/lib/node_modules/npm/bin/node-gyp-bin/node-gyp --local=/opt/unit/node

Reported-by: ruspaul013 <https://github.com/ruspaul013>
Tested-by: ruspaul013 <https://github.com/ruspaul013>
Fixes: 0ee8de554 ("Fixed Makefile target for NodeJS.")
Fixes: c84948386 ("Node.js: fixing module global installation.")
Reviewed-by: Timo Stark <t.stark@nginx.com>
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2024-02-19 16:47:27 +00:00
..
cc White space formatting fixes 2024-01-16 15:37:07 +00:00
echo Auto: mirroring installation structure in build tree. 2023-03-29 00:41:08 +02:00
modules Node.js: Build/install fix 2024-02-19 16:47:27 +00:00
os Auto: mirroring installation structure in build tree. 2023-03-29 00:41:08 +02:00
atomic Fixed main() prototypes in auto tests. 2022-10-28 03:17:31 +01:00
capability Fixed main() prototypes in auto tests. 2022-10-28 03:17:31 +01:00
cgroup Isolation: wired up cgroup to build system. 2022-12-10 14:00:20 +00:00
clang Fixed main() prototypes in auto tests. 2022-10-28 03:17:31 +01:00
endian Autodetect endianness. 2023-01-12 17:56:00 +00:00
events Fixed main() prototypes in auto tests. 2022-10-28 03:17:31 +01:00
feature PHP: fixed building on MacOSX with --ld-opt= option. 2018-05-30 18:31:26 +03:00
files Fixed main() prototypes in auto tests. 2022-10-28 03:17:31 +01:00
have Initial version. 2017-01-17 20:00:00 +03:00
help Wasm: Wire the Wasm language module up to the build system. 2023-08-17 13:09:42 +01:00
isolation Enable the PR_SET_CHILD_SUBREAPER prctl(2) option on Linux. 2023-02-17 21:24:18 +00:00
make Added unit pkg-config file. 2023-08-01 10:16:17 -07:00
malloc Fixed main() prototypes in auto tests. 2022-10-28 03:17:31 +01:00
mmap Fixed main() prototypes in auto tests. 2022-10-28 03:17:31 +01:00
njs NJS: explicitely require 0.8.0 or later versions in configure. 2023-07-11 13:02:43 -07:00
options Added unit pkg-config file. 2023-08-01 10:16:17 -07:00
pcre Fixed main() prototypes in auto tests. 2022-10-28 03:17:31 +01:00
save Auto: mirroring installation structure in build tree. 2023-03-29 00:41:08 +02:00
sendfile Fixed main() prototypes in auto tests. 2022-10-28 03:17:31 +01:00
shmem Fixed main() prototypes in auto tests. 2022-10-28 03:17:31 +01:00
sockets Fixed main() prototypes in auto tests. 2022-10-28 03:17:31 +01:00
sources HTTP: controlling response headers support. 2023-08-09 14:37:16 +08:00
ssltls Fixed main() prototypes in auto tests. 2022-10-28 03:17:31 +01:00
summary Added unit pkg-config file. 2023-08-01 10:16:17 -07:00
test_build Initial version. 2017-01-17 20:00:00 +03:00
threads Fixed main() prototypes in auto tests. 2022-10-28 03:17:31 +01:00
time Fixed main() prototypes in auto tests. 2022-10-28 03:17:31 +01:00
types Fixed main() prototypes in auto tests. 2022-10-28 03:17:31 +01:00
unix Fixed main() prototypes in auto tests. 2022-10-28 03:17:31 +01:00