fix(ollama): fix macOS segfault and exclude mlx/rocm/jetpack variants

- pkg_link called webi_link which called pkg_link — infinite recursion
  causing SIGSEGV on macOS; fixed by switching to WEBI_SINGLE-style paths
  so the template's webi_link handles symlinking directly
- macOS pkg_src now points to the flat ollama binary (not ./bin/ollama)
- mlx, rocm, jetpack5, jetpack6 tagged as variants so generic installs
  get the standard build instead of a GPU-specific one
This commit is contained in:
AJ ONeal
2026-05-18 00:17:25 -06:00
parent d62cbb1be0
commit c3fff12f2b
3 changed files with 13 additions and 32 deletions

View File

@@ -1,7 +1,4 @@
// Package ollama provides variant tagging for Ollama releases.
//
// Ollama publishes GPU accelerator builds: -rocm (AMD), -jetpack5
// and -jetpack6 (NVIDIA Jetson).
package ollamadist
import (
@@ -11,14 +8,10 @@ import (
)
// TagVariants tags ollama-specific build variants.
// Suffix variants (mlx, rocm, jetpack5, jetpack6) are handled by the
// conf-driven loop in classifypkg.TagVariants; this handles the rest.
func TagVariants(assets []storage.Asset) {
for i := range assets {
lower := strings.ToLower(assets[i].Filename)
for _, v := range []string{"rocm", "jetpack5", "jetpack6"} {
if strings.Contains(lower, "-"+v) {
assets[i].Variants = append(assets[i].Variants, v)
}
}
// Ollama-darwin.zip (capital O) is the macOS .app bundle.
// Installable by Go (extract .app), but not in legacy cache.
if strings.HasPrefix(assets[i].Filename, "Ollama-") {