diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-01-19 20:08:27 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-01-19 20:08:27 +0000 |
commit | 2b2f431a0021b4787ca3c028cefb30ad81347778 (patch) | |
tree | 951e0155f53027c8fd29eaba26df4f08292668d5 /dev-debug | |
parent | d725480af7cbc67d784e5d96f973fa41e9030123 (diff) |
gentoo auto-resync : 19:01:2024 - 20:08:27
Diffstat (limited to 'dev-debug')
72 files changed, 3666 insertions, 0 deletions
diff --git a/dev-debug/Manifest.gz b/dev-debug/Manifest.gz Binary files differindex a93debace8ad..17f4a8a5999c 100644 --- a/dev-debug/Manifest.gz +++ b/dev-debug/Manifest.gz diff --git a/dev-debug/apitrace/Manifest b/dev-debug/apitrace/Manifest new file mode 100644 index 000000000000..5b837b652d00 --- /dev/null +++ b/dev-debug/apitrace/Manifest @@ -0,0 +1,7 @@ +AUX apitrace-9.0-brotli-unbundle.patch 4728 BLAKE2B 66ff205968db551cdd8ebc7ba33dfcd39fd36356691722f593f7ce0fa615279c0e440077b3e29c5a643bf5be8a2406a656bfa91fb9f128c2afa922b3ad832a35 SHA512 0690f8d178fd7a5ca11b26d1e23c9c26e984214cef2e3619a22fc6cf58a7ee96fe0b046dd038c202cd6f60b9175dbdd346813c53ca85932f9a4d9dd40e9bdba1 +AUX apitrace-9.0-disable-multiarch.patch 1796 BLAKE2B c687c87b23f3711bd9ac70a345e7e2fbe7dab36f48cbf5a949d7fbeab41ac670054bcee203bf4db8df24cdabc418b7a04980fd1436962a15a8c6371e7d8d0f05 SHA512 5bb89dc98e5bbd92b707988d301ec50ea57f1562bd9a54fc2dada9b5ddafde5da66dd02d03efc377cbcf2bdc7d430f0b1353ed7a7f2d8703aabfeb9b563c1278 +AUX apitrace-9.0-libc-dlopen-glibc-2.34.patch 785 BLAKE2B 0339c808f83ecb18e42fe643a0de01b3f8566251e805bc5eace16f7d77571cde85d9cd2eef24e408202591a7b7ad0f1ec2c090b4ce8525b54057dd55cf08009c SHA512 54a7cf81370de87b28e18840b7644aa764d67096268d49324cc25b2f0cf256eb44e4da10cd63fc5fae8b8fcfac4d9eccb840b24778accb3e76c992eda06e2af7 +AUX apitrace-9.0-pkgconfig-waffle.patch 542 BLAKE2B a547dc8e71d6e6e781c685fad942bda6799d3d98c0e29a83ad65b0659c50d5ae81f35fee3e6abf1fb36f970db426785b0bcd15f30308ed3bad8b6ff5f4f152cd SHA512 1f3ef8e15a17f7684d6768e16656aef5ce32b173c8420ed2ccb29dd831f18bcee23189a6738ed0e89a990ca04303f1c16d024f429fba90836d967f1fc8486834 +DIST apitrace-9.0.tar.gz 3623693 BLAKE2B 885cfd22d1cc82e36f7f0d65b816784986a8a693d04b483c059d3cffb0328c2cbbfd043793b964cea84d7b09a0dc8dda5f464099e91df26fd5eecef4bbeb28cc SHA512 4234bc2d14378b1bd9554752d83f8ce0703b4e08c3edc85769dc988a2b3a44b8e55d2f5856954658155a11d69802849bae6350ed5031a5916c7ac7bc7287918c +EBUILD apitrace-9.0-r4.ebuild 2379 BLAKE2B d611dad9ada8fb9bb0c28bfe98f2a95507e77854b56476cda448ae2ed848080118251a2b8bfcfc9381b45477977cf9669885bf5e24aa192fb6123bdf52e4e2bc SHA512 604e210c2f72a20bef7af04d2747b64337acca15d906af053c38377483ceb164edf06d922e87f671d17c406c33e46230492e259d8066d1b2bd201f881e796d73 +MISC metadata.xml 250 BLAKE2B a9437881337420620edfaa0a3f4e7660a47100479c9d360dfb3b8304eaa085d5f2bb97ea8d823fc6be282fd4f2964cf12d189ec0e6d18a09ea513809e5bd5cde SHA512 284c9edd2a7f91f48402414ec05379f5a9a40ca67f02ddc4dbf3bbc45f83cfe01aa54442af0016dcf8495bb6291423def988f0bba616c5a5024011c4e97fde57 diff --git a/dev-debug/apitrace/apitrace-9.0-r4.ebuild b/dev-debug/apitrace/apitrace-9.0-r4.ebuild new file mode 100644 index 000000000000..b78a91aa9c82 --- /dev/null +++ b/dev-debug/apitrace/apitrace-9.0-r4.ebuild @@ -0,0 +1,88 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..11} ) +inherit cmake-multilib multilib python-single-r1 + +DESCRIPTION="Tool for tracing, analyzing, and debugging graphics APIs" +HOMEPAGE="https://github.com/apitrace/apitrace" +SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="qt5 X" + +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +DEPEND="${PYTHON_DEPS} + app-arch/brotli:=[${MULTILIB_USEDEP}] + >=app-arch/snappy-1.1.1[${MULTILIB_USEDEP}] + media-libs/libpng:0= + media-libs/mesa[egl(+),gles1,gles2,X?,${MULTILIB_USEDEP}] + >=media-libs/waffle-1.6.0-r1[egl(+),${MULTILIB_USEDEP}] + sys-libs/zlib[${MULTILIB_USEDEP}] + sys-process/procps:=[${MULTILIB_USEDEP}] + X? ( x11-libs/libX11 ) + qt5? ( + dev-qt/qtcore:5 + dev-qt/qtgui:5[-gles2-only] + dev-qt/qtnetwork:5 + dev-qt/qtwidgets:5[-gles2-only] + ) +" +RDEPEND="${DEPEND}" + +PATCHES=( + # TODO: upstream + "${FILESDIR}"/${P}-disable-multiarch.patch + "${FILESDIR}"/${P}-brotli-unbundle.patch + "${FILESDIR}"/${P}-libc-dlopen-glibc-2.34.patch + "${FILESDIR}"/${P}-pkgconfig-waffle.patch +) + +src_prepare() { + cmake_src_prepare + + # The apitrace code grubs around in the internal zlib structures. + # We have to extract this header and clean it up to keep that working. + # Do not be surprised if a zlib upgrade breaks things ... + rm -rf thirdparty/{brotli,snappy,getopt,less,libpng,zlib,dxerr,directxtex,devcon} || die +} + +src_configure() { + my_configure() { + local mycmakeargs=( + -DDOC_INSTALL_DIR="${EPREFIX}"/usr/share/doc/${PF} + -DENABLE_X11=$(usex X) + -DENABLE_EGL=ON + -DENABLE_CLI=ON + -DENABLE_GUI=$(multilib_native_usex qt5) + -DENABLE_STATIC_SNAPPY=OFF + -DENABLE_WAFFLE=ON + -DPython3_EXECUTABLE="${PYTHON}" + ) + cmake_src_configure + } + + multilib_foreach_abi my_configure +} + +src_install() { + MULTILIB_CHOST_TOOLS=( + /usr/bin/apitrace$(get_exeext) + /usr/bin/eglretrace$(get_exeext) + ) + use X && MULTILIB_CHOST_TOOLS+=( /usr/bin/glretrace$(get_exeext) ) + + cmake-multilib_src_install + + make_libgl_symlinks() { + dosym glxtrace.so /usr/$(get_libdir)/${PN}/wrappers/libGL.so + dosym glxtrace.so /usr/$(get_libdir)/${PN}/wrappers/libGL.so.1 + dosym glxtrace.so /usr/$(get_libdir)/${PN}/wrappers/libGL.so.1.2 + } + use X && multilib_foreach_abi make_libgl_symlinks +} diff --git a/dev-debug/apitrace/files/apitrace-9.0-brotli-unbundle.patch b/dev-debug/apitrace/files/apitrace-9.0-brotli-unbundle.patch new file mode 100644 index 000000000000..5715edaec3f0 --- /dev/null +++ b/dev-debug/apitrace/files/apitrace-9.0-brotli-unbundle.patch @@ -0,0 +1,158 @@ +From 3a07d551949ff488d1d669600a07d9c73ff4cc55 Mon Sep 17 00:00:00 2001 +From: Andreas Sturmlechner <asturm@gentoo.org> +Date: Mon, 29 Apr 2019 21:08:02 +0200 +Subject: [PATCH 1/2] Import FindBrotliDec.cmake and FindBrotliEnc.cmake from + Igalia S.L. + +MIT License, which fits well. + +Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> +--- + cmake/FindBrotliDec.cmake | 35 +++++++++++++++++++++++++++++++++++ + cmake/FindBrotliEnc.cmake | 35 +++++++++++++++++++++++++++++++++++ + 2 files changed, 70 insertions(+) + create mode 100644 cmake/FindBrotliDec.cmake + create mode 100644 cmake/FindBrotliEnc.cmake + +diff --git a/cmake/FindBrotliDec.cmake b/cmake/FindBrotliDec.cmake +new file mode 100644 +index 00000000..abb06f44 +--- /dev/null ++++ b/cmake/FindBrotliDec.cmake +@@ -0,0 +1,35 @@ ++# Copyright 2017 Igalia S.L. All Rights Reserved. ++# ++# Distributed under MIT license. ++# See file LICENSE for detail or copy at https://opensource.org/licenses/MIT ++ ++# Try to find BrotliDec. Once done, this will define ++# ++# BROTLIDEC_FOUND - system has BrotliDec. ++# BROTLIDEC_INCLUDE_DIRS - the BrotliDec include directories ++# BROTLIDEC_LIBRARIES - link these to use BrotliDec. ++ ++find_package(PkgConfig) ++ ++pkg_check_modules(PC_BROTLIDEC libbrotlidec) ++ ++find_path(BROTLIDEC_INCLUDE_DIRS ++ NAMES brotli/decode.h ++ HINTS ${PC_BROTLIDEC_INCLUDEDIR} ++) ++ ++find_library(BROTLIDEC_LIBRARIES ++ NAMES brotlidec ++ HINTS ${PC_BROTLIDEC_LIBDIR} ++) ++ ++include(FindPackageHandleStandardArgs) ++find_package_handle_standard_args(BrotliDec ++ REQUIRED_VARS BROTLIDEC_INCLUDE_DIRS BROTLIDEC_LIBRARIES ++ FOUND_VAR BROTLIDEC_FOUND ++ VERSION_VAR PC_BROTLIDEC_VERSION) ++ ++mark_as_advanced( ++ BROTLIDEC_INCLUDE_DIRS ++ BROTLIDEC_LIBRARIES ++) +diff --git a/cmake/FindBrotliEnc.cmake b/cmake/FindBrotliEnc.cmake +new file mode 100644 +index 00000000..4be347db +--- /dev/null ++++ b/cmake/FindBrotliEnc.cmake +@@ -0,0 +1,35 @@ ++# Copyright 2017 Igalia S.L. All Rights Reserved. ++# ++# Distributed under MIT license. ++# See file LICENSE for detail or copy at https://opensource.org/licenses/MIT ++ ++# Try to find BrotliEnc. Once done, this will define ++# ++# BROTLIENC_FOUND - system has BrotliEnc. ++# BROTLIENC_INCLUDE_DIRS - the BrotliEnc include directories ++# BROTLIENC_LIBRARIES - link these to use BrotliEnc. ++ ++find_package(PkgConfig) ++ ++pkg_check_modules(PC_BROTLIENC libbrotlienc) ++ ++find_path(BROTLIENC_INCLUDE_DIRS ++ NAMES brotli/encode.h ++ HINTS ${PC_BROTLIENC_INCLUDEDIR} ++) ++ ++find_library(BROTLIENC_LIBRARIES ++ NAMES brotlienc ++ HINTS ${PC_BROTLIENC_LIBDIR} ++) ++ ++include(FindPackageHandleStandardArgs) ++find_package_handle_standard_args(BrotliEnc ++ REQUIRED_VARS BROTLIENC_INCLUDE_DIRS BROTLIENC_LIBRARIES ++ FOUND_VAR BROTLIENC_FOUND ++ VERSION_VAR PC_BROTLIENC_VERSION) ++ ++mark_as_advanced( ++ BROTLIENC_INCLUDE_DIRS ++ BROTLIENC_LIBRARIES ++) +-- +2.24.1 + +From 08a410f238aaf6488759e023b66d16cbbd7f6d66 Mon Sep 17 00:00:00 2001 +From: Andreas Sturmlechner <asturm@gentoo.org> +Date: Mon, 29 Apr 2019 21:11:57 +0200 +Subject: [PATCH 2/2] Find system brotli instead of bundled + +Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> +--- + CMakeLists.txt | 5 +++-- + cli/CMakeLists.txt | 2 +- + lib/trace/CMakeLists.txt | 2 +- + 3 files changed, 5 insertions(+), 4 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c71d24e6..88e6b156 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -491,8 +491,9 @@ if (ENABLE_STATIC_SNAPPY OR NOT SNAPPY_FOUND) + endif () + include_directories (${SNAPPY_INCLUDE_DIRS}) + +-include_directories (${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/brotli/c/include) +-add_subdirectory (thirdparty/brotli) ++find_package(BrotliDec REQUIRED) ++find_package(BrotliEnc REQUIRED) ++include_directories (${BROTLIDEC_INCLUDE_DIRS} ${BROTLIENC_INCLUDE_DIRS}) + + if (NOT WIN32 AND NOT ENABLE_STATIC_EXE) + # zlib 1.2.4-1.2.5 made it impossible to read the last block of incomplete +diff --git a/cli/CMakeLists.txt b/cli/CMakeLists.txt +index 3a3c127e..0b33ddb5 100644 +--- a/cli/CMakeLists.txt ++++ b/cli/CMakeLists.txt +@@ -39,7 +39,7 @@ add_executable (apitrace + + target_link_libraries (apitrace + common +- brotli_dec brotli_enc brotli_common ++ ${BROTLIDEC_LIBRARIES} ${BROTLIENC_LIBRARIES} + ${ZLIB_LIBRARIES} + ${SNAPPY_LIBRARIES} + ${GETOPT_LIBRARIES} +diff --git a/lib/trace/CMakeLists.txt b/lib/trace/CMakeLists.txt +index c68bd00f..ce2e469e 100644 +--- a/lib/trace/CMakeLists.txt ++++ b/lib/trace/CMakeLists.txt +@@ -31,7 +31,7 @@ target_link_libraries (common + guids + highlight + os +- brotli_dec brotli_common ++ ${BROTLIDEC_LIBRARIES} ${BROTLIENC_LIBRARIES} + ) + + add_gtest (trace_parser_flags_test trace_parser_flags_test.cpp) +-- +2.24.1 + diff --git a/dev-debug/apitrace/files/apitrace-9.0-disable-multiarch.patch b/dev-debug/apitrace/files/apitrace-9.0-disable-multiarch.patch new file mode 100644 index 000000000000..37085b1ae299 --- /dev/null +++ b/dev-debug/apitrace/files/apitrace-9.0-disable-multiarch.patch @@ -0,0 +1,53 @@ +From 556397e399994b005524b88171c9c103b8cc1b25 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger <vapier@gentoo.org> +Date: Mon, 29 Apr 2019 20:32:04 +0200 +Subject: [PATCH] Use CMAKE_INSTALL_LIBDIR for LIB_INSTALL_DIR + +Respect the libdir cmake already set up for us instead of using +debian-specific multiarch paths. + +Patch was rebased multiple times from 4.0 to 9.0 now. + +Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> +--- + CMakeLists.txt | 17 ++--------------- + 1 file changed, 2 insertions(+), 15 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 19316e60..6c3c4b85 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -438,15 +438,6 @@ endif () + ############################################################################## + # Installation directories + +-if (CMAKE_SYSTEM_NAME STREQUAL "Linux") +- # Debian multiarch support +- execute_process(COMMAND dpkg-architecture -qDEB_HOST_MULTIARCH +- OUTPUT_VARIABLE ARCH_SUBDIR +- ERROR_QUIET +- OUTPUT_STRIP_TRAILING_WHITESPACE +- ) +-endif() +- + if (WIN32 OR APPLE) + # On Windows/MacOSX, applications are usually installed on a directory of + # their own +@@ -455,12 +446,8 @@ if (WIN32 OR APPLE) + set (LIB_ARCH_INSTALL_DIR lib) + else () + set (DOC_DEFAULT_INSTALL_DIR share/doc/${CMAKE_PROJECT_NAME}) +- set (LIB_INSTALL_DIR lib${LIB_SUFFIX}/${CMAKE_PROJECT_NAME}) +- if (ARCH_SUBDIR) +- set (LIB_ARCH_INSTALL_DIR lib/${ARCH_SUBDIR}/${CMAKE_PROJECT_NAME}) +- else () +- set (LIB_ARCH_INSTALL_DIR lib${LIB_SUFFIX}/${CMAKE_PROJECT_NAME}) +- endif () ++ set (LIB_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}/${CMAKE_PROJECT_NAME}) ++ set (LIB_ARCH_INSTALL_DIR ${LIB_INSTALL_DIR}) + endif () + + # Allow customization of the doc installation dir (Slackware uses different +-- +2.24.1 + diff --git a/dev-debug/apitrace/files/apitrace-9.0-libc-dlopen-glibc-2.34.patch b/dev-debug/apitrace/files/apitrace-9.0-libc-dlopen-glibc-2.34.patch new file mode 100644 index 000000000000..6c1aff4bcb31 --- /dev/null +++ b/dev-debug/apitrace/files/apitrace-9.0-libc-dlopen-glibc-2.34.patch @@ -0,0 +1,29 @@ +https://github.com/apitrace/apitrace/commit/d28a980802ad48568c87da02d630c8babfe163bb.patch +https://bugs.gentoo.org/812155 + +(rebased by sam) + +From: Jose Fonseca <jfonseca@vmware.com> +Date: Wed, 1 Sep 2021 16:34:54 +0100 +Subject: [PATCH] gltrace: Avoid __libc_dlsym and __libc_dlopen_mode on GLIBC + 2.34. + +These GLIBC_PRIVATE symbols are gone from GLIBC 2.34 due to the merge of +libdl.so onto libc.so. + +This means apitrace can't defend against infinite recursion when +used with Steam Overlay, but at least it should work otherwise. + +Fixes https://github.com/apitrace/apitrace/issues/756 +--- a/wrappers/dlsym.cpp ++++ b/wrappers/dlsym.cpp +@@ -34,7 +34,7 @@ + #include "os.hpp" + + +-#ifdef __GLIBC__ ++#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ < 34 + + + #include <dlfcn.h> + diff --git a/dev-debug/apitrace/files/apitrace-9.0-pkgconfig-waffle.patch b/dev-debug/apitrace/files/apitrace-9.0-pkgconfig-waffle.patch new file mode 100644 index 000000000000..6d0450886672 --- /dev/null +++ b/dev-debug/apitrace/files/apitrace-9.0-pkgconfig-waffle.patch @@ -0,0 +1,14 @@ +waffle's upstream intentionally does not ship cmake files anymore +(just a quick fix that works for us, there may be more to consider) + +https://bugs.gentoo.org/901365 +https://gitlab.freedesktop.org/mesa/waffle/-/issues/74 +https://gitlab.freedesktop.org/mesa/waffle/-/commit/a16983fea590491727c8119256c7b938fe1f9d10 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -195,3 +195,4 @@ + # Use Waffle for eglretrace +- find_package (Waffle REQUIRED) ++ find_package(PkgConfig REQUIRED) ++ pkg_check_modules(Waffle REQUIRED waffle-1) + endif () diff --git a/dev-debug/apitrace/metadata.xml b/dev-debug/apitrace/metadata.xml new file mode 100644 index 000000000000..8fb6e53d307d --- /dev/null +++ b/dev-debug/apitrace/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <!-- maintainer-needed --> + <upstream> + <remote-id type="github">apitrace/apitrace</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-debug/bpftrace/Manifest b/dev-debug/bpftrace/Manifest new file mode 100644 index 000000000000..0d9a22c6141b --- /dev/null +++ b/dev-debug/bpftrace/Manifest @@ -0,0 +1,6 @@ +AUX bpftrace-0.11.4-old-kernels.patch 563 BLAKE2B 3b2afb997119188e7095b24ec459f4b5ae28626f6905c45f6510f84b7c6f28aa3b5174f1f48a30763990b2a3cc50c6336249fe1dc4cf31656871a8adce43c8d7 SHA512 332e6cc4d1c21e917451c9aa6028b082f53dde8221419ba45ad7ae6321e444b3f67ec8366cbd56638d8f8b68a3be06af892eba765c810744951af1de9b994113 +AUX bpftrace-0.15.0-dont-compress-man.patch 1885 BLAKE2B 89a327cef68fa838d5c04b37e7bf72e6b03b54c244889706ba3c5156e2355d00cf395d14a6e8a7fe622e002acf9bab06dbc1427f6b637f0c59db86af08f05d51 SHA512 b591a73b0bbdd0105e6b87fb264ca4345e200ab58754d09a87dec79e60044eab165f2b34fe5ddc904cd877a460d5f41eef8b4d59eac255ea4f4e0fae37cf3511 +AUX bpftrace-0.19.0-install-libs.patch 14102 BLAKE2B 626bcebeba565dec1e1ffb389731ab5a408262de4c52c58408d93a097a5fe955c0460c6bf710aa65e832d6f1e1023ecc68999125fd386e62e0dd24d13920e913 SHA512 02e064a7332bf7eeddfed3169d31eee7faa32048c01e8c0363e0a5632c4a65bb371e967bab8706ca97b59bea2d10eb46dd1b0bd2b998cc63163d90c25570ceba +DIST bpftrace-0.19.1.gh.tar.gz 1157777 BLAKE2B 9db6285c7a82110106bd05759a09f16d85c82f2516f0b6ea34044e7389b2d38ed418d0fe5da44c2c9f9e67f72404f104f419ce3316c07ea54e65d4f039188039 SHA512 2f56b8fb7abfa58631ebc93c7a98cc066446808cbc0116902e43ebefa5f9625232da5ee3ede1d14a236296660a2f4c0907fa1ef24d383b4e32c70dcc3988c765 +EBUILD bpftrace-0.19.1.ebuild 1847 BLAKE2B 61cb93b19a920ef805e648344a32599173fcf6d0e5b38023b8bca9a344391f9f1b5caf58eda98c4e15ab15a7937223d99aa4503e484e77fd5b1a0183c752d565 SHA512 5e075217992fa0027877f4bd0f0b21540967e93083d8d4cd1dc3a725db5ada7d3f3250d3f8b3eacf64977d09e1a0684d033f3433ef787b09699d61e2df8ff532 +MISC metadata.xml 499 BLAKE2B ce7c46f4c5e49f2f779ff6584053f7fc78dffaeee432ac46a8881b3d49dc569e309af95aaf9d6e77a36ebc87be0cd2f86a5db7b733463e4252d3a242d914f293 SHA512 dfb827afd47feb8204ef40c940ebcc7d1b3217cdf0f24425e4ab32195309d727225e942d777871565e47a2c02244d053f46ed25165e9728c94e0683ff61bf4ce diff --git a/dev-debug/bpftrace/bpftrace-0.19.1.ebuild b/dev-debug/bpftrace/bpftrace-0.19.1.ebuild new file mode 100644 index 000000000000..48f68c08a2ec --- /dev/null +++ b/dev-debug/bpftrace/bpftrace-0.19.1.ebuild @@ -0,0 +1,95 @@ +# Copyright 2019-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LLVM_MAX_SLOT=17 + +inherit llvm linux-info cmake + +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}.gh.tar.gz" +S="${WORKDIR}/${PN}-${MY_PV:-${PV}}" + +LICENSE="Apache-2.0" +SLOT="0" + +# remove keywords until build works: +# https://github.com/iovisor/bpftrace/issues/2349 +KEYWORDS="~amd64 ~arm64 ~x86" +IUSE="fuzzing test" + +# lots of fixing needed +RESTRICT="test" + +RDEPEND=" + >=dev-libs/libbpf-1.1:= + >=dev-util/bcc-0.25.0:= + >=sys-devel/llvm-10[llvm_targets_BPF(+)] + >=sys-devel/clang-10 + <sys-devel/clang-$((${LLVM_MAX_SLOT} + 1)):= + <sys-devel/llvm-$((${LLVM_MAX_SLOT} + 1)):=[llvm_targets_BPF(+)] + sys-libs/binutils-libs:= + virtual/libelf:= +" +DEPEND=" + ${COMMON_DEPEND} + dev-libs/cereal:= + test? ( dev-cpp/gtest ) +" +BDEPEND=" + app-arch/xz-utils + app-alternatives/lex + app-alternatives/yacc + virtual/pkgconfig +" + +QA_DT_NEEDED=" + /usr/lib.*/libbpftraceresources.so + /usr/lib.*/libcxxdemangler_llvm.so +" + +PATCHES=( + "${FILESDIR}/bpftrace-0.19.0-install-libs.patch" + "${FILESDIR}/bpftrace-0.15.0-dont-compress-man.patch" + "${FILESDIR}/bpftrace-0.11.4-old-kernels.patch" +) + +pkg_pretend() { + local CONFIG_CHECK=" + ~BPF + ~BPF_EVENTS + ~BPF_JIT + ~BPF_SYSCALL + ~FTRACE_SYSCALLS + ~HAVE_EBPF_JIT + " + + check_extra_config +} + +pkg_setup() { + llvm_pkg_setup +} + +src_configure() { + local mycmakeargs=( + -DSTATIC_LINKING:BOOL=OFF + # bug 809362, 754648 + -DBUILD_TESTING:BOOL=$(usex test) + -DBUILD_FUZZ:BOOL=$(usex fuzzing) + -DENABLE_MAN:BOOL=OFF + -DUSE_SYSTEM_BPF_BCC:BOOL=ON + ) + + cmake_src_configure +} + +src_install() { + cmake_src_install + # bug 809362 + dostrip -x /usr/bin/bpftrace + doman man/man8/*.? +} diff --git a/dev-debug/bpftrace/files/bpftrace-0.11.4-old-kernels.patch b/dev-debug/bpftrace/files/bpftrace-0.11.4-old-kernels.patch new file mode 100644 index 000000000000..831de6487a84 --- /dev/null +++ b/dev-debug/bpftrace/files/bpftrace-0.11.4-old-kernels.patch @@ -0,0 +1,28 @@ +diff --git a/src/btf.h b/src/btf.h +index 61579a3..4e9f9fc 100644 +--- a/src/btf.h ++++ b/src/btf.h +@@ -2,6 +2,7 @@ + + #include "types.h" + #include <linux/types.h> ++#include <linux/version.h> + #include <map> + #include <regex> + #include <string> +@@ -11,6 +12,15 @@ + struct btf; + struct btf_type; + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5,5,0) ++/* this is required to build with 5.4 and earlier kernel headers */ ++enum btf_func_linkage { ++ BTF_FUNC_STATIC = 0, ++ BTF_FUNC_GLOBAL = 1, ++ BTF_FUNC_EXTERN = 2, ++}; ++#endif ++ + namespace bpftrace { + + class BTF diff --git a/dev-debug/bpftrace/files/bpftrace-0.15.0-dont-compress-man.patch b/dev-debug/bpftrace/files/bpftrace-0.15.0-dont-compress-man.patch new file mode 100644 index 000000000000..84241e052462 --- /dev/null +++ b/dev-debug/bpftrace/files/bpftrace-0.15.0-dont-compress-man.patch @@ -0,0 +1,47 @@ +diff --git a/man/adoc/CMakeLists.txt b/man/adoc/CMakeLists.txt +index 1a81dee0..c93ccbd2 100644 +--- a/man/adoc/CMakeLists.txt ++++ b/man/adoc/CMakeLists.txt +@@ -1,7 +1,5 @@ +-find_program(GZIP gzip REQUIRED) + find_program(ASCIIDOCTOR asciidoctor) + file(GLOB FILES *.adoc) +-set(GZFILES "") + if(NOT "${ASCIIDOCTOR}" STREQUAL "ASCIIDOCTOR-NOTFOUND") + foreach(FIL ${FILES}) + get_filename_component(NAME ${FIL} NAME_WE) +@@ -12,14 +10,9 @@ if(NOT "${ASCIIDOCTOR}" STREQUAL "ASCIIDOCTOR-NOTFOUND") + 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) + 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-debug/bpftrace/files/bpftrace-0.19.0-install-libs.patch b/dev-debug/bpftrace/files/bpftrace-0.19.0-install-libs.patch new file mode 100644 index 000000000000..647b0cd4cae5 --- /dev/null +++ b/dev-debug/bpftrace/files/bpftrace-0.19.0-install-libs.patch @@ -0,0 +1,338 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a1360a71..24d85abc 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -138,9 +138,10 @@ endif() + bison_target(bison_parser src/parser.yy ${CMAKE_BINARY_DIR}/parser.tab.cc COMPILE_FLAGS ${BISON_FLAGS} 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 c12f9567..0bfec98c 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 401ddc0a..05f0f637 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -13,7 +13,7 @@ else() + endif () + endif() + +-add_library(runtime ++add_library(bpftraceruntime + attached_probe.cpp + bpffeature.cpp + bpftrace.cpp +@@ -44,7 +44,7 @@ add_library(runtime + ${BFD_DISASM_SRC} + ) + # Ensure flex+bison outputs are built first +-add_dependencies(runtime parser) ++add_dependencies(bpftraceruntime bpftraceparser) + + add_library(libbpftrace + build_info.cpp +@@ -61,6 +61,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) +@@ -89,7 +90,7 @@ endif() + set(KERNEL_HEADERS_DIR "" CACHE PATH "Hard-code kernel headers directory") + if (KERNEL_HEADERS_DIR) + MESSAGE(STATUS "Using KERNEL_HEADERS_DIR=${KERNEL_HEADERS_DIR}") +- target_compile_definitions(runtime PUBLIC KERNEL_HEADERS_DIR="${KERNEL_HEADERS_DIR}") ++ target_compile_definitions(bpftraceruntime PUBLIC KERNEL_HEADERS_DIR="${KERNEL_HEADERS_DIR}") + endif() + + execute_process( +@@ -109,10 +110,11 @@ endif() + + add_definitions("-DBPFTRACE_VERSION=\"${BPFTRACE_VERSION}\"") + +-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}) ++target_include_directories(bpftraceruntime PRIVATE ${CMAKE_BINARY_DIR}) ++target_include_directories(bpftraceruntime PRIVATE ${CMAKE_SOURCE_DIR}/src) ++target_include_directories(bpftraceruntime PRIVATE ${CMAKE_SOURCE_DIR}/src/ast) ++target_compile_definitions(bpftraceruntime PRIVATE ${BPFTRACE_FLAGS}) ++install(TARGETS bpftraceruntime LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) + target_compile_definitions(libbpftrace PRIVATE ${BPFTRACE_FLAGS}) + + # Linking +@@ -125,8 +127,8 @@ if(STATIC_LINKING) + endif(STATIC_LINKING) + + +-target_link_libraries(runtime ${LIBBPF_LIBRARIES} ${ZLIB_LIBRARIES}) +-target_link_libraries(libbpftrace parser resources runtime aot ast arch cxxdemangler_llvm) ++target_link_libraries(bpftraceruntime ${LIBBPF_LIBRARIES} ${ZLIB_LIBRARIES}) ++target_link_libraries(libbpftrace bpftraceparser bpftraceresources bpftraceruntime aot bpftraceast bpftracearch cxxdemangler_llvm) + + if(LIBPCAP_FOUND) + target_link_libraries(libbpftrace ${LIBPCAP_LIBRARIES}) +@@ -136,49 +138,49 @@ if(HAVE_BFD_DISASM) + if(STATIC_LINKING OR LIBBFD_STATIC) + add_library(LIBBFD STATIC IMPORTED) + set_property(TARGET LIBBFD PROPERTY IMPORTED_LOCATION ${LIBBFD_LIBRARIES}) +- target_link_libraries(runtime LIBBFD) ++ target_link_libraries(bpftraceruntime LIBBFD) + add_library(LIBOPCODES STATIC IMPORTED) + set_property(TARGET LIBOPCODES PROPERTY IMPORTED_LOCATION ${LIBOPCODES_LIBRARIES}) +- target_link_libraries(runtime LIBOPCODES) ++ target_link_libraries(bpftraceruntime LIBOPCODES) + add_library(LIBIBERTY STATIC IMPORTED) + set_property(TARGET LIBIBERTY PROPERTY IMPORTED_LOCATION ${LIBIBERTY_LIBRARIES}) +- target_link_libraries(runtime LIBIBERTY) ++ target_link_libraries(bpftraceruntime LIBIBERTY) + + add_library(LIBZSTD STATIC IMPORTED) + if (LIBZSTD_FOUND) + set_property(TARGET LIBZSTD PROPERTY IMPORTED_LOCATION ${LIBZSTD_LIBRARIES}) +- target_link_libraries(runtime LIBZSTD) ++ target_link_libraries(bpftraceruntime LIBZSTD) + endif(LIBZSTD_FOUND) + + add_library(LIBSFRAME STATIC IMPORTED) + if (LIBSFRAME_FOUND) + set_property(TARGET LIBSFRAME PROPERTY IMPORTED_LOCATION ${LIBSFRAME_LIBRARIES}) +- target_link_libraries(runtime LIBSFRAME) ++ target_link_libraries(bpftraceruntime LIBSFRAME) + endif() + else() +- target_link_libraries(runtime ${LIBBFD_LIBRARIES}) +- target_link_libraries(runtime ${LIBOPCODES_LIBRARIES}) ++ target_link_libraries(bpftraceruntime ${LIBBFD_LIBRARIES}) ++ target_link_libraries(bpftraceruntime ${LIBOPCODES_LIBRARIES}) + endif(STATIC_LINKING OR LIBBFD_STATIC) + endif(HAVE_BFD_DISASM) + + # Link to bcc libraries (without LLVM) if possible + if(LIBBCC_BPF_CONTAINS_RUNTIME) +- target_link_libraries(runtime ${LIBBCC_BPF_LIBRARIES}) ++ target_link_libraries(bpftraceruntime ${LIBBCC_BPF_LIBRARIES}) + else() +- target_link_libraries(runtime ${LIBBCC_LIBRARIES}) ++ target_link_libraries(bpftraceruntime ${LIBBCC_LIBRARIES}) + endif() + + if(STATIC_BPF_BCC) + # These are not part of the static libbcc so have to be added separate +- target_link_libraries(runtime ${LIBBCC_BPF_LIBRARIES}) +- target_link_libraries(runtime ${LIBBPF_LIBRARIES}) +- target_link_libraries(runtime ${LIBBCC_LOADER_LIBRARY_STATIC}) ++ target_link_libraries(bpftraceruntime ${LIBBCC_BPF_LIBRARIES}) ++ target_link_libraries(bpftraceruntime ${LIBBPF_LIBRARIES}) ++ target_link_libraries(bpftraceruntime ${LIBBCC_LOADER_LIBRARY_STATIC}) + + add_library(LIBELF STATIC IMPORTED) + set_property(TARGET LIBELF PROPERTY IMPORTED_LOCATION ${LIBELF_LIBRARIES}) +- target_link_libraries(runtime LIBELF) ++ target_link_libraries(bpftraceruntime LIBELF) + else() +- target_link_libraries(runtime ${LIBELF_LIBRARIES}) ++ target_link_libraries(bpftraceruntime ${LIBELF_LIBRARIES}) + endif(STATIC_BPF_BCC) + + if (LIBDW_FOUND) +@@ -207,16 +209,16 @@ if (LIBDW_FOUND) + + target_link_libraries(LIBDW INTERFACE ${LIBDW_LIBS}) + +- target_link_libraries(runtime LIBDW) ++ target_link_libraries(bpftraceruntime LIBDW) + else() +- target_link_libraries(runtime ${LIBDW_LIBRARIES}) ++ target_link_libraries(bpftraceruntime ${LIBDW_LIBRARIES}) + endif() + endif() + + # Support for std::filesystem + # GCC version <9 and Clang (all versions) require -lstdc++fs + if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR ${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS "9") +- target_link_libraries(runtime "stdc++fs") ++ target_link_libraries(bpftraceruntime "stdc++fs") + target_link_libraries(libbpftrace "stdc++fs") + endif() + +@@ -238,16 +240,16 @@ endif() + if (STATIC_LINKING) + if(ANDROID) + target_link_libraries(libbpftrace "-Wl,-Bdynamic" "-ldl" "-lm" "-lz") +- target_link_libraries(runtime "-Wl,-Bdynamic" "-ldl" "-lm" "-lz") ++ target_link_libraries(bpftraceruntime "-Wl,-Bdynamic" "-ldl" "-lm" "-lz") + else() + target_link_libraries(libbpftrace "-Wl,-Bdynamic" "-lrt" "-lpthread" "-ldl" "-lm") + target_link_libraries(libbpftrace "-Wl,-Bstatic" "-lz") +- target_link_libraries(runtime "-Wl,-Bdynamic" "-lrt" "-lpthread" "-ldl" "-lm") +- target_link_libraries(runtime "-Wl,-Bstatic" "-lz") ++ target_link_libraries(bpftraceruntime "-Wl,-Bdynamic" "-lrt" "-lpthread" "-ldl" "-lm") ++ target_link_libraries(bpftraceruntime "-Wl,-Bstatic" "-lz") + endif() + elseif(STATIC_BPF_BCC) + # partial static build, libbpf needs zlib, bcc needs liblzma +- target_link_libraries(runtime "-lz" "-llzma") ++ target_link_libraries(bpftraceruntime "-lz" "-llzma") + endif() + + unset(MAIN_SRC) +diff --git a/src/aot/CMakeLists.txt b/src/aot/CMakeLists.txt +index c776d204..41e84317 100644 +--- a/src/aot/CMakeLists.txt ++++ b/src/aot/CMakeLists.txt +@@ -1,8 +1,9 @@ + add_library(aot aot.cpp) +-add_dependencies(aot parser) ++add_dependencies(aot bpftraceparser) + 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) +@@ -11,7 +12,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 bpftraceruntime bpftracearch ast_defs cxxdemangler_stdlib) + install(TARGETS bpftrace-aotrt DESTINATION ${CMAKE_INSTALL_BINDIR}) + + if(LIBPCAP_FOUND) +diff --git a/src/arch/CMakeLists.txt b/src/arch/CMakeLists.txt +index e6a1d0a0..c53daa19 100644 +--- a/src/arch/CMakeLists.txt ++++ b/src/arch/CMakeLists.txt +@@ -1,19 +1,20 @@ + if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm|aarch64)") +- add_library(arch arm.cpp) ++ add_library(bpftracearch arm.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) + elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "loongarch64") +- add_library(arch loongarch64.cpp) ++ add_library(bpftracearch loongarch64.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 c390ea6a..37019bd9 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 + elf_parser.cpp +@@ -21,11 +21,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 parser) ++target_link_libraries(bpftraceast ast_defs bpftracearch 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 +@@ -58,20 +60,20 @@ 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}) + + if(TARGET libclang_static) +- target_link_libraries(ast libclang_static) ++ target_link_libraries(bpftraceast libclang_static) + else() + # old LLVM versions don't export libclang_static in ClangTargets.cmake; fall back to + # libclang.a in that case +- target_link_libraries(ast libclang.a) ++ target_link_libraries(abpftracest libclang.a) + endif() + +- target_link_libraries(ast ${clang_libs}) +- target_link_libraries(ast ${llvm_libs}) ++ target_link_libraries(abpftracest ${clang_libs}) ++ target_link_libraries(abpftracest ${llvm_libs}) + endif() + + if(STATIC_LIBC) +@@ -81,11 +83,11 @@ 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() +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}) diff --git a/dev-debug/bpftrace/metadata.xml b/dev-debug/bpftrace/metadata.xml new file mode 100644 index 000000000000..3b275bd1ca56 --- /dev/null +++ b/dev-debug/bpftrace/metadata.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>chutzpah@gentoo.org</email> + </maintainer> + <maintainer type="person"> + <email>jsmolic@gentoo.org</email> + <name>Jakov Smolić</name> + </maintainer> + <use> + <flag name="fuzzing">Build bpftrace for fuzzing</flag> + </use> + <upstream> + <remote-id type="github">iovisor/bpftrace</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-debug/d-feet/Manifest b/dev-debug/d-feet/Manifest new file mode 100644 index 000000000000..cbd98d88e5e9 --- /dev/null +++ b/dev-debug/d-feet/Manifest @@ -0,0 +1,4 @@ +AUX d-feet-0.3.16-fix-meson-0.61.patch 911 BLAKE2B 21198e257461b1df602b1d7cdeddc3158d39967d8d3bd412ea36ac6cb1fd904d6419e5c40664958639e2be8b2cf08bef53fdd8fd458f6e4548d7b08f519874f1 SHA512 bcb3ddf35293c2f000bd857a20de403cb1903b787de078c1276bbdf8dc8b4285f8419a8ad6e031296e1428e098325d8471fcf8c19480818502d280dc9a591d16 +DIST d-feet-0.3.16.tar.xz 237888 BLAKE2B b4773b781c53feb11889b49746e714a42a15a85daeb16dcd5235609fb6105c0b1a3ebeeb4a08830de9067f1c193702b31fcbfc67190eb2f901907b96acfcadbc SHA512 ff4db968cbd679e2065c614d538187fe3c56118b44638771ec9f7472bdba4a798dc682565f520a8680a8001ea39ce88555b07cda172e60f88eb6bdf1e00b5a6d +EBUILD d-feet-0.3.16.ebuild 1060 BLAKE2B 63a2f2d5e87e44fc3fce0f4fd91c8f5f7188249dc23733a933d1843fa2bac75a00b843d6d0af830fea8c9ad36c724fe9752a764e8ac9828914f95de498f8415a SHA512 20d0db42303fe614969608ed46d739de7694d94d571058e8a8e77f62d3a7a1d9d95b3c03b362ac0ce57e5e46ddb3cd5ff4cf4a749649e2e96561139d266c9ee2 +MISC metadata.xml 347 BLAKE2B 0534d2161f4465dadbfb5d217d95e01574ca3f174745df3326413e563c8a776c703a6470c609bb9f4eb35831693dd485479042d4ad5047c98606f47428783105 SHA512 703bafbcfa8b6000e3b52674ba625c1df5c7c50c7fdc10280f96ec341b32dd1e970aaf226a45defa0c44ca4a2f27e16d5665e81e3715b8db4edd511ef67ab237 diff --git a/dev-debug/d-feet/d-feet-0.3.16.ebuild b/dev-debug/d-feet/d-feet-0.3.16.ebuild new file mode 100644 index 000000000000..efd7093136e1 --- /dev/null +++ b/dev-debug/d-feet/d-feet-0.3.16.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python3_{10..11} ) + +inherit gnome2 meson python-single-r1 virtualx + +DESCRIPTION="D-Feet is a powerful D-Bus debugger" +HOMEPAGE="https://wiki.gnome.org/Apps/DFeet" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="amd64 ~riscv x86" + +IUSE="test +X" +RESTRICT="!test? ( test )" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +DEPEND=" + ${PYTHON_DEPS} + >=x11-libs/gtk+-3.9.4:3[introspection] + >=dev-libs/gobject-introspection-0.9.6:= +" +RDEPEND=" + ${DEPEND} + >=dev-libs/glib-2.34:2 + $(python_gen_cond_dep ' + >=dev-python/pygobject-3.3.91:3[${PYTHON_USEDEP}] + ') + >=sys-apps/dbus-1 + X? ( x11-libs/libwnck:3[introspection] ) +" +BDEPEND=" + dev-util/itstool + test? ( dev-python/pycodestyle ) +" + +PATCHES=( + "${FILESDIR}"/${PN}-0.3.16-fix-meson-0.61.patch +) + +src_configure() { + local emesonargs=( + $(meson_use test tests) + -Dpython="${EPYTHON}" + ) + meson_src_configure +} + +src_test() { + virtx meson_src_test +} + +src_install() { + meson_src_install + python_optimize +} diff --git a/dev-debug/d-feet/files/d-feet-0.3.16-fix-meson-0.61.patch b/dev-debug/d-feet/files/d-feet-0.3.16-fix-meson-0.61.patch new file mode 100644 index 000000000000..064f94105882 --- /dev/null +++ b/dev-debug/d-feet/files/d-feet-0.3.16-fix-meson-0.61.patch @@ -0,0 +1,31 @@ +https://gitlab.gnome.org/GNOME/d-feet/-/merge_requests/32 +https://bugs.gentoo.org/831524 + +From 05465d486afdba116dbc22fc22c1e6573aea4f22 Mon Sep 17 00:00:00 2001 +From: Jan Beich <jbeich@FreeBSD.org> +Date: Mon, 24 Jan 2022 12:11:57 +0000 +Subject: [PATCH] meson: drop unused argument for i18n.merge_file() + +Ignored in Meson < 0.60.0, deprecated since 0.60.1 and fatal since 0.61.0. + +data/meson.build:15:0: ERROR: Function does not take positional arguments. +data/meson.build:27:0: ERROR: Function does not take positional arguments. +--- a/data/meson.build ++++ b/data/meson.build +@@ -13,7 +13,6 @@ desktop_in = configure_file( + ) + + i18n.merge_file( +- desktop, + type: 'desktop', + input: desktop_in, + output: '@BASENAME@', +@@ -25,7 +24,6 @@ i18n.merge_file( + appdata = df_namespace + '.appdata.xml' + + i18n.merge_file( +- appdata, + input: appdata + '.in', + output: '@BASENAME@', + po_dir: po_dir, +GitLab diff --git a/dev-debug/d-feet/metadata.xml b/dev-debug/d-feet/metadata.xml new file mode 100644 index 000000000000..4351bedc95b7 --- /dev/null +++ b/dev-debug/d-feet/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>gnome@gentoo.org</email> + <name>Gentoo GNOME Desktop</name> + </maintainer> + <upstream> + <remote-id type="gnome-gitlab">GNOME/d-feet</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-debug/d-spy/Manifest b/dev-debug/d-spy/Manifest new file mode 100644 index 000000000000..110330cde73e --- /dev/null +++ b/dev-debug/d-spy/Manifest @@ -0,0 +1,5 @@ +DIST d-spy-1.6.0.tar.xz 215844 BLAKE2B 4811591024d3b599e5e10354db8aa14d5b80bf6fb3c8bfbeadcf5d9c14501af0d00368643cb58eac5ad9452b541743ce3ff9f8376202270f635078876a1012b3 SHA512 7a65bd64320a69eb54077a359381bda35f285b42f4181bf972bc790a8002a773b66c23303e5e94c3dec8c7b9bfc7b8aa60a5ce60f2eb47459ce3dfd634a05703 +DIST d-spy-1.8.0.tar.xz 232944 BLAKE2B cb6f90e9b3d779aa5a76bc93f16e9ae677af029b72451bbb983ffeb06b99a92aa2402ef8b6f6a6c6b4ad4f6ba49a924db37d7e9fc9cb98157a6475a0ec234267 SHA512 49c0ff250a91110014f98453ed6958cf4b5191cc0c8d31c5e63b1408864eaf0906ab3860b0479400a04a8614ee36fe5b9527b179e6346bdb5616cb188d2648f0 +EBUILD d-spy-1.6.0.ebuild 713 BLAKE2B 0be979fc911889f8e9143671a68e1170607027589dfe1d9beba88a46a59e3ff3e2bb2d8df53b08b123528f850d0173cfffb0d529af4f7c667e31f089a87208ea SHA512 588b144c35c680f0f640068a18954f8d49441e52214399fbb2ebabc7116b54d31f1e74b6e21dc9223f78b24c0743153bd06aaafd525f945e7c0cac2e0ae47695 +EBUILD d-spy-1.8.0.ebuild 721 BLAKE2B 9e659351c8a59634e8052c27e299a80b1ea9974cd950c688520cc905ffca551bc61ea867473213c2c7cbbf085d54fb52087c4956d77e2b368c590dfd3fe77ef0 SHA512 e25c8244895efb177cbe6634e5ae2dd98b4ed494019ab01f89bbeeea2272bc857e99bd20ca824e7778b525a0f8622d4c409351d0e86cedcb293a1f60091647c8 +MISC metadata.xml 346 BLAKE2B ed5a5f063aa92eb582564f615a38bb8e3d71955f0c42cc91eb488d0cb81b615dd1bb05b8b833c9a225dddf2e6f5d3089983357a4dac0f81edac3303327dc3121 SHA512 fb5ae140eaf1130d78e8222253cc2c2ef059e7b3d7d765c2f1b8038f691e1119867be986b1585c981f07fe038ec010f427e1a758ec3d22c618cc7e289160274b diff --git a/dev-debug/d-spy/d-spy-1.6.0.ebuild b/dev-debug/d-spy/d-spy-1.6.0.ebuild new file mode 100644 index 000000000000..a3ef33127ea0 --- /dev/null +++ b/dev-debug/d-spy/d-spy-1.6.0.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit gnome.org meson xdg + +DESCRIPTION="D-spy is a blisteringly fast D-Bus debugger" +HOMEPAGE="https://gitlab.gnome.org/GNOME/d-spy" + +LICENSE="GPL-3+ LGPL-3+" +SLOT="1" +KEYWORDS="amd64" + +DEPEND=" + >=dev-libs/glib-2.68:2 + >=gui-libs/gtk-4.6:4 + >=gui-libs/libadwaita-1.0:1 +" +RDEPEND=" + ${DEPEND} + >=sys-apps/dbus-1 +" +BDEPEND=" + dev-libs/appstream-glib + dev-util/desktop-file-utils + sys-devel/gettext + virtual/pkgconfig +" + +src_install() { + meson_src_install +} + +pkg_postinst() { + xdg_icon_cache_update + xdg_desktop_database_update +} + +pkg_postrm() { + xdg_icon_cache_update + xdg_desktop_database_update +} diff --git a/dev-debug/d-spy/d-spy-1.8.0.ebuild b/dev-debug/d-spy/d-spy-1.8.0.ebuild new file mode 100644 index 000000000000..75eed80ac1d1 --- /dev/null +++ b/dev-debug/d-spy/d-spy-1.8.0.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit gnome.org meson xdg + +DESCRIPTION="D-spy is a blisteringly fast D-Bus debugger" +HOMEPAGE="https://gitlab.gnome.org/GNOME/d-spy" + +LICENSE="GPL-3+ LGPL-3+" +SLOT="1" +KEYWORDS="~amd64 ~arm64" + +DEPEND=" + >=dev-libs/glib-2.68:2 + >=gui-libs/gtk-4.6:4 + >=gui-libs/libadwaita-1.0:1 +" +RDEPEND=" + ${DEPEND} + >=sys-apps/dbus-1 +" +BDEPEND=" + dev-libs/appstream-glib + dev-util/desktop-file-utils + sys-devel/gettext + virtual/pkgconfig +" + +src_install() { + meson_src_install +} + +pkg_postinst() { + xdg_icon_cache_update + xdg_desktop_database_update +} + +pkg_postrm() { + xdg_icon_cache_update + xdg_desktop_database_update +} diff --git a/dev-debug/d-spy/metadata.xml b/dev-debug/d-spy/metadata.xml new file mode 100644 index 000000000000..5da3a9ec9abb --- /dev/null +++ b/dev-debug/d-spy/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>gnome@gentoo.org</email> + <name>Gentoo GNOME Desktop</name> + </maintainer> + <upstream> + <remote-id type="gnome-gitlab">GNOME/d-spy</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-debug/duma/Manifest b/dev-debug/duma/Manifest new file mode 100644 index 000000000000..0a4a0ac2640a --- /dev/null +++ b/dev-debug/duma/Manifest @@ -0,0 +1,5 @@ +AUX duma-2.5.15-gcc6.patch 599 BLAKE2B 7fa6c2d42b9c1191e40854aae2bfee236b0c9f9e5360f8c59a32d9b4a89c1a5351812dadce8943848478751ce49db30d5374251a759fa5af9ce28420be64ddbe SHA512 9577e34e97b6f63654a8fa5b6ad26f54733cdd758a2a96b99c2771f9593436501b09ade40e8b20ff61da033e64c635a29b4884a6e4ea3b62fa9a4c12587cf947 +DIST duma-2.5.15-GNUmakefile.patch.bz2 4618 BLAKE2B 506127ce1f8f3d01d0443ab1240c585aa734bf3756ae632ccec8ff88f33fc0ffc5113705d5c3c31c14bf52a2cf3c82132669c2c14d24f0c6df17b8e802c8ef40 SHA512 6d83294897a60c6d0ebac388c8f791adc6a199b2c9838497bcfff39502262014c8437a331e08e3526568d3ef755a7dfdc2557771bdae89c58cd5f714eae70df2 +DIST duma_2_5_15.tar.gz 240479 BLAKE2B c79f47ba418e22a65a2ad2d4cbff796c2a620ec5f36743d543fe1260e61ec700c648033ac3c91e71be3f3e1129a1c12e9f83a91277244962cfbd494d9588d681 SHA512 0e2abdb08cfbaf9fd0a6be348c831a83ac4ee86d2297dcd1c4d625ddb4b2c1c73eef05e2b895e291d5b8076b1baea559c89d475f30e409210df4ab69b71b6345 +EBUILD duma-2.5.15-r2.ebuild 2164 BLAKE2B 350d182db6009a3ee6b84ec03a9dd9b703282e26600cbe00710dc8ac07cf1136d54d9782d1c9ae31a1ab1ae970cd7b658d9db5b9125b83564e97108d63c3bbd0 SHA512 64dfeb411018292ccfcfdf784d35db370a69e03fab1867d0dfcd8c66d0c16249e49f7dab8834e98a3c2aa825da9679adb33f8f45d7b3f61a5e72b0354d462b51 +MISC metadata.xml 601 BLAKE2B 1ae26b4db7d716fdbefebb00f48fbd98d61370ac262db216fd8ecece69fd2965dffcc65f6ce424ef017217da320789ca36a354e7a78bf07aca8dfface6af9d1b SHA512 9ce897f1db885fe7909d582d3b3dc12d8e4ca97822d2b1fdf3c062fa3f4982145d01d120832edb1bd9927f7fe66cf2282b6028497bc88dc8c975aa0531d9dd7a diff --git a/dev-debug/duma/duma-2.5.15-r2.ebuild b/dev-debug/duma/duma-2.5.15-r2.ebuild new file mode 100644 index 000000000000..64f1d18d48b8 --- /dev/null +++ b/dev-debug/duma/duma-2.5.15-r2.ebuild @@ -0,0 +1,88 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit flag-o-matic toolchain-funcs versionator + +MY_P=${PN}_$(replace_all_version_separators '_') + +DESCRIPTION="DUMA (Detect Unintended Memory Access) is a memory debugging library" +HOMEPAGE="http://duma.sourceforge.net" +SRC_URI="mirror://sourceforge/duma/${MY_P}.tar.gz + mirror://gentoo/${P}-GNUmakefile.patch.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ppc x86" +IUSE="examples" + +S=${WORKDIR}/${MY_P} + +PATCHES=( + "${WORKDIR}"/${P}-GNUmakefile.patch + "${FILESDIR}"/${P}-gcc6.patch +) + +src_configure() { + # other flags will break duma + export CFLAGS="-O0 -Wall -Wextra -U_FORTIFY_SOURCE" + tc-export AR CC CXX LD RANLIB + + # bug #789708 + append-cxxflags -std=c++14 + + case "${CHOST}" in + *-linux-gnu) + OS=linux;; + *-solaris*) + OS=solaris;; + *-darwin*) + OS=osx;; + esac + export OS="${OS}" + elog "Detected OS is: ${OS}" + + if use amd64 && ! [ -n "${DUMA_ALIGNMENT}" ]; then + export DUMA_ALIGNMENT=16 + elog "Exported DUMA_ALIGNMENT=${DUMA_ALIGNMENT} for x86_64," + fi + +} + +src_compile() { + # The below must be run first if distcc is enabled, otherwise + # the real build breaks on parallel makes. + emake reconfig + emake +} + +src_test() { + emake test + + elog "Please, see the output above to verify all tests have passed." + elog "Both static and dynamic confidence tests should say PASSED." +} + +src_install() { + emake prefix="${D}/usr" libdir="${D}/usr/$(get_libdir)" \ + docdir="${D}/usr/share/doc/${PF}" install + + sed -i "s|LD_PRELOAD=./libduma|LD_PRELOAD=libduma|" "${D}"/usr/bin/duma \ + || die "sed failed" + + dodoc CHANGELOG TODO GNUmakefile + + if use examples; then + docinto examples + dodoc example[1-6].cpp example_makes/ex6/Makefile + fi +} + +pkg_postinst() { + elog "See the GNUmakefile which will be also installed at" + elog "/usr/share/doc/${PF} for more options. You can now export" + elog "varibles to the build system easily, e.g.:" + elog "# export CPPFLAGS=\"-DFLAG\" (or by using append-cppflags)" + elog "# export DUMA_ALIGNMENT=${DUMA_ALIGNMENT} (Default is 16 for x86_64)" + elog "See more information about DUMA_ALIGNMENT from Readme.txt" +} diff --git a/dev-debug/duma/files/duma-2.5.15-gcc6.patch b/dev-debug/duma/files/duma-2.5.15-gcc6.patch new file mode 100644 index 000000000000..7cffef2b4e2c --- /dev/null +++ b/dev-debug/duma/files/duma-2.5.15-gcc6.patch @@ -0,0 +1,22 @@ +--- duma_2_5_15/dumapp.cpp.old 2016-09-21 19:28:01.286332961 -0400 ++++ duma_2_5_15/dumapp.cpp 2016-09-21 19:28:06.722907238 -0400 +@@ -190,7 +190,9 @@ + * (11) = (a) ; ASW + */ + void * DUMA_CDECL operator new( DUMA_SIZE_T size ) ++#if __cplusplus < 201103L + throw(std::bad_alloc) ++#endif + { + return duma_new_operator(size, EFA_NEW_ELEM, true DUMA_PARAMS_UK); + } +@@ -254,7 +256,9 @@ + * (21) = (a) ; AAW + */ + void * DUMA_CDECL operator new[]( DUMA_SIZE_T size ) ++#if __cplusplus < 201103L + throw(std::bad_alloc) ++#endif + { + return duma_new_operator(size, EFA_NEW_ARRAY, true DUMA_PARAMS_UK); + } diff --git a/dev-debug/duma/metadata.xml b/dev-debug/duma/metadata.xml new file mode 100644 index 000000000000..92eeebf5b18b --- /dev/null +++ b/dev-debug/duma/metadata.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>bircoph@gentoo.org</email> + <name>Andrew Savchenko</name> + </maintainer> + <longdescription> +DUMA is an open-source library (under GNU General Public License) to +detect buffer overruns and under-runs in C and C++ programs. This +library is a fork of Buce Perens Electric Fence library and adds +some new features to it.</longdescription> + <upstream> + <remote-id type="sourceforge">duma</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-debug/leaktracer/Manifest b/dev-debug/leaktracer/Manifest new file mode 100644 index 000000000000..78c521601efd --- /dev/null +++ b/dev-debug/leaktracer/Manifest @@ -0,0 +1,3 @@ +DIST leaktracer-2.4-gentoo_p2.tbz2 11957 BLAKE2B 0af20e7a43c88a16027e859779924ef3fc86af5fb8324a96721f190db4ef59d78681ea4b91ef9843ed467541c9ca3a9b1618339174fdc1901a13b5221acc5479 SHA512 12f348564933c8cf372208f846bb21b175f041e7687811e9c6ce8062e7f285b9d2395e7853a20df11d9b0d5b8fff89efc76ccbac9f8b7c0bc4fd4ea25d476718 +EBUILD leaktracer-2.4-r3.ebuild 1383 BLAKE2B da5c32dbe9d14c1c5a91f6b6cf12f5ab0fddc21d2a3f832d5e52ca2a5eda088ee2ffcdda3a615785b104f586f5077f57ebef87bdb31b389e13da38eb096320b0 SHA512 1ed1b8e1e59d5015e190871bf16e719a173a8f97a00250b67222742bee770ebaaa9abed0b379f003ed782bb857e8bad3bd8fcdfdcd329eaefee2e94553114749 +MISC metadata.xml 167 BLAKE2B 868e3b584722eaacf68273db062bb773d8c7e5d7ab2b81ca7e8397643bf7cc106c3a1033594401c99c54f667bb45d6b73f9048fc335580bbd44b4589ad26a832 SHA512 30caadd1496c3b9969136038239a1d8e01f236726b4022c2d7e19ca7575f25f735e556835e581afbf44fbd3e4104c40f2b5ef5fa70118d75c881fdf871962d0a diff --git a/dev-debug/leaktracer/leaktracer-2.4-r3.ebuild b/dev-debug/leaktracer/leaktracer-2.4-r3.ebuild new file mode 100644 index 000000000000..e0ba6140a682 --- /dev/null +++ b/dev-debug/leaktracer/leaktracer-2.4-r3.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +# Upstream-package has no version in it's name. +# We therefore repackage it directly, together with the patches. +PATCH_LEVEL="2" + +DESCRIPTION="Trace and analyze memory leaks in C++ programs" +HOMEPAGE="https://andreasen.org/LeakTracer/" +SRC_URI="mirror://gentoo/${P}-gentoo_p${PATCH_LEVEL}.tbz2" + +LICENSE="public-domain" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" + +DEPEND="dev-lang/perl + dev-debug/gdb" +RDEPEND="${DEPEND}" + +# leaktracer is being realized using LD_PRELOAD and segfaults +# when being run in the sandbox and the library is _not_ in +# /usr/$(get_libdir) which is not possible before installation +RESTRICT="test" + +src_prepare() { + eapply -p1 "${WORKDIR}/patches/01_all_gcc-cflags.patch" + eapply -p0 "${WORKDIR}/patches/05_all_libdir.patch" + eapply -p1 "${WORKDIR}/patches/15_all_printf.patch" + + sed -i \ + -e "s|%LIBDIR%|$(get_libdir)|" \ + LeakCheck || die "sed for setting lib path failed" + + eapply_user +} + +src_compile() { + emake CXX="$(tc-getCXX)" +} + +src_install() { + dobin LeakCheck leak-analyze + dolib.so LeakTracer.so + dodoc README test.cc + docinto html + dodoc README.html +} + +pkg_postinst() { + elog "To use LeakTracer, run LeakCheck my_prog and then leak-analyze my_prog leak.out" + elog "Please refer to README file for more info." +} diff --git a/dev-debug/leaktracer/metadata.xml b/dev-debug/leaktracer/metadata.xml new file mode 100644 index 000000000000..85e4ed814fa2 --- /dev/null +++ b/dev-debug/leaktracer/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<!-- maintainer-needed --> +</pkgmetadata> diff --git a/dev-debug/ltrace/Manifest b/dev-debug/ltrace/Manifest new file mode 100644 index 000000000000..76544f73735a --- /dev/null +++ b/dev-debug/ltrace/Manifest @@ -0,0 +1,13 @@ +AUX ltrace-0.7.3-CXX-for-tests.patch 255 BLAKE2B cd213eff103c4efa9a96a28a333825b32b43333b07a6e25ccbf5a216ba12a0fa1e38f5a1b4644ca19f9eec0df0cddb8fae95a92e5e44af497aacc448a2eb58c6 SHA512 02ecca05ff34739c234f9b3a2331b10f2bb62289c2698095a4276fdb76d3494e1657c7551a5933876bf5b722db3a1c62dd839db7768ebd69c897b4a109bd5cc5 +AUX ltrace-0.7.3-alpha-protos.patch 541 BLAKE2B 727e9acb2c12cfda3d5c15903bda8bff9e8f8823a03daa3031d4cb022b9735026e14d9e6d756c568a92401f546589aa94b099c27d6fa1555d365b0d00ce041a2 SHA512 32738dd0688c861961703a5e5c0e14324218f3ecdfdbcef0977522e2de1c9d77fc0fa1a3ea0d2074190293bf360cf8b5adfa16c67a002a1df38e37c70c024595 +AUX ltrace-0.7.3-ia64-pid_t.patch 184 BLAKE2B 4d739f7ad6474541cec166cc1262637edbf30b32ef3335ac92e834bd611472de5473801ad307b7ba56eec0657bbcceea48d7fe17517663c6389d0843e9a9d5bc SHA512 1029f86f3b3e33eebcdbafa6dc56e2ece2a33234a6b7a0b05e4bb87424829c5f512e019e6c6a962e639a9cfeac56edea3d0ac250fc31489755e68d2181ce254f +AUX ltrace-0.7.3-ia64.patch 1538 BLAKE2B 2a407d2e19e74ddf22da1371cf72585cec5c630d00670798c6c8e9b3991d3aac641784bceeda544b49e76ae572c487bc5455de4239aa967e25318625e0307e0f SHA512 c6e7576047aa06eca67a80ecaa008854a2e312b1d38693cc802a6b6be6f671003716c6a0d3268fb3f076f3311fb27c228f55220bcb2432afd0210542020764ad +AUX ltrace-0.7.3-musl-host.patch 313 BLAKE2B 3ff936391668b118db37aabcf197081b85ed1ac67759a275ae3d18b398fb7af96ec74475f1c50d1dfa22153c459c079fe95789826b8c4eaecb6c38575f7be8aa SHA512 4aa92f406a45aa10cf8b456fd4eb1421d74c682040c71a6819f9caea60dd275cd268a42d0c656e68d7cda70b152bc4e83bc70461c5ac0732d09b70abc77f0ed8 +AUX ltrace-0.7.3-print-test-pie.patch 774 BLAKE2B e67bedbd0ea2470007390634fe588ee7cd074cff4b90f57fe821f6124d4aee9e2cb8f60b46b7007659d5a29d929cf579c38d858c31b8667ba50f64d579909c81 SHA512 9f407805719f21838fa3d2c48aaa96025fb4785a28b5b4e50b2593093067ed6cb406dbb662e0178e84e9db101b4cfa12867127cd212abf6417130e7cb4c21002 +AUX ltrace-0.7.91-debian-patchset-6.4.patch 1868 BLAKE2B 6d3a8565c8dba4b4d73f9df2b0fd9c85971477ddc6e549310476ad7a81c050328fb51104f8801cbc1ca6b458a41cd14113faf9ccf219db2fffd195619d0a3bf2 SHA512 5ba893f3295b11193a56d49bab5c874350f42e58ed8ecc397c33e2f51947609a607cb84e06d8ff8f38392815afbd75f567ab6366ffded93345477bec8e92ae10 +AUX ltrace-0.7.91-pid_t.patch 182 BLAKE2B 0425953956211429741d7a2f1527e8614428af250f12d0a93687000b54ab58b7ced0bc3cd278f0f64ecef6cd20dc1c87625ebfc033f518f2571ca450205409dc SHA512 93207907df8300aa5e396d1fa2bfd35993e4e5c5308a0ba1a2fcdc95cae7c817df9d67a108e3c392a2b13152ea3b73dd721f61bad99203f04b016d6d939fb508 +AUX ltrace-0.7.91-test-glibc-2.33.patch 351 BLAKE2B 8daacf679828735a37ec062ce775b6087de363a447bb35d25e20e51d256a30b80f3bdc87867c0752ad0e5011eb625fc0b0c54998cd7c0ddc4cde6be33a35f138 SHA512 b689072e5d7a098aff5dcc0a424e69c48a859514fefc459144c24d0ddd7ee800c82766d0fac741e75de1691dd874369db7a44db676e60f2176426115c0e21a04 +AUX ltrace-0.7.91-tuple-tests.patch 431 BLAKE2B 452e19ff22cd4453e73f1652777ffd998c3af1bb510815c5867a38b53cc25924a02aa055bb335491b0292c430749db6febca79222d1669a3f416ff1dcde4c715 SHA512 6ec368bc19f870322e21d05a409b29aa1064c8c901c98d4281a35513149bc6104282bb4b655506fdd22dd305edb10d438416e2f42bf65cd59748c17ce5a386d9 +DIST ltrace-0.7.91_pre20221216.tar.bz2 288077 BLAKE2B cadc2ac551a96dfa95aee0d0eb251d8f41a8631350ba3be3f67d0cb10774a3db6abbd42481d24febdfcb0d565107e66b4de0056a85a7954bb050adb8e8fa5b4a SHA512 993c247797551b4fbb202c04f9af08063c8641946825b17d1f32c4647c606ece803a6b049c4afa3046c798add161ab58f01d90106f3b6029a223af03bca27a99 +EBUILD ltrace-0.7.91_pre20221216-r1.ebuild 1732 BLAKE2B 23c02f090da9a64747dd5c932295329f59b422f3495515407853d24f9046be35212683ce4b7f751e04e4990ea9ba512fed48f4b5fb6df44b6325f4ff6903d83b SHA512 f8d2f2af42a13178ce16a0807656ef4d473c9de3c5363ad3deedd0de1e40b4d21691754286e199c24bd6ca8c96b9ca8feddec2a4de566ab8c3c5b86d47b70008 +MISC metadata.xml 537 BLAKE2B 24953f8433b61bae5b1405f07bd321b6a2c284a3c20076c2f4263ed68cd7185fa51866aea595a616a15b6195b4841c8a5df61a075f00457b550b529ba2a39664 SHA512 5003800cc9a96fe56b72060bd439922dae92d8066ceee0cd90bbcc082c3db46de50cf53cbc05e9b840799d80362a5176a2c659b03846fd8283acec292898bb7b diff --git a/dev-debug/ltrace/files/ltrace-0.7.3-CXX-for-tests.patch b/dev-debug/ltrace/files/ltrace-0.7.3-CXX-for-tests.patch new file mode 100644 index 000000000000..06db36c46818 --- /dev/null +++ b/dev-debug/ltrace/files/ltrace-0.7.3-CXX-for-tests.patch @@ -0,0 +1,11 @@ +Testsuite uses CXX to trace mangled symbols. +--- a/configure.ac ++++ b/configure.ac +@@ -53,6 +53,7 @@ AC_SUBST(HOST_CPU) + + # Checks for programs. + AC_PROG_CC ++AC_PROG_CXX + LT_INIT + # libtool-2: LT_INIT() + AM_INIT_AUTOMAKE([foreign no-exeext dist-bzip2]) diff --git a/dev-debug/ltrace/files/ltrace-0.7.3-alpha-protos.patch b/dev-debug/ltrace/files/ltrace-0.7.3-alpha-protos.patch new file mode 100644 index 000000000000..7ff573272963 --- /dev/null +++ b/dev-debug/ltrace/files/ltrace-0.7.3-alpha-protos.patch @@ -0,0 +1,12 @@ +Fix build failure on alpha: + plt.c:32:12: error: dereferencing pointer to incomplete type ‘struct library_symbol’ + return sym->enter_addr; + ^ +--- a/sysdeps/linux-gnu/alpha/plt.c 2012-11-10 13:43:55.000000000 +0100 ++++ b/sysdeps/linux-gnu/alpha/plt.c 2016-06-27 23:21:28.000000000 +0200 +@@ -23,0 +24 @@ ++#include "library.h" +--- a/sysdeps/linux-gnu/alpha/trace.c 2016-06-27 23:30:08.000000000 +0200 ++++ b/sysdeps/linux-gnu/alpha/trace.c 2016-06-27 23:25:20.000000000 +0200 +@@ -29,0 +30 @@ ++#include "backend.h" diff --git a/dev-debug/ltrace/files/ltrace-0.7.3-ia64-pid_t.patch b/dev-debug/ltrace/files/ltrace-0.7.3-ia64-pid_t.patch new file mode 100644 index 000000000000..c466ce17e02d --- /dev/null +++ b/dev-debug/ltrace/files/ltrace-0.7.3-ia64-pid_t.patch @@ -0,0 +1,6 @@ +--- a/sysdeps/linux-gnu/ia64/breakpoint.c ++++ b/sysdeps/linux-gnu/ia64/breakpoint.c +@@ -26,2 +26,3 @@ + #include <sys/ptrace.h> ++#include <sys/types.h> /* pid_t */ + #include <string.h> diff --git a/dev-debug/ltrace/files/ltrace-0.7.3-ia64.patch b/dev-debug/ltrace/files/ltrace-0.7.3-ia64.patch new file mode 100644 index 000000000000..4fb1c4eba734 --- /dev/null +++ b/dev-debug/ltrace/files/ltrace-0.7.3-ia64.patch @@ -0,0 +1,39 @@ +Fix build fauilure on ia64. + +Build fails due to bitrot: some definitions +moved off from <sys/pthrace.h> to <asm/ptrace.h> +(similar to other arches). + +fetch.c:39:26: error: field 'regs' has incomplete type + struct pt_all_user_regs regs; + ^~~~ +fetch.c:209:25: warning: 'struct ia64_fpreg' declared inside parameter list will not be visible outside of this definition or declaration + fpreg_to_double (struct ia64_fpreg *fp) { + ^~~~~~~~~~ +fetch.c: In function 'fpreg_to_double': +fetch.c:211:45: error: dereferencing pointer to incomplete type 'struct ia64_fpreg' + asm ("ldf.fill %0=%1" : "=f"(result) : "m"(*fp)); + ^~~ + +diff --git a/sysdeps/linux-gnu/ia64/fetch.c b/sysdeps/linux-gnu/ia64/fetch.c +index 54dc5b8..b3b9a9a 100644 +--- a/sysdeps/linux-gnu/ia64/fetch.c ++++ b/sysdeps/linux-gnu/ia64/fetch.c +@@ -134,9 +134,4 @@ allocate_reg(struct fetch_context *ctx, struct Process *proc, + return 0; + +- /* This would normally be brought over from asm/ptrace.h, but +- * when we do, we get namespace conflicts between asm/fpu.h +- * and libunwind. */ +- enum { PT_AUR_BSP = 17 }; +- + union cfm_t cfm = { .value = ctx->regs.cfm }; + unsigned long *bsp = (unsigned long *)ctx->regs.ar[PT_AUR_BSP]; +diff --git a/sysdeps/linux-gnu/ia64/ptrace.h b/sysdeps/linux-gnu/ia64/ptrace.h +index ef63b4f..8b131f1 100644 +--- a/sysdeps/linux-gnu/ia64/ptrace.h ++++ b/sysdeps/linux-gnu/ia64/ptrace.h +@@ -20,2 +20,3 @@ + + #include <sys/ptrace.h> ++#include <asm/ptrace.h> diff --git a/dev-debug/ltrace/files/ltrace-0.7.3-musl-host.patch b/dev-debug/ltrace/files/ltrace-0.7.3-musl-host.patch new file mode 100644 index 000000000000..7729449d0604 --- /dev/null +++ b/dev-debug/ltrace/files/ltrace-0.7.3-musl-host.patch @@ -0,0 +1,11 @@ +https://bugs.gentoo.org/713428 +--- a/configure.ac ++++ b/configure.ac +@@ -33,6 +33,7 @@ AC_CANONICAL_HOST + + case "${host_os}" in + linux-gnu*) HOST_OS="linux-gnu" ;; ++ linux-musl*) HOST_OS="linux-gnu" ;; + linux-uclibc*) HOST_OS="linux-gnu" ;; + *) AC_MSG_ERROR([unkown host-os ${host_os}]) ;; + esac diff --git a/dev-debug/ltrace/files/ltrace-0.7.3-print-test-pie.patch b/dev-debug/ltrace/files/ltrace-0.7.3-print-test-pie.patch new file mode 100644 index 000000000000..5e46135add3e --- /dev/null +++ b/dev-debug/ltrace/files/ltrace-0.7.3-print-test-pie.patch @@ -0,0 +1,15 @@ +--- a/testsuite/ltrace.minor/print-instruction-pointer.exp ++++ b/testsuite/ltrace.minor/print-instruction-pointer.exp +@@ -32,6 +32,12 @@ catch "exec sh -c {objdump -d $objdir/$subdir/$binfile | sed -n '/^\[0-9a-fA-F\] + catch "exec sh -c {echo \"$output\" | sed -n '2p'| awk -F' ' '{print \$1}'|awk -F: '{print \$1}'}" addr1 + catch "exec sh -c {echo \"$output\" | sed -n '5p'| awk -F' ' '{print \$1}'|awk -F: '{print \$1}'}" addr2 + ++# Pick at most last 3 digits: ++# PIE binaries randomize address on page level. ++# Let's assume page size is no bigger than 4096 (3 hex digits) ++set addr1 [string range $addr1 3 end] ++set addr2 [string range $addr2 3 end] ++ + verbose "addr1 = $addr1" + verbose "addr2 = $addr2" + # Verify the output by checking numbers of print in main.ltrace. diff --git a/dev-debug/ltrace/files/ltrace-0.7.91-debian-patchset-6.4.patch b/dev-debug/ltrace/files/ltrace-0.7.91-debian-patchset-6.4.patch new file mode 100644 index 000000000000..1f3bb5ec6a21 --- /dev/null +++ b/dev-debug/ltrace/files/ltrace-0.7.91-debian-patchset-6.4.patch @@ -0,0 +1,77 @@ +Patches imported from the Debian patch set 6.4 for ltrace-0.7.3: + - 01-avoid-libstdc++ (adapted to account for the absence of configure), + - 03-alpha-debug.h + - 05-sparc-ftbfs + - 06-unexpected-breakpoint +The other two have since been merged upstream. + +--- a/configure.ac ++++ b/configure.ac +@@ -126,6 +126,15 @@ + libstdcxx_LIBS=""]) + AC_SUBST(libstdcxx_LIBS) + ++if test "x$liberty_LIBS" != "x" ++then ++ libsupcxx_LIBS="" ++ libstdcxx_LIBS="" ++elif test "x$libsupcxx_LIBS" != "x" ++then ++ libstdcxx_LIBS="" ++fi ++ + + dnl Check security_get_boolean_active availability. + AC_CHECK_HEADERS(selinux/selinux.h) +--- a/handle_event.c ++++ b/handle_event.c +@@ -740,9 +740,12 @@ + + if ((sbp = address2bpstruct(leader, brk_addr)) != NULL) + breakpoint_on_hit(sbp, event->proc); +- else if (event->proc->state != STATE_IGNORED) ++ else if (event->proc->state != STATE_IGNORED) { + output_line(event->proc, + "unexpected breakpoint at %p", brk_addr); ++ continue_process(event->proc->pid); ++ return; ++ } + + /* breakpoint_on_hit may delete its own breakpoint, so we have + * to look it up again. */ +--- a/sysdeps/linux-gnu/alpha/trace.c ++++ b/sysdeps/linux-gnu/alpha/trace.c +@@ -29,7 +29,6 @@ + + #include "proc.h" + #include "common.h" +-#include "debug.h" + + #if (!defined(PTRACE_PEEKUSER) && defined(PTRACE_PEEKUSR)) + # define PTRACE_PEEKUSER PTRACE_PEEKUSR +--- a/sysdeps/linux-gnu/sparc/plt.c ++++ b/sysdeps/linux-gnu/sparc/plt.c +@@ -19,8 +19,9 @@ + */ + + #include <gelf.h> ++ + #include "proc.h" +-#include "common.h" ++#include "library.h" + + GElf_Addr + arch_plt_sym_val(struct ltelf *lte, size_t ndx, GElf_Rela * rela) { +--- a/sysdeps/linux-gnu/sparc/trace.c ++++ b/sysdeps/linux-gnu/sparc/trace.c +@@ -26,8 +26,10 @@ + #include <sys/wait.h> + #include <signal.h> + #include <string.h> ++ + #include "ptrace.h" + #include "proc.h" ++#include "backend.h" + #include "common.h" + + void diff --git a/dev-debug/ltrace/files/ltrace-0.7.91-pid_t.patch b/dev-debug/ltrace/files/ltrace-0.7.91-pid_t.patch new file mode 100644 index 000000000000..06075006b2e1 --- /dev/null +++ b/dev-debug/ltrace/files/ltrace-0.7.91-pid_t.patch @@ -0,0 +1,10 @@ +--- a/proc.h ++++ b/proc.h +@@ -27,6 +27,7 @@ + + #include <sys/time.h> + #include <stdint.h> ++#include <unistd.h> /* pid_t */ + + #if defined(HAVE_LIBDW) + # include <elfutils/libdwfl.h> diff --git a/dev-debug/ltrace/files/ltrace-0.7.91-test-glibc-2.33.patch b/dev-debug/ltrace/files/ltrace-0.7.91-test-glibc-2.33.patch new file mode 100644 index 000000000000..b78d4580b050 --- /dev/null +++ b/dev-debug/ltrace/files/ltrace-0.7.91-test-glibc-2.33.patch @@ -0,0 +1,11 @@ +--- a/testsuite/ltrace.main/system_calls.exp ++++ b/testsuite/ltrace.main/system_calls.exp +@@ -133,7 +133,7 @@ + { {^write$} == 1 } + { {^unlink(at)?$} >= 2 } + { {^open(at)?$} == 1 } +- { {^(new|f)?stat(64)?$} >= 1 } ++ { {^(new)?stat|fstatat64|newfstatat$} >= 1 } + { {^close$} == 1 } + { {^getcwd$} == 1 } + { {^chdir$} == 1 } diff --git a/dev-debug/ltrace/files/ltrace-0.7.91-tuple-tests.patch b/dev-debug/ltrace/files/ltrace-0.7.91-tuple-tests.patch new file mode 100644 index 000000000000..c7c997d5545e --- /dev/null +++ b/dev-debug/ltrace/files/ltrace-0.7.91-tuple-tests.patch @@ -0,0 +1,11 @@ +--- a/testsuite/Makefile.am ++++ b/testsuite/Makefile.am +@@ -42,6 +42,8 @@ + echo set elfutils_LD_LIBRARY_PATH '"$(elfutils_LD_LIBRARY_PATH)"' >> $@ + echo set libunwind_LD_LIBRARY_PATH '"$(libunwind_LD_LIBRARY_PATH)"' >> $@ + echo set PREFIX '"$(prefix)"' >> $@ ++ echo set CC_FOR_TARGET '"$(CC)"' >> $@ ++ echo set CXX_FOR_TARGET '"$(CXX)"' >> $@ + + CLEANFILES = *.o *.so *.log *.sum *.ltrace site.bak setval.tmp site.exp env.exp + diff --git a/dev-debug/ltrace/ltrace-0.7.91_pre20221216-r1.ebuild b/dev-debug/ltrace/ltrace-0.7.91_pre20221216-r1.ebuild new file mode 100644 index 000000000000..7c9e7b3f9740 --- /dev/null +++ b/dev-debug/ltrace/ltrace-0.7.91_pre20221216-r1.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools + +EGIT_COMMIT="5cffc0d2134f697fbac8627ec5b5f0085cd47c8a" + +DESCRIPTION="trace library calls made at runtime" +HOMEPAGE="https://gitlab.com/cespedes/ltrace" +SRC_URI="https://gitlab.com/cespedes/${PN}/-/archive/${EGIT_COMMIT}.tar.bz2 -> ${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 ~arm ~ia64 ~mips ppc ~ppc64 ~sparc x86" +IUSE="debug elfutils selinux test unwind" + +REQUIRED_USE="?? ( elfutils unwind )" + +RDEPEND="virtual/libelf:= + elfutils? ( dev-libs/elfutils ) + selinux? ( sys-libs/libselinux ) + unwind? ( sys-libs/libunwind:= )" +DEPEND="${RDEPEND} + sys-libs/binutils-libs + test? ( dev-util/dejagnu )" + +# Effectively abandoned upstream. Extremely sensitive to the sandbox, versions +# of core libraries, kernel security settings... +RESTRICT="test" + +S=${WORKDIR}/${PN}-${EGIT_COMMIT} + +PATCHES=( + "${FILESDIR}"/${PN}-0.7.91-debian-patchset-6.4.patch + "${FILESDIR}"/${PN}-0.7.3-CXX-for-tests.patch + "${FILESDIR}"/${PN}-0.7.3-alpha-protos.patch + "${FILESDIR}"/${PN}-0.7.3-ia64.patch + "${FILESDIR}"/${PN}-0.7.3-ia64-pid_t.patch + "${FILESDIR}"/${PN}-0.7.3-musl-host.patch + "${FILESDIR}"/${PN}-0.7.3-print-test-pie.patch + "${FILESDIR}"/${PN}-0.7.91-pid_t.patch + "${FILESDIR}"/${PN}-0.7.91-test-glibc-2.33.patch + "${FILESDIR}"/${PN}-0.7.91-tuple-tests.patch +) + +src_prepare() { + default + + sed -i '/^dist_doc_DATA/d' Makefile.am || die + eautoreconf +} + +src_configure() { + ac_cv_header_selinux_selinux_h=$(usex selinux) \ + ac_cv_lib_selinux_security_get_boolean_active=$(usex selinux) \ + econf \ + --disable-werror \ + $(use_enable debug) \ + $(use_with elfutils) \ + $(use_with unwind libunwind) +} diff --git a/dev-debug/ltrace/metadata.xml b/dev-debug/ltrace/metadata.xml new file mode 100644 index 000000000000..e7ef67f97d07 --- /dev/null +++ b/dev-debug/ltrace/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>marecki@gentoo.org</email> + <name>Marek Szuba</name> + </maintainer> + <upstream> + <remote-id type="gitlab">cespedes/ltrace</remote-id> + </upstream> + <use> + <flag name="elfutils">Use libdwfl from <pkg>dev-libs/elfutils</pkg> for frame unwinding support</flag> + <flag name="unwind">Use <pkg>sys-libs/libunwind</pkg> for frame unwinding support</flag> + </use> +</pkgmetadata> diff --git a/dev-debug/scap-driver/Manifest b/dev-debug/scap-driver/Manifest new file mode 100644 index 000000000000..a84d27bdc9c1 --- /dev/null +++ b/dev-debug/scap-driver/Manifest @@ -0,0 +1,9 @@ +AUX 0.29.3-fix-kmod-build-on-5.18+.patch 2363 BLAKE2B 8e5a89b68fb67076d01a7dc295157d2f2542a2db84460a35ed3162b77ff860097f1761317b93dec6aa0d6294b4414e445fd2c94df700bb5d738210982174f595 SHA512 f7c1e57cb05de1a97a3332055f6d6f74a637f38281a4e98b202cf84c9dd02b90e0b4fee3dbc44653760231ce55ad396aec3018b3b239249b6a37b018f672fba4 +AUX 0.29.3-fix-kmod-build-on-6.2+.patch 1420 BLAKE2B 45f312bce9ce3dbaa0ddd300ccfd7dfcc3fb6d537cd0b716642d25b4c5a3747798ca23d237d67c92d32da500edb5e0458bfdff4a940d2f6fdb84144c5687028d SHA512 4b84a2559cb6a72d294b5cac6ec2d6f2de8ae90e298e27afcdff6bc046366afca6468ac923c4197623f14bbe0a4d0bd3757f34740a367e6b7c4e76472b102379 +AUX 0.29.3-fix-kmod-build-on-6.3+.patch 939 BLAKE2B c626a6c9e41510d9720a8d161f4b6fa2efc729437cffdeea97ab346b0dca9a18af82339e403b63c7ac297304893f686a20f5c612df417229b82701367530098d SHA512 c2b020de87c92724f93a0937e2ece2f1e88f8b0dbb5b1d85bffccd51fddc1fc2024fe0ae222f2f01adeb5dc34964b1e86f27f0bdfee347bf1bb927388c1b6c5c +AUX 0.29.3-fix-kmod-build-on-6.4+.patch 1029 BLAKE2B 6025b3f598cb96c01085ef0ca807aa54894217c1929a1c1377c2f1399ff5bcbd56ce8c31c50d310f4f63df55587593e133ce00914c49edeb6a73d1d088d69083 SHA512 f2dfab8dd67d9694da592bcd10231b5132c459b71f6751d1baaa09e29a704f3185706618ab8d28b17d4c7a7e4b9c5e14fb4f53680bd502cfc98aa9693d2a5537 +AUX 0.29.3-fix-kmod-build-on-6.7+.patch 901 BLAKE2B c8ffe70d8b7872f7f56b69e6472357259cb435b39444a18fca60a42b22c85a158d482e5a629581e572d74cebdfb9f1521205bad810f2daea1ca4e3083f1bb775 SHA512 5d098bd1612e0d5f2c70f845a8f2832688e37420960eca450eb9bbfee229921d512beb614ee7fcfed36571b72ae3a124e925ff419165b4703dc3f119d42c0bb1 +DIST falcosecurity-libs-e5c53d648f3c4694385bbe488e7d47eaa36c229a.tar.gz 816972 BLAKE2B b47ae6a7677935500ebdab8aea7f4c49ef50b7175ec097e7213a1f041ac2b5aa642379924927ec12c84271016e9ab9d191c0c1d4ffacd6ade58b7a03c37f9221 SHA512 65e5916e5f9507fd867a5e9ba3b2670a1b73b7672a22479d3019e948a52ad74441d7e2ce1c74ebd0fdbd1ce66808efa49f285bd5180bceae9d4e6730a60787ce +EBUILD scap-driver-0.29.3-r4.ebuild 1547 BLAKE2B e94241e736a205f8a6185c27b7e253c410ca4c59d7c0cccb007c22ad44db961fac8b3a29464f6f7c4da23b5da38c1c6b8accb12edf7284f92d7b09c51d4a099e SHA512 237bf49a30264c3d57e3a1c06a6b1ee398e55a13f0c86ce476f8cbe8f266c5ca68f3b688fd8f46960611de21bed18556c1edaa05fdc6fd6471fb92a91c6ea827 +EBUILD scap-driver-0.29.3-r5.ebuild 1599 BLAKE2B 90ba3830d1b3d34bde6e37661408cd9d88d820878bd29b8d6d4ebf3ed872e7d88986b098c6350eae94300b3eedfb3eb5e20ef49d50abc45a7e25e7d154485c93 SHA512 b0de25c15d77ff42710226345310980d883c6972a35a48bba2d2d9b85de22e310bc557b5646ac2f371240580ca44cf2909f7ac7572a82f106b505922f9b057da +MISC metadata.xml 494 BLAKE2B d0bc754d3af2488b9dc7672fc63e962f4c885d88a819e4332bd1c25f84c967e2e1cd8489122490a864cbfd930225b3dc28c8bfad4426750c030dce6ef5a08b4e SHA512 b77b7c103cfb606333814af210a0fae1f7956ddd9d3c3a044b0bebf42553f5ffe99d04549fb9c5e40fce33e9d23761830b4944b2cd83bd8ca2193f9b7da60fc0 diff --git a/dev-debug/scap-driver/files/0.29.3-fix-kmod-build-on-5.18+.patch b/dev-debug/scap-driver/files/0.29.3-fix-kmod-build-on-5.18+.patch new file mode 100644 index 000000000000..974b561df47f --- /dev/null +++ b/dev-debug/scap-driver/files/0.29.3-fix-kmod-build-on-5.18+.patch @@ -0,0 +1,63 @@ + +Bug: https://bugs.gentoo.org/866113 +Source: https://github.com/falcosecurity/libs/pull/411/commits/36e945af4feb31c8b875f7d4624592b0c1ff929d + +From 36e945af4feb31c8b875f7d4624592b0c1ff929d Mon Sep 17 00:00:00 2001 +From: Federico Di Pierro <nierro92@gmail.com> +Date: Mon, 20 Jun 2022 14:26:39 +0200 +Subject: [PATCH] fix(driver): fixed kmod build on linux kernels >= 5.18. + +Signed-off-by: Federico Di Pierro <nierro92@gmail.com> +--- + driver/main.c | 14 +++++++++----- + 1 file changed, 9 insertions(+), 5 deletions(-) + +diff --git a/driver/main.c b/driver/main.c +index 6b5ae461a..e606cc2f8 100644 +--- a/driver/main.c ++++ b/driver/main.c +@@ -70,8 +70,9 @@ MODULE_AUTHOR("the Falco authors"); + #define TRACEPOINT_PROBE(probe, args...) static void probe(void *__data, args) + #endif + +-#ifndef pgprot_encrypted +-#define pgprot_encrypted(x) (x) ++// Allow build even on arch where PAGE_ENC is not implemented ++#ifndef _PAGE_ENC ++#define _PAGE_ENC 0 + #endif + + struct ppm_device { +@@ -1217,8 +1218,9 @@ static int ppm_mmap(struct file *filp, struct vm_area_struct *vma) + + pfn = vmalloc_to_pfn(vmalloc_area_ptr); + ++ pgprot_val(vma->vm_page_prot) = pgprot_val(PAGE_SHARED) | _PAGE_ENC; + ret = remap_pfn_range(vma, useraddr, pfn, +- PAGE_SIZE, pgprot_encrypted(PAGE_SHARED)); ++ PAGE_SIZE, vma->vm_page_prot); + if (ret < 0) { + pr_err("remap_pfn_range failed (1)\n"); + goto cleanup_mmap; +@@ -1255,8 +1257,9 @@ static int ppm_mmap(struct file *filp, struct vm_area_struct *vma) + while (mlength > 0) { + pfn = vmalloc_to_pfn(vmalloc_area_ptr); + ++ pgprot_val(vma->vm_page_prot) = pgprot_val(PAGE_SHARED) | _PAGE_ENC; + ret = remap_pfn_range(vma, useraddr, pfn, +- PAGE_SIZE, pgprot_encrypted(PAGE_SHARED)); ++ PAGE_SIZE, vma->vm_page_prot); + if (ret < 0) { + pr_err("remap_pfn_range failed (1)\n"); + goto cleanup_mmap; +@@ -1277,8 +1280,9 @@ static int ppm_mmap(struct file *filp, struct vm_area_struct *vma) + while (mlength > 0) { + pfn = vmalloc_to_pfn(vmalloc_area_ptr); + ++ pgprot_val(vma->vm_page_prot) = pgprot_val(PAGE_SHARED) | _PAGE_ENC; + ret = remap_pfn_range(vma, useraddr, pfn, +- PAGE_SIZE, pgprot_encrypted(PAGE_SHARED)); ++ PAGE_SIZE, vma->vm_page_prot); + if (ret < 0) { + pr_err("remap_pfn_range failed (1)\n"); + goto cleanup_mmap; diff --git a/dev-debug/scap-driver/files/0.29.3-fix-kmod-build-on-6.2+.patch b/dev-debug/scap-driver/files/0.29.3-fix-kmod-build-on-6.2+.patch new file mode 100644 index 000000000000..39476feef051 --- /dev/null +++ b/dev-debug/scap-driver/files/0.29.3-fix-kmod-build-on-6.2+.patch @@ -0,0 +1,44 @@ + + +Bug: https://bugs.gentoo.org/895868 +Source: https://github.com/falcosecurity/libs/commit/b8ec3e8637c850066d01543616fe413e8deb9e1f + +From b8ec3e8637c850066d01543616fe413e8deb9e1f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Holger=20Hoffst=C3=A4tte?= <holger@applied-asynchrony.com> +Date: Tue, 21 Feb 2023 22:08:23 +0100 +Subject: [PATCH] fix(driver): fix build on linux-6.2 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Attributes in "struct device*" are now const, so add a matching prototype +for ppm_devnode(). + +Fixes #918 + +Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com> +--- + driver/main.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/driver/main.c b/driver/main.c +index 197933b9ce..6dc3374fc1 100644 +--- a/driver/main.c ++++ b/driver/main.c +@@ -2662,11 +2662,15 @@ static int get_tracepoint_handles(void) + #endif + + #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 20) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 2, 0) ++static char *ppm_devnode(const struct device *dev, umode_t *mode) ++#else + #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 3, 0) + static char *ppm_devnode(struct device *dev, umode_t *mode) + #else + static char *ppm_devnode(struct device *dev, mode_t *mode) +-#endif ++#endif /* LINUX_VERSION_CODE > KERNEL_VERSION(3, 3, 0) */ ++#endif /* LINUX_VERSION_CODE > KERNEL_VERSION(6, 2, 0) */ + { + if (mode) { + *mode = 0400; diff --git a/dev-debug/scap-driver/files/0.29.3-fix-kmod-build-on-6.3+.patch b/dev-debug/scap-driver/files/0.29.3-fix-kmod-build-on-6.3+.patch new file mode 100644 index 000000000000..6926df857179 --- /dev/null +++ b/dev-debug/scap-driver/files/0.29.3-fix-kmod-build-on-6.3+.patch @@ -0,0 +1,20 @@ + +Bug: https://github.com/falcosecurity/libs/issues/1063 +Subset of patch taken from: https://github.com/falcosecurity/libs/pull/1071 + +diff --git a/driver/ppm_fillers.c b/driver/ppm_fillers.c +index 0441923c6d..cfa967f134 100644 +--- a/driver/ppm_fillers.c ++++ b/driver/ppm_fillers.c +@@ -1329,7 +1329,10 @@ int f_proc_startupdate(struct event_filler_arguments *args) + + if (exe_file != NULL) { + if (file_inode(exe_file) != NULL) { +-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 12, 0) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0) ++ exe_writable |= (file_permission(exe_file, MAY_WRITE) == 0); ++ exe_writable |= inode_owner_or_capable(file_mnt_idmap(exe_file), file_inode(exe_file)); ++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(5, 12, 0) + exe_writable |= (inode_permission(current_user_ns(), file_inode(exe_file), MAY_WRITE) == 0); + exe_writable |= inode_owner_or_capable(current_user_ns(), file_inode(exe_file)); + #else diff --git a/dev-debug/scap-driver/files/0.29.3-fix-kmod-build-on-6.4+.patch b/dev-debug/scap-driver/files/0.29.3-fix-kmod-build-on-6.4+.patch new file mode 100644 index 000000000000..ac0a4aeca285 --- /dev/null +++ b/dev-debug/scap-driver/files/0.29.3-fix-kmod-build-on-6.4+.patch @@ -0,0 +1,33 @@ + +From: https://github.com/falcosecurity/libs/pull/1110 +Bug: https://github.com/falcosecurity/libs/issues/1109 + +From 394c9d84e64ad9828cdce6cdad5a76c352e252d2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Holger=20Hoffst=C3=A4tte?= <holger@applied-asynchrony.com> +Date: Fri, 19 May 2023 03:54:40 +0200 +Subject: [PATCH] fix(driver): fixed 6.4 kernel build +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com> +--- + driver/main.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/driver/main.c b/driver/main.c +index 380f85c27c..668e45429a 100644 +--- a/driver/main.c ++++ b/driver/main.c +@@ -2912,7 +2912,11 @@ int scap_init(void) + goto init_module_err; + } + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0) + g_ppm_class = class_create(THIS_MODULE, DRIVER_DEVICE_NAME); ++#else ++ g_ppm_class = class_create(DRIVER_DEVICE_NAME); ++#endif + if (IS_ERR(g_ppm_class)) { + pr_err("can't allocate device class\n"); + ret = -EFAULT; diff --git a/dev-debug/scap-driver/files/0.29.3-fix-kmod-build-on-6.7+.patch b/dev-debug/scap-driver/files/0.29.3-fix-kmod-build-on-6.7+.patch new file mode 100644 index 000000000000..a6db9e2d751c --- /dev/null +++ b/dev-debug/scap-driver/files/0.29.3-fix-kmod-build-on-6.7+.patch @@ -0,0 +1,21 @@ + +Bug: https://bugs.gentoo.org/921163 +Subset of patch taken from: https://github.com/falcosecurity/libs/commit/bf0afa0cacb775582fde134500fe66af38f1eb59 + +--- a/driver/ppm_fillers.c 2024-01-01 15:05:13.000000000 +0100 ++++ b/driver/ppm_fillers.c 2024-01-01 15:15:59.893048651 +0100 +@@ -430,7 +430,13 @@ struct file *ppm_get_mm_exe_file(struct + { + struct file *exe_file; + +-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 7, 0) ++ // Since linux 6.7.0, `get_file_rcu` is no more a define and takes a double pointer parameter. ++ // See https://github.com/torvalds/linux/commit/0ede61d8589cc2d93aa78230d74ac58b5b8d0244. ++ rcu_read_lock(); ++ exe_file = get_file_rcu(&mm->exe_file); ++ rcu_read_unlock(); ++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0) + rcu_read_lock(); + exe_file = rcu_dereference(mm->exe_file); + if (exe_file && !get_file_rcu(exe_file)) diff --git a/dev-debug/scap-driver/metadata.xml b/dev-debug/scap-driver/metadata.xml new file mode 100644 index 000000000000..66a8465c5f91 --- /dev/null +++ b/dev-debug/scap-driver/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person" proxied="yes"> + <email>holger@applied-asynchrony.com</email> + <name>Holger Hoffstätte</name> + </maintainer> + <maintainer type="project" proxied="proxy"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <upstream> + <remote-id type="github">falcosecurity/libs</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-debug/scap-driver/scap-driver-0.29.3-r4.ebuild b/dev-debug/scap-driver/scap-driver-0.29.3-r4.ebuild new file mode 100644 index 000000000000..186e01a6e6b2 --- /dev/null +++ b/dev-debug/scap-driver/scap-driver-0.29.3-r4.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake linux-mod-r1 + +DESCRIPTION="Kernel module for dev-debug/sysdig" +HOMEPAGE="https://sysdig.com/" + +# The driver is part of falcosecurity/libs, but for versioning reasons we cannot (yet) +# use semver-released packages; instead we pull in a commit that is used and known +# to work with sysdig, see sysdig/cmake/modules/falcosecurity-libs.cmake for details. +# For now the commit here and the one referenced in sysdig should be in sync. +LIBS_COMMIT="e5c53d648f3c4694385bbe488e7d47eaa36c229a" +SRC_URI="https://github.com/falcosecurity/libs/archive/${LIBS_COMMIT}.tar.gz -> falcosecurity-libs-${LIBS_COMMIT}.tar.gz" +S="${WORKDIR}/libs-${LIBS_COMMIT}" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="amd64 ~arm64 x86" + +RDEPEND="!<dev-debug/sysdig-${PV}[modules]" + +CONFIG_CHECK="HAVE_SYSCALL_TRACEPOINTS ~TRACEPOINTS" + +PATCHES=( + "${FILESDIR}"/${PV}-fix-kmod-build-on-5.18+.patch + "${FILESDIR}"/${PV}-fix-kmod-build-on-6.2+.patch + "${FILESDIR}"/${PV}-fix-kmod-build-on-6.3+.patch + "${FILESDIR}"/${PV}-fix-kmod-build-on-6.4+.patch +) + +src_configure() { + local mycmakeargs=( + # we will use linux-mod, so just pretend to use bundled deps + # in order to make it through the cmake setup. + -DUSE_BUNDLED_DEPS=ON + -DCREATE_TEST_TARGETS=OFF + -DDRIVER_VERSION=${LIBS_COMMIT} + ) + + cmake_src_configure +} + +src_compile() { + local modlist=( scap=:"${BUILD_DIR}"/driver/src ) + local modargs=( KERNELDIR="${KV_OUT_DIR}" ) + + linux-mod-r1_src_compile +} diff --git a/dev-debug/scap-driver/scap-driver-0.29.3-r5.ebuild b/dev-debug/scap-driver/scap-driver-0.29.3-r5.ebuild new file mode 100644 index 000000000000..329ea0109b6f --- /dev/null +++ b/dev-debug/scap-driver/scap-driver-0.29.3-r5.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake linux-mod-r1 + +DESCRIPTION="Kernel module for dev-debug/sysdig" +HOMEPAGE="https://sysdig.com/" + +# The driver is part of falcosecurity/libs, but for versioning reasons we cannot (yet) +# use semver-released packages; instead we pull in a commit that is used and known +# to work with sysdig, see sysdig/cmake/modules/falcosecurity-libs.cmake for details. +# For now the commit here and the one referenced in sysdig should be in sync. +LIBS_COMMIT="e5c53d648f3c4694385bbe488e7d47eaa36c229a" +SRC_URI="https://github.com/falcosecurity/libs/archive/${LIBS_COMMIT}.tar.gz -> falcosecurity-libs-${LIBS_COMMIT}.tar.gz" +S="${WORKDIR}/libs-${LIBS_COMMIT}" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~x86" + +RDEPEND="!<dev-debug/sysdig-${PV}[modules]" + +CONFIG_CHECK="HAVE_SYSCALL_TRACEPOINTS ~TRACEPOINTS" + +PATCHES=( + "${FILESDIR}"/${PV}-fix-kmod-build-on-5.18+.patch + "${FILESDIR}"/${PV}-fix-kmod-build-on-6.2+.patch + "${FILESDIR}"/${PV}-fix-kmod-build-on-6.3+.patch + "${FILESDIR}"/${PV}-fix-kmod-build-on-6.4+.patch + "${FILESDIR}"/${PV}-fix-kmod-build-on-6.7+.patch +) + +src_configure() { + local mycmakeargs=( + # we will use linux-mod, so just pretend to use bundled deps + # in order to make it through the cmake setup. + -DUSE_BUNDLED_DEPS=ON + -DCREATE_TEST_TARGETS=OFF + -DDRIVER_VERSION=${LIBS_COMMIT} + ) + + cmake_src_configure +} + +src_compile() { + local modlist=( scap=:"${BUILD_DIR}"/driver/src ) + local modargs=( KERNELDIR="${KV_OUT_DIR}" ) + + linux-mod-r1_src_compile +} diff --git a/dev-debug/strace/Manifest b/dev-debug/strace/Manifest new file mode 100644 index 000000000000..23d69e7cb072 --- /dev/null +++ b/dev-debug/strace/Manifest @@ -0,0 +1,13 @@ +AUX strace-5.11-static.patch 5306 BLAKE2B 24150fcdf0ff75c4698542914bcd0fd39df9794f39ce0d16dac6dc3b689365e124d8d77a75a8fe81caff9432679563d84ffd31add74edb4c8f83aec28ff2f078 SHA512 bbeecbfd73109d21732acdaa28d5b4c82b23b7165f09e78e62cad68f9ac63dfb4c7a1c2eb8bdc642dda9f07d62e286ab46a2be236b5f03e1e6f9920f3093ede8 +AUX strace-6.4-linux-headers-6.5.patch 5283 BLAKE2B 67707d990124f3ebc05a33728251fb313fbde73b3f1ae72c046ea0c7faa05df26693fcdd8cd9ea98d8eb0c43dac5d35486af5392f7ad5f6cdbd8a05ad9991866 SHA512 ca11e21f848a2e7f128c10bc717ca6486caecbc43d45b04ee6c4c96014e645a43fec11d52c9b2f4911273b9d100c97b1956115dc7cfe5766c7fc9805952d88b5 +AUX strace-6.5-static.patch 5425 BLAKE2B c7b2477ba5a8b5f23ed28763e1149406f7f434ce014aa51069f80a8cf0cdfaa5dbfa58cbba12b0de1eef50e2ff7bd89c4d2b9f1e1587a889d7dbc5486045be2e SHA512 67f698522f1cd47f994baf8d7b7640ef0d36ea4bf8cf5069664e7219164dae949e53c136520d96b476b085023855db349e89937cc017ff4a77d5b8da09ab5bed +DIST strace-6.2.tar.xz 2364280 BLAKE2B 8e51cb3e426e9b99d598b4fcece21ba7873e81468cddae04c2f0b1a48dc40643c626acadd226389c33dbef5350b502817d3459d445fc17cce149f7e501c15ae2 SHA512 56708faa3f73c0673c98a5b8b8fe35289ecf2870f4f775bcb7a6be59451ef84685564c0129aca15b576d851f8efa1ff760e27658b914d1f31adf4de3b1ad721f +DIST strace-6.3.tar.xz 2382284 BLAKE2B 7373ebddd6f23713b752ed91598e536d61e08865907c7825dd3492574c7feb0ad6d56bea0e144e1082ac1882d68bb5f160f25e70bfc6e2fd47571ef2c40403fb SHA512 2b0a57e3ee8a23eb3882123149cd732c568322614bf8fde69fabcea64d0d4e3c46c71d63183e0e8d9f8744a7b1cebc823cc67023660c37547f5b854fcc1ca9df +DIST strace-6.4.tar.xz 2391828 BLAKE2B a9d359679bc5cc61061eb9f19a6156637f12509cb1045462b1547cba8a1218a9b2a4d3b87cf4a33856500515cc0bd457c1374b0ed349293821d80e3cc0de0452 SHA512 29f47195b2766dc0d2907aba2d561e87ec87939251d07fd82d22ffdd3c864944ab0c47eabd7b13272345dfc5dfae7ca435c94fd5ccc297dd46e0747c6d463e01 +DIST strace-6.6.tar.xz 2420364 BLAKE2B f1465fec58ac20ccce6a88441a34b1402e5c51f0bb4b7963f69b5ab5019a8c8722e3406c6f93c10c1eea11d17de7f9874895d6f4df24cf9ec42a18f36267687b SHA512 77ea45c72e513f6c07026cd9b2cc1a84696a5a35cdd3b06dd4a360fb9f9196958e3f6133b4a9c91e091c24066ba29e0330b6459d18a9c390caae2dba97ab399b +EBUILD strace-6.2.ebuild 2490 BLAKE2B 653cf660337917bf4221d4e71774f8bfc5048a3abb88602eae2778f921127b00c0695feedba0b265d382b74662e844037d59621398505b0dbff7a7d14494abd2 SHA512 c6515a2f9ebdbcc45f6bdad30999079858aa98e439c57300d5153de6c0c9e7fb2f7cea047ec0ea6850bff02d82524451ddfadbc9031f9733d812d8c1983c1ed9 +EBUILD strace-6.3.ebuild 2489 BLAKE2B d3d5e9c65b8b2ff3152b0f1bb9e43405b7317d9811b3358905649bff46a8e3550b2fb58c2f6e626dd68f3d1614ca8fa3ab120a4c672dc09e0136f05718b8b25c SHA512 354d679ea3f2b35cd30673c55c1157b09a6ea798d1ed03245f6dfddb0f259138096f3b851601e596aca6470b0f2ca9a99d244a65403623a1bb1f9c14e14453a6 +EBUILD strace-6.4-r1.ebuild 2531 BLAKE2B 33586a3feb9968878a516d333c80ef2d9a0b221e0bc1bf2ea805107eb2694e97027ad623a1cf04b400b4fefb876cd83031de639147a5181e30ff4ed5e35ef47c SHA512 81e58dcb36a23fcdbdce03c54a429ca248769ca8359f60ee918e903ce9c6609d564e4dd6574afa319c013a546c3b8e07d15d96d6e834825d98cfeed8731f71f3 +EBUILD strace-6.6.ebuild 2486 BLAKE2B e20bf26cac56713e01e40b4c5c40a3d4c6906c005de790f138d8a0715ddf5d767d642e11a41383732bc62105160987af0ef0b1183d777a04b6d2afd4331c2764 SHA512 832509181c592b61d0b7b37b5bdaea65045ca0581de1e594520b9f74bacd569acb57de36a08b263e67780668f940736515aa59cb0395a81925d191352a97bba2 +EBUILD strace-9999.ebuild 2495 BLAKE2B 46f3afcc4ab99e928644e0c2550d5f0603856e3f406413d48e6cf97a9412c10bb5151f51fe880c599bb9f1fa169134914bfb6c11d4c15319bec048e13909ee56 SHA512 0ae6f297572908448c5f2067d12a3d85a03d583ab1743ee60a996aec4e72b54b4a137c081650aa3248ea3fef6051bc81e67c6723f215d60188d781a9bb03712c +MISC metadata.xml 844 BLAKE2B 5c0ea5129bf202dbd4c7505ec5585f6ea43ef21098a776f4ed632f7a34e4f8b2705f4ded75ef2dd8e9c7ed53704d140efef27eba08076e9314820633e3cd602e SHA512 8c4f6e2b4f6914b91ee21cca3d70bb6b42571f9e57441b0e53a9f21591a521cc4f0b815e654dd3ac820618fdc92411c3448cffef113ea16c73121a1e242bd505 diff --git a/dev-debug/strace/files/strace-5.11-static.patch b/dev-debug/strace/files/strace-5.11-static.patch new file mode 100644 index 000000000000..146ace0dd2e7 --- /dev/null +++ b/dev-debug/strace/files/strace-5.11-static.patch @@ -0,0 +1,178 @@ +--- strace-5.11/configure.ac ++++ strace-5.11/configure.ac +@@ -47,6 +47,15 @@ + AC_DEFINE([MANPAGE_DATE], "[manpage_date]", [Date]) + AC_SUBST([MANPAGE_DATE], [manpage_date]) + ++AC_ARG_ENABLE([static], ++ [AS_HELP_STRING([--enable-static], ++ [link strace statically])], ++ [], [enable_static=no]) ++if test "$enable_static" = "yes"; then ++ # Add -pthread since strace wants -lrt for timer_create, and -lrt uses -lpthread. ++ LDFLAGS="$LDFLAGS -pthread -static" ++fi ++ + AC_C_BIGENDIAN + + dnl arch-specific default for --enable-gcc-Werror +--- strace-5.11/m4/st_libdw.m4 ++++ strace-5.11/m4/st_libdw.m4 +@@ -8,7 +8,6 @@ + AC_DEFUN([st_ARG_LIBDW], [dnl + + : ${libdw_CPPFLAGS=} +-: ${libdw_CFLAGS=} + : ${libdw_LDFLAGS=} + : ${libdw_LIBS=} + +@@ -34,48 +33,14 @@ + have_libdw= + + AS_IF([test "x$with_libdw" != xno && test "x$use_unwinder" = x], +- [saved_CPPFLAGS="$CPPFLAGS" +- saved_CFLAGS="$CFLAGS" +- CPPFLAGS="$CPPFLAGS $libdw_CPPFLAGS" +- CFLAGS="$CFLAGS $libdw_CFLAGS" +- +- AC_CHECK_HEADERS([elfutils/libdwfl.h], +- [AC_CHECK_LIB([dw], [dwfl_linux_proc_attach], +- [libdw_LIBS="-ldw $libdw_LIBS" +- AC_CACHE_CHECK([for elfutils version], +- [st_cv_ELFUTILS_VERSION], +- [[st_cv_ELFUTILS_VERSION="$(echo _ELFUTILS_VERSION | +- $CPP $CPPFLAGS -P -imacros elfutils/version.h - | +- grep '^[0-9]')" +- test -n "$st_cv_ELFUTILS_VERSION" || +- st_cv_ELFUTILS_VERSION=0 +- ]] +- ) +- AS_IF([test "$st_cv_ELFUTILS_VERSION" -ge 164], +- [have_libdw=yes], +- [AS_IF([test "x$with_libdw" = xyes], +- [AC_MSG_ERROR([elfutils version >= 164 is required for stack tracing support])], +- [AC_MSG_WARN([elfutils version >= 164 is required for stack tracing support])] +- ) +- ] +- ) +- ], +- [AS_IF([test "x$with_libdw" = xyes], +- [AC_MSG_FAILURE([failed to find dwfl_linux_proc_attach in libdw])], +- ) +- ], +- [$libdw_LDFLAGS $libdw_LIBS] +- ) +- ], +- [AS_IF([test "x$with_libdw" = xyes], +- [AC_MSG_FAILURE([failed to find elfutils/libdwfl.h])] +- ) +- ] +- ) +- +- CFLAGS="$saved_CFLAGS" +- CPPFLAGS="$saved_CPPFLAGS" +- ] ++ [if test "$enable_static" = "yes"; then ++ PKG_CHECK_MODULES_STATIC([LIBDW], [libdw >= 0.164]) ++ else ++ PKG_CHECK_MODULES([LIBDW], [libdw >= 0.164]) ++ fi ++ have_libdw=yes ++ libdw_CPPFLAGS="$LIBDW_CFLAGS" ++ libdw_LIBS="$LIBDW_LIBS"] + ) + + AS_IF([test "x$have_libdw" = xyes], +@@ -84,7 +49,6 @@ + [Whether to use libdw for stack tracing] + ) + AC_SUBST(libdw_CPPFLAGS) +- AC_SUBST(libdw_CFLAGS) + AC_SUBST(libdw_LDFLAGS) + AC_SUBST(libdw_LIBS) + ] +--- strace-5.11/m4/st_libunwind.m4 ++++ strace-5.11/m4/st_libunwind.m4 +@@ -28,64 +28,14 @@ + AC_DEFUN([st_LIBUNWIND], [dnl + + AS_IF([test "x$with_libunwind" != xno && test "x$use_unwinder" = x], +- [saved_CPPFLAGS="$CPPFLAGS" +- CPPFLAGS="$CPPFLAGS $libunwind_CPPFLAGS" +- +- AC_CHECK_HEADERS([libunwind-ptrace.h], +- [saved_LDFLAGS="$LDFLAGS" +- LDFLAGS="$LDFLAGS $libunwind_LDFLAGS" +- +- AC_CHECK_LIB([unwind], [backtrace], +- [libunwind_LIBS="-lunwind $libunwind_LIBS" +- +- AC_MSG_CHECKING([for unw_create_addr_space in libunwind-generic]) +- saved_LIBS="$LIBS" +- LIBS="-lunwind-generic $libunwind_LIBS $LIBS" +- +- AC_LINK_IFELSE( +- [AC_LANG_PROGRAM([[#include <libunwind-ptrace.h>]], +- [[return !unw_create_addr_space(0, 0)]]) +- ], +- [AC_MSG_RESULT([yes]) +- libunwind_LIBS="-lunwind-generic $libunwind_LIBS" +- +- AC_CHECK_LIB([unwind-ptrace], [_UPT_create], +- [libunwind_LIBS="-lunwind-ptrace $libunwind_LIBS" +- use_unwinder=libunwind +- ], +- [if test "x$with_libunwind" != xcheck; then +- AC_MSG_FAILURE([failed to find _UPT_create in libunwind-ptrace]) +- fi +- ], +- [$libunwind_LIBS] +- ) +- ], +- [AC_MSG_RESULT([no]) +- if test "x$with_libunwind" != xcheck; then +- AC_MSG_FAILURE([failed to find unw_create_addr_space in libunwind-generic]) +- fi +- ] +- ) +- +- LIBS="$saved_LIBS" +- ], +- [if test "x$with_libunwind" != xcheck; then +- AC_MSG_FAILURE([failed to find libunwind]) +- fi +- ], +- [$libunwind_LIBS] +- ) +- +- LDFLAGS="$saved_LDFLAGS" +- ], +- [if test "x$with_libunwind" != xcheck; then +- AC_MSG_FAILURE([failed to find libunwind-ptrace.h]) +- fi +- ] +- ) +- +- CPPFLAGS="$saved_CPPFLAGS" +- ] ++ [if test "$enable_static" = "yes"; then ++ PKG_CHECK_MODULES_STATIC([LIBUNWIND], [libunwind libunwind-generic libunwind-ptrace]) ++ else ++ PKG_CHECK_MODULES([LIBUNWIND], [libunwind libunwind-generic libunwind-ptrace]) ++ fi ++ use_unwinder="libunwind" ++ libunwind_CPPFLAGS="$LIBUNWIND_CFLAGS" ++ libunwind_LIBS="$LIBUNWIND_LIBS"] + ) + + if test "x$use_unwinder" = xlibunwind; then +--- strace-5.11/src/Makefile.am ++++ strace-5.11/src/Makefile.am +@@ -393,7 +393,6 @@ + if USE_LIBDW + libstrace_a_SOURCES += unwind-libdw.c + strace_CPPFLAGS += $(libdw_CPPFLAGS) +-strace_CFLAGS += $(libdw_CFLAGS) + strace_LDFLAGS += $(libdw_LDFLAGS) + strace_LDADD += $(libdw_LIBS) + endif diff --git a/dev-debug/strace/files/strace-6.4-linux-headers-6.5.patch b/dev-debug/strace/files/strace-6.4-linux-headers-6.5.patch new file mode 100644 index 000000000000..2814dee76258 --- /dev/null +++ b/dev-debug/strace/files/strace-6.4-linux-headers-6.5.patch @@ -0,0 +1,160 @@ +https://bugs.gentoo.org/913170 +https://github.com/strace/strace/issues/262 +https://github.com/strace/strace/commit/a8cec18845220cc82e45014ffdcab449ad664584 +https://github.com/strace/strace/commit/e0da3633669fcb829dd8d902d15443a755bd10fb + +From a8cec18845220cc82e45014ffdcab449ad664584 Mon Sep 17 00:00:00 2001 +From: "Dmitry V. Levin" <ldv@strace.io> +Date: Tue, 4 Jul 2023 08:00:00 +0000 +Subject: [PATCH] ptp: add max_phase_adj field and update rsv field of struct + ptp_clock_caps + +* bundled/linux/include/uapi/linux/ptp_clock.h (struct ptp_clock_caps): +Add max_phase_adj field and update rsv field following the change +introduced by Linux kernel commit v6.5-rc1~163^2~65^2~4. +* src/ptp.c (ptp_ioctl): Likewise. +* tests/ioctl_ptp.c (test_no_device): Update expected output. +--- a/bundled/linux/include/uapi/linux/ptp_clock.h ++++ b/bundled/linux/include/uapi/linux/ptp_clock.h +@@ -95,7 +95,8 @@ struct ptp_clock_caps { + int cross_timestamping; + /* Whether the clock supports adjust phase */ + int adjust_phase; +- int rsv[12]; /* Reserved for future use. */ ++ int max_phase_adj; /* Maximum phase adjustment in nanoseconds. */ ++ int rsv[11]; /* Reserved for future use. */ + }; + + struct ptp_extts_request { +--- a/src/ptp.c ++++ b/src/ptp.c +@@ -78,7 +78,7 @@ ptp_ioctl(struct tcb *const tcp, const unsigned int code, + case PTP_CLOCK_GETCAPS: + case PTP_CLOCK_GETCAPS2: { + struct ptp_clock_caps caps; +- CHECK_TYPE_SIZE(caps.rsv, sizeof(unsigned int) * 12); ++ CHECK_TYPE_SIZE(caps.rsv, sizeof(unsigned int) * 11); + CHECK_IOCTL_SIZE(PTP_CLOCK_GETCAPS, 80); + CHECK_IOCTL_SIZE(PTP_CLOCK_GETCAPS2, 80); + +@@ -106,6 +106,8 @@ ptp_ioctl(struct tcb *const tcp, const unsigned int code, + PRINT_FIELD_D(caps, cross_timestamping); + tprint_struct_next(); + PRINT_FIELD_D(caps, adjust_phase); ++ tprint_struct_next(); ++ PRINT_FIELD_D(caps, max_phase_adj); + PRINT_RSV(caps, rsv); + tprint_struct_end(); + break; +--- a/tests/ioctl_ptp.c ++++ b/tests/ioctl_ptp.c +@@ -151,7 +151,7 @@ test_no_device(void) + if (rc >= 0) { + printf("{max_adj=0, n_alarm=0, n_ext_ts=0, n_per_out=0" + ", pps=0, n_pins=0, cross_timestamping=0" +- ", adjust_phase=0}"); ++ ", adjust_phase=0, max_phase_adj=0}"); + } else { + printf("%p", caps); + } +@@ -166,7 +166,8 @@ test_no_device(void) + ", pps=-2136948508, n_pins=-2136948507" + ", cross_timestamping=-2136948506" + ", adjust_phase=-2136948505" +- ", rsv=[0x80a0c0e8, 0x80a0c0e9, 0x80a0c0ea" ++ ", max_phase_adj=-2136948504" ++ ", rsv=[0x80a0c0e9, 0x80a0c0ea" + ", 0x80a0c0eb, 0x80a0c0ec, 0x80a0c0ed" + ", 0x80a0c0ee, 0x80a0c0ef, 0x80a0c0f0" + ", 0x80a0c0f1, 0x80a0c0f2, 0x80a0c0f3]}"); + +From e0da3633669fcb829dd8d902d15443a755bd10fb Mon Sep 17 00:00:00 2001 +From: "Dmitry V. Levin" <ldv@strace.io> +Date: Mon, 3 Jul 2023 08:00:00 +0000 +Subject: [PATCH] io_uring: rename resv2 fields of io_[cs]qring_offsets to + user_addr + +* bundled/linux/include/uapi/linux/io_uring.h (struct io_sqring_offsets, +struct io_cqring_offsets): Rename resv2 to user_addr following +the change introduced by Linux kernel commit v6.5-rc1~235^2~32. +* src/io_uring.c (print_io_sqring_offsets, print_io_cqring_offsets): +Likewise. +* tests/io_uring_setup.c (main): Update expected output. +--- a/bundled/linux/include/uapi/linux/io_uring.h ++++ b/bundled/linux/include/uapi/linux/io_uring.h +@@ -406,7 +406,7 @@ struct io_sqring_offsets { + __u32 dropped; + __u32 array; + __u32 resv1; +- __u64 resv2; ++ __u64 user_addr; + }; + + /* +@@ -425,7 +425,7 @@ struct io_cqring_offsets { + __u32 cqes; + __u32 flags; + __u32 resv1; +- __u64 resv2; ++ __u64 user_addr; + }; + + /* +--- a/src/io_uring.c ++++ b/src/io_uring.c +@@ -45,10 +45,8 @@ print_io_sqring_offsets(const struct io_sqring_offsets *const p) + tprint_struct_next(); + PRINT_FIELD_X(*p, resv1); + } +- if (p->resv2) { +- tprint_struct_next(); +- PRINT_FIELD_X(*p, resv2); +- } ++ tprint_struct_next(); ++ PRINT_FIELD_X(*p, user_addr); + tprint_struct_end(); + } + +@@ -73,10 +71,8 @@ print_io_cqring_offsets(const struct io_cqring_offsets *const p) + tprint_struct_next(); + PRINT_FIELD_X(*p, resv1); + } +- if (p->resv2) { +- tprint_struct_next(); +- PRINT_FIELD_X(*p, resv2); +- } ++ tprint_struct_next(); ++ PRINT_FIELD_X(*p, user_addr); + tprint_struct_end(); + } + +--- a/tests/io_uring_setup.c ++++ b/tests/io_uring_setup.c +@@ -113,10 +113,9 @@ main(void) + params->sq_off.array); + if (params->sq_off.resv1) + printf(", resv1=%#x", params->sq_off.resv1); +- if (params->sq_off.resv2) +- printf(", resv1=%#llx", +- (unsigned long long) +- params->sq_off.resv2); ++ printf(", user_addr=%#llx", ++ (unsigned long long) ++ params->sq_off.user_addr); + + printf("}, cq_off={head=%u, tail=%u, ring_mask=%u" + ", ring_entries=%u, overflow=%u, cqes=%u" +@@ -130,10 +129,9 @@ main(void) + params->cq_off.flags); + if (params->cq_off.resv1) + printf(", resv1=%#x", params->cq_off.resv1); +- if (params->cq_off.resv2) +- printf(", resv2=%#llx", +- (unsigned long long) +- params->cq_off.resv2); ++ printf(", user_addr=%#llx", ++ (unsigned long long) ++ params->cq_off.user_addr); + + printf("}}) = %ld<anon_inode:[io_uring]>\n", rc); + } diff --git a/dev-debug/strace/files/strace-6.5-static.patch b/dev-debug/strace/files/strace-6.5-static.patch new file mode 100644 index 000000000000..67e4b05ca856 --- /dev/null +++ b/dev-debug/strace/files/strace-6.5-static.patch @@ -0,0 +1,178 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -54,6 +54,15 @@ AC_SUBST([STRACE_MANPAGE_DATE], [strace_manpage_date]) + AC_DEFINE([SLM_MANPAGE_DATE], "[slm_manpage_date]", [Date]) + AC_SUBST([SLM_MANPAGE_DATE], [slm_manpage_date]) + ++AC_ARG_ENABLE([static], ++ [AS_HELP_STRING([--enable-static], ++ [link strace statically])], ++ [], [enable_static=no]) ++if test "$enable_static" = "yes"; then ++ # Add -pthread since strace wants -lrt for timer_create, and -lrt uses -lpthread. ++ LDFLAGS="$LDFLAGS -pthread -static" ++fi ++ + AC_C_BIGENDIAN + + dnl arch-specific default for --enable-gcc-Werror +--- a/m4/st_libdw.m4 ++++ b/m4/st_libdw.m4 +@@ -8,7 +8,6 @@ + AC_DEFUN([st_ARG_LIBDW], [dnl + + : ${libdw_CPPFLAGS=} +-: ${libdw_CFLAGS=} + : ${libdw_LDFLAGS=} + : ${libdw_LIBS=} + +@@ -34,48 +33,14 @@ AC_DEFUN([st_LIBDW], [dnl + have_libdw= + + AS_IF([test "x$with_libdw" != xno && test "x$use_unwinder" = x], +- [saved_CPPFLAGS="$CPPFLAGS" +- saved_CFLAGS="$CFLAGS" +- CPPFLAGS="$CPPFLAGS $libdw_CPPFLAGS" +- CFLAGS="$CFLAGS $libdw_CFLAGS" +- +- AC_CHECK_HEADERS([elfutils/libdwfl.h], +- [AC_CHECK_LIB([dw], [dwfl_linux_proc_attach], +- [libdw_LIBS="-ldw $libdw_LIBS" +- AC_CACHE_CHECK([for elfutils version], +- [st_cv_ELFUTILS_VERSION], +- [[st_cv_ELFUTILS_VERSION="$(echo _ELFUTILS_VERSION | +- $CPP $CPPFLAGS -P -imacros elfutils/version.h - | +- grep '^[0-9]')" +- test -n "$st_cv_ELFUTILS_VERSION" || +- st_cv_ELFUTILS_VERSION=0 +- ]] +- ) +- AS_IF([test "$st_cv_ELFUTILS_VERSION" -ge 164], +- [have_libdw=yes], +- [AS_IF([test "x$with_libdw" = xyes], +- [AC_MSG_ERROR([elfutils version >= 164 is required for stack tracing support])], +- [AC_MSG_WARN([elfutils version >= 164 is required for stack tracing support])] +- ) +- ] +- ) +- ], +- [AS_IF([test "x$with_libdw" = xyes], +- [AC_MSG_FAILURE([failed to find dwfl_linux_proc_attach in libdw])], +- ) +- ], +- [$libdw_LDFLAGS $libdw_LIBS] +- ) +- ], +- [AS_IF([test "x$with_libdw" = xyes], +- [AC_MSG_FAILURE([failed to find elfutils/libdwfl.h])] +- ) +- ] +- ) +- +- CFLAGS="$saved_CFLAGS" +- CPPFLAGS="$saved_CPPFLAGS" +- ] ++ [if test "$enable_static" = "yes"; then ++ PKG_CHECK_MODULES_STATIC([LIBDW], [libdw >= 0.164]) ++ else ++ PKG_CHECK_MODULES([LIBDW], [libdw >= 0.164]) ++ fi ++ have_libdw=yes ++ libdw_CPPFLAGS="$LIBDW_CFLAGS" ++ libdw_LIBS="$LIBDW_LIBS"] + ) + + AS_IF([test "x$have_libdw" = xyes], +@@ -84,7 +49,6 @@ AS_IF([test "x$have_libdw" = xyes], + [Whether to use libdw for stack tracing] + ) + AC_SUBST(libdw_CPPFLAGS) +- AC_SUBST(libdw_CFLAGS) + AC_SUBST(libdw_LDFLAGS) + AC_SUBST(libdw_LIBS) + ] +--- a/m4/st_libunwind.m4 ++++ b/m4/st_libunwind.m4 +@@ -28,64 +28,14 @@ AC_ARG_WITH([libunwind], + AC_DEFUN([st_LIBUNWIND], [dnl + + AS_IF([test "x$with_libunwind" != xno && test "x$use_unwinder" = x], +- [saved_CPPFLAGS="$CPPFLAGS" +- CPPFLAGS="$CPPFLAGS $libunwind_CPPFLAGS" +- +- AC_CHECK_HEADERS([libunwind-ptrace.h], +- [saved_LDFLAGS="$LDFLAGS" +- LDFLAGS="$LDFLAGS $libunwind_LDFLAGS" +- +- AC_CHECK_LIB([unwind], [backtrace], +- [libunwind_LIBS="-lunwind $libunwind_LIBS" +- +- AC_MSG_CHECKING([for unw_create_addr_space in libunwind-generic]) +- saved_LIBS="$LIBS" +- LIBS="-lunwind-generic $libunwind_LIBS $LIBS" +- +- AC_LINK_IFELSE( +- [AC_LANG_PROGRAM([[#include <libunwind-ptrace.h>]], +- [[return !unw_create_addr_space(0, 0)]]) +- ], +- [AC_MSG_RESULT([yes]) +- libunwind_LIBS="-lunwind-generic $libunwind_LIBS" +- +- AC_CHECK_LIB([unwind-ptrace], [_UPT_create], +- [libunwind_LIBS="-lunwind-ptrace $libunwind_LIBS" +- use_unwinder=libunwind +- ], +- [if test "x$with_libunwind" != xcheck; then +- AC_MSG_FAILURE([failed to find _UPT_create in libunwind-ptrace]) +- fi +- ], +- [$libunwind_LIBS] +- ) +- ], +- [AC_MSG_RESULT([no]) +- if test "x$with_libunwind" != xcheck; then +- AC_MSG_FAILURE([failed to find unw_create_addr_space in libunwind-generic]) +- fi +- ] +- ) +- +- LIBS="$saved_LIBS" +- ], +- [if test "x$with_libunwind" != xcheck; then +- AC_MSG_FAILURE([failed to find libunwind]) +- fi +- ], +- [$libunwind_LIBS] +- ) +- +- LDFLAGS="$saved_LDFLAGS" +- ], +- [if test "x$with_libunwind" != xcheck; then +- AC_MSG_FAILURE([failed to find libunwind-ptrace.h]) +- fi +- ] +- ) +- +- CPPFLAGS="$saved_CPPFLAGS" +- ] ++ [if test "$enable_static" = "yes"; then ++ PKG_CHECK_MODULES_STATIC([LIBUNWIND], [libunwind libunwind-generic libunwind-ptrace]) ++ else ++ PKG_CHECK_MODULES([LIBUNWIND], [libunwind libunwind-generic libunwind-ptrace]) ++ fi ++ use_unwinder="libunwind" ++ libunwind_CPPFLAGS="$LIBUNWIND_CFLAGS" ++ libunwind_LIBS="$LIBUNWIND_LIBS"] + ) + + if test "x$use_unwinder" = xlibunwind; then +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -417,7 +417,6 @@ libstrace_a_SOURCES += unwind.c unwind.h + if USE_LIBDW + libstrace_a_SOURCES += unwind-libdw.c + strace_CPPFLAGS += $(libdw_CPPFLAGS) +-strace_CFLAGS += $(libdw_CFLAGS) + strace_LDFLAGS += $(libdw_LDFLAGS) + strace_LDADD += $(libdw_LIBS) + endif diff --git a/dev-debug/strace/metadata.xml b/dev-debug/strace/metadata.xml new file mode 100644 index 000000000000..2a0ac3bbabf4 --- /dev/null +++ b/dev-debug/strace/metadata.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>base-system@gentoo.org</email> + <name>Gentoo Base System</name> + </maintainer> + <use> + <flag name="aio"> + Enable <pkg>dev-libs/libaio</pkg> support for tracing Asynchronous I/O operations + </flag> + <flag name="unwind"> + Enable stack backtraces (-k flag) via <pkg>sys-libs/libunwind</pkg> + </flag> + <flag name="elfutils"> + Enable stack backtraces (-k flag) via <pkg>dev-libs/elfutils</pkg> + </flag> + </use> + <upstream> + <remote-id type="github">strace/strace</remote-id> + <remote-id type="gitlab">strace/strace</remote-id> + <remote-id type="sourceforge">strace</remote-id> + <remote-id type="cpe">cpe:/a:strace_project:strace</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-debug/strace/strace-6.2.ebuild b/dev-debug/strace/strace-6.2.ebuild new file mode 100644 index 000000000000..5335711e7f1a --- /dev/null +++ b/dev-debug/strace/strace-6.2.ebuild @@ -0,0 +1,109 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools edo flag-o-matic toolchain-funcs + +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://github.com/strace/strace.git" + inherit git-r3 +else + SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.xz" + KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" +fi + +DESCRIPTION="A useful diagnostic, instructional, and debugging tool" +HOMEPAGE="https://strace.io/" + +LICENSE="LGPL-2.1+ test? ( GPL-2+ )" +SLOT="0" +IUSE="aio perl selinux static test unwind elfutils" +RESTRICT="!test? ( test )" +REQUIRED_USE="?? ( unwind elfutils )" + +BDEPEND="virtual/pkgconfig" +LIB_DEPEND=" + unwind? ( sys-libs/libunwind[static-libs(+)] ) + elfutils? ( dev-libs/elfutils[static-libs(+)] ) + selinux? ( sys-libs/libselinux[static-libs(+)] ) +" +# strace only uses the header from libaio to decode structs +DEPEND=" + static? ( ${LIB_DEPEND} ) + aio? ( >=dev-libs/libaio-0.3.106 ) + sys-kernel/linux-headers +" +RDEPEND=" + !static? ( ${LIB_DEPEND//\[static-libs(+)]} ) + perl? ( dev-lang/perl ) +" + +PATCHES=( + "${FILESDIR}/${PN}-5.11-static.patch" +) + +src_prepare() { + default + + if [[ ! -e configure ]] ; then + # git generation + sed /autoreconf/d -i bootstrap || die + edo ./bootstrap + [[ ! -e CREDITS ]] && cp CREDITS{.in,} + fi + + eautoreconf + + # Stub out the -k test since it's known to be flaky. bug #545812 + sed -i '1iexit 77' tests*/strace-k.test || die +} + +src_configure() { + # Set up the default build settings, and then use the names strace expects. + tc-export_build_env BUILD_{CC,CPP} + local v bv + for v in CC CPP {C,CPP,LD}FLAGS ; do + bv="BUILD_${v}" + export "${v}_FOR_BUILD=${!bv}" + done + + filter-lfs-flags # configure handles this sanely + + export ac_cv_header_libaio_h=$(usex aio) + use elibc_musl && export ac_cv_header_stdc=no + + local myeconfargs=( + --disable-gcc-Werror + + # Don't require mpers support on non-multilib systems. #649560 + --enable-mpers=check + + $(use_enable static) + $(use_with unwind libunwind) + $(use_with elfutils libdw) + $(use_with selinux libselinux) + ) + econf "${myeconfargs[@]}" +} + +src_test() { + if has usersandbox ${FEATURES} ; then + # bug #643044 + ewarn "Test suite is known to fail with FEATURES=usersandbox -- skipping ..." + return 0 + fi + + default +} + +src_install() { + default + + if use perl ; then + exeinto /usr/bin + doexe src/strace-graph + fi + + dodoc CREDITS +} diff --git a/dev-debug/strace/strace-6.3.ebuild b/dev-debug/strace/strace-6.3.ebuild new file mode 100644 index 000000000000..463bac04d6cb --- /dev/null +++ b/dev-debug/strace/strace-6.3.ebuild @@ -0,0 +1,109 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools edo flag-o-matic toolchain-funcs + +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://github.com/strace/strace.git" + inherit git-r3 +else + SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.xz" + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" +fi + +DESCRIPTION="A useful diagnostic, instructional, and debugging tool" +HOMEPAGE="https://strace.io/" + +LICENSE="LGPL-2.1+ test? ( GPL-2+ )" +SLOT="0" +IUSE="aio perl selinux static test unwind elfutils" +RESTRICT="!test? ( test )" +REQUIRED_USE="?? ( unwind elfutils )" + +BDEPEND="virtual/pkgconfig" +LIB_DEPEND=" + unwind? ( sys-libs/libunwind[static-libs(+)] ) + elfutils? ( dev-libs/elfutils[static-libs(+)] ) + selinux? ( sys-libs/libselinux[static-libs(+)] ) +" +# strace only uses the header from libaio to decode structs +DEPEND=" + static? ( ${LIB_DEPEND} ) + aio? ( >=dev-libs/libaio-0.3.106 ) + sys-kernel/linux-headers +" +RDEPEND=" + !static? ( ${LIB_DEPEND//\[static-libs(+)]} ) + perl? ( dev-lang/perl ) +" + +PATCHES=( + "${FILESDIR}/${PN}-5.11-static.patch" +) + +src_prepare() { + default + + if [[ ! -e configure ]] ; then + # git generation + sed /autoreconf/d -i bootstrap || die + edo ./bootstrap + [[ ! -e CREDITS ]] && cp CREDITS{.in,} + fi + + eautoreconf + + # Stub out the -k test since it's known to be flaky. bug #545812 + sed -i '1iexit 77' tests*/strace-k.test || die +} + +src_configure() { + # Set up the default build settings, and then use the names strace expects. + tc-export_build_env BUILD_{CC,CPP} + local v bv + for v in CC CPP {C,CPP,LD}FLAGS ; do + bv="BUILD_${v}" + export "${v}_FOR_BUILD=${!bv}" + done + + filter-lfs-flags # configure handles this sanely + + export ac_cv_header_libaio_h=$(usex aio) + use elibc_musl && export ac_cv_header_stdc=no + + local myeconfargs=( + --disable-gcc-Werror + + # Don't require mpers support on non-multilib systems. #649560 + --enable-mpers=check + + $(use_enable static) + $(use_with unwind libunwind) + $(use_with elfutils libdw) + $(use_with selinux libselinux) + ) + econf "${myeconfargs[@]}" +} + +src_test() { + if has usersandbox ${FEATURES} ; then + # bug #643044 + ewarn "Test suite is known to fail with FEATURES=usersandbox -- skipping ..." + return 0 + fi + + default +} + +src_install() { + default + + if use perl ; then + exeinto /usr/bin + doexe src/strace-graph + fi + + dodoc CREDITS +} diff --git a/dev-debug/strace/strace-6.4-r1.ebuild b/dev-debug/strace/strace-6.4-r1.ebuild new file mode 100644 index 000000000000..f71d7670bcd2 --- /dev/null +++ b/dev-debug/strace/strace-6.4-r1.ebuild @@ -0,0 +1,110 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools edo flag-o-matic toolchain-funcs + +DESCRIPTION="Useful diagnostic, instructional, and debugging tool" +HOMEPAGE="https://strace.io/" + +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://github.com/strace/strace.git" + inherit git-r3 +else + SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.xz" + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" +fi + +LICENSE="LGPL-2.1+ test? ( GPL-2+ )" +SLOT="0" +IUSE="aio perl selinux static test unwind elfutils" +RESTRICT="!test? ( test )" +REQUIRED_USE="?? ( unwind elfutils )" + +BDEPEND="virtual/pkgconfig" +LIB_DEPEND=" + unwind? ( sys-libs/libunwind[static-libs(+)] ) + elfutils? ( dev-libs/elfutils[static-libs(+)] ) + selinux? ( sys-libs/libselinux[static-libs(+)] ) +" +# strace only uses the header from libaio to decode structs +DEPEND=" + static? ( ${LIB_DEPEND} ) + aio? ( >=dev-libs/libaio-0.3.106 ) + sys-kernel/linux-headers +" +RDEPEND=" + !static? ( ${LIB_DEPEND//\[static-libs(+)]} ) + perl? ( dev-lang/perl ) +" + +PATCHES=( + "${FILESDIR}/${PN}-5.11-static.patch" + "${FILESDIR}/${P}-linux-headers-6.5.patch" +) + +src_prepare() { + default + + if [[ ! -e configure ]] ; then + # git generation + sed /autoreconf/d -i bootstrap || die + edo ./bootstrap + [[ ! -e CREDITS ]] && cp CREDITS{.in,} + fi + + eautoreconf + + # Stub out the -k test since it's known to be flaky. bug #545812 + sed -i '1iexit 77' tests*/strace-k.test || die +} + +src_configure() { + # Set up the default build settings, and then use the names strace expects. + tc-export_build_env BUILD_{CC,CPP} + local v bv + for v in CC CPP {C,CPP,LD}FLAGS ; do + bv="BUILD_${v}" + export "${v}_FOR_BUILD=${!bv}" + done + + filter-lfs-flags # configure handles this sanely + + export ac_cv_header_libaio_h=$(usex aio) + use elibc_musl && export ac_cv_header_stdc=no + + local myeconfargs=( + --disable-gcc-Werror + + # Don't require mpers support on non-multilib systems. #649560 + --enable-mpers=check + + $(use_enable static) + $(use_with unwind libunwind) + $(use_with elfutils libdw) + $(use_with selinux libselinux) + ) + econf "${myeconfargs[@]}" +} + +src_test() { + if has usersandbox ${FEATURES} ; then + # bug #643044 + ewarn "Test suite is known to fail with FEATURES=usersandbox -- skipping ..." + return 0 + fi + + default +} + +src_install() { + default + + if use perl ; then + exeinto /usr/bin + doexe src/strace-graph + fi + + dodoc CREDITS +} diff --git a/dev-debug/strace/strace-6.6.ebuild b/dev-debug/strace/strace-6.6.ebuild new file mode 100644 index 000000000000..482af8b00c17 --- /dev/null +++ b/dev-debug/strace/strace-6.6.ebuild @@ -0,0 +1,109 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools edo flag-o-matic toolchain-funcs + +DESCRIPTION="Useful diagnostic, instructional, and debugging tool" +HOMEPAGE="https://strace.io/" + +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://github.com/strace/strace.git" + inherit git-r3 +else + SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.xz" + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" +fi + +LICENSE="LGPL-2.1+ test? ( GPL-2+ )" +SLOT="0" +IUSE="aio perl selinux static test unwind elfutils" +RESTRICT="!test? ( test )" +REQUIRED_USE="?? ( unwind elfutils )" + +BDEPEND="virtual/pkgconfig" +LIB_DEPEND=" + unwind? ( sys-libs/libunwind[static-libs(+)] ) + elfutils? ( dev-libs/elfutils[static-libs(+)] ) + selinux? ( sys-libs/libselinux[static-libs(+)] ) +" +# strace only uses the header from libaio to decode structs +DEPEND=" + static? ( ${LIB_DEPEND} ) + aio? ( >=dev-libs/libaio-0.3.106 ) + sys-kernel/linux-headers +" +RDEPEND=" + !static? ( ${LIB_DEPEND//\[static-libs(+)]} ) + perl? ( dev-lang/perl ) +" + +PATCHES=( + "${FILESDIR}/${PN}-6.5-static.patch" +) + +src_prepare() { + default + + if [[ ! -e configure ]] ; then + # git generation + sed /autoreconf/d -i bootstrap || die + edo ./bootstrap + [[ ! -e CREDITS ]] && cp CREDITS{.in,} + fi + + eautoreconf + + # Stub out the -k test since it's known to be flaky. bug #545812 + sed -i '1iexit 77' tests*/strace-k.test || die +} + +src_configure() { + # Set up the default build settings, and then use the names strace expects. + tc-export_build_env BUILD_{CC,CPP} + local v bv + for v in CC CPP {C,CPP,LD}FLAGS ; do + bv="BUILD_${v}" + export "${v}_FOR_BUILD=${!bv}" + done + + filter-lfs-flags # configure handles this sanely + + export ac_cv_header_libaio_h=$(usex aio) + use elibc_musl && export ac_cv_header_stdc=no + + local myeconfargs=( + --disable-gcc-Werror + + # Don't require mpers support on non-multilib systems. #649560 + --enable-mpers=check + + $(use_enable static) + $(use_with unwind libunwind) + $(use_with elfutils libdw) + $(use_with selinux libselinux) + ) + econf "${myeconfargs[@]}" +} + +src_test() { + if has usersandbox ${FEATURES} ; then + # bug #643044 + ewarn "Test suite is known to fail with FEATURES=usersandbox -- skipping ..." + return 0 + fi + + default +} + +src_install() { + default + + if use perl ; then + exeinto /usr/bin + doexe src/strace-graph + fi + + dodoc CREDITS +} diff --git a/dev-debug/strace/strace-9999.ebuild b/dev-debug/strace/strace-9999.ebuild new file mode 100644 index 000000000000..9c5835571a43 --- /dev/null +++ b/dev-debug/strace/strace-9999.ebuild @@ -0,0 +1,109 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools edo flag-o-matic toolchain-funcs + +DESCRIPTION="Useful diagnostic, instructional, and debugging tool" +HOMEPAGE="https://strace.io/" + +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://github.com/strace/strace.git" + inherit git-r3 +else + SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.xz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" +fi + +LICENSE="LGPL-2.1+ test? ( GPL-2+ )" +SLOT="0" +IUSE="aio perl selinux static test unwind elfutils" +RESTRICT="!test? ( test )" +REQUIRED_USE="?? ( unwind elfutils )" + +BDEPEND="virtual/pkgconfig" +LIB_DEPEND=" + unwind? ( sys-libs/libunwind[static-libs(+)] ) + elfutils? ( dev-libs/elfutils[static-libs(+)] ) + selinux? ( sys-libs/libselinux[static-libs(+)] ) +" +# strace only uses the header from libaio to decode structs +DEPEND=" + static? ( ${LIB_DEPEND} ) + aio? ( >=dev-libs/libaio-0.3.106 ) + sys-kernel/linux-headers +" +RDEPEND=" + !static? ( ${LIB_DEPEND//\[static-libs(+)]} ) + perl? ( dev-lang/perl ) +" + +PATCHES=( + "${FILESDIR}/${PN}-5.11-static.patch" +) + +src_prepare() { + default + + if [[ ! -e configure ]] ; then + # git generation + sed /autoreconf/d -i bootstrap || die + edo ./bootstrap + [[ ! -e CREDITS ]] && cp CREDITS{.in,} + fi + + eautoreconf + + # Stub out the -k test since it's known to be flaky. bug #545812 + sed -i '1iexit 77' tests*/strace-k.test || die +} + +src_configure() { + # Set up the default build settings, and then use the names strace expects. + tc-export_build_env BUILD_{CC,CPP} + local v bv + for v in CC CPP {C,CPP,LD}FLAGS ; do + bv="BUILD_${v}" + export "${v}_FOR_BUILD=${!bv}" + done + + filter-lfs-flags # configure handles this sanely + + export ac_cv_header_libaio_h=$(usex aio) + use elibc_musl && export ac_cv_header_stdc=no + + local myeconfargs=( + --disable-gcc-Werror + + # Don't require mpers support on non-multilib systems. #649560 + --enable-mpers=check + + $(use_enable static) + $(use_with unwind libunwind) + $(use_with elfutils libdw) + $(use_with selinux libselinux) + ) + econf "${myeconfargs[@]}" +} + +src_test() { + if has usersandbox ${FEATURES} ; then + # bug #643044 + ewarn "Test suite is known to fail with FEATURES=usersandbox -- skipping ..." + return 0 + fi + + default +} + +src_install() { + default + + if use perl ; then + exeinto /usr/bin + doexe src/strace-graph + fi + + dodoc CREDITS +} diff --git a/dev-debug/sysdig/Manifest b/dev-debug/sysdig/Manifest new file mode 100644 index 000000000000..139ca88f867f --- /dev/null +++ b/dev-debug/sysdig/Manifest @@ -0,0 +1,6 @@ +AUX 0.29.3-libs-gcc13.patch 1152 BLAKE2B 85ee0737eee65a83e26b47ada730062fa881e1198fd6aded89d61f11dd3b69dac45dc3b23867ed669a0af29ae4ff8b9ff42df29de1e0a6dc76e5b97abf3c2c07 SHA512 23476d3dfbcfee1e4a3a99068aecb57cbe46b7b89234ae1e89c072ef7f9400701ac09ca400685bf4d2c4003e7837a323476d2b2fe197b8e27cbb91142933eb5f +DIST falcosecurity-libs-e5c53d648f3c4694385bbe488e7d47eaa36c229a.tar.gz 816972 BLAKE2B b47ae6a7677935500ebdab8aea7f4c49ef50b7175ec097e7213a1f041ac2b5aa642379924927ec12c84271016e9ab9d191c0c1d4ffacd6ade58b7a03c37f9221 SHA512 65e5916e5f9507fd867a5e9ba3b2670a1b73b7672a22479d3019e948a52ad74441d7e2ce1c74ebd0fdbd1ce66808efa49f285bd5180bceae9d4e6730a60787ce +DIST sysdig-0.29.3.tar.gz 306984 BLAKE2B 51e9a0a085fa91d65963fd33e00b139d97d22b551de8ca85e48b4af73991897378970dfde54754a970e79300f06a54bad1d9c8fdfdb44f24150d0b21077e423f SHA512 1dbe1195f245921c671ed2343325aee79fd0cde34681b9cab445135662d3ed7c84884e46b2270c0e868b5de1a3f2800b84e8bf9fcf0dfe581dd17e2e633f46d8 +EBUILD sysdig-0.29.3-r1.ebuild 2173 BLAKE2B 898a43a024a5acff4464462d630249faf539d3715dfcb5900bb3262ff793c8c277ce0e30796c2d09cb19e400430a976d3b9f6dd301fe5269bdc15e6698cf0f6a SHA512 46f162c0aa04094b80566bc988553d50a23671f1d6e34b241491d2d632b3f9a72b229416358e261adb154bf94ce8714c1e1ee8d094799ff941f238e1d5df61aa +EBUILD sysdig-0.29.3-r2.ebuild 2366 BLAKE2B 4aacd78055d58f14cd7cd8aca7c1adb8f0bead02b197d9d55abb030956270eeb1056f46b8dd533c852983b830129d121ed36faa315380f1c492bed5d4c4c4d99 SHA512 90c0c4a944d4f550816eee7ed05c0b9ab07e34dde033b44b6f5d73a7af7df28eeb759c0ec725e9af3514e71edd46dda8e91f3e9c59d839e02ce1b497e87846d3 +MISC metadata.xml 671 BLAKE2B 553dbbe2ea2a56f5a88bb0276b3f97c5d4d8d798291eaef42d5aadd842cf5cbbb770515729c9779890f9227f7cc96fc8e35457009f066cfb43993b02c7406d7a SHA512 4d0b92b271bd4ceb86db363a29cd465124ab71ec6941848cafec4ebba0232a52bf62a4128d8cbaf5a7a6c9350aef29e4a797b6a659d5d5896c077b0b5df9f73d diff --git a/dev-debug/sysdig/files/0.29.3-libs-gcc13.patch b/dev-debug/sysdig/files/0.29.3-libs-gcc13.patch new file mode 100644 index 000000000000..ce1a686cc65c --- /dev/null +++ b/dev-debug/sysdig/files/0.29.3-libs-gcc13.patch @@ -0,0 +1,28 @@ + +Manual backport of the upstream fix at: +https://github.com/falcosecurity/libs/commit/1406858fa5223d980e66e2a5fb2c1b014c9db5c8 + +diff --git libs-e5c53d648f3c4694385bbe488e7d47eaa36c229a-orig/userspace/libsinsp/filter_value.h libs-e5c53d648f3c4694385bbe488e7d47eaa36c229a/userspace/libsinsp/filter_value.h +index 47f5367..6cc8b83 100644 +--- libs-e5c53d648f3c4694385bbe488e7d47eaa36c229a-orig/userspace/libsinsp/filter_value.h ++++ libs-e5c53d648f3c4694385bbe488e7d47eaa36c229a/userspace/libsinsp/filter_value.h +@@ -17,6 +17,7 @@ limitations under the License. + + #pragma once + ++#include <cstdint> + #include <string.h> + #include <utility> + +diff --git libs-e5c53d648f3c4694385bbe488e7d47eaa36c229a-orig/userspace/libsinsp/sinsp.h libs-e5c53d648f3c4694385bbe488e7d47eaa36c229a/userspace/libsinsp/sinsp.h +index c15c13c..f9f9f45 100644 +--- libs-e5c53d648f3c4694385bbe488e7d47eaa36c229a-orig/userspace/libsinsp/sinsp.h ++++ libs-e5c53d648f3c4694385bbe488e7d47eaa36c229a/userspace/libsinsp/sinsp.h +@@ -56,6 +56,7 @@ limitations under the License. + + #define __STDC_FORMAT_MACROS + ++#include <cstdint> + #include <string> + #include <unordered_map> + #include <map> diff --git a/dev-debug/sysdig/metadata.xml b/dev-debug/sysdig/metadata.xml new file mode 100644 index 000000000000..c16f8ef41665 --- /dev/null +++ b/dev-debug/sysdig/metadata.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person" proxied="yes"> + <email>holger@applied-asynchrony.com</email> + <name>Holger Hoffstätte</name> + </maintainer> + <maintainer type="project" proxied="proxy"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <use> + <flag name="modules">Build kernel modules needed for tracing local + events. Disable this only if you intend to use sysdig purely + to work with dumpfiles.</flag> + </use> + <upstream> + <remote-id type="github">draios/sysdig</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-debug/sysdig/sysdig-0.29.3-r1.ebuild b/dev-debug/sysdig/sysdig-0.29.3-r1.ebuild new file mode 100644 index 000000000000..619c30f3a3a3 --- /dev/null +++ b/dev-debug/sysdig/sysdig-0.29.3-r1.ebuild @@ -0,0 +1,91 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LUA_COMPAT=( luajit ) + +inherit bash-completion-r1 cmake lua-single + +DESCRIPTION="A system exploration and troubleshooting tool" +HOMEPAGE="https://sysdig.com/" + +# For now we need to bump this version of falcosecurity/libs manually; +# check the used git revision in <src>/cmake/modules/falcosecurity-libs.cmake +LIBS_COMMIT="e5c53d648f3c4694385bbe488e7d47eaa36c229a" + +SRC_URI="https://github.com/draios/sysdig/archive/${PV}.tar.gz -> ${P}.tar.gz + https://github.com/falcosecurity/libs/archive/${LIBS_COMMIT}.tar.gz -> falcosecurity-libs-${LIBS_COMMIT}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="+modules" +REQUIRED_USE="${LUA_REQUIRED_USE}" + +RDEPEND="${LUA_DEPS} + app-misc/jq + dev-cpp/tbb:= + dev-cpp/yaml-cpp:= + dev-libs/libb64:= + dev-libs/openssl:= + dev-libs/protobuf:= + net-dns/c-ares:= + net-libs/grpc:= + net-misc/curl + sys-libs/ncurses:= + sys-libs/zlib:=" + +DEPEND="${RDEPEND} + dev-cpp/nlohmann_json + dev-cpp/valijson + virtual/os-headers" + +# for now pin the driver to the same ebuild version +PDEPEND="modules? ( =dev-debug/scap-driver-${PV}* )" + +src_prepare() { + # manually apply patch to falcosecurity-libs dependency + pushd "${WORKDIR}" && eapply -p0 "${FILESDIR}/${PV}-libs-gcc13.patch" && popd + + sed -i -e 's:-ggdb::' CMakeLists.txt || die + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( + # don't build driver + -DBUILD_DRIVER=OFF + + # libscap examples are not installed or really useful + -DBUILD_LIBSCAP_EXAMPLES=OFF + + # point to the falcosecurity-libs tree + -DFALCOSECURITY_LIBS_SOURCE_DIR="${WORKDIR}"/libs-${LIBS_COMMIT} + + # explicitly set version + -DSYSDIG_VERSION=${PV} + + # unbundle the deps + -DUSE_BUNDLED_DEPS=OFF + + # add valijson include path to prevent downloading + -DVALIJSON_INCLUDE="${ESYSROOT}"/usr/include + + # enable chisels + -DWITH_CHISEL=ON + ) + + cmake_src_configure +} + +src_install() { + cmake_src_install + + # remove driver headers + rm -r "${ED}"/usr/src || die + + # move bashcomp to the proper location + dobashcomp "${ED}"/usr/etc/bash_completion.d/sysdig || die + rm -r "${ED}"/usr/etc || die +} diff --git a/dev-debug/sysdig/sysdig-0.29.3-r2.ebuild b/dev-debug/sysdig/sysdig-0.29.3-r2.ebuild new file mode 100644 index 000000000000..c4d7a6199eb2 --- /dev/null +++ b/dev-debug/sysdig/sysdig-0.29.3-r2.ebuild @@ -0,0 +1,96 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LUA_COMPAT=( luajit ) + +inherit bash-completion-r1 cmake lua-single + +DESCRIPTION="A system exploration and troubleshooting tool" +HOMEPAGE="https://sysdig.com/" + +# For now we need to bump this version of falcosecurity/libs manually; +# check the used git revision in <src>/cmake/modules/falcosecurity-libs.cmake +LIBS_COMMIT="e5c53d648f3c4694385bbe488e7d47eaa36c229a" + +SRC_URI="https://github.com/draios/sysdig/archive/${PV}.tar.gz -> ${P}.tar.gz + https://github.com/falcosecurity/libs/archive/${LIBS_COMMIT}.tar.gz -> falcosecurity-libs-${LIBS_COMMIT}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+modules" +REQUIRED_USE="${LUA_REQUIRED_USE}" + +RDEPEND="${LUA_DEPS} + app-misc/jq + dev-cpp/tbb:= + dev-cpp/yaml-cpp:= + dev-libs/libb64:= + dev-libs/openssl:= + dev-libs/protobuf:= + net-dns/c-ares:= + net-libs/grpc:= + net-misc/curl + sys-libs/ncurses:= + sys-libs/zlib:=" + +DEPEND="${RDEPEND} + dev-cpp/nlohmann_json + dev-cpp/valijson + virtual/os-headers" + +# for now pin the driver to the same ebuild version +PDEPEND="modules? ( =dev-debug/scap-driver-${PV}* )" + +src_prepare() { + # manually apply patch to falcosecurity-libs dependency + pushd "${WORKDIR}" && \ + eapply -p0 "${FILESDIR}/${PV}-libs-gcc13.patch" && \ + popd + + # force C++14 standard for libs & main + sed -i -e 's:-std=c++0x:-std=c++14:' "${WORKDIR}"/libs-${LIBS_COMMIT}/cmake/modules/CompilerFlags.cmake || die + sed -i -e 's:-std=c++0x:-std=c++14:' -e 's:-ggdb::' CMakeLists.txt || die + + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( + # don't build driver + -DBUILD_DRIVER=OFF + + # libscap examples are not installed or really useful + -DBUILD_LIBSCAP_EXAMPLES=OFF + + # point to the falcosecurity-libs tree + -DFALCOSECURITY_LIBS_SOURCE_DIR="${WORKDIR}"/libs-${LIBS_COMMIT} + + # explicitly set version + -DSYSDIG_VERSION=${PV} + + # unbundle the deps + -DUSE_BUNDLED_DEPS=OFF + + # add valijson include path to prevent downloading + -DVALIJSON_INCLUDE="${ESYSROOT}"/usr/include + + # enable chisels + -DWITH_CHISEL=ON + ) + + cmake_src_configure +} + +src_install() { + cmake_src_install + + # remove driver headers + rm -r "${ED}"/usr/src || die + + # move bashcomp to the proper location + dobashcomp "${ED}"/usr/etc/bash_completion.d/sysdig || die + rm -r "${ED}"/usr/etc || die +} diff --git a/dev-debug/systemtap/Manifest b/dev-debug/systemtap/Manifest new file mode 100644 index 000000000000..bf05f4403d16 --- /dev/null +++ b/dev-debug/systemtap/Manifest @@ -0,0 +1,8 @@ +AUX systemtap-3.1-ia64.patch 885 BLAKE2B e26c60e4549f95f0db3e128cd535f923f03dc45e0e4ff4049d6b8d6cf44375f88c752a0130e4229a5ccf83a414db8f91504f4ef828d3a7d3d94a5eee78a9e90f SHA512 a9f068dafc2fb4c96696d8cfe1501fc3610f4ab0aaea9a20ffc5f57cda09561f9712896616c548661bbbc5c10dfe275d218c7b232645a5240507c80bec1850cd +DIST systemtap-4.8.tar.gz 5628003 BLAKE2B 9f5050eba29d390c907b117187f94ef088f16bb739b4971bc32ffe88b1024a4157cd4e9793a8fc1e149a5a182a28330e3b4fd9d51213bb3637d616fbb9867f6d SHA512 fdcbc48ba17b2155c1419d99147a4cfbee2e69db945bfd0e6881b71ab11165bd23ea7ce9456856ae36807fb18f9934880a6b7c44456b63833ea260038744d9f2 +DIST systemtap-4.9.tar.gz 6684228 BLAKE2B 880747bcfbaa1909ca20a6cb30eb37d9443547783489396355b642758054ae0e0bf5b495a0adf57851c7c7a6b4300e498bb8c1c8da6df83ab1d1e18877b108a7 SHA512 a2736223fee0c801c36719a0245f31ed7e2e63c30bb7d5cab631dd57e4eb10e04abf2c9b272bda2a17c207c9dd163a1eb8a3e0759eda0c781946e644625510b7 +DIST systemtap-5.0.tar.gz 6572411 BLAKE2B db962df2fdcbc5bc11259c03d78073924f03fee4434dca8686a62fcb0818dab1ca91558160dd9d67d43b709f63ffe4f0af30ab1fe6965e19155bdd4c04501a04 SHA512 dc511a05e66abcbbd8c926973962751196180f3c571d0cd2a3b158ae367c5339ad32967a680ecd03224ab5f7ed2c55be7064867e4fb1b1cd7ea1cb21b2436e4c +EBUILD systemtap-4.8.ebuild 3289 BLAKE2B da64029050587f4c0f8549cc4c14926395ceab9eafb45a8469cbf7aed45374715e59bfaa9425912217ac380243155a925fb448ab9ccd4904b91bb7145332cf5f SHA512 512eef09c40a2970fece747d19a99a685085781ae636e2d0424076542a115912b4b2700d8a571ce80a25cb19c9e7dfc9bdeeba7d962aebbf73c5f73db7661462 +EBUILD systemtap-4.9.ebuild 3331 BLAKE2B d7e750989c55b671540d46e59156a1446ca7feb545bb1d4b5c72be22cdf1a7ee8348056c5dd6db6f0baa1ce76bdf159e7566f95bbb8774d1ba47d11bf5fa23f3 SHA512 fd4ec545a29cd056ce86e65b98d17d92ff763a381401a538e2dcd5a6848e68b532c62138df20db3a7d133b9fb36ce6a7e821cb22a774a95bd74db23e1cd5017f +EBUILD systemtap-5.0.ebuild 3343 BLAKE2B 482238459cf2ee6043b8771734082f1ce4e0ba68979c77869782a795c6ff16d284cafc259c49028f2ef07c7ed8a8ea780172b619037c6763b513b92dc7c20310 SHA512 973460c157d1f3337b63e8ae27c3c78a60da347313cbc75f881d132dd41ef8b5c30828a7a62ae0f7d7f8e7d3359b6df88298da4de685d1421fa1666e7b93eb59 +MISC metadata.xml 303 BLAKE2B 5db95d500a08d656d0221a474d297c8357712f19334f45db347e36f14a10365d65777e0d24c68f75d4855b3ee1778dca1ecf4a05b19d2dd3975acf25a12b4523 SHA512 27261bc875c881495a9b0e1fffc811dff40b763a9e6453ca47143cb8d7d867682becd7266f8d559ad8c32bb5d7de9698341055d483f3e6a68b107895aa174b77 diff --git a/dev-debug/systemtap/files/systemtap-3.1-ia64.patch b/dev-debug/systemtap/files/systemtap-3.1-ia64.patch new file mode 100644 index 000000000000..832bfc1a47f9 --- /dev/null +++ b/dev-debug/systemtap/files/systemtap-3.1-ia64.patch @@ -0,0 +1,33 @@ +Workaround build failure on ia64 + +Avoid 'o' constraint to allow gcc to select register operand. +That way instruction selector can satisfy all constraints +for PROBE2 macro. + +Reported-by: Émeric Maschino +Bug: https://bugs.gentoo.org/510134 +--- a/cache.cxx ++++ b/cache.cxx +@@ -8,2 +8,10 @@ + ++#ifdef __ia64__ ++// Default is: nor ++// We disable 'o' because gcc fails to select register ++// constraint for second instruction in 'add_script_to_cache' ++// https://bugs.gentoo.org/510134 ++# define STAP_SDT_ARG_CONSTRAINT nr ++#endif ++ + #include "config.h" +--- a/staprun/mainloop.c ++++ b/staprun/mainloop.c +@@ -1 +1,9 @@ ++#ifdef __ia64__ ++// Default is: nor ++// We disable 'o' because gcc fails to select register ++// constraint for second instruction in 'add_script_to_cache' ++// https://bugs.gentoo.org/510134 ++# define STAP_SDT_ARG_CONSTRAINT nr ++#endif ++ + /* -*- linux-c -*- diff --git a/dev-debug/systemtap/metadata.xml b/dev-debug/systemtap/metadata.xml new file mode 100644 index 000000000000..4a3d4007cae0 --- /dev/null +++ b/dev-debug/systemtap/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="person"> + <email>swegener@gentoo.org</email> +</maintainer> + <use> + <flag name="libvirt">Support probing of libvirt domains.</flag> + </use> +</pkgmetadata> diff --git a/dev-debug/systemtap/systemtap-4.8.ebuild b/dev-debug/systemtap/systemtap-4.8.ebuild new file mode 100644 index 000000000000..203f02f9b82c --- /dev/null +++ b/dev-debug/systemtap/systemtap-4.8.ebuild @@ -0,0 +1,127 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..11} pypy3 ) + +inherit autotools linux-info python-single-r1 + +DESCRIPTION="A linux trace/probe tool" +HOMEPAGE="https://www.sourceware.org/systemtap" +SRC_URI="https://www.sourceware.org/ftp/${PN}/releases/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86" +IUSE="libvirt selinux sqlite +ssl test zeroconf" + +CDEPEND=" + ${PYTHON_DEPS} + + dev-libs/boost:= + >=dev-libs/elfutils-0.142 + dev-libs/json-c:= + sys-libs/ncurses:= + sys-libs/readline:= + + libvirt? ( >=app-emulation/libvirt-1.0.2 ) + selinux? ( sys-libs/libselinux ) + sqlite? ( dev-db/sqlite:3 ) + ssl? ( + dev-libs/nspr + dev-libs/nss + ) + zeroconf? ( net-dns/avahi ) +" +DEPEND=" + ${CDEPEND} + app-alternatives/cpio + app-text/xmlto + $(python_gen_cond_dep 'dev-python/setuptools[${PYTHON_USEDEP}]') + >=sys-devel/gettext-0.18.2 + + libvirt? ( dev-libs/libxml2 ) +" +RDEPEND=" + ${CDEPEND} + acct-group/stapdev + acct-group/stapsys + acct-group/stapusr +" +BDEPEND="test? ( dev-util/dejagnu )" + +CONFIG_CHECK="~KPROBES ~RELAY ~DEBUG_FS" +ERROR_KPROBES="${PN} requires support for KProbes Instrumentation (KPROBES) - this can be enabled in 'Instrumentation Support -> Kprobes'." +ERROR_RELAY="${PN} works with support for user space relay support (RELAY) - this can be enabled in 'General setup -> Kernel->user space relay support (formerly relayfs)'." +ERROR_DEBUG_FS="${PN} works best with support for Debug Filesystem (DEBUG_FS) - this can be enabled in 'Kernel hacking -> Debug Filesystem'." + +DOCS="AUTHORS HACKING NEWS README" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" +RESTRICT="!test? ( test )" +PATCHES=( + "${FILESDIR}/${PN}-3.1-ia64.patch" +) + +pkg_setup() { + linux-info_pkg_setup + python-single-r1_pkg_setup +} + +src_prepare() { + python_fix_shebang . + + sed -i \ + -e 's|-Werror||g' \ + configure.ac \ + Makefile.am \ + stapbpf/Makefile.am \ + stapdyn/Makefile.am \ + staprun/Makefile.am \ + testsuite/systemtap.unprivileged/unprivileged_probes.exp \ + testsuite/systemtap.unprivileged/unprivileged_myproc.exp \ + testsuite/systemtap.base/stmt_rel_user.exp \ + testsuite/systemtap.base/sdt_va_args.exp \ + testsuite/systemtap.base/sdt_misc.exp \ + testsuite/systemtap.base/sdt.exp \ + scripts/kprobes_test/gen_code.py \ + || die "Failed to clean up sources" + + default + eautoreconf +} + +src_configure() { + local myeconfargs=( + --disable-docs + --disable-grapher + --disable-refdocs + --disable-server + # Our toolchain sets this for us already and adding in + # -D_FORTIFY_SOURCE=2 breaks builds w/ no optimisation. + # This option (at least as of 4.5) doesn't pass -fno* etc, + # it just doesn't _add_ options, which is good. If it changes + # to actually pass -fno-stack-protector and friends, we'll + # need to change course. Forcing =2 also has problems for + # setting it to 3. + # bug #794667. + --disable-ssp + --enable-pie + --with-python3 + --without-java + --without-openssl + --without-python2-probes + --without-rpm + $(use_enable libvirt virt) + $(use_enable sqlite) + $(use_with zeroconf avahi) + $(use_with ssl nss) + $(use_with selinux) + ) + PYTHON3="${PYTHON}" econf "${myeconfargs[@]}" +} + +src_install() { + default + python_optimize +} diff --git a/dev-debug/systemtap/systemtap-4.9.ebuild b/dev-debug/systemtap/systemtap-4.9.ebuild new file mode 100644 index 000000000000..629bdf77f7c4 --- /dev/null +++ b/dev-debug/systemtap/systemtap-4.9.ebuild @@ -0,0 +1,128 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..11} pypy3 ) + +inherit autotools linux-info python-single-r1 + +DESCRIPTION="A linux trace/probe tool" +HOMEPAGE="https://www.sourceware.org/systemtap" +SRC_URI="https://www.sourceware.org/ftp/${PN}/releases/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE="libvirt selinux sqlite +ssl test zeroconf" + +CDEPEND=" + ${PYTHON_DEPS} + + dev-libs/boost:= + >=dev-libs/elfutils-0.142 + dev-libs/json-c:= + sys-libs/ncurses:= + sys-libs/readline:= + + libvirt? ( >=app-emulation/libvirt-1.0.2 ) + selinux? ( sys-libs/libselinux ) + sqlite? ( dev-db/sqlite:3 ) + ssl? ( + dev-libs/nspr + dev-libs/nss + ) + zeroconf? ( net-dns/avahi ) +" +DEPEND=" + ${CDEPEND} + app-alternatives/cpio + app-text/xmlto + $(python_gen_cond_dep 'dev-python/setuptools[${PYTHON_USEDEP}]') + >=sys-devel/gettext-0.18.2 + + libvirt? ( dev-libs/libxml2 ) +" +RDEPEND=" + ${CDEPEND} + acct-group/stapdev + acct-group/stapsys + acct-group/stapusr +" +BDEPEND="test? ( dev-util/dejagnu )" + +CONFIG_CHECK="~KPROBES ~RELAY ~DEBUG_FS" +ERROR_KPROBES="${PN} requires support for KProbes Instrumentation (KPROBES) - this can be enabled in 'Instrumentation Support -> Kprobes'." +ERROR_RELAY="${PN} works with support for user space relay support (RELAY) - this can be enabled in 'General setup -> Kernel->user space relay support (formerly relayfs)'." +ERROR_DEBUG_FS="${PN} works best with support for Debug Filesystem (DEBUG_FS) - this can be enabled in 'Kernel hacking -> Debug Filesystem'." + +DOCS="AUTHORS HACKING NEWS README" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" +RESTRICT="!test? ( test )" +PATCHES=( + "${FILESDIR}/${PN}-3.1-ia64.patch" +) + +pkg_setup() { + linux-info_pkg_setup + python-single-r1_pkg_setup +} + +src_prepare() { + python_fix_shebang . + + sed -i \ + -e 's|-Werror||g' \ + configure.ac \ + Makefile.am \ + stapbpf/Makefile.am \ + stapdyn/Makefile.am \ + staprun/Makefile.am \ + testsuite/systemtap.unprivileged/unprivileged_probes.exp \ + testsuite/systemtap.unprivileged/unprivileged_myproc.exp \ + testsuite/systemtap.base/stmt_rel_user.exp \ + testsuite/systemtap.base/sdt_va_args.exp \ + testsuite/systemtap.base/sdt_misc.exp \ + testsuite/systemtap.base/sdt.exp \ + scripts/kprobes_test/gen_code.py \ + || die "Failed to clean up sources" + + default + eautoreconf +} + +src_configure() { + local myeconfargs=( + --cache-file="${S}"/config.cache + --disable-docs + --disable-grapher + --disable-refdocs + --disable-server + # Our toolchain sets this for us already and adding in + # -D_FORTIFY_SOURCE=2 breaks builds w/ no optimisation. + # This option (at least as of 4.5) doesn't pass -fno* etc, + # it just doesn't _add_ options, which is good. If it changes + # to actually pass -fno-stack-protector and friends, we'll + # need to change course. Forcing =2 also has problems for + # setting it to 3. + # bug #794667. + --disable-ssp + --enable-pie + --with-python3 + --without-java + --without-openssl + --without-python2-probes + --without-rpm + $(use_enable libvirt virt) + $(use_enable sqlite) + $(use_with zeroconf avahi) + $(use_with ssl nss) + $(use_with selinux) + ) + PYTHON3="${PYTHON}" econf "${myeconfargs[@]}" +} + +src_install() { + default + python_optimize +} diff --git a/dev-debug/systemtap/systemtap-5.0.ebuild b/dev-debug/systemtap/systemtap-5.0.ebuild new file mode 100644 index 000000000000..7bc3f9abc5df --- /dev/null +++ b/dev-debug/systemtap/systemtap-5.0.ebuild @@ -0,0 +1,128 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..11} pypy3 ) + +inherit autotools linux-info python-single-r1 + +DESCRIPTION="A linux trace/probe tool" +HOMEPAGE="https://www.sourceware.org/systemtap" +SRC_URI="https://www.sourceware.org/ftp/${PN}/releases/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE="libvirt selinux sqlite +ssl test zeroconf" + +CDEPEND=" + ${PYTHON_DEPS} + + dev-libs/boost:= + >=dev-libs/elfutils-0.142[debuginfod] + dev-libs/json-c:= + sys-libs/ncurses:= + sys-libs/readline:= + + libvirt? ( >=app-emulation/libvirt-1.0.2 ) + selinux? ( sys-libs/libselinux ) + sqlite? ( dev-db/sqlite:3 ) + ssl? ( + dev-libs/nspr + dev-libs/nss + ) + zeroconf? ( net-dns/avahi ) +" +DEPEND=" + ${CDEPEND} + app-alternatives/cpio + app-text/xmlto + $(python_gen_cond_dep 'dev-python/setuptools[${PYTHON_USEDEP}]') + >=sys-devel/gettext-0.18.2 + + libvirt? ( dev-libs/libxml2 ) +" +RDEPEND=" + ${CDEPEND} + acct-group/stapdev + acct-group/stapsys + acct-group/stapusr +" +BDEPEND="test? ( dev-util/dejagnu )" + +CONFIG_CHECK="~KPROBES ~RELAY ~DEBUG_FS" +ERROR_KPROBES="${PN} requires support for KProbes Instrumentation (KPROBES) - this can be enabled in 'Instrumentation Support -> Kprobes'." +ERROR_RELAY="${PN} works with support for user space relay support (RELAY) - this can be enabled in 'General setup -> Kernel->user space relay support (formerly relayfs)'." +ERROR_DEBUG_FS="${PN} works best with support for Debug Filesystem (DEBUG_FS) - this can be enabled in 'Kernel hacking -> Debug Filesystem'." + +DOCS="AUTHORS HACKING NEWS README" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" +RESTRICT="!test? ( test )" +PATCHES=( + "${FILESDIR}/${PN}-3.1-ia64.patch" +) + +pkg_setup() { + linux-info_pkg_setup + python-single-r1_pkg_setup +} + +src_prepare() { + python_fix_shebang . + + sed -i \ + -e 's|-Werror||g' \ + configure.ac \ + Makefile.am \ + stapbpf/Makefile.am \ + stapdyn/Makefile.am \ + staprun/Makefile.am \ + testsuite/systemtap.unprivileged/unprivileged_probes.exp \ + testsuite/systemtap.unprivileged/unprivileged_myproc.exp \ + testsuite/systemtap.base/stmt_rel_user.exp \ + testsuite/systemtap.base/sdt_va_args.exp \ + testsuite/systemtap.base/sdt_misc.exp \ + testsuite/systemtap.base/sdt.exp \ + scripts/kprobes_test/gen_code.py \ + || die "Failed to clean up sources" + + default + eautoreconf +} + +src_configure() { + local myeconfargs=( + --cache-file="${S}"/config.cache + --disable-docs + --disable-grapher + --disable-refdocs + --disable-server + # Our toolchain sets this for us already and adding in + # -D_FORTIFY_SOURCE=2 breaks builds w/ no optimisation. + # This option (at least as of 4.5) doesn't pass -fno* etc, + # it just doesn't _add_ options, which is good. If it changes + # to actually pass -fno-stack-protector and friends, we'll + # need to change course. Forcing =2 also has problems for + # setting it to 3. + # bug #794667. + --disable-ssp + --enable-pie + --with-python3 + --without-java + --without-openssl + --without-python2-probes + --without-rpm + $(use_enable libvirt virt) + $(use_enable sqlite) + $(use_with zeroconf avahi) + $(use_with ssl nss) + $(use_with selinux) + ) + PYTHON3="${PYTHON}" econf "${myeconfargs[@]}" +} + +src_install() { + default + python_optimize +} |