代码拉取完成,页面将自动刷新
%define anolis_release 5
Name: keentune-ui
Version: 2.1.0
Release: %{?anolis_release}%{?dist}
Url: https://gitee.com/anolis/keentune_ui
Summary: KeenTune web UI
Vendor: Alibaba
License: MulanPSLv2
Source0: %{name}-%{version}.tar.gz
Source1: node_modules.tar.gz
Source2: esbuild_x86.tar.gz
Source3: esbuild_arm.tar.gz
BuildArch: noarch
BuildRequires: nodejs
BuildRequires: npm
%description
KeenTune UI rpm package
%prep
%setup -n %{name}-%{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
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.crt keentune.key ${RPM_BUILD_ROOT}/etc/pki/ssl
%clean
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
rm -rf $RPM_BUILD_DIR/%{name}-%{version}
%post
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
%doc README.md
%{_sysconfdir}/pki/ssl
%{_datadir}/keentune/html
%{_sysconfdir}/httpd/conf.d
%changelog
* Thu May 18 2023 Runzhe Wang <[email protected]> - 2.1.0-5
- fix List of Expert Knowledge
* Wed May 17 2023 Runzhe Wang <[email protected]> - 2.1.0-4
- code refactor
* Tue Apr 25 2023 Runzhe Wang <[email protected]> - 2.1.0-3
- update requestments version
* Thu Apr 06 2023 Runzhe Wang <[email protected]> - 2.1.0-2
- Add: Support HTTPS access
* Wed Mar 22 2023 Runzhe Wang <[email protected]> - 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 <[email protected]> - 2.0.0
- Add: Add new and group management knowledge profiles for One-click Expert Tuning
* Thu Oct 27 2022 Runzhe Wang <[email protected]> - 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 Runzhe Wang <[email protected]> - 1.3.0
- Add: UI support One-click Expert Tuning
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。