Compare commits

...

No commits in common. "c8" and "c8s" have entirely different histories.
c8 ... c8s

15 changed files with 119 additions and 6 deletions

1
.fmf/version Normal file
View File

@ -0,0 +1 @@
1

14
.gitignore vendored
View File

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

View File

@ -1,3 +0,0 @@
3b2c6875861e93eade0ab4321a49dfd6c692ca7a SOURCES/grafana-pcp-5.1.1.tar.gz
0da8deb75d3eefa38949925375c8097671174586 SOURCES/grafana-pcp-vendor-5.1.1-8.tar.xz
f09017e8136fae1182ec8df6c76d2bac92733869 SOURCES/grafana-pcp-webpack-5.1.1-8.tar.gz

74
Makefile Normal file
View File

@ -0,0 +1,74 @@
VERSION := $(shell rpm --specfile *.spec --qf '%{VERSION}\n' | head -1)
RELEASE := $(shell rpm --specfile *.spec --qf '%{RELEASE}\n' | head -1 | cut -d. -f1)
NAME := grafana-pcp
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
# patches which must be applied before creating the vendor tarball, for example:
# - changes in dependency versions
# - changes in Go module imports (which affect the vendored Go modules)
PATCHES_PRE_VENDOR := \
001-remove-unused-frontend-crypto.patch
# patches which must be applied before creating the webpack, for example:
# - changes in Node.js sources or vendored dependencies
PATCHES_PRE_WEBPACK := \
001-remove-unused-frontend-crypto.patch
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
cd $(SOURCE_DIR) && go mod vendor -v
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
# Node.js
cd $(SOURCE_DIR) && yarn install --pure-lockfile
# Remove files with licensing issues
find $(SOURCE_DIR) -type d -name 'node-notifier' -prune -exec rm -r {} \;
find $(SOURCE_DIR) -type f -name '*.exe' -delete
# Remove not required packages
rm -r $(SOURCE_DIR)/node_modules/puppeteer
./list_bundled_nodejs_packages.py $(SOURCE_DIR) >> $@.manifest
# Jsonnet
cd $(SOURCE_DIR) && jb --jsonnetpkg-home=vendor_jsonnet install
# Create tarball
XZ_OPT=-9 time -p tar cJf $@ \
$(SOURCE_DIR)/vendor \
$(SOURCE_DIR)/node_modules \
$(SOURCE_DIR)/vendor_jsonnet
$(WEBPACK_TAR): $(VENDOR_TAR)
# 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
tar cfz $@ $(SOURCE_DIR)/dist
clean:
rm -rf *.tar.gz *.tar.xz *.manifest *.rpm $(NAME)-*/

18
ci.fmf Normal file
View File

@ -0,0 +1,18 @@
---
resultsdb-testcase: separate
/gating/public:
plan:
import:
name: /plans/gating
url: https://gitlab.com/redhat/centos-stream/tests/grafana-pcp.git
/gating/private:
enabled: false
adjust:
- when: distro == rhel
enabled: true
plan:
import:
name: /plans/gating
url: https://gitlab.cee.redhat.com/toolchain-qe/tests/grafana-pcp.git

6
gating.yaml Normal file
View File

@ -0,0 +1,6 @@
--- !Policy
product_versions:
- rhel-*
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build./ci/gating.functional}

6
grafana-pcp.rpmlintrc Normal file
View File

@ -0,0 +1,6 @@
addFilter("W: invalid-url Source1: grafana-pcp-vendor-")
addFilter("W: invalid-url Source2: grafana-pcp-webpack-")
addFilter("W: files-duplicate /usr/share/performancecopilot-pcp-app/module.js.LICENSE.txt")
addFilter("W: files-duplicate /usr/share/performancecopilot-pcp-app/.*/pcp-logo.svg")
addFilter("W: obsolete-not-provided pcp-web")

3
sources Normal file
View File

@ -0,0 +1,3 @@
SHA512 (grafana-pcp-5.1.1.tar.gz) = 697dfbe1e5cd5d66080197dab2798af0965747a4460d15e62c3497f64674bcc77fc776ac5c95cb7043dcf534e8e0eae47afd7500a5851a0d35ad1062e8d4ac2e
SHA512 (grafana-pcp-webpack-5.1.1-8.tar.gz) = 77e9e6f306425983808f414662cbb2db9077e7c9fcca36a33033e56b527b339d40415df54fb63465ddd701861f89da19b7f1524eb5aa05c1425f3870e017d467
SHA512 (grafana-pcp-vendor-5.1.1-8.tar.xz) = 239eab5405d42769c8f77f408de06588c299ee0df7ea22c5509a32274380670dad560279cff27ebf2b1814bf293dda27c772989b3f6a0777c591397a07583f04