diff --git a/.gitignore b/.gitignore index 8e8c3fa..b4ad95d 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ /grafana_webpack-6.2.0.tar.gz /grafana-6.2.2.tar.gz /grafana_webpack-6.2.2.tar.gz +/grafana-6.3.6.tar.gz +/grafana_webpack-6.3.6.tar.gz diff --git a/001-login-oauth-use-oauth2-exchange.patch b/001-login-oauth-use-oauth2-exchange.patch index d62067d..ff59d44 100644 --- a/001-login-oauth-use-oauth2-exchange.patch +++ b/001-login-oauth-use-oauth2-exchange.patch @@ -1,5 +1,5 @@ diff --git a/pkg/api/login_oauth.go b/pkg/api/login_oauth.go -index a3599bc7a..0c6579847 100644 +index a46c97238..76fc8480c 100644 --- a/pkg/api/login_oauth.go +++ b/pkg/api/login_oauth.go @@ -125,7 +125,7 @@ func (hs *HTTPServer) OAuthLogin(ctx *m.ReqContext) { diff --git a/002-remove-jaeger-tracing.patch b/002-remove-jaeger-tracing.patch index 1f624cc..0d20b5e 100644 --- a/002-remove-jaeger-tracing.patch +++ b/002-remove-jaeger-tracing.patch @@ -1,34 +1,36 @@ diff --git a/pkg/cmd/grafana-server/server.go b/pkg/cmd/grafana-server/server.go -index 2ac326ed3..20943918c 100644 +index 85d6db43e..6de99b58b 100644 --- a/pkg/cmd/grafana-server/server.go +++ b/pkg/cmd/grafana-server/server.go -@@ -21,7 +21,6 @@ import ( +@@ -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/log" "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 fd7258b7a..000000000 +index d1511a533..000000000 --- a/pkg/infra/tracing/tracing.go +++ /dev/null -@@ -1,129 +0,0 @@ +@@ -1,148 +0,0 @@ -package tracing - -import ( - "context" +- "fmt" - "io" - "strings" - -- "github.com/grafana/grafana/pkg/log" +- "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() { @@ -36,13 +38,15 @@ index fd7258b7a..000000000 -} - -type TracingService struct { -- enabled bool -- address string -- customTags map[string]string -- samplerType string -- samplerParam float64 -- log log.Logger -- closer io.Closer +- 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:""` -} @@ -72,6 +76,8 @@ index fd7258b7a..000000000 - 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) initGlobalTracer() error { @@ -97,6 +103,18 @@ index fd7258b7a..000000000 - 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 @@ -142,8 +160,9 @@ index fd7258b7a..000000000 - jlw.logger.Error(msg) -} - --func (jlw *jaegerLogWrapper) Infof(msg string, args ...interface{}) { -- jlw.logger.Info(msg, args) +-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 diff --git a/003-new-files.patch b/003-new-files.patch index 0701856..2cac75d 100644 --- a/003-new-files.patch +++ b/003-new-files.patch @@ -1,9 +1,9 @@ diff --git a/conf/distro-defaults.ini b/conf/distro-defaults.ini new file mode 100644 -index 000000000..eeb974369 +index 0000000000..e337ba0b57 --- /dev/null +++ b/conf/distro-defaults.ini -@@ -0,0 +1,601 @@ +@@ -0,0 +1,685 @@ +##################### Grafana Configuration Defaults for distros ##################### +# +# Do not modify this file in grafana installs @@ -53,6 +53,9 @@ index 000000000..eeb974369 +# The full public facing url +root_url = %(protocol)s://%(domain)s:%(http_port)s/ + ++# Serve Grafana from subpath specified in `root_url` setting. By default it is set to `false` for compatibility reasons. ++serve_from_sub_path = false ++ +# Log web requests +router_logging = false + @@ -119,7 +122,7 @@ index 000000000..eeb974369 + +# cache connectionstring options +# database: will use Grafana primary database. -+# redis: config like redis server e.g. `addr=127.0.0.1:6379,pool_size=100,db=grafana` ++# redis: config like redis server e.g. `addr=127.0.0.1:6379,pool_size=100,db=0`. Only addr is required. +# memcache: 127.0.0.1:11211 +connstr = + @@ -185,6 +188,31 @@ index 000000000..eeb974369 +# set to true if you want to allow browsers to render Grafana in a ,