2023-09-01 10:17:12 +08:00
|
|
|
%define debug_package %{nil}
|
|
|
|
|
|
|
|
|
|
Name: PilotGo
|
2024-04-14 10:47:35 +08:00
|
|
|
Version: 2.1.0
|
2024-05-16 15:56:11 +08:00
|
|
|
Release: 2
|
2023-09-01 10:17:12 +08:00
|
|
|
Summary: PilotGo is a plugable operation platform written in go
|
|
|
|
|
License: MulanPSL-2.0
|
|
|
|
|
URL: https://gitee.com/openeuler/PilotGo
|
2024-04-14 10:47:35 +08:00
|
|
|
Source0: https://gitee.com/openeuler/PilotGo/repository/archive/v%{version}.tar.gz
|
|
|
|
|
# tar -xvf Source0
|
|
|
|
|
# cd %{name}-v%{version}/frontend/
|
|
|
|
|
# run 'yarn install and yarn build' in it
|
|
|
|
|
# tar -czvf PilotGo-web.tar.gz ../frontend/dist/
|
2023-09-01 10:17:12 +08:00
|
|
|
Source1: PilotGo-web.tar.gz
|
2024-05-16 15:56:11 +08:00
|
|
|
Patch0: Modify-the-logic-of-deleting-the-machine.patch
|
|
|
|
|
Patch1: Open-extension_btns-permission.patch
|
2024-04-14 10:47:35 +08:00
|
|
|
|
2023-09-01 10:17:12 +08:00
|
|
|
BuildRequires: systemd
|
|
|
|
|
BuildRequires: golang
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
PilotGo is a plugable operation platform written in go.
|
|
|
|
|
|
|
|
|
|
%package server
|
|
|
|
|
Summary: PilotGo server
|
|
|
|
|
Provides: pilotgo-server = %{version}-%{release}
|
|
|
|
|
|
|
|
|
|
%description server
|
|
|
|
|
PilotGo server.
|
|
|
|
|
|
|
|
|
|
%package agent
|
|
|
|
|
Summary: PilotGo agent
|
|
|
|
|
Provides: pilotgo-agent = %{version}-%{release}
|
|
|
|
|
|
|
|
|
|
%description agent
|
|
|
|
|
PilotGo agent.
|
|
|
|
|
|
|
|
|
|
%prep
|
2024-04-14 10:47:35 +08:00
|
|
|
%setup -n %{name}-v%{version}
|
2024-05-16 15:56:11 +08:00
|
|
|
%patch 0 -p1
|
|
|
|
|
%patch 1 -p1
|
2023-09-01 10:17:12 +08:00
|
|
|
tar -xzvf %{SOURCE1}
|
|
|
|
|
|
|
|
|
|
%build
|
2024-04-14 10:47:35 +08:00
|
|
|
cp -rf frontend/dist/* src/app/server/resource
|
2023-09-01 10:17:12 +08:00
|
|
|
# server
|
2024-04-14 10:47:35 +08:00
|
|
|
pushd src/app/server
|
|
|
|
|
GOWORK=off GO111MODULE=on go build -mod=vendor -o PilotGo-server -tags="production" main.go
|
|
|
|
|
popd
|
2023-09-01 10:17:12 +08:00
|
|
|
# agent
|
2024-04-14 10:47:35 +08:00
|
|
|
pushd src/app/agent
|
|
|
|
|
GOWORK=off GO111MODULE=on go build -mod=vendor -o PilotGo-agent main.go
|
|
|
|
|
popd
|
2023-09-01 10:17:12 +08:00
|
|
|
|
|
|
|
|
%install
|
2024-04-14 10:47:35 +08:00
|
|
|
mkdir -p %{buildroot}/opt/PilotGo/{server/log,agent/log}
|
2023-09-01 10:17:12 +08:00
|
|
|
# server
|
2024-04-14 10:47:35 +08:00
|
|
|
install -D -m 0755 src/app/server/PilotGo-server %{buildroot}/opt/PilotGo/server
|
|
|
|
|
install -D -m 0644 src/config_server.yaml.templete %{buildroot}/opt/PilotGo/server/config_server.yaml
|
|
|
|
|
install -D -m 0644 src/user.xlsx.templete %{buildroot}/opt/PilotGo/server/user.xlsx
|
2023-09-01 10:17:12 +08:00
|
|
|
install -D -m 0644 scripts/service/PilotGo-server.service %{buildroot}%{_unitdir}/PilotGo-server.service
|
|
|
|
|
# agent
|
2024-04-14 10:47:35 +08:00
|
|
|
install -D -m 0755 src/app/agent/PilotGo-agent %{buildroot}/opt/PilotGo/agent
|
|
|
|
|
install -D -m 0644 src/config_agent.yaml.templete %{buildroot}/opt/PilotGo/agent/config_agent.yaml
|
2023-09-01 10:17:12 +08:00
|
|
|
install -D -m 0644 scripts/service/PilotGo-agent.service %{buildroot}%{_unitdir}/PilotGo-agent.service
|
|
|
|
|
|
|
|
|
|
%post server
|
|
|
|
|
%systemd_post PilotGo-server.service
|
|
|
|
|
|
|
|
|
|
%preun server
|
|
|
|
|
%systemd_preun PilotGo-server.service
|
|
|
|
|
|
|
|
|
|
%postun server
|
|
|
|
|
%systemd_postun PilotGo-server.service
|
|
|
|
|
|
|
|
|
|
%post agent
|
|
|
|
|
%systemd_post PilotGo-agent.service
|
|
|
|
|
|
|
|
|
|
%preun agent
|
|
|
|
|
%systemd_preun PilotGo-agent.service
|
|
|
|
|
|
|
|
|
|
%postun agent
|
|
|
|
|
%systemd_postun PilotGo-agent.service
|
|
|
|
|
|
|
|
|
|
%files server
|
|
|
|
|
/opt/PilotGo/server/PilotGo-server
|
|
|
|
|
/opt/PilotGo/server/config_server.yaml
|
2024-04-14 10:47:35 +08:00
|
|
|
/opt/PilotGo/server/user.xlsx
|
|
|
|
|
/opt/PilotGo/server/log
|
2023-09-01 10:17:12 +08:00
|
|
|
%{_unitdir}/PilotGo-server.service
|
|
|
|
|
|
|
|
|
|
%files agent
|
|
|
|
|
/opt/PilotGo/agent/PilotGo-agent
|
|
|
|
|
/opt/PilotGo/agent/config_agent.yaml
|
2024-04-14 10:47:35 +08:00
|
|
|
/opt/PilotGo/agent/log
|
2023-09-01 10:17:12 +08:00
|
|
|
%{_unitdir}/PilotGo-agent.service
|
|
|
|
|
|
|
|
|
|
%changelog
|
2024-05-16 15:56:11 +08:00
|
|
|
* Thu May 16 2024 jianxinyu <jiangxinyu@kylinos.cn> - 2.1.0-2
|
|
|
|
|
- Modify the logic of deleting the machine
|
|
|
|
|
- Open extension_btns permission
|
|
|
|
|
|
2024-04-14 10:47:35 +08:00
|
|
|
* Wed Apr 03 2024 jianxinyu <jiangxinyu@kylinos.cn> - 2.1.0-1
|
|
|
|
|
- Update package to version 2.1.0
|
|
|
|
|
|
2023-09-13 14:15:28 +08:00
|
|
|
* Wed Sep 13 2023 wubijie <wubijie@kylinos.cn> - 2.0.1-2
|
|
|
|
|
- Modify the README.md file
|
|
|
|
|
|
2023-09-01 10:17:12 +08:00
|
|
|
* Fri Sep 01 2023 jianxinyu <jiangxinyu@kylinos.cn> - 2.0.1-1
|
|
|
|
|
- Package init
|
|
|
|
|
|