From c4f58779fae7b6d3219a0b0ec7a8a3f4017fad01 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Thu, 28 Apr 2022 11:22:57 -0400 Subject: [PATCH 1/5] nodejs-sources.sh: Fix ICU version detection Signed-off-by: Stephen Gallagher --- nodejs-sources.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nodejs-sources.sh b/nodejs-sources.sh index a8f16ae..b1295ca 100755 --- a/nodejs-sources.sh +++ b/nodejs-sources.sh @@ -122,8 +122,8 @@ tar -zxf node-v${version}.tar.gz rm -rf node-v${version}/deps/openssl tar -zcf node-v${version}-stripped.tar.gz node-v${version} -ICU_MAJOR=$(jq -r '.[0].url' node-v16.15.0/tools/icu/current_ver.dep | sed --expression='s/.*release-\([[:digit:]]\+\)-\([[:digit:]]\+\).*/\1/g') -ICU_MINOR=$(jq -r '.[0].url' node-v16.15.0/tools/icu/current_ver.dep | sed --expression='s/.*release-\([[:digit:]]\+\)-\([[:digit:]]\+\).*/\2/g') +ICU_MAJOR=$(jq -r '.[0].url' node-v${version}/tools/icu/current_ver.dep | sed --expression='s/.*release-\([[:digit:]]\+\)-\([[:digit:]]\+\).*/\1/g') +ICU_MINOR=$(jq -r '.[0].url' node-v${version}/tools/icu/current_ver.dep | sed --expression='s/.*release-\([[:digit:]]\+\)-\([[:digit:]]\+\).*/\2/g') # Download the ICU binary data files rm -Rf icu4c-${ICU_MAJOR}_${ICU_MINOR}-data-bin-*.zip From ebd646b74aa6c41cfa1ba073c2877f4e1bf833ff Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Fri, 29 Apr 2022 10:20:43 -0400 Subject: [PATCH 2/5] -devel packages should explicitly depend on -libs Signed-off-by: Stephen Gallagher --- nodejs.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nodejs.spec b/nodejs.spec index 5a69136..4f14ffb 100644 --- a/nodejs.spec +++ b/nodejs.spec @@ -292,6 +292,7 @@ real-time applications that run across distributed devices. Summary: JavaScript runtime - development headers Group: Development/Languages Requires: %{name}%{?_isa} = %{epoch}:%{nodejs_version}-%{nodejs_release}%{?dist} +Requires: %{name}-libs%{?_isa} = %{epoch}:%{nodejs_version}-%{nodejs_release}%{?dist} Requires: openssl-devel%{?_isa} %if !%{with bundled_zlib} Requires: zlib-devel%{?_isa} @@ -345,6 +346,7 @@ Epoch: %{v8_epoch} Version: %{v8_version} Release: %{v8_release}%{?dist} Requires: %{name}-devel%{?_isa} = %{nodejs_epoch}:%{nodejs_version}-%{nodejs_release}%{?dist} +Requires: %{name}-libs%{?_isa} = %{epoch}:%{nodejs_version}-%{nodejs_release}%{?dist} Conflicts: v8-314-devel %description -n v8-devel From 052736ba797453dbada5a87e0f9544e0255d6742 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Fri, 29 Apr 2022 10:28:43 -0400 Subject: [PATCH 3/5] Fix file conflicts Signed-off-by: Stephen Gallagher --- nodejs.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/nodejs.spec b/nodejs.spec index 4f14ffb..bbf0798 100644 --- a/nodejs.spec +++ b/nodejs.spec @@ -40,7 +40,7 @@ # This is used by both the nodejs package and the npm subpackage that # 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}} @@ -304,6 +304,9 @@ Requires: nodejs-packaging Requires: libuv-devel%{?_isa} %endif +# Make it conflict with any other version of nodejs-devel +Conflicts: %{name}-devel + %description devel Development headers for the Node.js JavaScript runtime. @@ -680,6 +683,10 @@ end %changelog +* Fri Apr 29 2022 Stephen Gallagher - 1:16.15.0-2 +- Fix file conflicts. +- Make dependency on nodejs-libs more strict. + * Wed Apr 27 2022 Stephen Gallagher - 1:16.15.0-1 - Update to Node.js 16.15.0 - Stop carrying full ICU sources now that the binary data is available From 42ee482d060ac91bb54213500914b1b78e2351a0 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Fri, 6 May 2022 09:17:58 -0400 Subject: [PATCH 4/5] Fix incorrect epoch in v8-devel dependency Signed-off-by: Stephen Gallagher --- nodejs.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/nodejs.spec b/nodejs.spec index bbf0798..c48c749 100644 --- a/nodejs.spec +++ b/nodejs.spec @@ -40,7 +40,7 @@ # This is used by both the nodejs package and the npm subpackage that # 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 3 %{?!_pkgdocdir:%global _pkgdocdir %{_docdir}/%{name}-%{version}} @@ -349,7 +349,7 @@ Epoch: %{v8_epoch} Version: %{v8_version} Release: %{v8_release}%{?dist} Requires: %{name}-devel%{?_isa} = %{nodejs_epoch}:%{nodejs_version}-%{nodejs_release}%{?dist} -Requires: %{name}-libs%{?_isa} = %{epoch}:%{nodejs_version}-%{nodejs_release}%{?dist} +Requires: %{name}-libs%{?_isa} = %{nodejs_epoch}:%{nodejs_version}-%{nodejs_release}%{?dist} Conflicts: v8-314-devel %description -n v8-devel @@ -683,6 +683,9 @@ end %changelog +* Fri May 06 2022 Stephen Gallagher - 1:16.15.0-3 +- Fix incorrect epoch in v8-devel dependency + * Fri Apr 29 2022 Stephen Gallagher - 1:16.15.0-2 - Fix file conflicts. - Make dependency on nodejs-libs more strict. From 9a9cbc53e1a133053b6fbb81dffdcd747c3af9d7 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Tue, 17 May 2022 14:12:32 -0400 Subject: [PATCH 5/5] source-script: Install missing packages Signed-off-by: Stephen Gallagher --- nodejs-sources.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nodejs-sources.sh b/nodejs-sources.sh index b1295ca..a71ef37 100755 --- a/nodejs-sources.sh +++ b/nodejs-sources.sh @@ -100,6 +100,12 @@ assign_positional_args 1 "${_positionals[@]}" ### END OF CODE GENERATED BY Argbash (sortof) ### ]) # [ <-- needed because of Argbash +packages=("jq" "wget" "tar" "fedpkg" "grep" "sed") + +rpm -q ${packages[@]} >/dev/null +if [ $? -ne 0 ]; then + sudo dnf -y install ${packages[@]} +fi set -e