Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use hatch version instead of packit default #265

Merged
merged 3 commits into from
Dec 3, 2024
Merged

Use hatch version instead of packit default #265

merged 3 commits into from
Dec 3, 2024

Conversation

psss
Copy link
Collaborator

@psss psss commented Dec 3, 2024

By default packit creates rpms with version which can be older than packages already released in Fedora repositories. We need to use hatch version to at least bump the micro version.

By default packit creates rpms with version which can be older
than packages already released in Fedora repositories. We need to
use `hatch version` to at least bump the micro version.
@psss psss requested a review from martinhoyer December 3, 2024 13:13
@psss
Copy link
Collaborator Author

psss commented Dec 3, 2024

@LecrisUT, could you please have a look? I tried latest Fedora:

> dnf install fmf
> rpm -q fmf
fmf-1.4.1-2.fc41.noarch
> dnf copr enable @teemtee/latest
> dnf update fmf
Updating and loading repositories:
Copr repo for latest owned by @teemtee             100% |   7.9 KiB/s |   1.5 KiB |  00m00s
Repositories loaded.
Nothing to do.

Here's what packit builds by default:

fmf-1.4.1-1.20241203121310479530.main.9.g759788f

So, I guess we don't have another option.

@LecrisUT
Copy link
Contributor

LecrisUT commented Dec 3, 2024

Hmm, interesting, this is because packit puts commit details in release instead of version. I think it would be good to mimick %forgemeta approach, or the versioning guideline for snapshots in general. I'll raise the issue on packit

Copy link
Contributor

@LecrisUT LecrisUT left a comment

Choose a reason for hiding this comment

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

Until packit/packit#2482 gets resolved, I think this would be a good workaround, but we would not be able to switch out of it until a next minor release because the predict next-version is bumping the patch version 1.4.2 and I am not sure how .dev10 orders compared to ^20241203.

Another approach would be:

$ echo "$(git describe --abbrev=0 --tags)^$(date +%Y%m%d)"
1.4.1^20241203

Not sure how sh -c and escapes must be done for this though

@psss
Copy link
Collaborator Author

psss commented Dec 3, 2024

I just realized we need to obsolete the dropped python3-fmf package otherwise it is not remove during updates. Should be covered in e7ee4e4.

@psss
Copy link
Collaborator Author

psss commented Dec 3, 2024

Until packit/packit#2482 gets resolved, I think this would be a good workaround,

Why would a workaround be needed? The update path should work fine:

# starting on fedora
fmf-1.4.1-2.fc41

# update from the copr
fmf-1.4.2.dev11+g3ba9d95-1.20241203155123996628.h

# get the next stable when released
fmf-1.5.0-1.fc41

@LecrisUT
Copy link
Contributor

LecrisUT commented Dec 3, 2024

Until packit/packit#2482 gets resolved, I think this would be a good workaround,

Why would a workaround be needed? The update path should work fine:

# starting on fedora
fmf-1.4.1-2.fc41

# update from the copr
fmf-1.4.2.dev11+g3ba9d95-1.20241203155123996628.h

# get the next stable when released
fmf-1.5.0-1.fc41

The issue is when working on bug-fix versions like fmf-1.4.2 which would clash with the .dev suffix that is added. It depends on how this part is ordered. The issue is once we use this, it would be hard to go cleanly got back to a packit default with snapshot syntax.

@psss
Copy link
Collaborator Author

psss commented Dec 3, 2024

The issue is when working on bug-fix versions like fmf-1.4.2 which would clash with the .dev suffix that is added. It depends on how this part is ordered.

Yeah, I guess you're right:

> rpmdev-vercmp 1.4.2.dev11-1 1.4.2-1
1.4.2.dev11-1 > 1.4.2-1

That was the reason for tmt hacks:

> rpmdev-vercmp 1.40.dev9+gebf02add-main 1.40.0
1.40.dev9+gebf02add-main < 1.40.0

So this means, that development bug-fix versions appear to be newer then the final. But as we'll have separate stable and latest repositories, I guess we're ok.

@psss psss merged commit 0af4282 into main Dec 3, 2024
12 of 13 checks passed
@psss psss deleted the hatch-version branch December 3, 2024 15:54
@psss psss added this to the 1.5 milestone Dec 3, 2024
@psss psss self-assigned this Dec 3, 2024
@psss psss added the packaging label Dec 3, 2024
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.

3 participants