libbpf/libbpf.spec
Shung-Hsi Yu f56d645a61 Accepting request 1007954 from home:dirkmueller:Factory
- update to 1.0.1:
  * fix inadvertently changed struct bpf_object_open_opts memory layout;
  * fix btf.h header relying on struct enum64 type defined in kernel UAPI headers;
  * fix NULL pointer exception in API btf_dump__dump_type_data;
  * remove struct btf_map_def accidentally left in bpf_helpers.h header.
  * All deprecated APIs and features removed!
  * support for syscall-specific kprobe/kretprobe
    (SEC("ksyscall/<syscall_name>") and SEC("kretsyscall/<syscall_name>"));
  * support for sleepable uprobe BPF programs (SEC("uprobe.s"));
  * support for per-cgroup LSM BPF programs (SEC("lsm_cgroup"));
  * support for new BPF CO-RE relocation TYPE_MATCHES;
  * bpf_prog_load() and bpf_map_create() are now smarter about handling program
    and map name on old kernels (it will be ignored if kernel doesn't support
    names);
  * BTF_KIND_ENUM64 support;
  * increase tracing attachment (kprobe/uprobe/tracepoint) robustness by using
    tracefs or debugfs, whichever is mounted;
  * new APIs for converting BPF enums to their string representation:
  * libbpf_bpf_prog_type_str();
  * libbpf_bpf_map_type_str();
  * libbpf_bpf_link_type_str();
  * libbpf_bpf_attach_type_str();
  * bpf_program__set_autoattach() and bpf_program__autoattach() to allow opting
    out from auto-attaching of BPF program by BPF skeleton;
  * perf_buffer__buffer() API to give access to underlying per-CPU buffer for BPF ringbuf;
  * bpf_obj_get_opts() API for more flexible fetching of BPF kernel objects' information.
- see https://github.com/libbpf/libbpf/releases/tag/v1.0.0 for detailed changelog

OBS-URL: https://build.opensuse.org/request/show/1007954
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libbpf?expand=0&rev=23
2022-10-12 06:10:47 +00:00

88 lines
2.5 KiB
RPMSpec

#
# spec file for package libbpf
#
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define sover_major 1
%define libname libbpf%{sover_major}
Name: libbpf
Version: 1.0.1
Release: 0
Summary: C library for managing eBPF programs and maps
License: LGPL-2.1-only
URL: https://github.com/libbpf/libbpf
Source: https://github.com/libbpf/libbpf/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source99: baselibs.conf
BuildRequires: libelf-devel
BuildRequires: linux-glibc-devel >= 4.5
BuildRequires: zlib-devel
%description
libbpf is a C library which provides API for managing eBPF programs and maps.
%package -n %{libname}
Summary: C library for managing eBPF programs and maps
%description -n %{libname}
libbpf is a C library which provides API for managing eBPF programs and maps.
%package devel
Summary: Development files for libbpf
Requires: %{libname} = %{version}
Requires: linux-glibc-devel >= 5.16
%description devel
libbpf is a C library which provides API for managing eBPF programs and maps.
%package devel-static
Summary: Static library for libbpf
Requires: %{libname} = %{version}
Requires: %{name}-devel = %{version}
Requires: linux-glibc-devel >= 5.16
%description devel-static
libbpf is a C library which provides API for managing eBPF programs and maps.
%prep
%autosetup
%build
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
cd src
%make_build V=1 CFLAGS="%{optflags}"
%install
cd src
%make_install V=1
%post -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig
%files -n %{libname}
%{_libdir}/%{name}.so.%{sover_major}*
%files devel
%license LICENSE LICENSE.BSD-2-Clause LICENSE.LGPL-2.1
%doc README.md
%{_includedir}/bpf
%{_libdir}/%{name}.so
%{_libdir}/pkgconfig/%{name}.pc
%files devel-static
%{_libdir}/%{name}.a
%changelog