import nodejs-12.13.1-1.module+el8.1.0+5069+f8aaab94
This commit is contained in:
parent
075dbc74d0
commit
2e4c06508d
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
||||
SOURCES/node-v12.4.0-stripped.tar.gz
|
||||
SOURCES/node-v12.13.1-stripped.tar.gz
|
||||
|
@ -1 +1 @@
|
||||
f4a1ca551708266fdc553a04a512af7b03d8ab72 SOURCES/node-v12.4.0-stripped.tar.gz
|
||||
682aca11ed71b4dc7d78471d46f7254c64e005ad SOURCES/node-v12.13.1-stripped.tar.gz
|
||||
|
@ -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 <zsvetlik@redhat.com>
|
||||
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"
|
||||
|
||||
out/Makefile: config.gypi common.gypi node.gyp \
|
||||
- deps/uv/uv.gyp deps/http_parser/http_parser.gyp deps/zlib/zlib.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
|
||||
@@ -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 \
|
||||
- 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
|
||||
|
||||
# node_version.h is listed because the N-API version is taken from there
|
||||
--
|
||||
2.23.0
|
||||
|
||||
|
@ -1,87 +0,0 @@
|
||||
From ab6c18fd9aba942bee3f2f8030273c846b6025a6 Mon Sep 17 00:00:00 2001
|
||||
From: Stephen Gallagher <sgallagh@redhat.com>
|
||||
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 <sgallagh@redhat.com>
|
||||
---
|
||||
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
|
||||
|
@ -1,98 +0,0 @@
|
||||
From a3e5296fcb14cf3e00f31864f305fb40720e8718 Mon Sep 17 00:00:00 2001
|
||||
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
Date: Tue, 19 Mar 2019 23:22:40 -0400
|
||||
Subject: [PATCH 3/3] Install both binaries and use libdir.
|
||||
|
||||
This allows us to build with a shared library for other users while
|
||||
still providing the normal executable.
|
||||
|
||||
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
---
|
||||
configure.py | 7 +++++++
|
||||
tools/install.py | 29 +++++++++++++----------------
|
||||
2 files changed, 20 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/configure.py b/configure.py
|
||||
index 15ea5687cf1cd8e4ebe449ea2fc39eea95fb29b6..a738e300d6098bef4975930422b3fa55b3f5421d 100755
|
||||
--- a/configure.py
|
||||
+++ b/configure.py
|
||||
@@ -534,10 +534,16 @@ parser.add_option('--shared',
|
||||
action='store_true',
|
||||
dest='shared',
|
||||
help='compile shared library for embedding node in another project. ' +
|
||||
'(This mode is not officially supported for regular applications)')
|
||||
|
||||
+parser.add_option('--libdir',
|
||||
+ action='store',
|
||||
+ dest='libdir',
|
||||
+ default='lib',
|
||||
+ help='a directory to install the shared library into')
|
||||
+
|
||||
parser.add_option('--without-v8-platform',
|
||||
action='store_true',
|
||||
dest='without_v8_platform',
|
||||
default=False,
|
||||
help='do not initialize v8 platform during node.js startup. ' +
|
||||
@@ -1065,10 +1071,11 @@ def configure_node(o):
|
||||
o['variables']['node_no_browser_globals'] = b(options.no_browser_globals)
|
||||
# TODO(refack): fix this when implementing embedded code-cache when cross-compiling.
|
||||
if o['variables']['want_separate_host_toolset'] == 0:
|
||||
o['variables']['node_code_cache_path'] = 'yes'
|
||||
o['variables']['node_shared'] = b(options.shared)
|
||||
+ o['variables']['libdir'] = options.libdir
|
||||
node_module_version = getmoduleversion.get_version()
|
||||
|
||||
if sys.platform == 'darwin':
|
||||
shlib_suffix = '%s.dylib'
|
||||
elif sys.platform.startswith('aix'):
|
||||
diff --git a/tools/install.py b/tools/install.py
|
||||
index 655802980a6ea94d1d4ca1dc63c8c8e905fbb83a..fe4723bf15012c8aacacb0393dc8294c049b0503 100755
|
||||
--- a/tools/install.py
|
||||
+++ b/tools/install.py
|
||||
@@ -119,30 +119,27 @@ def subdir_files(path, dest, action):
|
||||
for subdir, files_in_path in ret.items():
|
||||
action(files_in_path, subdir + '/')
|
||||
|
||||
def files(action):
|
||||
is_windows = sys.platform == 'win32'
|
||||
- output_file = 'node'
|
||||
output_prefix = 'out/Release/'
|
||||
+ output_libprefix = output_prefix
|
||||
|
||||
- if 'false' == variables.get('node_shared'):
|
||||
- if is_windows:
|
||||
- output_file += '.exe'
|
||||
+ if is_windows:
|
||||
+ output_bin = 'node.exe'
|
||||
+ output_lib = 'node.dll'
|
||||
else:
|
||||
- if is_windows:
|
||||
- output_file += '.dll'
|
||||
- else:
|
||||
- output_file = 'lib' + output_file + '.' + variables.get('shlib_suffix')
|
||||
- # GYP will output to lib.target except on OS X, this is hardcoded
|
||||
- # in its source - see the _InstallableTargetInstallPath function.
|
||||
- if sys.platform != 'darwin':
|
||||
- output_prefix += 'lib.target/'
|
||||
+ output_bin = 'node'
|
||||
+ output_lib = 'libnode.' + variables.get('shlib_suffix')
|
||||
+ # GYP will output to lib.target except on OS X, this is hardcoded
|
||||
+ # in its source - see the _InstallableTargetInstallPath function.
|
||||
+ if sys.platform != 'darwin':
|
||||
+ output_libprefix += 'lib.target/'
|
||||
|
||||
- if 'false' == variables.get('node_shared'):
|
||||
- action([output_prefix + output_file], 'bin/' + output_file)
|
||||
- else:
|
||||
- action([output_prefix + output_file], 'lib/' + output_file)
|
||||
+ action([output_prefix + output_bin], 'bin/' + output_bin)
|
||||
+ if 'true' == variables.get('node_shared'):
|
||||
+ action([output_libprefix + output_lib], variables.get('libdir') + '/' + output_lib)
|
||||
|
||||
if 'true' == variables.get('node_use_dtrace'):
|
||||
action(['out/Release/node.d'], 'lib/dtrace/node.d')
|
||||
|
||||
# behave similarly for systemtap
|
||||
--
|
||||
2.21.0
|
||||
|
@ -1,4 +1,5 @@
|
||||
%global with_debug 1
|
||||
%global with_debug 0
|
||||
%global with_libs 0
|
||||
|
||||
# PowerPC, s390x and aarch64 segfault during Debug builds
|
||||
# https://github.com/nodejs/node/issues/20642
|
||||
@ -20,11 +21,13 @@
|
||||
# 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 1
|
||||
|
||||
@ -33,12 +36,13 @@
|
||||
# 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
|
||||
@ -56,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
|
||||
@ -76,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
|
||||
@ -94,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
|
||||
@ -132,10 +139,12 @@ 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
|
||||
Patch3: 0003-Install-both-binaries-and-use-libdir.patch
|
||||
%endif
|
||||
|
||||
BuildRequires: python2-devel
|
||||
BuildRequires: python3-devel
|
||||
@ -146,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}
|
||||
@ -159,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.
|
||||
@ -166,17 +175,16 @@ 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
|
||||
|
||||
# we need the system certificate store
|
||||
Requires: ca-certificates
|
||||
|
||||
Requires: nodejs-libs%{?_isa} = %{epoch}:%{nodejs_version}-%{nodejs_release}%{?dist}
|
||||
%if %{?with_libs} == 1
|
||||
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
|
||||
#break when binary compatibility is broken
|
||||
@ -224,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
|
||||
|
||||
|
||||
@ -247,7 +255,6 @@ Requires: openssl-devel%{?_isa}
|
||||
Requires: zlib-devel%{?_isa}
|
||||
Requires: nodejs-packaging
|
||||
|
||||
#%if ! 0%%{?bootstrap}
|
||||
%if %{with bootstrap}
|
||||
# deps are bundled
|
||||
%else
|
||||
@ -258,6 +265,8 @@ 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
|
||||
|
||||
@ -279,14 +288,17 @@ 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.
|
||||
%endif
|
||||
|
||||
%package -n npm
|
||||
Summary: Node.js Package Manager
|
||||
@ -299,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.
|
||||
@ -317,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.
|
||||
@ -331,9 +346,11 @@ 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
|
||||
%endif
|
||||
|
||||
# Replace any instances of unversioned python' with python2
|
||||
pathfix.py -i %{__python2} -pn $(find -type f ! -name "*.js")
|
||||
@ -347,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
|
||||
@ -367,7 +394,7 @@ export CXXFLAGS="$(echo ${CXXFLAGS} | tr '\n\\' ' ')"
|
||||
|
||||
export LDFLAGS="%{build_ldflags}"
|
||||
|
||||
#%if ! 0%%{?bootstrap}
|
||||
%if %{?with_libs} == 1
|
||||
%if %{with bootstrap}
|
||||
./configure --prefix=%{_prefix} \
|
||||
--shared \
|
||||
@ -391,6 +418,27 @@ export LDFLAGS="%{build_ldflags}"
|
||||
--debug-nghttp2 \
|
||||
--openssl-use-def-ca-store
|
||||
%endif
|
||||
%else
|
||||
%if %{with bootstrap}
|
||||
./configure --prefix=%{_prefix} \
|
||||
--shared-openssl \
|
||||
--shared-zlib \
|
||||
--without-dtrace \
|
||||
--with-intl=small-icu \
|
||||
--debug-nghttp2 \
|
||||
--openssl-use-def-ca-store
|
||||
%else
|
||||
./configure --prefix=%{_prefix} \
|
||||
--shared-openssl \
|
||||
--shared-zlib \
|
||||
--shared-libuv \
|
||||
--shared-nghttp2 \
|
||||
--with-dtrace \
|
||||
--with-intl=%{icu_flag} \
|
||||
--debug-nghttp2 \
|
||||
--openssl-use-def-ca-store
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%if %{?with_debug} == 1
|
||||
# Setting BUILDTYPE=Debug builds both release and debug binaries
|
||||
@ -416,6 +464,7 @@ chrpath --delete %{buildroot}%{_bindir}/node
|
||||
install -Dpm0755 out/Debug/node %{buildroot}/%{_bindir}/node_g
|
||||
%endif
|
||||
|
||||
%if %{?with_libs} == 1
|
||||
# Install library symlink
|
||||
ln -s %{_libdir}/libnode.so.%{nodejs_soversion} %{buildroot}%{_libdir}/libnode.so
|
||||
|
||||
@ -428,6 +477,7 @@ for soname in libv8 libv8_libbase libv8_libplatform; do
|
||||
ln -s %{_libdir}/libnode.so.%{nodejs_soversion} %{buildroot}%{_libdir}/${soname}.so
|
||||
ln -s %{_libdir}/libnode.so.%{nodejs_soversion} %{buildroot}%{_libdir}/${soname}.so.%{v8_major}
|
||||
done
|
||||
%endif
|
||||
|
||||
# own the sitelib directory
|
||||
mkdir -p %{buildroot}%{_prefix}/lib/node_modules
|
||||
@ -491,6 +541,7 @@ chmod 0755 %{buildroot}%{_prefix}/lib/node_modules/npm/node_modules/node-gyp/bin
|
||||
|
||||
|
||||
%check
|
||||
%if %{?with_libs} == 1
|
||||
# Fail the build if the versions don't match
|
||||
LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}/%{_bindir}/node -e "require('assert').equal(process.versions.node, '%{nodejs_version}')"
|
||||
LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}/%{_bindir}/node -e "require('assert').equal(process.versions.v8.replace(/-node\.\d+$/, ''), '%{v8_version}')"
|
||||
@ -501,6 +552,18 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}/%{_bindir}/node -e "require(
|
||||
|
||||
# Ensure we have npm and that the version matches
|
||||
NODE_PATH=%{buildroot}%{_prefix}/lib/node_modules:%{buildroot}%{_prefix}/lib/node_modules/npm/node_modules LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}/%{_bindir}/node -e "require(\"assert\").equal(require(\"npm\").version, '%{npm_version}')"
|
||||
%else
|
||||
# Fail the build if the versions don't match
|
||||
%{buildroot}/%{_bindir}/node -e "require('assert').equal(process.versions.node, '%{nodejs_version}')"
|
||||
%{buildroot}/%{_bindir}/node -e "require('assert').equal(process.versions.v8.replace(/-node\.\d+$/, ''), '%{v8_version}')"
|
||||
%{buildroot}/%{_bindir}/node -e "require('assert').equal(process.versions.ares.replace(/-DEV$/, ''), '%{c_ares_version}')"
|
||||
|
||||
# Ensure we have punycode and that the version matches
|
||||
%{buildroot}/%{_bindir}/node -e "require(\"assert\").equal(require(\"punycode\").version, '%{punycode_version}')"
|
||||
|
||||
# Ensure we have npm and that the version matches
|
||||
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 <lua>
|
||||
@ -518,7 +581,56 @@ 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 <lua>
|
||||
-- Replace the v8 libplatform include directory with a symlink
|
||||
-- Drop this scriptlet when F30 is EOL
|
||||
@ -535,6 +647,7 @@ if st and st.type == "directory" then
|
||||
os.rename(path, path .. ".rpmmoved")
|
||||
end
|
||||
end
|
||||
%endif
|
||||
|
||||
|
||||
%files
|
||||
@ -545,7 +658,6 @@ end
|
||||
%dir %{_datadir}/systemtap/tapset
|
||||
%{_datadir}/systemtap/tapset/node.stp
|
||||
|
||||
#%if ! 0%%{?bootstrap}
|
||||
%if %{with bootstrap}
|
||||
# no dtrace
|
||||
%else
|
||||
@ -565,11 +677,14 @@ end
|
||||
%{_bindir}/node_g
|
||||
%endif
|
||||
%{_includedir}/node
|
||||
%if %{?with_libs} == 1
|
||||
%{_libdir}/libnode.so
|
||||
%endif
|
||||
%{_datadir}/node/common.gypi
|
||||
%{_pkgdocdir}/gdbinit
|
||||
|
||||
|
||||
%if %{?with_libs} == 1
|
||||
%files libs
|
||||
%{_libdir}/libnode.so.%{nodejs_soversion}
|
||||
%{_libdir}/libv8.so.%{v8_major}
|
||||
@ -584,6 +699,7 @@ end
|
||||
%{_libdir}/libv8_libbase.so
|
||||
%{_libdir}/libv8_libplatform.so
|
||||
%ghost %{_includedir}/libplatform.rpmmoved
|
||||
%endif
|
||||
|
||||
|
||||
%files -n npm
|
||||
@ -607,7 +723,16 @@ end
|
||||
%{_pkgdocdir}/npm/doc
|
||||
|
||||
%changelog
|
||||
* Wed Jun 12 2019 Zuzana Svetlikova <zsvetlik@redhat.com> - 1:12:4.0-1
|
||||
* Fri Nov 29 2019 Zuzana Svetlikova <zsvetlik@redhat.com> - 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 <zsvetlik@redhat.com> - 1:12.4.0-2
|
||||
- Resolves:RHBZ#1685191
|
||||
- Add condition to libs
|
||||
|
||||
* Wed Jun 12 2019 Zuzana Svetlikova <zsvetlik@redhat.com> - 1:12.4.0-1
|
||||
- Update to v12.x
|
||||
- Add v8-devel and libs subpackages from fedora
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user