public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/ollama] rawhide: Update to 0.35.1
@ 2026-10-11 15:17 Tom Rix
0 siblings, 0 replies; only message in thread
From: Tom Rix @ 2026-10-11 15:17 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/ollama
Branch : rawhide
Commit : b641573d9c76772646bb7fd931043867b97b51b1
Author : Tom Rix <Tom.Rix@amd.com>
Date : 2026-10-11T08:17:15-07:00
Stats : +222/-25 in 5 file(s)
URL : https://src.fedoraproject.org/rpms/ollama/c/b641573d9c76772646bb7fd931043867b97b51b1?branch=rawhide
Log:
Update to 0.35.1
To fix terrible user experience with downloading ollama models
bring back bundling of llama.cpp with ollama.
Add checks to fails when this is no longer needed.
Signed-off-by: Tom Rix <Tom.Rix@amd.com>
---
diff --git a/.gitignore b/.gitignore
index 851f974..2d9e1ef 100644
--- a/.gitignore
+++ b/.gitignore
@@ -25,3 +25,6 @@
/ollama-0.32.8-vendor.tar.bz2
/ollama-0.33.1.tar.gz
/ollama-0.33.1-vendor.tar.bz2
+/ollama-0.35.1.tar.gz
+/ollama-0.35.1-vendor.tar.bz2
+/llama.cpp-b11232.tar.gz
diff --git a/0001-ollama-no-rpaths.patch b/0001-ollama-no-rpaths.patch
new file mode 100644
index 0000000..dceca2d
--- /dev/null
+++ b/0001-ollama-no-rpaths.patch
@@ -0,0 +1,42 @@
+From 368510d60ffdea5d961ca4a153277e284f7a54be Mon Sep 17 00:00:00 2001
+From: Tom Rix <Tom.Rix@amd.com>
+Date: Fri, 9 Oct 2026 12:23:01 -0700
+Subject: [PATCH] ollama no rpaths
+
+---
+ CMakeLists.txt | 4 ----
+ llama/server/CMakeLists.txt | 3 ---
+ 2 files changed, 7 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 0607f09953d7..55c725b2aae5 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -45,10 +45,6 @@ if(APPLE)
+ set(CMAKE_BUILD_RPATH "@loader_path")
+ set(CMAKE_INSTALL_RPATH "@loader_path")
+ set(CMAKE_BUILD_WITH_INSTALL_RPATH ON)
+-elseif(UNIX)
+- set(CMAKE_BUILD_RPATH "$ORIGIN")
+- set(CMAKE_INSTALL_RPATH "$ORIGIN")
+- set(CMAKE_BUILD_WITH_INSTALL_RPATH ON)
+ endif()
+
+ set(OLLAMA_BUILD_DIR ${CMAKE_BINARY_DIR}/lib/ollama)
+diff --git a/llama/server/CMakeLists.txt b/llama/server/CMakeLists.txt
+index aabc1a28d986..53477f29b9d9 100644
+--- a/llama/server/CMakeLists.txt
++++ b/llama/server/CMakeLists.txt
+@@ -20,9 +20,6 @@ endif()
+ if(APPLE)
+ set(CMAKE_INSTALL_RPATH "@loader_path")
+ set(CMAKE_BUILD_RPATH "@loader_path")
+-elseif(NOT WIN32)
+- set(CMAKE_INSTALL_RPATH "$ORIGIN")
+- set(CMAKE_BUILD_RPATH "$ORIGIN")
+ endif()
+
+ if(GGML_VULKAN AND DEFINED ENV{VULKAN_SDK})
+--
+2.55.0
+
diff --git a/go-vendor-tools.toml b/go-vendor-tools.toml
index 9cc1330..c285fb8 100644
--- a/go-vendor-tools.toml
+++ b/go-vendor-tools.toml
@@ -2,10 +2,6 @@
[licensing]
detector = "askalono"
-[[licensing.licenses]]
-path = "vendor/github.com/apache/arrow/go/arrow/LICENSE.txt"
-sha256sum = "b9bb118a7b522be9463470835c0a50451255b4e8dd350465c366a1656128f622"
-expression = "(Apache-2.0 AND BSD-3-Clause) AND BSD-3-Clause AND CC0-1.0 AND (LicenseRef-scancode-public-domain AND MIT) AND Apache-2.0 AND BSL-1.0 AND (BSD-2-Clause AND BSD-3-Clause) AND MIT AND (BSL-1.0 AND BSD-2-Clause) AND BSD-2-Clause AND ZPL-2.1 AND LicenseRef-scancode-protobuf AND NCSA AND (CC-BY-3.0 AND MIT) AND (CC-BY-4.0 AND LicenseRef-scancode-public-domain) AND NTP AND Zlib AND OpenSSL AND (BSD-3-Clause AND BSD-2-Clause) AND (BSD-2-Clause AND Zlib)"
[[licensing.licenses]]
path = "vendor/gopkg.in/yaml.v3/LICENSE"
@@ -21,3 +17,14 @@ expression = "BSD-2-Clause AND ISC"
path = "vendor/github.com/mattn/go-localereader/README.md"
sha256sum = "0c5c52517f13becd7a1e1234f1e8a5ba370f5a5078cee9ac058c2d534e267fcb"
expression = "MIT"
+
+# False positive on license checker, this is a cmake file
+[[licensing.licenses]]
+path = "llama/cmake/license.cmake"
+sha256sum = "083515dff8a9b8696e348c7c616934e53941a7db30e1b3f092576632e9a2d1d4"
+expression = "MIT"
+
+[[licensing.licenses]]
+path = "llama/vendor/hash/sha256/LICENSE"
+sha256sum = "b81d0022ca6367918c67b57e9647d3513ee58809fd4b0ef0b3492f1356bced25"
+expression = "LicenseRef-Fedora-Public-Domain"
diff --git a/ollama.spec b/ollama.spec
index eb45144..3617885 100644
--- a/ollama.spec
+++ b/ollama.spec
@@ -11,12 +11,40 @@ ExcludeArch: ppc64le s390x
# systemd testing
%bcond systemd 1
+%ifarch x86_64
+%global rocm_gpu_list "gfx9-generic;gfx942;gfx950;gfx10-1-generic;gfx10-3-generic;gfx1100;gfx1101;gfx1102;gfx1103;gfx1150;gfx1151;gfx1152;gfx1153;gfx1200;gfx1201"
+%bcond rocm 1
+%global backend_config \\\
+ -DOLLAMA_LLAMA_BACKENDS="vulkan;rocm_v7_2" \\\
+ -DAMDGPU_TARGETS=%{rocm_gpu_list}
+%else
+%bcond rocm 0
+%global backend_config \\\
+ -DOLLAMA_LLAMA_BACKENDS=vulkan \\\
+%endif
+
+%bcond vulkan 1
+
+%if %{with rocm}
+%global toolchain rocm
+# hipcc does not support some clang flags
+%global build_cxxflags %(echo %{optflags} | sed -e 's/-fstack-protector-strong/-Xarch_host -fstack-protector-strong/' -e 's/-fcf-protection/-Xarch_host -fcf-protection/' -e 's/-mtls-dialect=gnu2//')
+%else
+%global toolchain gcc
+%endif
+
+%global cmake_config \\\
+ %{backend_config} \\\
+ -DCMAKE_INSTALL_RPATH=%{_prefix}/lib/ollama/ \\\
+ -DCMAKE_SKIP_INSTALL_RPATH=ON \\\
+ -DCMAKE_SKIP_RPATH=ON
+
# https://github.com/ollama/ollama
%global goipath github.com/ollama/ollama
%if %{with next}
Version: 0.32.8
%else
-Version: 0.33.1
+Version: 0.35.1
%endif
%gometa -L -f
@@ -26,7 +54,7 @@ Release: %autorelease
Summary: Get up and running with OpenAI gpt-oss, DeepSeek-R1, Gemma 3 and other models
# Generated by go-vendor-tools
-License: Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-3-Clause-HP AND BSL-1.0 AND CC-BY-3.0 AND CC-BY-4.0 AND CC0-1.0 AND ISC AND LicenseRef-Fedora-Public-Domain AND LicenseRef-scancode-protobuf AND MIT AND NCSA AND NTP AND OpenSSL AND ZPL-2.1 AND Zlib
+License: Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-3-Clause-HP AND ISC AND LicenseRef-Fedora-Public-Domain AND MIT AND Unlicense
URL: %{gourl}
Source0: %{gosource}
# Generated by go-vendor-tools
@@ -36,37 +64,112 @@ Source2: go-vendor-tools.toml
Source10: ollama.service
Source11: ollama.sysusers
%endif
+# From LLAMA_CPP_VERSION
+%global llama_cpp_version b11232
+Source20: https://github.com/ggerganov/llama.cpp/archive/%{llama_cpp_version}.tar.gz#/llama.cpp-%{llama_cpp_version}.tar.gz
Patch1: 0001-ollama-download-env-variables.patch
-Patch2: 0001-ollama-use-system-llama.cpp.patch
+Patch2: 0001-ollama-no-rpaths.patch
BuildRequires: go-vendor-tools
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: cmake
-BuildRequires: llama-cpp-devel
-%if %{with systemd}
-BuildRequires: systemd-rpm-macros
+BuildRequires: chrpath
+BuildRequires: curl
+BuildRequires: git
+BuildRequires: wget
+BuildRequires: xxd
+BuildRequires: langpacks-en
+BuildRequires: libcurl-devel
+BuildRequires: openmpi
+BuildRequires: pthreadpool-devel
+
+%if %{with rocm}
+BuildRequires: hipblas-devel
+BuildRequires: rocm-comgr-devel
+BuildRequires: rocm-hip-devel
+BuildRequires: rocblas-devel
+BuildRequires: hipblas-devel
+BuildRequires: rocm-runtime-devel
+BuildRequires: rocm-rpm-macros
%endif
-Requires: llama-cpp
-Obsoletes: ollama-base < 0.30.0
-Obsoletes: ollama-rocm < 0.30.0
-Obsoletes: ollama-vulkan < 0.30.0
+%if %{with vulkan}
+BuildRequires: glslc
+BuildRequires: spirv-headers-devel
+BuildRequires: vulkan-loader-devel
+%endif
%if %{with systemd}
+BuildRequires: systemd-rpm-macros
%{?systemd_requires}
%endif
+Requires: %{name}-base%{?_isa} = %{version}-%{release}
+%if %{with rocm}
+Requires: %{name}-rocm%{?_isa} = %{version}-%{release}
+%endif
+%if %{with vulkan}
+Requires: %{name}-vulkan%{?_isa} = %{version}-%{release}
+%endif
+
%description
Get up and running with OpenAI gpt-oss, DeepSeek-R1, Gemma 3 and other models.
+%package base
+Summary: The base ollama
+%if %{with systemd}
+%{?systemd_requires}
+%endif
+
+%description base
+%{summary}
+
+%if %{with rocm}
+%package rocm
+Summary: The ROCm backend for ollama
+Requires: hipblas
+Requires: rocblas
+
+%description rocm
+%{summary}
+%endif
+
+%if %{with vulkan}
+%package vulkan
+Summary: The Vulkan backend for ollama
+
+%description vulkan
+%{summary}
+%endif
+
%prep
%goprep -A
%setup -q -T -D -a1 %{forgesetupargs}
%autopatch -p1
+tar xzf %{SOURCE20} -C ./llama/ --strip-components=1
+# we are bundling because ollama patches llama.cpp to workaround problems
+# with the system llama.cpp
+cd llama
+# check when upstream ollama stops patching and throw an error
+if [ ! -d compat ] || [ -z "$(ls compat/*.patch 2>/dev/null)" ]; then
+ echo "Good news! No patches found in compat/, you can stop bundling llama.cpp"
+ false
+fi
+# Apply all patches manually in order.
+# 001 is the "Ollama Hooks" patch (Fixes the model loading/metadata issues)
+# 002 is the "CLEF" patch (Fixes Vision/CLEF architecture issues)
+for p in compat/0*.patch; do
+ echo "Applying $p..."
+ patch -p1 < "$p"
+done
+cd ..
+# Force the llama.cpp source dir
+sed -i '/compat\/compat.cmake/a set(FETCHCONTENT_SOURCE_DIR_LLAMA_CPP "${CMAKE_SOURCE_DIR}/llama" CACHE PATH "" FORCE)' cmake/local.cmake
+
# Rename README's
mv app/README.md app-README.md
mv integration/README.md integration-README.md
@@ -92,8 +195,7 @@ sed -i 's@zTail = strrchr@zTail = (char \*)strrchr@' vendor/github.com/mattn/go-
%go_vendor_license_buildrequires -c %{S:2}
%build
-%cmake
-
+%cmake %{cmake_config}
%cmake_build
%global gomodulesmode GO111MODULE=on
@@ -109,6 +211,19 @@ export GO_LDFLAGS="-X=github.com/ollama/ollama/version.Version=%{version} -X=git
%gobuild -o %{gobuilddir}/bin/ollama %{goipath}
%install
+%cmake_install
+
+for f in `find %{buildroot}%{_prefix}/lib/ollama -name 'libggml*.so'`; do
+ chrpath -d $f
+done
+%if %{with rocm}
+rm -rf %{buildroot}%{_prefix}/lib/ollama/rocm_v7_2/rocblas
+R="libamd_comgr libamdhip64 libdrm_amdgpu libdrm libelf libhipblas libhsa-runtime64 libnuma librocblas librocsolver"
+for r in $R; do
+ rm -f %{buildroot}%{_prefix}/lib/ollama/rocm_v7_2/${r}*
+done
+%endif
+
mkdir -p %{buildroot}%{_bindir}
install -m 0755 -vp %{gobuilddir}/bin/ollama %{buildroot}%{_bindir}
@@ -125,13 +240,24 @@ mkdir -p %{buildroot}%{_var}/lib/ollama
install -m 0755 -vd %{buildroot}%{_bindir}
install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/
-# symlink system llama-server
-mkdir -p %{buildroot}%{_prefix}/lib/ollama
-pushd %{buildroot}%{_prefix}/lib/ollama
-ln -s ../../bin/llama-server llama-server
-popd
-
%check
+# Verify llama.cpp version matches the spec file
+# Read the version from the local source file (ignoring whitespace/newlines)
+if [ -f LLAMA_CPP_VERSION ]; then
+ read -r LOCAL_LLAMA_CPP_VERSION < LLAMA_CPP_VERSION
+
+ # Compare against the global variable defined at the top of the spec
+ if [ ${LOCAL_LLAMA_CPP_VERSION} != "%{llama_cpp_version}" ]; then
+ echo "FATAL: Build aborted. llama.cpp source version does not match spec file." >&2
+ echo " Spec File version: %{llama_cpp_version}" >&2
+ echo " Source File version: ${LOCAL_LLAMA_CPP_VERSION}" >&2
+ false
+ fi
+else
+ echo "Could not find LLAMA_CPP_VERSION file"
+ false
+fi
+
%go_vendor_license_check -c %{S:2}
%if %{with check}
%gotest ./...
@@ -148,13 +274,16 @@ popd
%systemd_postun_with_restart ollama.service
%endif
-%files -f %{go_vendor_license_filelist}
+%files
%doc README.md
+
+%files -f %{go_vendor_license_filelist} base
%license vendor/modules.txt
%doc CONTRIBUTING.md SECURITY.md README.md app-README.md integration-README.md
%doc llama-README.md
%{_bindir}/ollama
%{_prefix}/lib/ollama/llama-server
+%{_prefix}/lib/ollama/llama-quantize
%if %{with systemd}
%attr(0755,ollama,ollama) %dir %{_var}/lib/ollama/
@@ -162,5 +291,20 @@ popd
%{_sysusersdir}/ollama.conf
%endif
+%{_prefix}/lib/ollama/*_LICENSE
+%{_prefix}/lib/ollama/libggml*
+%{_prefix}/lib/ollama/libllama*
+%{_prefix}/lib/ollama/libmt*
+
+%if %{with rocm}
+%files rocm
+%{_prefix}/lib/ollama/rocm_v7_2/
+%endif
+
+%if %{with vulkan}
+%files vulkan
+%{_prefix}/lib/ollama/vulkan/
+%endif
+
%changelog
%autochangelog
diff --git a/sources b/sources
index 44ba025..4138434 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,3 @@
-SHA512 (ollama-0.33.1.tar.gz) = ce353a7c51f4d94a072bee1894e8bb7044822e2ac43707df677654bf89b6d43b117ccd59010648e18354504d3a77970e7573e720906fcaa4528ca116d37ede32
-SHA512 (ollama-0.33.1-vendor.tar.bz2) = de04ff7b6375da58fc09f04e4a07749229a7663e4cf70f2a5280e9346fd0e8e88f3be822c9f3175ae95a7b5cba940f07211dda690b91d6fcdfdf472d9ca44837
+SHA512 (ollama-0.35.1.tar.gz) = 2986679fd5b9fb35d5c20671a5fdb468fd7438364293413fe2440d58cf2cce0acd8851f9ce50705232f278dd33cfbd239d49ef27049a1580a7c156ae4875dbff
+SHA512 (ollama-0.35.1-vendor.tar.bz2) = 4131be4c21a0b1110a6b41d5aae522cb6f17bc15e614bd7f6d7ad9e60bfb20a28e329b128b36892400427781248effa5d61823bfff97c0e12fe0727ea00d704e
+SHA512 (llama.cpp-b11232.tar.gz) = 639744a78b6832fee8b1c4fe3009f4b7df1945718765e6ac84f577b3907894613f13f620c8f2224dc6b13cfc1fab0e1dea0b464191fd1f721a176d6fbe92f69f
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-11 15:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-11 15:17 [rpms/ollama] rawhide: Update to 0.35.1 Tom Rix
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox