summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick McLean <patrick.mclean@sony.com>2021-10-26 10:52:59 -0700
committerPatrick McLean <chutzpah@gentoo.org>2021-10-26 10:52:59 -0700
commit3a6dd727b27797569f9e9a9156691fe9487f3dcc (patch)
tree38502e836a7a0580dcca86a6a3df22617d1175da
parentsys-cluster/ceph: remove unused patches (diff)
downloadgentoo-3a6dd727b27797569f9e9a9156691fe9487f3dcc.tar.gz
gentoo-3a6dd727b27797569f9e9a9156691fe9487f3dcc.tar.bz2
gentoo-3a6dd727b27797569f9e9a9156691fe9487f3dcc.zip
dev-util/bpftrace-0.14.0: Version bump
Copyright: Sony Interactive Entertainment Inc. Package-Manager: Portage-3.0.28, Repoman-3.0.3 Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
-rw-r--r--dev-util/bpftrace/Manifest1
-rw-r--r--dev-util/bpftrace/bpftrace-0.14.0.ebuild98
-rw-r--r--dev-util/bpftrace/files/bpftrace-0.14.0-dont-compress-man.patch45
-rw-r--r--dev-util/bpftrace/files/bpftrace-0.14.0-install-libs.patch192
4 files changed, 336 insertions, 0 deletions
diff --git a/dev-util/bpftrace/Manifest b/dev-util/bpftrace/Manifest
index 6f80ffa13ad4..62e26ac7c805 100644
--- a/dev-util/bpftrace/Manifest
+++ b/dev-util/bpftrace/Manifest
@@ -1,2 +1,3 @@
DIST bpftrace-0.12.1.tar.gz 938043 BLAKE2B 3599c21d2381265ab5a7a3c0bf142dc7f79acb66fbb4f54b4100d042c21fc3c9e86297522bfe46f82ad5edbc2203314a6b02ff7cc07552c778b0726e681cb993 SHA512 a578499668bd2eb7342689b6c0ef3db6ca263a971d8e6f1b9a68c502c27170d24ede212a0fc2a72263e72aff58924f488a5c80d447397503a08512dc47b63345
DIST bpftrace-0.13.0.tar.gz 952412 BLAKE2B 8e3f6f28b0c652e2257e1a970b80b87ba5ac5e94dc26719bffe16a0bbff48efc2b9ab5bc03e5fe4b764f5c9c3df16039d931f1f13c1f14327880838a373edacc SHA512 16b3f11c365cc7e306045a5cb6bcf6c66b92d746884f6587ce7cc4c76841b284757bff7b38b9838eb3db129e996e4f1b13afec34da57981362dadef8460816d0
+DIST bpftrace-0.14.0.tar.gz 991314 BLAKE2B 3222068d7f84c13f736197cef2d188fa31a25db6bd266afe5cbacb1c062155b5ebd5d0310fbad56c15574a795766a33b12624f0252b0bc0677bf05324f414df5 SHA512 78f2d9a4d54c0dda1947b924a828777b402befc3a05031b609da4d256907df1e64f946454a9be7317449f49706f02a881febc4e63d2ef2f4e76924ea19e36ddb
diff --git a/dev-util/bpftrace/bpftrace-0.14.0.ebuild b/dev-util/bpftrace/bpftrace-0.14.0.ebuild
new file mode 100644
index 000000000000..483f341c4909
--- /dev/null
+++ b/dev-util/bpftrace/bpftrace-0.14.0.ebuild
@@ -0,0 +1,98 @@
+# Copyright 2019-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit toolchain-funcs llvm linux-info cmake
+
+DESCRIPTION="High-level tracing language for eBPF"
+HOMEPAGE="https://github.com/iovisor/bpftrace"
+
+if [[ ${PV} =~ 9{4,} ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/iovisor/${PN}"
+ BDEPEND=""
+else
+ MY_PV="${PV//_/}"
+ SRC_URI="https://github.com/iovisor/${PN}/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+ BDEPEND="app-arch/xz-utils "
+fi
+
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="fuzzing test"
+
+COMMON_DEPEND="
+ dev-libs/libbpf:=
+ >=dev-util/bcc-0.13.0:=
+ dev-util/systemtap
+ >=sys-devel/llvm-6:=[llvm_targets_BPF(+)]
+ <=sys-devel/llvm-13:=[llvm_targets_BPF(+)]
+ <=sys-devel/clang-13:=
+ sys-libs/binutils-libs:=
+ virtual/libelf
+"
+DEPEND="
+ ${COMMON_DEPEND}
+ dev-libs/cereal:=
+ test? ( dev-cpp/gtest )
+"
+RDEPEND="
+ ${COMMON_DEPEND}
+"
+BDEPEND+="
+ >=dev-util/cmake-3.8
+ sys-devel/flex
+ sys-devel/bison
+"
+
+S="${WORKDIR}/${PN}-${MY_PV:-${PV}}"
+QA_DT_NEEDED="/usr/lib.*/libbpftraceresources.so"
+
+PATCHES=(
+ "${FILESDIR}/bpftrace-0.14.0-install-libs.patch"
+ "${FILESDIR}/bpftrace-0.14.0-dont-compress-man.patch"
+ "${FILESDIR}/bpftrace-0.11.4-old-kernels.patch"
+ "${FILESDIR}/bpftrace-0.12.0-fuzzing-build.patch"
+)
+
+# lots of fixing needed
+RESTRICT="test"
+
+pkg_pretend() {
+ local CONFIG_CHECK="
+ ~BPF
+ ~BPF_EVENTS
+ ~BPF_JIT
+ ~BPF_SYSCALL
+ ~FTRACE_SYSCALLS
+ ~HAVE_EBPF_JIT
+ "
+
+ check_extra_config
+}
+
+pkg_setup() {
+ LLVM_MAX_SLOT=12 llvm_pkg_setup
+}
+
+src_prepare() {
+ cmake_src_prepare
+}
+
+src_configure() {
+ local -a mycmakeargs=(
+ -DSTATIC_LINKING:BOOL=OFF
+ -DBUILD_TESTING:BOOL=OFF
+ -DBUILD_FUZZ:BOOL=$(usex fuzzing)
+ -DENABLE_MAN:BOOL=OFF
+ )
+
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_src_install
+ doman man/man8/*.?
+}
diff --git a/dev-util/bpftrace/files/bpftrace-0.14.0-dont-compress-man.patch b/dev-util/bpftrace/files/bpftrace-0.14.0-dont-compress-man.patch
new file mode 100644
index 000000000000..30f3b4a7c463
--- /dev/null
+++ b/dev-util/bpftrace/files/bpftrace-0.14.0-dont-compress-man.patch
@@ -0,0 +1,45 @@
+diff --git a/man/adoc/CMakeLists.txt b/man/adoc/CMakeLists.txt
+index 6f785d9d..c046b79f 100644
+--- a/man/adoc/CMakeLists.txt
++++ b/man/adoc/CMakeLists.txt
+@@ -1,7 +1,5 @@
+-find_program(GZIP gzip REQUIRED)
+ find_program(ASCIIDOCTOR asciidoctor REQUIRED)
+ file(GLOB FILES *.adoc)
+-set(GZFILES "")
+ foreach(FIL ${FILES})
+ get_filename_component(NAME ${FIL} NAME_WE)
+ set(MANPAGE_FILE ${CMAKE_CURRENT_BINARY_DIR}/${NAME}.8)
+@@ -10,12 +8,6 @@ foreach(FIL ${FILES})
+ add_custom_command(OUTPUT ${MANPAGE_FILE}
+ COMMAND ${ASCIIDOCTOR} ${FIL} -b manpage -o - > ${MANPAGE_FILE}
+ DEPENDS ${FIL})
+-
+- add_custom_command(OUTPUT ${GZ_MANPAGE_FILE}
+- COMMAND ${GZIP} -c ${MANPAGE_FILE} > ${GZ_MANPAGE_FILE}
+- DEPENDS ${MANPAGE_FILE})
+-
+- list(APPEND GZFILES ${GZ_MANPAGE_FILE})
+ endforeach()
+-add_custom_target(adoc_man DEPENDS ${GZFILES})
+-install(FILES ${GZFILES} DESTINATION ${CMAKE_INSTALL_MANDIR}/man8)
++add_custom_target(adoc_man DEPENDS ${FILES})
++install(FILES ${FILES} DESTINATION ${CMAKE_INSTALL_MANDIR}/man8)
+diff --git a/man/man8/CMakeLists.txt b/man/man8/CMakeLists.txt
+index 2a316cd9..2207cf80 100644
+--- a/man/man8/CMakeLists.txt
++++ b/man/man8/CMakeLists.txt
+@@ -1,12 +1,3 @@
+-find_program(GZIP gzip REQUIRED)
+ file(GLOB FILES *.8)
+-set(GZFILES "")
+-foreach(FIL ${FILES})
+- get_filename_component(NAME ${FIL} NAME)
+- add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${NAME}.gz
+- COMMAND ${GZIP} -c ${FIL} > ${CMAKE_CURRENT_BINARY_DIR}/${NAME}.gz
+- DEPENDS ${FIL})
+- list(APPEND GZFILES "${CMAKE_CURRENT_BINARY_DIR}/${NAME}.gz")
+-endforeach()
+ add_custom_target(man_man DEPENDS ${GZFILES})
+-install(FILES ${GZFILES} DESTINATION ${CMAKE_INSTALL_MANDIR}/man8)
++install(FILES ${FILES} DESTINATION ${CMAKE_INSTALL_MANDIR}/man8)
diff --git a/dev-util/bpftrace/files/bpftrace-0.14.0-install-libs.patch b/dev-util/bpftrace/files/bpftrace-0.14.0-install-libs.patch
new file mode 100644
index 000000000000..00d35c6f49e7
--- /dev/null
+++ b/dev-util/bpftrace/files/bpftrace-0.14.0-install-libs.patch
@@ -0,0 +1,192 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ea334df0..53e4dc8e 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -103,9 +103,10 @@ find_package(FLEX REQUIRED)
+ bison_target(bison_parser src/parser.yy ${CMAKE_BINARY_DIR}/parser.tab.cc VERBOSE)
+ flex_target(flex_lexer src/lexer.l ${CMAKE_BINARY_DIR}/lex.yy.cc)
+ add_flex_bison_dependency(flex_lexer bison_parser)
+-add_library(parser ${BISON_bison_parser_OUTPUTS} ${FLEX_flex_lexer_OUTPUTS})
+-target_compile_options(parser PRIVATE "-w")
+-target_include_directories(parser PUBLIC src src/ast ${CMAKE_BINARY_DIR})
++add_library(bpftraceparser ${BISON_bison_parser_OUTPUTS} ${FLEX_flex_lexer_OUTPUTS})
++target_compile_options(bpftraceparser PRIVATE "-w")
++target_include_directories(bpftraceparser PUBLIC src src/ast ${CMAKE_BINARY_DIR})
++install(TARGETS bpftraceparser LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
+
+ include(CheckSymbolExists)
+ set(CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE)
+diff --git a/resources/CMakeLists.txt b/resources/CMakeLists.txt
+index a95c60a1..f5c4d676 100644
+--- a/resources/CMakeLists.txt
++++ b/resources/CMakeLists.txt
+@@ -1,6 +1,7 @@
+-add_library(resources headers.cpp)
++add_library(bpftraceresources headers.cpp)
+
+-target_include_directories(resources PUBLIC ../src)
++target_include_directories(bpftraceresources PUBLIC ../src)
++install(TARGETS bpftraceresources LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
+
+ function(embed_headers output)
+ file(WRITE ${output} "#include \"headers.h\"\n\nnamespace bpftrace {\n")
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 47a050e2..1bbcf882 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -40,7 +40,7 @@ add_library(runtime
+ ${BFD_DISASM_SRC}
+ )
+ # Ensure flex+bison outputs are built first
+-add_dependencies(runtime parser)
++add_dependencies(runtime bpftraceparser)
+
+ add_library(libbpftrace
+ build_info.cpp
+@@ -57,6 +57,7 @@ add_executable(${BPFTRACE}
+ )
+
+ install(TARGETS ${BPFTRACE} DESTINATION ${CMAKE_INSTALL_BINDIR})
++install(TARGETS libbpftrace LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ target_link_libraries(${BPFTRACE} libbpftrace)
+
+ if (BUILD_FUZZ)
+@@ -109,6 +110,7 @@ target_include_directories(runtime PRIVATE ${CMAKE_BINARY_DIR})
+ target_include_directories(runtime PRIVATE ${CMAKE_SOURCE_DIR}/src)
+ target_include_directories(runtime PRIVATE ${CMAKE_SOURCE_DIR}/src/ast)
+ target_compile_definitions(runtime PRIVATE ${BPFTRACE_FLAGS})
++install(TARGETS runtime LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ target_compile_definitions(libbpftrace PRIVATE ${BPFTRACE_FLAGS})
+
+ # Linking
+@@ -121,7 +123,8 @@ if(STATIC_LINKING)
+ endif(STATIC_LINKING)
+
+
+-target_link_libraries(libbpftrace parser resources runtime aot ast arch cxxdemangler_llvm)
++target_link_libraries(libbpftrace bpftraceparser bpftraceresources
++ runtime aot bpftraceast bpftracearch cxxdemangler_llvm)
+
+ if (LIBBPF_BTF_DUMP_FOUND)
+ target_include_directories(runtime PUBLIC ${LIBBPF_INCLUDE_DIRS})
+diff --git a/src/aot/CMakeLists.txt b/src/aot/CMakeLists.txt
+index 291d53f2..308691ee 100644
+--- a/src/aot/CMakeLists.txt
++++ b/src/aot/CMakeLists.txt
+@@ -10,7 +10,7 @@ if(NOT LIBBCC_BPF_CONTAINS_RUNTIME)
+ endif()
+
+ add_executable(bpftrace-aotrt aot_main.cpp)
+-target_link_libraries(bpftrace-aotrt aot runtime arch ast_defs cxxdemangler_stdlib)
++target_link_libraries(bpftrace-aotrt aot runtime bpftracearch ast_defs cxxdemangler_stdlib)
+ install(TARGETS bpftrace-aotrt DESTINATION ${CMAKE_INSTALL_BINDIR})
+
+ # Linking
+@@ -27,3 +27,4 @@ if(BUILD_ASAN)
+ target_compile_options(bpftrace-aotrt PUBLIC "-fsanitize=address")
+ target_link_options(bpftrace-aotrt PUBLIC "-fsanitize=address")
+ endif()
++install(TARGETS aot LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
+diff --git a/src/arch/CMakeLists.txt b/src/arch/CMakeLists.txt
+index 76bb217e..4ad0f626 100644
+--- a/src/arch/CMakeLists.txt
++++ b/src/arch/CMakeLists.txt
+@@ -1,15 +1,17 @@
+ if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
+- add_library(arch aarch64.cpp)
++ add_library(bpftracearch aarch64.cpp)
+ elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "ppc64" OR
+ CMAKE_SYSTEM_PROCESSOR STREQUAL "ppc64le")
+- add_library(arch ppc64.cpp)
++ add_library(bpftracearch ppc64.cpp)
+ elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "s390" OR
+ CMAKE_SYSTEM_PROCESSOR STREQUAL "s390x")
+- add_library(arch s390.cpp)
++ add_library(bpftracearch s390.cpp)
+ elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
+- add_library(arch x86_64.cpp)
++ add_library(bpftracearch x86_64.cpp)
+ elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "mips64")
+- add_library(arch mips64.cpp)
++ add_library(bpftracearch mips64.cpp)
+ else()
+ message(FATAL_ERROR "Unsupported architecture: ${CMAKE_SYSTEM_PROCESSOR}")
+ endif()
++
++install(TARGETS bpftracearch LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
+diff --git a/src/ast/CMakeLists.txt b/src/ast/CMakeLists.txt
+index 014295cd..b038aa18 100644
+--- a/src/ast/CMakeLists.txt
++++ b/src/ast/CMakeLists.txt
+@@ -1,6 +1,6 @@
+ add_library(ast_defs ast.cpp)
+
+-add_library(ast
++add_library(bpftraceast
+ async_event_types.cpp
+ attachpoint_parser.cpp
+ int_parser.cpp
+@@ -20,11 +20,12 @@ add_library(ast
+ target_include_directories(ast_defs PUBLIC ${CMAKE_SOURCE_DIR}/src)
+ target_include_directories(ast_defs PUBLIC ${CMAKE_SOURCE_DIR}/src/ast)
+ target_include_directories(ast_defs PUBLIC ${CMAKE_BINARY_DIR})
+-target_link_libraries(ast ast_defs arch bpforc parser)
++target_link_libraries(bpftraceast ast_defs bpftracearch bpforc bpftraceparser)
++install(TARGETS ast_defs LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
+
+-add_dependencies(ast_defs parser)
++add_dependencies(ast_defs bpftraceparser)
+
+-target_compile_definitions(ast PRIVATE ${BPFTRACE_FLAGS})
++target_compile_definitions(bpftraceast PRIVATE ${BPFTRACE_FLAGS})
+
+ if (STATIC_LINKING)
+ set(clang_libs
+@@ -55,11 +56,11 @@ if (STATIC_LINKING)
+
+
+ if(EMBED_USE_LLVM)
+- target_link_libraries(ast "-Wl,--start-group" ${CLANG_EMBEDDED_CMAKE_TARGETS} ${LLVM_EMBEDDED_CMAKE_TARGETS} "-Wl,--end-group")
++ target_link_libraries(bpftraceast "-Wl,--start-group" ${CLANG_EMBEDDED_CMAKE_TARGETS} ${LLVM_EMBEDDED_CMAKE_TARGETS} "-Wl,--end-group")
+ else()
+ llvm_map_components_to_libnames(llvm_libs ${llvm_lib_names})
+- target_link_libraries(ast ${clang_libs})
+- target_link_libraries(ast ${llvm_libs})
++ target_link_libraries(bpftraceast ${clang_libs})
++ target_link_libraries(bpftraceast ${llvm_libs})
+ endif()
+
+ if(STATIC_LIBC)
+@@ -69,13 +70,13 @@ if (STATIC_LINKING)
+ else()
+ find_library(found_LLVM LLVM HINTS ${LLVM_LIBRARY_DIRS})
+ if(found_LLVM)
+- target_link_libraries(ast LLVM)
++ target_link_libraries(bpftraceast LLVM)
+ else()
+ llvm_map_components_to_libnames(_llvm_libs bpfcodegen ipo irreader mcjit orcjit ${LLVM_TARGETS_TO_BUILD})
+ llvm_expand_dependencies(llvm_libs ${_llvm_libs})
+- target_link_libraries(ast ${llvm_libs})
++ target_link_libraries(bpftraceast ${llvm_libs})
+ endif()
+- target_link_libraries(ast libclang)
++ target_link_libraries(bpftraceast libclang)
+ endif()
+
+ add_subdirectory(bpforc)
+diff --git a/src/ast/bpforc/CMakeLists.txt b/src/ast/bpforc/CMakeLists.txt
+index 3f6dbefa..8ccfbb2b 100644
+--- a/src/ast/bpforc/CMakeLists.txt
++++ b/src/ast/bpforc/CMakeLists.txt
+@@ -1 +1,2 @@
+ add_library(bpforc bpforc.cpp)
++install(TARGETS bpforc LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
+diff --git a/src/cxxdemangler/CMakeLists.txt b/src/cxxdemangler/CMakeLists.txt
+index 04cfcdd9..5677aa4b 100644
+--- a/src/cxxdemangler/CMakeLists.txt
++++ b/src/cxxdemangler/CMakeLists.txt
+@@ -1,2 +1,4 @@
+ add_library(cxxdemangler_stdlib cxxdemangler_stdlib.cpp)
+ add_library(cxxdemangler_llvm cxxdemangler_llvm.cpp)
++install(TARGETS cxxdemangler_stdlib LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
++install(TARGETS cxxdemangler_llvm LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})