fix(system): add openSUSE platform support #748
Open
Houtamelo wants to merge 3 commits into
Open
Conversation
# Conflicts: # docs/platforms.md # internal/installcmd/resolver.go
Both openSUSE test cases had copy-paste errors from other distros: - adapter_test.go: missing --ignore-scripts and version pin - resolver_test.go: wrong test body (was in TestResolveDependencyInstall instead of TestResolveAgentInstall) with npm command instead of zypper Fix both to match what resolveOpenCodeInstall actually produces for zypper/NpmWritable=false: sudo npm install -g --ignore-scripts <pinned>
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds openSUSE (zypper) support across platform detection, dependency install hints/commands, and E2E coverage, while clarifying that Go is optional for normal (binary) installs.
Changes:
- Detect openSUSE via
/etc/os-release, mark as supported, and map tozypper. - Add
zypperinstall hints/commands for core dependencies and update install resolver paths. - Expand unit tests, docs, and Docker-based E2E testing to include openSUSE; update optional-Go messaging.
Reviewed changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/system/install_deps_test.go | Adds openSUSE test coverage for dependency hints/commands and expands platform matrix. |
| internal/system/install_deps.go | Adds zypper install hints/commands for git/curl/node/go. |
| internal/system/guard_test.go | Adds guard test for openSUSE and updates expected error message text. |
| internal/system/guard.go | Updates unsupported-distro error message to include openSUSE. |
| internal/system/detect_test.go | Adds openSUSE detection + profile resolution tests. |
| internal/system/detect.go | Introduces LinuxDistroOpenSUSE, detection helper, and profile mapping to zypper. |
| internal/system/deps_test.go | Updates dependency report expectations to include optional Go formatting. |
| internal/system/deps.go | Clarifies Go optionality and adds formatting for optional-missing dependency output. |
| internal/installcmd/resolver_test.go | Adds zypper resolver tests and updates “unsupported pm” cases. |
| internal/installcmd/resolver.go | Adds zypper support for dependency installs/uv hint and includes it in linux install flows. |
| internal/components/gga/install_test.go | Verifies GGA install path on openSUSE and updates unsupported pm case. |
| internal/components/engram/install_test.go | Adjusts test case to treat openSUSE as a specific (expected-error) scenario. |
| internal/app/parity_test.go | Adds parity/guard tests for openSUSE profiles. |
| internal/agents/opencode/adapter_test.go | Adds openSUSE npm-install behavior test and updates unsupported pm case. |
| e2e/docker-test.sh | Adds openSUSE image to the docker E2E platform list. |
| e2e/Dockerfile.opensuse | Adds a Tumbleweed-based E2E image definition. |
| docs/usage.md | Documents zypper hints and notes Go is optional for normal installs. |
| docs/rollback.md | Expands rollback caveats/examples to include dnf and zypper. |
| docs/quickstart.md | Adds openSUSE prerequisites and clarifies Go requirement for source builds only. |
| docs/platforms.md | Lists openSUSE as supported and adds derivatives examples. |
| docs/non-interactive.md | Adds openSUSE to the non-interactive npm/sudo matrix. |
| docs/docker-e2e-testing.md | Documents Fedora + openSUSE Docker E2E images and commands. |
| docs/architecture.md | Updates architecture notes to include zypper and expanded Docker E2E platforms. |
| PRD.md | Updates supported platforms list and clarifies Go’s role and install methods. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+207
to
+209
| if cmds[0][0] != "sudo" || cmds[0][1] != "zypper" || cmds[0][2] != "--non-interactive" { | ||
| t.Fatalf("git opensuse command = %v, want sudo zypper --non-interactive", cmds[0]) | ||
| } |
Comment on lines
+218
to
+220
| if cmds[0][0] != "sudo" || cmds[0][1] != "zypper" || cmds[0][4] != "nodejs" || cmds[0][5] != "npm" { | ||
| t.Fatalf("node opensuse command = %v, want sudo zypper --non-interactive install nodejs npm", cmds[0]) | ||
| } |
| @@ -0,0 +1,54 @@ | |||
| # Dockerfile.opensuse — E2E test image for gentle-ai on openSUSE Tumbleweed | |||
| # Builds the binary from source and runs the E2E test suite as a non-root user. | |||
| FROM opensuse/tumbleweed:latest | |||
| ### All platforms | ||
|
|
||
| - Go 1.24+ (for building from source). | ||
| - Go 1.24+ only if you are building Gentle AI from source; it is not required for normal release-binary installs. |
Comment on lines
+255
to
+265
| func formatMissingOptional(missing []string) string { | ||
| formatted := make([]string, 0, len(missing)) | ||
| for _, dep := range missing { | ||
| if dep == "go" { | ||
| formatted = append(formatted, "go (only needed for local development/source builds)") | ||
| continue | ||
| } | ||
| formatted = append(formatted, dep) | ||
| } | ||
| return strings.Join(formatted, ", ") | ||
| } |
18 tasks
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.
🔗 Linked Issue
Closes #140
🏷️ PR Type
What kind of change does this PR introduce?
type:bug— Bug fix (non-breaking change that fixes an issue)type:feature— New feature (non-breaking change that adds functionality)type:docs— Documentation onlytype:refactor— Code refactoring (no functional changes)type:chore— Build, CI, or tooling changestype:breaking-change— Breaking change (fix or feature that changes existing behavior)📝 Summary
Adds openSUSE (Tumbleweed/Leap) platform support so
gentle-aino longer exits withunsupported linux distroon openSUSE systems. Detects openSUSE distros through/etc/os-releaseand maps them tozypperwith supported platform status.📂 Changes
internal/systemzypperwith supported platform statusinternal/installcmdzypperdependency installs and enables openSUSE paths for OpenCode--ignore-scriptsconsistencye2e/🐛 Bug Fixes
The original openSUSE commit had copy-paste errors in test expectations:
internal/agents/opencode/adapter_test.go: openSUSE npm test missing--ignore-scriptsand version pininternal/installcmd/resolver_test.go: openSUSE test inTestResolveDependencyInstallhad npm command instead of zypperinternal/installcmd/resolver_test.go: openSUSE npm test missing--ignore-scriptsand version pinAll three fixed to match actual resolver output for zypper/NpmWritable=false.
🧪 Test Plan
Unit Tests
go test ./...
E2E Tests (Docker required)
sg docker -c './e2e/docker-test.sh'
Results:
go test ./...— 48 packages, 0 failures)gentle-ai install --dry-runreportsos=linux distro=opensuse package-manager=zypper status=supported🤖 Automated Checks
Closes/Fixes/Resolves #Nstatus:approvedtype:*Labeltype:*label must be appliedgo test ./...must passcd e2e && ./docker-test.shmust pass✅ Contributor Checklist
status:approvedtype:*label to this PRgo test ./...)cd e2e && ./docker-test.sh)Co-Authored-Bytrailers💬 Notes for Reviewers
This is a revival of the stale PR #397, rebased onto current
mainwith the unrelated bundled refactor (withGoInstallPathNote→withEngramPathNote) stripped. That refactor was logically separate and contained a PATH-check mismatch bug — it should be its own PR if still desired. Three test expectation bugs from the original commit were also fixed.