Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
T
Tor Specifications
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 29
    • Issues 29
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

  • The Tor Project
  • Core
  • Tor Specifications
  • Issues
  • #4

Closed
Open
Created Feb 14, 2017 by teor@teor

Make tor version parsing and version spec consistent

In tor_version_compare, the git logic is a bit weird, because git tags are hashes: the ordering we apply isn't their true order. So the function comment should probably become:

/** Compare two tor versions; Return <0 if a < b; 0 if a ==b, >0 if a >
* b. Git tags are sorted by length, then value. */

But this doesn't match version-spec.txt:

The EXTRA_INFO is also purely informational, often containing information
about the SCM commit this version came from. It is surrounded by parentheses
and can't contain whitespace. Unlike the STATUS_TAG this never impacts the way
that versions should be compared.

We should try to ignore the git tag, or at least be very careful how we compare it. Due to bugs like legacy/trac#20492 (moved), the following versions are equivalent:

Tor 0.2.9.9 (git-56788a2489127072)
Tor 0.2.9.9

(But these are not equivalent to any other git tag on Tor 0.2.9.9, which should never happen anyway.)

This is important when we try to exclude versions, like in legacy/trac#20509 (moved), because we need to exclude the version with and without the git tag.

This fix might require a new consensus method.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None