how-to-update-glean-parser.txt 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. In order to be able to do offline builds for mobile we need to collect and
  2. distribute Glean dependencies beforehand.[1]
  3. There are three steps involved in the process:
  4. 1) Finding out the `glean_parser` version
  5. 2) Downloading and verifying the dependencies
  6. 3) Bundling the dependencies up and pushing them to the sources mirror
  7. 1)
  8. The `glean_parser` version is available in glean-core/python/setup.py in the
  9. Glean code repositoroy.[2] So, make sure which Glean version your
  10. `android-components` tag is using (`mozilla_glean` in
  11. buildSrc/src/main/java/Dependencies.kt has it) and then track `glean_parser`
  12. down in the respective Glean tag.
  13. 2)
  14. Create a directory `glean-wheels` and change into it. Then download packages for
  15. `glean_parser` and its dependencies using
  16. `python3 -m pip download glean_parser==$glean_parser`
  17. ($glean_parser being the version from step 1 above and Python 3 needs to be 3.6;
  18. ideally, we take the artifact we built and will use during the build later on as
  19. well.)
  20. There is no really good way (yet) to verify that `pip` gave us actually what we
  21. wanted. We can download `glean_parser` and its dependencies using a different
  22. network path, though, e.g. by using `torsocks`. Comparing the results of both
  23. downloads should yield the exact same binaries.
  24. 3)
  25. Update the `glean_parser` version in `rbm.conf, tar `glean-wheels` up and
  26. compress it:
  27. `tar cfj glean-wheels-$glean_parser.tar.bz2 glean-wheels`
  28. Upload the compressed tarball to the sources mirror and update the SHA-256 sum of
  29. it in the respective projects.
  30. [1] See: https://bugzilla.mozilla.org/show_bug.cgi?id=1651662 for details.
  31. [2] https://github.com/mozilla/glean