grafana-pcp/README.md

46 lines
2.2 KiB
Markdown
Raw Normal View History

2019-08-28 13:31:19 +00:00
# grafana-pcp
2019-10-11 18:12:07 +00:00
The grafana-pcp package
2022-07-04 11:40:02 +00:00
## Setup instructions
* clone the upstream sources: `git clone https://github.com/performancecopilot/grafana-pcp && cd grafana-pcp`
* checkout the version of the specfile: `git checkout <currentversion>`
* apply existing patches: `git am ../0*.patch`
2020-11-26 11:42:03 +00:00
## Upgrade instructions
2022-07-04 11:40:02 +00:00
* follow the Setup instructions above
* rebase to the new version: `git fetch && git rebase --onto <newversion> <oldversion>`
* 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 ..`
2021-11-12 15:21:30 +00:00
* update `Version`, `Release`, `%changelog` and tarball NVRs in the specfile
2022-07-04 11:40:02 +00:00
* create bundles and manifest: `./create_bundles_in_container.sh`
2020-11-26 11:42:03 +00:00
* update specfile with contents of the `.manifest` file
* run local build: `rpkg local`
2022-07-04 11:40:02 +00:00
* run rpmlint: `rpmlint -r grafana-pcp.rpmlintrc /tmp/rpkg/grafana-pcp-*/grafana-pcp-*.src.rpm /tmp/rpkg/grafana-pcp-*/x86_64/grafana-pcp-*.x86_64.rpm`
2020-11-26 11:42:03 +00:00
* run a scratch build: `fedpkg scratch-build --srpm`
2020-12-23 13:48:21 +00:00
* upload new source tarballs: `fedpkg new-sources *.tar.gz *.tar.xz`
2021-11-12 15:21:30 +00:00
* commit new `sources` file
2019-11-12 13:55:22 +00:00
2021-11-12 15:21:30 +00:00
## Patches
2020-11-26 11:42:03 +00:00
* 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
2021-11-12 15:21:30 +00:00
* 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)
2019-12-11 16:44:48 +00:00
2021-11-12 15:21:30 +00:00
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.
2022-07-04 11:40:02 +00:00
## Reproducible Bundles
Run `./create_bundles_in_container.sh` to generate a reproducible vendor and webpack bundle.