Skip to content

photon-os-installer: upgrade to v2.9 - #1674

Open
dcasota wants to merge 5 commits into
vmware:5.0from
dcasota:fix/poi-2.9-bump
Open

photon-os-installer: upgrade to v2.9#1674
dcasota wants to merge 5 commits into
vmware:5.0from
dcasota:fix/poi-2.9-bump

Conversation

@dcasota

@dcasota dcasota commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Puts the current upstream installer on the media. This is the change that makes an "installer latest" ISO possible — today the media always carries 2.8 regardless of what the ISO builder container runs.

The constellation

A single Photon ISO already spans two installer versions, in two different roles:

builder container   git clone --depth 1 vmware/photon-os-installer (master)   -> BUILDS the ISO
media RPM           SPECS/photon-os-installer, Version: 2.8                   -> INSTALLS from it

So "2.8 vs latest" was never selectable by a build flag. Getting latest onto the media requires exactly this: a spec version bump. Upstream released v2.9 on 2026-06-09 while 5.0 stayed pinned at 2.8.

The practical cost of the drift: three downstream patches carried here had already landed upstream and were being re-applied to code that no longer needed them.

Which patches survive, and how that was decided

Not by reading PR titles — each patch was tested against the real v2.9 tree in both directions. Applying forward means still needed; reversing cleanly means already upstream.

Patch v2.9 Action
0001-Use-mkpasswd-to-generate-password-hash reverses cleanly dropped
0002-fix-up-old-public_key-syntax-for-backward-compat applies forward kept
0006-stig-drop-redundant-packages applies forward kept
0007-installer-seed-locale.conf-before-package-install applies forward kept
0008-isoBuilder-put-installer-requestable-packages-on-media not present in v2.9 added

0003-isoInstaller-fix-interactive-NoneType-crash, 0004-installer-add-btrfs-progs and 0005-tdnf-capture-install-output are also in v2.9 (upstream PRs #45, #42, #46), so they are not carried forward either — confirmed the same way, against v2.9's actual content.

0008 — added, because v2.9 does not carry it

v2.9's isoBuilder.py has no KS_STIG_PACKAGES import, so the poi=latest media has the same defect 2.8 had: selecting "Apply STIG hardening" asks for the STIG package set at install time, and if those RPMs are not in the ISO's own RPMS/ the install aborts with Error(1011) : No matching packages.

Carrying it here keeps the two variants equivalent on that axis — otherwise the poi=latest permutations would silently lose a fix the 2.8 ones have. Applies to v2.9 with a one-line offset. This is dcasota/photon-os-installer#11.

Source metadata — computed, not copied

Field Value
archive_sha512sum 6fce11f895350b44…52a2c6, computed over the downloaded v2.9 archive
commit_id 59a011da9f32b4a983be0737027d951d5dfca968 (tag v2.9, dereferenced to a commit)
url …/archive/refs/tags/v2.9.tar.gz
license-review paths rebased photon-os-installer-2.8/-2.9/

Seven of the eight reviewed license files hash identically to 2.8; only photon-os-installer.spec changes, because it carries the version. Method sanity-checked by confirming the recorded 2.8 hash matches the 2.8 tarball on disk byte for byte.

Testing

All kept patches applied to the real v2.9 tarball, in rpm's order and at rpm's strictness (--fuzz=0 — plain patch defaults to fuzz 2 and is therefore a weaker check than the build performs):

0002-fix-up-old-public_key-syntax-for-backward-compatibil.patch  OK
0006-stig-drop-redundant-packages.patch                          OK
0007-installer-seed-locale.conf-before-package-install.patch     OK
0008-isoBuilder-put-installer-requestable-packages-on-media.patch OK

0002 is rebased onto the v2.9 context: v2.9 inserts a grub-password block between the anchor line and _check_install_config, so the hunk's trailing context no longer matches exactly. The change itself is still required — v2.9 has no public_key backward-compatibility handling of its own.

Resulting tree: KS_STIG_PACKAGES reduced to 5 entries, locale.conf seeded in _initialize_system(), and py_compile clean on both touched modules.

rpmspec yields photon-os-installer-2.9-3.ph5 at subrelease 91 and 92, with all three patches expanded into %prep. support/spec-checker/check_spec.py exits 0 — including its config.yaml/spec source cross-check, which is what validates the new metadata.

Relationship to #19

These two are alternatives — take one, not both. #19 keeps 2.8 and adds patches 0003-0007 to it. This PR moves to 2.9, where 0003/0004/0005 are redundant, and carries only 0002/0006/0007. Merging #19 first is fine; this PR would then need a trivial rebase to drop the files #19 added that v2.9 already has.

The patch list is also switched to unnumbered Patch:, so dropping an upstreamed patch can never leave an index gap or collision — the same failure mode fixed in #22/#23.

dcasota and others added 5 commits September 1, 2026 12:05
Puts the current upstream installer on the media. Photon 5.0 has been pinned
at 2.8 while upstream released v2.9 on 2026-06-09, so three of the downstream
patches carried here had already landed upstream and were being re-applied to
code that no longer needed them.

Each existing patch was tested against the real v2.9 tree in both directions
- applies forward means still needed, reverses cleanly means already upstream:

  0001-Use-mkpasswd-to-generate-password-hash            already in v2.9 -> dropped
  0002-fix-up-old-public_key-syntax-for-backward-compat  still needed    -> kept
  0006-stig-drop-redundant-packages                      still needed    -> kept
  0007-installer-seed-locale.conf-before-package-install still needed    -> kept

0003-isoInstaller-fix-interactive-NoneType-crash,
0004-installer-add-btrfs-progs and 0005-tdnf-capture-install-output are also
in v2.9 (upstream PRs vmware#45, vmware#42, vmware#46), so they are not carried forward either.

Source metadata is computed from the real tarball, not copied: sha512
6fce11f8... over the v2.9 archive, commit_id 59a011da for tag v2.9, and the
license-review paths rebased to photon-os-installer-2.9/. Seven of the eight
reviewed files hash identically to 2.8; only photon-os-installer.spec differs,
because it carries the version.

Patch list switched to unnumbered "Patch:" so that dropping an upstreamed
patch can never leave an index gap or a collision behind.

Change-Id: I4973c1d739368b1408c5efa47a59e790868385b5
Signed-off-by: Daniel Casota <dcasota@gmail.com>
…media

POI 2.9 does not carry the isoBuilder fix upstream, so without this the
poi=latest ISO variant has the same defect as 2.8: selecting "Apply STIG
hardening" asks for the STIG package set, and if those RPMs are not in
the ISO's own RPMS/ the install aborts with "Error(1011) : No matching
packages".

Same patch as the 2.8 branch carries (dcasota/photon-os-installer#11);
applies to 2.9 with a one-line offset.

Change-Id: Ib1261fd05bbc9c45d9183831b84b9fadc55b865d
Signed-off-by: Daniel Casota <dcasota@gmail.com>
The build failed in %prep:

  /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
  1 out of 1 hunk FAILED -- saving rejects to photon_installer/installer.py.rej
  error: Bad exit status from /var/tmp/rpm-tmp.6GFIsn (%prep)

rpm applies patches with --fuzz=0. Plain 'patch' defaults to fuzz 2, so
0002 appeared to apply when tested by hand and failed under rpm - the
verification was less strict than the build.

v2.9 inserted a grub-password block between the anchor line and
_check_install_config, so the hunk's trailing context no longer matches
exactly. The change itself is still needed: v2.9 has no public_key
backward-compatibility handling.

Regenerated against the v2.9 tree. Verified by applying the full series
0002, 0006, 0007, 0008 with --fuzz=0, as rpm does; py_compile clean.

Change-Id: I7b01287c92ffdf30dd6bfebdc2012850bac1f368
Signed-off-by: Daniel Casota <dcasota@gmail.com>
Regenerated 0008 from github.com/dcasota/photon-os-installer @ 56ae83c, which
carries the form requested in review on vmware/photon-os-installer#49: a
module-level `import stigenable` referenced as `stigenable.KS_STIG_PACKAGES`,
rather than a local `from stigenable import KS_STIG_PACKAGES` inside
downloadPkgs().

Package selection is unchanged; only where the import happens moves.

Change-Id: I3be44f73d323be4bb243c85be2e88d10a6d8f8a8
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JW73JTCUGRcaNTUEQcAMtf
Regenerated 0006, 0007 and 0008 from the published branches on
github.com/dcasota/photon-os-installer, so the copies carried here are the
commits the PRs actually contain. A copy that lags means the matrix proves the
old change while looking exactly like it proved the new one.

Change-Id: I08efb9c5390b7ca562cdf39689ff66cc3b07e268
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JW73JTCUGRcaNTUEQcAMtf
@aabusair aabusair closed this Sep 2, 2026
@aabusair aabusair reopened this Sep 2, 2026
@legal-compliance-bot

Copy link
Copy Markdown

🛑 Legal Compliance Check Failed

Hi @dcasota, thank you for your contribution!

To merge this Pull Request, you must sign our DCO.

Note: Even if you signed off your commits locally (using git commit -s), you must post the comment below to register your signature with our automated system.
Note: This is a one-time process. Once signed, future contributions to this repository will be verified automatically.

1. Read the Document: Click here to read the DCO
2. Sign via Comment: Copy and paste the exact line below into a new comment on this Pull Request:

I have read the DCO Document and I hereby sign the DCO for this and all future contributions.

⏳ Processing Schedule:
Our 'Compliance Sweeper' runs automatically approximately every 15-20 minutes.
After you post the comment, your status will update automatically during the next scheduled run.
You do not need to take any further action.

@dcasota

dcasota commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

I have read the DCO Document and I hereby sign the DCO for this and all future contributions.

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.

2 participants