Updating a Go package in Fedora
·1 min
Just a quick-n-dirty post to remind me the process needed to update a Go package in Fedora.
- Check the changelog
Backward-incompatible updates should go only to Rawhide. If there are any breaking changes, check the dependencies with the following command and decide if the changes can be handled in a safely manner:
dnf repoquery '--disablerepo=*' '--enablerepo=*-source' --arch=src --whatrequires 'golang(github.com/getkin/kin-openapi/openapi3)'
This command prints all packages that BuildRequires the package. This is usually the most important thing to check for Go packages.
- Run go2rpm in dist-git
go2rpm https://github.com/labstack/echo
- Stage the relevant changes
git add -p .
git restore .
- Download the new sources from upstream
spectool -g golang-github-labstack-echo-4.spec
- Upload the new sources to the Fedora’s look aside cache
fedpkg new-sources echo-4.3.0.tar.gz
- Add a changelog entry to the spec file
* Tue May 11 2021 Ondřej Budai <ondrej@budai.cz> - 4.3.0-1
- Update to 4.3.0
- Close: rhbz#1958599
- Stage and commit the changes
git add .
git commit
The commit message should be something like:
Author: Ondřej Budai <ondrej@budai.cz>
Date: Tue May 11 10:10:46 2021 +0200
Update to 4.3.0
Close: rhbz#1958599
- Make a scratch build
fedpkg scratch-build --srpm
From here, things should be simple.