public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/proj/guru:master commit in: dev-ml/ollama/
@ 2024-07-08 16:47 David Roman
  0 siblings, 0 replies; 3+ messages in thread
From: David Roman @ 2024-07-08 16:47 UTC (permalink / raw
  To: gentoo-commits

commit:     f0eb17f75400cdea0262eadf2b3ba90425b9d29f
Author:     Vitaly Zdanevich <zdanevich.vitaly <AT> ya <DOT> ru>
AuthorDate: Mon Jul  8 04:25:07 2024 +0000
Commit:     David Roman <davidroman96 <AT> gmail <DOT> com>
CommitDate: Mon Jul  8 04:25:07 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=f0eb17f7

dev-ml/ollama: fix --version

Closes https://github.com/gentoo/guru/pull/205

Signed-off-by: Vitaly Zdanevich <zdanevich.vitaly <AT> ya.ru>

 dev-ml/ollama/ollama-9999.ebuild | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/dev-ml/ollama/ollama-9999.ebuild b/dev-ml/ollama/ollama-9999.ebuild
index a0dd04624..62369f277 100644
--- a/dev-ml/ollama/ollama-9999.ebuild
+++ b/dev-ml/ollama/ollama-9999.ebuild
@@ -42,6 +42,12 @@ src_unpack() {
 }
 
 src_compile() {
+	VERSION=$(
+		git describe --tags --first-parent --abbrev=7 --long --dirty --always \
+		| sed -e "s/^v//g"
+	)
+	export GOFLAGS="'-ldflags=-w -s \"-X=github.com/ollama/ollama/version.Version=$VERSION\"'"
+
 	ego generate ./...
 	ego build .
 }


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/proj/guru:master commit in: dev-ml/ollama/
@ 2024-07-11 16:47 David Roman
  0 siblings, 0 replies; 3+ messages in thread
From: David Roman @ 2024-07-11 16:47 UTC (permalink / raw
  To: gentoo-commits

commit:     ec9321fa791adba089e1c378427309c594587e31
Author:     Lucio Sauer <watermanpaint <AT> posteo <DOT> net>
AuthorDate: Thu Jul 11 00:49:08 2024 +0000
Commit:     David Roman <davidroman96 <AT> gmail <DOT> com>
CommitDate: Thu Jul 11 00:52:08 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=ec9321fa

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 <AT> posteo.net>

 dev-ml/ollama/ollama-9999.ebuild | 8 +++++---
 1 file 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"


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/proj/guru:master commit in: dev-ml/ollama/
@ 2024-07-11 16:47 David Roman
  0 siblings, 0 replies; 3+ messages in thread
From: David Roman @ 2024-07-11 16:47 UTC (permalink / raw
  To: gentoo-commits

commit:     4e7eaeaafeb248b9a06de9d6b929b2f348fdc4a2
Author:     Lucio Sauer <watermanpaint <AT> posteo <DOT> net>
AuthorDate: Thu Jul 11 00:50:34 2024 +0000
Commit:     David Roman <davidroman96 <AT> gmail <DOT> com>
CommitDate: Thu Jul 11 00:52:11 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=4e7eaeaa

dev-ml/ollama: add missing pipe exit status check

Fix variable order
Remove redundant file mode change
Add braces to variable

Signed-off-by: Lucio Sauer <watermanpaint <AT> posteo.net>

 dev-ml/ollama/ollama-9999.ebuild | 19 +++++++------------
 1 file changed, 7 insertions(+), 12 deletions(-)

diff --git a/dev-ml/ollama/ollama-9999.ebuild b/dev-ml/ollama/ollama-9999.ebuild
index a8b1e063e..3db009887 100644
--- a/dev-ml/ollama/ollama-9999.ebuild
+++ b/dev-ml/ollama/ollama-9999.ebuild
@@ -13,6 +13,11 @@ SLOT="0"
 
 IUSE="nvidia amd"
 
+RDEPEND="
+	acct-group/ollama
+	acct-user/ollama
+"
+IDEPEND="${RDEPEND}"
 BDEPEND="
 	>=dev-lang/go-1.21.0
 	>=dev-build/cmake-3.24
@@ -24,16 +29,6 @@ BDEPEND="
 	)
 "
 
-RDEPEND="
-	acct-group/ollama
-	acct-user/ollama
-"
-
-IDEPEND="
-	acct-group/ollama
-	acct-user/ollama
-"
-
 pkg_pretend() {
 	if use amd; then
 		ewarn "WARNING: AMD & Nvidia support in this ebuild are experimental"
@@ -53,8 +48,9 @@ src_compile() {
 	VERSION=$(
 		git describe --tags --first-parent --abbrev=7 --long --dirty --always \
 		| sed -e "s/^v//g"
+		assert
 	)
-	export GOFLAGS="'-ldflags=-w -s \"-X=github.com/ollama/ollama/version.Version=$VERSION\"'"
+	export GOFLAGS="'-ldflags=-w -s \"-X=github.com/ollama/ollama/version.Version=${VERSION}\"'"
 
 	ego generate ./...
 	ego build .
@@ -63,7 +59,6 @@ src_compile() {
 src_install() {
 	dobin ollama
 	doinitd "${FILESDIR}"/ollama
-	fperms 0755 /etc/init.d/ollama
 }
 
 pkg_preinst() {


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-07-11 16:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-08 16:47 [gentoo-commits] repo/proj/guru:master commit in: dev-ml/ollama/ David Roman
  -- strict thread matches above, loose matches on Subject: below --
2024-07-11 16:47 David Roman
2024-07-11 16:47 David Roman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox