Opened 3 months ago

Last modified 3 months ago

#33408 new enhancement

Make tor versions sortable, by adding the commit number to EXTRA_INFO

Reported by: teor Owned by:
Priority: Medium Milestone: Tor: 0.4.4.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: prop311, needs-version-spec, outreachy-ipv6
Cc: Actual Points:
Parent ID: #33582 Points: 0.2
Reviewer: Sponsor: Sponsor55-can

Description

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)

Child Tickets

Change History (2)

comment:1 Changed 3 months ago by gaba

Keywords: outreachy-ipv6 added

Adding this tickets to possible things an outreachy intern could work on.

comment:2 Changed 3 months ago by teor

Parent ID: #33232#33582

We might need this change for #33582.

If we don't do #33582, it's not an urgent or important change.

Note: See TracTickets for help on using tickets.