| <!DOCTYPE html> |
| <html class="writer-html5" lang="en" data-content_root="./"> |
| <head> |
| <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>Builtin public data — BuildStream 2.2.0+3.gc7274d41d 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" /> |
| |
| |
| <!--[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=f96d84dc"></script> |
| <script src="_static/doctools.js?v=9a2dae69"></script> |
| <script src="_static/sphinx_highlight.js?v=dc90522c"></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="The project.refs file" href="format_project_refs.html" /> |
| <link rel="prev" title="Declaring elements" href="format_declaring.html" /> |
| </head> |
| |
| <body class="wy-body-for-nav"> |
| <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="index.html" class="icon icon-home"> |
| BuildStream |
| </a> |
| <div class="version"> |
| 2.2.0+3.gc7274d41d |
| </div> |
| <div role="search"> |
| <form id="rtd-search-form" class="wy-form" action="search.html" method="get"> |
| <input type="text" name="q" placeholder="Search docs" aria-label="Search docs" /> |
| <input type="hidden" name="check_keywords" value="yes" /> |
| <input type="hidden" name="area" value="default" /> |
| </form> |
| </div> |
| </div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu"> |
| <ul class="current"> |
| <li class="toctree-l1"><a class="reference internal" href="main_about.html">About</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="main_install.html">Installing from Source</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="main_using.html">Using</a></li> |
| <li class="toctree-l1 current"><a class="reference internal" href="main_core.html">Reference</a><ul class="current"> |
| <li class="toctree-l2 current"><a class="reference internal" href="core_format.html">Project format</a><ul class="current"> |
| <li class="toctree-l3"><a class="reference internal" href="format_intro.html">Introduction</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="format_project.html">Project configuration</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="format_declaring.html">Declaring elements</a></li> |
| <li class="toctree-l3 current"><a class="current reference internal" href="#">Builtin public data</a><ul> |
| <li class="toctree-l4"><a class="reference internal" href="#integration-commands">Integration commands</a></li> |
| <li class="toctree-l4"><a class="reference internal" href="#split-rules">Split rules</a></li> |
| <li class="toctree-l4"><a class="reference internal" href="#overlap-whitelist">Overlap whitelist</a></li> |
| </ul> |
| </li> |
| <li class="toctree-l3"><a class="reference internal" href="format_project_refs.html">The project.refs file</a></li> |
| </ul> |
| </li> |
| <li class="toctree-l2"><a class="reference internal" href="core_plugins.html">Plugin specific documentation</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="core_framework.html">Plugin API reference</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="core_additional.html">Additional writings</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="buildstream.html">buildstream package</a></li> |
| </ul> |
| </li> |
| <li class="toctree-l1"><a class="reference internal" href="main_porting.html">Porting guide</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="CONTRIBUTING.html">Contributing</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="main_architecture.html">Architecture</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="main_glossary.html">Glossary</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="index.html">BuildStream</a> |
| </nav> |
| |
| <div class="wy-nav-content"> |
| <div class="rst-content"> |
| <div role="navigation" aria-label="Page navigation"> |
| <ul class="wy-breadcrumbs"> |
| <li><a href="index.html" class="icon icon-home" aria-label="Home"></a></li> |
| <li class="breadcrumb-item"><a href="main_core.html">Reference</a></li> |
| <li class="breadcrumb-item"><a href="core_format.html">Project format</a></li> |
| <li class="breadcrumb-item active">Builtin public data</li> |
| <li class="wy-breadcrumbs-aside"> |
| <a href="_sources/format_public.rst.txt" rel="nofollow"> View page source</a> |
| </li> |
| </ul> |
| <hr/> |
| </div> |
| <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> |
| <div itemprop="articleBody"> |
| |
| <section id="builtin-public-data"> |
| <span id="public-builtin"></span><h1>Builtin public data<a class="headerlink" href="#builtin-public-data" title="Link to this heading"></a></h1> |
| <p>Elements can provide public data which can be read by other elements |
| later in the pipeline, the format for exposing public data on a given |
| element is <a class="reference internal" href="format_declaring.html#format-public"><span class="std std-ref">described here</span></a>.</p> |
| <p>Any element may use public data for whatever purpose it wants, but |
| BuildStream has some built-in expectations of public data, which resides |
| completely in the <code class="docutils literal notranslate"><span class="pre">bst</span></code> domain.</p> |
| <p>In this section we will describe the public data in the <code class="docutils literal notranslate"><span class="pre">bst</span></code> domain.</p> |
| <section id="integration-commands"> |
| <span id="public-integration"></span><h2>Integration commands<a class="headerlink" href="#integration-commands" title="Link to this heading"></a></h2> |
| <div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="c1"># Specify some integration commands</span> |
| <span class="nt">public</span><span class="p">:</span> |
| <span class="w"> </span><span class="nt">bst</span><span class="p">:</span> |
| <span class="w"> </span><span class="nt">integration-commands</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">/usr/bin/update-fancy-feature-cache</span> |
| </pre></div> |
| </div> |
| <p>The built-in <code class="docutils literal notranslate"><span class="pre">integration-commands</span></code> list indicates that depending elements |
| should run this set of commands before expecting the staged runtime environment |
| to be functional.</p> |
| <p>Typical cases for this include running <code class="docutils literal notranslate"><span class="pre">ldconfig</span></code> at the base of a pipeline, |
| or running commands to update various system caches.</p> |
| <p>Integration commands of a given element are automatically run by the |
| <a class="reference internal" href="buildstream.element.html#buildstream.element.Element.integrate" title="buildstream.element.Element.integrate"><code class="xref py py-func docutils literal notranslate"><span class="pre">Element.integrate()</span></code></a> method |
| and are used by various plugins.</p> |
| <p>Notably the <a class="reference internal" href="buildstream.buildelement.html#module-buildstream.buildelement" title="buildstream.buildelement"><code class="xref py py-mod docutils literal notranslate"><span class="pre">BuildElement</span></code></a> derived classes |
| will always integrate the build dependencies after staging and before running |
| any build commands.</p> |
| </section> |
| <section id="split-rules"> |
| <span id="public-split-rules"></span><h2>Split rules<a class="headerlink" href="#split-rules" title="Link to this heading"></a></h2> |
| <div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="c1"># Specify some split rules</span> |
| <span class="nt">public</span><span class="p">:</span> |
| <span class="w"> </span><span class="nt">bst</span><span class="p">:</span> |
| <span class="w"> </span><span class="nt">split-rules</span><span class="p">:</span> |
| <span class="w"> </span><span class="nt">runtime</span><span class="p">:</span> |
| <span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="p p-Indicator">|</span> |
| <span class="w"> </span><span class="no">%{bindir}/*</span> |
| <span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="p p-Indicator">|</span> |
| <span class="w"> </span><span class="no">%{sbindir}/*</span> |
| <span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="p p-Indicator">|</span> |
| <span class="w"> </span><span class="no">%{libexecdir}/*</span> |
| <span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="p p-Indicator">|</span> |
| <span class="w"> </span><span class="no">%{libdir}/lib*.so*</span> |
| </pre></div> |
| </div> |
| <p>Split rules indicate how the output of an element can be categorized |
| into <em>domains</em>.</p> |
| <p>The <code class="docutils literal notranslate"><span class="pre">split-rules</span></code> domains are used by the |
| <a class="reference internal" href="buildstream.element.html#buildstream.element.Element.stage_artifact" title="buildstream.element.Element.stage_artifact"><code class="xref py py-func docutils literal notranslate"><span class="pre">Element.stage_artifact()</span></code></a> |
| method when deciding what domains of an artifact should be staged.</p> |
| <p>The strings listed in each domain are first substituted with the |
| <a class="reference internal" href="format_declaring.html#format-variables"><span class="std std-ref">variables</span></a> in context of the given element, and |
| then applied as a glob style match, as understood by |
| <a class="reference internal" href="buildstream.utils.html#buildstream.utils.glob" title="buildstream.utils.glob"><code class="xref py py-func docutils literal notranslate"><span class="pre">utils.glob()</span></code></a></p> |
| <p>This is used for creating compositions with the <a class="reference internal" href="elements/compose.html#module-elements.compose" title="elements.compose"><code class="xref py py-mod docutils literal notranslate"><span class="pre">compose</span></code></a> |
| element and can be used by other deployment related elements for the purpose of |
| splitting element artifacts into separate packages.</p> |
| </section> |
| <section id="overlap-whitelist"> |
| <span id="public-overlap-whitelist"></span><h2>Overlap whitelist<a class="headerlink" href="#overlap-whitelist" title="Link to this heading"></a></h2> |
| <p>The overlap whitelist indicates which files this element is allowed to overlap |
| over other elements when staged together with other elements.</p> |
| <p>Each item in the overlap whitelist has substitutions applied from |
| <a class="reference internal" href="format_declaring.html#format-variables"><span class="std std-ref">variables</span></a>, and is then applied as a glob-style match |
| (i.e. <a class="reference internal" href="buildstream.utils.html#buildstream.utils.glob" title="buildstream.utils.glob"><code class="xref py py-func docutils literal notranslate"><span class="pre">utils.glob()</span></code></a>).</p> |
| <div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="nt">public</span><span class="p">:</span> |
| <span class="w"> </span><span class="nt">bst</span><span class="p">:</span> |
| <span class="w"> </span><span class="nt">overlap-whitelist</span><span class="p">:</span> |
| <span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="p p-Indicator">|</span> |
| <span class="w"> </span><span class="no">%{sysconfdir}/*</span> |
| <span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="p p-Indicator">|</span> |
| <span class="w"> </span><span class="no">/etc/fontcache</span> |
| </pre></div> |
| </div> |
| </section> |
| </section> |
| |
| |
| </div> |
| </div> |
| <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer"> |
| <a href="format_declaring.html" class="btn btn-neutral float-left" title="Declaring elements" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a> |
| <a href="format_project_refs.html" class="btn btn-neutral float-right" title="The project.refs file" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a> |
| </div> |
| |
| <hr/> |
| |
| <div role="contentinfo"> |
| <p>© Copyright 2017-2022, The Apache Software Foundation.</p> |
| </div> |
| |
| Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a |
| <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a> |
| provided by <a href="https://readthedocs.org">Read the Docs</a>. |
| |
| |
| </footer> |
| </div> |
| </div> |
| </section> |
| </div> |
| <script> |
| jQuery(function () { |
| SphinxRtdTheme.Navigation.enable(true); |
| }); |
| </script> |
| |
| </body> |
| </html> |