Skip to content

Conversation

@xsuchy
Copy link
Member

@xsuchy xsuchy commented Dec 8, 2025

No description provided.

@xsuchy xsuchy marked this pull request as draft December 8, 2025 16:34
@xsuchy
Copy link
Member Author

xsuchy commented Dec 8, 2025

Please comment about the last section.

@github-actions
Copy link

github-actions bot commented Dec 8, 2025

Pull Request validation

Failed

🔴 Review - Missing review from a member (2 required)

Success

🟢 CI - All checks have passed


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

git branch hotfix-$DATE
Copy link
Member

Choose a reason for hiding this comment

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

Please also git checkout ..., otherwise we git reset the main branch later.

Copy link
Member

Choose a reason for hiding this comment

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

do you mean by this rebasing on the upstream/main before creating the hotfix branch, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is a description for creating the branch. This part can be (should be) skipped on subsequent runs. As written in the first paragraph.

Copy link
Member

Choose a reason for hiding this comment

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

The git checkout is still missing here.

Copy link
Member Author

Choose a reason for hiding this comment

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

??? Can you write that command? I have no idea what you mean.

Copy link
Member

Choose a reason for hiding this comment

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

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


optionally you can change even:

builder = tito.builder.UpstreamBuilder
Copy link
Member

Choose a reason for hiding this comment

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

Not sure if I should commit those changes?

Copy link
Member

Choose a reason for hiding this comment

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

If so, can you please add the command with already prepared commit message, so that we can easily copy-paste it from the docs?

Copy link
Member Author

Choose a reason for hiding this comment

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

nod I added git-commit


git branch hotfix-$DATE

Return in history to commit that points to latest commit tagging packages for the release:
Copy link
Member

Choose a reason for hiding this comment

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

This might be a bit hard choice, not sure, we'll see in practice. Consider history like (last commit goes first)

  • aaa: to-be-hotfixed commit to python-copr
  • bbb: irrelevant commit for copr-backend
  • ccc: [python-copr] tagged
  • ddd: to-be-hotfixed commit to copr-backend
  • eee: [copr-backend] taged
  • fff: [copr-frontend] tagged
  • 000: other commit covered by subsequent tags

Now, I want a hot-fix branch, and have a hot-fix for both [python-copr] and [copr-backend]. Where do I start?

Copy link
Member

Choose a reason for hiding this comment

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

can't we just cherry pick the relevant commits instead?

Copy link
Member Author

Choose a reason for hiding this comment

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

Addressed by:
If multiple packages were tagged during the release, choose the commit related to latest package in the release

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

1.1-5 < 1.1^hotfix-1
Copy link
Member

Choose a reason for hiding this comment

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

Can we use . instead of ^?

Copy link
Member Author

Choose a reason for hiding this comment

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

Changed.


or

Create hotfix project in Copr itself. Enable this repo in production. Build there the hotfix and install from Copr.
Copy link
Member

Choose a reason for hiding this comment

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

At this point in time, we have those files most likely patched in production, vim-modified, I know -- 🥇.
Anyway, that's the most convenient thing to do and I doubt it makes any sense to change our practice; IOW we are not in hurry, we can simply wait till the package gets to infra tags -- and then do a no-brainer dnf update.

Copy link
Member

Choose a reason for hiding this comment

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

Anyway, that's the most convenient thing to do and I doubt it makes any sense to change our practice;

meaning of this is not creating this SOP? or is it encouragement to follow the https://docs.pagure.org/copr.copr/how_to_release_copr.html#build-packages-for-production ?

tbh I am against both, current status is definitely not ideal, yep. And having it released to fedora bring no benefits in my view... only adding boring process at the end of creating of the hotfix... is there really some big difference for us to have the hotfix directly to fedora that makes it no-brainer? Is there some benefit I am missing?

Copy link
Member

Choose a reason for hiding this comment

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

I meant that even with this (a go-to, really) SOP, you can still edit with vim, but then you must provide a hot-fix package and simply run dnf update to apply it (in an hour or so..).

@praiskup
Copy link
Member

praiskup commented Dec 9, 2025

Thank you very much for the document, @xsuchy 🚀

@@ -0,0 +1,75 @@
.. _how_to_build_hotfix:
Copy link
Member

Choose a reason for hiding this comment

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

We should probably link this from the maintenance_documentation.rst

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

@nikromen
Copy link
Member

we could test this on #4092 after new year to unblock packit/packit-service#2907 :)

Comment on lines +27 to +33
Edit `tito.props` to:

tagger = tito.tagger.ReleaseTagger

optionally you can change even:

builder = tito.builder.UpstreamBuilder
Copy link
Member

@nikromen nikromen Dec 22, 2025

Choose a reason for hiding this comment

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

I'd love to (just personal wish) have here short description (a few words) about what is the use case when I should include also the second (builder) option

Copy link
Member

Choose a reason for hiding this comment

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

+1, would "Check man(5) releasers.conf" be enough?

Copy link
Member Author

Choose a reason for hiding this comment

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

Added.

@xsuchy xsuchy marked this pull request as ready for review January 5, 2026 11:48
@xsuchy
Copy link
Member Author

xsuchy commented Jan 5, 2026

Ready for review.

@praiskup
Copy link
Member

praiskup commented Jan 7, 2026

LGTM, just please mention that we need to switch into the newly crated branch.


Tag every package that was listed in the step above:

tito tag
Copy link
Member

Choose a reason for hiding this comment

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

here should be tito tag --user-version 1.1.hotfix

Copy link
Member Author

Choose a reason for hiding this comment

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

No.

This is handled by:

For every SPEC file make sure that Version tag has .hotfix at the end.

when you add it to spec file, then you can just simply tito tag.

Copy link
Member

Choose a reason for hiding this comment

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

Weird. Isn't tito tag responsible for overriding Version, though?

Copy link
Member

@praiskup praiskup Jan 12, 2026

Choose a reason for hiding this comment

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

I mean, I used --use-version recently with a hotfix: 7975ceb

Without that, I'd expect Tito to take what's inside .tito/packages/copr-backend and auto-bump.

tito report --untagged-commits

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

Choose a reason for hiding this comment

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

What if we need to have a subsequent hotfix? We can't just bump Release, we need to do something about it in Version, e.g., hotfix.2?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants