import grafana-pcp-3.2.0-1.el8

This commit is contained in:
CentOS Sources 2022-03-29 08:20:41 -04:00 committed by Stepan Oksanichenko
parent caadf24ef0
commit 59e6dbc785
6 changed files with 97 additions and 54 deletions

6
.gitignore vendored
View File

@ -1,3 +1,3 @@
SOURCES/grafana-pcp-3.1.0.tar.gz SOURCES/grafana-pcp-3.2.0.tar.gz
SOURCES/grafana-pcp-vendor-3.1.0.tar.xz SOURCES/grafana-pcp-vendor-3.2.0-1.tar.xz
SOURCES/grafana-pcp-webpack-3.1.0.tar.gz SOURCES/grafana-pcp-webpack-3.2.0-1.tar.gz

View File

@ -1,3 +1,3 @@
117b12d50ac2c5993181e701d0f97d35be3fdc1b SOURCES/grafana-pcp-3.1.0.tar.gz 7819dc1ba2fce0cc82ee4a3fb6729c3e527def16 SOURCES/grafana-pcp-3.2.0.tar.gz
2c5ba04caa23028900b45a2beba3ad38c5c7b0fe SOURCES/grafana-pcp-vendor-3.1.0.tar.xz 10dac7852a8a4ba901344a4467c2ad60079cbff6 SOURCES/grafana-pcp-vendor-3.2.0-1.tar.xz
47e29693f27e125053cf84661d8affdeb566951a SOURCES/grafana-pcp-webpack-3.1.0.tar.gz 977e3be2161e3b288c6be1932bf8d1c5c01fff14 SOURCES/grafana-pcp-webpack-3.2.0-1.tar.gz

View File

@ -1,5 +1,5 @@
diff --git a/package.json b/package.json diff --git a/package.json b/package.json
index 2a3544b..07a785e 100644 index 698043c..d9f0f44 100644
--- a/package.json --- a/package.json
+++ b/package.json +++ b/package.json
@@ -70,6 +70,8 @@ @@ -70,6 +70,8 @@
@ -12,10 +12,10 @@ index 2a3544b..07a785e 100644
"rxjs": "6.6.3" "rxjs": "6.6.3"
}, },
diff --git a/webpack.config.js b/webpack.config.js diff --git a/webpack.config.js b/webpack.config.js
index f762003..53fcb06 100644 index ae72fd8..529d6bf 100644
--- a/webpack.config.js --- a/webpack.config.js
+++ b/webpack.config.js +++ b/webpack.config.js
@@ -82,6 +82,10 @@ module.exports.getWebpackConfig = (config, options) => { @@ -89,6 +89,10 @@ module.exports.getWebpackConfig = (config, options) => {
...config.module, ...config.module,
rules: removeDataTestAttributeInProduction(options.production, excludeExtractionLoaderForMonaco(config.module.rules)), rules: removeDataTestAttributeInProduction(options.production, excludeExtractionLoaderForMonaco(config.module.rules)),
}, },

View File

@ -1,48 +1,74 @@
all: grafana-pcp-$(VER).tar.gz \ VERSION := $(shell rpm --specfile *.spec --qf '%{VERSION}\n' | head -1)
grafana-pcp-vendor-$(VER).tar.xz \ RELEASE := $(shell rpm --specfile *.spec --qf '%{RELEASE}\n' | head -1 | cut -d. -f1)
grafana-pcp-webpack-$(VER).tar.gz
grafana-pcp-$(VER).tar.gz: NAME := grafana-pcp
wget https://github.com/performancecopilot/grafana-pcp/archive/v$(VER)/grafana-pcp-$(VER).tar.gz RPM_NAME := $(NAME)
SOURCE_DIR := $(NAME)-$(VERSION)
SOURCE_TAR := $(NAME)-$(VERSION).tar.gz
VENDOR_TAR := $(RPM_NAME)-vendor-$(VERSION)-$(RELEASE).tar.xz
WEBPACK_TAR := $(RPM_NAME)-webpack-$(VERSION)-$(RELEASE).tar.gz
ALL_PATCHES := $(wildcard *.patch) # patches which must be applied before creating the vendor tarball, for example:
PATCHES_TO_APPLY := $(ALL_PATCHES) # - changes in dependency versions
# - changes in Go module imports (which affect the vendored Go modules)
PATCHES_PRE_VENDOR := \
001-remove-unused-frontend-crypto.patch
grafana-pcp-vendor-$(VER).tar.xz: grafana-pcp-$(VER).tar.gz # patches which must be applied before creating the webpack, for example:
rm -rf grafana-pcp-$(VER) # - changes in Node.js sources or vendored dependencies
tar xfz grafana-pcp-$(VER).tar.gz PATCHES_PRE_WEBPACK := \
001-remove-unused-frontend-crypto.patch
# patches can affect Go or Node.js dependencies, or the webpack
for patch in $(PATCHES_TO_APPLY); do patch -d grafana-pcp-$(VER) -p1 --fuzz=0 < $$patch; done all: $(SOURCE_TAR) $(VENDOR_TAR) $(WEBPACK_TAR)
$(SOURCE_TAR):
spectool -g $(RPM_NAME).spec
$(VENDOR_TAR): $(SOURCE_TAR)
# start with a clean state
rm -rf $(SOURCE_DIR)
tar xf $(SOURCE_TAR)
# Patches to apply before vendoring
for patch in $(PATCHES_PRE_VENDOR); do echo applying $$patch ...; patch -d $(SOURCE_DIR) -p1 --fuzz=0 < $$patch; done
# Go # Go
cd grafana-pcp-$(VER) && go mod vendor -v cd $(SOURCE_DIR) && go mod vendor -v
awk '$$2~/^v/ && $$4 != "indirect" {print "Provides: bundled(golang(" $$1 ")) = " substr($$2, 2)}' grafana-pcp-$(VER)/go.mod | \ awk '$$2~/^v/ && $$4 != "indirect" {print "Provides: bundled(golang(" $$1 ")) = " substr($$2, 2)}' $(SOURCE_DIR)/go.mod | \
sed -E 's/=(.*)-(.*)-(.*)/=\1-\2.\3/g' > $@.manifest sed -E 's/=(.*)-(.*)-(.*)/=\1-\2.\3/g' > $@.manifest
# Node.js # Node.js
cd grafana-pcp-$(VER) && yarn install --pure-lockfile cd $(SOURCE_DIR) && yarn install --pure-lockfile
# Remove files with licensing issues # Remove files with licensing issues
find grafana-pcp-$(VER) -type d -name 'node-notifier' -prune -exec rm -r {} \; find $(SOURCE_DIR) -type d -name 'node-notifier' -prune -exec rm -r {} \;
find grafana-pcp-$(VER) -type f -name '*.exe' -delete find $(SOURCE_DIR) -type f -name '*.exe' -delete
# Remove not required packages # Remove not required packages
rm -r grafana-pcp-$(VER)/node_modules/puppeteer rm -r $(SOURCE_DIR)/node_modules/puppeteer
./list_bundled_nodejs_packages.py grafana-pcp-$(VER)/ >> $@.manifest ./list_bundled_nodejs_packages.py $(SOURCE_DIR) >> $@.manifest
# Jsonnet # Jsonnet
cd grafana-pcp-$(VER) && jb --jsonnetpkg-home=vendor_jsonnet install cd $(SOURCE_DIR) && jb --jsonnetpkg-home=vendor_jsonnet install
# Create tarball # Create tarball
XZ_OPT=-9 tar cfJ $@ \ XZ_OPT=-9 time -p tar cJf $@ \
grafana-pcp-$(VER)/vendor \ $(SOURCE_DIR)/vendor \
grafana-pcp-$(VER)/node_modules \ $(SOURCE_DIR)/node_modules \
grafana-pcp-$(VER)/vendor_jsonnet $(SOURCE_DIR)/vendor_jsonnet
grafana-pcp-webpack-$(VER).tar.gz: grafana-pcp-$(VER).tar.gz $(WEBPACK_TAR): $(VENDOR_TAR)
cd grafana-pcp-$(VER) && \ # start with a clean state
rm -rf $(SOURCE_DIR)
tar xf $(SOURCE_TAR)
tar xf $(VENDOR_TAR)
# Patches to apply before creating the webpack
for patch in $(PATCHES_PRE_WEBPACK); do echo applying $$patch ...; patch -d $(SOURCE_DIR) -p1 --fuzz=0 < $$patch; done
cd $(SOURCE_DIR) && \
../build_frontend.sh ../build_frontend.sh
tar cfz $@ grafana-pcp-$(VER)/dist tar cfz $@ $(SOURCE_DIR)/dist
clean: clean:
rm -rf *.tar.gz *.tar.xz *.manifest *.rpm grafana-pcp-*/ rm -rf *.tar.gz *.tar.xz *.manifest *.rpm $(NAME)-*/

View File

@ -4,7 +4,7 @@
yarn run build yarn run build
# Build the dashboards # Build the dashboards
make dist-dashboards make build-dashboards
# Fix permissions (webpack sometimes outputs files with mode = 666 due to reasons unknown (race condition/umask issue afaics)) # Fix permissions (webpack sometimes outputs files with mode = 666 due to reasons unknown (race condition/umask issue afaics))
chmod -R g-w,o-w dist chmod -R g-w,o-w dist

View File

@ -1,3 +1,13 @@
# gobuild and gotest macros are not available on CentOS Stream
# remove once BZ 1965292 is resolved
# 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
%global grafanapcp_arches %{lua: go_arches = {} %global grafanapcp_arches %{lua: go_arches = {}
for arch in rpm.expand("%{go_arches}"):gmatch("%S+") do for arch in rpm.expand("%{go_arches}"):gmatch("%S+") do
go_arches[arch] = 1 go_arches[arch] = 1
@ -13,17 +23,21 @@ end}
%define compile_frontend 0 %define compile_frontend 0
Name: grafana-pcp Name: grafana-pcp
Version: 3.1.0 Version: 3.2.0
Release: 1%{?dist} Release: 1%{?dist}
Summary: Performance Co-Pilot Grafana Plugin Summary: Performance Co-Pilot Grafana Plugin
License: ASL 2.0 License: ASL 2.0
URL: https://github.com/performancecopilot/grafana-pcp URL: https://github.com/performancecopilot/grafana-pcp
Source0: https://github.com/performancecopilot/grafana-pcp/archive/v%{version}/%{name}-%{version}.tar.gz Source0: https://github.com/performancecopilot/grafana-pcp/archive/v%{version}/%{name}-%{version}.tar.gz
Source1: grafana-pcp-vendor-%{version}.tar.xz Source1: grafana-pcp-vendor-%{version}-1.tar.xz
# Note: In case there were no changes to this tarball, the NVR of this tarball
# lags behind the NVR of this package.
%if %{compile_frontend} == 0 %if %{compile_frontend} == 0
# Source2 contains the precompiled frontend and dashboards # Source2 contains the precompiled frontend and dashboards
Source2: grafana-pcp-webpack-%{version}.tar.gz # Note: In case there were no changes to this tarball, the NVR of this tarball
# lags behind the NVR of this package.
Source2: grafana-pcp-webpack-%{version}-1.tar.gz
%endif %endif
Source3: Makefile Source3: Makefile
Source4: build_frontend.sh Source4: build_frontend.sh
@ -65,13 +79,13 @@ Obsoletes: pcp-webapp-vector <= 4.3.4
# this is for security purposes, if nodejs-foo ever needs an update, # this is for security purposes, if nodejs-foo ever needs an update,
# affected packages can be easily identified. # affected packages can be easily identified.
# Note: generated by the Makefile (see README.md) # Note: generated by the Makefile (see README.md)
Provides: bundled(golang(github.com/grafana/grafana-plugin-sdk-go)) = 0.105.0 Provides: bundled(golang(github.com/grafana/grafana-plugin-sdk-go)) = 0.115.0
Provides: bundled(golang(github.com/stretchr/testify)) = 1.7.0 Provides: bundled(golang(github.com/stretchr/testify)) = 1.7.0
Provides: bundled(npm(@babel/plugin-transform-modules-commonjs)) = 7.14.5 Provides: bundled(npm(@babel/plugin-transform-modules-commonjs)) = 7.16.0
Provides: bundled(npm(@grafana/data)) = 7.5.9 Provides: bundled(npm(@grafana/data)) = 7.5.11
Provides: bundled(npm(@grafana/runtime)) = 7.5.9 Provides: bundled(npm(@grafana/runtime)) = 7.5.11
Provides: bundled(npm(@grafana/toolkit)) = 7.5.9 Provides: bundled(npm(@grafana/toolkit)) = 7.5.11
Provides: bundled(npm(@grafana/ui)) = 7.5.9 Provides: bundled(npm(@grafana/ui)) = 7.5.11
Provides: bundled(npm(@testing-library/jest-dom)) = 5.4.0 Provides: bundled(npm(@testing-library/jest-dom)) = 5.4.0
Provides: bundled(npm(@testing-library/react)) = 10.4.9 Provides: bundled(npm(@testing-library/react)) = 10.4.9
Provides: bundled(npm(@types/blueimp-md5)) = 2.18.0 Provides: bundled(npm(@types/blueimp-md5)) = 2.18.0
@ -81,15 +95,15 @@ Provides: bundled(npm(@types/enzyme-adapter-react-16)) = 1.0.6
Provides: bundled(npm(@types/expect-puppeteer)) = 3.3.1 Provides: bundled(npm(@types/expect-puppeteer)) = 3.3.1
Provides: bundled(npm(@types/jest)) = 26.0.15 Provides: bundled(npm(@types/jest)) = 26.0.15
Provides: bundled(npm(@types/jest-environment-puppeteer)) = 4.4.1 Provides: bundled(npm(@types/jest-environment-puppeteer)) = 4.4.1
Provides: bundled(npm(@types/lodash)) = 4.14.170 Provides: bundled(npm(@types/lodash)) = 4.14.176
Provides: bundled(npm(@types/memoize-one)) = 5.1.2 Provides: bundled(npm(@types/memoize-one)) = 5.1.2
Provides: bundled(npm(@types/react-autosuggest)) = 9.3.14 Provides: bundled(npm(@types/react-autosuggest)) = 9.3.14
Provides: bundled(npm(@types/react-redux)) = 7.1.16 Provides: bundled(npm(@types/react-redux)) = 7.1.20
Provides: bundled(npm(@types/redux)) = 3.6.0 Provides: bundled(npm(@types/redux)) = 3.6.0
Provides: bundled(npm(@types/redux-persist)) = 4.3.1 Provides: bundled(npm(@types/redux-persist)) = 4.3.1
Provides: bundled(npm(@types/redux-persist-transform-filter)) = 0.0.4 Provides: bundled(npm(@types/redux-persist-transform-filter)) = 0.0.4
Provides: bundled(npm(babel-plugin-remove-object-properties)) = 1.0.2 Provides: bundled(npm(babel-plugin-remove-object-properties)) = 1.0.2
Provides: bundled(npm(blueimp-md5)) = 2.18.0 Provides: bundled(npm(blueimp-md5)) = 2.19.0
Provides: bundled(npm(core-js)) = 2.6.12 Provides: bundled(npm(core-js)) = 2.6.12
Provides: bundled(npm(d3-flame-graph)) = 3.1.1 Provides: bundled(npm(d3-flame-graph)) = 3.1.1
Provides: bundled(npm(d3-selection)) = 1.4.2 Provides: bundled(npm(d3-selection)) = 1.4.2
@ -105,15 +119,15 @@ Provides: bundled(npm(loglevel-plugin-prefix)) = 0.8.4
Provides: bundled(npm(memoize-one)) = 4.1.0 Provides: bundled(npm(memoize-one)) = 4.1.0
Provides: bundled(npm(monaco-editor)) = 0.20.0 Provides: bundled(npm(monaco-editor)) = 0.20.0
Provides: bundled(npm(monaco-editor-webpack-plugin)) = 1.9.0 Provides: bundled(npm(monaco-editor-webpack-plugin)) = 1.9.0
Provides: bundled(npm(prettier-plugin-organize-imports)) = 2.1.0 Provides: bundled(npm(prettier-plugin-organize-imports)) = 2.3.4
Provides: bundled(npm(puppeteer)) = 10.0.0 Provides: bundled(npm(puppeteer)) = 10.4.0
Provides: bundled(npm(react-autosuggest)) = 10.1.0 Provides: bundled(npm(react-autosuggest)) = 10.1.0
Provides: bundled(npm(react-monaco-editor)) = 0.36.0 Provides: bundled(npm(react-monaco-editor)) = 0.36.0
Provides: bundled(npm(react-redux)) = 7.2.4 Provides: bundled(npm(react-redux)) = 7.2.6
Provides: bundled(npm(react-use)) = 15.3.8 Provides: bundled(npm(react-use)) = 15.3.8
Provides: bundled(npm(redux)) = 3.7.2 Provides: bundled(npm(redux)) = 3.7.2
Provides: bundled(npm(redux-persist)) = 4.10.2 Provides: bundled(npm(redux-persist)) = 4.10.2
Provides: bundled(npm(redux-thunk)) = 2.3.0 Provides: bundled(npm(redux-thunk)) = 2.4.0
Provides: bundled(npm(utility-types)) = 3.10.0 Provides: bundled(npm(utility-types)) = 3.10.0
@ -184,6 +198,9 @@ export GOPATH=%{_builddir}
%changelog %changelog
* Fri Nov 12 2021 Andreas Gerstmayr <agerstmayr@redhat.com> 3.2.0-1
- update to 3.2.0 tagged upstream community sources, see CHANGELOG
* Fri Jun 25 2021 Andreas Gerstmayr <agerstmayr@redhat.com> 3.1.0-1 * Fri Jun 25 2021 Andreas Gerstmayr <agerstmayr@redhat.com> 3.1.0-1
- update to 3.1.0 tagged upstream community sources, see CHANGELOG - update to 3.1.0 tagged upstream community sources, see CHANGELOG
- remove unused cryptographic implementations - remove unused cryptographic implementations