aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorAdam Jensen <acjensen@gmail.com>2019-08-05 21:31:45 -0400
committerLeo <thinkabit.ukim@gmail.com>2019-08-31 14:07:43 -0300
commitb6f3c52f889edebea15fed5b33bd8fed624a7795 (patch)
tree830135975ab379fb63f7175cdd82597c9d5d1320 /testing
parentdeda17acda291fdd792e5f5af15c633750dc365e (diff)
community/bcc: move from testing
Diffstat (limited to 'testing')
-rw-r--r--testing/bcc/10-use-system-libbpf.patch132
-rw-r--r--testing/bcc/APKBUILD72
-rw-r--r--testing/libbpf/10-include-stddef.patch12
-rw-r--r--testing/libbpf/20-trailing-ldflags.patch29
-rw-r--r--testing/libbpf/30-include-bits-reg.patch12
-rw-r--r--testing/libbpf/APKBUILD33
6 files changed, 0 insertions, 290 deletions
diff --git a/testing/bcc/10-use-system-libbpf.patch b/testing/bcc/10-use-system-libbpf.patch
deleted file mode 100644
index 2d9160fd17d..00000000000
--- a/testing/bcc/10-use-system-libbpf.patch
+++ /dev/null
@@ -1,132 +0,0 @@
-diff --git a/introspection/CMakeLists.txt b/introspection/CMakeLists.txt
-index 88df6e84..4ee79d46 100644
---- a/introspection/CMakeLists.txt
-+++ b/introspection/CMakeLists.txt
-@@ -3,11 +3,11 @@
-
- include_directories(${CMAKE_SOURCE_DIR}/src/cc)
- include_directories(${CMAKE_SOURCE_DIR}/src/cc/api)
--include_directories(${CMAKE_SOURCE_DIR}/src/cc/libbpf/include/uapi)
-+include_directories(/usr/include/uapi)
-
- option(INSTALL_INTROSPECTION "Install BPF introspection tools" ON)
-
- add_executable(bps bps.c)
--target_link_libraries(bps bpf-static)
-+target_link_libraries(bps bccbpf-static)
-
- install (TARGETS bps DESTINATION share/bcc/introspection)
-diff --git a/introspection/bps.c b/introspection/bps.c
-index 5ac80999..f3680251 100644
---- a/introspection/bps.c
-+++ b/introspection/bps.c
-@@ -8,6 +8,7 @@
- #include <unistd.h>
- #include <ctype.h>
- #include <sysexits.h>
-+#include <linux/bpf.h>
-
- #include "libbpf.h"
-
-diff --git a/src/cc/CMakeLists.txt b/src/cc/CMakeLists.txt
-index bd34fd48..af781a33 100644
---- a/src/cc/CMakeLists.txt
-+++ b/src/cc/CMakeLists.txt
-@@ -10,8 +10,8 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/frontends/clang)
- include_directories(${LLVM_INCLUDE_DIRS})
- include_directories(${LIBELF_INCLUDE_DIRS})
- # todo: if check for kernel version
--include_directories(${CMAKE_CURRENT_SOURCE_DIR}/libbpf/include)
--include_directories(${CMAKE_CURRENT_SOURCE_DIR}/libbpf/include/uapi)
-+include_directories(/usr/include)
-+include_directories(/usr/include/uapi)
- add_definitions(${LLVM_DEFINITIONS})
- configure_file(libbcc.pc.in ${CMAKE_CURRENT_BINARY_DIR}/libbcc.pc @ONLY)
-
-@@ -28,12 +28,13 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DLLVM_MAJOR_VERSION=${CMAKE_MATCH_1}")
-
- include(static_libstdc++)
-
--file(GLOB libbpf_sources "libbpf/src/*.c")
--add_library(bpf-static STATIC libbpf.c perf_reader.c ${libbpf_sources})
--set_target_properties(bpf-static PROPERTIES OUTPUT_NAME bcc_bpf)
--add_library(bpf-shared SHARED libbpf.c perf_reader.c ${libbpf_sources})
--set_target_properties(bpf-shared PROPERTIES VERSION ${REVISION_LAST} SOVERSION 0)
--set_target_properties(bpf-shared PROPERTIES OUTPUT_NAME bcc_bpf)
-+add_library(bccbpf-static STATIC libbpf.c perf_reader.c)
-+set_target_properties(bccbpf-static PROPERTIES OUTPUT_NAME bccbpf)
-+target_link_libraries(bccbpf-static bpf)
-+add_library(bccbpf-shared SHARED libbpf.c perf_reader.c)
-+set_target_properties(bccbpf-shared PROPERTIES VERSION ${REVISION_LAST} SOVERSION 0)
-+set_target_properties(bccbpf-shared PROPERTIES OUTPUT_NAME bccbpf)
-+target_link_libraries(bccbpf-shared bpf)
-
- set(bcc_common_sources bcc_common.cc bpf_module.cc bcc_btf.cc exported_files.cc)
- if (${LLVM_PACKAGE_VERSION} VERSION_EQUAL 6 OR ${LLVM_PACKAGE_VERSION} VERSION_GREATER 6)
-@@ -79,11 +80,11 @@ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${llvm_lib_exclude_f
-
- # bcc_common_libs_for_a for archive libraries
- # bcc_common_libs_for_s for shared libraries
--set(bcc_common_libs_for_a b_frontend clang_frontend bpf-static
-+set(bcc_common_libs_for_a b_frontend clang_frontend bccbpf-static bpf
- -Wl,--whole-archive ${clang_libs} ${llvm_libs} -Wl,--no-whole-archive
- ${LIBELF_LIBRARIES})
- set(bcc_common_libs_for_s ${bcc_common_libs_for_a})
--set(bcc_common_libs_for_lua b_frontend clang_frontend bpf-static
-+set(bcc_common_libs_for_lua b_frontend clang_frontend bccbpf-static bpf
- ${clang_libs} ${llvm_libs} ${LIBELF_LIBRARIES})
-
- if(ENABLE_CPP_API)
-@@ -115,4 +116,4 @@ install(DIRECTORY libbpf/include/uapi/linux/ DESTINATION include/bcc/compat/linu
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libbcc.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
- endif(ENABLE_CLANG_JIT)
- install(FILES ${bcc_common_headers} DESTINATION include/bcc)
--install(TARGETS bpf-shared LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
-+install(TARGETS bccbpf-shared LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
-diff --git a/src/cc/bcc_btf.cc b/src/cc/bcc_btf.cc
-index 12816757..bd26f69f 100644
---- a/src/cc/bcc_btf.cc
-+++ b/src/cc/bcc_btf.cc
-@@ -17,10 +17,12 @@
- #include "bcc_btf.h"
- #include <stdarg.h>
- #include <string.h>
-+
-+#include <linux/bpf.h>
- #include "linux/btf.h"
- #include "libbpf.h"
--#include "libbpf/src/libbpf.h"
--#include "libbpf/src/btf.h"
-+#include "bpf/libbpf.h"
-+#include "bpf/btf.h"
- #include <vector>
-
- #define BCC_MAX_ERRNO 4095
-diff --git a/src/cc/bpf_module.cc b/src/cc/bpf_module.cc
-index 836c458f..7100e35d 100644
---- a/src/cc/bpf_module.cc
-+++ b/src/cc/bpf_module.cc
-@@ -43,7 +43,7 @@
- #include "exported_files.h"
- #include "libbpf.h"
- #include "bcc_btf.h"
--#include "libbpf/src/bpf.h"
-+#include "bpf/bpf.h"
-
- namespace ebpf {
-
-diff --git a/src/cc/libbpf.c b/src/cc/libbpf.c
-index 63f4894e..53d37f8e 100644
---- a/src/cc/libbpf.c
-+++ b/src/cc/libbpf.c
-@@ -52,8 +52,8 @@
- // TODO: Remove this when CentOS 6 support is not needed anymore
- #include "setns.h"
-
--#include "libbpf/src/bpf.h"
--#include "libbpf/src/libbpf.h"
-+#include "bpf/bpf.h"
-+#include "bpf/libbpf.h"
-
- // TODO: remove these defines when linux-libc-dev exports them properly
-
diff --git a/testing/bcc/APKBUILD b/testing/bcc/APKBUILD
deleted file mode 100644
index 52e1507d616..00000000000
--- a/testing/bcc/APKBUILD
+++ /dev/null
@@ -1,72 +0,0 @@
-# Maintainer: Adam Jensen <acjensen@gmail.com>
-pkgname=bcc
-pkgver=0.10.0
-pkgrel=2
-pkgdesc="A toolkit for creating efficient kernel tracing and manipulation programs"
-url="https://github.com/iovisor/bcc/"
-arch="aarch64 x86 x86_64"
-license="Apache-2.0"
-# bcc's test suite requires privileged access to run BPF programs
-options="!check"
-subpackages="$pkgname-dev $pkgname-doc:_doc $pkgname-tools:_tools $pkgname-lua:_lua py-$pkgname:_py"
-_llvmver=8
-makedepends="tar git llvm$_llvmver-dev llvm$_llvmver-static clang-dev clang-static cmake python
- flex-dev bison luajit-dev build-base iperf linux-headers elfutils-dev zlib-dev
- libbpf-dev"
-source="$pkgname-$pkgver.tar.gz::https://github.com/iovisor/bcc/archive/v$pkgver.tar.gz
- 10-use-system-libbpf.patch"
-
-prepare() {
- rm -rf tests/* && touch tests/CMakeLists.txt
- rm -rf examples/* && touch examples/CMakeLists.txt
-
- default_prepare
-}
-
-build() {
- mkdir -p "$builddir/build"
- cd "$builddir/build"
- cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_INSTALL_LIBDIR=/usr/lib ..
- make
-}
-
-package() {
- cd "$builddir/build"
- make install DESTDIR="$pkgdir"
-}
-
-_doc() {
- pkgdesc="$pkgdesc (documentation)"
-
- mkdir -p "$subpkgdir"/usr/share/bcc/tools
- mv "$pkgdir"/usr/share/bcc/man "$subpkgdir"/usr/share/bcc
- mv "$pkgdir"/usr/share/bcc/tools/doc "$subpkgdir"/usr/share/bcc/tools
-}
-
-_tools() {
- depends="$pkgname py-$pkgname"
- pkgdesc="$pkgdesc (tools)"
-
- mkdir -p "$subpkgdir"/usr/share/bcc
- mv "$pkgdir"/usr/share/bcc/tools "$subpkgdir"/usr/share/bcc
- mv "$pkgdir"/usr/share/bcc/introspection "$subpkgdir"/usr/share/bcc
-}
-
-_py() {
- depends="$pkgname python"
- pkgdesc="$pkgdesc (python bindings)"
-
- mkdir -p "$subpkgdir"/usr/lib
- mv "$pkgdir"/usr/lib/python2.7 "$subpkgdir"/usr/lib/python2.7
-}
-
-_lua() {
- depends="$pkgname"
- pkgdesc="$pkgdesc (lua bindings)"
-
- mkdir -p "$subpkgdir"/usr/bin
- mv "$pkgdir"/usr/bin/bcc-lua "$subpkgdir"/usr/bin
-}
-
-sha512sums="92ba0f57d22af610ac81661526fed8bec80d502bcbc8aa5048ba7c50911247c020832db23afdcf9b555b142cd387c228cf7baa0ddc94067165403e362227f235 bcc-0.10.0.tar.gz
-e2f0cc063a13e2d5ad57db364e29c064f2c351b82bbd4013d613614adab3b9f4aa555ac71e06189807d32211fdef5c9520b4bc5df2db5de3db02123503d242a8 10-use-system-libbpf.patch"
diff --git a/testing/libbpf/10-include-stddef.patch b/testing/libbpf/10-include-stddef.patch
deleted file mode 100644
index e3fe4d1a9c9..00000000000
--- a/testing/libbpf/10-include-stddef.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/src/libbpf.c b/src/libbpf.c
-index b38dcbe..bc3ac5d 100644
---- a/src/libbpf.c
-+++ b/src/libbpf.c
-@@ -29,6 +29,7 @@
- #include <linux/filter.h>
- #include <linux/list.h>
- #include <linux/limits.h>
-+#include <linux/stddef.h>
- #include <linux/perf_event.h>
- #include <linux/ring_buffer.h>
- #include <sys/stat.h>
diff --git a/testing/libbpf/20-trailing-ldflags.patch b/testing/libbpf/20-trailing-ldflags.patch
deleted file mode 100644
index 7f65ef5645a..00000000000
--- a/testing/libbpf/20-trailing-ldflags.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-diff --git a/src/Makefile b/src/Makefile
-index e9021fe..1d86ecd 100644
---- a/src/Makefile
-+++ b/src/Makefile
-@@ -54,11 +54,7 @@ INSTALL = install
-
- DESTDIR ?=
-
--ifeq ($(shell uname -m),x86_64)
-- LIBSUBDIR := lib64
--else
-- LIBSUBDIR := lib
--endif
-+LIBSUBDIR := lib
-
- PREFIX ?= /usr
- LIBDIR ?= $(PREFIX)/$(LIBSUBDIR)
-@@ -77,9 +73,9 @@ $(OBJDIR)/libbpf.so.$(VERSION): $(OBJDIR)/libbpf.so.$(LIBBPF_VERSION)
- ln -sf $(^F) $@
-
- $(OBJDIR)/libbpf.so.$(LIBBPF_VERSION): $(OBJS)
-- $(CC) -shared $(ALL_LDFLAGS) -Wl,--version-script=$(VERSION_SCRIPT) \
-+ $(CC) -shared -Wl,--version-script=$(VERSION_SCRIPT) \
- -Wl,-soname,libbpf.so.$(VERSION) \
-- $^ -o $@
-+ $^ -o $@ $(ALL_LDFLAGS)
-
- $(OBJDIR)/libbpf.pc:
- sed -e "s|@PREFIX@|$(PREFIX)|" \
diff --git a/testing/libbpf/30-include-bits-reg.patch b/testing/libbpf/30-include-bits-reg.patch
deleted file mode 100644
index fc3521a1602..00000000000
--- a/testing/libbpf/30-include-bits-reg.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/src/hashmap.h b/src/hashmap.h
-index 03748a7..e83055e 100644
---- a/src/hashmap.h
-+++ b/src/hashmap.h
-@@ -10,4 +10,5 @@
-
- #include <stdbool.h>
- #include <stddef.h>
-+#include <bits/reg.h>
- #include "libbpf_internal.h"
-
- static inline size_t hash_bits(size_t h, int bits)
diff --git a/testing/libbpf/APKBUILD b/testing/libbpf/APKBUILD
deleted file mode 100644
index dad48f3f2ab..00000000000
--- a/testing/libbpf/APKBUILD
+++ /dev/null
@@ -1,33 +0,0 @@
-# Maintainer: Adam Jensen <acjensen@gmail.com>
-pkgname=libbpf
-pkgver=0.0.4
-pkgrel=0
-pkgdesc="A library for interacting with the Linux kernel's Berkeley Packet Filter (BPF) facility from user space"
-url="https://github.com/libbpf/libbpf"
-arch="aarch64 x86 x86_64 s390x"
-license="GPL-2.0-only"
-# No test suite
-options="!check"
-depends="elfutils"
-makedepends="build-base linux-headers elfutils-dev"
-subpackages="$pkgname-dev"
-source="$pkgname-$pkgver.tar.gz::https://github.com/$pkgname/$pkgname/archive/v$pkgver.tar.gz
- 10-include-stddef.patch
- 20-trailing-ldflags.patch
- 30-include-bits-reg.patch"
-
-build() {
- cd src
- make NO_PKG_CONFIG=1
-}
-
-package() {
- cd src
- make install DESTDIR="$pkgdir"
- cp -R "$builddir/include/uapi" "$pkgdir/usr/include/uapi"
-}
-
-sha512sums="1e4a16ed0f3e378aa9d7080e4b54cb3a9542975105b09977d1ddecf3ae4dabb3b5edf80b92b61644b1f0cbda7ee7e135ee0f736e71c1d201a97b1b3dd573b543 libbpf-0.0.4.tar.gz
-946e445ffa4c5df42ebac77b7a1c6478b37dc7b55e0883aee195c6a8c4f8718b4dbf98b7c6d3016e1619e59440d8e4a76dad1e843114dfe2f9a2610e5cbb7943 10-include-stddef.patch
-1ec15c45fc085b44aa1f6d5626f0ba9e57280304d1f6e1c4e7fe8e2b81fc927f5500fd48f8e70d2affb91dd67a74a80c85698d39bb85febde5abd479df5cdccc 20-trailing-ldflags.patch
-27cfd7799bad695e5a1b949cfa12fd37f13d01256f4cc19a990a7c8cc2786d429f7ec6d99c6eea1ab48590662b6769f9d814fcb343de61f3e222a7a68a751876 30-include-bits-reg.patch"