summaryrefslogtreecommitdiff
path: root/dev-debug/dtrace
diff options
context:
space:
mode:
authorroot <root@alpha.trunkmasters.com>2026-06-04 16:24:49 -0500
committerroot <root@alpha.trunkmasters.com>2026-06-04 16:24:49 -0500
commita3ceca1b4c0d9bdb550dc23f06ffbb5a8e033bc7 (patch)
tree0c52bbae1c242fbc296bd650fcd1167685f81492 /dev-debug/dtrace
parentbfd9c39e4712ebdb442d4ca0673061faed1e70e1 (diff)
downloadbaldeagleos-repo-a3ceca1b4c0d9bdb550dc23f06ffbb5a8e033bc7.tar.gz
baldeagleos-repo-a3ceca1b4c0d9bdb550dc23f06ffbb5a8e033bc7.tar.xz
baldeagleos-repo-a3ceca1b4c0d9bdb550dc23f06ffbb5a8e033bc7.zip
Adding metadata
Diffstat (limited to 'dev-debug/dtrace')
-rw-r--r--dev-debug/dtrace/Manifest2
-rw-r--r--dev-debug/dtrace/dtrace-2.0.6.ebuild232
-rw-r--r--dev-debug/dtrace/dtrace-2.0.7.ebuild232
-rw-r--r--dev-debug/dtrace/dtrace-9999.ebuild233
-rw-r--r--dev-debug/dtrace/files/dtprobed.init15
-rw-r--r--dev-debug/dtrace/metadata.xml25
6 files changed, 0 insertions, 739 deletions
diff --git a/dev-debug/dtrace/Manifest b/dev-debug/dtrace/Manifest
deleted file mode 100644
index 8ae8bc350f5a..000000000000
--- a/dev-debug/dtrace/Manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-DIST dtrace-2.0.6.tar.gz 1728356 BLAKE2B dbb28c97a91e6759517eb6840b93b3abc5df08d33b94bd70bd03e2ffb523469324daa1d067c150244ea94c9ffc8d31703e4963f0746fed540863a8fc7f6674ef SHA512 89f9c572c2aed56fb6161d4a98681ca151fd084a21d0de455eab26dca839dd7001633a09a37d08078fce311b23b4a1b7ba7aef41a070249fd4e3fc68e328997d
-DIST dtrace-2.0.7.tar.gz 1730617 BLAKE2B 971cadc74482368f1a51c89f8793f01ebf499fc3e1dc085b7e26642f157e8a58979082e9c3dd127b21443592f32d49ced4571d933392c0576650c9adc8bfb419 SHA512 5c49efde8a2bd4f4e79410bfebde07ac49415789a21351c077166d3c5e0f58a5153f8e391f7775cb9c6adb1bec30884dae2540c73ca2db25d56d30202e42f789
diff --git a/dev-debug/dtrace/dtrace-2.0.6.ebuild b/dev-debug/dtrace/dtrace-2.0.6.ebuild
deleted file mode 100644
index 4c3fb6b82c29..000000000000
--- a/dev-debug/dtrace/dtrace-2.0.6.ebuild
+++ /dev/null
@@ -1,232 +0,0 @@
-# Copyright 2024-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit edo flag-o-matic linux-info multilib systemd toolchain-funcs udev
-
-DESCRIPTION="Dynamic BPF-based system-wide tracing tool"
-HOMEPAGE="https://github.com/oracle/dtrace https://wiki.gentoo.org/wiki/DTrace"
-
-if [[ ${PV} == 9999 ]]; then
- EGIT_BRANCH="devel"
- EGIT_REPO_URI="https://github.com/oracle/dtrace"
- inherit git-r3
-else
- SRC_URI="https://github.com/oracle/dtrace/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
-
- KEYWORDS="-* amd64 arm64"
-fi
-
-LICENSE="UPL-1.0"
-SLOT="0"
-IUSE="test-install valgrind"
-
-# 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:=
- virtual/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
- )
-"
-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"
- CONFIG_CHECK+=" ~BPF_KPROBE_OVERRIDE ~FUNCTION_ERROR_INJECTION"
- # 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
- # While it builds as of 2025-06-08, it's broken at runtime
- # in the same way as -fno-semantic-interposition (hangs, no probes fire).
- 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() {
- local myemakeargs=(
- verbose=1
- $(usev !test-install TRIGGERS='')
- )
-
- if use amd64 ; then
- ! has_multilib_profile && myemakeargs+=( NATIVE_BITNESS_ONLY=1 )
- fi
-
- # -j1: https://github.com/oracle/dtrace/issues/82
- emake -j1 "${myemakeargs[@]}"
-}
-
-src_test() {
- # Needs root and is also very time-consuming
- :;
-}
-
-src_install() {
- emake DESTDIR="${D}" -j1 install $(usev test-install install-test)
-
- # We want to strip neither the BPF libraries nor libdtrace.so itself
- # as probes attach to some symbols that would get removed otherwise.
- 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.7.ebuild b/dev-debug/dtrace/dtrace-2.0.7.ebuild
deleted file mode 100644
index 4c3fb6b82c29..000000000000
--- a/dev-debug/dtrace/dtrace-2.0.7.ebuild
+++ /dev/null
@@ -1,232 +0,0 @@
-# Copyright 2024-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit edo flag-o-matic linux-info multilib systemd toolchain-funcs udev
-
-DESCRIPTION="Dynamic BPF-based system-wide tracing tool"
-HOMEPAGE="https://github.com/oracle/dtrace https://wiki.gentoo.org/wiki/DTrace"
-
-if [[ ${PV} == 9999 ]]; then
- EGIT_BRANCH="devel"
- EGIT_REPO_URI="https://github.com/oracle/dtrace"
- inherit git-r3
-else
- SRC_URI="https://github.com/oracle/dtrace/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
-
- KEYWORDS="-* amd64 arm64"
-fi
-
-LICENSE="UPL-1.0"
-SLOT="0"
-IUSE="test-install valgrind"
-
-# 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:=
- virtual/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
- )
-"
-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"
- CONFIG_CHECK+=" ~BPF_KPROBE_OVERRIDE ~FUNCTION_ERROR_INJECTION"
- # 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
- # While it builds as of 2025-06-08, it's broken at runtime
- # in the same way as -fno-semantic-interposition (hangs, no probes fire).
- 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() {
- local myemakeargs=(
- verbose=1
- $(usev !test-install TRIGGERS='')
- )
-
- if use amd64 ; then
- ! has_multilib_profile && myemakeargs+=( NATIVE_BITNESS_ONLY=1 )
- fi
-
- # -j1: https://github.com/oracle/dtrace/issues/82
- emake -j1 "${myemakeargs[@]}"
-}
-
-src_test() {
- # Needs root and is also very time-consuming
- :;
-}
-
-src_install() {
- emake DESTDIR="${D}" -j1 install $(usev test-install install-test)
-
- # We want to strip neither the BPF libraries nor libdtrace.so itself
- # as probes attach to some symbols that would get removed otherwise.
- 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
deleted file mode 100644
index a048c509f0f0..000000000000
--- a/dev-debug/dtrace/dtrace-9999.ebuild
+++ /dev/null
@@ -1,233 +0,0 @@
-# Copyright 2024-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit edo flag-o-matic linux-info multilib systemd toolchain-funcs udev
-
-DESCRIPTION="Dynamic BPF-based system-wide tracing tool"
-HOMEPAGE="https://github.com/oracle/dtrace https://wiki.gentoo.org/wiki/DTrace"
-
-if [[ ${PV} == 9999 ]]; then
- EGIT_BRANCH="devel"
- EGIT_REPO_URI="https://github.com/oracle/dtrace"
- inherit git-r3
-else
- SRC_URI="https://github.com/oracle/dtrace/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
-
- KEYWORDS="-* ~amd64 ~arm64"
-fi
-
-LICENSE="UPL-1.0"
-SLOT="0"
-IUSE="test-install valgrind"
-
-# 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:=
- virtual/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
- )
-"
-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"
- CONFIG_CHECK+=" ~BPF_KPROBE_OVERRIDE ~FUNCTION_ERROR_INJECTION"
- # 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
- # While it builds as of 2025-06-08, it's broken at runtime
- # in the same way as -fno-semantic-interposition (hangs, no probes fire).
- filter-lto
-
- local confargs=(
- --disable-dependency-tracking
- # 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() {
- local myemakeargs=(
- verbose=1
- $(usev !test-install TRIGGERS='')
- )
-
- if use amd64 ; then
- ! has_multilib_profile && myemakeargs+=( NATIVE_BITNESS_ONLY=1 )
- fi
-
- # -j1: https://github.com/oracle/dtrace/issues/82
- emake -j1 "${myemakeargs[@]}"
-}
-
-src_test() {
- # Needs root and is also very time-consuming
- :;
-}
-
-src_install() {
- emake DESTDIR="${D}" -j1 install $(usev test-install install-test)
-
- # We want to strip neither the BPF libraries nor libdtrace.so itself
- # as probes attach to some symbols that would get removed otherwise.
- 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/files/dtprobed.init b/dev-debug/dtrace/files/dtprobed.init
deleted file mode 100644
index b3d039671e2f..000000000000
--- a/dev-debug/dtrace/files/dtprobed.init
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/sbin/openrc-run
-
-depend() {
- need localmount
- need bootmisc
- after logger
-}
-
-start() {
- start-stop-daemon --start --exec /usr/sbin/dtprobed
-}
-
-stop() {
- start-stop-daemon --stop --exec /usr/sbin/dtprobed
-}
diff --git a/dev-debug/dtrace/metadata.xml b/dev-debug/dtrace/metadata.xml
deleted file mode 100644
index e71966bf1fbb..000000000000
--- a/dev-debug/dtrace/metadata.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="person">
- <email>sam@gentoo.org</email>
- <name>Sam James</name>
- </maintainer>
- <maintainer type="person">
- <email>arsen@gentoo.org</email>
- <name>Arsen Arsenović</name>
- </maintainer>
- <use>
- <flag name="test-install">
- Install the testsuite for manual use. It is not suitable
- for automatic execution within the ebuild because it
- requires root privileges.
-
- BTF must be available for the running kernel at build-time
- with this flag.
- </flag>
- </use>
- <upstream>
- <remote-id type="github">oracle/dtrace</remote-id>
- </upstream>
-</pkgmetadata>