From 11b453fe2300a26c7969f1dac8558301b36fa579 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Mon, 11 Jul 2022 10:37:31 -0400 Subject: [PATCH] Update to 16.16.0 Enable %autorelease support Signed-off-by: Stephen Gallagher --- nodejs.spec | 72 +++++++++++++++++++++++++++++++---------------------- sources | 2 +- 2 files changed, 43 insertions(+), 31 deletions(-) diff --git a/nodejs.spec b/nodejs.spec index 6e64343..1ad001e 100644 --- a/nodejs.spec +++ b/nodejs.spec @@ -42,7 +42,7 @@ # This is used by both the nodejs package and the npm subpackage that # has a separate version - the name is special so that rpmdev-bumpspec # will bump this rather than adding .1 to the end. -%global baserelease 1 +%global baserelease %autorelease %{?!_pkgdocdir:%global _pkgdocdir %{_docdir}/%{name}-%{version}} @@ -53,8 +53,8 @@ # than a Fedora release lifecycle. %global nodejs_epoch 1 %global nodejs_major 16 -%global nodejs_minor 15 -%global nodejs_patch 1 +%global nodejs_minor 16 +%global nodejs_patch 0 %global nodejs_abi %{nodejs_major}.%{nodejs_minor} # nodejs_soversion - from NODE_MODULE_VERSION in src/node_version.h %global nodejs_soversion 93 @@ -82,7 +82,7 @@ %global c_ares_version 1.18.1 # llhttp - from deps/llhttp/include/llhttp.h -%global llhttp_version 6.0.4 +%global llhttp_version 6.0.7 # libuv - from deps/uv/include/uv/version.h %global libuv_version 1.43.0 @@ -127,7 +127,7 @@ Name: nodejs Epoch: %{nodejs_epoch} Version: %{nodejs_version} -Release: %{nodejs_release}%{?dist} +Release: %{nodejs_release} Summary: JavaScript runtime License: MIT and ASL 2.0 and ISC and BSD Group: Development/Languages @@ -157,7 +157,6 @@ Patch1: 0001-Disable-running-gyp-on-shared-deps.patch # Patch to install both node and libnode.so, using the correct libdir Patch2: 0002-Install-both-binaries-and-use-libdir.patch -BuildRequires: make BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-setuptools BuildRequires: python%{python3_pkgversion}-jinja2 @@ -184,6 +183,7 @@ BuildRequires: jq # https://pagure.io/nodejs-packaging/pull-request/10 BuildRequires: nodejs-packaging BuildRequires: chrpath +BuildRequires: ninja-build BuildRequires: libatomic BuildRequires: systemtap-sdt-devel BuildRequires: unzip @@ -277,9 +277,9 @@ Requires: (nodejs-packaging if rpm-build) # Make sure we keep NPM up to date when we update Node.js %if 0%{?fedora} || 0%{?rhel} >= 8 -Recommends: npm >= %{npm_epoch}:%{npm_version}-%{npm_release}%{?dist} +Recommends: npm >= %{npm_epoch}:%{npm_version}-%{npm_release} %endif -Conflicts: npm < %{npm_epoch}:%{npm_version}-%{npm_release}%{?dist} +Conflicts: npm < %{npm_epoch}:%{npm_version}-%{npm_release} %description @@ -293,8 +293,8 @@ real-time applications that run across distributed devices. %package devel Summary: JavaScript runtime - development headers Group: Development/Languages -Requires: %{name}%{?_isa} = %{epoch}:%{nodejs_version}-%{nodejs_release}%{?dist} -Requires: %{name}-libs%{?_isa} = %{epoch}:%{nodejs_version}-%{nodejs_release}%{?dist} +Requires: %{name}%{?_isa} = %{epoch}:%{nodejs_version}-%{nodejs_release} +Requires: %{name}-libs%{?_isa} = %{epoch}:%{nodejs_version}-%{nodejs_release} Requires: openssl-devel%{?_isa} %if !%{with bundled_zlib} Requires: zlib-devel%{?_isa} @@ -328,8 +328,8 @@ Provides: libv8_libbase.so.%{v8_major} = %{v8_epoch}:%{v8_version} Provides: libv8_libplatform.so.%{v8_major} = %{v8_epoch}:%{v8_version} %endif -Provides: v8 = %{v8_epoch}:%{v8_version}-%{nodejs_release}%{?dist} -Provides: v8%{?_isa} = %{v8_epoch}:%{v8_version}-%{nodejs_release}%{?dist} +Provides: v8 = %{v8_epoch}:%{v8_version}-%{nodejs_release} +Provides: v8%{?_isa} = %{v8_epoch}:%{v8_version}-%{nodejs_release} Obsoletes: v8 < 1:6.7.17-10 %description libs @@ -338,7 +338,7 @@ Libraries to support Node.js and provide stable v8 interfaces. %package full-i18n Summary: Non-English locale data for Node.js -Requires: %{name}%{?_isa} = %{nodejs_epoch}:%{nodejs_version}-%{nodejs_release}%{?dist} +Requires: %{name}%{?_isa} = %{nodejs_epoch}:%{nodejs_version}-%{nodejs_release} %description full-i18n Optional data files to provide full-icu support for Node.js. Remove this @@ -349,9 +349,9 @@ package to save space if non-English locales are not needed. Summary: v8 - development headers Epoch: %{v8_epoch} Version: %{v8_version} -Release: %{v8_release}%{?dist} -Requires: %{name}-devel%{?_isa} = %{nodejs_epoch}:%{nodejs_version}-%{nodejs_release}%{?dist} -Requires: %{name}-libs%{?_isa} = %{nodejs_epoch}:%{nodejs_version}-%{nodejs_release}%{?dist} +Release: %{v8_release} +Requires: %{name}-devel%{?_isa} = %{nodejs_epoch}:%{nodejs_version}-%{nodejs_release} +Requires: %{name}-libs%{?_isa} = %{nodejs_epoch}:%{nodejs_version}-%{nodejs_release} Conflicts: v8-314-devel %description -n v8-devel @@ -362,15 +362,15 @@ Development headers for the v8 runtime. Summary: Node.js Package Manager Epoch: %{npm_epoch} Version: %{npm_version} -Release: %{npm_release}%{?dist} +Release: %{npm_release} # We used to ship npm separately, but it is so tightly integrated with Node.js # (and expected to be present on all Node.js systems) that we ship it bundled # now. Obsoletes: npm < 0:3.5.4-6 -Requires: nodejs = %{nodejs_epoch}:%{nodejs_version}-%{nodejs_release}%{?dist} +Requires: nodejs = %{nodejs_epoch}:%{nodejs_version}-%{nodejs_release} %if 0%{?fedora} || 0%{?rhel} >= 8 -Recommends: nodejs-docs = %{nodejs_epoch}:%{nodejs_version}-%{nodejs_release}%{?dist} +Recommends: nodejs-docs = %{nodejs_epoch}:%{nodejs_version}-%{nodejs_release} %endif # Do not add epoch to the virtual NPM provides or it will break @@ -390,8 +390,8 @@ BuildArch: noarch # We don't require that the main package be installed to # use the docs, but if it is installed, make sure the # version always matches -Conflicts: %{name} > %{nodejs_epoch}:%{nodejs_version}-%{nodejs_release}%{?dist} -Conflicts: %{name} < %{nodejs_epoch}:%{nodejs_version}-%{nodejs_release}%{?dist} +Conflicts: %{name} > %{nodejs_epoch}:%{nodejs_version}-%{nodejs_release} +Conflicts: %{name} < %{nodejs_epoch}:%{nodejs_version}-%{nodejs_release} %description docs The API documentation for the Node.js JavaScript runtime. @@ -427,11 +427,9 @@ find . -type f -exec sed -i "s~python -c~python3 -c~" {} \; . /opt/rh/devtoolset-11/enable %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}' @@ -442,16 +440,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} \ @@ -462,15 +468,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 @@ -512,6 +520,10 @@ rm -f %{buildroot}%{_pkgdocdir}/html/nodejs.1 mkdir -p %{buildroot}%{_datadir}/node cp -p common.gypi %{buildroot}%{_datadir}/node +# The config.gypi file is platform-dependent, so rename it to not conflict +mv %{buildroot}%{_includedir}/node/config.gypi \ + %{buildroot}%{_includedir}/node/config-%{_arch}.gypi + # Install the GDB init tool into the documentation directory mv %{buildroot}/%{_datadir}/doc/node/gdbinit %{buildroot}/%{_pkgdocdir}/gdbinit @@ -521,13 +533,13 @@ mkdir -p %{buildroot}%{_mandir} \ cp -pr deps/npm/man/* %{buildroot}%{_mandir}/ rm -rf %{buildroot}%{_prefix}/lib/node_modules/npm/man -ln -sf %{_mandir} %{buildroot}%{_prefix}/lib/node_modules/npm/man +ln -srf %{_mandir} %{buildroot}%{_prefix}/lib/node_modules/npm/man # Install Gatsby HTML documentation to %%{_pkgdocdir} cp -pr deps/npm/docs %{buildroot}%{_pkgdocdir}/npm/ rm -rf %{buildroot}%{_prefix}/lib/node_modules/npm/docs -ln -sf %{_pkgdocdir}/npm %{buildroot}%{_prefix}/lib/node_modules/npm/docs +ln -srf %{_pkgdocdir}/npm %{buildroot}%{_prefix}/lib/node_modules/npm/docs # Node tries to install some python files into a documentation directory # (and not the proper one). Remove them for now until we figure out what to @@ -554,7 +566,7 @@ cp %{SOURCE1} %{buildroot}%{_sysconfdir}/npmrc # NPM upstream expects it to be in /usr/etc/npmrc, so we'll put a symlink here # This is done in the interests of keeping /usr read-only. mkdir -p %{buildroot}%{_prefix}/etc -ln -s %{_sysconfdir}/npmrc %{buildroot}%{_prefix}/etc/npmrc +ln -rs %{_sysconfdir}/npmrc %{buildroot}%{_prefix}/etc/npmrc # Install the full-icu data files mkdir -p %{buildroot}%{icudatadir} diff --git a/sources b/sources index d909c93..f6ba136 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ -SHA512 (node-v16.15.1-stripped.tar.gz) = 381d40421666375a917fe317caf8abc48a827c253ce773a974e68b6e8da021e8a59c080b7c1e2676fc18d3aab0f99df172f9f1d9fd3d019fa57dd3d0dfbc00bf +SHA512 (node-v16.16.0-stripped.tar.gz) = a3304e555097ac04e32e00721196baba4cb291e4529f99c804b4834e536c864486f35dd97ce1946dc86a15d719b63bfb108cf41b6012976e7bd0439c69d27bd7 SHA512 (icu4c-70_1-data-bin-b.zip) = eff9b41f1df4fe74e13bc216c62a8eab735622e3aa4e0b9c925b61f55294a002238a0022e1579197170d0345de6e877220b04b62d2010796f4ef1fbb2c17ea92 SHA512 (icu4c-70_1-data-bin-l.zip) = 041ff3480566330d043d9ddcd31e8851e875183d158ea3ce625583b4a9d96166497a9eedc0e72e2f7a3abc3a9110a0372546151b264ff4d1623215aab33552f5