[PR #10825] cmd: add command to print third-party licenses #18651

Open
opened 2026-04-16 06:42:13 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/10825
Author: @anuraaga
Created: 5/23/2025
Status: 🔄 Open

Base: mainHead: licenses-cmd


📝 Commits (7)

📊 Changes

6 files changed (+56 additions, -0 deletions)

View changed files

📝 .github/workflows/release.yaml (+4 -0)
📝 .gitignore (+1 -0)
📝 Dockerfile (+1 -0)
📝 cmd/cmd.go (+10 -0)
licenses/licenses.go (+37 -0)
licenses/root/.keep (+3 -0)

📄 Description

Fixes #3185

Adds ollama licenses command to dump out all the license text from dependencies.

This issue has been getting some buzz lately and I figured it doesn't hurt to send a PR for it. If it's not a good idea, no worries in rejecting it - personally I'm not too invested in the topic but want to help the project reduce negative buzz since it wasn't too hard to implement.

❯ git checkout main
Switched to branch 'main'
Your branch and 'origin/main' have diverged,
and have 813 and 3 different commits each, respectively.
  (use "git pull" if you want to integrate the remote branch with yours)
❯ go build .
# github.com/ollama/ollama
ld: warning: ignoring duplicate libraries: '-lobjc'
❯ grep "The ggml authors" ollama
❯ git checkout -
Switched to branch 'licenses-cmd'
Your branch is up to date with 'origin/licenses-cmd'.
❯ go build .
# github.com/ollama/ollama
ld: warning: ignoring duplicate libraries: '-lobjc'
❯ grep "The ggml authors" ollama
Binary file ollama matches

❯ go run . licenses | head -n 50
# github.com/ollama/ollama
ld: warning: ignoring duplicate libraries: '-lobjc'
The MIT License (MIT)

Copyright (c) 2015 Agniva De Sarker

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


                                 Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.

      "License" shall mean the terms and conditions for use, reproduction,
      and distribution as defined by Sections 1 through 9 of this document.

      "Licensor" shall mean the copyright owner or entity authorized by
      the copyright owner that is granting the License.

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

      "Source" form shall mean the preferred form for making modifications,
      including but not limited to software source code, documentation
  snipped

🔄 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/10825 **Author:** [@anuraaga](https://github.com/anuraaga) **Created:** 5/23/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `licenses-cmd` --- ### 📝 Commits (7) - [`f234ac1`](https://github.com/ollama/ollama/commit/f234ac1e51f672e883f49574b44bc5f0221045c8) cmd: add command to print third-party licenses - [`a9336e9`](https://github.com/ollama/ollama/commit/a9336e95a4f6430866158aca43cf72a8145875fe) doc - [`2d15838`](https://github.com/ollama/ollama/commit/2d158381faf2dc931918e037084b0cad42415e7f) Allow building without licenses - [`c473bb1`](https://github.com/ollama/ollama/commit/c473bb1385702574f8a2d3f2d4dfbaf3ed38709c) Allow building without licenses - [`219f25f`](https://github.com/ollama/ollama/commit/219f25f05ee60afef453c21359dfc3f006677d44) package comment probably enough - [`55dab52`](https://github.com/ollama/ollama/commit/55dab52922b0b0a8b0dd3a46288ca44337fbe58a) keep - [`cb7f8a1`](https://github.com/ollama/ollama/commit/cb7f8a1918e95cdee791a115554cf2f95e1ffd85) Simplify ### 📊 Changes **6 files changed** (+56 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/release.yaml` (+4 -0) 📝 `.gitignore` (+1 -0) 📝 `Dockerfile` (+1 -0) 📝 `cmd/cmd.go` (+10 -0) ➕ `licenses/licenses.go` (+37 -0) ➕ `licenses/root/.keep` (+3 -0) </details> ### 📄 Description Fixes #3185 Adds `ollama licenses` command to dump out all the license text from dependencies. This issue has been getting some buzz lately and I figured it doesn't hurt to send a PR for it. If it's not a good idea, no worries in rejecting it - personally I'm not too invested in the topic but want to help the project reduce negative buzz since it wasn't too hard to implement. ``` ❯ git checkout main Switched to branch 'main' Your branch and 'origin/main' have diverged, and have 813 and 3 different commits each, respectively. (use "git pull" if you want to integrate the remote branch with yours) ❯ go build . # github.com/ollama/ollama ld: warning: ignoring duplicate libraries: '-lobjc' ❯ grep "The ggml authors" ollama ❯ git checkout - Switched to branch 'licenses-cmd' Your branch is up to date with 'origin/licenses-cmd'. ❯ go build . # github.com/ollama/ollama ld: warning: ignoring duplicate libraries: '-lobjc' ❯ grep "The ggml authors" ollama Binary file ollama matches ❯ go run . licenses | head -n 50 # github.com/ollama/ollama ld: warning: ignoring duplicate libraries: '-lobjc' The MIT License (MIT) Copyright (c) 2015 Agniva De Sarker Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation snipped ``` --- <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-16 06:42:13 -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#18651