diff -Nru lttng-modules-2.13.1/debian/changelog lttng-modules-2.13.1/debian/changelog --- lttng-modules-2.13.1/debian/changelog 2022-01-05 20:08:28.000000000 +0100 +++ lttng-modules-2.13.1/debian/changelog 2022-08-18 10:13:02.000000000 +0200 @@ -1,3 +1,10 @@ +lttng-modules (2.13.1-1ubuntu0.22.04.1) jammy; urgency=medium + + * [ed1149ef] Backport upstream fix to handle removal of random.h + (LP: #1986921) + + -- Stefan Bader Thu, 18 Aug 2022 10:13:02 +0200 + lttng-modules (2.13.1-1) unstable; urgency=medium * [a4701a4] New upstream version 2.13.1 diff -Nru lttng-modules-2.13.1/debian/control lttng-modules-2.13.1/debian/control --- lttng-modules-2.13.1/debian/control 2022-01-05 19:24:17.000000000 +0100 +++ lttng-modules-2.13.1/debian/control 2022-08-18 10:13:02.000000000 +0200 @@ -1,7 +1,8 @@ Source: lttng-modules Section: kernel Priority: optional -Maintainer: Jon Bernard +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Jon Bernard Uploaders: Michael Jeanson Build-Depends: debhelper-compat (= 12), dkms (>= 2.1.0.0) Standards-Version: 4.6.0.1 diff -Nru lttng-modules-2.13.1/debian/lttng-modules-dkms.dkms lttng-modules-2.13.1/debian/lttng-modules-dkms.dkms --- lttng-modules-2.13.1/debian/lttng-modules-dkms.dkms 2022-01-05 19:24:17.000000000 +0100 +++ lttng-modules-2.13.1/debian/lttng-modules-dkms.dkms 2022-08-18 10:13:02.000000000 +0200 @@ -201,10 +201,12 @@ DEST_MODULE_LOCATION[$i]="/extra/probes" i=$((i+1)) -BUILT_MODULE_NAME[$i]="lttng-probe-random" -BUILT_MODULE_LOCATION[$i]="src/probes/" -DEST_MODULE_LOCATION[$i]="/extra/probes" -i=$((i+1)) +if [ -f "$kernel_source_dir/include/trace/events/random.h" ]; then + BUILT_MODULE_NAME[$i]="lttng-probe-random" + BUILT_MODULE_LOCATION[$i]="src/probes/" + DEST_MODULE_LOCATION[$i]="/extra/probes" + i=$((i+1)) +fi BUILT_MODULE_NAME[$i]="lttng-probe-rcu" BUILT_MODULE_LOCATION[$i]="src/probes/" diff -Nru lttng-modules-2.13.1/debian/patches/fix-v5.15.44-random-removal.patch lttng-modules-2.13.1/debian/patches/fix-v5.15.44-random-removal.patch --- lttng-modules-2.13.1/debian/patches/fix-v5.15.44-random-removal.patch 1970-01-01 01:00:00.000000000 +0100 +++ lttng-modules-2.13.1/debian/patches/fix-v5.15.44-random-removal.patch 2022-08-18 10:13:02.000000000 +0200 @@ -0,0 +1,33 @@ +Description: Backport upstream fix for removal of random.h + In v5.18 (backported with v5.15.44) upstream again removed tracepoints in random. + This causes lttng-modules-dkms build failures. Backport upstream change + ed1149ef "fix: 'random' tracepoints removed in stable kernels" + to resolve the issue. +Author: Michael Jeanson +Origin: upstream, https://github.com/lttng/lttng-modules.git/commith=ed1149ef +Bug: https://bugs.launchpad.net/1986921 +Last-Update: 2022-08-18 + +Index: lttng-modules-2.13.1/src/probes/Kbuild +=================================================================== +--- lttng-modules-2.13.1.orig/src/probes/Kbuild ++++ lttng-modules-2.13.1/src/probes/Kbuild +@@ -187,13 +187,11 @@ ifneq ($(CONFIG_FRAME_WARN),0) + CFLAGS_lttng-probe-printk.o += -Wframe-larger-than=2200 + endif + +-obj-$(CONFIG_LTTNG) += $(shell \ +- if [ $(VERSION) -ge 4 \ +- -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 6 \) \ +- -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -eq 5 -a $(SUBLEVEL) -ge 2 \) \ +- -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -eq 4 -a $(SUBLEVEL) -ge 9 \) \ +- -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -eq 0 -a $(SUBLEVEL) -ge 41 \) ] ; then \ +- echo "lttng-probe-random.o" ; fi;) ++# Introduced in v3.6, remove in v5.18 (instead of version checks look for header file) ++random_dep = $(srctree)/include/trace/events/random.h ++ifneq ($(wildcard $(random_dep)),) ++ obj-$(CONFIG_LTTNG) += lttng-probe-random.o ++endif + + obj-$(CONFIG_LTTNG) += $(shell \ + if [ $(VERSION) -ge 4 \ diff -Nru lttng-modules-2.13.1/debian/patches/series lttng-modules-2.13.1/debian/patches/series --- lttng-modules-2.13.1/debian/patches/series 2022-01-05 19:24:17.000000000 +0100 +++ lttng-modules-2.13.1/debian/patches/series 2022-08-18 09:48:01.000000000 +0200 @@ -1 +1,2 @@ fix-linux-rt-4.9-sched.patch +fix-v5.15.44-random-removal.patch