mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-10 23:52:59 -04:00
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>
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user