SHA256
1
0
forked from pool/libbpf

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
This commit is contained in:
Michał Rostecki
2020-01-09 11:37:19 +00:00
committed by Git OBS Bridge
parent 678c0dae57
commit a53a02a589
7 changed files with 49 additions and 85 deletions

View File

@@ -1,47 +0,0 @@
From dc3d79cff48b9a2034e8b0378bca221b57f4e300 Mon Sep 17 00:00:00 2001
From: Michal Rostecki <mrostecki@opensuse.org>
Date: Tue, 1 Oct 2019 13:09:00 +0200
Subject: [PATCH] makefile: Fix install target
Before this change, the install target was failing with the following
error:
make: Entering directory '/home/mrostecki/repos/libbpf/src'
if [ ! -d '/usr/include/bpf' ]; then install -d -m 755 '/usr/include/bpf'; fi; install bpf.h libbpf.h btf.h xsk.h libbpf_util.h -m 644 '/usr/include/bpf'
if [ ! -d '/usr/lib64/pkgconfig' ]; then install -d -m 755 '/usr/lib64/pkgconfig'; fi; install ./libbpf.pc -m 644 '/usr/lib64/pkgconfig'
if [ ! -d '/usr/lib64' ]; then install -d -m 755 '/usr/lib64'; fi; cp -fpR '/usr/lib64'
cp: missing destination file operand after '/usr/lib64'
Try 'cp --help' for more information.
make: *** [Makefile:119: install] Error 1
make: Leaving directory '/home/mrostecki/repos/libbpf/src'
That error occured due to usage of non-existing variable $(LIBS). After
this change, $(SHARED_LIBS) and $(STATIC_LIBS) are used instead, which
fixes the behavior of the install target.
Fixes: 8b2782a1f250 ("makefile: support libbpf symbol versioning in shared library mode")
Signed-off-by: Michal Rostecki <mrostecki@opensuse.org>
---
src/Makefile | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/Makefile b/src/Makefile
index 57510ca..28a470f 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -116,7 +116,11 @@ define do_s_install
endef
install: all install_headers install_pkgconfig
- $(call do_s_install,$(LIBS),$(LIBDIR))
+ifndef BUILD_STATIC_ONLY
+ $(call do_s_install,$(SHARED_LIBS) $(STATIC_LIBS),$(LIBDIR))
+else
+ ${call do_s_install,$(STATIC_LIBS),$(LIBDIR))
+endif
install_headers:
$(call do_install,$(HEADERS),$(INCLUDEDIR)/bpf,644)
--
2.23.0

View File

@@ -1,16 +0,0 @@
<services>
<service mode="disabled" name="obs_scm">
<param name="url">https://github.com/libbpf/libbpf</param>
<param name="scm">git</param>
<param name="filename">libbpf</param>
<param name="versionformat">@PARENT_TAG@</param>
<param name="versionrewrite-pattern">v(.*)</param>
<param name="revision">v0.0.5</param>
</service>
<service mode="buildtime" name="tar" />
<service mode="buildtime" name="recompress">
<param name="file">*.tar</param>
<param name="compression">xz</param>
</service>
<service mode="disabled" name="set_version" />
</services>

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a757f3cdff12dc0b2d7b1ef3e44a4796a5aa9905c50b383525d9867633952828
size 632332

View File

@@ -1,3 +1,42 @@
-------------------------------------------------------------------
Tue Jan 7 14:36:44 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
- 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
+ Fixes
- btf_dump padding handling
- bpf_object__name() returning name, not path
- ELF section handling off-by-one bug fix
- mem leak/double free fix in BPF program relocation code
-------------------------------------------------------------------
Tue Oct 1 09:15:18 UTC 2019 - Michał Rostecki <mrostecki@opensuse.org>

View File

@@ -1,5 +0,0 @@
name: libbpf
version: 0.0.5
mtime: 1569904962
commit: 8b2782a1f250f58aafe38b2cd718aa3dc8ad58ed

View File

@@ -1,7 +1,7 @@
#
# spec file for package libbpf
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -12,22 +12,19 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define sover_major 0
%define libname libbpf%{sover_major}
Name: libbpf
Version: 0.0.5
Version: 0.0.6
Release: 0
Summary: C library for managing eBPF programs and maps
License: LGPL-2.1
Group: Development/Languages/C and C++
Url: https://github.com/libbpf/libbpf
Source: %{name}-%{version}.tar.xz
Patch0: 0001-makefile-Fix-install-target.patch
License: LGPL-2.1-only
URL: https://github.com/libbpf/libbpf
Source: https://github.com/libbpf/libbpf/archive/v%{version}.tar.gz
BuildRequires: libelf-devel
%description
@@ -35,14 +32,12 @@ 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
Group: System/Libraries
%description -n %{libname}
libbpf is a C library which provides API for managing eBPF programs and maps.
%package devel
Summary: Development files for libbpf
Group: Development/Libraries/C and C++
Requires: %{libname} = %{version}
%description devel
@@ -50,10 +45,9 @@ libbpf is a C library which provides API for managing eBPF programs and maps.
%prep
%setup -q
%patch0 -p1
%build
%make_build -C src/
%make_build -C src/ CFLAGS="%{optflags}"
%install
%make_install -C src/
@@ -71,4 +65,3 @@ rm -f %{buildroot}%{_libdir}/%{name}.a
%{_libdir}/pkgconfig/%{name}.pc
%changelog

3
v0.0.6.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:dbed8304077699fd59b0271545ac5923a6e0581db4ef90d6124efa6fe9df84c1
size 213791