Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • L Library
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 13
    • Issues 13
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • The Tor Project
  • Network Health
  • Metrics
  • Library
  • Issues
  • #19285
Closed
Open
Created Jun 06, 2016 by Karsten Loesing@karsten

Parse "package" lines in consensuses using method 19 or later

From dir-spec.txt:

    "package" SP PackageName SP Version SP URL SP DIGESTS NL

        [Any number of times.]

        For this element:

        PACKAGENAME = NONSPACE
        VERSION = NONSPACE
        URL = NONSPACE
        DIGESTS = DIGEST | DIGESTS SP DIGEST
        DIGEST = DIGESTTYPE "=" DIGESTVAL
        NONSPACE = one or more non-space printing characters
        DIGESTVAL = DIGESTTYPE = one or more non-=, non-" " characters.

        Indicates that a package called "package" of version VERSION may be
        found at URL, and its digest as computed with DIGESTTYPE is equal to
        DIGESTVAL.  In consensuses, these lines are sorted lexically by
        "PACKAGENAME VERSION" pairs, and DIGESTTYPES must appear in ascending
        order.  A consensus must not contain the same "PACKAGENAME VERSION"
        more than once.  If a vote contains the same "PACKAGENAME VERSION"
        more than once, all but the last is ignored.

        Included in consensuses only for method 19 and later.

Found in the wild here, though looks mostly like testing:

$ grep -C1 "^package " 23/2016-04-23-03-00-00-vote-D586D18309DED4CD6D57C18FDB97EFA96D330566-BA14F96AB22EA5117C2D29B79BABD06ECAE451FF 
server-versions 0.2.4.23,0.2.4.24,0.2.4.25,0.2.4.26,0.2.4.27,0.2.5.8-rc,0.2.5.9-rc,0.2.5.10,0.2.5.11,0.2.5.12,0.2.6.5-rc,0.2.6.6,0.2.6.7,0.2.6.8,0.2.6.9,0.2.6.10,0.2.7.1-alpha,0.2.7.2-alpha,0.2.7.3-rc,0.2.7.4-rc,0.2.7.5,0.2.7.6,0.2.8.1-alpha,0.2.8.2-alpha
package shouldbesecond 0 http digest=digest
package outoforder 0 http digest=digest
known-flags Authority BadExit Exit Fast Guard HSDir Running Stable V2Dir Valid

We might get away by just providing package lines without parsing them, as in: getPackageLines().

Assignee
Assign to
Time tracking