diff --git a/gala-gopher-2.0.1.tar.gz b/gala-gopher-2.0.2.tar.gz similarity index 77% rename from gala-gopher-2.0.1.tar.gz rename to gala-gopher-2.0.2.tar.gz index 4964a4ff7bd0990219a8739c7cf5eadc51644459..2c4bfc223091a385160ea2bfe49bccfa49292cc5 100644 Binary files a/gala-gopher-2.0.1.tar.gz and b/gala-gopher-2.0.2.tar.gz differ diff --git a/gala-gopher.spec b/gala-gopher.spec index 7e5529f1d993fed7b65680b515ca9c7892117b44..a9869acd83d88e38ac2cebc6d491b2cda3fec098 100644 --- a/gala-gopher.spec +++ b/gala-gopher.spec @@ -1,5 +1,5 @@ -#needsrootforbuild %define __os_install_post %{nil} +%define gopher_state_dir %{_rundir}/gala_gopher %define without_baseinfo 0 %define without_virt 0 @@ -19,6 +19,8 @@ %define without_ksli 0 %define without_container 0 %define without_sermant 1 +%define without_sli 0 +%define without_flowtracer 1 %define disable_report_event 0 %define disable_kafka_channel 0 @@ -27,7 +29,7 @@ Summary: Intelligent ops toolkit for openEuler Name: gala-gopher -Version: 2.0.1 +Version: 2.0.2 Release: 1 License: Mulan PSL v2 URL: https://gitee.com/openeuler/gala-gopher @@ -82,7 +84,7 @@ Requires: libcurl Requires: python3-psycopg2 python3-yaml net-tools %endif %if !0%{?without_container} -Requires: cadvisor python3-libconf python3-requests net-tools util-linux +Requires: cadvisor python3-requests util-linux %endif %if !0%{?without_postgre_sli} Requires: iproute @@ -110,7 +112,7 @@ BUILD_OPTS=( -DENABLE_FLAMEGRAPH=%[0%{?without_flamegraph}?0:1] -DENABLE_L7=%[0%{?without_l7}?0:1] -DENABLE_TCP=%[0%{?without_tcp}?0:1] - -DENABLE_SOCKET=%[0%{?without_tcp}?0:1] + -DENABLE_SOCKET=%[0%{?without_socket}?0:1] -DENABLE_IO=%[0%{?without_io}?0:1] -DENABLE_PROC=%[0%{?without_proc}?0:1] -DENABLE_JVM=%[0%{?without_jvm}?0:1] @@ -123,6 +125,8 @@ BUILD_OPTS=( -DENABLE_KSLI=%[0%{?without_ksli}?0:1] -DENABLE_CONTAINER=%[0%{?without_cadvisor}?0:1] -DENABLE_SERMANT=%[0%{?without_sermant}?0:1] + -DENABLE_SLI=%[0%{?without_sli}?0:1] + -DENABLE_FLOWTRACER=%[0%{?without_flowtracer}?0:1] -DENABLE_REPORT_EVENT=%[0%{?disable_report_event}?0:1] -DKAFKA_CHANNEL=%[0%{?disable_kafka_channel}?0:1] @@ -146,20 +150,16 @@ install -d %{buildroot}%{_bindir} install -d %{buildroot}/usr/libexec/gala-gopher/ mkdir -p %{buildroot}/usr/lib/systemd/system install -m 0600 service/gala-gopher.service %{buildroot}/usr/lib/systemd/system/gala-gopher.service +install -d %{buildroot}/%{gopher_state_dir} +install -d %{buildroot}/var/log/gala-gopher pushd build sh install.sh %{buildroot}%{_bindir} %{buildroot}/opt/gala-gopher %{buildroot}/etc/gala-gopher %{buildroot}/usr/libexec/gala-gopher/ %{buildroot}/opt/gala-gopher popd +%pre + %post %systemd_post gala-gopher.service -if [ -d /var/log/gala-gopher ]; then - othermode=$(expr $(stat -L -c "%a" /var/log/gala-gopher) % 10) - if [ $othermode -ne 0 ]; then - chmod 750 /var/log/gala-gopher - chmod 750 /var/log/gala-gopher/debug - chmod 640 /var/log/gala-gopher/debug/gopher.log - fi -fi %preun %systemd_preun gala-gopher.service @@ -167,10 +167,13 @@ fi %postun if [ $1 -eq 0 ]; then rm -rf /sys/fs/bpf/gala-gopher > /dev/null + rm -rf /opt/gala-gopher > /dev/null fi %systemd_postun_with_restart gala-gopher.service %files +%attr(0750,root,root) %dir /var/log/gala-gopher +%attr(0750,root,root) %dir %{gopher_state_dir} %attr(0750,root,root) %dir /opt/gala-gopher %attr(0550,root,root) %dir /opt/gala-gopher/extend_probes %attr(0750,root,root) %dir /opt/gala-gopher/meta @@ -186,8 +189,12 @@ fi %attr(0640,root,root) %config(noreplace) /etc/gala-gopher/extend_probes/*.conf %attr(0600,root,root) /usr/lib/systemd/system/gala-gopher.service %attr(0550,root,root) /usr/libexec/gala-gopher/init_probes.sh +%attr(0550,root,root) /usr/libexec/gala-gopher/start_pre.sh %changelog +* Wed Aug 21 2024 wocow - 2.0.2-1 +- Update to 2.0.2-1 + * Wed Apr 24 2024 Tangxin Xie - 2.0.0-1 - Update to 2.0.1