photon-os-installer: upgrade to v2.9 - #1674
Conversation
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
🛑 Legal Compliance Check FailedHi @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 1. Read the Document: Click here to read the DCO ⏳ Processing Schedule: |
|
I have read the DCO Document and I hereby sign the DCO for this and all future contributions. |
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:
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.
0001-Use-mkpasswd-to-generate-password-hash0002-fix-up-old-public_key-syntax-for-backward-compat0006-stig-drop-redundant-packages0007-installer-seed-locale.conf-before-package-install0008-isoBuilder-put-installer-requestable-packages-on-media0003-isoInstaller-fix-interactive-NoneType-crash,0004-installer-add-btrfs-progsand0005-tdnf-capture-install-outputare 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.pyhas noKS_STIG_PACKAGESimport, so thepoi=latestmedia 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 ownRPMS/the install aborts withError(1011) : No matching packages.Carrying it here keeps the two variants equivalent on that axis — otherwise the
poi=latestpermutations would silently lose a fix the2.8ones have. Applies to v2.9 with a one-line offset. This is dcasota/photon-os-installer#11.Source metadata — computed, not copied
archive_sha512sum6fce11f895350b44…52a2c6, computed over the downloaded v2.9 archivecommit_id59a011da9f32b4a983be0737027d951d5dfca968(tagv2.9, dereferenced to a commit)url…/archive/refs/tags/v2.9.tar.gzphoton-os-installer-2.8/→-2.9/Seven of the eight reviewed license files hash identically to 2.8; only
photon-os-installer.specchanges, 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— plainpatchdefaults to fuzz 2 and is therefore a weaker check than the build performs):0002is 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 nopublic_keybackward-compatibility handling of its own.Resulting tree:
KS_STIG_PACKAGESreduced to 5 entries,locale.confseeded in_initialize_system(), andpy_compileclean on both touched modules.rpmspecyieldsphoton-os-installer-2.9-3.ph5at subrelease 91 and 92, with all three patches expanded into%prep.support/spec-checker/check_spec.pyexits 0 — including itsconfig.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.