jjb: Correct ubuntu kernel builds on Debian nodes
authorKienan Stewart <kstewart@efficios.com>
Fri, 4 Aug 2023 21:19:17 +0000 (17:19 -0400)
committerKienan Stewart <kstewart@efficios.com>
Mon, 7 Aug 2023 20:55:57 +0000 (16:55 -0400)
Change-Id: I9dd798548cc60611e2288cc3f56486a3ea04905a

scripts/lttng-modules/param-build.sh

index b5c8b8f8b598a855a1fd56d342c333d06808ed92..68320e2685c4b95c76bcfcbab1708c3bd2067fe2 100644 (file)
@@ -166,13 +166,21 @@ build_linux_kernel() {
         # Disable riscv64 config generation, we don't have a toolchain on bionic
         sed -i 's/riscv64 //' debian.master/etc/kernelconfig
 
+        fakeroot debian/rules clean KW_DEFCONFIG_DIR=.
+
         # Hack for kernel Ubuntu-hwe-5.8
-        if [ ! -f "debian/compat" ]; then
+        # The debian/control file is produced by the clean target above, so this
+        # check needs to happen afterwards.
+        if [ ! -f "debian/compat" ] && ! grep -q debhelper-compat debian/control; then
             echo "10" > "debian/compat"
         fi
 
-        fakeroot debian/rules clean KW_DEFCONFIG_DIR=.
-        fakeroot debian/rules genconfigs KW_DEFCONFIG_DIR=.
+        # genconfigs check can fail in certain cases, eg. when a more recent
+        # compiler exposes kernel configuration flags which aren't set in the
+        # Ubuntu annotations.
+        # In any case, the configuration will be updated with any missing values
+        # later in our build script.
+        fakeroot debian/rules genconfigs KW_DEFCONFIG_DIR=. do_skip_checks=true
         cp CONFIGS/"${ubuntu_config}" .config
         ;;
 
This page took 0.023887 seconds and 4 git commands to generate.