Right now, the unwritten rule for commit/snapshot-based RPM package is to version it using this format:
%{date}.%{shortcommit}
This is not documented very well, and we may get inconsistent versioning from various contributors for nightly or any packages without a proper release.
I propose a universal, consistent versioning scheme for Terra packages that do not have a concrete release tag upstream or builds from a specific commit.
The format is as follows:
The date of the commit (In a YYYYMMDD Format)
The VCS used (i.e Git), should be shortened to 3 characters, at most 4. For example:
VCS
VCS ID (for Terra)
Git
git
SVN
svn
CVS
cvs
Bazaar
bzr
Mercurial
hg
Perforce (Helix)
p4
Pijul
pjl
Azure DevOps
tfs
darcs
darc
Fossil
fsl
The snapshot/commit ID of said VCS that it built from, with a tilde (~) separating the VCS and commit ID to work around RPM restrictions (7 Characters for Git SHA256 hashes and other short-form IDs for other VCSes)
So for example, a Git-based package would be named this:
%{date}.git~%{shortcommit}
20240815.git~abcedfg
We should also document a workflow for at least Git, to use macros when doing Git commits, or write our own macro to shorten SHA hashes.
Right now, the unwritten rule for commit/snapshot-based RPM package is to version it using this format:
This is not documented very well, and we may get inconsistent versioning from various contributors for nightly or any packages without a proper release.
I propose a universal, consistent versioning scheme for Terra packages that do not have a concrete release tag upstream or builds from a specific commit.
The format is as follows:
The date of the commit (In a
YYYYMMDD
Format)The VCS used (i.e Git), should be shortened to 3 characters, at most 4. For example:
git
svn
cvs
bzr
hg
p4
pjl
tfs
darc
fsl
The snapshot/commit ID of said VCS that it built from, with a tilde (
~
) separating the VCS and commit ID to work around RPM restrictions (7 Characters for Git SHA256 hashes and other short-form IDs for other VCSes)So for example, a Git-based package would be named this:
We should also document a workflow for at least Git, to use macros when doing Git commits, or write our own macro to shorten SHA hashes.