omnibor / spec

A draft standard for communicating a cryptographic record of build inputs for software artifacts.

Home Page:https://omnibor.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Consider changing directory fanout scheme in "Annex A: Filesystem Storage"

alilleybrinker opened this issue · comments

Per @jsgf's comment in #37:

${OMNIBOR_DIR}/objects/${Artifact Identifier Type uri prefix with ':' replaced by '_'}/${OmniBORID:0:2}/${OmniBORID:2:}

The two-digits/rest-of-digits technique for doing directory fanout has always bugged me. Why not do two-digits/all-digits just so that you can do, for example find -name full-id without having to muck about?

This has not yet been resolved. The options so far presented are:

  • Keep as-is: Continue to structure directories with the first two characters of the ID as the outer directory name, and the remaining characters in the interior directory.
  • Change to Jeremy's scheme: Continue using the first two characters of the ID for the outer directory name, but then use all characters in the interior directory.

Considerations:

  • The existing scheme matches what Git does; may be more familiar to some consumers (human and automated) of OmniBOR data.
  • Duplicating the initial two characters results in longer names. Some may object to the duplication / waste of the two additional characters. Windows has a limit on path names, so the additional two characters may constrain valid OMNIBOR_DIR settings on Windows.
  • Having the full name in the interior path makes finding the relevant data easier (as Jeremy suggests with the find -name <full-id> command).

There may be additional options for what to do here as well.