Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 15 additions & 13 deletions doc/how_to_build_hotfix.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,57 +12,59 @@ Preparation

This is required if you are doing the first hotfix since last regular release. If somebody already did the hotfix, you can skip this section.

Create hotfix branch ($DATE is date of last release):
Create hotfix branch ($DATE is date of last release)::

git branch hotfix-$DATE
git checkout hotfix-$DATE

Return in history to commit that points to latest commit tagging packages for the release. If multiple packages were tagged during the release, choose the commit related to latest package in the release:
Return in history to commit that points to latest commit tagging packages for the release. If multiple packages were tagged during the release, choose the commit related to latest package in the release::

git reset --hard $SHA1

Push the branch to remote:
Push the branch to remote::

git push origin hotfix-$DATE:hotfix-$DATE

Commit the changes:
Commit the changes::

git commit -a -m 'set up hotfix branch'

Backport fix
------------

If you skipped previous part because the branch exists then do:
If you skipped previous part because the branch exists then do::

git checkout hotfix-$DATE

Apply the fix from `main` branch. $SHA1 is commit you want to backport.
Apply the fix from `main` branch. $SHA1 is commit you want to backport::

git cherry-pick -x $SHA1

Run:
Run::

tito report --untagged-commits

and walk the directories of packages listed. For every SPEC file make sure that `Version` tag has `.hotfix.0` at the end.
This ensure that the hotfix version is higher than any rebuild in Fedora.
This ensure that the hotfix version is higher than any rebuild in Fedora::

1.1-5 < 1.1.hotfix.0-1

Tag every package that was listed in the step above:
Tag every package that was listed in the step above::

# TODO This should increment to .hotfix.1-1 but for me it did .hotfix.0-2
# Which is a problem because `tito release fedora-git` couldn't handle it
tito tag
# workarounded by
tito tag --use-version 1.1.hotfix.1 --use-release "1%{?dist}"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't remember if @xsuchy explained the problem was caused by either the builder or tagger we set in 3ed9510 and therefore we can drop this documentation change or not.


Push the changes:
Push the changes::

git push --follow-tags origin

Build packages
--------------

At this point in time, we have those files most likely patched in production. So you can take a time and follow
how to `build packages`_.
how to :ref:`build packages<build_packages_for_production>`

When packages are build, you should run the Ansible playbook and make sure everything runs smoothly.

.. _`build_packages`: https://docs.pagure.org/copr.copr/how_to_release_copr.html#build-packages-for-production