[PR #11174] XDG Spec Support #44712

Open
opened 2026-04-25 00:21:04 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/11174
Author: @robsdudeson
Created: 6/23/2025
Status: 🔄 Open

Base: mainHead: robsdudeson/xdg-spec-support


📝 Commits (10+)

  • 3dca640 lint: alphabetize AsMap
  • 71f2e3e test: add test for current state of Models()
  • a027fb6 config: Move KeyPath to envconfig
  • 1b35421 keys: use envconfig for KeysPath
  • 5caedb3 config: use Models() in registry
  • 335955c config: use KeyPath()
  • b5ea45c config: use History() for path
  • 2a9d0bb config: extract out ConfigDir()
  • a9d2001 config: directories are xdg aware
  • 069d917 config: Models() and History() use XDG_STATE_HOME

📊 Changes

10 files changed (+196 additions, -64 deletions)

View changed files

📝 app/store/store_linux.go (+3 -2)
📝 auth/auth.go (+6 -18)
📝 cmd/cmd.go (+4 -8)
📝 docs/faq.md (+7 -3)
📝 docs/troubleshooting.md (+9 -1)
📝 envconfig/config.go (+37 -11)
📝 envconfig/config_test.go (+110 -0)
📝 macapp/src/index.ts (+12 -1)
📝 readline/history.go (+2 -6)
📝 server/internal/client/ollama/registry.go (+6 -14)

📄 Description

Summary

  • Moves paths for history, models, and keys into envconfig
  • Adds support for XDG Spec for logs, history, models, and keys
    • Will respect the existing locations unless XDG_CONFIG_HOME and XDG_STATE_HOME are defined

related: #228, #584, #4382, #4656, #9477


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/11174 **Author:** [@robsdudeson](https://github.com/robsdudeson) **Created:** 6/23/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `robsdudeson/xdg-spec-support` --- ### 📝 Commits (10+) - [`3dca640`](https://github.com/ollama/ollama/commit/3dca640f5b76eb46a3f1ef622978e71802246e1a) lint: alphabetize `AsMap` - [`71f2e3e`](https://github.com/ollama/ollama/commit/71f2e3e7d1c4f79cbbf591153125bf00e2525f35) test: add test for current state of `Models()` - [`a027fb6`](https://github.com/ollama/ollama/commit/a027fb632f6e2adecdafb5d11075bfa6900c2c47) config: Move KeyPath to `envconfig` - [`1b35421`](https://github.com/ollama/ollama/commit/1b35421d0c11369133aedc4c8e303ed52ba16ae5) keys: use `envconfig` for `KeysPath` - [`5caedb3`](https://github.com/ollama/ollama/commit/5caedb32e5b9c0faacdbd7758572c4d44c1fcd6b) config: use `Models()` in registry - [`335955c`](https://github.com/ollama/ollama/commit/335955c68814e6ad85b191aae807664ac946f841) config: use `KeyPath()` - [`b5ea45c`](https://github.com/ollama/ollama/commit/b5ea45ca2eb2988e8a118ae7489ef9e0a16424ae) config: use `History()` for path - [`2a9d0bb`](https://github.com/ollama/ollama/commit/2a9d0bb206b24e79ff1b0c519ee7570e3f61c002) config: extract out `ConfigDir()` - [`a9d2001`](https://github.com/ollama/ollama/commit/a9d200103c0622355180bb3880b9a345e0c02c4e) config: directories are xdg aware - [`069d917`](https://github.com/ollama/ollama/commit/069d917f1002ace2918e17efec2c0b80c797828d) config: `Models()` and `History()` use `XDG_STATE_HOME` ### 📊 Changes **10 files changed** (+196 additions, -64 deletions) <details> <summary>View changed files</summary> 📝 `app/store/store_linux.go` (+3 -2) 📝 `auth/auth.go` (+6 -18) 📝 `cmd/cmd.go` (+4 -8) 📝 `docs/faq.md` (+7 -3) 📝 `docs/troubleshooting.md` (+9 -1) 📝 `envconfig/config.go` (+37 -11) 📝 `envconfig/config_test.go` (+110 -0) 📝 `macapp/src/index.ts` (+12 -1) 📝 `readline/history.go` (+2 -6) 📝 `server/internal/client/ollama/registry.go` (+6 -14) </details> ### 📄 Description # Summary - Moves paths for history, models, and keys into envconfig - Adds support for [XDG Spec](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html) for logs, history, models, and keys - Will respect the existing locations unless `XDG_CONFIG_HOME` and `XDG_STATE_HOME` are defined related: #228, #584, #4382, #4656, #9477 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-25 00:21:04 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#44712