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

Makefile/packit: Set version to "single number" only for releases #58

Closed
wants to merge 1 commit into from

Conversation

schuellerf
Copy link
Contributor

@schuellerf schuellerf commented Jan 10, 2025

RPMs and releases should reflect if it's built from a release tag or some other commit.

Expected behavior is, that if you build a tag like "v4" the result is image-builder-cli-4.tar.gz otherwise it should visualize that this is NOT a release e.g. image-builder-cli-4.12.g30166b0.tar.gz

@schuellerf schuellerf requested a review from thozza January 10, 2025 12:26
@schuellerf schuellerf force-pushed the set-rpm-version-to-dirty branch from 2e1265f to cecb8ac Compare January 10, 2025 12:31
RPMs and releases should reflect if it's built from a
release tag or some other commit.

Expected behavior is, that if you build a tag like "v4"
the result is `image-builder-cli-4.tar.gz` otherwise
it should visualize that this is NOT a release e.g.
`image-builder-cli-4-12-g30166b0.tar.gz`
@schuellerf schuellerf force-pushed the set-rpm-version-to-dirty branch from cecb8ac to f402972 Compare January 10, 2025 12:38
@schuellerf
Copy link
Contributor Author

@mvo5
Copy link
Collaborator

mvo5 commented Jan 10, 2025

Do we have the version now twice? Looking at e.g. https://dashboard.packit.dev/jobs/copr/2118828 I see:

sudo dnf install -y image-builder-cli-4.13.gf402972-1.20250110124024754480.pr58.13.gf402972.el10.aarch64

or am I missing something?

@schuellerf
Copy link
Contributor Author

schuellerf commented Jan 10, 2025

I think the filename might be constructed from "version" and "release"

Version     : 4.13.gf402972
Release     : 1.20250110124024754480.pr58.13.gf402972.fc40

(this is the f40_x86_64 version I test-installed)
…and rpm -qi image-builder-cli-ed afterwards :-D

@mvo5
Copy link
Collaborator

mvo5 commented Jan 10, 2025

I think the filename might be constructed from "version" and "release"

Version     : 4.13.gf402972
Release     : 1.20250110124024754480.pr58.13.gf402972.fc40

I wonder if we can consolidate this information, it seems redundant to me (to have e.g. the hash and the number of commits since the tag in both places) but then I have no idea what the policies for rpms are and will leave this to others to decide, mostly wondering.

@schuellerf
Copy link
Contributor Author

schuellerf commented Jan 10, 2025

For me the key would be that "upgrading" and "downgrading" would work better? Not sure if "release" is considered here by rpm/dnf.
(and be more obvious and human-readable, from within rpm)

@schuellerf
Copy link
Contributor Author

…but you might be right - if "release" is respected properly - this PR is rendered an overkill :-/

@supakeen
Copy link
Member

Release is considered and this is (almost) exactly what it is meant for. We're building version 4; with some additional commits on top, see it as if we're applying patches to version 4.

@thozza
Copy link
Member

thozza commented Jan 10, 2025

RPM filenames are always constructed as NVRA - name-version-release.arch. The full NVRA is taken into consideration for upgrades and downgrades.

Personally, I use COPR builds from main for our tools on my system and don't like the NVRA that's used as a result of this PR.

It is common in RPM world to use the Release to distinguish changes made to the latest upstream release. In this context, using a single digit version and adding the git ref to the Release is IMHO the common approach.

@schuellerf schuellerf closed this Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants