From 6ad3fc8fdad6916f0d37d3810e97a06779607d54 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Wed, 13 Jul 2022 11:06:55 -0400 Subject: [PATCH] Update to 18.6.0 Switch to ninja for faster builds Signed-off-by: Stephen Gallagher --- nodejs.spec | 28 +++++++++++++++++++--------- sources | 2 +- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/nodejs.spec b/nodejs.spec index f60ce4f..cf4a08a 100644 --- a/nodejs.spec +++ b/nodejs.spec @@ -51,7 +51,7 @@ # than a Fedora release lifecycle. %global nodejs_epoch 1 %global nodejs_major 18 -%global nodejs_minor 5 +%global nodejs_minor 6 %global nodejs_patch 0 %global nodejs_abi %{nodejs_major}.%{nodejs_minor} # nodejs_soversion - from NODE_MODULE_VERSION in src/node_version.h @@ -68,7 +68,7 @@ %global v8_major 10 %global v8_minor 2 %global v8_build 154 -%global v8_patch 4 +%global v8_patch 13 %global v8_version %{v8_major}.%{v8_minor}.%{v8_build}.%{v8_patch} %global v8_release %{nodejs_epoch}.%{nodejs_major}.%{nodejs_minor}.%{nodejs_patch}.%{nodejs_release} @@ -109,7 +109,7 @@ # npm - from deps/npm/package.json %global npm_epoch 1 -%global npm_version 8.12.1 +%global npm_version 8.13.2 # In order to avoid needing to keep incrementing the release version for the # main package forever, we will just construct one for npm that is guaranteed @@ -184,6 +184,7 @@ BuildRequires: jq BuildRequires: nodejs-packaging BuildRequires: chrpath BuildRequires: libatomic +BuildRequires: ninja-build BuildRequires: systemtap-sdt-devel BuildRequires: unzip @@ -439,11 +440,9 @@ find . -type f -exec sed -i "s~python -c~python3 -c~" {} \; %define _lto_cflags %{nil} %endif -%ifarch s390 s390x %{arm} %ix86 # Decrease debuginfo verbosity to reduce memory consumption during final # library linking %global optflags %(echo %{optflags} | sed 's/-g /-g1 /') -%endif export CC='%{__cc}' export CXX='%{__cxx}' @@ -454,16 +453,24 @@ export NODE_GYP_FORCE_PYTHON=%{__python3} # build with debugging symbols and add defines from libuv (#892601) # Node's v8 breaks with GCC 6 because of incorrect usage of methods on # NULL objects. We need to pass -fno-delete-null-pointer-checks +# 2022-07-14: There's a bug in either torque or gcc that causes a +# segmentation fault on ppc64le and s390x if compiled with -O2. Things +# run fine on -O1 and -O3, so we'll just go with -O3 (like upstream) +# while this gets sorted out. extra_cflags=( -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DZLIB_CONST -fno-delete-null-pointer-checks + -O3 ) export CFLAGS="%{optflags} ${extra_cflags[*]}" CXXFLAGS="%{optflags} ${extra_cflags[*]}" export LDFLAGS="%{build_ldflags}" -%{__python3} configure.py --prefix=%{_prefix} \ +%{__python3} configure.py \ + --ninja \ + --enable-lto \ + --prefix=%{_prefix} \ --shared \ --libdir=%{_lib} \ %{ssl_configure} \ @@ -474,15 +481,17 @@ export LDFLAGS="%{build_ldflags}" --with-intl=small-icu \ --with-icu-default-data-dir=%{icudatadir} \ --without-corepack \ - --openssl-use-def-ca-store \ - --enable-lto + --openssl-use-def-ca-store -%make_build BUILDTYPE=Release +%ninja_build -C out/Release %install rm -rf %{buildroot} +# The ninja build does not put the shared library in the expected location, so +# we will move it. +mv out/Release/lib/libnode.so.%{nodejs_soversion} out/Release/ ./tools/install.py install %{buildroot} %{_prefix} # Set the binary permissions properly @@ -681,6 +690,7 @@ end %doc %{_mandir}/man7/developers.7* %doc %{_mandir}/man7/orgs.7* %doc %{_mandir}/man7/logging.7* +%doc %{_mandir}/man7/package-spec.7* %doc %{_mandir}/man7/registry.7* %doc %{_mandir}/man7/removal.7* %doc %{_mandir}/man7/scope.7* diff --git a/sources b/sources index 2c11748..705581d 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ -SHA512 (node-v18.5.0-stripped.tar.gz) = 96e22871ba2cdc4a44bd00f0a157a1355cf9997023ca2e0b9535c7e6628ab64d73eaed13b5b8cc1c9844a25117868ff69b28b0681695d8944c3c860cabd6d1d9 +SHA512 (node-v18.6.0-stripped.tar.gz) = 5e07678fc8c22755a72eba6af34ebe76e8bfd28cfdba3701afa3a34c980bceb1914372711eaaf4906e70e115cceb494b6f57b0316604a54113d9c9cea3d10cc6 SHA512 (icu4c-71_1-data-bin-b.zip) = 2bee9b93699c40a53c2e768d4678309fbd49e052e197a80fb76842b4001ee65e548459654ef7e7d154b6289f915fccbcb5b3109edcd61e74f0db289f2bec61fd SHA512 (icu4c-71_1-data-bin-l.zip) = 07a299b1cd37cd7b07c5e1a7c6871c0dbbeabb2dec6e11c89237f41e56fd29e1a65725be102b4e4ab722183c02810a5df3ed47c3b9b4a7c14bc4c72ab127a27e