From 166fd7c886cc14124e1071edde3efb74044dff79 Mon Sep 17 00:00:00 2001 From: tohurtv Date: Wed, 19 Nov 2025 01:25:10 -0700 Subject: [PATCH] First Commit --- debian/changelog | 5 +++++ debian/control | 11 +++++++++++ debian/copyright | 10 ++++++++++ debian/install | 3 +++ debian/rules | 16 ++++++++++++++++ debian/source/format | 1 + usr/lib/systemd/system/ollama.service | 22 ++++++++++++++++++++++ usr/lib/sysusers.d/ollama.conf | 2 ++ usr/lib/tmpfiles.d/ollama.conf | 1 + 9 files changed, 71 insertions(+) create mode 100644 debian/changelog create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/install create mode 100755 debian/rules create mode 100644 debian/source/format create mode 100644 usr/lib/systemd/system/ollama.service create mode 100644 usr/lib/sysusers.d/ollama.conf create mode 100644 usr/lib/tmpfiles.d/ollama.conf diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..2d47d5d --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +ollama (0.12.11rakuos1) unstable; urgency=medium + + * Initial packaging. + + -- Joshua Webb Thu, 06 Nov 2025 22:40:00 -0700 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..5da03bf --- /dev/null +++ b/debian/control @@ -0,0 +1,11 @@ +Source: ollama +Section: metapackages +Priority: optional +Maintainer: RakuOS Team +Build-Depends: debhelper-compat (= 13), +Standards-Version: 4.6.2 + +Package: ollama +Architecture: amd64 +Depends: ${shlibs:Depends}, ${misc:Depends}, +Description: Create, run and share large language models (LLMs). diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..5b4d8b3 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,10 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: RakuOS Branding +Upstream-Contact: Joshua Webb +Source: https://rakuos.org/ + +Files: * +Copyright: 2025 Joshua Webb +License: GPL-3+ + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License version 3 or later. diff --git a/debian/install b/debian/install new file mode 100644 index 0000000..424db7c --- /dev/null +++ b/debian/install @@ -0,0 +1,3 @@ +ollama-linux-amd64/* usr/ +usr/* usr/ +var/* var/ diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..a590832 --- /dev/null +++ b/debian/rules @@ -0,0 +1,16 @@ +#!/usr/bin/make -f +# Simple dh (debhelper) build rules file +%: + dh $@ + +# Prevent dh_strip from running on this package +override_dh_strip: + @echo "Skipping dh_strip for Ollama (bundled libs)" + +override_dh_shlibdeps: + @echo "Skipping dh_shlibdeps for Ollama (bundled libs)" + +override_dh_fixperms: + dh_fixperms + chmod 755 debian/ollama/usr/bin/ollama + chmod u+x debian/ollama/usr/bin/ollama diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..89ae9db --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (native) diff --git a/usr/lib/systemd/system/ollama.service b/usr/lib/systemd/system/ollama.service new file mode 100644 index 0000000..909498a --- /dev/null +++ b/usr/lib/systemd/system/ollama.service @@ -0,0 +1,22 @@ +[Unit] +Description=Ollama Service +Wants=network-online.target +After=network.target network-online.target + +[Service] +ExecStart=/usr/bin/ollama serve +WorkingDirectory=/var/lib/ollama +Environment="HOME=/var/lib/ollama" +Environment="OLLAMA_MODELS=/var/lib/ollama" +User=ollama +Group=ollama +Restart=on-failure +RestartSec=3 +RestartPreventExitStatus=1 +Type=simple +PrivateTmp=yes +ProtectSystem=full +ProtectHome=yes + +[Install] +WantedBy=multi-user.target diff --git a/usr/lib/sysusers.d/ollama.conf b/usr/lib/sysusers.d/ollama.conf new file mode 100644 index 0000000..81fc3aa --- /dev/null +++ b/usr/lib/sysusers.d/ollama.conf @@ -0,0 +1,2 @@ +g ollama - - +u! ollama - "ollama user" /var/lib/ollama diff --git a/usr/lib/tmpfiles.d/ollama.conf b/usr/lib/tmpfiles.d/ollama.conf new file mode 100644 index 0000000..cb73c01 --- /dev/null +++ b/usr/lib/tmpfiles.d/ollama.conf @@ -0,0 +1 @@ +Q /var/lib/ollama 0755 ollama ollama