diff --git a/0001-Disable-running-gyp-on-shared-deps.patch b/0001-Disable-running-gyp-on-shared-deps.patch index 79cbc7e..9eaaca4 100644 --- a/0001-Disable-running-gyp-on-shared-deps.patch +++ b/0001-Disable-running-gyp-on-shared-deps.patch @@ -1,14 +1,14 @@ -From def28d29f907050d8bcd94ed2e341d128ffa3fa6 Mon Sep 17 00:00:00 2001 +From 443fef828092b315a207a194f5fe74e52e451996 Mon Sep 17 00:00:00 2001 From: Zuzana Svetlikova Date: Thu, 27 Apr 2017 14:25:42 +0200 -Subject: [PATCH 1/2] Disable running gyp on shared deps +Subject: [PATCH 1/3] Disable running gyp on shared deps --- Makefile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile -index 5fc2bb0c58f5532044a14e9f9595b2316f562726..f1c1545caa220d7442d6d92c49412ec7554de123 100644 +index 3a343301d640bc7fd41e9680c74455bb260a950d..d2b9c13ee3e53d957ed32476e40fb09e41fcfded 100644 --- a/Makefile +++ b/Makefile @@ -121,14 +121,13 @@ with-code-cache: @@ -30,5 +30,5 @@ index 5fc2bb0c58f5532044a14e9f9595b2316f562726..f1c1545caa220d7442d6d92c49412ec7 @if [ -x config.status ]; then \ ./config.status; \ -- -2.19.0 +2.20.1 diff --git a/0002-Suppress-NPM-message-to-run-global-update.patch b/0002-Suppress-NPM-message-to-run-global-update.patch index fd54ee2..ceb2723 100644 --- a/0002-Suppress-NPM-message-to-run-global-update.patch +++ b/0002-Suppress-NPM-message-to-run-global-update.patch @@ -1,7 +1,7 @@ -From ab6c18fd9aba942bee3f2f8030273c846b6025a6 Mon Sep 17 00:00:00 2001 +From 0fd4649d1943f45cb06bda6febdc7ffa7d5859b2 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 +Subject: [PATCH 2/3] Suppress NPM message to run global update Signed-off-by: Stephen Gallagher --- @@ -83,5 +83,5 @@ index 6f76b23828531e7af98a7e3cd7d5abfaac09b40c..98edb6f45fe073e03794a2ae6e7aa7f5 !err && npm.config.get('ham-it-up') && -- -2.19.0 +2.20.1 diff --git a/0003-deps-V8-cherry-pick-d0468de.patch b/0003-deps-V8-cherry-pick-d0468de.patch new file mode 100644 index 0000000..4fe73a7 --- /dev/null +++ b/0003-deps-V8-cherry-pick-d0468de.patch @@ -0,0 +1,118 @@ +From 7108faf1bbcd1e542cd4c34bb57e76432da754f4 Mon Sep 17 00:00:00 2001 +From: Milad Farazmand +Date: Wed, 30 Jan 2019 19:08:06 +0000 +Subject: [PATCH 3/3] deps: V8: cherry-pick d0468de + +Original commit message: + + [heap] Fix StoreBuffer setup. + + - Solves a problem for PPC in a configuration where commit page size + is 64K. https://chromium-review.googlesource.com/c/v8/v8/+/1149515 + - Uses existing VM allocation code to get properly aligned memory. + - Makes sure the size for SetPermissions is a multiple of system page + size. + + Bug:chromium:756050 + + Change-Id: Ib3799ab7a3bb44b0091c234234c1cc47938379c2 + Reviewed-on: https://chromium-review.googlesource.com/1161210 + Commit-Queue: Bill Budge + Reviewed-by: Michael Lippautz + Reviewed-by: Michael Starzinger + Cr-Commit-Position: refs/heads/master@{#54930} + +Refs: https://github.com/v8/v8/commit/d0468dede05fcd57b5a96d0fbfa117a76795fa58 +--- + common.gypi | 2 +- + deps/v8/src/heap/store-buffer.cc | 28 +++++++++++++++++----------- + 2 files changed, 18 insertions(+), 12 deletions(-) + +diff --git a/common.gypi b/common.gypi +index 0a4ed881a5b92514d3df88ffc74555931eb71b7c..1405183bf61dfbab8c8b18a6233a08a7a1ad62ec 100644 +--- a/common.gypi ++++ b/common.gypi +@@ -31,11 +31,11 @@ + # Default to -O0 for debug builds. + 'v8_optimized_debug%': 0, + + # Reset this number to 0 on major V8 upgrades. + # Increment by one for each non-official patch applied to deps/v8. +- 'v8_embedder_string': '-node.12', ++ 'v8_embedder_string': '-node.13', + + # Enable disassembler for `--print-code` v8 options + 'v8_enable_disassembler': 1, + + # Don't bake anything extra into the snapshot. +diff --git a/deps/v8/src/heap/store-buffer.cc b/deps/v8/src/heap/store-buffer.cc +index d73e3235c158df27756eb719643f81822d2bd015..657aa9212a6153f3bd1c44e519a3c8c7064c62b4 100644 +--- a/deps/v8/src/heap/store-buffer.cc ++++ b/deps/v8/src/heap/store-buffer.cc +@@ -28,46 +28,52 @@ StoreBuffer::StoreBuffer(Heap* heap) + insertion_callback = &InsertDuringRuntime; + deletion_callback = &DeleteDuringRuntime; + } + + void StoreBuffer::SetUp() { +- // Allocate 3x the buffer size, so that we can start the new store buffer +- // aligned to 2x the size. This lets us use a bit test to detect the end of +- // the area. ++ const size_t requested_size = kStoreBufferSize * kStoreBuffers; ++ // Allocate buffer memory aligned at least to kStoreBufferSize. This lets us ++ // use a bit test to detect the ends of the buffers. ++ const size_t alignment = ++ std::max(kStoreBufferSize, AllocatePageSize()); ++ void* hint = AlignedAddress(heap_->GetRandomMmapAddr(), alignment); + VirtualMemory reservation; +- if (!AllocVirtualMemory(kStoreBufferSize * 3, heap_->GetRandomMmapAddr(), +- &reservation)) { ++ if (!AlignedAllocVirtualMemory(requested_size, alignment, hint, ++ &reservation)) { + heap_->FatalProcessOutOfMemory("StoreBuffer::SetUp"); + } ++ + Address start = reservation.address(); +- start_[0] = reinterpret_cast(::RoundUp(start, kStoreBufferSize)); ++ const size_t allocated_size = reservation.size(); ++ ++ start_[0] = reinterpret_cast(start); + limit_[0] = start_[0] + (kStoreBufferSize / kPointerSize); + start_[1] = limit_[0]; + limit_[1] = start_[1] + (kStoreBufferSize / kPointerSize); + +- Address* vm_limit = reinterpret_cast(start + reservation.size()); +- ++ // Sanity check the buffers. ++ Address* vm_limit = reinterpret_cast(start + allocated_size); + USE(vm_limit); + for (int i = 0; i < kStoreBuffers; i++) { + DCHECK(reinterpret_cast
(start_[i]) >= reservation.address()); + DCHECK(reinterpret_cast
(limit_[i]) >= reservation.address()); + DCHECK(start_[i] <= vm_limit); + DCHECK(limit_[i] <= vm_limit); + DCHECK_EQ(0, reinterpret_cast
(limit_[i]) & kStoreBufferMask); + } + +- if (!reservation.SetPermissions(reinterpret_cast
(start_[0]), +- kStoreBufferSize * kStoreBuffers, ++ // Set RW permissions only on the pages we use. ++ const size_t used_size = RoundUp(requested_size, CommitPageSize()); ++ if (!reservation.SetPermissions(start, used_size, + PageAllocator::kReadWrite)) { + heap_->FatalProcessOutOfMemory("StoreBuffer::SetUp"); + } + current_ = 0; + top_ = start_[current_]; + virtual_memory_.TakeControl(&reservation); + } + +- + void StoreBuffer::TearDown() { + if (virtual_memory_.IsReserved()) virtual_memory_.Free(); + top_ = nullptr; + for (int i = 0; i < kStoreBuffers; i++) { + start_[i] = nullptr; +-- +2.20.1 + diff --git a/nodejs.spec b/nodejs.spec index 551194c..57c5e7c 100644 --- a/nodejs.spec +++ b/nodejs.spec @@ -1,11 +1,5 @@ %global with_debug 1 -# PowerPC and s390x segfault during Debug builds -# https://github.com/nodejs/node/issues/20642 -%ifarch %{power64} s390x -%global with_debug 0 -%endif - # bundle dependencies that are not available as Fedora modules # %%{!?_with_bootstrap: %%global bootstrap 1} # use bcond for building modules @@ -20,11 +14,11 @@ # than a Fedora release lifecycle. %global nodejs_epoch 1 %global nodejs_major 10 -%global nodejs_minor 13 -%global nodejs_patch 0 +%global nodejs_minor 15 +%global nodejs_patch 2 %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 @@ -39,7 +33,7 @@ # c-ares - from deps/cares/include/ares_version.h # https://github.com/nodejs/node/pull/9332 %global c_ares_major 1 -%global c_ares_minor 14 +%global c_ares_minor 15 %global c_ares_patch 0 %global c_ares_version %{c_ares_major}.%{c_ares_minor}.%{c_ares_patch} @@ -61,7 +55,7 @@ %global nghttp2_patch 0 %global nghttp2_version %{nghttp2_major}.%{nghttp2_minor}.%{nghttp2_patch} -# ICU - from configure.py in the configure_intl() function +# ICU - from tools/icu/current_ver.dep %global icu_major 62 %global icu_minor 1 %global icu_version %{icu_major}.%{icu_minor} @@ -101,6 +95,7 @@ Version: %{nodejs_version} Release: %{nodejs_release}%{?dist} Summary: JavaScript runtime License: MIT and ASL 2.0 and ISC and BSD +Group: Development/Languages URL: http://nodejs.org/ ExclusiveArch: %{nodejs_arches} @@ -123,6 +118,10 @@ Patch1: 0001-Disable-running-gyp-on-shared-deps.patch # This does bad things on an RPM-managed npm. Patch2: 0002-Suppress-NPM-message-to-run-global-update.patch + +# Upstream patch to fix debug generation on PowerPC +Patch3: 0003-deps-V8-cherry-pick-d0468de.patch + BuildRequires: python2-devel BuildRequires: python3-devel BuildRequires: zlib-devel @@ -137,8 +136,8 @@ Provides: bundled(nghttp2) = %{nghttp2_version} %else BuildRequires: nodejs-packaging BuildRequires: systemtap-sdt-devel -BuildRequires: http-parser-devel >= 2.7.0 -Requires: http-parser >= 2.7.0 +BuildRequires: http-parser-devel >= 2.9.0 +Requires: http-parser >= 2.9.0 BuildRequires: libuv-devel >= 1:%{libuv_version} Requires: libuv >= 1:%{libuv_version} BuildRequires: libnghttp2-devel >= %{nghttp2_version} @@ -218,6 +217,7 @@ 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: openssl-devel%{?_isa} Requires: zlib-devel%{?_isa} @@ -257,6 +257,7 @@ your node programs. It manages dependencies and does other cool stuff. %package docs Summary: Node.js API documentation +Group: Documentation BuildArch: noarch # We don't require that the main package be installed to @@ -270,14 +271,11 @@ The API documentation for the Node.js JavaScript runtime. %prep -%setup -q -n node-v%{nodejs_version} +%autosetup -p1 -n node-v%{nodejs_version} # remove bundled dependencies that we aren't building -%patch1 -p1 rm -rf deps/zlib -%patch2 -p1 - # Replace any instances of unversioned python' with python2 pathfix.py -i %{__python2} -pn $(find -type f) find . -type f -exec sed -i "s~/usr\/bin\/env python~/usr/bin/python2~" {} \; @@ -409,6 +407,10 @@ find %{buildroot}%{_prefix}/lib/node_modules/npm \ -executable -type f \ -exec chmod -x {} \; +# The above command is a little overzealous. Add a few permissions back. +chmod 0755 %{buildroot}%{_prefix}/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin/node-gyp +chmod 0755 %{buildroot}%{_prefix}/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js + %check # Fail the build if the versions don't match @@ -491,17 +493,19 @@ end %{_pkgdocdir}/npm/doc %changelog -* Fri Feb 8 2019 Tom Hughes - 1:%{nodejs_major}.%{nodejs_minor}.%{nodejs_patch}-3%{?dist} -- Bump release to fix dependencies - -* Fri Feb 01 2019 Fedora Release Engineering - 1:10.13.0-2.1 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Sun Jan 27 2019 Tom Hughes - 1:10.13.0-2 -- Bump release to fix dependencies - -* Wed Jan 23 2019 Pete Walter - 1:10.13.0-1.1 -- Rebuild for ICU 63 +* Fri Mar 01 2019 Stephen Gallagher - 1:10.15.2-1 +- Update to 10.15.2 +- https://nodejs.org/en/blog/release/v10.15.1/ +- https://nodejs.org/en/blog/release/v10.15.2/ + +* Wed Jan 02 2019 Stephen Gallagher - 1:10.15.0-1 +- Update to 10.15.0 +- https://nodejs.org/en/blog/release/v10.15.0/ + +* Thu Nov 29 2018 Stephen Gallagher - 1:10.14.1-1 +- Update to 10.14.1 +- https://nodejs.org/en/blog/release/v10.14.0/ +- https://nodejs.org/en/blog/release/v10.14.1/ * Thu Nov 01 2018 Stephen Gallagher - 1:10.13.0-1 - Update to 10.13.0 diff --git a/sources b/sources index 3ecaf54..23724af 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (node-v10.13.0-stripped.tar.gz) = 2df0905571768b7f1e37ebb2446ce355f1913e56254ba06d566d7e0f3cb5a104c26a9f2fd9bf449f6910628ed785bf81c04569d6701cc1adf1be9b18cc55f22c +SHA512 (node-v10.15.2-stripped.tar.gz) = f7971cbeb94bc7079bca090546b30608f333a95b3e82c7fccd581a84ebc21496fd5ee595ce66abce0fdf484d6a2f9d818a2d7110833adec8daa73b885108a19f