Skip to content

linux, linux-esx: build every 5.0 subrelease from one spec - #36

Open
dcasota wants to merge 1 commit into
fix/canister-build-against-current-kernelfrom
fix/kernel-single-source
Open

dcasota wants to merge 1 commit into
fix/canister-build-against-current-kernelfrom
fix/kernel-single-source

Conversation

@dcasota

@dcasota dcasota commented Sep 15, 2026

Copy link
Copy Markdown
Owner

Problem

Photon 5.0 keeps two copies of each kernel spec: SPECS/90/linux/linux.spec and linux-esx.spec build kernel 6.1 for photon_subrelease 90 and below, SPECS/linux/ builds 6.12 from 91. Every change that is not kernel-specific — dependencies, sections, the canister logic, the acvp/kat refusal — has to be made twice, and the two copies drift.

Change

SPECS/linux/linux.spec and linux-esx.spec now build every 5.0 subrelease, on x86_64 and aarch64, and replace SPECS/90/linux/linux.spec and linux-esx.spec.

Version, Source0, the dependencies both kernels share, the acvp/kat refusal and every section are written once, with photon_subrelease conditionals where the kernels differ. Each kernel's preamble (Release, FIPS model, sources, patches) and changelog live in <flavour>-<kernel>.inc and <flavour>-<kernel>-changelog.inc; linux.spec also takes the subpackages whose descriptions differ from linux-<kernel>-packages.inc.

The 6.1 files move to SPECS/linux: included files to the top level, where SpecParser.py resolves includes, everything else under 6.1/. A name that already exists for 6.12 with other content gets a -6.1 suffix, because Photon stages sources by file name. The 6.1 archives join config.yaml. linux-rt stays in SPECS/90/linux with the files it uses.

Testing

  • rpm (rpmspec -P, preamble and queries) and Photon's SpecParser.py read both specs exactly as before for subreleases 90, 91 and 92, on x86_64 and aarch64, with and without canister_build, acvp_build and kat_build: 48 cases plus kernel selection and source mapping, all identical.
  • Six x86_64 ISOs (minimal and full; photon-os-installer 2.8 and 2.9; prebuilt and locally built canister) were built from this branch and passed the sharukhan permutation run.
  • aarch64 was checked statically only (identical %prep and preprocessed spec); no aarch64 build host was available.

Dependencies

🤖 Generated with Claude Code

SPECS/linux/linux.spec and linux-esx.spec now build kernel 6.1 for
photon_subrelease 90 and below and kernel 6.12 from 91, on x86_64 and
aarch64, replacing SPECS/90/linux/linux.spec and linux-esx.spec.

Each kernel's preamble (Release, FIPS model, sources, patches) and
changelog live in <flavour>-<kernel>.inc and <flavour>-<kernel>-changelog.inc;
linux.spec also takes the subpackages whose descriptions differ from
linux-<kernel>-packages.inc. Version, Source0, the dependencies both
kernels share, the acvp/kat refusal and every section are written once,
with photon_subrelease conditionals where the kernels differ.

The 6.1 files move to SPECS/linux: included files to the top level,
where SpecParser resolves includes, everything else under 6.1/. A name
that exists for 6.12 with other content gets a -6.1 suffix, because
Photon stages sources by file name. The 6.1 archives join config.yaml.
linux-rt stays in SPECS/90/linux with the files it uses.

rpm and Photon's SpecParser read both specs exactly as before for
subreleases 90, 91 and 92, on x86_64 and aarch64, with and without
canister_build, acvp_build and kat_build. check_spec needs
fix/check-spec-subrelease-aware on the common branch to read a spec that
serves several subreleases.

Change-Id: Iee86a86f800b0bb70b83b96c673078a4bc6e1512
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