From bca6f39525c8b38e5ff151b4c56fab54cf4a115a Mon Sep 17 00:00:00 2001 From: Andreas Gerstmayr Date: Wed, 23 Dec 2020 14:48:21 +0100 Subject: [PATCH] update to upstream 3.0.1 --- 001-fix-test-on-32bit.patch | 13 ----------- README.md | 2 +- grafana-pcp.spec | 44 ++++++++++++++++++++++--------------- sources | 6 ++--- 4 files changed, 30 insertions(+), 35 deletions(-) delete mode 100644 001-fix-test-on-32bit.patch diff --git a/001-fix-test-on-32bit.patch b/001-fix-test-on-32bit.patch deleted file mode 100644 index 57ef9dd..0000000 --- a/001-fix-test-on-32bit.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/pkg/datasources/redis/datasource_test.go b/pkg/datasources/redis/datasource_test.go -index d677825..1ff9fd7 100644 ---- a/pkg/datasources/redis/datasource_test.go -+++ b/pkg/datasources/redis/datasource_test.go -@@ -107,7 +107,7 @@ func TestDatasource(t *testing.T) { - So(response.Responses["A"].Frames, ShouldHaveLength, 1) - So(response.Responses["A"].Frames[0].Fields, ShouldHaveLength, 3) - So(response.Responses["A"].Frames[0].Fields[0].Len(), ShouldEqual, 1) // it's a counter metric with two values -- So(response.Responses["A"].Frames[0].Fields[0].At(0).(time.Time).UnixNano(), ShouldEqual, 1599320692309872128) -+ So(response.Responses["A"].Frames[0].Fields[0].At(0).(time.Time).UnixNano(), ShouldEqual, int64(1599320692309872128)) - So(response.Responses["A"].Frames[0].Fields[1].Name, ShouldEqual, "disk.dev.read[nvme0n1]") - So(*response.Responses["A"].Frames[0].Fields[1].At(0).(*float64), ShouldEqual, 200) - So(response.Responses["A"].Frames[0].Fields[2].Name, ShouldEqual, "disk.dev.read[sda]") diff --git a/README.md b/README.md index 3e2a33b..3c78cea 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ The grafana-pcp package * run local build: `rpkg local` * run rpm linter: `rpkg lint -r grafana-pcp.rpmlintrc` * run a scratch build: `fedpkg scratch-build --srpm` -* upload new source tarballs: `fedpkg new-sources *.tar.gz` +* upload new source tarballs: `fedpkg new-sources *.tar.gz *.tar.xz` ## Backporting * create the patch diff --git a/grafana-pcp.spec b/grafana-pcp.spec index f565977..67a89a6 100644 --- a/grafana-pcp.spec +++ b/grafana-pcp.spec @@ -8,12 +8,21 @@ end end} -# Specify if the frontend and dashboards will be compiled as part of the build or -# are attached as a webpack tarball (in case of an unsuitable nodejs or jsonnet version on the build system) +# 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 and dashboards will be compiled as part of the build or are attached +# as a webpack tarball (in case of an unsuitable nodejs or jsonnet version on the build system) %define compile_frontend 0 Name: grafana-pcp -Version: 3.0.0 +Version: 3.0.1 Release: 1%{?dist} Summary: Performance Co-Pilot Grafana Plugin License: ASL 2.0 @@ -28,13 +37,11 @@ Source2: grafana-pcp-webpack-%{version}.tar.gz Source3: Makefile Source4: list_bundled_nodejs_packages.py -Patch1: 001-fix-test-on-32bit.patch - # Intersection of go_arches and nodejs_arches ExclusiveArch: %{grafanapcp_arches} BuildRequires: systemd-rpm-macros, golang, go-srpm-macros -%if 0%{?fedora} +%if 0%{?fedora} >= 31 BuildRequires: go-rpm-macros %endif %if %{compile_frontend} @@ -47,7 +54,7 @@ BuildRequires: nodejs >= 1:12, nodejs < 1:13, yarnpkg, golang-github-google-jso %global install_dir %{_sharedstatedir}/grafana/plugins/performancecopilot-pcp-app -Requires: grafana >= 7.3.3 +Requires: grafana >= 7.3.6 Suggests: pcp >= 5.2.2 Suggests: redis >= 5.0.0 Suggests: bpftrace >= 0.9.2 @@ -66,21 +73,21 @@ Obsoletes: pcp-webapp-vector <= 4.3.4 Provides: bundled(golang(github.com/grafana/grafana-plugin-sdk-go)) = 0.79.0 Provides: bundled(golang(github.com/smartystreets/goconvey)) = 1.6.4 Provides: bundled(npm(@babel/plugin-transform-modules-commonjs)) = 7.12.1 -Provides: bundled(npm(@grafana/data)) = 7.3.3 -Provides: bundled(npm(@grafana/runtime)) = 7.3.3 -Provides: bundled(npm(@grafana/toolkit)) = 7.3.3 -Provides: bundled(npm(@grafana/ui)) = 7.3.3 +Provides: bundled(npm(@grafana/data)) = 7.3.6 +Provides: bundled(npm(@grafana/runtime)) = 7.3.6 +Provides: bundled(npm(@grafana/toolkit)) = 7.3.6 +Provides: bundled(npm(@grafana/ui)) = 7.3.6 Provides: bundled(npm(@types/blueimp-md5)) = 2.7.0 Provides: bundled(npm(@types/d3-selection)) = 1.4.3 Provides: bundled(npm(@types/enzyme)) = 3.10.5 Provides: bundled(npm(@types/enzyme-adapter-react-16)) = 1.0.6 Provides: bundled(npm(@types/expect-puppeteer)) = 3.3.1 Provides: bundled(npm(@types/jest)) = 24.0.13 -Provides: bundled(npm(@types/jest-environment-puppeteer)) = 4.4.0 +Provides: bundled(npm(@types/jest-environment-puppeteer)) = 4.4.1 Provides: bundled(npm(@types/lodash)) = 4.14.165 Provides: bundled(npm(@types/memoize-one)) = 5.1.2 Provides: bundled(npm(@types/react-autosuggest)) = 9.3.14 -Provides: bundled(npm(@types/react-redux)) = 7.1.11 +Provides: bundled(npm(@types/react-redux)) = 7.1.12 Provides: bundled(npm(@types/redux)) = 3.6.0 Provides: bundled(npm(@types/redux-persist)) = 4.3.1 Provides: bundled(npm(@types/redux-persist-transform-filter)) = 0.0.4 @@ -97,15 +104,15 @@ Provides: bundled(npm(jest)) = 25.5.4 Provides: bundled(npm(jest-date-mock)) = 1.0.8 Provides: bundled(npm(jest-puppeteer)) = 4.4.0 Provides: bundled(npm(lodash)) = 4.17.19 -Provides: bundled(npm(loglevel)) = 1.7.0 +Provides: bundled(npm(loglevel)) = 1.7.1 Provides: bundled(npm(loglevel-plugin-prefix)) = 0.8.4 Provides: bundled(npm(memoize-one)) = 4.1.0 Provides: bundled(npm(monaco-editor)) = 0.20.0 -Provides: bundled(npm(monaco-editor-webpack-plugin)) = 2.0.0 +Provides: bundled(npm(monaco-editor-webpack-plugin)) = 1.9.0 Provides: bundled(npm(prettier)) = 1.19.1 Provides: bundled(npm(prettier-plugin-organize-imports)) = 1.1.1 Provides: bundled(npm(puppeteer)) = 5.5.0 -Provides: bundled(npm(react-autosuggest)) = 10.0.3 +Provides: bundled(npm(react-autosuggest)) = 10.0.4 Provides: bundled(npm(react-monaco-editor)) = 0.36.0 Provides: bundled(npm(react-redux)) = 7.2.2 Provides: bundled(npm(react-use)) = 15.3.4 @@ -128,8 +135,6 @@ bpftrace scripts from pmdabpftrace(1), as well as several dashboards. %setup -q -T -D -b 2 %endif -%patch1 -p1 - # Set up Go build subdir and links mkdir -p %{_builddir}/src/github.com/performancecopilot ln -s %{_builddir}/%{name}-%{version} \ @@ -185,6 +190,9 @@ export GOPATH=%{_builddir} %changelog +* Wed Dec 23 2020 Andreas Gerstmayr 3.0.1-1 +- update to 3.0.1 tagged upstream community sources, see CHANGELOG + * Thu Nov 26 2020 Andreas Gerstmayr 3.0.0-1 - update to 3.0.0 tagged upstream community sources, see CHANGELOG - bundle golang dependencies and (optionally) node.js dependencies diff --git a/sources b/sources index 604575d..5b5f44f 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ -SHA512 (grafana-pcp-3.0.0.tar.gz) = 759dea2b958ebf3b9b1ce70675ee2cb44c71ea9c8a5548e036f18d3bc1a58438d3e40a331fab4c5f8414e2a797311fa5d4c3cf20b36d6d18e24db7f7b00388ba -SHA512 (grafana-pcp-vendor-3.0.0.tar.xz) = 1773775aa694c5d2136984c7406fd1df9d662dd64d042de2656aee460a84b463ef1dcb71ff1008e9c91478a8b7bdaabb6debaaea5e65770266b28ff85816039a -SHA512 (grafana-pcp-webpack-3.0.0.tar.gz) = d8423ee69532fac14f00f9bcdb4f7261fe54b1e6b397b76ae084502e4dd4b20abfc2420256e96032f1f85feda557c46fc191deeeaa88fc1fc0b97de0c9ba0c87 +SHA512 (grafana-pcp-3.0.1.tar.gz) = 0dbad3692358cfa2138836b2354aeb9737aa0974125b2fb022d6445ea270bd55f914f70825ab8c25259c6a14180c575dc37e7929f05d7f7ae5f83bab65bd4dca +SHA512 (grafana-pcp-webpack-3.0.1.tar.gz) = bc49972d07201877027aa429a80f4f8d938e8b59afb6d36f401c1ea44a117d77ba01ebb7f74028da5a21cf95b53908a80b12856f163d5a4704fc98047b8b0a65 +SHA512 (grafana-pcp-vendor-3.0.1.tar.xz) = 3e1c7bb256c413d66e6d18d4a418b5a07e5c825e07e83c1308c475278dcf70a6e9246f55bc46cb658c45dd049333a02481777ae6032e6dac70b7f051ab4a6220