← 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 in #1285 as bc553a1c6, adding kconfigflavour support to assemble Ubuntu kernel configs from Debian config files without wrapper scripts.

Resolution: closed resolved

Reason: PR #1285 was merged as commit bc553a1c6, implementing kconfigflavour-based Ubuntu kernel config assembly and resolving LP #1675454.

Evaluated by: mr-cal-bot

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
stealth/space-bunny-alpha — closed resolved Merged in #1285 as bc553a1c6, adding kconfigflavour support to assemble Ubuntu kernel configs from Debian config files without wrapper scripts.
stealth/space-bunny-alpha — closed resolved Merged in snapcore/snapcraft#1285 (commit bc553a1c6), adding kconfigflavour support to assemble Ubuntu kernel configs directly from debian config files.
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.

Update history

No update history recorded yet.

Related work

  • Related To: snapcraft (launchpad)#1675454 (confidence 100%)

    Launchpad bug tracking support for extracting Ubuntu kernel configs from Debian directories.

  • Duplicate Of: snapcraft#1219 (confidence 99%)

    Earlier closed attempt whose author restarted and completed the same work in #1285.

Related issues

Issue Project State Summary Similarity
#1219 kernel plugin: learn how to assemble the ubuntu config using kconfigflavour snapcraft closed PR closed unmerged after changes were requested (3 open review comments). The same kconfigflavour-based Ubuntu config assembly landed later via snapcraft#1285 (commit bc553a1c6), closing LP #1675454.
87%
#4210 kernel plugin: properly generate Ubuntu kernel .config snapcraft merged Merged #4210 as da9006784, replacing manual config assembly with debian/rules genconfigs for Jammy+ annotation-based Ubuntu kernels.
74%
#1675454 Teach snapcraft's kernel plugins how to extract the Ubuntu config from the debian dirs snapcraft (launchpad) closed Kernel plugins learned to assemble Ubuntu configs with kconfigflavour via snapcore/snapcraft#1285 (commit bc553a1c6).
74%
#4117 kernel plugin: call deb rules clean snapcraft merged Merged as commit e080e5a70: kernel plugin's kconfigflavour build now runs `fakeroot debian/rules clean` so SYSTEM_TRUSTED_KEYS/REVOCATION_KEYS are set by deb rules, removing the need to mod configs. Follow-up #4210 reworked Ubuntu config generation.
71%