!89 Update to latest dev of upstream

From: @cp3yeye 
Reviewed-by: @Vchanger 
Signed-off-by: @Vchanger
This commit is contained in:
openeuler-ci-bot 2024-04-08 02:46:05 +00:00 committed by Gitee
commit 05d78463ce
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 49 additions and 15 deletions

Binary file not shown.

View File

@ -1,7 +1,5 @@
%define __os_install_post %{nil}
%define vmlinux_ver 6.4.0-1.0.1.4.oe2309.%{_arch}
%define without_flamegraph 0
%define without_cadvisor 0
%define without_jvm 0
@ -15,6 +13,9 @@
%define without_proc 0
%define without_tprofiling 0
%define disable_kafka_channel 0
%define disable_flamegraph_svg 0
# example for tailoring probes
%global extend_tailor_probes %{nil}
%if 0%{?without_flamegraph}
@ -27,15 +28,20 @@
Summary: Intelligent ops toolkit for openEuler
Name: gala-gopher
Version: 2.0.0
Release: 4
Release: 5
License: Mulan PSL v2
URL: https://gitee.com/openeuler/gala-gopher
Source: %{name}-%{version}.tar.gz
BuildRoot: %{_builddir}/%{name}-%{version}
BuildRequires: systemd cmake gcc-c++ elfutils-devel clang llvm
BuildRequires: libconfig-devel librdkafka-devel libmicrohttpd-devel
BuildRequires: libbpf-devel >= 2:0.3 uthash-devel log4cplus-devel
BuildRequires: cjson-devel gnutls-devel git
BuildRequires: libconfig-devel libevent-devel openssl-devel libbpf-devel >= 2:0.8 uthash-devel
BuildRequires: jsoncpp-devel git libstdc++-devel
# for DT
#BuildRequires: CUnit-devel
%if !0%{?disable_kafka_channel}
BuildRequires: librdkafka-devel
%endif
%if !0%{?without_flamegraph}
BuildRequires: libcurl-devel
%endif
@ -43,12 +49,16 @@ BuildRequires: libcurl-devel
BuildRequires: java-1.8.0-openjdk-devel
%endif
%if !0%{?without_l7}
BuildRequires: cjson-devel java-1.8.0-openjdk-devel
BuildRequires: jsoncpp-devel java-1.8.0-openjdk-devel
%endif
Requires: bash gawk procps-ng glibc elfutils bpftool libbpf >= 2:0.8
Requires: libconfig libevent iproute jsoncpp libstdc++
%if !0%{?disable_kafka_channel}
Requires: librdkafka
%endif
Requires: bash glibc elfutils bpftool dmidecode libbpf >= 2:0.3
Requires: log4cplus librdkafka libmicrohttpd libconfig
Requires: iproute cjson gnutls
%if !0%{?without_systeminfo}
Requires: ethtool systemd iproute
%endif
@ -62,13 +72,16 @@ Requires: iproute conntrack-tools
Requires: kmod
%endif
%if !0%{?without_flamegraph}
Requires: flamegraph libcurl
%if !0%{?disable_flamegraph_svg}
Requires: flamegraph
%endif
Requires: libcurl
%endif
%if !0%{?without_opengauss_sli}
Requires: python3-psycopg2 python3-yaml net-tools
%endif
%if !0%{?without_cadvisor}
Requires: cadvisor python3-libconf python3-requests net-tools
Requires: cadvisor python3-libconf python3-requests net-tools util-linux
%endif
%if !0%{?without_postgre_sli}
Requires: iproute
@ -77,7 +90,7 @@ Requires: iproute
Requires: iproute
%endif
%if !0%{?without_l7}
Requires: cjson conntrack-tools
Requires: jsoncpp conntrack-tools
%endif
%if !0%{?without_tprofiling}
Requires: lsof
@ -96,12 +109,27 @@ cat << EOF > tailor.conf
EXTEND_PROBES="%{extend_tailor_probes}"
EOF
BUILD_OPTS=(
%if !0%{?disable_kafka_channel}
-DKAFKA_CHANNEL=1
%else
-DKAFKA_CHANNEL=0
%endif
%if !0%{?disable_flamegraph_svg}
-DFLAMEGRAPH_SVG=1
%endif
)
pushd build
export PATH=$PATH:/usr/lib64/llvm12/bin
sh build.sh --release %{vmlinux_ver}
sh build.sh --debug "${BUILD_OPTS[@]}"
popd
%check
# pushd test
# sh test_modules.sh "${BUILD_OPTS[@]}"
# popd
%install
install -d %{buildroot}/etc/gala-gopher
@ -111,7 +139,7 @@ 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
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
%post
@ -138,10 +166,12 @@ fi
%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
%attr(0750,root,root) %dir /opt/gala-gopher/btf
%attr(0550,root,root) %dir /opt/gala-gopher/lib
%attr(0550,root,root) %{_bindir}/*
%attr(0550,root,root) /opt/gala-gopher/extend_probes/*
%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(0640,root,root) /etc/gala-gopher/res/event_multy_language.rc
%attr(0640,root,root) %config(noreplace) /etc/gala-gopher/probes.init
@ -151,6 +181,9 @@ fi
%attr(0550,root,root) /usr/libexec/gala-gopher/init_probes.sh
%changelog
* Mon Apr 8 2024 Tangxin Xie <xietangxin@huawei.com> - 2.0.0-5
- Update tarball to latest dev of upstream
* Mon Mar 18 2024 panchenbo <panchenbo@kylinsec.com.cn> - 2.0.0-4
- fix build error : modify clang12 to clang
@ -204,3 +237,4 @@ fi
* Mon Nov 14 2022 Zhen Chen <chenzhen126@huawei.com> - 1.0.0-1
- Package init