* [PATCH 1/2] Add packaging configuration for Debian
@ 2026-08-29 13:52 Kris Van Hees
2026-08-29 17:39 ` [DTrace-devel] " Elena Zannoni
0 siblings, 1 reply; 2+ messages in thread
From: Kris Van Hees @ 2026-08-29 13:52 UTC (permalink / raw)
To: dtrace, dtrace-devel
Packaging configuration files for Debian are provided in dists/debian.
Sample steps to build DEB packages:
- make dist
- cp dtrace-x.y.z.tar.bz2 $D/dtrace_x.y.z.orig.tar.bz2
- cd $D
- tar -jxpSf dtrace_x.y.z.orig.tar.bz2
- cd dtrace-x.y.z
- make prep-debian
- debuild
Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
---
dists/Build | 14 ++
dists/debian/changelog | 20 ++
dists/debian/control | 74 ++++++++
dists/debian/copyright | 149 +++++++++++++++
dists/debian/dtrace-tests.install | 1 +
dists/debian/dtrace-tests.lintian-overrides | 8 +
dists/debian/dtrace.docs | 1 +
dists/debian/dtrace.install | 1 +
dists/debian/dtrace.lintian-overrides | 1 +
dists/debian/dtrace.manpages | 1 +
dists/debian/libdtrace2-dev.install | 5 +
dists/debian/libdtrace2.install | 12 ++
dists/debian/libdtrace2.lintian-overrides | 4 +
dists/debian/libdtrace2.manpages | 1 +
dists/debian/mkChangelog | 174 ++++++++++++++++++
dists/debian/patches/debian-configure.patch | 17 ++
.../debian/patches/debian-fix-sed-path.patch | 12 ++
dists/debian/patches/series | 3 +
dists/debian/rules | 24 +++
dists/debian/source/format | 1 +
20 files changed, 523 insertions(+)
create mode 100644 dists/Build
create mode 100644 dists/debian/changelog
create mode 100644 dists/debian/control
create mode 100644 dists/debian/copyright
create mode 100644 dists/debian/dtrace-tests.install
create mode 100644 dists/debian/dtrace-tests.lintian-overrides
create mode 100644 dists/debian/dtrace.docs
create mode 100644 dists/debian/dtrace.install
create mode 100644 dists/debian/dtrace.lintian-overrides
create mode 100644 dists/debian/dtrace.manpages
create mode 100644 dists/debian/libdtrace2-dev.install
create mode 100644 dists/debian/libdtrace2.install
create mode 100644 dists/debian/libdtrace2.lintian-overrides
create mode 100644 dists/debian/libdtrace2.manpages
create mode 100755 dists/debian/mkChangelog
create mode 100644 dists/debian/patches/debian-configure.patch
create mode 100644 dists/debian/patches/debian-fix-sed-path.patch
create mode 100644 dists/debian/patches/series
create mode 100755 dists/debian/rules
create mode 100644 dists/debian/source/format
diff --git a/dists/Build b/dists/Build
new file mode 100644
index 00000000..882939c3
--- /dev/null
+++ b/dists/Build
@@ -0,0 +1,14 @@
+#
+# Oracle Linux DTrace.
+# Copyright (c) 2026, Oracle and/or its affiliates. All rights reserved.
+# Licensed under the Universal Permissive License v 1.0 as shown at
+# http://oss.oracle.com/licenses/upl.
+
+dists_DIR := $(current-dir)
+
+# Prepare package building on Debian (copy ./dists/debian in ./debian.
+
+prep-debian::
+ $(call describe-target,DIST-PREP,Debian)
+ rm -rf debian
+ cp -rp $(dists_DIR)/debian .
diff --git a/dists/debian/changelog b/dists/debian/changelog
new file mode 100644
index 00000000..b176f3cd
--- /dev/null
+++ b/dists/debian/changelog
@@ -0,0 +1,20 @@
+dtrace (2.0.7-1) unstable; urgency=medium
+
+ * Fix CVE-2026-21996: divide-by-zero if section header data corruped.
+ * Fix CVE-2026-35233: OOB memory access. (Closes: #1135619)
+
+ -- Kris Van Hees <kvanhees@gmail.com> Tue, 12 May 2026 17:55:24 -0400
+
+dtrace (2.0.6-1) unstable; urgency=medium
+
+ * Fix CVE-2026-21991: dtprobed unsafe probe description handling.
+ * Limit building to supported architectures. (Closes: #1129637)
+ * Remove unnecessary dependency ob binutils-bpf. (Closes: #1131271)
+
+ -- Kris Van Hees <kvanhees@gmail.com> Tue, 17 Mar 2026 17:53:17 -0400
+
+dtrace (2.0.5-1) unstable; urgency=medium
+
+ * Initial release. (Closes: #1128435)
+
+ -- Kris Van Hees <kvanhees@gmail.com> Fri, 20 Feb 2026 00:31:21 -0500
diff --git a/dists/debian/control b/dists/debian/control
new file mode 100644
index 00000000..7560dc9a
--- /dev/null
+++ b/dists/debian/control
@@ -0,0 +1,74 @@
+Source: dtrace
+Section: utils
+Priority: optional
+Maintainer: Kris Van Hees <kvanhees@gmail.com>
+Build-Depends: debhelper-compat (= 13),
+ bison, flex, gawk, gcc-bpf (>= 14.2) , valgrind, binutils-dev (>= 2.44),
+ login.defs, libbpf-dev (>= 1.5), libc-dev (>= 2.34), libelf-dev, libfuse3-dev,
+ libpcap-dev, libpfm4-dev, libsystemd-dev, libz-dev
+Standards-Version: 4.7.4
+Homepage: https://github.com/oracle/dtrace/
+Rules-Requires-Root: no
+
+Package: dtrace
+Architecture: amd64 arm64
+Depends: ${misc:Depends}, ${shlibs:Depends}
+Description: Dynamic tracing for Linux (DTrace)
+ This is the official Linux port of the advanced tracing tool DTrace.
+ .
+ DTrace is a high-level dynamic tracing tool for Linux, built on kernel
+ tracing features (tracepoints, function probes (fentry/fexit), dynamic
+ kernel probes (kprobes), dynamic userspace probes (uprobes), ... and
+ leveraging BPF as execution engine. It features an integrated compiler
+ for its high-level tracing language and native support for interacting
+ with the BPF engine, significantly reducing runtime dependencies.
+
+Package: libdtrace2
+Architecture: amd64 arm64
+Depends: ${misc:Depends}, ${shlibs:Depends},
+ fuse3, libctf0, libelf1t64, libfuse3-4, libpcap0.8t64, libpfm4, libz1
+Description: Dynamic tracing for Linux (DTrace) (library)
+ This is the official Linux port of the advanced tracing tool DTrace.
+ .
+ DTrace is a high-level dynamic tracing tool for Linux, built on kernel
+ tracing features (tracepoints, function probes (fentry/fexit), dynamic
+ kernel probes (kprobes), dynamic userspace probes (uprobes), ... and
+ leveraging BPF as execution engine. It features an integrated compiler
+ for its high-level tracing language and native support for interacting
+ with the BPF engine, significantly reducing runtime dependencies.
+ .
+ This package contains the shared library.
+
+Package: libdtrace2-dev
+Architecture: amd64 arm64
+Depends: ${misc:Depends},
+ libdtrace2 (= ${binary:Version})
+Description: Dynamic tracing for Linux (DTrace) (development)
+ This is the official Linux port of the advanced tracing tool DTrace.
+ .
+ DTrace is a high-level dynamic tracing tool for Linux, built on kernel
+ tracing features (tracepoints, function probes (fentry/fexit), dynamic
+ kernel probes (kprobes), dynamic userspace probes (uprobes), ... and
+ leveraging BPF as execution engine. It features an integrated compiler
+ for its high-level tracing language and native support for interacting
+ with the BPF engine, significantly reducing runtime dependencies.
+ .
+ This package contains the development files necessary to develop
+ alternative implementations of the user interface for libdtrace, i.e.
+ replacements for dtrace(1) itself.
+
+Package: dtrace-tests
+Architecture: amd64 arm64
+Depends: ${misc:Depends}, ${shlibs:Depends}, ${perl:Depends},
+ binutils, cpp, gawk, gcc, make, pkgconf, tshark, bpftool
+Description: Dynamic tracing for Linux (DTrace) (testsuite)
+ This is the official Linux port of the advanced tracing tool DTrace.
+ .
+ DTrace is a high-level dynamic tracing tool for Linux, built on kernel
+ tracing features (tracepoints, function probes (fentry/fexit), dynamic
+ kernel probes (kprobes), dynamic userspace probes (uprobes), ... and
+ leveraging BPF as execution engine. It features an integrated compiler
+ for its high-level tracing language and native support for interacting
+ with the BPF engine, significantly reducing runtime dependencies.
+ .
+ This package contains the testsuite.
diff --git a/dists/debian/copyright b/dists/debian/copyright
new file mode 100644
index 00000000..5c5553b3
--- /dev/null
+++ b/dists/debian/copyright
@@ -0,0 +1,149 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: dtrace
+Upstream-Contact: Kris Van Hees <kris.van.hees@oracle.com>
+Source: https://github.com/oracle/dtrace/
+
+Files: *
+Copyright: Copyright (c) 2003, 2026, Oracle and/or its affiliates. All rights reserved.
+License: UPL-1.0
+
+Files: bpf/*
+Copyright: Copyright (c) 2019, 2026, Oracle and/or its affiliates.
+License: GPL-2
+
+Files: debian/*
+Copyright: Copyright (c) 2026, Oracle and/or its affiliates. All rights reserved.
+License: UPL-1.0
+
+Files: bpf/Build bpf/GNUmakefile
+Copyright: Copyright (c) 2003, 2026, Oracle and/or its affiliates. All rights reserved.
+License: UPL-1.0
+
+Files: include/linux/bpf.h
+Copyright: Copyright (c) 2011-2014 PLUMgrid
+License: GPL-2 with Linux-syscall-note exception
+
+Files: include/linux/btf.h
+Copyright: Copyright (c) 2018 Facebook
+License: GPL-2 with Linux-syscall-note exception
+
+Files: include/sys/auxv.h include/sys/bitmap.h
+Copyright: Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
+License: UPL-1.0
+
+Files: include/sys/glibc_internal_link.h
+Copyright: Copyright disclaimed (all content required for interoperability)
+License: LGPL-2.1+
+
+Files: libport/systemd_notify.c
+Copyright: Copyright disclaimed (all content required for interoperability)
+License: MIT-0
+
+Files: libproc/libproc.h libproc/Pcontrol.c
+Copyright: Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved.
+License: UPL-1.0
+
+License: UPL-1.0
+ The Universal Permissive License (UPL), Version 1.0
+ .
+ Subject to the condition set forth below, permission is hereby granted
+ to any person obtaining a copy of this software, associated
+ documentation and/or data (collectively the "Software"), free of charge
+ and under any and all copyright rights in the Software, and any and all
+ patent rights owned or freely licensable by each licensor hereunder
+ covering either (i) the unmodified Software as contributed to or
+ provided by such licensor, or (ii) the Larger Works (as defined below),
+ to deal in both
+ .
+ (a) the Software, and
+ (b) any piece of software and/or hardware listed in the lrgrwrks.txt
+ file if one is included with the Software (each a âLarger Workâ to which
+ the Software is contributed by such licensors),
+ .
+ without restriction, including without limitation the rights to copy,
+ create derivative works of, display, perform, and distribute the
+ Software and make, use, sell, offer for sale, import, export, have made,
+ and have sold the Software and the Larger Work(s), and to sublicense the
+ foregoing rights on either these or other terms.
+ .
+ This license is subject to the following condition:
+ The above copyright notice and either this complete permission notice or
+ at a minimum a reference to the UPL must be included in all copies or
+ substantial portions of the Software.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ Licensed under the Universal Permissive License v 1.0 as shown at
+ https://oss.oracle.com/licenses/upl.
+
+License: GPL-2
+ This program is free software; you can redistribute it
+ and/or modify it under the terms of the GNU General Public
+ License version 2 as published by the Free Software Foundation.
+ .
+ On Debian systems, the full text of the GNU General Public
+ License version 2 can be found in the file
+ `/usr/share/common-licenses/GPL-2'.
+
+License: GPL-2 with Linux-syscall-note exception
+ This program is free software; you can redistribute it
+ and/or modify it under the terms of the GNU General Public
+ License version 2 as published by the Free Software Foundation.
+ .
+ On Debian systems, the full text of the GNU General Public
+ License version 2 can be found in the file
+ `/usr/share/common-licenses/GPL-2'.
+ .
+ NOTE! This copyright does *not* cover user programs that use kernel
+ services by normal system calls - this is merely considered normal use
+ of the kernel, and does *not* fall under the heading of "derived work".
+ Also note that the GPL below is copyrighted by the Free Software
+ Foundation, but the instance of code that it refers to (the Linux
+ kernel) is copyrighted by me and others who actually wrote it.
+ .
+ Also note that the only valid version of the GPL as far as the kernel
+ is concerned is _this_ particular version of the license (ie v2, not
+ v2.2 or v3.x or whatever), unless explicitly otherwise stated.
+
+License: LGPL-2.1+
+ This file is part of the GNU C Library.
+ .
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+ .
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+ .
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>.
+
+License: MIT-0
+ MIT License
+ .
+ Permission is hereby granted, free of charge, to any person obtaining a
+ copy of this software and associated documentation files (the "Software"),
+ to deal in the Software without restriction, including without limitation
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ and/or sell copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following conditions:
+ .
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ DEALINGS IN THE SOFTWARE.
diff --git a/dists/debian/dtrace-tests.install b/dists/debian/dtrace-tests.install
new file mode 100644
index 00000000..a04ebfb9
--- /dev/null
+++ b/dists/debian/dtrace-tests.install
@@ -0,0 +1 @@
+usr//lib/${DEB_HOST_MULTIARCH}/dtrace/testsuite/
diff --git a/dists/debian/dtrace-tests.lintian-overrides b/dists/debian/dtrace-tests.lintian-overrides
new file mode 100644
index 00000000..22cbd6eb
--- /dev/null
+++ b/dists/debian/dtrace-tests.lintian-overrides
@@ -0,0 +1,8 @@
+dtrace-tests binary: unstripped-binary-or-object [*]
+dtrace-tests binary: unusual-interpreter dtrace [*.d]
+dtrace-tests binary: interpreter-not-absolute dtrace [*.d]
+dtrace-tests binary: executable-not-elf-or-script [*.d]
+dtrace-tests binary: relative-library-search-path RUNPATH test/triggers [*]
+dtrace-tests binary: statically-linked-binary [*]
+dtrace-tests binary: package-has-unnecessary-activation-of-ldconfig-trigger
+dtrace-tests binary: shared-library-lacks-prerequisites [*/dtrace/testsuite/test/triggers/libproc-dlmlib.so.0.0.0]
diff --git a/dists/debian/dtrace.docs b/dists/debian/dtrace.docs
new file mode 100644
index 00000000..7696583d
--- /dev/null
+++ b/dists/debian/dtrace.docs
@@ -0,0 +1 @@
+usr/share/doc/dtrace-${env:DEB_VERSION_UPSTREAM}/
diff --git a/dists/debian/dtrace.install b/dists/debian/dtrace.install
new file mode 100644
index 00000000..6be68ccb
--- /dev/null
+++ b/dists/debian/dtrace.install
@@ -0,0 +1 @@
+usr/sbin/dtrace
diff --git a/dists/debian/dtrace.lintian-overrides b/dists/debian/dtrace.lintian-overrides
new file mode 100644
index 00000000..11005f4a
--- /dev/null
+++ b/dists/debian/dtrace.lintian-overrides
@@ -0,0 +1 @@
+dtrace binary: unstripped-binary-or-object [*]
diff --git a/dists/debian/dtrace.manpages b/dists/debian/dtrace.manpages
new file mode 100644
index 00000000..e54b52b3
--- /dev/null
+++ b/dists/debian/dtrace.manpages
@@ -0,0 +1 @@
+usr/share/man/man8/dtrace.8
diff --git a/dists/debian/libdtrace2-dev.install b/dists/debian/libdtrace2-dev.install
new file mode 100644
index 00000000..b5e66db5
--- /dev/null
+++ b/dists/debian/libdtrace2-dev.install
@@ -0,0 +1,5 @@
+usr/lib/${DEB_HOST_MULTIARCH}/libdtrace.so
+usr/include/dtrace
+usr/include/dtrace.h
+usr/include/sys/dtrace.h
+usr/include/sys/dtrace_types.h
diff --git a/dists/debian/libdtrace2.install b/dists/debian/libdtrace2.install
new file mode 100644
index 00000000..36294de3
--- /dev/null
+++ b/dists/debian/libdtrace2.install
@@ -0,0 +1,12 @@
+usr/lib/${DEB_HOST_MULTIARCH}/dtrace/[0-9]*/
+usr/lib/${DEB_HOST_MULTIARCH}/dtrace/bpf_dlib.o
+usr/lib/${DEB_HOST_MULTIARCH}/dtrace/drti/
+usr/lib/${DEB_HOST_MULTIARCH}/dtrace/include/
+usr/lib/${DEB_HOST_MULTIARCH}/libdtrace.so.*
+usr/lib/${DEB_HOST_MULTIARCH}/pkgconfig/dtrace.pc
+usr/lib/${DEB_HOST_MULTIARCH}/pkgconfig/dtrace_sdt.pc
+usr/lib/systemd/system/dtprobed.service
+usr/lib/systemd/system/dtrace-usdt.target
+usr/lib/systemd/system-preset/50-dtprobed.preset
+usr/lib/udev/rules.d/60-dtprobed.rules
+usr/sbin/dtprobed
diff --git a/dists/debian/libdtrace2.lintian-overrides b/dists/debian/libdtrace2.lintian-overrides
new file mode 100644
index 00000000..34b4011d
--- /dev/null
+++ b/dists/debian/libdtrace2.lintian-overrides
@@ -0,0 +1,4 @@
+libdtrace2 binary: binary-from-other-architecture [*/dtrace/bpf_dlib.o]
+libdtrace2 binary: unstripped-binary-or-object [*]
+libdtrace2 binary: appstream-metadata-missing-modalias-provide usr/lib/udev/rules.d/60-dtprobed.rules
+libdtrace2 binary: systemd-service-file-refers-to-unusual-wantedby-target basic.target [usr/lib/systemd/system/dtprobed.service]
diff --git a/dists/debian/libdtrace2.manpages b/dists/debian/libdtrace2.manpages
new file mode 100644
index 00000000..fef53dc3
--- /dev/null
+++ b/dists/debian/libdtrace2.manpages
@@ -0,0 +1 @@
+usr/share/man/man8/dtprobed.8
diff --git a/dists/debian/mkChangelog b/dists/debian/mkChangelog
new file mode 100755
index 00000000..69958dca
--- /dev/null
+++ b/dists/debian/mkChangelog
@@ -0,0 +1,174 @@
+#!/usr/bin/awk -f
+
+#
+# This script can be used to convert the dtrace.spec into a Debian changelog
+# file. It is intended to be invoked from the 'prep-debian' make target, but
+# it can be used manually as well:
+# mkChangelog debian/control dtrace.spec > debian/changelog
+#
+
+function error(msg) {
+ print "E:"msg >"/dev/stderr";
+ err = 1;
+ exit(1);
+}
+
+BEGIN {
+ if (!dist)
+ dist = "UNRELEASED";
+ else if (dist != "unstable" && dist != "experimental")
+ error("Bad dist ("dist")");
+}
+
+/^Maintainer:/ {
+ sub(/^Maintainer: +/, "");
+ m_name = $0;
+ i = index(m_name, " <");
+ m_mail = substr(m_name, i + 1);
+ m_name = substr(m_name, 1, i - 1);
+
+ nextfile;
+}
+
+/^Name:/ {
+ pkg = $2;
+ next;
+}
+
+/^%changelog/ {
+ in_changelog = 1;
+ next;
+}
+
+!in_changelog {
+ next;
+}
+
+function lineWrap(p, s, line, len, l, n, m, i) {
+ n = length(p);
+ line = p;
+ len = n;
+
+ m = split(s, arr, / +/);
+ for (i = 1; i <= m; i++) {
+ l = length(arr[i]);
+ if (len + 1 + l >= 80) {
+ print line;
+ line = sprintf("%*s %s", n, "", arr[i]);
+ len = n + 1 + l;
+ } else {
+ line = line " " arr[i];
+ len += 1 + l;
+ }
+ }
+ delete arr;
+
+ print line;
+}
+
+function emitEntry(i, j, n) {
+ # Loop through the contributions, determining who each contribution
+ # should be credited to. If there are multiple contributors, we pick
+ # the first one who is not the commit author (if any).
+ # If all contributions are from the commit author, we do not emit an
+ # explicit credit line.
+ for (i = 1; i <= lc; i++) {
+ gsub(/ \[Orabug[:;] [1-9][0-9]*(, [1-9][0-9]*)*\]/, "", lv[i]);
+ sub(/[ \t]+$/, "", lv[i]);
+ gsub(/ +/, " ", lv[i]);
+
+ cont = name;
+ if (match(lv[i], /\([^)]+\)$/) > 0) {
+ auth = substr(lv[i], RSTART + 1, RLENGTH - 2);
+ lv[i] = substr(lv[i], 1, RSTART - 1);
+ sub(/[ \t]+$/, "", lv[i]);
+ n = split(auth, arr, /, */);
+
+ # Find the first contributor not the commit author.
+ for (j = 1; j <= n; j++) {
+ if (arr[j] == name)
+ continue;
+ cont = arr[j];
+ break;
+ }
+ delete arr;
+ }
+
+ # Add to the list of contributions for this contributor.
+ if (cont in map)
+ map[cont] = map[cont] " " i;
+ else
+ map[cont] = i;
+ }
+
+ print pkg" ("vers") "dist"; urgency=medium";
+
+ # First emit contributions by people other than the commit author.
+ n = 0;
+ for (cont in map) {
+ if (cont == name)
+ continue;
+
+ n++;
+ print "\n [ "cont" ]";
+ $0 = map[cont];
+ for (i = 1; i <= NF; i++)
+ lineWrap(" *", lv[int($i)]);
+ }
+ if (n > 0)
+ print "\n [ "name" ]";
+ else
+ print "";
+
+ $0 = map[name];
+ for (i = 1; i <= NF; i++)
+ lineWrap(" *", lv[int($i)]);
+
+ delete map;
+
+ if (m_name) {
+ name = m_name;
+ mail = m_mail;
+ m_name = m_mail = 0;
+ }
+ print "\n -- "name" "mail" "date" 00:00:00 +0000\n";
+}
+
+/^\* (Sun|Mon|Tue|Wed|Thu|Fri|Sat) [A-Z][a-z][a-z] [ 0-3][0-9] / {
+ date = $2", "$4" "$3" "$5;
+ i = index($0, " - ");
+ vers = substr($0, i + 3);
+ name = substr($0, 19, i - 19);
+ i = index(name, " <");
+ mail = substr(name, i + 1);
+ name = substr(name, 1, i - 1);
+ if (name == "")
+ error("No name in: "$0);
+
+ lc = 0;
+ delete lv;
+
+ next;
+}
+
+/^- / {
+ sub(/^- +/, "");
+ lv[++lc] = $0;
+ next;
+}
+
+NF == 0 {
+ emitEntry();
+ date = "";
+ next;
+}
+
+{
+ lv[lc] = lv[lc] $0;
+ next;
+}
+
+END {
+ if (date && !err)
+ emitEntry();
+}
diff --git a/dists/debian/patches/debian-configure.patch b/dists/debian/patches/debian-configure.patch
new file mode 100644
index 00000000..f8a6a698
--- /dev/null
+++ b/dists/debian/patches/debian-configure.patch
@@ -0,0 +1,17 @@
+Description: issue a warning for unknown configure options
+ The Debian build system specifies configure options that are not known to
+ the DTrace configure script. They should not cause the configure script
+ to abort.
+
+--- dtrace-2.0.5.orig/configure
++++ dtrace-2.0.5/configure
+@@ -188,8 +188,7 @@ for option in "$@"; do
+ echo "Unknown option $option" >&2
+ exit 1
+ fi;;
+- *) echo "Unknown option $option" >&2
+- exit 1;;
++ *) echo "Unknown option $option" >&2;;
+ esac
+ done
+
diff --git a/dists/debian/patches/debian-fix-sed-path.patch b/dists/debian/patches/debian-fix-sed-path.patch
new file mode 100644
index 00000000..9a4865a2
--- /dev/null
+++ b/dists/debian/patches/debian-fix-sed-path.patch
@@ -0,0 +1,12 @@
+Description: change /usr/bin/sed into /bin/sed
+ A new test was added in 2.0.7 that refers to /usr/bin/sed which should be
+ changed to /bin/sed. This patch will be applied to upstream as well.
+
+--- dtrace-2.0.5.orig/test/internals/libproc/err.bad_sh_link.r.p
++++ dtrace-2.0.5/test/internals/libproc/err.bad_sh_link.r.p
+@@ -1,4 +1,4 @@
+-#!/usr/bin/sed -Ef
++#!/bin/sed -Ef
+ # Fix up DEBUG lines
+ s/DEBUG [0-9]+:/DEBUG:/
+ s/, [0-9]+\]/, NNN]/
diff --git a/dists/debian/patches/series b/dists/debian/patches/series
new file mode 100644
index 00000000..99f0cdc5
--- /dev/null
+++ b/dists/debian/patches/series
@@ -0,0 +1,3 @@
+# You must remove unused comment lines for the released package.
+debian-configure.patch
+debian-fix-sed-path.patch
diff --git a/dists/debian/rules b/dists/debian/rules
new file mode 100755
index 00000000..8646ac1a
--- /dev/null
+++ b/dists/debian/rules
@@ -0,0 +1,24 @@
+#!/usr/bin/make -f
+# You must remove unused comment lines for the released package.
+export DH_VERBOSE = 1
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
+export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
+
+include /usr/share/dpkg/pkg-info.mk
+
+export DEB_VERSION_UPSTREAM
+
+%:
+ dh $@
+
+override_dh_auto_configure:
+ dh_auto_configure -- --pkg-config-dir=\$${LIBDIR}/pkgconfig BPFC=bpf-gcc BPFLD=bpf-ld
+
+override_dh_strip:
+ dh_strip -Xdtrace
+
+override_dh_auto_test:
+
+override_dh_auto_install:
+ dh_auto_install -- install-test
diff --git a/dists/debian/source/format b/dists/debian/source/format
new file mode 100644
index 00000000..163aaf8d
--- /dev/null
+++ b/dists/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
--
2.53.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [DTrace-devel] [PATCH 1/2] Add packaging configuration for Debian
2026-08-29 13:52 [PATCH 1/2] Add packaging configuration for Debian Kris Van Hees
@ 2026-08-29 17:39 ` Elena Zannoni
0 siblings, 0 replies; 2+ messages in thread
From: Elena Zannoni @ 2026-08-29 17:39 UTC (permalink / raw)
To: Kris Van Hees, dtrace, dtrace-devel
Reviewed-by: Elena Zannoni <elena.zannoni@oracle.com>
On 8/29/26 7:52 AM, Kris Van Hees via DTrace-devel wrote:
> Packaging configuration files for Debian are provided in dists/debian.
>
> Sample steps to build DEB packages:
>
> - make dist
> - cp dtrace-x.y.z.tar.bz2 $D/dtrace_x.y.z.orig.tar.bz2
> - cd $D
> - tar -jxpSf dtrace_x.y.z.orig.tar.bz2
> - cd dtrace-x.y.z
> - make prep-debian
> - debuild
>
> Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
> ---
> dists/Build | 14 ++
> dists/debian/changelog | 20 ++
> dists/debian/control | 74 ++++++++
> dists/debian/copyright | 149 +++++++++++++++
> dists/debian/dtrace-tests.install | 1 +
> dists/debian/dtrace-tests.lintian-overrides | 8 +
> dists/debian/dtrace.docs | 1 +
> dists/debian/dtrace.install | 1 +
> dists/debian/dtrace.lintian-overrides | 1 +
> dists/debian/dtrace.manpages | 1 +
> dists/debian/libdtrace2-dev.install | 5 +
> dists/debian/libdtrace2.install | 12 ++
> dists/debian/libdtrace2.lintian-overrides | 4 +
> dists/debian/libdtrace2.manpages | 1 +
> dists/debian/mkChangelog | 174 ++++++++++++++++++
> dists/debian/patches/debian-configure.patch | 17 ++
> .../debian/patches/debian-fix-sed-path.patch | 12 ++
> dists/debian/patches/series | 3 +
> dists/debian/rules | 24 +++
> dists/debian/source/format | 1 +
> 20 files changed, 523 insertions(+)
> create mode 100644 dists/Build
> create mode 100644 dists/debian/changelog
> create mode 100644 dists/debian/control
> create mode 100644 dists/debian/copyright
> create mode 100644 dists/debian/dtrace-tests.install
> create mode 100644 dists/debian/dtrace-tests.lintian-overrides
> create mode 100644 dists/debian/dtrace.docs
> create mode 100644 dists/debian/dtrace.install
> create mode 100644 dists/debian/dtrace.lintian-overrides
> create mode 100644 dists/debian/dtrace.manpages
> create mode 100644 dists/debian/libdtrace2-dev.install
> create mode 100644 dists/debian/libdtrace2.install
> create mode 100644 dists/debian/libdtrace2.lintian-overrides
> create mode 100644 dists/debian/libdtrace2.manpages
> create mode 100755 dists/debian/mkChangelog
> create mode 100644 dists/debian/patches/debian-configure.patch
> create mode 100644 dists/debian/patches/debian-fix-sed-path.patch
> create mode 100644 dists/debian/patches/series
> create mode 100755 dists/debian/rules
> create mode 100644 dists/debian/source/format
>
> diff --git a/dists/Build b/dists/Build
> new file mode 100644
> index 00000000..882939c3
> --- /dev/null
> +++ b/dists/Build
> @@ -0,0 +1,14 @@
> +#
> +# Oracle Linux DTrace.
> +# Copyright (c) 2026, Oracle and/or its affiliates. All rights reserved.
> +# Licensed under the Universal Permissive License v 1.0 as shown at
> +# http://oss.oracle.com/licenses/upl.
> +
> +dists_DIR := $(current-dir)
> +
> +# Prepare package building on Debian (copy ./dists/debian in ./debian.
> +
> +prep-debian::
> + $(call describe-target,DIST-PREP,Debian)
> + rm -rf debian
> + cp -rp $(dists_DIR)/debian .
> diff --git a/dists/debian/changelog b/dists/debian/changelog
> new file mode 100644
> index 00000000..b176f3cd
> --- /dev/null
> +++ b/dists/debian/changelog
> @@ -0,0 +1,20 @@
> +dtrace (2.0.7-1) unstable; urgency=medium
> +
> + * Fix CVE-2026-21996: divide-by-zero if section header data corruped.
> + * Fix CVE-2026-35233: OOB memory access. (Closes: #1135619)
> +
> + -- Kris Van Hees <kvanhees@gmail.com> Tue, 12 May 2026 17:55:24 -0400
> +
> +dtrace (2.0.6-1) unstable; urgency=medium
> +
> + * Fix CVE-2026-21991: dtprobed unsafe probe description handling.
> + * Limit building to supported architectures. (Closes: #1129637)
> + * Remove unnecessary dependency ob binutils-bpf. (Closes: #1131271)
> +
> + -- Kris Van Hees <kvanhees@gmail.com> Tue, 17 Mar 2026 17:53:17 -0400
> +
> +dtrace (2.0.5-1) unstable; urgency=medium
> +
> + * Initial release. (Closes: #1128435)
> +
> + -- Kris Van Hees <kvanhees@gmail.com> Fri, 20 Feb 2026 00:31:21 -0500
> diff --git a/dists/debian/control b/dists/debian/control
> new file mode 100644
> index 00000000..7560dc9a
> --- /dev/null
> +++ b/dists/debian/control
> @@ -0,0 +1,74 @@
> +Source: dtrace
> +Section: utils
> +Priority: optional
> +Maintainer: Kris Van Hees <kvanhees@gmail.com>
> +Build-Depends: debhelper-compat (= 13),
> + bison, flex, gawk, gcc-bpf (>= 14.2) , valgrind, binutils-dev (>= 2.44),
> + login.defs, libbpf-dev (>= 1.5), libc-dev (>= 2.34), libelf-dev, libfuse3-dev,
> + libpcap-dev, libpfm4-dev, libsystemd-dev, libz-dev
> +Standards-Version: 4.7.4
> +Homepage: https://github.com/oracle/dtrace/
> +Rules-Requires-Root: no
> +
> +Package: dtrace
> +Architecture: amd64 arm64
> +Depends: ${misc:Depends}, ${shlibs:Depends}
> +Description: Dynamic tracing for Linux (DTrace)
> + This is the official Linux port of the advanced tracing tool DTrace.
> + .
> + DTrace is a high-level dynamic tracing tool for Linux, built on kernel
> + tracing features (tracepoints, function probes (fentry/fexit), dynamic
> + kernel probes (kprobes), dynamic userspace probes (uprobes), ... and
> + leveraging BPF as execution engine. It features an integrated compiler
> + for its high-level tracing language and native support for interacting
> + with the BPF engine, significantly reducing runtime dependencies.
> +
> +Package: libdtrace2
> +Architecture: amd64 arm64
> +Depends: ${misc:Depends}, ${shlibs:Depends},
> + fuse3, libctf0, libelf1t64, libfuse3-4, libpcap0.8t64, libpfm4, libz1
> +Description: Dynamic tracing for Linux (DTrace) (library)
> + This is the official Linux port of the advanced tracing tool DTrace.
> + .
> + DTrace is a high-level dynamic tracing tool for Linux, built on kernel
> + tracing features (tracepoints, function probes (fentry/fexit), dynamic
> + kernel probes (kprobes), dynamic userspace probes (uprobes), ... and
> + leveraging BPF as execution engine. It features an integrated compiler
> + for its high-level tracing language and native support for interacting
> + with the BPF engine, significantly reducing runtime dependencies.
> + .
> + This package contains the shared library.
> +
> +Package: libdtrace2-dev
> +Architecture: amd64 arm64
> +Depends: ${misc:Depends},
> + libdtrace2 (= ${binary:Version})
> +Description: Dynamic tracing for Linux (DTrace) (development)
> + This is the official Linux port of the advanced tracing tool DTrace.
> + .
> + DTrace is a high-level dynamic tracing tool for Linux, built on kernel
> + tracing features (tracepoints, function probes (fentry/fexit), dynamic
> + kernel probes (kprobes), dynamic userspace probes (uprobes), ... and
> + leveraging BPF as execution engine. It features an integrated compiler
> + for its high-level tracing language and native support for interacting
> + with the BPF engine, significantly reducing runtime dependencies.
> + .
> + This package contains the development files necessary to develop
> + alternative implementations of the user interface for libdtrace, i.e.
> + replacements for dtrace(1) itself.
> +
> +Package: dtrace-tests
> +Architecture: amd64 arm64
> +Depends: ${misc:Depends}, ${shlibs:Depends}, ${perl:Depends},
> + binutils, cpp, gawk, gcc, make, pkgconf, tshark, bpftool
> +Description: Dynamic tracing for Linux (DTrace) (testsuite)
> + This is the official Linux port of the advanced tracing tool DTrace.
> + .
> + DTrace is a high-level dynamic tracing tool for Linux, built on kernel
> + tracing features (tracepoints, function probes (fentry/fexit), dynamic
> + kernel probes (kprobes), dynamic userspace probes (uprobes), ... and
> + leveraging BPF as execution engine. It features an integrated compiler
> + for its high-level tracing language and native support for interacting
> + with the BPF engine, significantly reducing runtime dependencies.
> + .
> + This package contains the testsuite.
> diff --git a/dists/debian/copyright b/dists/debian/copyright
> new file mode 100644
> index 00000000..5c5553b3
> --- /dev/null
> +++ b/dists/debian/copyright
> @@ -0,0 +1,149 @@
> +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
> +Upstream-Name: dtrace
> +Upstream-Contact: Kris Van Hees <kris.van.hees@oracle.com>
> +Source: https://github.com/oracle/dtrace/
> +
> +Files: *
> +Copyright: Copyright (c) 2003, 2026, Oracle and/or its affiliates. All rights reserved.
> +License: UPL-1.0
> +
> +Files: bpf/*
> +Copyright: Copyright (c) 2019, 2026, Oracle and/or its affiliates.
> +License: GPL-2
> +
> +Files: debian/*
> +Copyright: Copyright (c) 2026, Oracle and/or its affiliates. All rights reserved.
> +License: UPL-1.0
> +
> +Files: bpf/Build bpf/GNUmakefile
> +Copyright: Copyright (c) 2003, 2026, Oracle and/or its affiliates. All rights reserved.
> +License: UPL-1.0
> +
> +Files: include/linux/bpf.h
> +Copyright: Copyright (c) 2011-2014 PLUMgrid
> +License: GPL-2 with Linux-syscall-note exception
> +
> +Files: include/linux/btf.h
> +Copyright: Copyright (c) 2018 Facebook
> +License: GPL-2 with Linux-syscall-note exception
> +
> +Files: include/sys/auxv.h include/sys/bitmap.h
> +Copyright: Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
> +License: UPL-1.0
> +
> +Files: include/sys/glibc_internal_link.h
> +Copyright: Copyright disclaimed (all content required for interoperability)
> +License: LGPL-2.1+
> +
> +Files: libport/systemd_notify.c
> +Copyright: Copyright disclaimed (all content required for interoperability)
> +License: MIT-0
> +
> +Files: libproc/libproc.h libproc/Pcontrol.c
> +Copyright: Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved.
> +License: UPL-1.0
> +
> +License: UPL-1.0
> + The Universal Permissive License (UPL), Version 1.0
> + .
> + Subject to the condition set forth below, permission is hereby granted
> + to any person obtaining a copy of this software, associated
> + documentation and/or data (collectively the "Software"), free of charge
> + and under any and all copyright rights in the Software, and any and all
> + patent rights owned or freely licensable by each licensor hereunder
> + covering either (i) the unmodified Software as contributed to or
> + provided by such licensor, or (ii) the Larger Works (as defined below),
> + to deal in both
> + .
> + (a) the Software, and
> + (b) any piece of software and/or hardware listed in the lrgrwrks.txt
> + file if one is included with the Software (each a “Larger Work” to which
> + the Software is contributed by such licensors),
> + .
> + without restriction, including without limitation the rights to copy,
> + create derivative works of, display, perform, and distribute the
> + Software and make, use, sell, offer for sale, import, export, have made,
> + and have sold the Software and the Larger Work(s), and to sublicense the
> + foregoing rights on either these or other terms.
> + .
> + This license is subject to the following condition:
> + The above copyright notice and either this complete permission notice or
> + at a minimum a reference to the UPL must be included in all copies or
> + substantial portions of the Software.
> + .
> + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
> + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
> + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
> + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
> + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
> + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
> + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
> + Licensed under the Universal Permissive License v 1.0 as shown at
> + https://oss.oracle.com/licenses/upl.
> +
> +License: GPL-2
> + This program is free software; you can redistribute it
> + and/or modify it under the terms of the GNU General Public
> + License version 2 as published by the Free Software Foundation.
> + .
> + On Debian systems, the full text of the GNU General Public
> + License version 2 can be found in the file
> + `/usr/share/common-licenses/GPL-2'.
> +
> +License: GPL-2 with Linux-syscall-note exception
> + This program is free software; you can redistribute it
> + and/or modify it under the terms of the GNU General Public
> + License version 2 as published by the Free Software Foundation.
> + .
> + On Debian systems, the full text of the GNU General Public
> + License version 2 can be found in the file
> + `/usr/share/common-licenses/GPL-2'.
> + .
> + NOTE! This copyright does *not* cover user programs that use kernel
> + services by normal system calls - this is merely considered normal use
> + of the kernel, and does *not* fall under the heading of "derived work".
> + Also note that the GPL below is copyrighted by the Free Software
> + Foundation, but the instance of code that it refers to (the Linux
> + kernel) is copyrighted by me and others who actually wrote it.
> + .
> + Also note that the only valid version of the GPL as far as the kernel
> + is concerned is _this_ particular version of the license (ie v2, not
> + v2.2 or v3.x or whatever), unless explicitly otherwise stated.
> +
> +License: LGPL-2.1+
> + This file is part of the GNU C Library.
> + .
> + The GNU C Library is free software; you can redistribute it and/or
> + modify it under the terms of the GNU Lesser General Public
> + License as published by the Free Software Foundation; either
> + version 2.1 of the License, or (at your option) any later version.
> + .
> + The GNU C Library is distributed in the hope that it will be useful,
> + but WITHOUT ANY WARRANTY; without even the implied warranty of
> + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> + Lesser General Public License for more details.
> + .
> + You should have received a copy of the GNU Lesser General Public
> + License along with the GNU C Library; if not, see
> + <https://www.gnu.org/licenses/>.
> +
> +License: MIT-0
> + MIT License
> + .
> + Permission is hereby granted, free of charge, to any person obtaining a
> + copy of this software and associated documentation files (the "Software"),
> + to deal in the Software without restriction, including without limitation
> + the rights to use, copy, modify, merge, publish, distribute, sublicense,
> + and/or sell copies of the Software, and to permit persons to whom the
> + Software is furnished to do so, subject to the following conditions:
> + .
> + The above copyright notice and this permission notice shall be included in
> + all copies or substantial portions of the Software.
> + .
> + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
> + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
> + DEALINGS IN THE SOFTWARE.
> diff --git a/dists/debian/dtrace-tests.install b/dists/debian/dtrace-tests.install
> new file mode 100644
> index 00000000..a04ebfb9
> --- /dev/null
> +++ b/dists/debian/dtrace-tests.install
> @@ -0,0 +1 @@
> +usr//lib/${DEB_HOST_MULTIARCH}/dtrace/testsuite/
> diff --git a/dists/debian/dtrace-tests.lintian-overrides b/dists/debian/dtrace-tests.lintian-overrides
> new file mode 100644
> index 00000000..22cbd6eb
> --- /dev/null
> +++ b/dists/debian/dtrace-tests.lintian-overrides
> @@ -0,0 +1,8 @@
> +dtrace-tests binary: unstripped-binary-or-object [*]
> +dtrace-tests binary: unusual-interpreter dtrace [*.d]
> +dtrace-tests binary: interpreter-not-absolute dtrace [*.d]
> +dtrace-tests binary: executable-not-elf-or-script [*.d]
> +dtrace-tests binary: relative-library-search-path RUNPATH test/triggers [*]
> +dtrace-tests binary: statically-linked-binary [*]
> +dtrace-tests binary: package-has-unnecessary-activation-of-ldconfig-trigger
> +dtrace-tests binary: shared-library-lacks-prerequisites [*/dtrace/testsuite/test/triggers/libproc-dlmlib.so.0.0.0]
> diff --git a/dists/debian/dtrace.docs b/dists/debian/dtrace.docs
> new file mode 100644
> index 00000000..7696583d
> --- /dev/null
> +++ b/dists/debian/dtrace.docs
> @@ -0,0 +1 @@
> +usr/share/doc/dtrace-${env:DEB_VERSION_UPSTREAM}/
> diff --git a/dists/debian/dtrace.install b/dists/debian/dtrace.install
> new file mode 100644
> index 00000000..6be68ccb
> --- /dev/null
> +++ b/dists/debian/dtrace.install
> @@ -0,0 +1 @@
> +usr/sbin/dtrace
> diff --git a/dists/debian/dtrace.lintian-overrides b/dists/debian/dtrace.lintian-overrides
> new file mode 100644
> index 00000000..11005f4a
> --- /dev/null
> +++ b/dists/debian/dtrace.lintian-overrides
> @@ -0,0 +1 @@
> +dtrace binary: unstripped-binary-or-object [*]
> diff --git a/dists/debian/dtrace.manpages b/dists/debian/dtrace.manpages
> new file mode 100644
> index 00000000..e54b52b3
> --- /dev/null
> +++ b/dists/debian/dtrace.manpages
> @@ -0,0 +1 @@
> +usr/share/man/man8/dtrace.8
> diff --git a/dists/debian/libdtrace2-dev.install b/dists/debian/libdtrace2-dev.install
> new file mode 100644
> index 00000000..b5e66db5
> --- /dev/null
> +++ b/dists/debian/libdtrace2-dev.install
> @@ -0,0 +1,5 @@
> +usr/lib/${DEB_HOST_MULTIARCH}/libdtrace.so
> +usr/include/dtrace
> +usr/include/dtrace.h
> +usr/include/sys/dtrace.h
> +usr/include/sys/dtrace_types.h
> diff --git a/dists/debian/libdtrace2.install b/dists/debian/libdtrace2.install
> new file mode 100644
> index 00000000..36294de3
> --- /dev/null
> +++ b/dists/debian/libdtrace2.install
> @@ -0,0 +1,12 @@
> +usr/lib/${DEB_HOST_MULTIARCH}/dtrace/[0-9]*/
> +usr/lib/${DEB_HOST_MULTIARCH}/dtrace/bpf_dlib.o
> +usr/lib/${DEB_HOST_MULTIARCH}/dtrace/drti/
> +usr/lib/${DEB_HOST_MULTIARCH}/dtrace/include/
> +usr/lib/${DEB_HOST_MULTIARCH}/libdtrace.so.*
> +usr/lib/${DEB_HOST_MULTIARCH}/pkgconfig/dtrace.pc
> +usr/lib/${DEB_HOST_MULTIARCH}/pkgconfig/dtrace_sdt.pc
> +usr/lib/systemd/system/dtprobed.service
> +usr/lib/systemd/system/dtrace-usdt.target
> +usr/lib/systemd/system-preset/50-dtprobed.preset
> +usr/lib/udev/rules.d/60-dtprobed.rules
> +usr/sbin/dtprobed
> diff --git a/dists/debian/libdtrace2.lintian-overrides b/dists/debian/libdtrace2.lintian-overrides
> new file mode 100644
> index 00000000..34b4011d
> --- /dev/null
> +++ b/dists/debian/libdtrace2.lintian-overrides
> @@ -0,0 +1,4 @@
> +libdtrace2 binary: binary-from-other-architecture [*/dtrace/bpf_dlib.o]
> +libdtrace2 binary: unstripped-binary-or-object [*]
> +libdtrace2 binary: appstream-metadata-missing-modalias-provide usr/lib/udev/rules.d/60-dtprobed.rules
> +libdtrace2 binary: systemd-service-file-refers-to-unusual-wantedby-target basic.target [usr/lib/systemd/system/dtprobed.service]
> diff --git a/dists/debian/libdtrace2.manpages b/dists/debian/libdtrace2.manpages
> new file mode 100644
> index 00000000..fef53dc3
> --- /dev/null
> +++ b/dists/debian/libdtrace2.manpages
> @@ -0,0 +1 @@
> +usr/share/man/man8/dtprobed.8
> diff --git a/dists/debian/mkChangelog b/dists/debian/mkChangelog
> new file mode 100755
> index 00000000..69958dca
> --- /dev/null
> +++ b/dists/debian/mkChangelog
> @@ -0,0 +1,174 @@
> +#!/usr/bin/awk -f
> +
> +#
> +# This script can be used to convert the dtrace.spec into a Debian changelog
> +# file. It is intended to be invoked from the 'prep-debian' make target, but
> +# it can be used manually as well:
> +# mkChangelog debian/control dtrace.spec > debian/changelog
> +#
> +
> +function error(msg) {
> + print "E:"msg >"/dev/stderr";
> + err = 1;
> + exit(1);
> +}
> +
> +BEGIN {
> + if (!dist)
> + dist = "UNRELEASED";
> + else if (dist != "unstable" && dist != "experimental")
> + error("Bad dist ("dist")");
> +}
> +
> +/^Maintainer:/ {
> + sub(/^Maintainer: +/, "");
> + m_name = $0;
> + i = index(m_name, " <");
> + m_mail = substr(m_name, i + 1);
> + m_name = substr(m_name, 1, i - 1);
> +
> + nextfile;
> +}
> +
> +/^Name:/ {
> + pkg = $2;
> + next;
> +}
> +
> +/^%changelog/ {
> + in_changelog = 1;
> + next;
> +}
> +
> +!in_changelog {
> + next;
> +}
> +
> +function lineWrap(p, s, line, len, l, n, m, i) {
> + n = length(p);
> + line = p;
> + len = n;
> +
> + m = split(s, arr, / +/);
> + for (i = 1; i <= m; i++) {
> + l = length(arr[i]);
> + if (len + 1 + l >= 80) {
> + print line;
> + line = sprintf("%*s %s", n, "", arr[i]);
> + len = n + 1 + l;
> + } else {
> + line = line " " arr[i];
> + len += 1 + l;
> + }
> + }
> + delete arr;
> +
> + print line;
> +}
> +
> +function emitEntry(i, j, n) {
> + # Loop through the contributions, determining who each contribution
> + # should be credited to. If there are multiple contributors, we pick
> + # the first one who is not the commit author (if any).
> + # If all contributions are from the commit author, we do not emit an
> + # explicit credit line.
> + for (i = 1; i <= lc; i++) {
> + gsub(/ \[Orabug[:;] [1-9][0-9]*(, [1-9][0-9]*)*\]/, "", lv[i]);
> + sub(/[ \t]+$/, "", lv[i]);
> + gsub(/ +/, " ", lv[i]);
> +
> + cont = name;
> + if (match(lv[i], /\([^)]+\)$/) > 0) {
> + auth = substr(lv[i], RSTART + 1, RLENGTH - 2);
> + lv[i] = substr(lv[i], 1, RSTART - 1);
> + sub(/[ \t]+$/, "", lv[i]);
> + n = split(auth, arr, /, */);
> +
> + # Find the first contributor not the commit author.
> + for (j = 1; j <= n; j++) {
> + if (arr[j] == name)
> + continue;
> + cont = arr[j];
> + break;
> + }
> + delete arr;
> + }
> +
> + # Add to the list of contributions for this contributor.
> + if (cont in map)
> + map[cont] = map[cont] " " i;
> + else
> + map[cont] = i;
> + }
> +
> + print pkg" ("vers") "dist"; urgency=medium";
> +
> + # First emit contributions by people other than the commit author.
> + n = 0;
> + for (cont in map) {
> + if (cont == name)
> + continue;
> +
> + n++;
> + print "\n [ "cont" ]";
> + $0 = map[cont];
> + for (i = 1; i <= NF; i++)
> + lineWrap(" *", lv[int($i)]);
> + }
> + if (n > 0)
> + print "\n [ "name" ]";
> + else
> + print "";
> +
> + $0 = map[name];
> + for (i = 1; i <= NF; i++)
> + lineWrap(" *", lv[int($i)]);
> +
> + delete map;
> +
> + if (m_name) {
> + name = m_name;
> + mail = m_mail;
> + m_name = m_mail = 0;
> + }
> + print "\n -- "name" "mail" "date" 00:00:00 +0000\n";
> +}
> +
> +/^\* (Sun|Mon|Tue|Wed|Thu|Fri|Sat) [A-Z][a-z][a-z] [ 0-3][0-9] / {
> + date = $2", "$4" "$3" "$5;
> + i = index($0, " - ");
> + vers = substr($0, i + 3);
> + name = substr($0, 19, i - 19);
> + i = index(name, " <");
> + mail = substr(name, i + 1);
> + name = substr(name, 1, i - 1);
> + if (name == "")
> + error("No name in: "$0);
> +
> + lc = 0;
> + delete lv;
> +
> + next;
> +}
> +
> +/^- / {
> + sub(/^- +/, "");
> + lv[++lc] = $0;
> + next;
> +}
> +
> +NF == 0 {
> + emitEntry();
> + date = "";
> + next;
> +}
> +
> +{
> + lv[lc] = lv[lc] $0;
> + next;
> +}
> +
> +END {
> + if (date && !err)
> + emitEntry();
> +}
> diff --git a/dists/debian/patches/debian-configure.patch b/dists/debian/patches/debian-configure.patch
> new file mode 100644
> index 00000000..f8a6a698
> --- /dev/null
> +++ b/dists/debian/patches/debian-configure.patch
> @@ -0,0 +1,17 @@
> +Description: issue a warning for unknown configure options
> + The Debian build system specifies configure options that are not known to
> + the DTrace configure script. They should not cause the configure script
> + to abort.
> +
> +--- dtrace-2.0.5.orig/configure
> ++++ dtrace-2.0.5/configure
> +@@ -188,8 +188,7 @@ for option in "$@"; do
> + echo "Unknown option $option" >&2
> + exit 1
> + fi;;
> +- *) echo "Unknown option $option" >&2
> +- exit 1;;
> ++ *) echo "Unknown option $option" >&2;;
> + esac
> + done
> +
> diff --git a/dists/debian/patches/debian-fix-sed-path.patch b/dists/debian/patches/debian-fix-sed-path.patch
> new file mode 100644
> index 00000000..9a4865a2
> --- /dev/null
> +++ b/dists/debian/patches/debian-fix-sed-path.patch
> @@ -0,0 +1,12 @@
> +Description: change /usr/bin/sed into /bin/sed
> + A new test was added in 2.0.7 that refers to /usr/bin/sed which should be
> + changed to /bin/sed. This patch will be applied to upstream as well.
> +
> +--- dtrace-2.0.5.orig/test/internals/libproc/err.bad_sh_link.r.p
> ++++ dtrace-2.0.5/test/internals/libproc/err.bad_sh_link.r.p
> +@@ -1,4 +1,4 @@
> +-#!/usr/bin/sed -Ef
> ++#!/bin/sed -Ef
> + # Fix up DEBUG lines
> + s/DEBUG [0-9]+:/DEBUG:/
> + s/, [0-9]+\]/, NNN]/
> diff --git a/dists/debian/patches/series b/dists/debian/patches/series
> new file mode 100644
> index 00000000..99f0cdc5
> --- /dev/null
> +++ b/dists/debian/patches/series
> @@ -0,0 +1,3 @@
> +# You must remove unused comment lines for the released package.
> +debian-configure.patch
> +debian-fix-sed-path.patch
> diff --git a/dists/debian/rules b/dists/debian/rules
> new file mode 100755
> index 00000000..8646ac1a
> --- /dev/null
> +++ b/dists/debian/rules
> @@ -0,0 +1,24 @@
> +#!/usr/bin/make -f
> +# You must remove unused comment lines for the released package.
> +export DH_VERBOSE = 1
> +export DEB_BUILD_MAINT_OPTIONS = hardening=+all
> +export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
> +export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
> +
> +include /usr/share/dpkg/pkg-info.mk
> +
> +export DEB_VERSION_UPSTREAM
> +
> +%:
> + dh $@
> +
> +override_dh_auto_configure:
> + dh_auto_configure -- --pkg-config-dir=\$${LIBDIR}/pkgconfig BPFC=bpf-gcc BPFLD=bpf-ld
> +
> +override_dh_strip:
> + dh_strip -Xdtrace
> +
> +override_dh_auto_test:
> +
> +override_dh_auto_install:
> + dh_auto_install -- install-test
> diff --git a/dists/debian/source/format b/dists/debian/source/format
> new file mode 100644
> index 00000000..163aaf8d
> --- /dev/null
> +++ b/dists/debian/source/format
> @@ -0,0 +1 @@
> +3.0 (quilt)
> --
> 2.53.0
>
>
>
> _______________________________________________
> DTrace-devel mailing list
> DTrace-devel@oss.oracle.com
> https://oss.oracle.com/mailman/listinfo/dtrace-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-08-29 17:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-29 13:52 [PATCH 1/2] Add packaging configuration for Debian Kris Van Hees
2026-08-29 17:39 ` [DTrace-devel] " Elena Zannoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox