%define __os_install_post %{nil} %define vmlinux_ver 5.10.0-126.0.0.66.oe2203.%{_arch} Summary: Intelligent ops toolkit for openEuler Name: gala-gopher Version: 1.0.0 Release: 12 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 BuildRequires: clang >= 10.0.1 llvm java-1.8.0-openjdk-devel BuildRequires: libconfig-devel librdkafka-devel libmicrohttpd-devel BuildRequires: uthash-devel libbpf libbpf-devel log4cplus-devel Requires: bash glibc elfutils zlib elfutils-devel bpftool Requires: dmidecode python3-psycopg2 python3-yaml erlang-eflame Requires: flamegraph-stackcollapse iproute patch0: add-vmlinux-for-2203LTS-2203LTS-SP1.patch patch1: fix-pgsliprobe.patch patch2: adapt-libbpf-v08.patch patch3: fix-bugs-for-ksliprobe-pgsliprobe-stackprobe.patch patch4: move-docs-about-creating-and-running-in-docker.patch patch5: fix-the-problem-that-the-gopher-in-docker-doesn-t-su.patch patch6: add-documentation-related-to-docker-images.patch patch7: fix-java.probe-build-error-caused-by-a-typo-in-build.patch patch8: Only-check-the-installation-of-dep-when-building-ebp.patch patch9: simplify-vmlinux.h-management-with-different-kernel-.patch %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 %install 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 popd %post %systemd_post gala-gopher.service %preun %systemd_preun gala-gopher.service %postun %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}/* %config(noreplace) /opt/gala-gopher/*.conf /opt/gala-gopher/extend_probes/* %config(noreplace) /opt/gala-gopher/extend_probes/*.conf %exclude /opt/gala-gopher/extend_probes/*.pyc %exclude /opt/gala-gopher/extend_probes/*.pyo /opt/gala-gopher/meta/* /opt/gala-gopher/lib/* /usr/lib/systemd/system/gala-gopher.service %changelog * Mon Dec 12 2022 Zhen Chen - 1.0.0-12 - remove debug_package %{nil} to strip files and provide debug packages * Wed Dec 6 2022 Zhen Chen - 1.0.0-11 - add %config(noreplace) to conf files of extend_probes * Tue Dec 6 2022 Zhen Chen - 1.0.0-10 - simplify vmlinux.h management with different kernel versions * Wed Nov 30 2022 Zhen Chen - 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 - 1.0.0-8 - fix issues raised during 22.03 test * Thu Nov 17 2022 wo_cow - 1.0.0-7 - resolve patch conflict * Thu Nov 17 2022 wo_cow - 1.0.0-6 - adapt libbpf v0.8 * Thu Nov 17 2022 Zhen Chen - 1.0.0-5 - add flamegraph-stackcollapse to Requires * Tue Nov 15 2022 Zhen Chen - 1.0.0-4 - add systemd to BuildRequires to fix install/uninstall errors simplify patch application in %prep * Mon Nov 14 2022 Zhen Chen - 1.0.0-3 - fix pgsliprobe * Mon Nov 14 2022 Zhen Chen - 1.0.0-2 - add vmlinux for 22.03-LTS & 22.03-LTS-SP1 * Mon Nov 14 2022 Zhen Chen - 1.0.0-1 - Package init