blob: 159dfd1115b3d1f8d371dc78770693b6162cc39b [file]
<!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>patch plugin &mdash; BuildStream Plugins 2.7.0 documentation</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=03e43079" />
<link rel="stylesheet" type="text/css" href="../_static/css/theme.css?v=9edc463e" />
<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=dfec817d"></script>
<script src="../_static/doctools.js?v=fd6eb6e6"></script>
<script src="../_static/sphinx_highlight.js?v=6ffebe34"></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="pip plugin" href="pip.html" />
<link rel="prev" title="git plugin" href="git.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 Plugins
</a>
<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">
<p class="caption" role="heading"><span class="caption-text">Element Plugins</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../elements/autotools.html">autotools plugin</a></li>
<li class="toctree-l1"><a class="reference internal" href="../elements/cmake.html">cmake plugin</a></li>
<li class="toctree-l1"><a class="reference internal" href="../elements/make.html">make plugin</a></li>
<li class="toctree-l1"><a class="reference internal" href="../elements/meson.html">meson plugin</a></li>
<li class="toctree-l1"><a class="reference internal" href="../elements/pip.html">pip plugin</a></li>
<li class="toctree-l1"><a class="reference internal" href="../elements/setuptools.html">setuptools plugin</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Source Plugins</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="bzr.html">bzr plugin</a></li>
<li class="toctree-l1"><a class="reference internal" href="cargo.html">cargo plugin</a></li>
<li class="toctree-l1"><a class="reference internal" href="docker.html">docker plugin</a></li>
<li class="toctree-l1"><a class="reference internal" href="git.html">git plugin</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">patch plugin</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#patch-apply-locally-stored-patches">patch - apply locally stored patches</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#reporting-sourceinfo">Reporting SourceInfo</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="pip.html">pip plugin</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Source Mirror Plugins</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../sourcemirrors/simple_mirror.html">simple_mirror plugin</a></li>
<li class="toctree-l1"><a class="reference internal" href="../sourcemirrors/gitlab_lfs_mirror.html">gitlab_lfs_mirror plugin</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 Plugins</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 active">patch plugin</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/sources/patch.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="module-sources.patch">
<span id="patch-plugin"></span><h1>patch plugin<a class="headerlink" href="#module-sources.patch" title="Link to this heading"></a></h1>
<section id="patch-apply-locally-stored-patches">
<h2>patch - apply locally stored patches<a class="headerlink" href="#patch-apply-locally-stored-patches" title="Link to this heading"></a></h2>
<p><strong>Host dependencies:</strong></p>
<blockquote>
<div><ul class="simple">
<li><p>patch</p></li>
</ul>
</div></blockquote>
<p><strong>Usage:</strong></p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="c1"># Specify the local source kind</span>
<span class="nt">kind</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">patch</span>
<span class="c1"># Specify the project relative path to a patch file</span>
<span class="nt">path</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">files/somefile.diff</span>
<span class="c1"># Optionally specify the strip level, defaults to 1</span>
<span class="nt">strip-level</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">1</span>
</pre></div>
</div>
<p>See <a class="reference external" href="https://docs.buildstream.build/master/buildstream.source.html#core-source-builtins">built-in functionality doumentation</a> for
details on common configuration options for sources.</p>
<section id="reporting-sourceinfo">
<h3>Reporting <a class="reference external" href="https://docs.buildstream.build/master/buildstream.source.html#buildstream.source.SourceInfo">SourceInfo</a><a class="headerlink" href="#reporting-sourceinfo" title="Link to this heading"></a></h3>
<p>The patch source reports the project relative path of the patch file as the <em>url</em>.</p>
<p>Further, the patch source reports the <a class="reference external" href="https://docs.buildstream.build/master/buildstream.source.html#buildstream.source.SourceInfoMedium.LOCAL">SourceInfoMedium.LOCAL</a>
<em>medium</em> and the <a class="reference external" href="https://docs.buildstream.build/master/buildstream.source.html#buildstream.source.SourceVersionType.SHA256">SourceVersionType.SHA256</a>
<em>version_type</em>, for which it reports the sha256 checksum of the patch file as the <em>version</em>.</p>
<p>The <em>guess_version</em> of a patch source is meaningless, as it is tied instead to
the BuildStream project in which it is contained.</p>
</section>
</section>
</section>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="git.html" class="btn btn-neutral float-left" title="git plugin" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="pip.html" class="btn btn-neutral float-right" title="pip plugin" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>&#169; Copyright 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>