Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] grafana: update to 7.3.8 & fix baked-in version.
@ 2021-12-26 14:10 lotheac
  2022-01-11  7:18 ` lotheac
                   ` (20 more replies)
  0 siblings, 21 replies; 22+ messages in thread
From: lotheac @ 2021-12-26 14:10 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 604 bytes --]

There is a new pull request by lotheac against master on the void-packages repository

https://github.com/lotheac/void-packages grafana-7.3.8
https://github.com/void-linux/void-packages/pull/34705

grafana: update to 7.3.8 & fix baked-in version.
#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, x86_64 (musl)

7.4.0 and newer require node >= 14.0, so 7.3.8 is the highest we can go with a trivial update.


A patch file from https://github.com/void-linux/void-packages/pull/34705.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-grafana-7.3.8-34705.patch --]
[-- Type: text/x-diff, Size: 1468 bytes --]

From 7d5abb43a37f62e0a26c8a7ca8c882f53433873e Mon Sep 17 00:00:00 2001
From: Lauri Tirkkonen <lauri@hacktheplanet.fi>
Date: Sun, 26 Dec 2021 15:08:01 +0200
Subject: [PATCH] grafana: update to 7.3.8 & fix baked-in version.

---
 srcpkgs/grafana/template | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/grafana/template b/srcpkgs/grafana/template
index ce65acaf7850..46dae2a1ee05 100644
--- a/srcpkgs/grafana/template
+++ b/srcpkgs/grafana/template
@@ -1,7 +1,7 @@
 # Template file for 'grafana'
 pkgname=grafana
-version=7.1.5
-revision=2
+version=7.3.8
+revision=1
 build_style=go
 go_import_path=github.com/grafana/grafana
 go_package="${go_import_path}/pkg/cmd/grafana-cli ${go_import_path}/pkg/cmd/grafana-server"
@@ -11,7 +11,7 @@ maintainer="Michael Aldridge <maldridge@voidlinux.org>"
 license="Apache-2.0"
 homepage="https://grafana.com"
 distfiles="https://github.com/grafana/grafana/archive/v${version}.tar.gz"
-checksum=7ae69011674a5b6a792e8ec84c93e8be9d50ad2e995cc63f3508d0b2e7acb754
+checksum=1944e3ec965d1098a0b7b46539d66ca349b51d983775296dcef3f15a8b7aff26
 
 system_accounts="_grafana"
 _grafana_homedir="/var/lib/grafana"
@@ -19,6 +19,8 @@ make_dirs="/var/log/grafana 0755 _grafana _grafana"
 
 conf_files="/etc/grafana/grafana.ini"
 
+go_ldflags="-w -X main.version=${version}"
+
 case "$XBPS_TARGET_MACHINE" in
 	i686*) broken="yarn can't be built for i686" ;;
 	ppc*) broken="fails to build v8 in a dependency" ;;

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

* Re: grafana: update to 7.3.8 & fix baked-in version.
  2021-12-26 14:10 [PR PATCH] grafana: update to 7.3.8 & fix baked-in version lotheac
@ 2022-01-11  7:18 ` lotheac
  2022-01-11  7:20 ` the-maldridge
                   ` (19 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: lotheac @ 2022-01-11  7:18 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 162 bytes --]

New comment by lotheac on void-packages repository

https://github.com/void-linux/void-packages/pull/34705#issuecomment-1009661526

Comment:
ping @the-maldridge 

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

* Re: grafana: update to 7.3.8 & fix baked-in version.
  2021-12-26 14:10 [PR PATCH] grafana: update to 7.3.8 & fix baked-in version lotheac
  2022-01-11  7:18 ` lotheac
@ 2022-01-11  7:20 ` the-maldridge
  2022-01-11  7:22 ` lotheac
                   ` (18 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: the-maldridge @ 2022-01-11  7:20 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 386 bytes --]

New comment by the-maldridge on void-packages repository

https://github.com/void-linux/void-packages/pull/34705#issuecomment-1009662717

Comment:
I saw this and was quite surprised to see that the node version requirements had changed.  Originally this package was built to rebuild the JS locally, but the grafana project also provided precompiled versions.  Is that still the case?


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

* Re: grafana: update to 7.3.8 & fix baked-in version.
  2021-12-26 14:10 [PR PATCH] grafana: update to 7.3.8 & fix baked-in version lotheac
  2022-01-11  7:18 ` lotheac
  2022-01-11  7:20 ` the-maldridge
@ 2022-01-11  7:22 ` lotheac
  2022-01-11  7:24 ` the-maldridge
                   ` (17 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: lotheac @ 2022-01-11  7:22 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 393 bytes --]

New comment by lotheac on void-packages repository

https://github.com/void-linux/void-packages/pull/34705#issuecomment-1009664361

Comment:
I'm not sure, I didn't look very closely at versions greater than 7.3.8 since my immediate problem at the time only required 7.2.something, and since 7.4.0 would have meant bigger changes. To clarify, this PR does not change node version requirements.

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

* Re: grafana: update to 7.3.8 & fix baked-in version.
  2021-12-26 14:10 [PR PATCH] grafana: update to 7.3.8 & fix baked-in version lotheac
                   ` (2 preceding siblings ...)
  2022-01-11  7:22 ` lotheac
@ 2022-01-11  7:24 ` the-maldridge
  2022-01-11  7:40 ` lotheac
                   ` (16 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: the-maldridge @ 2022-01-11  7:24 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 216 bytes --]

New comment by the-maldridge on void-packages repository

https://github.com/void-linux/void-packages/pull/34705#issuecomment-1009665069

Comment:
Right, I'm asking if the node requirement can be removed completely.

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

* Re: grafana: update to 7.3.8 & fix baked-in version.
  2021-12-26 14:10 [PR PATCH] grafana: update to 7.3.8 & fix baked-in version lotheac
                   ` (3 preceding siblings ...)
  2022-01-11  7:24 ` the-maldridge
@ 2022-01-11  7:40 ` lotheac
  2022-01-11  7:41 ` the-maldridge
                   ` (15 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: lotheac @ 2022-01-11  7:40 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 422 bytes --]

New comment by lotheac on void-packages repository

https://github.com/void-linux/void-packages/pull/34705#issuecomment-1009674411

Comment:
Good question. I experimentally removed the yarn build steps from the package, but that resulted in the application returning a 500 error when installed. It would need further investigation. I can dig deeper a bit later -- do you want me to do so as part of this PR or separately?

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

* Re: grafana: update to 7.3.8 & fix baked-in version.
  2021-12-26 14:10 [PR PATCH] grafana: update to 7.3.8 & fix baked-in version lotheac
                   ` (4 preceding siblings ...)
  2022-01-11  7:40 ` lotheac
@ 2022-01-11  7:41 ` the-maldridge
  2022-01-11  9:35 ` [PR PATCH] [Updated] " lotheac
                   ` (14 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: the-maldridge @ 2022-01-11  7:41 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 388 bytes --]

New comment by the-maldridge on void-packages repository

https://github.com/void-linux/void-packages/pull/34705#issuecomment-1009675073

Comment:
Please do so as part of this PR.  The yarn build comes from a time where we insisted on building every part of a package internally, and while this is good in principal, for vendored JS it winds up being *a lot* more trouble than its worth.

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

* Re: [PR PATCH] [Updated] grafana: update to 7.3.8 & fix baked-in version.
  2021-12-26 14:10 [PR PATCH] grafana: update to 7.3.8 & fix baked-in version lotheac
                   ` (5 preceding siblings ...)
  2022-01-11  7:41 ` the-maldridge
@ 2022-01-11  9:35 ` lotheac
  2022-01-11  9:37 ` grafana: update to 8.3.3 lotheac
                   ` (13 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: lotheac @ 2022-01-11  9:35 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 609 bytes --]

There is an updated pull request by lotheac against master on the void-packages repository

https://github.com/lotheac/void-packages grafana-7.3.8
https://github.com/void-linux/void-packages/pull/34705

grafana: update to 7.3.8 & fix baked-in version.
#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, x86_64 (musl)

7.4.0 and newer require node >= 14.0, so 7.3.8 is the highest we can go with a trivial update.


A patch file from https://github.com/void-linux/void-packages/pull/34705.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-grafana-7.3.8-34705.patch --]
[-- Type: text/x-diff, Size: 2324 bytes --]

From 2f33066cfd6ae799e3fae5b1daf912d7a23d58de Mon Sep 17 00:00:00 2001
From: Lauri Tirkkonen <lauri@hacktheplanet.fi>
Date: Sun, 26 Dec 2021 15:08:01 +0200
Subject: [PATCH] grafana: update to 8.3.3

switch to using prebuilt js files, dropping the node build requirement.
also fix the baked-in version numbers in the binaries.
---
 srcpkgs/grafana/template | 32 ++++++++++++++++++++------------
 1 file changed, 20 insertions(+), 12 deletions(-)

diff --git a/srcpkgs/grafana/template b/srcpkgs/grafana/template
index ce65acaf7850..7cd02eaef351 100644
--- a/srcpkgs/grafana/template
+++ b/srcpkgs/grafana/template
@@ -1,17 +1,19 @@
 # Template file for 'grafana'
 pkgname=grafana
-version=7.1.5
-revision=2
+version=8.3.3
+revision=1
 build_style=go
 go_import_path=github.com/grafana/grafana
 go_package="${go_import_path}/pkg/cmd/grafana-cli ${go_import_path}/pkg/cmd/grafana-server"
-hostmakedepends="nodejs-lts tar yarn"
+hostmakedepends="tar make"
 short_desc="Open platform for beautiful analytics and monitoring"
 maintainer="Michael Aldridge <maldridge@voidlinux.org>"
 license="Apache-2.0"
 homepage="https://grafana.com"
-distfiles="https://github.com/grafana/grafana/archive/v${version}.tar.gz"
-checksum=7ae69011674a5b6a792e8ec84c93e8be9d50ad2e995cc63f3508d0b2e7acb754
+distfiles="https://dl.grafana.com/oss/release/grafana-${version}.linux-amd64.tar.gz
+https://github.com/grafana/grafana/archive/v${version}.tar.gz"
+checksum="89428c520e004bcb9faf7618dd4c81ff62496064cbf2ead3e1b9dbcf476c6f18
+c79e19f056b9c2fc6d29c622edfaf8aff4985cec28ea6a9e74dce5eac077e735"
 
 system_accounts="_grafana"
 _grafana_homedir="/var/lib/grafana"
@@ -19,17 +21,23 @@ make_dirs="/var/log/grafana 0755 _grafana _grafana"
 
 conf_files="/etc/grafana/grafana.ini"
 
-case "$XBPS_TARGET_MACHINE" in
-	i686*) broken="yarn can't be built for i686" ;;
-	ppc*) broken="fails to build v8 in a dependency" ;;
-esac
+go_ldflags="-w -X main.version=${version}"
+
+post_extract() {
+	# remove prebuilt binaries
+	rm bin/*
+}
 
 pre_build() {
-	yarn install --pure-lockfile
+	make gen-go
 }
 
-post_build() {
-	yarn run build
+do_install() {
+	# only install grafana binaries - GOPATH/bin contains eg. wire used at
+	# buildtime, which we don't want in the package
+	for f in ${GOPATH}/bin/grafana-*; do
+		vbin "$f"
+	done
 }
 
 post_install() {

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

* Re: grafana: update to 8.3.3
  2021-12-26 14:10 [PR PATCH] grafana: update to 7.3.8 & fix baked-in version lotheac
                   ` (6 preceding siblings ...)
  2022-01-11  9:35 ` [PR PATCH] [Updated] " lotheac
@ 2022-01-11  9:37 ` lotheac
  2022-01-11 10:00 ` lotheac
                   ` (12 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: lotheac @ 2022-01-11  9:37 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 378 bytes --]

New comment by lotheac on void-packages repository

https://github.com/void-linux/void-packages/pull/34705#issuecomment-1009764087

Comment:
rewrote commit to use upstream's prebuilt js files, removing the node requirement, and updated to latest available 8.3.3.

my old config file was incompatible with this version -- I'm not sure how things like that are handled in void.

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

* Re: grafana: update to 8.3.3
  2021-12-26 14:10 [PR PATCH] grafana: update to 7.3.8 & fix baked-in version lotheac
                   ` (7 preceding siblings ...)
  2022-01-11  9:37 ` grafana: update to 8.3.3 lotheac
@ 2022-01-11 10:00 ` lotheac
  2022-01-11 16:00 ` [PR PATCH] [Updated] " lotheac
                   ` (11 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: lotheac @ 2022-01-11 10:00 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 212 bytes --]

New comment by lotheac on void-packages repository

https://github.com/void-linux/void-packages/pull/34705#issuecomment-1009781759

Comment:
seems like github broke PR builds today by disabling git:// cloning...

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

* Re: [PR PATCH] [Updated] grafana: update to 8.3.3
  2021-12-26 14:10 [PR PATCH] grafana: update to 7.3.8 & fix baked-in version lotheac
                   ` (8 preceding siblings ...)
  2022-01-11 10:00 ` lotheac
@ 2022-01-11 16:00 ` lotheac
  2022-01-11 16:02 ` lotheac
                   ` (10 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: lotheac @ 2022-01-11 16:00 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 618 bytes --]

There is an updated pull request by lotheac against master on the void-packages repository

https://github.com/lotheac/void-packages grafana-7.3.8
https://github.com/void-linux/void-packages/pull/34705

grafana: update to 8.3.3
switch to using prebuilt js files, dropping the node build requirement.
also fix the baked-in version numbers in the binaries.

#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, x86_64 (musl)


A patch file from https://github.com/void-linux/void-packages/pull/34705.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-grafana-7.3.8-34705.patch --]
[-- Type: text/x-diff, Size: 2324 bytes --]

From dc077726d5e0fcd3ce65e49997cc10f344e3691c Mon Sep 17 00:00:00 2001
From: Lauri Tirkkonen <lauri@hacktheplanet.fi>
Date: Sun, 26 Dec 2021 15:08:01 +0200
Subject: [PATCH] grafana: update to 8.3.3

switch to using prebuilt js files, dropping the node build requirement.
also fix the baked-in version numbers in the binaries.
---
 srcpkgs/grafana/template | 32 ++++++++++++++++++++------------
 1 file changed, 20 insertions(+), 12 deletions(-)

diff --git a/srcpkgs/grafana/template b/srcpkgs/grafana/template
index ce65acaf7850..7cd02eaef351 100644
--- a/srcpkgs/grafana/template
+++ b/srcpkgs/grafana/template
@@ -1,17 +1,19 @@
 # Template file for 'grafana'
 pkgname=grafana
-version=7.1.5
-revision=2
+version=8.3.3
+revision=1
 build_style=go
 go_import_path=github.com/grafana/grafana
 go_package="${go_import_path}/pkg/cmd/grafana-cli ${go_import_path}/pkg/cmd/grafana-server"
-hostmakedepends="nodejs-lts tar yarn"
+hostmakedepends="tar make"
 short_desc="Open platform for beautiful analytics and monitoring"
 maintainer="Michael Aldridge <maldridge@voidlinux.org>"
 license="Apache-2.0"
 homepage="https://grafana.com"
-distfiles="https://github.com/grafana/grafana/archive/v${version}.tar.gz"
-checksum=7ae69011674a5b6a792e8ec84c93e8be9d50ad2e995cc63f3508d0b2e7acb754
+distfiles="https://dl.grafana.com/oss/release/grafana-${version}.linux-amd64.tar.gz
+https://github.com/grafana/grafana/archive/v${version}.tar.gz"
+checksum="89428c520e004bcb9faf7618dd4c81ff62496064cbf2ead3e1b9dbcf476c6f18
+c79e19f056b9c2fc6d29c622edfaf8aff4985cec28ea6a9e74dce5eac077e735"
 
 system_accounts="_grafana"
 _grafana_homedir="/var/lib/grafana"
@@ -19,17 +21,23 @@ make_dirs="/var/log/grafana 0755 _grafana _grafana"
 
 conf_files="/etc/grafana/grafana.ini"
 
-case "$XBPS_TARGET_MACHINE" in
-	i686*) broken="yarn can't be built for i686" ;;
-	ppc*) broken="fails to build v8 in a dependency" ;;
-esac
+go_ldflags="-w -X main.version=${version}"
+
+post_extract() {
+	# remove prebuilt binaries
+	rm bin/*
+}
 
 pre_build() {
-	yarn install --pure-lockfile
+	make gen-go
 }
 
-post_build() {
-	yarn run build
+do_install() {
+	# only install grafana binaries - GOPATH/bin contains eg. wire used at
+	# buildtime, which we don't want in the package
+	for f in ${GOPATH}/bin/grafana-*; do
+		vbin "$f"
+	done
 }
 
 post_install() {

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

* Re: grafana: update to 8.3.3
  2021-12-26 14:10 [PR PATCH] grafana: update to 7.3.8 & fix baked-in version lotheac
                   ` (9 preceding siblings ...)
  2022-01-11 16:00 ` [PR PATCH] [Updated] " lotheac
@ 2022-01-11 16:02 ` lotheac
  2022-01-11 16:16 ` the-maldridge
                   ` (9 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: lotheac @ 2022-01-11 16:02 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 181 bytes --]

New comment by lotheac on void-packages repository

https://github.com/void-linux/void-packages/pull/34705#issuecomment-1010110222

Comment:
rebased since CI seems fixed on master.

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

* Re: grafana: update to 8.3.3
  2021-12-26 14:10 [PR PATCH] grafana: update to 7.3.8 & fix baked-in version lotheac
                   ` (10 preceding siblings ...)
  2022-01-11 16:02 ` lotheac
@ 2022-01-11 16:16 ` the-maldridge
  2022-01-11 16:58 ` [PR PATCH] [Updated] " lotheac
                   ` (8 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: the-maldridge @ 2022-01-11 16:16 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 423 bytes --]

New comment by the-maldridge on void-packages repository

https://github.com/void-linux/void-packages/pull/34705#issuecomment-1010124493

Comment:
Yes use of the legacy `git://` protocol is being phased out, we fixed this some time ago on master.  As to how config file changes are handled in void, the best answer I can give is "dubiously".  I will build and test after work today and look to getting this merged tonight.

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

* Re: [PR PATCH] [Updated] grafana: update to 8.3.3
  2021-12-26 14:10 [PR PATCH] grafana: update to 7.3.8 & fix baked-in version lotheac
                   ` (11 preceding siblings ...)
  2022-01-11 16:16 ` the-maldridge
@ 2022-01-11 16:58 ` lotheac
  2022-01-11 17:00 ` lotheac
                   ` (7 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: lotheac @ 2022-01-11 16:58 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 618 bytes --]

There is an updated pull request by lotheac against master on the void-packages repository

https://github.com/lotheac/void-packages grafana-7.3.8
https://github.com/void-linux/void-packages/pull/34705

grafana: update to 8.3.3
switch to using prebuilt js files, dropping the node build requirement.
also fix the baked-in version numbers in the binaries.

#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, x86_64 (musl)


A patch file from https://github.com/void-linux/void-packages/pull/34705.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-grafana-7.3.8-34705.patch --]
[-- Type: text/x-diff, Size: 2925 bytes --]

From dc077726d5e0fcd3ce65e49997cc10f344e3691c Mon Sep 17 00:00:00 2001
From: Lauri Tirkkonen <lauri@hacktheplanet.fi>
Date: Sun, 26 Dec 2021 15:08:01 +0200
Subject: [PATCH 1/2] grafana: update to 8.3.3

switch to using prebuilt js files, dropping the node build requirement.
also fix the baked-in version numbers in the binaries.
---
 srcpkgs/grafana/template | 32 ++++++++++++++++++++------------
 1 file changed, 20 insertions(+), 12 deletions(-)

diff --git a/srcpkgs/grafana/template b/srcpkgs/grafana/template
index ce65acaf7850..7cd02eaef351 100644
--- a/srcpkgs/grafana/template
+++ b/srcpkgs/grafana/template
@@ -1,17 +1,19 @@
 # Template file for 'grafana'
 pkgname=grafana
-version=7.1.5
-revision=2
+version=8.3.3
+revision=1
 build_style=go
 go_import_path=github.com/grafana/grafana
 go_package="${go_import_path}/pkg/cmd/grafana-cli ${go_import_path}/pkg/cmd/grafana-server"
-hostmakedepends="nodejs-lts tar yarn"
+hostmakedepends="tar make"
 short_desc="Open platform for beautiful analytics and monitoring"
 maintainer="Michael Aldridge <maldridge@voidlinux.org>"
 license="Apache-2.0"
 homepage="https://grafana.com"
-distfiles="https://github.com/grafana/grafana/archive/v${version}.tar.gz"
-checksum=7ae69011674a5b6a792e8ec84c93e8be9d50ad2e995cc63f3508d0b2e7acb754
+distfiles="https://dl.grafana.com/oss/release/grafana-${version}.linux-amd64.tar.gz
+https://github.com/grafana/grafana/archive/v${version}.tar.gz"
+checksum="89428c520e004bcb9faf7618dd4c81ff62496064cbf2ead3e1b9dbcf476c6f18
+c79e19f056b9c2fc6d29c622edfaf8aff4985cec28ea6a9e74dce5eac077e735"
 
 system_accounts="_grafana"
 _grafana_homedir="/var/lib/grafana"
@@ -19,17 +21,23 @@ make_dirs="/var/log/grafana 0755 _grafana _grafana"
 
 conf_files="/etc/grafana/grafana.ini"
 
-case "$XBPS_TARGET_MACHINE" in
-	i686*) broken="yarn can't be built for i686" ;;
-	ppc*) broken="fails to build v8 in a dependency" ;;
-esac
+go_ldflags="-w -X main.version=${version}"
+
+post_extract() {
+	# remove prebuilt binaries
+	rm bin/*
+}
 
 pre_build() {
-	yarn install --pure-lockfile
+	make gen-go
 }
 
-post_build() {
-	yarn run build
+do_install() {
+	# only install grafana binaries - GOPATH/bin contains eg. wire used at
+	# buildtime, which we don't want in the package
+	for f in ${GOPATH}/bin/grafana-*; do
+		vbin "$f"
+	done
 }
 
 post_install() {

From 106b6b47da6c068ab964ec0f907a5d738c79c963 Mon Sep 17 00:00:00 2001
From: Lauri Tirkkonen <lauri@hacktheplanet.fi>
Date: Tue, 11 Jan 2022 18:58:18 +0200
Subject: [PATCH 2/2] grafana: use host arch for 'make gen-go'

---
 srcpkgs/grafana/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/grafana/template b/srcpkgs/grafana/template
index 7cd02eaef351..4651224451a0 100644
--- a/srcpkgs/grafana/template
+++ b/srcpkgs/grafana/template
@@ -29,7 +29,7 @@ post_extract() {
 }
 
 pre_build() {
-	make gen-go
+	GOARCH=$XBPS_MACHINE make gen-go
 }
 
 do_install() {

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

* Re: [PR PATCH] [Updated] grafana: update to 8.3.3
  2021-12-26 14:10 [PR PATCH] grafana: update to 7.3.8 & fix baked-in version lotheac
                   ` (12 preceding siblings ...)
  2022-01-11 16:58 ` [PR PATCH] [Updated] " lotheac
@ 2022-01-11 17:00 ` lotheac
  2022-01-11 17:04 ` lotheac
                   ` (6 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: lotheac @ 2022-01-11 17:00 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 618 bytes --]

There is an updated pull request by lotheac against master on the void-packages repository

https://github.com/lotheac/void-packages grafana-7.3.8
https://github.com/void-linux/void-packages/pull/34705

grafana: update to 8.3.3
switch to using prebuilt js files, dropping the node build requirement.
also fix the baked-in version numbers in the binaries.

#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, x86_64 (musl)


A patch file from https://github.com/void-linux/void-packages/pull/34705.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-grafana-7.3.8-34705.patch --]
[-- Type: text/x-diff, Size: 2912 bytes --]

From dc077726d5e0fcd3ce65e49997cc10f344e3691c Mon Sep 17 00:00:00 2001
From: Lauri Tirkkonen <lauri@hacktheplanet.fi>
Date: Sun, 26 Dec 2021 15:08:01 +0200
Subject: [PATCH 1/2] grafana: update to 8.3.3

switch to using prebuilt js files, dropping the node build requirement.
also fix the baked-in version numbers in the binaries.
---
 srcpkgs/grafana/template | 32 ++++++++++++++++++++------------
 1 file changed, 20 insertions(+), 12 deletions(-)

diff --git a/srcpkgs/grafana/template b/srcpkgs/grafana/template
index ce65acaf7850..7cd02eaef351 100644
--- a/srcpkgs/grafana/template
+++ b/srcpkgs/grafana/template
@@ -1,17 +1,19 @@
 # Template file for 'grafana'
 pkgname=grafana
-version=7.1.5
-revision=2
+version=8.3.3
+revision=1
 build_style=go
 go_import_path=github.com/grafana/grafana
 go_package="${go_import_path}/pkg/cmd/grafana-cli ${go_import_path}/pkg/cmd/grafana-server"
-hostmakedepends="nodejs-lts tar yarn"
+hostmakedepends="tar make"
 short_desc="Open platform for beautiful analytics and monitoring"
 maintainer="Michael Aldridge <maldridge@voidlinux.org>"
 license="Apache-2.0"
 homepage="https://grafana.com"
-distfiles="https://github.com/grafana/grafana/archive/v${version}.tar.gz"
-checksum=7ae69011674a5b6a792e8ec84c93e8be9d50ad2e995cc63f3508d0b2e7acb754
+distfiles="https://dl.grafana.com/oss/release/grafana-${version}.linux-amd64.tar.gz
+https://github.com/grafana/grafana/archive/v${version}.tar.gz"
+checksum="89428c520e004bcb9faf7618dd4c81ff62496064cbf2ead3e1b9dbcf476c6f18
+c79e19f056b9c2fc6d29c622edfaf8aff4985cec28ea6a9e74dce5eac077e735"
 
 system_accounts="_grafana"
 _grafana_homedir="/var/lib/grafana"
@@ -19,17 +21,23 @@ make_dirs="/var/log/grafana 0755 _grafana _grafana"
 
 conf_files="/etc/grafana/grafana.ini"
 
-case "$XBPS_TARGET_MACHINE" in
-	i686*) broken="yarn can't be built for i686" ;;
-	ppc*) broken="fails to build v8 in a dependency" ;;
-esac
+go_ldflags="-w -X main.version=${version}"
+
+post_extract() {
+	# remove prebuilt binaries
+	rm bin/*
+}
 
 pre_build() {
-	yarn install --pure-lockfile
+	make gen-go
 }
 
-post_build() {
-	yarn run build
+do_install() {
+	# only install grafana binaries - GOPATH/bin contains eg. wire used at
+	# buildtime, which we don't want in the package
+	for f in ${GOPATH}/bin/grafana-*; do
+		vbin "$f"
+	done
 }
 
 post_install() {

From 42d443abba2aea5790ad2c52ea84e38219859325 Mon Sep 17 00:00:00 2001
From: Lauri Tirkkonen <lauri@hacktheplanet.fi>
Date: Tue, 11 Jan 2022 18:58:18 +0200
Subject: [PATCH 2/2] grafana: use host arch for 'make gen-go'

---
 srcpkgs/grafana/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/grafana/template b/srcpkgs/grafana/template
index 7cd02eaef351..b3002a2cee8e 100644
--- a/srcpkgs/grafana/template
+++ b/srcpkgs/grafana/template
@@ -29,7 +29,7 @@ post_extract() {
 }
 
 pre_build() {
-	make gen-go
+	GOARCH= make gen-go
 }
 
 do_install() {

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

* Re: grafana: update to 8.3.3
  2021-12-26 14:10 [PR PATCH] grafana: update to 7.3.8 & fix baked-in version lotheac
                   ` (13 preceding siblings ...)
  2022-01-11 17:00 ` lotheac
@ 2022-01-11 17:04 ` lotheac
  2022-01-11 17:24 ` [PR PATCH] [Updated] " lotheac
                   ` (5 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: lotheac @ 2022-01-11 17:04 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 407 bytes --]

New comment by lotheac on void-packages repository

https://github.com/void-linux/void-packages/pull/34705#issuecomment-1010172630

Comment:
the `gen-go` make target expects to run go code on the host machine, so cross compilation fails. the commit I added just now attempts to address it but doesn't (sorry -- shouldn't have pushed it without testing the cross compilation locally first). figuring it out.

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

* Re: [PR PATCH] [Updated] grafana: update to 8.3.3
  2021-12-26 14:10 [PR PATCH] grafana: update to 7.3.8 & fix baked-in version lotheac
                   ` (14 preceding siblings ...)
  2022-01-11 17:04 ` lotheac
@ 2022-01-11 17:24 ` lotheac
  2022-01-11 17:25 ` lotheac
                   ` (4 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: lotheac @ 2022-01-11 17:24 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 618 bytes --]

There is an updated pull request by lotheac against master on the void-packages repository

https://github.com/lotheac/void-packages grafana-7.3.8
https://github.com/void-linux/void-packages/pull/34705

grafana: update to 8.3.3
switch to using prebuilt js files, dropping the node build requirement.
also fix the baked-in version numbers in the binaries.

#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, x86_64 (musl)


A patch file from https://github.com/void-linux/void-packages/pull/34705.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-grafana-7.3.8-34705.patch --]
[-- Type: text/x-diff, Size: 3232 bytes --]

From dc077726d5e0fcd3ce65e49997cc10f344e3691c Mon Sep 17 00:00:00 2001
From: Lauri Tirkkonen <lauri@hacktheplanet.fi>
Date: Sun, 26 Dec 2021 15:08:01 +0200
Subject: [PATCH 1/2] grafana: update to 8.3.3

switch to using prebuilt js files, dropping the node build requirement.
also fix the baked-in version numbers in the binaries.
---
 srcpkgs/grafana/template | 32 ++++++++++++++++++++------------
 1 file changed, 20 insertions(+), 12 deletions(-)

diff --git a/srcpkgs/grafana/template b/srcpkgs/grafana/template
index ce65acaf7850..7cd02eaef351 100644
--- a/srcpkgs/grafana/template
+++ b/srcpkgs/grafana/template
@@ -1,17 +1,19 @@
 # Template file for 'grafana'
 pkgname=grafana
-version=7.1.5
-revision=2
+version=8.3.3
+revision=1
 build_style=go
 go_import_path=github.com/grafana/grafana
 go_package="${go_import_path}/pkg/cmd/grafana-cli ${go_import_path}/pkg/cmd/grafana-server"
-hostmakedepends="nodejs-lts tar yarn"
+hostmakedepends="tar make"
 short_desc="Open platform for beautiful analytics and monitoring"
 maintainer="Michael Aldridge <maldridge@voidlinux.org>"
 license="Apache-2.0"
 homepage="https://grafana.com"
-distfiles="https://github.com/grafana/grafana/archive/v${version}.tar.gz"
-checksum=7ae69011674a5b6a792e8ec84c93e8be9d50ad2e995cc63f3508d0b2e7acb754
+distfiles="https://dl.grafana.com/oss/release/grafana-${version}.linux-amd64.tar.gz
+https://github.com/grafana/grafana/archive/v${version}.tar.gz"
+checksum="89428c520e004bcb9faf7618dd4c81ff62496064cbf2ead3e1b9dbcf476c6f18
+c79e19f056b9c2fc6d29c622edfaf8aff4985cec28ea6a9e74dce5eac077e735"
 
 system_accounts="_grafana"
 _grafana_homedir="/var/lib/grafana"
@@ -19,17 +21,23 @@ make_dirs="/var/log/grafana 0755 _grafana _grafana"
 
 conf_files="/etc/grafana/grafana.ini"
 
-case "$XBPS_TARGET_MACHINE" in
-	i686*) broken="yarn can't be built for i686" ;;
-	ppc*) broken="fails to build v8 in a dependency" ;;
-esac
+go_ldflags="-w -X main.version=${version}"
+
+post_extract() {
+	# remove prebuilt binaries
+	rm bin/*
+}
 
 pre_build() {
-	yarn install --pure-lockfile
+	make gen-go
 }
 
-post_build() {
-	yarn run build
+do_install() {
+	# only install grafana binaries - GOPATH/bin contains eg. wire used at
+	# buildtime, which we don't want in the package
+	for f in ${GOPATH}/bin/grafana-*; do
+		vbin "$f"
+	done
 }
 
 post_install() {

From 615903dbb07dab148556c2ceb72696aa29224811 Mon Sep 17 00:00:00 2001
From: Lauri Tirkkonen <lauri@hacktheplanet.fi>
Date: Tue, 11 Jan 2022 18:58:18 +0200
Subject: [PATCH 2/2] grafana: fix cross builds

---
 srcpkgs/grafana/template | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/grafana/template b/srcpkgs/grafana/template
index 7cd02eaef351..2636bceb76a9 100644
--- a/srcpkgs/grafana/template
+++ b/srcpkgs/grafana/template
@@ -29,14 +29,16 @@ post_extract() {
 }
 
 pre_build() {
-	make gen-go
+	CGO_ENABLED=0 GOARCH= make gen-go
 }
 
 do_install() {
 	# only install grafana binaries - GOPATH/bin contains eg. wire used at
 	# buildtime, which we don't want in the package
-	for f in ${GOPATH}/bin/grafana-*; do
-		vbin "$f"
+	for f in ${GOPATH}/bin/grafana-* ${GOPATH}/bin/*/grafana-*; do
+		if [ -f "$f" ] && [ -x "$f" ]; then
+			vbin "$f"
+		fi
 	done
 }
 

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

* Re: grafana: update to 8.3.3
  2021-12-26 14:10 [PR PATCH] grafana: update to 7.3.8 & fix baked-in version lotheac
                   ` (15 preceding siblings ...)
  2022-01-11 17:24 ` [PR PATCH] [Updated] " lotheac
@ 2022-01-11 17:25 ` lotheac
  2022-01-12  2:06 ` the-maldridge
                   ` (3 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: lotheac @ 2022-01-11 17:25 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 247 bytes --]

New comment by lotheac on void-packages repository

https://github.com/void-linux/void-packages/pull/34705#issuecomment-1010191896

Comment:
cross builds will now (hopefully) succeed. apologies for making you approve the workflow so many times (:

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

* Re: grafana: update to 8.3.3
  2021-12-26 14:10 [PR PATCH] grafana: update to 7.3.8 & fix baked-in version lotheac
                   ` (16 preceding siblings ...)
  2022-01-11 17:25 ` lotheac
@ 2022-01-12  2:06 ` the-maldridge
  2022-01-12  6:01 ` [PR PATCH] [Updated] " lotheac
                   ` (2 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: the-maldridge @ 2022-01-12  2:06 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 316 bytes --]

New comment by the-maldridge on void-packages repository

https://github.com/void-linux/void-packages/pull/34705#issuecomment-1010557951

Comment:
Overall your patch looks okay.  I'm having trouble fetching from github at the moment, so the build isn't working locally.  Can you squash your commits in the meantime?

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

* Re: [PR PATCH] [Updated] grafana: update to 8.3.3
  2021-12-26 14:10 [PR PATCH] grafana: update to 7.3.8 & fix baked-in version lotheac
                   ` (17 preceding siblings ...)
  2022-01-12  2:06 ` the-maldridge
@ 2022-01-12  6:01 ` lotheac
  2022-01-12  6:02 ` lotheac
  2022-01-13  5:09 ` [PR PATCH] [Closed]: " the-maldridge
  20 siblings, 0 replies; 22+ messages in thread
From: lotheac @ 2022-01-12  6:01 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 618 bytes --]

There is an updated pull request by lotheac against master on the void-packages repository

https://github.com/lotheac/void-packages grafana-7.3.8
https://github.com/void-linux/void-packages/pull/34705

grafana: update to 8.3.3
switch to using prebuilt js files, dropping the node build requirement.
also fix the baked-in version numbers in the binaries.

#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, x86_64 (musl)


A patch file from https://github.com/void-linux/void-packages/pull/34705.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-grafana-7.3.8-34705.patch --]
[-- Type: text/x-diff, Size: 2420 bytes --]

From ffcb0247027d9d292e3e085494a999fd5d6ced18 Mon Sep 17 00:00:00 2001
From: Lauri Tirkkonen <lauri@hacktheplanet.fi>
Date: Sun, 26 Dec 2021 15:08:01 +0200
Subject: [PATCH] grafana: update to 8.3.3

switch to using prebuilt js files, dropping the node build requirement.
also fix the baked-in version numbers in the binaries.
---
 srcpkgs/grafana/template | 34 ++++++++++++++++++++++------------
 1 file changed, 22 insertions(+), 12 deletions(-)

diff --git a/srcpkgs/grafana/template b/srcpkgs/grafana/template
index ce65acaf7850..2636bceb76a9 100644
--- a/srcpkgs/grafana/template
+++ b/srcpkgs/grafana/template
@@ -1,17 +1,19 @@
 # Template file for 'grafana'
 pkgname=grafana
-version=7.1.5
-revision=2
+version=8.3.3
+revision=1
 build_style=go
 go_import_path=github.com/grafana/grafana
 go_package="${go_import_path}/pkg/cmd/grafana-cli ${go_import_path}/pkg/cmd/grafana-server"
-hostmakedepends="nodejs-lts tar yarn"
+hostmakedepends="tar make"
 short_desc="Open platform for beautiful analytics and monitoring"
 maintainer="Michael Aldridge <maldridge@voidlinux.org>"
 license="Apache-2.0"
 homepage="https://grafana.com"
-distfiles="https://github.com/grafana/grafana/archive/v${version}.tar.gz"
-checksum=7ae69011674a5b6a792e8ec84c93e8be9d50ad2e995cc63f3508d0b2e7acb754
+distfiles="https://dl.grafana.com/oss/release/grafana-${version}.linux-amd64.tar.gz
+https://github.com/grafana/grafana/archive/v${version}.tar.gz"
+checksum="89428c520e004bcb9faf7618dd4c81ff62496064cbf2ead3e1b9dbcf476c6f18
+c79e19f056b9c2fc6d29c622edfaf8aff4985cec28ea6a9e74dce5eac077e735"
 
 system_accounts="_grafana"
 _grafana_homedir="/var/lib/grafana"
@@ -19,17 +21,25 @@ make_dirs="/var/log/grafana 0755 _grafana _grafana"
 
 conf_files="/etc/grafana/grafana.ini"
 
-case "$XBPS_TARGET_MACHINE" in
-	i686*) broken="yarn can't be built for i686" ;;
-	ppc*) broken="fails to build v8 in a dependency" ;;
-esac
+go_ldflags="-w -X main.version=${version}"
+
+post_extract() {
+	# remove prebuilt binaries
+	rm bin/*
+}
 
 pre_build() {
-	yarn install --pure-lockfile
+	CGO_ENABLED=0 GOARCH= make gen-go
 }
 
-post_build() {
-	yarn run build
+do_install() {
+	# only install grafana binaries - GOPATH/bin contains eg. wire used at
+	# buildtime, which we don't want in the package
+	for f in ${GOPATH}/bin/grafana-* ${GOPATH}/bin/*/grafana-*; do
+		if [ -f "$f" ] && [ -x "$f" ]; then
+			vbin "$f"
+		fi
+	done
 }
 
 post_install() {

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

* Re: grafana: update to 8.3.3
  2021-12-26 14:10 [PR PATCH] grafana: update to 7.3.8 & fix baked-in version lotheac
                   ` (18 preceding siblings ...)
  2022-01-12  6:01 ` [PR PATCH] [Updated] " lotheac
@ 2022-01-12  6:02 ` lotheac
  2022-01-13  5:09 ` [PR PATCH] [Closed]: " the-maldridge
  20 siblings, 0 replies; 22+ messages in thread
From: lotheac @ 2022-01-12  6:02 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 151 bytes --]

New comment by lotheac on void-packages repository

https://github.com/void-linux/void-packages/pull/34705#issuecomment-1010666876

Comment:
squashed.

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

* Re: [PR PATCH] [Closed]: grafana: update to 8.3.3
  2021-12-26 14:10 [PR PATCH] grafana: update to 7.3.8 & fix baked-in version lotheac
                   ` (19 preceding siblings ...)
  2022-01-12  6:02 ` lotheac
@ 2022-01-13  5:09 ` the-maldridge
  20 siblings, 0 replies; 22+ messages in thread
From: the-maldridge @ 2022-01-13  5:09 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 456 bytes --]

There's a closed pull request on the void-packages repository

grafana: update to 8.3.3
https://github.com/void-linux/void-packages/pull/34705

Description:
switch to using prebuilt js files, dropping the node build requirement.
also fix the baked-in version numbers in the binaries.

#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, x86_64 (musl)


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

end of thread, other threads:[~2022-01-13  5:09 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-26 14:10 [PR PATCH] grafana: update to 7.3.8 & fix baked-in version lotheac
2022-01-11  7:18 ` lotheac
2022-01-11  7:20 ` the-maldridge
2022-01-11  7:22 ` lotheac
2022-01-11  7:24 ` the-maldridge
2022-01-11  7:40 ` lotheac
2022-01-11  7:41 ` the-maldridge
2022-01-11  9:35 ` [PR PATCH] [Updated] " lotheac
2022-01-11  9:37 ` grafana: update to 8.3.3 lotheac
2022-01-11 10:00 ` lotheac
2022-01-11 16:00 ` [PR PATCH] [Updated] " lotheac
2022-01-11 16:02 ` lotheac
2022-01-11 16:16 ` the-maldridge
2022-01-11 16:58 ` [PR PATCH] [Updated] " lotheac
2022-01-11 17:00 ` lotheac
2022-01-11 17:04 ` lotheac
2022-01-11 17:24 ` [PR PATCH] [Updated] " lotheac
2022-01-11 17:25 ` lotheac
2022-01-12  2:06 ` the-maldridge
2022-01-12  6:01 ` [PR PATCH] [Updated] " lotheac
2022-01-12  6:02 ` lotheac
2022-01-13  5:09 ` [PR PATCH] [Closed]: " the-maldridge

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).