Skip to content

Branch FOS imaging on an OS class, not on osid lists (fos#204) - #205

Merged
mastacontrola merged 1 commit into
masterfrom
feat/os-class
Nov 10, 2026
Merged

mastacontrola merged 1 commit into
masterfrom
feat/os-class

Conversation

@mastacontrola

Copy link
Copy Markdown
Member

Closes FOGProject/fogproject#204.

Problem

FOS branched on osid lists such as [5-7]|9|10|11 at 20 sites. determineOS() aborted on any osid it did not know. So every new OS row in FOG needed a FOS release.

Change

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 through other. Osid 51 (Chromium OS) shares linux with 50, so it no longer runs changeHostname after a deploy. For 51 that step only mounted NTFS partitions with remove_hiberfile; it never wrote a registry. Every other site keeps its branch for every existing osid.

Test

  • New 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 windows aborted) 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).
  • All 33 tests/checks/*.sh pass.
  • Not tested on hardware.

🤖 Generated with Claude Code

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>
@mastacontrola
mastacontrola merged commit 3bb847c into master Nov 10, 2026
1 check passed
@mastacontrola
mastacontrola deleted the feat/os-class branch November 10, 2026 14:42
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