SHA256
1
0
forked from pool/libbpf
libbpf/libbpf.spec

88 lines
2.5 KiB
RPMSpec
Raw Normal View History

#
# 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.
Accepting request 761634 from home:scarabeus_iv:branches:devel:libraries:c_c++ Please sent this package to tumbleweed too. - Reflect SUSE CFLAGS - Do not bother with obscpio if we are fetching direct releases - Remove patch 0001-makefile-Fix-install-target.patch seems to build/install without it just fine - Update to 0.0.6: + New features - new extensible bpf_object__open_{file,mem} APIs and DECLARE_LIBBPF_OPTS() macro to go with them - bpf_helpers.h, bpf_endian.h, and bpf_tracing.h are now distributed with libbpf - BPF CO-RE: added field size, field existence, and bitfield relocation support - BPF CO-RE: BPF_CORE_READ(), bpf_core_field_exists(), bpf_core_field_size() and other BPF CO-RE related helpers available through bpf_core_read.h header - bpf_object__open() API now auto-detects program type from its section name - BPF_PROG_TRACING programs support (incuding BTF-typed raw tracepoints, fentry/fexit programs) - mmap() support for BPF global variables - declarative map pinning support added - probe_read_{user,kernel}[_str]() BPF helpers added - bpf_get_link_xdp_info() function to get more XDP information added - a bunch of other AF_XDP changes + Usability improvements - no need for int version SEC('version') = 1; anymore - raw_tp/tp and uprobe/uretprobe section prefixes added - new bpf_program__get_{type,expected_attach_type} getters - preserve error code on program load failure OBS-URL: https://build.opensuse.org/request/show/761634 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libbpf?expand=0&rev=2
2020-01-09 12:37:19 +01:00
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define sover_major 0
%define libname libbpf%{sover_major}
Name: libbpf
Accepting request 978028 from home:shunghsiyu:branches:bpf - Update to release 0.8.0 * New features and APIs: - support auto-resolution of binaries and shared libraries from PATH, if necessary; - support attaching by function names (only by IP was supported before); - support attaching to USDTs (SEC("usdt/...") and bpf_program__attach_usdt()) with initially supported architectures: x86-64 (amd64); x86 (i386); s390x; ARM64 (aarch64); RISC V (riscv); - improved BPF verifier log reporting for CO-RE relocation failures (no more obscure "invalid func unknown#195896080" errors); - auto-adjust BPF ringbuf size according to host kernel's page size requirements; - high-level BPF map APIs: bpf_map__lookup_elem(), bpf_map__update_elem(), etc that validate key/value buffer sizes; - bpf_link_create() can create all bpf_link-based (including raw_tp, fentry/fexit, etc), falling back to bpf_raw_tracepoint_open() on old kernels transparently; - support opting out from auto-loading BPF programs declaratively with SEC("?..."); - support opting out from auto-creation of declarative BPF maps with bpf_map__set_autocreate(); - support multi-kprobes (SEC("kprobe.multi/...") and bpf_program__attach_kprobe_multi_opts()); - support target-less SEC() programs (e.g., SEC("kprobe"), SEC("tp"), etc); - support BPF sub-skeletons for "incomplete" BPF object files (requires matching bpftool to generate .subskel.h); - BPF cookie support for fentry/fexit/fmod_ret BPF programs (bpf_program__attach_trace_opts()); - support for custom SEC() handlers (libbpf_register_prog_handler()). * BPF-side API - BPF-side USDT APIs. See new usdt.bpf.h header: * BPF_USDT() program wrapper macro; bpf_usdt_arg(), bpf_usdt_arg_cnt(), * bpf_usdt_cookie() helpers; - new bpf_core_field_offset() CO-RE helper and support bpf_core_field_size(type, field) forms; - barrier() and barrier_var() macros for improving BPF code generation; - __kptr and __kptr_ref tags added; - ARC architecture support in bpf_tracing.h header; - new BPF helpers: * bpf_skb_set_tstamp(); * bpf_ima_file_hash(); * bpf_kptr_xchg(); * bpf_map_lookup_percpu_elem(). * Bug fixes - netlink bug fixes; - libbpf.pc fixes to support patch releases properly; - BPF_MAP_TYPE_PERF_EVENT_ARRAY map auto-pinning fix; - minor CO-RE fixes and improvements for some corner cases; - various other small fixes and improvements. OBS-URL: https://build.opensuse.org/request/show/978028 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libbpf?expand=0&rev=19
2022-05-19 05:34:55 +02:00
Version: 0.8.0
Release: 0
Summary: C library for managing eBPF programs and maps
Accepting request 761634 from home:scarabeus_iv:branches:devel:libraries:c_c++ Please sent this package to tumbleweed too. - Reflect SUSE CFLAGS - Do not bother with obscpio if we are fetching direct releases - Remove patch 0001-makefile-Fix-install-target.patch seems to build/install without it just fine - Update to 0.0.6: + New features - new extensible bpf_object__open_{file,mem} APIs and DECLARE_LIBBPF_OPTS() macro to go with them - bpf_helpers.h, bpf_endian.h, and bpf_tracing.h are now distributed with libbpf - BPF CO-RE: added field size, field existence, and bitfield relocation support - BPF CO-RE: BPF_CORE_READ(), bpf_core_field_exists(), bpf_core_field_size() and other BPF CO-RE related helpers available through bpf_core_read.h header - bpf_object__open() API now auto-detects program type from its section name - BPF_PROG_TRACING programs support (incuding BTF-typed raw tracepoints, fentry/fexit programs) - mmap() support for BPF global variables - declarative map pinning support added - probe_read_{user,kernel}[_str]() BPF helpers added - bpf_get_link_xdp_info() function to get more XDP information added - a bunch of other AF_XDP changes + Usability improvements - no need for int version SEC('version') = 1; anymore - raw_tp/tp and uprobe/uretprobe section prefixes added - new bpf_program__get_{type,expected_attach_type} getters - preserve error code on program load failure OBS-URL: https://build.opensuse.org/request/show/761634 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libbpf?expand=0&rev=2
2020-01-09 12:37:19 +01:00
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