From 8d35656b4a4e3a2ad6f87abb36b9fc3987d95a53 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 26 Mar 2025 00:31:47 +0000 Subject: gentoo auto-resync : 26:03:2025 - 00:31:47 --- dev-debug/Manifest.gz | Bin 4347 -> 4352 bytes dev-debug/apitrace/Manifest | 3 +- dev-debug/apitrace/apitrace-12.0.ebuild | 1 + .../apitrace/files/apitrace-12.0-find_snappy.patch | 14 ++ dev-debug/dtrace/Manifest | 6 +- dev-debug/dtrace/dtrace-2.0.1.1-r2.ebuild | 231 --------------------- dev-debug/dtrace/dtrace-2.0.1.1-r3.ebuild | 231 +++++++++++++++++++++ dev-debug/dtrace/dtrace-2.0.2-r1.ebuild | 225 ++++++++++++++++++++ dev-debug/dtrace/dtrace-2.0.2.ebuild | 225 -------------------- dev-debug/dtrace/dtrace-9999.ebuild | 4 +- 10 files changed, 478 insertions(+), 462 deletions(-) create mode 100644 dev-debug/apitrace/files/apitrace-12.0-find_snappy.patch delete mode 100644 dev-debug/dtrace/dtrace-2.0.1.1-r2.ebuild create mode 100644 dev-debug/dtrace/dtrace-2.0.1.1-r3.ebuild create mode 100644 dev-debug/dtrace/dtrace-2.0.2-r1.ebuild delete mode 100644 dev-debug/dtrace/dtrace-2.0.2.ebuild (limited to 'dev-debug') diff --git a/dev-debug/Manifest.gz b/dev-debug/Manifest.gz index 8623d742353d..ea29ffea95b7 100644 Binary files a/dev-debug/Manifest.gz and b/dev-debug/Manifest.gz differ diff --git a/dev-debug/apitrace/Manifest b/dev-debug/apitrace/Manifest index 3698b57d8955..4514ade867b4 100644 --- a/dev-debug/apitrace/Manifest +++ b/dev-debug/apitrace/Manifest @@ -1,3 +1,4 @@ +AUX apitrace-12.0-find_snappy.patch 531 BLAKE2B f76399c52a9fa4c3987382d179d22889c5bb57400634e13a94c4455bc2de9990234ea2f96557cb56ba3cc6cdd19ff9eb89694e79702634dc56e0ccbd32ae39dd SHA512 72ddb1619e421f7e9a215645f805b246410dc66d8c617b4f90fe60671d54fe24781cbd954dc44258e5a3522fffffe2fa56eda27477c767032a1056af2433050c AUX apitrace-12.0-include-stdint.patch 699 BLAKE2B 954e2b38a27049ca058ffe45d70381b99725dc76a14171b2f19770f571041bb3b89fa881fb416cc7386002edd89d663a55614248ab00016d4185bf95d6bafdc3 SHA512 1529191d703e5d0aa8072a5449dc166b27a5d448890bf2033056b4ea500ce21c655642a96a9b3ea58968c6da82999c9d87b85240da35107cc7a003825840ba6a AUX apitrace-12.0-no_qtnetwork.patch 782 BLAKE2B ecc597aef4adf6f209b12843e58cb3d6fe80cc544df3b468aec38551997491e1c342be922630e988baf775219034077fd170186fbf8a2fbaea41776d6fc482ee SHA512 9eb10dd1f5a09356058f5047105ea5240072796b1aa6b55e73a17ebb999dd3a15c077c796aa425d9e6003e73a29b9806461c2b9f6ea9fcedb2617548f7b29cf6 AUX apitrace-12.0-tests.patch 709 BLAKE2B c4784f88411db3be9ae1dc7c4392c1a436a7ad6f2cd06aa10d5dfd99db71c2431c4340bb1a4e622ff2b653bbc17a29060780f1e793290d59c9336117433a3815 SHA512 07eb5315f00b9f01455e3c8c1c128fc1681f64d52179be67ef2065cbe8db75adea6edcab11c25115e1a149d55b1fac72c60a8859727c887e6af00ae46789fc52 @@ -6,5 +7,5 @@ AUX apitrace-9.0-disable-multiarch.patch 1796 BLAKE2B c687c87b23f3711bd9ac70a345 AUX apitrace-9.0-pkgconfig-waffle.patch 542 BLAKE2B a547dc8e71d6e6e781c685fad942bda6799d3d98c0e29a83ad65b0659c50d5ae81f35fee3e6abf1fb36f970db426785b0bcd15f30308ed3bad8b6ff5f4f152cd SHA512 1f3ef8e15a17f7684d6768e16656aef5ce32b173c8420ed2ccb29dd831f18bcee23189a6738ed0e89a990ca04303f1c16d024f429fba90836d967f1fc8486834 DIST apitrace-12.0-libbacktrace-8602fda64e78f1f46563220f2ee9f7e70819c51d.tar.gz 666166 BLAKE2B 1b35e0dafe31bc5d4fcc826f87f2e8200c27a4194719ee22d278b25fe081ec604e579aee72ebd7ea6d401b1a5bbc4b496b1083e3d761117bc3ccf23aabe046eb SHA512 8f303ff11250cbc644c91a07a55ffb1c6d52ca5eb76e3ea9405645bdd00715a25f57d1f39c7af16efbbe5b008ec76890f7fb3bca95eb89e7cd9a55c14a211643 DIST apitrace-12.0.tar.gz 2273615 BLAKE2B a58f4d7bc607858e3080d56c739da356c169b25c139ca253f0b15d248a850ede54179776a500321f15e5f389271ad69f5c8c8dec47e0d0b3d4ae9afcea8bda41 SHA512 2af33aec39f43556765455662c69ee22bf3ff5d5fe8b0ca58fe3d555ab1571eab5ddbd4f0011b0c1669043314c8d5166b886ac2825f85d74ebadd9f848598698 -EBUILD apitrace-12.0.ebuild 3162 BLAKE2B ed506b86f172e9723581bc0b7b74d8059af36e5fdd71e86c62dcb17858b1591a92adae620caf7abee3fd1ad803d538017bfc57cd77fd7fc619d9d4676aaea70e SHA512 88b126f00b4bd0984658bd4e6962bf7448edb7aad40e7e1b6a66d64114080fb5301cd66dbff0c09b5eb78d1c81ef1713d7e4fc3a19e4d57fb6dcdddf8ee824db +EBUILD apitrace-12.0.ebuild 3206 BLAKE2B e1c80cf889e8df2e0ae6a6644885d81cca04c522c8c3d18dfb01b0fcd856d5367d0873dc63f60a600636c5b3563b2b2fca582b6c9d0bf769eace031bd9bb43c0 SHA512 5c60f1625cba2d81a70ee2d277c9ea0d6e4d1494736023f764682bf197f33b8515df8ce4e78e6d978cfe4b480e49ab092e21983dc883c04eff14a5c8f0e918c8 MISC metadata.xml 250 BLAKE2B a9437881337420620edfaa0a3f4e7660a47100479c9d360dfb3b8304eaa085d5f2bb97ea8d823fc6be282fd4f2964cf12d189ec0e6d18a09ea513809e5bd5cde SHA512 284c9edd2a7f91f48402414ec05379f5a9a40ca67f02ddc4dbf3bbc45f83cfe01aa54442af0016dcf8495bb6291423def988f0bba616c5a5024011c4e97fde57 diff --git a/dev-debug/apitrace/apitrace-12.0.ebuild b/dev-debug/apitrace/apitrace-12.0.ebuild index a42ec871ba6a..416ec38f9794 100644 --- a/dev-debug/apitrace/apitrace-12.0.ebuild +++ b/dev-debug/apitrace/apitrace-12.0.ebuild @@ -40,6 +40,7 @@ BDEPEND=" PATCHES=( "${FILESDIR}"/${PN}-9.0-disable-multiarch.patch "${FILESDIR}"/${PN}-9.0-pkgconfig-waffle.patch + "${FILESDIR}"/${PN}-12.0-find_snappy.patch "${FILESDIR}"/${PN}-12.0-no_qtnetwork.patch "${FILESDIR}"/${PN}-12.0-tests.patch "${FILESDIR}"/${PN}-12.0-unbundle.patch diff --git a/dev-debug/apitrace/files/apitrace-12.0-find_snappy.patch b/dev-debug/apitrace/files/apitrace-12.0-find_snappy.patch new file mode 100644 index 000000000000..38ca46dff40e --- /dev/null +++ b/dev-debug/apitrace/files/apitrace-12.0-find_snappy.patch @@ -0,0 +1,14 @@ +Use config mode to prevent conflict with /usr/lib64/cmake/Qt6/FindSnappy.cmake (qtwebengine) +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 34123b3..eef8a38 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -535,7 +535,7 @@ include_directories (${CMAKE_CURRENT_SOURCE_DIR}/compat) + if (NOT WIN32 AND NOT ENABLE_STATIC_EXE) + + if (NOT ENABLE_STATIC_SNAPPY) +- find_package (Snappy) ++ find_package (Snappy CONFIG) + endif () + + # zlib 1.2.4-1.2.5 made it impossible to read the last block of incomplete diff --git a/dev-debug/dtrace/Manifest b/dev-debug/dtrace/Manifest index e06976526d30..cb045591b694 100644 --- a/dev-debug/dtrace/Manifest +++ b/dev-debug/dtrace/Manifest @@ -1,7 +1,7 @@ AUX dtprobed.init 209 BLAKE2B f97bd2c0c681697becc2c6c7f87b8fdf779251d0473dd440bf30f0c3ce95e26e24b2496a2e8de4ff33a9ffc8a05e5bc64d066969dd7e4458ea65d2d10ae61723 SHA512 12a8e07747d8a8c3456675ea88060656dad2b594abc69daa15384abab4d11ea888d88287f921a095cad84f2e254dc858ea50e29f5e17b663f7b6be25dcbfd7b5 DIST dtrace-2.0.1.1.tar.gz 1435524 BLAKE2B 761a931b9d871e9316f11ebe960f6bbfd3c16a82cf1cdd9ae5d69b22e0d8cea8d4b3924c960b7915f8843ce1e5c37bd257a52f1ce346957002b0ab00e59306fb SHA512 15809f2bc996bac9bd6cbb2b03eaa9a0c6a2aea9404642280f14d75b7d6feaec31b5d2c16915255cd202006cdff7835f578c042b087605708a9eb935407f1b95 DIST dtrace-2.0.2.tar.gz 1466888 BLAKE2B 82bcf55f46802b525dd5bfb8d2ee96223d6ee3e76b752632b61cdc652308efa143f8158fbdfff7f2af1e63d5fc57aa44b0ca826e313b3c5c9d3019528101fccb SHA512 7d3fcb6ffcbfc6732b66e217cee6d45a504beb7c8b9f887b2a781eea68ef2f44de9aa373728a91d3a91e59a0be0664e2d7d92d42fd25b88de4c5005e62505c78 -EBUILD dtrace-2.0.1.1-r2.ebuild 6365 BLAKE2B 36e1f2ac964825fce09402200a5f92412aa84cb8e6b0ee4945ef6826d4a225ae11a5e2f5daaf6699ef6c99452ac01b302c1419fc14831c96f51d0f2bd48baa83 SHA512 68d337bc7b378e17aa58c01513aeca69fc1e15aaf23556a72da1d15ae5df816e0858b406b2ff7ebcad69e39c2243bb4d57b401d8132bf1c0239bcb2ee641fdd0 -EBUILD dtrace-2.0.2.ebuild 6057 BLAKE2B f401ee4412da09c2647dca4090b4b428587fd1126f7d5e6a67f994dcebe67a2654d0323205b8f47c8c57a049c12c86097d8581ee1d38788068e85d6286710896 SHA512 8ba3720a076c22ea1fb577e0bb8ec876a02b3704a572c42a50f324bb20aa608a33f6c134558515ae814f8891f7af6d052210d9f1a9e78e7c3a1e6eeb014db6ca -EBUILD dtrace-9999.ebuild 6054 BLAKE2B 5a77939a92131662f83f9a6c522ab50fc69edd673db8f18eee86e72cbf2dc83eb4508340a201b96280a90e0bd7eda4c41451f427ce48d74f29441a937d77a2e7 SHA512 8828e405f4520ac2c035b9644a8130212452db742c771ddca3b6a47c4ce2ff02e85cbca45208d6a7fe4da015a3a95214f468b561ccc71f399c6a01391b6680df +EBUILD dtrace-2.0.1.1-r3.ebuild 6371 BLAKE2B ae761fec5f24ca7e461134aed2cb94b33fa6ec032a904be3ef5de9a43f2115192d7d5d064d68970474fae6ce247e0a9cfc0d773691c5586a38f8a9bad7ebcd95 SHA512 994eb0dfdc6836823c7a94c0cf9aa5386bbec54b676c046bfd08ed9556b27091e467d2d1fa961b2be4d11fc52499ca64d0f1d0153b8ce2fc4f7b13a88dff120e +EBUILD dtrace-2.0.2-r1.ebuild 6058 BLAKE2B 7feff068fa4b67023e8fe899e5e1ad111efae6810d3168a3977a836f2bd37a16e7e6781323a8b19f237689f3297cd8690d97ff4fa6a7f3a8d007ddec09ce3f09 SHA512 7a4501b28ebdda4fbccb9c765b2c2d516a415b5007efc0e7aeb937c8addeb2a072868e9692b1384bc8efbade1469ca061ccca46be6cf4852f6e53c368a45ddf1 +EBUILD dtrace-9999.ebuild 6060 BLAKE2B cca7975a02e62469bc11d3f9d608214dbf6f8855b15135acb800fe5c39fc111d2c7d8859d1d1c8100e00f508690334f13a33e013d4de8d994cae696017667a8c SHA512 67a6f0989403bf203ee0221e3c124e4b237d69ee854d4360a839984c5acbff11f9cade234c6e4a2c4f1ebb10782f002e83540e5bc5c163821e81100f0d4bbc06 MISC metadata.xml 632 BLAKE2B 695cab30d4a45e94a1a69ca4c071e2aa2d99cb0457f4b02d0ea6e88db0574976082e96e9c9ebd620bcdacd9f30f97938301a70e67df1b9baebb692184598820a SHA512 b028b76d8d153ee8db9036c78342828543ce2675092f0daf9e1a82af7d7c249b3ea450567e1c3c04009764004c45424e2f9dfebd362d1364ff7cb2da40be3962 diff --git a/dev-debug/dtrace/dtrace-2.0.1.1-r2.ebuild b/dev-debug/dtrace/dtrace-2.0.1.1-r2.ebuild deleted file mode 100644 index 39af1cb563af..000000000000 --- a/dev-debug/dtrace/dtrace-2.0.1.1-r2.ebuild +++ /dev/null @@ -1,231 +0,0 @@ -# Copyright 2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit edo flag-o-matic linux-info systemd toolchain-funcs udev - -DESCRIPTION="Dynamic BPF-based system-wide tracing tool" -HOMEPAGE="https://github.com/oracle/dtrace-utils https://wiki.gentoo.org/wiki/DTrace" - -if [[ ${PV} == 9999 ]]; then - EGIT_BRANCH="devel" - EGIT_REPO_URI="https://github.com/oracle/dtrace-utils" - inherit git-r3 -else - SRC_URI="https://github.com/oracle/dtrace-utils/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz" - S="${WORKDIR}"/dtrace-utils-${PV} - - KEYWORDS="-* amd64 arm64" -fi - -LICENSE="UPL-1.0" -SLOT="0" -IUSE="systemd test-install" - -# XXX: right now, we auto-adapt to whether multilibs are present: -# should we force them to be? how? -# -# TODO: can we make the wireshark dep conditional? -DEPEND=" - dev-libs/elfutils - dev-libs/libbpf - dev-libs/libpfm:= - net-analyzer/wireshark[dumpcap] - net-libs/libpcap - >=sys-fs/fuse-3.2.0:3 - >=sys-libs/binutils-libs-2.42:= - sys-libs/zlib - systemd? ( sys-apps/systemd ) -" -RDEPEND=" - ${DEPEND} - !dev-debug/systemtap[dtrace-symlink(+)] - net-analyzer/wireshark - test-install? ( - app-alternatives/bc - app-editors/vim-core - dev-build/make - dev-lang/perl - dev-util/perf - net-fs/nfs-utils - sys-apps/coreutils - sys-fs/xfsprogs - sys-process/time - virtual/jdk - virtual/perl-IO-Socket-IP - ) -" -BDEPEND=" - dev-build/make - sys-apps/gawk - sys-devel/bison - >=sys-devel/bpf-toolchain-14.1.0 - sys-devel/flex -" -# This isn't yet optional, valgrind.h is included unconditionally -# https://github.com/oracle/dtrace-utils/issues/80 -DEPEND+=" dev-debug/valgrind" - -QA_PRESTRIPPED=" - usr/.*/dtrace/testsuite/test/triggers/.* -" -QA_FLAGS_IGNORED=" - usr/.*/dtrace/testsuite/test/triggers/.* -" - -# TODO: report upstream (bug #938221) although it seems like it's -# not relevant given it's a BPF object. -QA_EXECSTACK=" - usr/*/dtrace/bpf_dlib.* -" - -pkg_pretend() { - # TODO: optional kernel patches - - # Basics for debugging information, BPF - local CONFIG_CHECK="~BPF ~DEBUG_INFO_BTF ~KALLSYMS_ALL" - - CONFIG_CHECK+=" ~CUSE" - - # Tracing - CONFIG_CHECK+=" ~TRACING" - CONFIG_CHECK+=" ~UPROBES ~UPROBE_EVENTS" - CONFIG_CHECK+=" ~FTRACE ~FTRACE_SYSCALLS ~DYNAMIC_FTRACE ~FUNCTION_TRACER" - CONFIG_CHECK+=" ~FPROBE" - # DTrace can fallback to kprobes for fbt but people often want them off - # for security and newer kernels work fine with BPF for that, so - # let's omit it. kprobes are slower and scale poorly. - - # https://gcc.gnu.org/PR84052 - CONFIG_CHECK+=" !GCC_PLUGIN_RANDSTRUCT" - - if use test-install ; then - # See test/modules - CONFIG_CHECK+=" ~EXT4_FS ~ISO9660_FS ~NFS_FS ~RDS ~TUN" - fi - - check_extra_config -} - -pkg_setup() { - eval unset ${!LC_*} LANG -} - -src_configure() { - if tc-is-cross-compiler; then - die "DTrace does not yet support cross-compilation." - fi - - tc-export CC - - # https://github.com/oracle/dtrace-utils/issues/78 - tc-enables-fortify-source && append-cppflags -U_FORTIFY_SOURCE - - # lld does this by default, so fix that, although lld fails anyway... - # 'LIBDTRACE_1.0' to symbol 'dtrace_provider_modules' failed: symbol not defined - append-ldflags $(test-flags-CCLD -Wl,--undefined-version) - # mold and lld can't cope with some relocation types used, e.g. - # 'test-triggers--usdt-tst-forker-prov.o:(.SUNW_dof): unknown relocation: R_X86_64_GLOB_DAT' - tc-ld-force-bfd - - # -fno-semantic-interposition seems to lead to a broken dtrace - # that can't actually obtain results from probes, even trivial examples - # just hang. - filter-flags -fno-semantic-interposition - # https://github.com/oracle/dtrace-utils/issues/86 - filter-lto - - local confargs=( - # TODO: Maybe we should set the UNPRIV_UID to something? -3 is a bit... kludgy - --prefix="${EPREFIX}"/usr - # See https://github.com/oracle/dtrace-utils/issues/106 for man8 suffix - --mandir="${EPREFIX}"/usr/share/man/man8 - --docdir="${EPREFIX}"/usr/share/doc/${PF} - HAVE_LIBCTF=yes - HAVE_LIBSYSTEMD=$(usex systemd) - HAVE_BPFV3=yes - ) - - edo ./configure "${confargs[@]}" -} - -src_compile() { - # -j1: https://github.com/oracle/dtrace-utils/issues/82 - emake verbose=1 -j1 $(usev !test-install TRIGGERS='') -} - -src_test() { - # Needs root and is also very time-consuming - :; -} - -src_install() { - emake DESTDIR="${D}" -j1 install $(usev test-install install-test) - - # Stripping the BPF libs breaks them - dostrip -x "/usr/$(get_libdir)" - - # It's a binary (TODO: move it?) - docompress -x /usr/share/doc/${PF}/showUSDT - - newinitd "${FILESDIR}"/dtprobed.init dtprobed -} - -pkg_postinst() { - # We need a udev reload to pick up the CUSE device node rules. - udev_reload - - if [[ -n ${REPLACING_VERSIONS} ]]; then - # TODO: Make this more intelligent wrt comparison - # One option for this is to detect when it's needed (DOF stash layout changes) - # and then e.g. sleep and restart for the user. - if systemd_is_booted ; then - einfo "Restart the DTrace 'dtprobed' service after upgrades once all dtraces are stopped with:" - einfo " systemctl try-restart dtprobed" - else - einfo "Restart the DTrace 'dtprobed' service after upgrades once all dtraces are stopped with:" - einfo " /etc/init.d/dtprobed restart" - fi - else - einfo "See https://wiki.gentoo.org/wiki/DTrace for getting started." - - # We can't do magic for people with ROOT=. - if [[ -n ${ROOT} ]] ; then - einfo "Enable and start the DTrace 'dtprobed' service for systemd with:" - einfo " systemctl enable --now dtprobed" - einfo - einfo "Enable and start the DTrace 'dtprobed' service for OpenRC with:" - einfo " rc-update add dtprobed" - einfo " /etc/init.d/dtprobed start" - return - fi - - # For first installs, we enable the service and start it. - # - # This is unusual, but the behaviour without dtprobed running - # is untested/unsupported. It's not a network service, it - # has no configuration, reads a single device node, and - # does all parsing within a seccomp jail. It also leads - # to hard-to-diagnose issues because USDT probes won't - # be registered and an application might have already - # started up which needs to be traced. - if systemd_is_booted ; then - ebegin "Enabling & starting DTrace 'dtprobed' service" - systemctl enable --now dtprobed - eend $? - else - ebegin "Enabling DTrace 'dtprobed' service" - rc-update add dtprobed - eend $? - - ebegin "Starting DTrace 'dtprobed' service" - rc-service dtprobed start - eend $? - fi - fi -} - -pkg_postrm() { - udev_reload -} diff --git a/dev-debug/dtrace/dtrace-2.0.1.1-r3.ebuild b/dev-debug/dtrace/dtrace-2.0.1.1-r3.ebuild new file mode 100644 index 000000000000..a60fab894a79 --- /dev/null +++ b/dev-debug/dtrace/dtrace-2.0.1.1-r3.ebuild @@ -0,0 +1,231 @@ +# Copyright 2024-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit edo flag-o-matic linux-info systemd toolchain-funcs udev + +DESCRIPTION="Dynamic BPF-based system-wide tracing tool" +HOMEPAGE="https://github.com/oracle/dtrace-utils https://wiki.gentoo.org/wiki/DTrace" + +if [[ ${PV} == 9999 ]]; then + EGIT_BRANCH="devel" + EGIT_REPO_URI="https://github.com/oracle/dtrace-utils" + inherit git-r3 +else + SRC_URI="https://github.com/oracle/dtrace-utils/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz" + S="${WORKDIR}"/dtrace-utils-${PV} + + KEYWORDS="-* amd64 arm64" +fi + +LICENSE="UPL-1.0" +SLOT="0" +IUSE="systemd test-install" + +# XXX: right now, we auto-adapt to whether multilibs are present: +# should we force them to be? how? +# +# TODO: can we make the wireshark dep conditional? +DEPEND=" + dev-libs/elfutils + dev-libs/libbpf + dev-libs/libpfm:= + net-analyzer/wireshark[dumpcap] + net-libs/libpcap + >=sys-fs/fuse-3.2.0:3= + >=sys-libs/binutils-libs-2.42:= + sys-libs/zlib + systemd? ( sys-apps/systemd ) +" +RDEPEND=" + ${DEPEND} + !dev-debug/systemtap[dtrace-symlink(+)] + net-analyzer/wireshark + test-install? ( + app-alternatives/bc + app-editors/vim-core + dev-build/make + dev-lang/perl + dev-util/perf + net-fs/nfs-utils + sys-apps/coreutils + sys-fs/xfsprogs + sys-process/time + virtual/jdk + virtual/perl-IO-Socket-IP + ) +" +BDEPEND=" + dev-build/make + sys-apps/gawk + sys-devel/bison + >=sys-devel/bpf-toolchain-14.1.0 + sys-devel/flex +" +# This isn't yet optional, valgrind.h is included unconditionally +# https://github.com/oracle/dtrace-utils/issues/80 +DEPEND+=" dev-debug/valgrind" + +QA_PRESTRIPPED=" + usr/.*/dtrace/testsuite/test/triggers/.* +" +QA_FLAGS_IGNORED=" + usr/.*/dtrace/testsuite/test/triggers/.* +" + +# TODO: report upstream (bug #938221) although it seems like it's +# not relevant given it's a BPF object. +QA_EXECSTACK=" + usr/*/dtrace/bpf_dlib.* +" + +pkg_pretend() { + # TODO: optional kernel patches + + # Basics for debugging information, BPF + local CONFIG_CHECK="~BPF ~DEBUG_INFO_BTF ~KALLSYMS_ALL" + + CONFIG_CHECK+=" ~CUSE" + + # Tracing + CONFIG_CHECK+=" ~TRACING" + CONFIG_CHECK+=" ~UPROBES ~UPROBE_EVENTS" + CONFIG_CHECK+=" ~FTRACE ~FTRACE_SYSCALLS ~DYNAMIC_FTRACE ~FUNCTION_TRACER" + CONFIG_CHECK+=" ~FPROBE" + # DTrace can fallback to kprobes for fbt but people often want them off + # for security and newer kernels work fine with BPF for that, so + # let's omit it. kprobes are slower and scale poorly. + + # https://gcc.gnu.org/PR84052 + CONFIG_CHECK+=" !GCC_PLUGIN_RANDSTRUCT" + + if use test-install ; then + # See test/modules + CONFIG_CHECK+=" ~EXT4_FS ~ISO9660_FS ~NFS_FS ~RDS ~TUN" + fi + + check_extra_config +} + +pkg_setup() { + eval unset ${!LC_*} LANG +} + +src_configure() { + if tc-is-cross-compiler; then + die "DTrace does not yet support cross-compilation." + fi + + tc-export CC + + # https://github.com/oracle/dtrace-utils/issues/78 + tc-enables-fortify-source && append-cppflags -U_FORTIFY_SOURCE + + # lld does this by default, so fix that, although lld fails anyway... + # 'LIBDTRACE_1.0' to symbol 'dtrace_provider_modules' failed: symbol not defined + append-ldflags $(test-flags-CCLD -Wl,--undefined-version) + # mold and lld can't cope with some relocation types used, e.g. + # 'test-triggers--usdt-tst-forker-prov.o:(.SUNW_dof): unknown relocation: R_X86_64_GLOB_DAT' + tc-ld-force-bfd + + # -fno-semantic-interposition seems to lead to a broken dtrace + # that can't actually obtain results from probes, even trivial examples + # just hang. + filter-flags -fno-semantic-interposition + # https://github.com/oracle/dtrace-utils/issues/86 + filter-lto + + local confargs=( + # TODO: Maybe we should set the UNPRIV_UID to something? -3 is a bit... kludgy + --prefix="${EPREFIX}"/usr + # See https://github.com/oracle/dtrace-utils/issues/106 for man8 suffix + --mandir="${EPREFIX}"/usr/share/man/man8 + --docdir="${EPREFIX}"/usr/share/doc/${PF} + HAVE_LIBCTF=yes + HAVE_LIBSYSTEMD=$(usex systemd) + HAVE_BPFV3=yes + ) + + edo ./configure "${confargs[@]}" +} + +src_compile() { + # -j1: https://github.com/oracle/dtrace-utils/issues/82 + emake verbose=1 -j1 $(usev !test-install TRIGGERS='') +} + +src_test() { + # Needs root and is also very time-consuming + :; +} + +src_install() { + emake DESTDIR="${D}" -j1 install $(usev test-install install-test) + + # Stripping the BPF libs breaks them + dostrip -x "/usr/$(get_libdir)" + + # It's a binary (TODO: move it?) + docompress -x /usr/share/doc/${PF}/showUSDT + + newinitd "${FILESDIR}"/dtprobed.init dtprobed +} + +pkg_postinst() { + # We need a udev reload to pick up the CUSE device node rules. + udev_reload + + if [[ -n ${REPLACING_VERSIONS} ]]; then + # TODO: Make this more intelligent wrt comparison + # One option for this is to detect when it's needed (DOF stash layout changes) + # and then e.g. sleep and restart for the user. + if systemd_is_booted ; then + einfo "Restart the DTrace 'dtprobed' service after upgrades once all dtraces are stopped with:" + einfo " systemctl try-restart dtprobed" + else + einfo "Restart the DTrace 'dtprobed' service after upgrades once all dtraces are stopped with:" + einfo " /etc/init.d/dtprobed restart" + fi + else + einfo "See https://wiki.gentoo.org/wiki/DTrace for getting started." + + # We can't do magic for people with ROOT=. + if [[ -n ${ROOT} ]] ; then + einfo "Enable and start the DTrace 'dtprobed' service for systemd with:" + einfo " systemctl enable --now dtprobed" + einfo + einfo "Enable and start the DTrace 'dtprobed' service for OpenRC with:" + einfo " rc-update add dtprobed" + einfo " /etc/init.d/dtprobed start" + return + fi + + # For first installs, we enable the service and start it. + # + # This is unusual, but the behaviour without dtprobed running + # is untested/unsupported. It's not a network service, it + # has no configuration, reads a single device node, and + # does all parsing within a seccomp jail. It also leads + # to hard-to-diagnose issues because USDT probes won't + # be registered and an application might have already + # started up which needs to be traced. + if systemd_is_booted ; then + ebegin "Enabling & starting DTrace 'dtprobed' service" + systemctl enable --now dtprobed + eend $? + else + ebegin "Enabling DTrace 'dtprobed' service" + rc-update add dtprobed + eend $? + + ebegin "Starting DTrace 'dtprobed' service" + rc-service dtprobed start + eend $? + fi + fi +} + +pkg_postrm() { + udev_reload +} diff --git a/dev-debug/dtrace/dtrace-2.0.2-r1.ebuild b/dev-debug/dtrace/dtrace-2.0.2-r1.ebuild new file mode 100644 index 000000000000..2843c6c89981 --- /dev/null +++ b/dev-debug/dtrace/dtrace-2.0.2-r1.ebuild @@ -0,0 +1,225 @@ +# Copyright 2024-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit edo flag-o-matic linux-info systemd toolchain-funcs udev + +DESCRIPTION="Dynamic BPF-based system-wide tracing tool" +HOMEPAGE="https://github.com/oracle/dtrace-utils https://wiki.gentoo.org/wiki/DTrace" + +if [[ ${PV} == 9999 ]]; then + EGIT_BRANCH="devel" + EGIT_REPO_URI="https://github.com/oracle/dtrace-utils" + inherit git-r3 +else + SRC_URI="https://github.com/oracle/dtrace-utils/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz" + S="${WORKDIR}"/dtrace-utils-${PV} + + KEYWORDS="-* amd64 arm64" +fi + +LICENSE="UPL-1.0" +SLOT="0" +IUSE="test-install valgrind" + +# XXX: right now, we auto-adapt to whether multilibs are present: +# should we force them to be? how? +# +# TODO: can we make the wireshark dep conditional? +DEPEND=" + dev-libs/elfutils + dev-libs/libbpf + dev-libs/libpfm:= + net-analyzer/wireshark[dumpcap] + net-libs/libpcap + >=sys-fs/fuse-3.2.0:3= + >=sys-libs/binutils-libs-2.42:= + sys-libs/zlib +" +RDEPEND=" + ${DEPEND} + !dev-debug/systemtap[dtrace-symlink(+)] + net-analyzer/wireshark + test-install? ( + app-alternatives/bc + app-editors/vim-core + dev-build/make + dev-lang/perl + dev-util/perf + net-fs/nfs-utils + sys-apps/coreutils + sys-fs/xfsprogs + sys-process/time + virtual/jdk + virtual/perl-IO-Socket-IP + ) +" +BDEPEND=" + dev-build/make + sys-apps/gawk + sys-devel/bison + >=sys-devel/bpf-toolchain-14.1.0 + sys-devel/flex +" +DEPEND+=" valgrind? ( dev-debug/valgrind )" + +QA_PRESTRIPPED=" + usr/.*/dtrace/testsuite/test/triggers/.* +" +QA_FLAGS_IGNORED=" + usr/.*/dtrace/testsuite/test/triggers/.* +" + +# TODO: report upstream (bug #938221) although it seems like it's +# not relevant given it's a BPF object. +QA_EXECSTACK=" + usr/*/dtrace/bpf_dlib.* +" + +pkg_pretend() { + # TODO: optional kernel patches + + # Basics for debugging information, BPF + local CONFIG_CHECK="~BPF ~DEBUG_INFO_BTF ~KALLSYMS_ALL" + + CONFIG_CHECK+=" ~CUSE" + + # Tracing + CONFIG_CHECK+=" ~TRACING" + CONFIG_CHECK+=" ~UPROBES ~UPROBE_EVENTS" + CONFIG_CHECK+=" ~FTRACE ~FTRACE_SYSCALLS ~DYNAMIC_FTRACE ~FUNCTION_TRACER" + CONFIG_CHECK+=" ~FPROBE" + # DTrace can fallback to kprobes for fbt but people often want them off + # for security and newer kernels work fine with BPF for that, so + # let's omit it. kprobes are slower and scale poorly. + + # https://gcc.gnu.org/PR84052 + CONFIG_CHECK+=" !GCC_PLUGIN_RANDSTRUCT" + + if use test-install ; then + # See test/modules + CONFIG_CHECK+=" ~EXT4_FS ~ISO9660_FS ~NFS_FS ~RDS ~TUN" + fi + + check_extra_config +} + +pkg_setup() { + eval unset ${!LC_*} LANG +} + +src_configure() { + if tc-is-cross-compiler; then + die "DTrace does not yet support cross-compilation." + fi + + tc-export CC + + # lld does this by default, so fix that, although lld fails anyway... + # 'LIBDTRACE_1.0' to symbol 'dtrace_provider_modules' failed: symbol not defined + append-ldflags $(test-flags-CCLD -Wl,--undefined-version) + # mold and lld can't cope with some relocation types used, e.g. + # 'test-triggers--usdt-tst-forker-prov.o:(.SUNW_dof): unknown relocation: R_X86_64_GLOB_DAT' + tc-ld-force-bfd + + # -fno-semantic-interposition seems to lead to a broken dtrace + # that can't actually obtain results from probes, even trivial examples + # just hang. + filter-flags -fno-semantic-interposition + # https://github.com/oracle/dtrace-utils/issues/86 + filter-lto + + local confargs=( + # TODO: Maybe we should set the UNPRIV_UID to something? -3 is a bit... kludgy + --prefix="${EPREFIX}"/usr + --mandir="${EPREFIX}"/usr/share/man + --docdir="${EPREFIX}"/usr/share/doc/${PF} + --with-systemd + HAVE_LIBCTF=yes + HAVE_BPFV3=yes + HAVE_VALGRIND=$(usex valgrind) + ) + + edo ./configure "${confargs[@]}" +} + +src_compile() { + # -j1: https://github.com/oracle/dtrace-utils/issues/82 + emake verbose=1 -j1 $(usev !test-install TRIGGERS='') +} + +src_test() { + # Needs root and is also very time-consuming + :; +} + +src_install() { + emake DESTDIR="${D}" -j1 install $(usev test-install install-test) + + # Stripping the BPF libs breaks them + dostrip -x "/usr/$(get_libdir)" + + # It's a binary (TODO: move it?) + docompress -x /usr/share/doc/${PF}/showUSDT + + newinitd "${FILESDIR}"/dtprobed.init dtprobed +} + +pkg_postinst() { + # We need a udev reload to pick up the CUSE device node rules. + udev_reload + + if [[ -n ${REPLACING_VERSIONS} ]]; then + # TODO: Make this more intelligent wrt comparison + # One option for this is to detect when it's needed (DOF stash layout changes) + # and then e.g. sleep and restart for the user. + if systemd_is_booted ; then + einfo "Restart the DTrace 'dtprobed' service after upgrades once all dtraces are stopped with:" + einfo " systemctl try-restart dtprobed" + else + einfo "Restart the DTrace 'dtprobed' service after upgrades once all dtraces are stopped with:" + einfo " /etc/init.d/dtprobed restart" + fi + else + einfo "See https://wiki.gentoo.org/wiki/DTrace for getting started." + + # We can't do magic for people with ROOT=. + if [[ -n ${ROOT} ]] ; then + einfo "Enable and start the DTrace 'dtprobed' service for systemd with:" + einfo " systemctl enable --now dtprobed" + einfo + einfo "Enable and start the DTrace 'dtprobed' service for OpenRC with:" + einfo " rc-update add dtprobed" + einfo " /etc/init.d/dtprobed start" + return + fi + + # For first installs, we enable the service and start it. + # + # This is unusual, but the behaviour without dtprobed running + # is untested/unsupported. It's not a network service, it + # has no configuration, reads a single device node, and + # does all parsing within a seccomp jail. It also leads + # to hard-to-diagnose issues because USDT probes won't + # be registered and an application might have already + # started up which needs to be traced. + if systemd_is_booted ; then + ebegin "Enabling & starting DTrace 'dtprobed' service" + systemctl enable --now dtprobed + eend $? + else + ebegin "Enabling DTrace 'dtprobed' service" + rc-update add dtprobed + eend $? + + ebegin "Starting DTrace 'dtprobed' service" + rc-service dtprobed start + eend $? + fi + fi +} + +pkg_postrm() { + udev_reload +} diff --git a/dev-debug/dtrace/dtrace-2.0.2.ebuild b/dev-debug/dtrace/dtrace-2.0.2.ebuild deleted file mode 100644 index 409302264708..000000000000 --- a/dev-debug/dtrace/dtrace-2.0.2.ebuild +++ /dev/null @@ -1,225 +0,0 @@ -# Copyright 2024-2025 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit edo flag-o-matic linux-info systemd toolchain-funcs udev - -DESCRIPTION="Dynamic BPF-based system-wide tracing tool" -HOMEPAGE="https://github.com/oracle/dtrace-utils https://wiki.gentoo.org/wiki/DTrace" - -if [[ ${PV} == 9999 ]]; then - EGIT_BRANCH="devel" - EGIT_REPO_URI="https://github.com/oracle/dtrace-utils" - inherit git-r3 -else - SRC_URI="https://github.com/oracle/dtrace-utils/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz" - S="${WORKDIR}"/dtrace-utils-${PV} - - KEYWORDS="-* amd64 arm64" -fi - -LICENSE="UPL-1.0" -SLOT="0" -IUSE="test-install valgrind" - -# XXX: right now, we auto-adapt to whether multilibs are present: -# should we force them to be? how? -# -# TODO: can we make the wireshark dep conditional? -DEPEND=" - dev-libs/elfutils - dev-libs/libbpf - dev-libs/libpfm:= - net-analyzer/wireshark[dumpcap] - net-libs/libpcap - >=sys-fs/fuse-3.2.0:3 - >=sys-libs/binutils-libs-2.42:= - sys-libs/zlib -" -RDEPEND=" - ${DEPEND} - !dev-debug/systemtap[dtrace-symlink(+)] - net-analyzer/wireshark - test-install? ( - app-alternatives/bc - app-editors/vim-core - dev-build/make - dev-lang/perl - dev-util/perf - net-fs/nfs-utils - sys-apps/coreutils - sys-fs/xfsprogs - sys-process/time - virtual/jdk - virtual/perl-IO-Socket-IP - ) -" -BDEPEND=" - dev-build/make - sys-apps/gawk - sys-devel/bison - >=sys-devel/bpf-toolchain-14.1.0 - sys-devel/flex -" -DEPEND+=" valgrind? ( dev-debug/valgrind )" - -QA_PRESTRIPPED=" - usr/.*/dtrace/testsuite/test/triggers/.* -" -QA_FLAGS_IGNORED=" - usr/.*/dtrace/testsuite/test/triggers/.* -" - -# TODO: report upstream (bug #938221) although it seems like it's -# not relevant given it's a BPF object. -QA_EXECSTACK=" - usr/*/dtrace/bpf_dlib.* -" - -pkg_pretend() { - # TODO: optional kernel patches - - # Basics for debugging information, BPF - local CONFIG_CHECK="~BPF ~DEBUG_INFO_BTF ~KALLSYMS_ALL" - - CONFIG_CHECK+=" ~CUSE" - - # Tracing - CONFIG_CHECK+=" ~TRACING" - CONFIG_CHECK+=" ~UPROBES ~UPROBE_EVENTS" - CONFIG_CHECK+=" ~FTRACE ~FTRACE_SYSCALLS ~DYNAMIC_FTRACE ~FUNCTION_TRACER" - CONFIG_CHECK+=" ~FPROBE" - # DTrace can fallback to kprobes for fbt but people often want them off - # for security and newer kernels work fine with BPF for that, so - # let's omit it. kprobes are slower and scale poorly. - - # https://gcc.gnu.org/PR84052 - CONFIG_CHECK+=" !GCC_PLUGIN_RANDSTRUCT" - - if use test-install ; then - # See test/modules - CONFIG_CHECK+=" ~EXT4_FS ~ISO9660_FS ~NFS_FS ~RDS ~TUN" - fi - - check_extra_config -} - -pkg_setup() { - eval unset ${!LC_*} LANG -} - -src_configure() { - if tc-is-cross-compiler; then - die "DTrace does not yet support cross-compilation." - fi - - tc-export CC - - # lld does this by default, so fix that, although lld fails anyway... - # 'LIBDTRACE_1.0' to symbol 'dtrace_provider_modules' failed: symbol not defined - append-ldflags $(test-flags-CCLD -Wl,--undefined-version) - # mold and lld can't cope with some relocation types used, e.g. - # 'test-triggers--usdt-tst-forker-prov.o:(.SUNW_dof): unknown relocation: R_X86_64_GLOB_DAT' - tc-ld-force-bfd - - # -fno-semantic-interposition seems to lead to a broken dtrace - # that can't actually obtain results from probes, even trivial examples - # just hang. - filter-flags -fno-semantic-interposition - # https://github.com/oracle/dtrace-utils/issues/86 - filter-lto - - local confargs=( - # TODO: Maybe we should set the UNPRIV_UID to something? -3 is a bit... kludgy - --prefix="${EPREFIX}"/usr - --mandir="${EPREFIX}"/usr/share/man - --docdir="${EPREFIX}"/usr/share/doc/${PF} - --with-systemd - HAVE_LIBCTF=yes - HAVE_BPFV3=yes - HAVE_VALGRIND=$(usex valgrind) - ) - - edo ./configure "${confargs[@]}" -} - -src_compile() { - # -j1: https://github.com/oracle/dtrace-utils/issues/82 - emake verbose=1 -j1 $(usev !test-install TRIGGERS='') -} - -src_test() { - # Needs root and is also very time-consuming - :; -} - -src_install() { - emake DESTDIR="${D}" -j1 install $(usev test-install install-test) - - # Stripping the BPF libs breaks them - dostrip -x "/usr/$(get_libdir)" - - # It's a binary (TODO: move it?) - docompress -x /usr/share/doc/${PF}/showUSDT - - newinitd "${FILESDIR}"/dtprobed.init dtprobed -} - -pkg_postinst() { - # We need a udev reload to pick up the CUSE device node rules. - udev_reload - - if [[ -n ${REPLACING_VERSIONS} ]]; then - # TODO: Make this more intelligent wrt comparison - # One option for this is to detect when it's needed (DOF stash layout changes) - # and then e.g. sleep and restart for the user. - if systemd_is_booted ; then - einfo "Restart the DTrace 'dtprobed' service after upgrades once all dtraces are stopped with:" - einfo " systemctl try-restart dtprobed" - else - einfo "Restart the DTrace 'dtprobed' service after upgrades once all dtraces are stopped with:" - einfo " /etc/init.d/dtprobed restart" - fi - else - einfo "See https://wiki.gentoo.org/wiki/DTrace for getting started." - - # We can't do magic for people with ROOT=. - if [[ -n ${ROOT} ]] ; then - einfo "Enable and start the DTrace 'dtprobed' service for systemd with:" - einfo " systemctl enable --now dtprobed" - einfo - einfo "Enable and start the DTrace 'dtprobed' service for OpenRC with:" - einfo " rc-update add dtprobed" - einfo " /etc/init.d/dtprobed start" - return - fi - - # For first installs, we enable the service and start it. - # - # This is unusual, but the behaviour without dtprobed running - # is untested/unsupported. It's not a network service, it - # has no configuration, reads a single device node, and - # does all parsing within a seccomp jail. It also leads - # to hard-to-diagnose issues because USDT probes won't - # be registered and an application might have already - # started up which needs to be traced. - if systemd_is_booted ; then - ebegin "Enabling & starting DTrace 'dtprobed' service" - systemctl enable --now dtprobed - eend $? - else - ebegin "Enabling DTrace 'dtprobed' service" - rc-update add dtprobed - eend $? - - ebegin "Starting DTrace 'dtprobed' service" - rc-service dtprobed start - eend $? - fi - fi -} - -pkg_postrm() { - udev_reload -} diff --git a/dev-debug/dtrace/dtrace-9999.ebuild b/dev-debug/dtrace/dtrace-9999.ebuild index 324953659fa7..7765c54784e9 100644 --- a/dev-debug/dtrace/dtrace-9999.ebuild +++ b/dev-debug/dtrace/dtrace-9999.ebuild @@ -1,4 +1,4 @@ -# Copyright 2024 Gentoo Authors +# Copyright 2024-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -33,7 +33,7 @@ DEPEND=" dev-libs/libpfm:= net-analyzer/wireshark[dumpcap] net-libs/libpcap - >=sys-fs/fuse-3.2.0:3 + >=sys-fs/fuse-3.2.0:3= >=sys-libs/binutils-libs-2.42:= sys-libs/zlib " -- cgit v1.2.3