diff --git a/.gitignore b/.gitignore index c188dde..3bc7e0b 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/node-v12.4.0-stripped.tar.gz +SOURCES/node-v12.13.1-stripped.tar.gz diff --git a/.nodejs.metadata b/.nodejs.metadata index d8b3b04..1598e82 100644 --- a/.nodejs.metadata +++ b/.nodejs.metadata @@ -1 +1 @@ -f4a1ca551708266fdc553a04a512af7b03d8ab72 SOURCES/node-v12.4.0-stripped.tar.gz +682aca11ed71b4dc7d78471d46f7254c64e005ad SOURCES/node-v12.13.1-stripped.tar.gz diff --git a/SOURCES/0001-Disable-running-gyp-on-shared-deps.patch b/SOURCES/0001-Disable-running-gyp-on-shared-deps.patch index 5de6457..ddd7512 100644 --- a/SOURCES/0001-Disable-running-gyp-on-shared-deps.patch +++ b/SOURCES/0001-Disable-running-gyp-on-shared-deps.patch @@ -1,29 +1,29 @@ -From 684bbd3b112afbb575f971ea23a03d3d228922f7 Mon Sep 17 00:00:00 2001 +From 80542232e5b9c3ede63b7a70c1077497e130da81 Mon Sep 17 00:00:00 2001 From: Zuzana Svetlikova Date: Thu, 27 Apr 2017 14:25:42 +0200 Subject: [PATCH 1/3] Disable running gyp on shared deps --- - Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + Makefile | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile -index 5834df883b0c232d2c9187f20e61f35dff4f6cef..ba3cacad0382dc17c4a911ea0c0bb39ced96c650 100644 +index 0a5177d1c3e7d6769535d79e063f987157a30f4d..1f3dd0abe4031defb5b7cc817b12886bdea002c7 100644 --- a/Makefile +++ b/Makefile -@@ -139,11 +139,11 @@ with-code-cache: - .PHONY: test-code-cache - test-code-cache: with-code-cache - echo "'test-code-cache' target is a noop" - +@@ -141,9 +141,9 @@ test-code-cache: with-code-cache + echo "'test-code-cache' target is a noop" + out/Makefile: config.gypi common.gypi node.gyp \ -- deps/uv/uv.gyp deps/http_parser/http_parser.gyp deps/zlib/zlib.gyp \ +- deps/uv/uv.gyp deps/http_parser/http_parser.gyp deps/zlib/zlib.gyp \ +- tools/v8_gypfiles/toolchain.gypi tools/v8_gypfiles/features.gypi \ +- tools/v8_gypfiles/inspector.gypi tools/v8_gypfiles/v8.gyp + deps/http_parser/http_parser.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 - - config.gypi: configure configure.py --- -2.21.0 ++ 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 + + # node_version.h is listed because the N-API version is taken from there +-- +2.23.0 diff --git a/SOURCES/0002-Suppress-NPM-message-to-run-global-update.patch b/SOURCES/0002-Suppress-NPM-message-to-run-global-update.patch deleted file mode 100644 index fd54ee2..0000000 --- a/SOURCES/0002-Suppress-NPM-message-to-run-global-update.patch +++ /dev/null @@ -1,87 +0,0 @@ -From ab6c18fd9aba942bee3f2f8030273c846b6025a6 Mon Sep 17 00:00:00 2001 -From: Stephen Gallagher -Date: Tue, 1 May 2018 08:05:30 -0400 -Subject: [PATCH 2/2] Suppress NPM message to run global update - -Signed-off-by: Stephen Gallagher ---- - deps/npm/bin/npm-cli.js | 54 ----------------------------------------- - 1 file changed, 54 deletions(-) - -diff --git a/deps/npm/bin/npm-cli.js b/deps/npm/bin/npm-cli.js -index 6f76b23828531e7af98a7e3cd7d5abfaac09b40c..98edb6f45fe073e03794a2ae6e7aa7f5500723ee 100755 ---- a/deps/npm/bin/npm-cli.js -+++ b/deps/npm/bin/npm-cli.js -@@ -67,69 +67,15 @@ - if (conf.usage && npm.command !== 'help') { - npm.argv.unshift(npm.command) - npm.command = 'help' - } - -- var isGlobalNpmUpdate = conf.global && ['install', 'update'].includes(npm.command) && npm.argv.includes('npm') -- - // now actually fire up npm and run the command. - // this is how to use npm programmatically: - conf._exit = true - npm.load(conf, function (er) { - if (er) return errorHandler(er) -- if ( -- !isGlobalNpmUpdate && -- npm.config.get('update-notifier') && -- !unsupported.checkVersion(process.version).unsupported -- ) { -- const pkg = require('../package.json') -- let notifier = require('update-notifier')({pkg}) -- const isCI = require('ci-info').isCI -- if ( -- notifier.update && -- notifier.update.latest !== pkg.version && -- !isCI -- ) { -- const color = require('ansicolors') -- const useColor = npm.config.get('color') -- const useUnicode = npm.config.get('unicode') -- const old = notifier.update.current -- const latest = notifier.update.latest -- let type = notifier.update.type -- if (useColor) { -- switch (type) { -- case 'major': -- type = color.red(type) -- break -- case 'minor': -- type = color.yellow(type) -- break -- case 'patch': -- type = color.green(type) -- break -- } -- } -- const changelog = `https://github.com/npm/cli/releases/tag/v${latest}` -- notifier.notify({ -- message: `New ${type} version of ${pkg.name} available! ${ -- useColor ? color.red(old) : old -- } ${useUnicode ? '→' : '->'} ${ -- useColor ? color.green(latest) : latest -- }\n` + -- `${ -- useColor ? color.yellow('Changelog:') : 'Changelog:' -- } ${ -- useColor ? color.cyan(changelog) : changelog -- }\n` + -- `Run ${ -- useColor -- ? color.green(`npm install -g ${pkg.name}`) -- : `npm i -g ${pkg.name}` -- } to update!` -- }) -- } -- } - npm.commands[npm.command](npm.argv, function (err) { - // https://genius.com/Lin-manuel-miranda-your-obedient-servant-lyrics - if ( - !err && - npm.config.get('ham-it-up') && --- -2.19.0 - diff --git a/SPECS/nodejs.spec b/SPECS/nodejs.spec index ef2c5dd..dcd7e42 100644 --- a/SPECS/nodejs.spec +++ b/SPECS/nodejs.spec @@ -1,4 +1,4 @@ -%global with_debug 1 +%global with_debug 0 %global with_libs 0 # PowerPC, s390x and aarch64 segfault during Debug builds @@ -21,27 +21,28 @@ # than a Fedora release lifecycle. %global nodejs_epoch 1 %global nodejs_major 12 -%global nodejs_minor 4 -%global nodejs_patch 0 +%global nodejs_minor 13 +%global nodejs_patch 1 %global nodejs_abi %{nodejs_major}.%{nodejs_minor} %if %{?with_libs} == 1 # nodejs_soversion - from NODE_MODULE_VERSION in src/node_version.h %global nodejs_soversion 72 %endif %global nodejs_version %{nodejs_major}.%{nodejs_minor}.%{nodejs_patch} -%global nodejs_release 2 +%global nodejs_release 1 # == Bundled Dependency Versions == # v8 - from deps/v8/include/v8-version.h # Epoch is set to ensure clean upgrades from the old v8 package %global v8_epoch 1 %global v8_major 7 -%global v8_minor 4 -%global v8_build 288 -%global v8_patch 27 +%global v8_minor 7 +%global v8_build 299 +%global v8_patch 13 # V8 presently breaks ABI at least every x.y release while never bumping SONAME %global v8_abi %{v8_major}.%{v8_minor} %global v8_version %{v8_major}.%{v8_minor}.%{v8_build}.%{v8_patch} +%global v8_release %{nodejs_epoch}.%{nodejs_major}.%{nodejs_minor}.%{nodejs_patch}.%{nodejs_release} # c-ares - from deps/cares/include/ares_version.h # https://github.com/nodejs/node/pull/9332 @@ -59,19 +60,19 @@ # llhttp - from deps/llhttp/include/llhttp.h %global llhttp_major 1 %global llhttp_minor 1 -%global llhttp_patch 3 +%global llhttp_patch 4 %global llhttp_version %{llhttp_major}.%{llhttp_minor}.%{llhttp_patch} # libuv - from deps/uv/include/uv/version.h %global libuv_major 1 -%global libuv_minor 29 +%global libuv_minor 33 %global libuv_patch 1 %global libuv_version %{libuv_major}.%{libuv_minor}.%{libuv_patch} # nghttp2 - from deps/nghttp2/lib/includes/nghttp2/nghttp2ver.h %global nghttp2_major 1 -%global nghttp2_minor 38 -%global nghttp2_patch 0 +%global nghttp2_minor 39 +%global nghttp2_patch 2 %global nghttp2_version %{nghttp2_major}.%{nghttp2_minor}.%{nghttp2_patch} # ICU - from tools/icu/current_ver.dep @@ -79,13 +80,16 @@ %global icu_minor 2 %global icu_version %{icu_major}.%{icu_minor} -%if 0%{?fedora} >= 29 +%global sys_icu_version %(/usr/bin/icu-config --version) + +%if "%{sys_icu_version}" >= "%{icu_version}" +%global bundled_icu 0 %global icu_flag system-icu %else -%global icu_flag small-icu +%global bundled_icu 1 +%global icu_flag full-icu %endif - # punycode - from lib/punycode.js # Note: this was merged into the mainline since 0.6.x # Note: this will be unmerged in an upcoming major release @@ -97,8 +101,8 @@ # npm - from deps/npm/package.json %global npm_epoch 1 %global npm_major 6 -%global npm_minor 9 -%global npm_patch 0 +%global npm_minor 12 +%global npm_patch 1 %global npm_version %{npm_major}.%{npm_minor}.%{npm_patch} # In order to avoid needing to keep incrementing the release version for the @@ -135,7 +139,7 @@ Patch1: 0001-Disable-running-gyp-on-shared-deps.patch # Suppress the message from npm to run `npm -g update npm` # This does bad things on an RPM-managed npm. -Patch2: 0002-Suppress-NPM-message-to-run-global-update.patch +# Patch2: 0002-Suppress-NPM-message-to-run-global-update.patch %if %{?with_libs} == 1 # Patch to install both node and libnode.so, using the correct libdir @@ -151,7 +155,6 @@ BuildRequires: nodejs-packaging BuildRequires: chrpath BuildRequires: libatomic -#%if ! 0%%{?bootstrap} %if %{with bootstrap} Provides: bundled(http-parser) = %{http_parser_version} Provides: bundled(libuv) = %{libuv_version} @@ -164,6 +167,7 @@ BuildRequires: libuv-devel >= 1:%{libuv_version} Requires: libuv >= 1:%{libuv_version} BuildRequires: libnghttp2-devel >= %{nghttp2_version} Requires: libnghttp2 >= %{nghttp2_version} + # Temporarily bundle http-parser and llhttp because the latter # isn't packaged yet and they are controlled by the same # configure flag. @@ -171,10 +175,7 @@ Provides: bundled(http-parser) = %{http_parser_version} Provides: bundled(llhttp) = %{llhttp_version} %endif - -%if 0%{?fedora} >= 29 -BuildRequires: libicu-devel >= 62.1 -%endif +BuildRequires: libicu-devel BuildRequires: openssl-devel @@ -182,7 +183,7 @@ BuildRequires: openssl-devel Requires: ca-certificates %if %{?with_libs} == 1 -Requires: nodejs-libs%{?_isa} = %{epoch}:%{nodejs_version}-%{nodejs_release}%{?dist} +Requires: nodejs-libs%{?_isa} = %{nodejs_epoch}:%{nodejs_version}-%{nodejs_release}%{?dist} %endif #we need ABI virtual provides where SONAMEs aren't enough/not present so deps @@ -231,11 +232,11 @@ Provides: bundled(v8) = %{v8_version} Provides: bundled(icu) = %{icu_version} # Make sure we keep NPM up to date when we update Node.js -%if 0%{?rhel} +%if 0%{?rhel} < 8 # EPEL doesn't support Recommends, so make it strict -Requires: npm = %{npm_epoch}:%{npm_version}-%{npm_release}%{?dist} +Requires: npm >= %{npm_epoch}:%{npm_version}-%{npm_release}%{?dist} %else -Recommends: npm = %{npm_epoch}:%{npm_version}-%{npm_release}%{?dist} +Recommends: npm >= %{npm_epoch}:%{npm_version}-%{npm_release}%{?dist} %endif @@ -254,7 +255,6 @@ Requires: openssl-devel%{?_isa} Requires: zlib-devel%{?_isa} Requires: nodejs-packaging -#%if ! 0%%{?bootstrap} %if %{with bootstrap} # deps are bundled %else @@ -265,6 +265,7 @@ Requires: libuv-devel%{?_isa} %description devel Development headers for the Node.js JavaScript runtime. + %if %{?with_libs} == 1 %package libs Summary: Node.js and v8 libraries @@ -287,11 +288,13 @@ Obsoletes: v8 < 1:6.7.17-10 %description libs Libraries to support Node.js and provide stable v8 interfaces. + %package -n v8-devel Summary: v8 - development headers Epoch: %{v8_epoch} Version: %{v8_version} -Requires: %{name}-devel%{?_isa} = %{epoch}:%{nodejs_version}-%{nodejs_release}%{?dist} +Release: %{v8_release}%{?dist} +Requires: %{name}-devel%{?_isa} = %{nodejs_epoch}:%{nodejs_version}-%{nodejs_release}%{?dist} %description -n v8-devel Development headers for the v8 runtime. @@ -308,7 +311,10 @@ Release: %{npm_release}%{?dist} # now. Obsoletes: npm < 0:3.5.4-6 Provides: npm = %{npm_epoch}:%{npm_version} -Requires: nodejs = %{epoch}:%{nodejs_version}-%{nodejs_release}%{?dist} +Requires: nodejs = %{nodejs_epoch}:%{nodejs_version}-%{nodejs_release}%{?dist} +%if 0%{?fedora} || 0%{?rhel} >= 8 +Recommends: nodejs-docs = %{nodejs_epoch}:%{nodejs_version}-%{nodejs_release}%{?dist} +%endif # Do not add epoch to the virtual NPM provides or it will break # the automatic dependency-generation script. @@ -326,8 +332,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} > %{epoch}:%{nodejs_version}-%{nodejs_release}%{?dist} -Conflicts: %{name} < %{epoch}:%{nodejs_version}-%{nodejs_release}%{?dist} +Conflicts: %{name} > %{nodejs_epoch}:%{nodejs_version}-%{nodejs_release}%{?dist} +Conflicts: %{name} < %{nodejs_epoch}:%{nodejs_version}-%{nodejs_release}%{?dist} %description docs The API documentation for the Node.js JavaScript runtime. @@ -340,7 +346,7 @@ The API documentation for the Node.js JavaScript runtime. %patch1 -p1 rm -rf deps/zlib -%patch2 -p1 +# %%patch2 -p1 %if %{?with_libs} == 1 %patch3 -p1 @@ -358,6 +364,16 @@ sed -i "s~which('python')~which('python2')~" configure %build export RHEL_ALLOW_PYTHON2_FOR_BUILD=1 + +%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='gcc' +export CXX='g++' + # 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 @@ -379,7 +395,6 @@ export CXXFLAGS="$(echo ${CXXFLAGS} | tr '\n\\' ' ')" export LDFLAGS="%{build_ldflags}" %if %{?with_libs} == 1 -#%if ! 0%%{?bootstrap} %if %{with bootstrap} ./configure --prefix=%{_prefix} \ --shared \ @@ -550,6 +565,7 @@ NODE_PATH=%{buildroot}%{_prefix}/lib/node_modules:%{buildroot}%{_prefix}/lib/nod NODE_PATH=%{buildroot}%{_prefix}/lib/node_modules:%{buildroot}%{_prefix}/lib/node_modules/npm/node_modules %{buildroot}/%{_bindir}/node -e "require(\"assert\").equal(require(\"npm\").version, '%{npm_version}')" %endif + %pretrans -n npm -p -- Remove all of the symlinks from the bundled npm node_modules directory -- This scriptlet can be removed in Fedora 31 @@ -565,6 +581,54 @@ if d_st then end end +-- Replace the npm docs directory with a symlink +-- Drop this scriptlet when F31 is EOL +path = "%{_prefix}/lib/node_modules/npm/doc" +st = posix.stat(path) +if st and st.type == "directory" then + status = os.rename(path, path .. ".rpmmoved") + if not status then + suffix = 0 + while not status do + suffix = suffix + 1 + status = os.rename(path .. ".rpmmoved", path .. ".rpmmoved." .. suffix) + end + os.rename(path, path .. ".rpmmoved") + end +end + +-- Replace the npm HTML docs directory with a symlink +-- Drop this scriptlet when F31 is EOL +path = "%{_prefix}/lib/node_modules/npm/html" +st = posix.stat(path) +if st and st.type == "directory" then + status = os.rename(path, path .. ".rpmmoved") + if not status then + suffix = 0 + while not status do + suffix = suffix + 1 + status = os.rename(path .. ".rpmmoved", path .. ".rpmmoved." .. suffix) + end + os.rename(path, path .. ".rpmmoved") + end +end + +-- Replace the npm HTML man directory with a symlink +-- Drop this scriptlet when F31 is EOL +path = "%{_prefix}/lib/node_modules/npm/man" +st = posix.stat(path) +if st and st.type == "directory" then + status = os.rename(path, path .. ".rpmmoved") + if not status then + suffix = 0 + while not status do + suffix = suffix + 1 + status = os.rename(path .. ".rpmmoved", path .. ".rpmmoved." .. suffix) + end + os.rename(path, path .. ".rpmmoved") + end +end + %if %{?with_libs} == 1 %pretrans -n v8-devel -p @@ -594,7 +658,6 @@ end %dir %{_datadir}/systemtap/tapset %{_datadir}/systemtap/tapset/node.stp -#%if ! 0%%{?bootstrap} %if %{with bootstrap} # no dtrace %else @@ -660,6 +723,11 @@ end %{_pkgdocdir}/npm/doc %changelog +* Fri Nov 29 2019 Zuzana Svetlikova - 1:12.13.1-1 +- Resolves: RHBZ# 1773503, update to 12.13.1 +- minor clean up and sync with Fedora spec +- turn off debug builds + * Thu Aug 01 2019 Zuzana Svetlikova - 1:12.4.0-2 - Resolves:RHBZ#1685191 - Add condition to libs