diff --git a/esbuild_arm-v2.4.0.tar.gz b/esbuild_arm-v2.4.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..38e3c1c24cdb44a0015f7ec30d86286352abbc48 Binary files /dev/null and b/esbuild_arm-v2.4.0.tar.gz differ diff --git a/esbuild_x86-v2.4.0.tar.gz b/esbuild_x86-v2.4.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..72414bf6cedb424a9bd5c936d48ddae105bfe53f Binary files /dev/null and b/esbuild_x86-v2.4.0.tar.gz differ diff --git a/keentune-ui-2.0.0.tar.gz b/keentune-ui-2.0.0.tar.gz deleted file mode 100644 index d515d7a6470d7e6bcbcf82c45ff0d247a3b11344..0000000000000000000000000000000000000000 Binary files a/keentune-ui-2.0.0.tar.gz and /dev/null differ diff --git a/keentune-ui.spec b/keentune-ui.spec index e94554349eb1865eb69d9198011846a1e0f2413c..f9ae57d6bf55dafc6307c41a8b355289489b4e7b 100644 --- a/keentune-ui.spec +++ b/keentune-ui.spec @@ -1,28 +1,62 @@ %define anolis_release 1 -Name: keentune-ui -Version: 2.0.0 +Name: keentune_ui +Version: 2.4.0 Release: %{?anolis_release}%{?dist} -Url: https://gitee.com/anolis/keentune_ui Summary: KeenTune web UI Vendor: Alibaba License: MulanPSLv2 -Source: https://gitee.com/anolis/keentune_ui/repository/archive/%{name}-%{version}.tar.gz +Source0: https://gitee.com/anolis/keentune_ui/archive/refs/tags/v%{version}.tar.gz + +# Recommended using npm 18.0.0 to obtain source1 + +# 1. execute "npm install -g yarn" to install yarn command and configure the Yarn proxy using the following command: "yarn config set registry https://registry.npm.taobao.org" +# 2. access to the keentune_ui source code directory and execute "yarn install". +# 3. Move esbuild out of the node_modules directory (mv ./node_modules/esbuild .), the rest is platform-agnostic. +# 4. Create a compressed file using the command "tar -czf node_modules-v${version}.tar.gz node_modules. +Source1: node_modules-v%{version}.tar.gz + +#Obtain source2 +# 1. After generating node_modules in the X86 environment, make a copy of the esbuild inside it. +# 2. execute "tar -czf esbuild_x86-v${version}.tar.gz esbuild" . +Source2: esbuild_x86-v%{version}.tar.gz + +#Obtain source3 +# 1. After generating node_modules in the aarch64 environment, make a copy of the esbuild inside it. +# 2. execute "tar -czf esbuild_arm-v${version}.tar.gz esbuild" . +Source3: esbuild_arm-v%{version}.tar.gz + BuildArch: noarch +BuildRequires: nodejs >= 18 +BuildRequires: npm >= 1:6.9 + %description KeenTune UI rpm package %prep -%setup -n %{name}-%{version} +%setup -n %{name}-v%{version} +tar -zxf %{SOURCE1} -C ./ +if [[ $(uname -m) == "x86_64" ]]; then + tar -zxvf %{SOURCE2} -C ./node_modules +else + tar -zxvf %{SOURCE3} -C ./node_modules +fi + +%build +node --version +npm --version +npm run build %install mkdir -p ${RPM_BUILD_ROOT}/usr/share/keentune/html mkdir -p ${RPM_BUILD_ROOT}/etc/httpd/conf.d +mkdir -p ${RPM_BUILD_ROOT}/etc/pki/ssl +cp -rf .htaccess build cp -rf build ${RPM_BUILD_ROOT}/usr/share/keentune/html -cp -f keentune.conf ${RPM_BUILD_ROOT}/etc/httpd/conf.d - +cp -f keentune*.conf ${RPM_BUILD_ROOT}/etc/httpd/conf.d/ +cp -f keentune.crt keentune.key ${RPM_BUILD_ROOT}/etc/pki/ssl %clean [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT" @@ -32,33 +66,62 @@ rm -rf $RPM_BUILD_DIR/%{name}-%{version} httpd_conf=%{_sysconfdir}/httpd/conf/httpd.conf if [ -f ${httpd_conf} ]; then sed -i "0,/Require all denied*/s//#Require all denied/" ${httpd_conf} + sed -i "0,/LogLevel warn*/s//LogLevel crit/" ${httpd_conf} + sed -i ':a;N;$!ba;s%CustomLog \"logs/access_log\" combined*%#CustomLog \"logs/access_log\" combined%' ${httpd_conf} + sed -i "s%# LoadModule foo_module modules/mod_foo.so%LoadModule ssl_module modules/mod_ssl.so%" ${httpd_conf} fi %postun httpd_conf=%{_sysconfdir}/httpd/conf/httpd.conf if [ -f ${httpd_conf} ]; then sed -i "0,/#Require all denied*/s//Require all denied/" ${httpd_conf} + sed -i "0,/LogLevel crit*/s//LogLevel warn/" ${httpd_conf} + sed -i "s%LoadModule ssl_module modules/mod_ssl.so%# LoadModule ssl_module modules/mod_ssl.so%" ${httpd_conf} + sed -i ':a;N;$!ba;s%#CustomLog \"logs/access_log\" combined*%CustomLog \"logs/access_log\" combined%' ${httpd_conf} fi - %files %defattr(0644,root,root, 0755) %license LICENSE -%dir %{_sysconfdir}/httpd/conf.d -%dir %{_datadir}/keentune/html +%doc README.md +%{_sysconfdir}/pki/ssl %{_datadir}/keentune/html %{_sysconfdir}/httpd/conf.d %changelog -* Thu Jan 12 2023 Pengtao Jia - 2.0.0 +* Mon Jan 22 2024 Runzhe Wang - 2.4.0-1 +- fix bug + +* Tue Jan 02 2024 happy_orange - 2.3.1-2 +- fix the version number + +* Thu Dec 28 2023 Runzhe Wang - 2.3.1-1 +- update to v2.3.1 + +* Thu May 18 2023 Runzhe Wang - 2.1.0-5 +- fix List of Expert Knowledge + +* Wed May 17 2023 Runzhe Wang - 2.1.0-4 +- code refactor + +* Tue Apr 25 2023 Runzhe Wang - 2.1.0-3 +- update requestments version + +* Thu Apr 06 2023 Runzhe Wang - 2.1.0-2 +- Add: Support HTTPS access + +* Wed Mar 22 2023 Runzhe Wang - 2.1.0-1 +- Add: UI support relative path for profile set and profile delete +- Fix: Other important bug fixes + +* Thu Jan 12 2023 Runzhe Wang - 2.0.0 - Add: Add new and group management knowledge profiles for One-click Expert Tuning -* Thu Oct 27 2022 Pengtao Jia - 1.4.0 +* Thu Oct 27 2022 Runzhe Wang - 1.4.0 - Add: UI support keentune Init Setting - Add: UI support Parameter Auto-tuning - Add: UI support Sensitive parameter identification -* Fri Jul 15 2022 Pengtao Jia - 1.3.0 +* Fri Jul 15 2022 Runzhe Wang - 1.3.0 - Add: UI support One-click Expert Tuning - diff --git a/node_modules-v2.4.0.tar.gz b/node_modules-v2.4.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..69fce7c5c12127393fede078e4bbd574ad1050e1 Binary files /dev/null and b/node_modules-v2.4.0.tar.gz differ diff --git a/v2.4.0.tar.gz b/v2.4.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..7862b1479e8c43fdda587ef38a6ea6434f8ad0ca Binary files /dev/null and b/v2.4.0.tar.gz differ