Metrics dashboard and graph editor
Go to file
Andreas Gerstmayr f922bfd4ed update to upstream Grafana 8.5.6 2022-06-29 12:17:46 +02:00
.fmf Initial set of gating tests for grafana on Fedora 2021-02-03 19:58:40 +01:00
.github/workflows use clamp-mtime when generating the vendor and webpack tarballs 2022-04-11 18:00:46 +02:00
plans Initial set of gating tests for grafana on Fedora 2021-02-03 19:58:40 +01:00
tests Implementation of verify-systemd-units test case 2022-03-07 09:14:29 +01:00
.gitignore update to upstream version 7.5.10 2021-09-30 17:08:41 +02:00
0001-update-grafana-cli-script-with-distro-specific-paths.patch update to upstream Grafana 8.5.6 2022-06-29 12:17:46 +02:00
0002-add-manpages.patch update to upstream Grafana 8.5.6 2022-06-29 12:17:46 +02:00
0003-update-default-configuration.patch update to upstream Grafana 8.5.6 2022-06-29 12:17:46 +02:00
0004-skip-goldenfiles-tests.patch update to upstream Grafana 8.5.6 2022-06-29 12:17:46 +02:00
0005-remove-unused-backend-dependencies.patch update to upstream Grafana 8.5.6 2022-06-29 12:17:46 +02:00
0006-remove-unused-frontend-crypto.patch update to upstream Grafana 8.5.6 2022-06-29 12:17:46 +02:00
0007-patch-removed-backend-crypto.patch update to upstream Grafana 8.5.6 2022-06-29 12:17:46 +02:00
0008-FIPS.patch update to upstream Grafana 8.5.6 2022-06-29 12:17:46 +02:00
0009-notifications-use-HMAC-SHA256-to-generate-password-r.patch update to upstream Grafana 8.5.6 2022-06-29 12:17:46 +02:00
0010-disable-husky-git-hook.patch update to upstream Grafana 8.5.6 2022-06-29 12:17:46 +02:00
0011-skip-marketplace-plugin-install-test.patch update to upstream Grafana 8.5.6 2022-06-29 12:17:46 +02:00
0012-Prometheus-Fix-integer-overflow-in-rate-interval-cal.patch update to upstream Grafana 8.5.6 2022-06-29 12:17:46 +02:00
Makefile update to upstream Grafana 8.5.6 2022-06-29 12:17:46 +02:00
README.md update to upstream Grafana 8.5.6 2022-06-29 12:17:46 +02:00
build_frontend.sh update to upstream version 7.5.7 2021-05-25 17:56:00 +02:00
create_bundles_in_container.sh update to upstream Grafana 8.5.6 2022-06-29 12:17:46 +02:00
gating.yaml Initial set of gating tests for grafana on Fedora 2021-02-03 19:58:40 +01:00
grafana.rpmlintrc update rpmlintrc 2021-10-11 18:37:28 +02:00
grafana.spec update to upstream Grafana 8.5.6 2022-06-29 12:17:46 +02:00
list_bundled_nodejs_packages.py update to upstream Grafana 8.5.6 2022-06-29 12:17:46 +02:00
sources update to upstream Grafana 8.5.6 2022-06-29 12:17:46 +02:00

README.md

grafana

The grafana package

Setup instructions

  • clone the upstream sources: git clone https://github.com/grafana/grafana && cd grafana
  • checkout the desired version (tag): git checkout vX.Y.Z
  • run: go mod vendor && git add -f vendor && git commit -m vendor (this step is required because some patches modify vendor sources)
  • apply existing patches: git am ../*.patch and resolve any errors
  • create new patches from the modified git commits: git format-patch -N --no-stat --no-signature <commit-hash-of-vendor-commit>

Upgrade instructions

  • follow the Setup instructions above with the new upstream version
  • update Version, Release, %changelog and tarball NVRs in the specfile
  • create bundles and manifest: make clean all
  • update specfile with contents of the .manifest file
  • update the manpages patch in 0002-add-manpages.patch and other patches if required
  • run local build: rpkg local
  • run rpm linter: rpkg lint -r grafana.rpmlintrc
  • run a scratch build: fedpkg scratch-build --srpm
  • upload new source tarballs: fedpkg new-sources *.tar.gz *.tar.xz
  • commit new sources file

Patches

  • create the patch
  • declare and apply (%prep) the patch in the specfile
  • if the patch affects Go or Node.js dependencies, or the webpack
    • add the patch to PATCHES_PRE_VENDOR or PATCHES_PRE_WEBPACK in the Makefile
    • create new tarballs
    • update the specfile with new tarball name and contents of the .manifest file

General guidelines

  • aim to apply all patches in the specfile
  • avoid rebuilding the tarballs

Patches fall in several categories:

  • modify dependency versions
  • modify both sources and vendored dependencies (e.g. CVEs)
  • modify the Node.js source (i.e. affect the webpack)
  • some patches are conditional (e.g. FIPS)

Patches cannot be applied twice. It is not possible to unconditionally apply all patches in the Makefile, and great care must be taken to include the required patches at the correct stage of the build.

Reproducible Bundles

Run ./create_bundles_in_container.sh to generate a reproducible vendor and webpack bundle. Alternatively, install the same software as in the container, create a bind mount from /tmp/grafana-build to the directory of this repository, and run make. The bind mount is required because Webpack stores absolute paths in the JS source maps, and also resolves symlinks (i.e. symlinking /tmp/grafana-build doesn't work).

Verification