[debugsyms] Revive upload_debug_symbols tool

This brings upload_debug_symbols back to tools.git.
It is renamed debugsyms, to be slightly more generic,
with one subcommand `upload`.

Now that artifactory has succeeded upload_debug_symbols
as the default tool for uploading build artifacts,
upload_debug_symbols has no reason to live in fuchsia.git
anymore. It is reworked here to be build-agnostic and
operate on the standard .build-id format.

debugsyms upload -bucket $GCS_BUCKET
  -namespace $GCS_NAMESPACE $BUILD_ID_DIR1 ...

will upload debug symbols in the specified .build-id
dir(s), which have nested .debug files:

ab/cdef.debug
gh/jkil.debug

to

$GCS_BUCKET/$GCS_NAMESPACE/abcdef.debug
$GCS_BUCKET/$GCS_NAMESPACE/ghjkil.debug

Note that unlike the previous iteration of the tool,
we fail loudly if any of the .debug files are invalid.
The fact that we had previously thrown warnings
was a loose rule based on the hack that we were
walking a checkout, not strictly .build-id dirs.

We also allow an optional -namespace, which will place
.debug files at the namespace in the bucket, rather
than at the root. This is to accommodate multiple
schemes of debug symbol storage.

Bug: 48601
Change-Id: I0e78c6fb26d7180268009d594a463db13c8e512c
10 files changed
tree: 7100b68e71694ba1f643d60deae44b001949c38a
  1. buildidtool/
  2. debugsyms/
  3. gndoc/
  4. godepfile/
  5. .gitignore
  6. go.mod
  7. go.sum
  8. manifest
  9. README.md
README.md

tools

All tools have been moved to fuchsia.git at https://fuchsia.googlesource.com/fuchsia/+/refs/heads/master/tools.