From a77cfdb5eb288c59cc9313c5b477e0b577042ed3 Mon Sep 17 00:00:00 2001 From: Liwei Ge Date: Wed, 28 Dec 2022 20:40:59 +0800 Subject: [PATCH] spec: support loongarch build --- grafana.spec | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/grafana.spec b/grafana.spec index 4ebe726..48a9a53 100644 --- a/grafana.spec +++ b/grafana.spec @@ -1,3 +1,4 @@ +%define anolis_release .0.1 # Specify if the frontend will be compiled as part of the build or # is attached as a webpack tarball (in case of an unsuitable nodejs version on the build system) %define compile_frontend 0 @@ -95,6 +96,10 @@ BuildRequires: yarnpkg BuildRequires: openssl-devel %endif +%ifarch loongarch64 +BuildRequires: golang-vendored-golang.org +%endif + %global GRAFANA_USER %{name} %global GRAFANA_GROUP %{name} @@ -731,6 +736,11 @@ rm -r plugins-bundled # can be removed in a future Go release export GOEXPERIMENT=boringcrypto # see grafana-X.Y.Z/pkg/build/cmd.go +%ifarch loongarch64 +rm -rf vendor/golang.org/x/sys +cp -arp %{_datadir}/golang/vendor/golang.org/x/sys/ vendor/golang.org/x/ +%endif + export LDFLAGS="-X main.version=%{version} -X main.buildstamp=${SOURCE_DATE_EPOCH}" for cmd in grafana-cli grafana-server; do %gobuild -o %{_builddir}/bin/${cmd} ./pkg/cmd/${cmd} @@ -899,6 +909,9 @@ OPENSSL_FORCE_FIPS_MODE=1 GOLANG_FIPS=1 go test -v ./pkg/util -run TestEncryptio %changelog +* Wed Dec 28 2022 Liwei Ge 9.0.9-2.0.1 +- Support loongarch build + * Tue Nov 01 2022 Stan Cox 9.0.9-2 - resolve CVE-2022-39229 grafana: Using email as a username can prevent other users from signing in - resolve CVE-2022-2880 CVE-2022-41715 grafana: various flaws -- Gitee