gala-gopher/gala-gopher.spec

80 lines
2.1 KiB
RPMSpec
Raw Normal View History

2022-11-13 15:07:08 +08:00
%define debug_package %{nil}
%define __os_install_post %{nil}
2022-11-13 15:07:08 +08:00
Summary: Intelligent ops toolkit for openEuler
Name: gala-gopher
Version: 1.0.0
Release: 2
2022-11-13 15:07:08 +08:00
License: Mulan PSL v2
URL: https://gitee.com/openeuler/gala-gopher
Source: %{name}-%{version}.tar.gz
BuildRoot: %{_builddir}/%{name}-%{version}
BuildRequires: cmake gcc-c++ yum elfutils-devel
BuildRequires: clang >= 10.0.1 llvm
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
patch0: add-vmlinux-for-2203LTS-2203LTS-SP1.patch
2022-11-13 15:07:08 +08:00
%ifarch x86_64
patch1: modify-to-adapt-to-oe2203-LTS-SP1-x86.patch
%endif
%ifarch aarch64
patch1: modify-to-adapt-to-oe2203-LTS-SP1-arm.patch
%endif
%description
gala-gopher is a low-overhead eBPF-based probes framework
%prep
%setup -q
%patch0 -p1
2022-11-13 15:07:08 +08:00
%patch1 -p1
%build
pushd build
sh build.sh --release
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/*
%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 Nov 14 2022 Zhen Chen <chenzhen126@huawei.com> - 1.0.0-2
- add vmlinux for 22.03-LTS & 22.03-LTS-SP1
2022-11-13 15:07:08 +08:00
* Mon Nov 14 2022 Zhen Chen <chenzhen126@huawei.com> - 1.0.0-1
- Package init