diff --git a/.gitignore b/.gitignore
index 4e0b824..3a3be94 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
-SOURCES/grafana-6.7.4.tar.gz
-SOURCES/grafana_webpack-6.7.4.tar.gz
+SOURCES/grafana-7.3.6.tar.gz
+SOURCES/grafana-vendor-7.3.6.tar.xz
+SOURCES/grafana-webpack-7.3.6.tar.gz
diff --git a/.grafana.metadata b/.grafana.metadata
index 9dce1c8..084a745 100644
--- a/.grafana.metadata
+++ b/.grafana.metadata
@@ -1,2 +1,3 @@
-8bd02ed09feb9479a7f933408420354a3785dc9e SOURCES/grafana-6.7.4.tar.gz
-58bbf1928f44025278fe6a576c786fc5a8db78b0 SOURCES/grafana_webpack-6.7.4.tar.gz
+6fa572f981e490e06dfdae56256dfbf66a3fb4c9 SOURCES/grafana-7.3.6.tar.gz
+c0658ab63a4d23a5914cf1425f0b568e7b764654 SOURCES/grafana-vendor-7.3.6.tar.xz
+622c6e58ca6dab9efdf784be45315ee8bc72b229 SOURCES/grafana-webpack-7.3.6.tar.gz
diff --git a/SOURCES/001-login-oauth-use-oauth2-exchange.patch b/SOURCES/001-login-oauth-use-oauth2-exchange.patch
deleted file mode 100644
index f6dff49..0000000
--- a/SOURCES/001-login-oauth-use-oauth2-exchange.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/pkg/api/login_oauth.go b/pkg/api/login_oauth.go
-index c8c9f05b33..1b5a67aec2 100644
---- a/pkg/api/login_oauth.go
-+++ b/pkg/api/login_oauth.go
-@@ -134,7 +134,7 @@ func (hs *HTTPServer) OAuthLogin(ctx *m.ReqContext) {
- 	oauthCtx := context.WithValue(context.Background(), oauth2.HTTPClient, oauthClient)
- 
- 	// get token from provider
--	token, err := connect.Exchange(oauthCtx, code)
-+	token, err := connect.Exchange(oauthCtx, code, oauth2.AccessTypeOnline)
- 	if err != nil {
- 		ctx.Handle(500, "login.OAuthLogin(NewTransportWithCode)", err)
- 		return
diff --git a/SOURCES/001-wrappers-grafana-cli.patch b/SOURCES/001-wrappers-grafana-cli.patch
new file mode 100644
index 0000000..722d61f
--- /dev/null
+++ b/SOURCES/001-wrappers-grafana-cli.patch
@@ -0,0 +1,49 @@
+diff --git a/packaging/wrappers/grafana-cli b/packaging/wrappers/grafana-cli
+index 9cad151c0d..a786edc596 100755
+--- a/packaging/wrappers/grafana-cli
++++ b/packaging/wrappers/grafana-cli
+@@ -5,18 +5,19 @@
+ # the system-wide Grafana configuration that was bundled with the package as we
+ # use the binary.
+ 
+-DEFAULT=/etc/default/grafana
++DEFAULT=/etc/sysconfig/grafana-server
+ 
+ GRAFANA_HOME=/usr/share/grafana
+ CONF_DIR=/etc/grafana
+ DATA_DIR=/var/lib/grafana
+ PLUGINS_DIR=/var/lib/grafana/plugins
+ LOG_DIR=/var/log/grafana
++LIBEXEC_DIR=/usr/libexec/grafana
+ 
+ CONF_FILE=$CONF_DIR/grafana.ini
+ PROVISIONING_CFG_DIR=$CONF_DIR/provisioning
+ 
+-EXECUTABLE=$GRAFANA_HOME/bin/grafana-cli
++EXECUTABLE=$LIBEXEC_DIR/grafana-cli
+ 
+ if [ ! -x $EXECUTABLE ]; then
+  echo "Program not installed or not executable"
+@@ -24,6 +25,7 @@ if [ ! -x $EXECUTABLE ]; then
+ fi
+ 
+ # overwrite settings from default file
++#shellcheck disable=SC1090
+ if [ -f "$DEFAULT" ]; then
+   . "$DEFAULT"
+ fi
+@@ -36,4 +38,13 @@ OPTS="--homepath=${GRAFANA_HOME} \
+                         cfg:default.paths.logs=${LOG_DIR} \
+                         cfg:default.paths.plugins=${PLUGINS_DIR}'"
+ 
+-eval $EXECUTABLE "$OPTS" "$@"
++if [ "$(id -u)" -eq 0 ]; then
++  cd "${GRAFANA_HOME}"
++  exec runuser -u "${GRAFANA_USER}" -- "$EXECUTABLE" "$OPTS" "$@"
++elif [ "$(id -u -n)" = "${GRAFANA_USER}" ]; then
++  cd "${GRAFANA_HOME}"
++  exec "$EXECUTABLE" "$OPTS" "$@"
++else
++  echo "Please run this script as user \"${GRAFANA_USER}\" or root."
++  exit 5
++fi
diff --git a/SOURCES/002-manpages.patch b/SOURCES/002-manpages.patch
new file mode 100644
index 0000000..fa82dc4
--- /dev/null
+++ b/SOURCES/002-manpages.patch
@@ -0,0 +1,156 @@
+diff --git a/docs/man/man1/grafana-cli.1 b/docs/man/man1/grafana-cli.1
+new file mode 100644
+index 0000000000..7ac2af882c
+--- /dev/null
++++ b/docs/man/man1/grafana-cli.1
+@@ -0,0 +1,60 @@
++.TH GRAFANA "1" "December 2020" "Grafana cli version 7.3.6" "User Commands"
++.SH NAME
++grafana-cli \- command line administration for the Grafana metrics dashboard and graph editor
++.SH DESCRIPTION
++.SS "NAME:"
++.IP
++grafana-cli
++.SS "USAGE:"
++.IP
++\fBgrafana\-cli\fP [\fIglobal options\fP] \fIcommand\fP [\fIcommand options\fP] [\fIarguments\fP...]
++.SS "COMMANDS:"
++.TP
++plugins
++Manage plugins for grafana
++.TP
++admin
++Grafana admin commands
++.TP
++help, h
++Shows a list of commands or help for one command
++.SS "GLOBAL OPTIONS:"
++.TP
++\fB\-\-pluginsDir\fR value
++path to the grafana plugin directory (default: "/var/lib/grafana/plugins") [$GF_PLUGIN_DIR]
++.TP
++\fB\-\-repo\fR value
++url to the plugin repository (default: "https://grafana.com/api/plugins") [$GF_PLUGIN_REPO]
++.TP
++\fB\-\-pluginUrl\fR value
++Full url to the plugin zip file instead of downloading the plugin from grafana.com/api [$GF_PLUGIN_URL]
++.TP
++\fB\-\-insecure\fR
++Skip TLS verification (insecure)
++.TP
++\fB\-\-debug\fR, \fB\-d\fR
++enable debug logging
++.TP
++\fB\-\-configOverrides\fR value
++Configuration options to override defaults as a string. e.g. cfg:default.paths.log=/dev/null
++.TP
++\fB\-\-homepath\fR value
++Path to Grafana install/home path, defaults to working directory
++.TP
++\fB\-\-config\fR value
++Path to config file
++.TP
++\fB\-\-help\fR, \fB\-h\fR
++show help
++.TP
++\fB\-\-version\fR, \fB\-v\fR
++print the version
++.SH "SEE ALSO"
++Additional documentation for
++.B grafana-cli
++is available on-line at
++.BR http://docs.grafana.org/administration/cli/ .
++The full documentation for
++.B Grafana
++is available on-line at
++.BR http://docs.grafana.org/ .
+diff --git a/docs/man/man1/grafana-server.1 b/docs/man/man1/grafana-server.1
+new file mode 100644
+index 0000000000..c616268b31
+--- /dev/null
++++ b/docs/man/man1/grafana-server.1
+@@ -0,0 +1,84 @@
++.TH VERSION "1" "December 2020" "Version 7.3.6" "User Commands"
++.SH NAME
++grafana-server \- back-end server for the Grafana metrics dashboard and graph editor
++.SH DESCRIPTION
++.B grafana-server
++is the back-end server for the Grafana metrics dashboard and graph editor.
++The
++.B grafana-server
++program should not normally be run from the command line,
++except when testing or for development purposes.
++Rather it should be managed by
++.BR systemd .
++After installing Grafana, the systemd service should be enabled and started as follows:
++.P
++.in 1i
++.B systemctl daemon-reload
++.br
++.B systemctl enable grafana-server.service
++.br
++.B systemctl start grafana-server.service
++.in
++.P
++.SH OPTIONS
++The
++.B gafana-server
++configuration is specified in
++.BR /etc/grafana/grafana.ini
++and is well documented with comments.
++The command-line options listed below override options of
++the same (or similar) name in the configuration file.
++.P
++.HP
++\fB\-config\fR string
++.IP
++path to config file
++.HP
++\fB\-convey-json\fR
++.IP
++When true, emits results in JSON blocks. Default: 'false'
++.HP
++\fB\-convey-silent\fR
++.IP
++When true, all output from GoConvey is suppressed.
++.HP
++\fB\-convey-story\fR
++.IP
++When true, emits story output, otherwise emits dot output. When not provided, this flag mirrors the value of the '-test.v' flag
++.HP
++\fB\-homepath\fR string
++.IP
++path to grafana install/home path, defaults to working directory
++.HP
++\fB\-packaging\fR string
++.IP
++describes the way Grafana was installed (default "unknown")
++.HP
++\fB\-pidfile\fR string
++.IP
++path to pid file
++.HP
++\fB\-profile\fR
++.IP
++Turn on pprof profiling
++.HP
++\fB\-profile\-port\fR uint
++.IP
++Define custom port for profiling (default 6060)
++.HP
++\fB\-tracing\fR
++.IP
++Turn on tracing
++.HP
++\fB\-tracing\-file\fR string
++.IP
++Define tracing output file (default "trace.out")
++.TP
++\fB\-v\fR
++.IP
++prints current version and exits
++.SH "SEE ALSO"
++The full documentation for
++.B Grafana
++is available on-line at
++.BR http://docs.grafana.org/ .
diff --git a/SOURCES/002-remove-jaeger-tracing.patch b/SOURCES/002-remove-jaeger-tracing.patch
deleted file mode 100644
index e6fae49..0000000
--- a/SOURCES/002-remove-jaeger-tracing.patch
+++ /dev/null
@@ -1,279 +0,0 @@
-diff --git a/pkg/cmd/grafana-server/server.go b/pkg/cmd/grafana-server/server.go
-index 0dace4ebab..f1a4bfde53 100644
---- a/pkg/cmd/grafana-server/server.go
-+++ b/pkg/cmd/grafana-server/server.go
-@@ -23,7 +23,6 @@ import (
- 	_ "github.com/grafana/grafana/pkg/infra/metrics"
- 	_ "github.com/grafana/grafana/pkg/infra/remotecache"
- 	_ "github.com/grafana/grafana/pkg/infra/serverlock"
--	_ "github.com/grafana/grafana/pkg/infra/tracing"
- 	_ "github.com/grafana/grafana/pkg/infra/usagestats"
- 	"github.com/grafana/grafana/pkg/login"
- 	"github.com/grafana/grafana/pkg/login/social"
-diff --git a/pkg/infra/tracing/tracing.go b/pkg/infra/tracing/tracing.go
-deleted file mode 100644
-index 923459786b..0000000000
---- a/pkg/infra/tracing/tracing.go
-+++ /dev/null
-@@ -1,161 +0,0 @@
--package tracing
--
--import (
--	"context"
--	"fmt"
--	"io"
--	"strings"
--
--	"github.com/grafana/grafana/pkg/infra/log"
--	"github.com/grafana/grafana/pkg/registry"
--	"github.com/grafana/grafana/pkg/setting"
--
--	opentracing "github.com/opentracing/opentracing-go"
--	jaegercfg "github.com/uber/jaeger-client-go/config"
--	"github.com/uber/jaeger-client-go/zipkin"
--)
--
--func init() {
--	registry.RegisterService(&TracingService{})
--}
--
--type TracingService struct {
--	enabled                  bool
--	address                  string
--	customTags               map[string]string
--	samplerType              string
--	samplerParam             float64
--	log                      log.Logger
--	closer                   io.Closer
--	zipkinPropagation        bool
--	disableSharedZipkinSpans bool
--
--	Cfg *setting.Cfg `inject:""`
--}
--
--func (ts *TracingService) Init() error {
--	ts.log = log.New("tracing")
--	ts.parseSettings()
--
--	if ts.enabled {
--		return ts.initGlobalTracer()
--	}
--
--	return nil
--}
--
--func (ts *TracingService) parseSettings() {
--	var section, err = ts.Cfg.Raw.GetSection("tracing.jaeger")
--	if err != nil {
--		return
--	}
--
--	ts.address = section.Key("address").MustString("")
--	if ts.address != "" {
--		ts.enabled = true
--	}
--
--	ts.customTags = splitTagSettings(section.Key("always_included_tag").MustString(""))
--	ts.samplerType = section.Key("sampler_type").MustString("")
--	ts.samplerParam = section.Key("sampler_param").MustFloat64(1)
--	ts.zipkinPropagation = section.Key("zipkin_propagation").MustBool(false)
--	ts.disableSharedZipkinSpans = section.Key("disable_shared_zipkin_spans").MustBool(false)
--}
--
--func (ts *TracingService) initJaegerCfg() (jaegercfg.Configuration, error) {
--	cfg := jaegercfg.Configuration{
--		ServiceName: "grafana",
--		Disabled:    !ts.enabled,
--		Sampler: &jaegercfg.SamplerConfig{
--			Type:  ts.samplerType,
--			Param: ts.samplerParam,
--		},
--		Reporter: &jaegercfg.ReporterConfig{
--			LogSpans:           false,
--			LocalAgentHostPort: ts.address,
--		},
--	}
--
--	_, err := cfg.FromEnv()
--	if err != nil {
--		return cfg, err
--	}
--	return cfg, nil
--}
--
--func (ts *TracingService) initGlobalTracer() error {
--	cfg, err := ts.initJaegerCfg()
--	if err != nil {
--		return err
--	}
--
--	jLogger := &jaegerLogWrapper{logger: log.New("jaeger")}
--
--	options := []jaegercfg.Option{}
--	options = append(options, jaegercfg.Logger(jLogger))
--
--	for tag, value := range ts.customTags {
--		options = append(options, jaegercfg.Tag(tag, value))
--	}
--
--	if ts.zipkinPropagation {
--		zipkinPropagator := zipkin.NewZipkinB3HTTPHeaderPropagator()
--		options = append(options,
--			jaegercfg.Injector(opentracing.HTTPHeaders, zipkinPropagator),
--			jaegercfg.Extractor(opentracing.HTTPHeaders, zipkinPropagator),
--		)
--
--		if !ts.disableSharedZipkinSpans {
--			options = append(options, jaegercfg.ZipkinSharedRPCSpan(true))
--		}
--	}
--
--	tracer, closer, err := cfg.NewTracer(options...)
--	if err != nil {
--		return err
--	}
--
--	opentracing.SetGlobalTracer(tracer)
--
--	ts.closer = closer
--
--	return nil
--}
--
--func (ts *TracingService) Run(ctx context.Context) error {
--	<-ctx.Done()
--
--	if ts.closer != nil {
--		ts.log.Info("Closing tracing")
--		ts.closer.Close()
--	}
--
--	return nil
--}
--
--func splitTagSettings(input string) map[string]string {
--	res := map[string]string{}
--
--	tags := strings.Split(input, ",")
--	for _, v := range tags {
--		kv := strings.Split(v, ":")
--		if len(kv) > 1 {
--			res[kv[0]] = kv[1]
--		}
--	}
--
--	return res
--}
--
--type jaegerLogWrapper struct {
--	logger log.Logger
--}
--
--func (jlw *jaegerLogWrapper) Error(msg string) {
--	jlw.logger.Error(msg)
--}
--
--func (jlw *jaegerLogWrapper) Infof(format string, args ...interface{}) {
--	msg := fmt.Sprintf(format, args...)
--	jlw.logger.Info(msg)
--}
-diff --git a/pkg/infra/tracing/tracing_test.go b/pkg/infra/tracing/tracing_test.go
-deleted file mode 100644
-index a6d71cf165..0000000000
---- a/pkg/infra/tracing/tracing_test.go
-+++ /dev/null
-@@ -1,94 +0,0 @@
--package tracing
--
--import (
--	"github.com/stretchr/testify/assert"
--	"github.com/stretchr/testify/require"
--	"os"
--	"testing"
--)
--
--func TestGroupSplit(t *testing.T) {
--	tests := []struct {
--		input    string
--		expected map[string]string
--	}{
--		{
--			input: "tag1:value1,tag2:value2",
--			expected: map[string]string{
--				"tag1": "value1",
--				"tag2": "value2",
--			},
--		},
--		{
--			input:    "",
--			expected: map[string]string{},
--		},
--		{
--			input:    "tag1",
--			expected: map[string]string{},
--		},
--	}
--
--	for _, test := range tests {
--		tags := splitTagSettings(test.input)
--		for k, v := range test.expected {
--			value, exists := tags[k]
--			assert.Truef(t, exists, "Tag %q not found for input %q", k, test.input)
--			assert.Equalf(t, v, value, "Tag %q has wrong value for input %q", k, test.input)
--		}
--	}
--}
--
--func TestInitJaegerCfg_Default(t *testing.T) {
--	ts := &TracingService{}
--	cfg, err := ts.initJaegerCfg()
--	require.NoError(t, err)
--
--	assert.True(t, cfg.Disabled)
--}
--
--func TestInitJaegerCfg_Enabled(t *testing.T) {
--	ts := &TracingService{enabled: true}
--	cfg, err := ts.initJaegerCfg()
--	require.NoError(t, err)
--
--	assert.False(t, cfg.Disabled)
--	assert.Equal(t, "localhost:6831", cfg.Reporter.LocalAgentHostPort)
--}
--
--func TestInitJaegerCfg_DisabledViaEnv(t *testing.T) {
--	os.Setenv("JAEGER_DISABLED", "true")
--	defer func() {
--		os.Unsetenv("JAEGER_DISABLED")
--	}()
--
--	ts := &TracingService{enabled: true}
--	cfg, err := ts.initJaegerCfg()
--	require.NoError(t, err)
--
--	assert.True(t, cfg.Disabled)
--}
--
--func TestInitJaegerCfg_EnabledViaEnv(t *testing.T) {
--	os.Setenv("JAEGER_DISABLED", "false")
--	defer func() {
--		os.Unsetenv("JAEGER_DISABLED")
--	}()
--
--	ts := &TracingService{enabled: false}
--	cfg, err := ts.initJaegerCfg()
--	require.NoError(t, err)
--
--	assert.False(t, cfg.Disabled)
--}
--
--func TestInitJaegerCfg_InvalidEnvVar(t *testing.T) {
--	os.Setenv("JAEGER_DISABLED", "totallybogus")
--	defer func() {
--		os.Unsetenv("JAEGER_DISABLED")
--	}()
--
--	ts := &TracingService{}
--	_, err := ts.initJaegerCfg()
--	require.EqualError(t, err, "cannot parse env var JAEGER_DISABLED=totallybogus: strconv.ParseBool: parsing \"totallybogus\": invalid syntax")
--}
diff --git a/SOURCES/003-manpages.patch b/SOURCES/003-manpages.patch
deleted file mode 100644
index d2b2f88..0000000
--- a/SOURCES/003-manpages.patch
+++ /dev/null
@@ -1,219 +0,0 @@
-diff --git a/docs/man/man1/grafana-cli.1 b/docs/man/man1/grafana-cli.1
-new file mode 100644
-index 0000000000..171748fcda
---- /dev/null
-+++ b/docs/man/man1/grafana-cli.1
-@@ -0,0 +1,51 @@
-+.TH GRAFANA "1" "February 2019" "Grafana cli version 5.4.3" "User Commands"
-+.SH NAME
-+grafana-cli \- command line administration for the Grafana metrics dashboard and graph editor
-+.SH DESCRIPTION
-+.SS "NAME:"
-+.IP
-+grafana-cli
-+.SS "USAGE:"
-+.IP
-+\fBgrafana\-cli\fP [\fIglobal options\fP] \fIcommand\fP [\fIcommand options\fP] [\fIarguments\fP...]
-+.SS "COMMANDS:"
-+.TP
-+plugins
-+Manage plugins for grafana
-+.TP
-+admin
-+Grafana admin commands
-+.TP
-+help, h
-+Shows a list of commands or help for one command
-+.SS "GLOBAL OPTIONS:"
-+.TP
-+\fB\-\-pluginsDir\fR value
-+path to the grafana plugin directory (default: "/var/lib/grafana/plugins") [$GF_PLUGIN_DIR]
-+.TP
-+\fB\-\-repo\fR value
-+url to the plugin repository (default: "https://grafana.com/api/plugins") [$GF_PLUGIN_REPO]
-+.TP
-+\fB\-\-pluginUrl\fR value
-+Full url to the plugin zip file instead of downloading the plugin from grafana.com/api [$GF_PLUGIN_URL]
-+.TP
-+\fB\-\-insecure\fR
-+Skip TLS verification (insecure)
-+.TP
-+\fB\-\-debug\fR, \fB\-d\fR
-+enable debug logging
-+.TP
-+\fB\-\-help\fR, \fB\-h\fR
-+show help
-+.TP
-+\fB\-\-version\fR, \fB\-v\fR
-+print the version
-+.SH "SEE ALSO"
-+Additional documentation for
-+.B grafana-cli
-+is available on-line at
-+.BR http://docs.grafana.org/administration/cli/ .
-+The full documentation for
-+.B Grafana
-+is available on-line at
-+.BR http://docs.grafana.org/ .
-diff --git a/docs/man/man1/grafana-server.1 b/docs/man/man1/grafana-server.1
-new file mode 100644
-index 0000000000..30b7c1306f
---- /dev/null
-+++ b/docs/man/man1/grafana-server.1
-@@ -0,0 +1,156 @@
-+.TH VERSION "1" "February 2019" "Version 5.4.3" "User Commands"
-+.SH NAME
-+grafana-server \- back-end server for the Grafana metrics dashboard and graph editor
-+.SH DESCRIPTION
-+.B grafana-server
-+is the back-end server for the Grafana metrics dashboard and graph editor.
-+The
-+.B grafana-server
-+program should not normally be run from the command line,
-+except when testing or for development purposes.
-+Rather it should be managed by
-+.BR systemd .
-+After installing Grafana, the systemd service should be enabled and started as follows:
-+.P
-+.in 1i
-+.B systemctl daemon-reload
-+.br
-+.B systemctl enable grafana-server.service
-+.br
-+.B systemctl start grafana-server.service
-+.in
-+.P
-+.SH OPTIONS
-+The
-+.B gafana-server
-+configuration is specified in
-+.BR /etc/grafana/grafana.ini
-+and is well documented with comments.
-+The command-line options listed below override options of
-+the same (or similar) name in the configuration file and also provide
-+additional options for testing Grafana.
-+.P
-+.HP
-+\fB\-config\fR string
-+.IP
-+path to config file
-+.HP
-+\fB\-homepath\fR string
-+.IP
-+path to grafana install/home path, defaults to working directory
-+.HP
-+\fB\-packaging\fR string
-+.IP
-+describes the way Grafana was installed (default "unknown")
-+.HP
-+\fB\-pidfile\fR string
-+.IP
-+path to pid file
-+.HP
-+\fB\-profile\fR
-+.IP
-+Turn on pprof profiling
-+.HP
-+\fB\-profile\-port\fR int
-+.IP
-+Define custom port for profiling (default 6060)
-+.HP
-+\fB\-test\fR.bench regexp
-+.IP
-+run only benchmarks matching regexp
-+.HP
-+\fB\-test\fR.benchmem
-+.IP
-+print memory allocations for benchmarks
-+.HP
-+\fB\-test\fR.benchtime d
-+.IP
-+run each benchmark for duration d (default 1s)
-+.HP
-+\fB\-test\fR.blockprofile file
-+.IP
-+write a goroutine blocking profile to file
-+.HP
-+\fB\-test\fR.blockprofilerate rate
-+.IP
-+set blocking profile rate (see runtime.SetBlockProfileRate) (default 1)
-+.HP
-+\fB\-test\fR.count n
-+.IP
-+run tests and benchmarks n times (default 1)
-+.HP
-+\fB\-test\fR.coverprofile file
-+.IP
-+write a coverage profile to file
-+.HP
-+\fB\-test\fR.cpu list
-+.IP
-+comma\-separated list of cpu counts to run each test with
-+.HP
-+\fB\-test\fR.cpuprofile file
-+.IP
-+write a cpu profile to file
-+.HP
-+\fB\-test\fR.failfast
-+.IP
-+do not start new tests after the first test failure
-+.HP
-+\fB\-test\fR.list regexp
-+.IP
-+list tests, examples, and benchmarks matching regexp then exit
-+.HP
-+\fB\-test\fR.memprofile file
-+.IP
-+write a memory profile to file
-+.HP
-+\fB\-test\fR.memprofilerate rate
-+.IP
-+set memory profiling rate (see runtime.MemProfileRate)
-+.HP
-+\fB\-test\fR.mutexprofile string
-+.IP
-+write a mutex contention profile to the named file after execution
-+.HP
-+\fB\-test\fR.mutexprofilefraction int
-+.IP
-+if >= 0, calls runtime.SetMutexProfileFraction() (default 1)
-+.HP
-+\fB\-test\fR.outputdir dir
-+.IP
-+write profiles to dir
-+.HP
-+\fB\-test\fR.parallel n
-+.IP
-+run at most n tests in parallel (default 8)
-+.HP
-+\fB\-test\fR.run regexp
-+.IP
-+run only tests and examples matching regexp
-+.HP
-+\fB\-test\fR.short
-+.IP
-+run smaller test suite to save time
-+.HP
-+\fB\-test\fR.testlogfile file
-+.IP
-+write test action log to file (for use only by cmd/go)
-+.HP
-+\fB\-test\fR.timeout d
-+.IP
-+panic test binary after duration d (default 0, timeout disabled)
-+.HP
-+\fB\-test\fR.trace file
-+.IP
-+write an execution trace to file
-+.HP
-+\fB\-test\fR.v
-+.IP
-+verbose: print additional output
-+.TP
-+\fB\-v\fR
-+prints current version and exits
-+.SH "SEE ALSO"
-+The full documentation for
-+.B Grafana
-+is available on-line at
-+.BR http://docs.grafana.org/ .
diff --git a/SOURCES/003-remove-dashboard-abspath-test.patch b/SOURCES/003-remove-dashboard-abspath-test.patch
new file mode 100644
index 0000000..2076441
--- /dev/null
+++ b/SOURCES/003-remove-dashboard-abspath-test.patch
@@ -0,0 +1,41 @@
+diff --git a/pkg/services/provisioning/dashboards/file_reader_linux_test.go b/pkg/services/provisioning/dashboards/file_reader_linux_test.go
+index 3584bbc242..3d37f5e104 100644
+--- a/pkg/services/provisioning/dashboards/file_reader_linux_test.go
++++ b/pkg/services/provisioning/dashboards/file_reader_linux_test.go
+@@ -33,6 +33,11 @@ func TestProvisionedSymlinkedFolder(t *testing.T) {
+ 		t.Errorf("expected err to be nil")
+ 	}
+ 
++	want, err = filepath.EvalSymlinks(want)
++	if err != nil {
++		t.Errorf("expected err to be nil %v", err)
++	}
++
+ 	resolvedPath := reader.resolvedPath()
+ 	if resolvedPath != want {
+ 		t.Errorf("got %s want %s", resolvedPath, want)
+diff --git a/pkg/services/provisioning/dashboards/file_reader_test.go b/pkg/services/provisioning/dashboards/file_reader_test.go
+index 33fe6a0a68..2c67ebb677 100644
+--- a/pkg/services/provisioning/dashboards/file_reader_test.go
++++ b/pkg/services/provisioning/dashboards/file_reader_test.go
+@@ -340,20 +340,6 @@ func TestDashboardFileReader(t *testing.T) {
+ 				So(err, ShouldBeNil)
+ 
+ 				So(len(fakeService.provisioned["Default"]), ShouldEqual, 1)
+-				So(fakeService.provisioned["Default"][0].ExternalId, ShouldEqual, absPath1)
+-			})
+-
+-			Convey("Missing dashboard should be deleted if DisableDeletion = false", func() {
+-				reader, err := NewDashboardFileReader(cfg, logger)
+-				So(err, ShouldBeNil)
+-
+-				err = reader.startWalkingDisk()
+-				So(err, ShouldBeNil)
+-
+-				So(len(fakeService.provisioned["Default"]), ShouldEqual, 1)
+-				So(fakeService.provisioned["Default"][0].ExternalId, ShouldEqual, absPath1)
+-				So(len(fakeService.inserted), ShouldEqual, 1)
+-				So(fakeService.inserted[0].Dashboard.Id, ShouldEqual, 1)
+ 			})
+ 		})
+ 
diff --git a/SOURCES/004-skip-x86-goldenfiles-tests.patch b/SOURCES/004-skip-x86-goldenfiles-tests.patch
new file mode 100644
index 0000000..20a50e2
--- /dev/null
+++ b/SOURCES/004-skip-x86-goldenfiles-tests.patch
@@ -0,0 +1,59 @@
+diff --git a/packages/grafana-data/src/dataframe/ArrowDataFrame.test.ts b/packages/grafana-data/src/dataframe/ArrowDataFrame.test.ts
+index 96efaccfce..bcdd98144f 100644
+--- a/packages/grafana-data/src/dataframe/ArrowDataFrame.test.ts
++++ b/packages/grafana-data/src/dataframe/ArrowDataFrame.test.ts
+@@ -52,7 +52,7 @@ describe('Read/Write arrow Table to DataFrame', () => {
+     expect(after).toEqual(before);
+   });
+ 
+-  test('should read all types', () => {
++  test.skip('should read all types', () => {
+     const fullpath = path.resolve(__dirname, './__snapshots__/all_types.golden.arrow');
+     const arrow = fs.readFileSync(fullpath);
+     const table = Table.from([arrow]);
+diff --git a/packages/grafana-runtime/src/utils/queryResponse.test.ts b/packages/grafana-runtime/src/utils/queryResponse.test.ts
+index 25169669a0..05474366a2 100644
+--- a/packages/grafana-runtime/src/utils/queryResponse.test.ts
++++ b/packages/grafana-runtime/src/utils/queryResponse.test.ts
+@@ -38,7 +38,7 @@ const emptyResults = {
+ /* eslint-enable */
+ 
+ describe('GEL Utils', () => {
+-  test('should parse output with dataframe', () => {
++  test.skip('should parse output with dataframe', () => {
+     const res = toDataQueryResponse(resp);
+     const frames = res.data;
+     for (const frame of frames) {
+@@ -106,7 +106,7 @@ describe('GEL Utils', () => {
+     expect(frames.length).toEqual(0);
+   });
+ 
+-  test('resultWithError', () => {
++  test.skip('resultWithError', () => {
+     // Generated from:
+     // qdr.Responses[q.GetRefID()] = backend.DataResponse{
+     //   Error: fmt.Errorf("an Error: %w", fmt.Errorf("another error")),
+diff --git a/pkg/tsdb/influxdb/flux/executor_test.go b/pkg/tsdb/influxdb/flux/executor_test.go
+index e053c6c397..fc7685cbab 100644
+--- a/pkg/tsdb/influxdb/flux/executor_test.go
++++ b/pkg/tsdb/influxdb/flux/executor_test.go
+@@ -59,6 +59,7 @@ func (r *MockRunner) runQuery(ctx context.Context, q string) (*api.QueryTableRes
+ }
+ 
+ func verifyGoldenResponse(t *testing.T, name string) *backend.DataResponse {
++	t.Skip("x86 memory dump is not compatible with other architectures")
+ 	runner := &MockRunner{
+ 		testDataPath: name + ".csv",
+ 	}
+diff --git a/public/app/plugins/datasource/cloudwatch/specs/datasource.test.ts b/public/app/plugins/datasource/cloudwatch/specs/datasource.test.ts
+index 94c1991dae..8e5b35eb3b 100644
+--- a/public/app/plugins/datasource/cloudwatch/specs/datasource.test.ts
++++ b/public/app/plugins/datasource/cloudwatch/specs/datasource.test.ts
+@@ -88,6 +88,7 @@ describe('CloudWatchDatasource', () => {
+     });
+ 
+     it('should return log groups as an array of strings', async () => {
++      return; // "it.skip" of this test leads to a test failure of the other log group test, because the mock is not active (see beforeEach() above)
+       const logGroups = await ctx.ds.describeLogGroups();
+       const expectedLogGroups = [
+         '/aws/containerinsights/dev303-workshop/application',
diff --git a/SOURCES/004-wrappers-grafana-cli.patch b/SOURCES/004-wrappers-grafana-cli.patch
deleted file mode 100644
index 79bb3b5..0000000
--- a/SOURCES/004-wrappers-grafana-cli.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-diff --git a/packaging/wrappers/grafana-cli b/packaging/wrappers/grafana-cli
-index 9cad151c0d..6b7ec1ab42 100755
---- a/packaging/wrappers/grafana-cli
-+++ b/packaging/wrappers/grafana-cli
-@@ -12,11 +12,12 @@ CONF_DIR=/etc/grafana
- DATA_DIR=/var/lib/grafana
- PLUGINS_DIR=/var/lib/grafana/plugins
- LOG_DIR=/var/log/grafana
-+LIBEXEC_DIR=/usr/libexec/grafana
- 
- CONF_FILE=$CONF_DIR/grafana.ini
- PROVISIONING_CFG_DIR=$CONF_DIR/provisioning
- 
--EXECUTABLE=$GRAFANA_HOME/bin/grafana-cli
-+EXECUTABLE=$LIBEXEC_DIR/grafana-cli
- 
- if [ ! -x $EXECUTABLE ]; then
-  echo "Program not installed or not executable"
-@@ -24,6 +25,7 @@ if [ ! -x $EXECUTABLE ]; then
- fi
- 
- # overwrite settings from default file
-+#shellcheck disable=SC1090
- if [ -f "$DEFAULT" ]; then
-   . "$DEFAULT"
- fi
diff --git a/SOURCES/005-pin-yarn-version.patch b/SOURCES/005-pin-yarn-version.patch
new file mode 100644
index 0000000..a7dc34d
--- /dev/null
+++ b/SOURCES/005-pin-yarn-version.patch
@@ -0,0 +1,13 @@
+diff --git a/package.json b/package.json
+index ce11ba6de8..a3210762ed 100644
+--- a/package.json
++++ b/package.json
+@@ -314,6 +314,7 @@
+     "node": ">=12 <13"
+   },
+   "volta": {
+-    "node": "12.19.0"
++    "node": "12.19.0",
++    "yarn": "1.22.10"
+   }
+ }
diff --git a/SOURCES/005-pkg-main-fix-import-paths.patch b/SOURCES/005-pkg-main-fix-import-paths.patch
deleted file mode 100644
index 4021e3f..0000000
--- a/SOURCES/005-pkg-main-fix-import-paths.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-diff --git a/pkg/extensions/main.go b/pkg/extensions/main.go
-index a88f67ff9e..7844aa1227 100644
---- a/pkg/extensions/main.go
-+++ b/pkg/extensions/main.go
-@@ -9,10 +9,10 @@ import (
- 	"github.com/grafana/grafana/pkg/registry"
- 	"github.com/grafana/grafana/pkg/services/licensing"
- 	_ "github.com/jung-kurt/gofpdf"
--	_ "github.com/linkedin/goavro/v2"
-+	_ "github.com/linkedin/goavro"
- 	_ "github.com/pkg/errors"
- 	_ "github.com/robfig/cron"
--	_ "github.com/robfig/cron/v3"
-+	_ "gopkg.in/robfig/cron.v3"
- 	_ "github.com/stretchr/testify/require"
- 	_ "gopkg.in/square/go-jose.v2"
- )
diff --git a/SOURCES/006-pkg-setting-ini-default-section.patch b/SOURCES/006-pkg-setting-ini-default-section.patch
deleted file mode 100644
index 263c614..0000000
--- a/SOURCES/006-pkg-setting-ini-default-section.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/pkg/setting/setting.go b/pkg/setting/setting.go
-index 19181be84e..9a745f67e4 100644
---- a/pkg/setting/setting.go
-+++ b/pkg/setting/setting.go
-@@ -387,7 +387,7 @@ func applyCommandLineDefaultProperties(props map[string]string, file *ini.File)
- func applyCommandLineProperties(props map[string]string, file *ini.File) {
- 	for _, section := range file.Sections() {
- 		sectionName := section.Name() + "."
--		if section.Name() == ini.DefaultSection {
-+		if section.Name() == ini.DEFAULT_SECTION {
- 			sectionName = ""
- 		}
- 		for _, key := range section.Keys() {
diff --git a/SOURCES/006-remove-saml-dependency.patch b/SOURCES/006-remove-saml-dependency.patch
new file mode 100644
index 0000000..d164b33
--- /dev/null
+++ b/SOURCES/006-remove-saml-dependency.patch
@@ -0,0 +1,39 @@
+diff --git a/go.mod b/go.mod
+index bb073996ac..c1b6c3219c 100644
+--- a/go.mod
++++ b/go.mod
+@@ -19,7 +19,6 @@ require (
+ 	github.com/benbjohnson/clock v0.0.0-20161215174838-7dc76406b6d3
+ 	github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b
+ 	github.com/centrifugal/centrifuge v0.11.0
+-	github.com/crewjam/saml v0.4.4-0.20201214083806-0dd2422c212e
+ 	github.com/davecgh/go-spew v1.1.1
+ 	github.com/denisenkom/go-mssqldb v0.0.0-20200620013148-b91950f658ec
+ 	github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51 // indirect
+diff --git a/go.sum b/go.sum
+index c79d983b88..f45fa68f41 100644
+--- a/go.sum
++++ b/go.sum
+@@ -228,10 +228,6 @@ github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d h1:U+s90UTSY
+ github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
+ github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
+ github.com/crewjam/httperr v0.0.0-20190612203328-a946449404da/go.mod h1:+rmNIXRvYMqLQeR4DHyTvs6y0MEMymTz4vyFpFkKTPs=
+-github.com/crewjam/saml v0.4.1 h1:ZNSRJvdbypQDY2uApMngeIHNcxS6UCRAgiw3S+pmgRU=
+-github.com/crewjam/saml v0.4.1/go.mod h1:vHcshzXm2WkPOV1dcToZa99cCB1h3nPiKLtLYK+erBE=
+-github.com/crewjam/saml v0.4.4-0.20201214083806-0dd2422c212e h1:CFIpybPh+vrxRD6R3t2BCV9hdtlOQudsj1vB1ECXOo4=
+-github.com/crewjam/saml v0.4.4-0.20201214083806-0dd2422c212e/go.mod h1:qCJQpUtZte9R1ZjUBcW8qtCNlinbO363ooNl02S68bk=
+ github.com/cupcake/rdb v0.0.0-20161107195141-43ba34106c76/go.mod h1:vYwsqCOLxGiisLwp9rITslkFNpZD5rz43tf41QFkTWY=
+ github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4=
+ github.com/cznic/b v0.0.0-20180115125044-35e9bbe41f07/go.mod h1:URriBxXwVq5ijiJ12C7iIZqlA69nTlI+LgI6/pwftG8=
+diff --git a/pkg/extensions/main.go b/pkg/extensions/main.go
+index 337f6566f8..b15c3f907b 100644
+--- a/pkg/extensions/main.go
++++ b/pkg/extensions/main.go
+@@ -5,7 +5,6 @@ import (
+ 	// remove the cron (v1) dependency
+ 
+ 	_ "github.com/beevik/etree"
+-	_ "github.com/crewjam/saml"
+ 	_ "github.com/gobwas/glob"
+ 	"github.com/grafana/grafana/pkg/registry"
+ 	"github.com/grafana/grafana/pkg/services/licensing"
diff --git a/SOURCES/007-pkg-prometheus-client-query-range.patch b/SOURCES/007-pkg-prometheus-client-query-range.patch
deleted file mode 100644
index 5af4b40..0000000
--- a/SOURCES/007-pkg-prometheus-client-query-range.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-diff --git a/pkg/tsdb/prometheus/prometheus.go b/pkg/tsdb/prometheus/prometheus.go
-index 1244031bb4..c1d85b7e53 100644
---- a/pkg/tsdb/prometheus/prometheus.go
-+++ b/pkg/tsdb/prometheus/prometheus.go
-@@ -112,10 +112,10 @@ func (e *PrometheusExecutor) Query(ctx context.Context, dsInfo *models.DataSourc
- 		span.SetTag("stop_unixnano", query.End.UnixNano())
- 		defer span.Finish()
- 
--		value, _, err := client.QueryRange(ctx, query.Expr, timeRange)
-+		value, queryErr := client.QueryRange(ctx, query.Expr, timeRange)
- 
--		if err != nil {
--			return nil, err
-+		if queryErr != nil {
-+			return nil, queryErr
- 		}
- 
- 		queryResult, err := parseResponse(value, query)
diff --git a/SOURCES/008-pkg-services-notifications-codes-Unknwon.patch b/SOURCES/008-pkg-services-notifications-codes-Unknwon.patch
deleted file mode 100644
index 8263705..0000000
--- a/SOURCES/008-pkg-services-notifications-codes-Unknwon.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/pkg/services/notifications/codes.go b/pkg/services/notifications/codes.go
-index ae66aa1d1b..bfb95560fe 100644
---- a/pkg/services/notifications/codes.go
-+++ b/pkg/services/notifications/codes.go
-@@ -6,7 +6,7 @@ import (
- 	"fmt"
- 	"time"
- 
--	"github.com/unknwon/com"
-+	"github.com/Unknwon/com"
- 
- 	"github.com/grafana/grafana/pkg/models"
- 	"github.com/grafana/grafana/pkg/setting"
diff --git a/SOURCES/009-pkg-fix-xorm-import.patch b/SOURCES/009-pkg-fix-xorm-import.patch
deleted file mode 100644
index c8a1c0a..0000000
--- a/SOURCES/009-pkg-fix-xorm-import.patch
+++ /dev/null
@@ -1,288 +0,0 @@
-diff --git a/pkg/services/sqlstore/datasource.go b/pkg/services/sqlstore/datasource.go
-index c84f6bb948..414e343a63 100644
---- a/pkg/services/sqlstore/datasource.go
-+++ b/pkg/services/sqlstore/datasource.go
-@@ -5,7 +5,7 @@ import (
- 	"github.com/grafana/grafana/pkg/components/simplejson"
-	"github.com/grafana/grafana/pkg/models"
- 
--	"github.com/go-xorm/xorm"
-+	"xorm.io/xorm"
- 
- 	"github.com/grafana/grafana/pkg/bus"
- 	"github.com/grafana/grafana/pkg/components/securejsondata"
-diff --git a/pkg/services/sqlstore/logger.go b/pkg/services/sqlstore/logger.go
-index 498c2b58c1..850e10cd21 100644
---- a/pkg/services/sqlstore/logger.go
-+++ b/pkg/services/sqlstore/logger.go
-@@ -5,7 +5,7 @@ import (
- 
- 	glog "github.com/grafana/grafana/pkg/infra/log"
- 
--	"github.com/go-xorm/core"
-+	"xorm.io/core"
- )
- 
- type XormLogger struct {
-diff --git a/pkg/services/sqlstore/migrations/annotation_mig.go b/pkg/services/sqlstore/migrations/annotation_mig.go
-index 3ec5df841e..505ab5cf6e 100644
---- a/pkg/services/sqlstore/migrations/annotation_mig.go
-+++ b/pkg/services/sqlstore/migrations/annotation_mig.go
-@@ -1,7 +1,7 @@
- package migrations
- 
- import (
--	"github.com/go-xorm/xorm"
-+	"xorm.io/xorm"
- 	. "github.com/grafana/grafana/pkg/services/sqlstore/migrator"
- )
- 
-diff --git a/pkg/services/sqlstore/migrations/migrations_test.go b/pkg/services/sqlstore/migrations/migrations_test.go
-index 62ecbaad11..a9a3b38e62 100644
---- a/pkg/services/sqlstore/migrations/migrations_test.go
-+++ b/pkg/services/sqlstore/migrations/migrations_test.go
-@@ -3,7 +3,7 @@ package migrations
- import (
- 	"testing"
- 
--	"github.com/go-xorm/xorm"
-+	"xorm.io/xorm"
- 	. "github.com/grafana/grafana/pkg/services/sqlstore/migrator"
- 	"github.com/grafana/grafana/pkg/services/sqlstore/sqlutil"
- 
-diff --git a/pkg/services/sqlstore/migrations/user_mig.go b/pkg/services/sqlstore/migrations/user_mig.go
-index 53110fe49b..e1a54a57bf 100644
---- a/pkg/services/sqlstore/migrations/user_mig.go
-+++ b/pkg/services/sqlstore/migrations/user_mig.go
-@@ -3,7 +3,7 @@ package migrations
- import (
- 	"fmt"
- 
--	"github.com/go-xorm/xorm"
-+	"xorm.io/xorm"
- 	. "github.com/grafana/grafana/pkg/services/sqlstore/migrator"
- 	"github.com/grafana/grafana/pkg/util"
- )
-diff --git a/pkg/services/sqlstore/migrator/column.go b/pkg/services/sqlstore/migrator/column.go
-index 28cef60a94..af093a8e59 100644
---- a/pkg/services/sqlstore/migrator/column.go
-+++ b/pkg/services/sqlstore/migrator/column.go
-@@ -1,7 +1,7 @@
- package migrator
- 
- // Notice
--// code based on parts from from https://github.com/go-xorm/core/blob/3e0fa232ab5c90996406c0cd7ae86ad0e5ecf85f/column.go
-+// code based on parts from from https://xorm.io/core/blob/3e0fa232ab5c90996406c0cd7ae86ad0e5ecf85f/column.go
- 
- type Column struct {
- 	Name            string
-diff --git a/pkg/services/sqlstore/migrator/dialect.go b/pkg/services/sqlstore/migrator/dialect.go
-index 0aa2be7301..5246f17971 100644
---- a/pkg/services/sqlstore/migrator/dialect.go
-+++ b/pkg/services/sqlstore/migrator/dialect.go
-@@ -4,7 +4,7 @@ import (
- 	"fmt"
- 	"strings"
- 
--	"github.com/go-xorm/xorm"
-+	"xorm.io/xorm"
- )
- 
- type Dialect interface {
-diff --git a/pkg/services/sqlstore/migrator/migrator.go b/pkg/services/sqlstore/migrator/migrator.go
-index 612a333a72..f314b6ea84 100644
---- a/pkg/services/sqlstore/migrator/migrator.go
-+++ b/pkg/services/sqlstore/migrator/migrator.go
-@@ -4,7 +4,7 @@ import (
- 	"time"
- 
- 	_ "github.com/go-sql-driver/mysql"
--	"github.com/go-xorm/xorm"
-+	"xorm.io/xorm"
- 	"github.com/grafana/grafana/pkg/infra/log"
- 	"github.com/grafana/grafana/pkg/util/errutil"
- 	_ "github.com/lib/pq"
-diff --git a/pkg/services/sqlstore/migrator/mysql_dialect.go b/pkg/services/sqlstore/migrator/mysql_dialect.go
-index 147df03357..a658819ea2 100644
---- a/pkg/services/sqlstore/migrator/mysql_dialect.go
-+++ b/pkg/services/sqlstore/migrator/mysql_dialect.go
-@@ -7,7 +7,7 @@ import (
- 
- 	"github.com/VividCortex/mysqlerr"
- 	"github.com/go-sql-driver/mysql"
--	"github.com/go-xorm/xorm"
-+	"xorm.io/xorm"
- )
- 
- type Mysql struct {
-diff --git a/pkg/services/sqlstore/migrator/postgres_dialect.go b/pkg/services/sqlstore/migrator/postgres_dialect.go
-index 70803f3a9e..5ae7c57ea5 100644
---- a/pkg/services/sqlstore/migrator/postgres_dialect.go
-+++ b/pkg/services/sqlstore/migrator/postgres_dialect.go
-@@ -5,7 +5,7 @@ import (
- 	"strconv"
- 	"strings"
- 
--	"github.com/go-xorm/xorm"
-+	"xorm.io/xorm"
- 	"github.com/grafana/grafana/pkg/util/errutil"
- 	"github.com/lib/pq"
- )
-diff --git a/pkg/services/sqlstore/migrator/sqlite_dialect.go b/pkg/services/sqlstore/migrator/sqlite_dialect.go
-index 8372898c35..a306badd82 100644
---- a/pkg/services/sqlstore/migrator/sqlite_dialect.go
-+++ b/pkg/services/sqlstore/migrator/sqlite_dialect.go
-@@ -3,7 +3,7 @@ package migrator
- import (
- 	"fmt"
- 
--	"github.com/go-xorm/xorm"
-+	"xorm.io/xorm"
- 	"github.com/mattn/go-sqlite3"
- )
- 
-diff --git a/pkg/services/sqlstore/migrator/types.go b/pkg/services/sqlstore/migrator/types.go
-index 48354998d8..957bef392d 100644
---- a/pkg/services/sqlstore/migrator/types.go
-+++ b/pkg/services/sqlstore/migrator/types.go
-@@ -4,7 +4,7 @@ import (
- 	"fmt"
- 	"strings"
- 
--	"github.com/go-xorm/xorm"
-+	"xorm.io/xorm"
- )
- 
- const (
-diff --git a/pkg/services/sqlstore/session.go b/pkg/services/sqlstore/session.go
-index 07f1d4524c..e44105c79c 100644
---- a/pkg/services/sqlstore/session.go
-+++ b/pkg/services/sqlstore/session.go
-@@ -4,7 +4,7 @@ import (
- 	"context"
- 	"reflect"
- 
--	"github.com/go-xorm/xorm"
-+	"xorm.io/xorm"
- )
- 
- type DBSession struct {
-diff --git a/pkg/services/sqlstore/sqlstore.go b/pkg/services/sqlstore/sqlstore.go
-index bede60f1ff..7076b76dd6 100644
---- a/pkg/services/sqlstore/sqlstore.go
-+++ b/pkg/services/sqlstore/sqlstore.go
-@@ -11,7 +11,7 @@ import (
- 	"time"
- 
- 	"github.com/go-sql-driver/mysql"
--	"github.com/go-xorm/xorm"
-+	"xorm.io/xorm"
- 	"github.com/grafana/grafana/pkg/bus"
- 	"github.com/grafana/grafana/pkg/infra/localcache"
- 	"github.com/grafana/grafana/pkg/infra/log"
-diff --git a/pkg/services/sqlstore/transactions.go b/pkg/services/sqlstore/transactions.go
-index 27928f52a4..6d9888af39 100644
---- a/pkg/services/sqlstore/transactions.go
-+++ b/pkg/services/sqlstore/transactions.go
-@@ -4,7 +4,7 @@ import (
- 	"context"
- 	"time"
- 
--	"github.com/go-xorm/xorm"
-+	"xorm.io/xorm"
- 	"github.com/grafana/grafana/pkg/bus"
- 	"github.com/grafana/grafana/pkg/infra/log"
- 	"github.com/grafana/grafana/pkg/util/errutil"
-diff --git a/pkg/tsdb/mssql/mssql.go b/pkg/tsdb/mssql/mssql.go
-index 1ca3778b9d..debe106fa7 100644
---- a/pkg/tsdb/mssql/mssql.go
-+++ b/pkg/tsdb/mssql/mssql.go
-@@ -8,7 +8,7 @@ import (
- 	"github.com/grafana/grafana/pkg/setting"
- 
- 	_ "github.com/denisenkom/go-mssqldb"
--	"github.com/go-xorm/core"
-+	"xorm.io/core"
- 	"github.com/grafana/grafana/pkg/infra/log"
- 	"github.com/grafana/grafana/pkg/models"
- 	"github.com/grafana/grafana/pkg/tsdb"
-diff --git a/pkg/tsdb/mssql/mssql_test.go b/pkg/tsdb/mssql/mssql_test.go
-index 760c6dcf07..84e5e0e219 100644
---- a/pkg/tsdb/mssql/mssql_test.go
-+++ b/pkg/tsdb/mssql/mssql_test.go
-@@ -8,7 +8,7 @@ import (
- 	"testing"
- 	"time"
- 
--	"github.com/go-xorm/xorm"
-+	"xorm.io/xorm"
- 	"github.com/grafana/grafana/pkg/components/securejsondata"
- 	"github.com/grafana/grafana/pkg/components/simplejson"
- 	"github.com/grafana/grafana/pkg/models"
-diff --git a/pkg/tsdb/mysql/mysql.go b/pkg/tsdb/mysql/mysql.go
-index 682c3bc456..5ae7a9a87d 100644
---- a/pkg/tsdb/mysql/mysql.go
-+++ b/pkg/tsdb/mysql/mysql.go
-@@ -13,7 +13,7 @@ import (
- 	"github.com/grafana/grafana/pkg/setting"
- 
- 	"github.com/go-sql-driver/mysql"
--	"github.com/go-xorm/core"
-+	"xorm.io/core"
- 	"github.com/grafana/grafana/pkg/infra/log"
- 	"github.com/grafana/grafana/pkg/models"
- 	"github.com/grafana/grafana/pkg/tsdb"
-diff --git a/pkg/tsdb/mysql/mysql_test.go b/pkg/tsdb/mysql/mysql_test.go
-index b2ff2bc969..609f923d2c 100644
---- a/pkg/tsdb/mysql/mysql_test.go
-+++ b/pkg/tsdb/mysql/mysql_test.go
-@@ -8,7 +8,7 @@ import (
- 	"testing"
- 	"time"
- 
--	"github.com/go-xorm/xorm"
-+	"xorm.io/xorm"
- 	"github.com/grafana/grafana/pkg/components/securejsondata"
- 	"github.com/grafana/grafana/pkg/components/simplejson"
- 	"github.com/grafana/grafana/pkg/models"
-diff --git a/pkg/tsdb/postgres/postgres.go b/pkg/tsdb/postgres/postgres.go
-index a417699c1d..f38b94913b 100644
---- a/pkg/tsdb/postgres/postgres.go
-+++ b/pkg/tsdb/postgres/postgres.go
-@@ -7,7 +7,7 @@ import (
- 
- 	"github.com/grafana/grafana/pkg/setting"
- 
--	"github.com/go-xorm/core"
-+	"xorm.io/core"
- 	"github.com/grafana/grafana/pkg/infra/log"
- 	"github.com/grafana/grafana/pkg/models"
- 	"github.com/grafana/grafana/pkg/tsdb"
-diff --git a/pkg/tsdb/postgres/postgres_test.go b/pkg/tsdb/postgres/postgres_test.go
-index 23d0830d3d..d839d42ddb 100644
---- a/pkg/tsdb/postgres/postgres_test.go
-+++ b/pkg/tsdb/postgres/postgres_test.go
-@@ -8,7 +8,7 @@ import (
- 	"testing"
- 	"time"
- 
--	"github.com/go-xorm/xorm"
-+	"xorm.io/xorm"
- 	"github.com/grafana/grafana/pkg/components/securejsondata"
- 	"github.com/grafana/grafana/pkg/components/simplejson"
- 	"github.com/grafana/grafana/pkg/models"
-diff --git a/pkg/tsdb/sqleng/sql_engine.go b/pkg/tsdb/sqleng/sql_engine.go
-index 0cfb1560e4..13bc84bd06 100644
---- a/pkg/tsdb/sqleng/sql_engine.go
-+++ b/pkg/tsdb/sqleng/sql_engine.go
-@@ -19,8 +19,8 @@ import (
- 
- 	"github.com/grafana/grafana/pkg/components/null"
- 
--	"github.com/go-xorm/core"
--	"github.com/go-xorm/xorm"
-+	"xorm.io/core"
-+	"xorm.io/xorm"
- 	"github.com/grafana/grafana/pkg/components/simplejson"
- 	"github.com/grafana/grafana/pkg/models"
- )
diff --git a/SOURCES/Makefile b/SOURCES/Makefile
new file mode 100644
index 0000000..0f923ff
--- /dev/null
+++ b/SOURCES/Makefile
@@ -0,0 +1,38 @@
+all: grafana-$(VER).tar.gz \
+	 grafana-vendor-$(VER).tar.xz \
+	 grafana-webpack-$(VER).tar.gz
+
+grafana-$(VER).tar.gz grafana-$(VER)/:
+	wget https://github.com/grafana/grafana/archive/v$(VER)/grafana-$(VER).tar.gz
+	rm -rf grafana-$(VER)
+	tar xfz grafana-$(VER).tar.gz
+	cd grafana-$(VER) && shopt -s nullglob && \
+		for patch in ../*.patch; do patch -p1 < $$patch; done
+
+grafana-vendor-$(VER).tar.xz: grafana-$(VER)/
+	# Go
+	cd grafana-$(VER) && go mod vendor -v
+	awk '$$2~/^v/ && $$4 != "indirect" {print "Provides: bundled(golang(" $$1 ")) = " substr($$2, 2)}' grafana-$(VER)/go.mod | \
+		sed -E 's/=(.*)-(.*)-(.*)/=\1-\2.\3/g' > $@.manifest
+
+	# Node.js
+	cd grafana-$(VER) && yarn install --pure-lockfile
+	# Remove files with licensing issues
+	find grafana-$(VER) -type d -name 'node-notifier' -prune -exec rm -r {} \;
+	find grafana-$(VER) -name '*.exe' -delete
+	./list_bundled_nodejs_packages.py grafana-$(VER)/ >> $@.manifest
+
+	# Create tarball
+	XZ_OPT=-9 tar cfJ $@ \
+		grafana-$(VER)/vendor \
+		$$(find grafana-$(VER) -type d -name "node_modules" -prune)
+
+grafana-webpack-$(VER).tar.gz: grafana-$(VER)/
+	cd grafana-$(VER) && \
+		yarn install --pure-lockfile && \
+		../build_frontend.sh
+
+	tar cfz $@ grafana-$(VER)/public/build grafana-$(VER)/public/views grafana-$(VER)/plugins-bundled
+
+clean:
+	rm -rf *.tar.gz *.tar.xz *.manifest *.rpm grafana-*/
diff --git a/SOURCES/build_frontend.sh b/SOURCES/build_frontend.sh
new file mode 100755
index 0000000..a9aa76d
--- /dev/null
+++ b/SOURCES/build_frontend.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+# Build the frontend
+yarn run build
+
+# Build the bundled plugins
+mkdir plugins-bundled/external
+yarn run plugins:build-bundled
+for plugin in plugins-bundled/internal/input-datasource; do
+  mv $plugin $plugin.tmp
+  mv $plugin.tmp/dist $plugin
+  rm -rf $plugin.tmp
+done
+rm plugins-bundled/README.md plugins-bundled/.gitignore plugins-bundled/external.json
+
+# Fix permissions (webpack sometimes outputs files with mode = 666 due to reasons unknown (race condition/umask issue afaics))
+chmod -R g-w,o-w public/build plugins-bundled
diff --git a/SOURCES/distro-defaults.ini b/SOURCES/distro-defaults.ini
index b982480..d925297 100644
--- a/SOURCES/distro-defaults.ini
+++ b/SOURCES/distro-defaults.ini
@@ -1,4 +1,4 @@
-##################### Grafana Configuration Defaults for distros #####################
+##################### Grafana Configuration Defaults #####################
 #
 # Do not modify this file in grafana installs
 #
@@ -24,7 +24,7 @@ logs = /var/log/grafana
 plugins = /var/lib/grafana/plugins
 
 # folder that contains provisioning config files that grafana will apply on startup and while running.
-provisioning = conf/provisioning
+provisioning = /etc/grafana/provisioning
 
 #################################### Server ##############################
 [server]
@@ -126,10 +126,29 @@ connstr =
 # This enables data proxy logging, default is false
 logging = false
 
-# How long the data proxy should wait before timing out default is 30 (seconds)
+# How long the data proxy waits before timing out, default is 30 seconds.
+# This setting also applies to core backend HTTP data sources where query requests use an HTTP client with timeout set.
 timeout = 30
 
-# If enabled and user is not anonymous, data proxy will add X-Grafana-User header with username into the request, default is false.
+# How many seconds the data proxy waits before sending a keepalive request.
+keep_alive_seconds = 30
+
+# How many seconds the data proxy waits for a successful TLS Handshake before timing out.
+tls_handshake_timeout_seconds = 10
+
+# How many seconds the data proxy will wait for a server's first response headers after
+# fully writing the request headers if the request has an "Expect: 100-continue"
+# header. A value of 0 will result in the body being sent immediately, without
+# waiting for the server to approve.
+expect_continue_timeout_seconds = 1
+
+# The maximum number of idle connections that Grafana will keep alive.
+max_idle_connections = 100
+
+# How many seconds the data proxy keeps an idle connection open before timing out.
+idle_conn_timeout_seconds = 90
+
+# If enabled and user is not anonymous, data proxy will add X-Grafana-User header with username into the request.
 send_user_header = false
 
 #################################### Analytics ###########################
@@ -188,7 +207,6 @@ allow_embedding = false
 # Set to true if you want to enable http strict transport security (HSTS) response header.
 # This is only sent when HTTPS is enabled in this configuration.
 # HSTS tells browsers that the site should only be accessed using HTTPS.
-# The default will change to true in the next minor release, 6.3.
 strict_transport_security = false
 
 # Sets how long a browser should cache HSTS. Only applied if strict_transport_security is enabled.
@@ -202,12 +220,12 @@ strict_transport_security_subdomains = false
 
 # Set to true to enable the X-Content-Type-Options response header.
 # The X-Content-Type-Options response HTTP header is a marker used by the server to indicate that the MIME types advertised
-# in the Content-Type headers should not be changed and be followed. The default will change to true in the next minor release, 6.3.
-x_content_type_options = false
+# in the Content-Type headers should not be changed and be followed.
+x_content_type_options = true
 
 # Set to true to enable the X-XSS-Protection header, which tells browsers to stop pages from loading
-# when they detect reflected cross-site scripting (XSS) attacks. The default will change to true in the next minor release, 6.3.
-x_xss_protection = false
+# when they detect reflected cross-site scripting (XSS) attacks.
+x_xss_protection = true
 
 
 #################################### Snapshots ###########################
@@ -230,9 +248,12 @@ snapshot_remove_expired = true
 # Number dashboard versions to keep (per dashboard). Default: 20, Minimum: 1
 versions_to_keep = 20
 
-# Minimum dashboard refresh interval. When set, this will restrict users to set the refresh interval of a dashboard lower than given interval. Per default this is not set/unrestricted.
+# Minimum dashboard refresh interval. When set, this will restrict users to set the refresh interval of a dashboard lower than given interval. Per default this is 5 seconds.
 # The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
-min_refresh_interval =
+min_refresh_interval = 1s
+
+# Path to the default home dashboard. If this value is empty, then Grafana uses StaticRootPath + "dashboards/home.json"
+default_home_dashboard_path =
 
 #################################### Users ###############################
 [users]
@@ -272,15 +293,18 @@ viewers_can_edit = false
 # Editors can administrate dashboard, folders and teams they create
 editors_can_admin = false
 
+# The duration in time a user invitation remains valid before expiring. This setting should be expressed as a duration. Examples: 6h (hours), 2d (days), 1w (week). Default is 24h (24 hours). The minimum supported duration is 15m (15 minutes).
+user_invite_max_lifetime_duration = 24h
+
 [auth]
 # Login cookie name
 login_cookie_name = grafana_session
 
-# The lifetime (days) an authenticated user can be inactive before being required to login at next visit. Default is 7 days.
-login_maximum_inactive_lifetime_days = 7
+# The maximum lifetime (duration) an authenticated user can be inactive before being required to login at next visit. Default is 7 days (7d). This setting should be expressed as a duration, e.g. 5m (minutes), 6h (hours), 10d (days), 2w (weeks), 1M (month). The lifetime resets at each successful token rotation (token_rotation_interval_minutes).
+login_maximum_inactive_lifetime_duration =
 
-# The maximum lifetime (days) an authenticated user can be logged in since login time before being required to login. Default is 30 days.
-login_maximum_lifetime_days = 30
+# The maximum lifetime (duration) an authenticated user can be logged in since login time before being required to login. Default is 30 days (30d). This setting should be expressed as a duration, e.g. 5m (minutes), 6h (hours), 10d (days), 2w (weeks), 1M (month).
+login_maximum_lifetime_duration =
 
 # How often should auth tokens be rotated for authenticated users when being active. The default is each 10 minutes.
 token_rotation_interval_minutes = 10
@@ -298,9 +322,15 @@ signout_redirect_url =
 # This setting is ignored if multiple OAuth providers are configured.
 oauth_auto_login = false
 
+# OAuth state max age cookie duration in seconds. Defaults to 600 seconds.
+oauth_state_cookie_max_age = 600
+
 # limit of api_key seconds to live before expiration
 api_key_max_seconds_to_live = -1
 
+# Set to true to enable SigV4 authentication option for HTTP-based datasources
+sigv4_auth_enabled = false
+
 #################################### Anonymous Auth ######################
 [auth.anonymous]
 # enable anonymous access
@@ -312,12 +342,15 @@ org_name = Main Org.
 # specify role for unauthenticated users
 org_role = Viewer
 
-#################################### Github Auth #########################
+# mask the Grafana version number for unauthenticated users
+hide_version = false
+
+#################################### GitHub Auth #########################
 [auth.github]
 enabled = false
 allow_sign_up = true
 client_id = some_id
-client_secret = some_secret
+client_secret =
 scopes = user:email,read:org
 auth_url = https://github.com/login/oauth/authorize
 token_url = https://github.com/login/oauth/access_token
@@ -331,7 +364,7 @@ allowed_organizations =
 enabled = false
 allow_sign_up = true
 client_id = some_id
-client_secret = some_secret
+client_secret =
 scopes = api
 auth_url = https://gitlab.com/oauth/authorize
 token_url = https://gitlab.com/oauth/token
@@ -344,7 +377,7 @@ allowed_groups =
 enabled = false
 allow_sign_up = true
 client_id = some_client_id
-client_secret = some_client_secret
+client_secret =
 scopes = https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email
 auth_url = https://accounts.google.com/o/oauth2/auth
 token_url = https://accounts.google.com/o/oauth2/token
@@ -358,7 +391,7 @@ hosted_domain =
 enabled = false
 allow_sign_up = true
 client_id = some_id
-client_secret = some_secret
+client_secret =
 scopes = user:email
 allowed_organizations =
 
@@ -366,7 +399,7 @@ allowed_organizations =
 enabled = false
 allow_sign_up = true
 client_id = some_id
-client_secret = some_secret
+client_secret =
 scopes = user:email
 allowed_organizations =
 
@@ -376,24 +409,41 @@ name = Azure AD
 enabled = false
 allow_sign_up = true
 client_id = some_client_id
-client_secret = some_client_secret
+client_secret =
 scopes = openid email profile
 auth_url = https://login.microsoftonline.com/<tenant-id>/oauth2/v2.0/authorize
 token_url = https://login.microsoftonline.com/<tenant-id>/oauth2/v2.0/token
 allowed_domains =
 allowed_groups =
 
+#################################### Okta OAuth #######################
+[auth.okta]
+name = Okta
+enabled = false
+allow_sign_up = true
+client_id = some_id
+client_secret =
+scopes = openid profile email groups
+auth_url = https://<tenant-id>.okta.com/oauth2/v1/authorize
+token_url = https://<tenant-id>.okta.com/oauth2/v1/token
+api_url = https://<tenant-id>.okta.com/oauth2/v1/userinfo
+allowed_domains =
+allowed_groups =
+role_attribute_path =
+
 #################################### Generic OAuth #######################
 [auth.generic_oauth]
 name = OAuth
 enabled = false
 allow_sign_up = true
 client_id = some_id
-client_secret = some_secret
+client_secret =
 scopes = user:email
 email_attribute_name = email:primary
 email_attribute_path =
+login_attribute_path =
 role_attribute_path =
+id_token_attribute_name =
 auth_url =
 token_url =
 api_url =
@@ -405,47 +455,6 @@ tls_client_cert =
 tls_client_key =
 tls_client_ca =
 
-#################################### SAML Auth ###########################
-[auth.saml] # Enterprise only
-# Defaults to false. If true, the feature is enabled
-enabled = false
-
-# Base64-encoded public X.509 certificate. Used to sign requests to the IdP
-certificate =
-
-# Path to the public X.509 certificate. Used to sign requests to the IdP
-certificate_path =
-
-# Base64-encoded private key. Used to decrypt assertions from the IdP
-private_key =
-
-# Path to the private key. Used to decrypt assertions from the IdP
-private_key_path =
-
-# Base64-encoded IdP SAML metadata XML. Used to verify and obtain binding locations from the IdP
-idp_metadata =
-
-# Path to the SAML metadata XML. Used to verify and obtain binding locations from the IdP
-idp_metadata_path =
-
-# URL to fetch SAML IdP metadata. Used to verify and obtain binding locations from the IdP
-idp_metadata_url =
-
-# Duration, since the IdP issued a response and the SP is allowed to process it. Defaults to 90 seconds
-max_issue_delay = 90s
-
-# Duration, for how long the SP's metadata should be valid. Defaults to 48 hours
-metadata_valid_duration = 48h
-
-# Friendly name or name of the attribute within the SAML assertion to use as the user's name
-assertion_attribute_name = displayName
-
-# Friendly name or name of the attribute within the SAML assertion to use as the user's login handle
-assertion_attribute_login = mail
-
-# Friendly name or name of the attribute within the SAML assertion to use as the user's email
-assertion_attribute_email = mail
-
 #################################### Basic Auth ##########################
 [auth.basic]
 enabled = true
@@ -472,7 +481,7 @@ allow_sign_up = true
 # LDAP backround sync (Enterprise only)
 # At 1 am every day
 sync_cron = "0 0 1 * * *"
-active_sync_enabled = false
+active_sync_enabled = true
 
 #################################### SMTP / Emailing #####################
 [smtp]
@@ -487,6 +496,7 @@ skip_verify = false
 from_address = admin@grafana.localhost
 from_name = Grafana
 ehlo_identity =
+startTLS_policy =
 
 [emails]
 welcome_email_on_sign_up = false
@@ -613,6 +623,36 @@ max_attempts = 3
 # Makes it possible to enforce a minimal interval between evaluations, to reduce load on the backend
 min_interval_seconds = 1
 
+# Configures for how long alert annotations are stored. Default is 0, which keeps them forever.
+# This setting should be expressed as an duration. Ex 6h (hours), 10d (days), 2w (weeks), 1M (month).
+max_annotation_age =
+
+# Configures max number of alert annotations that Grafana stores. Default value is 0, which keeps all alert annotations.
+max_annotations_to_keep =
+
+#################################### Annotations #########################
+
+[annotations.dashboard]
+# Dashboard annotations means that annotations are associated with the dashboard they are created on.
+
+# Configures how long dashboard annotations are stored. Default is 0, which keeps them forever.
+# This setting should be expressed as a duration. Examples: 6h (hours), 10d (days), 2w (weeks), 1M (month).
+max_age =
+
+# Configures max number of dashboard annotations that Grafana stores. Default value is 0, which keeps all dashboard annotations.
+max_annotations_to_keep =
+
+[annotations.api]
+# API annotations means that the annotations have been created using the API without any
+# association with a dashboard.
+
+# Configures how long Grafana stores API annotations. Default is 0, which keeps them forever.
+# This setting should be expressed as a duration. Examples: 6h (hours), 10d (days), 2w (weeks), 1M (month).
+max_age =
+
+# Configures max number of API annotations that Grafana keeps. Default value is 0, which keeps all API annotations.
+max_annotations_to_keep =
+
 #################################### Explore #############################
 [explore]
 # Enable the Explore section
@@ -630,6 +670,12 @@ disable_total_stats = false
 basic_auth_username =
 basic_auth_password =
 
+# Metrics environment info adds dimensions to the `grafana_environment_info` metric, which
+# can expose more information about the Grafana instance.
+[metrics.environment_info]
+#exampleLabel1 = exampleValue1
+#exampleLabel2 = exampleValue2
+
 # Send internal Grafana metrics to graphite
 [metrics.graphite]
 # Enable by setting the address setting (ex localhost:2003)
@@ -659,6 +705,8 @@ sampler_type = const
 # and indicates the initial sampling rate before the actual one
 # is received from the mothership
 sampler_param = 1
+# sampling_server_url is the URL of a sampling manager providing a sampling strategy.
+sampling_server_url =
 # Whether or not to use Zipkin span propagation (x-b3- HTTP headers).
 zipkin_propagation = false
 # Setting this to true disables shared RPC spans.
@@ -691,6 +739,8 @@ public_url =
 key_file =
 bucket =
 path =
+enable_signed_urls = false
+signed_url_expiration =
 
 [external_image_storage.azure_blob]
 account_name =
@@ -706,6 +756,9 @@ container_name =
 server_url =
 # If the remote HTTP image renderer service runs on a different server than the Grafana server you may have to configure this to a URL where Grafana is reachable, e.g. http://grafana.domain/.
 callback_url =
+# Concurrent render request limit affects when the /render HTTP endpoint is used. Rendering many images at the same time can overload the server,
+# which this setting can help protect against by only allowing a certain amount of concurrent requests.
+concurrent_render_request_limit = 30
 
 [panels]
 # here for to support old env variables, can remove after a few months
@@ -715,6 +768,69 @@ disable_sanitize_html = false
 [plugins]
 enable_alpha = false
 app_tls_skip_verify_insecure = false
+# Enter a comma-separated list of plugin identifiers to identify plugins that are allowed to be loaded even if they lack a valid signature.
+allow_loading_unsigned_plugins = pcp-redis-datasource
+marketplace_url = https://grafana.com/grafana/plugins/
+
+#################################### Grafana Image Renderer Plugin ##########################
+[plugin.grafana-image-renderer]
+# Instruct headless browser instance to use a default timezone when not provided by Grafana, e.g. when rendering panel image of alert.
+# See ICU’s metaZones.txt (https://cs.chromium.org/chromium/src/third_party/icu/source/data/misc/metaZones.txt) for a list of supported
+# timezone IDs. Fallbacks to TZ environment variable if not set.
+rendering_timezone =
+
+# Instruct headless browser instance to use a default language when not provided by Grafana, e.g. when rendering panel image of alert.
+# Please refer to the HTTP header Accept-Language to understand how to format this value, e.g. 'fr-CH, fr;q=0.9, en;q=0.8, de;q=0.7, *;q=0.5'.
+rendering_language =
+
+# Instruct headless browser instance to use a default device scale factor when not provided by Grafana, e.g. when rendering panel image of alert.
+# Default is 1. Using a higher value will produce more detailed images (higher DPI), but will require more disk space to store an image.
+rendering_viewport_device_scale_factor =
+
+# Instruct headless browser instance whether to ignore HTTPS errors during navigation. Per default HTTPS errors are not ignored. Due to
+# the security risk it's not recommended to ignore HTTPS errors.
+rendering_ignore_https_errors =
+
+# Instruct headless browser instance whether to capture and log verbose information when rendering an image. Default is false and will
+# only capture and log error messages. When enabled, debug messages are captured and logged as well.
+# For the verbose information to be included in the Grafana server log you have to adjust the rendering log level to debug, configure
+# [log].filter = rendering:debug.
+rendering_verbose_logging =
+
+# Instruct headless browser instance whether to output its debug and error messages into running process of remote rendering service.
+# Default is false. This can be useful to enable (true) when troubleshooting.
+rendering_dumpio =
+
+# Additional arguments to pass to the headless browser instance. Default is --no-sandbox. The list of Chromium flags can be found
+# here (https://peter.sh/experiments/chromium-command-line-switches/). Multiple arguments is separated with comma-character.
+rendering_args =
+
+# You can configure the plugin to use a different browser binary instead of the pre-packaged version of Chromium.
+# Please note that this is not recommended, since you may encounter problems if the installed version of Chrome/Chromium is not
+# compatible with the plugin.
+rendering_chrome_bin =
+
+# Instruct how headless browser instances are created. Default is 'default' and will create a new browser instance on each request.
+# Mode 'clustered' will make sure that only a maximum of browsers/incognito pages can execute concurrently.
+# Mode 'reusable' will have one browser instance and will create a new incognito page on each request.
+rendering_mode =
+
+# When rendering_mode = clustered you can instruct how many browsers or incognito pages can execute concurrently. Default is 'browser'
+# and will cluster using browser instances.
+# Mode 'context' will cluster using incognito pages.
+rendering_clustering_mode =
+# When rendering_mode = clustered you can define maximum number of browser instances/incognito pages that can execute concurrently..
+rendering_clustering_max_concurrency =
+
+# Limit the maximum viewport width, height and device scale factor that can be requested.
+rendering_viewport_max_width =
+rendering_viewport_max_height =
+rendering_viewport_max_device_scale_factor =
+
+# Change the listening host and port of the gRPC server. Default host is 127.0.0.1 and default port is 0 and will automatically assign
+# a port not in use.
+grpc_host =
+grpc_port =
 
 [enterprise]
 license_path =
@@ -722,3 +838,23 @@ license_path =
 [feature_toggles]
 # enable features, separated by spaces
 enable =
+
+[date_formats]
+# For information on what formatting patterns that are supported https://momentjs.com/docs/#/displaying/
+
+# Default system date format used in time range picker and other places where full time is displayed
+full_date = YYYY-MM-DD HH:mm:ss
+
+# Used by graph and other places where we only show small intervals
+interval_second = HH:mm:ss
+interval_minute = HH:mm
+interval_hour = MM/DD HH:mm
+interval_day = MM/DD
+interval_month = YYYY-MM
+interval_year = YYYY
+
+# Experimental feature
+use_browser_locale = false
+
+# Default timezone for user preferences. Options are 'browser' for the browser local timezone or a timezone name from IANA Time Zone database, e.g. 'UTC' or 'Europe/Amsterdam' etc.
+default_timezone = browser
diff --git a/SOURCES/list_bundled_nodejs_packages.py b/SOURCES/list_bundled_nodejs_packages.py
index 0f62106..a7c5e22 100755
--- a/SOURCES/list_bundled_nodejs_packages.py
+++ b/SOURCES/list_bundled_nodejs_packages.py
@@ -8,7 +8,7 @@ from packaging import version
 def read_declared_pkgs(package_json_path):
     with open(package_json_path) as f:
         package_json = json.load(f)
-        return list(package_json['dependencies'].keys())
+        return list(package_json['dependencies'].keys()) + list(package_json['devDependencies'].keys())
 
 
 def read_installed_pkgs(yarn_lock_path):
@@ -28,17 +28,17 @@ def list_provides(declared_pkgs, installed_pkgs):
         versions = [version.parse(pkg_version)
                     for pkg_name, pkg_version in installed_pkgs if pkg_name == declared_pkg]
         oldest_version = sorted(versions)[0]
-        yield f"Provides: bundled(nodejs-{declared_pkg}) = {oldest_version}"
+        yield f"Provides: bundled(npm({declared_pkg})) = {oldest_version}"
 
 
 if __name__ == "__main__":
     if len(sys.argv) != 2:
-        print(f"usage: {sys.argv[0]} grafana-X.Y.Z/", file=sys.stdout)
+        print(f"usage: {sys.argv[0]} package-X.Y.Z/", file=sys.stdout)
         sys.exit(1)
 
-    grafana_dir = sys.argv[1]
-    declared_pkgs = read_declared_pkgs(f"{grafana_dir}/package.json")
-    installed_pkgs = read_installed_pkgs(f"{grafana_dir}/yarn.lock")
+    package_dir = sys.argv[1]
+    declared_pkgs = read_declared_pkgs(f"{package_dir}/package.json")
+    installed_pkgs = read_installed_pkgs(f"{package_dir}/yarn.lock")
     provides = list_provides(declared_pkgs, installed_pkgs)
     for provide in sorted(provides):
         print(provide)
diff --git a/SOURCES/list_go_buildrequires.sh b/SOURCES/list_go_buildrequires.sh
deleted file mode 100755
index 62e4d06..0000000
--- a/SOURCES/list_go_buildrequires.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/bash -eu
-
-[ $# -ne 1 ] && echo "Usage: $0 grafana-X.Y.Z/" && exit 1
-GRAFANA_SOURCES="$(readlink -f "$1")"
-
-cd "$(mktemp -d)"
-mkdir -p src/github.com/grafana
-ln -s "${GRAFANA_SOURCES}" src/github.com/grafana/grafana
-ln -s "${GRAFANA_SOURCES}/vendor/github.com/grafana/grafana-plugin-model" src/github.com/grafana/grafana-plugin-model
-ln -s "${GRAFANA_SOURCES}/vendor/github.com/grafana/grafana-plugin-sdk-go" src/github.com/grafana/grafana-plugin-sdk-go
-
-for pkg in grafana grafana-plugin-model grafana-plugin-sdk-go
-do
-    GOPATH=$(pwd) golist --imported --package-path "github.com/grafana/$pkg" --skip-self --template 'BuildRequires: golang({{.}})\n'
-done | sed \
-    -e "s,github.com/linkedin/goavro/v2,github.com/linkedin/goavro,g" \
-    -e "s,github.com/go-xorm/xorm,xorm.io/xorm,g" \
-    -e "s,github.com/robfig/cron/v3,gopkg.in/robfig/cron.v3,g" \
-    -e "s,github.com/unknwon/com,github.com/Unknwon/com,g" \
-    | sort | uniq
diff --git a/SOURCES/make_grafana_webpack.sh b/SOURCES/make_grafana_webpack.sh
deleted file mode 100755
index 7baf487..0000000
--- a/SOURCES/make_grafana_webpack.sh
+++ /dev/null
@@ -1,58 +0,0 @@
-#! /bin/bash
-#
-# Copyright (c) 2019-2020 Red Hat.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 2 of the License, or (at your
-# option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-#
-
-[ $# -ne 1 ] && echo "Usage: $0 version" && exit 1
-
-# grafana version (must be tagged on github.com/grafana/grafana as "v$VER")
-VER=$1
-
-command -v yarn || { echo Error, please install the yarn package manager. && exit 1; }
-
-# get src tree and set cwd
-echo Fetching pristine upstream git tagged branch for grafana version v$VER ...
-git clone https://github.com/grafana/grafana grafana-$VER
-cd grafana-$VER
-git checkout -b v$VER v$VER
-
-# exclude the phantomjs-prebuilt binary module from the webpack
-sed -i '/phantomjs-prebuilt/d' package.json
-
-# nuke grunt task for copying phantomjs
-rm -f scripts/grunt/options/phantomjs.js
-sed -i '/phantomjs/d' scripts/grunt/*.js
-
-# populate node_modules using package.json
-echo Running yarn to populate local node_modules ....
-yarn --non-interactive --no-progress --ignore-engines install --pure-lockfile > yarn.out 2>&1
-
-# build the webpack
-echo;echo Building production webpack ....
-node_modules/webpack/bin/webpack.js --display errors-only --mode production --config scripts/webpack/webpack.prod.js
-
-cd ..
-
-# webpack tarball. Includes public/views because index.html references the webpack
-tar czf grafana_webpack-$VER.tar.gz grafana-$VER/public/build grafana-$VER/public/views
-
-# source tarball (if needed)
-if [ ! -f grafana-$VER.tar.gz ]; then
-  wget --quiet -O grafana-$VER.tar.gz https://github.com/grafana/grafana/archive/v$VER/grafana-$VER.tar.gz
-fi
-
-# done
-echo Both grafana-$VER.tar.gz and grafana_webpack-$VER.tar.gz
-echo should now be in your working directory.
-
-exit 0
diff --git a/SPECS/grafana.spec b/SPECS/grafana.spec
index fa38f0f..527d0ff 100644
--- a/SPECS/grafana.spec
+++ b/SPECS/grafana.spec
@@ -1,3 +1,7 @@
+# https://bugzilla.redhat.com/show_bug.cgi?id=1752991
+# unfortunately the go_arches macro doesn't reflect that change yet
+ExcludeArch:      i686
+
 %global grafana_arches %{lua: go_arches = {}
   for arch in rpm.expand("%{go_arches}"):gmatch("%S+") do
     go_arches[arch] = 1
@@ -8,23 +12,22 @@
   end
 end}
 
-# Unbundle Grafana vendor sources and instead use BuildRequires
-# on platforms that have enough golang devel support.
-%if 0%{?rhel} == 0
-%global           unbundle_vendor_sources 1
+# gobuild and gotest macros are defined in go-rpm-macros, which is not available on RHEL
+# definitions lifted from Fedora 34 podman.spec
+%if ! 0%{?gobuild:1}
+%define gobuild(o:) GO111MODULE=off go build -buildmode pie -compiler gc -tags="rpm_crashtraceback ${BUILDTAGS:-}" -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '-Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld '" -a -v -x %{?**};
 %endif
-
-%if 0%{?rhel}
-# emulate macros defined by the go-rpm-macros package
-# https://pagure.io/go-rpm-macros/blob/master/f/rpm/macros.d/macros.go-compilers-golang
-%define gobuild(o:) go build -buildmode pie -compiler gc -tags="rpm_crashtraceback ${BUILDTAGS:-}" -ldflags "${LDFLAGS:-}%{?currentgoldflags} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '%__global_ldflags %{?__golang_extldflags}'" -a -v -x %{?**};
-%define gotestextldflags %__global_ldflags %{?__golang_extldflags}
-%define gotest() GO111MODULE=off go test -buildmode pie -compiler gc -ldflags "${LDFLAGS:-}%{?currentgoldflags} -extldflags '%{gotestextldflags}'" %{?**};
+%if ! 0%{?gotest:1}
+%define gotest() GO111MODULE=off go test -buildmode pie -compiler gc -ldflags "${LDFLAGS:-} -extldflags '-Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld '" %{?**};
 %endif
 
+# 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
+
 Name:             grafana
-Version:          6.7.4
-Release:          1%{?dist}
+Version:          7.3.6
+Release:          2%{?dist}
 Summary:          Metrics dashboard and graph editor
 License:          ASL 2.0
 URL:              https://grafana.org
@@ -32,39 +35,53 @@ URL:              https://grafana.org
 # Source0 contains the tagged upstream sources
 Source0:          https://github.com/grafana/grafana/archive/v%{version}/%{name}-%{version}.tar.gz
 
-# Source1 contains the front-end javascript modules bundled into a webpack
-Source1:          grafana_webpack-%{version}.tar.gz
+# Source1 contains the bundled Go and Node.js dependencies
+Source1:          grafana-vendor-%{version}.tar.xz
 
-# Source2 contains Grafana configuration defaults for distributions
-Source2:          distro-defaults.ini
+%if %{compile_frontend} == 0
+# Source2 contains the precompiled frontend
+Source2:          grafana-webpack-%{version}.tar.gz
+%endif
 
-# Source3 is the script to create the webpack from grafana sources
-Source3:          make_grafana_webpack.sh
+# Source3 contains Grafana configuration defaults for distributions
+Source3:          distro-defaults.ini
 
-# Source4 is the script to generate the list of Go build dependencies:
-Source4:          list_go_buildrequires.sh
+# Source4 contains the Makefile to create the required bundles
+Source4:          Makefile
 
-# Source5 is the script to generate the list of bundled nodejs packages
-Source5:          list_bundled_nodejs_packages.py
+# Source5 contains the script to build the frontend
+Source5:          build_frontend.sh
 
+# Source6 contains the script to generate the list of bundled nodejs packages
+Source6:          list_bundled_nodejs_packages.py
 
 # Patches
-Patch1:           001-login-oauth-use-oauth2-exchange.patch
-Patch2:           002-remove-jaeger-tracing.patch
-Patch3:           003-manpages.patch
-Patch4:           004-wrappers-grafana-cli.patch
-Patch5:           005-pkg-main-fix-import-paths.patch
-Patch6:           006-pkg-setting-ini-default-section.patch
-Patch7:           007-pkg-prometheus-client-query-range.patch
-Patch8:           008-pkg-services-notifications-codes-Unknwon.patch
-Patch9:           009-pkg-fix-xorm-import.patch
+Patch1:           001-wrappers-grafana-cli.patch
+Patch2:           002-manpages.patch
+
+# remove failing assertions due to a symlink
+# BUILD/src/github.com/grafana/grafana -> BUILD/grafana-X.Y.Z
+Patch3:           003-remove-dashboard-abspath-test.patch
+
+# Required for s390x
+# the golden files include memory dumps from a x86 machine
+# integers are stored as little endian on x86, but as big endian on s390x
+# therefore loading this memory dump fails on s390x
+Patch4:           004-skip-x86-goldenfiles-tests.patch
+
+Patch5:           005-pin-yarn-version.patch
+Patch6:           006-remove-saml-dependency.patch
 
 # Intersection of go_arches and nodejs_arches
 ExclusiveArch:    %{grafana_arches}
 
-# https://bugzilla.redhat.com/show_bug.cgi?id=1752991
-# unfortunately the golang_arches macro of go-srpm-macros doesn't reflect that change yet
-ExcludeArch:      i686
+BuildRequires:    git, systemd, golang, go-srpm-macros
+%if 0%{?fedora} >= 31
+BuildRequires:    go-rpm-macros
+%endif
+%if %{compile_frontend}
+BuildRequires:    nodejs >= 1:12, nodejs < 1:13, yarnpkg
+%endif
 
 # omit golang debugsource, see BZ995136 and related
 %global           dwz_low_mem_die_limit 0
@@ -78,205 +95,338 @@ ExcludeArch:      i686
 %{?systemd_requires}
 Requires(pre):    shadow-utils
 
-BuildRequires:    git, systemd, golang, go-srpm-macros
-
 %if 0%{?fedora} || 0%{?rhel} > 7
-Recommends: grafana-cloudwatch = %{version}-%{release}
-Recommends: grafana-elasticsearch = %{version}-%{release}
-Recommends: grafana-azure-monitor = %{version}-%{release}
-Recommends: grafana-graphite = %{version}-%{release}
-Recommends: grafana-influxdb = %{version}-%{release}
-Recommends: grafana-loki = %{version}-%{release}
-Recommends: grafana-mssql = %{version}-%{release}
-Recommends: grafana-mysql = %{version}-%{release}
-Recommends: grafana-opentsdb = %{version}-%{release}
-Recommends: grafana-postgres = %{version}-%{release}
-Recommends: grafana-prometheus = %{version}-%{release}
-Recommends: grafana-stackdriver = %{version}-%{release}
-Recommends: grafana-pcp >= 2
-%endif
-
-%if 0%{?unbundle_vendor_sources}
-# golang build deps. These allow us to unbundle vendor golang source.
-# Note: generated with the list_go_buildrequires.sh script (see README.md)
-BuildRequires: golang(github.com/apache/arrow/go/arrow)
-BuildRequires: golang(github.com/apache/arrow/go/arrow/array)
-BuildRequires: golang(github.com/apache/arrow/go/arrow/ipc)
-BuildRequires: golang(github.com/apache/arrow/go/arrow/memory)
-BuildRequires: golang(github.com/aws/aws-sdk-go/aws)
-BuildRequires: golang(github.com/aws/aws-sdk-go/aws/awsutil)
-BuildRequires: golang(github.com/aws/aws-sdk-go/aws/credentials)
-BuildRequires: golang(github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds)
-BuildRequires: golang(github.com/aws/aws-sdk-go/aws/credentials/endpointcreds)
-BuildRequires: golang(github.com/aws/aws-sdk-go/aws/defaults)
-BuildRequires: golang(github.com/aws/aws-sdk-go/aws/ec2metadata)
-BuildRequires: golang(github.com/aws/aws-sdk-go/aws/request)
-BuildRequires: golang(github.com/aws/aws-sdk-go/aws/session)
-BuildRequires: golang(github.com/aws/aws-sdk-go/service/cloudwatch)
-BuildRequires: golang(github.com/aws/aws-sdk-go/service/ec2)
-BuildRequires: golang(github.com/aws/aws-sdk-go/service/ec2/ec2iface)
-BuildRequires: golang(github.com/aws/aws-sdk-go/service/resourcegroupstaggingapi)
-BuildRequires: golang(github.com/aws/aws-sdk-go/service/resourcegroupstaggingapi/resourcegroupstaggingapiiface)
-BuildRequires: golang(github.com/aws/aws-sdk-go/service/s3/s3manager)
-BuildRequires: golang(github.com/aws/aws-sdk-go/service/sts)
-BuildRequires: golang(github.com/benbjohnson/clock)
-BuildRequires: golang(github.com/bradfitz/gomemcache/memcache)
-BuildRequires: golang(github.com/BurntSushi/toml)
-BuildRequires: golang(github.com/cheekybits/genny/generic)
-BuildRequires: golang(github.com/crewjam/saml)
-BuildRequires: golang(github.com/davecgh/go-spew/spew)
-BuildRequires: golang(github.com/denisenkom/go-mssqldb)
-BuildRequires: golang(github.com/facebookgo/inject)
-BuildRequires: golang(github.com/fatih/color)
-BuildRequires: golang(github.com/gobwas/glob)
-BuildRequires: golang(github.com/golang/protobuf/proto)
-BuildRequires: golang(github.com/go-macaron/binding)
-BuildRequires: golang(github.com/go-macaron/gzip)
-BuildRequires: golang(github.com/go-macaron/session)
-BuildRequires: golang(github.com/google/go-cmp/cmp)
-BuildRequires: golang(github.com/google/go-cmp/cmp/cmpopts)
-BuildRequires: golang(github.com/gorilla/websocket)
-BuildRequires: golang(github.com/gosimple/slug)
-BuildRequires: golang(github.com/go-sql-driver/mysql)
-BuildRequires: golang(github.com/go-stack/stack)
-BuildRequires: golang(github.com/go-xorm/core)
-BuildRequires: golang(github.com/hashicorp/go-hclog)
-BuildRequires: golang(github.com/hashicorp/go-plugin)
-BuildRequires: golang(github.com/hashicorp/go-version)
-BuildRequires: golang(github.com/inconshreveable/log15)
-BuildRequires: golang(github.com/jmespath/go-jmespath)
-BuildRequires: golang(github.com/jung-kurt/gofpdf)
-BuildRequires: golang(github.com/lib/pq)
-BuildRequires: golang(github.com/linkedin/goavro)
-BuildRequires: golang(github.com/mattetti/filebuffer)
-BuildRequires: golang(github.com/mattn/go-isatty)
-BuildRequires: golang(github.com/mattn/go-sqlite3)
-BuildRequires: golang(github.com/opentracing/opentracing-go)
-BuildRequires: golang(github.com/opentracing/opentracing-go/ext)
-BuildRequires: golang(github.com/opentracing/opentracing-go/log)
-BuildRequires: golang(github.com/patrickmn/go-cache)
-BuildRequires: golang(github.com/pkg/errors)
-BuildRequires: golang(github.com/prometheus/client_golang/api)
-BuildRequires: golang(github.com/prometheus/client_golang/api/prometheus/v1)
-BuildRequires: golang(github.com/prometheus/client_golang/prometheus)
-BuildRequires: golang(github.com/prometheus/client_golang/prometheus/promhttp)
-BuildRequires: golang(github.com/prometheus/client_model/go)
-BuildRequires: golang(github.com/prometheus/common/expfmt)
-BuildRequires: golang(github.com/prometheus/common/model)
-BuildRequires: golang(github.com/robfig/cron)
-BuildRequires: golang(github.com/smartystreets/goconvey/convey)
-BuildRequires: golang(github.com/stretchr/testify/require)
-BuildRequires: golang(github.com/teris-io/shortid)
-BuildRequires: golang(github.com/ua-parser/uap-go/uaparser)
-BuildRequires: golang(github.com/uber/jaeger-client-go/config)
-BuildRequires: golang(github.com/uber/jaeger-client-go/zipkin)
-BuildRequires: golang(github.com/Unknwon/com)
-BuildRequires: golang(github.com/urfave/cli/v2)
-BuildRequires: golang(github.com/VividCortex/mysqlerr)
-BuildRequires: golang(github.com/yudai/gojsondiff)
-BuildRequires: golang(github.com/yudai/gojsondiff/formatter)
-BuildRequires: golang(golang.org/x/crypto/pbkdf2)
-BuildRequires: golang(golang.org/x/net/context)
-BuildRequires: golang(golang.org/x/net/context/ctxhttp)
-BuildRequires: golang(golang.org/x/oauth2)
-BuildRequires: golang(golang.org/x/oauth2/google)
-BuildRequires: golang(golang.org/x/oauth2/jwt)
-BuildRequires: golang(golang.org/x/sync/errgroup)
-BuildRequires: golang(golang.org/x/xerrors)
-BuildRequires: golang(google.golang.org/grpc)
-BuildRequires: golang(google.golang.org/grpc/codes)
-BuildRequires: golang(google.golang.org/grpc/metadata)
-BuildRequires: golang(google.golang.org/grpc/status)
-BuildRequires: golang(gopkg.in/ini.v1)
-BuildRequires: golang(gopkg.in/ldap.v3)
-BuildRequires: golang(gopkg.in/macaron.v1)
-BuildRequires: golang(gopkg.in/mail.v2)
-BuildRequires: golang(gopkg.in/redis.v5)
-BuildRequires: golang(gopkg.in/robfig/cron.v3)
-BuildRequires: golang(gopkg.in/square/go-jose.v2)
-BuildRequires: golang(gopkg.in/square/go-jose.v2/jwt)
-BuildRequires: golang(gopkg.in/yaml.v2)
-BuildRequires: golang(xorm.io/xorm)
+Recommends: grafana-pcp
 %endif
 
-# Declare all nodejs modules bundled in the webpack - this is for security
-# purposes so if nodejs-foo ever needs an update, affected packages can be
-# easily identified.
-# Note: generated with the list_bundled_nodejs_packages.sh script (see README.md)
-Provides: bundled(nodejs-@braintree/sanitize-url) = 4.0.0
-Provides: bundled(nodejs-@grafana/slate-react) = 0.22.9-grafana
-Provides: bundled(nodejs-@reduxjs/toolkit) = 1.2.1
-Provides: bundled(nodejs-@torkelo/react-select) = 3.0.8
-Provides: bundled(nodejs-@types/md5) = 2.1.33
-Provides: bundled(nodejs-@types/react-loadable) = 5.5.2
-Provides: bundled(nodejs-@types/react-virtualized-auto-sizer) = 1.0.0
-Provides: bundled(nodejs-@types/uuid) = 3.4.7
-Provides: bundled(nodejs-abortcontroller-polyfill) = 1.4.0
-Provides: bundled(nodejs-angular) = 1.6.9
-Provides: bundled(nodejs-angular-bindonce) = 0.3.1
-Provides: bundled(nodejs-angular-native-dragdrop) = 1.2.2
-Provides: bundled(nodejs-angular-route) = 1.6.6
-Provides: bundled(nodejs-angular-sanitize) = 1.6.6
-Provides: bundled(nodejs-baron) = 3.0.3
-Provides: bundled(nodejs-brace) = 0.10.0
-Provides: bundled(nodejs-calculate-size) = 1.1.1
-Provides: bundled(nodejs-classnames) = 2.2.6
-Provides: bundled(nodejs-clipboard) = 2.0.4
-Provides: bundled(nodejs-core-js) = 1.2.7
-Provides: bundled(nodejs-d3) = 5.15.0
-Provides: bundled(nodejs-d3-scale-chromatic) = 1.5.0
-Provides: bundled(nodejs-emotion) = 10.0.27
-Provides: bundled(nodejs-eventemitter3) = 2.0.3
-Provides: bundled(nodejs-fast-text-encoding) = 1.0.0
-Provides: bundled(nodejs-file-saver) = 1.3.8
-Provides: bundled(nodejs-hoist-non-react-statics) = 3.3.0
-Provides: bundled(nodejs-immutable) = 3.8.2
-Provides: bundled(nodejs-is-hotkey) = 0.1.4
-Provides: bundled(nodejs-jquery) = 3.4.1
-Provides: bundled(nodejs-lodash) = 3.10.1
-Provides: bundled(nodejs-lru-cache) = 4.1.5
-Provides: bundled(nodejs-marked) = 0.3.19
-Provides: bundled(nodejs-md5) = 2.2.1
-Provides: bundled(nodejs-memoize-one) = 4.1.0
-Provides: bundled(nodejs-moment) = 2.24.0
-Provides: bundled(nodejs-mousetrap) = 1.6.3
-Provides: bundled(nodejs-mousetrap-global-bind) = 1.1.0
-Provides: bundled(nodejs-nodemon) = 1.18.10
-Provides: bundled(nodejs-papaparse) = 4.6.3
-Provides: bundled(nodejs-prismjs) = 1.16.0
-Provides: bundled(nodejs-prop-types) = 15.7.2
-Provides: bundled(nodejs-rc-cascader) = 0.17.5
-Provides: bundled(nodejs-re-resizable) = 6.2.0
-Provides: bundled(nodejs-react) = 16.10.2
-Provides: bundled(nodejs-react-dom) = 16.10.2
-Provides: bundled(nodejs-react-grid-layout) = 0.17.1
-Provides: bundled(nodejs-react-highlight-words) = 0.11.0
-Provides: bundled(nodejs-react-loadable) = 5.5.0
-Provides: bundled(nodejs-react-popper) = 1.3.3
-Provides: bundled(nodejs-react-redux) = 7.1.1
-Provides: bundled(nodejs-react-sizeme) = 2.5.2
-Provides: bundled(nodejs-react-split-pane) = 0.1.89
-Provides: bundled(nodejs-react-transition-group) = 2.6.1
-Provides: bundled(nodejs-react-use) = 12.8.0
-Provides: bundled(nodejs-react-virtualized-auto-sizer) = 1.0.2
-Provides: bundled(nodejs-react-window) = 1.7.1
-Provides: bundled(nodejs-redux) = 3.7.2
-Provides: bundled(nodejs-redux-logger) = 3.0.6
-Provides: bundled(nodejs-redux-thunk) = 2.3.0
-Provides: bundled(nodejs-regenerator-runtime) = 0.11.1
-Provides: bundled(nodejs-reselect) = 4.0.0
-Provides: bundled(nodejs-rst2html) = 1.0.4
-Provides: bundled(nodejs-rxjs) = 5.5.12
-Provides: bundled(nodejs-search-query-parser) = 1.5.2
-Provides: bundled(nodejs-slate) = 0.47.8
-Provides: bundled(nodejs-slate-plain-serializer) = 0.7.10
-Provides: bundled(nodejs-tether) = 1.4.5
-Provides: bundled(nodejs-tether-drop) = 1.5.0
-Provides: bundled(nodejs-tinycolor2) = 1.4.1
-Provides: bundled(nodejs-tti-polyfill) = 0.2.2
-Provides: bundled(nodejs-uuid) = 3.3.3
-Provides: bundled(nodejs-whatwg-fetch) = 3.0.0
-Provides: bundled(nodejs-xss) = 1.0.3
+Obsoletes:        grafana-cloudwatch < 7.3.6-1
+Obsoletes:        grafana-elasticsearch < 7.3.6-1
+Obsoletes:        grafana-azure-monitor < 7.3.6-1
+Obsoletes:        grafana-graphite < 7.3.6-1
+Obsoletes:        grafana-influxdb < 7.3.6-1
+Obsoletes:        grafana-loki < 7.3.6-1
+Obsoletes:        grafana-mssql < 7.3.6-1
+Obsoletes:        grafana-mysql < 7.3.6-1
+Obsoletes:        grafana-opentsdb < 7.3.6-1
+Obsoletes:        grafana-postgres < 7.3.6-1
+Obsoletes:        grafana-prometheus < 7.3.6-1
+Obsoletes:        grafana-stackdriver < 7.3.6-1
+Provides:         grafana-cloudwatch = 7.3.6-1
+Provides:         grafana-elasticsearch = 7.3.6-1
+Provides:         grafana-azure-monitor = 7.3.6-1
+Provides:         grafana-graphite = 7.3.6-1
+Provides:         grafana-influxdb = 7.3.6-1
+Provides:         grafana-loki = 7.3.6-1
+Provides:         grafana-mssql = 7.3.6-1
+Provides:         grafana-mysql = 7.3.6-1
+Provides:         grafana-opentsdb = 7.3.6-1
+Provides:         grafana-postgres = 7.3.6-1
+Provides:         grafana-prometheus = 7.3.6-1
+Provides:         grafana-stackdriver = 7.3.6-1
+
+# vendored golang and node.js build dependencies
+# this is for security purposes, if nodejs-foo ever needs an update,
+# affected packages can be easily identified.
+# Note: generated by the Makefile (see README.md)
+Provides: bundled(golang(cloud.google.com/go/storage)) = 1.10.0
+Provides: bundled(golang(github.com/BurntSushi/toml)) = 0.3.1
+Provides: bundled(golang(github.com/VividCortex/mysqlerr)) = 0.0.0-20170204212430.6c6b55f8796f
+Provides: bundled(golang(github.com/aws/aws-sdk-go)) = 1.33.12
+Provides: bundled(golang(github.com/beevik/etree)) = 1.1.0
+Provides: bundled(golang(github.com/benbjohnson/clock)) = 0.0.0-20161215174838.7dc76406b6d3
+Provides: bundled(golang(github.com/bradfitz/gomemcache)) = 0.0.0-20190913173617.a41fca850d0b
+Provides: bundled(golang(github.com/centrifugal/centrifuge)) = 0.11.0
+Provides: bundled(golang(github.com/davecgh/go-spew)) = 1.1.1
+Provides: bundled(golang(github.com/denisenkom/go-mssqldb)) = 0.0.0-20200620013148.b91950f658ec
+Provides: bundled(golang(github.com/facebookgo/inject)) = 0.0.0-20180706035515.f23751cae28b
+Provides: bundled(golang(github.com/fatih/color)) = 1.9.0
+Provides: bundled(golang(github.com/gchaincl/sqlhooks)) = 1.3.0
+Provides: bundled(golang(github.com/go-macaron/binding)) = 0.0.0-20190806013118.0b4f37bab25b
+Provides: bundled(golang(github.com/go-macaron/gzip)) = 0.0.0-20160222043647.cad1c6580a07
+Provides: bundled(golang(github.com/go-macaron/session)) = 0.0.0-20190805070824.1a3cdc6f5659
+Provides: bundled(golang(github.com/go-sql-driver/mysql)) = 1.5.0
+Provides: bundled(golang(github.com/go-stack/stack)) = 1.8.0
+Provides: bundled(golang(github.com/gobwas/glob)) = 0.2.3
+Provides: bundled(golang(github.com/golang/protobuf)) = 1.4.3
+Provides: bundled(golang(github.com/google/go-cmp)) = 0.5.2
+Provides: bundled(golang(github.com/gosimple/slug)) = 1.4.2
+Provides: bundled(golang(github.com/grafana/grafana-plugin-model)) = 0.0.0-20190930120109.1fc953a61fb4
+Provides: bundled(golang(github.com/grafana/grafana-plugin-sdk-go)) = 0.79.0
+Provides: bundled(golang(github.com/grafana/loki)) = 1.6.0
+Provides: bundled(golang(github.com/grpc-ecosystem/go-grpc-middleware)) = 1.2.1
+Provides: bundled(golang(github.com/hashicorp/go-hclog)) = 0.12.2
+Provides: bundled(golang(github.com/hashicorp/go-plugin)) = 1.2.2
+Provides: bundled(golang(github.com/hashicorp/go-version)) = 1.2.0
+Provides: bundled(golang(github.com/inconshreveable/log15)) = 0.0.0-20180818164646.67afb5ed74ec
+Provides: bundled(golang(github.com/influxdata/influxdb-client-go/v2)) = 2.2.0
+Provides: bundled(golang(github.com/jmespath/go-jmespath)) = 0.3.0
+Provides: bundled(golang(github.com/jung-kurt/gofpdf)) = 1.10.1
+Provides: bundled(golang(github.com/lib/pq)) = 1.3.0
+Provides: bundled(golang(github.com/linkedin/goavro/v2)) = 2.9.7
+Provides: bundled(golang(github.com/magefile/mage)) = 1.9.0
+Provides: bundled(golang(github.com/mattn/go-isatty)) = 0.0.12
+Provides: bundled(golang(github.com/mattn/go-sqlite3)) = 1.11.0
+Provides: bundled(golang(github.com/opentracing/opentracing-go)) = 1.2.0
+Provides: bundled(golang(github.com/patrickmn/go-cache)) = 2.1.0+incompatible
+Provides: bundled(golang(github.com/pkg/errors)) = 0.9.1
+Provides: bundled(golang(github.com/prometheus/client_golang)) = 1.8.0
+Provides: bundled(golang(github.com/prometheus/client_model)) = 0.2.0
+Provides: bundled(golang(github.com/prometheus/common)) = 0.14.0
+Provides: bundled(golang(github.com/robfig/cron)) = 0.0.0-20180505203441.b41be1df6967
+Provides: bundled(golang(github.com/robfig/cron/v3)) = 3.0.0
+Provides: bundled(golang(github.com/russellhaering/goxmldsig)) = 1.1.0
+Provides: bundled(golang(github.com/smartystreets/goconvey)) = 1.6.4
+Provides: bundled(golang(github.com/stretchr/testify)) = 1.6.1
+Provides: bundled(golang(github.com/teris-io/shortid)) = 0.0.0-20171029131806.771a37caa5cf
+Provides: bundled(golang(github.com/timberio/go-datemath)) = 0.1.1-0.20200323150745.74ddef604fff
+Provides: bundled(golang(github.com/ua-parser/uap-go)) = 0.0.0-20190826212731.daf92ba38329
+Provides: bundled(golang(github.com/uber/jaeger-client-go)) = 2.25.0+incompatible
+Provides: bundled(golang(github.com/unknwon/com)) = 1.0.1
+Provides: bundled(golang(github.com/urfave/cli/v2)) = 2.1.1
+Provides: bundled(golang(github.com/weaveworks/common)) = 0.0.0-20201119133501.0619918236ec
+Provides: bundled(golang(github.com/xorcare/pointer)) = 1.1.0
+Provides: bundled(golang(github.com/yudai/gojsondiff)) = 1.0.0
+Provides: bundled(golang(golang.org/x/crypto)) = 0.0.0-20201208171446.5f87f3452ae9
+Provides: bundled(golang(golang.org/x/net)) = 0.0.0-20201022231255.08b38378de70
+Provides: bundled(golang(golang.org/x/oauth2)) = 0.0.0-20200902213428.5d25da1a8d43
+Provides: bundled(golang(golang.org/x/sync)) = 0.0.0-20201020160332.67f06af15bc9
+Provides: bundled(golang(golang.org/x/time)) = 0.0.0-20200630173020.3af7569d3a1e
+Provides: bundled(golang(google.golang.org/grpc)) = 1.33.1
+Provides: bundled(golang(gopkg.in/ini.v1)) = 1.51.0
+Provides: bundled(golang(gopkg.in/ldap.v3)) = 3.0.2
+Provides: bundled(golang(gopkg.in/macaron.v1)) = 1.3.9
+Provides: bundled(golang(gopkg.in/mail.v2)) = 2.3.1
+Provides: bundled(golang(gopkg.in/redis.v5)) = 5.2.9
+Provides: bundled(golang(gopkg.in/square/go-jose.v2)) = 2.4.1
+Provides: bundled(golang(gopkg.in/yaml.v2)) = 2.3.0
+Provides: bundled(golang(xorm.io/core)) = 0.7.3
+Provides: bundled(golang(xorm.io/xorm)) = 0.8.1
+Provides: bundled(npm(@babel/core)) = 7.6.2
+Provides: bundled(npm(@babel/plugin-proposal-nullish-coalescing-operator)) = 7.8.3
+Provides: bundled(npm(@babel/plugin-proposal-optional-chaining)) = 7.8.3
+Provides: bundled(npm(@babel/plugin-syntax-dynamic-import)) = 7.2.0
+Provides: bundled(npm(@babel/preset-env)) = 7.6.3
+Provides: bundled(npm(@babel/preset-react)) = 7.6.3
+Provides: bundled(npm(@babel/preset-typescript)) = 7.8.3
+Provides: bundled(npm(@emotion/core)) = 10.0.21
+Provides: bundled(npm(@grafana/api-documenter)) = 0.9.3
+Provides: bundled(npm(@grafana/api-extractor)) = 7.10.1
+Provides: bundled(npm(@grafana/eslint-config)) = 2.0.3
+Provides: bundled(npm(@grafana/slate-react)) = 0.22.9-grafana
+Provides: bundled(npm(@reduxjs/toolkit)) = 1.3.4
+Provides: bundled(npm(@rtsao/plugin-proposal-class-properties)) = 7.0.1-patch.1
+Provides: bundled(npm(@testing-library/jest-dom)) = 5.11.3
+Provides: bundled(npm(@testing-library/react)) = 10.4.8
+Provides: bundled(npm(@testing-library/react-hooks)) = 3.2.1
+Provides: bundled(npm(@testing-library/user-event)) = 12.1.3
+Provides: bundled(npm(@torkelo/react-select)) = 3.0.8
+Provides: bundled(npm(@types/angular)) = 1.6.56
+Provides: bundled(npm(@types/angular-route)) = 1.7.0
+Provides: bundled(npm(@types/antlr4)) = 4.7.1
+Provides: bundled(npm(@types/braintree__sanitize-url)) = 4.0.0
+Provides: bundled(npm(@types/classnames)) = 2.2.7
+Provides: bundled(npm(@types/clipboard)) = 2.0.1
+Provides: bundled(npm(@types/common-tags)) = 1.8.0
+Provides: bundled(npm(@types/d3)) = 5.7.2
+Provides: bundled(npm(@types/d3-scale-chromatic)) = 1.3.1
+Provides: bundled(npm(@types/enzyme)) = 3.10.3
+Provides: bundled(npm(@types/enzyme-adapter-react-16)) = 1.0.6
+Provides: bundled(npm(@types/file-saver)) = 2.0.1
+Provides: bundled(npm(@types/hoist-non-react-statics)) = 3.3.1
+Provides: bundled(npm(@types/is-hotkey)) = 0.1.1
+Provides: bundled(npm(@types/jest)) = 23.3.14
+Provides: bundled(npm(@types/jquery)) = 3.3.38
+Provides: bundled(npm(@types/jsurl)) = 1.2.28
+Provides: bundled(npm(@types/lodash)) = 4.14.123
+Provides: bundled(npm(@types/lru-cache)) = 5.1.0
+Provides: bundled(npm(@types/marked)) = 1.1.0
+Provides: bundled(npm(@types/md5)) = 2.1.33
+Provides: bundled(npm(@types/moment-timezone)) = 0.5.13
+Provides: bundled(npm(@types/mousetrap)) = 1.6.3
+Provides: bundled(npm(@types/node)) = 10.14.1
+Provides: bundled(npm(@types/papaparse)) = 5.2.0
+Provides: bundled(npm(@types/prismjs)) = 1.16.0
+Provides: bundled(npm(@types/react)) = 16.8.16
+Provides: bundled(npm(@types/react-beautiful-dnd)) = 12.1.2
+Provides: bundled(npm(@types/react-dom)) = 16.8.4
+Provides: bundled(npm(@types/react-grid-layout)) = 0.16.7
+Provides: bundled(npm(@types/react-loadable)) = 5.5.2
+Provides: bundled(npm(@types/react-redux)) = 7.1.7
+Provides: bundled(npm(@types/react-select)) = 3.0.8
+Provides: bundled(npm(@types/react-test-renderer)) = 16.9.1
+Provides: bundled(npm(@types/react-transition-group)) = 4.2.3
+Provides: bundled(npm(@types/react-virtualized-auto-sizer)) = 1.0.0
+Provides: bundled(npm(@types/react-window)) = 1.8.1
+Provides: bundled(npm(@types/redux-logger)) = 3.0.7
+Provides: bundled(npm(@types/redux-mock-store)) = 1.0.2
+Provides: bundled(npm(@types/reselect)) = 2.2.0
+Provides: bundled(npm(@types/slate)) = 0.47.1
+Provides: bundled(npm(@types/slate-plain-serializer)) = 0.6.1
+Provides: bundled(npm(@types/slate-react)) = 0.22.5
+Provides: bundled(npm(@types/sockjs-client)) = 1.1.1
+Provides: bundled(npm(@types/testing-library__jest-dom)) = 5.9.2
+Provides: bundled(npm(@types/testing-library__react-hooks)) = 3.1.0
+Provides: bundled(npm(@types/tinycolor2)) = 1.4.1
+Provides: bundled(npm(@types/uuid)) = 8.3.0
+Provides: bundled(npm(@typescript-eslint/eslint-plugin)) = 4.0.1
+Provides: bundled(npm(@typescript-eslint/parser)) = 4.0.1
+Provides: bundled(npm(@welldone-software/why-did-you-render)) = 4.0.6
+Provides: bundled(npm(abortcontroller-polyfill)) = 1.4.0
+Provides: bundled(npm(angular)) = 1.6.9
+Provides: bundled(npm(angular-bindonce)) = 0.3.1
+Provides: bundled(npm(angular-mocks)) = 1.6.6
+Provides: bundled(npm(angular-native-dragdrop)) = 1.2.2
+Provides: bundled(npm(angular-route)) = 1.6.6
+Provides: bundled(npm(angular-sanitize)) = 1.6.6
+Provides: bundled(npm(antlr4)) = 4.8.0
+Provides: bundled(npm(autoprefixer)) = 9.7.4
+Provides: bundled(npm(axios)) = 0.19.0
+Provides: bundled(npm(babel-core)) = 7.0.0-bridge.0
+Provides: bundled(npm(babel-jest)) = 24.8.0
+Provides: bundled(npm(babel-loader)) = 8.0.6
+Provides: bundled(npm(babel-plugin-angularjs-annotate)) = 0.10.0
+Provides: bundled(npm(baron)) = 3.0.3
+Provides: bundled(npm(brace)) = 0.11.1
+Provides: bundled(npm(calculate-size)) = 1.1.1
+Provides: bundled(npm(centrifuge)) = 2.6.4
+Provides: bundled(npm(classnames)) = 2.2.6
+Provides: bundled(npm(clean-webpack-plugin)) = 3.0.0
+Provides: bundled(npm(clipboard)) = 2.0.4
+Provides: bundled(npm(common-tags)) = 1.8.0
+Provides: bundled(npm(core-js)) = 1.2.7
+Provides: bundled(npm(css-loader)) = 3.2.0
+Provides: bundled(npm(d3)) = 5.15.0
+Provides: bundled(npm(d3-scale-chromatic)) = 1.5.0
+Provides: bundled(npm(dangerously-set-html-content)) = 1.0.6
+Provides: bundled(npm(emotion)) = 10.0.27
+Provides: bundled(npm(enzyme)) = 3.11.0
+Provides: bundled(npm(enzyme-adapter-react-16)) = 1.15.2
+Provides: bundled(npm(enzyme-to-json)) = 3.4.4
+Provides: bundled(npm(es6-promise)) = 4.2.8
+Provides: bundled(npm(es6-shim)) = 0.35.5
+Provides: bundled(npm(eslint)) = 2.13.1
+Provides: bundled(npm(eslint-config-prettier)) = 6.11.0
+Provides: bundled(npm(eslint-plugin-jsdoc)) = 28.6.1
+Provides: bundled(npm(eslint-plugin-prettier)) = 3.1.4
+Provides: bundled(npm(eslint-plugin-react-hooks)) = 4.0.5
+Provides: bundled(npm(eventemitter3)) = 3.1.2
+Provides: bundled(npm(expect.js)) = 0.3.1
+Provides: bundled(npm(expose-loader)) = 0.7.5
+Provides: bundled(npm(fast-text-encoding)) = 1.0.0
+Provides: bundled(npm(file-loader)) = 4.3.0
+Provides: bundled(npm(file-saver)) = 2.0.2
+Provides: bundled(npm(fork-ts-checker-webpack-plugin)) = 1.0.0
+Provides: bundled(npm(gaze)) = 1.1.3
+Provides: bundled(npm(glob)) = 5.0.15
+Provides: bundled(npm(grunt)) = 1.0.4
+Provides: bundled(npm(grunt-angular-templates)) = 1.1.0
+Provides: bundled(npm(grunt-cli)) = 1.2.0
+Provides: bundled(npm(grunt-contrib-clean)) = 2.0.0
+Provides: bundled(npm(grunt-contrib-compress)) = 1.6.0
+Provides: bundled(npm(grunt-contrib-copy)) = 1.0.0
+Provides: bundled(npm(grunt-exec)) = 3.0.0
+Provides: bundled(npm(grunt-newer)) = 1.3.0
+Provides: bundled(npm(grunt-notify)) = 0.4.5
+Provides: bundled(npm(grunt-postcss)) = 0.9.0
+Provides: bundled(npm(grunt-sass-lint)) = 0.2.4
+Provides: bundled(npm(grunt-usemin)) = 3.1.1
+Provides: bundled(npm(grunt-webpack)) = 3.1.3
+Provides: bundled(npm(hoist-non-react-statics)) = 2.5.5
+Provides: bundled(npm(html-loader)) = 0.5.5
+Provides: bundled(npm(html-webpack-harddisk-plugin)) = 1.0.1
+Provides: bundled(npm(html-webpack-plugin)) = 3.2.0
+Provides: bundled(npm(husky)) = 4.2.1
+Provides: bundled(npm(immutable)) = 3.8.2
+Provides: bundled(npm(is-hotkey)) = 0.1.4
+Provides: bundled(npm(jest)) = 25.5.4
+Provides: bundled(npm(jest-canvas-mock)) = 2.1.2
+Provides: bundled(npm(jest-date-mock)) = 1.0.8
+Provides: bundled(npm(jquery)) = 3.4.1
+Provides: bundled(npm(jsurl)) = 0.1.5
+Provides: bundled(npm(lerna)) = 3.20.2
+Provides: bundled(npm(lint-staged)) = 10.0.7
+Provides: bundled(npm(load-grunt-tasks)) = 5.1.0
+Provides: bundled(npm(lodash)) = 3.10.1
+Provides: bundled(npm(lru-cache)) = 4.1.5
+Provides: bundled(npm(marked)) = 0.3.19
+Provides: bundled(npm(md5)) = 2.2.1
+Provides: bundled(npm(memoize-one)) = 4.1.0
+Provides: bundled(npm(mini-css-extract-plugin)) = 0.7.0
+Provides: bundled(npm(mocha)) = 7.0.1
+Provides: bundled(npm(module-alias)) = 2.2.2
+Provides: bundled(npm(moment)) = 2.24.0
+Provides: bundled(npm(moment-timezone)) = 0.5.28
+Provides: bundled(npm(monaco-editor)) = 0.20.0
+Provides: bundled(npm(monaco-editor-webpack-plugin)) = 1.9.0
+Provides: bundled(npm(mousetrap)) = 1.6.5
+Provides: bundled(npm(mousetrap-global-bind)) = 1.1.0
+Provides: bundled(npm(mutationobserver-shim)) = 0.3.3
+Provides: bundled(npm(ngtemplate-loader)) = 2.0.1
+Provides: bundled(npm(node-sass)) = 4.13.1
+Provides: bundled(npm(nodemon)) = 2.0.2
+Provides: bundled(npm(optimize-css-assets-webpack-plugin)) = 5.0.3
+Provides: bundled(npm(papaparse)) = 4.6.3
+Provides: bundled(npm(postcss-browser-reporter)) = 0.6.0
+Provides: bundled(npm(postcss-loader)) = 3.0.0
+Provides: bundled(npm(postcss-reporter)) = 6.0.1
+Provides: bundled(npm(prettier)) = 1.18.2
+Provides: bundled(npm(prismjs)) = 1.17.1
+Provides: bundled(npm(prop-types)) = 15.7.2
+Provides: bundled(npm(rc-cascader)) = 1.0.1
+Provides: bundled(npm(re-resizable)) = 6.2.0
+Provides: bundled(npm(react)) = 16.10.2
+Provides: bundled(npm(react-dom)) = 16.10.2
+Provides: bundled(npm(react-grid-layout)) = 0.17.1
+Provides: bundled(npm(react-highlight-words)) = 0.16.0
+Provides: bundled(npm(react-hot-loader)) = 4.8.0
+Provides: bundled(npm(react-loadable)) = 5.5.0
+Provides: bundled(npm(react-popper)) = 1.3.3
+Provides: bundled(npm(react-redux)) = 7.2.0
+Provides: bundled(npm(react-reverse-portal)) = 2.0.1
+Provides: bundled(npm(react-sizeme)) = 2.6.8
+Provides: bundled(npm(react-split-pane)) = 0.1.89
+Provides: bundled(npm(react-test-renderer)) = 16.10.2
+Provides: bundled(npm(react-transition-group)) = 2.9.0
+Provides: bundled(npm(react-use)) = 13.27.0
+Provides: bundled(npm(react-virtualized-auto-sizer)) = 1.0.2
+Provides: bundled(npm(react-window)) = 1.8.5
+Provides: bundled(npm(redux)) = 3.7.2
+Provides: bundled(npm(redux-logger)) = 3.0.6
+Provides: bundled(npm(redux-mock-store)) = 1.5.4
+Provides: bundled(npm(redux-thunk)) = 2.3.0
+Provides: bundled(npm(regenerator-runtime)) = 0.11.1
+Provides: bundled(npm(regexp-replace-loader)) = 1.0.1
+Provides: bundled(npm(reselect)) = 4.0.0
+Provides: bundled(npm(rimraf)) = 2.6.3
+Provides: bundled(npm(rst2html)) = 1.0.4
+Provides: bundled(npm(rxjs)) = 6.5.5
+Provides: bundled(npm(rxjs-spy)) = 7.5.1
+Provides: bundled(npm(sass-lint)) = 1.12.1
+Provides: bundled(npm(sass-loader)) = 8.0.2
+Provides: bundled(npm(search-query-parser)) = 1.5.4
+Provides: bundled(npm(sinon)) = 8.1.1
+Provides: bundled(npm(slate)) = 0.47.8
+Provides: bundled(npm(slate-plain-serializer)) = 0.7.10
+Provides: bundled(npm(sockjs-client)) = 1.4.0
+Provides: bundled(npm(style-loader)) = 1.1.3
+Provides: bundled(npm(terser-webpack-plugin)) = 1.4.1
+Provides: bundled(npm(tether)) = 1.4.7
+Provides: bundled(npm(tether-drop)) = 1.5.0
+Provides: bundled(npm(tinycolor2)) = 1.4.1
+Provides: bundled(npm(ts-jest)) = 26.3.0
+Provides: bundled(npm(ts-node)) = 8.8.1
+Provides: bundled(npm(tslib)) = 1.10.0
+Provides: bundled(npm(tti-polyfill)) = 0.2.2
+Provides: bundled(npm(typescript)) = 3.7.5
+Provides: bundled(npm(uuid)) = 3.3.3
+Provides: bundled(npm(webpack)) = 4.41.2
+Provides: bundled(npm(webpack-bundle-analyzer)) = 3.6.0
+Provides: bundled(npm(webpack-cleanup-plugin)) = 0.5.1
+Provides: bundled(npm(webpack-cli)) = 3.3.10
+Provides: bundled(npm(webpack-dev-server)) = 3.10.3
+Provides: bundled(npm(webpack-merge)) = 4.2.2
+Provides: bundled(npm(whatwg-fetch)) = 3.0.0
+Provides: bundled(npm(zone.js)) = 0.7.8
 
 
 %description
@@ -284,165 +434,61 @@ Grafana is an open source, feature rich metrics dashboard and graph editor for
 Graphite, InfluxDB & OpenTSDB.
 
 
-%package cloudwatch
-Requires: %{name} = %{version}-%{release}
-Summary: Grafana cloudwatch datasource
-
-%description cloudwatch
-The Grafana cloudwatch datasource.
-
-%package elasticsearch
-Requires: %{name} = %{version}-%{release}
-Summary: Grafana elasticsearch datasource
-
-%description elasticsearch
-The Grafana elasticsearch datasource.
-
-%package azure-monitor
-Requires: %{name} = %{version}-%{release}
-Summary: Grafana azure-monitor datasource
-
-%description azure-monitor
-The Grafana azure-monitor datasource.
-
-%package graphite
-Requires: %{name} = %{version}-%{release}
-Summary: Grafana graphite datasource
-
-%description graphite
-The Grafana graphite datasource.
-
-%package influxdb
-Requires: %{name} = %{version}-%{release}
-Summary: Grafana influxdb datasource
-
-%description influxdb
-The Grafana influxdb datasource.
-
-%package loki
-Requires: %{name} = %{version}-%{release}
-Summary: Grafana loki datasource
-
-%description loki
-The Grafana loki datasource.
-
-%package mssql
-Requires: %{name} = %{version}-%{release}
-Summary: Grafana mssql datasource
-
-%description mssql
-The Grafana mssql datasource.
-
-%package mysql
-Requires: %{name} = %{version}-%{release}
-Summary: Grafana mysql datasource
-
-%description mysql
-The Grafana mysql datasource.
-
-%package opentsdb
-Requires: %{name} = %{version}-%{release}
-Summary: Grafana opentsdb datasource
-
-%description opentsdb
-The Grafana opentsdb datasource.
-
-%package postgres
-Requires: %{name} = %{version}-%{release}
-Summary: Grafana postgres datasource
-
-%description postgres
-The Grafana postgres datasource.
-
-%package prometheus
-Requires: %{name} = %{version}-%{release}
-Summary: Grafana prometheus datasource
-
-%description prometheus
-The Grafana prometheus datasource.
-
-%package stackdriver
-Requires: %{name} = %{version}-%{release}
-Summary: Grafana stackdriver datasource
-
-%description stackdriver
-The Grafana stackdriver datasource.
-
-
 %prep
 %setup -q -T -D -b 0
 %setup -q -T -D -b 1
+%if %{compile_frontend} == 0
+# remove bundled plugins source, otherwise they'll get merged
+# with the compiled bundled plugins when extracting the webpack
+rm -r plugins-bundled
+%setup -q -T -D -b 2
+%endif
+
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%ifarch s390x
 %patch4 -p1
-%patch6 -p1
-
-%if 0%{?unbundle_vendor_sources}
-%patch5 -p1
-%patch7 -p1
-%patch8 -p1
-%patch9 -p1
 %endif
+%patch5 -p1
+%patch6 -p1
 
 # Set up build subdirs and links
 mkdir -p %{_builddir}/src/github.com/grafana
-ln -sf %{_builddir}/%{name}-%{version} \
+ln -s %{_builddir}/%{name}-%{version} \
     %{_builddir}/src/github.com/grafana/grafana
 
-# remove some (apparent) development files, for rpmlint
-rm -f public/sass/.sass-lint.yml public/test/.jshintrc
-
-%if 0%{?unbundle_vendor_sources}
-# Unbundle all grafana vendor sources, as per BuildRequires above.
-# Note there are some exceptions.
-cp --parents -a \
-    vendor/github.com/grafana/grafana-plugin-model \
-    vendor/github.com/grafana/grafana-plugin-sdk-go \
-    %{_builddir}
-rm -r vendor # remove all vendor sources
-mv %{_builddir}/vendor vendor # put back what we're keeping
-%endif
 
 %build
-# Build the server-side binaries
-cd %{_builddir}/src/github.com/grafana/grafana
-%global archbindir bin/`go env GOOS`-`go env GOARCH`
-echo _builddir=%{_builddir} archbindir=%{archbindir} gopath=%{gopath}
-[ ! -d %{archbindir} ] && mkdir -p %{archbindir}
+# Build the frontend
+%if %{compile_frontend}
+%{SOURCE5}
+%endif
 
-# non-modular build
-export GOPATH=%{_builddir}:%{gopath}
-export GO111MODULE=off; rm -f go.mod
+# Build the backend
+cd %{_builddir}/src/github.com/grafana/grafana
+export GOPATH=%{_builddir}
 
 # see grafana-X.X.X/build.go
 export LDFLAGS="-X main.version=%{version} -X main.buildstamp=${SOURCE_DATE_EPOCH}"
 for cmd in grafana-cli grafana-server; do
-    %gobuild -o %{archbindir}/${cmd} ./pkg/cmd/${cmd}
+    %gobuild -o %{_builddir}/bin/${cmd} ./pkg/cmd/${cmd}
 done
 
-%install
-# Fix up arch bin directories
-[ ! -d bin/x86_64 ] && ln -sf linux-amd64 bin/x86_64
-[ ! -d bin/i386 ] && ln -sf linux-386 bin/i386
-[ ! -d bin/ppc64le ] && ln -sf linux-ppc64le bin/ppc64le
-[ ! -d bin/s390x ] && ln -sf linux-s390x bin/s390x
-[ ! -d bin/arm ] && ln -sf linux-arm bin/arm
-[ ! -d bin/arm64 ] && ln -sf linux-arm64 bin/aarch64
-[ ! -d bin/aarch64 ] && ln -sf linux-aarch64 bin/aarch64
 
+%install
 # dirs, shared files, public html, webpack
 install -d %{buildroot}%{_sbindir}
 install -d %{buildroot}%{_datadir}/%{name}
 install -d %{buildroot}%{_libexecdir}/%{name}
-cp -a conf public %{buildroot}%{_datadir}/%{name}
+cp -a conf public plugins-bundled %{buildroot}%{_datadir}/%{name}
 
 # wrappers
 install -p -m 755 packaging/wrappers/grafana-cli %{buildroot}%{_sbindir}/%{name}-cli
 
 # binaries
-install -p -m 755 %{archbindir}/%{name}-server %{buildroot}%{_sbindir}
-install -p -m 755 %{archbindir}/%{name}-cli %{buildroot}%{_libexecdir}/%{name}
+install -p -m 755 %{_builddir}/bin/%{name}-server %{buildroot}%{_sbindir}
+install -p -m 755 %{_builddir}/bin/%{name}-cli %{buildroot}%{_libexecdir}/%{name}
 
 # man pages
 install -d %{buildroot}%{_mandir}/man1
@@ -450,12 +496,17 @@ install -p -m 644 docs/man/man1/* %{buildroot}%{_mandir}/man1
 
 # config dirs
 install -d %{buildroot}%{_sysconfdir}/%{name}
+install -d %{buildroot}%{_sysconfdir}/%{name}/provisioning
+install -d %{buildroot}%{_sysconfdir}/%{name}/provisioning/dashboards
+install -d %{buildroot}%{_sysconfdir}/%{name}/provisioning/datasources
+install -d %{buildroot}%{_sysconfdir}/%{name}/provisioning/notifiers
+install -d %{buildroot}%{_sysconfdir}/%{name}/provisioning/plugins
 install -d %{buildroot}%{_sysconfdir}/sysconfig
 
 # config defaults
-install -p -m 640 %{SOURCE2} %{buildroot}%{_sysconfdir}/%{name}/grafana.ini
+install -p -m 640 %{SOURCE3} %{buildroot}%{_sysconfdir}/%{name}/grafana.ini
 install -p -m 640 conf/ldap.toml %{buildroot}%{_sysconfdir}/%{name}/ldap.toml
-install -p -m 644 %{SOURCE2} %{buildroot}%{_datadir}/%{name}/conf/defaults.ini
+install -p -m 644 %{SOURCE3} %{buildroot}%{_datadir}/%{name}/conf/defaults.ini
 install -p -m 644 packaging/rpm/sysconfig/grafana-server \
     %{buildroot}%{_sysconfdir}/sysconfig/grafana-server
 
@@ -514,13 +565,20 @@ chmod 640 %{_sysconfdir}/%{name}/ldap.toml
 
 
 %check
+# Test frontend
+%if %{compile_frontend}
+yarn test
+%endif
+
+# Test backend
 cd %{_builddir}/src/github.com/grafana/grafana
-export GOPATH=%{_builddir}:%{gopath}
-# remove tests currently failing - these two are due to a symlink
-# BUILD/src/github.com/grafana/grafana -> BUILD/grafana-6.6.1
-rm -f pkg/services/provisioning/dashboards/file_reader_linux_test.go
-rm -f pkg/services/provisioning/dashboards/file_reader_test.go
-export GO111MODULE=off
+export GOPATH=%{_builddir}
+
+# in setting_test.go there is a unit test which checks if 10 days are 240 hours
+# which is usually true except if the dayligt saving time change falls into the last 10 days, then it's either 239 or 241 hours...
+# let's set the time zone to a time zone without daylight saving time
+export TZ=GMT
+
 %gotest ./pkg/...
 
 
@@ -531,42 +589,30 @@ export GO111MODULE=off
 %{_libexecdir}/%{name}
 
 # config files
-%dir %{_sysconfdir}/%{name}
-%config(noreplace) %attr(640, root, %{GRAFANA_GROUP}) %{_sysconfdir}/%{name}/grafana.ini
-%config(noreplace) %attr(640, root, %{GRAFANA_GROUP}) %{_sysconfdir}/%{name}/ldap.toml
 %config(noreplace) %{_sysconfdir}/sysconfig/grafana-server
-
-# Grafana configuration to dynamically create /run/grafana/grafana.pid on tmpfs
-%{_tmpfilesdir}/%{name}.conf
+%dir %{_sysconfdir}/%{name}
+%attr(0755, root, %{GRAFANA_GROUP}) %dir %{_sysconfdir}/%{name}/provisioning
+%attr(0755, root, %{GRAFANA_GROUP}) %dir %{_sysconfdir}/%{name}/provisioning/dashboards
+%attr(0750, root, %{GRAFANA_GROUP}) %dir %{_sysconfdir}/%{name}/provisioning/datasources
+%attr(0755, root, %{GRAFANA_GROUP}) %dir %{_sysconfdir}/%{name}/provisioning/notifiers
+%attr(0755, root, %{GRAFANA_GROUP}) %dir %{_sysconfdir}/%{name}/provisioning/plugins
+%attr(0640, root, %{GRAFANA_GROUP}) %config(noreplace) %{_sysconfdir}/%{name}/grafana.ini
+%attr(0640, root, %{GRAFANA_GROUP}) %config(noreplace) %{_sysconfdir}/%{name}/ldap.toml
 
 # config database directory and plugins
-%attr(750, %{GRAFANA_USER}, %{GRAFANA_GROUP}) %dir %{_sharedstatedir}/%{name}
-%attr(-, %{GRAFANA_USER}, %{GRAFANA_GROUP}) %dir %{_sharedstatedir}/%{name}/plugins
+%attr(0750, %{GRAFANA_USER}, %{GRAFANA_GROUP}) %dir %{_sharedstatedir}/%{name}
+%attr(-,    %{GRAFANA_USER}, %{GRAFANA_GROUP}) %dir %{_sharedstatedir}/%{name}/plugins
 
-# shared directory and all files therein, except some datasources
+# shared directory and all files therein
 %{_datadir}/%{name}
-
-# built-in datasources that are sub-packaged
-%global dsdir %{_datadir}/%{name}/public/app/plugins/datasource
-%exclude %{dsdir}/cloudwatch 
-%exclude %{dsdir}/elasticsearch 
-%exclude %{dsdir}/graphite
-%exclude %{dsdir}/grafana-azure-monitor-datasource
-%exclude %{dsdir}/influxdb
-%exclude %{dsdir}/loki
-%exclude %{dsdir}/mssql
-%exclude %{dsdir}/mysql
-%exclude %{dsdir}/opentsdb
-%exclude %{dsdir}/postgres
-%exclude %{dsdir}/prometheus
-%exclude %{dsdir}/stackdriver
-
-%dir %{_datadir}/%{name}/conf
 %attr(-, root, %{GRAFANA_GROUP}) %{_datadir}/%{name}/conf/*
 
 # systemd service file
 %{_unitdir}/grafana-server.service
 
+# Grafana configuration to dynamically create /run/grafana/grafana.pid on tmpfs
+%{_tmpfilesdir}/%{name}.conf
+
 # log directory - grafana.log is created by grafana-server, and it does it's own log rotation
 %attr(0755, %{GRAFANA_USER}, %{GRAFANA_GROUP}) %dir %{_localstatedir}/log/%{name}
 
@@ -576,61 +622,33 @@ export GO111MODULE=off
 
 # other docs and license
 %license LICENSE
-%doc CHANGELOG.md CODE_OF_CONDUCT.md CONTRIBUTING.md NOTICE.md
-%doc PLUGIN_DEV.md README.md ROADMAP.md UPGRADING_DEPENDENCIES.md
+%doc CHANGELOG.md CODE_OF_CONDUCT.md CONTRIBUTING.md GOVERNANCE.md ISSUE_TRIAGE.md MAINTAINERS.md NOTICE.md
+%doc PLUGIN_DEV.md README.md ROADMAP.md SECURITY.md SUPPORT.md UPGRADING_DEPENDENCIES.md WORKFLOW.md
 
-#
-# datasources split out into subpackages
-#
-%files cloudwatch
-%{_datadir}/%{name}/public/app/plugins/datasource/cloudwatch
-%doc %{_datadir}/%{name}/public/app/plugins/datasource/cloudwatch/README.md
 
-%files elasticsearch
-%{_datadir}/%{name}/public/app/plugins/datasource/elasticsearch
-%doc %{_datadir}/%{name}/public/app/plugins/datasource/elasticsearch/README.md
-
-%files azure-monitor
-%{_datadir}/%{name}/public/app/plugins/datasource/grafana-azure-monitor-datasource
-
-%files graphite
-%{_datadir}/%{name}/public/app/plugins/datasource/graphite
-%doc %{_datadir}/%{name}/public/app/plugins/datasource/graphite/README.md
-
-%files influxdb
-%{_datadir}/%{name}/public/app/plugins/datasource/influxdb
-%doc %{_datadir}/%{name}/public/app/plugins/datasource/influxdb/README.md
-
-%files loki
-%{_datadir}/%{name}/public/app/plugins/datasource/loki
-%doc %{_datadir}/%{name}/public/app/plugins/datasource/loki/README.md
-
-%files mssql
-%{_datadir}/%{name}/public/app/plugins/datasource/mssql
-%doc %{_datadir}/%{name}/public/app/plugins/datasource/mssql/README.md
-
-%files mysql
-%{_datadir}/%{name}/public/app/plugins/datasource/mysql
-%doc %{_datadir}/%{name}/public/app/plugins/datasource/mysql/README.md
-
-%files opentsdb
-%{_datadir}/%{name}/public/app/plugins/datasource/opentsdb
-%doc %{_datadir}/%{name}/public/app/plugins/datasource/opentsdb/README.md
+%changelog
+* Fri Jan 22 2021 Andreas Gerstmayr <agerstmayr@redhat.com> 7.3.6-2
+- change working dir to $GRAFANA_HOME in grafana-cli wrapper (fixes Red Hat BZ #1916083)
+- add pcp-redis-datasource to allow_loading_unsigned_plugins config option
 
-%files postgres
-%{_datadir}/%{name}/public/app/plugins/datasource/postgres
-%doc %{_datadir}/%{name}/public/app/plugins/datasource/postgres/README.md
+* Mon Dec 21 2020 Andreas Gerstmayr <agerstmayr@redhat.com> 7.3.6-1
+- update to 7.3.6 tagged upstream community sources, see CHANGELOG
+- remove dependency on SAML (not supported in the open source version of Grafana)
 
-%files prometheus
-%{_datadir}/%{name}/public/app/plugins/datasource/prometheus
-%doc %{_datadir}/%{name}/public/app/plugins/datasource/prometheus/README.md
+* Wed Nov 25 2020 Andreas Gerstmayr <agerstmayr@redhat.com> 7.3.4-1
+- update to 7.3.4 tagged upstream community sources, see CHANGELOG
+- bundle golang dependencies
+- optionally bundle node.js dependencies and build and test frontend as part of the specfile
+- merge all datasources into main grafana package
+- change default provisioning path to /etc/grafana/provisioning
+- resolve https://bugzilla.redhat.com/show_bug.cgi?id=1843170
 
-%files stackdriver
-%{_datadir}/%{name}/public/app/plugins/datasource/stackdriver
-%doc %{_datadir}/%{name}/public/app/plugins/datasource/stackdriver/README.md
+* Thu Aug 20 2020 Andreas Gerstmayr <agerstmayr@redhat.com> 6.7.4-3
+- apply patch for CVE-2020-13430 also to sources, not only to compiled webpack
 
+* Wed Aug 19 2020 Andreas Gerstmayr <agerstmayr@redhat.com> 6.7.4-2
+- security fix for CVE-2020-13430
 
-%changelog
 * Fri Jun 05 2020 Andreas Gerstmayr <agerstmayr@redhat.com> 6.7.4-1
 - update to 6.7.4 tagged upstream community sources, see CHANGELOG
 - security fix for CVE-2020-13379