Update to v13.13.0, add new Provides/Requires, remove icustrip patch, update nodejs-tarball

This commit is contained in:
Zuzana Svetlikova 2020-04-17 11:56:38 +02:00
parent 78f7bb0b35
commit 3f06b08f13
5 changed files with 54 additions and 103 deletions

1
.gitignore vendored
View File

@ -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

View File

@ -1,82 +0,0 @@
From fa4382c4b48ec34ed3259334f2e0f8d2706ffcf9 Mon Sep 17 00:00:00 2001
From: Jonathan MERCIER <jmercier@cng.fr>
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 <sgallagh@redhat.com>
---
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

View File

@ -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

View File

@ -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 <zsvetlik@redhat.com> - 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 <sgallagh@redhat.com> - 1:13.11.0-2
- Fix python3 issue in icustrip.py

View File

@ -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