[tor-bugs] #33408 [Core Tor/Tor]: Make tor versions sortable, by adding the commit number to EXTRA_INFO
Tor Bug Tracker & Wiki
blackhole at torproject.org
Fri Feb 21 01:26:02 UTC 2020
#33408: Make tor versions sortable, by adding the commit number to EXTRA_INFO
-------------------------------+-----------------------------------------
Reporter: teor | Owner: (none)
Type: enhancement | Status: new
Priority: Medium | Milestone: Tor: 0.4.4.x-final
Component: Core Tor/Tor | Version:
Severity: Normal | Keywords: prop311, needs-version-spec
Actual Points: | Parent ID: #33232
Points: 0.2 | Reviewer:
Sponsor: Sponsor55-can |
-------------------------------+-----------------------------------------
In #30899, sbws starts using the PEP 440 sortable version scheme:
{{{
The version previous to this commit was 1.1.1-dev0, after
this commit, it becomes 1.1.0+xx.gyyyyyyyy, ie. xx commits after
1.1.0 plus the git short hash (yyyyyyyy).
}}}
PEP440 is specified here:
https://www.python.org/dev/peps/pep-0440/
We should do something similar in tor, so that we can sort all tor
versions lexically, even unreleased versions.
The current format is:
{{{
MAJOR.MINOR.MICRO[.PATCHLEVEL][-STATUS_TAG][ (EXTRA_INFO)]*
}}}
EXTRA_INFO is currently:
{{{
git rev-parse --short=16 HEAD
}}}
But we could use:
{{{
git describe --tags --dirty --broken --always --match "tor-*"
}}}
Possibly with some post-processing. We should also add a prefix that sorts
after any versions in the previous format. (The prefix will only matter
for 0.4.4.0-alpha-dev.)
Here's the relevant part of the current version spec:
https://gitweb.torproject.org/torspec.git/tree/version-spec.txt#n22
Or we could just use python-versioneer to generate a version script for
tor:
https://github.com/warner/python-versioneer
We might need this change for Sponsor 55, so that chutney knows which
unreleased tor versions have bridge authority fixes (see #33407)
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/33408>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list