diff --git a/libbpf.spec b/libbpf.spec index 2f1b94733e0435e75cb0c3f8869d912714bb2aad..d7cccd4ab8bfb47fb8f014b101f0324976046dd4 100644 --- a/libbpf.spec +++ b/libbpf.spec @@ -1,8 +1,8 @@ -%define anolis_release 3 +%define anolis_release 4 %global libver 0.7.0 Name: libbpf -Version: 0.7.0 +Version: %{libver} Release: %{anolis_release}%{?dist} Summary: Libbpf library @@ -12,15 +12,26 @@ Source: https://github.com/%{name}/%{name}/archive/v%{version}.tar.gz BuildRequires: gcc elfutils-libelf-devel elfutils-devel BuildRequires: make -# This package supersedes libbpf from kernel-tools, +# This package supersedes %{name} from kernel-tools, # which has default Epoch: 0. By having Epoch: > 0 -# this libbpf will take over smoothly +# this %{name} will take over smoothly Epoch: 2 %description -A mirror of bpf-next linux tree bpf-next/tools/lib/bpf directory plus its -supporting header files. The version of the package reflects the version of -ABI. + +libbpf is a library that provides a convenient and efficient way to interact +with the Linux kernel's BPF subsystem. BPF stands for Berkeley Packet Filter, +but it has evolved into a powerful framework for creating and running programs +in the kernel. libbpf allows users to load and attach BPF programs to various +hooks, such as network interfaces, tracepoints, kprobes, and more. It also +provides APIs for manipulating BPF maps, which are key-value data structures +that can be shared between user space and kernel space. libbpf is designed to +be portable across different versions of the Linux kernel and compatible with +the BPF CO-RE (Compile Once - Run Everywhere) feature. + +This package is a mirror of bpf-next linux tree bpf-next/tools/lib/bpf +directory plus its supporting header files. The version of the package reflects +the version of ABI. %package devel Summary: Development files for %{name} @@ -29,11 +40,16 @@ Requires: kernel-headers >= 5.10.0 Requires: zlib %description devel -The %{name}-devel package contains libraries header files for -developing applications that use %{name} +libbpf-devel is a development package for libbpf, a library that provides an +interface to load and interact with BPF programs. BPF (Berkeley Packet Filter) +is a technology that allows users to run custom code in the kernel without +modifying it. libbpf-devel contains the header files and static libraries +needed to compile and link applications that use libbpf. It also includes +documentation and examples of how to use libbpf for various purposes, such as +tracing, networking, security, and performance optimization. %package static -Summary: Static library for libbpf development +Summary: Static library for %{name} development Requires: %{name}-devel = %{EVR} %description static @@ -43,7 +59,12 @@ developing applications that use %{name} %define _lto_cflags %{nil} %undefine _package_note_file -%global make_flags DESTDIR=%{buildroot} OBJDIR=%{_builddir} CFLAGS="%{build_cflags} -fPIC" LDFLAGS="%{build_ldflags} -Wl,--no-as-needed" LIBDIR=/%{_libdir} NO_PKG_CONFIG=1 +%global make_flags \ + LIBDIR=/%{_libdir} NO_PKG_CONFIG=1 \ + LDFLAGS="%{build_ldflags} -Wl,--no-as-needed" \ + CFLAGS="%{build_cflags} -fPIC" \ + OBJDIR=%{_builddir} \ + DESTDIR=%{buildroot} %prep %autosetup @@ -58,19 +79,22 @@ developing applications that use %{name} %files %dir %{abidir} -%{_libdir}/libbpf.so.%{libver} -%{_libdir}/libbpf.so.0 -%{abidir}/libbpf.dump +%{_libdir}/%{name}.so.%{libver} +%{_libdir}/%{name}.so.0 +%{abidir}/%{name}.dump %files devel -%{_libdir}/libbpf.so +%{_libdir}/%{name}.so %{_includedir}/bpf/ -%{_libdir}/pkgconfig/libbpf.pc +%{_libdir}/pkgconfig/%{name}.pc %files static -%{_libdir}/libbpf.a +%{_libdir}/%{name}.a %changelog +* Thu Apr 13 2023 Zhongling - 0.7.0-4 +- Refactor rpm spec + * Wed Feb 15 2023 Chunmei Xu - 0.7.0-3 - downgrade to 0.7.0 to compat with kernel-5.10/kernel-5.19