diff --git a/.gitignore b/.gitignore index 806a33e..3a3be94 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ -SOURCES/grafana-7.3.4.tar.gz -SOURCES/grafana-vendor-7.3.4.tar.xz -SOURCES/grafana-webpack-7.3.4.tar.gz +SOURCES/grafana-7.3.6.tar.gz +SOURCES/grafana-vendor-7.3.6.tar.xz +SOURCES/grafana-webpack-7.3.6.tar.gz diff --git a/.grafana.metadata b/.grafana.metadata index c6e0a5d..084a745 100644 --- a/.grafana.metadata +++ b/.grafana.metadata @@ -1,3 +1,3 @@ -486d1a49acfcd10dafc0ccf7d5b436885d8d64c2 SOURCES/grafana-7.3.4.tar.gz -b3c6a5de7528b3e49df94b949987a553161c426d SOURCES/grafana-vendor-7.3.4.tar.xz -d63fed864f09364a331f63cb0634e8cecbe69640 SOURCES/grafana-webpack-7.3.4.tar.gz +6fa572f981e490e06dfdae56256dfbf66a3fb4c9 SOURCES/grafana-7.3.6.tar.gz +c0658ab63a4d23a5914cf1425f0b568e7b764654 SOURCES/grafana-vendor-7.3.6.tar.xz +622c6e58ca6dab9efdf784be45315ee8bc72b229 SOURCES/grafana-webpack-7.3.6.tar.gz diff --git a/SOURCES/002-manpages.patch b/SOURCES/002-manpages.patch index 949b8c1..fa82dc4 100644 --- a/SOURCES/002-manpages.patch +++ b/SOURCES/002-manpages.patch @@ -4,7 +4,7 @@ index 0000000000..7ac2af882c --- /dev/null +++ b/docs/man/man1/grafana-cli.1 @@ -0,0 +1,60 @@ -+.TH GRAFANA "1" "November 2020" "Grafana cli version 7.3.3" "User Commands" ++.TH GRAFANA "1" "December 2020" "Grafana cli version 7.3.6" "User Commands" +.SH NAME +grafana-cli \- command line administration for the Grafana metrics dashboard and graph editor +.SH DESCRIPTION @@ -70,7 +70,7 @@ index 0000000000..c616268b31 --- /dev/null +++ b/docs/man/man1/grafana-server.1 @@ -0,0 +1,84 @@ -+.TH VERSION "1" "November 2020" "Version 7.3.3" "User Commands" ++.TH VERSION "1" "December 2020" "Version 7.3.6" "User Commands" +.SH NAME +grafana-server \- back-end server for the Grafana metrics dashboard and graph editor +.SH DESCRIPTION diff --git a/SOURCES/005-pin-yarn-version.patch b/SOURCES/005-pin-yarn-version.patch new file mode 100644 index 0000000..a7dc34d --- /dev/null +++ b/SOURCES/005-pin-yarn-version.patch @@ -0,0 +1,13 @@ +diff --git a/package.json b/package.json +index ce11ba6de8..a3210762ed 100644 +--- a/package.json ++++ b/package.json +@@ -314,6 +314,7 @@ + "node": ">=12 <13" + }, + "volta": { +- "node": "12.19.0" ++ "node": "12.19.0", ++ "yarn": "1.22.10" + } + } diff --git a/SOURCES/006-remove-saml-dependency.patch b/SOURCES/006-remove-saml-dependency.patch new file mode 100644 index 0000000..d164b33 --- /dev/null +++ b/SOURCES/006-remove-saml-dependency.patch @@ -0,0 +1,39 @@ +diff --git a/go.mod b/go.mod +index bb073996ac..c1b6c3219c 100644 +--- a/go.mod ++++ b/go.mod +@@ -19,7 +19,6 @@ require ( + github.com/benbjohnson/clock v0.0.0-20161215174838-7dc76406b6d3 + github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b + github.com/centrifugal/centrifuge v0.11.0 +- github.com/crewjam/saml v0.4.4-0.20201214083806-0dd2422c212e + github.com/davecgh/go-spew v1.1.1 + github.com/denisenkom/go-mssqldb v0.0.0-20200620013148-b91950f658ec + github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51 // indirect +diff --git a/go.sum b/go.sum +index c79d983b88..f45fa68f41 100644 +--- a/go.sum ++++ b/go.sum +@@ -228,10 +228,6 @@ github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d h1:U+s90UTSY + github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= + github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= + github.com/crewjam/httperr v0.0.0-20190612203328-a946449404da/go.mod h1:+rmNIXRvYMqLQeR4DHyTvs6y0MEMymTz4vyFpFkKTPs= +-github.com/crewjam/saml v0.4.1 h1:ZNSRJvdbypQDY2uApMngeIHNcxS6UCRAgiw3S+pmgRU= +-github.com/crewjam/saml v0.4.1/go.mod h1:vHcshzXm2WkPOV1dcToZa99cCB1h3nPiKLtLYK+erBE= +-github.com/crewjam/saml v0.4.4-0.20201214083806-0dd2422c212e h1:CFIpybPh+vrxRD6R3t2BCV9hdtlOQudsj1vB1ECXOo4= +-github.com/crewjam/saml v0.4.4-0.20201214083806-0dd2422c212e/go.mod h1:qCJQpUtZte9R1ZjUBcW8qtCNlinbO363ooNl02S68bk= + github.com/cupcake/rdb v0.0.0-20161107195141-43ba34106c76/go.mod h1:vYwsqCOLxGiisLwp9rITslkFNpZD5rz43tf41QFkTWY= + github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= + github.com/cznic/b v0.0.0-20180115125044-35e9bbe41f07/go.mod h1:URriBxXwVq5ijiJ12C7iIZqlA69nTlI+LgI6/pwftG8= +diff --git a/pkg/extensions/main.go b/pkg/extensions/main.go +index 337f6566f8..b15c3f907b 100644 +--- a/pkg/extensions/main.go ++++ b/pkg/extensions/main.go +@@ -5,7 +5,6 @@ import ( + // remove the cron (v1) dependency + + _ "github.com/beevik/etree" +- _ "github.com/crewjam/saml" + _ "github.com/gobwas/glob" + "github.com/grafana/grafana/pkg/registry" + "github.com/grafana/grafana/pkg/services/licensing" diff --git a/SPECS/grafana.spec b/SPECS/grafana.spec index 0b24048..852ffcb 100644 --- a/SPECS/grafana.spec +++ b/SPECS/grafana.spec @@ -1,11 +1,3 @@ -%if 0%{?rhel} -# emulate macros defined by the go-rpm-macros package -# https://pagure.io/go-rpm-macros/blob/master/f/rpm/macros.d/macros.go-compilers-golang -%define gobuild(o:) go build -buildmode pie -compiler gc -tags="rpm_crashtraceback ${BUILDTAGS:-}" -ldflags "${LDFLAGS:-}%{?currentgoldflags} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '%__global_ldflags %{?__golang_extldflags}'" -a -v -x %{?**}; -%define gotestextldflags %__global_ldflags %{?__golang_extldflags} -%define gotest() GO111MODULE=off go test -buildmode pie -compiler gc -ldflags "${LDFLAGS:-}%{?currentgoldflags} -extldflags '%{gotestextldflags}'" %{?**}; -%endif - # https://bugzilla.redhat.com/show_bug.cgi?id=1752991 # unfortunately the go_arches macro doesn't reflect that change yet ExcludeArch: i686 @@ -20,12 +12,21 @@ ExcludeArch: i686 end end} +# gobuild and gotest macros are defined in go-rpm-macros, which is not available on RHEL +# definitions lifted from Fedora 34 podman.spec +%if ! 0%{?gobuild:1} +%define gobuild(o:) GO111MODULE=off go build -buildmode pie -compiler gc -tags="rpm_crashtraceback ${BUILDTAGS:-}" -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '-Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld '" -a -v -x %{?**}; +%endif +%if ! 0%{?gotest:1} +%define gotest() GO111MODULE=off go test -buildmode pie -compiler gc -ldflags "${LDFLAGS:-} -extldflags '-Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld '" %{?**}; +%endif + # Specify if the frontend will be compiled as part of the build or # is attached as a webpack tarball (in case of an unsuitable nodejs version on the build system) %define compile_frontend 0 Name: grafana -Version: 7.3.4 +Version: 7.3.6 Release: 1%{?dist} Summary: Metrics dashboard and graph editor License: ASL 2.0 @@ -68,11 +69,14 @@ Patch3: 003-remove-dashboard-abspath-test.patch # therefore loading this memory dump fails on s390x Patch4: 004-skip-x86-goldenfiles-tests.patch +Patch5: 005-pin-yarn-version.patch +Patch6: 006-remove-saml-dependency.patch + # Intersection of go_arches and nodejs_arches ExclusiveArch: %{grafana_arches} BuildRequires: git, systemd, golang, go-srpm-macros -%if 0%{?fedora} +%if 0%{?fedora} >= 31 BuildRequires: go-rpm-macros %endif %if %{compile_frontend} @@ -95,36 +99,36 @@ Requires(pre): shadow-utils Recommends: grafana-pcp %endif -Obsoletes: grafana-cloudwatch < 7.3.4-1 -Obsoletes: grafana-elasticsearch < 7.3.4-1 -Obsoletes: grafana-azure-monitor < 7.3.4-1 -Obsoletes: grafana-graphite < 7.3.4-1 -Obsoletes: grafana-influxdb < 7.3.4-1 -Obsoletes: grafana-loki < 7.3.4-1 -Obsoletes: grafana-mssql < 7.3.4-1 -Obsoletes: grafana-mysql < 7.3.4-1 -Obsoletes: grafana-opentsdb < 7.3.4-1 -Obsoletes: grafana-postgres < 7.3.4-1 -Obsoletes: grafana-prometheus < 7.3.4-1 -Obsoletes: grafana-stackdriver < 7.3.4-1 -Provides: grafana-cloudwatch = 7.3.4-1 -Provides: grafana-elasticsearch = 7.3.4-1 -Provides: grafana-azure-monitor = 7.3.4-1 -Provides: grafana-graphite = 7.3.4-1 -Provides: grafana-influxdb = 7.3.4-1 -Provides: grafana-loki = 7.3.4-1 -Provides: grafana-mssql = 7.3.4-1 -Provides: grafana-mysql = 7.3.4-1 -Provides: grafana-opentsdb = 7.3.4-1 -Provides: grafana-postgres = 7.3.4-1 -Provides: grafana-prometheus = 7.3.4-1 -Provides: grafana-stackdriver = 7.3.4-1 +Obsoletes: grafana-cloudwatch < 7.3.6-1 +Obsoletes: grafana-elasticsearch < 7.3.6-1 +Obsoletes: grafana-azure-monitor < 7.3.6-1 +Obsoletes: grafana-graphite < 7.3.6-1 +Obsoletes: grafana-influxdb < 7.3.6-1 +Obsoletes: grafana-loki < 7.3.6-1 +Obsoletes: grafana-mssql < 7.3.6-1 +Obsoletes: grafana-mysql < 7.3.6-1 +Obsoletes: grafana-opentsdb < 7.3.6-1 +Obsoletes: grafana-postgres < 7.3.6-1 +Obsoletes: grafana-prometheus < 7.3.6-1 +Obsoletes: grafana-stackdriver < 7.3.6-1 +Provides: grafana-cloudwatch = 7.3.6-1 +Provides: grafana-elasticsearch = 7.3.6-1 +Provides: grafana-azure-monitor = 7.3.6-1 +Provides: grafana-graphite = 7.3.6-1 +Provides: grafana-influxdb = 7.3.6-1 +Provides: grafana-loki = 7.3.6-1 +Provides: grafana-mssql = 7.3.6-1 +Provides: grafana-mysql = 7.3.6-1 +Provides: grafana-opentsdb = 7.3.6-1 +Provides: grafana-postgres = 7.3.6-1 +Provides: grafana-prometheus = 7.3.6-1 +Provides: grafana-stackdriver = 7.3.6-1 # vendored golang and node.js build dependencies # this is for security purposes, if nodejs-foo ever needs an update, # affected packages can be easily identified. # Note: generated by the Makefile (see README.md) -Provides: bundled(golang(cloud.google.com/go/storage)) = 1.8.0 +Provides: bundled(golang(cloud.google.com/go/storage)) = 1.10.0 Provides: bundled(golang(github.com/BurntSushi/toml)) = 0.3.1 Provides: bundled(golang(github.com/VividCortex/mysqlerr)) = 0.0.0-20170204212430.6c6b55f8796f Provides: bundled(golang(github.com/aws/aws-sdk-go)) = 1.33.12 @@ -132,7 +136,6 @@ Provides: bundled(golang(github.com/beevik/etree)) = 1.1.0 Provides: bundled(golang(github.com/benbjohnson/clock)) = 0.0.0-20161215174838.7dc76406b6d3 Provides: bundled(golang(github.com/bradfitz/gomemcache)) = 0.0.0-20190913173617.a41fca850d0b Provides: bundled(golang(github.com/centrifugal/centrifuge)) = 0.11.0 -Provides: bundled(golang(github.com/crewjam/saml)) = 0.4.1 Provides: bundled(golang(github.com/davecgh/go-spew)) = 1.1.1 Provides: bundled(golang(github.com/denisenkom/go-mssqldb)) = 0.0.0-20200620013148.b91950f658ec Provides: bundled(golang(github.com/facebookgo/inject)) = 0.0.0-20180706035515.f23751cae28b @@ -144,8 +147,8 @@ Provides: bundled(golang(github.com/go-macaron/session)) = 0.0.0-20190805070824. Provides: bundled(golang(github.com/go-sql-driver/mysql)) = 1.5.0 Provides: bundled(golang(github.com/go-stack/stack)) = 1.8.0 Provides: bundled(golang(github.com/gobwas/glob)) = 0.2.3 -Provides: bundled(golang(github.com/golang/protobuf)) = 1.4.2 -Provides: bundled(golang(github.com/google/go-cmp)) = 0.5.0 +Provides: bundled(golang(github.com/golang/protobuf)) = 1.4.3 +Provides: bundled(golang(github.com/google/go-cmp)) = 0.5.2 Provides: bundled(golang(github.com/gosimple/slug)) = 1.4.2 Provides: bundled(golang(github.com/grafana/grafana-plugin-model)) = 0.0.0-20190930120109.1fc953a61fb4 Provides: bundled(golang(github.com/grafana/grafana-plugin-sdk-go)) = 0.79.0 @@ -166,12 +169,12 @@ Provides: bundled(golang(github.com/mattn/go-sqlite3)) = 1.11.0 Provides: bundled(golang(github.com/opentracing/opentracing-go)) = 1.2.0 Provides: bundled(golang(github.com/patrickmn/go-cache)) = 2.1.0+incompatible Provides: bundled(golang(github.com/pkg/errors)) = 0.9.1 -Provides: bundled(golang(github.com/prometheus/client_golang)) = 1.7.1 +Provides: bundled(golang(github.com/prometheus/client_golang)) = 1.8.0 Provides: bundled(golang(github.com/prometheus/client_model)) = 0.2.0 -Provides: bundled(golang(github.com/prometheus/common)) = 0.10.0 +Provides: bundled(golang(github.com/prometheus/common)) = 0.14.0 Provides: bundled(golang(github.com/robfig/cron)) = 0.0.0-20180505203441.b41be1df6967 Provides: bundled(golang(github.com/robfig/cron/v3)) = 3.0.0 -Provides: bundled(golang(github.com/russellhaering/goxmldsig)) = 0.0.0-20200902171629.2e1fbc2c5593 +Provides: bundled(golang(github.com/russellhaering/goxmldsig)) = 1.1.0 Provides: bundled(golang(github.com/smartystreets/goconvey)) = 1.6.4 Provides: bundled(golang(github.com/stretchr/testify)) = 1.6.1 Provides: bundled(golang(github.com/teris-io/shortid)) = 0.0.0-20171029131806.771a37caa5cf @@ -180,13 +183,15 @@ Provides: bundled(golang(github.com/ua-parser/uap-go)) = 0.0.0-20190826212731.da Provides: bundled(golang(github.com/uber/jaeger-client-go)) = 2.25.0+incompatible Provides: bundled(golang(github.com/unknwon/com)) = 1.0.1 Provides: bundled(golang(github.com/urfave/cli/v2)) = 2.1.1 +Provides: bundled(golang(github.com/weaveworks/common)) = 0.0.0-20201119133501.0619918236ec Provides: bundled(golang(github.com/xorcare/pointer)) = 1.1.0 Provides: bundled(golang(github.com/yudai/gojsondiff)) = 1.0.0 -Provides: bundled(golang(golang.org/x/crypto)) = 0.0.0-20200820211705.5c72a883971a -Provides: bundled(golang(golang.org/x/net)) = 0.0.0-20200813134508.3edf25e44fcc -Provides: bundled(golang(golang.org/x/oauth2)) = 0.0.0-20200107190931.bf48bf16ab8d -Provides: bundled(golang(golang.org/x/sync)) = 0.0.0-20200625203802.6e8e738ad208 -Provides: bundled(golang(google.golang.org/grpc)) = 1.30.0 +Provides: bundled(golang(golang.org/x/crypto)) = 0.0.0-20201208171446.5f87f3452ae9 +Provides: bundled(golang(golang.org/x/net)) = 0.0.0-20201022231255.08b38378de70 +Provides: bundled(golang(golang.org/x/oauth2)) = 0.0.0-20200902213428.5d25da1a8d43 +Provides: bundled(golang(golang.org/x/sync)) = 0.0.0-20201020160332.67f06af15bc9 +Provides: bundled(golang(golang.org/x/time)) = 0.0.0-20200630173020.3af7569d3a1e +Provides: bundled(golang(google.golang.org/grpc)) = 1.33.1 Provides: bundled(golang(gopkg.in/ini.v1)) = 1.51.0 Provides: bundled(golang(gopkg.in/ldap.v3)) = 3.0.2 Provides: bundled(golang(gopkg.in/macaron.v1)) = 1.3.9 @@ -445,6 +450,8 @@ rm -r plugins-bundled %ifarch s390x %patch4 -p1 %endif +%patch5 -p1 +%patch6 -p1 # Set up build subdirs and links mkdir -p %{_builddir}/src/github.com/grafana @@ -620,6 +627,10 @@ export TZ=GMT %changelog +* Mon Dec 21 2020 Andreas Gerstmayr 7.3.6-1 +- update to 7.3.6 tagged upstream community sources, see CHANGELOG +- remove dependency on SAML (not supported in the open source version of Grafana) + * Wed Nov 25 2020 Andreas Gerstmayr 7.3.4-1 - update to 7.3.4 tagged upstream community sources, see CHANGELOG - bundle golang dependencies