- Fix migration to openssl-3 (bsc#1205042)

OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs18?expand=0&rev=30
This commit is contained in:
Adam Majer 2022-11-07 14:17:05 +00:00 committed by Git OBS Bridge
parent a5d6117a43
commit 4ae80be344
2 changed files with 14 additions and 1 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon Nov 7 14:00:54 UTC 2022 - Adam Majer <adam.majer@suse.de>
- Fix migration to openssl-3 (bsc#1205042)
-------------------------------------------------------------------
Mon Nov 7 09:05:07 UTC 2022 - Adam Majer <adam.majer@suse.de>

View File

@ -269,7 +269,7 @@ BuildRequires: group(nobody)
BuildRequires: pkgconfig(openssl) >= %{openssl_req_ver}
# require patched openssl library on SLES for nodejs16
%if 0%{?suse_version}
%if 0%{?suse_version} && "%{pkg_version openssl-1_1}" != "~~~"
%if %node_version_number >= 16 && 0%{suse_version} <= 1500 && %{pkg_vcmp openssl-1_1 < '1.1.1e' } && 0%{with openssl_RSA_get0_pss_params}
BuildRequires: openssl-has-RSA_get0_pss_params
Requires: openssl-has-RSA_get0_pss_params
@ -683,6 +683,14 @@ find -name \*~ -print0 -delete
# abnormalities from patching
find \( -name \*.js.orig -or -name \*.md.orig -or -name \*.1.orig \) -delete
# downgrade node-gyp to last version that supports python 3.4 for SLE12
%if 0%{?suse_version} && 0%{?suse_version} < 1500 && 0%{node_version_number} > 16
rm -r deps/npm/node_modules/node-gyp
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