summaryrefslogtreecommitdiff
path: root/dev-debug/dtrace
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-09-12 12:31:24 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-09-12 12:31:24 +0100
commit3ea54510168a7ed4271b85f7292beca67346bfe9 (patch)
tree560f44ef2b85e5594b847ab20454e58b35ecd7e2 /dev-debug/dtrace
parent65a36438d5b824f80023c282dadc3fcd5736b526 (diff)
gentoo auto-resync : 12:09:2024 - 12:31:23
Diffstat (limited to 'dev-debug/dtrace')
-rw-r--r--dev-debug/dtrace/Manifest6
-rw-r--r--dev-debug/dtrace/dtrace-2.0.1.1-r2.ebuild63
-rw-r--r--dev-debug/dtrace/dtrace-9999.ebuild63
-rw-r--r--dev-debug/dtrace/metadata.xml4
4 files changed, 99 insertions, 37 deletions
diff --git a/dev-debug/dtrace/Manifest b/dev-debug/dtrace/Manifest
index 25c3cf302347..7facaeadb450 100644
--- a/dev-debug/dtrace/Manifest
+++ b/dev-debug/dtrace/Manifest
@@ -1,5 +1,5 @@
AUX dtprobed.init 209 BLAKE2B f97bd2c0c681697becc2c6c7f87b8fdf779251d0473dd440bf30f0c3ce95e26e24b2496a2e8de4ff33a9ffc8a05e5bc64d066969dd7e4458ea65d2d10ae61723 SHA512 12a8e07747d8a8c3456675ea88060656dad2b594abc69daa15384abab4d11ea888d88287f921a095cad84f2e254dc858ea50e29f5e17b663f7b6be25dcbfd7b5
DIST dtrace-2.0.1.1.tar.gz 1435524 BLAKE2B 761a931b9d871e9316f11ebe960f6bbfd3c16a82cf1cdd9ae5d69b22e0d8cea8d4b3924c960b7915f8843ce1e5c37bd257a52f1ce346957002b0ab00e59306fb SHA512 15809f2bc996bac9bd6cbb2b03eaa9a0c6a2aea9404642280f14d75b7d6feaec31b5d2c16915255cd202006cdff7835f578c042b087605708a9eb935407f1b95
-EBUILD dtrace-2.0.1.1-r2.ebuild 5303 BLAKE2B be1008f95fc1d15a58037a37877d6ffa2720c37792035709f141a6aa84362155350b0cc074ceed14610318403119a2c7fa31ccc3eeb66b3a168ced894fd574da SHA512 96f3a34d765d076ee250ddfaf392653166bed553c067a887bb3c108156ddecc7acb5673be6517a9b303c53b862ea42d431e966d4472f5349d9841fff6485dd2d
-EBUILD dtrace-9999.ebuild 5304 BLAKE2B 9542f136bf49f6008e1e049438cd151fb6b1248efd23773581ade5d19a1f279c5b0c44dbefb395db5bedd93852f49075525b537c3ca0eba06ad3ae8d50f1e602 SHA512 c539396e6d0facd6c885396933b43c4e8d6cce27fd1f03baee988e93dac5a1f8e64198592f7e9191e00ef23c892f8ee9a993902fa685f20b7f33b79022687544
-MISC metadata.xml 647 BLAKE2B 4166a7a430a3cfa4967960edf9cc13673bc38b3b610669e13869d9ad0b99eaa643e31a7e07df964b1fb1b071aa437bd687de10968266a4d9b54fb04f5a3ce240 SHA512 19a73dac88ad46ae296698cd45b416fe08a75d666440518d913b78631bf11ae53087801e13936d6218f0c3b2083694acfafa5dca12ec9d5fd7fc4e2252d3deb3
+EBUILD dtrace-2.0.1.1-r2.ebuild 6359 BLAKE2B e5c6846576658afc56e34590f363706aeb1087e46b6b5643b76d40669221c99bcc8c3ab154806ca15b72adab917273f3e4a1d5653abefbedbc9683968964558c SHA512 64ec18d93bef08ffb2d4babe43ae967a3d5e300419c83cbe7c1ee776d2bb7fd003d03c739ab6452b19304fdead6bb1c1b5bced302384244cc2532179611e0cdc
+EBUILD dtrace-9999.ebuild 6360 BLAKE2B acbfd51273673c707797e0ba03c4fdb8d28216e926d69263227944a10ec143be3513d3c01165e251a44888cd579b75b07a69c8ba1059719ab68facfffcf2cdf0 SHA512 3629fc99b0f7b5175bd036a83a351b3652c0757c734d01f4c9dd7f699fcf874b320ac73888d63ee57cb4641062960f9e30de08c2200988bc2098ec130151bf44
+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
index 0cc975299382..d3a2543a5f97 100644
--- a/dev-debug/dtrace/dtrace-2.0.1.1-r2.ebuild
+++ b/dev-debug/dtrace/dtrace-2.0.1.1-r2.ebuild
@@ -21,14 +21,12 @@ fi
LICENSE="UPL-1.0"
SLOT="0"
-IUSE="systemd install-tests"
+IUSE="systemd test-install"
# XXX: right now, we auto-adapt to whether multilibs are present:
# should we force them to be? how?
#
-# XXX: binutils-libs will need an extra patch for what dtrace does with
-# it in the absence of in-kernel CTF: it will be backported
-# to 2.42, but perhaps a patch would be a good idea before that?
+# TODO: can we make the wireshark dep conditional?
DEPEND="
dev-libs/elfutils
dev-libs/libbpf
@@ -44,7 +42,7 @@ RDEPEND="
${DEPEND}
!dev-debug/systemtap[dtrace-symlink(+)]
net-analyzer/wireshark
- install-tests? (
+ test-install? (
app-alternatives/bc
app-editors/vim-core
dev-build/make
@@ -65,7 +63,7 @@ BDEPEND="
>=sys-devel/bpf-toolchain-14.1.0
sys-devel/flex
"
-# TODO: Make this optional, valgrind.h is included unconditionally
+# This isn't yet optional, valgrind.h is included unconditionally
# https://github.com/oracle/dtrace-utils/issues/80
DEPEND+=" dev-debug/valgrind"
@@ -76,6 +74,12 @@ 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
@@ -96,7 +100,7 @@ pkg_pretend() {
# https://gcc.gnu.org/PR84052
CONFIG_CHECK+=" !GCC_PLUGIN_RANDSTRUCT"
- if use install-tests ; then
+ if use test-install ; then
# See test/modules
CONFIG_CHECK+=" ~EXT4_FS ~ISO9660_FS ~NFS_FS ~RDS ~TUN"
fi
@@ -135,6 +139,7 @@ src_configure() {
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
@@ -147,7 +152,7 @@ src_configure() {
src_compile() {
# -j1: https://github.com/oracle/dtrace-utils/issues/82
- emake verbose=1 -j1 $(usev !install-tests TRIGGERS='')
+ emake verbose=1 -j1 $(usev !test-install TRIGGERS='')
}
src_test() {
@@ -156,7 +161,7 @@ src_test() {
}
src_install() {
- emake DESTDIR="${D}" -j1 install $(usev install-tests install-test)
+ emake DESTDIR="${D}" -j1 install $(usev test-install install-test)
# Stripping the BPF libs breaks them
dostrip -x "/usr/$(get_libdir)"
@@ -171,26 +176,52 @@ pkg_postinst() {
# We need a udev reload to pick up the CUSE device node rules.
udev_reload
- # TODO: Restart it on upgrade? (it will carry across its own persistent state)
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:"
+ 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 with:"
+ 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."
- if systemd_is_booted ; then
- einfo "Enable and start the DTrace 'dtprobed' service with:"
+ # 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"
- else
- einfo "Enable and start the DTrace 'dtprobed' service with:"
+ 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 start dtprobed
+ eend $?
fi
fi
}
diff --git a/dev-debug/dtrace/dtrace-9999.ebuild b/dev-debug/dtrace/dtrace-9999.ebuild
index 69752d8625d4..5c1b20ad3238 100644
--- a/dev-debug/dtrace/dtrace-9999.ebuild
+++ b/dev-debug/dtrace/dtrace-9999.ebuild
@@ -21,14 +21,12 @@ fi
LICENSE="UPL-1.0"
SLOT="0"
-IUSE="systemd install-tests"
+IUSE="systemd test-install"
# XXX: right now, we auto-adapt to whether multilibs are present:
# should we force them to be? how?
#
-# XXX: binutils-libs will need an extra patch for what dtrace does with
-# it in the absence of in-kernel CTF: it will be backported
-# to 2.42, but perhaps a patch would be a good idea before that?
+# TODO: can we make the wireshark dep conditional?
DEPEND="
dev-libs/elfutils
dev-libs/libbpf
@@ -44,7 +42,7 @@ RDEPEND="
${DEPEND}
!dev-debug/systemtap[dtrace-symlink(+)]
net-analyzer/wireshark
- install-tests? (
+ test-install? (
app-alternatives/bc
app-editors/vim-core
dev-build/make
@@ -65,7 +63,7 @@ BDEPEND="
>=sys-devel/bpf-toolchain-14.1.0
sys-devel/flex
"
-# TODO: Make this optional, valgrind.h is included unconditionally
+# This isn't yet optional, valgrind.h is included unconditionally
# https://github.com/oracle/dtrace-utils/issues/80
DEPEND+=" dev-debug/valgrind"
@@ -76,6 +74,12 @@ 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
@@ -96,7 +100,7 @@ pkg_pretend() {
# https://gcc.gnu.org/PR84052
CONFIG_CHECK+=" !GCC_PLUGIN_RANDSTRUCT"
- if use install-tests ; then
+ if use test-install ; then
# See test/modules
CONFIG_CHECK+=" ~EXT4_FS ~ISO9660_FS ~NFS_FS ~RDS ~TUN"
fi
@@ -135,6 +139,7 @@ src_configure() {
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
@@ -147,7 +152,7 @@ src_configure() {
src_compile() {
# -j1: https://github.com/oracle/dtrace-utils/issues/82
- emake verbose=1 -j1 $(usev !install-tests TRIGGERS='')
+ emake verbose=1 -j1 $(usev !test-install TRIGGERS='')
}
src_test() {
@@ -156,7 +161,7 @@ src_test() {
}
src_install() {
- emake DESTDIR="${D}" -j1 install $(usev install-tests install-test)
+ emake DESTDIR="${D}" -j1 install $(usev test-install install-test)
# Stripping the BPF libs breaks them
dostrip -x "/usr/$(get_libdir)"
@@ -171,26 +176,52 @@ pkg_postinst() {
# We need a udev reload to pick up the CUSE device node rules.
udev_reload
- # TODO: Restart it on upgrade? (it will carry across its own persistent state)
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:"
+ 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 with:"
+ 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."
- if systemd_is_booted ; then
- einfo "Enable and start the DTrace 'dtprobed' service with:"
+ # 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"
- else
- einfo "Enable and start the DTrace 'dtprobed' service with:"
+ 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 start dtprobed
+ eend $?
fi
fi
}
diff --git a/dev-debug/dtrace/metadata.xml b/dev-debug/dtrace/metadata.xml
index 00989594025b..f9149c67c8a0 100644
--- a/dev-debug/dtrace/metadata.xml
+++ b/dev-debug/dtrace/metadata.xml
@@ -7,10 +7,10 @@
</maintainer>
<maintainer type="person">
<email>arsen@gentoo.org</email>
- <description>Arsen Arsenović</description>
+ <name>Arsen Arsenović</name>
</maintainer>
<use>
- <flag name="install-tests">
+ <flag name="test-install">
Install the testsuite for manual use. It is not suitable
for automatic execution within the ebuild because it
requires root privlieges.