From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id CB260158090 for ; Tue, 24 May 2022 17:47:26 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 15385E08C3; Tue, 24 May 2022 17:47:26 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E692FE08C3 for ; Tue, 24 May 2022 17:47:25 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 00261341572 for ; Tue, 24 May 2022 17:47:25 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 305CC1E for ; Tue, 24 May 2022 17:47:23 +0000 (UTC) From: "Patrick McLean" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Patrick McLean" Message-ID: <1653414428.948804562536b1d469f4c230c8ec44b3f46f0f16.chutzpah@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/bpftrace/files/, dev-util/bpftrace/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-util/bpftrace/Manifest dev-util/bpftrace/bpftrace-0.15.0.ebuild dev-util/bpftrace/files/bpftrace-0.15.0-dont-compress-man.patch dev-util/bpftrace/files/bpftrace-0.15.0-install-libs.patch X-VCS-Directories: dev-util/bpftrace/files/ dev-util/bpftrace/ X-VCS-Committer: chutzpah X-VCS-Committer-Name: Patrick McLean X-VCS-Revision: 948804562536b1d469f4c230c8ec44b3f46f0f16 X-VCS-Branch: master Date: Tue, 24 May 2022 17:47:23 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 8c5d9957-c4e8-4f31-8d45-18c85ba0b8a7 X-Archives-Hash: ff5223649d0e6f29fa5a68f647d1d3c5 commit: 948804562536b1d469f4c230c8ec44b3f46f0f16 Author: Patrick McLean gentoo org> AuthorDate: Tue May 24 17:47:08 2022 +0000 Commit: Patrick McLean gentoo org> CommitDate: Tue May 24 17:47:08 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=94880456 dev-util/bpftrace: add 0.15.0 Signed-off-by: Patrick McLean gentoo.org> dev-util/bpftrace/Manifest | 1 + dev-util/bpftrace/bpftrace-0.15.0.ebuild | 92 ++++++++++ .../files/bpftrace-0.15.0-dont-compress-man.patch | 47 +++++ .../files/bpftrace-0.15.0-install-libs.patch | 199 +++++++++++++++++++++ 4 files changed, 339 insertions(+) diff --git a/dev-util/bpftrace/Manifest b/dev-util/bpftrace/Manifest index 1c4b3ff288a4..96ee56633f51 100644 --- a/dev-util/bpftrace/Manifest +++ b/dev-util/bpftrace/Manifest @@ -1,2 +1,3 @@ DIST bpftrace-0.14.1-llvm14.patch.gz 7377 BLAKE2B 69b3b74bce74a8d4d8d9cc74de352dc33875ae905d8a88c776bbe80862a4f4ac2d450bcb6190da8be880bcc8fb751e3b8172df5454f31dc4bcd3e41edb02e396 SHA512 3269132981a7d2c0263fe9003bbcd2348e186ca0cdc95ada368331fc6e2495ae126c7bd68676438ccb575aafdafa3d17604a28fdc11d8b629eeaee130c1fd614 DIST bpftrace-0.14.1.tar.gz 991481 BLAKE2B 832f213760eb86804d63df782ff1923f6355b63770b8c4d486dd2547ae3dc474f9e4923f3107bbefbf2066dc013c930d4765ef86ef4d10bda6757513e30c2de1 SHA512 0be06c209ba12f70a0d1140b168dac94945c1b034dbd0c7dae5460fca43eec10bb436e28c122ec37b259256bf6b9bb23a3c5e7f8435feb67eae1b9277debaf73 +DIST bpftrace-0.15.0.tar.gz 1006735 BLAKE2B 3ef4bb5f13aa6dea5140b5362e6fc3de21baa1192e2218307895bf29ddeba8d69543e32c2b769bf3456076095ba661b66e1625f2696631d22628311d7f6ec1a4 SHA512 916e9afeab301e62472e570ef77a3b9b27b43251880b64f1c5f151583c59a6c61e9ede50f3607044b27c5a6ce1a654f290153bf3f9237ebc0a823b5e6356187a diff --git a/dev-util/bpftrace/bpftrace-0.15.0.ebuild b/dev-util/bpftrace/bpftrace-0.15.0.ebuild new file mode 100644 index 000000000000..cb4b8281e70b --- /dev/null +++ b/dev-util/bpftrace/bpftrace-0.15.0.ebuild @@ -0,0 +1,92 @@ +# Copyright 2019-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +LLVM_MAX_SLOT=15 + +inherit llvm linux-info cmake toolchain-funcs + +DESCRIPTION="High-level tracing language for eBPF" +HOMEPAGE="https://github.com/iovisor/bpftrace" +MY_PV="${PV//_/}" +SRC_URI=" + https://github.com/iovisor/${PN}/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz + https://dev.gentoo.org/~chutzpah/dist/bpftrace/bpftrace-0.14.1-llvm14.patch.gz +" +S="${WORKDIR}/${PN}-${MY_PV:-${PV}}" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~x86" +IUSE="fuzzing test" +# lots of fixing needed +RESTRICT="test" + +RDEPEND=" + >=dev-libs/libbpf-0.8:= + >=dev-util/bcc-0.13.0:= + dev-util/systemtap + ${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) + else() + message(WARNING "asciidoctor not found, building without bpftrace manpage") + add_custom_target(adoc_man) +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.15.0-install-libs.patch b/dev-util/bpftrace/files/bpftrace-0.15.0-install-libs.patch new file mode 100644 index 000000000000..b20e39e4d268 --- /dev/null +++ b/dev-util/bpftrace/files/bpftrace-0.15.0-install-libs.patch @@ -0,0 +1,199 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c5c4c396..4bc3e499 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 66a7fd66..738d9327 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -41,7 +41,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 +@@ -58,6 +58,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) +@@ -110,6 +111,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 +@@ -122,7 +124,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..22944ddc 100644 +--- a/src/aot/CMakeLists.txt ++++ b/src/aot/CMakeLists.txt +@@ -2,6 +2,7 @@ add_library(aot aot.cpp) + target_include_directories(aot PUBLIC ${CMAKE_SOURCE_DIR}/src) + target_include_directories(aot PUBLIC ${CMAKE_BINARY_DIR}) + target_compile_definitions(aot PRIVATE ${BPFTRACE_FLAGS}) ++install(TARGETS aot LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) + + # Only build aotrt if supported bcc is used + # (https://github.com/iovisor/bcc/commit/719191867a25ce07dc96f7faf9b8ccedadc7ec44) +@@ -10,7 +11,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 +diff --git a/src/arch/CMakeLists.txt b/src/arch/CMakeLists.txt +index 127c3528..4e05d40a 100644 +--- a/src/arch/CMakeLists.txt ++++ b/src/arch/CMakeLists.txt +@@ -1,17 +1,19 @@ + 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) + elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "riscv64") +- add_library(arch riscv64.cpp) ++ add_library(bpftracearch riscv64.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..c35f6ac6 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,13 @@ 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}) ++install(TARGETS bpftraceast 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 +57,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 +71,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})