!16 编译时修改所有node模块依赖中硬编码的默认哈希算法为sha512,不使用md4

From: @lijunwei_kylin 
Reviewed-by: @jxy_git 
Signed-off-by: @jxy_git
This commit is contained in:
openeuler-ci-bot 2023-03-03 07:40:09 +00:00 committed by Gitee
commit 05cdc66695
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -7,7 +7,7 @@
Name: ovirt-web-ui
Version: 1.7.0
Release: 2
Release: 3
Summary: VM Portal for %{product}
License: Apache 2.0
URL: https://github.com/oVirt/ovirt-web-ui
@ -37,6 +37,17 @@ popd
%build
export PATH="%{_datadir}/ovirt-engine-nodejs/bin:%{_datadir}/ovirt-engine-nodejs-modules/bin:${PATH}"
%configure
# Change hardcoded deafult hash algorithm from legacy md4 to sha512
sed -i 's/md4/sha512/g' node_modules/webpack/lib/*.js
sed -i 's/md4/sha512/g' node_modules/webpack/lib/optimize/*.js
sed -i 's/md4/sha512/g' node_modules/copy-webpack-plugin/dist/*.js
sed -i 's/md4/sha512/g' node_modules/terser-webpack-plugin/dist/*.js
sed -i 's/md4/sha512/g' node_modules/loader-utils/lib/index.js
sed -i 's/md4/sha512/g' node_modules/loader-utils/lib/*.js
sed -i 's/md4/sha512/g' node_modules/babel-loader/lib/cache.js
sed -i 's/md4/sha512/g' node_modules/webpack/node_modules/terser-webpack-plugin/dist/index.js
make
%install
@ -51,6 +62,9 @@ make install DESTDIR=%{buildroot}
%{_sysconfdir}/ovirt-web-ui/branding/00-ovirt.brand
%changelog
* Fri Mar 03 2023 lijunwei <lijunwei@kylinos.cn> - 1.7.0-3
- Change hardcoded deafult hash algorithm from legacy md4 to sha512
* Wed May 18 2022 jiangxinyu <jiangxinyu@kylinos.cn> - 1.7.0-2
- Add Simplify-package-exports.patch