diff --git a/libbpf.spec b/libbpf.spec index 2f1b94733e0435e75cb0c3f8869d912714bb2aad..34d76fc9a20ba9e776ce475bb1bb2b9e4846a861 100644 --- a/libbpf.spec +++ b/libbpf.spec @@ -1,8 +1,8 @@ -%define anolis_release 3 -%global libver 0.7.0 +%define anolis_release 2 +%global libver 1.1.0 Name: libbpf -Version: 0.7.0 +Version: %{libver} Release: %{anolis_release}%{?dist} Summary: Libbpf library @@ -12,29 +12,45 @@ 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} -Requires: %{name} = %{EVR} +Requires: %{name} = 2:%{version}-%{release} 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 -Requires: %{name}-devel = %{EVR} +Summary: Static library for %{name} development +Requires: %{name}-devel = %{epoch}:%{version}-%{release} %description static The %{name}-static package contains static library for @@ -43,10 +59,15 @@ 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 +%autosetup -n %{name}-%{version} %build %make_build -C ./src %{make_flags} @@ -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.1 +%{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 - 1.1.0-2 +- 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 diff --git a/v0.7.0.tar.gz b/v0.7.0.tar.gz deleted file mode 100644 index f89a9622912e37301eaa901e2524f5c3525dace9..0000000000000000000000000000000000000000 Binary files a/v0.7.0.tar.gz and /dev/null differ diff --git a/v1.1.0.tar.gz b/v1.1.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..b59d8a07a6c9d3ce82adea6be636ffff4639f069 Binary files /dev/null and b/v1.1.0.tar.gz differ