libbpf/libbpf.spec
Shung-Hsi Yu bfc9e4372b Accepting request 1044164 from home:dirkmueller:Factory
- update to v1.1.0:
  User space-side features and APIs:
  * user-space ring buffer (BPF_MAP_TYPE_USER_RINGBUF) support;
  * new documentation page listing all recognized SEC() definitions;
  * BTF dedup improvements:
  * unambiguous fwd declaration resolution for structs and unions;
  * better handling of some corner cases with identical structs and arrays;
  * mixed enum and enum64 forward declaration resolution logic;
  * bpf_{link,btf,pro,mapg}_get_fd_by_id_opts() and bpf_get_fd_by_id_opts()
    APIs;
  * libbpf supports loading raw BTF for BPF CO-RE from known search paths;
  * support for new cgroup local storage (BPF_MAP_TYPE_CGRP_STORAGE);
  * libbpf will only add BPF_F_MMAPABLE flag for data maps with global
    (i.e., non-static) vars;
  * latest Linux UAPI headers with lots of changes synced into
    include/uapi/linux.
  BPF-side features and APIs;
  * BPF_PROG2() macro added that supports struct-by-value arguments;
  * new BPF helpers:
  * bpf_user_ringbuf_drain();
  * cgrp_storage_get() and cgrp_storage_delete().
  Bug fixes
  * better handling of padding corner cases;
  * btf__align_of() determines packed structs better now;
  * improved handling of enums of non-standard sizes;
  * USDT spec parsing improvements;
  * overflow handling fixes for ringbufs;
  * Makefile fixes to support cross-compilation for 32-bit targets;
  * fix crash if SEC("freplace") programs don't have attach_prog_fd set;
  * better handling of file existence checks when running as non-root with

OBS-URL: https://build.opensuse.org/request/show/1044164
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libbpf?expand=0&rev=27
2022-12-29 09:18:21 +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.1.0
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 -p1
%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