From 69da18ab934a4c9062948cf17e22658fdccb5f9e Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Wed, 19 Apr 2017 07:28:42 -0400 Subject: [PATCH 1/4] Switch to final upstream patch for GCC 7 compatibility Also drop unused older version of the gyp file patch. This commit makes no functional changes (the upstream patch is identical except for the commit message), so we aren't building this change. --- ...e-running-gyp-files-for-bundled-deps.patch | 29 ------------------- 0004-Fix-compatibility-with-GCC-7.patch | 19 ++++++++---- nodejs.spec | 9 ++++-- 3 files changed, 20 insertions(+), 37 deletions(-) delete mode 100644 0001-disable-running-gyp-files-for-bundled-deps.patch diff --git a/0001-disable-running-gyp-files-for-bundled-deps.patch b/0001-disable-running-gyp-files-for-bundled-deps.patch deleted file mode 100644 index 7dbeb1c..0000000 --- a/0001-disable-running-gyp-files-for-bundled-deps.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 061822759b37ab5bda659d74f9149cace5afe628 Mon Sep 17 00:00:00 2001 -From: Stephen Gallagher -Date: Tue, 1 Dec 2015 16:35:29 -0500 -Subject: [PATCH 1/4] disable running gyp files for bundled deps - ---- - Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Makefile b/Makefile -index 719b855559383a8011c8f6f073ed69a1cf21aeee..31cd25452dccb0624809c0570a738c5b49cc782c 100644 ---- a/Makefile -+++ b/Makefile -@@ -70,11 +70,11 @@ $(NODE_EXE): config.gypi out/Makefile - - $(NODE_G_EXE): config.gypi out/Makefile - $(MAKE) -C out BUILDTYPE=Debug V=$(V) - ln -fs out/Debug/$(NODE_EXE) $@ - --out/Makefile: common.gypi deps/uv/uv.gyp deps/http_parser/http_parser.gyp deps/zlib/zlib.gyp deps/v8/build/toolchain.gypi deps/v8/build/features.gypi deps/v8/tools/gyp/v8.gyp node.gyp config.gypi -+out/Makefile: common.gypi deps/v8/build/toolchain.gypi deps/v8/build/features.gypi deps/v8/tools/gyp/v8.gyp node.gyp config.gypi - $(PYTHON) tools/gyp_node.py -f make - - config.gypi: configure - $(error Missing or stale $@, please run ./$<) - --- -2.12.0 - diff --git a/0004-Fix-compatibility-with-GCC-7.patch b/0004-Fix-compatibility-with-GCC-7.patch index da90368..55427f7 100644 --- a/0004-Fix-compatibility-with-GCC-7.patch +++ b/0004-Fix-compatibility-with-GCC-7.patch @@ -1,9 +1,18 @@ -From fbb5821dc3d967e916a187ee009e955530d2ce8d Mon Sep 17 00:00:00 2001 +From a75f63218b84ee508c770391519a13bd400a5003 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis -Date: Tue, 28 Feb 2017 13:56:40 -0500 -Subject: [PATCH 4/4] Fix compatibility with GCC 7 +Date: Thu, 13 Apr 2017 13:48:01 +0200 +Subject: [PATCH 4/4] v8: fix build errors with g++ 7 -Signed-off-by: Stephen Gallagher +This is a local patch because upstream fixed it differently by moving +large chunks of code out of objects.h. We cannot easily back-port +those changes due to their size and invasiveness. + +Fixes: https://github.com/nodejs/node/issues/10388 +PR-URL: https://github.com/nodejs/node/pull/12392 +Reviewed-By: Anna Henningsen +Reviewed-By: Benjamin Gruenbaum +Reviewed-By: Daniel Bevenius +Reviewed-By: James M Snell --- deps/v8/src/objects-body-descriptors.h | 2 +- deps/v8/src/objects-inl.h | 21 +++++++++++++++++++++ @@ -99,5 +108,5 @@ index d1632c9deb298218faea31886ffdb0a8e0201cdc..47b02dadcff9658c9fcfe629e1376670 Isolate* isolate, int at_least_space_for, MinimumCapacity capacity_option = USE_DEFAULT_MINIMUM_CAPACITY, -- -2.12.0 +2.12.2 diff --git a/nodejs.spec b/nodejs.spec index a2ab977..2758e7b 100644 --- a/nodejs.spec +++ b/nodejs.spec @@ -19,7 +19,7 @@ %global nodejs_patch 2 %global nodejs_abi %{nodejs_major}.%{nodejs_minor} %global nodejs_version %{nodejs_major}.%{nodejs_minor}.%{nodejs_patch} -%global nodejs_release 1 +%global nodejs_release 2 # == Bundled Dependency Versions == # v8 - from deps/v8/include/v8-version.h @@ -101,8 +101,8 @@ Patch2: 0002-Use-openssl-1.0.1.patch # Backported from upstream 7.5.0+ Patch3: 0003-crypto-Use-system-CAs-instead-of-using-bundled-ones.patch -# Patch to allow building with GCC 7 from -# https://github.com/nodejs/node/issues/10388#issuecomment-283120731 +# Backported upstream patch to allow building with GCC 7 from +# https://github.com/nodejs/node/commit/2bbee49e6f170a5d6628444a7c9a2235fe0dd929 Patch4: 0004-Fix-compatibility-with-GCC-7.patch # RHEL 7 still uses OpenSSL 1.0.1 for now, and it segfaults on SSL @@ -424,6 +424,9 @@ NODE_PATH=%{buildroot}%{_prefix}/lib/node_modules %{buildroot}/%{_bindir}/node - %{_pkgdocdir}/npm/doc %changelog +* Wed Apr 19 2017 Stephen Gallagher - 1:6.10.2-2 +- Switch to final upstream patch for GCC 7 compatibility + * Wed Apr 12 2017 Zuzana Svetlikova - 1:6.10.2-1 - Update to 6.10.2 From 8add2493d0c45aba76a6178c752e3d050eb5dd66 Mon Sep 17 00:00:00 2001 From: Zuzana Svetlikova Date: Tue, 9 May 2017 16:54:00 +0200 Subject: [PATCH 2/4] Bootstrap systemtap-sdt-devel for modularity --- nodejs.spec | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/nodejs.spec b/nodejs.spec index 2758e7b..dac0f97 100644 --- a/nodejs.spec +++ b/nodejs.spec @@ -1,5 +1,7 @@ %global with_debug 1 +%{!?_with_bootstrap: %global bootstrap 1} + %{?!_pkgdocdir:%global _pkgdocdir %{_docdir}/%{name}-%{version}} # ARM builds currently break on the Debug builds, so we'll just @@ -19,7 +21,7 @@ %global nodejs_patch 2 %global nodejs_abi %{nodejs_major}.%{nodejs_minor} %global nodejs_version %{nodejs_major}.%{nodejs_minor}.%{nodejs_patch} -%global nodejs_release 2 +%global nodejs_release 3 # == Bundled Dependency Versions == # v8 - from deps/v8/include/v8-version.h @@ -116,7 +118,10 @@ BuildRequires: libicu-devel BuildRequires: zlib-devel BuildRequires: gcc >= 4.8.0 BuildRequires: gcc-c++ >= 4.8.0 + +%if ! 0%{?bootstrap} BuildRequires: systemtap-sdt-devel +%endif %if 0%{?epel} BuildRequires: openssl-devel >= 1:1.0.1 @@ -279,6 +284,7 @@ export CXXFLAGS='%{optflags} -g \ export CFLAGS="$(echo ${CFLAGS} | tr '\n\\' ' ')" export CXXFLAGS="$(echo ${CXXFLAGS} | tr '\n\\' ' ')" +%if ! 0%{?bootstrap} ./configure --prefix=%{_prefix} \ --shared-openssl \ --shared-zlib \ @@ -286,6 +292,15 @@ export CXXFLAGS="$(echo ${CXXFLAGS} | tr '\n\\' ' ')" --with-dtrace \ --with-intl=system-icu \ --openssl-use-def-ca-store +%else +./configure --prefix=%{_prefix} \ + --shared-openssl \ + --shared-zlib \ + --shared-libuv \ + --without-dtrace \ + --with-intl=system-icu \ + --openssl-use-def-ca-store +%endif %if %{?with_debug} == 1 # Setting BUILDTYPE=Debug builds both release and debug binaries @@ -424,6 +439,9 @@ NODE_PATH=%{buildroot}%{_prefix}/lib/node_modules %{buildroot}/%{_bindir}/node - %{_pkgdocdir}/npm/doc %changelog +* Tue May 09 2017 Zuzana Svetlikova - 1:6.10.2-3 +- Bootstrap systemtap-sdt-devel for modularity + * Wed Apr 19 2017 Stephen Gallagher - 1:6.10.2-2 - Switch to final upstream patch for GCC 7 compatibility From 7f7badf0adcb2672ff6375465ccf01b3a1575f3c Mon Sep 17 00:00:00 2001 From: Zuzana Svetlikova Date: Wed, 10 May 2017 08:10:03 +0200 Subject: [PATCH 3/4] Add if to %files too --- nodejs.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nodejs.spec b/nodejs.spec index dac0f97..16d30ed 100644 --- a/nodejs.spec +++ b/nodejs.spec @@ -402,8 +402,12 @@ NODE_PATH=%{buildroot}%{_prefix}/lib/node_modules %{buildroot}/%{_bindir}/node - %dir %{_datadir}/systemtap %dir %{_datadir}/systemtap/tapset %{_datadir}/systemtap/tapset/node.stp + +%if ! 0%{?bootstrap} %dir %{_usr}/lib/dtrace %{_usr}/lib/dtrace/node.d +%endif + %{_rpmconfigdir}/fileattrs/nodejs_native.attr %{_rpmconfigdir}/nodejs_native.req %license LICENSE From 12cf55706352c1c5b605e1eb20a8de36658a602b Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Wed, 10 May 2017 09:16:52 -0400 Subject: [PATCH 4/4] Update to 6.10.3 Signed-off-by: Stephen Gallagher --- .gitignore | 1 + nodejs.spec | 36 ++++++++++++++++++++---------------- sources | 2 +- 3 files changed, 22 insertions(+), 17 deletions(-) diff --git a/.gitignore b/.gitignore index 81f6db8..e92f336 100644 --- a/.gitignore +++ b/.gitignore @@ -66,3 +66,4 @@ /node-v6.10.0-stripped.tar.gz /node-v6.10.1-stripped.tar.gz /node-v6.10.2-stripped.tar.gz +/node-v6.10.3-stripped.tar.gz diff --git a/nodejs.spec b/nodejs.spec index 16d30ed..618ca89 100644 --- a/nodejs.spec +++ b/nodejs.spec @@ -18,17 +18,17 @@ %global nodejs_epoch 1 %global nodejs_major 6 %global nodejs_minor 10 -%global nodejs_patch 2 +%global nodejs_patch 3 %global nodejs_abi %{nodejs_major}.%{nodejs_minor} %global nodejs_version %{nodejs_major}.%{nodejs_minor}.%{nodejs_patch} -%global nodejs_release 3 +%global nodejs_release 1 # == Bundled Dependency Versions == # v8 - from deps/v8/include/v8-version.h %global v8_major 5 %global v8_minor 1 %global v8_build 281 -%global v8_patch 98 +%global v8_patch 101 # 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} @@ -39,12 +39,6 @@ %global c_ares_patch 1 %global c_ares_version %{c_ares_major}.%{c_ares_minor}.%{c_ares_patch} -# http-parser - from deps/http_parser/http_parser.h -%global http_parser_major 2 -%global http_parser_minor 7 -%global http_parser_patch 0 -%global http_parser_version %{http_parser_major}.%{http_parser_minor}.%{http_parser_patch} - # punycode - from lib/punycode.js # Note: this was merged into the mainline since 0.6.x # Note: this will be unmerged in v7 or v8 @@ -122,6 +116,7 @@ BuildRequires: gcc-c++ >= 4.8.0 %if ! 0%{?bootstrap} BuildRequires: systemtap-sdt-devel %endif +BuildRequires: http-parser-devel >= 2.7.0 %if 0%{?epel} BuildRequires: openssl-devel >= 1:1.0.1 @@ -176,10 +171,6 @@ Provides: bundled(c-ares) = %{c_ares_version} # See https://github.com/nodejs/node/commit/d726a177ed59c37cf5306983ed00ecd858cfbbef Provides: bundled(v8) = %{v8_version} -# Node.js and http-parser share an upstream. The http-parser upstream does not -# do releases often and is almost always far behind the bundled version -Provides: bundled(http-parser) = %{http_parser_version} - # Make sure we keep NPM up to date when we update Node.js %if 0%{?epel} # EPEL doesn't support Recommends, so make it strict @@ -249,7 +240,8 @@ The API documentation for the Node.js JavaScript runtime. # remove bundled dependencies that we aren't building %patch1 -p1 -rm -rf deps/icu-small \ +rm -rf deps/http-parser \ + deps/icu-small \ deps/uv \ deps/zlib @@ -289,6 +281,7 @@ export CXXFLAGS="$(echo ${CXXFLAGS} | tr '\n\\' ' ')" --shared-openssl \ --shared-zlib \ --shared-libuv \ + --shared-http-parser \ --with-dtrace \ --with-intl=system-icu \ --openssl-use-def-ca-store @@ -297,6 +290,7 @@ export CXXFLAGS="$(echo ${CXXFLAGS} | tr '\n\\' ' ')" --shared-openssl \ --shared-zlib \ --shared-libuv \ + --shared-http-parser \ --without-dtrace \ --with-intl=system-icu \ --openssl-use-def-ca-store @@ -382,12 +376,17 @@ ln -sf %{_pkgdocdir} %{buildroot}%{_prefix}/lib/node_modules/npm/html ln -sf %{_pkgdocdir}/npm/html %{buildroot}%{_prefix}/lib/node_modules/npm/doc +# 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 +# do with them. +rm -f %{buildroot}/%{_defaultdocdir}/node/lldb_commands.py \ + %{buildroot}/%{_defaultdocdir}/node/lldbinit + %check # 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, '%{v8_version}')" %{buildroot}/%{_bindir}/node -e "require('assert').equal(process.versions.ares.replace(/-DEV$/, ''), '%{c_ares_version}')" -%{buildroot}/%{_bindir}/node -e "require('assert').equal(process.versions.http_parser, '%{http_parser_version}')" # Ensure we have punycode and that the version matches %{buildroot}/%{_bindir}/node -e "require(\"assert\").equal(require(\"punycode\").version, '%{punycode_version}')" @@ -412,7 +411,6 @@ NODE_PATH=%{buildroot}%{_prefix}/lib/node_modules %{buildroot}/%{_bindir}/node - %{_rpmconfigdir}/nodejs_native.req %license LICENSE %doc AUTHORS CHANGELOG.md COLLABORATOR_GUIDE.md GOVERNANCE.md README.md -%doc ROADMAP.md WORKING_GROUPS.md %doc %{_mandir}/man1/node.1* @@ -443,6 +441,12 @@ NODE_PATH=%{buildroot}%{_prefix}/lib/node_modules %{buildroot}/%{_bindir}/node - %{_pkgdocdir}/npm/doc %changelog +* Wed May 10 2017 Stephen Gallagher - 1:6.10.3-1 +- Update to 6.10.3 (LTS) +- https://nodejs.org/en/blog/release/v6.10.3/ +- Stop using the bundled http-parser now that there is an upstream + release with a new-enough version. + * Tue May 09 2017 Zuzana Svetlikova - 1:6.10.2-3 - Bootstrap systemtap-sdt-devel for modularity diff --git a/sources b/sources index d360d40..fee1521 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (node-v6.10.2-stripped.tar.gz) = aee8ebc3a76d34e3b78a785ad2d9d642bcab7a64c53ce214b88269f360256f2b35566eec9484405588a0bd68247cd6ed0855025ed5e8a6405f7ba09c203b5a55 +SHA512 (node-v6.10.3-stripped.tar.gz) = 0750e6c1597c2379df59fafb5945d3af7d59f371c7996c56394f0cac5361627cebde3f6e46468ef76b0eb6d242e77538ec0c8136f75b98c140f1c6235df596bd