commit: f0ba99ae524b3c6fae9696507590e9a5376de095
Author: Paul Zander <negril.nx+gentoo <AT> gmail <DOT> com>
AuthorDate: Mon Mar 31 17:11:03 2025 +0000
Commit: Paul Zander <negril.nx+gentoo <AT> gmail <DOT> com>
CommitDate: Mon Mar 31 17:11:03 2025 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=f0ba99ae
acct-user/ollama: require video group with cuda
Signed-off-by: Paul Zander <negril.nx+gentoo <AT> gmail.com>
acct-user/ollama/{ollama-1.ebuild => ollama-2.ebuild} | 19 +++++++++++++++++--
sci-ml/ollama/ollama-0.5.7-r1.ebuild | 2 +-
sci-ml/ollama/ollama-9999.ebuild | 2 +-
3 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/acct-user/ollama/ollama-1.ebuild b/acct-user/ollama/ollama-2.ebuild
similarity index 50%
rename from acct-user/ollama/ollama-1.ebuild
rename to acct-user/ollama/ollama-2.ebuild
index d20e1276d..eb2d2c211 100644
--- a/acct-user/ollama/ollama-1.ebuild
+++ b/acct-user/ollama/ollama-2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2024 Gentoo Authors
+# Copyright 2024-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -8,7 +8,22 @@ inherit acct-user
DESCRIPTION="A user for ollama"
ACCT_USER_ID=-1
ACCT_USER_HOME=/var/lib/ollama
-ACCT_USER_HOME_PERMS=0700
+ACCT_USER_HOME_PERMS=0750
ACCT_USER_GROUPS=( ollama )
+IUSE="cuda"
+
acct-user_add_deps
+
+RDEPEND+="
+ cuda? (
+ acct-group/video
+ )
+"
+
+pkg_setup() {
+ # sci-ml/ollama[cuda]
+ if use cuda; then
+ ACCT_USER_GROUPS+=( video )
+ fi
+}
diff --git a/sci-ml/ollama/ollama-0.5.7-r1.ebuild
b/sci-ml/ollama/ollama-0.5.7-r1.ebuild
index 7146a2fda..2b920e642 100644
--- a/sci-ml/ollama/ollama-0.5.7-r1.ebuild
+++ b/sci-ml/ollama/ollama-0.5.7-r1.ebuild
@@ -55,7 +55,7 @@ DEPEND="
RDEPEND="
acct-group/${PN}
- acct-user/${PN}
+ acct-user/${PN}[cuda?]
"
PATCHES=(
diff --git a/sci-ml/ollama/ollama-9999.ebuild b/sci-ml/ollama/ollama-9999.ebuild
index adca12245..d2f6a46c4 100644
--- a/sci-ml/ollama/ollama-9999.ebuild
+++ b/sci-ml/ollama/ollama-9999.ebuild
@@ -63,7 +63,7 @@ DEPEND="
RDEPEND="
${COMMON_DEPEND}
acct-group/${PN}
- acct-user/${PN}
+ acct-user/${PN}[cuda?]
"
src_unpack() {