kernel plugin: /proc/version_signature is empty for kernels built from Ubuntu kernel source
Metadata
Current evaluation
⚠️ This summary may be outdated — the issue content or evaluation prompts have changed since this evaluation was made.
Kernel plugin leaves CONFIG_VERSION_SIGNATURE empty when building from Ubuntu kernel source with flavour config. Reporter has a patch ready.
Suggested action: needs triage
Reason: This is a new, unlabelled issue with no maintainer comments or assignee. The bug is clearly described with steps to reproduce and a proposed fix, but it has not yet been assessed by a maintainer per the triage guidelines.
Evaluated by: mr-cal-bot
Impact:
60
Quick Win:
34
Complexity:
30
Confidence:
85
Actionability:
80
Issue body
### Check existing issues
- [x] I've verified that this bug isn't described by any existing issues.
### Bug description
Kernel snaps built from an Ubuntu kernel source tree with the kernel plugin have an empty /proc/version_signature. The same kernel installed from the Ubuntu deb packages reports a value such as Ubuntu 6.8.0-1012.12-mtk 6.8.12.
In this build mode the plugin generates the config with debian/rules genconfigs and copies CONFIGS/<arch>-config.flavour.<flavour> to .config (gen_flavour_config in kernel_build.sh). Ubuntu's packaging doesn't set CONFIG_VERSION_SIGNATURE in genconfigs, though. It sets it later, in debian/rules.d/2-binary-arch.mk, with this command:
sed -i 's/.*CONFIG_VERSION_SIGNATURE.*/CONFIG_VERSION_SIGNATURE="Ubuntu $(release)-$(revision)-$* $(raw_kernelversion)"/' .config
The plugin never runs that step, so the annotations default ("") ends up in the kernel.
The kernel snaps built through kernel-ubuntu-binary-package and kernel-ubuntu-debian-package aren't affected. Only kernels built from source with an Ubuntu flavour config are.
Impact: tools that read /proc/version_signature to identify the Ubuntu kernel ABI can't identify these kernels. Livepatch and apport are examples. Each kernel snap recipe has to work around this itself. It can't set the value through kernel-kconfigs, because the value has to be computed from the source tree.
Proposed fix: set CONFIG_VERSION_SIGNATURE after generating the flavour config, deriving it the way debian/rules does. Release and revision come from the changelog that debian/debian.env points to, and the kernel version from make kernelversion. If the value can't be derived, the plugin warns and leaves the config unchanged. Values set through kernel-kconfigs still take precedence.
I have a patch ready against hotfix/9.2 and can open a PR.
### Steps to reproduce
1. Create a kernel snap whose part uses the kernel plugin on an Ubuntu kernel source tree, with kernel-ubuntu-kconfigflavour set (see the snapcraft.yaml below).
2. Run snapcraft pack.
3. Check the packed kernel config: grep VERSION_SIGNATURE config-* shows CONFIG_VERSION_SIGNATURE="".
4. Boot a device on this kernel and run cat /proc/version_signature. The output is empty.
Expected: CONFIG_VERSION_SIGNATURE="Ubuntu <release>-<revision>-<flavour> <kernelversion>", matching the linux-image-*-<flavour> deb built from the same source.
### Environment
- Snapcraft 9.2.0
- Base: core24
- Build environment: LXD, host Ubuntu 24.04
- Kernel source: linux-mtk noble, flavour mtk
### snapcraft.yaml
```yaml
name: <my-kernel>
version: <version>
summary: <summary>
description: <description>
type: kernel
base: core24
grade: devel
confinement: strict
platforms:
arm64:
parts:
kernel:
plugin: kernel
source: https://git.launchpad.net/~canonical-kernel/ubuntu/+source/linux-mtk/+git/noble
source-branch: main-next
kernel-ubuntu-kconfigflavour: mtk
```
### Log output
```shell
$ grep VERSION_SIGNATURE <prime>/config-*
CONFIG_VERSION_SIGNATURE=""
$ cat /proc/version_signature
```
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b |
Impact:
60
Quick Win:
34
Complexity:
30
Confidence:
85
Actionability:
80
|
needs triage | Kernel plugin leaves CONFIG_VERSION_SIGNATURE empty when building from Ubuntu kernel source with flavour config. Reporter has a patch ready. |
Update history
| Date | Change |
|---|---|
| updated | |
| updated | |
| created |
Related issues
No related issues found above the similarity threshold.