diff --git a/scripts/PilotGo-plugin-topology.spec b/scripts/PilotGo-plugin-topology.spec index 369b9fc7ef5648fcde0ce82fe9b0147daec50841..bda4b7da00106c41ddf759f94d760128180ca567 100644 --- a/scripts/PilotGo-plugin-topology.spec +++ b/scripts/PilotGo-plugin-topology.spec @@ -2,12 +2,16 @@ Name: PilotGo-plugin-topology Version: 1.0.1 -Release: 2 +Release: 3 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 - +# tar -xvf Source0 +# cd %{name}-%{version}/web/ +# run 'yarn install and yarn build' in it +# tar -czvf %{name}-web.tar.gz dist +Source1: PilotGo-plugin-topology-web.tar.gz BuildRequires: systemd BuildRequires: golang @@ -30,38 +34,52 @@ PilotGo-plugin-topology agent. %prep %autosetup -p1 -n %{name}-%{version} -#tar -xzvf %{SOURCE1} +tar -xzvf %{SOURCE1} %build +cp -rf dist/* server/handler/ # server cd server -cp -r ../web/dist/* handler/ -GO111MODULE=on go build -mod=vendor -tags=production -o PilotGo-plugin-topology-server main.go +GO111MODULE=on go build -mod=vendor -tags=production -o PilotGo-plugin-topology-server main.go # agent cd ../agent GO111MODULE=on go build -mod=vendor -o PilotGo-plugin-topology-agent main.go %install +mkdir -p %{buildroot}/opt/PilotGo/plugin/topology/{server/log,agent/log} # server -install -D -m 0755 server/PilotGo-plugin-topology-server %{buildroot}/opt/PilotGo/plugin/topology/server/PilotGo-plugin-topology-server +install -D -m 0755 server/PilotGo-plugin-topology-server %{buildroot}/opt/PilotGo/plugin/topology/server install -D -m 0644 conf/config_server.yaml.templete %{buildroot}/opt/PilotGo/plugin/topology/server/config_server.yaml -install -D -m 0644 scripts/PilotGo-plugin-topology-server.service %{buildroot}/usr/lib/systemd/system/PilotGo-plugin-topology-server.service +install -D -m 0644 scripts/PilotGo-plugin-topology-server.service %{buildroot}%{_unitdir}/PilotGo-plugin-topology-server.service # agent -install -D -m 0755 agent/PilotGo-plugin-topology-agent %{buildroot}/opt/PilotGo/plugin/topology/agent/PilotGo-plugin-topology-agent +install -D -m 0755 agent/PilotGo-plugin-topology-agent %{buildroot}/opt/PilotGo/plugin/topology/agent install -D -m 0644 conf/config_agent.yaml.templete %{buildroot}/opt/PilotGo/plugin/topology/agent/config_agent.yaml -install -D -m 0644 scripts/PilotGo-plugin-topology-agent.service %{buildroot}/usr/lib/systemd/system/PilotGo-plugin-topology-agent.service +install -D -m 0644 scripts/PilotGo-plugin-topology-agent.service %{buildroot}%{_unitdir}/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/config_server.yaml -/usr/lib/systemd/system/PilotGo-plugin-topology-server.service +%{_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/config_agent.yaml -/usr/lib/systemd/system/PilotGo-plugin-topology-agent.service +%{_unitdir}/PilotGo-plugin-topology-agent.service %changelog +* Thu Oct 19 2023 jiangxinyu - 1.0.1-3 +- Update spec file specification + * Wed Oct 18 2023 wangjunqi - 1.0.1-2 - change configuration file path to /opt