Accepting request 702941 from home:mrostecki

bpftool is a tool for inspection and manipulation of BPF programs developed by the Linux kernel and BPF community.

It has similar target and purpose as BCC which is developed in Base:System project, so I think it's a good devel project for bpftool as well.

OBS-URL: https://build.opensuse.org/request/show/702941
OBS-URL: https://build.opensuse.org/package/show/Base:System/bpftool?expand=0&rev=1
This commit is contained in:
Andreas Jaeger 2019-05-15 06:13:33 +00:00 committed by Git OBS Bridge
commit b91fa95e31
4 changed files with 80 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

4
bpftool.changes Normal file
View File

@ -0,0 +1,4 @@
-------------------------------------------------------------------
Thu May 9 14:41:11 UTC 2019 - Michal Rostecki <mrostecki@opensuse.org>
- Initial release

52
bpftool.spec Normal file
View File

@ -0,0 +1,52 @@
#
# spec file for package bpftool
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#
Name: bpftool
%define version %(rpm -q --qf '%%{VERSION}' kernel-source)
Version: %{version}
Release: 0
Summary: Tool for inspection and manipulation of BPF programs and maps
License: GPL-2.0
Group: Development/Tools/Other
Url: http://www.kernel.org/
BuildRequires: libelf-devel
BuildRequires: kernel-source
%description
bpftool allows for inspection and simple modification of BPF objects (programs
and maps) on the system.
%prep
(cd /usr/src/linux ; tar -cf - COPYING CREDITS README tools include scripts Kbuild Makefile arch/*/{include,lib,Makefile} kernel/bpf lib) | tar -xf -
cp /usr/src/linux/LICENSES/preferred/GPL-2.0 .
%build
cd tools/bpf/bpftool
%make_build feature-reallocarray=1
%install
cd tools/bpf/bpftool
make install DESTDIR=%{buildroot} prefix=/usr
%files
%license GPL-2.0
%{_sbindir}/bpftool
%{_datadir}/bash-completion/completions/bpftool
%changelog