Hi, Here is an updated debdiff with a fix for an additional bug, both are failure to build the dkms modules on recent kernels. I've also addressed the metadata problems on #864404 to properly report the fixed version in unstable.
Changes: lttng-modules (2.9.0-1+deb9u1) stable; urgency=medium * [ee40323] Fix build on linux-rt 4.9 kernels. (Closes: #864404) * [b20f74a] Fix build on >= 4.9.0-3 kernels (Closes: #889901) Cheers, Michael
diff -Nru lttng-modules-2.9.0/debian/changelog lttng-modules-2.9.0/debian/changelog --- lttng-modules-2.9.0/debian/changelog 2016-11-29 18:13:55.000000000 -0500 +++ lttng-modules-2.9.0/debian/changelog 2018-08-10 12:47:14.000000000 -0400 @@ -1,3 +1,11 @@ +lttng-modules (2.9.0-1+deb9u1) stable; urgency=medium + + * [c3d8eab] Stretch gbp branch config + * [ee40323] Fix build on linux-rt 4.9 kernels. (Closes: #864404) + * [b20f74a] Fix build on >= 4.9.0-3 kernels (Closes: #889901) + + -- Michael Jeanson <mjean...@debian.org> Fri, 10 Aug 2018 12:47:14 -0400 + lttng-modules (2.9.0-1) unstable; urgency=medium * [500ac85] New upstream version 2.9.0 diff -Nru lttng-modules-2.9.0/debian/gbp.conf lttng-modules-2.9.0/debian/gbp.conf --- lttng-modules-2.9.0/debian/gbp.conf 1969-12-31 19:00:00.000000000 -0500 +++ lttng-modules-2.9.0/debian/gbp.conf 2018-08-10 12:10:26.000000000 -0400 @@ -0,0 +1,3 @@ +[DEFAULT] +upstream-branch=upstream/2.9.0 +debian-branch=debian/stretch diff -Nru lttng-modules-2.9.0/debian/patches/fix-debian-kernel-version-parsing.patch lttng-modules-2.9.0/debian/patches/fix-debian-kernel-version-parsing.patch --- lttng-modules-2.9.0/debian/patches/fix-debian-kernel-version-parsing.patch 1969-12-31 19:00:00.000000000 -0500 +++ lttng-modules-2.9.0/debian/patches/fix-debian-kernel-version-parsing.patch 2018-08-10 12:38:51.000000000 -0400 @@ -0,0 +1,66 @@ +From 671137d5cda4a7415b34246bd8842650a7c6ddd9 Mon Sep 17 00:00:00 2001 +From: Michael Jeanson <mjean...@efficios.com> +Date: Tue, 9 Jan 2018 15:43:19 -0500 +Subject: [PATCH] Fix: debian kernel version parsing + +The debian version script only worked for ckt kernels and that was fine +until now because we only had checks for those versions in the code. + +ckt (Canonical Kernel Team) kernels were used for a while during the jessie +cycle, their versionning is a bit different. They track the upstream vanilla +stable updates but they don't update the minor version number and instead add +an additionnal -cktX. They were all 3.16.7-cktX and after a while the version +switched back to upstream style at 3.16.36. + +Knowing that, we can compare regular debian and ckt kernel versions +using this scheme : + + MAJOR.PATCHLEVEL.SUBLEVEL.CKT.DEBABI.DEBPATCH + +And setting CKT to zero for non-ckt kernels. + +Signed-off-by: Michael Jeanson <mjean...@efficios.com> +Signed-off-by: Mathieu Desnoyers <mathieu.desnoy...@efficios.com> +--- + abi-debian-version.sh | 18 ++++++++++-------- + 1 file changed, 10 insertions(+), 8 deletions(-) + +diff --git a/abi-debian-version.sh b/abi-debian-version.sh +index 310d6a8..36da212 100755 +--- a/abi-debian-version.sh ++++ b/abi-debian-version.sh +@@ -12,24 +12,26 @@ fi + + # Assuming KPATH is the target kernel headers directory + DEB_PACKAGE_VERSION=$(sed -rn 's/^#define LINUX_PACKAGE_ID " Debian (.*)"/\1/p' ${KPATH}/include/generated/package.h) ++ + # Ignore backports part + DEB_PACKAGE_VERSION=$(echo ${DEB_PACKAGE_VERSION} | sed -r 's/~(bpo|deb).*//') ++ ++# ckt (Canonical Kernel Team) kernels were used for a while during the jessie ++# cycle, their versionning is a bit different. They track the upstream vanilla ++# stable updates but they don't update the minor version number and instead add ++# an additionnal -cktX. They were all 3.16.7-cktX and after a while the version ++# switched back to upstream style at 3.16.36. ++ + # Get -ckt update number, if present + KERNEL_CKT_UPDATE=$(echo ${DEB_PACKAGE_VERSION} | sed -rn 's/^[0-9]+\.[0-9]+\.[0-9]+-ckt([0-9]+).*/\1/p') +- +-# Only care about the rest if it is a -ckt kernel, making sure we do not +-# clash with older Debian kernels (e.g. Debian 3.2.65-1+deb7u2). +-if [ -z "${KERNEL_CKT_UPDATE}" ]; then +- echo 0 +- exit 0 +-fi ++test -n "${KERNEL_CKT_UPDATE}" || KERNEL_CKT_UPDATE=0 + + # Get package revision + DEB_PACKAGE_REVISION=$(echo ${DEB_PACKAGE_VERSION} | sed -r 's/.*-([^-]+)$/\1/') + # Get non-sec update number + DEB_PACKAGE_REVISION_BASE=$(echo ${DEB_PACKAGE_REVISION} | sed -r 's/^([0-9]+).*/\1/') + # Get security update number, if present +-DEB_PACKAGE_REVISION_SECURITY=$(echo ${DEB_PACKAGE_REVISION} | sed -rn 's/.*\+(squeeze|deb[0-9])+u([0-9]+)$/\1/p') ++DEB_PACKAGE_REVISION_SECURITY=$(echo ${DEB_PACKAGE_REVISION} | sed -rn 's/.*\+(squeeze|deb[0-9]+)+u([0-9]+)$/\2/p') + test -n "${DEB_PACKAGE_REVISION_SECURITY}" || DEB_PACKAGE_REVISION_SECURITY=0 + # Combine all update numbers into one + DEB_API_VERSION=$((KERNEL_CKT_UPDATE * 10000 + DEB_PACKAGE_REVISION_BASE * 100 + DEB_PACKAGE_REVISION_SECURITY)) diff -Nru lttng-modules-2.9.0/debian/patches/fix-linux-rt-4.9-sched.patch lttng-modules-2.9.0/debian/patches/fix-linux-rt-4.9-sched.patch --- lttng-modules-2.9.0/debian/patches/fix-linux-rt-4.9-sched.patch 1969-12-31 19:00:00.000000000 -0500 +++ lttng-modules-2.9.0/debian/patches/fix-linux-rt-4.9-sched.patch 2018-08-10 12:10:26.000000000 -0400 @@ -0,0 +1,31 @@ +Fix build of sched instrumentation on linux-rt >= 4.9.27-rt8 +--- a/instrumentation/events/lttng-module/sched.h ++++ b/instrumentation/events/lttng-module/sched.h +@@ -540,7 +540,26 @@ + ) + #endif + +-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0) || \ ++ (LTTNG_KERNEL_RANGE(4,9,27, 4,10,0) && defined(CONFIG_PREEMPT_RT_FULL))) ++/* ++ * Tracepoint for showing priority inheritance modifying a tasks ++ * priority. ++ */ ++LTTNG_TRACEPOINT_EVENT(sched_pi_setprio, ++ ++ TP_PROTO(struct task_struct *tsk, struct task_struct *pi_task), ++ ++ TP_ARGS(tsk, pi_task), ++ ++ TP_FIELDS( ++ ctf_array_text(char, comm, tsk->comm, TASK_COMM_LEN) ++ ctf_integer(pid_t, tid, tsk->pid) ++ ctf_integer(int, oldprio, tsk->prio - MAX_RT_PRIO) ++ ctf_integer(int, newprio, pi_task ? pi_task->prio - MAX_RT_PRIO : tsk->prio - MAX_RT_PRIO) ++ ) ++) ++#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) + /* + * Tracepoint for showing priority inheritance modifying a tasks + * priority. diff -Nru lttng-modules-2.9.0/debian/patches/series lttng-modules-2.9.0/debian/patches/series --- lttng-modules-2.9.0/debian/patches/series 1969-12-31 19:00:00.000000000 -0500 +++ lttng-modules-2.9.0/debian/patches/series 2018-08-10 12:39:33.000000000 -0400 @@ -0,0 +1,4 @@ +fix-linux-rt-4.9-sched.patch +update-kvm-instrumentation-for-4.15.patch +update-kvm-instrumentation-for-debian-kernel-4.9.65-3.patch +fix-debian-kernel-version-parsing.patch diff -Nru lttng-modules-2.9.0/debian/patches/update-kvm-instrumentation-for-4.15.patch lttng-modules-2.9.0/debian/patches/update-kvm-instrumentation-for-4.15.patch --- lttng-modules-2.9.0/debian/patches/update-kvm-instrumentation-for-4.15.patch 1969-12-31 19:00:00.000000000 -0500 +++ lttng-modules-2.9.0/debian/patches/update-kvm-instrumentation-for-4.15.patch 2018-08-10 12:30:55.000000000 -0400 @@ -0,0 +1,44 @@ +From 7c0f0b93429a7c08908f61790e1abb13fe8a4052 Mon Sep 17 00:00:00 2001 +From: Mathieu Desnoyers <mathieu.desnoy...@efficios.com> +Date: Tue, 26 Dec 2017 09:47:22 -0500 +Subject: [PATCH] Update kvm instrumentation for 4.15 + +Signed-off-by: Mathieu Desnoyers <mathieu.desnoy...@efficios.com> +--- + instrumentation/events/lttng-module/kvm.h | 18 ++++++++++++++++++ + 1 file changed, 18 insertions(+) + +--- a/instrumentation/events/lttng-module/kvm.h ++++ b/instrumentation/events/lttng-module/kvm.h +@@ -84,6 +84,22 @@ + { KVM_TRACE_MMIO_READ, "read" }, \ + { KVM_TRACE_MMIO_WRITE, "write" } + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0)) ++ ++LTTNG_TRACEPOINT_EVENT(kvm_mmio, ++ TP_PROTO(int type, int len, u64 gpa, void *val), ++ TP_ARGS(type, len, gpa, val), ++ ++ TP_FIELDS( ++ ctf_integer(u32, type, type) ++ ctf_integer(u32, len, len) ++ ctf_integer(u64, gpa, gpa) ++ ctf_sequence_hex(unsigned char, val, val, u32, len) ++ ) ++) ++ ++#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0)) */ ++ + LTTNG_TRACEPOINT_EVENT(kvm_mmio, + TP_PROTO(int type, int len, u64 gpa, u64 val), + TP_ARGS(type, len, gpa, val), +@@ -96,6 +112,8 @@ + ) + ) + ++#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0)) */ ++ + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) + + #define kvm_fpu_load_symbol \ diff -Nru lttng-modules-2.9.0/debian/patches/update-kvm-instrumentation-for-debian-kernel-4.9.65-3.patch lttng-modules-2.9.0/debian/patches/update-kvm-instrumentation-for-debian-kernel-4.9.65-3.patch --- lttng-modules-2.9.0/debian/patches/update-kvm-instrumentation-for-debian-kernel-4.9.65-3.patch 1969-12-31 19:00:00.000000000 -0500 +++ lttng-modules-2.9.0/debian/patches/update-kvm-instrumentation-for-debian-kernel-4.9.65-3.patch 2018-08-10 12:33:53.000000000 -0400 @@ -0,0 +1,23 @@ +From 42150a01aaf5697974754ff89d69d91dc75c326b Mon Sep 17 00:00:00 2001 +From: Michael Jeanson <mjean...@efficios.com> +Date: Tue, 9 Jan 2018 15:43:20 -0500 +Subject: [PATCH] Update kvm instrumentation for debian kernel 4.9.65-3 + +Signed-off-by: Michael Jeanson <mjean...@efficios.com> +Signed-off-by: Mathieu Desnoyers <mathieu.desnoy...@efficios.com> +--- + instrumentation/events/lttng-module/kvm.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/instrumentation/events/lttng-module/kvm.h ++++ b/instrumentation/events/lttng-module/kvm.h +@@ -84,7 +84,8 @@ + { KVM_TRACE_MMIO_READ, "read" }, \ + { KVM_TRACE_MMIO_WRITE, "write" } + +-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0)) ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0) \ ++ || LTTNG_DEBIAN_KERNEL_RANGE(4,9,65,0,3,0, 4,10,0,0,0,0)) + + LTTNG_TRACEPOINT_EVENT(kvm_mmio, + TP_PROTO(int type, int len, u64 gpa, void *val),