diff options
Diffstat (limited to 'dev-util/bcc')
-rw-r--r-- | dev-util/bcc/Manifest | 7 | ||||
-rw-r--r-- | dev-util/bcc/bcc-0.9.0-r1.ebuild | 73 | ||||
-rw-r--r-- | dev-util/bcc/files/bcc-0.9.0-no-luajit-automagic-dep.patch | 20 | ||||
-rw-r--r-- | dev-util/bcc/files/bcc-0.9.0-system-libbpf.patch | 100 | ||||
-rw-r--r-- | dev-util/bcc/metadata.xml | 3 |
5 files changed, 202 insertions, 1 deletions
diff --git a/dev-util/bcc/Manifest b/dev-util/bcc/Manifest index 1b85fd8b7232..f8c3beb246e1 100644 --- a/dev-util/bcc/Manifest +++ b/dev-util/bcc/Manifest @@ -1,5 +1,10 @@ +AUX bcc-0.9.0-no-luajit-automagic-dep.patch 463 BLAKE2B 286ed298055cbdb22d9c3f3f064c77da685cf75cc8c0ab0cad4d4b473f0eac0b1533ca8eb7e6159108d184d16db7a264b0ea9d30ccdc3d988d88bab28be7310d SHA512 6e5c20de22547410ffa566cb8226a47ee0e8c91183bc5b70eb22637a08fe55cfc96fde169ef3ab8d6e8d7c9e356c35e61b164b3ad675835d3ea8d5239a448979 +AUX bcc-0.9.0-system-libbpf.patch 3629 BLAKE2B e3fd70ccd29126bd2ac8582d8094ef0317dbc9dafc8924a05d994105573a6bd1bf382cbd3d6a0bb25390abc3b4ca3edc70293f4663337ccc203434ba380648dd SHA512 e7ca33a66ffbe4cb4b4bf169029d2325b4321018832803872a7fc7f1e99a75338e34bfe55a072f717d45f9759adf119ed5289f0febd45f81303c178999ef5dc7 DIST bcc-0.6.0.tar.gz 1986593 BLAKE2B 514c2c781eb94d99560232d8050b5664ce3565622b236e78cd111be27b3482849965600a1d574f59243917672f00bb3cef65cab63103f6c4a5cf62024c683d9b SHA512 1a8edf6da22f3119a74cf43f03ec83b97ed2f6fc18828d750d8a695ac1451b6b3209e5d2cf48bc87f53fa9447e8813a018a58d31588d477e4aa364a2d0217e80 DIST bcc-0.7.0.tar.gz 2009289 BLAKE2B 370b553521289d983d1165633e76a5e405250b9b09dbf3e78c127d232908e73facce06097ce4dbf0bbccda929b6715a9b7460affe123556087c8ca00b8d62c0b SHA512 ebe6c4cbecba2d587c69af71ddc8cb451b2b8e1d49ef887f291c813320c2c60d49357500fc2751d5b418df2be1d02763c385d89de6efa6e10f049c25acf01b4e +DIST bcc-0.9.0-linux-5-bpf.patch.xz 28524 BLAKE2B f0369e50eabd7b1eb9a492b9652cd7647c7c7fda3b01db1e7f2bf716e76357d07d67193b31189b98309e26895ac3dd5c755d4cef6bc592e4674f40710c33539c SHA512 fc5b828a5826da2cf1e1a76758c635f5443d202aecbe3f269d78abcaa0117ad7658bea6c43e7b60e1ecc6bcc65bd19b100217758a1203d278ddb03c5837c43f1 +DIST bcc-0.9.0.tar.gz 2036984 BLAKE2B cebbeb57f06af90442d28be1633a54c198bf796786c4fcca3a83dea03bc76949f958dd24f7d85feb2e3402576410f965754f3d031076486b7d378493c56035e8 SHA512 373080181380ec3bcb13469e29ff1f792e924a2df00a614da4647ed54060ad216525dd0f49c5d0afba7946a6d2f4e3475af97250a33db825945af3d165294091 EBUILD bcc-0.6.0.ebuild 1137 BLAKE2B d9c11470ea2fc096cbeaba592d0181652376d8c4774c1e69c4b9a0cf38ae8835824a4090b75dc6def4dace3b26be263aa12c52f1283912c86580dc9334ff6f82 SHA512 bdbf5614a9ab1fb148594cdcf9c2c53069d2909bc88a244f47395bfc4b9b4851d965feec460ec08ea2289b6f0198cec2d41d3ad22de0c02626577df9d8528605 EBUILD bcc-0.7.0.ebuild 1136 BLAKE2B 12bdef1faaaed5755813cef01a381e08b5bac2119c85f7bdcff4af1584d8cd46722c35daac1ecfdfd07288a568e3e514e0f0ba01aca6ba3c3ded5a1dbde0a0b8 SHA512 525502acf9faedca72bf34ab12e7ca85830e7e4ad474196b4968ed18d3a44d6865e51fc190ef83985ff766104d712d6cf23d857c8b8e7345ab2c98154ab58472 -MISC metadata.xml 302 BLAKE2B 1c06a0a2737ee7f574578ffa657d131a6c296e7f21dbf79f77f47f77814779b82fa6d2d7e21aa6700e11ce3c11daec48595db4a82d06e11eddeaacd377cf8fe4 SHA512 56eecad64a95bef18df26d32d87911e46c8222079387c946b086c38be9b22ec07dbd715344f373ca486758dadf65d84f1ec289af065f964adcff8b2e8906b6ad +EBUILD bcc-0.9.0-r1.ebuild 1670 BLAKE2B 947df6d21a52d197fa05c307f02cd40bd34a98bd015036016837f46a081a842cab0a02bfb9a433f5f0180753f5b3de7f3af7c95071eceafe496adbb62aeb4464 SHA512 8ecfb0764de2ee7e53e2d64e81d6d9b2fd7e0d5c94dc523f06564977da28e26769d388658197238f6a8acbe0c189923a0208923a3e77997b30453e9e8859de34 +MISC metadata.xml 386 BLAKE2B 73062e6902dd7d7f9afb988cce26a8aa5a66e1252652ae364f2295b0a5e77013eec682b36ab65c93772843ad0ec8c7187cd29d8308a3ba17dbacd1ef193f03ae SHA512 6529fa57011cd17b9892e1b8f05e063ae6314f85665a30881335efa80e9b9238a7b61d1f732316e45496707bf350d03149e7ec5efdf1a0fee6d5a788b58a7e70 diff --git a/dev-util/bcc/bcc-0.9.0-r1.ebuild b/dev-util/bcc/bcc-0.9.0-r1.ebuild new file mode 100644 index 000000000000..f23a490a9026 --- /dev/null +++ b/dev-util/bcc/bcc-0.9.0-r1.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python2_7 python3_{5,6,7} ) + +inherit cmake-utils linux-info python-single-r1 python-utils-r1 + +DESCRIPTION="Tools for BPF-based Linux IO analysis, networking, monitoring, and more" +HOMEPAGE="https://iovisor.github.io/bcc/" +EGIT_COMMIT="v${PV}" +SRC_URI="https://github.com/iovisor/bcc/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz + mirror://gentoo/bcc-0.9.0-linux-5-bpf.patch.xz" +RESTRICT="test" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+luajit" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +RDEPEND="dev-libs/libbpf:= + >=sys-kernel/linux-headers-4.18 + >=dev-libs/elfutils-0.166:= + sys-devel/clang:= + >=sys-devel/llvm-3.7.1:=[llvm_targets_BPF(+)] + luajit? ( dev-lang/luajit ) + ${PYTHON_DEPS}" +DEPEND="${RDEPEND}" +BDEPEND="dev-util/cmake + virtual/pkgconfig" + +S=${WORKDIR}/${PN}-${EGIT_COMMIT#v} + +PATCHES=( + "${FILESDIR}/bcc-0.9.0-system-libbpf.patch" + "${FILESDIR}/bcc-0.9.0-no-luajit-automagic-dep.patch" +) + +pkg_pretend() { + local CONFIG_CHECK="~BPF ~BPF_SYSCALL ~NET_CLS_BPF ~NET_ACT_BPF + ~BPF_JIT ~BPF_EVENTS ~DEBUG_INFO ~FUNCTION_TRACER ~KALLSYMS_ALL + ~KPROBES" + + check_extra_config +} + +pkg_setup() { + python-single-r1_pkg_setup +} + +src_prepare() { + # needs bpf.h from linux-5.0 to build + has_version '>=sys-kernel/linux-headers-5.0' || \ + eapply "${WORKDIR}/bcc-0.9.0-linux-5-bpf.patch" + + cmake-utils_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DREVISION=${PV%%_*} + $(usex luajit '-DWITH_LUAJIT=1' '' '' '') + ) + + cmake-utils_src_configure +} + +src_install() { + cmake-utils_src_install + python_fix_shebang "${ED}" +} diff --git a/dev-util/bcc/files/bcc-0.9.0-no-luajit-automagic-dep.patch b/dev-util/bcc/files/bcc-0.9.0-no-luajit-automagic-dep.patch new file mode 100644 index 000000000000..ee076efce926 --- /dev/null +++ b/dev-util/bcc/files/bcc-0.9.0-no-luajit-automagic-dep.patch @@ -0,0 +1,20 @@ +diff --git a/cmake/FindLuaJIT.cmake b/cmake/FindLuaJIT.cmake +index 5a2bcf85..7f6e07e4 100644 +--- a/cmake/FindLuaJIT.cmake ++++ b/cmake/FindLuaJIT.cmake +@@ -28,6 +28,7 @@ + # 2010 - modified for cronkite to find luajit instead of lua, as it was before. + # + ++if(WITH_LUAJIT) + FIND_PATH(LUAJIT_INCLUDE_DIR lua.h + HINTS + $ENV{LUAJIT_DIR} +@@ -58,6 +59,7 @@ FIND_LIBRARY(LUAJIT_LIBRARY + /opt/csw + /opt + ) ++endif() + + IF(LUAJIT_LIBRARY) + IF(UNIX AND NOT APPLE) diff --git a/dev-util/bcc/files/bcc-0.9.0-system-libbpf.patch b/dev-util/bcc/files/bcc-0.9.0-system-libbpf.patch new file mode 100644 index 000000000000..18868272dcbe --- /dev/null +++ b/dev-util/bcc/files/bcc-0.9.0-system-libbpf.patch @@ -0,0 +1,100 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 94aac856..33492c27 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -61,6 +61,9 @@ FOREACH(DIR ${LLVM_INCLUDE_DIRS}) + include_directories("${DIR}/../tools/clang/include") + ENDFOREACH() + ++find_package(PkgConfig) ++pkg_check_modules(LIBBPF REQUIRED libbpf) ++ + # Set to a string path if system places kernel lib directory in + # non-default location. + if(NOT DEFINED BCC_KERNEL_MODULES_DIR) +diff --git a/introspection/CMakeLists.txt b/introspection/CMakeLists.txt +index 88df6e84..a4033c02 100644 +--- a/introspection/CMakeLists.txt ++++ b/introspection/CMakeLists.txt +@@ -8,6 +8,6 @@ include_directories(${CMAKE_SOURCE_DIR}/src/cc/libbpf/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 bpf-static ${LIBBPF_LIBRARIES}) + + install (TARGETS bps DESTINATION share/bcc/introspection) +diff --git a/src/cc/CMakeLists.txt b/src/cc/CMakeLists.txt +index 59a59856..2af70525 100644 +--- a/src/cc/CMakeLists.txt ++++ b/src/cc/CMakeLists.txt +@@ -28,7 +28,7 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DLLVM_MAJOR_VERSION=${CMAKE_MATCH_1}") + + include(static_libstdc++) + +-file(GLOB libbpf_sources "libbpf/src/*.c") ++#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 bpf) + add_library(bpf-shared SHARED libbpf.c perf_reader.c ${libbpf_sources}) +@@ -81,10 +81,10 @@ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${llvm_lib_exclude_f + # bcc_common_libs_for_s for shared libraries + set(bcc_common_libs_for_a b_frontend clang_frontend bpf-static + -Wl,--whole-archive ${clang_libs} ${llvm_libs} -Wl,--no-whole-archive +- ${LIBELF_LIBRARIES}) ++ ${LIBELF_LIBRARIES} ${LIBBPF_LIBRARIES}) + set(bcc_common_libs_for_s ${bcc_common_libs_for_a}) + set(bcc_common_libs_for_lua b_frontend clang_frontend bpf-static +- ${clang_libs} ${llvm_libs} ${LIBELF_LIBRARIES}) ++ ${clang_libs} ${llvm_libs} ${LIBELF_LIBRARIES} ${LIBBPF_LIBRARIES}) + + if(ENABLE_CPP_API) + add_subdirectory(api) +@@ -115,4 +115,3 @@ 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}) +diff --git a/src/cc/bcc_btf.cc b/src/cc/bcc_btf.cc +index 881959af..62f73f54 100644 +--- a/src/cc/bcc_btf.cc ++++ b/src/cc/bcc_btf.cc +@@ -19,8 +19,8 @@ + #include <string.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 cf6ea8f3..1be7b788 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 9b0024dc..7b3eca4b 100644 +--- a/src/cc/libbpf.c ++++ b/src/cc/libbpf.c +@@ -51,8 +51,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/dev-util/bcc/metadata.xml b/dev-util/bcc/metadata.xml index 43eb746c3b02..4611e0157556 100644 --- a/dev-util/bcc/metadata.xml +++ b/dev-util/bcc/metadata.xml @@ -4,6 +4,9 @@ <maintainer type="person"> <email>zmedico@gentoo.org</email> </maintainer> + <maintainer type="person"> + <email>chutzpah@gentoo.org</email> + </maintainer> <upstream> <remote-id type="github">iovisor/bcc</remote-id> </upstream> |