summaryrefslogtreecommitdiff
path: root/gala-gopher.spec
blob: 7e3fb6d391e6ea00d70b7704fed9563fd3e4bc3a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
#needsrootforbuild
%define __os_install_post %{nil}

%define vmlinux_ver 5.10.0-126.0.0.66.oe2203.%{_arch}
%define dist .oe2203sp1

Summary:       Intelligent ops toolkit for openEuler
Name:          gala-gopher
Version:       1.0.2
Release:       2
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 libcurl-devel
BuildRequires: clang >= 10.0.1 llvm java-1.8.0-openjdk-devel
BuildRequires: libconfig-devel librdkafka-devel libmicrohttpd-devel
BuildRequires: libbpf-devel >= 2:0.3 uthash-devel log4cplus-devel
Requires:      bash glibc elfutils bpftool dmidecode lsof
Requires:      python3-psycopg2 python3-yaml flamegraph iproute libcurl
Requires:      libbpf >= 2:0.3 kmod net-tools ethtool cadvisor python3-libconf python3-requests

%description
gala-gopher is a low-overhead eBPF-based probes framework

%prep
%autosetup -n %{name}-%{version} -p1

%build
pushd build
sh build.sh --release %{vmlinux_ver}
popd

%check

%install
install -d %{buildroot}/etc/gala-gopher
install -d %{buildroot}/opt/gala-gopher
install -d %{buildroot}%{_bindir}
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
popd

%post
%systemd_post gala-gopher.service

%preun
%systemd_preun gala-gopher.service

%postun
if [ $1 -eq 0 ]; then
  rm -rf /sys/fs/bpf/gala-gopher > /dev/null
fi
%systemd_postun_with_restart gala-gopher.service

%files
%defattr(-,root,root)
%dir /opt/gala-gopher
%dir /opt/gala-gopher/extend_probes
%dir /opt/gala-gopher/meta
%dir /opt/gala-gopher/lib
%{_bindir}/*
/opt/gala-gopher/extend_probes/*
/opt/gala-gopher/meta/*
/opt/gala-gopher/lib/*
/etc/gala-gopher/res/event_multy_language.rc
%config(noreplace) /etc/gala-gopher/*.conf
%config(noreplace) /etc/gala-gopher/extend_probes/*.conf
%exclude /opt/gala-gopher/extend_probes/*.pyc
%exclude /opt/gala-gopher/extend_probes/*.pyo
/usr/lib/systemd/system/gala-gopher.service

%changelog
* Fri Apr 7 2023 Tangxin Xie <xietangxin@huawei.com> - 1.0.2-2
- bugfix add check whether cadvisor is installed
  bugfix fix system_proc collect data err
  change return type of uprobe from void to int
  Fix for popen cannot get stderr
  fix modify unit of some metrics to second
  refactor modify jvmprobe to support pod
  stackprobe fix inaccurate call stack count add samp
  add python3-libconf and python3-request deps

* Fri Mar 3 2023 Tangxin Xie <xietangxin@huawei.com> - 1.0.2-1
- update to 1.0.2

* Wed Feb 22 2023 Tangxin Xie <xietangxin@huawei.com> - 1.0.1-5
- fix testcase compile and run errs

* Tue Jan 31 2023 Zhen Chen <chenzhen126@huawei.com> - 1.0.1-4
- add net-tools and ethtool to Requires

* Sun Jan 29 2023 Zhen Chen <chenzhen126@huawei.com> - 1.0.1-3
- specify libbpf version in BuildRequires and add some Requires

* Sat Jan 14 2023 Zhen Chen <chenzhen126@huawei.com> - 1.0.1-2
- fix ksliprobe get invalid args occasionally at startup
- fix error print when starting gala-gopher
- add system_uuid field to distinguish client when post to pyroscope server
- repair stackprobe caused cpu rush
- add support to pyroscope
- bugfix: add check if thread is 0
- fix stackprobe memory allocation and deallocation errors.
- normalize time format in flamegraph svg filename

* Mon Dec 12 2022 Zhen Chen <chenzhen126@huawei.com> - 1.0.1-1
- Update to 1.0.1

* Mon Dec 12 2022 Zhen Chen <chenzhen126@huawei.com> - 1.0.0-12
- remove debug_package %{nil} to strip files and provide debug packages

* Tue Dec 6 2022 Zhen Chen <chenzhen126@huawei.com> - 1.0.0-11
- add %config(noreplace) to conf files of extend_probes

* Tue Dec 6 2022 Zhen Chen <chenzhen126@huawei.com> - 1.0.0-10
- simplify vmlinux.h management with different kernel versions

* Wed Nov 30 2022 Zhen Chen <chenzhen126@huawei.com> - 1.0.0-9
- fix java.probe build error caused by a typo in build.sh
  Only check the installation of dep when building ebpf.probes
  Remove unused BuildRequires and add java-1.8.0-openjdk-devel

* Mon Nov 28 2022 wo_cow <niuqianqian@huawei.com> - 1.0.0-8
- fix issues raised during 22.03 test

* Thu Nov 17 2022 wo_cow <niuqianqian@huawei.com> - 1.0.0-7
- resolve patch conflict

* Thu Nov 17 2022 wo_cow <niuqianqian@huawei.com> - 1.0.0-6
- adapt libbpf v0.8

* Thu Nov 17 2022 Zhen Chen <chenzhen126@huawei.com> - 1.0.0-5
- add flamegraph-stackcollapse to Requires

* Tue Nov 15 2022 Zhen Chen <chenzhen126@huawei.com> - 1.0.0-4
- add systemd to BuildRequires to fix install/uninstall errors
  simplify patch application in %prep

* Mon Nov 14 2022 Zhen Chen <chenzhen126@huawei.com> - 1.0.0-3
- fix pgsliprobe

* Mon Nov 14 2022 Zhen Chen <chenzhen126@huawei.com> - 1.0.0-2
- add vmlinux for 22.03-LTS & 22.03-LTS-SP1

* Mon Nov 14 2022 Zhen Chen <chenzhen126@huawei.com> - 1.0.0-1
- Package init