← Back to issue list

kernel plugin: learn how to assemble the ubuntu config using kconfigflavour

View original Github issue

Metadata

Project
snapcraft
Number
#1285
Type
pull request
State
merged
Author
piso77
Labels
Created
Updated
Closed

Current evaluation

Merged. Replaces shell script wrappers in the snapcraft kernel plugin with direct extraction of Ubuntu kernel configs from debian config files using the kconfigflavour parameter. Approved by reviewers and merged after passing CI.

Suggested action:

No scores available.

Issue body

Instead of using shell scripts wrapper, simply teach snapcraft how to extract the entire ubuntu config from debian.$branch/config/ and debian.$branch/config/$arch/config*$flavour files. To test this, checkout an ubuntu kernel tree: $ git clone git://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/xenial $ cd xenial And use a snapcraft.yaml like this: $ rm snapcraft.yaml $ cat >> snapcraft.yaml << EOF name: ubuntu-generic-kernel version: 4.4.0 summary: The generic kernel for snappy description: This is a generic snapped kernel, based off the xenial src and config type: kernel parts: kernel: plugin: kernel source: . source-type: git kconfigflavour: generic kconfigs: - CONFIG_LOCALVERSION="-xenial_generic" - CONFIG_DEBUG_INFO=n kernel-image-target: bzImage EOF and snap it: $ snapcraft And you will get a kernel snap with the same config as the Xenial ubuntu kernel. The key here is the line: ... kconfigflavour: generic ... that instructs the kernel plugin to generate the kernel config starting from: debian.$branch/config/config.common.ports debian.$branch/config/config.common.ubuntu and debian.$branch/config/$arch/config.common.$arch debian.$branch/config/$arch/config.flavour.$flavour where: $branch is extracted from 'debian/debian.env' $arch is deb_arch $flavour is the string in 'kconfigflavour' Signed-off-by: Paolo Pisati paolo.pisati@canonical.com LP: #1675454

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged. Replaces shell script wrappers in the snapcraft kernel plugin with direct extraction of Ubuntu kernel configs from debian config files using the kconfigflavour parameter. Approved by reviewers and merged after passing CI.
qwen3.6-35b-a3b-mtp-q6 Merged. Replaces shell script wrappers in snapcraft's kernel plugin with direct extraction of Ubuntu configs from debian files using the kconfigflavour parameter. Approved by @come-maiz and merged by @sergiusens.
qwen3.6-35b-a3b-mtp-q6 Merged. Updated snapcraft's kernel plugin to assemble Ubuntu kernel configs from debian config files using the kconfigflavour parameter, replacing shell script wrappers. Approved after minor feedback and codecov checks, then merged by sergiusens.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1219 kernel plugin: learn how to assemble the ubuntu config using kconfigflavour snapcraft closed Closed without merging due to unresolved review feedback. The pull request proposed refactoring the kernel plugin to extract Ubuntu configuration from debian config directories instead of shell scripts, but requested changes were never addressed.
85%
#1675454 Teach snapcraft's kernel plugins how to extract the Ubuntu config from the debian dirs snapcraft (launchpad) closed Closed without resolution or comments. The proposal to streamline snapcraft kernel plugin config extraction from debian directories was abandoned.
74%
#2207 kernel plugin: install .config as config-$kernelversion snapcraft merged Kernel plugin now installs the build .config as config-$kernelversion in the snap root, matching Ubuntu classic behavior. Resolves Launchpad bug LP1786190. Merged following reviewer approval and successful CI checks.
74%
#4210 kernel plugin: properly generate Ubuntu kernel .config snapcraft merged Merged. Fixes Ubuntu kernel .config generation for Jammy+ by switching to debian/rules genconfigs instead of manual assembly. Resolved CLA email mismatch and approved by the kernel team before merge.
72%
#1115 kernel plugin: fix kernel snap layout snapcraft merged Merged fix correcting the kernel plugin snap layout for firmware and modules directories, updating required package lists, and addressing review feedback. Approved, passed CI, and merged after CLA verification.
72%
#4117 kernel plugin: call deb rules clean snapcraft merged Merged: kubiko's contribution adds a debian/rules clean call during kernel builds to automate SYSTEM_TRUSTED_KEYS and SYSTEM_REVOCATION_KEYS handling for Ubuntu kconfigflavour. Approved, rebased to main, and merged.
71%