Skip to content

Commit

Permalink
Add packaging configuration for Debian
Browse files Browse the repository at this point in the history
Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
  • Loading branch information
kvanhees committed Mar 14, 2024
1 parent a1c1631 commit e3758bd
Show file tree
Hide file tree
Showing 12 changed files with 16,940 additions and 0 deletions.
1,054 changes: 1,054 additions & 0 deletions dists/debian/changelog

Large diffs are not rendered by default.

34 changes: 34 additions & 0 deletions dists/debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Source: dtrace
Section: utils
Priority: optional
Maintainer: Kris Van Hees <kris.van.hees@oracle.com>
Build-Depends: debhelper-compat (= 13)
Standards-Version: 4.5.1
Homepage: https://github.com/oracle/dtrace-utils/
Rules-Requires-Root: no

Package: dtrace
Architecture: any
Multi-Arch: foreign
Depends: ${misc:Depends}, ${shlibs:Depends}
Description: DTrace user interface and dtrace(8) command.
This is the official Linux port of the advanced tracing tool DTrace.

Package: dtrace-dev
Architecture: any
Multi-Arch: foreign
Depends: ${misc:Depends}, ${shlibs:Depends}
Description: DTrace development headers.
You do not need this package merely to compile providers and probe points
into applications that will be probed by dtrace, but rather when developing
replacements for dtrace(1) itself.

Package: dtrace-tests
Architecture: any
Multi-Arch: foreign
Depends: ${misc:Depends}, ${shlibs:Depends}
Description: DTrace testsuite.
Installed in /usr/lib64/dtrace/testsuite.
.
'make check' here is just like 'make check' in the source tree, except that
it always tests the installed DTrace.
15,679 changes: 15,679 additions & 0 deletions dists/debian/copyright

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions dists/debian/dtrace-dev.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
usr/lib64/libdtrace.so
usr/include/dtrace.h
usr/include/sys/dtrace.h
usr/include/sys/dtrace_types.h
1 change: 1 addition & 0 deletions dists/debian/dtrace-tests.install
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
usr/lib64/dtrace/testsuite/
1 change: 1 addition & 0 deletions dists/debian/dtrace-tests.lintian-overrides
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dtrace-tests: unusual-interpreter /usr/sbin/dtrace [*]
1 change: 1 addition & 0 deletions dists/debian/dtrace.docs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
usr/share/doc/dtrace-${env:DEB_VERSION_UPSTREAM}
11 changes: 11 additions & 0 deletions dists/debian/dtrace.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
usr/lib64/dtrace/[0-9]*
usr/lib64/dtrace/bpf_dlib.o
usr/lib64/dtrace/drti/
usr/lib64/libdtrace.so.*
usr/sbin/dtrace
usr/sbin/dtprobed
usr/include/sys/sdt.h
usr/include/sys/sdt_internal.h
usr/lib/systemd/system/dtprobed.service
usr/lib/systemd/system/dtrace-usdt.target
usr/lib/udev/rules.d/60-dtprobed.rules
1 change: 1 addition & 0 deletions dists/debian/dtrace.manpages
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
usr/share/man/man8/dtrace.8
129 changes: 129 additions & 0 deletions dists/debian/mkChangelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
#!/usr/bin/awk -f

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")");
}

/^Name:/ {
pkg = $2;
next;
}

/^%changelog/ {
in_changelog = 1;
next;
}

!in_changelog {
next;
}

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]);

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++)
print lv[int($i)];
}
if (n > 0)
print "\n [ "name" ]";
else
print "";

$0 = map[name];
for (i = 1; i <= NF; i++)
print lv[int($i)];

delete map;

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();
}
1 change: 1 addition & 0 deletions dists/debian/patches/series
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# You must remove unused comment lines for the released package.
24 changes: 24 additions & 0 deletions dists/debian/rules
Original file line number Diff line number Diff line change
@@ -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_build:
dh_auto_build -- BPFC=bpf-gcc BPFLD=bpf-ld EXTERNAL_64BIT_SDT_TRIGGERS=

override_dh_auto_test:

override_dh_auto_install:
dh_auto_install -- install-test EXTERNAL_64BIT_SDT_TRIGGERS=

override_dh_installdocs:
dh_installdocs

0 comments on commit e3758bd

Please sign in to comment.