-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
Unify version numbers in various packaging scenarios #5044
Comments
For me it makes sense to use a versioning system (git) to set a version of a package 😄 |
@FedericoCeratto maybe more input why you think this approach is wrong? |
Just a couple of thoughts on this:
|
We are tagging releases and this is not going to change.
They are tagged: Since we are using GitHub for releases and we would like to keep it, then releases are connected to tags (each release has a tag). This part is already automated and is already using
The whole plan is to distribute it ourselves, so there is no need for any local patches. And in such scenario unification is entirely possible. Right now other distros are packaging only our stable distribution channel and here nothing changes apart from requiring There are TWO main changes:
First is obvious to me, we are using git which is versioning system so we should use it to determine package version. This can be done in a couple of ways, ex. using As I see it, using |
So, the only problem with this, is the lack the If yes, can we add a file |
If you add a file, then you create a commit and this means that this approach (version in a file) is immediately outdated for builds from master branch. This way you are building package based on a commit N but version string is referencing commit N-1. In short version.txt file would be ok for building packages from releases, but it fails when building from master. I am still waiting for messages on why we cannot always rely on git for dynamically determining package version. And I would like to have "production" examples when someone is actually using non-git workflow to build packages with a reasoning why this cannot be done with git. Otherwise I consider non-git workflow as not really needed. |
Gentoo. With very limited exceptions, stuff in the portage tree has to have a source tarball that can be downloaded without needing anything other than Even ignoring Gentoo and other source-based distros, I personally see exactly zero reason we can't have a check in the version identifying stuff that looks to see if there isn't a |
On my experience:
So, yes I agree we could stick to |
ok, so let's use git for majority of stuff and a version file as a fallback. This version file could store a number in a format close to |
Full implementation done in #5051 |
Sorry to necro this but rpm cannot support this naming scheme.
|
@wcallgair there is a WIP PR where I try to implement a workaround for RPMs: #5135 |
Bug report summary
make dist
produces artifacts with future versions. Currently it bumps patch part in semantic versioning. This behavior is miss leading as it produces a tarball with a non-existent version..travis/create_artifacts.sh
script tries to modify packagesnetdata.spec.in
is using non-existent version numberThe easiest way would be to require
git
tree when building packages and usinggit describe
instead of inventing our own solution to an already solved problem.As a bonus using
git describe
gives us a way to easier reproduce bugs when new issues are coming since we can see exactly which revision is used by an end user.It will break third-party packaging scripts which depend on tarballs without
.git
directory.OS / Environment
All
Component Name
Packaging
Steps To Reproduce
ls
Expected behavior
Versions are using
git describe
format, which is the following:<LAST_TAG>-<NUMBER_OF_COMMITS_SINCE_TAG>-<SCM_SYSTEM_LETTER>-<SHORT_GIT_HASH>
for example commit 2511353 would be looking like this:
git describe
is robust enough not to include-<NUMBER_OF_COMMITS_SINCE_TAG>-<SCM_SYSTEM_LETTER>-<SHORT_GIT_HASH>
part when current commit is a tagged commit.The text was updated successfully, but these errors were encountered: