aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2020-11-29 23:22:31 +0100
committerJakub Jirutka <jakub@jirutka.cz>2020-11-29 23:39:42 +0100
commit7429b08ef01cc9100d8ed65d591da8b34b02394f (patch)
treeba57e9f3862d92f76598cc89f353fe6a2d58678a
parent476e1730dfc445d117afca1789d2d787de40e04d (diff)
main/nodejs: build with bundled libuv
See explanation in the APKBUILD.
-rw-r--r--main/nodejs/APKBUILD13
-rw-r--r--main/nodejs/dont-run-gyp-files-for-bundled-deps.patch2
-rw-r--r--main/nodejs/unbundle-uv.patch10
3 files changed, 7 insertions, 18 deletions
diff --git a/main/nodejs/APKBUILD b/main/nodejs/APKBUILD
index 4da80ad75a8..c72c90e325d 100644
--- a/main/nodejs/APKBUILD
+++ b/main/nodejs/APKBUILD
@@ -64,11 +64,9 @@ url="https://nodejs.org/"
arch="all !mips64 !mips64el"
license="MIT"
depends="ca-certificates nghttp2-libs>=1.41"
-depends_dev="libuv"
makedepends="
brotli-dev
c-ares-dev
- libuv-dev
linux-headers
nghttp2-dev
openssl-dev
@@ -80,7 +78,6 @@ provides="nodejs-lts=$pkgver" # for backward compatibility
replaces="nodejs-current nodejs-lts" # nodejs-lts for backward compatibility
source="https://nodejs.org/dist/v$pkgver/node-v$pkgver.tar.gz
dont-run-gyp-files-for-bundled-deps.patch
- unbundle-uv.patch
link-with-libatomic-on-mips32.patch
"
builddir="$srcdir/node-v$pkgver"
@@ -89,7 +86,7 @@ prepare() {
default_prepare
# Remove bundled dependencies that we're not using.
- rm -rf deps/brotli deps/cares deps/openssl deps/uv deps/zlib
+ rm -rf deps/brotli deps/cares deps/openssl deps/zlib
}
build() {
@@ -101,11 +98,14 @@ build() {
mips*) _carchflags="--with-mips-arch-variant=r1 --with-mips-float-abi=soft";;
esac
+ # NOTE: We use bundled libuv because they don't care much about backward
+ # compatibility and it has happened several times in past that we
+ # couldn't upgrade nodejs package in stable branches to fix CVEs due to
+ # libuv incompatibility.
python3 configure.py --prefix=/usr \
$_carchflags \
--shared-brotli \
--shared-zlib \
- --shared-libuv \
--shared-openssl \
--shared-cares \
--shared-nghttp2 \
@@ -159,6 +159,5 @@ npm() {
}
sha512sums="842edcf9a328a66657aeb363091c2d3581c310bc302950960a6263736b22da75ed035771ade1c602dca1d8ce73edb717a91921d520c4222d38bebc2a9b4c5105 node-v14.15.1.tar.gz
-940cc90aaa77a531cde13e31918a9978f9478936c3851038bcdf2869e64de03ce84dec5a46519469a90a8ba2853226825452d23d9347752abdbe04e944c083eb dont-run-gyp-files-for-bundled-deps.patch
-5557b95869832915e338c934d9f511ca3e37a8a8781dc565b93e2661c86ec250e1532d658faf99004f16d451d9a18873bf4923804180f01a46b3d65122b43548 unbundle-uv.patch
+9db5ee56938da304e9f7b31856e2d81f8d8a11e6bbf2d500b0da7404d80e06c238a6fd527a9f472c790872200ecaba2e9099d02449baacc84209b8abd6400bbe dont-run-gyp-files-for-bundled-deps.patch
44e81fbf254bd79e38b813f7f5a1336df854588939cba50aaec600660495f9b7745a7049a99eb59d15a51100b3a44f66892a902d7fc32e1399b51883ad4c02cf link-with-libatomic-on-mips32.patch"
diff --git a/main/nodejs/dont-run-gyp-files-for-bundled-deps.patch b/main/nodejs/dont-run-gyp-files-for-bundled-deps.patch
index 35a0153353e..4150de75cd3 100644
--- a/main/nodejs/dont-run-gyp-files-for-bundled-deps.patch
+++ b/main/nodejs/dont-run-gyp-files-for-bundled-deps.patch
@@ -14,7 +14,7 @@ Node.js 7.2.0
out/Makefile: config.gypi common.gypi node.gyp \
- deps/uv/uv.gyp deps/llhttp/llhttp.gyp deps/zlib/zlib.gyp \
-+ deps/llhttp/llhttp.gyp \
++ deps/uv/uv.gyp deps/llhttp/llhttp.gyp \
tools/v8_gypfiles/toolchain.gypi tools/v8_gypfiles/features.gypi \
tools/v8_gypfiles/inspector.gypi tools/v8_gypfiles/v8.gyp
$(PYTHON) tools/gyp_node.py -f make
diff --git a/main/nodejs/unbundle-uv.patch b/main/nodejs/unbundle-uv.patch
deleted file mode 100644
index f84623707da..00000000000
--- a/main/nodejs/unbundle-uv.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/deps/uvwasi/uvwasi.gyp
-+++ b/deps/uvwasi/uvwasi.gyp
-@@ -19,7 +19,6 @@
- 'src/wasi_serdes.c',
- ],
- 'dependencies': [
-- '../uv/uv.gyp:libuv',
- ],
- 'direct_dependent_settings': {
- 'include_dirs': ['include']