grafana/README.md

44 lines
2.1 KiB
Markdown
Raw Normal View History

2019-04-29 12:46:34 +00:00
# grafana
The grafana package
2019-04-29 12:46:34 +00:00
## Upgrade instructions
2021-09-30 12:16:39 +00:00
* update `Version`, `Release`, `%changelog` and tarball NVRs in the specfile
* create bundles and manifest: `make clean all`
2020-11-25 17:55:36 +00:00
* update specfile with contents of the `.manifest` file
* check if the default configuration has changed: `diff grafana-X.Y.Z/conf/defaults.ini distro-defaults.ini` and update `distro-defaults.ini` if necessary
2021-05-20 14:57:43 +00:00
* update the manpages patch in `002-manpages.patch` and other patches if required
2020-07-30 15:52:28 +00:00
* run local build: `rpkg local`
* run rpm linter: `rpkg lint -r grafana.rpmlintrc`
* run a scratch build: `fedpkg scratch-build --srpm`
2020-12-21 18:42:28 +00:00
* upload new source tarballs: `fedpkg new-sources *.tar.gz *.tar.xz`
2021-09-30 12:16:39 +00:00
* commit new `sources` file
2021-10-08 14:53:45 +00:00
## 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
2021-10-08 14:53:45 +00:00
* add the patch to `PATCHES_PRE_VENDOR` or `PATCHES_PRE_WEBPACK` in the Makefile
2021-09-30 12:16:39 +00:00
* create new tarballs
2021-10-08 14:53:45 +00:00
* update the specfile with new tarball name and contents of the `.manifest` file
2021-10-08 14:53:45 +00:00
### General guidelines
* aim to apply all patches in the specfile
* avoid rebuilding the tarballs
2021-09-30 12:16:39 +00:00
2021-10-08 14:53:45 +00:00
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.
2021-05-20 14:57:43 +00:00
## 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).
2021-05-20 14:57:43 +00:00
## Verification
* compare the list of files with the upstream RPM at https://grafana.com/grafana/download