Check bundled WASM sources for version mismatch
Related: rhbz#2151617
This commit is contained in:
parent
342dd00fff
commit
66c5ba25aa
16
nodejs.spec
16
nodejs.spec
@ -404,6 +404,22 @@ rm -rf deps/brotli
|
|||||||
rm -rf deps/v8/third_party/jinja2
|
rm -rf deps/v8/third_party/jinja2
|
||||||
rm -rf tools/inspector_protocol/jinja2
|
rm -rf tools/inspector_protocol/jinja2
|
||||||
|
|
||||||
|
# check for correct versions of dependencies we are bundling
|
||||||
|
check_wasm_dep() {
|
||||||
|
local -r name="$1" source="$2" packagejson="$3"
|
||||||
|
local -r expected_version="$(jq -r '.version' "${packagejson}")"
|
||||||
|
|
||||||
|
if ls "${source}"|grep -q --fixed-strings "${expected_version}"; then
|
||||||
|
printf '%s version matches\n' "${name}" >&2
|
||||||
|
else
|
||||||
|
printf '%s version MISMATCH: %s !~ %s\n' "${name}" "${expected_version}" "${source}" >&2
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
check_wasm_dep cjs-module-lexer '%{SOURCE101}' deps/cjs-module-lexer/package.json
|
||||||
|
check_wasm_dep undici '%{SOURCE111}' deps/undici/src/package.json
|
||||||
|
|
||||||
# Replace any instances of unversioned python' with python3
|
# Replace any instances of unversioned python' with python3
|
||||||
%if %{with python3_fixup}
|
%if %{with python3_fixup}
|
||||||
pathfix.py -i %{__python3} -pn $(find -type f ! -name "*.js")
|
pathfix.py -i %{__python3} -pn $(find -type f ! -name "*.js")
|
||||||
|
Loading…
Reference in New Issue
Block a user