Package: src:dtrace
Version: 2.0.7-1
Severity: serious
Tags: sid forky patch
dtrace uses the private libbinutils APIs, which result in
uninstallability when binutils is updated:
Package: libdtrace2
Depends: libbinutils (>= 2.46), libbinutils (<< 2.46.1), ...
to avoid this, please link dtrace statically against libbinutils, and
record the dependency in a built-using attribute.
The attached patch assumes that dtrace can be linked with libctf-nobfd.
diff -Nru dtrace-2.0.7/debian/changelog dtrace-2.0.7/debian/changelog
--- dtrace-2.0.7/debian/changelog 2026-05-12 23:55:24.000000000 +0200
+++ dtrace-2.0.7/debian/changelog 2026-06-16 16:47:27.000000000 +0200
@@ -1,3 +1,13 @@
+dtrace (2.0.7-1.1) UNRELEASED; urgency=medium
+
+ * Link against libctf-nobfd. Closes: #1140166.
+ * Link against libopcodes_pic.
+ * Add Built-Using attributes.
+ * libdtrace2: Don't hard-code dependencies on shared libs. Closes: #1140165.
+ * Make the build verbose.
+
+ -- Matthias Klose <[email protected]> Tue, 16 Jun 2026 16:47:27 +0200
+
dtrace (2.0.7-1) unstable; urgency=medium
* Fix CVE-2026-21996: divide-by-zero if section header data corruped.
diff -Nru dtrace-2.0.7/debian/control dtrace-2.0.7/debian/control
--- dtrace-2.0.7/debian/control 2026-05-12 23:55:24.000000000 +0200
+++ dtrace-2.0.7/debian/control 2026-06-16 16:47:27.000000000 +0200
@@ -12,6 +12,7 @@
Package: dtrace
Architecture: amd64 arm64
+Built-Using: ${Built-Using}
Depends: ${misc:Depends}, ${shlibs:Depends}
Description: Dynamic tracing for Linux (DTrace)
This is the official Linux port of the advanced tracing tool DTrace.
@@ -25,8 +26,9 @@
Package: libdtrace2
Architecture: amd64 arm64
+Built-Using: ${Built-Using}
Depends: ${misc:Depends}, ${shlibs:Depends},
- fuse3, libctf0, libelf1t64, libfuse3-4, libpcap0.8t64, libpfm4, libz1
+ fuse3
Description: Dynamic tracing for Linux (DTrace) (library)
This is the official Linux port of the advanced tracing tool DTrace.
.
@@ -41,6 +43,7 @@
Package: libdtrace2-dev
Architecture: amd64 arm64
+Built-Using: ${Built-Using}
Depends: ${misc:Depends},
libdtrace2 (= ${binary:Version})
Description: Dynamic tracing for Linux (DTrace) (development)
diff -Nru dtrace-2.0.7/debian/patches/series dtrace-2.0.7/debian/patches/series
--- dtrace-2.0.7/debian/patches/series 2026-05-12 23:55:24.000000000 +0200
+++ dtrace-2.0.7/debian/patches/series 2026-06-16 16:47:27.000000000 +0200
@@ -1,3 +1,4 @@
# You must remove unused comment lines for the released package.
debian-configure.patch
debian-fix-sed-path.patch
+static-link.diff
diff -Nru dtrace-2.0.7/debian/patches/static-link.diff dtrace-2.0.7/debian/patches/static-link.diff
--- dtrace-2.0.7/debian/patches/static-link.diff 1970-01-01 01:00:00.000000000 +0100
+++ dtrace-2.0.7/debian/patches/static-link.diff 2026-06-16 16:47:27.000000000 +0200
@@ -0,0 +1,20 @@
+--- a/libdtrace/Build
++++ b/libdtrace/Build
+@@ -82,7 +82,7 @@ SHLIBS += libdtrace
+ libdtrace_DIR := $(current-dir)
+ libdtrace_TARGET = libdtrace
+ ifdef HAVE_LIBCTF
+-libdtrace_LIBS := -lctf
++libdtrace_LIBS := -lctf-nobfd
+ else
+ libdtrace_LIBS := -ldtrace-ctf
+ endif
+@@ -95,7 +95,7 @@ libdtrace_SECONDARY := libproc libport
+
+ # Required for dt_pid.c for varying instruction lengths on x86
+ ifeq ($(shell uname -m), x86_64)
+-libdtrace_LIBS += -lopcodes
++libdtrace_LIBS += -lopcodes_pic
+ endif
+
+ # Disable certain warnings for these files
diff -Nru dtrace-2.0.7/debian/rules dtrace-2.0.7/debian/rules
--- dtrace-2.0.7/debian/rules 2026-05-12 23:55:24.000000000 +0200
+++ dtrace-2.0.7/debian/rules 2026-06-16 16:47:27.000000000 +0200
@@ -5,10 +5,15 @@
export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
+source_version := $(shell dpkg-query -W -f="\$${Version}\n" binutils-dev)
+BUILT_USING := $(shell dpkg-query -f '$${source:Package} (= $${source:Version}), ' -W binutils-dev)
+
include /usr/share/dpkg/pkg-info.mk
export DEB_VERSION_UPSTREAM
+export verbose = yes
+
%:
dh $@
@@ -22,3 +27,8 @@
override_dh_auto_install:
dh_auto_install -- install-test
+
+override_dh_gencontrol:
+ dh_gencontrol -a -- \
+ -Vbinutils:Version=$(source_version) \
+ -VBuilt-Using="$(BUILT_USING)"