Adam Majer 2022-09-29 14:55:28 +00:00 committed by Git OBS Bridge
parent f1ec3c07b3
commit b09be45862
2 changed files with 59 additions and 66 deletions

View File

@ -15,17 +15,7 @@
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
###########################################################
#
# WARNING! WARNING! WARNING! WARNING! WARNING! WARNING!
#
# This spec file is generated from a template hosted at
# https://github.com/AdamMajer/nodejs-packaging
#
###########################################################
# Fedora doesn't have rpm-config-SUSE which provides
# ext_man in /usr/lib/rpm/macros.d/macros.obs
%if 0%{?fedora_version}
%define ext_man .gz
%endif
@ -145,8 +135,6 @@ Patch5: sle12_python3_compat.patch
Patch7: manual_configure.patch
Patch13: openssl_binary_detection.patch
## Patches specific to SUSE and openSUSE
Patch100: linker_lto_jobs.patch
# PATCH-FIX-OPENSUSE -- set correct path for dtrace if it is built
@ -172,8 +160,8 @@ Patch200: versioned.patch
Patch304: new_python3.patch
BuildRequires: pkg-config
BuildRequires: fdupes
BuildRequires: pkg-config
BuildRequires: procps
BuildRequires: xz
BuildRequires: zlib-devel
@ -193,10 +181,10 @@ BuildRequires: config(netcfg)
%if 0%{?suse_version} == 1110
# GCC 5 is only available in the SUSE:SLE-11:SP4:Update repository (SDK).
%if %node_version_number >= 8
BuildRequires: gcc5-c++
BuildRequires: gcc5-c++
%define forced_gcc_version 5
%else
BuildRequires: gcc48-c++
BuildRequires: gcc48-c++
%define forced_gcc_version 4.8
%endif
%endif
@ -206,15 +194,15 @@ BuildRequires: gcc48-c++
# for SLE-12:Update targets
%if 0%{?suse_version} == 1315
%if %node_version_number >= 17
BuildRequires: gcc12-c++
BuildRequires: gcc12-c++
%define forced_gcc_version 12
%else
%if %node_version_number >= 14
BuildRequires: gcc9-c++
BuildRequires: gcc9-c++
%define forced_gcc_version 9
%else
%if %node_version_number >= 8
BuildRequires: gcc7-c++
BuildRequires: gcc7-c++
%define forced_gcc_version 7
%endif
%endif
@ -223,7 +211,7 @@ BuildRequires: gcc7-c++
%if 0%{?suse_version} == 1500
%if %node_version_number >= 17
BuildRequires: gcc12-c++
BuildRequires: gcc12-c++
%define forced_gcc_version 12
%endif
%endif
@ -234,7 +222,6 @@ BuildRequires: gcc12-c++
BuildRequires: gcc-c++
%endif
# Python dependencies
%if %node_version_number >= 16
@ -259,8 +246,8 @@ BuildRequires: python
%endif
%if 0%{?suse_version} >= 1500 && %{node_version_number} >= 10
BuildRequires: user(nobody)
BuildRequires: group(nobody)
BuildRequires: user(nobody)
%endif
%if ! 0%{with intree_openssl}
@ -323,7 +310,7 @@ BuildRequires: valgrind
%if %{with libalternatives}
Requires: alts
%else
Requires(postun): %{_sbindir}/update-alternatives
Requires(postun):%{_sbindir}/update-alternatives
%endif
# either for update-alternatives, or their removal
Requires(post): %{_sbindir}/update-alternatives
@ -362,8 +349,8 @@ ExclusiveArch: not_buildable
%endif
%endif
Provides: bundled(uvwasi) = 0.0.13
Provides: bundled(libuv) = 1.43.0
Provides: bundled(uvwasi) = 0.0.13
Provides: bundled(v8) = 10.2.154.15
%if %{with intree_brotli}
Provides: bundled(brotli) = 1.0.9
@ -371,7 +358,6 @@ Provides: bundled(brotli) = 1.0.9
BuildRequires: pkgconfig(libbrotlidec)
%endif
Provides: bundled(llhttp) = 6.0.10
Provides: bundled(ngtcp2) = 0.8.1
@ -390,8 +376,8 @@ provided by npm.
Summary: Development headers for NodeJS 18.x
Group: Development/Languages/NodeJS
Provides: nodejs-devel = %{version}
Requires: npm18 = %{version}
Requires: %{name} = %{version}
Requires: npm18 = %{version}
%description devel
This package provides development headers for Node.js needed for creation
@ -408,12 +394,12 @@ Requires: nodejs-common
Requires: nodejs18 = %{version}
Provides: nodejs-npm = %{version}
Obsoletes: nodejs-npm < 4.0.0
Provides: npm(npm) = 8.19.2
Provides: npm = %{version}
Provides: npm(npm) = 8.19.2
%if 0%{?suse_version} >= 1500
%if %{node_version_number} >= 10
Requires: user(nobody)
Requires: group(nobody)
Requires: user(nobody)
%endif
%endif
Provides: bundled(node-abbrev) = 1.1.1
@ -579,8 +565,8 @@ Provides: bundled(node-spdx-exceptions) = 2.3.0
Provides: bundled(node-spdx-expression-parse) = 3.0.1
Provides: bundled(node-spdx-license-ids) = 3.0.11
Provides: bundled(node-ssri) = 9.0.1
Provides: bundled(node-string_decoder) = 1.3.0
Provides: bundled(node-string-width) = 4.2.3
Provides: bundled(node-string_decoder) = 1.3.0
Provides: bundled(node-strip-ansi) = 6.0.1
Provides: bundled(node-supports-color) = 7.2.0
Provides: bundled(node-tar) = 6.1.11
@ -686,7 +672,6 @@ mkdir deps/npm/node_modules/node-gyp
tar -C deps/npm/node_modules/node-gyp Jxf %{SOURCE5}
%endif
%build
# normalize shebang
%if %{node_version_number} >= 12
@ -996,11 +981,9 @@ make test-ci
%files devel
%defattr(-, root, root)
%{_includedir}/node%{node_version_number}
%if %{node_version_number} < 18
%dir %{_datadir}/systemtap
%dir %{_datadir}/systemtap/tapset
%{_datadir}/systemtap/tapset/node%{node_version_number}.stp
%endif
%files docs
%defattr(-,root,root)
@ -1016,6 +999,7 @@ update-alternatives --remove npm-default %{_bindir}/npm%{node_version_number}
update-alternatives --remove npx-default %{_bindir}/npx%{node_version_number}
%else
%pre
# remove files that are no longer owned but provided by update-alternatives
if ! [ -L %{_mandir}/man1/node.1%{ext_man} ]; then

View File

@ -8,10 +8,10 @@ management via update_alternatives.
This is also important for generation of binary
modules for multiple versions of NodeJS
Index: node-v18.9.0/Makefile
Index: node-v18.10.0/Makefile
===================================================================
--- node-v18.9.0.orig/Makefile
+++ node-v18.9.0/Makefile
--- node-v18.10.0.orig/Makefile
+++ node-v18.10.0/Makefile
@@ -55,7 +55,7 @@ BUILDTYPE_LOWER := $(shell echo $(BUILDT
EXEEXT := $(shell $(PYTHON) -c \
"import sys; print('.exe' if sys.platform == 'win32' else '')")
@ -21,10 +21,10 @@ Index: node-v18.9.0/Makefile
NODE ?= ./$(NODE_EXE)
NODE_G_EXE = node_g$(EXEEXT)
NPM ?= ./deps/npm/bin/npm-cli.js
Index: node-v18.9.0/tools/install.py
Index: node-v18.10.0/tools/install.py
===================================================================
--- node-v18.9.0.orig/tools/install.py
+++ node-v18.9.0/tools/install.py
--- node-v18.10.0.orig/tools/install.py
+++ node-v18.10.0/tools/install.py
@@ -86,7 +86,7 @@ def uninstall(paths, dst):
try_remove(path, dst)
@ -67,7 +67,16 @@ Index: node-v18.9.0/tools/install.py
output_prefix = 'out/Release/'
if is_windows:
@@ -189,7 +189,7 @@ def files(action):
@@ -186,7 +186,7 @@ def files(action):
action(['out/Release/node.d'], 'lib/dtrace/node.d')
# behave similarly for systemtap
- action(['src/node.stp'], 'share/systemtap/tapset/')
+ action(['src/node.stp'], 'share/systemtap/tapset/node18.stp')
action(['deps/v8/tools/gdbinit'], 'share/doc/node/')
action(['deps/v8/tools/lldb_commands.py'], 'share/doc/node/')
@@ -194,7 +194,7 @@ def files(action):
if 'freebsd' in sys.platform or 'openbsd' in sys.platform:
action(['doc/node.1'], 'man/man1/')
else:
@ -76,7 +85,7 @@ Index: node-v18.9.0/tools/install.py
if 'true' == variables.get('node_install_npm'):
npm_files(action)
@@ -276,28 +276,28 @@ def headers(action):
@@ -281,28 +281,28 @@ def headers(action):
'src/node_buffer.h',
'src/node_object_wrap.h',
'src/node_version.h',
@ -113,10 +122,10 @@ Index: node-v18.9.0/tools/install.py
if sys.platform == 'zos':
zoslibinc = os.environ.get('ZOSLIB_INCLUDES')
Index: node-v18.9.0/doc/node.1
Index: node-v18.10.0/doc/node.1
===================================================================
--- node-v18.9.0.orig/doc/node.1
+++ node-v18.9.0/doc/node.1
--- node-v18.10.0.orig/doc/node.1
+++ node-v18.10.0/doc/node.1
@@ -30,24 +30,24 @@
.Dt NODE 1
.
@ -146,10 +155,10 @@ Index: node-v18.9.0/doc/node.1
.Op Fl -v8-options
.
.\"======================================================================
Index: node-v18.9.0/src/node.stp
Index: node-v18.10.0/src/node.stp
===================================================================
--- node-v18.9.0.orig/src/node.stp
+++ node-v18.9.0/src/node.stp
--- node-v18.10.0.orig/src/node.stp
+++ node-v18.10.0/src/node.stp
@@ -19,7 +19,7 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
@ -222,10 +231,10 @@ Index: node-v18.9.0/src/node.stp
{
scavenge = 1 << 0;
compact = 1 << 1;
Index: node-v18.9.0/deps/npm/man/man1/npm.1
Index: node-v18.10.0/deps/npm/man/man1/npm.1
===================================================================
--- node-v18.9.0.orig/deps/npm/man/man1/npm.1
+++ node-v18.9.0/deps/npm/man/man1/npm.1
--- node-v18.10.0.orig/deps/npm/man/man1/npm.1
+++ node-v18.10.0/deps/npm/man/man1/npm.1
@@ -1,6 +1,6 @@
.TH "NPM" "1" "September 2022" "" ""
.SH "NAME"
@ -297,10 +306,10 @@ Index: node-v18.9.0/deps/npm/man/man1/npm.1
+npm18 help publish
.RE
Index: node-v18.9.0/src/node_main.cc
Index: node-v18.10.0/src/node_main.cc
===================================================================
--- node-v18.9.0.orig/src/node_main.cc
+++ node-v18.9.0/src/node_main.cc
--- node-v18.10.0.orig/src/node_main.cc
+++ node-v18.10.0/src/node_main.cc
@@ -122,6 +122,7 @@ int main(int argc, char* argv[]) {
#endif
// Disable stdio buffering, it interacts poorly with printf()
@ -309,10 +318,10 @@ Index: node-v18.9.0/src/node_main.cc
setvbuf(stdout, nullptr, _IONBF, 0);
setvbuf(stderr, nullptr, _IONBF, 0);
return node::Start(argc, argv);
Index: node-v18.9.0/tools/test.py
Index: node-v18.10.0/tools/test.py
===================================================================
--- node-v18.9.0.orig/tools/test.py
+++ node-v18.9.0/tools/test.py
--- node-v18.10.0.orig/tools/test.py
+++ node-v18.10.0/tools/test.py
@@ -948,7 +948,7 @@ class Context(object):
if self.vm is not None:
return self.vm
@ -322,10 +331,10 @@ Index: node-v18.9.0/tools/test.py
else:
name = 'out/%s.%s/node' % (arch, mode)
Index: node-v18.9.0/node.gyp
Index: node-v18.10.0/node.gyp
===================================================================
--- node-v18.9.0.orig/node.gyp
+++ node-v18.9.0/node.gyp
--- node-v18.10.0.orig/node.gyp
+++ node-v18.10.0/node.gyp
@@ -24,8 +24,8 @@
'node_use_openssl%': 'true',
'node_shared_openssl%': 'false',
@ -337,10 +346,10 @@ Index: node-v18.9.0/node.gyp
'node_intermediate_lib_type%': 'static_library',
'node_builtin_modules_path%': '',
# We list the deps/ files out instead of globbing them in js2c.py since we
Index: node-v18.9.0/deps/npm/man/man1/npx.1
Index: node-v18.10.0/deps/npm/man/man1/npx.1
===================================================================
--- node-v18.9.0.orig/deps/npm/man/man1/npx.1
+++ node-v18.9.0/deps/npm/man/man1/npx.1
--- node-v18.10.0.orig/deps/npm/man/man1/npx.1
+++ node-v18.10.0/deps/npm/man/man1/npx.1
@@ -5,10 +5,10 @@
.P
.RS 2