From 5e958a40556eac24c47dfcc63e82613cb836c2c9 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Fri, 2 Jul 2021 09:25:27 -0400 Subject: [PATCH] Re-add support for v8 development headers Signed-off-by: Stephen Gallagher --- 0001-Disable-running-gyp-on-shared-deps.patch | 2 +- ...Install-both-binaries-and-use-libdir.patch | 2 +- ...lude-minimal-V8-headers-in-distribut.patch | 58 +++++++++++++++++++ nodejs.spec | 10 +++- 4 files changed, 68 insertions(+), 4 deletions(-) create mode 100644 0003-Revert-build-include-minimal-V8-headers-in-distribut.patch diff --git a/0001-Disable-running-gyp-on-shared-deps.patch b/0001-Disable-running-gyp-on-shared-deps.patch index bf7e87b..5fae389 100644 --- a/0001-Disable-running-gyp-on-shared-deps.patch +++ b/0001-Disable-running-gyp-on-shared-deps.patch @@ -1,7 +1,7 @@ From dcc5e9723343bb540ed678e6e3cb93d9a6f00391 Mon Sep 17 00:00:00 2001 From: Zuzana Svetlikova Date: Fri, 17 Apr 2020 12:59:44 +0200 -Subject: [PATCH 1/2] Disable running gyp on shared deps +Subject: [PATCH 1/3] Disable running gyp on shared deps --- Makefile | 2 +- diff --git a/0002-Install-both-binaries-and-use-libdir.patch b/0002-Install-both-binaries-and-use-libdir.patch index 153a988..676b6fe 100644 --- a/0002-Install-both-binaries-and-use-libdir.patch +++ b/0002-Install-both-binaries-and-use-libdir.patch @@ -1,7 +1,7 @@ From 8506b9411c41dd525249f6b728fd9b91131e8c7c Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Tue, 19 Mar 2019 23:22:40 -0400 -Subject: [PATCH 2/2] Install both binaries and use libdir. +Subject: [PATCH 2/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. diff --git a/0003-Revert-build-include-minimal-V8-headers-in-distribut.patch b/0003-Revert-build-include-minimal-V8-headers-in-distribut.patch new file mode 100644 index 0000000..6a8be05 --- /dev/null +++ b/0003-Revert-build-include-minimal-V8-headers-in-distribut.patch @@ -0,0 +1,58 @@ +From 804555d0bf0014393883df59c471b42ed11d1f9e Mon Sep 17 00:00:00 2001 +From: Stephen Gallagher +Date: Fri, 2 Jul 2021 09:22:28 -0400 +Subject: [PATCH 3/3] Revert "build: include minimal V8 headers in + distribution" + +This reverts commit 38f32386c138073c6a020ce79085daea15e7b800. +--- + tools/install.py | 17 ++++++----------- + 1 file changed, 6 insertions(+), 11 deletions(-) + +diff --git a/tools/install.py b/tools/install.py +index b3ef4541999126c512e3811881388e0ec8d401c4..7c0b1ba999cdeacd3431b5334d650677754a9752 100755 +--- a/tools/install.py ++++ b/tools/install.py +@@ -152,21 +152,16 @@ def files(action): + if 'true' == variables.get('node_install_npm'): npm_files(action) + + headers(action) + + def headers(action): +- def wanted_v8_headers(files_arg, dest): +- v8_headers = [ +- 'deps/v8/include/cppgc/common.h', +- 'deps/v8/include/v8.h', +- 'deps/v8/include/v8-internal.h', +- 'deps/v8/include/v8-platform.h', +- 'deps/v8/include/v8-profiler.h', +- 'deps/v8/include/v8-version.h', +- 'deps/v8/include/v8config.h', ++ def ignore_inspector_headers(files_arg, dest): ++ inspector_headers = [ ++ 'deps/v8/include/v8-inspector.h', ++ 'deps/v8/include/v8-inspector-protocol.h' + ] +- files_arg = [name for name in files_arg if name in v8_headers] ++ files_arg = [name for name in files_arg if name not in inspector_headers] + action(files_arg, dest) + + action([ + 'common.gypi', + 'config.gypi', +@@ -182,11 +177,11 @@ def headers(action): + + # Add the expfile that is created on AIX + if sys.platform.startswith('aix'): + action(['out/Release/node.exp'], 'include/node/') + +- subdir_files('deps/v8/include', 'include/node/', wanted_v8_headers) ++ subdir_files('deps/v8/include', 'include/node/', ignore_inspector_headers) + + if 'false' == variables.get('node_shared_libuv'): + subdir_files('deps/uv/include', 'include/node/', action) + + if 'true' == variables.get('node_use_openssl') and \ +-- +2.31.1 + diff --git a/nodejs.spec b/nodejs.spec index cc64321..449c8f6 100644 --- a/nodejs.spec +++ b/nodejs.spec @@ -8,7 +8,7 @@ # This is used by both the nodejs package and the npm subpackage thar # 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 2 %{?!_pkgdocdir:%global _pkgdocdir %{_docdir}/%{name}-%{version}} @@ -145,6 +145,10 @@ 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 +# Upstream no longer ships all of the v8 headers, but Fedora has packages +# that require them. +Patch3: 0003-Revert-build-include-minimal-V8-headers-in-distribut.patch + BuildRequires: make BuildRequires: python3-devel BuildRequires: python3-setuptools @@ -665,11 +669,13 @@ end %changelog +* Fri Jul 02 2021 Stephen Gallagher - 1:16.4.1-2 +- Re-add support for v8 development headers + * Thu Jul 01 2021 Stephen Gallagher - 1:16.4.1-1 - Update to 16.4.1 - https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V16.md#16.4.1 - * Wed Jun 23 2021 Stephen Gallagher - 1:16.4.0-1 - Update to 16.4.0 - https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V16.md#16.4.0