The grafana package
Find a file
2025-12-03 10:13:04 -05: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
.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 Rebase to grafana 10.2.6 2024-03-28 11:52:33 -04:00
0002-add-manpages.patch Rebase to grafana 10.2.6 2024-03-28 11:52:33 -04:00
0003-update-default-configuration.patch Revert changes that break custom dashboards 2024-11-26 11:28:48 -05:00
0004-remove-unused-backend-dependencies.patch Rebase to grafana 10.2.6 2024-03-28 11:52:33 -04:00
0005-remove-unused-frontend-crypto.patch Rebase to grafana 10.2.6 2024-03-28 11:52:33 -04:00
0006-skip-marketplace-plugin-install-test.patch Rebase to grafana 10.2.6 2024-03-28 11:52:33 -04:00
0007-redact-weak-ciphers.patch Rebase to grafana 10.2.6 2024-03-28 11:52:33 -04:00
0008-replace-faulty-slices-sort.patch Rebase to grafana 10.2.6 2024-03-28 11:52:33 -04:00
0009-update-wrappers-and-systemd-with-distro-paths.patch Rebase to grafana 10.2.6 2024-03-28 11:52:33 -04:00
0010-remove-bcrypt-references.patch Rebase to grafana 10.2.6 2024-03-28 11:52:33 -04:00
0011-fix-dompurify-CVE.patch Rework selinux policy packaging and add rules 2025-05-02 13:46:04 -04:00
0012-fix-jwt-CVE.patch Rework selinux policy packaging and add rules 2025-05-02 13:46:04 -04:00
0013-fix-CVE-2025-4123.patch Fix CVE-2025-4123 2025-05-13 10:31:56 -04:00
1001-vendor-patch-removed-backend-crypto.patch rebase to grafana 10.2.3 2024-03-06 11:37:45 -05:00
1002-vendor-use-pbkdf2-from-OpenSSL.patch Sync FIPS patch from c10s 2024-06-26 17:20:12 -04:00
1003-vendor-skip-goldenfiles-tests.patch update to upstream Grafana 9.0.2 2022-07-07 19:49:51 +02:00
1004-vendor-Redacted-Url-in-logs.patch Redact urls in go-retryablehttp logs 2024-07-17 15:30:14 -04:00
build_frontend.sh partially revert NODE_OPTIONS settings 2022-09-07 13:51:58 +02:00
ci.fmf Use default gating config 2025-10-15 08:30:55 +00:00
create_bundles.sh Move home directory and resolve CVEs 2025-03-26 17:18:37 -04:00
create_bundles_in_container.sh rebase to grafana 10.2.3 2024-03-06 11:37:45 -05:00
gating.yaml Use default gating config 2025-10-15 08:30:55 +00:00
grafana.fc change sbin to bin in grafana-selinux 2025-07-17 16:16:04 -04:00
grafana.if Added selinux policy 2023-09-28 12:30:08 -04:00
grafana.rpmlintrc update to upstream Grafana 9.0.2 2022-07-07 19:49:51 +02:00
grafana.spec Fix recursive macro definition error in rpminspect 2025-12-03 10:13:04 -05:00
grafana.sysusers Move home directory and resolve CVEs 2025-03-26 17:18:37 -04:00
grafana.te Fix grafana-selinux cgroups denials 2025-12-02 15:16:24 -05:00
list_bundled_nodejs_packages.py rebase to grafana 10.2.3 2024-03-06 11:37:45 -05:00
README.md update to upstream Grafana 9.0.8 2022-09-15 18:12:52 +02:00
rpminspect.yaml Introduced rpminspect.yaml with branch test disabled 2024-04-22 17:56:18 +02:00
sources Move home directory and resolve CVEs 2025-03-26 17:18:37 -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