From ca12e38242ac214c2323ae3f2e9bc6f9de781726 Mon Sep 17 00:00:00 2001
From: adamm <>
Date: Tue, 6 Jul 2021 21:30:33 +0000
Subject: [PATCH] Update nodejs14 to version 14.17.2 / rev 3 via SR 904343
https://build.opensuse.org/request/show/904343
by user adamm + dimstar_suse
- update to 14.17.2:
deps: libuv upgrade - Out of bounds read (Medium)
(bsc#1187973, CVE-2021-22918)
- old_icu.patch: update with upstream's patch from
https://github.com/nodejs/node/pull/39068
- specfile cleanup
---
packages/n/nodejs14/.files | Bin 1272 -> 1272 bytes
packages/n/nodejs14/.rev | 13 +
packages/n/nodejs14/SHASUMS256.txt | 64 ++--
packages/n/nodejs14/SHASUMS256.txt.sig | Bin 566 -> 566 bytes
packages/n/nodejs14/_constraints | 12 +-
packages/n/nodejs14/node-v14.17.1.tar.xz | 1 -
packages/n/nodejs14/node-v14.17.2.tar.xz | 1 +
packages/n/nodejs14/nodejs14.changes | 11 +
packages/n/nodejs14/nodejs14.spec | 120 +++----
packages/n/nodejs14/old_icu.patch | 407 ++++++++++++++++++++++-
10 files changed, 505 insertions(+), 124 deletions(-)
delete mode 120000 packages/n/nodejs14/node-v14.17.1.tar.xz
create mode 120000 packages/n/nodejs14/node-v14.17.2.tar.xz
diff --git a/packages/n/nodejs14/.files b/packages/n/nodejs14/.files
index 7a0eabdb9b5759939e411939c1e9b8ae2cd41389..ce5db551e503ae9b998488dc5b8badaa933ceacd 100644
GIT binary patch
delta 419
zcmX}nJx*Ie7=>YDhXN-^2%!|ITodJLzWE;%1?bYGvXT~ke*=yp+u~jjqG1ha_K+21
zJJ|sXpv-lX1-y^Wc|CYNc)RTfvp=6rCX@H=W%{N4nVz*eyJ)Ag&+Ydt{IDd|`{
K#8B7(MdQ4!5sL;9$5=R(qGWx8H_uO?
z)qts$OfI$WI?9sTKkq#<>-8}PP!c$_b?jBX(EUcnhvpBRWJX!455
z*|9uce!X0N|F*OtcEiKa^{eaoVw@v2SHeI-&maB*N6u1l%)qd+b=DS52EdqL0?-H@
z{(skRl^gHfw~u>grZVOnQ<6|)u!caH6S8*^wMyMhcz4B{bwAwVYCZJrXnGDR#MK9k
e&LUeuK+Wv3FxVJ#-bII-UvjnLyKajE-~0nat9FY3
delta 393
zcmX}nze)o^5XbRoVi7eUA~rU@fXB}6&h9KkG*&iNK|2X^`zJ=^5^|>mTN}~pxVP{%
zd>tPkon9LI`7qz#y1(x4Ey_yl>~=ey&T;d({R2#do+tuPB8Cu+(%vgHDN#V_+QUIH
z5Am@Cot2B|o0Hyo^VO{^CT9ia!H7IEK`vC((xQeaa^Td$qYXTJX(8AQvWl14>a}_A
zUECYlS}U~mc|h{XC6*i
900651
+
+ 14489cf9b02885d401624dc7ad16ce7f
+ 14.17.2
+
+ dimstar_suse
+ - update to 14.17.2:
+ deps: libuv upgrade - Out of bounds read (Medium)
+ (bsc#1187973, CVE-2021-22918)
+- old_icu.patch: update with upstream's patch from
+ https://github.com/nodejs/node/pull/39068
+- specfile cleanup
+ 904343
+
diff --git a/packages/n/nodejs14/SHASUMS256.txt b/packages/n/nodejs14/SHASUMS256.txt
index a6efb1b3ab5..a82f1530151 100644
--- a/packages/n/nodejs14/SHASUMS256.txt
+++ b/packages/n/nodejs14/SHASUMS256.txt
@@ -1,32 +1,32 @@
-b2aaa7d5cffd4ea950aa65e92ffa88781e74b0dd29028963c2b74a58bd72ff04 node-v14.17.1-aix-ppc64.tar.gz
-864d09627c8dc9038e0235fccf2110b60c8942713c15352de2d203278798ff0d node-v14.17.1-darwin-x64.tar.gz
-79c2b290ff06cd95ddcb42cf5e83322f8b533ff9f6f8665e780e3b06212ecda1 node-v14.17.1-darwin-x64.tar.xz
-ee72ed2c935c0d162969c5bcdeb29fc83a2883c0b6757f4510d7bd70512a9418 node-v14.17.1-headers.tar.gz
-da9534360a814e258226505a9f097e6c90b373f4ea75cb5fadd70506371ea85d node-v14.17.1-headers.tar.xz
-04e25f5511408288913dd1955f6829431e5096911aa3e35c9cd0ca8b39e6c4c5 node-v14.17.1-linux-arm64.tar.gz
-5285c1716b0992984112255ef982c4e5ba3ec1b1202319be2f15ce3a24592a80 node-v14.17.1-linux-arm64.tar.xz
-b3a7b0dfe6e841ce67ce8a947d13dde50d7bba4505558cc0cc617afe1ce08b48 node-v14.17.1-linux-armv7l.tar.gz
-05784d934f93b6b7a22c2cf170ba88f3c647b85fb9953e178d6be7d692387609 node-v14.17.1-linux-armv7l.tar.xz
-0a0a3b721d22c42309915c5951c8b701776914caa4fbcda570fba3f9b36efee1 node-v14.17.1-linux-ppc64le.tar.gz
-c9e88eeebc139a4fedeb749452082fd15826b358709a1d16aeb84fd1ec8b4543 node-v14.17.1-linux-ppc64le.tar.xz
-1abfd4a39b2656ea95b6b03e0f8d5a0ce225923f73f886ba6d877706ec0a172b node-v14.17.1-linux-s390x.tar.gz
-0ec89ac56f39ff75003d79b3a95c64336f711e580ab1b75e015a3662456cc693 node-v14.17.1-linux-s390x.tar.xz
-4781b162129b19bdb3a7010cab12d06fc7c89421ea3fda03346ed17f09ceacd6 node-v14.17.1-linux-x64.tar.gz
-2921eba80c839e06d68b60b27fbbcbc7822df437f3f8d58717ec5a7703563ba4 node-v14.17.1-linux-x64.tar.xz
-dbcaa370c322325beaa56847c06169f11d2e5acc7719e4c8395e740c3bbefade node-v14.17.1.pkg
-f85297faa15529cf134e9cfd395371fea62e092c3fe2127f2b0fdf8504905cee node-v14.17.1.tar.gz
-ddf1d2d56ddf35ecd98c5ea5ddcd690b245899f289559b4330c921255f5a247f node-v14.17.1.tar.xz
-d99bf8769198188ce4609e222e988de66dd2c3c529a9cebebc56556879c85fe4 node-v14.17.1-win-x64.7z
-c2264359aa15c0a95d347ebb382413a597d1698a4a2c8af73309b6e4e517ff04 node-v14.17.1-win-x64.zip
-75396248fd5b5e0d6617aa8029fb07bc5dcf036e1d33ff82896e33224c43e0cd node-v14.17.1-win-x86.7z
-45b0996f28c8eeafc128e4a9d86f2f06e9f376a41b5db46dc69e89ce61e44a54 node-v14.17.1-win-x86.zip
-f4cea916af6d80784f5d9daab59292ceba04bf636e4e2e6727153f89b1e6990f node-v14.17.1-x64.msi
-995420f483a181b0e535dd8f4661a7d6fe8f2d1601adb8dbc48f896d619d5ab0 node-v14.17.1-x86.msi
-4b648906236eb32914407b46e1f9c217a23199306be05287bf912cf4362e41aa win-x64/node.exe
-44ff33abb17d86cb3be368527d018acb6fda3d724ff7f0d81eab5ba2e0ec46ae win-x64/node.lib
-019c8d96c5ce1e8875b11d411541f621f7b0aab1f355c35ad356dc89d2a85e74 win-x64/node_pdb.7z
-01b4f47e6f16ee237c06512813914bdd5b6cca025fe7a568328193bd6d83ba31 win-x64/node_pdb.zip
-7b0368e9a8f38cb13bb6940b94ced71a57a4ca823b58029f0587e784f7bf6a82 win-x86/node.exe
-593ea194f25d7be97988d710d380320244b27c067067ebc4afdcf4bb22e4e78c win-x86/node.lib
-ba30a318e4700dbce5a781faf5a148ef80f5908f057591157af9b59b5f4191ef win-x86/node_pdb.7z
-45905a33717f05405443f8f29f186aba734d60ed8c668bd2d80e2f734b0b436f win-x86/node_pdb.zip
+fb4348515d67085153c58d7b5114ca71690e3938d6c6000a02a7977cf154290a node-v14.17.2-aix-ppc64.tar.gz
+e45db91fc2136202868a5eb7c6d08b0a2b75394fafdf8538f650fa945b7dee16 node-v14.17.2-darwin-x64.tar.gz
+1b5227ec537a456ce4f3af9631db652e7fd3ab8ac7b9a38be117e0bc2f54d1d5 node-v14.17.2-darwin-x64.tar.xz
+ccda5c3ce6dd51e6901cd227c1e6b39b17efa1dfe17fcc5ae1cde15d88cbb05c node-v14.17.2-headers.tar.gz
+935e8661db59ab51e4079fbcafd70185ad65ac0924cc48209d976faf69a3b286 node-v14.17.2-headers.tar.xz
+05117e74f424fd4ab744c3013c77906c5fe4a19fa22ce624a21986ce152fd258 node-v14.17.2-linux-arm64.tar.gz
+3aff08c49b8c0c3443e7a9ea9bfe607867d79e6e5ccf204a5c8f13fb92a48abd node-v14.17.2-linux-arm64.tar.xz
+c5b3447eda84a402e604a3ca317747f8f3661b1c9cb68f73a2e2f5a39ed95533 node-v14.17.2-linux-armv7l.tar.gz
+0ef956711d6f984b2f7a2e8a3c5d1f274668fd50ba73a4f4580dc72e4d7dff87 node-v14.17.2-linux-armv7l.tar.xz
+d94681c9953a68cfbc3903edbe680d9068581c140a5d24c265e557c2e0a57a51 node-v14.17.2-linux-ppc64le.tar.gz
+64364f96ff04083bf91ee82a2e27ae6d45a4b8512d38e70da976909db5400d2a node-v14.17.2-linux-ppc64le.tar.xz
+9b60ec8bb3675f3648b1474a4d911838ca11630e07ec99230a078937e73be158 node-v14.17.2-linux-s390x.tar.gz
+76f955856626a3e596b438855fdfe438937623dc71af9a25a8466409be470877 node-v14.17.2-linux-s390x.tar.xz
+48cc87b7adb13f479643166a16514861556d0936761b317a3b65f4fbbb265b4d node-v14.17.2-linux-x64.tar.gz
+6cf9db7349407c177b36205feec949729d0ee9db485e19b10b0b1ffca65a3a46 node-v14.17.2-linux-x64.tar.xz
+16286b9d41238dc85af791aafc71523cdc8456cd7eccebdf92f8368ce879e363 node-v14.17.2.pkg
+03bea54a68c6fa8b520c273a1dc80f2fdbf80ddc9c303200d2eeaf25bd7e62fa node-v14.17.2.tar.gz
+4f5fb2b87e2255da3b200ed73ab076002e4b088df0027ec85e25541a6830583e node-v14.17.2.tar.xz
+6f59257b20861efb506f9b7f5b8587a310c6df6de4d719324ae8f3dcda68bcbc node-v14.17.2-win-x64.7z
+0e27897578752865fa61546d75b20f7cd62957726caab3c03f82c57a4aef5636 node-v14.17.2-win-x64.zip
+b5b2f6d2523b0c60399111b4c60ee3066d6e7e51fe22ce045c5181d52dd2dd20 node-v14.17.2-win-x86.7z
+308e3e2228cd6b0e991fd9d23dcd0c57f913926355adcb702f9660a1574a79fa node-v14.17.2-win-x86.zip
+452a94f6db29ea6ef298cb731765c615624eed2c8bd8746c827d5abbed89a5de node-v14.17.2-x64.msi
+92443d36339a76f39102e785ecf663a072d26c9c45a2b4b68ddb82ae54345682 node-v14.17.2-x86.msi
+140fd660d63eab02812ec583a4c958c9252f041a92d76047c63ac34d773aab66 win-x64/node.exe
+2166a3ae8728f872727ced97eaccdc8e463ae3c00b7dcb94c3b9da80feedb735 win-x64/node.lib
+a79264dcce6c4f6aba147aee4bfd9e6b69b4134f07e487d381efecf771f7e275 win-x64/node_pdb.7z
+2a57321f0767c3a89a8dfd5355ac2c0ccdec728da97a8f5bd3bd53ea4252eb0e win-x64/node_pdb.zip
+2695c86b7000623119abfd7b9aed48c04d5ae4247ea7398ff2c77f61907d531f win-x86/node.exe
+bab3fdbacbd6621e27762c559041723dc35d3122ddfd153f81315aaab78646ae win-x86/node.lib
+dc5a8c41b0ceaea49dadd0ff53b25837809a90e75222b3f34c5c01325a52bd26 win-x86/node_pdb.7z
+f5e6ae2fcc35f94749e8404f909734649e5617ac3e41ce326fb2601cbf72c862 win-x86/node_pdb.zip
diff --git a/packages/n/nodejs14/SHASUMS256.txt.sig b/packages/n/nodejs14/SHASUMS256.txt.sig
index 9ff7c683c0a06b34e3ad631e4ab434e963fd913c..3bcfc4b0009716885b63c72c47578431dc594361 100644
GIT binary patch
literal 566
zcmV-60?GY}0y6{v0SEvc79j-4FQcv;zT9i%Ym;EaJnTimdbvCW0$|8(fvL{*R5#Qg3s5G(n7Ii4X(EOd_t72svy
zh*9r$BW@+pYfK#e8>d;*st`_%12AMr)J&^bU2qg}?zJ6ul7EX-WGb5XXyC8MF;b!>
zAl|$J`iutAnr8p-xnS*gS2h#2xt3Ri!~Xr5+LdhVV%)`F8xR24fIMe)&6b#$uNH6C;
zk9{lS*?Pww9cN(>-~554(qJZzHtVZ)%I%K$KEZ0C-I^fMsJs}?MD7#b)y8}ZySOze
z6Zpr0ZetHTw)wt!)Y*i50xV>bG9}s}X!~}G;+5*s6T3Txr>K~a>Oz1v*L`QUvaI5N
z!ActBsk#Kf$*u;>$ZCH(pvlmu>qf$+FF$Xd1S3ANL=dlKZ~|)b9JZQCJf(Nk
zd9!m>1wxNnQO8OPPfw#EAtmgZJsLC#A>1^%^jLB`pza3<{0^tzP~4Q_dW_7B$Iov*LGG^j~RY^(P*W8R)d2T4o?C
z_~n5cN9tPWy{p5p`q_J#1LDdiuemd
za^K=F0mEh5SH#PKB1S1>4H@;;{N~GwwtswL^{_3Xz3Fm9Q%~;+8;HZFQF*D;7^8Z7
z(J{=2ky0&>9lJC%I>Fa*-+y7PW>~3>MYCyep
zHVG-|#8iwy-6`_IHYBu3FCs~X+Uj7?3#^UyHhd5NQ44-=TC#+GYX|9?Jz5Otf#Ezk
zcRVXu;?*P_lX7bnO#lOk_f6RAaOz{b11%B|D~hMWjjDKOSjYmwk1BrHDU>aXLE7LT
zRYof)1w9yQFZeZ4iIaCAfXPqxdQO7G%4Q9fs>~p7;Qcxv-T>&Yd}>2n^g4Kz=F8@&
zUEo^tMi7IHvgvit%tXq4QCcztVgO%^9_jPfP1#5_^xV{lW;8#sIAvvMx^2oqa<`D-
E>zPOlyZ`_I
diff --git a/packages/n/nodejs14/_constraints b/packages/n/nodejs14/_constraints
index 956c83c9b70..625844a136a 100644
--- a/packages/n/nodejs14/_constraints
+++ b/packages/n/nodejs14/_constraints
@@ -1,11 +1,11 @@
-
- 15
-
-
- 8500
-
+
+ 8
+
+
+ 10000
+
diff --git a/packages/n/nodejs14/node-v14.17.1.tar.xz b/packages/n/nodejs14/node-v14.17.1.tar.xz
deleted file mode 120000
index e4f58eb5621..00000000000
--- a/packages/n/nodejs14/node-v14.17.1.tar.xz
+++ /dev/null
@@ -1 +0,0 @@
-/ipfs/bafybeib2eg54tysfdx4onmam2ts2y2fk3rkacshwgkkh2zwh2aaq5u7cs4
\ No newline at end of file
diff --git a/packages/n/nodejs14/node-v14.17.2.tar.xz b/packages/n/nodejs14/node-v14.17.2.tar.xz
new file mode 120000
index 00000000000..88ddd642b8a
--- /dev/null
+++ b/packages/n/nodejs14/node-v14.17.2.tar.xz
@@ -0,0 +1 @@
+/ipfs/bafybeif3mmcnlncpjlv26gclo5gpiq4m3ch2dqvdjzbuksldj65g7bnc7a
\ No newline at end of file
diff --git a/packages/n/nodejs14/nodejs14.changes b/packages/n/nodejs14/nodejs14.changes
index 24959009334..97474fb9a36 100644
--- a/packages/n/nodejs14/nodejs14.changes
+++ b/packages/n/nodejs14/nodejs14.changes
@@ -1,3 +1,14 @@
+-------------------------------------------------------------------
+Fri Jul 2 15:27:59 UTC 2021 - Adam Majer
+
+- update to 14.17.2:
+ deps: libuv upgrade - Out of bounds read (Medium)
+ (bsc#1187973, CVE-2021-22918)
+
+- old_icu.patch: update with upstream's patch from
+ https://github.com/nodejs/node/pull/39068
+- specfile cleanup
+
-------------------------------------------------------------------
Thu Jun 17 09:48:02 UTC 2021 - Adam Majer
diff --git a/packages/n/nodejs14/nodejs14.spec b/packages/n/nodejs14/nodejs14.spec
index 6d5c32d80ef..b5f5a246cde 100644
--- a/packages/n/nodejs14/nodejs14.spec
+++ b/packages/n/nodejs14/nodejs14.spec
@@ -25,8 +25,14 @@
#
###########################################################
+# Fedora doesn't have rpm-config-SUSE which provides
+# ext_man in /usr/lib/rpm/macros.d/macros.obs
+%if 0%{?fedora_version}
+%define ext_man .gz
+%endif
+
Name: nodejs14
-Version: 14.17.1
+Version: 14.17.2
Release: 0
# Double DWZ memory limits
@@ -35,7 +41,7 @@ Release: 0
%define node_version_number 14
-%if 0%{?suse_version} > 1500
+%if 0%{?suse_version} > 1500 || 0%{?fedora_version}
%bcond_without libalternatives
%else
%bcond_with libalternatives
@@ -74,13 +80,13 @@ Release: 0
%define _libexecdir %{_exec_prefix}/lib
%endif
-%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 120400
+%if 0%{?suse_version} >= 1500 || 0%{?sle_version} >= 120400
%bcond_with intree_openssl
%else
%bcond_without intree_openssl
%endif
-%if 0%{suse_version} >= 1330
+%if 0%{?suse_version} >= 1330
%bcond_with intree_cares
%else
%bcond_without intree_cares
@@ -92,7 +98,7 @@ Release: 0
%bcond_without intree_icu
%endif
-%if 0%{suse_version} >= 1550
+%if 0%{?suse_version} >= 1550
%bcond_with intree_nghttp2
%else
%bcond_without intree_nghttp2
@@ -104,39 +110,6 @@ Release: 0
%bcond_without gdb
%endif
-%if %node_version_number < 16
-
-# No binutils_gold on SLE 12 GA (aarch64).
-%ifarch aarch64
-%if 0%{?sle_version} >= 120100 || 0%{?is_opensuse}
-%bcond_without binutils_gold
-%else
-%bcond_with binutils_gold
-%endif
-%endif
-
-# No binutils_gold on all versions of SLE 12 and Leap 42 (s390x).
-%ifarch s390x
-%if 0%{?suse_version} > 1320
-%bcond_without binutils_gold
-%else
-%bcond_with binutils_gold
-%endif
-%endif
-
-%ifarch s390
-%bcond_with binutils_gold
-%endif
-
-%ifnarch aarch64 s390x s390
-%bcond_without binutils_gold
-%endif
-
-%else
-# don't use binutils_gold for nodejs >= 16
-%bcond_with binutils_gold
-%endif
-
%define git_node 0
Summary: Evented I/O for V8 JavaScript
@@ -178,12 +151,10 @@ Patch120: flaky_test_rerun.patch
# Use versioned binaries and paths
Patch200: versioned.patch
-%if 0%{with binutils_gold}
-BuildRequires: binutils-gold
-%endif
-
BuildRequires: pkg-config
+%if 0%{?suse_version}
BuildRequires: config(netcfg)
+%endif
# SLE-11 target only
# Node.js 6 requires GCC 4.8.5+.
@@ -236,8 +207,12 @@ BuildRequires: zlib-devel
# Python dependencies
%if %node_version_number >= 12
-BuildRequires: netcfg
BuildRequires: python3
+
+%if 0%{?suse_version}
+BuildRequires: netcfg
+%endif
+
%else
%if 0%{?suse_version} >= 1500
BuildRequires: python2
@@ -253,29 +228,21 @@ BuildRequires: user(nobody)
%if ! 0%{with intree_openssl}
-%if %node_version_number >= 8
BuildRequires: pkgconfig(openssl) >= %{openssl_req_ver}
-%if 0%{?suse_version} > 1330
-BuildRequires: libopenssl1_1-hmac
-%endif
-%if 0%{?suse_version} >= 1330
+%if 0%{?suse_version} >= 1500
+BuildRequires: libopenssl1_1-hmac
BuildRequires: openssl >= %{openssl_req_ver}
%else
BuildRequires: openssl-1_1 >= %{openssl_req_ver}
%endif
%else
-
-%if 0%{?suse_version} >= 1330
-BuildRequires: libopenssl-1_0_0-devel
+%if %node_version_number <= 12 && 0%{?suse_version} == 1315 && 0%{?sle_version} < 120400
+Provides: bundled(openssl) = 1.1.1k
%else
-BuildRequires: openssl-devel >= %{openssl_req_ver}
+BuildRequires: bundled_openssl_should_not_be_required
%endif
-
-%endif
-%else
-Provides: bundled(openssl) = 1.1.1k
%endif
%if ! 0%{with intree_cares}
@@ -303,10 +270,10 @@ BuildRequires: valgrind
%if %{with libalternatives}
Requires: alts
%else
-Requires(postun): update-alternatives
+Requires(postun): %{_sbindir}/update-alternatives
%endif
# either for update-alternatives, or their removal
-Requires(post): update-alternatives
+Requires(post): %{_sbindir}/update-alternatives
Recommends: npm14
@@ -336,8 +303,10 @@ Requires: nodejs-common
Requires: openssl1
%endif
-%if %node_version_number < 16
-ExclusiveArch: x86_64 aarch64 ppc64 ppc64le s390x
+%if %node_version_number >= 12
+%ifarch s390
+ExclusiveArch: not_buildable
+%endif
%endif
Provides: bundled(brotli) = 1.0.9
@@ -809,19 +778,15 @@ echo "`grep node-v%{version}.tar.xz %{S:1} | head -n1 | cut -c1-64` %{S:0}" | s
%setup -q -n node-%{version}
%endif
-%if %{node_version_number} == 6
-# Update NPM
-rm -r deps/npm
-tar Jxf %{SOURCE10}
-%endif
-
%if %{node_version_number} >= 10
tar Jxf %{SOURCE11}
%endif
-%patch3 -p1
-%if ! 0%{with intree_openssl}
+%if %{node_version_number} >= 16 && 0%{?suse_version} > 0 && 0%{?suse_version} < 1500
+tar Jxf %{SOURCE5} --directory=tools/gyp --strip-components=1
%endif
+
+%patch3 -p1
%patch5 -p1
%patch7 -p1
%if 0%{with valgrind_tests}
@@ -869,6 +834,10 @@ find deps/openssl -name *.[ch] -delete
rm -rf deps/icu-small
%endif
+%if ! 0%{with intree_openssl}
+rm -rf deps/openssl
+%endif
+
%if ! 0%{with intree_cares}
find deps/cares -name *.[ch] -delete
%endif
@@ -888,12 +857,10 @@ export LDFLAGS="%{?build_ldflags}"
export LDFLAGS="\${LDFLAGS} -fno-lto"
%endif
-%ifarch %{ix86} %{arm}
-# Reduce memory consumption on 32bit arches
+# reduce disk space pressure
export CFLAGS="\${CFLAGS} -g1"
export CXXFLAGS="\${CXXFLAGS} -g1"
export LDFLAGS="\${LDFLAGS} -Wl,--reduce-memory-overhead"
-%endif
%if 0%{?cc_exec:1}
export CC=%{?cc_exec}
@@ -955,9 +922,7 @@ find %{buildroot} -name \*.bak -print -delete
# npm/npx man page
install -D -m 644 deps/npm/man/man1/npm.1 %{buildroot}%{_mandir}/man1/npm%{node_version_number}.1
-%if %{node_version_number} >= 8
install -D -m 644 deps/npm/man/man1/npx.1 %{buildroot}%{_mandir}/man1/npx%{node_version_number}.1
-%endif
#node-gyp needs common.gypi too
install -D -m 644 common.gypi \
@@ -1009,13 +974,11 @@ ln -s %{_sysconfdir}/alternatives/node-default %{buildroot}%{_bindir}/no
ln -s %{_sysconfdir}/alternatives/node.1%{ext_man} %{buildroot}%{_mandir}/man1/node.1%{ext_man}
ln -s %{_sysconfdir}/alternatives/npm-default %{buildroot}%{_bindir}/npm-default
ln -s %{_sysconfdir}/alternatives/npm.1%{ext_man} %{buildroot}%{_mandir}/man1/npm.1%{ext_man}
-%if %{node_version_number} >= 8
ln -s -f npx-default %{buildroot}%{_sysconfdir}/alternatives/npx-default
ln -s -f npx.1%{ext_man} %{buildroot}%{_sysconfdir}/alternatives/npx.1%{ext_man}
ln -s %{_sysconfdir}/alternatives/npx-default %{buildroot}%{_bindir}/npx-default
ln -s %{_sysconfdir}/alternatives/npx.1%{ext_man} %{buildroot}%{_mandir}/man1/npx.1%{ext_man}
%endif
-%endif
# libalternatives - can always ship
mkdir -p %{buildroot}%{_datadir}/libalternatives/{node,npm,npx};
@@ -1110,7 +1073,6 @@ make test-ci
%ghost %{_sysconfdir}/alternatives/npm.1%{ext_man}
%endif
-%if %{node_version_number} >= 8
%{_bindir}/npx%{node_version_number}
%{_mandir}/man1/npx%{node_version_number}.1%{ext_man}
%if ! %{with libalternatives}
@@ -1119,7 +1081,6 @@ make test-ci
%ghost %{_sysconfdir}/alternatives/npx-default
%ghost %{_sysconfdir}/alternatives/npx.1%{ext_man}
%endif
-%endif
%files devel
%defattr(-, root, root)
@@ -1168,21 +1129,18 @@ fi
update-alternatives \
--install %{_bindir}/npm-default npm-default %{_bindir}/npm%{node_version_number} %{node_version_number} \
--slave %{_mandir}/man1/npm.1%{ext_man} npm.1%{ext_man} %{_mandir}/man1/npm%{node_version_number}.1%{ext_man}
-%if %{node_version_number} >= 8
update-alternatives \
--install %{_bindir}/npx-default npx-default %{_bindir}/npx%{node_version_number} %{node_version_number} \
--slave %{_mandir}/man1/npx.1%{ext_man} npx.1%{ext_man} %{_mandir}/man1/npx%{node_version_number}.1%{ext_man}
-%endif
%postun -n npm%{node_version_number}
if [ ! -f %{_bindir}/npm%{node_version_number} ] ; then
update-alternatives --remove npm-default %{_bindir}/npm%{node_version_number}
fi
-%if %{node_version_number} >= 8
if [ ! -f %{_bindir}/npx%{node_version_number} ] ; then
update-alternatives --remove npx-default %{_bindir}/npx%{node_version_number}
fi
-%endif
+
%endif
%changelog
diff --git a/packages/n/nodejs14/old_icu.patch b/packages/n/nodejs14/old_icu.patch
index 30a6b66ad4b..a4c64f005f3 100644
--- a/packages/n/nodejs14/old_icu.patch
+++ b/packages/n/nodejs14/old_icu.patch
@@ -1,7 +1,406 @@
-Index: node-v14.9.0/tools/icu/icu_versions.json
-===================================================================
---- node-v14.9.0.orig/tools/icu/icu_versions.json
-+++ node-v14.9.0/tools/icu/icu_versions.json
+From f04a702b9c974886b7078062571cd6599c36629d Mon Sep 17 00:00:00 2001
+From: Anna Henningsen
+Date: Sat, 3 Oct 2020 23:29:41 +0200
+Subject: [PATCH 1/2] src: add maybe versions of EmitExit and EmitBeforeExit
+
+This addresses a TODO comment, and removes invalid `.ToLocalChecked()`
+calls from our code base.
+
+PR-URL: https://github.com/nodejs/node/pull/35486
+Backport-PR-URL: https://github.com/nodejs/node/pull/38786
+Reviewed-By: James M Snell
+---
+ doc/api/embedding.md | 11 ++--
+ src/api/hooks.cc | 55 ++++++++++++-------
+ src/node.h | 15 ++++-
+ src/node_main_instance.cc | 5 +-
+ src/node_worker.cc | 5 +-
+ test/embedding/embedtest.cc | 6 +-
+ .../test-process-beforeexit-throw-exit.js | 12 ++++
+ .../test-worker-beforeexit-throw-exit.js | 28 ++++++++++
+ 8 files changed, 105 insertions(+), 32 deletions(-)
+ create mode 100644 test/parallel/test-process-beforeexit-throw-exit.js
+ create mode 100644 test/parallel/test-worker-beforeexit-throw-exit.js
+
+From f09b80b8bf9ac2a6e26e4f684c7e6add8aff1b94 Mon Sep 17 00:00:00 2001
+From: Richard Lau
+Date: Thu, 17 Jun 2021 16:10:14 -0400
+Subject: [PATCH 2/2] deps: restore minimum ICU version to 65
+
+This modifies 40df0dc so that the changes it applies are only used
+if ICU 67 or greater is used, and restores the previous code path for
+versions of ICU below 67.
+
+The minimum ICU version was bumped to 67 in Node.js 14.6.0 by
+https://github.com/nodejs/node/pull/34356 but the referenced V8
+commit[1] isn't on `v14.x-staging` and appears to have been reverted
+on V8 8.4[2] so this PR also restores the minimum ICU version to 65.
+
+[1] https://github.com/v8/v8/commit/611e412768a7bc87a20d0315635b0bf76a5bab46
+[2] https://github.com/v8/v8/commit/eeccedee1882f1f870b37d12978cd818934b375d
+---
+ deps/v8/src/objects/js-list-format.cc | 51 +++++++++++++++++++++++++++
+ tools/icu/icu_versions.json | 2 +-
+ 2 files changed, 52 insertions(+), 1 deletion(-)
+
+diff --git a/doc/api/embedding.md b/doc/api/embedding.md
+index 7ec22fbab638..7dc4a2db7fca 100644
+--- a/doc/api/embedding.md
++++ b/doc/api/embedding.md
+@@ -181,9 +181,10 @@ int RunNodeInstance(MultiIsolatePlatform* platform,
+ more = uv_loop_alive(&loop);
+ if (more) continue;
+
+- // node::EmitBeforeExit() is used to emit the 'beforeExit' event on
+- // the `process` object.
+- node::EmitBeforeExit(env.get());
++ // node::EmitProcessBeforeExit() is used to emit the 'beforeExit' event
++ // on the `process` object.
++ if (node::EmitProcessBeforeExit(env.get()).IsNothing())
++ break;
+
+ // 'beforeExit' can also schedule new work that keeps the event loop
+ // running.
+@@ -191,8 +192,8 @@ int RunNodeInstance(MultiIsolatePlatform* platform,
+ } while (more == true);
+ }
+
+- // node::EmitExit() returns the current exit code.
+- exit_code = node::EmitExit(env.get());
++ // node::EmitProcessExit() returns the current exit code.
++ exit_code = node::EmitProcessExit(env.get()).FromMaybe(1);
+
+ // node::Stop() can be used to explicitly stop the event loop and keep
+ // further JavaScript from running. It can be called from any thread,
+diff --git a/src/api/hooks.cc b/src/api/hooks.cc
+index a719a861dbe9..84c91a2100b1 100644
+--- a/src/api/hooks.cc
++++ b/src/api/hooks.cc
+@@ -9,8 +9,11 @@ using v8::Context;
+ using v8::HandleScope;
+ using v8::Integer;
+ using v8::Isolate;
++using v8::Just;
+ using v8::Local;
++using v8::Maybe;
+ using v8::NewStringType;
++using v8::Nothing;
+ using v8::Object;
+ using v8::String;
+ using v8::Value;
+@@ -30,6 +33,10 @@ void AtExit(Environment* env, void (*cb)(void* arg), void* arg) {
+ }
+
+ void EmitBeforeExit(Environment* env) {
++ USE(EmitProcessBeforeExit(env));
++}
++
++Maybe EmitProcessBeforeExit(Environment* env) {
+ TraceEventScope trace_scope(TRACING_CATEGORY_NODE1(environment),
+ "BeforeExit", env);
+ if (!env->destroy_async_id_list()->empty())
+@@ -40,39 +47,49 @@ void EmitBeforeExit(Environment* env) {
+
+ Local exit_code_v;
+ if (!env->process_object()->Get(env->context(), env->exit_code_string())
+- .ToLocal(&exit_code_v)) return;
++ .ToLocal(&exit_code_v)) return Nothing();
+
+ Local exit_code;
+- if (!exit_code_v->ToInteger(env->context()).ToLocal(&exit_code)) return;
++ if (!exit_code_v->ToInteger(env->context()).ToLocal(&exit_code)) {
++ return Nothing();
++ }
+
+- // TODO(addaleax): Provide variants of EmitExit() and EmitBeforeExit() that
+- // actually forward empty MaybeLocal<>s (and check env->can_call_into_js()).
+- USE(ProcessEmit(env, "beforeExit", exit_code));
++ return ProcessEmit(env, "beforeExit", exit_code).IsEmpty() ?
++ Nothing() : Just(true);
+ }
+
+ int EmitExit(Environment* env) {
++ return EmitProcessExit(env).FromMaybe(1);
++}
++
++Maybe EmitProcessExit(Environment* env) {
+ // process.emit('exit')
+ HandleScope handle_scope(env->isolate());
+ Context::Scope context_scope(env->context());
+ Local