Repository navigation
Branch FOS imaging on an OS class, not on osid lists (fos#204) - #205
Merged
Merged
Conversation
determineOS "$osid" "$family" now sets one global, osClass. Ids 1-7 keep their own class (xp, vista, win98, winother, win7). Every other id takes its class from the server's osfamily= (windows, linux, macos, other). With no family, FOS falls back to the family of the ids it knows. A family from the server wins over the fallback. All 20 osid comparisons outside determineOS() now test osClass, so a new OS id needs no FOS release. fog.checkin and fog.debug pass the family. fog.capone passes none and exports an empty osfamily. Capone still aborts on an unknown id. completeTasking() matched osid 51 and 99 by accident, through the repeat in +( ). The site now includes `other`, so 99 keeps its branch. For 99, changeHostname() has no 99/other arm, so no registry was written before and none is now. What 99 keeps is the NTFS mount with remove_hiberfile, which removes hiberfil.sys. Osid 51 (Chromium OS) shares the linux class with 50, so it loses that NTFS mount and hiberfile removal. It never wrote a registry. See ADR-0022. Adds tests/checks/os-class.sh, docs/adr/0022-os-class.md, and the CLAUDE.md and tests/README.md entries. The golden fixture is not recaptured. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes FOGProject/fogproject#204.
Problem
FOS branched on osid lists such as
[5-7]|9|10|11at 20 sites.determineOS()aborted on any osid it did not know. So every new OS row in FOG needed a FOS release.Change
determineOS "$osid" "$family"sets one global,osClass. Ids 1–7 stay keyed on the osid (xp,vista,win98,winother,win7). Every other id is keyed on the family:windows→winmodern,linux,macos→mac,other.osfamily=, which the server sends after Store an OS family per OS row and send it to FOS as osfamily fogproject#2083. When it is empty, a built-in table covers the known ids, so this init works against today's servers.osClass.fog.checkinandfog.debugpass the family.fog.caponeexports an empty family, so a cmdline value never applies to a Capone image (follow-on: Send the OS family through Capone so a new osid works there too fog-plugins#43).Behavior change
One site cannot keep its old branch.
completeTasking()used+([1-2]|4|[5-7]|9|10|11). The+( )repeats, so it also matched osid 51 and 99 by accident. 99 keeps it throughother. Osid 51 (Chromium OS) shareslinuxwith 50, so it no longer runschangeHostnameafter a deploy. For 51 that step only mounted NTFS partitions withremove_hiberfile; it never wrote a registry. Every other site keeps its branch for every existing osid.Test
tests/checks/os-class.sh: a 560-row truth table built from the base's osid lists, plus the new-id, conflict and error cases. It failed on the base (determineOS 12 windowsaborted) and goes red when one site is broken on purpose. 631 passed, 0 failed.tests/golden/run.sh check: byte-identical to the committed fixture (not recaptured).tests/checks/*.shpass.🤖 Generated with Claude Code