[-- 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" ;;
[-- 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
[-- 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?
[-- 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.
[-- 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.
[-- 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?
[-- 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.
[-- 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() {
[-- 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.
[-- 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...
[-- 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() {
[-- 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.
[-- 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.
[-- 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() {
[-- 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() {
[-- 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.
[-- 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 }
[-- 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 (:
[-- 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?
[-- 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() {
[-- 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.
[-- 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)