diff --git a/PilotGo-plugin-topology-web.tar.gz b/PilotGo-plugin-topology-web.tar.gz index d3bf3359dce195c4edf8013e1292adf514bc1c64..26584b01f4a962fb6527eed3f1dd422256e301c2 100644 Binary files a/PilotGo-plugin-topology-web.tar.gz and b/PilotGo-plugin-topology-web.tar.gz differ diff --git a/PilotGo-plugin-topology.spec b/PilotGo-plugin-topology.spec index dfb4723ed6e55a13ec67e1a663f62f4d7016aab9..f3429b7a9ef61d67cd120cad17b523dd48ce554d 100644 --- a/PilotGo-plugin-topology.spec +++ b/PilotGo-plugin-topology.spec @@ -1,17 +1,18 @@ %define debug_package %{nil} Name: PilotGo-plugin-topology -Version: 1.0.2 +Version: 1.0.3 Release: 1 Summary: system application architecture detection plugin for PilotGo License: MulanPSL-2.0 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 -# cd %{Name}-%{Version}/web/ +# cd %{name}-v%{version}/web # 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 + BuildRequires: systemd BuildRequires: golang @@ -33,17 +34,19 @@ Provides: pilotgo-plugin-topology-agent = %{version}-%{release} PilotGo-plugin-topology agent. %prep -%autosetup -p1 -n %{name}-%{version} +%setup -n %{name}-v%{version} tar -xzvf %{SOURCE1} %build cp -rf dist/* server/handler/ # server -cd server +pushd server GOWORK=off GO111MODULE=on go build -mod=vendor -tags=production -o PilotGo-plugin-topology-server main.go +popd # agent -cd ../agent +pushd agent GOWORK=off GO111MODULE=on go build -mod=vendor -o PilotGo-plugin-topology-agent main.go +popd %install 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 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 -%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/topo_server.yaml +/opt/PilotGo/plugin/topology/server/log %{_unitdir}/PilotGo-plugin-topology-server.service %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/topo_agent.yaml +/opt/PilotGo/plugin/topology/agent/log %{_unitdir}/PilotGo-plugin-topology-agent.service %changelog +* Tue Apr 02 2024 jianxinyu - 1.0.3-1 +- Update package to version 1.0.3 + * Tue Mar 19 2024 wangjunqi - 1.0.2-1 - add custom topo feature diff --git a/PilotGo-plugin-topology-1.0.2.tar.gz b/v1.0.3.tar.gz similarity index 59% rename from PilotGo-plugin-topology-1.0.2.tar.gz rename to v1.0.3.tar.gz index aaaa3a42b1b1a0df1d9ebb4827db250ca21ce05d..5cbcfff1451a5ed463fef685447b1665d8b6c3e5 100644 Binary files a/PilotGo-plugin-topology-1.0.2.tar.gz and b/v1.0.3.tar.gz differ