From 6dcddc369946554858df21ae0e1bbbb549f390f4 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Tue, 25 Feb 2020 11:22:47 -0500 Subject: [PATCH 01/15] Release Node.js 13.9.0 Signed-off-by: Stephen Gallagher --- .gitignore | 1 + 0001-Disable-running-gyp-on-shared-deps.patch | 22 ++++------ ...Install-both-binaries-and-use-libdir.patch | 8 ++-- nodejs-tarball.sh | 8 +--- nodejs.spec | 43 ++++++++----------- sources | 4 +- 6 files changed, 36 insertions(+), 50 deletions(-) diff --git a/.gitignore b/.gitignore index 4f7c337..ef6e814 100644 --- a/.gitignore +++ b/.gitignore @@ -109,3 +109,4 @@ /node-v10.10.0-stripped.tar.gz /node-v10.11.0-stripped.tar.gz /icu4c-64_2-src.tgz +/icu4c-65_1-src.tgz diff --git a/0001-Disable-running-gyp-on-shared-deps.patch b/0001-Disable-running-gyp-on-shared-deps.patch index ce6ff7a..a20fb72 100644 --- a/0001-Disable-running-gyp-on-shared-deps.patch +++ b/0001-Disable-running-gyp-on-shared-deps.patch @@ -1,29 +1,25 @@ -From 2213cf773b7cf503807397aac79f10d6690a6640 Mon Sep 17 00:00:00 2001 +From 65f5eb67f4691ab535cc00240a00bd33efe29969 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 --- - Makefile | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile -index 05eaa73abbe0c6c651bdf446e3678b92700d57c3..829c4c7c9f8a2132def8767a243cb7160a85d2b2 100644 +index 34cdec7f7767b5152678adaeea10a8cf711fb9a8..3b548907033108831e99e054bc84d3ce91daa25c 100644 --- a/Makefile +++ b/Makefile -@@ -141,9 +141,9 @@ test-code-cache: with-code-cache +@@ -141,7 +141,7 @@ 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 +- deps/uv/uv.gyp deps/llhttp/llhttp.gyp deps/zlib/zlib.gyp \ ++ deps/llhttp/llhttp.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.24.1 diff --git a/0002-Install-both-binaries-and-use-libdir.patch b/0002-Install-both-binaries-and-use-libdir.patch index c0613bf..b3441a7 100644 --- a/0002-Install-both-binaries-and-use-libdir.patch +++ b/0002-Install-both-binaries-and-use-libdir.patch @@ -1,4 +1,4 @@ -From 11512edeb046b64be4daca76f061a3a918251ee0 Mon Sep 17 00:00:00 2001 +From 0b315d55b13d098ce8f3e96d501aeb33152a9e00 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. @@ -13,10 +13,10 @@ Signed-off-by: Elliott Sales de Andrade 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/configure.py b/configure.py -index 6537a62d3954d83927c698db3fb80c9fc05faba7..b9a894bec9e5fd954004bcb423822ca984066dc5 100755 +index beb08df0884f7693b6c07d7fb5e85ae7bdcd1d7d..9e364586d4f79322fe53f41915ed7aad0e23a30d 100755 --- a/configure.py +++ b/configure.py -@@ -571,6 +571,12 @@ parser.add_option('--shared', +@@ -582,6 +582,12 @@ parser.add_option('--shared', help='compile shared library for embedding node in another project. ' + '(This mode is not officially supported for regular applications)') @@ -29,7 +29,7 @@ index 6537a62d3954d83927c698db3fb80c9fc05faba7..b9a894bec9e5fd954004bcb423822ca9 parser.add_option('--without-v8-platform', action='store_true', dest='without_v8_platform', -@@ -1105,6 +1111,7 @@ def configure_node(o): +@@ -1124,6 +1130,7 @@ def configure_node(o): o['variables']['node_no_browser_globals'] = b(options.no_browser_globals) o['variables']['node_shared'] = b(options.shared) diff --git a/nodejs-tarball.sh b/nodejs-tarball.sh index 2aed5cd..dfc8587 100755 --- a/nodejs-tarball.sh +++ b/nodejs-tarball.sh @@ -132,6 +132,8 @@ fedpkg new-sources node-v${version}-stripped.tar.gz icu4c*-src.tgz rm -f node-v${version}.tar.gz +set +e + # Determine the bundled versions of the various packages echo "Bundled software versions" echo "-------------------------" @@ -153,12 +155,6 @@ grep "define ARES_VERSION_MAJOR" node-v${version}/deps/cares/include/ares_versio grep "define ARES_VERSION_MINOR" node-v${version}/deps/cares/include/ares_version.h grep "define ARES_VERSION_PATCH" node-v${version}/deps/cares/include/ares_version.h echo -echo "http-parser" -echo "=========================" -grep "define HTTP_PARSER_VERSION_MAJOR" node-v${version}/deps/http_parser/http_parser.h -grep "define HTTP_PARSER_VERSION_MINOR" node-v${version}/deps/http_parser/http_parser.h -grep "define HTTP_PARSER_VERSION_PATCH" node-v${version}/deps/http_parser/http_parser.h -echo echo "llhttp" echo "=========================" grep "define LLHTTP_VERSION_MAJOR" node-v${version}/deps/llhttp/include/llhttp.h diff --git a/nodejs.spec b/nodejs.spec index 8cd0db6..88af4b3 100644 --- a/nodejs.spec +++ b/nodejs.spec @@ -18,12 +18,12 @@ # feature releases that are only supported for nine months, which is shorter # than a Fedora release lifecycle. %global nodejs_epoch 1 -%global nodejs_major 12 -%global nodejs_minor 16 -%global nodejs_patch 1 +%global nodejs_major 13 +%global nodejs_minor 9 +%global nodejs_patch 0 %global nodejs_abi %{nodejs_major}.%{nodejs_minor} # nodejs_soversion - from NODE_MODULE_VERSION in src/node_version.h -%global nodejs_soversion 72 +%global nodejs_soversion 79 %global nodejs_version %{nodejs_major}.%{nodejs_minor}.%{nodejs_patch} %global nodejs_release %{baserelease} @@ -34,9 +34,9 @@ # Epoch is set to ensure clean upgrades from the old v8 package %global v8_epoch 2 %global v8_major 7 -%global v8_minor 8 -%global v8_build 279 -%global v8_patch 23 +%global v8_minor 9 +%global v8_build 317 +%global v8_patch 25 # 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} @@ -49,12 +49,6 @@ %global c_ares_patch 0 %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 9 -%global http_parser_patch 3 -%global http_parser_version %{http_parser_major}.%{http_parser_minor}.%{http_parser_patch} - # llhttp - from deps/llhttp/include/llhttp.h %global llhttp_major 2 %global llhttp_minor 0 @@ -64,7 +58,7 @@ # libuv - from deps/uv/include/uv/version.h %global libuv_major 1 %global libuv_minor 34 -%global libuv_patch 0 +%global libuv_patch 2 %global libuv_version %{libuv_major}.%{libuv_minor}.%{libuv_patch} # nghttp2 - from deps/nghttp2/lib/includes/nghttp2/nghttp2ver.h @@ -74,8 +68,8 @@ %global nghttp2_version %{nghttp2_major}.%{nghttp2_minor}.%{nghttp2_patch} # ICU - from tools/icu/current_ver.dep -%global icu_major 64 -%global icu_minor 2 +%global icu_major 65 +%global icu_minor 1 %global icu_version %{icu_major}.%{icu_minor} %global icudatadir %{nodejs_datadir}/icudata @@ -98,7 +92,7 @@ %global npm_epoch 1 %global npm_major 6 %global npm_minor 13 -%global npm_patch 4 +%global npm_patch 7 %global npm_version %{npm_major}.%{npm_minor}.%{npm_patch} # In order to avoid needing to keep incrementing the release version for the @@ -148,7 +142,6 @@ BuildRequires: chrpath BuildRequires: libatomic %if %{with bootstrap} -Provides: bundled(http-parser) = %{http_parser_version} Provides: bundled(libuv) = %{libuv_version} Provides: bundled(nghttp2) = %{nghttp2_version} %else @@ -158,15 +151,12 @@ 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. -Provides: bundled(http-parser) = %{http_parser_version} -Provides: bundled(llhttp) = %{llhttp_version} - %endif +# Temporarily bundle llhttp because the upstream doesn't +# provide releases for it. +Provides: bundled(llhttp) = %{llhttp_version} + BuildRequires: openssl-devel >= %{openssl_minimum} Requires: openssl >= %{openssl_minimum} @@ -672,6 +662,9 @@ end %{_pkgdocdir}/npm/docs %changelog +* Tue Feb 25 2020 Stephen Gallagher - 1:13.9.0--1 +- Release Node.js 13.9.0 + * Tue Feb 25 2020 Stephen Gallagher - 1:12.16.1-1 - Update to 12.16.1 - Fixes six regressions introduced in 12.16.0 diff --git a/sources b/sources index a85e8b0..9ac6f21 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (node-v12.16.1-stripped.tar.gz) = 489d337bd522ab48ad9cef99aa2ce3203a05fb05fda0454b805905f699d14da643b51f6b20786995f2aeeb9f468434b60d734e75cec3451e7648da623914c699 -SHA512 (icu4c-64_2-src.tgz) = 5ecb4c230ba45918747a1cf9aef86f555aa07d5b29b1d07ab674e8013f46dfb907a0e9d6945db41155f9dc3012fd94e1152ffc19f61a68b6dfcbabdcb8ae9d78 +SHA512 (node-v13.9.0-stripped.tar.gz) = 6d633b8e42954eba13bbf3b3deb47c7514af04a9f650d9d757f4a3ede85d591a21a4e1330d4b9389e59164bd34883c18ba62b50f4479de0daf6080f166f02138 +SHA512 (icu4c-65_1-src.tgz) = 8f1ef33e1f4abc9a8ee870331c59f01b473d6da1251a19ce403f822f3e3871096f0791855d39c8f20c612fc49cda2c62c06864aa32ddab2dbd186d2b21ce9139 From 7e23cb6a17ac1daf73ef7d65288ea26b9450209f Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Wed, 26 Feb 2020 14:15:00 -0500 Subject: [PATCH 02/15] Build with python3 only Signed-off-by: Stephen Gallagher --- nodejs.spec | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/nodejs.spec b/nodejs.spec index 88af4b3..91254c4 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}} @@ -133,7 +133,6 @@ 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 -BuildRequires: python2-devel BuildRequires: python3-devel BuildRequires: zlib-devel BuildRequires: gcc >= 4.9.4 @@ -335,15 +334,14 @@ The API documentation for the Node.js JavaScript runtime. rm -rf deps/zlib -# Replace any instances of unversioned python' with python2 -pathfix.py -i %{__python2} -pn $(find -type f ! -name "*.js") -find . -type f -exec sed -i "s~/usr\/bin\/env python~/usr/bin/python2~" {} \; -find . -type f -exec sed -i "s~/usr\/bin\/python\W~/usr/bin/python2~" {} \; -sed -i "s~python~python2~" $(find . -type f | grep "gyp$") +# Replace any instances of unversioned python' with python3 +pathfix.py -i %{__python3} -pn $(find -type f ! -name "*.js") +find . -type f -exec sed -i "s~/usr\/bin\/env python~/usr/bin/python3~" {} \; +find . -type f -exec sed -i "s~/usr\/bin\/python\W~/usr/bin/python3~" {} \; +sed -i "s~python~python3~" $(find . -type f | grep "gyp$") sed -i "s~usr\/bin\/python2~usr\/bin\/python3~" ./deps/v8/tools/gen-inlining-tests.py -sed -i "s~usr\/bin\/python.*$~usr\/bin\/python2~" ./deps/v8/tools/mb/mb_unittest.py -find . -type f -exec sed -i "s~python -c~python2 -c~" {} \; -sed -i "s~which('python')~which('python2')~" configure +sed -i "s~usr\/bin\/python.*$~usr\/bin\/python3~" ./deps/v8/tools/mb/mb_unittest.py +find . -type f -exec sed -i "s~python -c~python3 -c~" {} \; %build @@ -377,7 +375,7 @@ export CXXFLAGS="$(echo ${CXXFLAGS} | tr '\n\\' ' ')" export LDFLAGS="%{build_ldflags}" %if %{with bootstrap} -./configure --prefix=%{_prefix} \ +%{__python3} configure.py --prefix=%{_prefix} \ --shared \ --libdir=%{_lib} \ --shared-openssl \ @@ -387,7 +385,7 @@ export LDFLAGS="%{build_ldflags}" --debug-nghttp2 \ --openssl-use-def-ca-store %else -./configure --prefix=%{_prefix} \ +%{__python3} configure.py --prefix=%{_prefix} \ --shared \ --libdir=%{_lib} \ --shared-openssl \ From 30a795152ad27093cb931582a977ee497adf979d Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Wed, 26 Feb 2020 14:16:46 -0500 Subject: [PATCH 03/15] Update changelog and drop package.cfg Signed-off-by: Stephen Gallagher --- nodejs.spec | 5 ++++- package.cfg | 2 -- 2 files changed, 4 insertions(+), 3 deletions(-) delete mode 100644 package.cfg diff --git a/nodejs.spec b/nodejs.spec index 91254c4..690bba2 100644 --- a/nodejs.spec +++ b/nodejs.spec @@ -660,7 +660,10 @@ end %{_pkgdocdir}/npm/docs %changelog -* Tue Feb 25 2020 Stephen Gallagher - 1:13.9.0--1 +* Wed Feb 26 2020 Stephen Gallagher - 1:13.9.0-2 +- Build with python 3 only + +* Tue Feb 25 2020 Stephen Gallagher - 1:13.9.0-1 - Release Node.js 13.9.0 * Tue Feb 25 2020 Stephen Gallagher - 1:12.16.1-1 diff --git a/package.cfg b/package.cfg deleted file mode 100644 index 7ba3a28..0000000 --- a/package.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[koji] -targets = master f32 f31 From aadc802d26c4e7e0950c267a4405a299d26df295 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Mon, 16 Mar 2020 08:11:14 -0400 Subject: [PATCH 04/15] Update to 13.11.0 Signed-off-by: Stephen Gallagher --- nodejs.spec | 7 +++++-- sources | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/nodejs.spec b/nodejs.spec index 690bba2..3fea0ad 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 2 +%global baserelease 1 %{?!_pkgdocdir:%global _pkgdocdir %{_docdir}/%{name}-%{version}} @@ -19,7 +19,7 @@ # than a Fedora release lifecycle. %global nodejs_epoch 1 %global nodejs_major 13 -%global nodejs_minor 9 +%global nodejs_minor 11 %global nodejs_patch 0 %global nodejs_abi %{nodejs_major}.%{nodejs_minor} # nodejs_soversion - from NODE_MODULE_VERSION in src/node_version.h @@ -660,6 +660,9 @@ end %{_pkgdocdir}/npm/docs %changelog +* Mon Mar 16 2020 Stephen Gallagher - 1:13.11.0-1 +- Update to 13.11.0 + * Wed Feb 26 2020 Stephen Gallagher - 1:13.9.0-2 - Build with python 3 only diff --git a/sources b/sources index 9ac6f21..fe91f21 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (node-v13.9.0-stripped.tar.gz) = 6d633b8e42954eba13bbf3b3deb47c7514af04a9f650d9d757f4a3ede85d591a21a4e1330d4b9389e59164bd34883c18ba62b50f4479de0daf6080f166f02138 +SHA512 (node-v13.11.0-stripped.tar.gz) = dca4cc309c1376d141df9ad39ad2f7d4c045806705a78bf77d738c6f60110d0ce0ae3a11408a94dd655f22c0b178aed5422d1d141c3eba9f98d946a588e826f2 SHA512 (icu4c-65_1-src.tgz) = 8f1ef33e1f4abc9a8ee870331c59f01b473d6da1251a19ce403f822f3e3871096f0791855d39c8f20c612fc49cda2c62c06864aa32ddab2dbd186d2b21ce9139 From b5019305341a31658d854767c6edd2f2cfbe6963 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Mon, 16 Mar 2020 08:12:33 -0400 Subject: [PATCH 05/15] Set npmrc to use python3 explicitly Signed-off-by: Stephen Gallagher --- npmrc | 1 + 1 file changed, 1 insertion(+) diff --git a/npmrc b/npmrc index 10437ca..50be1d1 100644 --- a/npmrc +++ b/npmrc @@ -1 +1,2 @@ prefix=/usr/local +python=/usr/bin/python3 From 4fd4157b50b984a02047db408575f97c6b3bed1e Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Tue, 17 Mar 2020 23:24:03 -0400 Subject: [PATCH 06/15] Fix python3 issue in icustrip.py Signed-off-by: Stephen Gallagher --- ...y-fix-use-of-string-and-byte-objects.patch | 82 +++++++++++++++++++ nodejs.spec | 12 ++- 2 files changed, 92 insertions(+), 2 deletions(-) create mode 100644 0003-icustrip.py-fix-use-of-string-and-byte-objects.patch diff --git a/0003-icustrip.py-fix-use-of-string-and-byte-objects.patch b/0003-icustrip.py-fix-use-of-string-and-byte-objects.patch new file mode 100644 index 0000000..fe01f64 --- /dev/null +++ b/0003-icustrip.py-fix-use-of-string-and-byte-objects.patch @@ -0,0 +1,82 @@ +From fa4382c4b48ec34ed3259334f2e0f8d2706ffcf9 Mon Sep 17 00:00:00 2001 +From: Jonathan MERCIER +Date: Tue, 17 Mar 2020 21:18:37 -0400 +Subject: [PATCH 3/3] icustrip.py: fix use of string and byte objects + +Signed-off-by: Stephen Gallagher +--- + tools/icu/icutrim.py | 17 ++++++++--------- + 1 file changed, 8 insertions(+), 9 deletions(-) + +diff --git a/tools/icu/icutrim.py b/tools/icu/icutrim.py +index 25bd99d9cb260da00de9647f9b060790b48af8b2..f857e73bbce298048e407ddbef87f5bc4ac5307a 100755 +--- a/tools/icu/icutrim.py ++++ b/tools/icu/icutrim.py +@@ -11,10 +11,11 @@ + # Usage: + # Use "-h" to get help options. + + from __future__ import print_function + ++import io + import json + import optparse + import os + import re + import shutil +@@ -157,13 +158,12 @@ def runcmd(tool, cmd, doContinue=False): + print("FAILED: %s" % cmd) + sys.exit(1) + return rc + + ## STEP 0 - read in json config +-fi= open(options.filterfile, "rb") +-config=json.load(fi) +-fi.close() ++with io.open(options.filterfile, encoding='utf-8') as fi: ++ config = json.load(fi) + + if options.locales: + config["variables"] = config.get("variables", {}) + config["variables"]["locales"] = config["variables"].get("locales", {}) + config["variables"]["locales"]["only"] = options.locales.split(',') +@@ -283,14 +283,13 @@ for i in range(len(items)): + print("procesing %s" % (tree)) + trees[tree] = { "extension": ".res", "treeprefix": treeprefix, "hasIndex": True } + # read in the resource list for the tree + treelistfile = os.path.join(options.tmpdir,"%s.lst" % tree) + runcmd("iculslocs", "-i %s -N %s -T %s -l > %s" % (outfile, dataname, tree, treelistfile)) +- fi = open(treelistfile, 'rb') +- treeitems = fi.readlines() +- trees[tree]["locs"] = [treeitems[i].strip() for i in range(len(treeitems))] +- fi.close() ++ with io.open(treelistfile, 'r', encoding='utf-8') as fi: ++ treeitems = fi.readlines() ++ trees[tree]["locs"] = [line.strip() for line in treeitems] + if tree not in config.get("trees", {}): + print(" Warning: filter file %s does not mention trees.%s - will be kept as-is" % (options.filterfile, tree)) + else: + queueForRemoval(tree) + +@@ -315,16 +314,16 @@ def removeList(count=0): + print("## Damage control, trying to parse stderr from icupkg..") + fi = open(hackerrfile, 'rb') + erritems = fi.readlines() + fi.close() + #Item zone/zh_Hant_TW.res depends on missing item zone/zh_Hant.res +- pat = re.compile("""^Item ([^ ]+) depends on missing item ([^ ]+).*""") ++ pat = re.compile(bytes(r"^Item ([^ ]+) depends on missing item ([^ ]+).*", 'utf-8')) + for i in range(len(erritems)): + line = erritems[i].strip() + m = pat.match(line) + if m: +- toDelete = m.group(1) ++ toDelete = m.group(1).decode("utf-8") + if(options.verbose > 5): + print("<< %s added to delete" % toDelete) + remove.add(toDelete) + else: + print("ERROR: could not match errline: %s" % line) +-- +2.25.1 + diff --git a/nodejs.spec b/nodejs.spec index 3fea0ad..f2e0afd 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}} @@ -133,6 +133,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 +# Patch to fix python3 issues with icustrip.py +# https://github.com/nodejs/node/pull/31659 +Patch3: 0003-icustrip.py-fix-use-of-string-and-byte-objects.patch + BuildRequires: python3-devel BuildRequires: zlib-devel BuildRequires: gcc >= 4.9.4 @@ -594,7 +598,7 @@ end %{_rpmconfigdir}/fileattrs/nodejs_native.attr %{_rpmconfigdir}/nodejs_native.req -%doc AUTHORS CHANGELOG.md COLLABORATOR_GUIDE.md GOVERNANCE.md README.md +%doc AUTHORS CHANGELOG.md onboarding.md GOVERNANCE.md README.md %doc %{_mandir}/man1/node.1* @@ -655,11 +659,15 @@ end %files docs +%doc doc %dir %{_pkgdocdir} %{_pkgdocdir}/html %{_pkgdocdir}/npm/docs %changelog +* Tue Mar 17 2020 Stephen Gallagher - 1:13.11.0-2 +- Fix python3 issue in icustrip.py + * Mon Mar 16 2020 Stephen Gallagher - 1:13.11.0-1 - Update to 13.11.0 From 78f7bb0b356802538b189b8e87ef13c80629963c Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Mon, 23 Mar 2020 14:31:48 -0400 Subject: [PATCH 07/15] Replace hard-coded gcc and g++ with __cc and __cxx macros Signed-off-by: Stephen Gallagher --- nodejs.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nodejs.spec b/nodejs.spec index f2e0afd..7ba814c 100644 --- a/nodejs.spec +++ b/nodejs.spec @@ -355,8 +355,8 @@ find . -type f -exec sed -i "s~python -c~python3 -c~" {} \; %global optflags %(echo %{optflags} | sed 's/-g /-g1 /') %endif -export CC='gcc' -export CXX='g++' +export CC='%{__cc}' +export CXX='%{__cxx}' # build with debugging symbols and add defines from libuv (#892601) # Node's v8 breaks with GCC 6 because of incorrect usage of methods on From 3f06b08f134f8a69a18e5f4f00a736ed78879de9 Mon Sep 17 00:00:00 2001 From: Zuzana Svetlikova Date: Fri, 17 Apr 2020 11:56:38 +0200 Subject: [PATCH 08/15] Update to v13.13.0, add new Provides/Requires, remove icustrip patch, update nodejs-tarball --- .gitignore | 1 + ...y-fix-use-of-string-and-byte-objects.patch | 82 ------------------- nodejs-tarball.sh | 8 +- nodejs.spec | 62 ++++++++++---- sources | 4 +- 5 files changed, 54 insertions(+), 103 deletions(-) delete mode 100644 0003-icustrip.py-fix-use-of-string-and-byte-objects.patch diff --git a/.gitignore b/.gitignore index ef6e814..2f62f82 100644 --- a/.gitignore +++ b/.gitignore @@ -110,3 +110,4 @@ /node-v10.11.0-stripped.tar.gz /icu4c-64_2-src.tgz /icu4c-65_1-src.tgz +/icu4c-66_1-src.tgz diff --git a/0003-icustrip.py-fix-use-of-string-and-byte-objects.patch b/0003-icustrip.py-fix-use-of-string-and-byte-objects.patch deleted file mode 100644 index fe01f64..0000000 --- a/0003-icustrip.py-fix-use-of-string-and-byte-objects.patch +++ /dev/null @@ -1,82 +0,0 @@ -From fa4382c4b48ec34ed3259334f2e0f8d2706ffcf9 Mon Sep 17 00:00:00 2001 -From: Jonathan MERCIER -Date: Tue, 17 Mar 2020 21:18:37 -0400 -Subject: [PATCH 3/3] icustrip.py: fix use of string and byte objects - -Signed-off-by: Stephen Gallagher ---- - tools/icu/icutrim.py | 17 ++++++++--------- - 1 file changed, 8 insertions(+), 9 deletions(-) - -diff --git a/tools/icu/icutrim.py b/tools/icu/icutrim.py -index 25bd99d9cb260da00de9647f9b060790b48af8b2..f857e73bbce298048e407ddbef87f5bc4ac5307a 100755 ---- a/tools/icu/icutrim.py -+++ b/tools/icu/icutrim.py -@@ -11,10 +11,11 @@ - # Usage: - # Use "-h" to get help options. - - from __future__ import print_function - -+import io - import json - import optparse - import os - import re - import shutil -@@ -157,13 +158,12 @@ def runcmd(tool, cmd, doContinue=False): - print("FAILED: %s" % cmd) - sys.exit(1) - return rc - - ## STEP 0 - read in json config --fi= open(options.filterfile, "rb") --config=json.load(fi) --fi.close() -+with io.open(options.filterfile, encoding='utf-8') as fi: -+ config = json.load(fi) - - if options.locales: - config["variables"] = config.get("variables", {}) - config["variables"]["locales"] = config["variables"].get("locales", {}) - config["variables"]["locales"]["only"] = options.locales.split(',') -@@ -283,14 +283,13 @@ for i in range(len(items)): - print("procesing %s" % (tree)) - trees[tree] = { "extension": ".res", "treeprefix": treeprefix, "hasIndex": True } - # read in the resource list for the tree - treelistfile = os.path.join(options.tmpdir,"%s.lst" % tree) - runcmd("iculslocs", "-i %s -N %s -T %s -l > %s" % (outfile, dataname, tree, treelistfile)) -- fi = open(treelistfile, 'rb') -- treeitems = fi.readlines() -- trees[tree]["locs"] = [treeitems[i].strip() for i in range(len(treeitems))] -- fi.close() -+ with io.open(treelistfile, 'r', encoding='utf-8') as fi: -+ treeitems = fi.readlines() -+ trees[tree]["locs"] = [line.strip() for line in treeitems] - if tree not in config.get("trees", {}): - print(" Warning: filter file %s does not mention trees.%s - will be kept as-is" % (options.filterfile, tree)) - else: - queueForRemoval(tree) - -@@ -315,16 +314,16 @@ def removeList(count=0): - print("## Damage control, trying to parse stderr from icupkg..") - fi = open(hackerrfile, 'rb') - erritems = fi.readlines() - fi.close() - #Item zone/zh_Hant_TW.res depends on missing item zone/zh_Hant.res -- pat = re.compile("""^Item ([^ ]+) depends on missing item ([^ ]+).*""") -+ pat = re.compile(bytes(r"^Item ([^ ]+) depends on missing item ([^ ]+).*", 'utf-8')) - for i in range(len(erritems)): - line = erritems[i].strip() - m = pat.match(line) - if m: -- toDelete = m.group(1) -+ toDelete = m.group(1).decode("utf-8") - if(options.verbose > 5): - print("<< %s added to delete" % toDelete) - remove.add(toDelete) - else: - print("ERROR: could not match errline: %s" % line) --- -2.25.1 - diff --git a/nodejs-tarball.sh b/nodejs-tarball.sh index dfc8587..f5b042b 100755 --- a/nodejs-tarball.sh +++ b/nodejs-tarball.sh @@ -167,7 +167,7 @@ grep "define UV_VERSION_MAJOR" node-v${version}/deps/uv/include/uv/version.h grep "define UV_VERSION_MINOR" node-v${version}/deps/uv/include/uv/version.h grep "define UV_VERSION_PATCH" node-v${version}/deps/uv/include/uv/version.h echo -echo "libuv" +echo "nghttp2" echo "=========================" grep "define NGHTTP2_VERSION " node-v${version}/deps/nghttp2/lib/includes/nghttp2/nghttp2ver.h echo @@ -179,6 +179,12 @@ echo "punycode" echo "=========================" grep "'version'" node-v${version}/lib/punycode.js echo +echo "uvwasi" +echo "=========================" +grep "define UVWASI_VERSION_MAJOR" node-v${version}/deps/uvwasi/include/uvwasi.h +grep "define UVWASI_VERSION_MINOR" node-v${version}/deps/uvwasi/include/uvwasi.h +grep "define UVWASI_VERSION_PATCH" node-v${version}/deps/uvwasi/include/uvwasi.h +echo echo "npm" echo "=========================" grep "\"version\":" node-v${version}/deps/npm/package.json diff --git a/nodejs.spec b/nodejs.spec index 7ba814c..bbf4fba 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 2 +%global baserelease 1 %{?!_pkgdocdir:%global _pkgdocdir %{_docdir}/%{name}-%{version}} @@ -19,7 +19,7 @@ # than a Fedora release lifecycle. %global nodejs_epoch 1 %global nodejs_major 13 -%global nodejs_minor 11 +%global nodejs_minor 13 %global nodejs_patch 0 %global nodejs_abi %{nodejs_major}.%{nodejs_minor} # nodejs_soversion - from NODE_MODULE_VERSION in src/node_version.h @@ -45,7 +45,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 15 +%global c_ares_minor 16 %global c_ares_patch 0 %global c_ares_version %{c_ares_major}.%{c_ares_minor}.%{c_ares_patch} @@ -57,8 +57,8 @@ # libuv - from deps/uv/include/uv/version.h %global libuv_major 1 -%global libuv_minor 34 -%global libuv_patch 2 +%global libuv_minor 35 +%global libuv_patch 0 %global libuv_version %{libuv_major}.%{libuv_minor}.%{libuv_patch} # nghttp2 - from deps/nghttp2/lib/includes/nghttp2/nghttp2ver.h @@ -68,7 +68,7 @@ %global nghttp2_version %{nghttp2_major}.%{nghttp2_minor}.%{nghttp2_patch} # ICU - from tools/icu/current_ver.dep -%global icu_major 65 +%global icu_major 66 %global icu_minor 1 %global icu_version %{icu_major}.%{icu_minor} @@ -91,10 +91,22 @@ # npm - from deps/npm/package.json %global npm_epoch 1 %global npm_major 6 -%global npm_minor 13 -%global npm_patch 7 +%global npm_minor 14 +%global npm_patch 4 %global npm_version %{npm_major}.%{npm_minor}.%{npm_patch} +# uvwasi - from deps/uvwasi/include/uvwasi.h +%global uvwasi_major 0 +%global uvwasi_minor 0 +%global uvwasi_patch 6 +%global uvwasi_version %{uvwasi_major}.%{uvwasi_minor}.%{uvwasi_patch} + +# histogram_c - assumed from timestamps +%global histogram_major 0 +%global histogram_minor 9 +%global histogram_patch 7 +%global histogram_version %{histogram_major}.%{histogram_minor}.%{histogram_patch} + # In order to avoid needing to keep incrementing the release version for the # main package forever, we will just construct one for npm that is guaranteed # to increment safely. Changing this can only be done during an update when the @@ -133,12 +145,9 @@ 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 -# Patch to fix python3 issues with icustrip.py -# https://github.com/nodejs/node/pull/31659 -Patch3: 0003-icustrip.py-fix-use-of-string-and-byte-objects.patch - BuildRequires: python3-devel BuildRequires: zlib-devel +BuildRequires: brotli-devel BuildRequires: gcc >= 4.9.4 BuildRequires: gcc-c++ >= 4.9.4 BuildRequires: chrpath @@ -171,14 +180,14 @@ Requires: nodejs-libs%{?_isa} = %{nodejs_epoch}:%{version}-%{release} # Pull in the full-icu data by default Recommends: nodejs-full-i18n%{?_isa} = %{nodejs_epoch}:%{version}-%{release} -#we need ABI virtual provides where SONAMEs aren't enough/not present so deps -#break when binary compatibility is broken +# we need ABI virtual provides where SONAMEs aren't enough/not present so deps +# break when binary compatibility is broken Provides: nodejs(abi) = %{nodejs_abi} Provides: nodejs(abi%{nodejs_major}) = %{nodejs_abi} Provides: nodejs(v8-abi) = %{v8_abi} Provides: nodejs(v8-abi%{v8_major}) = %{v8_abi} -#this corresponds to the "engine" requirement in package.json +# this corresponds to the "engine" requirement in package.json Provides: nodejs(engine) = %{nodejs_version} # Node.js currently has a conflict with the 'node' package in Fedora @@ -216,6 +225,11 @@ Provides: bundled(v8) = %{v8_version} # an ABI-break, so we'll use the bundled copy. Provides: bundled(icu) = %{icu_version} +# Upstream added new dependencies, but so far they are not available in Fedora +# or there's no option to built it as a shared dependency, so we bundle them +Provides: bundled(uvwasi) = %{uvwasi_version} +Provides: bundled(histogram) = %{histogram_version} + # Make sure we keep NPM up to date when we update Node.js %if 0%{?rhel} < 8 # EPEL doesn't support Recommends, so make it strict @@ -238,6 +252,7 @@ Group: Development/Languages Requires: %{name}%{?_isa} = %{epoch}:%{nodejs_version}-%{nodejs_release}%{?dist} Requires: openssl-devel%{?_isa} Requires: zlib-devel%{?_isa} +Requires: brotli-devel%{?_isa} Requires: nodejs-packaging %if %{with bootstrap} @@ -336,6 +351,7 @@ The API documentation for the Node.js JavaScript runtime. # remove bundled dependencies that we aren't building rm -rf deps/zlib +rm -rf deps/brotli # Replace any instances of unversioned python' with python3 @@ -384,6 +400,7 @@ export LDFLAGS="%{build_ldflags}" --libdir=%{_lib} \ --shared-openssl \ --shared-zlib \ + --shared-brotli \ --without-dtrace \ --with-intl=small-icu \ --debug-nghttp2 \ @@ -394,6 +411,7 @@ export LDFLAGS="%{build_ldflags}" --libdir=%{_lib} \ --shared-openssl \ --shared-zlib \ + --shared-brotli \ --shared-libuv \ --shared-nghttp2 \ --with-dtrace \ @@ -471,12 +489,12 @@ echo 'nodejs(v8-abi%{v8_major}) >= %v8_abi' EOF chmod 0755 %{buildroot}%{_rpmconfigdir}/nodejs_native.req -#install documentation +# install documentation mkdir -p %{buildroot}%{_pkgdocdir}/html cp -pr doc/* %{buildroot}%{_pkgdocdir}/html rm -f %{buildroot}%{_pkgdocdir}/html/nodejs.1 -#node-gyp needs common.gypi too +# node-gyp needs common.gypi too mkdir -p %{buildroot}%{_datadir}/node cp -p common.gypi %{buildroot}%{_datadir}/node @@ -521,7 +539,7 @@ chmod 0755 %{buildroot}%{_prefix}/lib/node_modules/npm/node_modules/node-gyp/bin mkdir -p %{buildroot}%{_sysconfdir} cp %{SOURCE1} %{buildroot}%{_sysconfdir}/npmrc -# NPM upstream expectes it to be in /usr/etc/npmrc, so we'll put a symlink here +# NPM upstream expects it to be in /usr/etc/npmrc, so we'll put a symlink here # This is done in the interests of keeping /usr read-only. mkdir -p %{buildroot}%{_prefix}/etc ln -s %{_sysconfdir}/npmrc %{buildroot}%{_prefix}/etc/npmrc @@ -613,6 +631,7 @@ end %dir %{icudatadir} %{icudatadir}/icudt%{icu_major}*.dat + %files libs %license LICENSE %{_libdir}/libnode.so.%{nodejs_soversion} @@ -664,7 +683,14 @@ end %{_pkgdocdir}/html %{_pkgdocdir}/npm/docs + %changelog +* Wed Apr 15 2020 Zuzana Svetlikova - 1:13.13.0-1 +- Update to 13.13.0 +- Add bundled uvwasi and histogram_c provides +- Add shared brotli dependency +- Remove icustrip.py patch, which was merged in upstream + * Tue Mar 17 2020 Stephen Gallagher - 1:13.11.0-2 - Fix python3 issue in icustrip.py diff --git a/sources b/sources index fe91f21..508983c 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (node-v13.11.0-stripped.tar.gz) = dca4cc309c1376d141df9ad39ad2f7d4c045806705a78bf77d738c6f60110d0ce0ae3a11408a94dd655f22c0b178aed5422d1d141c3eba9f98d946a588e826f2 -SHA512 (icu4c-65_1-src.tgz) = 8f1ef33e1f4abc9a8ee870331c59f01b473d6da1251a19ce403f822f3e3871096f0791855d39c8f20c612fc49cda2c62c06864aa32ddab2dbd186d2b21ce9139 +SHA512 (node-v13.13.0-stripped.tar.gz) = 54f31fc69c614610a412021fdd6cd8327dcd10a716df4500614f6e6a30ba1cb2314a14f3c675b629bf6bad24c82ef66f59d24b74f5677ae8ea4157fb98759fc9 +SHA512 (icu4c-66_1-src.tgz) = 78d87bce65a7bdf7e9a19bda13e353c60846816ff34025f829d1ff15f9ac49aa6061eb192173742be0eca105684ce0e39e95656147afe848520bf60274c8d246 From f27023550f6c1458a8fdf34b089ebdeebde0e99e Mon Sep 17 00:00:00 2001 From: Zuzana Svetlikova Date: Fri, 24 Apr 2020 01:29:26 +0200 Subject: [PATCH 09/15] Update to v14, don't use python sed scripts --- nodejs.spec | 34 +++++++++++++++++++--------------- sources | 2 +- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/nodejs.spec b/nodejs.spec index bbf4fba..89194b5 100644 --- a/nodejs.spec +++ b/nodejs.spec @@ -18,12 +18,12 @@ # feature releases that are only supported for nine months, which is shorter # than a Fedora release lifecycle. %global nodejs_epoch 1 -%global nodejs_major 13 -%global nodejs_minor 13 +%global nodejs_major 14 +%global nodejs_minor 0 %global nodejs_patch 0 %global nodejs_abi %{nodejs_major}.%{nodejs_minor} # nodejs_soversion - from NODE_MODULE_VERSION in src/node_version.h -%global nodejs_soversion 79 +%global nodejs_soversion 83 %global nodejs_version %{nodejs_major}.%{nodejs_minor}.%{nodejs_patch} %global nodejs_release %{baserelease} @@ -33,10 +33,10 @@ # v8 - from deps/v8/include/v8-version.h # Epoch is set to ensure clean upgrades from the old v8 package %global v8_epoch 2 -%global v8_major 7 -%global v8_minor 9 -%global v8_build 317 -%global v8_patch 25 +%global v8_major 8 +%global v8_minor 1 +%global v8_build 307 +%global v8_patch 30 # 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} @@ -57,7 +57,7 @@ # libuv - from deps/uv/include/uv/version.h %global libuv_major 1 -%global libuv_minor 35 +%global libuv_minor 37 %global libuv_patch 0 %global libuv_version %{libuv_major}.%{libuv_minor}.%{libuv_patch} @@ -355,13 +355,13 @@ rm -rf deps/brotli # Replace any instances of unversioned python' with python3 -pathfix.py -i %{__python3} -pn $(find -type f ! -name "*.js") -find . -type f -exec sed -i "s~/usr\/bin\/env python~/usr/bin/python3~" {} \; -find . -type f -exec sed -i "s~/usr\/bin\/python\W~/usr/bin/python3~" {} \; -sed -i "s~python~python3~" $(find . -type f | grep "gyp$") -sed -i "s~usr\/bin\/python2~usr\/bin\/python3~" ./deps/v8/tools/gen-inlining-tests.py -sed -i "s~usr\/bin\/python.*$~usr\/bin\/python3~" ./deps/v8/tools/mb/mb_unittest.py -find . -type f -exec sed -i "s~python -c~python3 -c~" {} \; +# pathfix.py -i %%{__python3} -pn $(find -type f ! -name "*.js") +# find . -type f -exec sed -i "s~/usr\/bin\/env python~/usr/bin/python3~" {} \; +# find . -type f -exec sed -i "s~/usr\/bin\/python\W~/usr/bin/python3~" {} \; +# sed -i "s~python~python3~" $(find . -type f | grep "gyp$") +# sed -i "s~usr\/bin\/python2~usr\/bin\/python3~" ./deps/v8/tools/gen-inlining-tests.py +# sed -i "s~usr\/bin\/python.*$~usr\/bin\/python3~" ./deps/v8/tools/mb/mb_unittest.py +# find . -type f -exec sed -i "s~python -c~python3 -c~" {} \; %build @@ -685,6 +685,10 @@ end %changelog +* Thu Apr 23 2020 zsvetlik@redhat.com - 1:14.0.0-1 +- Update to 14.0.0 +- v14.x should be python3 compatible, so commented out py sed scripts + * Wed Apr 15 2020 Zuzana Svetlikova - 1:13.13.0-1 - Update to 13.13.0 - Add bundled uvwasi and histogram_c provides diff --git a/sources b/sources index 508983c..63c2970 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (node-v13.13.0-stripped.tar.gz) = 54f31fc69c614610a412021fdd6cd8327dcd10a716df4500614f6e6a30ba1cb2314a14f3c675b629bf6bad24c82ef66f59d24b74f5677ae8ea4157fb98759fc9 +SHA512 (node-v14.0.0-stripped.tar.gz) = d8df905a8bddba6635e8d68122d81658037bf5c9b08ccdc6923c1a8d617bef345f8a448fc3738666bfc46c28f59eceef09265336d29d0ce86a263a86ca951bbd SHA512 (icu4c-66_1-src.tgz) = 78d87bce65a7bdf7e9a19bda13e353c60846816ff34025f829d1ff15f9ac49aa6061eb192173742be0eca105684ce0e39e95656147afe848520bf60274c8d246 From 3bf38ee88f5b3cf8f5567bd45552ebdffa2a24fd Mon Sep 17 00:00:00 2001 From: Zuzana Svetlikova Date: Fri, 24 Apr 2020 14:56:30 +0200 Subject: [PATCH 10/15] Keep the fix scripts for Koji --- nodejs.spec | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/nodejs.spec b/nodejs.spec index 89194b5..8df8781 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}} @@ -355,13 +355,13 @@ rm -rf deps/brotli # Replace any instances of unversioned python' with python3 -# pathfix.py -i %%{__python3} -pn $(find -type f ! -name "*.js") -# find . -type f -exec sed -i "s~/usr\/bin\/env python~/usr/bin/python3~" {} \; -# find . -type f -exec sed -i "s~/usr\/bin\/python\W~/usr/bin/python3~" {} \; -# sed -i "s~python~python3~" $(find . -type f | grep "gyp$") -# sed -i "s~usr\/bin\/python2~usr\/bin\/python3~" ./deps/v8/tools/gen-inlining-tests.py -# sed -i "s~usr\/bin\/python.*$~usr\/bin\/python3~" ./deps/v8/tools/mb/mb_unittest.py -# find . -type f -exec sed -i "s~python -c~python3 -c~" {} \; +pathfix.py -i %{__python3} -pn $(find -type f ! -name "*.js") +find . -type f -exec sed -i "s~/usr\/bin\/env python~/usr/bin/python3~" {} \; +find . -type f -exec sed -i "s~/usr\/bin\/python\W~/usr/bin/python3~" {} \; +sed -i "s~python~python3~" $(find . -type f | grep "gyp$") +sed -i "s~usr\/bin\/python2~usr\/bin\/python3~" ./deps/v8/tools/gen-inlining-tests.py +sed -i "s~usr\/bin\/python.*$~usr\/bin\/python3~" ./deps/v8/tools/mb/mb_unittest.py +find . -type f -exec sed -i "s~python -c~python3 -c~" {} \; %build @@ -685,6 +685,9 @@ end %changelog +* Fri Apr 24 2020 zsvetlik@redhat.com - 1:14.0.0-2 +- Keep the fix scripts for Koji + * Thu Apr 23 2020 zsvetlik@redhat.com - 1:14.0.0-1 - Update to 14.0.0 - v14.x should be python3 compatible, so commented out py sed scripts From bb1d7b3d198399b07556fd065e053e613d7e8181 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Wed, 29 Apr 2020 15:08:51 -0400 Subject: [PATCH 11/15] Update to 14.1.0 Signed-off-by: Stephen Gallagher --- nodejs.spec | 19 +++++++++---------- sources | 2 +- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/nodejs.spec b/nodejs.spec index 8df8781..4d06043 100644 --- a/nodejs.spec +++ b/nodejs.spec @@ -3,12 +3,13 @@ # bundle dependencies that are not available as Fedora modules %bcond_with bootstrap +%bcond_without python3_fixup # == Master Relase == # 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 2 +%global baserelease 1 %{?!_pkgdocdir:%global _pkgdocdir %{_docdir}/%{name}-%{version}} @@ -19,7 +20,7 @@ # than a Fedora release lifecycle. %global nodejs_epoch 1 %global nodejs_major 14 -%global nodejs_minor 0 +%global nodejs_minor 1 %global nodejs_patch 0 %global nodejs_abi %{nodejs_major}.%{nodejs_minor} # nodejs_soversion - from NODE_MODULE_VERSION in src/node_version.h @@ -36,7 +37,7 @@ %global v8_major 8 %global v8_minor 1 %global v8_build 307 -%global v8_patch 30 +%global v8_patch 31 # 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} @@ -231,12 +232,7 @@ Provides: bundled(uvwasi) = %{uvwasi_version} Provides: bundled(histogram) = %{histogram_version} # Make sure we keep NPM up to date when we update Node.js -%if 0%{?rhel} < 8 -# EPEL doesn't support Recommends, so make it strict -Requires: npm >= %{npm_epoch}:%{npm_version}-%{npm_release}%{?dist} -%else Recommends: npm >= %{npm_epoch}:%{npm_version}-%{npm_release}%{?dist} -%endif %description @@ -319,9 +315,7 @@ Release: %{npm_release}%{?dist} Obsoletes: npm < 0:3.5.4-6 Provides: npm = %{npm_epoch}:%{npm_version} 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. @@ -355,6 +349,7 @@ rm -rf deps/brotli # Replace any instances of unversioned python' with python3 +%if %{with python3_fixup} pathfix.py -i %{__python3} -pn $(find -type f ! -name "*.js") find . -type f -exec sed -i "s~/usr\/bin\/env python~/usr/bin/python3~" {} \; find . -type f -exec sed -i "s~/usr\/bin\/python\W~/usr/bin/python3~" {} \; @@ -362,6 +357,7 @@ sed -i "s~python~python3~" $(find . -type f | grep "gyp$") sed -i "s~usr\/bin\/python2~usr\/bin\/python3~" ./deps/v8/tools/gen-inlining-tests.py sed -i "s~usr\/bin\/python.*$~usr\/bin\/python3~" ./deps/v8/tools/mb/mb_unittest.py find . -type f -exec sed -i "s~python -c~python3 -c~" {} \; +%endif %build @@ -685,6 +681,9 @@ end %changelog +* Wed Apr 29 2020 Stephen Gallagher - 1:14.1.0-1 +- Update to 14.1.0 + * Fri Apr 24 2020 zsvetlik@redhat.com - 1:14.0.0-2 - Keep the fix scripts for Koji diff --git a/sources b/sources index 63c2970..e3d8954 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (node-v14.0.0-stripped.tar.gz) = d8df905a8bddba6635e8d68122d81658037bf5c9b08ccdc6923c1a8d617bef345f8a448fc3738666bfc46c28f59eceef09265336d29d0ce86a263a86ca951bbd +SHA512 (node-v14.1.0-stripped.tar.gz) = dacdc683cf1e194d8844ece591ff80fa2d92b2841963f090ac377e7036f0edaab7c2912ed3d0e07ddc763088313cd6e3c850da55f31708244f000f9a29da197e SHA512 (icu4c-66_1-src.tgz) = 78d87bce65a7bdf7e9a19bda13e353c60846816ff34025f829d1ff15f9ac49aa6061eb192173742be0eca105684ce0e39e95656147afe848520bf60274c8d246 From da95035952608d54519af98725361816cce4009c Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Wed, 6 May 2020 07:37:03 -0400 Subject: [PATCH 12/15] Update to 14.2.0 Signed-off-by: Stephen Gallagher --- nodejs.spec | 7 +++++-- sources | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/nodejs.spec b/nodejs.spec index 4d06043..b50a7f5 100644 --- a/nodejs.spec +++ b/nodejs.spec @@ -20,7 +20,7 @@ # than a Fedora release lifecycle. %global nodejs_epoch 1 %global nodejs_major 14 -%global nodejs_minor 1 +%global nodejs_minor 2 %global nodejs_patch 0 %global nodejs_abi %{nodejs_major}.%{nodejs_minor} # nodejs_soversion - from NODE_MODULE_VERSION in src/node_version.h @@ -99,7 +99,7 @@ # uvwasi - from deps/uvwasi/include/uvwasi.h %global uvwasi_major 0 %global uvwasi_minor 0 -%global uvwasi_patch 6 +%global uvwasi_patch 8 %global uvwasi_version %{uvwasi_major}.%{uvwasi_minor}.%{uvwasi_patch} # histogram_c - assumed from timestamps @@ -681,6 +681,9 @@ end %changelog +* Wed May 06 2020 Stephen Gallagher - 1:14.2.0-1 +- Update to 14.2.0 + * Wed Apr 29 2020 Stephen Gallagher - 1:14.1.0-1 - Update to 14.1.0 diff --git a/sources b/sources index e3d8954..f3cb90b 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (node-v14.1.0-stripped.tar.gz) = dacdc683cf1e194d8844ece591ff80fa2d92b2841963f090ac377e7036f0edaab7c2912ed3d0e07ddc763088313cd6e3c850da55f31708244f000f9a29da197e +SHA512 (node-v14.2.0-stripped.tar.gz) = ca29fe274359a578ebb6b129e7627458c44c3dd680503e10395fae6e1d8c461991f068e0fa4ff20694dcda6f8657787d9dc4feea77c3c0d9b59f09639013d39e SHA512 (icu4c-66_1-src.tgz) = 78d87bce65a7bdf7e9a19bda13e353c60846816ff34025f829d1ff15f9ac49aa6061eb192173742be0eca105684ce0e39e95656147afe848520bf60274c8d246 From 803540893efd0bb97cae3c19e5ca1ae475ac5911 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Thu, 21 May 2020 17:03:50 -0400 Subject: [PATCH 13/15] Update to 14.3.0 Signed-off-by: Stephen Gallagher --- .gitignore | 1 + nodejs.spec | 7 +++++-- sources | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 2f62f82..271dd29 100644 --- a/.gitignore +++ b/.gitignore @@ -111,3 +111,4 @@ /icu4c-64_2-src.tgz /icu4c-65_1-src.tgz /icu4c-66_1-src.tgz +/icu4c-67_1-src.tgz diff --git a/nodejs.spec b/nodejs.spec index b50a7f5..cdb39ee 100644 --- a/nodejs.spec +++ b/nodejs.spec @@ -69,7 +69,7 @@ %global nghttp2_version %{nghttp2_major}.%{nghttp2_minor}.%{nghttp2_patch} # ICU - from tools/icu/current_ver.dep -%global icu_major 66 +%global icu_major 67 %global icu_minor 1 %global icu_version %{icu_major}.%{icu_minor} @@ -93,7 +93,7 @@ %global npm_epoch 1 %global npm_major 6 %global npm_minor 14 -%global npm_patch 4 +%global npm_patch 5 %global npm_version %{npm_major}.%{npm_minor}.%{npm_patch} # uvwasi - from deps/uvwasi/include/uvwasi.h @@ -681,6 +681,9 @@ end %changelog +* Thu May 21 2020 Stephen Gallagher - 1:4.3.0-1 +- Update to 14.3.0 + * Wed May 06 2020 Stephen Gallagher - 1:14.2.0-1 - Update to 14.2.0 diff --git a/sources b/sources index f3cb90b..3e7ba92 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (node-v14.2.0-stripped.tar.gz) = ca29fe274359a578ebb6b129e7627458c44c3dd680503e10395fae6e1d8c461991f068e0fa4ff20694dcda6f8657787d9dc4feea77c3c0d9b59f09639013d39e -SHA512 (icu4c-66_1-src.tgz) = 78d87bce65a7bdf7e9a19bda13e353c60846816ff34025f829d1ff15f9ac49aa6061eb192173742be0eca105684ce0e39e95656147afe848520bf60274c8d246 +SHA512 (node-v14.3.0-stripped.tar.gz) = 8a62ec66cfef5cab579af0cf9a34e43ccace4bbeeea55a141d536713deffd850612e9385cf1a1b53d1730bf517469c306dcc0608106548a1c19ad055c089eb89 +SHA512 (icu4c-67_1-src.tgz) = 4779f1ce1ca7976f6fad6768853ea8c540da54d11509e3b6cfd864a04b5f2db1c3d4b546387f91ad02fb90804525bc37d2543173f0d705d6ca11dc6f2b7640a8 From d85f19e1bcb0a25d319231a44930e758fbd7e22a Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Fri, 22 May 2020 11:15:45 -0400 Subject: [PATCH 14/15] Bump the version field correctly Signed-off-by: Stephen Gallagher --- nodejs.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodejs.spec b/nodejs.spec index cdb39ee..f1d7d38 100644 --- a/nodejs.spec +++ b/nodejs.spec @@ -20,7 +20,7 @@ # than a Fedora release lifecycle. %global nodejs_epoch 1 %global nodejs_major 14 -%global nodejs_minor 2 +%global nodejs_minor 3 %global nodejs_patch 0 %global nodejs_abi %{nodejs_major}.%{nodejs_minor} # nodejs_soversion - from NODE_MODULE_VERSION in src/node_version.h From 78887f1479112d6d5671c012b841411e2b89758f Mon Sep 17 00:00:00 2001 From: Zuzana Svetlikova Date: Wed, 3 Jun 2020 22:33:35 +0200 Subject: [PATCH 15/15] Security update to 14.4.0 --- nodejs.spec | 37 +++++++++++++++++++------------------ sources | 2 +- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/nodejs.spec b/nodejs.spec index f1d7d38..68f6176 100644 --- a/nodejs.spec +++ b/nodejs.spec @@ -1,6 +1,3 @@ -# uncomment to enable bootstrap mode -# %%global _with_bootstrap 1 - # bundle dependencies that are not available as Fedora modules %bcond_with bootstrap %bcond_without python3_fixup @@ -20,7 +17,7 @@ # than a Fedora release lifecycle. %global nodejs_epoch 1 %global nodejs_major 14 -%global nodejs_minor 3 +%global nodejs_minor 4 %global nodejs_patch 0 %global nodejs_abi %{nodejs_major}.%{nodejs_minor} # nodejs_soversion - from NODE_MODULE_VERSION in src/node_version.h @@ -64,7 +61,7 @@ # nghttp2 - from deps/nghttp2/lib/includes/nghttp2/nghttp2ver.h %global nghttp2_major 1 -%global nghttp2_minor 40 +%global nghttp2_minor 41 %global nghttp2_patch 0 %global nghttp2_version %{nghttp2_major}.%{nghttp2_minor}.%{nghttp2_patch} @@ -149,8 +146,12 @@ Patch2: 0002-Install-both-binaries-and-use-libdir.patch BuildRequires: python3-devel BuildRequires: zlib-devel BuildRequires: brotli-devel -BuildRequires: gcc >= 4.9.4 -BuildRequires: gcc-c++ >= 4.9.4 +BuildRequires: gcc >= 6.3.0 +BuildRequires: gcc-c++ >= 6.3.0 +# needed to generate bundled provides for npm dependencies +# https://src.fedoraproject.org/rpms/nodejs/pull-request/2 +# https://pagure.io/nodejs-packaging/pull-request/10 +BuildRequires: nodejs-packaging BuildRequires: chrpath BuildRequires: libatomic @@ -158,7 +159,6 @@ BuildRequires: libatomic Provides: bundled(libuv) = %{libuv_version} Provides: bundled(nghttp2) = %{nghttp2_version} %else -BuildRequires: nodejs-packaging BuildRequires: systemtap-sdt-devel BuildRequires: libuv-devel >= 1:%{libuv_version} Requires: libuv >= 1:%{libuv_version} @@ -208,7 +208,6 @@ Conflicts: node <= 0.3.2-12 Provides: nodejs-punycode = %{punycode_version} Provides: npm(punycode) = %{punycode_version} - # Node.js has forked c-ares from upstream in an incompatible way, so we need # to carry the bundled version internally. # See https://github.com/nodejs/node/commit/766d063e0578c0f7758c3a965c971763f43fec85 @@ -234,7 +233,6 @@ Provides: bundled(histogram) = %{histogram_version} # Make sure we keep NPM up to date when we update Node.js Recommends: npm >= %{npm_epoch}:%{npm_version}-%{npm_release}%{?dist} - %description Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications. @@ -242,6 +240,7 @@ Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices. + %package devel Summary: JavaScript runtime - development headers Group: Development/Languages @@ -260,6 +259,7 @@ Requires: libuv-devel%{?_isa} %description devel Development headers for the Node.js JavaScript runtime. + %package libs Summary: Node.js and v8 libraries @@ -287,7 +287,6 @@ Libraries to support Node.js and provide stable v8 interfaces. Summary: Non-English locale data for Node.js Requires: %{name}%{?_isa} = %{nodejs_epoch}:%{nodejs_version}-%{nodejs_release}%{?dist} - %description full-i18n Optional data files to provide full-icu support for Node.js. Remove this package to save space if non-English locales are not needed. @@ -303,6 +302,7 @@ Requires: %{name}-devel%{?_isa} = %{nodejs_epoch}:%{nodejs_version}-%{nodejs_rel %description -n v8-devel Development headers for the v8 runtime. + %package -n npm Summary: Node.js Package Manager Epoch: %{npm_epoch} @@ -325,6 +325,7 @@ Provides: npm(npm) = %{npm_version} npm is a package manager for node.js. You can use it to install and publish your node programs. It manages dependencies and does other cool stuff. + %package docs Summary: Node.js API documentation Group: Documentation @@ -347,7 +348,6 @@ The API documentation for the Node.js JavaScript runtime. rm -rf deps/zlib rm -rf deps/brotli - # Replace any instances of unversioned python' with python3 %if %{with python3_fixup} pathfix.py -i %{__python3} -pn $(find -type f ! -name "*.js") @@ -419,7 +419,6 @@ export LDFLAGS="%{build_ldflags}" make BUILDTYPE=Release %{?_smp_mflags} - # Extract the ICU data and convert it to the appropriate endianness pushd deps/ tar xfz %SOURCE3 @@ -511,7 +510,6 @@ rm -rf %{buildroot}%{_prefix}/lib/node_modules/npm/docs ln -sf %{_pkgdocdir}/npm %{buildroot}%{_prefix}/lib/node_modules/npm/docs - # 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. @@ -530,7 +528,6 @@ find %{buildroot}%{_prefix}/lib/node_modules/npm \ 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 - # Drop the NPM default configuration in place mkdir -p %{buildroot}%{_sysconfdir} cp %{SOURCE1} %{buildroot}%{_sysconfdir}/npmrc @@ -543,6 +540,7 @@ ln -s %{_sysconfdir}/npmrc %{buildroot}%{_prefix}/etc/npmrc # Install the full-icu data files install -Dpm0644 -t %{buildroot}%{icudatadir} deps/icu/source/converted/* + %check # 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}')" @@ -681,7 +679,10 @@ end %changelog -* Thu May 21 2020 Stephen Gallagher - 1:4.3.0-1 +* Wed Jun 03 2020 Zuzana Svetlikova - 1:14.4.0-1 +- Security update to 14.4.0 + +* Thu May 21 2020 Stephen Gallagher - 1:14.3.0-1 - Update to 14.3.0 * Wed May 06 2020 Stephen Gallagher - 1:14.2.0-1 @@ -690,10 +691,10 @@ end * Wed Apr 29 2020 Stephen Gallagher - 1:14.1.0-1 - Update to 14.1.0 -* Fri Apr 24 2020 zsvetlik@redhat.com - 1:14.0.0-2 +* Fri Apr 24 2020 Zuzana Svetlikova - 1:14.0.0-2 - Keep the fix scripts for Koji -* Thu Apr 23 2020 zsvetlik@redhat.com - 1:14.0.0-1 +* Thu Apr 23 2020 Zuzana Svetlikova - 1:14.0.0-1 - Update to 14.0.0 - v14.x should be python3 compatible, so commented out py sed scripts diff --git a/sources b/sources index 3e7ba92..3e05b63 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (node-v14.3.0-stripped.tar.gz) = 8a62ec66cfef5cab579af0cf9a34e43ccace4bbeeea55a141d536713deffd850612e9385cf1a1b53d1730bf517469c306dcc0608106548a1c19ad055c089eb89 +SHA512 (node-v14.4.0-stripped.tar.gz) = 28112c451e59c678d8f3bfa58abc06f711a47bddaa4636919facb60e785bbce958a2061434f1579b7e47e4b3c8c57123655a8eb9662d6010a564280d890dfce3 SHA512 (icu4c-67_1-src.tgz) = 4779f1ce1ca7976f6fad6768853ea8c540da54d11509e3b6cfd864a04b5f2db1c3d4b546387f91ad02fb90804525bc37d2543173f0d705d6ca11dc6f2b7640a8