SHA256
1
0
forked from pool/ollama

Add reproducible.patch for deterministic .gz creation (boo#1047218)

OBS-URL: https://build.opensuse.org/package/show/science:machinelearning/ollama?expand=0&rev=70
This commit is contained in:
Eyad Issa 2024-12-12 14:52:49 +00:00 committed by Git OBS Bridge
parent 785c029f70
commit 80cfae2b5d
3 changed files with 19 additions and 0 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Dec 12 14:00:56 UTC 2024 - Bernhard Wiedemann <bwiedemann@suse.com>
- Add reproducible.patch for deterministic .gz creation (boo#1047218)
-------------------------------------------------------------------
Sat Dec 07 18:24:04 UTC 2024 - Eyad Issa <eyadlorenzo@gmail.com>

View File

@ -27,6 +27,7 @@ Source1: vendor.tar.zstd
Source2: ollama.service
Source3: %{name}-user.conf
Patch1: 01-build-verbose.patch
Patch2: reproducible.patch
BuildRequires: cmake >= 3.24
BuildRequires: git
BuildRequires: sysuser-tools

13
reproducible.patch Normal file
View 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)