From 355749558ce152a7502b53d1685d1ae023a869b3 Mon Sep 17 00:00:00 2001 From: Andreas Gerstmayr Date: Apr 23 2020 17:14:27 +0000 Subject: update to upstream version 6.7.2, add scripts to ease upgrade process --- diff --git a/.gitignore b/.gitignore index 9380e56..015c8fd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,12 +1,2 @@ -/grafana-6.1.4.tar.gz -/grafana_webpack-6.1.4.tar.gz -/grafana-6.1.6.tar.gz -/grafana_webpack-6.1.6.tar.gz -/grafana-6.2.2.tar.gz -/grafana_webpack-6.2.2.tar.gz -/grafana-6.3.5.tar.gz -/grafana_webpack-6.3.5.tar.gz -/grafana-6.3.6.tar.gz -/grafana_webpack-6.3.6.tar.gz -/grafana-6.6.2.tar.gz -/grafana_webpack-6.6.2.tar.gz +/grafana-*.tar.gz +/grafana_webpack-*.tar.gz diff --git a/000-set-version-string.patch b/000-set-version-string.patch deleted file mode 100644 index d66154e..0000000 --- a/000-set-version-string.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/pkg/cmd/grafana-server/main.go b/pkg/cmd/grafana-server/main.go -index 14d6036e82..d2e61564f2 100644 ---- a/pkg/cmd/grafana-server/main.go -+++ b/pkg/cmd/grafana-server/main.go -@@ -32,8 +32,8 @@ import ( - _ "github.com/grafana/grafana/pkg/tsdb/testdatasource" - ) - --var version = "5.0.0" --var commit = "NA" -+var version = "6.6.2" -+var commit = "3fa63cfc34668781c7f9b3caafe6d9d400b06b7f" - var buildBranch = "master" - var buildstamp string - diff --git a/003-manpages.patch b/003-manpages.patch new file mode 100644 index 0000000..d2b2f88 --- /dev/null +++ b/003-manpages.patch @@ -0,0 +1,219 @@ +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/003-new-files.patch b/003-new-files.patch deleted file mode 100644 index 0d21b7f..0000000 --- a/003-new-files.patch +++ /dev/null @@ -1,1775 +0,0 @@ -diff --git a/conf/distro-defaults.ini b/conf/distro-defaults.ini -new file mode 100644 -index 0000000000..e9d3cb9593 ---- /dev/null -+++ b/conf/distro-defaults.ini -@@ -0,0 +1,706 @@ -+##################### Grafana Configuration Defaults for distros ##################### -+# -+# Do not modify this file in grafana installs -+# -+ -+# possible values : production, development -+app_mode = production -+ -+# instance name, defaults to HOSTNAME environment variable value or hostname if HOSTNAME var is empty -+instance_name = ${HOSTNAME} -+ -+#################################### Paths ############################### -+[paths] -+# Path to where grafana can store temp files, sessions, and the sqlite3 db (if that is used) -+data = /var/lib/grafana -+ -+# Temporary files in `data` directory older than given duration will be removed -+temp_data_lifetime = 24h -+ -+# Directory where grafana can store logs -+logs = /var/log/grafana -+ -+# Directory where grafana will automatically scan and look for plugins -+plugins = /var/lib/grafana/plugins -+ -+# folder that contains provisioning config files that grafana will apply on startup and while running. -+provisioning = conf/provisioning -+ -+#################################### Server ############################## -+[server] -+# Protocol (http, https, h2, socket) -+protocol = http -+ -+# The ip address to bind to, empty will bind to all interfaces -+http_addr = -+ -+# The http port to use -+http_port = 3000 -+ -+# The public facing domain name used to access grafana from a browser -+domain = localhost -+ -+# Redirect to correct domain if host header does not match domain -+# Prevents DNS rebinding attacks -+enforce_domain = false -+ -+# 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 -+ -+# the path relative working path -+static_root_path = public -+ -+# enable gzip -+enable_gzip = false -+ -+# https certs & key file -+cert_file = -+cert_key = -+ -+# Unix socket path -+socket = /tmp/grafana.sock -+ -+#################################### Database ############################ -+[database] -+# You can configure the database connection by specifying type, host, name, user and password -+# as separate properties or as on string using the url property. -+ -+# Either "mysql", "postgres" or "sqlite3", it's your choice -+type = sqlite3 -+host = 127.0.0.1:3306 -+name = grafana -+user = root -+# If the password contains # or ; you have to wrap it with triple quotes. Ex """#password;""" -+password = -+# Use either URL or the previous fields to configure the database -+# Example: mysql://user:secret@host:port/database -+url = -+ -+# Max idle conn setting default is 2 -+max_idle_conn = 2 -+ -+# Max conn setting default is 0 (mean not set) -+max_open_conn = -+ -+# Connection Max Lifetime default is 14400 (means 14400 seconds or 4 hours) -+conn_max_lifetime = 14400 -+ -+# Set to true to log the sql calls and execution times. -+log_queries = -+ -+# For "postgres", use either "disable", "require" or "verify-full" -+# For "mysql", use either "true", "false", or "skip-verify". -+ssl_mode = disable -+ -+ca_cert_path = -+client_key_path = -+client_cert_path = -+server_cert_name = -+ -+# For "sqlite3" only, path relative to data_path setting -+path = grafana.db -+ -+# For "sqlite3" only. cache mode setting used for connecting to the database -+cache_mode = private -+ -+#################################### Cache server ############################# -+[remote_cache] -+# Either "redis", "memcached" or "database" default is "database" -+type = database -+ -+# 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=0,ssl=false`. Only addr is required. ssl may be 'true', 'false', or 'insecure'. -+# memcache: 127.0.0.1:11211 -+connstr = -+ -+#################################### Data proxy ########################### -+[dataproxy] -+ -+# This enables data proxy logging, default is false -+logging = false -+ -+# How long the data proxy should wait before timing out default is 30 (seconds) -+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. -+send_user_header = false -+ -+#################################### Analytics ########################### -+[analytics] -+# Server reporting, sends usage counters to stats.grafana.org every 24 hours. -+# No ip addresses are being tracked, only simple counters to track -+# running instances, dashboard and error counts. It is very helpful to us. -+# Change this option to false to disable reporting. -+reporting_enabled = false -+ -+# Set to false to disable all checks to https://grafana.com -+# for new versions (grafana itself and plugins), check is used -+# in some UI views to notify that grafana or plugin update exists -+# This option does not cause any auto updates, nor send any information -+# only a GET request to https://grafana.com to get latest versions -+check_for_updates = false -+ -+# Google Analytics universal tracking code, only enabled if you specify an id here -+google_analytics_ua_id = -+ -+# Google Tag Manager ID, only enabled if you specify an id here -+google_tag_manager_id = -+ -+#################################### Security ############################ -+[security] -+# disable creation of admin user on first start of grafana -+disable_initial_admin_creation = false -+ -+# default admin user, created on startup -+admin_user = admin -+ -+# default admin password, can be changed before first start of grafana, or in profile settings -+admin_password = admin -+ -+# used for signing -+secret_key = SW2YcwTIb9zpOOhoPsMm -+ -+# disable gravatar profile images -+disable_gravatar = false -+ -+# data source proxy whitelist (ip_or_domain:port separated by spaces) -+data_source_proxy_whitelist = -+ -+# disable protection against brute force login attempts -+disable_brute_force_login_protection = false -+ -+# set to true if you host Grafana behind HTTPS. default is false. -+cookie_secure = false -+ -+# set cookie SameSite attribute. defaults to `lax`. can be set to "lax", "strict", "none" and "disabled" -+cookie_samesite = lax -+ -+# set to true if you want to allow browsers to render Grafana in a ,