Spec update to conditionally package only some built-in datasource plugins
and bump to build revision 3. Resolves: bz1685316
This commit is contained in:
parent
c5a2fb25dc
commit
9ae44d177f
102
grafana.spec
102
grafana.spec
@ -12,12 +12,25 @@ end}
|
||||
# only on platforms that have enough golang devel support.
|
||||
%if 0%{?rhel} == 0
|
||||
%global unbundle_vendor_sources 1
|
||||
%else
|
||||
# which datasource plugins to disable as subpackages
|
||||
%global disable_subpkg_cloudwatch 1
|
||||
%global disable_subpkg_elasticsearch 0
|
||||
%global disable_subpkg_azure_monitor 1
|
||||
%global disable_subpkg_graphite 1
|
||||
%global disable_subpkg_influxdb 1
|
||||
%global disable_subpkg_loki 1
|
||||
%global disable_subpkg_mssql 1
|
||||
%global disable_subpkg_mysql 0
|
||||
%global disable_subpkg_opentsdb 1
|
||||
%global disable_subpkg_postgres 0
|
||||
%global disable_subpkg_prometheus 0
|
||||
%global disable_subpkg_stackdriver 1
|
||||
%endif
|
||||
|
||||
|
||||
Name: grafana
|
||||
Version: 6.2.2
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
Summary: Metrics dashboard and graph editor
|
||||
License: ASL 2.0
|
||||
URL: https://grafana.org
|
||||
@ -52,18 +65,42 @@ Requires(pre): shadow-utils
|
||||
|
||||
BuildRequires: systemd, golang, go-srpm-macros
|
||||
|
||||
%if !0%{?disable_subpkg_cloudwatch}
|
||||
Recommends: grafana-cloudwatch = %{version}-%{release}
|
||||
%endif
|
||||
%if !0%{?disable_subpkg_elasticsearch}
|
||||
Recommends: grafana-elasticsearch = %{version}-%{release}
|
||||
%endif
|
||||
%if !0%{?disable_subpkg_azure_monitor}
|
||||
Recommends: grafana-azure-monitor = %{version}-%{release}
|
||||
%endif
|
||||
%if !0%{?disable_subpkg_graphite}
|
||||
Recommends: grafana-graphite = %{version}-%{release}
|
||||
%endif
|
||||
%if !0%{?disable_subpkg_influxdb}
|
||||
Recommends: grafana-influxdb = %{version}-%{release}
|
||||
%endif
|
||||
%if !0%{?disable_subpkg_loki}
|
||||
Recommends: grafana-loki = %{version}-%{release}
|
||||
%endif
|
||||
%if !0%{?disable_subpkg_mssql}
|
||||
Recommends: grafana-mssql = %{version}-%{release}
|
||||
%endif
|
||||
%if !0%{?disable_subpkg_mysql}
|
||||
Recommends: grafana-mysql = %{version}-%{release}
|
||||
%endif
|
||||
%if !0%{?disable_subpkg_opentsdb}
|
||||
Recommends: grafana-opentsdb = %{version}-%{release}
|
||||
%endif
|
||||
%if !0%{?disable_subpkg_postgres}
|
||||
Recommends: grafana-postgres = %{version}-%{release}
|
||||
%endif
|
||||
%if !0%{?disable_subpkg_prometheus}
|
||||
Recommends: grafana-prometheus = %{version}-%{release}
|
||||
%endif
|
||||
%if !0%{?disable_subpkg_stackdriver}
|
||||
Recommends: grafana-stackdriver = %{version}-%{release}
|
||||
%endif
|
||||
|
||||
%if 0%{?unbundle_vendor_sources}
|
||||
# golang build deps. These allow us to unbundle vendor golang source.
|
||||
@ -302,89 +339,113 @@ Grafana is an open source, feature rich metrics dashboard and graph editor for
|
||||
Graphite, InfluxDB & OpenTSDB.
|
||||
|
||||
|
||||
%if !0%{?disable_subpkg_cloudwatch}
|
||||
%package cloudwatch
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Summary: Grafana cloudwatch datasource
|
||||
|
||||
%description cloudwatch
|
||||
The Grafana cloudwatch datasource.
|
||||
%endif
|
||||
|
||||
%if !0%{?disable_subpkg_elasticsearch}
|
||||
%package elasticsearch
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Summary: Grafana elasticsearch datasource
|
||||
|
||||
%description elasticsearch
|
||||
The Grafana elasticsearch datasource.
|
||||
%endif
|
||||
|
||||
%if !0%{?disable_subpkg_azure_monitor}
|
||||
%package azure-monitor
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Summary: Grafana azure-monitor datasource
|
||||
Summary: Grafana azure monitor datasource
|
||||
|
||||
%description azure-monitor
|
||||
The Grafana azure-monitor datasource.
|
||||
The Grafana azure monitor datasource.
|
||||
%endif
|
||||
|
||||
%if !0%{?disable_subpkg_graphite}
|
||||
%package graphite
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Summary: Grafana graphite datasource
|
||||
|
||||
%description graphite
|
||||
The Grafana graphite datasource.
|
||||
%endif
|
||||
|
||||
%if !0%{?disable_subpkg_influxdb}
|
||||
%package influxdb
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Summary: Grafana influxdb datasource
|
||||
|
||||
%description influxdb
|
||||
The Grafana influxdb datasource.
|
||||
%endif
|
||||
|
||||
%if !0%{?disable_subpkg_loki}
|
||||
%package loki
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Summary: Grafana loki datasource
|
||||
|
||||
%description loki
|
||||
The Grafana loki datasource.
|
||||
%endif
|
||||
|
||||
%if !0%{?disable_subpkg_mssql}
|
||||
%package mssql
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Summary: Grafana mssql datasource
|
||||
|
||||
%description mssql
|
||||
The Grafana mssql datasource.
|
||||
%endif
|
||||
|
||||
%if !0%{?disable_subpkg_mysql}
|
||||
%package mysql
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Summary: Grafana mysql datasource
|
||||
|
||||
%description mysql
|
||||
The Grafana mysql datasource.
|
||||
%endif
|
||||
|
||||
%if !0%{?disable_subpkg_opentsdb}
|
||||
%package opentsdb
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Summary: Grafana opentsdb datasource
|
||||
|
||||
%description opentsdb
|
||||
The Grafana opentsdb datasource.
|
||||
%endif
|
||||
|
||||
%if !0%{?disable_subpkg_postgres}
|
||||
%package postgres
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Summary: Grafana postgres datasource
|
||||
|
||||
%description postgres
|
||||
The Grafana postgres datasource.
|
||||
%endif
|
||||
|
||||
%if !0%{?disable_subpkg_prometheus}
|
||||
%package prometheus
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Summary: Grafana prometheus datasource
|
||||
|
||||
%description prometheus
|
||||
The Grafana prometheus datasource.
|
||||
%endif
|
||||
|
||||
%if !0%{?disable_subpkg_stackdriver}
|
||||
%package stackdriver
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Summary: Grafana stackdriver datasource
|
||||
|
||||
%description stackdriver
|
||||
The Grafana stackdriver datasource.
|
||||
%endif
|
||||
|
||||
|
||||
%prep
|
||||
@ -532,8 +593,9 @@ go test ./pkg/...
|
||||
|
||||
# built-in datasources that are sub-packaged
|
||||
%global dsdir %{_datadir}/%{name}/public/app/plugins/datasource
|
||||
%exclude %{dsdir}/cloudwatch
|
||||
%exclude %{dsdir}/elasticsearch
|
||||
|
||||
%exclude %{dsdir}/cloudwatch
|
||||
%exclude %{dsdir}/elasticsearch
|
||||
%exclude %{dsdir}/graphite
|
||||
%exclude %{dsdir}/grafana-azure-monitor-datasource
|
||||
%exclude %{dsdir}/influxdb
|
||||
@ -566,46 +628,70 @@ go test ./pkg/...
|
||||
#
|
||||
# datasources split out into subpackages
|
||||
#
|
||||
%if !0%{?disable_subpkg_cloudwatch}
|
||||
%files cloudwatch
|
||||
%{_datadir}/%{name}/public/app/plugins/datasource/cloudwatch
|
||||
%endif
|
||||
|
||||
%if !0%{?disable_subpkg_elasticsearch}
|
||||
%files elasticsearch
|
||||
%{_datadir}/%{name}/public/app/plugins/datasource/elasticsearch
|
||||
%endif
|
||||
|
||||
%if !0%{?disable_subpkg_azure_monitor}
|
||||
%files azure-monitor
|
||||
%{_datadir}/%{name}/public/app/plugins/datasource/grafana-azure-monitor-datasource
|
||||
%endif
|
||||
|
||||
%if !0%{?disable_subpkg_graphite}
|
||||
%files graphite
|
||||
%{_datadir}/%{name}/public/app/plugins/datasource/graphite
|
||||
%endif
|
||||
|
||||
%if !0%{?disable_subpkg_influxdb}
|
||||
%files influxdb
|
||||
%{_datadir}/%{name}/public/app/plugins/datasource/influxdb
|
||||
%endif
|
||||
|
||||
%if !0%{?disable_subpkg_loki}
|
||||
%files loki
|
||||
%{_datadir}/%{name}/public/app/plugins/datasource/loki
|
||||
%endif
|
||||
|
||||
%if !0%{?disable_subpkg_mssql}
|
||||
%files mssql
|
||||
%{_datadir}/%{name}/public/app/plugins/datasource/mssql
|
||||
%endif
|
||||
|
||||
%if !0%{?disable_subpkg_mysql}
|
||||
%files mysql
|
||||
%{_datadir}/%{name}/public/app/plugins/datasource/mysql
|
||||
%endif
|
||||
|
||||
%if !0%{?disable_subpkg_opentsdb}
|
||||
%files opentsdb
|
||||
%{_datadir}/%{name}/public/app/plugins/datasource/opentsdb
|
||||
%endif
|
||||
|
||||
%if !0%{?disable_subpkg_postgres}
|
||||
%files postgres
|
||||
%{_datadir}/%{name}/public/app/plugins/datasource/postgres
|
||||
%endif
|
||||
|
||||
%if !0%{?disable_subpkg_prometheus}
|
||||
%files prometheus
|
||||
%{_datadir}/%{name}/public/app/plugins/datasource/prometheus
|
||||
%endif
|
||||
|
||||
%if !0%{?disable_subpkg_stackdriver}
|
||||
%files stackdriver
|
||||
%{_datadir}/%{name}/public/app/plugins/datasource/stackdriver
|
||||
%endif
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Jun 14 2019 Mark Goodwin <mgoodwin@redhat.com> 6.2.2-2
|
||||
- rebuild
|
||||
* Mon Jun 17 2019 Mark Goodwin <mgoodwin@redhat.com> 6.2.2-3
|
||||
- disable some subpackages on some platforms
|
||||
|
||||
* Fri Jun 07 2019 Mark Goodwin <mgoodwin@redhat.com> 6.2.2-1
|
||||
- split out some datasource plugins to sub-packages
|
||||
|
Loading…
Reference in New Issue
Block a user