Repository navigation
DLPX-99519 don't Depend on linux-main-modules packages we don't build - #420
Conversation
Ubuntu-hwe-7.0-7.0.0-38.38~24.04.4 converts linux-hwe-7.0 to "linux main modules" (lmm, LP: #2165131), which makes linux-modules Depend on linux-main-modules-zfs and linux-main-modules-v4l2loopback. Those packages are built from separate Ubuntu source packages against Ubuntu's kernel ABI, so nothing in our package mirror satisfies them, and appliance-build can't install the generic kernel. We use neither module (we ship our own zfs). Strip every linux-main-modules-* entry from the Depends lines of the generated debian/control in kernel_build(), right after "debian/rules clean" writes it, and fail the build if any reference is left. Nothing after clean regenerates debian/control, so the edit carries through to the built packages. Doing this in linux-pkg covers all of our kernels as they switch to lmm, without carrying a patch in each kernel repo that linux-pkg's auto-update would have to re-apply onto every new Ubuntu tag. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Landing this without a fully passing ab-pre-push run; none of the runs got through import and tests, but each failure was in infra after appliance-build, and appliance-build itself passed for the esx variants that are failing in post-push. For reference, the ops ab-pre-push runs with this change (all rebuild linux-kernel-generic with this linux-pkg):
In #15289, the The ESX import failure isn't specific to this change; |
Problem
Since linux-kernel-generic's
developwas rebased ontoUbuntu-hwe-7.0-7.0.0-38.38~24.04.4(Oct 3), appliance-build can't install the generic kernel (esx and kvm variants); e.g.That Ubuntu release converts linux-hwe-7.0 to "linux-main-modules" (lmm, LP: #2165131), and with
do_lmm = true, the generateddebian/controlmakeslinux-modulesDepend onlinux-main-modules-zfs-*andlinux-main-modules-v4l2loopback-*. Those packages are built from separate Ubuntu source packages, against Ubuntu's kernel ABI, so nothing our kernel build produces (or that is in our package mirror) can satisfy them. We don't use either module (we ship our own zfs).Every linux-kernel-generic PR is blocked on this too, since the pre-push esx variant hits the same error.
Solution
The solution taken here, is to strip every
linux-main-modules-*entry from theDepends:lines ofdebian/controlinkernel_build(), right afterdebian/rules cleangenerates it, and fail the build if anylinux-main-modulesreference is left. Nothing aftercleanregeneratesdebian/control(onlycleanand the maintainer-onlyfinalcheckstarget depend on it;updateconfigsandbinarydon't), so the edit carries through to the built packages. This is a no-op for kernels that haven't switched to lmm yet (aws, azure, gcp, oracle).This replaces https://www.github.com/delphix/linux-kernel-generic/pull/61, which did the same filtering in the kernel's
debian/scripts/control-create. Doing it here, means all of our kernels are covered as they switch to lmm, without carrying (and cherry-picking) a patch in each kernel repo that linux-pkg's auto-update then has to re-apply onto every new Ubuntu tag.Building with
do_lmm=falseisn't an option, sincedkms-versionswas removed in the same Ubuntu release, andcontrol-createreads it whendo_lmmis false.Testing Done
In linux-kernel-generic
develop(665d2c2891c7), randebian/rules cleanwith the same argumentskernel_build()passes (flavours=generic, a Delphixabinum, etc.), then the newsedand check, against thedebian/controlthatcleanwrote:The check passes on the result, and fails when a
linux-main-modulesreference is left in the file.ab-pre-push, rebuilding linux-kernel-generic with this change, for aws and esx: https://selfservice-jenkins.eng-tools-prd.aws.delphixcloud.com/job/appliance-build-orchestrator-pre-push/15282/
The
sedand check ran in the real kernel build (build-package/linux-kernel-generic#147), and appliance-build #7618 passed for all variants, including the esx ones that couldn't install the kernel before. The run then failed importing into DCenter, before any tests ran; both import jobs died loadingpipeline-sharedwithNo space left on deviceon the Jenkins controller's/tmp(the controller is offline for low disk space, and every import job since 00:49 UTC has failed the same way). Rerun: https://selfservice-jenkins.eng-tools-prd.aws.delphixcloud.com/job/appliance-build-orchestrator-pre-push/15289/appliance-build #7623 passed again for all variants (incl. esx), and the AWS import passed, but the ESX import (
sync-ova-into-dcenter) failed withAttributeError: module 'pkgutil' has no attribute 'ImpImporter'(an old pip in a Python 3.12 venv on dcol1). That job has failed the same way on every run since at least 09-28, and the kvm import (ibm-snapshots) is failing too, so there's no way to get an esx/kvm run through import and tests right now.aws-only run (the default pre-push config), still rebuilding linux-kernel-generic with this change, to get through import and tests (in progress): https://selfservice-jenkins.eng-tools-prd.aws.delphixcloud.com/job/appliance-build-orchestrator-pre-push/15303/
🤖 Generated with Claude Code