tree: a55b0860c1ae47d6182449465ee23f22b6ada1af [path history] [tgz]
  1. 7z/
  2. amd_rx_5500_xt_drivers/
  3. amd_rx_6600m_drivers/
  4. amd_rx_7600_drivers/
  5. amd_ryzen_5_pro_5650ge_drivers/
  6. android_ndk/
  7. android_ndk_canary/
  8. apr/
  9. apr-util/
  10. attr/
  11. autoconf/
  12. automake/
  13. bazel_bootstrap/
  14. bc/
  15. binutils/
  16. buf/
  17. buildifier/
  18. bzip2/
  19. cloud-tasks-emulator/
  20. cmake/
  21. cmake_bootstrap/
  22. codeql/
  23. copybara/
  24. cpython3/
  25. cpython310/
  26. cpython38/
  27. cpython3_dyn/
  28. cpython_common/
  29. curl/
  30. devil/
  31. ed/
  32. esbuild/
  33. firebase-tools/
  34. flex/
  35. gae_go_sdk/
  36. gcloud/
  37. gettext/
  38. git/
  39. go/
  40. go122/
  41. gofmt/
  42. golangci-lint/
  43. googet/
  44. govc/
  45. govet/
  46. gperf/
  47. gsutil/
  48. help2man/
  49. hiba/
  50. httpd/
  51. httpd-php/
  52. intel_arc_and_xe_drivers/
  53. intel_gen_6_to_12_drivers/
  54. intel_gen_7_to_10_drivers/
  55. ipxe-efi/
  56. kythe/
  57. lessmsi/
  58. libcap-ng/
  59. libexpat/
  60. libffi/
  61. libidn2/
  62. libnl/
  63. libtool/
  64. libuuid/
  65. libzstd/
  66. lldpd/
  67. mesa_drivers/
  68. mingw/
  69. mpich/
  70. mysqlclient/
  71. nasm/
  72. ncurses/
  73. ncursesw/
  74. ninja/
  75. nodejs/
  76. nodejs18/
  77. nodejs20/
  78. nsjail/
  79. nsl/
  80. nvidia_gtx_1660_drivers/
  81. nvidia_quadro_p400_drivers/
  82. nvidia_rtx_4050_notebook_drivers/
  83. nvidia_rtx_4060_ti_drivers/
  84. nvidia_rtx_4070_super_drivers/
  85. openblas/
  86. openocd/
  87. opensshlibs/
  88. openssl/
  89. parted/
  90. pcre/
  91. pcre2/
  92. perl/
  93. pip_bootstrap/
  94. pixman/
  95. powershell/
  96. protobuf-cpp/
  97. protobuf-cpp-21/
  98. protoc/
  99. protoc-gen-go/
  100. protoc-gen-go-grpc/
  101. puppet-agent/
  102. qemu/
  103. qemu_static/
  104. re2/
  105. re2c/
  106. readline/
  107. renode/
  108. rr/
  109. rsync/
  110. sed/
  111. shfmt/
  112. sqlite/
  113. squashfs/
  114. swift-format/
  115. swig/
  116. texinfo/
  117. tflint/
  118. txtpbfmt/
  119. valgrind/
  120. virtualenv/
  121. vmwaretools/
  122. wasmtime/
  123. wazero/
  124. wimboot/
  125. win32-openssh/
  126. win_adk/
  127. win_adk_winpe/
  128. xzutils/
  129. yajl/
  130. zephyr_sdk/
  131. zlib/
  132. .vpython3
  133. cross_util.sh
  134. OWNERS
  135. README.md
  136. run_locally.sh
  137. run_remotely.sh
  138. run_remotely_extract_repo_ref.py
  139. run_remotely_slurp_cl.py
3pp/README.md

3pp package definitions

This is a collection of “third-party package” definitions.

See the support_3pp recipe module docs for the format of package definitions.

Writing and testing new package definitions

To go along with the support_3pp documentation above, this section will give some higher-level advice on writing package definitions.

Package requirements

3pp packages are designed to be hermetic, meaning that they should typically not depend on any other 3pp package at runtime. This means that any library dependencies other than the core system libraries (more on this below) should be statically linked. This may require giving appropriate options to a configure script, or in some more extreme cases, patching the build system.

3pp packages are also designed to be relocatable, meaning that they can be deployed to any location on disk. Be aware if the package hardcodes any paths into the compiled code or into configuration files; if so, you may need to patch it to avoid this.

System libraries

Packages may depend on system libraries. Currently, we target the following:

  • Linux: manylinux2014 for linux-amd64. For other Linux targets, we follow dockcross latest.
  • macOS: Version 10.11 (mac-amd64), Version 11.0 (mac-arm64)
  • Windows: Windows 7

Naming conventions

For infra 3pp, we use the static_libs prefix for static libraries, and the tools prefix for executables. build_support is used infrequently; this is for packages which are for consumption only by the 3pp build system itself.

Versioning

Package version tags in CIPD are immutable. Therefore, in order to trigger a new build of a package, the version number must change. If the upstream (source) version of a package is staying the same, but you are making a change to the build script/environment or applying patches, add (or increment) the patch_version field in the spec to give it a new version string.

Platforms

3pp supports multiple architectures of Windows, Mac, and Linux. It is generally best to use platform_re to only build packages on platforms where they are actually needed. This reduces the amount of time spent debugging failures, both now and later.

Testing

Try jobs

The preferred way to test package definitions is to upload your CL to Gerrit and do a CQ dry run. This will trigger the 3pp try builders which run on all platforms. The try jobs do not upload the built packages anywhere, but you can inspect the build status to see which files would be packaged, and any error messages.

Building stuff locally

See ./run_locally.sh. You can pass help as the first argument for the lowdown.

For Linux, run_locally.sh requires docker to be installed. For googlers, please refer to go/docker.

Building the package locally will allow you to actually inspect the package output, if needed, as well as upload it to the experimental/ prefix in CIPD.

run_remotely

./run_remotely.sh is another option which works similar to the try jobs, but gives you more control over the Swarming task definition. You may want to use run_remotely if you want to tweak recipe code or properties.

CIPD Sources

If possible, prefer to use git, url, or script methods. If none of these are workable for a package, cipd source may be used.

Some third-party packages distribute their releases via source tarballs or zips. Sometimes this is done via http or ftp.

To ingest a new tarball/zip:

  • Download the official tarball release from the software site.

    • pick one that is compressed with gzip, bzip2, xz, zstd, or is a zip file.
    • If there's no such tarball, consider expanding compression support in the recipe_engine/archive module.
  • Put the tarball in an empty directory by itself (don‘t unpack it). The name of the archive doesn’t matter. Your directory should now look like:

    some/dir/ pkgname-1.2.3.tar.gz

  • Now run:

    $ PKG_NAME=pkgname $ VERSION=1.2.3 $ cipd create
    -in some/dir
    -name infra/third_party/source/$PKG_NAME
    -tag version:$VERSION

  • You can now use the source in a 3pp package definition like:

    source { cipd { pkg: “infra/third_party/source/pkgname” default_version: “1.2.3” original_download_url: “https://original.source.url.example.com” } # Lets 3pp recipe know to expect a single tarball/zip unpack_archive: true }

  • By default the 3pp recipe also expects unpacked archives to unpack their actual contents (files) to a subdirectory (in the Unix world this is typical for tarballs to have all files under a folder named the same thing as the tarball itself). The 3pp recipe will remove these ‘single directories’ and move all contents to the top level directory. To avoid this behavior, see the no_archive_prune option.