Skip to content

spec-generator: read kernel specs as the current subrelease sees them - #1679

Open
dcasota wants to merge 1 commit into
vmware:commonfrom
dcasota:fix/spec-generator-subrelease-aware
Open

dcasota wants to merge 1 commit into
vmware:commonfrom
dcasota:fix/spec-generator-subrelease-aware

Conversation

@dcasota

@dcasota dcasota commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Problem

create-kernel-deps-specs-from-template.py takes the first Version: and Release: lines and the build_if of each kernel spec. A spec that serves several subreleases keeps each kernel's Version behind a subrelease conditional and its Release in an included file. The first Version then belongs to the wrong kernel, Release is not found, and the generator crashes, which stops make image.

Change

The spec is resolved for the current subrelease first: plain photon_subrelease comparisons are decided and %included files are inlined. When a spec has no build_if, the subrelease condition around Version: becomes the build target, as the separate per-subrelease spec stated it. A missing Version or Release now fails with a clear message.

Testing

  • For specs without subrelease conditionals nothing changes: versions, releases and build targets for subreleases 90, 91 and 92 are identical before and after, for both the current specs and the single-source kernel specs (linux, linux-esx: build every 5.0 subrelease from one spec #1680).
  • The six x86_64 ISOs of the sharukhan permutation run were built with this change.

🤖 Generated with Claude Code

The kernel-deps generator took the first Version: and Release: lines of
each kernel spec and its build_if. A spec that serves several subreleases
- SPECS/linux/linux.spec builds kernel 6.1 up to photon_subrelease 90
and 6.12 from 91 - keeps each kernel's Version behind a subrelease
conditional and its Release in an included file, so the first Version
belonged to the wrong kernel, Release was not found and the generator
crashed, stopping make image.

The spec is now resolved for the current subrelease first: plain
photon_subrelease comparisons are decided and %include'd files are
inlined. Without a build_if, the subrelease condition around Version:
becomes the build target, as the separate per-subrelease spec stated it.
For specs without subrelease conditionals nothing changes: versions,
releases and build targets for subreleases 90, 91 and 92 are the same as
before, for both the current specs and the single-source kernel specs.

Change-Id: Ied11d8260b9ea3d37c4fe322e5c2c5ea880535b3
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JW73JTCUGRcaNTUEQcAMtf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant