Skip to content

fix: apt-get flag, schema typos, install_files error handling, port max#121

Merged
k-rister merged 4 commits into
masterfrom
fix-apt-schema-and-install-files
Jun 30, 2026
Merged

fix: apt-get flag, schema typos, install_files error handling, port max#121
k-rister merged 4 commits into
masterfrom
fix-apt-schema-and-install-files

Conversation

@k-rister

Copy link
Copy Markdown
Contributor

Summary

Four fixes, one per commit:

  • Remove --assumeyes from apt-get: --assumeyes is a dnf/yum flag, not valid for apt-get (which already has -y). Would cause group install/remove to fail on Debian/Ubuntu userenvs.

  • Fix misspelled uniqueuItems in schema: Three instances of "uniqueuItems" (extra u) silently ignored by validators. Duplicate items in distro-manual_info.packages, distro_info.packages, and distro_info.groups arrays were not rejected.

  • Exit on install_files failure: Every other install_* function calls sys.exit() on failure, but install_files logged errors and continued — silently producing images with missing files. The missing-destination guard is defense-in-depth (schema requires dst).

  • Port maximum 65536 → 65535: Valid TCP/UDP port range is 1-65535.

Closes #120

Test plan

  • python3 -c "import json; json.load(open('schema.json'))" — valid JSON
  • Build an image with an apt-based userenv — verify group install doesn't fail on --assumeyes
  • Review install_files exit behavior matches other install_* functions

🤖 Generated with Claude Code

k-rister and others added 4 commits June 27, 2026 10:34
--assumeyes is a dnf/yum flag, not valid for apt-get. apt-get
already has -y which serves the same purpose. The invalid flag
would cause apt-get to fail on Debian/Ubuntu-based userenvs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Three instances of "uniqueuItems" (extra 'u') were silently
ignored by JSON Schema validators, allowing duplicate items in
distro-manual_info.packages, distro_info.packages, and
distro_info.groups arrays.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Every other install_* function calls sys.exit() on failure, but
install_files logged errors and continued. A failed buildah add
would silently produce an image with missing files.

The missing-destination branch is a defense-in-depth guard — the
schema requires dst — but should still exit if somehow reached.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Valid TCP/UDP port range is 1-65535. Port 65536 is not a valid
port number.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@k-rister k-rister merged commit 7fbd13c into master Jun 30, 2026
2780 of 3004 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Crucible Tracking Jun 30, 2026
@k-rister k-rister deleted the fix-apt-schema-and-install-files branch June 30, 2026 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

fix: apt-get --assumeyes flag and misspelled uniqueItems in schema

2 participants