- Removed 01-build-verbose.patch: embedded GOFLAG into .spec file
- Disabled reproducible.patch: should be not needed, as .gz is not produced anymore - Update to version 0.5.7: OBS-URL: https://build.opensuse.org/package/show/science:machinelearning/ollama?expand=0&rev=72
This commit is contained in:
commit
16f46deeb3
25
.gitattributes
vendored
Normal file
25
.gitattributes
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
||||
## Specific LFS patterns
|
||||
vendor.tar.zstd filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
34
01-build-verbose.patch
Normal file
34
01-build-verbose.patch
Normal file
@ -0,0 +1,34 @@
|
||||
diff --git a/llama/make/Makefile.default b/llama/make/Makefile.default
|
||||
index 95b13a7..6a9b9ef 100644
|
||||
--- a/llama/make/Makefile.default
|
||||
+++ b/llama/make/Makefile.default
|
||||
@@ -24,17 +24,17 @@ all: $(BUILD_RUNNERS) $(DIST_RUNNERS) $(PAYLOAD_RUNNERS)
|
||||
$(RUNNERS_BUILD_DIR)/$(DEFAULT_RUNNER)/ollama_llama_server$(EXE_EXT): TARGET_CPU_FLAGS=$(CUSTOM_CPU_FLAGS)
|
||||
$(RUNNERS_BUILD_DIR)/$(DEFAULT_RUNNER)/ollama_llama_server$(EXE_EXT): *.go ./runner/*.go $(COMMON_SRCS) $(COMMON_HDRS)
|
||||
@-mkdir -p $(dir $@)
|
||||
- GOARCH=$(ARCH) go build -buildmode=pie $(CPU_GOFLAGS) -trimpath $(if $(CUSTOM_CPU_FLAGS),-tags $(subst $(space),$(comma),$(CUSTOM_CPU_FLAGS))) -o $@ ./runner
|
||||
+ GOARCH=$(ARCH) go build -buildmode=pie -v $(CPU_GOFLAGS) -trimpath $(if $(CUSTOM_CPU_FLAGS),-tags $(subst $(space),$(comma),$(CUSTOM_CPU_FLAGS))) -o $@ ./runner
|
||||
|
||||
$(RUNNERS_BUILD_DIR)/cpu_avx/ollama_llama_server$(EXE_EXT): TARGET_CPU_FLAGS="avx"
|
||||
$(RUNNERS_BUILD_DIR)/cpu_avx/ollama_llama_server$(EXE_EXT): *.go ./runner/*.go $(COMMON_SRCS) $(COMMON_HDRS)
|
||||
@-mkdir -p $(dir $@)
|
||||
- GOARCH=$(ARCH) go build -buildmode=pie $(CPU_GOFLAGS) -trimpath -tags $(subst $(space),$(comma),$(TARGET_CPU_FLAGS)) -o $@ ./runner
|
||||
+ GOARCH=$(ARCH) go build -buildmode=pie -v $(CPU_GOFLAGS) -trimpath -tags $(subst $(space),$(comma),$(TARGET_CPU_FLAGS)) -o $@ ./runner
|
||||
|
||||
$(RUNNERS_BUILD_DIR)/cpu_avx2/ollama_llama_server$(EXE_EXT): TARGET_CPU_FLAGS="avx avx2"
|
||||
$(RUNNERS_BUILD_DIR)/cpu_avx2/ollama_llama_server$(EXE_EXT): *.go ./runner/*.go $(COMMON_SRCS) $(COMMON_HDRS)
|
||||
@-mkdir -p $(dir $@)
|
||||
- GOARCH=$(ARCH) go build -buildmode=pie $(CPU_GOFLAGS) -trimpath -tags $(subst $(space),$(comma),$(TARGET_CPU_FLAGS)) -o $@ ./runner
|
||||
+ GOARCH=$(ARCH) go build -buildmode=pie -v $(CPU_GOFLAGS) -trimpath -tags $(subst $(space),$(comma),$(TARGET_CPU_FLAGS)) -o $@ ./runner
|
||||
|
||||
$(RUNNERS_DIST_DIR)/%: $(RUNNERS_BUILD_DIR)/%
|
||||
@-mkdir -p $(dir $@)
|
||||
@@ -44,7 +44,7 @@ $(RUNNERS_PAYLOAD_DIR)/%/ollama_llama_server$(EXE_EXT).gz: $(RUNNERS_BUILD_DIR)/
|
||||
@-mkdir -p $(dir $@)
|
||||
${GZIP} --best -c $< > $@
|
||||
|
||||
-clean:
|
||||
+clean:
|
||||
rm -f $(BUILD_RUNNERS) $(DIST_RUNNERS) $(PAYLOAD_RUNNERS)
|
||||
|
||||
.PHONY: clean all
|
23
_service
Normal file
23
_service
Normal file
@ -0,0 +1,23 @@
|
||||
<services>
|
||||
<service name="format_spec_file" mode="manual" />
|
||||
<service name="obs_scm" mode="manual">
|
||||
<param name="url">https://github.com/ollama/ollama.git</param>
|
||||
<param name="scm">git</param>
|
||||
<param name="revision">v0.5.7</param>
|
||||
<param name="versionformat">@PARENT_TAG@</param>
|
||||
<param name="versionrewrite-pattern">v(.*)</param>
|
||||
<param name="changesgenerate">enable</param>
|
||||
<param name="submodules">enable</param>
|
||||
<param name="exclude">macapp</param>
|
||||
<param name="package-meta">yes</param>
|
||||
</service>
|
||||
<service name="go_modules" mode="manual">
|
||||
<param name="compression">zstd</param>
|
||||
</service>
|
||||
<service name="set_version" mode="manual" />
|
||||
|
||||
<service name="tar" mode="buildtime">
|
||||
<param name="package-meta">yes</param>
|
||||
</service>
|
||||
|
||||
</services>
|
4
_servicedata
Normal file
4
_servicedata
Normal file
@ -0,0 +1,4 @@
|
||||
<servicedata>
|
||||
<service name="tar_scm">
|
||||
<param name="url">https://github.com/ollama/ollama.git</param>
|
||||
<param name="changesrevision">a420a453b4783841e3e79c248ef0fe9548df6914</param></service></servicedata>
|
BIN
ollama-0.1.45.obscpio
(Stored with Git LFS)
Normal file
BIN
ollama-0.1.45.obscpio
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
ollama-0.2.6.obscpio
(Stored with Git LFS)
Normal file
BIN
ollama-0.2.6.obscpio
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
ollama-0.2.8.obscpio
(Stored with Git LFS)
Normal file
BIN
ollama-0.2.8.obscpio
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
ollama-0.3.0.obscpio
(Stored with Git LFS)
Normal file
BIN
ollama-0.3.0.obscpio
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
ollama-0.3.10.obscpio
(Stored with Git LFS)
Normal file
BIN
ollama-0.3.10.obscpio
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
ollama-0.3.11.obscpio
(Stored with Git LFS)
Normal file
BIN
ollama-0.3.11.obscpio
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
ollama-0.3.14.obscpio
(Stored with Git LFS)
Normal file
BIN
ollama-0.3.14.obscpio
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
ollama-0.3.3.obscpio
(Stored with Git LFS)
Normal file
BIN
ollama-0.3.3.obscpio
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
ollama-0.3.6.obscpio
(Stored with Git LFS)
Normal file
BIN
ollama-0.3.6.obscpio
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
ollama-0.4.0.obscpio
(Stored with Git LFS)
Normal file
BIN
ollama-0.4.0.obscpio
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
ollama-0.4.2.obscpio
(Stored with Git LFS)
Normal file
BIN
ollama-0.4.2.obscpio
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
ollama-0.5.1.obscpio
(Stored with Git LFS)
Normal file
BIN
ollama-0.5.1.obscpio
(Stored with Git LFS)
Normal file
Binary file not shown.
3
ollama-0.5.7.obscpio
Normal file
3
ollama-0.5.7.obscpio
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:9f6e6167b56b0baa6cf06ec12d6897c711e8d8f15bf060ba7bb56767a3cd12c5
|
||||
size 17290765
|
2
ollama-user.conf
Normal file
2
ollama-user.conf
Normal file
@ -0,0 +1,2 @@
|
||||
#Type Name ID GECOS Home directory Shell
|
||||
u ollama - "Ollama" /var/lib/ollama -
|
1082
ollama.changes
Normal file
1082
ollama.changes
Normal file
File diff suppressed because it is too large
Load Diff
4
ollama.obsinfo
Normal file
4
ollama.obsinfo
Normal file
@ -0,0 +1,4 @@
|
||||
name: ollama
|
||||
version: 0.5.7
|
||||
mtime: 1737018844
|
||||
commit: a420a453b4783841e3e79c248ef0fe9548df6914
|
13
ollama.service
Normal file
13
ollama.service
Normal file
@ -0,0 +1,13 @@
|
||||
[Unit]
|
||||
Description=Ollama Service
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/ollama serve
|
||||
User=ollama
|
||||
Group=ollama
|
||||
Restart=always
|
||||
RestartSec=3
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
113
ollama.spec
Normal file
113
ollama.spec
Normal file
@ -0,0 +1,113 @@
|
||||
#
|
||||
# spec file for package ollama
|
||||
#
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
Name: ollama
|
||||
Version: 0.5.7
|
||||
Release: 0
|
||||
Summary: Tool for running AI models on-premise
|
||||
License: MIT
|
||||
URL: https://ollama.com
|
||||
Source: %{name}-%{version}.tar
|
||||
Source1: vendor.tar.zstd
|
||||
Source2: ollama.service
|
||||
Source3: %{name}-user.conf
|
||||
#Patch1: reproducible.patch
|
||||
BuildRequires: cmake >= 3.24
|
||||
BuildRequires: git
|
||||
BuildRequires: sysuser-tools
|
||||
BuildRequires: zstd
|
||||
BuildRequires: golang(API) >= 1.22
|
||||
# 32bit seems not to be supported anymore
|
||||
ExcludeArch: %{ix86} %{arm}
|
||||
%sysusers_requires
|
||||
%if 0%{?sle_version} == 150600
|
||||
BuildRequires: gcc12-c++
|
||||
BuildRequires: libstdc++6-gcc12
|
||||
%else
|
||||
BuildRequires: gcc-c++ >= 11.4.0
|
||||
%endif
|
||||
|
||||
%description
|
||||
Ollama is a tool for running AI models on one's own hardware.
|
||||
It offers a command-line interface and a RESTful API.
|
||||
New models can be created or existing ones modified in the
|
||||
Ollama library using the Modelfile syntax.
|
||||
Source model weights found on Hugging Face and similar sites
|
||||
can be imported.
|
||||
|
||||
%prep
|
||||
%autosetup -a1 -p1
|
||||
|
||||
%build
|
||||
%sysusers_generate_pre %{SOURCE3} %{name} %{name}-user.conf
|
||||
|
||||
%ifnarch ppc64
|
||||
export GOFLAGS="-buildmode=pie -mod=vendor"
|
||||
%endif
|
||||
%if 0%{?sle_version} == 150600
|
||||
export CXX=g++-12
|
||||
export CC=gcc-12
|
||||
# pie doesn't work with gcc12 on leap
|
||||
export GOFLAGS="-mod=vendor"
|
||||
%endif
|
||||
|
||||
export GOFLAGS="${GOFLAGS} -v"
|
||||
|
||||
%make_build
|
||||
|
||||
%install
|
||||
install -D -m 0755 %{name} %{buildroot}/%{_bindir}/%{name}
|
||||
|
||||
install -D -m 0644 %{SOURCE2} %{buildroot}%{_unitdir}/%{name}.service
|
||||
install -D -m 0644 %{SOURCE3} %{buildroot}%{_sysusersdir}/%{name}-user.conf
|
||||
install -d %{buildroot}%{_localstatedir}/lib/%{name}
|
||||
|
||||
mkdir -p "%{buildroot}/%{_docdir}/%{name}"
|
||||
cp -Ra docs/* "%{buildroot}/%{_docdir}/%{name}"
|
||||
|
||||
%check
|
||||
%if 0%{?sle_version} == 150600
|
||||
export CXX=g++-12
|
||||
export CC=gcc-12
|
||||
# pie doesn't work with gcc12 on leap
|
||||
export GOFLAGS="-mod=vendor"
|
||||
%endif
|
||||
go test -v ./...
|
||||
|
||||
%pre -f %{name}.pre
|
||||
%service_add_pre %{name}.service
|
||||
|
||||
%post
|
||||
%service_add_post %{name}.service
|
||||
|
||||
%preun
|
||||
%service_del_preun %{name}.service
|
||||
|
||||
%postun
|
||||
%service_del_postun %{name}.service
|
||||
|
||||
%files
|
||||
%doc README.md
|
||||
%license LICENSE
|
||||
%{_docdir}/%{name}
|
||||
%{_bindir}/%{name}
|
||||
%{_unitdir}/%{name}.service
|
||||
%{_sysusersdir}/%{name}-user.conf
|
||||
%attr(-, ollama, ollama) %{_localstatedir}/lib/%{name}
|
||||
|
||||
%changelog
|
13
reproducible.patch
Normal file
13
reproducible.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/llama/make/Makefile.default b/llama/make/Makefile.default
|
||||
index 6a9b9ef..2ab7dfe 100644
|
||||
--- a/llama/make/Makefile.default
|
||||
+++ b/llama/make/Makefile.default
|
||||
@@ -42,7 +42,7 @@ $(RUNNERS_DIST_DIR)/%: $(RUNNERS_BUILD_DIR)/%
|
||||
|
||||
$(RUNNERS_PAYLOAD_DIR)/%/ollama_llama_server$(EXE_EXT).gz: $(RUNNERS_BUILD_DIR)/%/ollama_llama_server$(EXE_EXT)
|
||||
@-mkdir -p $(dir $@)
|
||||
- ${GZIP} --best -c $< > $@
|
||||
+ ${GZIP} -n --best -c $< > $@
|
||||
|
||||
clean:
|
||||
rm -f $(BUILD_RUNNERS) $(DIST_RUNNERS) $(PAYLOAD_RUNNERS)
|
3
vendor.tar.zstd
Normal file
3
vendor.tar.zstd
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e032bb67f22c27d950b3b9412a5b08153f40c96bf88525b0ade106c48b4b0b1b
|
||||
size 5374821
|
Loading…
x
Reference in New Issue
Block a user