CINXE.COM

Vendoring Third Party Components — Firefox Source Docs documentation

<!doctype html> <html class="writer-html5" lang="en" data-content_root="../../"> <head> <base href="https://firefox-source-docs.mozilla.org/mozbuild/vendor/index.html"> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Vendoring Third Party Components — Firefox Source Docs documentation</title> <link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=fa44fd50"> <link rel="stylesheet" type="text/css" href="../../_static/css/theme.css?v=19f00094"> <link rel="stylesheet" type="text/css" href="../../_static/graphviz.css?v=fd3f3429"> <link rel="stylesheet" type="text/css" href="../../_static/copybutton.css?v=76b2166b"> <link rel="stylesheet" type="text/css" href="../../_static/custom_theme.css?v=dc5ed815"> <link rel="stylesheet" type="text/css" href="../../_static/design-style.1e8bd061cd6da7fc9cf755528e8ffc24.min.css?v=0a3b3ea7"> <link rel="shortcut icon" href="../../_static/firefox.ico"><!--[if lt IE 9]> <script src="../../_static/js/html5shiv.min.js"></script> <![endif]--> <script src="../../_static/jquery.js?v=5d32c60e"></script> <script src="../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script> <script src="../../_static/documentation_options.js?v=5929fcd5"></script> <script src="../../_static/doctools.js?v=9a2dae69"></script> <script src="../../_static/sphinx_highlight.js?v=dc90522c"></script> <script src="../../_static/clipboard.min.js?v=a7894cd8"></script> <script src="../../_static/copybutton.js?v=30646c52"></script> <script src="../../_static/design-tabs.js?v=36754332"></script> <script src="../../_static/js/theme.js"></script> <link rel="index" title="Index" href="../../genindex.html"> <link rel="search" title="Search" href="../../search.html"> <link rel="next" title="Automated Testing" href="../../testing/automated-testing/index.html"> <link rel="prev" title="Server Synchronization" href="../../tools/moztreedocs/server-synchronization.html"> <meta http-equiv="X-Translated-By" content="Google"> <meta http-equiv="X-Translated-To" content="iw"> <script type="text/javascript" src="https://www.gstatic.com/_/translate_http/_/js/k=translate_http.tr.en_GB.tKc6KWkFf-8.O/am=gAE/d=1/rs=AN8SPfrf36LIV3DkhtRBGWFnLWWzaykPyw/m=corsproxy" data-sourceurl="https://firefox-source-docs.mozilla.org/mozbuild/vendor/index.html"></script> <link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200" rel="stylesheet"> <script type="text/javascript" src="https://www.gstatic.com/_/translate_http/_/js/k=translate_http.tr.en_GB.tKc6KWkFf-8.O/am=gAE/d=1/exm=corsproxy/ed=1/rs=AN8SPfrf36LIV3DkhtRBGWFnLWWzaykPyw/m=phishing_protection" data-phishing-protection-enabled="false" data-forms-warning-enabled="true" data-source-url="https://firefox-source-docs.mozilla.org/mozbuild/vendor/index.html"></script> <meta name="robots" content="none"> </head> <body class="wy-body-for-nav"> <script type="text/javascript" src="https://www.gstatic.com/_/translate_http/_/js/k=translate_http.tr.en_GB.tKc6KWkFf-8.O/am=gAE/d=1/exm=corsproxy,phishing_protection/ed=1/rs=AN8SPfrf36LIV3DkhtRBGWFnLWWzaykPyw/m=navigationui" data-environment="prod" data-proxy-url="https://firefox--source--docs-mozilla-org.translate.goog" data-proxy-full-url="https://firefox--source--docs-mozilla-org.translate.goog/mozbuild/vendor/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB" data-source-url="https://firefox-source-docs.mozilla.org/mozbuild/vendor/index.html" data-source-language="pl" data-target-language="iw" data-display-language="en-GB" data-detected-source-language="" data-is-source-untranslated="false" data-source-untranslated-url="https://translate.google.com/website?sl=pl&amp;tl=iw&amp;hl=en-GB&amp;u=https://firefox-source-docs.mozilla.org/mozbuild/vendor/index.html&amp;anno=2" data-client="tr"></script> <div class="wy-grid-for-nav"> <nav data-toggle="wy-nav-shift" class="wy-nav-side"> <div class="wy-side-scroll"> <div class="wy-side-nav-search"><a href="https://firefox--source--docs-mozilla-org.translate.goog/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB" class="icon icon-home"> Firefox Source Docs <img src="../../_static/firefox-wordmark.svg" class="logo" alt="Logo"> </a><!-- -- This code is governed by the BSD license ----> <div> <h3>Quick search</h3> <script> (function () { var cx = "dd12886298f75dbef"; var gcse = document.createElement("script"); gcse.async = true; gcse.src = "https://cse.google.com/cse.js?cx=" + cx; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(gcse, s); })(); </script><gcse:search></gcse:search> </div> </div> <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu"> <p class="caption" role="heading"><span class="caption-text">Overview</span></p> <ul> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/glossary/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">A Glossary of Common Terms</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/overview/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">A Quick Guide to Mozilla Applications</a></li> </ul> <p class="caption" role="heading"><span class="caption-text">Getting Started</span></p> <ul> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/setup/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Getting Set Up To Work On The Firefox Codebase</a></li> </ul> <p class="caption" role="heading"><span class="caption-text">Working On Firefox</span></p> <ul> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/contributing/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Working on Firefox</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/bug-mgmt/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Bug Handling</a></li> </ul> <p class="caption" role="heading"><span class="caption-text">Firefox User Guide</span></p> <ul> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/devtools-user/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Firefox DevTools User Docs</a></li> </ul> <p class="caption" role="heading"><span class="caption-text">Source Code Documentation</span></p> <ul> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/mots/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Governance</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/browser/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Firefox Front-end</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/dom/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">DOM</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/editor/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Editor</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/layout/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Style system (CSS) &amp; Layout</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/gfx/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Graphics</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/ipc/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Processes, Threads and IPC</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/devtools/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Firefox DevTools Contributor Docs</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/toolkit/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Toolkit</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/js/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">SpiderMonkey</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/jsloader/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">JS Loader</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/mobile/android/geckoview/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">GeckoView</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/mobile/android/fenix/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Fenix</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/mobile/android/focus-android/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Focus for Android</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/dom/bindings/webidl/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">WebIDL</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/modules/libpref/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">libpref</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/networking/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Networking</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/remote/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Remote Protocols</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/services/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Services</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/permissions/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Permissions</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/uriloader/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">File Handling</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/widget/cocoa/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Firefox on macOS</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/widget/windows/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Firefox on Windows</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/toolkit/components/ml/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Firefox AI Runtime</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/accessible/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Accessibility</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/media/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Media Playback</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/code-quality/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Code quality</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/writing-rust-code/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Writing Rust Code</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/rust-components/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Rust Components</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/tools/profiler/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Gecko Profiler</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/performance/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Performance</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/storage/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Database bindings (SQLite, KV, …)</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/xpcom/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">XPCOM</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/nspr/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">NSPR</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/security/nss/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Network Security Services (NSS)</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/content-security/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Web Security Checks in Gecko</a></li> </ul> <p class="caption" role="heading"><span class="caption-text">The Firefox Build System</span></p> <ul class="current"> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/mach/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Mach</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/tools/try/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Pushing to Try</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/build/buildsystem/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Build System</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/taskcluster/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Firefox CI and Taskgraph</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/tools/moztreedocs/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Managing Documentation</a></li> <li class="toctree-l1 current"><a class="current reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/mozbuild/vendor/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#">Vendoring Third Party Components</a> <ul> <li class="toctree-l2"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/mozbuild/vendor/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#template-moz-yaml-file">Template <code class="docutils literal notranslate"><span class="pre">moz.yaml</span></code> file</a></li> <li class="toctree-l2"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/mozbuild/vendor/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#common-vendoring-operations">Common Vendoring Operations</a></li> </ul></li> </ul> <p class="caption" role="heading"><span class="caption-text">Testing &amp; Test Infrastructure</span></p> <ul> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/automated-testing/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Automated Testing</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/treeherder-try/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Understanding Treeherder Results</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/sheriffed-intermittents/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Sheriffed intermittent failures</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/tests-for-new-config/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Turning on Firefox tests for a new configuration</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/intermittent/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Avoiding intermittent tests</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/testing-policy/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Testing Policy</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/ci-configs/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Configuration Changes</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/browser-chrome/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Browser chrome mochitests</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/chrome-tests/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Chrome Tests</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/marionette/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Marionette</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/geckodriver/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">geckodriver</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/test-verification/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Test Verification</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/webrender/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">WebRender Tests</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/mochitest-plain/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Mochitest</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/xpcshell/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">XPCShell tests</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/tps/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">TPS</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/web-platform/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">web-platform-tests</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/gtest/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">GTest</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/tools/fuzzing/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Fuzzing</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/tools/sanitizer/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Sanitizer</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing/perfdocs/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Performance Testing</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/tools/code-coverage/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Code coverage</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/testing-rust-code/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Testing &amp; Debugging Rust Code</a></li> </ul> <p class="caption" role="heading"><span class="caption-text">Releases &amp; Updates</span></p> <ul> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/update-infrastructure/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Mozilla Update Infrastructure</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/update-infrastructure/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#watershed-updates">Watershed Updates</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/update-infrastructure/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#desupport-updates">Desupport Updates</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/tools/update-verify/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Update Verify</a></li> </ul> <p class="caption" role="heading"><span class="caption-text">Localization &amp; Internationalization</span></p> <ul> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/intl/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Internationalization</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/l10n/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Localization</a></li> </ul> <p class="caption" role="heading"><span class="caption-text">Firefox and Python</span></p> <ul> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/mozbase/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">mozbase</a></li> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/python/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Using third-party Python packages</a></li> </ul> <p class="caption" role="heading"><span class="caption-text">Metrics Collected in Firefox</span></p> <ul> <li class="toctree-l1"><a class="reference internal" href="https://firefox--source--docs-mozilla-org.translate.goog/metrics/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Metrics</a></li> </ul> </div> </div> </nav> <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"> <nav class="wy-nav-top" aria-label="Mobile navigation menu"><i data-toggle="wy-nav-top" class="fa fa-bars"></i> <a href="https://firefox--source--docs-mozilla-org.translate.goog/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB">Firefox Source Docs</a> </nav> <div class="wy-nav-content"> <div class="rst-content"><!-- This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this file, - You can obtain one at http://mozilla.org/MPL/2.0/. --> <div role="navigation" aria-label="Page navigation"> <ul class="wy-breadcrumbs"> <li><a href="https://firefox--source--docs-mozilla-org.translate.goog/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB" class="icon icon-home" aria-label="Home"></a></li> <li class="breadcrumb-item active">Vendoring Third Party Components</li> <li class="wy-breadcrumbs-aside"><a href="https://translate.google.com/website?sl=pl&amp;tl=iw&amp;hl=en-GB&amp;u=https://bugzilla.mozilla.org/enter_bug.cgi?product%3DDeveloper%2BInfrastructure%26component%3DFirefox%2BSource%2BDocs%253A%2BContent%26short_desc%3DDocumentation%2Bissue%2Bon%2Bmozbuild/vendor/index%26comment%3DURL%2B%3D%2Bhttps://firefox-source-docs.mozilla.org/mozbuild/vendor/index.html%26bug_file_loc%3Dhttps://firefox-source-docs.mozilla.org/mozbuild/vendor/index.html" rel="nofollow">Report an issue</a> / <a href="https://firefox--source--docs-mozilla-org.translate.goog/_sources/mozbuild/vendor/index.rst.txt?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB" rel="nofollow"> View page source</a></li> </ul> <hr> </div> <div role="main" class="document" itemscope itemtype="http://schema.org/Article"> <div itemprop="articleBody"> <section id="vendoring-third-party-components"> <h1>Vendoring Third Party Components<a class="headerlink" href="https://firefox--source--docs-mozilla-org.translate.goog/mozbuild/vendor/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#vendoring-third-party-components" title="Link to this heading"></a></h1> <p>The firefox source tree vendors many third party dependencies. The build system provides a normalized way to keep track of:</p> <ol class="arabic simple"> <li><p>The upstream source license, location and revision</p></li> <li><p>(Optionally) The upstream source modification, including</p> <ol class="arabic simple"> <li><p>Mozilla-specific patches</p></li> <li><p>Custom update actions, such as excluding some files, moving files around etc.</p></li> </ol></li> </ol> <p>This is done through a descriptive <code class="docutils literal notranslate"><span class="pre">moz.yaml</span></code> file added to the third party sources, and the use of:</p> <div class="highlight-sh notranslate"> <div class="highlight"> <pre><span></span>./mach<span class="w"> </span>vendor<span class="w"> </span><span class="o">[</span>options<span class="o">]</span><span class="w"> </span>./path/to/moz.yaml </pre> </div> </div> <p>to interact with it.</p> <section id="template-moz-yaml-file"> <h2>Template <code class="docutils literal notranslate"><span class="pre">moz.yaml</span></code> file<a class="headerlink" href="https://firefox--source--docs-mozilla-org.translate.goog/mozbuild/vendor/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#template-moz-yaml-file" title="Link to this heading"></a></h2> <div class="highlight-YAML notranslate"> <div class="highlight"> <pre><span></span><span class="nn">---</span> <span class="c1"># Third-Party Library Template</span> <span class="c1"># All fields are mandatory unless otherwise noted</span> <span class="c1"># Version of this schema</span> <span class="nt">schema</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">1</span> <span class="nt">bugzilla</span><span class="p">:</span> <span class="w"> </span><span class="c1"># Bugzilla product and component for this directory and subdirectories</span> <span class="w"> </span><span class="nt">product</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">product name</span> <span class="w"> </span><span class="nt">component</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">component name</span> <span class="c1"># Document the source of externally hosted code</span> <span class="nt">origin</span><span class="p">:</span> <span class="w"> </span><span class="c1"># Short name of the package/library</span> <span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">name of the package</span> <span class="w"> </span><span class="nt">description</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">short (one line) description</span> <span class="w"> </span><span class="c1"># Full URL for the package's homepage/etc</span> <span class="w"> </span><span class="c1"># Usually different from repository url</span> <span class="w"> </span><span class="nt">url</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">package's homepage url</span> <span class="w"> </span><span class="c1"># Human-readable identifier for this version/release</span> <span class="w"> </span><span class="c1"># Generally "version NNN", "tag SSS", "bookmark SSS"</span> <span class="w"> </span><span class="nt">release</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">identifier</span> <span class="w"> </span><span class="c1"># Revision to pull in</span> <span class="w"> </span><span class="c1"># Must be a long or short commit SHA (long preferred)</span> <span class="w"> </span><span class="nt">revision</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">sha</span> <span class="w"> </span><span class="c1"># The package's license, where possible using the mnemonic from</span> <span class="w"> </span><span class="c1"># https://spdx.org/licenses/</span> <span class="w"> </span><span class="c1"># Multiple licenses can be specified (as a YAML list)</span> <span class="w"> </span><span class="c1"># A "LICENSE" file must exist containing the full license text</span> <span class="w"> </span><span class="nt">license</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">MPL-2.0</span> <span class="w"> </span><span class="c1"># If the package's license is specified in a particular file,</span> <span class="w"> </span><span class="c1"># this is the name of the file.</span> <span class="w"> </span><span class="c1"># optional</span> <span class="w"> </span><span class="nt">license-file</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">COPYING</span> <span class="w"> </span><span class="c1"># If there are any mozilla-specific notes you want to put</span> <span class="w"> </span><span class="c1"># about a library, they can be put here.</span> <span class="w"> </span><span class="nt">notes</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">Notes about the library</span> <span class="c1"># Configuration for the automated vendoring system.</span> <span class="c1"># optional</span> <span class="nt">vendoring</span><span class="p">:</span> <span class="w"> </span><span class="c1"># Repository URL to vendor from</span> <span class="w"> </span><span class="c1"># eg. https://github.com/kinetiknz/nestegg</span> <span class="w"> </span><span class="c1"># Any repository host can be specified here, however initially we'll only</span> <span class="w"> </span><span class="c1"># support automated vendoring from selected sources.</span> <span class="w"> </span><span class="nt">url</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">source url (generally repository clone url)</span> <span class="w"> </span><span class="c1"># Type of hosting for the upstream repository</span> <span class="w"> </span><span class="c1"># Valid values are 'gitlab', 'github', googlesource</span> <span class="w"> </span><span class="nt">source-hosting</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">gitlab</span> <span class="w"> </span><span class="c1"># Type of Vendoring</span> <span class="w"> </span><span class="c1"># This is either 'regular', 'individual-files', or 'rust'</span> <span class="w"> </span><span class="c1"># If omitted, will default to 'regular'</span> <span class="w"> </span><span class="nt">flavor</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">rust</span> <span class="w"> </span><span class="c1"># Type of git reference (commit, tag) to track updates from.</span> <span class="w"> </span><span class="c1"># You cannot use tag tracking with the individual-files flavor</span> <span class="w"> </span><span class="c1"># If omitted, will default to tracking commits.</span> <span class="w"> </span><span class="nt">tracking</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">commit</span> <span class="w"> </span><span class="c1"># When using tag tracking (only on Github currently) use a release artifact</span> <span class="w"> </span><span class="c1"># for the source code instead of the automatically built git-archive exports.</span> <span class="w"> </span><span class="c1"># The source repository must build these artifacts with consistent filenames</span> <span class="w"> </span><span class="c1"># for every tag. This is useful when the Github repository uses submodules</span> <span class="w"> </span><span class="c1"># since they are not included in the git-archives.</span> <span class="w"> </span><span class="c1"># Substitution is performed on the filename, {tag} is replaced with the tag name.</span> <span class="w"> </span><span class="c1"># optional</span> <span class="w"> </span><span class="nt">release-artifact</span><span class="p">:</span><span class="w"> </span><span class="s">"rnp-{tag}.tar.gz"</span> <span class="w"> </span><span class="c1"># Base directory of the location where the source files will live in-tree.</span> <span class="w"> </span><span class="c1"># If omitted, will default to the location the moz.yaml file is in.</span> <span class="w"> </span><span class="nt">vendor-directory</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">third_party/directory</span> <span class="w"> </span><span class="c1"># Allows skipping certain steps of the vendoring process.</span> <span class="w"> </span><span class="c1"># Most useful if e.g. vendoring upstream is complicated and should be done by a script</span> <span class="w"> </span><span class="c1"># The valid steps that can be skipped are listed below</span> <span class="w"> </span><span class="nt">skip-vendoring-steps</span><span class="p">:</span> <span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">fetch</span> <span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">keep</span> <span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">include</span> <span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">exclude</span> <span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">move-contents</span> <span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">hg-add</span> <span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">spurious-check</span> <span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">update-moz-yaml</span> <span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">update-moz-build</span> <span class="w"> </span><span class="c1"># List of patch files to apply after vendoring. Applied in the order</span> <span class="w"> </span><span class="c1"># specified, and alphabetically if globbing is used. Patches must apply</span> <span class="w"> </span><span class="c1"># cleanly before changes are pushed.</span> <span class="w"> </span><span class="c1"># Patch files should be relative to the vendor-directory rather than the gecko</span> <span class="w"> </span><span class="c1"># root directory.</span> <span class="w"> </span><span class="c1"># All patch files are implicitly added to the keep file list.</span> <span class="w"> </span><span class="c1"># optional</span> <span class="w"> </span><span class="nt">patches</span><span class="p">:</span> <span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">file</span> <span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">path/to/file</span> <span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">path/*.patch</span> <span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">path/**</span><span class="w"> </span><span class="c1"># Captures all files and subdirectories below path</span> <span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">path/*</span><span class="w"> </span><span class="c1"># Captures all files but _not_ subdirectories below path. Equivalent to `path/`</span> <span class="w"> </span><span class="c1"># List of files that are not removed from the destination directory while vendoring</span> <span class="w"> </span><span class="c1"># in a new version of the library. Intended for mozilla files not present in upstream.</span> <span class="w"> </span><span class="c1"># Implicitly contains "moz.yaml", "moz.build", and any files referenced in</span> <span class="w"> </span><span class="c1"># "patches"</span> <span class="w"> </span><span class="c1"># optional</span> <span class="w"> </span><span class="nt">keep</span><span class="p">:</span> <span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">file</span> <span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">path/to/file</span> <span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">another/path</span> <span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="err">*</span><span class="l l-Scalar l-Scalar-Plain">.mozilla</span> <span class="w"> </span><span class="c1"># Files/paths that will not be vendored from the upstream repository</span> <span class="w"> </span><span class="c1"># Implicitly contains ".git", and ".gitignore"</span> <span class="w"> </span><span class="c1"># optional</span> <span class="w"> </span><span class="nt">exclude</span><span class="p">:</span> <span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">file</span> <span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">path/to/file</span> <span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">another/path</span> <span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">docs</span> <span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">src/*.test</span> <span class="w"> </span><span class="c1"># Files/paths that will always be vendored from source repository, even if</span> <span class="w"> </span><span class="c1"># they would otherwise be excluded by "exclude".</span> <span class="w"> </span><span class="c1"># optional</span> <span class="w"> </span><span class="nt">include</span><span class="p">:</span> <span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">file</span> <span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">path/to/file</span> <span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">another/path</span> <span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">docs/LICENSE.*</span> <span class="w"> </span><span class="c1"># Files that are modified as part of the update process.</span> <span class="w"> </span><span class="c1"># To avoid creating updates that don't update anything, ./mach vendor will detect</span> <span class="w"> </span><span class="c1"># if any in-tree files have changed. If there are files that are always changed</span> <span class="w"> </span><span class="c1"># during an update process (e.g. version numbers or source revisions), list them</span> <span class="w"> </span><span class="c1"># here to avoid having them counted as substative changes.</span> <span class="w"> </span><span class="c1"># This field does NOT support directories or globbing</span> <span class="w"> </span><span class="c1"># optional</span> <span class="w"> </span><span class="nt">generated</span><span class="p">:</span> <span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="s">'{yaml_dir}/vcs_version.h'</span> <span class="w"> </span><span class="c1"># If neither "exclude" or "include" are set, all files will be vendored</span> <span class="w"> </span><span class="c1"># Files/paths in "include" will always be vendored, even if excluded</span> <span class="w"> </span><span class="c1"># eg. excluding "docs/" then including "docs/LICENSE" will vendor just the</span> <span class="w"> </span><span class="c1"># LICENSE file from the docs directory</span> <span class="w"> </span><span class="c1"># All three file/path parameters ("keep", "exclude", and "include") support</span> <span class="w"> </span><span class="c1"># filenames, directory names, and globs/wildcards.</span> <span class="w"> </span><span class="c1"># Actions to take after updating. Applied in order.</span> <span class="w"> </span><span class="c1"># The action subfield is required. It must be one of:</span> <span class="w"> </span><span class="c1"># - copy-file</span> <span class="w"> </span><span class="c1"># - move-file</span> <span class="w"> </span><span class="c1"># - move-dir</span> <span class="w"> </span><span class="c1"># - replace-in-file</span> <span class="w"> </span><span class="c1"># - replace-in-file-regex</span> <span class="w"> </span><span class="c1"># - delete-path</span> <span class="w"> </span><span class="c1"># - run-script</span> <span class="w"> </span><span class="c1"># Unless otherwise noted, all subfields of action are required.</span> <span class="w"> </span><span class="c1">#</span> <span class="w"> </span><span class="c1"># If the action is copy-file, move-file, or move-dir:</span> <span class="w"> </span><span class="c1"># from is the source file</span> <span class="w"> </span><span class="c1"># to is the destination</span> <span class="w"> </span><span class="c1">#</span> <span class="w"> </span><span class="c1"># If the action is replace-in-file or replace-in-file-regex:</span> <span class="w"> </span><span class="c1"># pattern is what in the file to search for. It is an exact strng match.</span> <span class="w"> </span><span class="c1"># with is the string to replace it with. Accepts the special keyword</span> <span class="w"> </span><span class="c1"># '{revision}' for the commit we are updating to.</span> <span class="w"> </span><span class="c1"># File is the file to replace it in.</span> <span class="w"> </span><span class="c1">#</span> <span class="w"> </span><span class="c1"># If the action is delete-path</span> <span class="w"> </span><span class="c1"># path is the file or directory to recursively delete</span> <span class="w"> </span><span class="c1">#</span> <span class="w"> </span><span class="c1"># If the action is run-script:</span> <span class="w"> </span><span class="c1"># script is the script to run</span> <span class="w"> </span><span class="c1"># cwd is the directory the script should run with as its cwd</span> <span class="w"> </span><span class="c1"># args is a list of arguments to pass to the script</span> <span class="w"> </span><span class="c1">#</span> <span class="w"> </span><span class="c1"># If the action is run-command:</span> <span class="w"> </span><span class="c1"># command is the command to run</span> <span class="w"> </span><span class="c1"># Unlike run-script, `command` is _not_ processed to be relative</span> <span class="w"> </span><span class="c1"># to the vendor directory, and is passed directly to python's</span> <span class="w"> </span><span class="c1"># execution code without any path substitution or manipulation</span> <span class="w"> </span><span class="c1"># cwd is the directory the command should run with as its cwd</span> <span class="w"> </span><span class="c1"># args is a list of arguments to pass to the command</span> <span class="w"> </span><span class="c1">#</span> <span class="w"> </span><span class="c1">#</span> <span class="w"> </span><span class="c1"># Unless specified otherwise, all files/directories are relative to the</span> <span class="w"> </span><span class="c1"># vendor-directory. If the vendor-directory is different from the</span> <span class="w"> </span><span class="c1"># directory of the yaml file, the keyword '{yaml_dir}' may be used</span> <span class="w"> </span><span class="c1"># to make the path relative to that directory.</span> <span class="w"> </span><span class="c1"># 'run-script' supports the addictional keyword {cwd} which, if used,</span> <span class="w"> </span><span class="c1"># must only be used at the beginning of the path.</span> <span class="w"> </span><span class="c1">#</span> <span class="w"> </span><span class="c1"># optional</span> <span class="w"> </span><span class="nt">update-actions</span><span class="p">:</span> <span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">action</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">copy-file</span> <span class="w"> </span><span class="nt">from</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">include/vcs_version.h.in</span> <span class="w"> </span><span class="nt">to</span><span class="p">:</span><span class="w"> </span><span class="s">'{yaml_dir}/vcs_version.h'</span> <span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">action</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">replace-in-file</span> <span class="w"> </span><span class="nt">pattern</span><span class="p">:</span><span class="w"> </span><span class="s">'@VCS_TAG@'</span> <span class="w"> </span><span class="nt">with</span><span class="p">:</span><span class="w"> </span><span class="s">'{revision}'</span> <span class="w"> </span><span class="nt">file</span><span class="p">:</span><span class="w"> </span><span class="s">'{yaml_dir}/vcs_version.h'</span> <span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">action</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">delete-path</span> <span class="w"> </span><span class="nt">path</span><span class="p">:</span><span class="w"> </span><span class="s">'{yaml_dir}/config'</span> <span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">action</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">run-script</span> <span class="w"> </span><span class="nt">script</span><span class="p">:</span><span class="w"> </span><span class="s">'{cwd}/generate_sources.sh'</span> <span class="w"> </span><span class="nt">cwd</span><span class="p">:</span><span class="w"> </span><span class="s">'{yaml_dir}'</span> <span class="c1"># Configuration for automatic updating system.</span> <span class="c1"># optional</span> <span class="nt">updatebot</span><span class="p">:</span> <span class="w"> </span><span class="c1"># TODO: allow multiple users to be specified</span> <span class="w"> </span><span class="c1"># Phabricator username for a maintainer of the library, used for assigning</span> <span class="w"> </span><span class="c1"># reviewers. For a review group, preface with #, such as "#build""</span> <span class="w"> </span><span class="nt">maintainer-phab</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">tjr</span> <span class="w"> </span><span class="c1"># Bugzilla email address for a maintainer of the library, used for needinfos</span> <span class="w"> </span><span class="nt">maintainer-bz</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">tom@mozilla.com</span> <span class="w"> </span><span class="c1"># Optional: A preset for ./mach try to use. If present, fuzzy-query and fuzzy-paths will</span> <span class="w"> </span><span class="c1"># be ignored. If it, fuzzy-query, and fuzzy-path are omitted, ./mach try auto will be used</span> <span class="w"> </span><span class="nt">try-preset</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">media</span> <span class="w"> </span><span class="c1"># Optional: A query string for ./mach try fuzzy. If try-preset, it and fuzzy-paths are omitted</span> <span class="w"> </span><span class="c1"># then ./mach try auto will be used</span> <span class="w"> </span><span class="nt">fuzzy-query</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">media</span> <span class="w"> </span><span class="c1"># Optional: An array of test paths for ./mach try fuzzy. If try-preset, it and fuzzy-query are</span> <span class="w"> </span><span class="c1"># omitted then ./mach try auto will be used</span> <span class="w"> </span><span class="nt">fuzzy-paths</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">[</span><span class="s">'media'</span><span class="p p-Indicator">]</span> <span class="w"> </span><span class="c1"># The tasks that Updatebot can run. Only one of each task is currently permitted</span> <span class="w"> </span><span class="c1"># optional</span> <span class="w"> </span><span class="nt">tasks</span><span class="p">:</span> <span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">type</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">commit-alert</span> <span class="w"> </span><span class="nt">branch</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">upstream-branch-name</span> <span class="w"> </span><span class="nt">cc</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">[</span><span class="s">"bugzilla@email.address"</span><span class="p p-Indicator">,</span><span class="w"> </span><span class="s">"another@example.com"</span><span class="p p-Indicator">]</span> <span class="w"> </span><span class="nt">needinfo</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">[</span><span class="s">"bugzilla@email.address"</span><span class="p p-Indicator">,</span><span class="w"> </span><span class="s">"another@example.com"</span><span class="p p-Indicator">]</span> <span class="w"> </span><span class="nt">enabled</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">True</span> <span class="w"> </span><span class="nt">filter</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">security</span> <span class="w"> </span><span class="nt">frequency</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">every</span> <span class="w"> </span><span class="nt">platform</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">windows</span> <span class="w"> </span><span class="nt">blocking</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">1234</span> <span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">type</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">vendoring</span> <span class="w"> </span><span class="nt">branch</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">master</span> <span class="w"> </span><span class="nt">enabled</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">False</span> <span class="w"> </span><span class="c1"># frequency can be 'every', 'release', 'N weeks', 'N commits'</span> <span class="w"> </span><span class="c1"># or 'N weeks, M commits' requiring satisfying both constraints.</span> <span class="w"> </span><span class="nt">frequency</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">2 weeks</span> </pre> </div> </div> </section> <section id="common-vendoring-operations"> <h2>Common Vendoring Operations<a class="headerlink" href="https://firefox--source--docs-mozilla-org.translate.goog/mozbuild/vendor/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB#common-vendoring-operations" title="Link to this heading"></a></h2> <p>Update to the latest upstream revision:</p> <div class="highlight-sh notranslate"> <div class="highlight"> <pre><span></span>./mach<span class="w"> </span>vendor<span class="w"> </span>/path/to/moz.yaml </pre> </div> </div> <p>Check for latest revision, returning no output if it is up-to-date, and a version identifier if it needs to be updated:</p> <div class="highlight-sh notranslate"> <div class="highlight"> <pre><span></span>./mach<span class="w"> </span>vendor<span class="w"> </span>/path/to/moz.yaml<span class="w"> </span>--check-for-update </pre> </div> </div> <p>Vendor a specific revision:</p> <div class="highlight-sh notranslate"> <div class="highlight"> <pre><span></span>./mach<span class="w"> </span>vendor<span class="w"> </span>/path/to/moz.yaml<span class="w"> </span>-r<span class="w"> </span><span class="nv">$REVISION</span><span class="w"> </span>--force </pre> </div> </div> <p>In the presence of patches, two steps are needed:</p> <ol class="arabic simple"> <li><p>Vendor without applying patches (patches are applied <em>after</em> <code class="docutils literal notranslate"><span class="pre">update-actions</span></code>) through <code class="docutils literal notranslate"><span class="pre">--patch-mode</span> <span class="pre">none</span></code></p></li> <li><p>Apply patches on updated sources through <code class="docutils literal notranslate"><span class="pre">--patch</span> <span class="pre">-mode</span> <span class="pre">only</span></code></p></li> </ol> <p>In the absence of patches, a single step is needed, and no extra argument is required.</p> </section> </section> </div> </div> <footer> <div class="rst-footer-buttons" role="navigation" aria-label="Footer"><a href="https://firefox--source--docs-mozilla-org.translate.goog/tools/moztreedocs/server-synchronization.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB" class="btn btn-neutral float-left" title="Server Synchronization" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a> <a href="https://firefox--source--docs-mozilla-org.translate.goog/testing/automated-testing/index.html?_x_tr_sl=pl&amp;_x_tr_tl=iw&amp;_x_tr_hl=en-GB" class="btn btn-neutral float-right" title="Automated Testing" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a> </div> <hr> <div role="contentinfo"> <p></p> </div> Built with <a href="https://translate.google.com/website?sl=pl&amp;tl=iw&amp;hl=en-GB&amp;u=https://www.sphinx-doc.org/">Sphinx</a> using a <a href="https://translate.google.com/website?sl=pl&amp;tl=iw&amp;hl=en-GB&amp;u=https://github.com/readthedocs/sphinx_rtd_theme">theme</a> provided by <a href="https://translate.google.com/website?sl=pl&amp;tl=iw&amp;hl=en-GB&amp;u=https://readthedocs.org">Read the Docs</a>. </footer> </div> </div> </section> </div> <script> jQuery(function () { SphinxRtdTheme.Navigation.enable(true); }); </script> <script>function gtElInit() {var lib = new google.translate.TranslateService();lib.translatePage('pl', 'iw', function () {});}</script> <script src="https://translate.google.com/translate_a/element.js?cb=gtElInit&amp;hl=en-GB&amp;client=wt" type="text/javascript"></script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10