Metrics dashboard and graph editor
Go to file
Sam Feifer 893890a436 Resolves: RHEL-23468
Allow for PostgreSQL datasource
Allow gid to be 0
2024-02-01 09:41:29 -05:00
.github/workflows update to upstream Grafana 7.5.15, resolve CVE-2021-23648 and CVE-2022-21698 2022-04-22 14:29:58 +02:00
.gitignore update to upstream version 7.5.10 2021-09-30 18:17:18 +02:00
0001-update-grafana-cli-script-with-distro-specific-paths.patch Resolves: RHEL-23468 2024-02-01 09:41:29 -05:00
0002-add-manpages.patch Update to upstream Grafana 9.2.10 2023-05-05 11:35:03 -04:00
0003-update-default-configuration.patch Update to upstream Grafana 9.2.10 2023-05-05 11:35:03 -04:00
0004-remove-unused-backend-dependencies.patch Bump exporter-toolkit to v0.7.3, sanitize-url@npm to 6.0.2, skip problematic s390 tests, License AGPL-3.0-only, 2023-06-09 14:59:50 -04:00
0005-remove-unused-frontend-crypto.patch Bump exporter-toolkit to v0.7.3, sanitize-url@npm to 6.0.2, skip problematic s390 tests, License AGPL-3.0-only, 2023-06-09 14:59:50 -04:00
0006-skip-marketplace-plugin-install-test.patch Update to upstream Grafana 9.2.10 2023-05-05 11:35:03 -04:00
0007-fix-alert-test.patch Update to upstream Grafana 9.2.10 2023-05-05 11:35:03 -04:00
0008-graphite-functions-xss.patch Update to upstream Grafana 9.2.10 2023-05-05 11:35:03 -04:00
0009-redact-weak-ciphers.patch Update to upstream Grafana 9.2.10 2023-05-05 11:35:03 -04:00
0010-skip-tests.patch Bump exporter-toolkit to v0.7.3, sanitize-url@npm to 6.0.2, skip problematic s390 tests, License AGPL-3.0-only, 2023-06-09 14:59:50 -04:00
0011-remove-email-lookup.patch Fix CVE-2023-3128 2023-07-20 15:54:36 -04:00
0012-coredump-selinux-error.patch Fixes coredump from AVC denial 2023-12-15 12:05:33 -05:00
1001-vendor-patch-removed-backend-crypto.patch Bump exporter-toolkit to v0.7.3, sanitize-url@npm to 6.0.2, skip problematic s390 tests, License AGPL-3.0-only, 2023-06-09 14:59:50 -04:00
1002-vendor-use-pbkdf2-from-OpenSSL.patch Update to upstream Grafana 9.2.10 2023-05-05 11:35:03 -04:00
1003-vendor-skip-goldenfiles-tests.patch update to upstream v9.0.8 2022-09-15 18:34:41 +02:00
build_frontend.sh update to upstream v9.0.8 2022-09-15 18:34:41 +02:00
create_bundles_in_container.sh Update to upstream Grafana 9.2.10 2023-05-05 11:35:03 -04:00
create_bundles.sh update to upstream v9.0.8 2022-09-15 18:34:41 +02:00
gating.yaml Fixed syntax of the gating.yaml file 2023-10-19 18:16:25 +02:00
grafana.fc Add selinux policy for grafana and fix CVE-2023-39325 2023-11-17 11:03:16 -05:00
grafana.if Add selinux policy for grafana and fix CVE-2023-39325 2023-11-17 11:03:16 -05:00
grafana.rpmlintrc update to upstream v9.0.8 2022-09-15 18:34:41 +02:00
grafana.spec Resolves: RHEL-23468 2024-02-01 09:41:29 -05:00
grafana.sysusers update to upstream v9.0.8 2022-09-15 18:34:41 +02:00
grafana.te Resolves: RHEL-23468 2024-02-01 09:41:29 -05:00
list_bundled_nodejs_packages.py update to upstream v9.0.8 2022-09-15 18:34:41 +02:00
README.md update to upstream v9.0.8 2022-09-15 18:34:41 +02:00
sources Bump exporter-toolkit to v0.7.3, sanitize-url@npm to 6.0.2, skip problematic s390 tests, License AGPL-3.0-only, 2023-06-09 14:59:50 -04:00

grafana

The grafana package

Setup instructions

  • clone the upstream sources: git clone https://github.com/grafana/grafana && cd grafana
  • checkout the version of the specfile: git checkout <currentversion>
  • apply existing patches: git am ../0*.patch

Upgrade instructions

  • follow the Setup instructions above
  • rebase to the new version: git fetch && git rebase --onto <newversion> <oldversion>
    • rebasing remove-unused-backend-dependencies.patch: only apply the patch to pkg/extensions/main.go and run go mod tidy, then go.mod and go.sum will get updated automatically
    • rebasing remove-unused-frontend-crypto.patch: only apply the patch to package.json and run yarn install, then yarn.lock will get updated automatically
  • create new patches from the modified git commits: git format-patch -N --no-stat --no-signature <newversion> && mv *.patch ..
  • update Version, Release, %changelog and tarball NVRs in the specfile
  • create bundles and manifest: ./create_bundles_in_container.sh
  • inspect the vendor tarball for any new non-FIPS crypto (vendor/golang.org/x/crypto), delete these files/directories in the Makefile and update the patch-removed-backend-crypto.patch if required
  • 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 rpmlint: rpmlint -r grafana.rpmlintrc /tmp/rpkg/grafana-*/grafana-*.src.rpm /tmp/rpkg/grafana-*/x86_64/grafana-*.x86_64.rpm
  • 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
    • update the create_bundles.sh script and apply the patch
    • 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.

Verification