!109 [sync] PR-107: update to the latest stable version 2.0.1

From: @openeuler-sync-bot 
Reviewed-by: @Vchanger 
Signed-off-by: @Vchanger
This commit is contained in:
openeuler-ci-bot 2024-11-07 06:08:10 +00:00 committed by Gitee
commit 0ca9b93d1d
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 81 additions and 42 deletions

Binary file not shown.

BIN
gala-gopher-2.0.1.tar.gz Normal file

Binary file not shown.

View File

@ -1,41 +1,46 @@
%define __os_install_post %{nil} %define __os_install_post %{nil}
%define vmlinux_ver 6.4.0-1.0.1.4.oe2309.%{_arch} %define without_baseinfo 0
%define without_flamegraph 0
%define without_cadvisor 0
%define without_jvm 0
%define without_tcp 0
%define without_systeminfo 0
%define without_virt 0 %define without_virt 0
%define without_opengauss_sli 0 %define without_flamegraph 0
%define without_l7 0 %define without_l7 0
%define without_postgre_sli 0 %define without_tcp 0
%define without_redis_sli 0 %define without_socket 0
%define without_io 0
%define without_proc 0 %define without_proc 0
%define without_jvm 0
%define without_postgre_sli 0
%define without_opengauss_sli 0
%define without_nginx 0
%define without_tprofiling 0 %define without_tprofiling 0
%define without_kafka 0
%define without_hw 0
%define without_ksli 0
%define without_container 0
%define without_sermant 0
%define disable_report_event 0
%define disable_kafka_channel 0
%define disable_flamegraph_svg 0
# example for tailoring probes
%global extend_tailor_probes %{nil}
%if 0%{?without_flamegraph}
%global extend_tailor_probes %{extend_tailor_probes}stackprobe|
%endif
%if 0%{?without_jvm}
%global extend_tailor_probes %{extend_tailor_probes}jvm.probe
%endif
Summary: Intelligent ops toolkit for openEuler Summary: Intelligent ops toolkit for openEuler
Name: gala-gopher Name: gala-gopher
Version: 2.0.0 Version: 2.0.1
Release: 4 Release: 1
License: Mulan PSL v2 License: Mulan PSL v2
URL: https://gitee.com/openeuler/gala-gopher URL: https://gitee.com/openeuler/gala-gopher
Source: %{name}-%{version}.tar.gz Source: %{name}-%{version}.tar.gz
BuildRoot: %{_builddir}/%{name}-%{version} BuildRoot: %{_builddir}/%{name}-%{version}
BuildRequires: systemd cmake gcc-c++ elfutils-devel clang llvm BuildRequires: systemd cmake gcc-c++ elfutils-devel clang llvm bpftool >= 6.8
BuildRequires: libconfig-devel librdkafka-devel libmicrohttpd-devel BuildRequires: libconfig-devel libevent-devel openssl-devel libbpf-devel >= 2:0.8 uthash-devel
BuildRequires: libbpf-devel >= 2:0.3 uthash-devel log4cplus-devel BuildRequires: jsoncpp-devel git libstdc++-devel
BuildRequires: cjson-devel gnutls-devel git # for DT
#BuildRequires: CUnit-devel
%if !0%{?disable_kafka_channel}
BuildRequires: librdkafka-devel
%endif
%if !0%{?without_flamegraph} %if !0%{?without_flamegraph}
BuildRequires: libcurl-devel BuildRequires: libcurl-devel
%endif %endif
@ -43,15 +48,20 @@ BuildRequires: libcurl-devel
BuildRequires: java-1.8.0-openjdk-devel BuildRequires: java-1.8.0-openjdk-devel
%endif %endif
%if !0%{?without_l7} %if !0%{?without_l7}
BuildRequires: cjson-devel java-1.8.0-openjdk-devel BuildRequires: jsoncpp-devel java-1.8.0-openjdk-devel
%endif %endif
Requires: bash glibc elfutils bpftool dmidecode libbpf >= 2:0.3 Requires: bash gawk procps-ng glibc elfutils libbpf >= 2:0.8
Requires: log4cplus librdkafka libmicrohttpd libconfig Requires: libconfig libevent iproute jsoncpp libstdc++
Requires: iproute cjson gnutls
%if !0%{?without_systeminfo} %if !0%{?disable_kafka_channel}
Requires: librdkafka
%endif
%if !0%{?without_baseinfo}
Requires: ethtool systemd iproute Requires: ethtool systemd iproute
%endif %endif
%if !0%{?without_virt} %if !0%{?without_virt}
Requires: systemd Requires: systemd
%endif %endif
@ -62,22 +72,22 @@ Requires: iproute conntrack-tools
Requires: kmod Requires: kmod
%endif %endif
%if !0%{?without_flamegraph} %if !0%{?without_flamegraph}
Requires: flamegraph libcurl %if !0%{?disable_flamegraph_svg}
Requires: flamegraph
%endif
Requires: libcurl
%endif %endif
%if !0%{?without_opengauss_sli} %if !0%{?without_opengauss_sli}
Requires: python3-psycopg2 python3-yaml net-tools Requires: python3-psycopg2 python3-yaml net-tools
%endif %endif
%if !0%{?without_cadvisor} %if !0%{?without_container}
Requires: cadvisor python3-libconf python3-requests net-tools Requires: cadvisor python3-libconf python3-requests net-tools util-linux
%endif %endif
%if !0%{?without_postgre_sli} %if !0%{?without_postgre_sli}
Requires: iproute Requires: iproute
%endif %endif
%if !0%{?without_redis_sli}
Requires: iproute
%endif
%if !0%{?without_l7} %if !0%{?without_l7}
Requires: cjson conntrack-tools Requires: jsoncpp conntrack-tools
%endif %endif
%if !0%{?without_tprofiling} %if !0%{?without_tprofiling}
Requires: lsof Requires: lsof
@ -92,16 +102,41 @@ gala-gopher is a low-overhead eBPF-based probes framework
%build %build
cat << EOF > tailor.conf BUILD_OPTS=(
EXTEND_PROBES="%{extend_tailor_probes}" -DENABLE_BASEINFO=%[0%{?without_baseinfo}?0:1]
EOF -DENABLE_VIRT=%[0%{?without_virt}?0:1]
-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_IO=%[0%{?without_io}?0:1]
-DENABLE_PROC=%[0%{?without_proc}?0:1]
-DENABLE_JVM=%[0%{?without_jvm}?0:1]
-DENABLE_POSTGRE_SLI=%[0%{?without_postgre_sli}?0:1]
-DENABLE_OPENGAUSS_SLI=%[0%{?without_opengauss_sli}?0:1]
-DENABLE_NGINX=%[0%{?without_nginx}?0:1]
-DENABLE_TPROFILING=%[0%{?without_tprofiling}?0:1]
-DENABLE_KAFKA=%[0%{?without_kafka}?0:1]
-DENABLE_HW=%[0%{?without_hw}?0:1]
-DENABLE_KSLI=%[0%{?without_ksli}?0:1]
-DENABLE_CONTAINER=%[0%{?without_cadvisor}?0:1]
-DENABLE_SERMANT=%[0%{?without_sermant}?0:1]
-DENABLE_REPORT_EVENT=%[0%{?disable_report_event}?0:1]
-DKAFKA_CHANNEL=%[0%{?disable_kafka_channel}?0:1]
-DFLAMEGRAPH_SVG=%[0%{?disable_flamegraph_svg}?0:1]
)
pushd build pushd build
export PATH=$PATH:/usr/lib64/llvm12/bin export PATH=$PATH:/usr/lib64/llvm12/bin
sh build.sh --release %{vmlinux_ver} sh build.sh --debug "${BUILD_OPTS[@]}"
popd popd
%check %check
# pushd test
# sh test_modules.sh "${BUILD_OPTS[@]}"
# popd
%install %install
install -d %{buildroot}/etc/gala-gopher install -d %{buildroot}/etc/gala-gopher
@ -111,7 +146,7 @@ install -d %{buildroot}/usr/libexec/gala-gopher/
mkdir -p %{buildroot}/usr/lib/systemd/system mkdir -p %{buildroot}/usr/lib/systemd/system
install -m 0600 service/gala-gopher.service %{buildroot}/usr/lib/systemd/system/gala-gopher.service install -m 0600 service/gala-gopher.service %{buildroot}/usr/lib/systemd/system/gala-gopher.service
pushd build pushd build
sh install.sh %{buildroot}%{_bindir} %{buildroot}/opt/gala-gopher %{buildroot}/etc/gala-gopher %{buildroot}/usr/libexec/gala-gopher/ sh install.sh %{buildroot}%{_bindir} %{buildroot}/opt/gala-gopher %{buildroot}/etc/gala-gopher %{buildroot}/usr/libexec/gala-gopher/ %{buildroot}/opt/gala-gopher
popd popd
%post %post
@ -138,12 +173,13 @@ fi
%attr(0750,root,root) %dir /opt/gala-gopher %attr(0750,root,root) %dir /opt/gala-gopher
%attr(0550,root,root) %dir /opt/gala-gopher/extend_probes %attr(0550,root,root) %dir /opt/gala-gopher/extend_probes
%attr(0750,root,root) %dir /opt/gala-gopher/meta %attr(0750,root,root) %dir /opt/gala-gopher/meta
%attr(0750,root,root) %dir /opt/gala-gopher/btf
%attr(0550,root,root) %dir /opt/gala-gopher/lib %attr(0550,root,root) %dir /opt/gala-gopher/lib
%attr(0550,root,root) %{_bindir}/* %attr(0550,root,root) %{_bindir}/*
%attr(0550,root,root) /opt/gala-gopher/extend_probes/* %attr(0550,root,root) /opt/gala-gopher/extend_probes/*
%attr(0640,root,root) /opt/gala-gopher/meta/* %attr(0640,root,root) /opt/gala-gopher/meta/*
#%attr(0640,root,root) /opt/gala-gopher/btf/*
%attr(0550,root,root) /opt/gala-gopher/lib/* %attr(0550,root,root) /opt/gala-gopher/lib/*
%attr(0640,root,root) /etc/gala-gopher/res/event_multy_language.rc
%attr(0640,root,root) %config(noreplace) /etc/gala-gopher/probes.init %attr(0640,root,root) %config(noreplace) /etc/gala-gopher/probes.init
%attr(0640,root,root) %config(noreplace) /etc/gala-gopher/*.conf %attr(0640,root,root) %config(noreplace) /etc/gala-gopher/*.conf
%attr(0640,root,root) %config(noreplace) /etc/gala-gopher/extend_probes/*.conf %attr(0640,root,root) %config(noreplace) /etc/gala-gopher/extend_probes/*.conf
@ -151,6 +187,9 @@ fi
%attr(0550,root,root) /usr/libexec/gala-gopher/init_probes.sh %attr(0550,root,root) /usr/libexec/gala-gopher/init_probes.sh
%changelog %changelog
* Tue Oct 08 2024 zhaosai <zhaosaisai@kylinos.cn> - 2.0.1-1
- update to the latest stable version 2.0.1
* Mon Mar 18 2024 panchenbo <panchenbo@kylinsec.com.cn> - 2.0.0-4 * Mon Mar 18 2024 panchenbo <panchenbo@kylinsec.com.cn> - 2.0.0-4
- fix build error : modify clang12 to clang - fix build error : modify clang12 to clang