feat(yocto): layer pins from kas, repo manifests and submodules, and a finding when the Yocto release is end of life #559

Merged
sharang merged 1 commits from feat/yocto-layer-pins-release into main 2026-10-09 18:40:01 +00:00
Owner

Yocto tier 1: the layer pins of a layer tree and the support status of the Yocto release they make up. Nothing is fetched, nothing is built.

Layer pins

  • kas (kas*.yml, kas/*.yml): repos: with url, branch/tag/refspec, commit; defaults.repos.branch; local header.includes are merged the way kas merges them (the including file wins), cycles end, remote includes (repo:/file:, URLs) and missing ones are named under "Nicht gelesene Includes" and never fetched; a lock file beside it (overrides.repos) pins commits. Parsed with yaml-rust2 (already in the lock through firmwerk-core); alias expansion is capped at 100k nodes before loading.
  • repo manifests: <remote>/<default> inheritance, a commit revision takes its branch from upstream/dest-branch, local <include>, <extend-project>, <remove-project>. roxmltree, so a DTD is refused.
  • .gitmodules + gitlink commit from HEAD (git2) when the tree is a checkout; a submodule's own kas files/manifests are not read as the tree's.
  • Stored on the target as layer_pins (pins, release, unread includes): the pins describe the source tree, not a run, and tier 2 (fetching upstream layers at their pins, SPDX import) starts from the target. Shown on the target page as Layer-Stände / Layer pins.

Release and finding

  • Release from the poky > openembedded-core > meta-openembedded branch/tag (scarthgap, scarthgap-5.0.3, yocto-5.0.3, refs/heads/kirkstone, …), else LAYERSERIES_COMPAT_core of an in-tree OE-Core layer, else the newest release all customer layers declare (the recipe lint keeps using the oldest, for syntax).
  • Release table as a Rust const (pipeline/yocto_pins/release.rs), from https://wiki.yoctoproject.org/wiki/Releases (checked 2026-10-09), exact days from endoflife.date; documented in docs/guide/yocto.md.
  • yocto-release / yocto-release-eol (high) and yocto-release-eol-soon (medium, within six months), CWE-1104, bound to cra-ai-22 (like dotnet-lifecycle / build-lifecycle); yocto-release added to the component tools so cra-ai-22 keeps its SBOM-based state. The text names release, EOL date, the file it was read from, the source, CRA Annex I Part I (2)(c) and Part II (2), and the current LTS (computed from the table). Unknown release: no finding, skipped stage yocto_release with the new SkipCode::ReleaseUnknown.
  • today is passed in; tests use fixed dates.

Fixture / nightly

fixtures/nightly/firmware/yocto-layer gets kas.yml (poky on dunfell + commit, a local include for meta-openembedded, a remote include) and a .gitmodules. The baseline gains yocto-release-eol, the three pins and yocto_release: dunfell (new exact-compared snapshot fields).

Known cost: recipe_lint::layers() walks the tree a second time for the release check (left as is to stay clear of the parallel recipe-inventory work).

Tests: kas include merging / cycles / remote+missing / outside-the-tree / lock files / alias bomb, manifest inheritance + includes + DTD, .gitmodules parsing + gitlink commits (scratch git repo), release derivation (branches, tags, core layer, LAYERSERIES_COMPAT), support ok/soon/ended at fixed dates, finding content, control-map binding, the real nightly fixture.

🤖 Generated with Claude Code

https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p

Yocto tier 1: the layer pins of a layer tree and the support status of the Yocto release they make up. Nothing is fetched, nothing is built. ## Layer pins - **kas** (`kas*.yml`, `kas/*.yml`): `repos:` with `url`, `branch`/`tag`/`refspec`, `commit`; `defaults.repos.branch`; local `header.includes` are merged the way kas merges them (the including file wins), cycles end, remote includes (`repo:`/`file:`, URLs) and missing ones are named under "Nicht gelesene Includes" and never fetched; a lock file beside it (`overrides.repos`) pins commits. Parsed with `yaml-rust2` (already in the lock through firmwerk-core); alias expansion is capped at 100k nodes before loading. - **repo manifests**: `<remote>`/`<default>` inheritance, a commit revision takes its branch from `upstream`/`dest-branch`, local `<include>`, `<extend-project>`, `<remove-project>`. `roxmltree`, so a DTD is refused. - **.gitmodules** + gitlink commit from HEAD (git2) when the tree is a checkout; a submodule's own kas files/manifests are not read as the tree's. - Stored on the target as `layer_pins` (pins, release, unread includes): the pins describe the source tree, not a run, and tier 2 (fetching upstream layers at their pins, SPDX import) starts from the target. Shown on the target page as **Layer-Stände / Layer pins**. ## Release and finding - Release from the poky > openembedded-core > meta-openembedded branch/tag (`scarthgap`, `scarthgap-5.0.3`, `yocto-5.0.3`, `refs/heads/kirkstone`, …), else `LAYERSERIES_COMPAT_core` of an in-tree OE-Core layer, else the **newest** release all customer layers declare (the recipe lint keeps using the oldest, for syntax). - Release table as a Rust const (`pipeline/yocto_pins/release.rs`), from https://wiki.yoctoproject.org/wiki/Releases (checked 2026-10-09), exact days from endoflife.date; documented in docs/guide/yocto.md. - `yocto-release` / `yocto-release-eol` (high) and `yocto-release-eol-soon` (medium, within six months), CWE-1104, bound to cra-ai-22 (like dotnet-lifecycle / build-lifecycle); `yocto-release` added to the component tools so cra-ai-22 keeps its SBOM-based state. The text names release, EOL date, the file it was read from, the source, CRA Annex I Part I (2)(c) and Part II (2), and the current LTS (computed from the table). Unknown release: no finding, skipped stage `yocto_release` with the new `SkipCode::ReleaseUnknown`. - `today` is passed in; tests use fixed dates. ## Fixture / nightly `fixtures/nightly/firmware/yocto-layer` gets `kas.yml` (poky on `dunfell` + commit, a local include for meta-openembedded, a remote include) and a `.gitmodules`. The baseline gains `yocto-release-eol`, the three pins and `yocto_release: dunfell` (new exact-compared snapshot fields). Known cost: `recipe_lint::layers()` walks the tree a second time for the release check (left as is to stay clear of the parallel recipe-inventory work). Tests: kas include merging / cycles / remote+missing / outside-the-tree / lock files / alias bomb, manifest inheritance + includes + DTD, .gitmodules parsing + gitlink commits (scratch git repo), release derivation (branches, tags, core layer, LAYERSERIES_COMPAT), support ok/soon/ended at fixed dates, finding content, control-map binding, the real nightly fixture. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
sharang force-pushed feat/yocto-layer-pins-release from 395970742d to dc1b13b3b7 2026-10-09 18:09:00 +00:00 Compare
sharang added 1 commit 2026-10-09 18:27:35 +00:00
feat(yocto): layer pins from kas, repo manifests and submodules, and a finding when the Yocto release is end of life
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Check (pull_request) Successful in 10m48s
fbce707aec
- kas files (local includes merged as kas does, cycles end, remote and
  missing includes named and never fetched, lock-file overrides), repo
  manifests (remote/default inheritance, includes, extend/remove-project)
  and .gitmodules with the gitlink commit of a checkout are read as layer
  pins; YAML alias expansion is bounded, manifests with a DTD are refused.
- The pins and the release they make up are stored on the target
  (layer_pins) and shown on the target page ("Layer-Stände").
- The release comes from the poky / openembedded-core / meta-openembedded
  branch or tag, else LAYERSERIES_COMPAT_core, else the newest release all
  customer layers declare. A table of Yocto releases (wiki + endoflife.date,
  checked 2026-10-09) gives LTS and end of life.
- yocto-release-eol (high) / yocto-release-eol-soon (medium, within six
  months) bound to cra-ai-22; an unknown release is a skipped stage.
- Nightly fixture pins Poky to Dunfell; baseline records pins and release.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
sharang force-pushed feat/yocto-layer-pins-release from dc1b13b3b7 to fbce707aec 2026-10-09 18:27:35 +00:00 Compare
sharang merged commit db515486a4 into main 2026-10-09 18:40:01 +00:00
Sign in to join this conversation.