diff options
author | 2024-07-11 02:49:08 +0200 | |
---|---|---|
committer | 2024-07-11 02:52:08 +0200 | |
commit | ec9321fa791adba089e1c378427309c594587e31 (patch) | |
tree | 25706cce9bec98527a8a0026d16d8f84fe20bed0 /dev-ml | |
parent | games-strategy/gigalomania: fix does not respect CFLAGS (diff) | |
download | guru-ec9321fa791adba089e1c378427309c594587e31.tar.gz guru-ec9321fa791adba089e1c378427309c594587e31.tar.bz2 guru-ec9321fa791adba089e1c378427309c594587e31.zip |
dev-ml/ollama: move log ownership changes to pkg_preinst
Since the ollama UID and GID are dynamically assigned, we cannot rely on
them being the same on different machines. Calling fowners ollama:ollama
<file> in src_install could cause permission issues at runtime, when
e.g. a binary package is created on one machine and used on another.
Moving the offending code to pkg_preinst, which is called for binary and
source packages, solves the issue.
Closes: https://github.com/gentoo/guru/pull/210
Signed-off-by: Lucio Sauer <watermanpaint@posteo.net>
Diffstat (limited to 'dev-ml')
-rw-r--r-- | dev-ml/ollama/ollama-9999.ebuild | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/dev-ml/ollama/ollama-9999.ebuild b/dev-ml/ollama/ollama-9999.ebuild index 269471175..a8b1e063e 100644 --- a/dev-ml/ollama/ollama-9999.ebuild +++ b/dev-ml/ollama/ollama-9999.ebuild @@ -61,14 +61,16 @@ src_compile() { } src_install() { - touch /var/log/ollama.log || die - fowners ollama:ollama /var/log/ollama.log - dobin ollama doinitd "${FILESDIR}"/ollama fperms 0755 /etc/init.d/ollama } +pkg_preinst() { + touch /var/log/ollama.log || die + fowners ollama:ollama /var/log/ollama.log +} + pkg_postinst() { einfo "Quick guide:" einfo "ollama serve" |