Blame SOURCES/003-new-files.patch

5c329f
diff --git a/conf/distro-defaults.ini b/conf/distro-defaults.ini
5c329f
new file mode 100644
5c329f
index 000000000..eeb974369
5c329f
--- /dev/null
5c329f
+++ b/conf/distro-defaults.ini
5c329f
@@ -0,0 +1,601 @@
5c329f
+##################### Grafana Configuration Defaults for distros #####################
5c329f
+#
5c329f
+# Do not modify this file in grafana installs
5c329f
+#
5c329f
+
5c329f
+# possible values : production, development
5c329f
+app_mode = production
5c329f
+
5c329f
+# instance name, defaults to HOSTNAME environment variable value or hostname if HOSTNAME var is empty
5c329f
+instance_name = ${HOSTNAME}
5c329f
+
5c329f
+#################################### Paths ###############################
5c329f
+[paths]
5c329f
+# Path to where grafana can store temp files, sessions, and the sqlite3 db (if that is used)
5c329f
+data = /var/lib/grafana
5c329f
+
5c329f
+# Temporary files in `data` directory older than given duration will be removed
5c329f
+temp_data_lifetime = 24h
5c329f
+
5c329f
+# Directory where grafana can store logs
5c329f
+logs = /var/log/grafana
5c329f
+
5c329f
+# Directory where grafana will automatically scan and look for plugins
5c329f
+plugins = /var/lib/grafana/plugins
5c329f
+
5c329f
+# folder that contains provisioning config files that grafana will apply on startup and while running.
5c329f
+provisioning = conf/provisioning
5c329f
+
5c329f
+#################################### Server ##############################
5c329f
+[server]
5c329f
+# Protocol (http, https, socket)
5c329f
+protocol = http
5c329f
+
5c329f
+# The ip address to bind to, empty will bind to all interfaces
5c329f
+http_addr =
5c329f
+
5c329f
+# The http port to use
5c329f
+http_port = 3000
5c329f
+
5c329f
+# The public facing domain name used to access grafana from a browser
5c329f
+domain = localhost
5c329f
+
5c329f
+# Redirect to correct domain if host header does not match domain
5c329f
+# Prevents DNS rebinding attacks
5c329f
+enforce_domain = false
5c329f
+
5c329f
+# The full public facing url
5c329f
+root_url = %(protocol)s://%(domain)s:%(http_port)s/
5c329f
+
5c329f
+# Log web requests
5c329f
+router_logging = false
5c329f
+
5c329f
+# the path relative working path
5c329f
+static_root_path = public
5c329f
+
5c329f
+# enable gzip
5c329f
+enable_gzip = false
5c329f
+
5c329f
+# https certs & key file
5c329f
+cert_file =
5c329f
+cert_key =
5c329f
+
5c329f
+# Unix socket path
5c329f
+socket = /tmp/grafana.sock
5c329f
+
5c329f
+#################################### Database ############################
5c329f
+[database]
5c329f
+# You can configure the database connection by specifying type, host, name, user and password
5c329f
+# as separate properties or as on string using the url property.
5c329f
+
5c329f
+# Either "mysql", "postgres" or "sqlite3", it's your choice
5c329f
+type = sqlite3
5c329f
+host = 127.0.0.1:3306
5c329f
+name = grafana
5c329f
+user = root
5c329f
+# If the password contains # or ; you have to wrap it with triple quotes. Ex """#password;"""
5c329f
+password =
5c329f
+# Use either URL or the previous fields to configure the database
5c329f
+# Example: mysql://user:secret@host:port/database
5c329f
+url =
5c329f
+
5c329f
+# Max idle conn setting default is 2
5c329f
+max_idle_conn = 2
5c329f
+
5c329f
+# Max conn setting default is 0 (mean not set)
5c329f
+max_open_conn =
5c329f
+
5c329f
+# Connection Max Lifetime default is 14400 (means 14400 seconds or 4 hours)
5c329f
+conn_max_lifetime = 14400
5c329f
+
5c329f
+# Set to true to log the sql calls and execution times.
5c329f
+log_queries =
5c329f
+
5c329f
+# For "postgres", use either "disable", "require" or "verify-full"
5c329f
+# For "mysql", use either "true", "false", or "skip-verify".
5c329f
+ssl_mode = disable
5c329f
+
5c329f
+ca_cert_path =
5c329f
+client_key_path =
5c329f
+client_cert_path =
5c329f
+server_cert_name =
5c329f
+
5c329f
+# For "sqlite3" only, path relative to data_path setting
5c329f
+path = grafana.db
5c329f
+
5c329f
+# For "sqlite3" only. cache mode setting used for connecting to the database
5c329f
+cache_mode = private
5c329f
+
5c329f
+#################################### Cache server #############################
5c329f
+[remote_cache]
5c329f
+# Either "redis", "memcached" or "database" default is "database"
5c329f
+type = database
5c329f
+
5c329f
+# cache connectionstring options
5c329f
+# database: will use Grafana primary database.
5c329f
+# redis: config like redis server e.g. `addr=127.0.0.1:6379,pool_size=100,db=grafana`
5c329f
+# memcache: 127.0.0.1:11211
5c329f
+connstr =
5c329f
+
5c329f
+#################################### Data proxy ###########################
5c329f
+[dataproxy]
5c329f
+
5c329f
+# This enables data proxy logging, default is false
5c329f
+logging = false
5c329f
+
5c329f
+# How long the data proxy should wait before timing out default is 30 (seconds)
5c329f
+timeout = 30
5c329f
+
5c329f
+# If enabled and user is not anonymous, data proxy will add X-Grafana-User header with username into the request, default is false.
5c329f
+send_user_header = false
5c329f
+
5c329f
+#################################### Analytics ###########################
5c329f
+[analytics]
5c329f
+# Server reporting, sends usage counters to stats.grafana.org every 24 hours.
5c329f
+# No ip addresses are being tracked, only simple counters to track
5c329f
+# running instances, dashboard and error counts. It is very helpful to us.
5c329f
+# Change this option to false to disable reporting.
5c329f
+reporting_enabled = false
5c329f
+
5c329f
+# Set to false to disable all checks to https://grafana.com
5c329f
+# for new versions (grafana itself and plugins), check is used
5c329f
+# in some UI views to notify that grafana or plugin update exists
5c329f
+# This option does not cause any auto updates, nor send any information
5c329f
+# only a GET request to https://grafana.com to get latest versions
5c329f
+check_for_updates = false
5c329f
+
5c329f
+# Google Analytics universal tracking code, only enabled if you specify an id here
5c329f
+google_analytics_ua_id =
5c329f
+
5c329f
+# Google Tag Manager ID, only enabled if you specify an id here
5c329f
+google_tag_manager_id =
5c329f
+
5c329f
+#################################### Security ############################
5c329f
+[security]
5c329f
+# default admin user, created on startup
5c329f
+admin_user = admin
5c329f
+
5c329f
+# default admin password, can be changed before first start of grafana, or in profile settings
5c329f
+admin_password = admin
5c329f
+
5c329f
+# used for signing
5c329f
+secret_key = SW2YcwTIb9zpOOhoPsMm
5c329f
+
5c329f
+# disable gravatar profile images
5c329f
+disable_gravatar = false
5c329f
+
5c329f
+# data source proxy whitelist (ip_or_domain:port separated by spaces)
5c329f
+data_source_proxy_whitelist =
5c329f
+
5c329f
+# disable protection against brute force login attempts
5c329f
+disable_brute_force_login_protection = false
5c329f
+
5c329f
+# set to true if you host Grafana behind HTTPS. default is false.
5c329f
+cookie_secure = false
5c329f
+
5c329f
+# set cookie SameSite attribute. defaults to `lax`. can be set to "lax", "strict" and "none"
5c329f
+cookie_samesite = lax
5c329f
+
5c329f
+# set to true if you want to allow browsers to render Grafana in a <frame>, <iframe>, <embed> or <object>. default is false.
5c329f
+allow_embedding = false
5c329f
+
5c329f
+#################################### Snapshots ###########################
5c329f
+[snapshots]
5c329f
+# snapshot sharing options
5c329f
+external_enabled = false
5c329f
+external_snapshot_url = https://snapshots-origin.raintank.io
5c329f
+external_snapshot_name = Publish to snapshot.raintank.io
5c329f
+
5c329f
+# remove expired snapshot
5c329f
+snapshot_remove_expired = true
5c329f
+
5c329f
+#################################### Dashboards ##################
5c329f
+
5c329f
+[dashboards]
5c329f
+# Number dashboard versions to keep (per dashboard). Default: 20, Minimum: 1
5c329f
+versions_to_keep = 20
5c329f
+
5c329f
+#################################### Users ###############################
5c329f
+[users]
5c329f
+# disable user signup / registration
5c329f
+allow_sign_up = false
5c329f
+
5c329f
+# Allow non admin users to create organizations
5c329f
+allow_org_create = false
5c329f
+
5c329f
+# Set to true to automatically assign new users to the default organization (id 1)
5c329f
+auto_assign_org = true
5c329f
+
5c329f
+# Set this value to automatically add new users to the provided organization (if auto_assign_org above is set to true)
5c329f
+auto_assign_org_id = 1
5c329f
+
5c329f
+# Default role new users will be automatically assigned (if auto_assign_org above is set to true)
5c329f
+auto_assign_org_role = Viewer
5c329f
+
5c329f
+# Require email validation before sign up completes
5c329f
+verify_email_enabled = false
5c329f
+
5c329f
+# Background text for the user field on the login page
5c329f
+login_hint = email or username
5c329f
+password_hint = password
5c329f
+
5c329f
+# Default UI theme ("dark" or "light")
5c329f
+default_theme = dark
5c329f
+
5c329f
+# External user management
5c329f
+external_manage_link_url =
5c329f
+external_manage_link_name =
5c329f
+external_manage_info =
5c329f
+
5c329f
+# Viewers can edit/inspect dashboard settings in the browser. But not save the dashboard.
5c329f
+viewers_can_edit = false
5c329f
+
5c329f
+# Editors can administrate dashboard, folders and teams they create
5c329f
+editors_can_admin = false
5c329f
+
5c329f
+[auth]
5c329f
+# Login cookie name
5c329f
+login_cookie_name = grafana_session
5c329f
+
5c329f
+# The lifetime (days) an authenticated user can be inactive before being required to login at next visit. Default is 7 days.
5c329f
+login_maximum_inactive_lifetime_days = 7
5c329f
+
5c329f
+# The maximum lifetime (days) an authenticated user can be logged in since login time before being required to login. Default is 30 days.
5c329f
+login_maximum_lifetime_days = 30
5c329f
+
5c329f
+# How often should auth tokens be rotated for authenticated users when being active. The default is each 10 minutes.
5c329f
+token_rotation_interval_minutes = 10
5c329f
+
5c329f
+# Set to true to disable (hide) the login form, useful if you use OAuth
5c329f
+disable_login_form = false
5c329f
+
5c329f
+# Set to true to disable the signout link in the side menu. useful if you use auth.proxy
5c329f
+disable_signout_menu = false
5c329f
+
5c329f
+# URL to redirect the user to after sign out
5c329f
+signout_redirect_url =
5c329f
+
5c329f
+# Set to true to attempt login with OAuth automatically, skipping the login screen.
5c329f
+# This setting is ignored if multiple OAuth providers are configured.
5c329f
+oauth_auto_login = false
5c329f
+
5c329f
+#################################### Anonymous Auth ######################
5c329f
+[auth.anonymous]
5c329f
+# enable anonymous access
5c329f
+enabled = false
5c329f
+
5c329f
+# specify organization name that should be used for unauthenticated users
5c329f
+org_name = Main Org.
5c329f
+
5c329f
+# specify role for unauthenticated users
5c329f
+org_role = Viewer
5c329f
+
5c329f
+#################################### Github Auth #########################
5c329f
+[auth.github]
5c329f
+enabled = false
5c329f
+allow_sign_up = true
5c329f
+client_id = some_id
5c329f
+client_secret = some_secret
5c329f
+scopes = user:email,read:org
5c329f
+auth_url = https://github.com/login/oauth/authorize
5c329f
+token_url = https://github.com/login/oauth/access_token
5c329f
+api_url = https://api.github.com/user
5c329f
+team_ids =
5c329f
+allowed_organizations =
5c329f
+
5c329f
+#################################### GitLab Auth #########################
5c329f
+[auth.gitlab]
5c329f
+enabled = false
5c329f
+allow_sign_up = true
5c329f
+client_id = some_id
5c329f
+client_secret = some_secret
5c329f
+scopes = api
5c329f
+auth_url = https://gitlab.com/oauth/authorize
5c329f
+token_url = https://gitlab.com/oauth/token
5c329f
+api_url = https://gitlab.com/api/v4
5c329f
+allowed_groups =
5c329f
+
5c329f
+#################################### Google Auth #########################
5c329f
+[auth.google]
5c329f
+enabled = false
5c329f
+allow_sign_up = true
5c329f
+client_id = some_client_id
5c329f
+client_secret = some_client_secret
5c329f
+scopes = https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email
5c329f
+auth_url = https://accounts.google.com/o/oauth2/auth
5c329f
+token_url = https://accounts.google.com/o/oauth2/token
5c329f
+api_url = https://www.googleapis.com/oauth2/v1/userinfo
5c329f
+allowed_domains =
5c329f
+hosted_domain =
5c329f
+
5c329f
+#################################### Grafana.com Auth ####################
5c329f
+# legacy key names (so they work in env variables)
5c329f
+[auth.grafananet]
5c329f
+enabled = false
5c329f
+allow_sign_up = true
5c329f
+client_id = some_id
5c329f
+client_secret = some_secret
5c329f
+scopes = user:email
5c329f
+allowed_organizations =
5c329f
+
5c329f
+[auth.grafana_com]
5c329f
+enabled = false
5c329f
+allow_sign_up = true
5c329f
+client_id = some_id
5c329f
+client_secret = some_secret
5c329f
+scopes = user:email
5c329f
+allowed_organizations =
5c329f
+
5c329f
+#################################### Generic OAuth #######################
5c329f
+[auth.generic_oauth]
5c329f
+name = OAuth
5c329f
+enabled = false
5c329f
+allow_sign_up = true
5c329f
+client_id = some_id
5c329f
+client_secret = some_secret
5c329f
+scopes = user:email
5c329f
+email_attribute_name = email:primary
5c329f
+auth_url =
5c329f
+token_url =
5c329f
+api_url =
5c329f
+team_ids =
5c329f
+allowed_organizations =
5c329f
+tls_skip_verify_insecure = false
5c329f
+tls_client_cert =
5c329f
+tls_client_key =
5c329f
+tls_client_ca =
5c329f
+send_client_credentials_via_post = false
5c329f
+
5c329f
+#################################### Basic Auth ##########################
5c329f
+[auth.basic]
5c329f
+enabled = true
5c329f
+
5c329f
+#################################### Auth Proxy ##########################
5c329f
+[auth.proxy]
5c329f
+enabled = false
5c329f
+header_name = X-WEBAUTH-USER
5c329f
+header_property = username
5c329f
+auto_sign_up = true
5c329f
+ldap_sync_ttl = 60
5c329f
+whitelist =
5c329f
+headers =
5c329f
+
5c329f
+#################################### Auth LDAP ###########################
5c329f
+[auth.ldap]
5c329f
+enabled = false
5c329f
+config_file = /etc/grafana/ldap.toml
5c329f
+allow_sign_up = true
5c329f
+
5c329f
+# LDAP backround sync (Enterprise only)
5c329f
+sync_cron = @hourly
5c329f
+active_sync_enabled = false
5c329f
+
5c329f
+#################################### SMTP / Emailing #####################
5c329f
+[smtp]
5c329f
+enabled = false
5c329f
+host = localhost:25
5c329f
+user =
5c329f
+# If the password contains # or ; you have to wrap it with triple quotes. Ex """#password;"""
5c329f
+password =
5c329f
+cert_file =
5c329f
+key_file =
5c329f
+skip_verify = false
5c329f
+from_address = admin@grafana.localhost
5c329f
+from_name = Grafana
5c329f
+ehlo_identity =
5c329f
+
5c329f
+[emails]
5c329f
+welcome_email_on_sign_up = false
5c329f
+templates_pattern = emails/*.html
5c329f
+
5c329f
+#################################### Logging ##########################
5c329f
+[log]
5c329f
+# Either "console", "file", "syslog". Default is console and file
5c329f
+# Use space to separate multiple modes, e.g. "console file"
5c329f
+mode = console file
5c329f
+
5c329f
+# Either "debug", "info", "warn", "error", "critical", default is "info"
5c329f
+level = info
5c329f
+
5c329f
+# optional settings to set different levels for specific loggers. Ex filters = sqlstore:debug
5c329f
+filters =
5c329f
+
5c329f
+# For "console" mode only
5c329f
+[log.console]
5c329f
+level =
5c329f
+
5c329f
+# log line format, valid options are text, console and json
5c329f
+format = console
5c329f
+
5c329f
+# For "file" mode only
5c329f
+[log.file]
5c329f
+level =
5c329f
+
5c329f
+# log line format, valid options are text, console and json
5c329f
+format = text
5c329f
+
5c329f
+# This enables automated log rotate(switch of following options), default is true
5c329f
+log_rotate = true
5c329f
+
5c329f
+# Max line number of single file, default is 1000000
5c329f
+max_lines = 1000000
5c329f
+
5c329f
+# Max size shift of single file, default is 28 means 1 << 28, 256MB
5c329f
+max_size_shift = 28
5c329f
+
5c329f
+# Segment log daily, default is true
5c329f
+daily_rotate = true
5c329f
+
5c329f
+# Expired days of log file(delete after max days), default is 7
5c329f
+max_days = 7
5c329f
+
5c329f
+[log.syslog]
5c329f
+level =
5c329f
+
5c329f
+# log line format, valid options are text, console and json
5c329f
+format = text
5c329f
+
5c329f
+# Syslog network type and address. This can be udp, tcp, or unix. If left blank, the default unix endpoints will be used.
5c329f
+network =
5c329f
+address =
5c329f
+
5c329f
+# Syslog facility. user, daemon and local0 through local7 are valid.
5c329f
+facility =
5c329f
+
5c329f
+# Syslog tag. By default, the process' argv[0] is used.
5c329f
+tag =
5c329f
+
5c329f
+#################################### Usage Quotas ########################
5c329f
+[quota]
5c329f
+enabled = false
5c329f
+
5c329f
+#### set quotas to -1 to make unlimited. ####
5c329f
+# limit number of users per Org.
5c329f
+org_user = 10
5c329f
+
5c329f
+# limit number of dashboards per Org.
5c329f
+org_dashboard = 100
5c329f
+
5c329f
+# limit number of data_sources per Org.
5c329f
+org_data_source = 10
5c329f
+
5c329f
+# limit number of api_keys per Org.
5c329f
+org_api_key = 10
5c329f
+
5c329f
+# limit number of orgs a user can create.
5c329f
+user_org = 10
5c329f
+
5c329f
+# Global limit of users.
5c329f
+global_user = -1
5c329f
+
5c329f
+# global limit of orgs.
5c329f
+global_org = -1
5c329f
+
5c329f
+# global limit of dashboards
5c329f
+global_dashboard = -1
5c329f
+
5c329f
+# global limit of api_keys
5c329f
+global_api_key = -1
5c329f
+
5c329f
+# global limit on number of logged in users.
5c329f
+global_session = -1
5c329f
+
5c329f
+#################################### Alerting ############################
5c329f
+[alerting]
5c329f
+# Disable alerting engine & UI features
5c329f
+enabled = true
5c329f
+# Makes it possible to turn off alert rule execution but alerting UI is visible
5c329f
+execute_alerts = true
5c329f
+
5c329f
+# Default setting for new alert rules. Defaults to categorize error and timeouts as alerting. (alerting, keep_state)
5c329f
+error_or_timeout = alerting
5c329f
+
5c329f
+# Default setting for how Grafana handles nodata or null values in alerting. (alerting, no_data, keep_state, ok)
5c329f
+nodata_or_nullvalues = no_data
5c329f
+
5c329f
+# Alert notifications can include images, but rendering many images at the same time can overload the server
5c329f
+# This limit will protect the server from render overloading and make sure notifications are sent out quickly
5c329f
+concurrent_render_limit = 5
5c329f
+
5c329f
+# Default setting for alert calculation timeout. Default value is 30
5c329f
+evaluation_timeout_seconds = 30
5c329f
+
5c329f
+# Default setting for alert notification timeout. Default value is 30
5c329f
+notification_timeout_seconds = 30
5c329f
+
5c329f
+# Default setting for max attempts to sending alert notifications. Default value is 3
5c329f
+max_attempts = 3
5c329f
+
5c329f
+
5c329f
+#################################### Explore #############################
5c329f
+[explore]
5c329f
+# Enable the Explore section
5c329f
+enabled = true
5c329f
+
5c329f
+#################################### Internal Grafana Metrics ############
5c329f
+# Metrics available at HTTP API Url /metrics
5c329f
+[metrics]
5c329f
+enabled           = true
5c329f
+interval_seconds  = 10
5c329f
+
5c329f
+#If both are set, basic auth will be required for the metrics endpoint.
5c329f
+basic_auth_username =
5c329f
+basic_auth_password =
5c329f
+
5c329f
+# Send internal Grafana metrics to graphite
5c329f
+[metrics.graphite]
5c329f
+# Enable by setting the address setting (ex localhost:2003)
5c329f
+address =
5c329f
+prefix = prod.grafana.%(instance_name)s.
5c329f
+
5c329f
+[grafana_net]
5c329f
+url = https://grafana.org
5c329f
+
5c329f
+[grafana_com]
5c329f
+url = https://grafana.com
5c329f
+
5c329f
+#################################### Distributed tracing ############
5c329f
+[tracing.jaeger]
5c329f
+# jaeger destination (ex localhost:6831)
5c329f
+address =
5c329f
+# tag that will always be included in when creating new spans. ex (tag1:value1,tag2:value2)
5c329f
+always_included_tag =
5c329f
+# Type specifies the type of the sampler: const, probabilistic, rateLimiting, or remote
5c329f
+sampler_type = const
5c329f
+# jaeger samplerconfig param
5c329f
+# for "const" sampler, 0 or 1 for always false/true respectively
5c329f
+# for "probabilistic" sampler, a probability between 0 and 1
5c329f
+# for "rateLimiting" sampler, the number of spans per second
5c329f
+# for "remote" sampler, param is the same as for "probabilistic"
5c329f
+# and indicates the initial sampling rate before the actual one
5c329f
+# is received from the mothership
5c329f
+sampler_param = 1
5c329f
+
5c329f
+#################################### External Image Storage ##############
5c329f
+[external_image_storage]
5c329f
+# You can choose between (s3, webdav, gcs, azure_blob, local)
5c329f
+provider =
5c329f
+
5c329f
+[external_image_storage.s3]
5c329f
+bucket_url =
5c329f
+bucket =
5c329f
+region =
5c329f
+path =
5c329f
+access_key =
5c329f
+secret_key =
5c329f
+
5c329f
+[external_image_storage.webdav]
5c329f
+url =
5c329f
+username =
5c329f
+password =
5c329f
+public_url =
5c329f
+
5c329f
+[external_image_storage.gcs]
5c329f
+key_file =
5c329f
+bucket =
5c329f
+path =
5c329f
+
5c329f
+[external_image_storage.azure_blob]
5c329f
+account_name =
5c329f
+account_key =
5c329f
+container_name =
5c329f
+
5c329f
+[external_image_storage.local]
5c329f
+# does not require any configuration
5c329f
+
5c329f
+[rendering]
5c329f
+# Options to configure external image rendering server like https://github.com/grafana/grafana-image-renderer
5c329f
+server_url =
5c329f
+callback_url =
5c329f
+
5c329f
+[panels]
5c329f
+# here for to support old env variables, can remove after a few months
5c329f
+enable_alpha = false
5c329f
+disable_sanitize_html = false
5c329f
+
5c329f
+[plugins]
5c329f
+enable_alpha = false
5c329f
+app_tls_skip_verify_insecure = false
5c329f
+
5c329f
+[enterprise]
5c329f
+license_path =
5c329f
diff --git a/docs/man/man1/grafana-cli.1 b/docs/man/man1/grafana-cli.1
5c329f
new file mode 100644
5c329f
index 000000000..171748fcd
5c329f
--- /dev/null
5c329f
+++ b/docs/man/man1/grafana-cli.1
5c329f
@@ -0,0 +1,51 @@
5c329f
+.TH GRAFANA "1" "February 2019" "Grafana cli version 5.4.3" "User Commands"
5c329f
+.SH NAME
5c329f
+grafana-cli \- command line administration for the Grafana metrics dashboard and graph editor
5c329f
+.SH DESCRIPTION
5c329f
+.SS "NAME:"
5c329f
+.IP
5c329f
+grafana-cli
5c329f
+.SS "USAGE:"
5c329f
+.IP
5c329f
+\fBgrafana\-cli\fP [\fIglobal options\fP] \fIcommand\fP [\fIcommand options\fP] [\fIarguments\fP...]
5c329f
+.SS "COMMANDS:"
5c329f
+.TP
5c329f
+plugins
5c329f
+Manage plugins for grafana
5c329f
+.TP
5c329f
+admin
5c329f
+Grafana admin commands
5c329f
+.TP
5c329f
+help, h
5c329f
+Shows a list of commands or help for one command
5c329f
+.SS "GLOBAL OPTIONS:"
5c329f
+.TP
5c329f
+\fB\-\-pluginsDir\fR value
5c329f
+path to the grafana plugin directory (default: "/var/lib/grafana/plugins") [$GF_PLUGIN_DIR]
5c329f
+.TP
5c329f
+\fB\-\-repo\fR value
5c329f
+url to the plugin repository (default: "https://grafana.com/api/plugins") [$GF_PLUGIN_REPO]
5c329f
+.TP
5c329f
+\fB\-\-pluginUrl\fR value
5c329f
+Full url to the plugin zip file instead of downloading the plugin from grafana.com/api [$GF_PLUGIN_URL]
5c329f
+.TP
5c329f
+\fB\-\-insecure\fR
5c329f
+Skip TLS verification (insecure)
5c329f
+.TP
5c329f
+\fB\-\-debug\fR, \fB\-d\fR
5c329f
+enable debug logging
5c329f
+.TP
5c329f
+\fB\-\-help\fR, \fB\-h\fR
5c329f
+show help
5c329f
+.TP
5c329f
+\fB\-\-version\fR, \fB\-v\fR
5c329f
+print the version
5c329f
+.SH "SEE ALSO"
5c329f
+Additional documentation for
5c329f
+.B grafana-cli
5c329f
+is available on-line at
5c329f
+.BR http://docs.grafana.org/administration/cli/ .
5c329f
+The full documentation for
5c329f
+.B Grafana
5c329f
+is available on-line at
5c329f
+.BR http://docs.grafana.org/ .
5c329f
diff --git a/docs/man/man1/grafana-server.1 b/docs/man/man1/grafana-server.1
5c329f
new file mode 100644
5c329f
index 000000000..30b7c1306
5c329f
--- /dev/null
5c329f
+++ b/docs/man/man1/grafana-server.1
5c329f
@@ -0,0 +1,156 @@
5c329f
+.TH VERSION "1" "February 2019" "Version 5.4.3" "User Commands"
5c329f
+.SH NAME
5c329f
+grafana-server \- back-end server for the Grafana metrics dashboard and graph editor
5c329f
+.SH DESCRIPTION
5c329f
+.B grafana-server
5c329f
+is the back-end server for the Grafana metrics dashboard and graph editor.
5c329f
+The
5c329f
+.B grafana-server
5c329f
+program should not normally be run from the command line,
5c329f
+except when testing or for development purposes.
5c329f
+Rather it should be managed by
5c329f
+.BR systemd .
5c329f
+After installing Grafana, the systemd service should be enabled and started as follows:
5c329f
+.P
5c329f
+.in 1i
5c329f
+.B systemctl daemon-reload
5c329f
+.br
5c329f
+.B systemctl enable grafana-server.service
5c329f
+.br
5c329f
+.B systemctl start grafana-server.service
5c329f
+.in
5c329f
+.P
5c329f
+.SH OPTIONS
5c329f
+The
5c329f
+.B gafana-server
5c329f
+configuration is specified in
5c329f
+.BR /etc/grafana/grafana.ini
5c329f
+and is well documented with comments.
5c329f
+The command-line options listed below override options of
5c329f
+the same (or similar) name in the configuration file and also provide
5c329f
+additional options for testing Grafana.
5c329f
+.P
5c329f
+.HP
5c329f
+\fB\-config\fR string
5c329f
+.IP
5c329f
+path to config file
5c329f
+.HP
5c329f
+\fB\-homepath\fR string
5c329f
+.IP
5c329f
+path to grafana install/home path, defaults to working directory
5c329f
+.HP
5c329f
+\fB\-packaging\fR string
5c329f
+.IP
5c329f
+describes the way Grafana was installed (default "unknown")
5c329f
+.HP
5c329f
+\fB\-pidfile\fR string
5c329f
+.IP
5c329f
+path to pid file
5c329f
+.HP
5c329f
+\fB\-profile\fR
5c329f
+.IP
5c329f
+Turn on pprof profiling
5c329f
+.HP
5c329f
+\fB\-profile\-port\fR int
5c329f
+.IP
5c329f
+Define custom port for profiling (default 6060)
5c329f
+.HP
5c329f
+\fB\-test\fR.bench regexp
5c329f
+.IP
5c329f
+run only benchmarks matching regexp
5c329f
+.HP
5c329f
+\fB\-test\fR.benchmem
5c329f
+.IP
5c329f
+print memory allocations for benchmarks
5c329f
+.HP
5c329f
+\fB\-test\fR.benchtime d
5c329f
+.IP
5c329f
+run each benchmark for duration d (default 1s)
5c329f
+.HP
5c329f
+\fB\-test\fR.blockprofile file
5c329f
+.IP
5c329f
+write a goroutine blocking profile to file
5c329f
+.HP
5c329f
+\fB\-test\fR.blockprofilerate rate
5c329f
+.IP
5c329f
+set blocking profile rate (see runtime.SetBlockProfileRate) (default 1)
5c329f
+.HP
5c329f
+\fB\-test\fR.count n
5c329f
+.IP
5c329f
+run tests and benchmarks n times (default 1)
5c329f
+.HP
5c329f
+\fB\-test\fR.coverprofile file
5c329f
+.IP
5c329f
+write a coverage profile to file
5c329f
+.HP
5c329f
+\fB\-test\fR.cpu list
5c329f
+.IP
5c329f
+comma\-separated list of cpu counts to run each test with
5c329f
+.HP
5c329f
+\fB\-test\fR.cpuprofile file
5c329f
+.IP
5c329f
+write a cpu profile to file
5c329f
+.HP
5c329f
+\fB\-test\fR.failfast
5c329f
+.IP
5c329f
+do not start new tests after the first test failure
5c329f
+.HP
5c329f
+\fB\-test\fR.list regexp
5c329f
+.IP
5c329f
+list tests, examples, and benchmarks matching regexp then exit
5c329f
+.HP
5c329f
+\fB\-test\fR.memprofile file
5c329f
+.IP
5c329f
+write a memory profile to file
5c329f
+.HP
5c329f
+\fB\-test\fR.memprofilerate rate
5c329f
+.IP
5c329f
+set memory profiling rate (see runtime.MemProfileRate)
5c329f
+.HP
5c329f
+\fB\-test\fR.mutexprofile string
5c329f
+.IP
5c329f
+write a mutex contention profile to the named file after execution
5c329f
+.HP
5c329f
+\fB\-test\fR.mutexprofilefraction int
5c329f
+.IP
5c329f
+if >= 0, calls runtime.SetMutexProfileFraction() (default 1)
5c329f
+.HP
5c329f
+\fB\-test\fR.outputdir dir
5c329f
+.IP
5c329f
+write profiles to dir
5c329f
+.HP
5c329f
+\fB\-test\fR.parallel n
5c329f
+.IP
5c329f
+run at most n tests in parallel (default 8)
5c329f
+.HP
5c329f
+\fB\-test\fR.run regexp
5c329f
+.IP
5c329f
+run only tests and examples matching regexp
5c329f
+.HP
5c329f
+\fB\-test\fR.short
5c329f
+.IP
5c329f
+run smaller test suite to save time
5c329f
+.HP
5c329f
+\fB\-test\fR.testlogfile file
5c329f
+.IP
5c329f
+write test action log to file (for use only by cmd/go)
5c329f
+.HP
5c329f
+\fB\-test\fR.timeout d
5c329f
+.IP
5c329f
+panic test binary after duration d (default 0, timeout disabled)
5c329f
+.HP
5c329f
+\fB\-test\fR.trace file
5c329f
+.IP
5c329f
+write an execution trace to file
5c329f
+.HP
5c329f
+\fB\-test\fR.v
5c329f
+.IP
5c329f
+verbose: print additional output
5c329f
+.TP
5c329f
+\fB\-v\fR
5c329f
+prints current version and exits
5c329f
+.SH "SEE ALSO"
5c329f
+The full documentation for
5c329f
+.B Grafana
5c329f
+is available on-line at
5c329f
+.BR http://docs.grafana.org/ .
5c329f
diff --git a/packaging/rpm/spec/README b/packaging/rpm/spec/README
5c329f
new file mode 100644
5c329f
index 000000000..f97c2a26b
5c329f
--- /dev/null
5c329f
+++ b/packaging/rpm/spec/README
5c329f
@@ -0,0 +1,7 @@
5c329f
+The make_webpack.sh script in this directory can be used to create
5c329f
+a webpack tarball of all the nodejs dependencies needed to build a
5c329f
+particular tagged version of grafana, along with the grafana tarball
5c329f
+itself. After running the script, the two tarballs should be copied
5c329f
+to your rpmbuild SOURCES. You can then run a native rpm spec build
5c329f
+using grafana.spec.
5c329f
+
5c329f
diff --git a/packaging/rpm/spec/grafana.spec b/packaging/rpm/spec/grafana.spec
5c329f
new file mode 100644
5c329f
index 000000000..85f0dd6aa
5c329f
--- /dev/null
5c329f
+++ b/packaging/rpm/spec/grafana.spec
5c329f
@@ -0,0 +1,715 @@
5c329f
+%global grafana_arches %{lua: go_arches = {}
5c329f
+  for arch in rpm.expand("%{go_arches}"):gmatch("%S+") do
5c329f
+    go_arches[arch] = 1
5c329f
+  end
5c329f
+  for arch in rpm.expand("%{nodejs_arches}"):gmatch("%S+") do
5c329f
+    if go_arches[arch] then
5c329f
+      print(arch .. " ")
5c329f
+  end
5c329f
+end}
5c329f
+
5c329f
+# Unbundle grafana vendor sources and instead use BuildRequires
5c329f
+# only on platforms that have enough golang devel support.
5c329f
+%if 0%{?rhel} == 0
5c329f
+%global           unbundle_vendor_sources 1
5c329f
+%endif
5c329f
+
5c329f
+
5c329f
+Name:             grafana
5c329f
+Version:          6.2.2
5c329f
+Release:          1%{?dist}
5c329f
+Summary:          Metrics dashboard and graph editor
5c329f
+License:          ASL 2.0
5c329f
+URL:              https://grafana.org
5c329f
+
5c329f
+# Source0 contains the tagged upstream sources
5c329f
+Source0:          https://github.com/grafana/grafana/archive/v%{version}/%{name}-%{version}.tar.gz
5c329f
+
5c329f
+# Source1 contains the front-end javascript modules bundled into a webpack
5c329f
+Source1:          grafana_webpack-%{version}.tar.gz
5c329f
+
5c329f
+# Source2 is the script to create the above webpack from grafana sources
5c329f
+Source2:          make_grafana_webpack.sh
5c329f
+
5c329f
+# Patches for upstream
5c329f
+Patch1:           001-login-oauth-use-oauth2-exchange.patch
5c329f
+Patch2:           002-remove-jaeger-tracing.patch
5c329f
+Patch3:           003-new-files.patch
5c329f
+
5c329f
+# Intersection of go_arches and nodejs_arches
5c329f
+ExclusiveArch:    %{grafana_arches}
5c329f
+
5c329f
+# omit golang debugsource, see BZ995136 and related
5c329f
+%global           _debugsource_template %{nil}
5c329f
+
5c329f
+%global           GRAFANA_USER %{name}
5c329f
+%global           GRAFANA_GROUP %{name}
5c329f
+%global           GRAFANA_HOME %{_datadir}/%{name}
5c329f
+
5c329f
+# grafana-server service daemon uses systemd
5c329f
+%{?systemd_requires}
5c329f
+Requires(pre):    shadow-utils
5c329f
+
5c329f
+BuildRequires:    systemd, golang, go-srpm-macros
5c329f
+
5c329f
+Recommends: grafana-cloudwatch = %{version}-%{release}
5c329f
+Recommends: grafana-elasticsearch = %{version}-%{release}
5c329f
+Recommends: grafana-azure-monitor = %{version}-%{release}
5c329f
+Recommends: grafana-graphite = %{version}-%{release}
5c329f
+Recommends: grafana-influxdb = %{version}-%{release}
5c329f
+Recommends: grafana-loki = %{version}-%{release}
5c329f
+Recommends: grafana-mssql = %{version}-%{release}
5c329f
+Recommends: grafana-mysql = %{version}-%{release}
5c329f
+Recommends: grafana-opentsdb = %{version}-%{release}
5c329f
+Recommends: grafana-postgres = %{version}-%{release}
5c329f
+Recommends: grafana-prometheus = %{version}-%{release}
5c329f
+Recommends: grafana-stackdriver = %{version}-%{release}
5c329f
+
5c329f
+%if 0%{?unbundle_vendor_sources}
5c329f
+# golang build deps. These allow us to unbundle vendor golang source.
5c329f
+BuildRequires: golang(github.com/aws/aws-sdk-go)
5c329f
+BuildRequires: golang(github.com/benbjohnson/clock)
5c329f
+BuildRequires: golang(github.com/beorn7/perks/quantile)
5c329f
+BuildRequires: golang(github.com/bmizerany/assert)
5c329f
+BuildRequires: golang(github.com/bradfitz/gomemcache/memcache)
5c329f
+BuildRequires: golang(github.com/BurntSushi/toml)
5c329f
+BuildRequires: golang(github.com/codahale/hdrhistogram)
5c329f
+BuildRequires: golang(github.com/codegangsta/cli)
5c329f
+BuildRequires: golang(github.com/davecgh/go-spew/spew)
5c329f
+BuildRequires: golang(github.com/denisenkom/go-mssqldb)
5c329f
+BuildRequires: golang(github.com/facebookgo/inject)
5c329f
+BuildRequires: golang(github.com/facebookgo/structtag)
5c329f
+BuildRequires: golang(github.com/fatih/color)
5c329f
+BuildRequires: golang(github.com/go-ini/ini)
5c329f
+BuildRequires: golang(google.golang.org/appengine)
5c329f
+BuildRequires: golang(golang.org/x/sys/unix)
5c329f
+BuildRequires: golang(github.com/go-macaron/binding)
5c329f
+BuildRequires: golang(github.com/go-macaron/gzip)
5c329f
+BuildRequires: golang(github.com/go-macaron/inject)
5c329f
+BuildRequires: golang(github.com/go-macaron/session)
5c329f
+BuildRequires: golang(google.golang.org/genproto/googleapis/rpc/status)
5c329f
+BuildRequires: golang(github.com/gobwas/glob)
5c329f
+BuildRequires: golang(github.com/gobwas/glob/compiler)
5c329f
+BuildRequires: golang(github.com/gobwas/glob/match)
5c329f
+BuildRequires: golang(github.com/gobwas/glob/syntax)
5c329f
+BuildRequires: golang(github.com/gobwas/glob/syntax/ast)
5c329f
+BuildRequires: golang(github.com/gobwas/glob/syntax/lexer)
5c329f
+BuildRequires: golang(github.com/gobwas/glob/util/runes)
5c329f
+BuildRequires: golang(github.com/gobwas/glob/util/strings)
5c329f
+BuildRequires: golang(github.com/gopherjs/gopherjs/js)
5c329f
+BuildRequires: golang(github.com/gorilla/websocket)
5c329f
+BuildRequires: golang(github.com/gosimple/slug)
5c329f
+BuildRequires: golang(github.com/go-sql-driver/mysql)
5c329f
+BuildRequires: golang(github.com/go-stack/stack)
5c329f
+BuildRequires: golang(github.com/go-xorm/builder)
5c329f
+BuildRequires: golang(github.com/go-xorm/core)
5c329f
+BuildRequires: golang(github.com/go-xorm/xorm)
5c329f
+BuildRequires: golang(google.golang.org/grpc)
5c329f
+BuildRequires: golang(github.com/hashicorp/go-hclog)
5c329f
+# need grpc_broker in go-plugin >= 1.0.0-1
5c329f
+BuildRequires: golang(github.com/hashicorp/go-plugin)
5c329f
+BuildRequires: golang(github.com/hashicorp/go-version)
5c329f
+BuildRequires: golang(github.com/hashicorp/yamux)
5c329f
+BuildRequires: golang(github.com/inconshreveable/log15)
5c329f
+BuildRequires: golang(github.com/jmespath/go-jmespath)
5c329f
+BuildRequires: golang(github.com/jtolds/gls)
5c329f
+BuildRequires: golang(github.com/klauspost/compress/flate)
5c329f
+BuildRequires: golang(github.com/klauspost/compress/gzip)
5c329f
+BuildRequires: golang(github.com/klauspost/compress/snappy)
5c329f
+BuildRequires: golang(github.com/klauspost/cpuid)
5c329f
+BuildRequires: golang(github.com/klauspost/crc32)
5c329f
+BuildRequires: golang(github.com/kr/pretty)
5c329f
+BuildRequires: golang(github.com/kr/text)
5c329f
+BuildRequires: golang(github.com/lib/pq)
5c329f
+BuildRequires: golang(github.com/mattn/go-colorable)
5c329f
+BuildRequires: golang(github.com/mattn/go-isatty)
5c329f
+BuildRequires: golang(github.com/mattn/go-sqlite3)
5c329f
+BuildRequires: golang(github.com/matttproud/golang_protobuf_extensions/pbutil)
5c329f
+BuildRequires: golang(github.com/mitchellh/go-testing-interface)
5c329f
+BuildRequires: golang(github.com/oklog/run)
5c329f
+BuildRequires: golang(github.com/opentracing/opentracing-go)
5c329f
+BuildRequires: golang(github.com/patrickmn/go-cache)
5c329f
+BuildRequires: golang(github.com/pkg/errors)
5c329f
+BuildRequires: golang(github.com/prometheus/client_golang/api)
5c329f
+BuildRequires: golang(github.com/prometheus/client_golang/api/prometheus/v1)
5c329f
+BuildRequires: golang(github.com/prometheus/client_model/go)
5c329f
+BuildRequires: golang-github-prometheus-common-devel
5c329f
+BuildRequires: golang(github.com/prometheus/common/expfmt)
5c329f
+BuildRequires: golang(github.com/prometheus/common/model)
5c329f
+BuildRequires: golang(github.com/prometheus/common/expfmt)
5c329f
+BuildRequires: golang(github.com/prometheus/procfs)
5c329f
+BuildRequires: golang(github.com/prometheus/procfs/internal/util)
5c329f
+BuildRequires: golang(github.com/prometheus/procfs)
5c329f
+BuildRequires: golang(github.com/prometheus/procfs/internal/util)
5c329f
+BuildRequires: golang(github.com/prometheus/procfs/nfs)
5c329f
+BuildRequires: golang(github.com/prometheus/procfs/xfs)
5c329f
+BuildRequires: golang(github.com/rainycape/unidecode)
5c329f
+BuildRequires: golang(github.com/sergi/go-diff/diffmatchpatch)
5c329f
+BuildRequires: golang(github.com/smartystreets/assertions)
5c329f
+BuildRequires: golang(github.com/smartystreets/goconvey/convey)
5c329f
+BuildRequires: golang(github.com/smartystreets/goconvey/convey/gotest)
5c329f
+BuildRequires: golang(github.com/smartystreets/goconvey/convey/reporting)
5c329f
+BuildRequires: golang(github.com/teris-io/shortid)
5c329f
+BuildRequires: golang(github.com/Unknwon/com)
5c329f
+BuildRequires: golang(github.com/VividCortex/mysqlerr)
5c329f
+BuildRequires: golang(github.com/yudai/gojsondiff)
5c329f
+BuildRequires: golang(github.com/yudai/golcs)
5c329f
+BuildRequires: golang(golang.org/x/crypto/pbkdf2)
5c329f
+BuildRequires: golang(golang.org/x/crypto/ed25519)
5c329f
+BuildRequires: golang(golang.org/x/crypto/md4)
5c329f
+BuildRequires: golang(golang.org/x/net/context)
5c329f
+BuildRequires: golang(golang.org/x/net/context/ctxhttp)
5c329f
+BuildRequires: golang(golang.org/x/net/http2)
5c329f
+BuildRequires: golang(golang.org/x/net/http2/hpack)
5c329f
+BuildRequires: golang(golang.org/x/net/http/httpguts)
5c329f
+BuildRequires: golang(golang.org/x/net/idna)
5c329f
+BuildRequires: golang(golang.org/x/net/internal/timeseries)
5c329f
+BuildRequires: golang(golang.org/x/net/trace)
5c329f
+BuildRequires: golang(golang.org/x/text/collate)
5c329f
+BuildRequires: golang(golang.org/x/text/collate/build)
5c329f
+BuildRequires: golang(golang.org/x/text/internal/colltab)
5c329f
+BuildRequires: golang(golang.org/x/text/internal/gen)
5c329f
+BuildRequires: golang(golang.org/x/text/internal/tag)
5c329f
+BuildRequires: golang(golang.org/x/text/internal/triegen)
5c329f
+BuildRequires: golang(golang.org/x/text/internal/ucd)
5c329f
+BuildRequires: golang(golang.org/x/oauth2)
5c329f
+BuildRequires: golang(golang.org/x/oauth2/google)
5c329f
+BuildRequires: golang(golang.org/x/oauth2/internal)
5c329f
+BuildRequires: golang(golang.org/x/oauth2/jws)
5c329f
+BuildRequires: golang(golang.org/x/oauth2/jwt)
5c329f
+BuildRequires: golang(github.com/golang/protobuf/proto)
5c329f
+BuildRequires: golang(github.com/golang/protobuf/ptypes)
5c329f
+BuildRequires: golang(github.com/golang/protobuf/ptypes)
5c329f
+BuildRequires: golang(github.com/golang/protobuf/ptypes/duration)
5c329f
+BuildRequires: golang(github.com/golang/protobuf/ptypes/any)
5c329f
+BuildRequires: golang(github.com/golang/protobuf/ptypes/timestamp)
5c329f
+BuildRequires: golang(cloud.google.com/go/compute/metadata)
5c329f
+BuildRequires: golang(gopkg.in/alexcesaro/quotedprintable.v3)
5c329f
+BuildRequires: golang(gopkg.in/asn1-ber.v1)
5c329f
+BuildRequires: golang(github.com/go-bufio/bufio)
5c329f
+BuildRequires: golang(github.com/go-ini/ini)
5c329f
+BuildRequires: golang(github.com/go-macaron/macaron)
5c329f
+BuildRequires: golang(github.com/go-redis/redis)
5c329f
+BuildRequires: golang(gopkg.in/square/go-jose.v2)
5c329f
+BuildRequires: golang(gopkg.in/square/go-jose.v2/cipher)
5c329f
+BuildRequires: golang(gopkg.in/square/go-jose.v2/json)
5c329f
+BuildRequires: golang(github.com/go-yaml/yaml)
5c329f
+BuildRequires: golang(golang.org/x/sync/errgroup)
5c329f
+BuildRequires: golang(gopkg.in/ldap.v3)
5c329f
+BuildRequires: golang(gopkg.in/mail.v2)
5c329f
+%endif
5c329f
+
5c329f
+# Declare all nodejs modules bundled in the webpack - this is for security
5c329f
+# purposes so if nodejs-foo ever needs an update, affected packages can be
5c329f
+# easily identified. This is generated from package-lock.json once the webpack
5c329f
+# has been built with make_webpack.sh.
5c329f
+Provides: bundled(nodejs-abbrev) = 1.1.1
5c329f
+Provides: bundled(nodejs-ansi-regex) = 2.1.1
5c329f
+Provides: bundled(nodejs-ansi-styles) = 2.2.1
5c329f
+Provides: bundled(nodejs-argparse) = 1.0.10
5c329f
+Provides: bundled(nodejs-array-find-index) = 1.0.2
5c329f
+Provides: bundled(nodejs-async) = 1.5.2
5c329f
+Provides: bundled(nodejs-balanced-match) = 1.0.0
5c329f
+Provides: bundled(nodejs-brace-expansion) = 1.1.11
5c329f
+Provides: bundled(nodejs-builtin-modules) = 1.1.1
5c329f
+Provides: bundled(nodejs-camelcase) = 2.1.1
5c329f
+Provides: bundled(nodejs-camelcase-keys) = 2.1.0
5c329f
+Provides: bundled(nodejs-chalk) = 1.1.3
5c329f
+Provides: bundled(nodejs-coffee-script) = 1.10.0
5c329f
+Provides: bundled(nodejs-colors) = 1.1.2
5c329f
+Provides: bundled(nodejs-concat-map) = 0.0.1
5c329f
+Provides: bundled(nodejs-currently-unhandled) = 0.4.1
5c329f
+Provides: bundled(nodejs-dateformat) = 1.0.12
5c329f
+Provides: bundled(nodejs-decamelize) = 1.2.0
5c329f
+Provides: bundled(nodejs-error-ex) = 1.3.2
5c329f
+Provides: bundled(nodejs-escape-string-regexp) = 1.0.5
5c329f
+Provides: bundled(nodejs-esprima) = 2.7.3
5c329f
+Provides: bundled(nodejs-eventemitter2) = 0.4.14
5c329f
+Provides: bundled(nodejs-exit) = 0.1.2
5c329f
+Provides: bundled(nodejs-find-up) = 1.1.2
5c329f
+Provides: bundled(nodejs-findup-sync) = 0.3.0
5c329f
+Provides: bundled(nodejs-fs.realpath) = 1.0.0
5c329f
+Provides: bundled(nodejs-get-stdin) = 4.0.1
5c329f
+Provides: bundled(nodejs-getobject) = 0.1.0
5c329f
+Provides: bundled(nodejs-glob) = 7.0.6
5c329f
+Provides: bundled(nodejs-graceful-fs) = 4.1.15
5c329f
+Provides: bundled(nodejs-grunt) = 1.0.1
5c329f
+Provides: bundled(nodejs-grunt-cli) = 1.2.0
5c329f
+Provides: bundled(nodejs-grunt-known-options) = 1.1.1
5c329f
+Provides: bundled(nodejs-grunt-legacy-log) = 1.0.2
5c329f
+Provides: bundled(nodejs-lodash) = 4.17.11
5c329f
+Provides: bundled(nodejs-grunt-legacy-log-utils) = 1.0.0
5c329f
+Provides: bundled(nodejs-grunt-legacy-util) = 1.0.0
5c329f
+Provides: bundled(nodejs-has-ansi) = 2.0.0
5c329f
+Provides: bundled(nodejs-hooker) = 0.2.3
5c329f
+Provides: bundled(nodejs-hosted-git-info) = 2.7.1
5c329f
+Provides: bundled(nodejs-iconv-lite) = 0.4.24
5c329f
+Provides: bundled(nodejs-indent-string) = 2.1.0
5c329f
+Provides: bundled(nodejs-inflight) = 1.0.6
5c329f
+Provides: bundled(nodejs-inherits) = 2.0.3
5c329f
+Provides: bundled(nodejs-is-arrayish) = 0.2.1
5c329f
+Provides: bundled(nodejs-is-builtin-module) = 1.0.0
5c329f
+Provides: bundled(nodejs-is-finite) = 1.0.2
5c329f
+Provides: bundled(nodejs-is-utf8) = 0.2.1
5c329f
+Provides: bundled(nodejs-isexe) = 2.0.0
5c329f
+Provides: bundled(nodejs-js-yaml) = 3.5.5
5c329f
+Provides: bundled(nodejs-load-json-file) = 1.1.0
5c329f
+Provides: bundled(nodejs-loud-rejection) = 1.6.0
5c329f
+Provides: bundled(nodejs-map-obj) = 1.0.1
5c329f
+Provides: bundled(nodejs-meow) = 3.7.0
5c329f
+Provides: bundled(nodejs-minimatch) = 3.0.4
5c329f
+Provides: bundled(nodejs-minimist) = 1.2.0
5c329f
+Provides: bundled(nodejs-nopt) = 3.0.6
5c329f
+Provides: bundled(nodejs-normalize-package-data) = 2.4.2
5c329f
+Provides: bundled(nodejs-number-is-nan) = 1.0.1
5c329f
+Provides: bundled(nodejs-object-assign) = 4.1.1
5c329f
+Provides: bundled(nodejs-once) = 1.4.0
5c329f
+Provides: bundled(nodejs-parse-json) = 2.2.0
5c329f
+Provides: bundled(nodejs-path-exists) = 2.1.0
5c329f
+Provides: bundled(nodejs-path-is-absolute) = 1.0.1
5c329f
+Provides: bundled(nodejs-path-type) = 1.1.0
5c329f
+Provides: bundled(nodejs-pify) = 2.3.0
5c329f
+Provides: bundled(nodejs-pinkie) = 2.0.4
5c329f
+Provides: bundled(nodejs-pinkie-promise) = 2.0.1
5c329f
+Provides: bundled(nodejs-read-pkg) = 1.1.0
5c329f
+Provides: bundled(nodejs-read-pkg-up) = 1.0.1
5c329f
+Provides: bundled(nodejs-redent) = 1.0.0
5c329f
+Provides: bundled(nodejs-repeating) = 2.0.1
5c329f
+Provides: bundled(nodejs-resolve) = 1.1.7
5c329f
+Provides: bundled(nodejs-rimraf) = 2.2.8
5c329f
+Provides: bundled(nodejs-safer-buffer) = 2.1.2
5c329f
+Provides: bundled(nodejs-semver) = 5.6.0
5c329f
+Provides: bundled(nodejs-signal-exit) = 3.0.2
5c329f
+Provides: bundled(nodejs-spdx-correct) = 3.1.0
5c329f
+Provides: bundled(nodejs-spdx-exceptions) = 2.2.0
5c329f
+Provides: bundled(nodejs-spdx-expression-parse) = 3.0.0
5c329f
+Provides: bundled(nodejs-spdx-license-ids) = 3.0.3
5c329f
+Provides: bundled(nodejs-sprintf-js) = 1.0.3
5c329f
+Provides: bundled(nodejs-strip-ansi) = 3.0.1
5c329f
+Provides: bundled(nodejs-strip-bom) = 2.0.0
5c329f
+Provides: bundled(nodejs-strip-indent) = 1.0.1
5c329f
+Provides: bundled(nodejs-supports-color) = 2.0.0
5c329f
+Provides: bundled(nodejs-trim-newlines) = 1.0.0
5c329f
+Provides: bundled(nodejs-underscore.string) = 3.2.3
5c329f
+Provides: bundled(nodejs-validate-npm-package-license) = 3.0.4
5c329f
+Provides: bundled(nodejs-which) = 1.2.14
5c329f
+Provides: bundled(nodejs-wrappy) = 1.0.2
5c329f
+Provides: bundled(nodejs-yarn) = 1.13.0
5c329f
+
5c329f
+
5c329f
+%description
5c329f
+Grafana is an open source, feature rich metrics dashboard and graph editor for
5c329f
+Graphite, InfluxDB & OpenTSDB.
5c329f
+
5c329f
+
5c329f
+%package cloudwatch
5c329f
+Requires: %{name} = %{version}-%{release}
5c329f
+Summary: Grafana cloudwatch datasource
5c329f
+
5c329f
+%description cloudwatch
5c329f
+The Grafana cloudwatch datasource.
5c329f
+
5c329f
+%package elasticsearch
5c329f
+Requires: %{name} = %{version}-%{release}
5c329f
+Summary: Grafana elasticsearch datasource
5c329f
+
5c329f
+%description elasticsearch
5c329f
+The Grafana elasticsearch datasource.
5c329f
+
5c329f
+%package azure-monitor
5c329f
+Requires: %{name} = %{version}-%{release}
5c329f
+Summary: Grafana azure-monitor datasource
5c329f
+
5c329f
+%description azure-monitor
5c329f
+The Grafana azure-monitor datasource.
5c329f
+
5c329f
+%package graphite
5c329f
+Requires: %{name} = %{version}-%{release}
5c329f
+Summary: Grafana graphite datasource
5c329f
+
5c329f
+%description graphite
5c329f
+The Grafana graphite datasource.
5c329f
+
5c329f
+%package influxdb
5c329f
+Requires: %{name} = %{version}-%{release}
5c329f
+Summary: Grafana influxdb datasource
5c329f
+
5c329f
+%description influxdb
5c329f
+The Grafana influxdb datasource.
5c329f
+
5c329f
+%package loki
5c329f
+Requires: %{name} = %{version}-%{release}
5c329f
+Summary: Grafana loki datasource
5c329f
+
5c329f
+%description loki
5c329f
+The Grafana loki datasource.
5c329f
+
5c329f
+%package mssql
5c329f
+Requires: %{name} = %{version}-%{release}
5c329f
+Summary: Grafana mssql datasource
5c329f
+
5c329f
+%description mssql
5c329f
+The Grafana mssql datasource.
5c329f
+
5c329f
+%package mysql
5c329f
+Requires: %{name} = %{version}-%{release}
5c329f
+Summary: Grafana mysql datasource
5c329f
+
5c329f
+%description mysql
5c329f
+The Grafana mysql datasource.
5c329f
+
5c329f
+%package opentsdb
5c329f
+Requires: %{name} = %{version}-%{release}
5c329f
+Summary: Grafana opentsdb datasource
5c329f
+
5c329f
+%description opentsdb
5c329f
+The Grafana opentsdb datasource.
5c329f
+
5c329f
+%package postgres
5c329f
+Requires: %{name} = %{version}-%{release}
5c329f
+Summary: Grafana postgres datasource
5c329f
+
5c329f
+%description postgres
5c329f
+The Grafana postgres datasource.
5c329f
+
5c329f
+%package prometheus
5c329f
+Requires: %{name} = %{version}-%{release}
5c329f
+Summary: Grafana prometheus datasource
5c329f
+
5c329f
+%description prometheus
5c329f
+The Grafana prometheus datasource.
5c329f
+
5c329f
+%package stackdriver
5c329f
+Requires: %{name} = %{version}-%{release}
5c329f
+Summary: Grafana stackdriver datasource
5c329f
+
5c329f
+%description stackdriver
5c329f
+The Grafana stackdriver datasource.
5c329f
+
5c329f
+
5c329f
+%prep
5c329f
+%setup -q -T -D -b 0
5c329f
+%setup -q -T -D -b 1
5c329f
+%patch1 -p1
5c329f
+%patch2 -p1
5c329f
+%patch3 -p1
5c329f
+
5c329f
+# Set up build subdirs and links
5c329f
+mkdir -p %{_builddir}/src/github.com/grafana
5c329f
+ln -sf %{_builddir}/%{name}-%{version} \
5c329f
+    %{_builddir}/src/github.com/grafana/grafana
5c329f
+
5c329f
+# remove some (apparent) development files, for rpmlint
5c329f
+rm -f public/sass/.sass-lint.yml public/test/.jshintrc
5c329f
+
5c329f
+%if 0%{?unbundle_vendor_sources}
5c329f
+# Unbundle all grafana vendor sources, as per BuildRequires above.
5c329f
+# An exception is grafana-plugin-model, which is part of grafana.
5c329f
+# Another exception is xerrors, which is a transition package
5c329f
+# for the new Go 1.13 error values, see https://github.com/golang/xerrors
5c329f
+cp --parents -a vendor/github.com/grafana vendor/golang.org/x/xerrors \
5c329f
+    vendor/github.com/robfig/cron %{_builddir}
5c329f
+rm -r vendor # remove all vendor sources
5c329f
+mv %{_builddir}/vendor vendor # put back what we're keeping
5c329f
+%endif
5c329f
+
5c329f
+
5c329f
+%build
5c329f
+# Build the server-side binaries: grafana-server and grafana-cli
5c329f
+%if 0%{?gobuild}
5c329f
+# use modern go macros such as in recent Fedora
5c329f
+export GOPATH=%{_builddir}:%{gopath}
5c329f
+%gobuild -o grafana-cli ./pkg/cmd/grafana-cli
5c329f
+%gobuild -o grafana-server ./pkg/cmd/grafana-server
5c329f
+%else
5c329f
+cd %{_builddir}/src/github.com/grafana/grafana
5c329f
+export GOPATH=%{_builddir}:%{gopath}
5c329f
+go run build.go build
5c329f
+%endif
5c329f
+
5c329f
+
5c329f
+%install
5c329f
+# Fix up arch bin directories
5c329f
+[ ! -d bin/x86_64 ] && ln -sf linux-amd64 bin/x86_64
5c329f
+[ ! -d bin/i386 ] && ln -sf linux-386 bin/i386
5c329f
+[ ! -d bin/ppc64le ] && ln -sf linux-ppc64le bin/ppc64le
5c329f
+[ ! -d bin/s390x ] && ln -sf linux-s390x bin/s390x
5c329f
+[ ! -d bin/arm ] && ln -sf linux-arm bin/arm
5c329f
+[ ! -d bin/arm64 ] && ln -sf linux-arm64 bin/aarch64
5c329f
+[ ! -d bin/aarch64 ] && ln -sf linux-aarch64 bin/aarch64
5c329f
+
5c329f
+# binaries
5c329f
+install -d %{buildroot}%{_sbindir}
5c329f
+install -p -m 755 bin/%{_arch}/%{name}-server %{buildroot}%{_sbindir}
5c329f
+install -p -m 755 bin/%{_arch}/%{name}-cli %{buildroot}%{_sbindir}
5c329f
+
5c329f
+# other shared files, public html, webpack
5c329f
+install -d %{buildroot}%{_datadir}/%{name}
5c329f
+cp -a conf public %{buildroot}%{_datadir}/%{name}
5c329f
+
5c329f
+# man pages
5c329f
+install -d %{buildroot}%{_mandir}/man1
5c329f
+install -p -m 644 docs/man/man1/* %{buildroot}%{_mandir}/man1
5c329f
+
5c329f
+# config dirs
5c329f
+install -d %{buildroot}%{_sysconfdir}/%{name}
5c329f
+install -d %{buildroot}%{_sysconfdir}/sysconfig
5c329f
+
5c329f
+# config defaults
5c329f
+install -p -m 644 conf/distro-defaults.ini \
5c329f
+    %{buildroot}%{_sysconfdir}/%{name}/grafana.ini
5c329f
+install -p -m 644 conf/distro-defaults.ini \
5c329f
+    %{buildroot}%{_datadir}/%{name}/conf/defaults.ini
5c329f
+install -p -m 644 conf/ldap.toml %{buildroot}%{_sysconfdir}/%{name}/ldap.toml
5c329f
+install -p -m 644 packaging/rpm/sysconfig/grafana-server \
5c329f
+    %{buildroot}%{_sysconfdir}/sysconfig/grafana-server
5c329f
+
5c329f
+# config database directory and plugins
5c329f
+install -d %{buildroot}%{_sharedstatedir}/%{name}
5c329f
+install -d -m 755 %{buildroot}%{_sharedstatedir}/%{name}
5c329f
+install -d -m 755 %{buildroot}%{_sharedstatedir}/%{name}/plugins
5c329f
+
5c329f
+# log directory
5c329f
+install -d %{buildroot}%{_localstatedir}/log/%{name}
5c329f
+
5c329f
+# systemd service files
5c329f
+install -d %{buildroot}%{_unitdir} # only needed for manual rpmbuilds
5c329f
+install -p -m 644 packaging/rpm/systemd/grafana-server.service \
5c329f
+    %{buildroot}%{_unitdir}
5c329f
+
5c329f
+# daemon run pid file config for using tmpfs
5c329f
+install -d %{buildroot}%{_tmpfilesdir}
5c329f
+echo "d %{_rundir}/%{name} 0755 %{GRAFANA_USER} %{GRAFANA_GROUP} -" \
5c329f
+    > %{buildroot}%{_tmpfilesdir}/%{name}.conf
5c329f
+
5c329f
+%pre
5c329f
+getent group %{GRAFANA_GROUP} >/dev/null || groupadd -r %{GRAFANA_GROUP}
5c329f
+getent passwd %{GRAFANA_USER} >/dev/null || \
5c329f
+    useradd -r -g %{GRAFANA_GROUP} -d %{GRAFANA_HOME} -s /sbin/nologin \
5c329f
+    -c "%{GRAFANA_USER} user account" %{GRAFANA_USER}
5c329f
+exit 0
5c329f
+
5c329f
+%preun
5c329f
+%systemd_preun grafana-server.service
5c329f
+
5c329f
+%post
5c329f
+%systemd_post grafana-server.service
5c329f
+
5c329f
+%postun
5c329f
+%systemd_postun_with_restart grafana-server.service
5c329f
+
5c329f
+
5c329f
+%check
5c329f
+cd %{_builddir}/src/github.com/grafana/grafana
5c329f
+export GOPATH=%{_builddir}:%{gopath}
5c329f
+# remove tests currently failing
5c329f
+rm -f pkg/services/provisioning/dashboards/file_reader_linux_test.go
5c329f
+rm -f pkg/services/provisioning/dashboards/file_reader_test.go
5c329f
+rm -f pkg/services/sqlstore/alert_test.go
5c329f
+go test ./pkg/...
5c329f
+
5c329f
+
5c329f
+%files
5c329f
+# binaries
5c329f
+%{_sbindir}/%{name}-server
5c329f
+%{_sbindir}/%{name}-cli
5c329f
+
5c329f
+# config files
5c329f
+%dir %{_sysconfdir}/%{name}
5c329f
+%config(noreplace) %attr(644, root, %{GRAFANA_GROUP}) %{_sysconfdir}/%{name}/grafana.ini
5c329f
+%config(noreplace) %attr(644, root, %{GRAFANA_GROUP}) %{_sysconfdir}/%{name}/ldap.toml
5c329f
+%config(noreplace) %{_sysconfdir}/sysconfig/grafana-server
5c329f
+
5c329f
+# Grafana configuration to dynamically create /run/grafana/grafana.pid on tmpfs
5c329f
+%{_tmpfilesdir}/%{name}.conf
5c329f
+
5c329f
+# config database directory and plugins (actual db files are created by grafana-server)
5c329f
+%attr(-, %{GRAFANA_USER}, %{GRAFANA_GROUP}) %dir %{_sharedstatedir}/%{name}
5c329f
+%attr(-, %{GRAFANA_USER}, %{GRAFANA_GROUP}) %dir %{_sharedstatedir}/%{name}/plugins
5c329f
+
5c329f
+# shared directory and all files therein, except some datasources
5c329f
+%{_datadir}/%{name}/public
5c329f
+
5c329f
+# built-in datasources that are sub-packaged
5c329f
+%global dsdir %{_datadir}/%{name}/public/app/plugins/datasource
5c329f
+%exclude %{dsdir}/cloudwatch 
5c329f
+%exclude %{dsdir}/elasticsearch 
5c329f
+%exclude %{dsdir}/graphite
5c329f
+%exclude %{dsdir}/grafana-azure-monitor-datasource
5c329f
+%exclude %{dsdir}/influxdb
5c329f
+%exclude %{dsdir}/loki
5c329f
+%exclude %{dsdir}/mssql
5c329f
+%exclude %{dsdir}/mysql
5c329f
+%exclude %{dsdir}/opentsdb
5c329f
+%exclude %{dsdir}/postgres
5c329f
+%exclude %{dsdir}/prometheus
5c329f
+%exclude %{dsdir}/stackdriver
5c329f
+
5c329f
+%dir %{_datadir}/%{name}/conf
5c329f
+%attr(-, root, %{GRAFANA_GROUP}) %{_datadir}/%{name}/conf/*
5c329f
+
5c329f
+# systemd service file
5c329f
+%{_unitdir}/grafana-server.service
5c329f
+
5c329f
+# log directory - grafana.log is created by grafana-server, and it does it's own log rotation
5c329f
+%attr(0755, %{GRAFANA_USER}, %{GRAFANA_GROUP}) %dir %{_localstatedir}/log/%{name}
5c329f
+
5c329f
+# man pages for grafana binaries
5c329f
+%{_mandir}/man1/%{name}-server.1*
5c329f
+%{_mandir}/man1/%{name}-cli.1*
5c329f
+
5c329f
+# other docs and license
5c329f
+%license LICENSE
5c329f
+%doc CHANGELOG.md CODE_OF_CONDUCT.md CONTRIBUTING.md NOTICE.md
5c329f
+%doc PLUGIN_DEV.md README.md ROADMAP.md UPGRADING_DEPENDENCIES.md
5c329f
+
5c329f
+#
5c329f
+# datasources split out into subpackages
5c329f
+#
5c329f
+%files cloudwatch
5c329f
+%{_datadir}/%{name}/public/app/plugins/datasource/cloudwatch
5c329f
+
5c329f
+%files elasticsearch
5c329f
+%{_datadir}/%{name}/public/app/plugins/datasource/elasticsearch
5c329f
+
5c329f
+%files azure-monitor
5c329f
+%{_datadir}/%{name}/public/app/plugins/datasource/grafana-azure-monitor-datasource
5c329f
+
5c329f
+%files graphite
5c329f
+%{_datadir}/%{name}/public/app/plugins/datasource/graphite
5c329f
+
5c329f
+%files influxdb
5c329f
+%{_datadir}/%{name}/public/app/plugins/datasource/influxdb
5c329f
+
5c329f
+%files loki
5c329f
+%{_datadir}/%{name}/public/app/plugins/datasource/loki
5c329f
+
5c329f
+%files mssql
5c329f
+%{_datadir}/%{name}/public/app/plugins/datasource/mssql
5c329f
+
5c329f
+%files mysql
5c329f
+%{_datadir}/%{name}/public/app/plugins/datasource/mysql
5c329f
+
5c329f
+%files opentsdb
5c329f
+%{_datadir}/%{name}/public/app/plugins/datasource/opentsdb
5c329f
+
5c329f
+%files postgres
5c329f
+%{_datadir}/%{name}/public/app/plugins/datasource/postgres
5c329f
+
5c329f
+%files prometheus
5c329f
+%{_datadir}/%{name}/public/app/plugins/datasource/prometheus
5c329f
+
5c329f
+%files stackdriver
5c329f
+%{_datadir}/%{name}/public/app/plugins/datasource/stackdriver
5c329f
+
5c329f
+
5c329f
+%changelog
5c329f
+* Fri Jun 07 2019 Mark Goodwin <mgoodwin@redhat.com> 6.2.2-1
5c329f
+- split out some datasource plugins to sub-packages
5c329f
+- update to latest upstream community sources, see CHANGELOG
5c329f
+
5c329f
+* Wed Jun 05 2019 Mark Goodwin <mgoodwin@redhat.com> 6.2.1-1
5c329f
+- update to latest upstream community sources, see CHANGELOG
5c329f
+
5c329f
+* Fri May 24 2019 Mark Goodwin <mgoodwin@redhat.com> 6.2.0-1
5c329f
+- update to latest upstream community sources
5c329f
+- drop a couple of patches
5c329f
+
5c329f
+* Wed May 08 2019 Mark Goodwin <mgoodwin@redhat.com> 6.1.6-2
5c329f
+- add conditional unbundle_vendor_sources macro
5c329f
+
5c329f
+* Tue Apr 30 2019 Mark Goodwin <mgoodwin@redhat.com> 6.1.6-1
5c329f
+- update to latest upstream stable release 6.1.6, see CHANGELOG
5c329f
+- includes jQuery 3.4.0 security update
5c329f
+
5c329f
+* Wed Apr 24 2019 Mark Goodwin <mgoodwin@redhat.com> 6.1.4-1
5c329f
+- update to latest upstream stable release 6.1.4, see CHANGELOG
5c329f
+- use gobuild and gochecks macros, eliminate arch symlinks
5c329f
+- re-enable grafana-debugsource package
5c329f
+- fix GRAFANA_GROUP typo
5c329f
+- fix more modes for brp-mangle-shebangs
5c329f
+- vendor source unbundling now done in prep after patches
5c329f
+- remove all rhel and fedora conditional guff
5c329f
+
5c329f
+* Tue Apr 16 2019 Mark Goodwin <mgoodwin@redhat.com> 6.1.3-1
5c329f
+- update to latest upstream stable release 6.1.3, see CHANGELOG
5c329f
+- unbundle all vendor sources, replace with BuildRequires, see
5c329f
+  the long list of blocker BZs linked to BZ#1670656
5c329f
+- BuildRequires go-plugin >= v1.0.0 for grpc_broker (thanks eclipseo)
5c329f
+- tweak make_webpack to no longer use grunt, switch to prod build
5c329f
+- add ExclusiveArch lua script (thanks quantum.analyst)
5c329f
+- move db directory and plugins to /var/lib/grafana
5c329f
+- split out into 6 patches, ready for upstream PRs
5c329f
+- add check to run go tests for gating checks
5c329f
+
5c329f
+* Thu Apr 04 2019 Mark Goodwin <mgoodwin@redhat.com> 6.1.0-1
5c329f
+- update to latest upstream stable release 6.1.0, see CHANGELOG
5c329f
+
5c329f
+* Thu Mar 21 2019 Mark Goodwin <mgoodwin@redhat.com> 6.0.2-1
5c329f
+- bump to latest upstream stable release 6.0.2-1
5c329f
+- unbundle almost all remaining vendor code, see linked blockers in BZ#1670656
5c329f
+
5c329f
+* Fri Mar 15 2019 Mark Goodwin <mgoodwin@redhat.com> 6.0.1-3
5c329f
+- bump to latest upstream stable release 6.0.1-1
5c329f
+
5c329f
+* Thu Mar 14 2019 Mark Goodwin <mgoodwin@redhat.com> 6.0.1-2
5c329f
+- unbundle and add BuildRequires for golang-github-rainycape-unidecode-devel
5c329f
+
5c329f
+* Thu Mar 07 2019 Mark Goodwin <mgoodwin@redhat.com> 6.0.1-1
5c329f
+- update to v6.0.1 upstream sources, tweak distro config, re-do patch
5c329f
+- simplify make_webpack.sh script (Elliott Sales de Andrade)
5c329f
+- vendor/github.com/go-ldap is now gone, so don't unbundle it
5c329f
+
5c329f
+* Thu Mar 07 2019 Mark Goodwin <mgoodwin@redhat.com> 5.4.3-11
5c329f
+- tweak after latest feedback, bump to 5.4.3-11 (BZ 1670656)
5c329f
+- build debuginfo package again
5c329f
+- unbundle BuildRequires for golang-github-hashicorp-version-devel
5c329f
+- remove some unneeded development files
5c329f
+- remove macros from changelog and other rpmlint tweaks
5c329f
+
5c329f
+* Fri Feb 22 2019 Mark Goodwin <mgoodwin@redhat.com> 5.4.3-10
5c329f
+- tweak spec for available and unavailable (bundled) golang packages
5c329f
+
5c329f
+* Wed Feb 20 2019 Xavier Bachelot <xavier@bachelot.org> 5.4.3-9
5c329f
+- Remove extraneous slash (cosmetic)
5c329f
+- Create directories just before moving stuff in them
5c329f
+- Truncate long lines
5c329f
+- Group all golang stuff
5c329f
+- Simplify BuildRequires/bundled Provides
5c329f
+- Sort BuildRequires/bundled Provides
5c329f
+- Fix bundled go packages Provides
5c329f
+
5c329f
+* Fri Feb 15 2019 Mark Goodwin <mgoodwin@redhat.com> 5.4.3-8
5c329f
+- add BuildRequires (and unbundle) vendor sources available in Fedora
5c329f
+- declare Provides for remaining (bundled) vendor go sources
5c329f
+- do not attempt to unbundle anything on RHEL < 7 or Fedora < 28
5c329f
+
5c329f
+* Thu Feb 07 2019 Mark Goodwin <mgoodwin@redhat.com> 5.4.3-7
5c329f
+- further refinement for spec doc section from Xavier Bachelot
5c329f
+- disable debug_package to avoid empty debugsourcefiles.list
5c329f
+
5c329f
+* Wed Feb 06 2019 Mark Goodwin <mgoodwin@redhat.com> 5.4.3-6
5c329f
+- further refinement following review by Xavier Bachelot
5c329f
+
5c329f
+* Tue Feb 05 2019 Mark Goodwin <mgoodwin@redhat.com> 5.4.3-5
5c329f
+- further refinement following review by Xavier Bachelot
5c329f
+
5c329f
+* Fri Feb 01 2019 Mark Goodwin <mgoodwin@redhat.com> 5.4.3-4
5c329f
+- further spec updates after packaging review
5c329f
+- reworked post-install scriplets
5c329f
+
5c329f
+* Thu Jan 31 2019 Mark Goodwin <mgoodwin@redhat.com> 5.4.3-3
5c329f
+- tweak FHS patch, update spec after packaging review
5c329f
+
5c329f
+* Wed Jan 30 2019 Mark Goodwin <mgoodwin@redhat.com> 5.4.3-2
5c329f
+- add patch to be standard FHS compliant, remove phantomjs
5c329f
+- update to v5.4.3 upstream community sources
5c329f
+
5c329f
+* Wed Jan 09 2019 Mark Goodwin <mgoodwin@redhat.com> 5.4.2-1
5c329f
+- update to v5.4.2 upstream community sources
5c329f
+
5c329f
+* Thu Oct 18 2018 Mark Goodwin <mgoodwin@redhat.com> 5.3.1-1
5c329f
+- update to v5.3.1 upstream community sources
5c329f
+
5c329f
+* Tue Oct 02 2018 Mark Goodwin <mgoodwin@redhat.com> 5.2.5-1
5c329f
+- native RPM spec build with current tagged v5.2.5 sources
5c329f
diff --git a/packaging/rpm/spec/make_grafana_webpack.sh b/packaging/rpm/spec/make_grafana_webpack.sh
5c329f
new file mode 100755
5c329f
index 000000000..47a8025ff
5c329f
--- /dev/null
5c329f
+++ b/packaging/rpm/spec/make_grafana_webpack.sh
5c329f
@@ -0,0 +1,61 @@
5c329f
+#! /bin/bash
5c329f
+#
5c329f
+# Copyright (c) 2019 Red Hat.
5c329f
+#
5c329f
+# This program is free software; you can redistribute it and/or modify it
5c329f
+# under the terms of the GNU General Public License as published by the
5c329f
+# Free Software Foundation; either version 2 of the License, or (at your
5c329f
+# option) any later version.
5c329f
+#
5c329f
+# This program is distributed in the hope that it will be useful, but
5c329f
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
5c329f
+# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5c329f
+# for more details.
5c329f
+#
5c329f
+
5c329f
+[ $# -ne 1 ] && echo "Usage: $0 version" && exit 1
5c329f
+
5c329f
+# grafana version (must be tagged on github.com/grafana/grafana as "v$VER")
5c329f
+VER=$1
5c329f
+BUILDDIR=`mktemp -d buildXXXXXX`
5c329f
+
5c329f
+[ ! -f /usr/bin/npm ] && echo Error, please install \"npm\" package && exit 1
5c329f
+
5c329f
+# get src tree and set cwd
5c329f
+echo Fetching pristine upstream git tagged branch for grafana version v$VER ...
5c329f
+git clone https://github.com/grafana/grafana grafana-$VER
5c329f
+cd grafana-$VER
5c329f
+git checkout -b v$VER v$VER
5c329f
+
5c329f
+# exclude the phantomjs-prebuilt binary module from the webpack
5c329f
+sed -i '/phantomjs-prebuilt/d' package.json
5c329f
+
5c329f
+# nuke grunt task for copying phantomjs
5c329f
+rm -f scripts/grunt/options/phantomjs.js
5c329f
+sed -i '/phantomjs/d' scripts/grunt/*.js
5c329f
+
5c329f
+# populate node_modules using package.json
5c329f
+echo Running yarn to populate local node_modules ....
5c329f
+npm install yarn
5c329f
+node_modules/yarn/bin/yarn --non-interactive --no-progress --ignore-engines install --pure-lockfile > yarn.out 2>&1
5c329f
+node_modules/yarn/bin/yarn --non-interactive -W add webpack-cli
5c329f
+
5c329f
+# build the webpack
5c329f
+echo;echo Building production webpack ....
5c329f
+node_modules/webpack/bin/webpack.js --display errors-only --mode production --config scripts/webpack/webpack.prod.js
5c329f
+
5c329f
+cd ..
5c329f
+
5c329f
+# webpack tarball. Includes public/views because index.html references the webpack
5c329f
+tar czf grafana_webpack-$VER.tar.gz grafana-$VER/public/build grafana-$VER/public/views
5c329f
+
5c329f
+# source tarball (if needed)
5c329f
+if [ ! -f grafana-$VER.tar.gz ]; then
5c329f
+  wget --quiet -O grafana-$VER.tar.gz https://github.com/grafana/grafana/archive/v$VER/grafana-$VER.tar.gz
5c329f
+fi
5c329f
+
5c329f
+# done
5c329f
+echo Both grafana-$VER.tar.gz and grafana_webpack-$VER.tar.gz
5c329f
+echo should now be copied to your \$HOME/rpmbuild/SOURCES
5c329f
+
5c329f
+exit 0