diff options
| author | CoprDistGit <infra@openeuler.org> | 2026-10-29 10:03:32 +0000 |
|---|---|---|
| committer | CoprDistGit <infra@openeuler.org> | 2026-10-29 10:03:32 +0000 |
| commit | 174e1bd24bd8d97f163df1b03ae93f27d64a038d (patch) | |
| tree | eec44016b8d1d0810feb01c32d1d4dc70301de40 | |
| parent | 9805c1ad21563986a708ef64075b7a8cf3559777 (diff) | |
automatic import of ollama
| -rw-r--r-- | ollama.spec | 16 | ||||
| -rw-r--r-- | sources | 2 |
2 files changed, 15 insertions, 3 deletions
diff --git a/ollama.spec b/ollama.spec index 2a4de12..a0a5f4f 100644 --- a/ollama.spec +++ b/ollama.spec @@ -4,7 +4,7 @@ Name: ollama Version: 0.40.13 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Lightweight framework for running large language models locally License: MIT @@ -61,11 +61,18 @@ export CGO_ENABLED=1 export OLLAMA_LLAMA_CPP_SOURCE=%{_builddir}/%{name}-%{version}/llama_cpp # CMake superbuild:编排 Go CLI 二进制 + llama.cpp CPU 后端(llama-server、llama-quantize) +# OLLAMA_LIB_DIR 必须使用相对路径(%{_lib}/ollama 展开为 lib64/ollama),不能使用 +# 绝对路径(%{_libdir}/ollama 展开为 /usr/lib64/ollama)。CMake 的 install(TARGETS +# ... DESTINATION) 在目标为绝对路径时会跳过 CMAKE_INSTALL_PREFIX,导致 +# ExternalProject 的 install 步骤在 build 阶段直接尝试写入 /usr/lib64/ollama +# 而非 staging 目录,非 root 构建环境下因权限不足失败。使用相对路径后, +# ExternalProject 会安装到 staging 目录,顶层 install 步骤再通过 DESTDIR +# 将文件安装到 buildroot 下正确位置。 cmake -B build -S . \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DOLLAMA_VERSION=%{version} \ - -DOLLAMA_LIB_DIR=%{_libdir}/ollama + -DOLLAMA_LIB_DIR=%{_lib}/ollama cmake --build build --parallel %{?_smp_build_ncpus} @@ -79,5 +86,10 @@ DESTDIR=%{buildroot} cmake --install build %{_libdir}/ollama/ %changelog +* Thu Oct 29 2026 AI Importer <ai-importer@openeuler.org> - 0.40.13-2 +- Fix CMake ExternalProject install failure: use relative OLLAMA_LIB_DIR + (%{_lib}/ollama) instead of absolute path (%{_libdir}/ollama) to prevent + install(TARGETS) from bypassing CMAKE_INSTALL_PREFIX during %build staging + * Thu Oct 29 2026 AI Importer <ai-importer@openeuler.org> - 0.40.13-1 - Initial package of ollama 0.40.13 @@ -1,3 +1,3 @@ 03be13be3b7cb29a5d3cc62f1c85cd8b llama_cpp_b11963.tar.gz -68f3e9926264dc2af4a4f3a66da107a1 ollama-0.40.13.tar.gz +7bff65bdec9299e9c0fc39cb205fad35 ollama-0.40.13.tar.gz 02719d3e555bac8ba3441ad01ef061f0 ollama-vendor.tar.gz |
