5 Star 9 Fork 6

anolis/keentune_ui

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
keentune-ui.spec 3.20 KB
一键复制 编辑 原始数据 按行查看 历史
tianweiweiliang 提交于 2023-12-28 14:44 . fix: update to v2.3.1
%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
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/anolis/keentune_ui.git
[email protected]:anolis/keentune_ui.git
anolis
keentune_ui
keentune_ui
master

搜索帮助