Commit 4f5aa295 authored by Konstantin Kulikov's avatar Konstantin Kulikov Committed by Leo

testing/grafana: upgrade to 6.5.1

Also switch back to -mod=vendor mode because:
grafana ships incorrect go.mod file
even more tests broke in module mode with this upgrade
parent 8a07ba17
# Contributor: Konstantin Kulikov <k.kulikov2@gmail.com>
# Maintainer: Konstantin Kulikov <k.kulikov2@gmail.com>
pkgname=grafana
pkgver=6.4.4
pkgver=6.5.1
pkgrel=0
_commit=092e51408a # git rev-parse --short HEAD
_stamp=1573041873 # git --no-pager show -s --format=%ct
_commit=1763a0fd80 # git rev-parse --short HEAD
_stamp=1574927029 # git --no-pager show -s --format=%ct
pkgdesc="Open source, feature rich metrics dashboard and graph editor"
url="https://grafana.com"
arch="x86_64" # Builds are slow on arm archs, x86 requires python2.
license="Apache-2.0"
makedepends="go nodejs yarn"
options="chmod-clean" # Can be replaced with -modcacherw in go1.14
install="$pkgname.pre-install"
subpackages="$pkgname-openrc"
source="$pkgname-$pkgver.tar.gz::https://github.com/grafana/grafana/archive/v$pkgver.tar.gz
go.mod go.sum apk.go $pkgname.initd $pkgname.confd"
builddir=$srcdir
$pkgname.initd $pkgname.confd"
export GOPATH=${GOPATH:-$srcdir/go}
export GOCACHE=${GOCACHE:-$srcdir/go-build}
......@@ -27,11 +25,8 @@ export GOTMPDIR=${GOTMPDIR:-$srcdir}
build() {
local ldflags="-X main.version=$pkgver -X main.commit=$_commit -X main.buildstamp=$_stamp"
for pkg in $(go list -f '{{ join .Imports " " }}'); do
go build -ldflags "$ldflags" -mod=readonly -v $pkg
done
cd $builddir/$pkgname-$pkgver
go build -ldflags "$ldflags" -mod=vendor -v github.com/grafana/grafana/pkg/cmd/grafana-server
go build -ldflags "$ldflags" -mod=vendor -v github.com/grafana/grafana/pkg/cmd/grafana-cli
# Don't pollute our git repo with grafanas commit hooks.
# Also don't try to install phantomjs since it depends on glibc.
......@@ -44,8 +39,7 @@ build() {
}
check() {
# Skipped tests do not work in module mode.
go test $(go list github.com/grafana/grafana/pkg/... | grep -Ev '(provisioning/dashboards)|(infra/log)|(grafana-cli/commands)')
go test -mod=vendor ./...
}
package() {
......@@ -53,14 +47,11 @@ package() {
install -Dm644 "$srcdir/$pkgname.confd" "$pkgdir/etc/conf.d/$pkgname"
install -Dm755 "$builddir/$pkgname-server" "$pkgdir/usr/sbin/$pkgname-server"
install -Dm755 "$builddir/$pkgname-cli" "$pkgdir/usr/bin/$pkgname-cli"
install -Dm644 "$builddir/$pkgname-$pkgver/conf/sample.ini" "$pkgdir/etc/grafana.ini"
install -Dm644 "$builddir/conf/sample.ini" "$pkgdir/etc/grafana.ini"
install -dm755 "$pkgdir/usr/share/grafana"
cp -r "$builddir/$pkgname-$pkgver/conf" "$builddir/$pkgname-$pkgver/public" "$pkgdir/usr/share/$pkgname/"
cp -r "$builddir/conf" "$builddir/public" "$pkgdir/usr/share/$pkgname/"
}
sha512sums="5499b0491bbdcc056b576f0e680798a8f9aeea3e3538d45d1cfe68bdc283579939e35ec3b8f921333c655c90b985e82a74635e9dcc356ced354b3305ce4efa79 grafana-6.4.4.tar.gz
ee3e915c75aad9b80218f98c47eef418a5655a7dd4d7b3f6b1923aaca13a065b0f5b04ad92922d365ce84d1e0b2c700a434c315a18a363c25b8c23959892a449 go.mod
10caa000cba330bb9e223c3072b492b2c88152f21f49a857ce498f5306a504c9fe6eaa271e971b004fa0adf937cf5e4c584f56dce9318b2aeab36c550396fb0a go.sum
8fff794134b497c1d272ac69972bb468849007cb32b9255d792b74a58aea7be739d3db348da686a26fb092244c614a300dfffafb74c58a34a7c7505138158b19 apk.go
sha512sums="693e685495145fccf986f2c118a9ccbf07abd1d4b15330042ba320d82dea563266de34f35a5cbe3c5008a2502731cfa6e7b26b0c900c60648d625199d287807a grafana-6.5.1.tar.gz
b0a781e1b1e33741a97e231c761b1200239c6f1235ffbe82311fe883387eb23bef262ad68256ebd6cf87d74298041b53b947ea7a493cfa5aa814b2a1c5181e13 grafana.initd
c2afa7f6baf8f468fbd781b0522cbff173bb0c3964eb08fc4a0951d034e8a1f3f9c14798e2ac487b3c20db834110883db8162039b18195e97bb9f4bc5baffc33 grafana.confd"
package apk
import (
_ "github.com/grafana/grafana/pkg/cmd/grafana-server"
_ "github.com/grafana/grafana/pkg/cmd/grafana-cli"
)
module apk
go 1.13
require (
github.com/grafana/grafana v1.9.2-0.20191106120433-092e51408a7b
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898 // indirect
)
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment