diff --git a/.gitignore b/.gitignore index 4cc028c..8d9599f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ SOURCES/grafana-7.5.9.tar.gz -SOURCES/grafana-vendor-7.5.9.tar.xz -SOURCES/grafana-webpack-7.5.9.tar.gz +SOURCES/grafana-vendor-7.5.9-2.tar.xz +SOURCES/grafana-webpack-7.5.9-2.tar.gz diff --git a/.grafana.metadata b/.grafana.metadata index 70fd17d..af2fa86 100644 --- a/.grafana.metadata +++ b/.grafana.metadata @@ -1,3 +1,3 @@ e658bc3706a71a2a77f34755ac362fd506d7b1a0 SOURCES/grafana-7.5.9.tar.gz -a737428ffe125e1335f6b33e302b561e2bfdfcbe SOURCES/grafana-vendor-7.5.9.tar.xz -626ec35895740ff5f58736ca10aa8fc613609ff7 SOURCES/grafana-webpack-7.5.9.tar.gz +8fc46c12ac1bae0f2e0434e8fdf71e61e922c74a SOURCES/grafana-vendor-7.5.9-2.tar.xz +28052475c9cb45ac6523479ab9fd3da4ba678400 SOURCES/grafana-webpack-7.5.9-2.tar.gz diff --git a/SOURCES/Makefile b/SOURCES/Makefile index 6fcdf3c..acd932c 100644 --- a/SOURCES/Makefile +++ b/SOURCES/Makefile @@ -1,14 +1,26 @@ -all: grafana-$(VER).tar.gz \ - grafana-vendor-$(VER).tar.xz \ - grafana-webpack-$(VER).tar.gz - -grafana-$(VER).tar.gz: - wget https://github.com/grafana/grafana/archive/v$(VER)/grafana-$(VER).tar.gz +ifndef VER + $(error VER is undefined) +endif +ifndef REL + $(error REL is undefined) +endif + +NAME := grafana +RPM_NAME := $(NAME) +SOURCE_DIR := $(NAME)-$(VER) +SOURCE_TAR := $(NAME)-$(VER).tar.gz +VENDOR_TAR := $(RPM_NAME)-vendor-$(VER)-$(REL).tar.xz +WEBPACK_TAR := $(RPM_NAME)-webpack-$(VER)-$(REL).tar.gz ALL_PATCHES := $(wildcard *.patch) PATCHES_TO_APPLY := $(filter-out 009-patch-unused-backend-crypto.patch 010-fips.patch,$(ALL_PATCHES)) -grafana-vendor-$(VER).tar.xz: grafana-$(VER).tar.gz +all: $(SOURCE_TAR) $(VENDOR_TAR) $(WEBPACK_TAR) + +$(SOURCE_TAR): + spectool -g $(RPM_NAME).spec + +$(VENDOR_TAR): $(SOURCE_TAR) rm -rf grafana-$(VER) tar xfz grafana-$(VER).tar.gz @@ -31,6 +43,7 @@ grafana-vendor-$(VER).tar.xz: grafana-$(VER).tar.gz cd grafana-$(VER) && yarn install --pure-lockfile # Remove files with licensing issues find grafana-$(VER) -type d -name 'node-notifier' -prune -exec rm -r {} \; + find grafana-$(VER) -type d -name 'property-information' -prune -exec rm -r {} \; find grafana-$(VER) -type f -name '*.exe' -delete rm -r grafana-$(VER)/node_modules/visjs-network/examples ./list_bundled_nodejs_packages.py grafana-$(VER)/ >> $@.manifest @@ -40,11 +53,11 @@ grafana-vendor-$(VER).tar.xz: grafana-$(VER).tar.gz grafana-$(VER)/vendor \ $$(find grafana-$(VER) -type d -name "node_modules" -prune) -grafana-webpack-$(VER).tar.gz: grafana-vendor-$(VER).tar.xz +$(WEBPACK_TAR): $(VENDOR_TAR) cd grafana-$(VER) && \ ../build_frontend.sh tar cfz $@ grafana-$(VER)/public/build grafana-$(VER)/public/views grafana-$(VER)/plugins-bundled clean: - rm -rf *.tar.gz *.tar.xz *.manifest *.rpm grafana-*/ + rm -rf *.tar.gz *.tar.xz *.manifest *.rpm $(NAME)-*/ diff --git a/SPECS/grafana.spec b/SPECS/grafana.spec index d49d048..2ff54f1 100644 --- a/SPECS/grafana.spec +++ b/SPECS/grafana.spec @@ -20,7 +20,7 @@ end} Name: grafana Version: 7.5.9 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Metrics dashboard and graph editor License: ASL 2.0 URL: https://grafana.org @@ -29,11 +29,11 @@ URL: https://grafana.org Source0: https://github.com/grafana/grafana/archive/v%{version}/%{name}-%{version}.tar.gz # Source1 contains the bundled Go and Node.js dependencies -Source1: grafana-vendor-%{version}.tar.xz +Source1: grafana-vendor-%{version}-2.tar.xz %if %{compile_frontend} == 0 # Source2 contains the precompiled frontend -Source2: grafana-webpack-%{version}.tar.gz +Source2: grafana-webpack-%{version}-2.tar.gz %endif # Source3 contains Grafana configuration defaults for distributions @@ -73,11 +73,9 @@ Patch8: 008-remove-unused-frontend-crypto.patch # This patch removes all references to the deleted files. Patch9: 009-patch-unused-backend-crypto.patch -%if %{enable_fips_mode} # This patch modifies the x/crypto/pbkdf2 function to use OpenSSL # if FIPS mode is enabled. Patch10: 010-fips.patch -%endif # Intersection of go_arches and nodejs_arches ExclusiveArch: %{grafana_arches} @@ -655,6 +653,10 @@ GOLANG_FIPS=1 go test -v ./pkg/util -run TestEncryption %changelog +* Thu Jul 08 2021 Andreas Gerstmayr 7.5.9-2 +- remove unused dependency property-information +- always include FIPS patch in SRPM + * Fri Jun 25 2021 Andreas Gerstmayr 7.5.9-1 - update to 7.5.9 tagged upstream community sources, see CHANGELOG