Update package to version 1.0.3

This commit is contained in:
jxy_git 2024-04-02 16:46:32 +08:00
parent 1ec44d8521
commit be0a0b2dcd
3 changed files with 35 additions and 17 deletions

Binary file not shown.

View File

@ -1,17 +1,18 @@
%define debug_package %{nil} %define debug_package %{nil}
Name: PilotGo-plugin-topology Name: PilotGo-plugin-topology
Version: 1.0.2 Version: 1.0.3
Release: 1 Release: 1
Summary: system application architecture detection plugin for PilotGo Summary: system application architecture detection plugin for PilotGo
License: MulanPSL-2.0 License: MulanPSL-2.0
URL: https://gitee.com/openeuler/PilotGo-plugin-topology URL: https://gitee.com/openeuler/PilotGo-plugin-topology
Source0: https://gitee.com/src-openeuler/PilotGo-plugin-topology/%{name}-%{version}.tar.gz Source0: https://gitee.com/openeuler/PilotGo-plugin-topology/repository/archive/v%{version}.tar.gz
# tar -xvf Source0 # tar -xvf Source0
# cd %{Name}-%{Version}/web/ # cd %{name}-v%{version}/web
# run 'yarn install and yarn build' in it # run 'yarn install and yarn build' in it
# tar -czvf %{Name}-web.tar.gz dist # tar -czvf %{name}-web.tar.gz dist
Source1: PilotGo-plugin-topology-web.tar.gz Source1: PilotGo-plugin-topology-web.tar.gz
BuildRequires: systemd BuildRequires: systemd
BuildRequires: golang BuildRequires: golang
@ -33,17 +34,19 @@ Provides: pilotgo-plugin-topology-agent = %{version}-%{release}
PilotGo-plugin-topology agent. PilotGo-plugin-topology agent.
%prep %prep
%autosetup -p1 -n %{name}-%{version} %setup -n %{name}-v%{version}
tar -xzvf %{SOURCE1} tar -xzvf %{SOURCE1}
%build %build
cp -rf dist/* server/handler/ cp -rf dist/* server/handler/
# server # server
cd server pushd server
GOWORK=off GO111MODULE=on go build -mod=vendor -tags=production -o PilotGo-plugin-topology-server main.go GOWORK=off GO111MODULE=on go build -mod=vendor -tags=production -o PilotGo-plugin-topology-server main.go
popd
# agent # agent
cd ../agent pushd agent
GOWORK=off GO111MODULE=on go build -mod=vendor -o PilotGo-plugin-topology-agent main.go GOWORK=off GO111MODULE=on go build -mod=vendor -o PilotGo-plugin-topology-agent main.go
popd
%install %install
mkdir -p %{buildroot}/opt/PilotGo/plugin/topology/{server/log,agent/log} mkdir -p %{buildroot}/opt/PilotGo/plugin/topology/{server/log,agent/log}
@ -56,27 +59,42 @@ install -D -m 0755 agent/PilotGo-plugin-topology-agent %{buildroot}/opt/PilotGo/
install -D -m 0644 conf/topo_agent.yaml.templete %{buildroot}/opt/PilotGo/plugin/topology/agent/topo_agent.yaml install -D -m 0644 conf/topo_agent.yaml.templete %{buildroot}/opt/PilotGo/plugin/topology/agent/topo_agent.yaml
install -D -m 0644 scripts/PilotGo-plugin-topology-agent.service %{buildroot}%{_unitdir}/PilotGo-plugin-topology-agent.service install -D -m 0644 scripts/PilotGo-plugin-topology-agent.service %{buildroot}%{_unitdir}/PilotGo-plugin-topology-agent.service
%post server
%systemd_post PilotGo-plugin-topology-server.service
%preun server
%systemd_preun PilotGo-plugin-topology-server.service
%postun server
%systemd_postun PilotGo-plugin-topology-server.service
# Clear all installed files when uninstalling
rm -rf /opt/PilotGo/plugin/topology
%post agent
%systemd_post PilotGo-plugin-topology-agent.service
%preun agent
%systemd_preun PilotGo-plugin-topology-agent.service
%postun agent
%systemd_postun PilotGo-plugin-topology-agent.service
%files server %files server
%dir /opt/PilotGo
%dir /opt/PilotGo/plugin
%dir /opt/PilotGo/plugin/topology
%dir /opt/PilotGo/plugin/topology/server
%dir /opt/PilotGo/plugin/topology/server/log
/opt/PilotGo/plugin/topology/server/PilotGo-plugin-topology-server /opt/PilotGo/plugin/topology/server/PilotGo-plugin-topology-server
/opt/PilotGo/plugin/topology/server/topo_server.yaml /opt/PilotGo/plugin/topology/server/topo_server.yaml
/opt/PilotGo/plugin/topology/server/log
%{_unitdir}/PilotGo-plugin-topology-server.service %{_unitdir}/PilotGo-plugin-topology-server.service
%files agent %files agent
%dir /opt/PilotGo
%dir /opt/PilotGo/plugin
%dir /opt/PilotGo/plugin/topology
%dir /opt/PilotGo/plugin/topology/agent
%dir /opt/PilotGo/plugin/topology/agent/log
/opt/PilotGo/plugin/topology/agent/PilotGo-plugin-topology-agent /opt/PilotGo/plugin/topology/agent/PilotGo-plugin-topology-agent
/opt/PilotGo/plugin/topology/agent/topo_agent.yaml /opt/PilotGo/plugin/topology/agent/topo_agent.yaml
/opt/PilotGo/plugin/topology/agent/log
%{_unitdir}/PilotGo-plugin-topology-agent.service %{_unitdir}/PilotGo-plugin-topology-agent.service
%changelog %changelog
* Tue Apr 02 2024 jianxinyu <jiangxinyu@kylinos.cn> - 1.0.3-1
- Update package to version 1.0.3
* Tue Mar 19 2024 wangjunqi <wangjunqi@kylinos.cn> - 1.0.2-1 * Tue Mar 19 2024 wangjunqi <wangjunqi@kylinos.cn> - 1.0.2-1
- add custom topo feature - add custom topo feature