Use exec(curl) for downloading artifacts

Due to the union of an openssl bug, python inconsistencies
and Google Cloud changing CA, there doesn't seem to be a way
to consistently download an artifact over https in pure python
that works both on Linux and Mac (At least for Google HW).

On Mac:
  python3 -c 'import urllib.request;  urllib.request.urlopen("https://storage.googleapis.com/")'
  Fails with CERTIFICATE_VERIFY_FAILED because python3 on mac
  bundles its own set of CA roots which seems
  now obsolete (https://bugs.python.org/msg276516)

  However

  python2 -c 'from urllib import urlretrieve; urlretrieve("https://storage.googleapis.com/")'
  works

On Linux:
  python3 -c 'import urllib.request;  urllib.request.urlopen("https://storage.googleapis.com/")'
  Works

  However

  python2 -c 'from urllib import urlretrieve; urlretrieve("https://storage.googleapis.com/")'
  Fails with
  ssl.SSLError: [SSL: KRB5_S_TKT_NYV] unexpected eof while reading (_ssl.c:1946)
  Because of a bung introduced by OpenSSL 1.1.1e (https://bugs.python.org/issue40018)

Other option (like requests) are not viable because require the user to perform
some manual actions (pip install...) which is a bad UX
The world failed us. exec(curl) to the rescue.

Bug: many
Test: manually tested both install-build-deps and heap_profile on mac
Change-Id: I064c539fd15f7cac87bd0050631c6e008acaff77
2 files changed
tree: 752d7d8109d8b6efb2cbc9e10264fa5597e45cd9
  1. bazel/
  2. build_overrides/
  3. buildtools/
  4. debian/
  5. docs/
  6. gn/
  7. include/
  8. infra/
  9. protos/
  10. src/
  11. test/
  12. tools/
  13. ui/
  14. .clang-format
  15. .gitignore
  16. .gn
  17. .style.yapf
  18. Android.bp
  19. Android.bp.extras
  20. BUILD
  21. BUILD.extras
  22. BUILD.gn
  23. codereview.settings
  24. heapprofd.rc
  25. LICENSE
  26. METADATA
  27. MODULE_LICENSE_APACHE2
  28. OWNERS
  29. perfetto.rc
  30. PRESUBMIT.py
  31. README.chromium
  32. README.md
  33. TEST_MAPPING
  34. traced_perf.rc
  35. WORKSPACE
README.md

Perfetto - Performance instrumentation and tracing

Perfetto is an open-source project for performance instrumentation and tracing of Linux/Android/Chrome platforms and user-space apps.

See www.perfetto.dev for docs.

Contributing

See /docs/contributing.md for instructions.

The source-of-truth repo is Android's Gerrit. The GitHub repo is a read-only mirror.

Bugs

  • For bugs affecting Android or the tracing internals use the internal bug tracker (go/perfetto-bugs).
  • For bugs affecting Chrome use http://crbug.com, Component:Speed>Tracing label:Perfetto.

Community

You can reach us on our Discord channel. If you prefer using IRC we have an experimental Discord <> IRC bridge synced with #perfetto-dev on Freenode.