#!/bin/sh version=$(rpm -q --specfile --qf='%{version}\n' nodejs.spec | head -n1) logfile=./nodejs-tarball-$version.log { wget https://nodejs.org/dist/v${version}/node-v${version}.tar.gz tar -zxvf node-v${version}.tar.gz # openssl should always be stripped because of licensing #squidf: but keep nodejs-openssl.cnf cp node-v${version}/deps/openssl/nodejs-openssl.cnf node-v${version}/deps rm -rfv node-v${version}/deps/openssl mkdir node-v${version}/deps/openssl mv node-v${version}/deps/nodejs-openssl.cnf node-v${version}/deps/openssl tar -cvf node-v${version}-stripped.tar node-v${version} xz -e9 node-v${version}-stripped.tar # Determine the bundled versions of the various packages echo "Bundled software versions" echo "-------------------------" echo echo "libnode shared object version" echo "=========================" grep "define NODE_MODULE_VERSION" node-v${version}/src/node_version.h echo echo "V8" echo "=========================" grep "define V8_MAJOR_VERSION" node-v${version}/deps/v8/include/v8-version.h grep "define V8_MINOR_VERSION" node-v${version}/deps/v8/include/v8-version.h grep "define V8_BUILD_NUMBER" node-v${version}/deps/v8/include/v8-version.h grep "define V8_PATCH_LEVEL" node-v${version}/deps/v8/include/v8-version.h echo echo "zlib" echo "=========================" grep "define ZLIB_VERSION" node-v${version}/deps/zlib/zlib.h echo echo "c-ares" echo "=========================" grep "define ARES_VERSION_MAJOR" node-v${version}/deps/cares/include/ares_version.h grep "define ARES_VERSION_MINOR" node-v${version}/deps/cares/include/ares_version.h grep "define ARES_VERSION_PATCH" node-v${version}/deps/cares/include/ares_version.h echo echo "llhttp" echo "=========================" grep "define LLHTTP_VERSION_MAJOR" node-v${version}/deps/llhttp/include/llhttp.h grep "define LLHTTP_VERSION_MINOR" node-v${version}/deps/llhttp/include/llhttp.h grep "define LLHTTP_VERSION_PATCH" node-v${version}/deps/llhttp/include/llhttp.h echo echo "libuv" echo "=========================" grep "define UV_VERSION_MAJOR" node-v${version}/deps/uv/include/uv/version.h grep "define UV_VERSION_MINOR" node-v${version}/deps/uv/include/uv/version.h grep "define UV_VERSION_PATCH" node-v${version}/deps/uv/include/uv/version.h echo echo "nghttp2" echo "=========================" grep "define NGHTTP2_VERSION " node-v${version}/deps/nghttp2/lib/includes/nghttp2/nghttp2ver.h echo echo "ICU" echo "=========================" grep "url" node-v${version}/tools/icu/current_ver.dep echo echo "uvwasi" echo "=========================" grep "define UVWASI_VERSION_MAJOR" node-v${version}/deps/uvwasi/include/uvwasi.h grep "define UVWASI_VERSION_MINOR" node-v${version}/deps/uvwasi/include/uvwasi.h grep "define UVWASI_VERSION_PATCH" node-v${version}/deps/uvwasi/include/uvwasi.h echo echo "punycode" echo "=========================" grep "'version'" node-v${version}/lib/punycode.js echo echo "npm" echo "=========================" grep "\"version\":" node-v${version}/deps/npm/package.json | head -1 echo echo "Make sure these versions match what is in the RPM spec file" rm -rf node-v${version} # ] <-- needed because of Argbash } 2>&1 | tee ${logfile}