jekyll build from Action ac6ba43922
462
CONTRIBUTING/index.html
Normal file
@ -0,0 +1,462 @@
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
||||
|
||||
<link rel="stylesheet" href="/ostree/assets/css/just-the-docs-default.css">
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="/ostree/assets/js/vendor/lunr.min.js"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="/ostree/assets/js/just-the-docs.js"></script>
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Begin Jekyll SEO tag v2.8.0 -->
|
||||
<title>Contributing | ostreedev/ostree</title>
|
||||
<meta name="generator" content="Jekyll v3.9.5" />
|
||||
<meta property="og:title" content="Contributing" />
|
||||
<meta property="og:locale" content="en_US" />
|
||||
<meta name="description" content="ostree documentation" />
|
||||
<meta property="og:description" content="ostree documentation" />
|
||||
<link rel="canonical" href="https://ostreedev.github.io/ostree/CONTRIBUTING/" />
|
||||
<meta property="og:url" content="https://ostreedev.github.io/ostree/CONTRIBUTING/" />
|
||||
<meta property="og:site_name" content="ostreedev/ostree" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
<meta property="twitter:title" content="Contributing" />
|
||||
<script type="application/ld+json">
|
||||
{"@context":"https://schema.org","@type":"WebPage","description":"ostree documentation","headline":"Contributing","url":"https://ostreedev.github.io/ostree/CONTRIBUTING/"}</script>
|
||||
<!-- End Jekyll SEO tag -->
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<a class="skip-to-main" href="#main-content">Skip to main content</a>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="d-none">
|
||||
<symbol id="svg-link" viewBox="0 0 24 24">
|
||||
<title>Link</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link">
|
||||
<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<symbol id="svg-menu" viewBox="0 0 24 24">
|
||||
<title>Menu</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-menu">
|
||||
<line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
|
||||
<title>Expand</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right">
|
||||
<polyline points="9 18 15 12 9 6"></polyline>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<!-- Feather. MIT License: https://github.com/feathericons/feather/blob/master/LICENSE -->
|
||||
<symbol id="svg-external-link" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-external-link">
|
||||
<title id="svg-external-link-title">(external link)</title>
|
||||
<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line>
|
||||
</symbol>
|
||||
|
||||
|
||||
<symbol id="svg-doc" viewBox="0 0 24 24">
|
||||
<title>Document</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-file">
|
||||
<path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"></path><polyline points="13 2 13 9 20 9"></polyline>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<symbol id="svg-search" viewBox="0 0 24 24">
|
||||
<title>Search</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search">
|
||||
<circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
|
||||
|
||||
<!-- Bootstrap Icons. MIT License: https://github.com/twbs/icons/blob/main/LICENSE.md -->
|
||||
<symbol id="svg-copy" viewBox="0 0 16 16">
|
||||
<title>Copy</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-clipboard" viewBox="0 0 16 16">
|
||||
<path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z"/>
|
||||
<path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-copied" viewBox="0 0 16 16">
|
||||
<title>Copied</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-clipboard-check-fill" viewBox="0 0 16 16">
|
||||
<path d="M6.5 0A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3Zm3 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3Z"/>
|
||||
<path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1A2.5 2.5 0 0 1 9.5 5h-3A2.5 2.5 0 0 1 4 2.5v-1Zm6.854 7.354-3 3a.5.5 0 0 1-.708 0l-1.5-1.5a.5.5 0 0 1 .708-.708L7.5 10.793l2.646-2.647a.5.5 0 0 1 .708.708Z"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
|
||||
</svg>
|
||||
|
||||
<div class="side-bar">
|
||||
<div class="site-header">
|
||||
<a href="/ostree/" class="site-title lh-tight">
|
||||
ostreedev/ostree
|
||||
|
||||
</a>
|
||||
<a href="#" id="menu-button" class="site-button">
|
||||
<svg viewBox="0 0 24 24" class="icon"><use xlink:href="#svg-menu"></use></svg>
|
||||
</a>
|
||||
</div>
|
||||
<nav aria-label="Main" id="site-nav" class="site-nav">
|
||||
|
||||
|
||||
<ul class="nav-list"><li class="nav-list-item"><a href="/ostree/" class="nav-list-link">libostree</a></li><li class="nav-list-item"><a href="/ostree/introduction/" class="nav-list-link">OSTree Overview</a></li><li class="nav-list-item"><a href="/ostree/repo/" class="nav-list-link">Anatomy of an OSTree repository</a></li><li class="nav-list-item"><a href="/ostree/deployment/" class="nav-list-link">Deployments</a></li><li class="nav-list-item"><a href="/ostree/atomic-upgrades/" class="nav-list-link">Atomic Upgrades</a></li><li class="nav-list-item"><a href="/ostree/atomic-rollbacks/" class="nav-list-link">Atomic Rollbacks</a></li><li class="nav-list-item"><a href="/ostree/adapting-existing/" class="nav-list-link">Adapting existing mainstream distributions</a></li><li class="nav-list-item"><a href="/ostree/var/" class="nav-list-link">OSTree and /var handling</a></li><li class="nav-list-item"><a href="/ostree/formats/" class="nav-list-link">OSTree data formats</a></li><li class="nav-list-item"><a href="/ostree/buildsystem-and-repos/" class="nav-list-link">Writing a buildsystem and managing repositories</a></li><li class="nav-list-item"><a href="/ostree/authenticated-repos/" class="nav-list-link">Handling access to authenticated remote repositories</a></li><li class="nav-list-item"><a href="/ostree/repository-management/" class="nav-list-link">Managing content in OSTree repositories</a></li><li class="nav-list-item"><a href="/ostree/copying-deltas/" class="nav-list-link">Static deltas for offline updates</a></li><li class="nav-list-item"><a href="/ostree/ima/" class="nav-list-link">Using Linux IMA with OSTree</a></li><li class="nav-list-item"><a href="/ostree/related-projects/" class="nav-list-link">Related Projects</a></li><li class="nav-list-item"><a href="/ostree/composefs/" class="nav-list-link">Using composefs with OSTree</a></li><li class="nav-list-item"><a href="/ostree/bootloaders/" class="nav-list-link">Bootloaders</a></li><li class="nav-list-item active"><a href="/ostree/CONTRIBUTING/" class="nav-list-link active">Contributing</a></li><li class="nav-list-item"><a href="/ostree/contributing-tutorial/" class="nav-list-link">OSTree Contributing Tutorial</a></li><li class="nav-list-item"><a href="/ostree/README-historical/" class="nav-list-link">Historical OSTree README</a></li></ul>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
|
||||
<footer class="site-footer">
|
||||
This site uses <a href="https://github.com/just-the-docs/just-the-docs">Just the Docs</a>, a documentation theme for Jekyll.
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="main" id="top">
|
||||
<div id="main-header" class="main-header">
|
||||
|
||||
|
||||
|
||||
<div class="search">
|
||||
<div class="search-input-wrap">
|
||||
<input type="text" id="search-input" class="search-input" tabindex="0" placeholder="Search ostreedev/ostree" aria-label="Search ostreedev/ostree" autocomplete="off">
|
||||
<label for="search-input" class="search-label"><svg viewBox="0 0 24 24" class="search-icon"><use xlink:href="#svg-search"></use></svg></label>
|
||||
</div>
|
||||
<div id="search-results" class="search-results"></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<nav aria-label="Auxiliary" class="aux-nav">
|
||||
<ul class="aux-nav-list">
|
||||
|
||||
<li class="aux-nav-list-item">
|
||||
<a href="https://github.com/ostreedev/ostree" class="site-button"
|
||||
|
||||
>
|
||||
OSTree on GitHub
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="main-content-wrap" class="main-content-wrap">
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="main-content" class="main-content" role="main">
|
||||
|
||||
<h1 class="no_toc" id="contributing">
|
||||
|
||||
|
||||
<a href="#contributing" class="anchor-heading" aria-labelledby="contributing"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Contributing
|
||||
|
||||
|
||||
</h1>
|
||||
|
||||
|
||||
<ol id="markdown-toc">
|
||||
<li><a href="#submitting-patches" id="markdown-toc-submitting-patches">Submitting patches</a></li>
|
||||
<li><a href="#commit-message-style" id="markdown-toc-commit-message-style">Commit message style</a></li>
|
||||
<li><a href="#running-the-test-suite" id="markdown-toc-running-the-test-suite">Running the test suite</a></li>
|
||||
<li><a href="#coding-style" id="markdown-toc-coding-style">Coding style</a></li>
|
||||
<li><a href="#contributing-tutorial" id="markdown-toc-contributing-tutorial">Contributing Tutorial</a></li>
|
||||
<li><a href="#release-process" id="markdown-toc-release-process">Release process</a></li>
|
||||
</ol>
|
||||
|
||||
<!-- SPDX-License-Identifier: (CC-BY-SA-3.0 OR GFDL-1.3-or-later) -->
|
||||
<h2 id="submitting-patches">
|
||||
|
||||
|
||||
<a href="#submitting-patches" class="anchor-heading" aria-labelledby="submitting-patches"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Submitting patches
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>A majority of current maintainers prefer the GitHub pull request
|
||||
model, and this motivated moving the primary git repository to
|
||||
<a href="https://github.com/ostreedev/ostree">https://github.com/ostreedev/ostree</a>.</p>
|
||||
|
||||
<p>However, we do not use the “Merge pull request” button, because we do
|
||||
not like merge commits for one-patch pull requests, among other
|
||||
reasons. See <a href="https://github.com/isaacs/github/issues/2">this issue</a>
|
||||
for more information. Instead, we use an instance of
|
||||
<a href="https://github.com/servo/homu">Homu</a>, currently known as
|
||||
<code class="language-plaintext highlighter-rouge">cgwalters-bot</code>.</p>
|
||||
|
||||
<p>As a review proceeds, the preferred method is to push <code class="language-plaintext highlighter-rouge">fixup!</code> commits. Any commits committed with the <code class="language-plaintext highlighter-rouge">--fixup</code> option will have have the word <code class="language-plaintext highlighter-rouge">fixup!</code> in its commit title. This is to indicate that this particular commit will be squashed with the commit that was specified in this command, <code class="language-plaintext highlighter-rouge">git commit --fixup <commit ref or hash></code>. Homu knows how to use <code class="language-plaintext highlighter-rouge">--autosquash</code> when performing the final merge.</p>
|
||||
|
||||
<p>See the
|
||||
<a href="https://git-scm.com/docs/git-rebase">Git documentation</a> for more
|
||||
information.</p>
|
||||
|
||||
<p>Alternative methods if you don’t like GitHub (also fully supported):</p>
|
||||
|
||||
<ol>
|
||||
<li>Send mail to <a href="mailto:ostree-list@gnome.org">ostree-list@gnome.org</a>, with the patch attached</li>
|
||||
<li>Attach them to <a href="https://bugzilla.gnome.org/">https://bugzilla.gnome.org/</a></li>
|
||||
</ol>
|
||||
|
||||
<p>It is likely however once a patch is ready to apply a maintainer
|
||||
will push it to a GitHub PR, and merge via Homu.</p>
|
||||
<h2 id="commit-message-style">
|
||||
|
||||
|
||||
<a href="#commit-message-style" class="anchor-heading" aria-labelledby="commit-message-style"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Commit message style
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>Please look at <code class="language-plaintext highlighter-rouge">git log</code> and match the commit log style, which is very
|
||||
similar to the
|
||||
<a href="https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git">Linux kernel</a>.</p>
|
||||
|
||||
<p>You may use <code class="language-plaintext highlighter-rouge">Signed-off-by</code>, but we’re not requiring it.</p>
|
||||
|
||||
<p><strong>General Commit Message Guidelines</strong>:</p>
|
||||
|
||||
<ol>
|
||||
<li>Title
|
||||
<ul>
|
||||
<li>Specify the context or category of the changes e.g. <code class="language-plaintext highlighter-rouge">lib</code> for library changes, <code class="language-plaintext highlighter-rouge">docs</code> for document changes, <code class="language-plaintext highlighter-rouge">bin/<command-name></code> for command changes, etc.</li>
|
||||
<li>Begin the title with the first letter of the first word capitalized.</li>
|
||||
<li>Aim for less than 50 characters, otherwise 72 characters max.</li>
|
||||
<li>Do not end the title with a period.</li>
|
||||
<li>Use an <a href="https://en.wikipedia.org/wiki/Imperative_mood">imperative tone</a>.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Body
|
||||
<ul>
|
||||
<li>Separate the body with a blank line after the title.</li>
|
||||
<li>Begin a paragraph with the first letter of the first word capitalized.</li>
|
||||
<li>Each paragraph should be formatted within 72 characters.</li>
|
||||
<li>Content should be about what was changed and why this change was made.</li>
|
||||
<li>If your commit fixes an issue, the commit message should end with <code class="language-plaintext highlighter-rouge">Closes: #<number></code>.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
<p>Commit Message example:</p>
|
||||
|
||||
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><context>: Less than 50 characters <span class="k">for </span>subject title
|
||||
|
||||
A paragraph of the body should be within 72 characters.
|
||||
|
||||
This paragraph is also less than 72 characters.
|
||||
</code></pre></div></div>
|
||||
|
||||
<p>For more information see <a href="https://chris.beams.io/posts/git-commit/">How to Write a Git Commit Message</a></p>
|
||||
|
||||
<p><strong>Editing a Committed Message:</strong></p>
|
||||
|
||||
<p>To edit the message from the most recent commit run <code class="language-plaintext highlighter-rouge">git commit --amend</code>. To change older commits on the branch use <code class="language-plaintext highlighter-rouge">git rebase -i</code>. For a successful rebase have the branch track <code class="language-plaintext highlighter-rouge">upstream main</code>. Once the changes have been made and saved, run <code class="language-plaintext highlighter-rouge">git push --force origin <branch-name></code>.</p>
|
||||
<h2 id="running-the-test-suite">
|
||||
|
||||
|
||||
<a href="#running-the-test-suite" class="anchor-heading" aria-labelledby="running-the-test-suite"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Running the test suite
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>OSTree uses both <code class="language-plaintext highlighter-rouge">make check</code> and supports the
|
||||
<a href="https://wiki.gnome.org/GnomeGoals/InstalledTests">Installed Tests</a>
|
||||
model as well (if <code class="language-plaintext highlighter-rouge">--enable-installed-tests</code> is provided).</p>
|
||||
<h2 id="coding-style">
|
||||
|
||||
|
||||
<a href="#coding-style" class="anchor-heading" aria-labelledby="coding-style"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Coding style
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>Indentation is GNU. Files should start with the appropriate mode lines.</p>
|
||||
|
||||
<p>Use GCC <code class="language-plaintext highlighter-rouge">__attribute__((cleanup))</code> wherever possible. If interacting
|
||||
with a third party library, try defining local cleanup macros.</p>
|
||||
|
||||
<p>Use GError and GCancellable where appropriate.</p>
|
||||
|
||||
<p>Prefer returning <code class="language-plaintext highlighter-rouge">gboolean</code> to signal success/failure, and have output
|
||||
values as parameters.</p>
|
||||
|
||||
<p>Prefer linear control flow inside functions (aside from standard
|
||||
loops). In other words, avoid “early exits” or use of <code class="language-plaintext highlighter-rouge">goto</code> besides
|
||||
<code class="language-plaintext highlighter-rouge">goto out;</code>.</p>
|
||||
|
||||
<p>This is an example of an “early exit”:</p>
|
||||
|
||||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>static gboolean
|
||||
myfunc (...)
|
||||
{
|
||||
gboolean ret = FALSE;
|
||||
|
||||
/* some code */
|
||||
|
||||
/* some more code */
|
||||
|
||||
if (condition)
|
||||
return FALSE;
|
||||
|
||||
/* some more code */
|
||||
|
||||
ret = TRUE;
|
||||
out:
|
||||
return ret;
|
||||
}
|
||||
</code></pre></div></div>
|
||||
|
||||
<p>If you must shortcut, use:</p>
|
||||
|
||||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>if (condition)
|
||||
{
|
||||
ret = TRUE;
|
||||
goto out;
|
||||
}
|
||||
</code></pre></div></div>
|
||||
|
||||
<p>A consequence of this restriction is that you are encouraged to avoid
|
||||
deep nesting of loops or conditionals. Create internal static helper
|
||||
functions, particularly inside loops. For example, rather than:</p>
|
||||
|
||||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>while (condition)
|
||||
{
|
||||
/* some code */
|
||||
if (condition)
|
||||
{
|
||||
for (i = 0; i < somevalue; i++)
|
||||
{
|
||||
if (condition)
|
||||
{
|
||||
/* deeply nested code */
|
||||
}
|
||||
|
||||
/* more nested code */
|
||||
}
|
||||
}
|
||||
}
|
||||
</code></pre></div></div>
|
||||
|
||||
<p>Instead do this:</p>
|
||||
|
||||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>static gboolean
|
||||
helperfunc (..., GError **error)
|
||||
{
|
||||
if (condition)
|
||||
{
|
||||
/* deeply nested code */
|
||||
}
|
||||
|
||||
/* more nested code */
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
while (condition)
|
||||
{
|
||||
/* some code */
|
||||
if (!condition)
|
||||
continue;
|
||||
|
||||
for (i = 0; i < somevalue; i++)
|
||||
{
|
||||
if (!helperfunc (..., i, error))
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
</code></pre></div></div>
|
||||
<h2 id="contributing-tutorial">
|
||||
|
||||
|
||||
<a href="#contributing-tutorial" class="anchor-heading" aria-labelledby="contributing-tutorial"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Contributing Tutorial
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>For a detailed walk-through on building, modifying, and testing, see this <a href="/ostree/contributing-tutorial/">tutorial on how to start contributing to OSTree</a>.</p>
|
||||
<h2 id="release-process">
|
||||
|
||||
|
||||
<a href="#release-process" class="anchor-heading" aria-labelledby="release-process"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Release process
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>Releases can be performed by <a href="https://github.com/ostreedev/ostree/issues/new?labels=kind/release&template=release-checklist.md">creating a new release ticket</a> and following the steps in the checklist there.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<hr>
|
||||
<footer>
|
||||
|
||||
|
||||
<p class="text-small text-grey-dk-100 mb-0">Copyright © <a href="https://www.redhat.com">Red Hat, Inc.</a> and <a href="https://github.com/ostreedev">others</a>.</p>
|
||||
|
||||
|
||||
<div class="d-flex mt-2">
|
||||
|
||||
|
||||
<p class="text-small text-grey-dk-000 mb-0">
|
||||
<a href="https://github.com/ostreedev/ostree/tree/main/docs/CONTRIBUTING.md" id="edit-this-page">Edit this page on GitHub</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="search-overlay"></div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
781
README-historical/index.html
Normal file
@ -0,0 +1,781 @@
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
||||
|
||||
<link rel="stylesheet" href="/ostree/assets/css/just-the-docs-default.css">
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="/ostree/assets/js/vendor/lunr.min.js"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="/ostree/assets/js/just-the-docs.js"></script>
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Begin Jekyll SEO tag v2.8.0 -->
|
||||
<title>Historical OSTree README | ostreedev/ostree</title>
|
||||
<meta name="generator" content="Jekyll v3.9.5" />
|
||||
<meta property="og:title" content="Historical OSTree README" />
|
||||
<meta property="og:locale" content="en_US" />
|
||||
<meta name="description" content="ostree documentation" />
|
||||
<meta property="og:description" content="ostree documentation" />
|
||||
<link rel="canonical" href="https://ostreedev.github.io/ostree/README-historical/" />
|
||||
<meta property="og:url" content="https://ostreedev.github.io/ostree/README-historical/" />
|
||||
<meta property="og:site_name" content="ostreedev/ostree" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
<meta property="twitter:title" content="Historical OSTree README" />
|
||||
<script type="application/ld+json">
|
||||
{"@context":"https://schema.org","@type":"WebPage","description":"ostree documentation","headline":"Historical OSTree README","url":"https://ostreedev.github.io/ostree/README-historical/"}</script>
|
||||
<!-- End Jekyll SEO tag -->
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<a class="skip-to-main" href="#main-content">Skip to main content</a>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="d-none">
|
||||
<symbol id="svg-link" viewBox="0 0 24 24">
|
||||
<title>Link</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link">
|
||||
<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<symbol id="svg-menu" viewBox="0 0 24 24">
|
||||
<title>Menu</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-menu">
|
||||
<line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
|
||||
<title>Expand</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right">
|
||||
<polyline points="9 18 15 12 9 6"></polyline>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<!-- Feather. MIT License: https://github.com/feathericons/feather/blob/master/LICENSE -->
|
||||
<symbol id="svg-external-link" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-external-link">
|
||||
<title id="svg-external-link-title">(external link)</title>
|
||||
<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line>
|
||||
</symbol>
|
||||
|
||||
|
||||
<symbol id="svg-doc" viewBox="0 0 24 24">
|
||||
<title>Document</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-file">
|
||||
<path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"></path><polyline points="13 2 13 9 20 9"></polyline>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<symbol id="svg-search" viewBox="0 0 24 24">
|
||||
<title>Search</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search">
|
||||
<circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
|
||||
|
||||
<!-- Bootstrap Icons. MIT License: https://github.com/twbs/icons/blob/main/LICENSE.md -->
|
||||
<symbol id="svg-copy" viewBox="0 0 16 16">
|
||||
<title>Copy</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-clipboard" viewBox="0 0 16 16">
|
||||
<path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z"/>
|
||||
<path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-copied" viewBox="0 0 16 16">
|
||||
<title>Copied</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-clipboard-check-fill" viewBox="0 0 16 16">
|
||||
<path d="M6.5 0A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3Zm3 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3Z"/>
|
||||
<path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1A2.5 2.5 0 0 1 9.5 5h-3A2.5 2.5 0 0 1 4 2.5v-1Zm6.854 7.354-3 3a.5.5 0 0 1-.708 0l-1.5-1.5a.5.5 0 0 1 .708-.708L7.5 10.793l2.646-2.647a.5.5 0 0 1 .708.708Z"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
|
||||
</svg>
|
||||
|
||||
<div class="side-bar">
|
||||
<div class="site-header">
|
||||
<a href="/ostree/" class="site-title lh-tight">
|
||||
ostreedev/ostree
|
||||
|
||||
</a>
|
||||
<a href="#" id="menu-button" class="site-button">
|
||||
<svg viewBox="0 0 24 24" class="icon"><use xlink:href="#svg-menu"></use></svg>
|
||||
</a>
|
||||
</div>
|
||||
<nav aria-label="Main" id="site-nav" class="site-nav">
|
||||
|
||||
|
||||
<ul class="nav-list"><li class="nav-list-item"><a href="/ostree/" class="nav-list-link">libostree</a></li><li class="nav-list-item"><a href="/ostree/introduction/" class="nav-list-link">OSTree Overview</a></li><li class="nav-list-item"><a href="/ostree/repo/" class="nav-list-link">Anatomy of an OSTree repository</a></li><li class="nav-list-item"><a href="/ostree/deployment/" class="nav-list-link">Deployments</a></li><li class="nav-list-item"><a href="/ostree/atomic-upgrades/" class="nav-list-link">Atomic Upgrades</a></li><li class="nav-list-item"><a href="/ostree/atomic-rollbacks/" class="nav-list-link">Atomic Rollbacks</a></li><li class="nav-list-item"><a href="/ostree/adapting-existing/" class="nav-list-link">Adapting existing mainstream distributions</a></li><li class="nav-list-item"><a href="/ostree/var/" class="nav-list-link">OSTree and /var handling</a></li><li class="nav-list-item"><a href="/ostree/formats/" class="nav-list-link">OSTree data formats</a></li><li class="nav-list-item"><a href="/ostree/buildsystem-and-repos/" class="nav-list-link">Writing a buildsystem and managing repositories</a></li><li class="nav-list-item"><a href="/ostree/authenticated-repos/" class="nav-list-link">Handling access to authenticated remote repositories</a></li><li class="nav-list-item"><a href="/ostree/repository-management/" class="nav-list-link">Managing content in OSTree repositories</a></li><li class="nav-list-item"><a href="/ostree/copying-deltas/" class="nav-list-link">Static deltas for offline updates</a></li><li class="nav-list-item"><a href="/ostree/ima/" class="nav-list-link">Using Linux IMA with OSTree</a></li><li class="nav-list-item"><a href="/ostree/related-projects/" class="nav-list-link">Related Projects</a></li><li class="nav-list-item"><a href="/ostree/composefs/" class="nav-list-link">Using composefs with OSTree</a></li><li class="nav-list-item"><a href="/ostree/bootloaders/" class="nav-list-link">Bootloaders</a></li><li class="nav-list-item"><a href="/ostree/CONTRIBUTING/" class="nav-list-link">Contributing</a></li><li class="nav-list-item"><a href="/ostree/contributing-tutorial/" class="nav-list-link">OSTree Contributing Tutorial</a></li><li class="nav-list-item active"><a href="/ostree/README-historical/" class="nav-list-link active">Historical OSTree README</a></li></ul>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
|
||||
<footer class="site-footer">
|
||||
This site uses <a href="https://github.com/just-the-docs/just-the-docs">Just the Docs</a>, a documentation theme for Jekyll.
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="main" id="top">
|
||||
<div id="main-header" class="main-header">
|
||||
|
||||
|
||||
|
||||
<div class="search">
|
||||
<div class="search-input-wrap">
|
||||
<input type="text" id="search-input" class="search-input" tabindex="0" placeholder="Search ostreedev/ostree" aria-label="Search ostreedev/ostree" autocomplete="off">
|
||||
<label for="search-input" class="search-label"><svg viewBox="0 0 24 24" class="search-icon"><use xlink:href="#svg-search"></use></svg></label>
|
||||
</div>
|
||||
<div id="search-results" class="search-results"></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<nav aria-label="Auxiliary" class="aux-nav">
|
||||
<ul class="aux-nav-list">
|
||||
|
||||
<li class="aux-nav-list-item">
|
||||
<a href="https://github.com/ostreedev/ostree" class="site-button"
|
||||
|
||||
>
|
||||
OSTree on GitHub
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="main-content-wrap" class="main-content-wrap">
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="main-content" class="main-content" role="main">
|
||||
|
||||
<h1 id="historical-ostree-readme">
|
||||
|
||||
|
||||
<a href="#historical-ostree-readme" class="anchor-heading" aria-labelledby="historical-ostree-readme"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Historical OSTree README
|
||||
|
||||
|
||||
</h1>
|
||||
|
||||
|
||||
<!-- SPDX-License-Identifier: (CC-BY-SA-3.0 OR GFDL-1.3-or-later) -->
|
||||
|
||||
<p><strong>This file is outdated, but some of the text here is still useful for
|
||||
historical context. I’m preserving it (explicitly still in the tree)
|
||||
for posterity.</strong></p>
|
||||
<h2 id="problem-statement">
|
||||
|
||||
|
||||
<a href="#problem-statement" class="anchor-heading" aria-labelledby="problem-statement"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Problem statement
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>Hacking on the core operating system is painful - this includes most
|
||||
of GNOME from upower and NetworkManager up to gnome-shell. I want a
|
||||
system that matches these requirements:</p>
|
||||
|
||||
<ol>
|
||||
<li>Does not disturb your existing OS</li>
|
||||
<li>Is not terribly slow to use</li>
|
||||
<li>Shares your $HOME - you have your data</li>
|
||||
<li>Allows easy rollback</li>
|
||||
<li>Ideally allows access to existing apps</li>
|
||||
</ol>
|
||||
<h2 id="comparison-with-existing-tools">
|
||||
|
||||
|
||||
<a href="#comparison-with-existing-tools" class="anchor-heading" aria-labelledby="comparison-with-existing-tools"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Comparison with existing tools
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<p>Virtualization</p>
|
||||
|
||||
<p>Fails on points 2) and 3). Actually qemu-kvm can be pretty fast,
|
||||
but in a lot of cases there is no substitute for actually booting
|
||||
on bare metal; GNOME 3 really needs some hardware GPU
|
||||
acceleration.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Rebuilding distribution packages</p>
|
||||
|
||||
<p>Fails on points 1) and 4). Is also just very annoying: dpkg/rpm
|
||||
both want tarballs, which you don’t have since you’re working from
|
||||
git. The suggested “mock/pbuilder” type chroot builds are <em>slow</em>.
|
||||
And even with non-chroot builds there is lots of pointless build
|
||||
wrapping going on. Both dpkg and rpm also are poor at helping you
|
||||
revert back to the original system.</p>
|
||||
|
||||
<p>All of this can be scripted to be less bad of course - and I have
|
||||
worked on such scripts. But fundamentally you’re still fighting
|
||||
the system, and if you’re hacking on a lowlevel library like say
|
||||
glib, you can easily get yourself to the point where you need a
|
||||
recovery CD - at that point your edit/compile/debug cycle is just
|
||||
too long.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>“sudo make install”</p>
|
||||
|
||||
<p>Now your system is in an undefined state. You can use e.g. rpm
|
||||
-qV to try to find out what you overwrote, but neither dpkg nor
|
||||
rpm will help clean up any files left over that aren’t shipped by
|
||||
the old package.</p>
|
||||
|
||||
<p>This is most realistic option for people hacking on system
|
||||
components currently, but ostree will be better.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>LXC / containers</p>
|
||||
|
||||
<p>Fails on 3), and 4) is questionable. Also shares the annoying part
|
||||
of rebuilding distribution packages. LXC is focused on running
|
||||
multiple server systems at the <em>same time</em>, which isn’t what we
|
||||
want (at least, not right now), and honestly even trying to support
|
||||
that for a graphical desktop would be a lot of tricky work, for
|
||||
example getting two GDM instances not to fight over VT
|
||||
allocations. But some bits of the technology may make sense to use.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>jhbuild + distribution packages</p>
|
||||
|
||||
<p>The state of the art in GNOME - but can only build non-root things -
|
||||
this means you can’t build NetworkManager, and thus are permanently
|
||||
stuck on whatever the distro provides.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<h2 id="who-is-ostree-for">
|
||||
|
||||
|
||||
<a href="#who-is-ostree-for" class="anchor-heading" aria-labelledby="who-is-ostree-for"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Who is ostree for?
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>First - operating system developers and testers. I specifically keep
|
||||
a few people in mind - Dan Williams and Eric Anholt, as well as myself
|
||||
obviously. For Eric Anholt, a key use case for him is being able to
|
||||
try out the latest gnome-shell, and combine it with his work on Mesa,
|
||||
and see how it works/performs - while retaining the ability to roll
|
||||
back if one or both breaks.</p>
|
||||
|
||||
<p>The rollback concept is absolutely key for shipping anything to
|
||||
enthusiasts or knowledable testers. With a system like this, a tester
|
||||
can easily perform a local rollback - something just not well
|
||||
supported by dpkg/rpm. (What about Conary? See below.)</p>
|
||||
|
||||
<p>Also, distributing operating system trees (instead of packages) gives
|
||||
us a sane place to perform automated QA <strong>before</strong> we ship it to
|
||||
testers. We should never be wasting these people’s time.</p>
|
||||
|
||||
<p>Even better, this system would allow testers to <em>bisect</em> across
|
||||
operating system builds, and do so very efficiently.</p>
|
||||
<h2 id="the-core-idea---chroots">
|
||||
|
||||
|
||||
<a href="#the-core-idea---chroots" class="anchor-heading" aria-labelledby="the-core-idea---chroots"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> The core idea - chroots
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>chroots are the original lightweight “virtualization”. Let’s use
|
||||
them. So basically, you install a mainstream distribution (say
|
||||
Debian). It has a root filesystem like this:</p>
|
||||
|
||||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code> /usr
|
||||
/etc
|
||||
/home
|
||||
...
|
||||
</code></pre></div></div>
|
||||
|
||||
<p>Now, what we can do is have a system that installs chroots as a subdirectory
|
||||
of the root, like:</p>
|
||||
|
||||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code> /ostree/gnomeos-3.0-opt-393a4555/{usr,etc,sbin,...}
|
||||
/ostree/gnomeos-3.2-opt-7e9788a2/{usr,etc,sbin,...}
|
||||
</code></pre></div></div>
|
||||
|
||||
<p>These live in the same root filesystem as your regular distribution
|
||||
(Note though, the root partition should be reasonably sized, or
|
||||
hopefully you’ve used just one big partition).</p>
|
||||
|
||||
<p>You should be able to boot into one of these roots. Since ostree
|
||||
lives inside a distro created partition, a tricky part here is that we
|
||||
need to know how to interact with the installed distribution’s grub.
|
||||
This is an annoying but tractable problem.</p>
|
||||
|
||||
<p>First, we install a kernel+initramfs alongside the distribution’s.
|
||||
Then, we have a “trampoline” ostree-init binary which is statically
|
||||
linked, and boot the kernel with init=/ostree/ostree-init. This then
|
||||
takes care of chrooting and running the init binary.</p>
|
||||
|
||||
<p>An important note here is that we bind mount the real /home. This
|
||||
means you have your data. This also implies we share uid/gid, so
|
||||
/etc/passwd will have to be in sync. Probably what we’ll do is have a
|
||||
script to pull the data from the “host” OS.</p>
|
||||
|
||||
<p>I’ve decided for now to move /var into /ostree to avoid sharing it
|
||||
with the “host” distribution, because in practice we’re likely
|
||||
to hit incompatibilities.</p>
|
||||
|
||||
<p>Do note however /etc lives <em>inside</em> the OSTree; it’s presently
|
||||
versioned and readonly like everything else.</p>
|
||||
|
||||
<p>On a pure OSTree system, the filesystem layout will look like this:</p>
|
||||
|
||||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code> .
|
||||
|-- boot
|
||||
|-- home
|
||||
|-- ostree
|
||||
| |-- var
|
||||
| |-- current -> gnomeos-3.2-opt-7e9788a2
|
||||
| |-- gnomeos-3.0-opt-393a4555
|
||||
| | |-- etc
|
||||
| | |-- lib
|
||||
| | |-- mnt
|
||||
| | |-- proc
|
||||
| | |-- run
|
||||
| | |-- sbin
|
||||
| | |-- srv
|
||||
| | |-- sys
|
||||
| | `-- usr
|
||||
| `-- gnomeos-3.2-opt-7e9788a2
|
||||
| |-- etc
|
||||
| |-- lib
|
||||
| |-- mnt
|
||||
| |-- proc
|
||||
| |-- run
|
||||
| |-- sbin
|
||||
| |-- srv
|
||||
| |-- sys
|
||||
| `-- usr
|
||||
|-- root
|
||||
</code></pre></div></div>
|
||||
<h2 id="making-this-efficient">
|
||||
|
||||
|
||||
<a href="#making-this-efficient" class="anchor-heading" aria-labelledby="making-this-efficient"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Making this efficient
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>One of the first things you’ll probably ask is “but won’t that use a
|
||||
lot of disk space”? Indeed, it will, if you just unpack a set of RPMs
|
||||
or .debs into each root.</p>
|
||||
|
||||
<p>Besides chroots, there’s another old Unix idea we can take advantage
|
||||
of - hard links. These allow sharing the underlying data of a file,
|
||||
with the tradeoff that changing any one file will change all names
|
||||
that point to it. This mutability means that we have to either:</p>
|
||||
|
||||
<ol>
|
||||
<li>Make sure everything touching the operating system breaks hard links
|
||||
This is probably tractable over a long period of time, but if anything
|
||||
has a bug, then it corrupts the file effectively.</li>
|
||||
<li>Make the core OS read-only, with a well-defined mechanism for mutating
|
||||
under the control of ostree.</li>
|
||||
</ol>
|
||||
|
||||
<p>I chose 2.</p>
|
||||
<h2 id="a-userspace-content-addressed-versioning-filesystem">
|
||||
|
||||
|
||||
<a href="#a-userspace-content-addressed-versioning-filesystem" class="anchor-heading" aria-labelledby="a-userspace-content-addressed-versioning-filesystem"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> A userspace content-addressed versioning filesystem
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>At its very core, that’s what ostree is. Just like git. If you
|
||||
understand git, you know it’s not like other revision control systems.
|
||||
git is effectively a specialized, userspace filesystem, and that is a
|
||||
very powerful idea.</p>
|
||||
|
||||
<p>At the core of git is the idea of “content-addressed objects”. For
|
||||
background on this, see <a href="http://book.git-scm.com/7_how_git_stores_objects.html">http://book.git-scm.com/7_how_git_stores_objects.html</a></p>
|
||||
|
||||
<p>Why not just use git? Basically because git is designed mainly for
|
||||
source trees - it goes to effort to be sure it’s compressing text for
|
||||
example, under the assumption that you have a lot of text. Its
|
||||
handling of binaries is very generic and unoptimized.</p>
|
||||
|
||||
<p>In contrast, ostree is explicitly designed for binaries, and in
|
||||
particular one type of binary - ELF executables (or it will be once we
|
||||
start using bsdiff).</p>
|
||||
|
||||
<p>Another big difference versus git is that ostree uses hard links
|
||||
between “checkouts” and the repository. This means each checkout uses
|
||||
almost no additional space, and is <em>extremely</em> fast to check out. We
|
||||
can do this because again each checkout is designed to be read-only.</p>
|
||||
|
||||
<p>So we mentioned above there are:</p>
|
||||
|
||||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code> /ostree/gnomeos-3.2-opt-7e9788a2
|
||||
/ostree/gnomeos-3.2-opt-393a4555
|
||||
</code></pre></div></div>
|
||||
|
||||
<p>There is also a “repository” that looks like this:</p>
|
||||
|
||||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code> /ostree/repo/objects/17/a95e8ca0ba655b09cb68d7288342588e867ee0.file
|
||||
/ostree/repo/objects/17/68625e7ff5a8db77904c77489dc6f07d4afdba.meta
|
||||
/ostree/repo/objects/17/cc01589dd8540d85c0f93f52b708500dbaa5a9.file
|
||||
/ostree/repo/objects/30
|
||||
/ostree/repo/objects/30/6359b3ca7684358a3988afd005013f13c0c533.meta
|
||||
/ostree/repo/objects/30/8f3c03010cedd930b1db756ce659c064f0cd7f.meta
|
||||
/ostree/repo/objects/30/8cf0fd8e63dfff6a5f00ba5a48f3b92fb52de7.file
|
||||
/ostree/repo/objects/30/6cad7f027d69a46bb376044434bbf28d63e88d.file
|
||||
</code></pre></div></div>
|
||||
|
||||
<p>Each object is either metadata (like a commit or tree), or a hard link
|
||||
to a regular file.</p>
|
||||
|
||||
<p>Note that also unlike git, the checksum here includes <em>metadata</em> such
|
||||
as uid, gid, permissions, and extended attributes. (It does not include
|
||||
file access times, since those shouldn’t matter for the OS)</p>
|
||||
|
||||
<p>This is another important component to allowing the hardlinks. We
|
||||
wouldn’t want say all empty files to be shared necessarily. (Though
|
||||
maybe this is wrong, and since the OS is readonly, we can make all
|
||||
files owned by root without loss of generality).</p>
|
||||
|
||||
<p>However this tradeoff means that we probably need a second index by
|
||||
content, so we don’t have to redownload the entire OS if permissions
|
||||
change =)</p>
|
||||
<h2 id="atomic-upgrades-rollback">
|
||||
|
||||
|
||||
<a href="#atomic-upgrades-rollback" class="anchor-heading" aria-labelledby="atomic-upgrades-rollback"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Atomic upgrades, rollback
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>OSTree is designed to atomically swap operating systems - such that
|
||||
during an upgrade and reboot process, you either get the full new
|
||||
system, or the old one. There is no “Please don’t turn off your
|
||||
computer”. We do this by simply using a symbolic link like:</p>
|
||||
|
||||
<p>/ostree/current -> /ostree/gnomeos-3.4-opt-e3b0c4429</p>
|
||||
|
||||
<p>Where gnomeos-e3b0c4429 has the full regular filesystem tree with usr/
|
||||
etc/ directories as above. To upgrade or rollback (there is no
|
||||
difference internally), we simply check out a new tree into
|
||||
gnomeos-b90ae4763 for example, then swap the “current” symbolic link,
|
||||
then remove the old tree.</p>
|
||||
|
||||
<p>But does this mean you have to reboot for OS upgrades? Very likely,
|
||||
yes - and this is no different from RPM/deb or whatever. They just
|
||||
typically lie to you about it =)</p>
|
||||
|
||||
<p>A typical model with RPM/deb is to unpack the new files, then use some
|
||||
IPC mechanism (SIGHUP, a control binary like /usr/sbin/apachectl) to
|
||||
signal the running process to reload. There are multiple problems
|
||||
with this - one is that in the new state, daemon A may depend on the
|
||||
updated configuration in daemon B. This may not be particularly
|
||||
common in default configurations, but it’s highly likely that that
|
||||
some deployments will have e.g. apache talking to a local MySQL
|
||||
instance. So you really want to do is only apply the updated
|
||||
configuration when all the files are in place; not after each RPM or
|
||||
.deb is installed.</p>
|
||||
|
||||
<p>What’s even harder is the massive set of race conditions that are
|
||||
possible while RPM/deb are in the process of upgrading. Cron jobs are
|
||||
very likely to hit this. If we want the ability to apply updates to a
|
||||
live system, we could first pause execution of non-upgrade userspace
|
||||
tasks. This could be done via SIGSTOP for example. Then, we can swap
|
||||
around the filesystem tree, and then finally attempt to apply updates
|
||||
via SIGHUP, and if possible, restart processes.</p>
|
||||
<h2 id="configuration-management">
|
||||
|
||||
|
||||
<a href="#configuration-management" class="anchor-heading" aria-labelledby="configuration-management"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Configuration Management
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>By now if you’ve thought about this problem domain before, you’re wondering
|
||||
about configuration management. In other words, if the OS is read only,
|
||||
how do I edit /etc/sudoers?</p>
|
||||
|
||||
<p>Well, have you ever been a system administrator on a zypper/yum
|
||||
system, done an RPM update, which then drops .rpmnew files in your
|
||||
/etc/ that you have to go and hunt for with “find” or something, and
|
||||
said to yourself, “Wow, this system is awesome!!!” ? Right, that’s
|
||||
what I thought.</p>
|
||||
|
||||
<p>Configuration (and systems) management is a tricky problem, and I
|
||||
certainly don’t have a magic bullet. However, one large conceptual
|
||||
improvement I think is defaulting to “rebase” versus “merge”.</p>
|
||||
|
||||
<p>This means that we won’t permit direct modification of /etc - instead,
|
||||
you HAVE to write a script which accomplishes your goals. To generate
|
||||
a tree, we check out a new copy, then run your script on top.</p>
|
||||
|
||||
<p>If the script fails, we can roll back the update, or drop to a shell
|
||||
if interactive.</p>
|
||||
|
||||
<p>However, we also need to consider cases where the administrator
|
||||
modifies state indirectly by a program. Think “adduser” for example.</p>
|
||||
|
||||
<p>Possible approaches:</p>
|
||||
|
||||
<ol>
|
||||
<li>Patch all of these programs to know how to write to the writable
|
||||
location, instead of the R/O bind mount overlay.</li>
|
||||
<li>Move the data to /var</li>
|
||||
</ol>
|
||||
<h2 id="what-about-packages">
|
||||
|
||||
|
||||
<a href="#what-about-packages" class="anchor-heading" aria-labelledby="what-about-packages"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> What about “packages”?
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>There are several complex and separate issues hiding in this seemingly
|
||||
simple question.</p>
|
||||
|
||||
<p>I think OSTree always makes sense to use as a core operating system
|
||||
builder and updater. By “core” here I mean the parts that aren’t
|
||||
removable. Debian has Essential: yes, any other distribution has this
|
||||
too implicitly in the set of dependencies for their updater tool.</p>
|
||||
|
||||
<p>Now, let me just say I will absolutely support using something like
|
||||
apt/yum/zypper (and consequently deb/rpm) on top of OSTree. This
|
||||
isn’t trivial, but there aren’t any conceptual issues.</p>
|
||||
|
||||
<p>Concretely for example, RPM or .deb might make sense as a delivery
|
||||
vehicle for third party OS extensions. A canoncial example is the
|
||||
NVidia graphics driver.</p>
|
||||
|
||||
<p>If one is using OSTree to build an <em>operating system</em>, then there has
|
||||
to be some API for applications. And that demands its own targeted
|
||||
solution - something like an evolved glick (zeroinstall is also
|
||||
similar).</p>
|
||||
|
||||
<p>Current package systems are totally broken for application deployment
|
||||
though; for example, they will remove files away from under running
|
||||
applications on update. And we clearly need the ability to install
|
||||
and upgrade applications without rebooting the OS.</p>
|
||||
<h2 id="details-of-rpm-installation">
|
||||
|
||||
|
||||
<a href="#details-of-rpm-installation" class="anchor-heading" aria-labelledby="details-of-rpm-installation"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Details of RPM installation
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>We should be able to install LSB rpms. This implies providing “rpm”.
|
||||
The tricky part here is since the OS itself is not assembled via RPMs,
|
||||
we need to fake up a database of “provides” as if we were. Even
|
||||
harder would be maintaining binary compatibilty with any arbitrary
|
||||
%post scripts that may be run.</p>
|
||||
<h2 id="what-about-btrfs--doesnt-it-solve-everything">
|
||||
|
||||
|
||||
<a href="#what-about-btrfs--doesnt-it-solve-everything" class="anchor-heading" aria-labelledby="what-about-btrfs--doesnt-it-solve-everything"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> What about BTRFS? Doesn’t it solve everything?
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>In short, BTRFS is not a magic bullet, but yes - it helps
|
||||
significantly. The obvious thing to do is layer BTRFS under dpkg/rpm,
|
||||
and have a separate subvolume for /home so rollbacks don’t lose your
|
||||
data. See e.g.
|
||||
<a href="http://fedoraproject.org/wiki/Features/SystemRollbackWithBtrfs">http://fedoraproject.org/wiki/Features/SystemRollbackWithBtrfs</a></p>
|
||||
|
||||
<p>As a general rule an issue with the BTRFS is that it can’t roll back
|
||||
just changes to things installed by RPM (i.e. what’s in rpm -qal).</p>
|
||||
|
||||
<p>For example, it’s possible to e.g. run yum update, then edit something
|
||||
in /etc, reboot and notice things are broken, then roll back and have
|
||||
silently lost your changes to /etc.</p>
|
||||
|
||||
<p>Another example is adding a new binary in /usr/local. You could say,
|
||||
“OK, we’ll use subvolumes for those!”. But then what about /var (and
|
||||
your VM images that live in /var/lib/libvirt ?)</p>
|
||||
|
||||
<p>Finally, probably the biggest disadvantage of the rpm/dpkg + BTRFS
|
||||
approach is it doesn’t solve the race conditions that happen when
|
||||
unpacking packages into the live system. This problem is really
|
||||
important to me.</p>
|
||||
|
||||
<p>Note though ostree can definitely take advantage of BTRFS features!
|
||||
In particular, we could use “reflink”
|
||||
<a href="http://lwn.net/Articles/331808/">http://lwn.net/Articles/331808/</a> instead of hard links, and avoid
|
||||
having the object store corrupted if somehow the files are modified
|
||||
directly.</p>
|
||||
<h2 id="other-systems">
|
||||
|
||||
|
||||
<a href="#other-systems" class="anchor-heading" aria-labelledby="other-systems"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Other systems
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>I’ve spent a long time thinking about this problem, and here are some
|
||||
of the other possible solutions out there I looked at, and why I
|
||||
didn’t use them:</p>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<p>Git: <a href="http://git-scm.com/">http://git-scm.com/</a></p>
|
||||
|
||||
<p>Really awesome, and the core inspiration here. But like I mentioned
|
||||
above, not at all designed for binaries - we can make different tradeoffs.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>bup: <a href="https://github.com/apenwarr/bup">https://github.com/apenwarr/bup</a></p>
|
||||
|
||||
<p>bup is cool. But it shares the negative tradeoffs with git, though it
|
||||
does add positives of its own. It also inspired me.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>git-annex: <a href="http://git-annex.branchable.com/git-annex/">http://git-annex.branchable.com/git-annex/</a></p>
|
||||
|
||||
<p>Looks interesting; I think this will share the same negative tradeoffs with git
|
||||
as far as using it for an OS goes.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>schroot: <a href="http://www.debian-administration.org/articles/566">http://www.debian-administration.org/articles/566</a></p>
|
||||
|
||||
<p>Like LXC/containers, but just using a chroot.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>NixOS: <a href="http://nixos.org/">http://nixos.org/</a></p>
|
||||
|
||||
<p>The NixOS people have a lot of really good ideas, and they’ve definitely
|
||||
thought about the problem space. However, their approach of checksumming
|
||||
all inputs to a package is pretty wacky. I don’t see the point, and moreover
|
||||
it uses gobs of disk space.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Conary: <a href="http://wiki.rpath.com/wiki/Conary:Updates_and_Rollbacks">http://wiki.rpath.com/wiki/Conary:Updates_and_Rollbacks</a></p>
|
||||
|
||||
<p>If rpm/dpkg are like CVS, Conary is closer to Subversion. It’s not
|
||||
bad, but ostree is better than it for the exact same reasons git
|
||||
is better than Subversion.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>BTRFS: <a href="http://en.wikipedia.org/wiki/Btrfs">http://en.wikipedia.org/wiki/Btrfs</a></p>
|
||||
|
||||
<p>See above.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Solaris IPS: <a href="http://hub.opensolaris.org/bin/view/Project+pkg/">http://hub.opensolaris.org/bin/view/Project+pkg/</a></p>
|
||||
|
||||
<p>Rollback is ZFS level, so I think this shares the same tradeoffs as BTRFS+RPM/deb.
|
||||
They probably have some vertical integration though which definitely helps.
|
||||
Obviously we can’t use ZFS.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Jhbuild: <a href="https://live.gnome.org/Jhbuild">https://live.gnome.org/Jhbuild</a></p>
|
||||
|
||||
<p>What we’ve been using in GNOME, and has the essential property of allowing you
|
||||
to “fall back” to a stable system. But ostree will blow it out of the water.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<h2 id="development">
|
||||
|
||||
|
||||
<a href="#development" class="anchor-heading" aria-labelledby="development"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Development
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<p>OSTree wiki page: <a href="https://live.gnome.org/OSTree">https://live.gnome.org/OSTree</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>ostbuild wiki page: <a href="https://live.gnome.org/OSTree/Ostbuild">https://live.gnome.org/OSTree/Ostbuild</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Git repository: <a href="http://git.gnome.org/browse/ostree/">http://git.gnome.org/browse/ostree/</a></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Deploying OSTree in the Gnome servers: <a href="https://bugzilla.gnome.org/show_bug.cgi?id=669772">https://bugzilla.gnome.org/show_bug.cgi?id=669772</a></p>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<hr>
|
||||
<footer>
|
||||
|
||||
|
||||
<p class="text-small text-grey-dk-100 mb-0">Copyright © <a href="https://www.redhat.com">Red Hat, Inc.</a> and <a href="https://github.com/ostreedev">others</a>.</p>
|
||||
|
||||
|
||||
<div class="d-flex mt-2">
|
||||
|
||||
|
||||
<p class="text-small text-grey-dk-000 mb-0">
|
||||
<a href="https://github.com/ostreedev/ostree/tree/main/docs/README-historical.md" id="edit-this-page">Edit this page on GitHub</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="search-overlay"></div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
472
adapting-existing/index.html
Normal file
@ -0,0 +1,472 @@
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
||||
|
||||
<link rel="stylesheet" href="/ostree/assets/css/just-the-docs-default.css">
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="/ostree/assets/js/vendor/lunr.min.js"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="/ostree/assets/js/just-the-docs.js"></script>
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Begin Jekyll SEO tag v2.8.0 -->
|
||||
<title>Adapting existing mainstream distributions | ostreedev/ostree</title>
|
||||
<meta name="generator" content="Jekyll v3.9.5" />
|
||||
<meta property="og:title" content="Adapting existing mainstream distributions" />
|
||||
<meta property="og:locale" content="en_US" />
|
||||
<meta name="description" content="ostree documentation" />
|
||||
<meta property="og:description" content="ostree documentation" />
|
||||
<link rel="canonical" href="https://ostreedev.github.io/ostree/adapting-existing/" />
|
||||
<meta property="og:url" content="https://ostreedev.github.io/ostree/adapting-existing/" />
|
||||
<meta property="og:site_name" content="ostreedev/ostree" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
<meta property="twitter:title" content="Adapting existing mainstream distributions" />
|
||||
<script type="application/ld+json">
|
||||
{"@context":"https://schema.org","@type":"WebPage","description":"ostree documentation","headline":"Adapting existing mainstream distributions","url":"https://ostreedev.github.io/ostree/adapting-existing/"}</script>
|
||||
<!-- End Jekyll SEO tag -->
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<a class="skip-to-main" href="#main-content">Skip to main content</a>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="d-none">
|
||||
<symbol id="svg-link" viewBox="0 0 24 24">
|
||||
<title>Link</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link">
|
||||
<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<symbol id="svg-menu" viewBox="0 0 24 24">
|
||||
<title>Menu</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-menu">
|
||||
<line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
|
||||
<title>Expand</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right">
|
||||
<polyline points="9 18 15 12 9 6"></polyline>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<!-- Feather. MIT License: https://github.com/feathericons/feather/blob/master/LICENSE -->
|
||||
<symbol id="svg-external-link" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-external-link">
|
||||
<title id="svg-external-link-title">(external link)</title>
|
||||
<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line>
|
||||
</symbol>
|
||||
|
||||
|
||||
<symbol id="svg-doc" viewBox="0 0 24 24">
|
||||
<title>Document</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-file">
|
||||
<path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"></path><polyline points="13 2 13 9 20 9"></polyline>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<symbol id="svg-search" viewBox="0 0 24 24">
|
||||
<title>Search</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search">
|
||||
<circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
|
||||
|
||||
<!-- Bootstrap Icons. MIT License: https://github.com/twbs/icons/blob/main/LICENSE.md -->
|
||||
<symbol id="svg-copy" viewBox="0 0 16 16">
|
||||
<title>Copy</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-clipboard" viewBox="0 0 16 16">
|
||||
<path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z"/>
|
||||
<path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-copied" viewBox="0 0 16 16">
|
||||
<title>Copied</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-clipboard-check-fill" viewBox="0 0 16 16">
|
||||
<path d="M6.5 0A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3Zm3 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3Z"/>
|
||||
<path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1A2.5 2.5 0 0 1 9.5 5h-3A2.5 2.5 0 0 1 4 2.5v-1Zm6.854 7.354-3 3a.5.5 0 0 1-.708 0l-1.5-1.5a.5.5 0 0 1 .708-.708L7.5 10.793l2.646-2.647a.5.5 0 0 1 .708.708Z"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
|
||||
</svg>
|
||||
|
||||
<div class="side-bar">
|
||||
<div class="site-header">
|
||||
<a href="/ostree/" class="site-title lh-tight">
|
||||
ostreedev/ostree
|
||||
|
||||
</a>
|
||||
<a href="#" id="menu-button" class="site-button">
|
||||
<svg viewBox="0 0 24 24" class="icon"><use xlink:href="#svg-menu"></use></svg>
|
||||
</a>
|
||||
</div>
|
||||
<nav aria-label="Main" id="site-nav" class="site-nav">
|
||||
|
||||
|
||||
<ul class="nav-list"><li class="nav-list-item"><a href="/ostree/" class="nav-list-link">libostree</a></li><li class="nav-list-item"><a href="/ostree/introduction/" class="nav-list-link">OSTree Overview</a></li><li class="nav-list-item"><a href="/ostree/repo/" class="nav-list-link">Anatomy of an OSTree repository</a></li><li class="nav-list-item"><a href="/ostree/deployment/" class="nav-list-link">Deployments</a></li><li class="nav-list-item"><a href="/ostree/atomic-upgrades/" class="nav-list-link">Atomic Upgrades</a></li><li class="nav-list-item"><a href="/ostree/atomic-rollbacks/" class="nav-list-link">Atomic Rollbacks</a></li><li class="nav-list-item active"><a href="/ostree/adapting-existing/" class="nav-list-link active">Adapting existing mainstream distributions</a></li><li class="nav-list-item"><a href="/ostree/var/" class="nav-list-link">OSTree and /var handling</a></li><li class="nav-list-item"><a href="/ostree/formats/" class="nav-list-link">OSTree data formats</a></li><li class="nav-list-item"><a href="/ostree/buildsystem-and-repos/" class="nav-list-link">Writing a buildsystem and managing repositories</a></li><li class="nav-list-item"><a href="/ostree/authenticated-repos/" class="nav-list-link">Handling access to authenticated remote repositories</a></li><li class="nav-list-item"><a href="/ostree/repository-management/" class="nav-list-link">Managing content in OSTree repositories</a></li><li class="nav-list-item"><a href="/ostree/copying-deltas/" class="nav-list-link">Static deltas for offline updates</a></li><li class="nav-list-item"><a href="/ostree/ima/" class="nav-list-link">Using Linux IMA with OSTree</a></li><li class="nav-list-item"><a href="/ostree/related-projects/" class="nav-list-link">Related Projects</a></li><li class="nav-list-item"><a href="/ostree/composefs/" class="nav-list-link">Using composefs with OSTree</a></li><li class="nav-list-item"><a href="/ostree/bootloaders/" class="nav-list-link">Bootloaders</a></li><li class="nav-list-item"><a href="/ostree/CONTRIBUTING/" class="nav-list-link">Contributing</a></li><li class="nav-list-item"><a href="/ostree/contributing-tutorial/" class="nav-list-link">OSTree Contributing Tutorial</a></li><li class="nav-list-item"><a href="/ostree/README-historical/" class="nav-list-link">Historical OSTree README</a></li></ul>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
|
||||
<footer class="site-footer">
|
||||
This site uses <a href="https://github.com/just-the-docs/just-the-docs">Just the Docs</a>, a documentation theme for Jekyll.
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="main" id="top">
|
||||
<div id="main-header" class="main-header">
|
||||
|
||||
|
||||
|
||||
<div class="search">
|
||||
<div class="search-input-wrap">
|
||||
<input type="text" id="search-input" class="search-input" tabindex="0" placeholder="Search ostreedev/ostree" aria-label="Search ostreedev/ostree" autocomplete="off">
|
||||
<label for="search-input" class="search-label"><svg viewBox="0 0 24 24" class="search-icon"><use xlink:href="#svg-search"></use></svg></label>
|
||||
</div>
|
||||
<div id="search-results" class="search-results"></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<nav aria-label="Auxiliary" class="aux-nav">
|
||||
<ul class="aux-nav-list">
|
||||
|
||||
<li class="aux-nav-list-item">
|
||||
<a href="https://github.com/ostreedev/ostree" class="site-button"
|
||||
|
||||
>
|
||||
OSTree on GitHub
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="main-content-wrap" class="main-content-wrap">
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="main-content" class="main-content" role="main">
|
||||
|
||||
<h1 class="no_toc" id="adapting-existing-mainstream-distributions">
|
||||
|
||||
|
||||
<a href="#adapting-existing-mainstream-distributions" class="anchor-heading" aria-labelledby="adapting-existing-mainstream-distributions"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Adapting existing mainstream distributions
|
||||
|
||||
|
||||
</h1>
|
||||
|
||||
|
||||
<ol id="markdown-toc">
|
||||
<li><a href="#system-layout" id="markdown-toc-system-layout">System layout</a></li>
|
||||
<li><a href="#booting-and-initramfs-technology" id="markdown-toc-booting-and-initramfs-technology">Booting and initramfs technology</a></li>
|
||||
<li><a href="#system-users-and-groups" id="markdown-toc-system-users-and-groups">System users and groups</a> <ol>
|
||||
<li><a href="#static-users-and-groups" id="markdown-toc-static-users-and-groups">Static users and groups</a></li>
|
||||
<li><a href="#sysusersd" id="markdown-toc-sysusersd">sysusers.d</a></li>
|
||||
</ol>
|
||||
</li>
|
||||
<li><a href="#adapting-existing-package-managers" id="markdown-toc-adapting-existing-package-managers">Adapting existing package managers</a></li>
|
||||
</ol>
|
||||
|
||||
<!-- SPDX-License-Identifier: (CC-BY-SA-3.0 OR GFDL-1.3-or-later) -->
|
||||
<h2 id="system-layout">
|
||||
|
||||
|
||||
<a href="#system-layout" class="anchor-heading" aria-labelledby="system-layout"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> System layout
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>First, OSTree encourages systems to implement
|
||||
<a href="http://www.freedesktop.org/wiki/Software/systemd/TheCaseForTheUsrMerge/">UsrMove</a>
|
||||
This is simply to avoid the need for more bind mounts. By default
|
||||
OSTree’s dracut hook creates a read-only bind mount over <code class="language-plaintext highlighter-rouge">/usr</code>; you
|
||||
can of course generate individual bind-mounts for <code class="language-plaintext highlighter-rouge">/bin</code>, all the
|
||||
<code class="language-plaintext highlighter-rouge">/lib</code> variants, etc. So it is not intended to be a hard requirement.</p>
|
||||
|
||||
<p>Remember, because by default the system is booted into a <code class="language-plaintext highlighter-rouge">chroot</code>
|
||||
equivalent, there has to be some way to refer to the actual physical
|
||||
root filesystem. Therefore, your operating system tree should contain
|
||||
an empty <code class="language-plaintext highlighter-rouge">/sysroot</code> directory; at boot time, OSTree will make this a
|
||||
bind mount to the physical / root directory. There is precedent for
|
||||
this name in the initramfs context. You should furthermore make a
|
||||
toplevel symbolic link <code class="language-plaintext highlighter-rouge">/ostree</code> which points to <code class="language-plaintext highlighter-rouge">/sysroot/ostree</code>, so
|
||||
that the OSTree tool at runtime can consistently find the system data
|
||||
regardless of whether it’s operating on a physical root or inside a
|
||||
deployment.</p>
|
||||
|
||||
<p>Because OSTree only preserves <code class="language-plaintext highlighter-rouge">/var</code> across upgrades (each
|
||||
deployment’s chroot directory will be garbage collected
|
||||
eventually), you will need to choose how to handle other
|
||||
toplevel writable directories specified by the <a href="http://www.pathname.com/fhs/">Filesystem Hierarchy Standard</a>.
|
||||
Your operating system may of course choose
|
||||
not to support some of these such as <code class="language-plaintext highlighter-rouge">/usr/local</code>, but following is the
|
||||
recommended set:</p>
|
||||
|
||||
<ul>
|
||||
<li><code class="language-plaintext highlighter-rouge">/home</code> → <code class="language-plaintext highlighter-rouge">/var/home</code></li>
|
||||
<li><code class="language-plaintext highlighter-rouge">/opt</code> → <code class="language-plaintext highlighter-rouge">/var/opt</code></li>
|
||||
<li><code class="language-plaintext highlighter-rouge">/srv</code> → <code class="language-plaintext highlighter-rouge">/var/srv</code></li>
|
||||
<li><code class="language-plaintext highlighter-rouge">/root</code> → <code class="language-plaintext highlighter-rouge">/var/roothome</code></li>
|
||||
<li><code class="language-plaintext highlighter-rouge">/usr/local</code> → <code class="language-plaintext highlighter-rouge">/var/usrlocal</code></li>
|
||||
<li><code class="language-plaintext highlighter-rouge">/mnt</code> → <code class="language-plaintext highlighter-rouge">/var/mnt</code></li>
|
||||
<li><code class="language-plaintext highlighter-rouge">/tmp</code> → <code class="language-plaintext highlighter-rouge">/sysroot/tmp</code></li>
|
||||
</ul>
|
||||
|
||||
<p>Furthermore, since <code class="language-plaintext highlighter-rouge">/var</code> is empty by default, your operating system
|
||||
will need to dynamically create the <em>targets</em> of these at boot. A
|
||||
good way to do this is using <code class="language-plaintext highlighter-rouge">systemd-tmpfiles</code>, if your OS uses
|
||||
systemd. For example:</p>
|
||||
|
||||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>d /var/log/journal 0755 root root -
|
||||
L /var/home - - - - ../sysroot/home
|
||||
d /var/opt 0755 root root -
|
||||
d /var/srv 0755 root root -
|
||||
d /var/roothome 0700 root root -
|
||||
d /var/usrlocal 0755 root root -
|
||||
d /var/usrlocal/bin 0755 root root -
|
||||
d /var/usrlocal/etc 0755 root root -
|
||||
d /var/usrlocal/games 0755 root root -
|
||||
d /var/usrlocal/include 0755 root root -
|
||||
d /var/usrlocal/lib 0755 root root -
|
||||
d /var/usrlocal/man 0755 root root -
|
||||
d /var/usrlocal/sbin 0755 root root -
|
||||
d /var/usrlocal/share 0755 root root -
|
||||
d /var/usrlocal/src 0755 root root -
|
||||
d /var/mnt 0755 root root -
|
||||
d /run/media 0755 root root -
|
||||
</code></pre></div></div>
|
||||
|
||||
<p>However, as of OSTree 2023.9 there is support for a <code class="language-plaintext highlighter-rouge">root.transient</code>
|
||||
model, which can increase compatibility in some scenarios. For more
|
||||
information, see <code class="language-plaintext highlighter-rouge">man ostree-prepare-root.conf</code>.</p>
|
||||
|
||||
<p>Particularly note here the double indirection of <code class="language-plaintext highlighter-rouge">/home</code>. By default,
|
||||
each deployment will share the global toplevel <code class="language-plaintext highlighter-rouge">/home</code> directory on
|
||||
the physical root filesystem. It is then up to higher levels of
|
||||
management tools to keep <code class="language-plaintext highlighter-rouge">/etc/passwd</code> or equivalent synchronized
|
||||
between operating systems. Each deployment can easily be reconfigured
|
||||
to have its own home directory set simply by making <code class="language-plaintext highlighter-rouge">/var/home</code> a real
|
||||
directory.</p>
|
||||
<h2 id="booting-and-initramfs-technology">
|
||||
|
||||
|
||||
<a href="#booting-and-initramfs-technology" class="anchor-heading" aria-labelledby="booting-and-initramfs-technology"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Booting and initramfs technology
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>OSTree comes with optional dracut+systemd integration code which follows
|
||||
this logic:</p>
|
||||
|
||||
<ul>
|
||||
<li>Parse the <code class="language-plaintext highlighter-rouge">ostree=</code> kernel command line argument in the initramfs</li>
|
||||
<li>Set up a read-only bind mount on <code class="language-plaintext highlighter-rouge">/usr</code></li>
|
||||
<li>Bind mount the deployment’s <code class="language-plaintext highlighter-rouge">/sysroot</code> to the physical <code class="language-plaintext highlighter-rouge">/</code></li>
|
||||
<li>Use <code class="language-plaintext highlighter-rouge">mount(MS_MOVE)</code> to make the deployment root appear to be the root filesystem</li>
|
||||
</ul>
|
||||
|
||||
<p>After these steps, systemd switches root.</p>
|
||||
|
||||
<p>If you are not using dracut or systemd, using OSTree should still be
|
||||
possible, but you will have to write the integration code. See the
|
||||
existing sources in
|
||||
<a href="https://github.com/ostreedev/ostree/tree/main/src/switchroot">src/switchroot</a>
|
||||
as a reference.</p>
|
||||
|
||||
<p>Patches to support other initramfs technologies and init systems, if
|
||||
sufficiently clean, will likely be accepted upstream.</p>
|
||||
|
||||
<p>A further specific note regarding <code class="language-plaintext highlighter-rouge">sysvinit</code>: OSTree used to support
|
||||
recording device files such as the <code class="language-plaintext highlighter-rouge">/dev/initctl</code> FIFO, but no longer
|
||||
does. It’s recommended to just patch your initramfs to create this at
|
||||
boot.</p>
|
||||
<h2 id="system-users-and-groups">
|
||||
|
||||
|
||||
<a href="#system-users-and-groups" class="anchor-heading" aria-labelledby="system-users-and-groups"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> System users and groups
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>Unlike traditional package systems, OSTree trees contain <em>numeric</em> uid
|
||||
and gids (the same is true of e.g. OCI).</p>
|
||||
|
||||
<p>Furthermore, OSTree does not have a <code class="language-plaintext highlighter-rouge">%post</code> type mechanism
|
||||
where <code class="language-plaintext highlighter-rouge">useradd</code> could be invoked. In order to ship an OS that
|
||||
contains both system users and users dynamically created on client
|
||||
machines, you will need to choose a solution for <code class="language-plaintext highlighter-rouge">/etc/passwd</code>. The
|
||||
core problem is that if you add a user to the system for a daemon, the
|
||||
OSTree upgrade process for <code class="language-plaintext highlighter-rouge">/etc</code> will simply notice that because
|
||||
<code class="language-plaintext highlighter-rouge">/etc/passwd</code> differs from the previous default, it will keep the
|
||||
modified config file, and your new OS user will not be visible.</p>
|
||||
|
||||
<p>First, consider using <a href="https://0pointer.net/blog/dynamic-users-with-systemd.html">systemd DynamicUser=yes</a>
|
||||
where applicable. This entirely avoids problems with static
|
||||
allocations.</p>
|
||||
<h3 id="static-users-and-groups">
|
||||
|
||||
|
||||
<a href="#static-users-and-groups" class="anchor-heading" aria-labelledby="static-users-and-groups"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Static users and groups
|
||||
|
||||
|
||||
</h3>
|
||||
|
||||
|
||||
<p>For users which must be allocated statically (for example, they
|
||||
are used by setuid executables in <code class="language-plaintext highlighter-rouge">/usr/bin</code>, there are two
|
||||
primary wants to handle this.</p>
|
||||
|
||||
<p>The <a href="https://github.com/aperezdc/nss-altfiles">nss-altfiles</a>
|
||||
was created to pair with image-based update systems like OSTree,
|
||||
and is used by many operating systems and distributions today.</p>
|
||||
|
||||
<p>More recently, <a href="https://www.freedesktop.org/software/systemd/man/nss-systemd.html">nss-systemd</a>
|
||||
gained support for statically allocated users and groups in
|
||||
a JSON format stored in <code class="language-plaintext highlighter-rouge">/usr/lib/userdb</code>.</p>
|
||||
<h3 id="sysusersd">
|
||||
|
||||
|
||||
<a href="#sysusersd" class="anchor-heading" aria-labelledby="sysusersd"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> sysusers.d
|
||||
|
||||
|
||||
</h3>
|
||||
|
||||
|
||||
<p>Some users and groups can be assigned dynamically via <a href="https://www.freedesktop.org/software/systemd/man/sysusers.d.html">sysusers.d</a>. This means users and groups are maintained per-machine and may drift (unless statically assigned in sysusers).</p>
|
||||
|
||||
<p>But this model is suitable for users and groups which must always be present,
|
||||
but do not have file content in the image.</p>
|
||||
<h2 id="adapting-existing-package-managers">
|
||||
|
||||
|
||||
<a href="#adapting-existing-package-managers" class="anchor-heading" aria-labelledby="adapting-existing-package-managers"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Adapting existing package managers
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>The largest endeavor is likely to be redesigning your distribution’s
|
||||
package manager to be on top of OSTree, particularly if you want to
|
||||
keep compatibility with the “old way” of installing into the physical
|
||||
<code class="language-plaintext highlighter-rouge">/</code>. This section will use examples from both <code class="language-plaintext highlighter-rouge">dpkg</code> and <code class="language-plaintext highlighter-rouge">rpm</code> as the
|
||||
author has familiarity with both; but the abstract concepts should
|
||||
apply to most traditional package managers.</p>
|
||||
|
||||
<p>There are many levels of possible integration; initially, we will
|
||||
describe the most naive implementation which is the simplest but also
|
||||
the least efficient. We will assume here that the admin is booted
|
||||
into an OSTree-enabled system, and wants to add a set of packages.</p>
|
||||
|
||||
<p>Many package managers store their state in <code class="language-plaintext highlighter-rouge">/var</code>; but since in the
|
||||
OSTree model that directory is shared between independent versions,
|
||||
the package database must first be found in the per-deployment <code class="language-plaintext highlighter-rouge">/usr</code>
|
||||
directory. It becomes read-only; remember, all upgrades involve
|
||||
constructing a new filesystem tree, so your package manager will also
|
||||
need to create a copy of its database. Most likely, if you want to
|
||||
continue supporting non-OSTree deployments, simply have your package
|
||||
manager fall back to the legacy <code class="language-plaintext highlighter-rouge">/var</code> location if the one in <code class="language-plaintext highlighter-rouge">/usr</code>
|
||||
is not found.</p>
|
||||
|
||||
<p>To install a set of new packages (without removing any existing ones),
|
||||
enumerate the set of packages in the currently booted deployment, and
|
||||
perform dependency resolution to compute the complete set of new
|
||||
packages. Download and unpack these new packages to a temporary
|
||||
directory.</p>
|
||||
|
||||
<p>Now, because we are merely installing new packages and not
|
||||
removing anything, we can make the major optimization of reusing
|
||||
our existing filesystem tree, and merely
|
||||
<em>layering</em> the composed filesystem tree of
|
||||
these new packages on top. A command like this:</p>
|
||||
|
||||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>ostree commit -b osname/releasename/description
|
||||
--tree=ref=$osname/$releasename/$description
|
||||
--tree=dir=/var/tmp/newpackages.13A8D0/
|
||||
</code></pre></div></div>
|
||||
|
||||
<p>will create a new commit in the <code class="language-plaintext highlighter-rouge">$osname/$releasename/$description</code>
|
||||
branch. The OSTree SHA256 checksum of all the files in
|
||||
<code class="language-plaintext highlighter-rouge">/var/tmp/newpackages.13A8D0/</code> will be computed, but we will not
|
||||
re-checksum the present existing tree. In this layering model,
|
||||
earlier directories will take precedence, but files in later layers
|
||||
will silently override earlier layers.</p>
|
||||
|
||||
<p>Then to actually deploy this tree for the next boot:
|
||||
<code class="language-plaintext highlighter-rouge">ostree admin deploy $osname/$releasename/$description</code></p>
|
||||
|
||||
<p>This is essentially what <a href="https://github.com/projectatomic/rpm-ostree/">rpm-ostree</a>
|
||||
does to support its <a href="https://rpm-ostree.readthedocs.io/en/latest/manual/administrator-handbook/#hybrid-imagepackaging-via-package-layering">package layering model</a>.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<hr>
|
||||
<footer>
|
||||
|
||||
|
||||
<p class="text-small text-grey-dk-100 mb-0">Copyright © <a href="https://www.redhat.com">Red Hat, Inc.</a> and <a href="https://github.com/ostreedev">others</a>.</p>
|
||||
|
||||
|
||||
<div class="d-flex mt-2">
|
||||
|
||||
|
||||
<p class="text-small text-grey-dk-000 mb-0">
|
||||
<a href="https://github.com/ostreedev/ostree/tree/main/docs/adapting-existing.md" id="edit-this-page">Edit this page on GitHub</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="search-overlay"></div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
1
assets/css/just-the-docs-dark.css
Normal file
1
assets/css/just-the-docs-default.css
Normal file
1
assets/css/just-the-docs-light.css
Normal file
BIN
assets/images/just-the-docs.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
assets/images/large-image.jpg
Normal file
After Width: | Height: | Size: 532 KiB |
1
assets/images/search.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg width="28" height="28" viewBox="0 0 28 28" xmlns="http://www.w3.org/2000/svg"><title>Search</title><g fill-rule="nonzero" fill="#959396"><path d="M17.332 20.735c-5.537 0-10-4.6-10-10.247 0-5.646 4.463-10.247 10-10.247 5.536 0 10 4.601 10 10.247s-4.464 10.247-10 10.247zm0-4c3.3 0 6-2.783 6-6.247 0-3.463-2.7-6.247-6-6.247s-6 2.784-6 6.247c0 3.464 2.7 6.247 6 6.247z"/><path d="M11.672 13.791L.192 25.271 3.02 28.1 14.5 16.62z"/></g></svg>
|
After Width: | Height: | Size: 444 B |
BIN
assets/images/small-image.jpg
Normal file
After Width: | Height: | Size: 43 KiB |
497
assets/js/just-the-docs.js
Normal file
@ -0,0 +1,497 @@
|
||||
(function (jtd, undefined) {
|
||||
|
||||
// Event handling
|
||||
|
||||
jtd.addEvent = function(el, type, handler) {
|
||||
if (el.attachEvent) el.attachEvent('on'+type, handler); else el.addEventListener(type, handler);
|
||||
}
|
||||
jtd.removeEvent = function(el, type, handler) {
|
||||
if (el.detachEvent) el.detachEvent('on'+type, handler); else el.removeEventListener(type, handler);
|
||||
}
|
||||
jtd.onReady = function(ready) {
|
||||
// in case the document is already rendered
|
||||
if (document.readyState!='loading') ready();
|
||||
// modern browsers
|
||||
else if (document.addEventListener) document.addEventListener('DOMContentLoaded', ready);
|
||||
// IE <= 8
|
||||
else document.attachEvent('onreadystatechange', function(){
|
||||
if (document.readyState=='complete') ready();
|
||||
});
|
||||
}
|
||||
|
||||
// Show/hide mobile menu
|
||||
|
||||
function initNav() {
|
||||
jtd.addEvent(document, 'click', function(e){
|
||||
var target = e.target;
|
||||
while (target && !(target.classList && target.classList.contains('nav-list-expander'))) {
|
||||
target = target.parentNode;
|
||||
}
|
||||
if (target) {
|
||||
e.preventDefault();
|
||||
target.parentNode.classList.toggle('active');
|
||||
}
|
||||
});
|
||||
|
||||
const siteNav = document.getElementById('site-nav');
|
||||
const mainHeader = document.getElementById('main-header');
|
||||
const menuButton = document.getElementById('menu-button');
|
||||
|
||||
jtd.addEvent(menuButton, 'click', function(e){
|
||||
e.preventDefault();
|
||||
|
||||
if (menuButton.classList.toggle('nav-open')) {
|
||||
siteNav.classList.add('nav-open');
|
||||
mainHeader.classList.add('nav-open');
|
||||
} else {
|
||||
siteNav.classList.remove('nav-open');
|
||||
mainHeader.classList.remove('nav-open');
|
||||
}
|
||||
});
|
||||
}
|
||||
// Site search
|
||||
|
||||
function initSearch() {
|
||||
var request = new XMLHttpRequest();
|
||||
request.open('GET', '/ostree/assets/js/search-data.json', true);
|
||||
|
||||
request.onload = function(){
|
||||
if (request.status >= 200 && request.status < 400) {
|
||||
var docs = JSON.parse(request.responseText);
|
||||
|
||||
lunr.tokenizer.separator = /[\s\-/]+/
|
||||
|
||||
var index = lunr(function(){
|
||||
this.ref('id');
|
||||
this.field('title', { boost: 200 });
|
||||
this.field('content', { boost: 2 });
|
||||
this.field('relUrl');
|
||||
this.metadataWhitelist = ['position']
|
||||
|
||||
for (var i in docs) {
|
||||
|
||||
this.add({
|
||||
id: i,
|
||||
title: docs[i].title,
|
||||
content: docs[i].content,
|
||||
relUrl: docs[i].relUrl
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
searchLoaded(index, docs);
|
||||
} else {
|
||||
console.log('Error loading ajax request. Request status:' + request.status);
|
||||
}
|
||||
};
|
||||
|
||||
request.onerror = function(){
|
||||
console.log('There was a connection error');
|
||||
};
|
||||
|
||||
request.send();
|
||||
}
|
||||
|
||||
function searchLoaded(index, docs) {
|
||||
var index = index;
|
||||
var docs = docs;
|
||||
var searchInput = document.getElementById('search-input');
|
||||
var searchResults = document.getElementById('search-results');
|
||||
var mainHeader = document.getElementById('main-header');
|
||||
var currentInput;
|
||||
var currentSearchIndex = 0;
|
||||
|
||||
function showSearch() {
|
||||
document.documentElement.classList.add('search-active');
|
||||
}
|
||||
|
||||
function hideSearch() {
|
||||
document.documentElement.classList.remove('search-active');
|
||||
}
|
||||
|
||||
function update() {
|
||||
currentSearchIndex++;
|
||||
|
||||
var input = searchInput.value;
|
||||
if (input === '') {
|
||||
hideSearch();
|
||||
} else {
|
||||
showSearch();
|
||||
// scroll search input into view, workaround for iOS Safari
|
||||
window.scroll(0, -1);
|
||||
setTimeout(function(){ window.scroll(0, 0); }, 0);
|
||||
}
|
||||
if (input === currentInput) {
|
||||
return;
|
||||
}
|
||||
currentInput = input;
|
||||
searchResults.innerHTML = '';
|
||||
if (input === '') {
|
||||
return;
|
||||
}
|
||||
|
||||
var results = index.query(function (query) {
|
||||
var tokens = lunr.tokenizer(input)
|
||||
query.term(tokens, {
|
||||
boost: 10
|
||||
});
|
||||
query.term(tokens, {
|
||||
wildcard: lunr.Query.wildcard.TRAILING
|
||||
});
|
||||
});
|
||||
|
||||
if ((results.length == 0) && (input.length > 2)) {
|
||||
var tokens = lunr.tokenizer(input).filter(function(token, i) {
|
||||
return token.str.length < 20;
|
||||
})
|
||||
if (tokens.length > 0) {
|
||||
results = index.query(function (query) {
|
||||
query.term(tokens, {
|
||||
editDistance: Math.round(Math.sqrt(input.length / 2 - 1))
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (results.length == 0) {
|
||||
var noResultsDiv = document.createElement('div');
|
||||
noResultsDiv.classList.add('search-no-result');
|
||||
noResultsDiv.innerText = 'No results found';
|
||||
searchResults.appendChild(noResultsDiv);
|
||||
|
||||
} else {
|
||||
var resultsList = document.createElement('ul');
|
||||
resultsList.classList.add('search-results-list');
|
||||
searchResults.appendChild(resultsList);
|
||||
|
||||
addResults(resultsList, results, 0, 10, 100, currentSearchIndex);
|
||||
}
|
||||
|
||||
function addResults(resultsList, results, start, batchSize, batchMillis, searchIndex) {
|
||||
if (searchIndex != currentSearchIndex) {
|
||||
return;
|
||||
}
|
||||
for (var i = start; i < (start + batchSize); i++) {
|
||||
if (i == results.length) {
|
||||
return;
|
||||
}
|
||||
addResult(resultsList, results[i]);
|
||||
}
|
||||
setTimeout(function() {
|
||||
addResults(resultsList, results, start + batchSize, batchSize, batchMillis, searchIndex);
|
||||
}, batchMillis);
|
||||
}
|
||||
|
||||
function addResult(resultsList, result) {
|
||||
var doc = docs[result.ref];
|
||||
|
||||
var resultsListItem = document.createElement('li');
|
||||
resultsListItem.classList.add('search-results-list-item');
|
||||
resultsList.appendChild(resultsListItem);
|
||||
|
||||
var resultLink = document.createElement('a');
|
||||
resultLink.classList.add('search-result');
|
||||
resultLink.setAttribute('href', doc.url);
|
||||
resultsListItem.appendChild(resultLink);
|
||||
|
||||
var resultTitle = document.createElement('div');
|
||||
resultTitle.classList.add('search-result-title');
|
||||
resultLink.appendChild(resultTitle);
|
||||
|
||||
// note: the SVG svg-doc is only loaded as a Jekyll include if site.search_enabled is true; see _includes/icons/icons.html
|
||||
var resultDoc = document.createElement('div');
|
||||
resultDoc.classList.add('search-result-doc');
|
||||
resultDoc.innerHTML = '<svg viewBox="0 0 24 24" class="search-result-icon"><use xlink:href="#svg-doc"></use></svg>';
|
||||
resultTitle.appendChild(resultDoc);
|
||||
|
||||
var resultDocTitle = document.createElement('div');
|
||||
resultDocTitle.classList.add('search-result-doc-title');
|
||||
resultDocTitle.innerHTML = doc.doc;
|
||||
resultDoc.appendChild(resultDocTitle);
|
||||
var resultDocOrSection = resultDocTitle;
|
||||
|
||||
if (doc.doc != doc.title) {
|
||||
resultDoc.classList.add('search-result-doc-parent');
|
||||
var resultSection = document.createElement('div');
|
||||
resultSection.classList.add('search-result-section');
|
||||
resultSection.innerHTML = doc.title;
|
||||
resultTitle.appendChild(resultSection);
|
||||
resultDocOrSection = resultSection;
|
||||
}
|
||||
|
||||
var metadata = result.matchData.metadata;
|
||||
var titlePositions = [];
|
||||
var contentPositions = [];
|
||||
for (var j in metadata) {
|
||||
var meta = metadata[j];
|
||||
if (meta.title) {
|
||||
var positions = meta.title.position;
|
||||
for (var k in positions) {
|
||||
titlePositions.push(positions[k]);
|
||||
}
|
||||
}
|
||||
if (meta.content) {
|
||||
var positions = meta.content.position;
|
||||
for (var k in positions) {
|
||||
var position = positions[k];
|
||||
var previewStart = position[0];
|
||||
var previewEnd = position[0] + position[1];
|
||||
var ellipsesBefore = true;
|
||||
var ellipsesAfter = true;
|
||||
for (var k = 0; k < 5; k++) {
|
||||
var nextSpace = doc.content.lastIndexOf(' ', previewStart - 2);
|
||||
var nextDot = doc.content.lastIndexOf('. ', previewStart - 2);
|
||||
if ((nextDot >= 0) && (nextDot > nextSpace)) {
|
||||
previewStart = nextDot + 1;
|
||||
ellipsesBefore = false;
|
||||
break;
|
||||
}
|
||||
if (nextSpace < 0) {
|
||||
previewStart = 0;
|
||||
ellipsesBefore = false;
|
||||
break;
|
||||
}
|
||||
previewStart = nextSpace + 1;
|
||||
}
|
||||
for (var k = 0; k < 10; k++) {
|
||||
var nextSpace = doc.content.indexOf(' ', previewEnd + 1);
|
||||
var nextDot = doc.content.indexOf('. ', previewEnd + 1);
|
||||
if ((nextDot >= 0) && (nextDot < nextSpace)) {
|
||||
previewEnd = nextDot;
|
||||
ellipsesAfter = false;
|
||||
break;
|
||||
}
|
||||
if (nextSpace < 0) {
|
||||
previewEnd = doc.content.length;
|
||||
ellipsesAfter = false;
|
||||
break;
|
||||
}
|
||||
previewEnd = nextSpace;
|
||||
}
|
||||
contentPositions.push({
|
||||
highlight: position,
|
||||
previewStart: previewStart, previewEnd: previewEnd,
|
||||
ellipsesBefore: ellipsesBefore, ellipsesAfter: ellipsesAfter
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (titlePositions.length > 0) {
|
||||
titlePositions.sort(function(p1, p2){ return p1[0] - p2[0] });
|
||||
resultDocOrSection.innerHTML = '';
|
||||
addHighlightedText(resultDocOrSection, doc.title, 0, doc.title.length, titlePositions);
|
||||
}
|
||||
|
||||
if (contentPositions.length > 0) {
|
||||
contentPositions.sort(function(p1, p2){ return p1.highlight[0] - p2.highlight[0] });
|
||||
var contentPosition = contentPositions[0];
|
||||
var previewPosition = {
|
||||
highlight: [contentPosition.highlight],
|
||||
previewStart: contentPosition.previewStart, previewEnd: contentPosition.previewEnd,
|
||||
ellipsesBefore: contentPosition.ellipsesBefore, ellipsesAfter: contentPosition.ellipsesAfter
|
||||
};
|
||||
var previewPositions = [previewPosition];
|
||||
for (var j = 1; j < contentPositions.length; j++) {
|
||||
contentPosition = contentPositions[j];
|
||||
if (previewPosition.previewEnd < contentPosition.previewStart) {
|
||||
previewPosition = {
|
||||
highlight: [contentPosition.highlight],
|
||||
previewStart: contentPosition.previewStart, previewEnd: contentPosition.previewEnd,
|
||||
ellipsesBefore: contentPosition.ellipsesBefore, ellipsesAfter: contentPosition.ellipsesAfter
|
||||
}
|
||||
previewPositions.push(previewPosition);
|
||||
} else {
|
||||
previewPosition.highlight.push(contentPosition.highlight);
|
||||
previewPosition.previewEnd = contentPosition.previewEnd;
|
||||
previewPosition.ellipsesAfter = contentPosition.ellipsesAfter;
|
||||
}
|
||||
}
|
||||
|
||||
var resultPreviews = document.createElement('div');
|
||||
resultPreviews.classList.add('search-result-previews');
|
||||
resultLink.appendChild(resultPreviews);
|
||||
|
||||
var content = doc.content;
|
||||
for (var j = 0; j < Math.min(previewPositions.length, 3); j++) {
|
||||
var position = previewPositions[j];
|
||||
|
||||
var resultPreview = document.createElement('div');
|
||||
resultPreview.classList.add('search-result-preview');
|
||||
resultPreviews.appendChild(resultPreview);
|
||||
|
||||
if (position.ellipsesBefore) {
|
||||
resultPreview.appendChild(document.createTextNode('... '));
|
||||
}
|
||||
addHighlightedText(resultPreview, content, position.previewStart, position.previewEnd, position.highlight);
|
||||
if (position.ellipsesAfter) {
|
||||
resultPreview.appendChild(document.createTextNode(' ...'));
|
||||
}
|
||||
}
|
||||
}
|
||||
var resultRelUrl = document.createElement('span');
|
||||
resultRelUrl.classList.add('search-result-rel-url');
|
||||
resultRelUrl.innerText = doc.relUrl;
|
||||
resultTitle.appendChild(resultRelUrl);
|
||||
}
|
||||
|
||||
function addHighlightedText(parent, text, start, end, positions) {
|
||||
var index = start;
|
||||
for (var i in positions) {
|
||||
var position = positions[i];
|
||||
var span = document.createElement('span');
|
||||
span.innerHTML = text.substring(index, position[0]);
|
||||
parent.appendChild(span);
|
||||
index = position[0] + position[1];
|
||||
var highlight = document.createElement('span');
|
||||
highlight.classList.add('search-result-highlight');
|
||||
highlight.innerHTML = text.substring(position[0], index);
|
||||
parent.appendChild(highlight);
|
||||
}
|
||||
var span = document.createElement('span');
|
||||
span.innerHTML = text.substring(index, end);
|
||||
parent.appendChild(span);
|
||||
}
|
||||
}
|
||||
|
||||
jtd.addEvent(searchInput, 'focus', function(){
|
||||
setTimeout(update, 0);
|
||||
});
|
||||
|
||||
jtd.addEvent(searchInput, 'keyup', function(e){
|
||||
switch (e.keyCode) {
|
||||
case 27: // When esc key is pressed, hide the results and clear the field
|
||||
searchInput.value = '';
|
||||
break;
|
||||
case 38: // arrow up
|
||||
case 40: // arrow down
|
||||
case 13: // enter
|
||||
e.preventDefault();
|
||||
return;
|
||||
}
|
||||
update();
|
||||
});
|
||||
|
||||
jtd.addEvent(searchInput, 'keydown', function(e){
|
||||
switch (e.keyCode) {
|
||||
case 38: // arrow up
|
||||
e.preventDefault();
|
||||
var active = document.querySelector('.search-result.active');
|
||||
if (active) {
|
||||
active.classList.remove('active');
|
||||
if (active.parentElement.previousSibling) {
|
||||
var previous = active.parentElement.previousSibling.querySelector('.search-result');
|
||||
previous.classList.add('active');
|
||||
}
|
||||
}
|
||||
return;
|
||||
case 40: // arrow down
|
||||
e.preventDefault();
|
||||
var active = document.querySelector('.search-result.active');
|
||||
if (active) {
|
||||
if (active.parentElement.nextSibling) {
|
||||
var next = active.parentElement.nextSibling.querySelector('.search-result');
|
||||
active.classList.remove('active');
|
||||
next.classList.add('active');
|
||||
}
|
||||
} else {
|
||||
var next = document.querySelector('.search-result');
|
||||
if (next) {
|
||||
next.classList.add('active');
|
||||
}
|
||||
}
|
||||
return;
|
||||
case 13: // enter
|
||||
e.preventDefault();
|
||||
var active = document.querySelector('.search-result.active');
|
||||
if (active) {
|
||||
active.click();
|
||||
} else {
|
||||
var first = document.querySelector('.search-result');
|
||||
if (first) {
|
||||
first.click();
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
||||
jtd.addEvent(document, 'click', function(e){
|
||||
if (e.target != searchInput) {
|
||||
hideSearch();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Switch theme
|
||||
|
||||
jtd.getTheme = function() {
|
||||
var cssFileHref = document.querySelector('[rel="stylesheet"]').getAttribute('href');
|
||||
return cssFileHref.substring(cssFileHref.lastIndexOf('-') + 1, cssFileHref.length - 4);
|
||||
}
|
||||
|
||||
jtd.setTheme = function(theme) {
|
||||
var cssFile = document.querySelector('[rel="stylesheet"]');
|
||||
cssFile.setAttribute('href', '/ostree/assets/css/just-the-docs-' + theme + '.css');
|
||||
}
|
||||
|
||||
// Scroll site-nav to ensure the link to the current page is visible
|
||||
|
||||
function scrollNav() {
|
||||
const href = document.location.pathname;
|
||||
const siteNav = document.getElementById('site-nav');
|
||||
const targetLink = siteNav.querySelector('a[href="' + href + '"], a[href="' + href + '/"]');
|
||||
if(targetLink){
|
||||
const rect = targetLink.getBoundingClientRect();
|
||||
siteNav.scrollBy(0, rect.top - 3*rect.height);
|
||||
}
|
||||
}
|
||||
|
||||
// Document ready
|
||||
|
||||
jtd.onReady(function(){
|
||||
initNav();
|
||||
initSearch();
|
||||
scrollNav();
|
||||
});
|
||||
|
||||
// Copy button on code
|
||||
|
||||
jtd.onReady(function(){
|
||||
|
||||
var codeBlocks = document.querySelectorAll('div.highlighter-rouge, div.listingblock > div.content, figure.highlight');
|
||||
|
||||
// note: the SVG svg-copied and svg-copy is only loaded as a Jekyll include if site.enable_copy_code_button is true; see _includes/icons/icons.html
|
||||
var svgCopied = '<svg viewBox="0 0 24 24" class="copy-icon"><use xlink:href="#svg-copied"></use></svg>';
|
||||
var svgCopy = '<svg viewBox="0 0 24 24" class="copy-icon"><use xlink:href="#svg-copy"></use></svg>';
|
||||
|
||||
codeBlocks.forEach(codeBlock => {
|
||||
var copyButton = document.createElement('button');
|
||||
var timeout = null;
|
||||
copyButton.type = 'button';
|
||||
copyButton.ariaLabel = 'Copy code to clipboard';
|
||||
copyButton.innerHTML = svgCopy;
|
||||
codeBlock.append(copyButton);
|
||||
|
||||
copyButton.addEventListener('click', function () {
|
||||
if(timeout === null) {
|
||||
var code = (codeBlock.querySelector('pre:not(.lineno, .highlight)') || codeBlock.querySelector('code')).innerText;
|
||||
window.navigator.clipboard.writeText(code);
|
||||
|
||||
copyButton.innerHTML = svgCopied;
|
||||
|
||||
var timeoutSetting = 4000;
|
||||
|
||||
timeout = setTimeout(function () {
|
||||
copyButton.innerHTML = svgCopy;
|
||||
timeout = null;
|
||||
}, timeoutSetting);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
})(window.jtd = window.jtd || {});
|
||||
|
||||
|
1003
assets/js/search-data.json
Normal file
61
assets/js/vendor/lunr.min.js
vendored
Normal file
419
atomic-rollbacks/index.html
Normal file
@ -0,0 +1,419 @@
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
||||
|
||||
<link rel="stylesheet" href="/ostree/assets/css/just-the-docs-default.css">
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="/ostree/assets/js/vendor/lunr.min.js"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="/ostree/assets/js/just-the-docs.js"></script>
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Begin Jekyll SEO tag v2.8.0 -->
|
||||
<title>Atomic Rollbacks | ostreedev/ostree</title>
|
||||
<meta name="generator" content="Jekyll v3.9.5" />
|
||||
<meta property="og:title" content="Atomic Rollbacks" />
|
||||
<meta property="og:locale" content="en_US" />
|
||||
<meta name="description" content="ostree documentation" />
|
||||
<meta property="og:description" content="ostree documentation" />
|
||||
<link rel="canonical" href="https://ostreedev.github.io/ostree/atomic-rollbacks/" />
|
||||
<meta property="og:url" content="https://ostreedev.github.io/ostree/atomic-rollbacks/" />
|
||||
<meta property="og:site_name" content="ostreedev/ostree" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
<meta property="twitter:title" content="Atomic Rollbacks" />
|
||||
<script type="application/ld+json">
|
||||
{"@context":"https://schema.org","@type":"WebPage","description":"ostree documentation","headline":"Atomic Rollbacks","url":"https://ostreedev.github.io/ostree/atomic-rollbacks/"}</script>
|
||||
<!-- End Jekyll SEO tag -->
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<a class="skip-to-main" href="#main-content">Skip to main content</a>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="d-none">
|
||||
<symbol id="svg-link" viewBox="0 0 24 24">
|
||||
<title>Link</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link">
|
||||
<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<symbol id="svg-menu" viewBox="0 0 24 24">
|
||||
<title>Menu</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-menu">
|
||||
<line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
|
||||
<title>Expand</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right">
|
||||
<polyline points="9 18 15 12 9 6"></polyline>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<!-- Feather. MIT License: https://github.com/feathericons/feather/blob/master/LICENSE -->
|
||||
<symbol id="svg-external-link" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-external-link">
|
||||
<title id="svg-external-link-title">(external link)</title>
|
||||
<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line>
|
||||
</symbol>
|
||||
|
||||
|
||||
<symbol id="svg-doc" viewBox="0 0 24 24">
|
||||
<title>Document</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-file">
|
||||
<path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"></path><polyline points="13 2 13 9 20 9"></polyline>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<symbol id="svg-search" viewBox="0 0 24 24">
|
||||
<title>Search</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search">
|
||||
<circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
|
||||
|
||||
<!-- Bootstrap Icons. MIT License: https://github.com/twbs/icons/blob/main/LICENSE.md -->
|
||||
<symbol id="svg-copy" viewBox="0 0 16 16">
|
||||
<title>Copy</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-clipboard" viewBox="0 0 16 16">
|
||||
<path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z"/>
|
||||
<path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-copied" viewBox="0 0 16 16">
|
||||
<title>Copied</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-clipboard-check-fill" viewBox="0 0 16 16">
|
||||
<path d="M6.5 0A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3Zm3 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3Z"/>
|
||||
<path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1A2.5 2.5 0 0 1 9.5 5h-3A2.5 2.5 0 0 1 4 2.5v-1Zm6.854 7.354-3 3a.5.5 0 0 1-.708 0l-1.5-1.5a.5.5 0 0 1 .708-.708L7.5 10.793l2.646-2.647a.5.5 0 0 1 .708.708Z"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
|
||||
</svg>
|
||||
|
||||
<div class="side-bar">
|
||||
<div class="site-header">
|
||||
<a href="/ostree/" class="site-title lh-tight">
|
||||
ostreedev/ostree
|
||||
|
||||
</a>
|
||||
<a href="#" id="menu-button" class="site-button">
|
||||
<svg viewBox="0 0 24 24" class="icon"><use xlink:href="#svg-menu"></use></svg>
|
||||
</a>
|
||||
</div>
|
||||
<nav aria-label="Main" id="site-nav" class="site-nav">
|
||||
|
||||
|
||||
<ul class="nav-list"><li class="nav-list-item"><a href="/ostree/" class="nav-list-link">libostree</a></li><li class="nav-list-item"><a href="/ostree/introduction/" class="nav-list-link">OSTree Overview</a></li><li class="nav-list-item"><a href="/ostree/repo/" class="nav-list-link">Anatomy of an OSTree repository</a></li><li class="nav-list-item"><a href="/ostree/deployment/" class="nav-list-link">Deployments</a></li><li class="nav-list-item"><a href="/ostree/atomic-upgrades/" class="nav-list-link">Atomic Upgrades</a></li><li class="nav-list-item active"><a href="/ostree/atomic-rollbacks/" class="nav-list-link active">Atomic Rollbacks</a></li><li class="nav-list-item"><a href="/ostree/adapting-existing/" class="nav-list-link">Adapting existing mainstream distributions</a></li><li class="nav-list-item"><a href="/ostree/var/" class="nav-list-link">OSTree and /var handling</a></li><li class="nav-list-item"><a href="/ostree/formats/" class="nav-list-link">OSTree data formats</a></li><li class="nav-list-item"><a href="/ostree/buildsystem-and-repos/" class="nav-list-link">Writing a buildsystem and managing repositories</a></li><li class="nav-list-item"><a href="/ostree/authenticated-repos/" class="nav-list-link">Handling access to authenticated remote repositories</a></li><li class="nav-list-item"><a href="/ostree/repository-management/" class="nav-list-link">Managing content in OSTree repositories</a></li><li class="nav-list-item"><a href="/ostree/copying-deltas/" class="nav-list-link">Static deltas for offline updates</a></li><li class="nav-list-item"><a href="/ostree/ima/" class="nav-list-link">Using Linux IMA with OSTree</a></li><li class="nav-list-item"><a href="/ostree/related-projects/" class="nav-list-link">Related Projects</a></li><li class="nav-list-item"><a href="/ostree/composefs/" class="nav-list-link">Using composefs with OSTree</a></li><li class="nav-list-item"><a href="/ostree/bootloaders/" class="nav-list-link">Bootloaders</a></li><li class="nav-list-item"><a href="/ostree/CONTRIBUTING/" class="nav-list-link">Contributing</a></li><li class="nav-list-item"><a href="/ostree/contributing-tutorial/" class="nav-list-link">OSTree Contributing Tutorial</a></li><li class="nav-list-item"><a href="/ostree/README-historical/" class="nav-list-link">Historical OSTree README</a></li></ul>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
|
||||
<footer class="site-footer">
|
||||
This site uses <a href="https://github.com/just-the-docs/just-the-docs">Just the Docs</a>, a documentation theme for Jekyll.
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="main" id="top">
|
||||
<div id="main-header" class="main-header">
|
||||
|
||||
|
||||
|
||||
<div class="search">
|
||||
<div class="search-input-wrap">
|
||||
<input type="text" id="search-input" class="search-input" tabindex="0" placeholder="Search ostreedev/ostree" aria-label="Search ostreedev/ostree" autocomplete="off">
|
||||
<label for="search-input" class="search-label"><svg viewBox="0 0 24 24" class="search-icon"><use xlink:href="#svg-search"></use></svg></label>
|
||||
</div>
|
||||
<div id="search-results" class="search-results"></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<nav aria-label="Auxiliary" class="aux-nav">
|
||||
<ul class="aux-nav-list">
|
||||
|
||||
<li class="aux-nav-list-item">
|
||||
<a href="https://github.com/ostreedev/ostree" class="site-button"
|
||||
|
||||
>
|
||||
OSTree on GitHub
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="main-content-wrap" class="main-content-wrap">
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="main-content" class="main-content" role="main">
|
||||
|
||||
<h1 class="no_toc" id="atomic-rollbacks">
|
||||
|
||||
|
||||
<a href="#atomic-rollbacks" class="anchor-heading" aria-labelledby="atomic-rollbacks"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Atomic Rollbacks
|
||||
|
||||
|
||||
</h1>
|
||||
|
||||
|
||||
<ol id="markdown-toc">
|
||||
<li><a href="#automatic-rollbacks" id="markdown-toc-automatic-rollbacks">Automatic rollbacks</a></li>
|
||||
<li><a href="#manual-rollbacks" id="markdown-toc-manual-rollbacks">Manual rollbacks</a></li>
|
||||
<li><a href="#rollbacks" id="markdown-toc-rollbacks">Rollbacks</a></li>
|
||||
<li><a href="#alternate-rollback-techniques" id="markdown-toc-alternate-rollback-techniques">Alternate rollback techniques</a></li>
|
||||
</ol>
|
||||
|
||||
<!-- SPDX-License-Identifier: (CC-BY-SA-3.0 OR GFDL-1.3-or-later) -->
|
||||
<h2 id="automatic-rollbacks">
|
||||
|
||||
|
||||
<a href="#automatic-rollbacks" class="anchor-heading" aria-labelledby="automatic-rollbacks"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Automatic rollbacks
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>See <a href="https://github.com/fedora-iot/greenboot/blob/main/README.md">greenboot</a> for information on automatic rollbacks and how to integrate
|
||||
without your bootloader.</p>
|
||||
<h2 id="manual-rollbacks">
|
||||
|
||||
|
||||
<a href="#manual-rollbacks" class="anchor-heading" aria-labelledby="manual-rollbacks"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Manual rollbacks
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>Ostree writes bootloader entries that are interpreted by the bootloader. To
|
||||
manually rollback, for bootloaders such as GRUB and syslinux that have an
|
||||
interactive UI, it is possible to select a previous boot entry. In the case of
|
||||
an Android bootloader, a slot switch may be triggererd using an AB switching
|
||||
tool. This may be useful for testing purposes.</p>
|
||||
<h2 id="rollbacks">
|
||||
|
||||
|
||||
<a href="#rollbacks" class="anchor-heading" aria-labelledby="rollbacks"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Rollbacks
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code> +------------------------------------------------+
|
||||
+------------------+ | |
|
||||
| | | |
|
||||
| | | |
|
||||
| | | (ostree:0) latest (multi-user.target) |
|
||||
| | | |
|
||||
| Bootloader |--->+ root |
|
||||
| | | |
|
||||
| | | (ostree:1) latest - 1 (multi-user.target) |
|
||||
| | | |
|
||||
| | | |
|
||||
+------------------+ | |
|
||||
+------------------------------------------------+
|
||||
</code></pre></div></div>
|
||||
|
||||
<p>Bootloaders have multiple boot entries to choose from after upgrade. On
|
||||
rollback, the bootloader will boot the “latest - 1” version, rather than the
|
||||
latest version of the OS.</p>
|
||||
<h2 id="alternate-rollback-techniques">
|
||||
|
||||
|
||||
<a href="#alternate-rollback-techniques" class="anchor-heading" aria-labelledby="alternate-rollback-techniques"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Alternate rollback techniques
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>Below is an alternate technique to traditional AB switching that can be used.
|
||||
On rollback, an alternative boot target is used, rather than booting as
|
||||
default.target.</p>
|
||||
|
||||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code> +------------------------------------------------+
|
||||
+------------------+ | |
|
||||
| | | |
|
||||
| | | |
|
||||
| | | (ostree:0) latest (multi-user.target) |
|
||||
| | | |
|
||||
| Bootloader |--->+ root |
|
||||
| | | |
|
||||
| | | (ostree:1) latest - 1 (rescue.target) |
|
||||
| | | |
|
||||
| | | |
|
||||
+------------------+ | |
|
||||
+------------------------------------------------+
|
||||
</code></pre></div></div>
|
||||
|
||||
<p>In this case, instead of rolling back to an older version, we also boot
|
||||
into an alternate systemd boot target. Here we will describe how you can put
|
||||
togther an alternate systemd boot target, using the built-in rescue.target as
|
||||
an example.</p>
|
||||
|
||||
<p>Below is a rescue.service file, it essentially executes systemd-sulogin-shell
|
||||
rescue when this service is activated.</p>
|
||||
|
||||
<p>rescue.service:</p>
|
||||
|
||||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
#
|
||||
# This file is part of systemd.
|
||||
#
|
||||
# systemd is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation; either version 2.1 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
[Unit]
|
||||
Description=Rescue Shell
|
||||
Documentation=man:sulogin(8)
|
||||
DefaultDependencies=no
|
||||
Conflicts=shutdown.target
|
||||
After=sysinit.target plymouth-start.service
|
||||
Before=shutdown.target
|
||||
|
||||
[Service]
|
||||
Environment=HOME=/root
|
||||
WorkingDirectory=-/root
|
||||
ExecStartPre=-/usr/bin/plymouth --wait quit
|
||||
ExecStart=-/usr/lib/systemd/systemd-sulogin-shell rescue
|
||||
Type=idle
|
||||
StandardInput=tty-force
|
||||
StandardOutput=inherit
|
||||
StandardError=inherit
|
||||
KillMode=process
|
||||
IgnoreSIGPIPE=no
|
||||
SendSIGHUP=yes
|
||||
</code></pre></div></div>
|
||||
|
||||
<p>Below is a rescue.target file, it is reached once rescue.service is complete.</p>
|
||||
|
||||
<p>rescue.target:</p>
|
||||
|
||||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
#
|
||||
# This file is part of systemd.
|
||||
#
|
||||
# systemd is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation; either version 2.1 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
[Unit]
|
||||
Description=Rescue Mode
|
||||
Documentation=man:systemd.special(7)
|
||||
Requires=sysinit.target rescue.service
|
||||
After=sysinit.target rescue.service
|
||||
AllowIsolate=yes
|
||||
</code></pre></div></div>
|
||||
|
||||
<p>This is a simple bash script, it checks whether <code class="language-plaintext highlighter-rouge">ostree admin status -D</code> is
|
||||
<code class="language-plaintext highlighter-rouge">not-default</code> and if it is, it notifies systemd to alternatively boot into
|
||||
rescue.target.</p>
|
||||
|
||||
<p>In the happy path, when we have booted the latest version
|
||||
<code class="language-plaintext highlighter-rouge">ostree admin status -D</code> would output <code class="language-plaintext highlighter-rouge">default</code>.</p>
|
||||
|
||||
<p>ostree-rollback-to-rescue:</p>
|
||||
|
||||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>#!/usr/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
if [ "$(ostree admin status -D)" = "not-default" ]; then
|
||||
exec systemctl --no-block isolate rescue.target
|
||||
fi
|
||||
</code></pre></div></div>
|
||||
|
||||
<p>This is a systemd service file that runs ostree-rollback-to-rescue early in the
|
||||
boot sequence, it is essential that this service is run early to ensure we
|
||||
don’t execute a full boot sequence, hence options <code class="language-plaintext highlighter-rouge">DefaultDependencies=no</code> and
|
||||
<code class="language-plaintext highlighter-rouge">Before=</code> are used.</p>
|
||||
|
||||
<p>ostree-rollback-to-rescue.service</p>
|
||||
|
||||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>[Unit]
|
||||
Description=OSTree rollback to rescue
|
||||
DefaultDependencies=no
|
||||
OnFailure=emergency.target
|
||||
OnFailureJobMode=replace-irreversibly
|
||||
After=initrd-root-fs.target initrd-fs.target initrd.target boot.mount
|
||||
Before=cryptsetup.target integritysetup.target remote-fs.target slices.target swap.target veritysetup.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/sbin/ostree-rollback-to-rescue
|
||||
|
||||
[Install]
|
||||
WantedBy=sysinit.target
|
||||
</code></pre></div></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<hr>
|
||||
<footer>
|
||||
|
||||
|
||||
<p class="text-small text-grey-dk-100 mb-0">Copyright © <a href="https://www.redhat.com">Red Hat, Inc.</a> and <a href="https://github.com/ostreedev">others</a>.</p>
|
||||
|
||||
|
||||
<div class="d-flex mt-2">
|
||||
|
||||
|
||||
<p class="text-small text-grey-dk-000 mb-0">
|
||||
<a href="https://github.com/ostreedev/ostree/tree/main/docs/atomic-rollbacks.md" id="edit-this-page">Edit this page on GitHub</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="search-overlay"></div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
440
atomic-upgrades/index.html
Normal file
@ -0,0 +1,440 @@
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
||||
|
||||
<link rel="stylesheet" href="/ostree/assets/css/just-the-docs-default.css">
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="/ostree/assets/js/vendor/lunr.min.js"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="/ostree/assets/js/just-the-docs.js"></script>
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Begin Jekyll SEO tag v2.8.0 -->
|
||||
<title>Atomic Upgrades | ostreedev/ostree</title>
|
||||
<meta name="generator" content="Jekyll v3.9.5" />
|
||||
<meta property="og:title" content="Atomic Upgrades" />
|
||||
<meta property="og:locale" content="en_US" />
|
||||
<meta name="description" content="ostree documentation" />
|
||||
<meta property="og:description" content="ostree documentation" />
|
||||
<link rel="canonical" href="https://ostreedev.github.io/ostree/atomic-upgrades/" />
|
||||
<meta property="og:url" content="https://ostreedev.github.io/ostree/atomic-upgrades/" />
|
||||
<meta property="og:site_name" content="ostreedev/ostree" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
<meta property="twitter:title" content="Atomic Upgrades" />
|
||||
<script type="application/ld+json">
|
||||
{"@context":"https://schema.org","@type":"WebPage","description":"ostree documentation","headline":"Atomic Upgrades","url":"https://ostreedev.github.io/ostree/atomic-upgrades/"}</script>
|
||||
<!-- End Jekyll SEO tag -->
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<a class="skip-to-main" href="#main-content">Skip to main content</a>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="d-none">
|
||||
<symbol id="svg-link" viewBox="0 0 24 24">
|
||||
<title>Link</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link">
|
||||
<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<symbol id="svg-menu" viewBox="0 0 24 24">
|
||||
<title>Menu</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-menu">
|
||||
<line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
|
||||
<title>Expand</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right">
|
||||
<polyline points="9 18 15 12 9 6"></polyline>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<!-- Feather. MIT License: https://github.com/feathericons/feather/blob/master/LICENSE -->
|
||||
<symbol id="svg-external-link" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-external-link">
|
||||
<title id="svg-external-link-title">(external link)</title>
|
||||
<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line>
|
||||
</symbol>
|
||||
|
||||
|
||||
<symbol id="svg-doc" viewBox="0 0 24 24">
|
||||
<title>Document</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-file">
|
||||
<path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"></path><polyline points="13 2 13 9 20 9"></polyline>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<symbol id="svg-search" viewBox="0 0 24 24">
|
||||
<title>Search</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search">
|
||||
<circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
|
||||
|
||||
<!-- Bootstrap Icons. MIT License: https://github.com/twbs/icons/blob/main/LICENSE.md -->
|
||||
<symbol id="svg-copy" viewBox="0 0 16 16">
|
||||
<title>Copy</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-clipboard" viewBox="0 0 16 16">
|
||||
<path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z"/>
|
||||
<path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-copied" viewBox="0 0 16 16">
|
||||
<title>Copied</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-clipboard-check-fill" viewBox="0 0 16 16">
|
||||
<path d="M6.5 0A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3Zm3 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3Z"/>
|
||||
<path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1A2.5 2.5 0 0 1 9.5 5h-3A2.5 2.5 0 0 1 4 2.5v-1Zm6.854 7.354-3 3a.5.5 0 0 1-.708 0l-1.5-1.5a.5.5 0 0 1 .708-.708L7.5 10.793l2.646-2.647a.5.5 0 0 1 .708.708Z"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
|
||||
</svg>
|
||||
|
||||
<div class="side-bar">
|
||||
<div class="site-header">
|
||||
<a href="/ostree/" class="site-title lh-tight">
|
||||
ostreedev/ostree
|
||||
|
||||
</a>
|
||||
<a href="#" id="menu-button" class="site-button">
|
||||
<svg viewBox="0 0 24 24" class="icon"><use xlink:href="#svg-menu"></use></svg>
|
||||
</a>
|
||||
</div>
|
||||
<nav aria-label="Main" id="site-nav" class="site-nav">
|
||||
|
||||
|
||||
<ul class="nav-list"><li class="nav-list-item"><a href="/ostree/" class="nav-list-link">libostree</a></li><li class="nav-list-item"><a href="/ostree/introduction/" class="nav-list-link">OSTree Overview</a></li><li class="nav-list-item"><a href="/ostree/repo/" class="nav-list-link">Anatomy of an OSTree repository</a></li><li class="nav-list-item"><a href="/ostree/deployment/" class="nav-list-link">Deployments</a></li><li class="nav-list-item active"><a href="/ostree/atomic-upgrades/" class="nav-list-link active">Atomic Upgrades</a></li><li class="nav-list-item"><a href="/ostree/atomic-rollbacks/" class="nav-list-link">Atomic Rollbacks</a></li><li class="nav-list-item"><a href="/ostree/adapting-existing/" class="nav-list-link">Adapting existing mainstream distributions</a></li><li class="nav-list-item"><a href="/ostree/var/" class="nav-list-link">OSTree and /var handling</a></li><li class="nav-list-item"><a href="/ostree/formats/" class="nav-list-link">OSTree data formats</a></li><li class="nav-list-item"><a href="/ostree/buildsystem-and-repos/" class="nav-list-link">Writing a buildsystem and managing repositories</a></li><li class="nav-list-item"><a href="/ostree/authenticated-repos/" class="nav-list-link">Handling access to authenticated remote repositories</a></li><li class="nav-list-item"><a href="/ostree/repository-management/" class="nav-list-link">Managing content in OSTree repositories</a></li><li class="nav-list-item"><a href="/ostree/copying-deltas/" class="nav-list-link">Static deltas for offline updates</a></li><li class="nav-list-item"><a href="/ostree/ima/" class="nav-list-link">Using Linux IMA with OSTree</a></li><li class="nav-list-item"><a href="/ostree/related-projects/" class="nav-list-link">Related Projects</a></li><li class="nav-list-item"><a href="/ostree/composefs/" class="nav-list-link">Using composefs with OSTree</a></li><li class="nav-list-item"><a href="/ostree/bootloaders/" class="nav-list-link">Bootloaders</a></li><li class="nav-list-item"><a href="/ostree/CONTRIBUTING/" class="nav-list-link">Contributing</a></li><li class="nav-list-item"><a href="/ostree/contributing-tutorial/" class="nav-list-link">OSTree Contributing Tutorial</a></li><li class="nav-list-item"><a href="/ostree/README-historical/" class="nav-list-link">Historical OSTree README</a></li></ul>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
|
||||
<footer class="site-footer">
|
||||
This site uses <a href="https://github.com/just-the-docs/just-the-docs">Just the Docs</a>, a documentation theme for Jekyll.
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="main" id="top">
|
||||
<div id="main-header" class="main-header">
|
||||
|
||||
|
||||
|
||||
<div class="search">
|
||||
<div class="search-input-wrap">
|
||||
<input type="text" id="search-input" class="search-input" tabindex="0" placeholder="Search ostreedev/ostree" aria-label="Search ostreedev/ostree" autocomplete="off">
|
||||
<label for="search-input" class="search-label"><svg viewBox="0 0 24 24" class="search-icon"><use xlink:href="#svg-search"></use></svg></label>
|
||||
</div>
|
||||
<div id="search-results" class="search-results"></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<nav aria-label="Auxiliary" class="aux-nav">
|
||||
<ul class="aux-nav-list">
|
||||
|
||||
<li class="aux-nav-list-item">
|
||||
<a href="https://github.com/ostreedev/ostree" class="site-button"
|
||||
|
||||
>
|
||||
OSTree on GitHub
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="main-content-wrap" class="main-content-wrap">
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="main-content" class="main-content" role="main">
|
||||
|
||||
<h1 class="no_toc" id="atomic-upgrades">
|
||||
|
||||
|
||||
<a href="#atomic-upgrades" class="anchor-heading" aria-labelledby="atomic-upgrades"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Atomic Upgrades
|
||||
|
||||
|
||||
</h1>
|
||||
|
||||
|
||||
<ol id="markdown-toc">
|
||||
<li><a href="#you-can-turn-off-the-power-anytime-you-want" id="markdown-toc-you-can-turn-off-the-power-anytime-you-want">You can turn off the power anytime you want…</a></li>
|
||||
<li><a href="#simple-upgrades-via-http" id="markdown-toc-simple-upgrades-via-http">Simple upgrades via HTTP</a></li>
|
||||
<li><a href="#upgrades-via-external-tools-eg-package-managers" id="markdown-toc-upgrades-via-external-tools-eg-package-managers">Upgrades via external tools (e.g. package managers)</a></li>
|
||||
<li><a href="#assembling-a-new-deployment-directory" id="markdown-toc-assembling-a-new-deployment-directory">Assembling a new deployment directory</a></li>
|
||||
<li><a href="#atomically-swapping-boot-configuration" id="markdown-toc-atomically-swapping-boot-configuration">Atomically swapping boot configuration</a></li>
|
||||
<li><a href="#the-bootversion" id="markdown-toc-the-bootversion">The bootversion</a></li>
|
||||
<li><a href="#the-ostreeboot-directory" id="markdown-toc-the-ostreeboot-directory">The /ostree/boot directory</a></li>
|
||||
<li><a href="#the-bootostree-directory" id="markdown-toc-the-bootostree-directory">The /boot/ostree directory</a></li>
|
||||
</ol>
|
||||
|
||||
<!-- SPDX-License-Identifier: (CC-BY-SA-3.0 OR GFDL-1.3-or-later) -->
|
||||
<h2 id="you-can-turn-off-the-power-anytime-you-want">
|
||||
|
||||
|
||||
<a href="#you-can-turn-off-the-power-anytime-you-want" class="anchor-heading" aria-labelledby="you-can-turn-off-the-power-anytime-you-want"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> You can turn off the power anytime you want…
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>OSTree is designed to implement fully atomic and safe upgrades;
|
||||
more generally, atomic transitions between lists of bootable
|
||||
deployments. If the system crashes or you pull the power, you
|
||||
will have either the old system, or the new one.</p>
|
||||
<h2 id="simple-upgrades-via-http">
|
||||
|
||||
|
||||
<a href="#simple-upgrades-via-http" class="anchor-heading" aria-labelledby="simple-upgrades-via-http"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Simple upgrades via HTTP
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>First, the most basic model OSTree supports is one where it replicates
|
||||
pre-generated filesystem trees from a server over HTTP, tracking
|
||||
exactly one ref, which is stored in the <code class="language-plaintext highlighter-rouge">.origin</code> file for the
|
||||
deployment. The command <code class="language-plaintext highlighter-rouge">ostree admin upgrade</code>
|
||||
implements this.</p>
|
||||
|
||||
<p>To begin a simple upgrade, OSTree fetches the contents of the ref from
|
||||
the remote server. Suppose we’re tracking a ref named
|
||||
<code class="language-plaintext highlighter-rouge">exampleos/buildmain/x86_64-runtime</code>. OSTree fetches the URL
|
||||
<code class="language-plaintext highlighter-rouge">http://example.com/repo/refs/heads/exampleos/buildmain/x86_64-runtime</code>,
|
||||
which contains a SHA256 checksum. This determines the tree to deploy,
|
||||
and <code class="language-plaintext highlighter-rouge">/etc</code> will be merged from currently booted tree.</p>
|
||||
|
||||
<p>If we do not have this commit, then we perform a pull process.
|
||||
At present (without static deltas), this involves quite simply just
|
||||
fetching each individual object that we do not have, asynchronously.
|
||||
Put in other words, we only download changed files (zlib-compressed).
|
||||
Each object has its checksum validated and is stored in <code class="language-plaintext highlighter-rouge">/ostree/repo/objects/</code>.</p>
|
||||
|
||||
<p>Once the pull is complete, we have downloaded all the objects that we need
|
||||
to perform a deployment.</p>
|
||||
<h2 id="upgrades-via-external-tools-eg-package-managers">
|
||||
|
||||
|
||||
<a href="#upgrades-via-external-tools-eg-package-managers" class="anchor-heading" aria-labelledby="upgrades-via-external-tools-eg-package-managers"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Upgrades via external tools (e.g. package managers)
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>As mentioned in the introduction, OSTree is also designed to allow a
|
||||
model where filesystem trees are computed on the client. It is
|
||||
completely agnostic as to how those trees are generated; they could be
|
||||
computed with traditional packages, packages with post-deployment
|
||||
scripts on top, or built by developers directly from revision control
|
||||
locally, etc.</p>
|
||||
|
||||
<p>At a practical level, most package managers today (<code class="language-plaintext highlighter-rouge">dpkg</code> and <code class="language-plaintext highlighter-rouge">rpm</code>)
|
||||
operate “live” on the currently booted filesystem. The way they could
|
||||
work with OSTree is to, instead, take the list of installed packages in
|
||||
the currently booted tree, and compute a new filesystem from that. A
|
||||
later chapter describes in more details how this could work:
|
||||
<a href="/ostree/adapting-existing/">Adapting Existing Systems</a>.</p>
|
||||
|
||||
<p>For the purposes of this section, let’s assume that we have a
|
||||
newly generated filesystem tree stored in the repo (which shares
|
||||
storage with the existing booted tree). We can then move on to
|
||||
checking it back out of the repo into a deployment.</p>
|
||||
<h2 id="assembling-a-new-deployment-directory">
|
||||
|
||||
|
||||
<a href="#assembling-a-new-deployment-directory" class="anchor-heading" aria-labelledby="assembling-a-new-deployment-directory"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Assembling a new deployment directory
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>Given a commit to deploy, OSTree first allocates a directory for
|
||||
it. This is of the form <code class="language-plaintext highlighter-rouge">/boot/loader/entries/ostree-$stateroot-$checksum.$serial.conf</code>.
|
||||
The <code class="language-plaintext highlighter-rouge">$serial</code> is normally <code class="language-plaintext highlighter-rouge">0</code>, but if a
|
||||
given commit is deployed more than once, it will be incremented.
|
||||
This is supported because the previous deployment may have
|
||||
configuration in <code class="language-plaintext highlighter-rouge">/etc</code> that we do not want to use or overwrite.</p>
|
||||
|
||||
<p>Now that we have a deployment directory, a 3-way merge is performed
|
||||
between the (by default) currently booted deployment’s <code class="language-plaintext highlighter-rouge">/etc</code>, its
|
||||
default configuration, and the new deployment (based on its <code class="language-plaintext highlighter-rouge">/usr/etc</code>).</p>
|
||||
|
||||
<p>How it works is:</p>
|
||||
<ul>
|
||||
<li>Files in the currently booted deployment’s <code class="language-plaintext highlighter-rouge">/etc</code> which were modified
|
||||
from the default <code class="language-plaintext highlighter-rouge">/usr/etc</code> (of the same deployment) are retained.</li>
|
||||
<li>Files in the currently booted deployment’s <code class="language-plaintext highlighter-rouge">/etc</code> which were not
|
||||
modified from the default <code class="language-plaintext highlighter-rouge">/usr/etc</code> (of the same deployment) are
|
||||
upgraded to the new defaults from the new deployment’s <code class="language-plaintext highlighter-rouge">/usr/etc</code>.</li>
|
||||
</ul>
|
||||
|
||||
<p>Roughly, this means that as soon as you modify or add a file in <code class="language-plaintext highlighter-rouge">/etc</code>,
|
||||
this file will be propagated forever as is (though there is a
|
||||
corner-case, where if your modification eventually exactly matches a
|
||||
future default file, then the file will go back to following future
|
||||
default updates from that point on).</p>
|
||||
|
||||
<p>You can use <code class="language-plaintext highlighter-rouge">ostree admin config-diff</code> to see the differences between
|
||||
your booted deployment’s <code class="language-plaintext highlighter-rouge">/etc</code> and the OSTree defaults. A command like
|
||||
<code class="language-plaintext highlighter-rouge">diff {/usr,}/etc</code> will additional print line-level differences.</p>
|
||||
<h2 id="atomically-swapping-boot-configuration">
|
||||
|
||||
|
||||
<a href="#atomically-swapping-boot-configuration" class="anchor-heading" aria-labelledby="atomically-swapping-boot-configuration"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Atomically swapping boot configuration
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>At this point, a new deployment directory has been created as a
|
||||
hardlink farm; the running system is untouched, and the bootloader
|
||||
configuration is untouched. We want to add this deployment to the
|
||||
“deployment list”.</p>
|
||||
|
||||
<p>To support a more general case, OSTree supports atomic transitioning
|
||||
between arbitrary sets of deployments, with the restriction that the
|
||||
currently booted deployment must always be in the new set. In the
|
||||
normal case, we have exactly one deployment, which is the booted one,
|
||||
and we want to add the new deployment to the list. A more complex
|
||||
command might allow creating 100 deployments as part of one atomic
|
||||
transaction, so that one can set up an automated system to bisect
|
||||
across them.</p>
|
||||
<h2 id="the-bootversion">
|
||||
|
||||
|
||||
<a href="#the-bootversion" class="anchor-heading" aria-labelledby="the-bootversion"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> The bootversion
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>OSTree allows swapping between boot configurations by implementing the
|
||||
“swapped directory pattern” in <code class="language-plaintext highlighter-rouge">/boot</code>. This means it is a symbolic
|
||||
link to one of two directories <code class="language-plaintext highlighter-rouge">/ostree/boot.[0|1]</code>. To swap the
|
||||
contents atomically, if the current version is <code class="language-plaintext highlighter-rouge">0</code>, we create
|
||||
<code class="language-plaintext highlighter-rouge">/ostree/boot.1</code>, populate it with the new contents, then atomically
|
||||
swap the symbolic link. Finally, the old contents can be garbage
|
||||
collected at any point.</p>
|
||||
<h2 id="the-ostreeboot-directory">
|
||||
|
||||
|
||||
<a href="#the-ostreeboot-directory" class="anchor-heading" aria-labelledby="the-ostreeboot-directory"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> The /ostree/boot directory
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>However, we want to optimize for the case where the set of
|
||||
kernel/initramfs/devicetree sets is the same between both the old and new
|
||||
deployment lists. This happens when doing an upgrade that does not
|
||||
include the kernel; think of a simple translation update. OSTree
|
||||
optimizes for this case because on some systems <code class="language-plaintext highlighter-rouge">/boot</code> may be on a
|
||||
separate medium such as flash storage not optimized for significant
|
||||
amounts of write traffic. Related to this, modern OSTree has support
|
||||
for having <code class="language-plaintext highlighter-rouge">/boot</code> be a read-only mount by default - it will
|
||||
automatically remount read-write just for the portion of time
|
||||
necessary to update the bootloader configuration.</p>
|
||||
|
||||
<p>To implement this, OSTree also maintains the directory
|
||||
<code class="language-plaintext highlighter-rouge">/ostree/boot.$bootversion</code>, which is a set
|
||||
of symbolic links to the deployment directories. The
|
||||
<code class="language-plaintext highlighter-rouge">$bootversion</code> here must match the version of
|
||||
<code class="language-plaintext highlighter-rouge">/boot</code>. However, in order to allow atomic transitions of
|
||||
<em>this</em> directory, this is also a swapped directory,
|
||||
so just like <code class="language-plaintext highlighter-rouge">/boot</code>, it has a version of <code class="language-plaintext highlighter-rouge">0</code> or <code class="language-plaintext highlighter-rouge">1</code> appended.</p>
|
||||
|
||||
<p>Each bootloader entry has a special <code class="language-plaintext highlighter-rouge">ostree=</code> argument which refers to
|
||||
one of these symbolic links. This is parsed at runtime in the
|
||||
initramfs.</p>
|
||||
<h2 id="the-bootostree-directory">
|
||||
|
||||
|
||||
<a href="#the-bootostree-directory" class="anchor-heading" aria-labelledby="the-bootostree-directory"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> The /boot/ostree directory
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>There is also a <code class="language-plaintext highlighter-rouge">/boot/ostree</code> directory which is where ostree will
|
||||
install kernel data (including the initramfs). In order to
|
||||
deduplicate across deployments, the kernel state is hashed (again
|
||||
with sha256), resulting in a directory like <code class="language-plaintext highlighter-rouge">/boot/ostree/<stateroot>-<checksum></code>;
|
||||
this is what the bootloader entries will use.</p>
|
||||
|
||||
<p>However, this is an implementation detail and may change in the
|
||||
future. As a tool which wants to find kernel for a given root, instead look
|
||||
in <code class="language-plaintext highlighter-rouge">/usr/lib/modules/$kver</code>; this is how OSTree itself finds
|
||||
the kernel to “deploy” by copying it into <code class="language-plaintext highlighter-rouge">/boot</code>.</p>
|
||||
|
||||
<p>Note that if <code class="language-plaintext highlighter-rouge">/boot</code> is on the same partition as <code class="language-plaintext highlighter-rouge">/</code>, then OSTree
|
||||
will just hardlink instead of copying.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<hr>
|
||||
<footer>
|
||||
|
||||
|
||||
<p class="text-small text-grey-dk-100 mb-0">Copyright © <a href="https://www.redhat.com">Red Hat, Inc.</a> and <a href="https://github.com/ostreedev">others</a>.</p>
|
||||
|
||||
|
||||
<div class="d-flex mt-2">
|
||||
|
||||
|
||||
<p class="text-small text-grey-dk-000 mb-0">
|
||||
<a href="https://github.com/ostreedev/ostree/tree/main/docs/atomic-upgrades.md" id="edit-this-page">Edit this page on GitHub</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="search-overlay"></div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
270
authenticated-repos/index.html
Normal file
@ -0,0 +1,270 @@
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
||||
|
||||
<link rel="stylesheet" href="/ostree/assets/css/just-the-docs-default.css">
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="/ostree/assets/js/vendor/lunr.min.js"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="/ostree/assets/js/just-the-docs.js"></script>
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Begin Jekyll SEO tag v2.8.0 -->
|
||||
<title>Handling access to authenticated remote repositories | ostreedev/ostree</title>
|
||||
<meta name="generator" content="Jekyll v3.9.5" />
|
||||
<meta property="og:title" content="Handling access to authenticated remote repositories" />
|
||||
<meta property="og:locale" content="en_US" />
|
||||
<meta name="description" content="ostree documentation" />
|
||||
<meta property="og:description" content="ostree documentation" />
|
||||
<link rel="canonical" href="https://ostreedev.github.io/ostree/authenticated-repos/" />
|
||||
<meta property="og:url" content="https://ostreedev.github.io/ostree/authenticated-repos/" />
|
||||
<meta property="og:site_name" content="ostreedev/ostree" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
<meta property="twitter:title" content="Handling access to authenticated remote repositories" />
|
||||
<script type="application/ld+json">
|
||||
{"@context":"https://schema.org","@type":"WebPage","description":"ostree documentation","headline":"Handling access to authenticated remote repositories","url":"https://ostreedev.github.io/ostree/authenticated-repos/"}</script>
|
||||
<!-- End Jekyll SEO tag -->
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<a class="skip-to-main" href="#main-content">Skip to main content</a>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="d-none">
|
||||
<symbol id="svg-link" viewBox="0 0 24 24">
|
||||
<title>Link</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link">
|
||||
<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<symbol id="svg-menu" viewBox="0 0 24 24">
|
||||
<title>Menu</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-menu">
|
||||
<line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
|
||||
<title>Expand</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right">
|
||||
<polyline points="9 18 15 12 9 6"></polyline>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<!-- Feather. MIT License: https://github.com/feathericons/feather/blob/master/LICENSE -->
|
||||
<symbol id="svg-external-link" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-external-link">
|
||||
<title id="svg-external-link-title">(external link)</title>
|
||||
<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line>
|
||||
</symbol>
|
||||
|
||||
|
||||
<symbol id="svg-doc" viewBox="0 0 24 24">
|
||||
<title>Document</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-file">
|
||||
<path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"></path><polyline points="13 2 13 9 20 9"></polyline>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<symbol id="svg-search" viewBox="0 0 24 24">
|
||||
<title>Search</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search">
|
||||
<circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
|
||||
|
||||
<!-- Bootstrap Icons. MIT License: https://github.com/twbs/icons/blob/main/LICENSE.md -->
|
||||
<symbol id="svg-copy" viewBox="0 0 16 16">
|
||||
<title>Copy</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-clipboard" viewBox="0 0 16 16">
|
||||
<path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z"/>
|
||||
<path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-copied" viewBox="0 0 16 16">
|
||||
<title>Copied</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-clipboard-check-fill" viewBox="0 0 16 16">
|
||||
<path d="M6.5 0A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3Zm3 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3Z"/>
|
||||
<path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1A2.5 2.5 0 0 1 9.5 5h-3A2.5 2.5 0 0 1 4 2.5v-1Zm6.854 7.354-3 3a.5.5 0 0 1-.708 0l-1.5-1.5a.5.5 0 0 1 .708-.708L7.5 10.793l2.646-2.647a.5.5 0 0 1 .708.708Z"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
|
||||
</svg>
|
||||
|
||||
<div class="side-bar">
|
||||
<div class="site-header">
|
||||
<a href="/ostree/" class="site-title lh-tight">
|
||||
ostreedev/ostree
|
||||
|
||||
</a>
|
||||
<a href="#" id="menu-button" class="site-button">
|
||||
<svg viewBox="0 0 24 24" class="icon"><use xlink:href="#svg-menu"></use></svg>
|
||||
</a>
|
||||
</div>
|
||||
<nav aria-label="Main" id="site-nav" class="site-nav">
|
||||
|
||||
|
||||
<ul class="nav-list"><li class="nav-list-item"><a href="/ostree/" class="nav-list-link">libostree</a></li><li class="nav-list-item"><a href="/ostree/introduction/" class="nav-list-link">OSTree Overview</a></li><li class="nav-list-item"><a href="/ostree/repo/" class="nav-list-link">Anatomy of an OSTree repository</a></li><li class="nav-list-item"><a href="/ostree/deployment/" class="nav-list-link">Deployments</a></li><li class="nav-list-item"><a href="/ostree/atomic-upgrades/" class="nav-list-link">Atomic Upgrades</a></li><li class="nav-list-item"><a href="/ostree/atomic-rollbacks/" class="nav-list-link">Atomic Rollbacks</a></li><li class="nav-list-item"><a href="/ostree/adapting-existing/" class="nav-list-link">Adapting existing mainstream distributions</a></li><li class="nav-list-item"><a href="/ostree/var/" class="nav-list-link">OSTree and /var handling</a></li><li class="nav-list-item"><a href="/ostree/formats/" class="nav-list-link">OSTree data formats</a></li><li class="nav-list-item"><a href="/ostree/buildsystem-and-repos/" class="nav-list-link">Writing a buildsystem and managing repositories</a></li><li class="nav-list-item active"><a href="/ostree/authenticated-repos/" class="nav-list-link active">Handling access to authenticated remote repositories</a></li><li class="nav-list-item"><a href="/ostree/repository-management/" class="nav-list-link">Managing content in OSTree repositories</a></li><li class="nav-list-item"><a href="/ostree/copying-deltas/" class="nav-list-link">Static deltas for offline updates</a></li><li class="nav-list-item"><a href="/ostree/ima/" class="nav-list-link">Using Linux IMA with OSTree</a></li><li class="nav-list-item"><a href="/ostree/related-projects/" class="nav-list-link">Related Projects</a></li><li class="nav-list-item"><a href="/ostree/composefs/" class="nav-list-link">Using composefs with OSTree</a></li><li class="nav-list-item"><a href="/ostree/bootloaders/" class="nav-list-link">Bootloaders</a></li><li class="nav-list-item"><a href="/ostree/CONTRIBUTING/" class="nav-list-link">Contributing</a></li><li class="nav-list-item"><a href="/ostree/contributing-tutorial/" class="nav-list-link">OSTree Contributing Tutorial</a></li><li class="nav-list-item"><a href="/ostree/README-historical/" class="nav-list-link">Historical OSTree README</a></li></ul>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
|
||||
<footer class="site-footer">
|
||||
This site uses <a href="https://github.com/just-the-docs/just-the-docs">Just the Docs</a>, a documentation theme for Jekyll.
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="main" id="top">
|
||||
<div id="main-header" class="main-header">
|
||||
|
||||
|
||||
|
||||
<div class="search">
|
||||
<div class="search-input-wrap">
|
||||
<input type="text" id="search-input" class="search-input" tabindex="0" placeholder="Search ostreedev/ostree" aria-label="Search ostreedev/ostree" autocomplete="off">
|
||||
<label for="search-input" class="search-label"><svg viewBox="0 0 24 24" class="search-icon"><use xlink:href="#svg-search"></use></svg></label>
|
||||
</div>
|
||||
<div id="search-results" class="search-results"></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<nav aria-label="Auxiliary" class="aux-nav">
|
||||
<ul class="aux-nav-list">
|
||||
|
||||
<li class="aux-nav-list-item">
|
||||
<a href="https://github.com/ostreedev/ostree" class="site-button"
|
||||
|
||||
>
|
||||
OSTree on GitHub
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="main-content-wrap" class="main-content-wrap">
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="main-content" class="main-content" role="main">
|
||||
|
||||
<h1 class="no_toc" id="handling-access-to-authenticated-remote-repositories">
|
||||
|
||||
|
||||
<a href="#handling-access-to-authenticated-remote-repositories" class="anchor-heading" aria-labelledby="handling-access-to-authenticated-remote-repositories"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Handling access to authenticated remote repositories
|
||||
|
||||
|
||||
</h1>
|
||||
|
||||
|
||||
<ol id="markdown-toc">
|
||||
<li><a href="#using-mutual-tls" id="markdown-toc-using-mutual-tls">Using mutual TLS</a></li>
|
||||
<li><a href="#using-basic-authentication" id="markdown-toc-using-basic-authentication">Using basic authentication</a></li>
|
||||
<li><a href="#using-cookies" id="markdown-toc-using-cookies">Using cookies</a></li>
|
||||
</ol>
|
||||
|
||||
<!-- SPDX-License-Identifier: (CC-BY-SA-3.0 OR GFDL-1.3-or-later) -->
|
||||
|
||||
<p>There is no default concept of an “ostree server”; ostree expects to talk to a generic webserver, so any tool and technique applicable for generic HTTP can also apply to fetching content via OSTree’s builtin HTTP client.</p>
|
||||
<h2 id="using-mutual-tls">
|
||||
|
||||
|
||||
<a href="#using-mutual-tls" class="anchor-heading" aria-labelledby="using-mutual-tls"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Using mutual TLS
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>The <code class="language-plaintext highlighter-rouge">tls-client-cert-path</code> and <code class="language-plaintext highlighter-rouge">tls-client-key-path</code> expose the underlying HTTP code for <a href="https://en.wikipedia.org/wiki/Mutual_authentication">mutual TLS</a>.</p>
|
||||
|
||||
<p>Each device can be provisioned with a secret key which grants it access to the webserver.</p>
|
||||
<h2 id="using-basic-authentication">
|
||||
|
||||
|
||||
<a href="#using-basic-authentication" class="anchor-heading" aria-labelledby="using-basic-authentication"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Using basic authentication
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>The client supports HTTP <code class="language-plaintext highlighter-rouge">basic</code> authentication, but this has well-known management drawbacks.</p>
|
||||
<h2 id="using-cookies">
|
||||
|
||||
|
||||
<a href="#using-cookies" class="anchor-heading" aria-labelledby="using-cookies"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Using cookies
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>Since <a href="https://github.com/ostreedev/ostree/pull/531">this pull request</a> ostree supports adding cookies to a remote configuration. This can be used with e.g. <a href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-signed-cookies.html">Amazon CloudFront</a>.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<hr>
|
||||
<footer>
|
||||
|
||||
|
||||
<p class="text-small text-grey-dk-100 mb-0">Copyright © <a href="https://www.redhat.com">Red Hat, Inc.</a> and <a href="https://github.com/ostreedev">others</a>.</p>
|
||||
|
||||
|
||||
<div class="d-flex mt-2">
|
||||
|
||||
|
||||
<p class="text-small text-grey-dk-000 mb-0">
|
||||
<a href="https://github.com/ostreedev/ostree/tree/main/docs/authenticated-repos.md" id="edit-this-page">Edit this page on GitHub</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="search-overlay"></div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
332
bootloaders/index.html
Normal file
@ -0,0 +1,332 @@
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
||||
|
||||
<link rel="stylesheet" href="/ostree/assets/css/just-the-docs-default.css">
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="/ostree/assets/js/vendor/lunr.min.js"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="/ostree/assets/js/just-the-docs.js"></script>
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Begin Jekyll SEO tag v2.8.0 -->
|
||||
<title>Bootloaders | ostreedev/ostree</title>
|
||||
<meta name="generator" content="Jekyll v3.9.5" />
|
||||
<meta property="og:title" content="Bootloaders" />
|
||||
<meta property="og:locale" content="en_US" />
|
||||
<meta name="description" content="ostree documentation" />
|
||||
<meta property="og:description" content="ostree documentation" />
|
||||
<link rel="canonical" href="https://ostreedev.github.io/ostree/bootloaders/" />
|
||||
<meta property="og:url" content="https://ostreedev.github.io/ostree/bootloaders/" />
|
||||
<meta property="og:site_name" content="ostreedev/ostree" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
<meta property="twitter:title" content="Bootloaders" />
|
||||
<script type="application/ld+json">
|
||||
{"@context":"https://schema.org","@type":"WebPage","description":"ostree documentation","headline":"Bootloaders","url":"https://ostreedev.github.io/ostree/bootloaders/"}</script>
|
||||
<!-- End Jekyll SEO tag -->
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<a class="skip-to-main" href="#main-content">Skip to main content</a>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="d-none">
|
||||
<symbol id="svg-link" viewBox="0 0 24 24">
|
||||
<title>Link</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link">
|
||||
<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<symbol id="svg-menu" viewBox="0 0 24 24">
|
||||
<title>Menu</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-menu">
|
||||
<line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
|
||||
<title>Expand</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right">
|
||||
<polyline points="9 18 15 12 9 6"></polyline>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<!-- Feather. MIT License: https://github.com/feathericons/feather/blob/master/LICENSE -->
|
||||
<symbol id="svg-external-link" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-external-link">
|
||||
<title id="svg-external-link-title">(external link)</title>
|
||||
<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line>
|
||||
</symbol>
|
||||
|
||||
|
||||
<symbol id="svg-doc" viewBox="0 0 24 24">
|
||||
<title>Document</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-file">
|
||||
<path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"></path><polyline points="13 2 13 9 20 9"></polyline>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<symbol id="svg-search" viewBox="0 0 24 24">
|
||||
<title>Search</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search">
|
||||
<circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
|
||||
|
||||
<!-- Bootstrap Icons. MIT License: https://github.com/twbs/icons/blob/main/LICENSE.md -->
|
||||
<symbol id="svg-copy" viewBox="0 0 16 16">
|
||||
<title>Copy</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-clipboard" viewBox="0 0 16 16">
|
||||
<path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z"/>
|
||||
<path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-copied" viewBox="0 0 16 16">
|
||||
<title>Copied</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-clipboard-check-fill" viewBox="0 0 16 16">
|
||||
<path d="M6.5 0A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3Zm3 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3Z"/>
|
||||
<path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1A2.5 2.5 0 0 1 9.5 5h-3A2.5 2.5 0 0 1 4 2.5v-1Zm6.854 7.354-3 3a.5.5 0 0 1-.708 0l-1.5-1.5a.5.5 0 0 1 .708-.708L7.5 10.793l2.646-2.647a.5.5 0 0 1 .708.708Z"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
|
||||
</svg>
|
||||
|
||||
<div class="side-bar">
|
||||
<div class="site-header">
|
||||
<a href="/ostree/" class="site-title lh-tight">
|
||||
ostreedev/ostree
|
||||
|
||||
</a>
|
||||
<a href="#" id="menu-button" class="site-button">
|
||||
<svg viewBox="0 0 24 24" class="icon"><use xlink:href="#svg-menu"></use></svg>
|
||||
</a>
|
||||
</div>
|
||||
<nav aria-label="Main" id="site-nav" class="site-nav">
|
||||
|
||||
|
||||
<ul class="nav-list"><li class="nav-list-item"><a href="/ostree/" class="nav-list-link">libostree</a></li><li class="nav-list-item"><a href="/ostree/introduction/" class="nav-list-link">OSTree Overview</a></li><li class="nav-list-item"><a href="/ostree/repo/" class="nav-list-link">Anatomy of an OSTree repository</a></li><li class="nav-list-item"><a href="/ostree/deployment/" class="nav-list-link">Deployments</a></li><li class="nav-list-item"><a href="/ostree/atomic-upgrades/" class="nav-list-link">Atomic Upgrades</a></li><li class="nav-list-item"><a href="/ostree/atomic-rollbacks/" class="nav-list-link">Atomic Rollbacks</a></li><li class="nav-list-item"><a href="/ostree/adapting-existing/" class="nav-list-link">Adapting existing mainstream distributions</a></li><li class="nav-list-item"><a href="/ostree/var/" class="nav-list-link">OSTree and /var handling</a></li><li class="nav-list-item"><a href="/ostree/formats/" class="nav-list-link">OSTree data formats</a></li><li class="nav-list-item"><a href="/ostree/buildsystem-and-repos/" class="nav-list-link">Writing a buildsystem and managing repositories</a></li><li class="nav-list-item"><a href="/ostree/authenticated-repos/" class="nav-list-link">Handling access to authenticated remote repositories</a></li><li class="nav-list-item"><a href="/ostree/repository-management/" class="nav-list-link">Managing content in OSTree repositories</a></li><li class="nav-list-item"><a href="/ostree/copying-deltas/" class="nav-list-link">Static deltas for offline updates</a></li><li class="nav-list-item"><a href="/ostree/ima/" class="nav-list-link">Using Linux IMA with OSTree</a></li><li class="nav-list-item"><a href="/ostree/related-projects/" class="nav-list-link">Related Projects</a></li><li class="nav-list-item"><a href="/ostree/composefs/" class="nav-list-link">Using composefs with OSTree</a></li><li class="nav-list-item active"><a href="/ostree/bootloaders/" class="nav-list-link active">Bootloaders</a></li><li class="nav-list-item"><a href="/ostree/CONTRIBUTING/" class="nav-list-link">Contributing</a></li><li class="nav-list-item"><a href="/ostree/contributing-tutorial/" class="nav-list-link">OSTree Contributing Tutorial</a></li><li class="nav-list-item"><a href="/ostree/README-historical/" class="nav-list-link">Historical OSTree README</a></li></ul>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
|
||||
<footer class="site-footer">
|
||||
This site uses <a href="https://github.com/just-the-docs/just-the-docs">Just the Docs</a>, a documentation theme for Jekyll.
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="main" id="top">
|
||||
<div id="main-header" class="main-header">
|
||||
|
||||
|
||||
|
||||
<div class="search">
|
||||
<div class="search-input-wrap">
|
||||
<input type="text" id="search-input" class="search-input" tabindex="0" placeholder="Search ostreedev/ostree" aria-label="Search ostreedev/ostree" autocomplete="off">
|
||||
<label for="search-input" class="search-label"><svg viewBox="0 0 24 24" class="search-icon"><use xlink:href="#svg-search"></use></svg></label>
|
||||
</div>
|
||||
<div id="search-results" class="search-results"></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<nav aria-label="Auxiliary" class="aux-nav">
|
||||
<ul class="aux-nav-list">
|
||||
|
||||
<li class="aux-nav-list-item">
|
||||
<a href="https://github.com/ostreedev/ostree" class="site-button"
|
||||
|
||||
>
|
||||
OSTree on GitHub
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="main-content-wrap" class="main-content-wrap">
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="main-content" class="main-content" role="main">
|
||||
|
||||
<h1 class="no_toc" id="bootloaders">
|
||||
|
||||
|
||||
<a href="#bootloaders" class="anchor-heading" aria-labelledby="bootloaders"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Bootloaders
|
||||
|
||||
|
||||
</h1>
|
||||
|
||||
|
||||
<ol id="markdown-toc">
|
||||
<li><a href="#ostree-and-bootloaders" id="markdown-toc-ostree-and-bootloaders">OSTree and bootloaders</a></li>
|
||||
<li><a href="#ostree-and-grub" id="markdown-toc-ostree-and-grub">OSTree and grub</a></li>
|
||||
<li><a href="#ostree-and-aboot" id="markdown-toc-ostree-and-aboot">OSTree and aboot</a></li>
|
||||
<li><a href="#grub-and-os-prober" id="markdown-toc-grub-and-os-prober">GRUB and os-prober</a></li>
|
||||
<li><a href="#anaconda" id="markdown-toc-anaconda">Anaconda</a></li>
|
||||
<li><a href="#bootupd" id="markdown-toc-bootupd">bootupd</a></li>
|
||||
</ol>
|
||||
|
||||
<!-- SPDX-License-Identifier: (CC-BY-SA-3.0 OR GFDL-1.3-or-later) -->
|
||||
<h2 id="ostree-and-bootloaders">
|
||||
|
||||
|
||||
<a href="#ostree-and-bootloaders" class="anchor-heading" aria-labelledby="ostree-and-bootloaders"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> OSTree and bootloaders
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>The intended design of OSTree is that it just writes new files into <code class="language-plaintext highlighter-rouge">/boot/loader/entries</code>. There is a legacy GRUB script (shipped on Fedora as <code class="language-plaintext highlighter-rouge">ostree-grub2</code>) that is intended only for the cases where the system GRUB does not support the <code class="language-plaintext highlighter-rouge">blscfg</code> verb.</p>
|
||||
|
||||
<p>In the happy path then, the flow of an OS update is just:</p>
|
||||
|
||||
<ul>
|
||||
<li>ostree writes a new set of files in <code class="language-plaintext highlighter-rouge">/boot/loader/entries</code> (during <code class="language-plaintext highlighter-rouge">ostree-finalize-staged.service</code> on system shutdown)</li>
|
||||
<li>On system start, GRUB reads those files</li>
|
||||
</ul>
|
||||
|
||||
<p>And that’s it.</p>
|
||||
<h2 id="ostree-and-grub">
|
||||
|
||||
|
||||
<a href="#ostree-and-grub" class="anchor-heading" aria-labelledby="ostree-and-grub"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> OSTree and grub
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>For historical reasons, OSTree defaults to detecting the bootloader; if some GRUB files are present then OSTree will default to executing <code class="language-plaintext highlighter-rouge">grub2-mkconfig</code>.</p>
|
||||
<h2 id="ostree-and-aboot">
|
||||
|
||||
|
||||
<a href="#ostree-and-aboot" class="anchor-heading" aria-labelledby="ostree-and-aboot"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> OSTree and aboot
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>The Android bootloader is another bootloader that may be used with ostree. It still uses the files in <code class="language-plaintext highlighter-rouge">/boot/loader/entries</code> as metadata, but the boootloader does not read these files. Android bootloaders package their kernel+initramfs+cmdline+dtb in a signed binary blob called an <a href="https://source.android.com/docs/core/architecture/bootloader/boot-image-header">Android Boot Image</a>. This binary blob then is written to either partition boot_a or boot_b depending on which slot is suitable.</p>
|
||||
|
||||
<p>Android bootloaders by design inject kargs into the cmdline, some patches may be required in the Android bootloader implementation to ensure that the firmware does not switch between system_a and system_b partitions by populating a <code class="language-plaintext highlighter-rouge">root=</code> karg, or that a <code class="language-plaintext highlighter-rouge">ro</code> karg is not inserted (this karg is incompatible with ostree).</p>
|
||||
|
||||
<p>We have two accompanying scripts that work with this type of environment:</p>
|
||||
|
||||
<p><a href="https://gitlab.com/CentOS/automotive/rpms/aboot-update">aboot-update</a> is used to generate Android Boot Images to be delivered to the client.</p>
|
||||
|
||||
<p><a href="https://gitlab.com/CentOS/automotive/rpms/aboot-deploy">aboot-deploy</a> reads what the current slot is according to the <code class="language-plaintext highlighter-rouge">androidboot.slot_suffix=</code> karg, writes to the alternate boot_a or boot_b slot and sets a symlink either /ostree/root.a or /ostree/root.b so that it is known which userspace directory to boot into based on the <code class="language-plaintext highlighter-rouge">androidboot.slot_suffix=</code> karg, on subsequent boots.</p>
|
||||
|
||||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code> +---------------------------------+
|
||||
+-----------------------------+ +------------------+ | |
|
||||
| bootloader_a appends karg: | | | | |
|
||||
| +--->+ boot_a partition +--->+ |
|
||||
| androidboot.slot_suffix=_a | | | | /ostree/root.a -> ... |
|
||||
+-----------------------------+ +------------------+ | |
|
||||
| system partition |
|
||||
+-----------------------------+ +------------------+ | |
|
||||
| bootloader_b appends karg: | | | | /ostree/root.b -> ... |
|
||||
| +--->+ boot_b partition +--->+ |
|
||||
| androidboot.slot_suffix=_b | | | | |
|
||||
+-----------------------------+ +------------------+ | |
|
||||
+---------------------------------+
|
||||
</code></pre></div></div>
|
||||
<h2 id="grub-and-os-prober">
|
||||
|
||||
|
||||
<a href="#grub-and-os-prober" class="anchor-heading" aria-labelledby="grub-and-os-prober"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> GRUB and os-prober
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>A specific component of GRUB that can significantly impede the reliability of OS updates is the <code class="language-plaintext highlighter-rouge">os-prober</code> aspect, which scans all system block devices. If one doesn’t care about dual booting, avoiding this is a good idea.</p>
|
||||
<h2 id="anaconda">
|
||||
|
||||
|
||||
<a href="#anaconda" class="anchor-heading" aria-labelledby="anaconda"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Anaconda
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>Until very recently, the Anaconda project only supported setting up the bootloader (e.g. GRUB) on its own, which requires <code class="language-plaintext highlighter-rouge">grub2-mkconfig</code> etc. As of recently, Anaconda now <a href="https://github.com/rhinstaller/anaconda/pull/5298">supports bootupd</a>.</p>
|
||||
<h2 id="bootupd">
|
||||
|
||||
|
||||
<a href="#bootupd" class="anchor-heading" aria-labelledby="bootupd"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> bootupd
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>As of recently, <a href="https://github.com/coreos/bootupd/">the bootupd project</a> ships <a href="https://github.com/coreos/bootupd/tree/main/src/grub2">static grub configs</a> and in this case, the <code class="language-plaintext highlighter-rouge">sysroot.bootloader</code> should be set to <code class="language-plaintext highlighter-rouge">none</code> (except on s390x).
|
||||
And assuming that the system grub has the <code class="language-plaintext highlighter-rouge">blscfg</code> support, which it does on Fedora derivatives per above.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<hr>
|
||||
<footer>
|
||||
|
||||
|
||||
<p class="text-small text-grey-dk-100 mb-0">Copyright © <a href="https://www.redhat.com">Red Hat, Inc.</a> and <a href="https://github.com/ostreedev">others</a>.</p>
|
||||
|
||||
|
||||
<div class="d-flex mt-2">
|
||||
|
||||
|
||||
<p class="text-small text-grey-dk-000 mb-0">
|
||||
<a href="https://github.com/ostreedev/ostree/tree/main/docs/bootloaders.md" id="edit-this-page">Edit this page on GitHub</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="search-overlay"></div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
450
buildsystem-and-repos/index.html
Normal file
@ -0,0 +1,450 @@
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
||||
|
||||
<link rel="stylesheet" href="/ostree/assets/css/just-the-docs-default.css">
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="/ostree/assets/js/vendor/lunr.min.js"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="/ostree/assets/js/just-the-docs.js"></script>
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Begin Jekyll SEO tag v2.8.0 -->
|
||||
<title>Writing a buildsystem and managing repositories | ostreedev/ostree</title>
|
||||
<meta name="generator" content="Jekyll v3.9.5" />
|
||||
<meta property="og:title" content="Writing a buildsystem and managing repositories" />
|
||||
<meta property="og:locale" content="en_US" />
|
||||
<meta name="description" content="ostree documentation" />
|
||||
<meta property="og:description" content="ostree documentation" />
|
||||
<link rel="canonical" href="https://ostreedev.github.io/ostree/buildsystem-and-repos/" />
|
||||
<meta property="og:url" content="https://ostreedev.github.io/ostree/buildsystem-and-repos/" />
|
||||
<meta property="og:site_name" content="ostreedev/ostree" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
<meta property="twitter:title" content="Writing a buildsystem and managing repositories" />
|
||||
<script type="application/ld+json">
|
||||
{"@context":"https://schema.org","@type":"WebPage","description":"ostree documentation","headline":"Writing a buildsystem and managing repositories","url":"https://ostreedev.github.io/ostree/buildsystem-and-repos/"}</script>
|
||||
<!-- End Jekyll SEO tag -->
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<a class="skip-to-main" href="#main-content">Skip to main content</a>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="d-none">
|
||||
<symbol id="svg-link" viewBox="0 0 24 24">
|
||||
<title>Link</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link">
|
||||
<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<symbol id="svg-menu" viewBox="0 0 24 24">
|
||||
<title>Menu</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-menu">
|
||||
<line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
|
||||
<title>Expand</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right">
|
||||
<polyline points="9 18 15 12 9 6"></polyline>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<!-- Feather. MIT License: https://github.com/feathericons/feather/blob/master/LICENSE -->
|
||||
<symbol id="svg-external-link" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-external-link">
|
||||
<title id="svg-external-link-title">(external link)</title>
|
||||
<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line>
|
||||
</symbol>
|
||||
|
||||
|
||||
<symbol id="svg-doc" viewBox="0 0 24 24">
|
||||
<title>Document</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-file">
|
||||
<path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"></path><polyline points="13 2 13 9 20 9"></polyline>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<symbol id="svg-search" viewBox="0 0 24 24">
|
||||
<title>Search</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search">
|
||||
<circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
|
||||
|
||||
<!-- Bootstrap Icons. MIT License: https://github.com/twbs/icons/blob/main/LICENSE.md -->
|
||||
<symbol id="svg-copy" viewBox="0 0 16 16">
|
||||
<title>Copy</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-clipboard" viewBox="0 0 16 16">
|
||||
<path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z"/>
|
||||
<path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-copied" viewBox="0 0 16 16">
|
||||
<title>Copied</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-clipboard-check-fill" viewBox="0 0 16 16">
|
||||
<path d="M6.5 0A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3Zm3 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3Z"/>
|
||||
<path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1A2.5 2.5 0 0 1 9.5 5h-3A2.5 2.5 0 0 1 4 2.5v-1Zm6.854 7.354-3 3a.5.5 0 0 1-.708 0l-1.5-1.5a.5.5 0 0 1 .708-.708L7.5 10.793l2.646-2.647a.5.5 0 0 1 .708.708Z"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
|
||||
</svg>
|
||||
|
||||
<div class="side-bar">
|
||||
<div class="site-header">
|
||||
<a href="/ostree/" class="site-title lh-tight">
|
||||
ostreedev/ostree
|
||||
|
||||
</a>
|
||||
<a href="#" id="menu-button" class="site-button">
|
||||
<svg viewBox="0 0 24 24" class="icon"><use xlink:href="#svg-menu"></use></svg>
|
||||
</a>
|
||||
</div>
|
||||
<nav aria-label="Main" id="site-nav" class="site-nav">
|
||||
|
||||
|
||||
<ul class="nav-list"><li class="nav-list-item"><a href="/ostree/" class="nav-list-link">libostree</a></li><li class="nav-list-item"><a href="/ostree/introduction/" class="nav-list-link">OSTree Overview</a></li><li class="nav-list-item"><a href="/ostree/repo/" class="nav-list-link">Anatomy of an OSTree repository</a></li><li class="nav-list-item"><a href="/ostree/deployment/" class="nav-list-link">Deployments</a></li><li class="nav-list-item"><a href="/ostree/atomic-upgrades/" class="nav-list-link">Atomic Upgrades</a></li><li class="nav-list-item"><a href="/ostree/atomic-rollbacks/" class="nav-list-link">Atomic Rollbacks</a></li><li class="nav-list-item"><a href="/ostree/adapting-existing/" class="nav-list-link">Adapting existing mainstream distributions</a></li><li class="nav-list-item"><a href="/ostree/var/" class="nav-list-link">OSTree and /var handling</a></li><li class="nav-list-item"><a href="/ostree/formats/" class="nav-list-link">OSTree data formats</a></li><li class="nav-list-item active"><a href="/ostree/buildsystem-and-repos/" class="nav-list-link active">Writing a buildsystem and managing repositories</a></li><li class="nav-list-item"><a href="/ostree/authenticated-repos/" class="nav-list-link">Handling access to authenticated remote repositories</a></li><li class="nav-list-item"><a href="/ostree/repository-management/" class="nav-list-link">Managing content in OSTree repositories</a></li><li class="nav-list-item"><a href="/ostree/copying-deltas/" class="nav-list-link">Static deltas for offline updates</a></li><li class="nav-list-item"><a href="/ostree/ima/" class="nav-list-link">Using Linux IMA with OSTree</a></li><li class="nav-list-item"><a href="/ostree/related-projects/" class="nav-list-link">Related Projects</a></li><li class="nav-list-item"><a href="/ostree/composefs/" class="nav-list-link">Using composefs with OSTree</a></li><li class="nav-list-item"><a href="/ostree/bootloaders/" class="nav-list-link">Bootloaders</a></li><li class="nav-list-item"><a href="/ostree/CONTRIBUTING/" class="nav-list-link">Contributing</a></li><li class="nav-list-item"><a href="/ostree/contributing-tutorial/" class="nav-list-link">OSTree Contributing Tutorial</a></li><li class="nav-list-item"><a href="/ostree/README-historical/" class="nav-list-link">Historical OSTree README</a></li></ul>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
|
||||
<footer class="site-footer">
|
||||
This site uses <a href="https://github.com/just-the-docs/just-the-docs">Just the Docs</a>, a documentation theme for Jekyll.
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="main" id="top">
|
||||
<div id="main-header" class="main-header">
|
||||
|
||||
|
||||
|
||||
<div class="search">
|
||||
<div class="search-input-wrap">
|
||||
<input type="text" id="search-input" class="search-input" tabindex="0" placeholder="Search ostreedev/ostree" aria-label="Search ostreedev/ostree" autocomplete="off">
|
||||
<label for="search-input" class="search-label"><svg viewBox="0 0 24 24" class="search-icon"><use xlink:href="#svg-search"></use></svg></label>
|
||||
</div>
|
||||
<div id="search-results" class="search-results"></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<nav aria-label="Auxiliary" class="aux-nav">
|
||||
<ul class="aux-nav-list">
|
||||
|
||||
<li class="aux-nav-list-item">
|
||||
<a href="https://github.com/ostreedev/ostree" class="site-button"
|
||||
|
||||
>
|
||||
OSTree on GitHub
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="main-content-wrap" class="main-content-wrap">
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="main-content" class="main-content" role="main">
|
||||
|
||||
<h1 class="no_toc" id="writing-a-buildsystem-and-managing-repositories">
|
||||
|
||||
|
||||
<a href="#writing-a-buildsystem-and-managing-repositories" class="anchor-heading" aria-labelledby="writing-a-buildsystem-and-managing-repositories"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Writing a buildsystem and managing repositories
|
||||
|
||||
|
||||
</h1>
|
||||
|
||||
|
||||
<ol id="markdown-toc">
|
||||
<li><a href="#build-vs-buy" id="markdown-toc-build-vs-buy">Build vs buy</a></li>
|
||||
<li><a href="#initializing" id="markdown-toc-initializing">Initializing</a></li>
|
||||
<li><a href="#writing-your-own-ostree-buildsystem" id="markdown-toc-writing-your-own-ostree-buildsystem">Writing your own OSTree buildsystem</a></li>
|
||||
<li><a href="#constructing-trees-from-unions" id="markdown-toc-constructing-trees-from-unions">Constructing trees from unions</a></li>
|
||||
<li><a href="#migrating-content-between-repositories" id="markdown-toc-migrating-content-between-repositories">Migrating content between repositories</a></li>
|
||||
<li><a href="#more-sophisticated-repository-management" id="markdown-toc-more-sophisticated-repository-management">More sophisticated repository management</a></li>
|
||||
</ol>
|
||||
|
||||
<!-- SPDX-License-Identifier: (CC-BY-SA-3.0 OR GFDL-1.3-or-later) -->
|
||||
|
||||
<p>OSTree is not a package system. It does not directly support building
|
||||
source code. Rather, it is a tool for transporting and managing
|
||||
content, along with package-system independent aspects like bootloader
|
||||
management for updates.</p>
|
||||
|
||||
<p>We’ll assume here that we’re planning to generate commits on a build
|
||||
server, then have client systems replicate it. Doing client-side
|
||||
assembly is also possible of course, but this discussion will focus
|
||||
primarily on server-side concerns.</p>
|
||||
<h2 id="build-vs-buy">
|
||||
|
||||
|
||||
<a href="#build-vs-buy" class="anchor-heading" aria-labelledby="build-vs-buy"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Build vs buy
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>Therefore, you need to either pick an existing tool for writing
|
||||
content into an OSTree repository, or write your own. An example
|
||||
tool is <a href="https://github.com/coreos/rpm-ostree">rpm-ostree</a> - it
|
||||
takes as input RPMs, and commits them (currently oriented for
|
||||
server-side, but aiming to do client-side too).</p>
|
||||
<h2 id="initializing">
|
||||
|
||||
|
||||
<a href="#initializing" class="anchor-heading" aria-labelledby="initializing"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Initializing
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>For this initial discussion, we’re assuming you have a single
|
||||
<code class="language-plaintext highlighter-rouge">archive</code> repository:</p>
|
||||
|
||||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>mkdir repo
|
||||
ostree --repo=repo init --mode=archive
|
||||
</code></pre></div></div>
|
||||
|
||||
<p>You can export this via a static webserver, and configure clients to
|
||||
pull from it.</p>
|
||||
<h2 id="writing-your-own-ostree-buildsystem">
|
||||
|
||||
|
||||
<a href="#writing-your-own-ostree-buildsystem" class="anchor-heading" aria-labelledby="writing-your-own-ostree-buildsystem"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Writing your own OSTree buildsystem
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>There exist many, many systems that basically follow this pattern:</p>
|
||||
|
||||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$pkg --installroot=/path/to/tmpdir install foo bar baz
|
||||
$imagesystem commit --root=/path/to/tmpdir
|
||||
</code></pre></div></div>
|
||||
|
||||
<p>For various values of <code class="language-plaintext highlighter-rouge">$pkg</code> such as <code class="language-plaintext highlighter-rouge">yum</code>, <code class="language-plaintext highlighter-rouge">apt-get</code>, etc., and
|
||||
values of <code class="language-plaintext highlighter-rouge">$imagesystem</code> could be simple tarballs, Amazon Machine
|
||||
Images, ISOs, etc.</p>
|
||||
|
||||
<p>Now obviously in this document, we’re going to talk about the
|
||||
situation where <code class="language-plaintext highlighter-rouge">$imagesystem</code> is OSTree. The general idea with
|
||||
OSTree is that wherever you might store a series of tarballs for
|
||||
applications or OS images, OSTree is likely going to be better. For
|
||||
example, it supports GPG signatures, binary deltas, writing bootloader
|
||||
configuration, etc.</p>
|
||||
|
||||
<p>OSTree does not include a package/component build system simply
|
||||
because there already exist plenty of good ones - rather, it is
|
||||
intended to provide an infrastructure layer.</p>
|
||||
|
||||
<p>The above mentioned <code class="language-plaintext highlighter-rouge">rpm-ostree compose tree</code> chooses RPM as the value
|
||||
of <code class="language-plaintext highlighter-rouge">$pkg</code> - so binaries are built as RPMs, then committed as a whole
|
||||
into an OSTree commit.</p>
|
||||
|
||||
<p>But let’s discuss building our own. If you’re just experimenting,
|
||||
it’s quite easy to start with the command line. We’ll assume for this
|
||||
purpose that you have a build process that outputs a directory tree -
|
||||
we’ll call this tool <code class="language-plaintext highlighter-rouge">$pkginstallroot</code> (which could be <code class="language-plaintext highlighter-rouge">yum
|
||||
--installroot</code> or <code class="language-plaintext highlighter-rouge">debootstrap</code>, etc.).</p>
|
||||
|
||||
<p>Your initial prototype is going to look like:</p>
|
||||
|
||||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$pkginstallroot /path/to/tmpdir
|
||||
ostree --repo=repo commit -s 'build' -b exampleos/x86_64/standard --tree=dir=/path/to/tmpdir
|
||||
</code></pre></div></div>
|
||||
|
||||
<p>Alternatively, if your build system can generate a tarball, you can
|
||||
commit that tarball into OSTree. For example,
|
||||
<a href="http://www.openembedded.org/">OpenEmbedded</a> can output a tarball, and
|
||||
one can commit it via:</p>
|
||||
|
||||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>ostree commit -s 'build' -b exampleos/x86_64/standard --tree=tar=myos.tar
|
||||
</code></pre></div></div>
|
||||
<h2 id="constructing-trees-from-unions">
|
||||
|
||||
|
||||
<a href="#constructing-trees-from-unions" class="anchor-heading" aria-labelledby="constructing-trees-from-unions"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Constructing trees from unions
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>The above is a very simplistic model, and you will quickly notice that
|
||||
it’s slow. This is because OSTree has to re-checksum and recompress
|
||||
the content each time it’s committed. (Most of the CPU time is spent
|
||||
in compression which gets thrown away if the content turns out to be
|
||||
already stored).</p>
|
||||
|
||||
<p>A more advanced approach is to store components in OSTree itself, then
|
||||
union them, and recommit them. At this point, we recommend taking a
|
||||
look at the OSTree API, and choose a programming language supported by
|
||||
<a href="https://wiki.gnome.org/Projects/GObjectIntrospection">GObject Introspection</a>
|
||||
to write your buildsystem scripts. Python may be a good choice, or
|
||||
you could choose custom C code, etc.</p>
|
||||
|
||||
<p>For the purposes of this tutorial we will use shell script, but it’s
|
||||
strongly recommended to choose a real programming language for your
|
||||
build system.</p>
|
||||
|
||||
<p>Let’s say that your build system produces separate artifacts (whether
|
||||
those are RPMs, zip files, or whatever). These artifacts should be
|
||||
the result of <code class="language-plaintext highlighter-rouge">make install DESTDIR=</code> or similar. Basically
|
||||
equivalent to RPMs/debs.</p>
|
||||
|
||||
<p>Further, in order to make things fast, we will need a separate
|
||||
<code class="language-plaintext highlighter-rouge">bare-user</code> repository in order to perform checkouts quickly via
|
||||
hardlinks. We’ll then export content into the <code class="language-plaintext highlighter-rouge">archive</code> repository
|
||||
for use by client systems.</p>
|
||||
|
||||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>mkdir build-repo
|
||||
ostree --repo=build-repo init --mode=bare-user
|
||||
</code></pre></div></div>
|
||||
|
||||
<p>You can begin committing those as individual branches:</p>
|
||||
|
||||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>ostree --repo=build-repo commit -b exampleos/x86_64/bash --tree=tar=bash-4.2-bin.tar.gz
|
||||
ostree --repo=build-repo commit -b exampleos/x86_64/systemd --tree=tar=systemd-224-bin.tar.gz
|
||||
</code></pre></div></div>
|
||||
|
||||
<p>Set things up so that whenever a package changes, you redo the
|
||||
<code class="language-plaintext highlighter-rouge">commit</code> with the new package version - conceptually, the branch
|
||||
tracks the individual package versions over time, and defaults to
|
||||
“latest”. This isn’t required - one could also include the version in
|
||||
the branch name, and have metadata outside to determine “latest” (or
|
||||
the desired version).</p>
|
||||
|
||||
<p>Now, to construct our final tree:</p>
|
||||
|
||||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>rm -rf exampleos-build
|
||||
for package in bash systemd; do
|
||||
ostree --repo=build-repo checkout -U --union exampleos/x86_64/${package} exampleos-build
|
||||
done
|
||||
# Set up a "rofiles-fuse" mount point; this ensures that any processes
|
||||
# we run for post-processing of the tree don't corrupt the hardlinks.
|
||||
mkdir -p mnt
|
||||
rofiles-fuse exampleos-build mnt
|
||||
# Now run global "triggers", generate cache files:
|
||||
ldconfig -r mnt
|
||||
(Insert other programs here)
|
||||
fusermount -u mnt
|
||||
ostree --repo=build-repo commit -b exampleos/x86_64/standard --link-checkout-speedup exampleos-build
|
||||
</code></pre></div></div>
|
||||
|
||||
<p>There are a number of interesting things going on here. The major
|
||||
architectural change is that we’re using <code class="language-plaintext highlighter-rouge">--link-checkout-speedup</code>.
|
||||
This is a way to tell OSTree that our checkout is made via hardlinks,
|
||||
and to scan the repository in order to build up a reverse <code class="language-plaintext highlighter-rouge">(device,
|
||||
inode) -> checksum</code> mapping.</p>
|
||||
|
||||
<p>In order for this mapping to be accurate, we needed the <code class="language-plaintext highlighter-rouge">rofiles-fuse</code>
|
||||
to ensure that any changed files had new inodes (and hence a new
|
||||
checksum).</p>
|
||||
<h2 id="migrating-content-between-repositories">
|
||||
|
||||
|
||||
<a href="#migrating-content-between-repositories" class="anchor-heading" aria-labelledby="migrating-content-between-repositories"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Migrating content between repositories
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>Now that we have content in our <code class="language-plaintext highlighter-rouge">build-repo</code> repository (in
|
||||
<code class="language-plaintext highlighter-rouge">bare-user</code> mode), we need to move the <code class="language-plaintext highlighter-rouge">exampleos/x86_64/standard</code>
|
||||
branch content into the repository just named <code class="language-plaintext highlighter-rouge">repo</code> (in <code class="language-plaintext highlighter-rouge">archive</code>
|
||||
mode) for export, which will involve zlib compression of new objects.
|
||||
We likely want to generate static deltas after that as well.</p>
|
||||
|
||||
<p>Let’s copy the content:</p>
|
||||
|
||||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>ostree --repo=repo pull-local build-repo exampleos/x86_64/standard
|
||||
</code></pre></div></div>
|
||||
|
||||
<p>Clients can now incrementally download new objects - however, this
|
||||
would also be a good time to generate a delta from the previous
|
||||
commit.</p>
|
||||
|
||||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>ostree --repo=repo static-delta generate exampleos/x86_64/standard
|
||||
</code></pre></div></div>
|
||||
<h2 id="more-sophisticated-repository-management">
|
||||
|
||||
|
||||
<a href="#more-sophisticated-repository-management" class="anchor-heading" aria-labelledby="more-sophisticated-repository-management"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> More sophisticated repository management
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>Next, see <a href="/ostree/repository-management/">Repository Management</a> for the
|
||||
next steps in managing content in OSTree repositories.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<hr>
|
||||
<footer>
|
||||
|
||||
|
||||
<p class="text-small text-grey-dk-100 mb-0">Copyright © <a href="https://www.redhat.com">Red Hat, Inc.</a> and <a href="https://github.com/ostreedev">others</a>.</p>
|
||||
|
||||
|
||||
<div class="d-flex mt-2">
|
||||
|
||||
|
||||
<p class="text-small text-grey-dk-000 mb-0">
|
||||
<a href="https://github.com/ostreedev/ostree/tree/main/docs/buildsystem-and-repos.md" id="edit-this-page">Edit this page on GitHub</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="search-overlay"></div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
420
composefs/index.html
Normal file
@ -0,0 +1,420 @@
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
||||
|
||||
<link rel="stylesheet" href="/ostree/assets/css/just-the-docs-default.css">
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="/ostree/assets/js/vendor/lunr.min.js"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="/ostree/assets/js/just-the-docs.js"></script>
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Begin Jekyll SEO tag v2.8.0 -->
|
||||
<title>Using composefs with OSTree | ostreedev/ostree</title>
|
||||
<meta name="generator" content="Jekyll v3.9.5" />
|
||||
<meta property="og:title" content="Using composefs with OSTree" />
|
||||
<meta property="og:locale" content="en_US" />
|
||||
<meta name="description" content="ostree documentation" />
|
||||
<meta property="og:description" content="ostree documentation" />
|
||||
<link rel="canonical" href="https://ostreedev.github.io/ostree/composefs/" />
|
||||
<meta property="og:url" content="https://ostreedev.github.io/ostree/composefs/" />
|
||||
<meta property="og:site_name" content="ostreedev/ostree" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
<meta property="twitter:title" content="Using composefs with OSTree" />
|
||||
<script type="application/ld+json">
|
||||
{"@context":"https://schema.org","@type":"WebPage","description":"ostree documentation","headline":"Using composefs with OSTree","url":"https://ostreedev.github.io/ostree/composefs/"}</script>
|
||||
<!-- End Jekyll SEO tag -->
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<a class="skip-to-main" href="#main-content">Skip to main content</a>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="d-none">
|
||||
<symbol id="svg-link" viewBox="0 0 24 24">
|
||||
<title>Link</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link">
|
||||
<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<symbol id="svg-menu" viewBox="0 0 24 24">
|
||||
<title>Menu</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-menu">
|
||||
<line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
|
||||
<title>Expand</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right">
|
||||
<polyline points="9 18 15 12 9 6"></polyline>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<!-- Feather. MIT License: https://github.com/feathericons/feather/blob/master/LICENSE -->
|
||||
<symbol id="svg-external-link" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-external-link">
|
||||
<title id="svg-external-link-title">(external link)</title>
|
||||
<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line>
|
||||
</symbol>
|
||||
|
||||
|
||||
<symbol id="svg-doc" viewBox="0 0 24 24">
|
||||
<title>Document</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-file">
|
||||
<path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"></path><polyline points="13 2 13 9 20 9"></polyline>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<symbol id="svg-search" viewBox="0 0 24 24">
|
||||
<title>Search</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search">
|
||||
<circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
|
||||
|
||||
<!-- Bootstrap Icons. MIT License: https://github.com/twbs/icons/blob/main/LICENSE.md -->
|
||||
<symbol id="svg-copy" viewBox="0 0 16 16">
|
||||
<title>Copy</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-clipboard" viewBox="0 0 16 16">
|
||||
<path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z"/>
|
||||
<path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-copied" viewBox="0 0 16 16">
|
||||
<title>Copied</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-clipboard-check-fill" viewBox="0 0 16 16">
|
||||
<path d="M6.5 0A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3Zm3 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3Z"/>
|
||||
<path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1A2.5 2.5 0 0 1 9.5 5h-3A2.5 2.5 0 0 1 4 2.5v-1Zm6.854 7.354-3 3a.5.5 0 0 1-.708 0l-1.5-1.5a.5.5 0 0 1 .708-.708L7.5 10.793l2.646-2.647a.5.5 0 0 1 .708.708Z"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
|
||||
</svg>
|
||||
|
||||
<div class="side-bar">
|
||||
<div class="site-header">
|
||||
<a href="/ostree/" class="site-title lh-tight">
|
||||
ostreedev/ostree
|
||||
|
||||
</a>
|
||||
<a href="#" id="menu-button" class="site-button">
|
||||
<svg viewBox="0 0 24 24" class="icon"><use xlink:href="#svg-menu"></use></svg>
|
||||
</a>
|
||||
</div>
|
||||
<nav aria-label="Main" id="site-nav" class="site-nav">
|
||||
|
||||
|
||||
<ul class="nav-list"><li class="nav-list-item"><a href="/ostree/" class="nav-list-link">libostree</a></li><li class="nav-list-item"><a href="/ostree/introduction/" class="nav-list-link">OSTree Overview</a></li><li class="nav-list-item"><a href="/ostree/repo/" class="nav-list-link">Anatomy of an OSTree repository</a></li><li class="nav-list-item"><a href="/ostree/deployment/" class="nav-list-link">Deployments</a></li><li class="nav-list-item"><a href="/ostree/atomic-upgrades/" class="nav-list-link">Atomic Upgrades</a></li><li class="nav-list-item"><a href="/ostree/atomic-rollbacks/" class="nav-list-link">Atomic Rollbacks</a></li><li class="nav-list-item"><a href="/ostree/adapting-existing/" class="nav-list-link">Adapting existing mainstream distributions</a></li><li class="nav-list-item"><a href="/ostree/var/" class="nav-list-link">OSTree and /var handling</a></li><li class="nav-list-item"><a href="/ostree/formats/" class="nav-list-link">OSTree data formats</a></li><li class="nav-list-item"><a href="/ostree/buildsystem-and-repos/" class="nav-list-link">Writing a buildsystem and managing repositories</a></li><li class="nav-list-item"><a href="/ostree/authenticated-repos/" class="nav-list-link">Handling access to authenticated remote repositories</a></li><li class="nav-list-item"><a href="/ostree/repository-management/" class="nav-list-link">Managing content in OSTree repositories</a></li><li class="nav-list-item"><a href="/ostree/copying-deltas/" class="nav-list-link">Static deltas for offline updates</a></li><li class="nav-list-item"><a href="/ostree/ima/" class="nav-list-link">Using Linux IMA with OSTree</a></li><li class="nav-list-item"><a href="/ostree/related-projects/" class="nav-list-link">Related Projects</a></li><li class="nav-list-item active"><a href="/ostree/composefs/" class="nav-list-link active">Using composefs with OSTree</a></li><li class="nav-list-item"><a href="/ostree/bootloaders/" class="nav-list-link">Bootloaders</a></li><li class="nav-list-item"><a href="/ostree/CONTRIBUTING/" class="nav-list-link">Contributing</a></li><li class="nav-list-item"><a href="/ostree/contributing-tutorial/" class="nav-list-link">OSTree Contributing Tutorial</a></li><li class="nav-list-item"><a href="/ostree/README-historical/" class="nav-list-link">Historical OSTree README</a></li></ul>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
|
||||
<footer class="site-footer">
|
||||
This site uses <a href="https://github.com/just-the-docs/just-the-docs">Just the Docs</a>, a documentation theme for Jekyll.
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="main" id="top">
|
||||
<div id="main-header" class="main-header">
|
||||
|
||||
|
||||
|
||||
<div class="search">
|
||||
<div class="search-input-wrap">
|
||||
<input type="text" id="search-input" class="search-input" tabindex="0" placeholder="Search ostreedev/ostree" aria-label="Search ostreedev/ostree" autocomplete="off">
|
||||
<label for="search-input" class="search-label"><svg viewBox="0 0 24 24" class="search-icon"><use xlink:href="#svg-search"></use></svg></label>
|
||||
</div>
|
||||
<div id="search-results" class="search-results"></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<nav aria-label="Auxiliary" class="aux-nav">
|
||||
<ul class="aux-nav-list">
|
||||
|
||||
<li class="aux-nav-list-item">
|
||||
<a href="https://github.com/ostreedev/ostree" class="site-button"
|
||||
|
||||
>
|
||||
OSTree on GitHub
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="main-content-wrap" class="main-content-wrap">
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="main-content" class="main-content" role="main">
|
||||
|
||||
<h1 class="no_toc" id="using-composefs-with-ostree">
|
||||
|
||||
|
||||
<a href="#using-composefs-with-ostree" class="anchor-heading" aria-labelledby="using-composefs-with-ostree"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Using composefs with OSTree
|
||||
|
||||
|
||||
</h1>
|
||||
|
||||
|
||||
<ol id="markdown-toc">
|
||||
<li><a href="#composefs" id="markdown-toc-composefs">composefs</a> <ol>
|
||||
<li><a href="#enabling-composefs-unsigned" id="markdown-toc-enabling-composefs-unsigned">Enabling composefs (unsigned)</a></li>
|
||||
<li><a href="#composefs-configuration" id="markdown-toc-composefs-configuration">composefs configuration</a></li>
|
||||
<li><a href="#injecting-composefs-digests" id="markdown-toc-injecting-composefs-digests">Injecting composefs digests</a></li>
|
||||
<li><a href="#signatures" id="markdown-toc-signatures">Signatures</a></li>
|
||||
</ol>
|
||||
</li>
|
||||
<li><a href="#requirements" id="markdown-toc-requirements">Requirements</a></li>
|
||||
<li><a href="#status" id="markdown-toc-status">Status</a></li>
|
||||
<li><a href="#compatiblity" id="markdown-toc-compatiblity">Compatiblity</a></li>
|
||||
<li><a href="#comparison-with-other-approaches" id="markdown-toc-comparison-with-other-approaches">Comparison with other approaches</a></li>
|
||||
<li><a href="#further-references" id="markdown-toc-further-references">Further references</a></li>
|
||||
</ol>
|
||||
|
||||
<!-- SPDX-License-Identifier: (CC-BY-SA-3.0 OR GFDL-1.3-or-later) -->
|
||||
<h2 id="composefs">
|
||||
|
||||
|
||||
<a href="#composefs" class="anchor-heading" aria-labelledby="composefs"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> composefs
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>The <a href="https://github.com/containers/composefs">composefs</a> project is a new
|
||||
hybrid Linux stacking filesystem that provides many benefits when
|
||||
used for bootable host systems, such as a strong story for integrity.</p>
|
||||
|
||||
<p>At the current time, integration of composefs and ostree is experimental.
|
||||
<a href="https://github.com/ostreedev/ostree/issues/2867">This issue</a> tracks the latest status.</p>
|
||||
<h3 id="enabling-composefs-unsigned">
|
||||
|
||||
|
||||
<a href="#enabling-composefs-unsigned" class="anchor-heading" aria-labelledby="enabling-composefs-unsigned"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Enabling composefs (unsigned)
|
||||
|
||||
|
||||
</h3>
|
||||
|
||||
|
||||
<p>When building a disk image <em>or</em> to transition an existing system, run:</p>
|
||||
|
||||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>ostree config --repo=/ostree/repo set ex-integrity.composefs true
|
||||
</code></pre></div></div>
|
||||
|
||||
<p>This will ensure that any future deployments (e.g. created by <code class="language-plaintext highlighter-rouge">ostree admin upgrade</code>)
|
||||
have a <code class="language-plaintext highlighter-rouge">.ostree.cfs</code> file in the deployment directory which is a mountable
|
||||
composefs metadata file, with a “backing store” directory that is
|
||||
shared with the current <code class="language-plaintext highlighter-rouge">/ostree/repo/objects</code>.</p>
|
||||
<h3 id="composefs-configuration">
|
||||
|
||||
|
||||
<a href="#composefs-configuration" class="anchor-heading" aria-labelledby="composefs-configuration"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> composefs configuration
|
||||
|
||||
|
||||
</h3>
|
||||
|
||||
|
||||
<p>The <code class="language-plaintext highlighter-rouge">ostree-prepare-root</code> binary will look for <code class="language-plaintext highlighter-rouge">ostree/prepare-root.conf</code> in <code class="language-plaintext highlighter-rouge">/etc</code> and
|
||||
<code class="language-plaintext highlighter-rouge">/usr/lib</code> in the initramfs. Using that configuration file you can enable composefs,
|
||||
and specify an Ed25519 public key to validate the booted commit.</p>
|
||||
|
||||
<p>See the manpage for <code class="language-plaintext highlighter-rouge">ostree-prepare-root</code> for details of how to configure it.</p>
|
||||
<h3 id="injecting-composefs-digests">
|
||||
|
||||
|
||||
<a href="#injecting-composefs-digests" class="anchor-heading" aria-labelledby="injecting-composefs-digests"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Injecting composefs digests
|
||||
|
||||
|
||||
</h3>
|
||||
|
||||
|
||||
<p>When generating an OSTree commit, there is a CLI switch <code class="language-plaintext highlighter-rouge">--generate-composefs-metadata</code>
|
||||
and a corresponding C API <code class="language-plaintext highlighter-rouge">ostree_repo_commit_add_composefs_metadata</code>. This will
|
||||
inject the composefs digest as metadata into the ostree commit under a metadata
|
||||
key <code class="language-plaintext highlighter-rouge">ostree.composefs.v0</code>. Because an OSTree commit can be signed, this allows
|
||||
covering the composefs fsverity digest with a signature.</p>
|
||||
<h3 id="signatures">
|
||||
|
||||
|
||||
<a href="#signatures" class="anchor-heading" aria-labelledby="signatures"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Signatures
|
||||
|
||||
|
||||
</h3>
|
||||
|
||||
|
||||
<p>If a commit is signed with an Ed25519 private key (see <code class="language-plaintext highlighter-rouge">ostree
|
||||
--sign</code>), and <code class="language-plaintext highlighter-rouge">composefs.keyfile</code> is specified in <code class="language-plaintext highlighter-rouge">prepare-root.conf</code>,
|
||||
then the initrd will find the commit being booted in the system repo
|
||||
and validate its signature against the public key. It will then ensure
|
||||
that the composefs digest being booted has an fs-verity digest
|
||||
matching the one in the commit. This allows a fully trusted read-only
|
||||
/usr.</p>
|
||||
|
||||
<p>The exact usage of the signature is up to the user, but a common way
|
||||
to use it with transient keys. This is done like this:</p>
|
||||
<ul>
|
||||
<li>Generate a new keypair before each build</li>
|
||||
<li>Embed the public key in the initrd that is part of the commit.</li>
|
||||
<li>Ensure the initrd has a <code class="language-plaintext highlighter-rouge">prepare-root.conf</code> with <code class="language-plaintext highlighter-rouge">[composefs] enabled=signed</code>, and either use <code class="language-plaintext highlighter-rouge">keypath</code> or inject <code class="language-plaintext highlighter-rouge">/etc/ostree/initramfs-root-binding.key</code>; for more see <code class="language-plaintext highlighter-rouge">man ostree-prepare-root</code></li>
|
||||
<li>After committing, run <code class="language-plaintext highlighter-rouge">ostree --sign</code> with the private key.</li>
|
||||
<li>Throw away the private key.</li>
|
||||
</ul>
|
||||
|
||||
<p>When a transient key is used this way, that ties the initrd with the
|
||||
userspace part from the commit. This means each initrd can only boot
|
||||
the very same userspace it was made for. For example, if an older
|
||||
version of the OS has a security flaw, you can’t boot a new fixed
|
||||
(signed) initrd and have it boot the older userspace with the flaw.</p>
|
||||
<h2 id="requirements">
|
||||
|
||||
|
||||
<a href="#requirements" class="anchor-heading" aria-labelledby="requirements"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Requirements
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>The current default composefs integration in ostree does not have any
|
||||
requirements from the underlying kernel and filesystem other than
|
||||
having the following kernel options set:</p>
|
||||
|
||||
<ul>
|
||||
<li><code class="language-plaintext highlighter-rouge">CONFIG_OVERLAY_FS</code></li>
|
||||
<li><code class="language-plaintext highlighter-rouge">CONFIG_BLK_DEV_LOOP</code></li>
|
||||
<li><code class="language-plaintext highlighter-rouge">CONFIG_EROFS_FS</code></li>
|
||||
</ul>
|
||||
|
||||
<p>At the current time, there are no additional userspace runtime requirements.</p>
|
||||
<h2 id="status">
|
||||
|
||||
|
||||
<a href="#status" class="anchor-heading" aria-labelledby="status"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Status
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p><strong>IMPORTANT</strong> The integration with composefs is experimental and subject to change. Please
|
||||
try it and report issues but do not deploy to production systems yet.</p>
|
||||
<h2 id="compatiblity">
|
||||
|
||||
|
||||
<a href="#compatiblity" class="anchor-heading" aria-labelledby="compatiblity"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Compatiblity
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>One issue that ostree users transitioning to composefs may hit is that it is no
|
||||
longer possible to add new toplevel directories via the <code class="language-plaintext highlighter-rouge">chattr -i / && mkdir /somedir && chattr -i</code>
|
||||
trick. A bit more on this in the following issues:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="https://github.com/coreos/rpm-ostree/issues/337">https://github.com/coreos/rpm-ostree/issues/337</a></li>
|
||||
<li><a href="https://github.com/ostreedev/ostree/pull/2681">https://github.com/ostreedev/ostree/pull/2681</a></li>
|
||||
</ul>
|
||||
|
||||
<p>However, users who were doing things like this probably want to enable the
|
||||
<code class="language-plaintext highlighter-rouge">root.transient</code> option; see <code class="language-plaintext highlighter-rouge">man ostree-prepare-root</code> which will allow
|
||||
this (but also change other behaviors too).</p>
|
||||
<h2 id="comparison-with-other-approaches">
|
||||
|
||||
|
||||
<a href="#comparison-with-other-approaches" class="anchor-heading" aria-labelledby="comparison-with-other-approaches"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Comparison with other approaches
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>There is also support for using <a href="/ostree/ima/">IMA</a> with ostree. In short, composefs
|
||||
provides much stronger and more efficient integrity:</p>
|
||||
|
||||
<ul>
|
||||
<li>composefs validates an entire filesystem tree, not just individual files</li>
|
||||
<li>composefs makes files actually read-only, whereas IMA does not by default</li>
|
||||
<li>composefs uses fs-verity which does on-demand verification (IMA by default does a full readahead of every file accessed, though IMA can also use fs-verity as a backend)</li>
|
||||
</ul>
|
||||
<h2 id="further-references">
|
||||
|
||||
|
||||
<a href="#further-references" class="anchor-heading" aria-labelledby="further-references"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Further references
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<ul>
|
||||
<li>https://github.com/containers/composefs</li>
|
||||
<li>https://www.kernel.org/doc/html/next/filesystems/fsverity.html</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<hr>
|
||||
<footer>
|
||||
|
||||
|
||||
<p class="text-small text-grey-dk-100 mb-0">Copyright © <a href="https://www.redhat.com">Red Hat, Inc.</a> and <a href="https://github.com/ostreedev">others</a>.</p>
|
||||
|
||||
|
||||
<div class="d-flex mt-2">
|
||||
|
||||
|
||||
<p class="text-small text-grey-dk-000 mb-0">
|
||||
<a href="https://github.com/ostreedev/ostree/tree/main/docs/composefs.md" id="edit-this-page">Edit this page on GitHub</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="search-overlay"></div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
850
contributing-tutorial/index.html
Normal file
@ -0,0 +1,850 @@
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
||||
|
||||
<link rel="stylesheet" href="/ostree/assets/css/just-the-docs-default.css">
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="/ostree/assets/js/vendor/lunr.min.js"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="/ostree/assets/js/just-the-docs.js"></script>
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Begin Jekyll SEO tag v2.8.0 -->
|
||||
<title>OSTree Contributing Tutorial | ostreedev/ostree</title>
|
||||
<meta name="generator" content="Jekyll v3.9.5" />
|
||||
<meta property="og:title" content="OSTree Contributing Tutorial" />
|
||||
<meta property="og:locale" content="en_US" />
|
||||
<meta name="description" content="ostree documentation" />
|
||||
<meta property="og:description" content="ostree documentation" />
|
||||
<link rel="canonical" href="https://ostreedev.github.io/ostree/contributing-tutorial/" />
|
||||
<meta property="og:url" content="https://ostreedev.github.io/ostree/contributing-tutorial/" />
|
||||
<meta property="og:site_name" content="ostreedev/ostree" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
<meta property="twitter:title" content="OSTree Contributing Tutorial" />
|
||||
<script type="application/ld+json">
|
||||
{"@context":"https://schema.org","@type":"WebPage","description":"ostree documentation","headline":"OSTree Contributing Tutorial","url":"https://ostreedev.github.io/ostree/contributing-tutorial/"}</script>
|
||||
<!-- End Jekyll SEO tag -->
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<a class="skip-to-main" href="#main-content">Skip to main content</a>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="d-none">
|
||||
<symbol id="svg-link" viewBox="0 0 24 24">
|
||||
<title>Link</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link">
|
||||
<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<symbol id="svg-menu" viewBox="0 0 24 24">
|
||||
<title>Menu</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-menu">
|
||||
<line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
|
||||
<title>Expand</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right">
|
||||
<polyline points="9 18 15 12 9 6"></polyline>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<!-- Feather. MIT License: https://github.com/feathericons/feather/blob/master/LICENSE -->
|
||||
<symbol id="svg-external-link" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-external-link">
|
||||
<title id="svg-external-link-title">(external link)</title>
|
||||
<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line>
|
||||
</symbol>
|
||||
|
||||
|
||||
<symbol id="svg-doc" viewBox="0 0 24 24">
|
||||
<title>Document</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-file">
|
||||
<path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"></path><polyline points="13 2 13 9 20 9"></polyline>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<symbol id="svg-search" viewBox="0 0 24 24">
|
||||
<title>Search</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search">
|
||||
<circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
|
||||
|
||||
<!-- Bootstrap Icons. MIT License: https://github.com/twbs/icons/blob/main/LICENSE.md -->
|
||||
<symbol id="svg-copy" viewBox="0 0 16 16">
|
||||
<title>Copy</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-clipboard" viewBox="0 0 16 16">
|
||||
<path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z"/>
|
||||
<path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-copied" viewBox="0 0 16 16">
|
||||
<title>Copied</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-clipboard-check-fill" viewBox="0 0 16 16">
|
||||
<path d="M6.5 0A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3Zm3 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3Z"/>
|
||||
<path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1A2.5 2.5 0 0 1 9.5 5h-3A2.5 2.5 0 0 1 4 2.5v-1Zm6.854 7.354-3 3a.5.5 0 0 1-.708 0l-1.5-1.5a.5.5 0 0 1 .708-.708L7.5 10.793l2.646-2.647a.5.5 0 0 1 .708.708Z"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
|
||||
</svg>
|
||||
|
||||
<div class="side-bar">
|
||||
<div class="site-header">
|
||||
<a href="/ostree/" class="site-title lh-tight">
|
||||
ostreedev/ostree
|
||||
|
||||
</a>
|
||||
<a href="#" id="menu-button" class="site-button">
|
||||
<svg viewBox="0 0 24 24" class="icon"><use xlink:href="#svg-menu"></use></svg>
|
||||
</a>
|
||||
</div>
|
||||
<nav aria-label="Main" id="site-nav" class="site-nav">
|
||||
|
||||
|
||||
<ul class="nav-list"><li class="nav-list-item"><a href="/ostree/" class="nav-list-link">libostree</a></li><li class="nav-list-item"><a href="/ostree/introduction/" class="nav-list-link">OSTree Overview</a></li><li class="nav-list-item"><a href="/ostree/repo/" class="nav-list-link">Anatomy of an OSTree repository</a></li><li class="nav-list-item"><a href="/ostree/deployment/" class="nav-list-link">Deployments</a></li><li class="nav-list-item"><a href="/ostree/atomic-upgrades/" class="nav-list-link">Atomic Upgrades</a></li><li class="nav-list-item"><a href="/ostree/atomic-rollbacks/" class="nav-list-link">Atomic Rollbacks</a></li><li class="nav-list-item"><a href="/ostree/adapting-existing/" class="nav-list-link">Adapting existing mainstream distributions</a></li><li class="nav-list-item"><a href="/ostree/var/" class="nav-list-link">OSTree and /var handling</a></li><li class="nav-list-item"><a href="/ostree/formats/" class="nav-list-link">OSTree data formats</a></li><li class="nav-list-item"><a href="/ostree/buildsystem-and-repos/" class="nav-list-link">Writing a buildsystem and managing repositories</a></li><li class="nav-list-item"><a href="/ostree/authenticated-repos/" class="nav-list-link">Handling access to authenticated remote repositories</a></li><li class="nav-list-item"><a href="/ostree/repository-management/" class="nav-list-link">Managing content in OSTree repositories</a></li><li class="nav-list-item"><a href="/ostree/copying-deltas/" class="nav-list-link">Static deltas for offline updates</a></li><li class="nav-list-item"><a href="/ostree/ima/" class="nav-list-link">Using Linux IMA with OSTree</a></li><li class="nav-list-item"><a href="/ostree/related-projects/" class="nav-list-link">Related Projects</a></li><li class="nav-list-item"><a href="/ostree/composefs/" class="nav-list-link">Using composefs with OSTree</a></li><li class="nav-list-item"><a href="/ostree/bootloaders/" class="nav-list-link">Bootloaders</a></li><li class="nav-list-item"><a href="/ostree/CONTRIBUTING/" class="nav-list-link">Contributing</a></li><li class="nav-list-item active"><a href="/ostree/contributing-tutorial/" class="nav-list-link active">OSTree Contributing Tutorial</a></li><li class="nav-list-item"><a href="/ostree/README-historical/" class="nav-list-link">Historical OSTree README</a></li></ul>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
|
||||
<footer class="site-footer">
|
||||
This site uses <a href="https://github.com/just-the-docs/just-the-docs">Just the Docs</a>, a documentation theme for Jekyll.
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="main" id="top">
|
||||
<div id="main-header" class="main-header">
|
||||
|
||||
|
||||
|
||||
<div class="search">
|
||||
<div class="search-input-wrap">
|
||||
<input type="text" id="search-input" class="search-input" tabindex="0" placeholder="Search ostreedev/ostree" aria-label="Search ostreedev/ostree" autocomplete="off">
|
||||
<label for="search-input" class="search-label"><svg viewBox="0 0 24 24" class="search-icon"><use xlink:href="#svg-search"></use></svg></label>
|
||||
</div>
|
||||
<div id="search-results" class="search-results"></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<nav aria-label="Auxiliary" class="aux-nav">
|
||||
<ul class="aux-nav-list">
|
||||
|
||||
<li class="aux-nav-list-item">
|
||||
<a href="https://github.com/ostreedev/ostree" class="site-button"
|
||||
|
||||
>
|
||||
OSTree on GitHub
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="main-content-wrap" class="main-content-wrap">
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="main-content" class="main-content" role="main">
|
||||
|
||||
<h1 class="no_toc" id="ostree-contributing-tutorial">
|
||||
|
||||
|
||||
<a href="#ostree-contributing-tutorial" class="anchor-heading" aria-labelledby="ostree-contributing-tutorial"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> OSTree Contributing Tutorial
|
||||
|
||||
|
||||
</h1>
|
||||
|
||||
|
||||
<p>The following guide is about OSTree forking, building, adding a command, testing the command, and submitting the change.</p>
|
||||
|
||||
<ol id="markdown-toc">
|
||||
<li><a href="#getting-started" id="markdown-toc-getting-started">Getting Started</a></li>
|
||||
<li><a href="#building-ostree" id="markdown-toc-building-ostree">Building OSTree</a> <ol>
|
||||
<li><a href="#install-build-dependencies" id="markdown-toc-install-build-dependencies">Install Build Dependencies</a></li>
|
||||
<li><a href="#ostree-build-commands" id="markdown-toc-ostree-build-commands">OSTree Build Commands</a> <ol>
|
||||
<li><a href="#notes" id="markdown-toc-notes">Notes</a></li>
|
||||
<li><a href="#tip" id="markdown-toc-tip">Tip</a></li>
|
||||
</ol>
|
||||
</li>
|
||||
</ol>
|
||||
</li>
|
||||
<li><a href="#testing-a-build" id="markdown-toc-testing-a-build">Testing a Build</a> <ol>
|
||||
<li><a href="#testing-in-a-container" id="markdown-toc-testing-in-a-container">Testing in a Container</a></li>
|
||||
<li><a href="#testing-in-a-virtual-machine" id="markdown-toc-testing-in-a-virtual-machine">Testing in a Virtual Machine</a></li>
|
||||
</ol>
|
||||
</li>
|
||||
<li><a href="#tutorial-adding-a-basic-builtin-command-to-ostree" id="markdown-toc-tutorial-adding-a-basic-builtin-command-to-ostree">Tutorial: Adding a basic builtin command to ostree</a> <ol>
|
||||
<li><a href="#modifying-ostree" id="markdown-toc-modifying-ostree">Modifying OSTree</a></li>
|
||||
<li><a href="#adding-a-new-api-function-to-libostree" id="markdown-toc-adding-a-new-api-function-to-libostree">Adding a new API function to libostree</a></li>
|
||||
<li><a href="#ostree-tests" id="markdown-toc-ostree-tests">OSTree Tests</a></li>
|
||||
<li><a href="#submitting-a-patch" id="markdown-toc-submitting-a-patch">Submitting a Patch</a></li>
|
||||
<li><a href="#returning-workflow" id="markdown-toc-returning-workflow">Returning Workflow</a></li>
|
||||
</ol>
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
<!-- SPDX-License-Identifier: (CC-BY-SA-3.0 OR GFDL-1.3-or-later) -->
|
||||
<h2 id="getting-started">
|
||||
|
||||
|
||||
<a href="#getting-started" class="anchor-heading" aria-labelledby="getting-started"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Getting Started
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>Fork https://github.com/ostreedev/ostree, then run the following commands.</p>
|
||||
|
||||
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>git clone https://github.com/<username>/ostree <span class="o">&&</span> <span class="nb">cd </span>ostree
|
||||
<span class="nv">$ </span>git remote add upstream https://github.com/ostreedev/ostree
|
||||
<span class="nv">$ </span>git checkout main
|
||||
<span class="nv">$ </span>git fetch upstream <span class="o">&&</span> git branch <span class="nt">--set-upstream-to</span><span class="o">=</span>upstream/main main
|
||||
</code></pre></div></div>
|
||||
<p>Make a branch from main for your patch.</p>
|
||||
|
||||
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>git checkout <span class="nt">-b</span> <name-of-branch>
|
||||
<span class="nv">$ </span>git branch <span class="nt">--set-upstream-to</span><span class="o">=</span>upstream/main <name-of-branch>
|
||||
</code></pre></div></div>
|
||||
<h2 id="building-ostree">
|
||||
|
||||
|
||||
<a href="#building-ostree" class="anchor-heading" aria-labelledby="building-ostree"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Building OSTree
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
<h3 id="install-build-dependencies">
|
||||
|
||||
|
||||
<a href="#install-build-dependencies" class="anchor-heading" aria-labelledby="install-build-dependencies"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Install Build Dependencies
|
||||
|
||||
|
||||
</h3>
|
||||
|
||||
|
||||
<p>Execute one of the following group commands as superuser depending on your machine’s package manager.</p>
|
||||
|
||||
<p>For Fedora:</p>
|
||||
|
||||
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>dnf <span class="nb">install</span> @buildsys-build dnf-plugins-core <span class="o">&&</span> <span class="se">\</span>
|
||||
dnf builddep ostree
|
||||
</code></pre></div></div>
|
||||
|
||||
<p>For CentOS:</p>
|
||||
|
||||
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>yum <span class="nb">install </span>yum-utils dnf-plugins-core <span class="o">&&</span> <span class="se">\</span>
|
||||
yum-builddep ostree
|
||||
</code></pre></div></div>
|
||||
|
||||
<p>For Debian based distros:</p>
|
||||
|
||||
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>apt-get update <span class="o">&&</span> <span class="se">\</span>
|
||||
apt-get <span class="nb">install </span>build-essential <span class="o">&&</span> <span class="se">\</span>
|
||||
apt-get build-dep ostree
|
||||
</code></pre></div></div>
|
||||
|
||||
<p><a href="https://github.com/ostreedev/ostree/blob/main/ci/build.sh">build.sh</a> will have a list of packages needed to build ostree.</p>
|
||||
<h3 id="ostree-build-commands">
|
||||
|
||||
|
||||
<a href="#ostree-build-commands" class="anchor-heading" aria-labelledby="ostree-build-commands"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> OSTree Build Commands
|
||||
|
||||
|
||||
</h3>
|
||||
|
||||
|
||||
<p>These are the basic commands to build OSTree. Depending on the OS that OSTree will be built for, the flags or options for <code class="language-plaintext highlighter-rouge">./autogen.sh</code> and <code class="language-plaintext highlighter-rouge">./configure</code> will vary.</p>
|
||||
|
||||
<p>See <code class="language-plaintext highlighter-rouge">ostree-build.sh</code> in this tutorial below for specific commands to building OSTree for Fedora 28 and Fedora 28 Atomic Host.</p>
|
||||
|
||||
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c"># optional: autogen.sh will run this if necessary</span>
|
||||
git submodule update <span class="nt">--init</span>
|
||||
|
||||
<span class="nb">env </span><span class="nv">NOCONFIGURE</span><span class="o">=</span>1 ./autogen.sh
|
||||
|
||||
<span class="c"># run ./configure if makefile does not exist</span>
|
||||
./configure
|
||||
|
||||
make
|
||||
make <span class="nb">install </span><span class="nv">DESTDIR</span><span class="o">=</span>/path/to/install/binary
|
||||
</code></pre></div></div>
|
||||
<h4 id="notes">
|
||||
|
||||
|
||||
<a href="#notes" class="anchor-heading" aria-labelledby="notes"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Notes
|
||||
|
||||
|
||||
</h4>
|
||||
|
||||
|
||||
<p>Running <code class="language-plaintext highlighter-rouge">git submodule update --init</code> is optional since <code class="language-plaintext highlighter-rouge">autogen.sh</code> will check to see if one of the submodule files for example from <code class="language-plaintext highlighter-rouge">libglnx/</code> or from <code class="language-plaintext highlighter-rouge">bsdiff/</code> exists.</p>
|
||||
|
||||
<p>Additionally, <code class="language-plaintext highlighter-rouge">autogen.sh</code> will check to see if the environment variable <code class="language-plaintext highlighter-rouge">NOCONFIGURE</code> is set. To run <code class="language-plaintext highlighter-rouge">./configure</code> manually, run autogen in a modified environment as such, <code class="language-plaintext highlighter-rouge">env NOCONFIGURE=1 ./autogen.sh</code>.</p>
|
||||
|
||||
<p>Otherwise, leave <code class="language-plaintext highlighter-rouge">NOCONFIGURE</code> empty and <code class="language-plaintext highlighter-rouge">autogen.sh</code> will run <code class="language-plaintext highlighter-rouge">./configure</code> as part of the <code class="language-plaintext highlighter-rouge">autogen.sh</code> command when it executes.</p>
|
||||
|
||||
<p>For more information on <code class="language-plaintext highlighter-rouge">--prefix</code> see <a href="https://www.gnu.org/prep/standards/html_node/Directory-Variables.html#Directory-Variables">Variables for Installation Directories</a>.</p>
|
||||
|
||||
<p><code class="language-plaintext highlighter-rouge">make install</code> will generate files for <code class="language-plaintext highlighter-rouge">/bin</code> and <code class="language-plaintext highlighter-rouge">/lib</code>. If <code class="language-plaintext highlighter-rouge">DESTDIR</code> is unspecified then OSTree will be installed in the default directory i.e. <code class="language-plaintext highlighter-rouge">/usr/local/bin</code> and its static libraries in <code class="language-plaintext highlighter-rouge">/usr/local/lib</code>. Note that the <code class="language-plaintext highlighter-rouge">/usr/local</code> portion of the path can be changed using the <code class="language-plaintext highlighter-rouge">--prefix</code> option for <code class="language-plaintext highlighter-rouge">./configure</code>.</p>
|
||||
|
||||
<p>See this <a href="https://www.gnu.org/prep/standards/html_node/DESTDIR.html">GNU guide on <code class="language-plaintext highlighter-rouge">DESTDIR</code> Staged Installs</a> for more information.</p>
|
||||
<h4 id="tip">
|
||||
|
||||
|
||||
<a href="#tip" class="anchor-heading" aria-labelledby="tip"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Tip
|
||||
|
||||
|
||||
</h4>
|
||||
|
||||
|
||||
<p>Make allows parallel execution of recipes. Use <code class="language-plaintext highlighter-rouge">make -j<N></code> to speed up the build. <code class="language-plaintext highlighter-rouge"><N></code> is typically <code class="language-plaintext highlighter-rouge">$((2 * $(nproc)))</code> for optimal performance, where <code class="language-plaintext highlighter-rouge">nproc</code> is the number of processing units (CPU cores) available.</p>
|
||||
|
||||
<p>See page 106 of the <a href="https://www.gnu.org/software/make/manual/make.pdf">GNU Make Manual</a> for more information about the <code class="language-plaintext highlighter-rouge">--jobs</code> or <code class="language-plaintext highlighter-rouge">-j</code> option.</p>
|
||||
<h2 id="testing-a-build">
|
||||
|
||||
|
||||
<a href="#testing-a-build" class="anchor-heading" aria-labelledby="testing-a-build"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Testing a Build
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>It is best practice to build software (definitely including ostree) in a container or virtual machine first.</p>
|
||||
<h3 id="testing-in-a-container">
|
||||
|
||||
|
||||
<a href="#testing-in-a-container" class="anchor-heading" aria-labelledby="testing-in-a-container"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Testing in a Container
|
||||
|
||||
|
||||
</h3>
|
||||
|
||||
|
||||
<p>There are a variety of container engines available and many distributions have pre-packaged versions of e.g. <a href="https://github.com/projectatomic/libpod">Podman</a> and Docker.</p>
|
||||
|
||||
<p>If you choose to use <a href="https://docs.docker.com/v17.09/engine/installation/linux/docker-ce/fedora/">Docker upstream</a>, you may want to follow this <a href="https://docs.docker.com/v17.09/engine/installation/linux/linux-postinstall/">post-installation guide for Docker</a>. This will allow you to run Docker as a non-root user on a Linux based host machine.</p>
|
||||
|
||||
<p>You will need to have pushed a remote git branch <code class="language-plaintext highlighter-rouge">$REMOTE_BRANCH</code> (see <code class="language-plaintext highlighter-rouge">ostree-git.sh below</code>) in order to pull your changes into a container.</p>
|
||||
|
||||
<p>The example below uses Docker to manage containers. Save the contents of this <strong>Dockerfile</strong> somewhere on your machine:</p>
|
||||
|
||||
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c"># this pulls the fedora 28 image</span>
|
||||
FROM registry.fedoraproject.org/fedora:28
|
||||
|
||||
<span class="c"># install ostree dependencies</span>
|
||||
RUN dnf update <span class="nt">-y</span> <span class="o">&&</span> <span class="se">\</span>
|
||||
dnf <span class="nt">-y</span> <span class="nb">install</span> @buildsys-build dnf-plugins-core <span class="o">&&</span> <span class="se">\</span>
|
||||
dnf <span class="nt">-y</span> builddep ostree <span class="o">&&</span> <span class="se">\</span>
|
||||
dnf clean all
|
||||
|
||||
<span class="c"># clone ostree and update main branch</span>
|
||||
COPY ostree-git.sh /
|
||||
RUN ../ostree-git.sh
|
||||
|
||||
<span class="c"># builds ostree + any additional commands</span>
|
||||
COPY ostree-build.sh /
|
||||
|
||||
<span class="c"># entry into the container will start at this directory</span>
|
||||
WORKDIR /ostree
|
||||
|
||||
<span class="c"># run the following as `/bin/sh -c`</span>
|
||||
<span class="c"># or enter the container to execute ./ostree-build.sh</span>
|
||||
RUN ../ostree-build.sh
|
||||
|
||||
</code></pre></div></div>
|
||||
|
||||
<p>Save the following bash scripts in the same directory as the Dockerfile. Then change the mode bit of these files so that they are executable, by running <code class="language-plaintext highlighter-rouge">chmod +x ostree-git.sh ostree-build.sh</code></p>
|
||||
|
||||
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c">#!/bin/bash</span>
|
||||
|
||||
<span class="c"># ostree-git.sh</span>
|
||||
<span class="c"># Clone ostree and update main branch</span>
|
||||
|
||||
<span class="nb">set</span> <span class="nt">-euo</span> pipefail
|
||||
|
||||
<span class="c"># Set $USERNAME to your GitHub username here.</span>
|
||||
<span class="nv">USERNAME</span><span class="o">=</span><span class="s2">""</span>
|
||||
|
||||
<span class="c"># clone your fork of the OSTree repo, this will be in the "/" directory</span>
|
||||
git clone https://github.com/<span class="nv">$USERNAME</span>/ostree.git
|
||||
<span class="nb">cd </span>ostree
|
||||
|
||||
<span class="c"># Add upstream as remote and update main branch</span>
|
||||
git checkout main
|
||||
git remote add upstream https://github.com/ostreedev/ostree.git
|
||||
git pull <span class="nt">--rebase</span> upstream main
|
||||
</code></pre></div></div>
|
||||
|
||||
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c">#!/bin/bash</span>
|
||||
|
||||
<span class="c"># ostree-build.sh</span>
|
||||
<span class="c"># Build and test OSTree</span>
|
||||
|
||||
<span class="nb">set</span> <span class="nt">-euo</span> pipefail
|
||||
|
||||
<span class="c"># $REMOTE_BRANCH is the name of the remote branch in your</span>
|
||||
<span class="c"># repository that contains changes (e.g. my-patch).</span>
|
||||
<span class="nv">REMOTE_BRANCH</span><span class="o">=</span><span class="s2">""</span>
|
||||
|
||||
<span class="c"># fetch updates from origin</span>
|
||||
<span class="c"># origin url should be your forked ostree repository</span>
|
||||
git fetch origin
|
||||
|
||||
<span class="c"># go to branch with changes</span>
|
||||
<span class="c"># if this branch already exists then checkout that branch</span>
|
||||
<span class="nv">exit_code</span><span class="o">=</span><span class="s2">"</span><span class="si">$(</span>git checkout <span class="nt">--track</span> origin/<span class="nv">$REMOTE_BRANCH</span><span class="p">;</span> <span class="nb">echo</span> <span class="nv">$?</span><span class="si">)</span><span class="s2">"</span>
|
||||
<span class="k">if</span> <span class="o">[[</span> <span class="s2">"</span><span class="nv">$exit_code</span><span class="s2">"</span> <span class="o">==</span> 1 <span class="o">]]</span>
|
||||
<span class="k">then
|
||||
</span><span class="nb">echo</span> <span class="s2">"This branch:"</span> <span class="nv">$REMOTE_BRANCH</span> <span class="s2">"is not a remote branch."</span>
|
||||
<span class="nb">exit
|
||||
</span><span class="k">fi</span>
|
||||
|
||||
<span class="c"># make sure branch with changes is up-to-date</span>
|
||||
git pull origin <span class="nv">$REMOTE_BRANCH</span>
|
||||
|
||||
<span class="c"># build OSTree commands for Fedora 28 and Fedora 28 Atomic Host</span>
|
||||
./autogen.sh <span class="nt">--prefix</span><span class="o">=</span>/usr <span class="nt">--libdir</span><span class="o">=</span>/usr/lib64 <span class="nt">--sysconfdir</span><span class="o">=</span>/etc
|
||||
./configure <span class="nt">--prefix</span><span class="o">=</span>/usr
|
||||
make <span class="nt">-j</span><span class="k">$((</span><span class="m">2</span> <span class="o">*</span> <span class="si">$(</span><span class="nb">nproc</span><span class="si">)</span><span class="k">))</span>
|
||||
make <span class="nb">install</span>
|
||||
|
||||
<span class="c"># any additional commands go here</span>
|
||||
</code></pre></div></div>
|
||||
|
||||
<p><strong>Build the container</strong></p>
|
||||
|
||||
<p>Run <code class="language-plaintext highlighter-rouge">docker build</code> in the same directory of the <code class="language-plaintext highlighter-rouge">Dockerfile</code> like so:</p>
|
||||
|
||||
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>docker build <span class="nt">-t</span> ostree-fedora-test <span class="nb">.</span>
|
||||
</code></pre></div></div>
|
||||
|
||||
<p>When this build is done, the <code class="language-plaintext highlighter-rouge">-t</code> option tags the image as <code class="language-plaintext highlighter-rouge">ostree-fedora-test</code>.</p>
|
||||
|
||||
<p><strong>Note</strong>: Do not forget the dot <strong>.</strong> at the end of the above command which specifies the location of the Dockerfile.</p>
|
||||
|
||||
<p>You will see <code class="language-plaintext highlighter-rouge">ostree-fedora-test</code> listed when running <code class="language-plaintext highlighter-rouge">docker images</code>:</p>
|
||||
|
||||
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>REPOSITORY TAG IMAGE ID CREATED SIZE
|
||||
ostree-fedora-test latest 817c04cc3656 1 day ago 978MB
|
||||
</code></pre></div></div>
|
||||
|
||||
<p><strong>Entering the Container</strong></p>
|
||||
|
||||
<p>To <strong>start</strong> the <code class="language-plaintext highlighter-rouge">ostree-fedora-test</code> container, run:</p>
|
||||
|
||||
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>docker run <span class="nt">-it</span> <span class="nt">--rm</span> <span class="nt">--entrypoint</span> /bin/sh <span class="nt">--name</span> ostree-testing ostree-fedora-test
|
||||
</code></pre></div></div>
|
||||
|
||||
<p><strong>Note</strong>:</p>
|
||||
|
||||
<p><code class="language-plaintext highlighter-rouge">--rm</code> option tells <a href="https://docs.docker.com/engine/reference/run/#clean-up---rm">Docker to automatically clean up the container and remove the file system when the container exits</a>. Otherwise remove it manually by running <code class="language-plaintext highlighter-rouge">docker rm <container name></code>.</p>
|
||||
|
||||
<p>The state of the container will not be saved when the shell prompt exits. Best practice is modify the Dockerfile to modify the image.</p>
|
||||
|
||||
<p><strong>Testing in a Container Workflow</strong></p>
|
||||
|
||||
<ol>
|
||||
<li>Edit the changes to OSTree on your local machine.</li>
|
||||
<li><code class="language-plaintext highlighter-rouge">git add</code> to stage the changed files, <code class="language-plaintext highlighter-rouge">git commit</code> and then <code class="language-plaintext highlighter-rouge">git push origin <local-branch>:<remote-branch></code>.</li>
|
||||
<li>
|
||||
<p>Testing on a <em>new</em> container vs. Testing on an <em>existing</em> container:</p>
|
||||
|
||||
<p>If the <code class="language-plaintext highlighter-rouge">ostree-testing</code> container was newly built right after your changes have been committed, then the container’s build of <code class="language-plaintext highlighter-rouge">ostree</code> should contain your changes.</p>
|
||||
|
||||
<p>Else: Within the <code class="language-plaintext highlighter-rouge">ostree-testing</code> container, run <code class="language-plaintext highlighter-rouge">../ostree-build.sh</code> in the ostree directory. This will pull in changes from your branch and create a new <code class="language-plaintext highlighter-rouge">ostree</code> build.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="language-plaintext highlighter-rouge">make install</code> will install OSTree in the default location i.e. <code class="language-plaintext highlighter-rouge">/usr/..</code>in a Fedora 28 container.</p>
|
||||
</li>
|
||||
<li>Test <code class="language-plaintext highlighter-rouge">ostree</code>.</li>
|
||||
</ol>
|
||||
<h3 id="testing-in-a-virtual-machine">
|
||||
|
||||
|
||||
<a href="#testing-in-a-virtual-machine" class="anchor-heading" aria-labelledby="testing-in-a-virtual-machine"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Testing in a Virtual Machine
|
||||
|
||||
|
||||
</h3>
|
||||
|
||||
|
||||
<p>To create a Fedora 28 Atomic Host Vagrant VM, run the following commands:</p>
|
||||
|
||||
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span><span class="nb">mkdir </span>atomic <span class="o">&&</span> <span class="nb">cd </span>atomic
|
||||
<span class="nv">$ </span>vagrant init fedora/28-atomic-host <span class="o">&&</span> vagrant up
|
||||
</code></pre></div></div>
|
||||
|
||||
<p>An option is to use <code class="language-plaintext highlighter-rouge">rsync</code> to transfer <code class="language-plaintext highlighter-rouge">ostree</code> files to a Vagrant VM.</p>
|
||||
|
||||
<p>To find the IP address of a Vagrant VM, run <code class="language-plaintext highlighter-rouge">vagrant ssh-config</code> in the same directory as the <code class="language-plaintext highlighter-rouge">Vagrantfile</code>.</p>
|
||||
|
||||
<p><strong>Steps to <code class="language-plaintext highlighter-rouge">rsync</code> files to test an <code class="language-plaintext highlighter-rouge">ostree</code> build</strong>:</p>
|
||||
|
||||
<ol>
|
||||
<li>
|
||||
<p>Copy the contents of your public ssh key on your host machine e.g. <code class="language-plaintext highlighter-rouge">id_rsa.pub</code> to <code class="language-plaintext highlighter-rouge">/home/vagrant/.ssh/authorized_keys</code> on the VM.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Run <code class="language-plaintext highlighter-rouge">sudo su</code>, followed by <code class="language-plaintext highlighter-rouge">ssh localhost</code> then press <kbd>Ctrl</kbd>+<kbd>c</kbd> to exit from the decision prompt. This will create the <code class="language-plaintext highlighter-rouge">.ssh</code> directory with the right permissions.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Using <code class="language-plaintext highlighter-rouge">Vagrant</code> as the user, run <code class="language-plaintext highlighter-rouge">sudo cp ~/.ssh/authorized_keys /root/.ssh/</code>. So that user <code class="language-plaintext highlighter-rouge">root</code> has the the same login credentials.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>To override the <code class="language-plaintext highlighter-rouge">Read-only file system</code> warning, run <code class="language-plaintext highlighter-rouge">sudo ostree admin unlock</code>.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code class="language-plaintext highlighter-rouge"><ostree-install-dir></code> will serve as the local install location for <code class="language-plaintext highlighter-rouge">ostree</code> and the path to this directory should be <em>absolute</em> when specified in <code class="language-plaintext highlighter-rouge">DESTDIR</code>.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Set <code class="language-plaintext highlighter-rouge">rsync</code> to sync changes in <code class="language-plaintext highlighter-rouge">/etc</code> and <code class="language-plaintext highlighter-rouge">/usr</code> from <code class="language-plaintext highlighter-rouge"><ostree-install-dir>/</code> on the host to the VM:</p>
|
||||
|
||||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code> $ rsync -av <ostree-install-dir>/etc/ root@<ip-address>:/etc
|
||||
$ rsync -av <ostree-install-dir>/usr/ root@<ip-address>:/usr
|
||||
</code></pre></div> </div>
|
||||
|
||||
<p>Using option <code class="language-plaintext highlighter-rouge">-n</code> will execute the commands as a trial, which is helpful to list the files that will be synced.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Run the commands in step 6 each time a new <code class="language-plaintext highlighter-rouge">ostree</code> build is executed to update the change. Running <code class="language-plaintext highlighter-rouge">ls -lt</code> in the directory where the changed file is expected, is a simple way to check when a particular file was last modified. Proceed to the test changes <code class="language-plaintext highlighter-rouge">ostree</code> with the most recent changes.</p>
|
||||
</li>
|
||||
</ol>
|
||||
<h2 id="tutorial-adding-a-basic-builtin-command-to-ostree">
|
||||
|
||||
|
||||
<a href="#tutorial-adding-a-basic-builtin-command-to-ostree" class="anchor-heading" aria-labelledby="tutorial-adding-a-basic-builtin-command-to-ostree"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Tutorial: Adding a basic builtin command to ostree
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
<h3 id="modifying-ostree">
|
||||
|
||||
|
||||
<a href="#modifying-ostree" class="anchor-heading" aria-labelledby="modifying-ostree"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Modifying OSTree
|
||||
|
||||
|
||||
</h3>
|
||||
|
||||
|
||||
<p>This will add a command which prints <code class="language-plaintext highlighter-rouge">Hello OSTree!</code> when <code class="language-plaintext highlighter-rouge">ostree hello-ostree</code> is entered.</p>
|
||||
|
||||
<ol>
|
||||
<li>
|
||||
<p>Create a file in <code class="language-plaintext highlighter-rouge">src/ostree</code> named <code class="language-plaintext highlighter-rouge">ot-builtin-hello-ostree.c</code>. Code that lives in here belongs to OSTree, and uses functionality from libostree.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Add the following to <code class="language-plaintext highlighter-rouge">ot-builtin-hello-ostree.c</code>:</p>
|
||||
|
||||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code> #include "config.h"
|
||||
|
||||
#include "ot-main.h"
|
||||
#include "ot-builtins.h"
|
||||
#include "ostree.h"
|
||||
#include "otutil.h"
|
||||
|
||||
// Structure for options such as ostree hello-ostree --option.
|
||||
static GOptionEntry options[] = {
|
||||
{ NULL },
|
||||
};
|
||||
|
||||
gboolean
|
||||
ostree_builtin_hello_ostree (int argc, char **argv, OstreeCommandInvocation *invocation, GCancellable *cancellable, GError **error)
|
||||
{
|
||||
g_autoptr(OstreeRepo) repo = NULL;
|
||||
|
||||
// Creates new command context, ready to be parsed.
|
||||
// Input to g_option_context_new shows when running ostree <command> --help
|
||||
g_autoptr(GOptionContext) context = g_option_context_new ("");
|
||||
|
||||
// Parses the command context according to the ostree CLI.
|
||||
if (!ostree_option_context_parse (context, options, &argc, &argv, invocation, &repo, cancellable, error))
|
||||
return FALSE;
|
||||
|
||||
g_print("Hello OSTree!\n");
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
</code></pre></div> </div>
|
||||
|
||||
<p>This defines the functionality for <code class="language-plaintext highlighter-rouge">hello-ostree</code>. Now we have to make sure the CLI can refer to the execution function, and that autotools knows to build this file.
|
||||
Note: libostree codebase supports C99 features.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Add the following in <code class="language-plaintext highlighter-rouge">src/ostree/main.c</code>:</p>
|
||||
|
||||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code> { "hello-ostree", // The name of the command
|
||||
OSTREE_BUILTIN_FLAG_NO_REPO, // Flag not to require the `--repo` argument, see "ot-main.h"
|
||||
ostree_builtin_hello_ostree, // Execution function for the command
|
||||
"Print hello message" }, // Short description to appear when `ostree hello-ostree --help` is entered
|
||||
</code></pre></div> </div>
|
||||
</li>
|
||||
<li>
|
||||
<p>Add a macro for the function declaration of <code class="language-plaintext highlighter-rouge">ostree_builtin_hello_ostree</code>, in <code class="language-plaintext highlighter-rouge">ot-builtins.h</code>:</p>
|
||||
|
||||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code> BUILTINPROTO(hello_ostree);
|
||||
</code></pre></div> </div>
|
||||
|
||||
<p>This makes the function definition visible to the CLI.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Configure automake to include <code class="language-plaintext highlighter-rouge">ot-builtin-hello-ostree.c</code> in the build, by adding an entry in <code class="language-plaintext highlighter-rouge">Makefile-ostree.am</code> under <code class="language-plaintext highlighter-rouge">ostree_SOURCES</code>:</p>
|
||||
|
||||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code> src/ostree/ot-builtin-hello-ostree.c \
|
||||
</code></pre></div> </div>
|
||||
</li>
|
||||
<li>
|
||||
<p>Rebuild ostree:</p>
|
||||
|
||||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code> $ make && make install DESTDIR=/path/to/install/the/content
|
||||
</code></pre></div> </div>
|
||||
</li>
|
||||
<li>
|
||||
<p>Execute the new <code class="language-plaintext highlighter-rouge">ostree</code> binary, from where you installed it:</p>
|
||||
|
||||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code> $ ostree hello-ostree
|
||||
Hello OSTree!
|
||||
</code></pre></div> </div>
|
||||
</li>
|
||||
</ol>
|
||||
<h3 id="adding-a-new-api-function-to-libostree">
|
||||
|
||||
|
||||
<a href="#adding-a-new-api-function-to-libostree" class="anchor-heading" aria-labelledby="adding-a-new-api-function-to-libostree"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Adding a new API function to libostree
|
||||
|
||||
|
||||
</h3>
|
||||
|
||||
|
||||
<p>This will add a new API function <code class="language-plaintext highlighter-rouge">ostree_kernel_args_foo()</code> in <code class="language-plaintext highlighter-rouge">src/libostree/ostree-kernel-args.c</code>.</p>
|
||||
|
||||
<ol>
|
||||
<li>
|
||||
<p>Add the following to <code class="language-plaintext highlighter-rouge">src/libostree/ostree-kernel-args.h</code>:
|
||||
_OSTREE_PUBLIC
|
||||
gboolean ostree_kernel_args_foo (const char *arg, GCancellable *cancellable, GError **error);</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Add the following to <code class="language-plaintext highlighter-rouge">ostree-kernel-args.c</code>:
|
||||
/**
|
||||
* ostree_kernel_args_foo:
|
||||
* @arg: Description of the arg
|
||||
*
|
||||
* Description of the function
|
||||
*
|
||||
* Since: $NEWVERSION //The new libostree version, for example 2022.5
|
||||
**/
|
||||
gboolean
|
||||
ostree_kernel_args_foo (const char *arg, GCancellable *cancellable, GError **error)
|
||||
{
|
||||
//Add code here
|
||||
}</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Add the following to <code class="language-plaintext highlighter-rouge">src/libostree/libostree-devel.sym</code>:
|
||||
LIBOSTREE_$NEWVERSION { // The new libostree version
|
||||
global:
|
||||
ostree_kernel_args_foo; // Function name
|
||||
} LIBOSTREE_$LASTSTABLE; // The last stable libostree version</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Add the following to <code class="language-plaintext highlighter-rouge">Makefile-libostree.am</code>:
|
||||
if BUILDOPT_IS_DEVEL_BUILD
|
||||
symbol_files += $(top_srcdir)/src/libostree/libostree-devel.sym
|
||||
endif</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Add function name <code class="language-plaintext highlighter-rouge">ostree_kernel_args_foo</code> to <code class="language-plaintext highlighter-rouge">apidoc/ostree-sections.txt</code> under <code class="language-plaintext highlighter-rouge"><FILE>ostree-kernel-args</FILE></code>.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Call function <code class="language-plaintext highlighter-rouge">ostree_kernel_args_foo()</code> in your code.</p>
|
||||
</li>
|
||||
</ol>
|
||||
<h3 id="ostree-tests">
|
||||
|
||||
|
||||
<a href="#ostree-tests" class="anchor-heading" aria-labelledby="ostree-tests"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> OSTree Tests
|
||||
|
||||
|
||||
</h3>
|
||||
|
||||
|
||||
<p>Tests for OSTree are done by shell scripting, by running OSTree commands and examining output. These steps will go through adding a test for <code class="language-plaintext highlighter-rouge">hello-ostree</code>.</p>
|
||||
|
||||
<ol>
|
||||
<li>
|
||||
<p>Create a file in <code class="language-plaintext highlighter-rouge">tests</code> called <code class="language-plaintext highlighter-rouge">test-hello-ostree.sh</code>.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Add the following to <code class="language-plaintext highlighter-rouge">test-hello-ostree.sh</code>:</p>
|
||||
|
||||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code> set -euo pipefail # Ensure the test will not silently fail
|
||||
|
||||
. $(dirname $0)/libtest.sh # Make libtest.sh functions available
|
||||
|
||||
echo "1..1" # Declare which test is being run out of how many
|
||||
|
||||
pushd ${test_tmpdir}
|
||||
|
||||
${CMD_PREFIX} ostree hello-ostree > hello-output.txt
|
||||
assert_file_has_content hello-output.txt "Hello OSTree!"
|
||||
|
||||
popd
|
||||
|
||||
echo "ok hello ostree" # Indicate test success
|
||||
</code></pre></div> </div>
|
||||
|
||||
<p>Many tests require a fake repository setting up (as most OSTree commands require <code class="language-plaintext highlighter-rouge">--repo</code> to be specified). See <code class="language-plaintext highlighter-rouge">test-pull-depth.sh</code> for an example of this setup.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Configure automake to include <code class="language-plaintext highlighter-rouge">test-hello-ostree.sh</code> in the build, by adding an entry in <code class="language-plaintext highlighter-rouge">Makefile-tests.am</code> under <code class="language-plaintext highlighter-rouge">_installed_or_uninstalled_test_scripts</code>:</p>
|
||||
|
||||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code> tests/test-hello-ostree.sh \
|
||||
</code></pre></div> </div>
|
||||
</li>
|
||||
<li>
|
||||
<p>Make sure <code class="language-plaintext highlighter-rouge">test-hello-ostree.sh</code> has executable permissions!</p>
|
||||
|
||||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code> $ chmod +x tests/test-hello-ostree.sh
|
||||
</code></pre></div> </div>
|
||||
</li>
|
||||
<li>
|
||||
<p>Run the test:</p>
|
||||
|
||||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code> $ make check TESTS="tests/test-hello-ostree.sh"
|
||||
</code></pre></div> </div>
|
||||
|
||||
<p>Multiple tests can be specified: <code class="language-plaintext highlighter-rouge">make check TESTS="test1 test2 ..."</code>. To run all tests, use <code class="language-plaintext highlighter-rouge">make check</code>.</p>
|
||||
|
||||
<p>Hopefully, the test passes! The following will be printed:</p>
|
||||
|
||||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code> PASS: tests/test-hello-ostree.sh 1 hello ostree
|
||||
============================================================================
|
||||
Testsuite summary for libostree 2018.8
|
||||
============================================================================
|
||||
# TOTAL: 1
|
||||
# PASS: 1
|
||||
# SKIP: 0
|
||||
# XFAIL: 0
|
||||
# FAIL: 0
|
||||
# XPASS: 0
|
||||
# ERROR: 0
|
||||
============================================================================
|
||||
</code></pre></div> </div>
|
||||
</li>
|
||||
</ol>
|
||||
<h3 id="submitting-a-patch">
|
||||
|
||||
|
||||
<a href="#submitting-a-patch" class="anchor-heading" aria-labelledby="submitting-a-patch"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Submitting a Patch
|
||||
|
||||
|
||||
</h3>
|
||||
|
||||
|
||||
<p>After you have committed your changes and tested, you are ready to submit your patch!</p>
|
||||
|
||||
<p>You should make sure your commits are placed on top of the latest changes from <code class="language-plaintext highlighter-rouge">upstream/main</code>:</p>
|
||||
|
||||
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>git pull <span class="nt">--rebase</span> upstream main
|
||||
</code></pre></div></div>
|
||||
|
||||
<p>To submit your patch, open a pull request from your forked repository. Most often, you’ll be merging into <code class="language-plaintext highlighter-rouge">ostree:main</code> from <code class="language-plaintext highlighter-rouge"><username>:<branch name></code>.</p>
|
||||
|
||||
<p>If some of your changes are complete and you would like feedback, you may also open a pull request that has WIP (Work In Progress) in the title.</p>
|
||||
|
||||
<p>Before a pull request is considered merge ready, your commit messages should fall within the specified guideline. See <a href="/ostree/CONTRIBUTING/#commit-message-style">Commit message style</a>.</p>
|
||||
|
||||
<p>See <a href="/ostree/CONTRIBUTING/#submitting-patches">CONTRIBUTING.md</a> for information on squashing commits, and alternative options to submit patches.</p>
|
||||
<h3 id="returning-workflow">
|
||||
|
||||
|
||||
<a href="#returning-workflow" class="anchor-heading" aria-labelledby="returning-workflow"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Returning Workflow
|
||||
|
||||
|
||||
</h3>
|
||||
|
||||
|
||||
<p>When returning to work on a patch, it is recommended to update your fork with the latest changes in the upstream main branch.</p>
|
||||
|
||||
<p>If creating a new branch:</p>
|
||||
|
||||
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>git checkout main
|
||||
<span class="nv">$ </span>git pull upstream main
|
||||
<span class="nv">$ </span>git checkout <span class="nt">-b</span> <name-of-patch>
|
||||
</code></pre></div></div>
|
||||
|
||||
<p>If continuing on a branch already created:</p>
|
||||
|
||||
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>git checkout <name-of-patch>
|
||||
<span class="nv">$ </span>git pull <span class="nt">--rebase</span> upstream main
|
||||
</code></pre></div></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<hr>
|
||||
<footer>
|
||||
|
||||
|
||||
<p class="text-small text-grey-dk-100 mb-0">Copyright © <a href="https://www.redhat.com">Red Hat, Inc.</a> and <a href="https://github.com/ostreedev">others</a>.</p>
|
||||
|
||||
|
||||
<div class="d-flex mt-2">
|
||||
|
||||
|
||||
<p class="text-small text-grey-dk-000 mb-0">
|
||||
<a href="https://github.com/ostreedev/ostree/tree/main/docs/contributing-tutorial.md" id="edit-this-page">Edit this page on GitHub</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="search-overlay"></div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
248
copying-deltas/index.html
Normal file
@ -0,0 +1,248 @@
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
||||
|
||||
<link rel="stylesheet" href="/ostree/assets/css/just-the-docs-default.css">
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="/ostree/assets/js/vendor/lunr.min.js"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="/ostree/assets/js/just-the-docs.js"></script>
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Begin Jekyll SEO tag v2.8.0 -->
|
||||
<title>Static deltas for offline updates | ostreedev/ostree</title>
|
||||
<meta name="generator" content="Jekyll v3.9.5" />
|
||||
<meta property="og:title" content="Static deltas for offline updates" />
|
||||
<meta property="og:locale" content="en_US" />
|
||||
<meta name="description" content="ostree documentation" />
|
||||
<meta property="og:description" content="ostree documentation" />
|
||||
<link rel="canonical" href="https://ostreedev.github.io/ostree/copying-deltas/" />
|
||||
<meta property="og:url" content="https://ostreedev.github.io/ostree/copying-deltas/" />
|
||||
<meta property="og:site_name" content="ostreedev/ostree" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
<meta property="twitter:title" content="Static deltas for offline updates" />
|
||||
<script type="application/ld+json">
|
||||
{"@context":"https://schema.org","@type":"WebPage","description":"ostree documentation","headline":"Static deltas for offline updates","url":"https://ostreedev.github.io/ostree/copying-deltas/"}</script>
|
||||
<!-- End Jekyll SEO tag -->
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<a class="skip-to-main" href="#main-content">Skip to main content</a>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="d-none">
|
||||
<symbol id="svg-link" viewBox="0 0 24 24">
|
||||
<title>Link</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link">
|
||||
<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<symbol id="svg-menu" viewBox="0 0 24 24">
|
||||
<title>Menu</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-menu">
|
||||
<line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
|
||||
<title>Expand</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right">
|
||||
<polyline points="9 18 15 12 9 6"></polyline>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<!-- Feather. MIT License: https://github.com/feathericons/feather/blob/master/LICENSE -->
|
||||
<symbol id="svg-external-link" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-external-link">
|
||||
<title id="svg-external-link-title">(external link)</title>
|
||||
<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line>
|
||||
</symbol>
|
||||
|
||||
|
||||
<symbol id="svg-doc" viewBox="0 0 24 24">
|
||||
<title>Document</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-file">
|
||||
<path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"></path><polyline points="13 2 13 9 20 9"></polyline>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<symbol id="svg-search" viewBox="0 0 24 24">
|
||||
<title>Search</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search">
|
||||
<circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
|
||||
|
||||
<!-- Bootstrap Icons. MIT License: https://github.com/twbs/icons/blob/main/LICENSE.md -->
|
||||
<symbol id="svg-copy" viewBox="0 0 16 16">
|
||||
<title>Copy</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-clipboard" viewBox="0 0 16 16">
|
||||
<path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z"/>
|
||||
<path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-copied" viewBox="0 0 16 16">
|
||||
<title>Copied</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-clipboard-check-fill" viewBox="0 0 16 16">
|
||||
<path d="M6.5 0A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3Zm3 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3Z"/>
|
||||
<path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1A2.5 2.5 0 0 1 9.5 5h-3A2.5 2.5 0 0 1 4 2.5v-1Zm6.854 7.354-3 3a.5.5 0 0 1-.708 0l-1.5-1.5a.5.5 0 0 1 .708-.708L7.5 10.793l2.646-2.647a.5.5 0 0 1 .708.708Z"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
|
||||
</svg>
|
||||
|
||||
<div class="side-bar">
|
||||
<div class="site-header">
|
||||
<a href="/ostree/" class="site-title lh-tight">
|
||||
ostreedev/ostree
|
||||
|
||||
</a>
|
||||
<a href="#" id="menu-button" class="site-button">
|
||||
<svg viewBox="0 0 24 24" class="icon"><use xlink:href="#svg-menu"></use></svg>
|
||||
</a>
|
||||
</div>
|
||||
<nav aria-label="Main" id="site-nav" class="site-nav">
|
||||
|
||||
|
||||
<ul class="nav-list"><li class="nav-list-item"><a href="/ostree/" class="nav-list-link">libostree</a></li><li class="nav-list-item"><a href="/ostree/introduction/" class="nav-list-link">OSTree Overview</a></li><li class="nav-list-item"><a href="/ostree/repo/" class="nav-list-link">Anatomy of an OSTree repository</a></li><li class="nav-list-item"><a href="/ostree/deployment/" class="nav-list-link">Deployments</a></li><li class="nav-list-item"><a href="/ostree/atomic-upgrades/" class="nav-list-link">Atomic Upgrades</a></li><li class="nav-list-item"><a href="/ostree/atomic-rollbacks/" class="nav-list-link">Atomic Rollbacks</a></li><li class="nav-list-item"><a href="/ostree/adapting-existing/" class="nav-list-link">Adapting existing mainstream distributions</a></li><li class="nav-list-item"><a href="/ostree/var/" class="nav-list-link">OSTree and /var handling</a></li><li class="nav-list-item"><a href="/ostree/formats/" class="nav-list-link">OSTree data formats</a></li><li class="nav-list-item"><a href="/ostree/buildsystem-and-repos/" class="nav-list-link">Writing a buildsystem and managing repositories</a></li><li class="nav-list-item"><a href="/ostree/authenticated-repos/" class="nav-list-link">Handling access to authenticated remote repositories</a></li><li class="nav-list-item"><a href="/ostree/repository-management/" class="nav-list-link">Managing content in OSTree repositories</a></li><li class="nav-list-item active"><a href="/ostree/copying-deltas/" class="nav-list-link active">Static deltas for offline updates</a></li><li class="nav-list-item"><a href="/ostree/ima/" class="nav-list-link">Using Linux IMA with OSTree</a></li><li class="nav-list-item"><a href="/ostree/related-projects/" class="nav-list-link">Related Projects</a></li><li class="nav-list-item"><a href="/ostree/composefs/" class="nav-list-link">Using composefs with OSTree</a></li><li class="nav-list-item"><a href="/ostree/bootloaders/" class="nav-list-link">Bootloaders</a></li><li class="nav-list-item"><a href="/ostree/CONTRIBUTING/" class="nav-list-link">Contributing</a></li><li class="nav-list-item"><a href="/ostree/contributing-tutorial/" class="nav-list-link">OSTree Contributing Tutorial</a></li><li class="nav-list-item"><a href="/ostree/README-historical/" class="nav-list-link">Historical OSTree README</a></li></ul>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
|
||||
<footer class="site-footer">
|
||||
This site uses <a href="https://github.com/just-the-docs/just-the-docs">Just the Docs</a>, a documentation theme for Jekyll.
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="main" id="top">
|
||||
<div id="main-header" class="main-header">
|
||||
|
||||
|
||||
|
||||
<div class="search">
|
||||
<div class="search-input-wrap">
|
||||
<input type="text" id="search-input" class="search-input" tabindex="0" placeholder="Search ostreedev/ostree" aria-label="Search ostreedev/ostree" autocomplete="off">
|
||||
<label for="search-input" class="search-label"><svg viewBox="0 0 24 24" class="search-icon"><use xlink:href="#svg-search"></use></svg></label>
|
||||
</div>
|
||||
<div id="search-results" class="search-results"></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<nav aria-label="Auxiliary" class="aux-nav">
|
||||
<ul class="aux-nav-list">
|
||||
|
||||
<li class="aux-nav-list-item">
|
||||
<a href="https://github.com/ostreedev/ostree" class="site-button"
|
||||
|
||||
>
|
||||
OSTree on GitHub
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="main-content-wrap" class="main-content-wrap">
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="main-content" class="main-content" role="main">
|
||||
|
||||
<h1 class="no_toc" id="static-deltas-for-offline-updates">
|
||||
|
||||
|
||||
<a href="#static-deltas-for-offline-updates" class="anchor-heading" aria-labelledby="static-deltas-for-offline-updates"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Static deltas for offline updates
|
||||
|
||||
|
||||
</h1>
|
||||
|
||||
|
||||
|
||||
<!-- SPDX-License-Identifier: (CC-BY-SA-3.0 OR GFDL-1.3-or-later) -->
|
||||
|
||||
<p>OSTree supports generating “self-contained” static delta files, via an
|
||||
invocation similar to the following:</p>
|
||||
|
||||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ ostree --repo=/path/to/repo static-delta generate --min-fallback-size=0 --filename=delta-update-file --from=<from> <to>
|
||||
</code></pre></div></div>
|
||||
|
||||
<p>Note the usage of <code class="language-plaintext highlighter-rouge">--min-fallback-size=0</code> to ensure that the delta is self-contained.</p>
|
||||
|
||||
<p>Then, you can copy <code class="language-plaintext highlighter-rouge">delta-update-file</code> to a USB key or similar, and a target system can apply it via e.g.:</p>
|
||||
|
||||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ ostree --repo=/ostree/repo static-delta apply-offline /path/to/delta-update-file
|
||||
</code></pre></div></div>
|
||||
|
||||
<p>The above invocation will merely apply the content into the repository.
|
||||
To make it bootable, this will then need to be further followed up by e.g. <code class="language-plaintext highlighter-rouge">ostree admin deploy <to></code> or
|
||||
with a higher level tool such as <code class="language-plaintext highlighter-rouge">rpm-ostree</code>, via <code class="language-plaintext highlighter-rouge">rpm-ostree deploy :<to></code>.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<hr>
|
||||
<footer>
|
||||
|
||||
|
||||
<p class="text-small text-grey-dk-100 mb-0">Copyright © <a href="https://www.redhat.com">Red Hat, Inc.</a> and <a href="https://github.com/ostreedev">others</a>.</p>
|
||||
|
||||
|
||||
<div class="d-flex mt-2">
|
||||
|
||||
|
||||
<p class="text-small text-grey-dk-000 mb-0">
|
||||
<a href="https://github.com/ostreedev/ostree/tree/main/docs/copying-deltas.md" id="edit-this-page">Edit this page on GitHub</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="search-overlay"></div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
387
deployment/index.html
Normal file
@ -0,0 +1,387 @@
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
||||
|
||||
<link rel="stylesheet" href="/ostree/assets/css/just-the-docs-default.css">
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="/ostree/assets/js/vendor/lunr.min.js"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="/ostree/assets/js/just-the-docs.js"></script>
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Begin Jekyll SEO tag v2.8.0 -->
|
||||
<title>Deployments | ostreedev/ostree</title>
|
||||
<meta name="generator" content="Jekyll v3.9.5" />
|
||||
<meta property="og:title" content="Deployments" />
|
||||
<meta property="og:locale" content="en_US" />
|
||||
<meta name="description" content="ostree documentation" />
|
||||
<meta property="og:description" content="ostree documentation" />
|
||||
<link rel="canonical" href="https://ostreedev.github.io/ostree/deployment/" />
|
||||
<meta property="og:url" content="https://ostreedev.github.io/ostree/deployment/" />
|
||||
<meta property="og:site_name" content="ostreedev/ostree" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
<meta property="twitter:title" content="Deployments" />
|
||||
<script type="application/ld+json">
|
||||
{"@context":"https://schema.org","@type":"WebPage","description":"ostree documentation","headline":"Deployments","url":"https://ostreedev.github.io/ostree/deployment/"}</script>
|
||||
<!-- End Jekyll SEO tag -->
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<a class="skip-to-main" href="#main-content">Skip to main content</a>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="d-none">
|
||||
<symbol id="svg-link" viewBox="0 0 24 24">
|
||||
<title>Link</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link">
|
||||
<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<symbol id="svg-menu" viewBox="0 0 24 24">
|
||||
<title>Menu</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-menu">
|
||||
<line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
|
||||
<title>Expand</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right">
|
||||
<polyline points="9 18 15 12 9 6"></polyline>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<!-- Feather. MIT License: https://github.com/feathericons/feather/blob/master/LICENSE -->
|
||||
<symbol id="svg-external-link" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-external-link">
|
||||
<title id="svg-external-link-title">(external link)</title>
|
||||
<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line>
|
||||
</symbol>
|
||||
|
||||
|
||||
<symbol id="svg-doc" viewBox="0 0 24 24">
|
||||
<title>Document</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-file">
|
||||
<path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"></path><polyline points="13 2 13 9 20 9"></polyline>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<symbol id="svg-search" viewBox="0 0 24 24">
|
||||
<title>Search</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search">
|
||||
<circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
|
||||
|
||||
<!-- Bootstrap Icons. MIT License: https://github.com/twbs/icons/blob/main/LICENSE.md -->
|
||||
<symbol id="svg-copy" viewBox="0 0 16 16">
|
||||
<title>Copy</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-clipboard" viewBox="0 0 16 16">
|
||||
<path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z"/>
|
||||
<path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-copied" viewBox="0 0 16 16">
|
||||
<title>Copied</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-clipboard-check-fill" viewBox="0 0 16 16">
|
||||
<path d="M6.5 0A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3Zm3 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3Z"/>
|
||||
<path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1A2.5 2.5 0 0 1 9.5 5h-3A2.5 2.5 0 0 1 4 2.5v-1Zm6.854 7.354-3 3a.5.5 0 0 1-.708 0l-1.5-1.5a.5.5 0 0 1 .708-.708L7.5 10.793l2.646-2.647a.5.5 0 0 1 .708.708Z"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
|
||||
</svg>
|
||||
|
||||
<div class="side-bar">
|
||||
<div class="site-header">
|
||||
<a href="/ostree/" class="site-title lh-tight">
|
||||
ostreedev/ostree
|
||||
|
||||
</a>
|
||||
<a href="#" id="menu-button" class="site-button">
|
||||
<svg viewBox="0 0 24 24" class="icon"><use xlink:href="#svg-menu"></use></svg>
|
||||
</a>
|
||||
</div>
|
||||
<nav aria-label="Main" id="site-nav" class="site-nav">
|
||||
|
||||
|
||||
<ul class="nav-list"><li class="nav-list-item"><a href="/ostree/" class="nav-list-link">libostree</a></li><li class="nav-list-item"><a href="/ostree/introduction/" class="nav-list-link">OSTree Overview</a></li><li class="nav-list-item"><a href="/ostree/repo/" class="nav-list-link">Anatomy of an OSTree repository</a></li><li class="nav-list-item active"><a href="/ostree/deployment/" class="nav-list-link active">Deployments</a></li><li class="nav-list-item"><a href="/ostree/atomic-upgrades/" class="nav-list-link">Atomic Upgrades</a></li><li class="nav-list-item"><a href="/ostree/atomic-rollbacks/" class="nav-list-link">Atomic Rollbacks</a></li><li class="nav-list-item"><a href="/ostree/adapting-existing/" class="nav-list-link">Adapting existing mainstream distributions</a></li><li class="nav-list-item"><a href="/ostree/var/" class="nav-list-link">OSTree and /var handling</a></li><li class="nav-list-item"><a href="/ostree/formats/" class="nav-list-link">OSTree data formats</a></li><li class="nav-list-item"><a href="/ostree/buildsystem-and-repos/" class="nav-list-link">Writing a buildsystem and managing repositories</a></li><li class="nav-list-item"><a href="/ostree/authenticated-repos/" class="nav-list-link">Handling access to authenticated remote repositories</a></li><li class="nav-list-item"><a href="/ostree/repository-management/" class="nav-list-link">Managing content in OSTree repositories</a></li><li class="nav-list-item"><a href="/ostree/copying-deltas/" class="nav-list-link">Static deltas for offline updates</a></li><li class="nav-list-item"><a href="/ostree/ima/" class="nav-list-link">Using Linux IMA with OSTree</a></li><li class="nav-list-item"><a href="/ostree/related-projects/" class="nav-list-link">Related Projects</a></li><li class="nav-list-item"><a href="/ostree/composefs/" class="nav-list-link">Using composefs with OSTree</a></li><li class="nav-list-item"><a href="/ostree/bootloaders/" class="nav-list-link">Bootloaders</a></li><li class="nav-list-item"><a href="/ostree/CONTRIBUTING/" class="nav-list-link">Contributing</a></li><li class="nav-list-item"><a href="/ostree/contributing-tutorial/" class="nav-list-link">OSTree Contributing Tutorial</a></li><li class="nav-list-item"><a href="/ostree/README-historical/" class="nav-list-link">Historical OSTree README</a></li></ul>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
|
||||
<footer class="site-footer">
|
||||
This site uses <a href="https://github.com/just-the-docs/just-the-docs">Just the Docs</a>, a documentation theme for Jekyll.
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="main" id="top">
|
||||
<div id="main-header" class="main-header">
|
||||
|
||||
|
||||
|
||||
<div class="search">
|
||||
<div class="search-input-wrap">
|
||||
<input type="text" id="search-input" class="search-input" tabindex="0" placeholder="Search ostreedev/ostree" aria-label="Search ostreedev/ostree" autocomplete="off">
|
||||
<label for="search-input" class="search-label"><svg viewBox="0 0 24 24" class="search-icon"><use xlink:href="#svg-search"></use></svg></label>
|
||||
</div>
|
||||
<div id="search-results" class="search-results"></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<nav aria-label="Auxiliary" class="aux-nav">
|
||||
<ul class="aux-nav-list">
|
||||
|
||||
<li class="aux-nav-list-item">
|
||||
<a href="https://github.com/ostreedev/ostree" class="site-button"
|
||||
|
||||
>
|
||||
OSTree on GitHub
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="main-content-wrap" class="main-content-wrap">
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="main-content" class="main-content" role="main">
|
||||
|
||||
<h1 class="no_toc" id="deployments">
|
||||
|
||||
|
||||
<a href="#deployments" class="anchor-heading" aria-labelledby="deployments"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Deployments
|
||||
|
||||
|
||||
</h1>
|
||||
|
||||
|
||||
<ol id="markdown-toc">
|
||||
<li><a href="#overview" id="markdown-toc-overview">Overview</a> <ol>
|
||||
<li><a href="#stateroot-aka-osname-group-of-deployments-that-share-var" id="markdown-toc-stateroot-aka-osname-group-of-deployments-that-share-var">“stateroot” (AKA “osname”): Group of deployments that share /var</a></li>
|
||||
<li><a href="#contents-of-a-deployment" id="markdown-toc-contents-of-a-deployment">Contents of a deployment</a></li>
|
||||
<li><a href="#staged-deployments" id="markdown-toc-staged-deployments">Staged deployments</a></li>
|
||||
<li><a href="#the-system-boot" id="markdown-toc-the-system-boot">The system /boot</a></li>
|
||||
</ol>
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
<!-- SPDX-License-Identifier: (CC-BY-SA-3.0 OR GFDL-1.3-or-later) -->
|
||||
<h2 id="overview">
|
||||
|
||||
|
||||
<a href="#overview" class="anchor-heading" aria-labelledby="overview"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Overview
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>Built on top of the OSTree versioning filesystem core is a layer
|
||||
that knows how to deploy, parallel install, and manage Unix-like
|
||||
operating systems (accessible via <code class="language-plaintext highlighter-rouge">ostree admin</code>). The core content of these operating systems
|
||||
are treated as read-only, but they transparently share storage.</p>
|
||||
|
||||
<p>A deployment is physically located at a path of the form
|
||||
<code class="language-plaintext highlighter-rouge">/ostree/deploy/$stateroot/deploy/$checksum</code>.
|
||||
OSTree is designed to boot directly into exactly one deployment
|
||||
at a time; each deployment is intended to be a target for
|
||||
<code class="language-plaintext highlighter-rouge">chroot()</code> or equivalent.</p>
|
||||
<h3 id="stateroot-aka-osname-group-of-deployments-that-share-var">
|
||||
|
||||
|
||||
<a href="#stateroot-aka-osname-group-of-deployments-that-share-var" class="anchor-heading" aria-labelledby="stateroot-aka-osname-group-of-deployments-that-share-var"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> “stateroot” (AKA “osname”): Group of deployments that share /var
|
||||
|
||||
|
||||
</h3>
|
||||
|
||||
|
||||
<p>Each deployment is grouped in exactly one “stateroot” (also known as an “osname”);
|
||||
the former term is preferred.</p>
|
||||
|
||||
<p>From above, you can see that a stateroot is physically represented in the
|
||||
<code class="language-plaintext highlighter-rouge">/ostree/deploy/$stateroot</code> directory. For example, OSTree can allow parallel
|
||||
installing Debian in <code class="language-plaintext highlighter-rouge">/ostree/deploy/debian</code> and Red Hat Enterprise Linux in
|
||||
<code class="language-plaintext highlighter-rouge">/ostree/deploy/rhel</code> (subject to operating system support, present released
|
||||
versions of these operating systems may not support this).</p>
|
||||
|
||||
<p>Each stateroot has exactly one copy of the traditional Unix <code class="language-plaintext highlighter-rouge">/var</code>,
|
||||
stored physically in <code class="language-plaintext highlighter-rouge">/ostree/deploy/$stateroot/var</code>. OSTree provides
|
||||
support tools for <code class="language-plaintext highlighter-rouge">systemd</code> to create a Linux bind mount that ensures
|
||||
the booted deployment sees the shared copy of <code class="language-plaintext highlighter-rouge">/var</code>.</p>
|
||||
|
||||
<p>OSTree does not touch the contents of <code class="language-plaintext highlighter-rouge">/var</code>. Operating system
|
||||
components such as daemon services are required to create any
|
||||
directories they require there at runtime
|
||||
(e.g. <code class="language-plaintext highlighter-rouge">/var/cache/$daemonname</code>), and to manage upgrading data formats
|
||||
inside those directories.</p>
|
||||
<h3 id="contents-of-a-deployment">
|
||||
|
||||
|
||||
<a href="#contents-of-a-deployment" class="anchor-heading" aria-labelledby="contents-of-a-deployment"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Contents of a deployment
|
||||
|
||||
|
||||
</h3>
|
||||
|
||||
|
||||
<p>A deployment begins with a specific commit (represented as a
|
||||
SHA256 hash) in the OSTree repository in <code class="language-plaintext highlighter-rouge">/ostree/repo</code>. This commit refers
|
||||
to a filesystem tree that represents the underlying basis of a
|
||||
deployment. For short, we will call this the “tree”, to
|
||||
distinguish it from the concept of a deployment.</p>
|
||||
|
||||
<p>First, the tree must include a kernel (and optionally an initramfs). The
|
||||
current standard locations for these are <code class="language-plaintext highlighter-rouge">/usr/lib/modules/$kver/vmlinuz</code> and
|
||||
<code class="language-plaintext highlighter-rouge">/usr/lib/modules/$kver/initramfs.img</code>. The “boot checksum” will be computed
|
||||
automatically. This follows the current Fedora kernel layout, and is
|
||||
the current recommended path. However, older versions of libostree don’t
|
||||
support this; you may need to also put kernels in the previous (legacy)
|
||||
paths, which are <code class="language-plaintext highlighter-rouge">vmlinuz(-.*)?-$checksum</code> in either <code class="language-plaintext highlighter-rouge">/boot</code> or <code class="language-plaintext highlighter-rouge">/usr/lib/ostree-boot</code>.
|
||||
The checksum should be a SHA256 hash of the kernel contents; it must be
|
||||
pre-computed before storing the kernel in the repository. Optionally,
|
||||
the directory can also contain an initramfs, stored as
|
||||
<code class="language-plaintext highlighter-rouge">initramfs(-.*)?-$checksum</code> and/or a device tree, stored as
|
||||
<code class="language-plaintext highlighter-rouge">devicetree(-.*)?-$checksum</code>. If an initramfs or devicetree exist,
|
||||
the checksum must include all of the kernel, initramfs and devicetree contents.
|
||||
OSTree will use this to determine which kernels are shared. The rationale for
|
||||
this is to avoid computing checksums on the client by default.</p>
|
||||
|
||||
<p>The deployment should not have a traditional UNIX <code class="language-plaintext highlighter-rouge">/etc</code>; instead, it
|
||||
should include <code class="language-plaintext highlighter-rouge">/usr/etc</code>. This is the “default configuration”. When
|
||||
OSTree creates a deployment, it performs a 3-way merge using the
|
||||
<em>old</em> default configuration, the active system’s <code class="language-plaintext highlighter-rouge">/etc</code>, and the new
|
||||
default configuration. In the final filesystem tree for a deployment
|
||||
then, <code class="language-plaintext highlighter-rouge">/etc</code> is a regular writable directory.</p>
|
||||
|
||||
<p>Besides the exceptions of <code class="language-plaintext highlighter-rouge">/var</code> and <code class="language-plaintext highlighter-rouge">/etc</code> then, the rest of the
|
||||
contents of the tree are checked out as hard links into the
|
||||
repository. It’s strongly recommended that operating systems ship all
|
||||
of their content in <code class="language-plaintext highlighter-rouge">/usr</code>, but this is not a hard requirement.</p>
|
||||
|
||||
<p>Finally, a deployment may have a <code class="language-plaintext highlighter-rouge">.origin</code> file, stored next to its
|
||||
directory. This file tells <code class="language-plaintext highlighter-rouge">ostree admin upgrade</code> how to upgrade it.
|
||||
At the moment, OSTree only supports upgrading a single refspec.
|
||||
However, in the future OSTree may support a syntax for composing
|
||||
layers of trees, for example.</p>
|
||||
<h3 id="staged-deployments">
|
||||
|
||||
|
||||
<a href="#staged-deployments" class="anchor-heading" aria-labelledby="staged-deployments"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Staged deployments
|
||||
|
||||
|
||||
</h3>
|
||||
|
||||
|
||||
<p>As mentioned above, when OSTree creates a new deployment, a 3-way merge is done
|
||||
to update its <code class="language-plaintext highlighter-rouge">/etc</code>. Depending on the nature of the system, this can cause an
|
||||
issue: if a user or program modifies the booted <code class="language-plaintext highlighter-rouge">/etc</code> <em>after</em> the pending
|
||||
deployment is created but <em>before</em> rebooting, those modifications will be lost.
|
||||
OSTree does not do a second <code class="language-plaintext highlighter-rouge">/etc</code> merge on reboot.</p>
|
||||
|
||||
<p>To counter this, OSTree supports staged deployments. In this flow, deployments
|
||||
are created using e.g. <code class="language-plaintext highlighter-rouge">ostree admin upgrade --stage</code> on the CLI. The new
|
||||
deployment is still created when the command is invoked, but the 3-way <code class="language-plaintext highlighter-rouge">/etc</code>
|
||||
merge is delayed until the system is rebooted or shut down. Additionally,
|
||||
updating the bootloader is also delayed. This is done by the
|
||||
<code class="language-plaintext highlighter-rouge">ostree-finalize-staged.service</code> systemd unit.</p>
|
||||
|
||||
<p>The main disadvantage of this approach is that rebooting can take longer and the
|
||||
failure mode can be confusing (the machine will reboot into the same
|
||||
deployment). In systems where the workload is well-understood and not subject to
|
||||
the <code class="language-plaintext highlighter-rouge">/etc</code> issue above, it may be better to not stage deployments.</p>
|
||||
<h3 id="the-system-boot">
|
||||
|
||||
|
||||
<a href="#the-system-boot" class="anchor-heading" aria-labelledby="the-system-boot"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> The system /boot
|
||||
|
||||
|
||||
</h3>
|
||||
|
||||
|
||||
<p>While OSTree parallel installs deployments cleanly inside the
|
||||
<code class="language-plaintext highlighter-rouge">/ostree</code> directory, ultimately it has to control the system’s <code class="language-plaintext highlighter-rouge">/boot</code>
|
||||
directory. The way this works is via the
|
||||
<a href="https://uapi-group.org/specifications/specs/boot_loader_specification/">Boot Loader Specification</a>,
|
||||
which is a standard for bootloader-independent drop-in configuration
|
||||
files.</p>
|
||||
|
||||
<p>When a tree is deployed, it will have a configuration file generated
|
||||
of the form
|
||||
<code class="language-plaintext highlighter-rouge">/boot/loader/entries/ostree-$stateroot-$checksum.$serial.conf</code>. This
|
||||
configuration file will include a special <code class="language-plaintext highlighter-rouge">ostree=</code> kernel argument
|
||||
that allows the initramfs to find (and <code class="language-plaintext highlighter-rouge">chroot()</code> into) the specified
|
||||
deployment.</p>
|
||||
|
||||
<p>At present, not all bootloaders implement the BootLoaderSpec, so
|
||||
OSTree contains code for some of these to regenerate native config
|
||||
files (such as <code class="language-plaintext highlighter-rouge">/boot/syslinux/syslinux.conf</code>) based on the entries.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<hr>
|
||||
<footer>
|
||||
|
||||
|
||||
<p class="text-small text-grey-dk-100 mb-0">Copyright © <a href="https://www.redhat.com">Red Hat, Inc.</a> and <a href="https://github.com/ostreedev">others</a>.</p>
|
||||
|
||||
|
||||
<div class="d-flex mt-2">
|
||||
|
||||
|
||||
<p class="text-small text-grey-dk-000 mb-0">
|
||||
<a href="https://github.com/ostreedev/ostree/tree/main/docs/deployment.md" id="edit-this-page">Edit this page on GitHub</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="search-overlay"></div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
508
formats/index.html
Normal file
@ -0,0 +1,508 @@
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
||||
|
||||
<link rel="stylesheet" href="/ostree/assets/css/just-the-docs-default.css">
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="/ostree/assets/js/vendor/lunr.min.js"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="/ostree/assets/js/just-the-docs.js"></script>
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Begin Jekyll SEO tag v2.8.0 -->
|
||||
<title>OSTree data formats | ostreedev/ostree</title>
|
||||
<meta name="generator" content="Jekyll v3.9.5" />
|
||||
<meta property="og:title" content="OSTree data formats" />
|
||||
<meta property="og:locale" content="en_US" />
|
||||
<meta name="description" content="ostree documentation" />
|
||||
<meta property="og:description" content="ostree documentation" />
|
||||
<link rel="canonical" href="https://ostreedev.github.io/ostree/formats/" />
|
||||
<meta property="og:url" content="https://ostreedev.github.io/ostree/formats/" />
|
||||
<meta property="og:site_name" content="ostreedev/ostree" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
<meta property="twitter:title" content="OSTree data formats" />
|
||||
<script type="application/ld+json">
|
||||
{"@context":"https://schema.org","@type":"WebPage","description":"ostree documentation","headline":"OSTree data formats","url":"https://ostreedev.github.io/ostree/formats/"}</script>
|
||||
<!-- End Jekyll SEO tag -->
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<a class="skip-to-main" href="#main-content">Skip to main content</a>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="d-none">
|
||||
<symbol id="svg-link" viewBox="0 0 24 24">
|
||||
<title>Link</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link">
|
||||
<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<symbol id="svg-menu" viewBox="0 0 24 24">
|
||||
<title>Menu</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-menu">
|
||||
<line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
|
||||
<title>Expand</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right">
|
||||
<polyline points="9 18 15 12 9 6"></polyline>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<!-- Feather. MIT License: https://github.com/feathericons/feather/blob/master/LICENSE -->
|
||||
<symbol id="svg-external-link" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-external-link">
|
||||
<title id="svg-external-link-title">(external link)</title>
|
||||
<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line>
|
||||
</symbol>
|
||||
|
||||
|
||||
<symbol id="svg-doc" viewBox="0 0 24 24">
|
||||
<title>Document</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-file">
|
||||
<path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"></path><polyline points="13 2 13 9 20 9"></polyline>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<symbol id="svg-search" viewBox="0 0 24 24">
|
||||
<title>Search</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search">
|
||||
<circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
|
||||
|
||||
<!-- Bootstrap Icons. MIT License: https://github.com/twbs/icons/blob/main/LICENSE.md -->
|
||||
<symbol id="svg-copy" viewBox="0 0 16 16">
|
||||
<title>Copy</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-clipboard" viewBox="0 0 16 16">
|
||||
<path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z"/>
|
||||
<path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-copied" viewBox="0 0 16 16">
|
||||
<title>Copied</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-clipboard-check-fill" viewBox="0 0 16 16">
|
||||
<path d="M6.5 0A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3Zm3 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3Z"/>
|
||||
<path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1A2.5 2.5 0 0 1 9.5 5h-3A2.5 2.5 0 0 1 4 2.5v-1Zm6.854 7.354-3 3a.5.5 0 0 1-.708 0l-1.5-1.5a.5.5 0 0 1 .708-.708L7.5 10.793l2.646-2.647a.5.5 0 0 1 .708.708Z"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
|
||||
</svg>
|
||||
|
||||
<div class="side-bar">
|
||||
<div class="site-header">
|
||||
<a href="/ostree/" class="site-title lh-tight">
|
||||
ostreedev/ostree
|
||||
|
||||
</a>
|
||||
<a href="#" id="menu-button" class="site-button">
|
||||
<svg viewBox="0 0 24 24" class="icon"><use xlink:href="#svg-menu"></use></svg>
|
||||
</a>
|
||||
</div>
|
||||
<nav aria-label="Main" id="site-nav" class="site-nav">
|
||||
|
||||
|
||||
<ul class="nav-list"><li class="nav-list-item"><a href="/ostree/" class="nav-list-link">libostree</a></li><li class="nav-list-item"><a href="/ostree/introduction/" class="nav-list-link">OSTree Overview</a></li><li class="nav-list-item"><a href="/ostree/repo/" class="nav-list-link">Anatomy of an OSTree repository</a></li><li class="nav-list-item"><a href="/ostree/deployment/" class="nav-list-link">Deployments</a></li><li class="nav-list-item"><a href="/ostree/atomic-upgrades/" class="nav-list-link">Atomic Upgrades</a></li><li class="nav-list-item"><a href="/ostree/atomic-rollbacks/" class="nav-list-link">Atomic Rollbacks</a></li><li class="nav-list-item"><a href="/ostree/adapting-existing/" class="nav-list-link">Adapting existing mainstream distributions</a></li><li class="nav-list-item"><a href="/ostree/var/" class="nav-list-link">OSTree and /var handling</a></li><li class="nav-list-item active"><a href="/ostree/formats/" class="nav-list-link active">OSTree data formats</a></li><li class="nav-list-item"><a href="/ostree/buildsystem-and-repos/" class="nav-list-link">Writing a buildsystem and managing repositories</a></li><li class="nav-list-item"><a href="/ostree/authenticated-repos/" class="nav-list-link">Handling access to authenticated remote repositories</a></li><li class="nav-list-item"><a href="/ostree/repository-management/" class="nav-list-link">Managing content in OSTree repositories</a></li><li class="nav-list-item"><a href="/ostree/copying-deltas/" class="nav-list-link">Static deltas for offline updates</a></li><li class="nav-list-item"><a href="/ostree/ima/" class="nav-list-link">Using Linux IMA with OSTree</a></li><li class="nav-list-item"><a href="/ostree/related-projects/" class="nav-list-link">Related Projects</a></li><li class="nav-list-item"><a href="/ostree/composefs/" class="nav-list-link">Using composefs with OSTree</a></li><li class="nav-list-item"><a href="/ostree/bootloaders/" class="nav-list-link">Bootloaders</a></li><li class="nav-list-item"><a href="/ostree/CONTRIBUTING/" class="nav-list-link">Contributing</a></li><li class="nav-list-item"><a href="/ostree/contributing-tutorial/" class="nav-list-link">OSTree Contributing Tutorial</a></li><li class="nav-list-item"><a href="/ostree/README-historical/" class="nav-list-link">Historical OSTree README</a></li></ul>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
|
||||
<footer class="site-footer">
|
||||
This site uses <a href="https://github.com/just-the-docs/just-the-docs">Just the Docs</a>, a documentation theme for Jekyll.
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="main" id="top">
|
||||
<div id="main-header" class="main-header">
|
||||
|
||||
|
||||
|
||||
<div class="search">
|
||||
<div class="search-input-wrap">
|
||||
<input type="text" id="search-input" class="search-input" tabindex="0" placeholder="Search ostreedev/ostree" aria-label="Search ostreedev/ostree" autocomplete="off">
|
||||
<label for="search-input" class="search-label"><svg viewBox="0 0 24 24" class="search-icon"><use xlink:href="#svg-search"></use></svg></label>
|
||||
</div>
|
||||
<div id="search-results" class="search-results"></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<nav aria-label="Auxiliary" class="aux-nav">
|
||||
<ul class="aux-nav-list">
|
||||
|
||||
<li class="aux-nav-list-item">
|
||||
<a href="https://github.com/ostreedev/ostree" class="site-button"
|
||||
|
||||
>
|
||||
OSTree on GitHub
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="main-content-wrap" class="main-content-wrap">
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="main-content" class="main-content" role="main">
|
||||
|
||||
<h1 class="no_toc" id="ostree-data-formats">
|
||||
|
||||
|
||||
<a href="#ostree-data-formats" class="anchor-heading" aria-labelledby="ostree-data-formats"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> OSTree data formats
|
||||
|
||||
|
||||
</h1>
|
||||
|
||||
|
||||
<ol id="markdown-toc">
|
||||
<li><a href="#on-the-topic-of-smart-servers" id="markdown-toc-on-the-topic-of-smart-servers">On the topic of “smart servers”</a></li>
|
||||
<li><a href="#the-archive-format" id="markdown-toc-the-archive-format">The archive format</a></li>
|
||||
<li><a href="#archive-efficiency" id="markdown-toc-archive-efficiency">archive efficiency</a></li>
|
||||
<li><a href="#aside-bare-formats" id="markdown-toc-aside-bare-formats">Aside: bare formats</a></li>
|
||||
<li><a href="#static-deltas" id="markdown-toc-static-deltas">Static deltas</a></li>
|
||||
<li><a href="#static-delta-repository-layout" id="markdown-toc-static-delta-repository-layout">Static delta repository layout</a></li>
|
||||
<li><a href="#static-delta-internal-structure" id="markdown-toc-static-delta-internal-structure">Static delta internal structure</a> <ol>
|
||||
<li><a href="#the-delta-superblock" id="markdown-toc-the-delta-superblock">The delta superblock</a></li>
|
||||
</ol>
|
||||
</li>
|
||||
<li><a href="#a-delta-part" id="markdown-toc-a-delta-part">A delta part</a></li>
|
||||
<li><a href="#fallback-objects" id="markdown-toc-fallback-objects">Fallback objects</a></li>
|
||||
</ol>
|
||||
|
||||
<!-- SPDX-License-Identifier: (CC-BY-SA-3.0 OR GFDL-1.3-or-later) -->
|
||||
<h2 id="on-the-topic-of-smart-servers">
|
||||
|
||||
|
||||
<a href="#on-the-topic-of-smart-servers" class="anchor-heading" aria-labelledby="on-the-topic-of-smart-servers"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> On the topic of “smart servers”
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>One really crucial difference between OSTree and git is that git has a
|
||||
“smart server”. Even when fetching over <code class="language-plaintext highlighter-rouge">https://</code>, it isn’t just a
|
||||
static webserver, but one that e.g. dynamically computes and
|
||||
compresses pack files for each client.</p>
|
||||
|
||||
<p>In contrast, the author of OSTree feels that for operating system
|
||||
updates, many deployments will want to use simple static webservers,
|
||||
the same target most package systems were designed to use. The
|
||||
primary advantages are security and compute efficiency. Services like
|
||||
Amazon S3 and CDNs are a canonical target, as well as a stock static
|
||||
nginx server.</p>
|
||||
<h2 id="the-archive-format">
|
||||
|
||||
|
||||
<a href="#the-archive-format" class="anchor-heading" aria-labelledby="the-archive-format"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> The archive format
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>In the <a href="repo">repo</a> section, the concept of objects was introduced,
|
||||
where file/content objects are checksummed and managed individually.
|
||||
(Unlike a package system, which operates on compressed aggregates).</p>
|
||||
|
||||
<p>The <code class="language-plaintext highlighter-rouge">archive</code> format simply gzip-compresses each content object.
|
||||
Metadata objects are stored uncompressed. This means that it’s easy
|
||||
to serve via static HTTP. Note: the repo config file still uses the
|
||||
historical term <code class="language-plaintext highlighter-rouge">archive-z2</code> as mode. But this essentially indicates
|
||||
the modern <code class="language-plaintext highlighter-rouge">archive</code> format.</p>
|
||||
|
||||
<p>When you commit new content, you will see new <code class="language-plaintext highlighter-rouge">.filez</code> files appearing
|
||||
in <code class="language-plaintext highlighter-rouge">objects/</code>.</p>
|
||||
<h2 id="archive-efficiency">
|
||||
|
||||
|
||||
<a href="#archive-efficiency" class="anchor-heading" aria-labelledby="archive-efficiency"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> archive efficiency
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>The advantages of <code class="language-plaintext highlighter-rouge">archive</code>:</p>
|
||||
|
||||
<ul>
|
||||
<li>It’s easy to understand and implement</li>
|
||||
<li>Can be served directly over plain HTTP by a static webserver</li>
|
||||
<li>Clients can download/unpack updates incrementally</li>
|
||||
<li>Space efficient on the server</li>
|
||||
</ul>
|
||||
|
||||
<p>The biggest disadvantage of this format is that for a client to
|
||||
perform an update, one HTTP request per changed file is required. In
|
||||
some scenarios, this actually isn’t bad at all, particularly with
|
||||
techniques to reduce HTTP overhead, such as
|
||||
<a href="https://en.wikipedia.org/wiki/HTTP/2">HTTP/2</a>.</p>
|
||||
|
||||
<p>In order to make this format work well, you should design your content
|
||||
such that large data that changes infrequently (e.g. graphic images)
|
||||
are stored separately from small frequently changing data (application
|
||||
code).</p>
|
||||
|
||||
<p>Other disadvantages of <code class="language-plaintext highlighter-rouge">archive</code>:</p>
|
||||
|
||||
<ul>
|
||||
<li>It’s quite bad when clients are performing an initial pull (without HTTP/2),</li>
|
||||
<li>One doesn’t know the total size (compressed or uncompressed) of content
|
||||
before downloading everything</li>
|
||||
</ul>
|
||||
<h2 id="aside-bare-formats">
|
||||
|
||||
|
||||
<a href="#aside-bare-formats" class="anchor-heading" aria-labelledby="aside-bare-formats"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Aside: bare formats
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>The most common operation is to pull from a remote <code class="language-plaintext highlighter-rouge">archive</code> repository
|
||||
into a local one. This latter is not compressed on disk. In other
|
||||
words, pulling to a local repository is similar to unpacking (but not
|
||||
installing) the content of an RPM/deb package.</p>
|
||||
|
||||
<p>The <code class="language-plaintext highlighter-rouge">bare</code> repository format is the simplest one. In this mode regular files
|
||||
are directly stored to disk, and all metadata (e.g. uid/gid and xattrs) is
|
||||
reflected to the filesystem.
|
||||
It allows further direct access to content and metadata, but it may require
|
||||
elevated privileges when writing objects to the repository.</p>
|
||||
|
||||
<p>The <code class="language-plaintext highlighter-rouge">bare-user</code> format is a bit special in that the uid/gid and xattrs
|
||||
from the content are ignored. This is primarily useful if you want to
|
||||
have the same OSTree-managed content that can be run on a host system
|
||||
or an unprivileged container.</p>
|
||||
|
||||
<p>Similarly, the <code class="language-plaintext highlighter-rouge">bare-split-xattrs</code> format is a special mode where xattrs
|
||||
are stored as separate repository objects, and not directly reflected to
|
||||
the filesystem.
|
||||
This is primarily useful when transporting xattrs through lossy environments
|
||||
(e.g. tar streams and containerized environments). It also allows carrying
|
||||
security-sensitive xattrs (e.g. SELinux labels) out-of-band without involving
|
||||
OS filesystem logic.</p>
|
||||
<h2 id="static-deltas">
|
||||
|
||||
|
||||
<a href="#static-deltas" class="anchor-heading" aria-labelledby="static-deltas"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Static deltas
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>OSTree itself was originally focused on a continuous delivery model, where
|
||||
client systems are expected to update regularly. However, many OS vendors
|
||||
would like to supply content that’s updated e.g. once a month or less often.</p>
|
||||
|
||||
<p>For this model, we can do a lot better to support batched updates than
|
||||
a basic <code class="language-plaintext highlighter-rouge">archive</code> repo. However, we still want to preserve the
|
||||
model of “static webserver only”. Given this, OSTree has gained the
|
||||
concept of a “static delta”.</p>
|
||||
|
||||
<p>These deltas are targeted to be a delta between two specific commit
|
||||
objects, including “bsdiff” and “rsync-style” deltas within a content
|
||||
object. Static deltas also support <code class="language-plaintext highlighter-rouge">from NULL</code>, where the client can
|
||||
more efficiently download a commit object from scratch - this is
|
||||
mostly useful when using OSTree for containers, rather than OS images.
|
||||
For OS images, one tends to download an installer ISO or qcow2 image
|
||||
which is a single file that contains the tree data already.</p>
|
||||
|
||||
<p>Effectively, we’re spending server-side storage (and one-time compute
|
||||
cost), and gaining efficiency in client network bandwidth.</p>
|
||||
<h2 id="static-delta-repository-layout">
|
||||
|
||||
|
||||
<a href="#static-delta-repository-layout" class="anchor-heading" aria-labelledby="static-delta-repository-layout"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Static delta repository layout
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>Since static deltas may not exist, the client first needs to attempt
|
||||
to locate one. Suppose a client wants to retrieve commit <code class="language-plaintext highlighter-rouge">${new}</code>
|
||||
while currently running <code class="language-plaintext highlighter-rouge">${current}</code>.</p>
|
||||
|
||||
<p>In order to save space, these two commits are “modified base64” - the
|
||||
<code class="language-plaintext highlighter-rouge">/</code> character is replaced with <code class="language-plaintext highlighter-rouge">_</code>.</p>
|
||||
|
||||
<p>Like the commit objects, a “prefix directory” is used to make
|
||||
management easier for filesystem tools.</p>
|
||||
|
||||
<p>A delta is named <code class="language-plaintext highlighter-rouge">$(mbase64 $from)-$(mbase64 $to)</code>, for example
|
||||
<code class="language-plaintext highlighter-rouge">GpTyZaVut2jXFPWnO4LJiKEdRTvOw_mFUCtIKW1NIX0-L8f+VVDkEBKNc1Ncd+mDUrSVR4EyybQGCkuKtkDnTwk</code>,
|
||||
which in SHA256 format is
|
||||
<code class="language-plaintext highlighter-rouge">1a94f265a56eb768d714f5a73b82c988a11d453bcec3f985502b48296d4d217d-2fc7fe5550e410128d73535c77e98352b495478132c9b4060a4b8ab640e74f09</code>.</p>
|
||||
|
||||
<p>Finally, the actual content can be found in
|
||||
<code class="language-plaintext highlighter-rouge">deltas/$fromprefix/$fromsuffix-$to</code>.</p>
|
||||
<h2 id="static-delta-internal-structure">
|
||||
|
||||
|
||||
<a href="#static-delta-internal-structure" class="anchor-heading" aria-labelledby="static-delta-internal-structure"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Static delta internal structure
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>A delta is itself a directory. Inside, there is a file called
|
||||
<code class="language-plaintext highlighter-rouge">superblock</code> which contains metadata. The rest of the files will be
|
||||
integers bearing packs of content.</p>
|
||||
|
||||
<p>The file format of static deltas should be currently considered an
|
||||
OSTree implementation detail. Obviously, nothing stops one from
|
||||
writing code which is compatible with OSTree today. However, we would
|
||||
like the flexibility to expand and change things, and having multiple
|
||||
codebases makes that more problematic. Please contact the authors
|
||||
with any requests.</p>
|
||||
|
||||
<p>That said, one critical thing to understand about the design is that
|
||||
delta payloads are a bit more like “restricted programs” than they are
|
||||
raw data. There’s a “compilation” phase which generates output that
|
||||
the client executes.</p>
|
||||
|
||||
<p>This “updates as code” model allows for multiple content generation
|
||||
strategies. The design of this was inspired by that of Chromium:
|
||||
<a href="http://dev.chromium.org/chromium-os/chromiumos-design-docs/filesystem-autoupdate">ChromiumOS Autoupdate</a>.</p>
|
||||
<h3 id="the-delta-superblock">
|
||||
|
||||
|
||||
<a href="#the-delta-superblock" class="anchor-heading" aria-labelledby="the-delta-superblock"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> The delta superblock
|
||||
|
||||
|
||||
</h3>
|
||||
|
||||
|
||||
<p>The superblock contains:</p>
|
||||
|
||||
<ul>
|
||||
<li>arbitrary metadata</li>
|
||||
<li>delta generation timestamp</li>
|
||||
<li>the new commit object</li>
|
||||
<li>An array of recursive deltas to apply</li>
|
||||
<li>An array of per-part metadata, including total object sizes (compressed and uncompressed),</li>
|
||||
<li>An array of fallback objects</li>
|
||||
</ul>
|
||||
|
||||
<p>Let’s define a delta part, then return to discuss details:</p>
|
||||
<h2 id="a-delta-part">
|
||||
|
||||
|
||||
<a href="#a-delta-part" class="anchor-heading" aria-labelledby="a-delta-part"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> A delta part
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>A delta part is a combination of a raw blob of data, plus a very
|
||||
restricted bytecode that operates on it. Say for example two files
|
||||
happen to share a common section. It’s possible for the delta
|
||||
compilation to include that section once in the delta data blob, then
|
||||
generate instructions to write out that blob twice when generating
|
||||
both objects.</p>
|
||||
|
||||
<p>Realistically though, it’s very common for most of a delta to just be
|
||||
“stream of new objects” - if one considers it, it doesn’t make sense
|
||||
to have too much duplication inside operating system content at this
|
||||
level.</p>
|
||||
|
||||
<p>So then, what’s more interesting is that OSTree static deltas support
|
||||
a per-file delta algorithm called
|
||||
<a href="https://github.com/mendsley/bsdiff">bsdiff</a> that most notably works
|
||||
well on executable code.</p>
|
||||
|
||||
<p>The current delta compiler scans for files with matching basenames in
|
||||
each commit that have a similar size, and attempts a bsdiff between
|
||||
them. (It would make sense later to have a build system provide a
|
||||
hint for this - for example, files within a same package).</p>
|
||||
|
||||
<p>A generated bsdiff is included in the payload blob, and applying it is
|
||||
an instruction.</p>
|
||||
<h2 id="fallback-objects">
|
||||
|
||||
|
||||
<a href="#fallback-objects" class="anchor-heading" aria-labelledby="fallback-objects"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Fallback objects
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>It’s possible for there to be large-ish files which might be resistant
|
||||
to bsdiff. A good example is that it’s common for operating systems
|
||||
to use an “initramfs”, which is itself a compressed filesystem. This
|
||||
“internal compression” defeats bsdiff analysis.</p>
|
||||
|
||||
<p>For these types of objects, the delta superblock contains an array of
|
||||
“fallback objects”. These objects aren’t included in the delta
|
||||
parts - the client simply fetches them from the underlying <code class="language-plaintext highlighter-rouge">.filez</code>
|
||||
object.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<hr>
|
||||
<footer>
|
||||
|
||||
|
||||
<p class="text-small text-grey-dk-100 mb-0">Copyright © <a href="https://www.redhat.com">Red Hat, Inc.</a> and <a href="https://github.com/ostreedev">others</a>.</p>
|
||||
|
||||
|
||||
<div class="d-flex mt-2">
|
||||
|
||||
|
||||
<p class="text-small text-grey-dk-000 mb-0">
|
||||
<a href="https://github.com/ostreedev/ostree/tree/main/docs/formats.md" id="edit-this-page">Edit this page on GitHub</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="search-overlay"></div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
397
ima/index.html
Normal file
@ -0,0 +1,397 @@
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
||||
|
||||
<link rel="stylesheet" href="/ostree/assets/css/just-the-docs-default.css">
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="/ostree/assets/js/vendor/lunr.min.js"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="/ostree/assets/js/just-the-docs.js"></script>
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Begin Jekyll SEO tag v2.8.0 -->
|
||||
<title>Using Linux IMA with OSTree | ostreedev/ostree</title>
|
||||
<meta name="generator" content="Jekyll v3.9.5" />
|
||||
<meta property="og:title" content="Using Linux IMA with OSTree" />
|
||||
<meta property="og:locale" content="en_US" />
|
||||
<meta name="description" content="ostree documentation" />
|
||||
<meta property="og:description" content="ostree documentation" />
|
||||
<link rel="canonical" href="https://ostreedev.github.io/ostree/ima/" />
|
||||
<meta property="og:url" content="https://ostreedev.github.io/ostree/ima/" />
|
||||
<meta property="og:site_name" content="ostreedev/ostree" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
<meta property="twitter:title" content="Using Linux IMA with OSTree" />
|
||||
<script type="application/ld+json">
|
||||
{"@context":"https://schema.org","@type":"WebPage","description":"ostree documentation","headline":"Using Linux IMA with OSTree","url":"https://ostreedev.github.io/ostree/ima/"}</script>
|
||||
<!-- End Jekyll SEO tag -->
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<a class="skip-to-main" href="#main-content">Skip to main content</a>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="d-none">
|
||||
<symbol id="svg-link" viewBox="0 0 24 24">
|
||||
<title>Link</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link">
|
||||
<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<symbol id="svg-menu" viewBox="0 0 24 24">
|
||||
<title>Menu</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-menu">
|
||||
<line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
|
||||
<title>Expand</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right">
|
||||
<polyline points="9 18 15 12 9 6"></polyline>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<!-- Feather. MIT License: https://github.com/feathericons/feather/blob/master/LICENSE -->
|
||||
<symbol id="svg-external-link" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-external-link">
|
||||
<title id="svg-external-link-title">(external link)</title>
|
||||
<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line>
|
||||
</symbol>
|
||||
|
||||
|
||||
<symbol id="svg-doc" viewBox="0 0 24 24">
|
||||
<title>Document</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-file">
|
||||
<path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"></path><polyline points="13 2 13 9 20 9"></polyline>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<symbol id="svg-search" viewBox="0 0 24 24">
|
||||
<title>Search</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search">
|
||||
<circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
|
||||
|
||||
<!-- Bootstrap Icons. MIT License: https://github.com/twbs/icons/blob/main/LICENSE.md -->
|
||||
<symbol id="svg-copy" viewBox="0 0 16 16">
|
||||
<title>Copy</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-clipboard" viewBox="0 0 16 16">
|
||||
<path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z"/>
|
||||
<path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-copied" viewBox="0 0 16 16">
|
||||
<title>Copied</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-clipboard-check-fill" viewBox="0 0 16 16">
|
||||
<path d="M6.5 0A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3Zm3 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3Z"/>
|
||||
<path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1A2.5 2.5 0 0 1 9.5 5h-3A2.5 2.5 0 0 1 4 2.5v-1Zm6.854 7.354-3 3a.5.5 0 0 1-.708 0l-1.5-1.5a.5.5 0 0 1 .708-.708L7.5 10.793l2.646-2.647a.5.5 0 0 1 .708.708Z"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
|
||||
</svg>
|
||||
|
||||
<div class="side-bar">
|
||||
<div class="site-header">
|
||||
<a href="/ostree/" class="site-title lh-tight">
|
||||
ostreedev/ostree
|
||||
|
||||
</a>
|
||||
<a href="#" id="menu-button" class="site-button">
|
||||
<svg viewBox="0 0 24 24" class="icon"><use xlink:href="#svg-menu"></use></svg>
|
||||
</a>
|
||||
</div>
|
||||
<nav aria-label="Main" id="site-nav" class="site-nav">
|
||||
|
||||
|
||||
<ul class="nav-list"><li class="nav-list-item"><a href="/ostree/" class="nav-list-link">libostree</a></li><li class="nav-list-item"><a href="/ostree/introduction/" class="nav-list-link">OSTree Overview</a></li><li class="nav-list-item"><a href="/ostree/repo/" class="nav-list-link">Anatomy of an OSTree repository</a></li><li class="nav-list-item"><a href="/ostree/deployment/" class="nav-list-link">Deployments</a></li><li class="nav-list-item"><a href="/ostree/atomic-upgrades/" class="nav-list-link">Atomic Upgrades</a></li><li class="nav-list-item"><a href="/ostree/atomic-rollbacks/" class="nav-list-link">Atomic Rollbacks</a></li><li class="nav-list-item"><a href="/ostree/adapting-existing/" class="nav-list-link">Adapting existing mainstream distributions</a></li><li class="nav-list-item"><a href="/ostree/var/" class="nav-list-link">OSTree and /var handling</a></li><li class="nav-list-item"><a href="/ostree/formats/" class="nav-list-link">OSTree data formats</a></li><li class="nav-list-item"><a href="/ostree/buildsystem-and-repos/" class="nav-list-link">Writing a buildsystem and managing repositories</a></li><li class="nav-list-item"><a href="/ostree/authenticated-repos/" class="nav-list-link">Handling access to authenticated remote repositories</a></li><li class="nav-list-item"><a href="/ostree/repository-management/" class="nav-list-link">Managing content in OSTree repositories</a></li><li class="nav-list-item"><a href="/ostree/copying-deltas/" class="nav-list-link">Static deltas for offline updates</a></li><li class="nav-list-item active"><a href="/ostree/ima/" class="nav-list-link active">Using Linux IMA with OSTree</a></li><li class="nav-list-item"><a href="/ostree/related-projects/" class="nav-list-link">Related Projects</a></li><li class="nav-list-item"><a href="/ostree/composefs/" class="nav-list-link">Using composefs with OSTree</a></li><li class="nav-list-item"><a href="/ostree/bootloaders/" class="nav-list-link">Bootloaders</a></li><li class="nav-list-item"><a href="/ostree/CONTRIBUTING/" class="nav-list-link">Contributing</a></li><li class="nav-list-item"><a href="/ostree/contributing-tutorial/" class="nav-list-link">OSTree Contributing Tutorial</a></li><li class="nav-list-item"><a href="/ostree/README-historical/" class="nav-list-link">Historical OSTree README</a></li></ul>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
|
||||
<footer class="site-footer">
|
||||
This site uses <a href="https://github.com/just-the-docs/just-the-docs">Just the Docs</a>, a documentation theme for Jekyll.
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="main" id="top">
|
||||
<div id="main-header" class="main-header">
|
||||
|
||||
|
||||
|
||||
<div class="search">
|
||||
<div class="search-input-wrap">
|
||||
<input type="text" id="search-input" class="search-input" tabindex="0" placeholder="Search ostreedev/ostree" aria-label="Search ostreedev/ostree" autocomplete="off">
|
||||
<label for="search-input" class="search-label"><svg viewBox="0 0 24 24" class="search-icon"><use xlink:href="#svg-search"></use></svg></label>
|
||||
</div>
|
||||
<div id="search-results" class="search-results"></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<nav aria-label="Auxiliary" class="aux-nav">
|
||||
<ul class="aux-nav-list">
|
||||
|
||||
<li class="aux-nav-list-item">
|
||||
<a href="https://github.com/ostreedev/ostree" class="site-button"
|
||||
|
||||
>
|
||||
OSTree on GitHub
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="main-content-wrap" class="main-content-wrap">
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="main-content" class="main-content" role="main">
|
||||
|
||||
<h1 class="no_toc" id="using-linux-ima-with-ostree">
|
||||
|
||||
|
||||
<a href="#using-linux-ima-with-ostree" class="anchor-heading" aria-labelledby="using-linux-ima-with-ostree"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Using Linux IMA with OSTree
|
||||
|
||||
|
||||
</h1>
|
||||
|
||||
|
||||
<ol id="markdown-toc">
|
||||
<li><a href="#linux-ima" id="markdown-toc-linux-ima">Linux IMA</a></li>
|
||||
<li><a href="#ima-signatures-and-ostree-checksum" id="markdown-toc-ima-signatures-and-ostree-checksum">IMA signatures and OSTree checksum</a></li>
|
||||
<li><a href="#signing" id="markdown-toc-signing">Signing</a> <ol>
|
||||
<li><a href="#generating-a-key" id="markdown-toc-generating-a-key">Generating a key</a></li>
|
||||
<li><a href="#signing-a-commit" id="markdown-toc-signing-a-commit">Signing a commit</a></li>
|
||||
<li><a href="#applying-a-policy" id="markdown-toc-applying-a-policy">Applying a policy</a></li>
|
||||
<li><a href="#linux-evm" id="markdown-toc-linux-evm">Linux EVM</a></li>
|
||||
</ol>
|
||||
</li>
|
||||
<li><a href="#further-references" id="markdown-toc-further-references">Further references</a></li>
|
||||
</ol>
|
||||
|
||||
<!-- SPDX-License-Identifier: (CC-BY-SA-3.0 OR GFDL-1.3-or-later) -->
|
||||
<h2 id="linux-ima">
|
||||
|
||||
|
||||
<a href="#linux-ima" class="anchor-heading" aria-labelledby="linux-ima"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Linux IMA
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>The <a href="https://sourceforge.net/p/linux-ima/wiki/Home/">Linux Integrity Measurement Architecture</a>
|
||||
provides a mechanism to cryptographically sign the digest of a regular
|
||||
file, and policies can be applied to e.g. require that code executed
|
||||
by the root user have a valid signed digest.</p>
|
||||
|
||||
<p>The alignment between Linux IMA and ostree is quite strong. OSTree
|
||||
provides a content-addressable object store, where files are intended
|
||||
to be immutable. This is implemented with a basic read-only bind mount.</p>
|
||||
|
||||
<p>While IMA does not actually prevent mutating files, any changed (or unsigned)
|
||||
files would (depending on policy) not be readable or executable.</p>
|
||||
<h2 id="ima-signatures-and-ostree-checksum">
|
||||
|
||||
|
||||
<a href="#ima-signatures-and-ostree-checksum" class="anchor-heading" aria-labelledby="ima-signatures-and-ostree-checksum"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> IMA signatures and OSTree checksum
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>Mechanically, IMA signatures appear as a <code class="language-plaintext highlighter-rouge">security.ima</code> extended attribute
|
||||
on the file. This is a signed digest of just the file content (and not
|
||||
any metadata)</p>
|
||||
|
||||
<p>OSTree’s checksums in contrast include not just the file content, but also
|
||||
metadata such as uid, gid and mode and extended attributes;</p>
|
||||
|
||||
<p>Together, this means that adding an IMA signature to a file in the OSTree
|
||||
model appears as a new object (with a new digest). A nice property is that
|
||||
this enables the transactional addition (or removal) of IMA signatures.
|
||||
However, adding IMA signatures to files that were previously unsigned
|
||||
also today duplicates disk space.</p>
|
||||
<h2 id="signing">
|
||||
|
||||
|
||||
<a href="#signing" class="anchor-heading" aria-labelledby="signing"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Signing
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>To apply IMA signatures to an OSTree commit, there is an <code class="language-plaintext highlighter-rouge">ima-sign</code>
|
||||
command implemented currently in the <a href="https://github.com/ostreedev/ostree-rs-ext/">ostree-rs-ext</a>
|
||||
project.</p>
|
||||
<h3 id="generating-a-key">
|
||||
|
||||
|
||||
<a href="#generating-a-key" class="anchor-heading" aria-labelledby="generating-a-key"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Generating a key
|
||||
|
||||
|
||||
</h3>
|
||||
|
||||
|
||||
<p>There is documentation for this in <code class="language-plaintext highlighter-rouge">man evmctl</code> and the upstream IMA
|
||||
page; we will not replicate it here.</p>
|
||||
<h3 id="signing-a-commit">
|
||||
|
||||
|
||||
<a href="#signing-a-commit" class="anchor-heading" aria-labelledby="signing-a-commit"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Signing a commit
|
||||
|
||||
|
||||
</h3>
|
||||
|
||||
|
||||
<p><code class="language-plaintext highlighter-rouge">ima-sign</code> requires 4 things:</p>
|
||||
|
||||
<ul>
|
||||
<li>An OSTree repository (could be any mode; <code class="language-plaintext highlighter-rouge">archive</code> or e.g. <code class="language-plaintext highlighter-rouge">bare-user</code>)</li>
|
||||
<li>A ref or commit digest (e.g. <code class="language-plaintext highlighter-rouge">exampleos/x86_64/stable</code>)</li>
|
||||
<li>A digest algorithm (usually <code class="language-plaintext highlighter-rouge">sha256</code>, but you may use e.g. <code class="language-plaintext highlighter-rouge">sha512</code> as well)</li>
|
||||
<li>An RSA private key</li>
|
||||
</ul>
|
||||
|
||||
<p>You can then add IMA signatures to all regular files in the commit:</p>
|
||||
|
||||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ ostree-ext-cli ima-sign --repo=repo exampleos/x86_64/stable sha256 /path/to/key.pem
|
||||
</code></pre></div></div>
|
||||
|
||||
<p>Many different choices are possible for the signing model. For example,
|
||||
your build system could store individual components/packages in their own
|
||||
ostree refs, and sign them at build time. This would avoid re-signing
|
||||
all binaries when creating production builds. Although note you
|
||||
still likely want to sign generated artifacts from unioning individual
|
||||
components, such as a dpkg/rpm database or equivalent and cache files
|
||||
such as the <code class="language-plaintext highlighter-rouge">ldconfig</code> and GTK+ icon caches, etc.</p>
|
||||
<h3 id="applying-a-policy">
|
||||
|
||||
|
||||
<a href="#applying-a-policy" class="anchor-heading" aria-labelledby="applying-a-policy"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Applying a policy
|
||||
|
||||
|
||||
</h3>
|
||||
|
||||
|
||||
<p>Signing a commit by itself will have little to no effect. You will also
|
||||
need to include in your builds an <a href="https://sourceforge.net/p/linux-ima/wiki/Home/#defining-an-lsm-specific-policy">IMA policy</a>.</p>
|
||||
<h3 id="linux-evm">
|
||||
|
||||
|
||||
<a href="#linux-evm" class="anchor-heading" aria-labelledby="linux-evm"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Linux EVM
|
||||
|
||||
|
||||
</h3>
|
||||
|
||||
|
||||
<p>The EVM subsystem builds on IMA, and adds another signature which
|
||||
covers most file data, such as the uid, gid and mode and selected
|
||||
security-relevant extended attributes.</p>
|
||||
|
||||
<p>This is quite close to the ostree native checksum - the ordering
|
||||
of the fields is different so the checksums are physically different, but
|
||||
logically they are very close.</p>
|
||||
|
||||
<p>However, the focus of the EVM design seems to mostly
|
||||
be on machine-specific signatures with keys stored in a TPM.
|
||||
Note that doing this on a per-machine basis would add a new
|
||||
<code class="language-plaintext highlighter-rouge">security.evm</code> extended attribute, and crucially that
|
||||
<em>changes the ostree digest</em> - so from ostree’s perspective,
|
||||
these objects will appear corrupt.</p>
|
||||
|
||||
<p>In the future, ostree may learn to ignore the presence of <code class="language-plaintext highlighter-rouge">security.evm</code>
|
||||
extended attributes.</p>
|
||||
|
||||
<p>There is also some support for “portable” EVM signatures - by
|
||||
default, EVM signatures also include the inode number and generation
|
||||
which are inherently machine-specific.</p>
|
||||
|
||||
<p>A future ostree enhancement may instead also focus on supporting
|
||||
signing commits with these “portable” EVM signatures in addition to IMA.</p>
|
||||
<h2 id="further-references">
|
||||
|
||||
|
||||
<a href="#further-references" class="anchor-heading" aria-labelledby="further-references"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Further references
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<ul>
|
||||
<li>https://sourceforge.net/p/linux-ima/wiki/Home/</li>
|
||||
<li>https://en.opensuse.org/SDB:Ima_evm</li>
|
||||
<li>https://wiki.gentoo.org/wiki/Integrity_Measurement_Architecture</li>
|
||||
<li>https://fedoraproject.org/wiki/Changes/Signed_RPM_Contents</li>
|
||||
<li>https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/managing_monitoring_and_updating_the_kernel/enhancing-security-with-the-kernel-integrity-subsystem_managing-monitoring-and-updating-the-kernel</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<hr>
|
||||
<footer>
|
||||
|
||||
|
||||
<p class="text-small text-grey-dk-100 mb-0">Copyright © <a href="https://www.redhat.com">Red Hat, Inc.</a> and <a href="https://github.com/ostreedev">others</a>.</p>
|
||||
|
||||
|
||||
<div class="d-flex mt-2">
|
||||
|
||||
|
||||
<p class="text-small text-grey-dk-000 mb-0">
|
||||
<a href="https://github.com/ostreedev/ostree/tree/main/docs/ima.md" id="edit-this-page">Edit this page on GitHub</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="search-overlay"></div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
498
index.html
Normal file
@ -0,0 +1,498 @@
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
||||
|
||||
<link rel="stylesheet" href="/ostree/assets/css/just-the-docs-default.css">
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="/ostree/assets/js/vendor/lunr.min.js"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="/ostree/assets/js/just-the-docs.js"></script>
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Begin Jekyll SEO tag v2.8.0 -->
|
||||
<title>libostree | ostreedev/ostree</title>
|
||||
<meta name="generator" content="Jekyll v3.9.5" />
|
||||
<meta property="og:title" content="libostree" />
|
||||
<meta property="og:locale" content="en_US" />
|
||||
<meta name="description" content="ostree documentation" />
|
||||
<meta property="og:description" content="ostree documentation" />
|
||||
<link rel="canonical" href="https://ostreedev.github.io/ostree/" />
|
||||
<meta property="og:url" content="https://ostreedev.github.io/ostree/" />
|
||||
<meta property="og:site_name" content="ostreedev/ostree" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
<meta property="twitter:title" content="libostree" />
|
||||
<script type="application/ld+json">
|
||||
{"@context":"https://schema.org","@type":"WebSite","description":"ostree documentation","headline":"libostree","name":"ostreedev/ostree","url":"https://ostreedev.github.io/ostree/"}</script>
|
||||
<!-- End Jekyll SEO tag -->
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<a class="skip-to-main" href="#main-content">Skip to main content</a>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="d-none">
|
||||
<symbol id="svg-link" viewBox="0 0 24 24">
|
||||
<title>Link</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link">
|
||||
<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<symbol id="svg-menu" viewBox="0 0 24 24">
|
||||
<title>Menu</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-menu">
|
||||
<line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
|
||||
<title>Expand</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right">
|
||||
<polyline points="9 18 15 12 9 6"></polyline>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<!-- Feather. MIT License: https://github.com/feathericons/feather/blob/master/LICENSE -->
|
||||
<symbol id="svg-external-link" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-external-link">
|
||||
<title id="svg-external-link-title">(external link)</title>
|
||||
<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line>
|
||||
</symbol>
|
||||
|
||||
|
||||
<symbol id="svg-doc" viewBox="0 0 24 24">
|
||||
<title>Document</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-file">
|
||||
<path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"></path><polyline points="13 2 13 9 20 9"></polyline>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<symbol id="svg-search" viewBox="0 0 24 24">
|
||||
<title>Search</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search">
|
||||
<circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
|
||||
|
||||
<!-- Bootstrap Icons. MIT License: https://github.com/twbs/icons/blob/main/LICENSE.md -->
|
||||
<symbol id="svg-copy" viewBox="0 0 16 16">
|
||||
<title>Copy</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-clipboard" viewBox="0 0 16 16">
|
||||
<path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z"/>
|
||||
<path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-copied" viewBox="0 0 16 16">
|
||||
<title>Copied</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-clipboard-check-fill" viewBox="0 0 16 16">
|
||||
<path d="M6.5 0A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3Zm3 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3Z"/>
|
||||
<path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1A2.5 2.5 0 0 1 9.5 5h-3A2.5 2.5 0 0 1 4 2.5v-1Zm6.854 7.354-3 3a.5.5 0 0 1-.708 0l-1.5-1.5a.5.5 0 0 1 .708-.708L7.5 10.793l2.646-2.647a.5.5 0 0 1 .708.708Z"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
|
||||
</svg>
|
||||
|
||||
<div class="side-bar">
|
||||
<div class="site-header">
|
||||
<a href="/ostree/" class="site-title lh-tight">
|
||||
ostreedev/ostree
|
||||
|
||||
</a>
|
||||
<a href="#" id="menu-button" class="site-button">
|
||||
<svg viewBox="0 0 24 24" class="icon"><use xlink:href="#svg-menu"></use></svg>
|
||||
</a>
|
||||
</div>
|
||||
<nav aria-label="Main" id="site-nav" class="site-nav">
|
||||
|
||||
|
||||
<ul class="nav-list"><li class="nav-list-item active"><a href="/ostree/" class="nav-list-link active">libostree</a></li><li class="nav-list-item"><a href="/ostree/introduction/" class="nav-list-link">OSTree Overview</a></li><li class="nav-list-item"><a href="/ostree/repo/" class="nav-list-link">Anatomy of an OSTree repository</a></li><li class="nav-list-item"><a href="/ostree/deployment/" class="nav-list-link">Deployments</a></li><li class="nav-list-item"><a href="/ostree/atomic-upgrades/" class="nav-list-link">Atomic Upgrades</a></li><li class="nav-list-item"><a href="/ostree/atomic-rollbacks/" class="nav-list-link">Atomic Rollbacks</a></li><li class="nav-list-item"><a href="/ostree/adapting-existing/" class="nav-list-link">Adapting existing mainstream distributions</a></li><li class="nav-list-item"><a href="/ostree/var/" class="nav-list-link">OSTree and /var handling</a></li><li class="nav-list-item"><a href="/ostree/formats/" class="nav-list-link">OSTree data formats</a></li><li class="nav-list-item"><a href="/ostree/buildsystem-and-repos/" class="nav-list-link">Writing a buildsystem and managing repositories</a></li><li class="nav-list-item"><a href="/ostree/authenticated-repos/" class="nav-list-link">Handling access to authenticated remote repositories</a></li><li class="nav-list-item"><a href="/ostree/repository-management/" class="nav-list-link">Managing content in OSTree repositories</a></li><li class="nav-list-item"><a href="/ostree/copying-deltas/" class="nav-list-link">Static deltas for offline updates</a></li><li class="nav-list-item"><a href="/ostree/ima/" class="nav-list-link">Using Linux IMA with OSTree</a></li><li class="nav-list-item"><a href="/ostree/related-projects/" class="nav-list-link">Related Projects</a></li><li class="nav-list-item"><a href="/ostree/composefs/" class="nav-list-link">Using composefs with OSTree</a></li><li class="nav-list-item"><a href="/ostree/bootloaders/" class="nav-list-link">Bootloaders</a></li><li class="nav-list-item"><a href="/ostree/CONTRIBUTING/" class="nav-list-link">Contributing</a></li><li class="nav-list-item"><a href="/ostree/contributing-tutorial/" class="nav-list-link">OSTree Contributing Tutorial</a></li><li class="nav-list-item"><a href="/ostree/README-historical/" class="nav-list-link">Historical OSTree README</a></li></ul>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
|
||||
<footer class="site-footer">
|
||||
This site uses <a href="https://github.com/just-the-docs/just-the-docs">Just the Docs</a>, a documentation theme for Jekyll.
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="main" id="top">
|
||||
<div id="main-header" class="main-header">
|
||||
|
||||
|
||||
|
||||
<div class="search">
|
||||
<div class="search-input-wrap">
|
||||
<input type="text" id="search-input" class="search-input" tabindex="0" placeholder="Search ostreedev/ostree" aria-label="Search ostreedev/ostree" autocomplete="off">
|
||||
<label for="search-input" class="search-label"><svg viewBox="0 0 24 24" class="search-icon"><use xlink:href="#svg-search"></use></svg></label>
|
||||
</div>
|
||||
<div id="search-results" class="search-results"></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<nav aria-label="Auxiliary" class="aux-nav">
|
||||
<ul class="aux-nav-list">
|
||||
|
||||
<li class="aux-nav-list-item">
|
||||
<a href="https://github.com/ostreedev/ostree" class="site-button"
|
||||
|
||||
>
|
||||
OSTree on GitHub
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="main-content-wrap" class="main-content-wrap">
|
||||
|
||||
|
||||
<div id="main-content" class="main-content" role="main">
|
||||
|
||||
<h1 class="no_toc" id="libostree">
|
||||
|
||||
|
||||
<a href="#libostree" class="anchor-heading" aria-labelledby="libostree"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> libostree
|
||||
|
||||
|
||||
</h1>
|
||||
|
||||
|
||||
<ol id="markdown-toc">
|
||||
<li><a href="#operating-systems-and-distributions-using-ostree" id="markdown-toc-operating-systems-and-distributions-using-ostree">Operating systems and distributions using OSTree</a></li>
|
||||
<li><a href="#distribution-build-tools" id="markdown-toc-distribution-build-tools">Distribution build tools</a></li>
|
||||
<li><a href="#projects-linking-to-libostree" id="markdown-toc-projects-linking-to-libostree">Projects linking to libostree</a></li>
|
||||
<li><a href="#language-bindings" id="markdown-toc-language-bindings">Language bindings</a></li>
|
||||
<li><a href="#building" id="markdown-toc-building">Building</a></li>
|
||||
<li><a href="#api-reference" id="markdown-toc-api-reference">API Reference</a></li>
|
||||
<li><a href="#manual-pages" id="markdown-toc-manual-pages">Manual Pages</a></li>
|
||||
<li><a href="#contact-and-discussion-forums" id="markdown-toc-contact-and-discussion-forums">Contact and discussion forums</a></li>
|
||||
<li><a href="#contributing" id="markdown-toc-contributing">Contributing</a></li>
|
||||
<li><a href="#licensing" id="markdown-toc-licensing">Licensing</a></li>
|
||||
</ol>
|
||||
|
||||
<!-- SPDX-License-Identifier: (CC-BY-SA-3.0 OR GFDL-1.3-or-later) -->
|
||||
|
||||
<p>This project is now known as “libostree”, though it is still appropriate to use
|
||||
the previous name: “OSTree” (or “ostree”). The focus is on projects which use
|
||||
libostree’s shared library, rather than users directly invoking the command line
|
||||
tools (except for build systems). However, in most of the rest of the
|
||||
documentation, we will use the term “OSTree”, since it’s slightly shorter, and
|
||||
changing all documentation at once is impractical. We expect to transition to
|
||||
the new name over time.</p>
|
||||
|
||||
<p>As implied above, libostree is both a shared library and suite of command line
|
||||
tools that combines a “git-like” model for committing and downloading bootable
|
||||
filesystem trees, along with a layer for deploying them and managing the
|
||||
bootloader configuration.</p>
|
||||
|
||||
<p>The core OSTree model is like git in that it checksums individual files and has
|
||||
a content-addressed-object store. It’s unlike git in that it “checks out” the
|
||||
files via hardlinks, and they thus need to be immutable to prevent corruption.
|
||||
Therefore, another way to think of OSTree is that it’s just a more polished
|
||||
version of
|
||||
<a href="http://linux-vserver.org/index.php?title=util-vserver:Vhashify&oldid=2285">Linux VServer hardlinks</a>.</p>
|
||||
|
||||
<p><strong>Features:</strong></p>
|
||||
|
||||
<ul>
|
||||
<li>Transactional upgrades and rollback for the system</li>
|
||||
<li>Replicating content incrementally over HTTP via GPG signatures and “pinned TLS” support</li>
|
||||
<li>Support for parallel installing more than just 2 bootable roots</li>
|
||||
<li>Binary history on the server side (and client)</li>
|
||||
<li>Introspectable shared library API for build and deployment systems</li>
|
||||
<li>Flexible support for multiple branches and repositories, supporting
|
||||
projects like <a href="https://github.com/flatpak/flatpak">Flatpak</a> which
|
||||
use libostree for applications, rather than hosts.</li>
|
||||
</ul>
|
||||
<h2 id="operating-systems-and-distributions-using-ostree">
|
||||
|
||||
|
||||
<a href="#operating-systems-and-distributions-using-ostree" class="anchor-heading" aria-labelledby="operating-systems-and-distributions-using-ostree"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Operating systems and distributions using OSTree
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p><a href="https://www.apertis.org/">Apertis</a> uses libostree for their host system as
|
||||
well as Flatpak. See <a href="https://www.apertis.org/guides/ostree/">update documentation</a> and
|
||||
<a href="https://gitlab.apertis.org/pkg/apertis-update-manager">apertis-update-manager</a></p>
|
||||
|
||||
<p><a href="https://endlessos.com/">Endless OS</a> uses libostree for their host system as
|
||||
well as Flatpak. See
|
||||
their <a href="https://github.com/endlessm/eos-updater">eos-updater</a>
|
||||
and <a href="https://github.com/dbnicholson/deb-ostree-builder">deb-ostree-builder</a>
|
||||
projects.</p>
|
||||
|
||||
<p>For Debian/apt, see also https://github.com/stb-tester/apt2ostree
|
||||
and the LWN article <a href="https://lwn.net/Articles/821367/">Merkle trees and build systems</a>.</p>
|
||||
|
||||
<p>Fedora derivatives use rpm-ostree (noted below); there are 4 variants using OSTree:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="https://getfedora.org/en/coreos/">Fedora CoreOS</a></li>
|
||||
<li><a href="https://silverblue.fedoraproject.org/">Fedora Silverblue</a></li>
|
||||
<li><a href="https://kinoite.fedoraproject.org/">Fedora Kinoite</a></li>
|
||||
<li><a href="https://iot.fedoraproject.org/">Fedora IoT</a></li>
|
||||
</ul>
|
||||
|
||||
<p>Red Hat Enterprise Linux CoreOS is a derivative of Fedora CoreOS, used in <a href="https://try.openshift.com/">OpenShift 4</a>.
|
||||
The <a href="https://github.com/openshift/machine-config-operator/blob/master/docs/OSUpgrades.md">machine-config-operator</a>
|
||||
manages upgrades. RHEL CoreOS is also the successor to RHEL Atomic Host, which
|
||||
uses rpm-ostree as well.</p>
|
||||
|
||||
<p><a href="https://www.redhat.com/en/blog/new-standard-red-hat-vehicle-operating-system-modern-and-future-vehicles">Red Hat In-Vehicle Operating System</a> is a derivative of CentOS Automotive Stream Distribution that uses OSTree, it’s closest Fedora derivative is Fedora IoT although it was created as it’s own distribution.</p>
|
||||
|
||||
<p><a href="https://wiki.gnome.org/Projects/GnomeContinuous">GNOME Continuous</a> is
|
||||
where OSTree was born - as a high performance continuous delivery/testing
|
||||
system for GNOME.</p>
|
||||
|
||||
<p><a href="https://os.gnome.org/">GNOME OS</a> is a testing OS that uses libostree for
|
||||
their host system as well as Flatpak.</p>
|
||||
|
||||
<p><a href="https://liri.io/download/silverblue/">Liri OS</a> has the option to install
|
||||
their distribution using ostree.</p>
|
||||
|
||||
<p><a href="https://developer.toradex.com/torizon/torizoncore/torizoncore-technical-overview/">Torizon OS</a>
|
||||
is a Linux distribution for embedded systems that updates via OSTree images
|
||||
delivered via <a href="https://uptane.github.io/">Uptane</a> and
|
||||
<a href="https://github.com/uptane/aktualizr/">aktualizr</a>.</p>
|
||||
<h2 id="distribution-build-tools">
|
||||
|
||||
|
||||
<a href="#distribution-build-tools" class="anchor-heading" aria-labelledby="distribution-build-tools"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Distribution build tools
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p><a href="https://github.com/advancedtelematic/meta-updater">meta-updater</a> is
|
||||
a layer available for <a href="http://www.openembedded.org/wiki/Main_Page">OpenEmbedded</a>
|
||||
systems.</p>
|
||||
|
||||
<p><a href="http://doc.qt.io/QtOTA/">QtOTA</a> is Qt’s over-the-air update framework
|
||||
which uses libostree.</p>
|
||||
|
||||
<p>The <a href="https://gitlab.com/BuildStream/buildstream">BuildStream</a> build and
|
||||
integration tool supports importing and exporting from libostree repos.</p>
|
||||
|
||||
<p><a href="https://github.com/fedora-iot/otto">fedora-iot/otto</a> is a tool that helps
|
||||
ship ostree commits inside Docker/OCI containers and run a webserver
|
||||
to serve the commits.</p>
|
||||
|
||||
<p>Fedora <a href="https://github.com/coreos/coreos-assembler">coreos-assembler</a> is
|
||||
the build tool used to generate Fedora CoreOS derivatives.</p>
|
||||
|
||||
<p><a href="https://github.com/go-debos/debos">debos</a> is a tool-chain for simplifying the
|
||||
process of building a Debian-based OS image.</p>
|
||||
|
||||
<p><a href="https://github.com/gardenlinux/ostree-image-builder">gardenlinux/ostree-image-builder</a>
|
||||
is a sample for building Debian-based OS images.
|
||||
It is not production ready but it might be useful to get started.</p>
|
||||
<h2 id="projects-linking-to-libostree">
|
||||
|
||||
|
||||
<a href="#projects-linking-to-libostree" class="anchor-heading" aria-labelledby="projects-linking-to-libostree"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Projects linking to libostree
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p><a href="https://github.com/projectatomic/rpm-ostree">rpm-ostree</a> is used by the
|
||||
Fedora-derived operating systems listed above. It is a full hybrid
|
||||
image/package system. By default it uses libostree to atomically replicate a base OS
|
||||
(all dependency resolution is done on the server), but it supports “package layering”, where
|
||||
additional RPMs can be layered on top of the base. This brings a “best of both worlds””
|
||||
model for image and package systems.</p>
|
||||
|
||||
<p><a href="https://github.com/endlessm/eos-updater">eos-updater</a> is a daemon that implements updates
|
||||
on EndlessOS.</p>
|
||||
|
||||
<p><a href="https://github.com/flatpak/flatpak">Flatpak</a> uses libostree for desktop
|
||||
application containers. Unlike most of the other systems here, Flatpak does not
|
||||
use the “libostree host system” aspects (e.g. bootloader management), just the
|
||||
“git-like hardlink dedup”. For example, Flatpak supports a per-user OSTree
|
||||
repository.</p>
|
||||
|
||||
<p><a href="https://github.com/uptane/aktualizr/">aktualizr</a> is an
|
||||
<a href="https://uptane.github.io/">Uptane</a>-conformant software update client library
|
||||
intended for use in automotive and other security-sensitive embedded devices.
|
||||
It uses OSTree to manage the OS of the host device by default.</p>
|
||||
<h2 id="language-bindings">
|
||||
|
||||
|
||||
<a href="#language-bindings" class="anchor-heading" aria-labelledby="language-bindings"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Language bindings
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>libostree is accessible via <a href="https://gi.readthedocs.io/en/latest/">GObject Introspection</a>;
|
||||
any language which has implemented the GI binding model should work.
|
||||
For example, Both <a href="https://pygobject.readthedocs.io/en/latest/">pygobject</a>
|
||||
and <a href="https://gitlab.gnome.org/GNOME/gjs">gjs</a> are known to work
|
||||
and further are actually used in libostree’s test suite today.</p>
|
||||
|
||||
<p>Some bindings take the approach of using GI as a lower level and
|
||||
write higher level manual bindings on top; this is more common
|
||||
for statically compiled languages. Here’s a list of such bindings:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="https://github.com/ostreedev/ostree-go/">ostree-go</a></li>
|
||||
<li><a href="./rust-bindings">ostree-rs</a></li>
|
||||
</ul>
|
||||
<h2 id="building">
|
||||
|
||||
|
||||
<a href="#building" class="anchor-heading" aria-labelledby="building"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Building
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>Releases are available as GPG signed git tags, and most recent
|
||||
versions support extended validation using
|
||||
<a href="https://github.com/cgwalters/git-evtag">git-evtag</a>.</p>
|
||||
|
||||
<p>However, in order to build from a git clone, you must update the
|
||||
submodules. If you’re packaging OSTree and want a tarball, I
|
||||
recommend using a “recursive git archive” script. There are several
|
||||
available online;
|
||||
<a href="https://github.com/ostreedev/ostree/blob/main/ci/Makefile.dist-packaging#L18">this code</a>
|
||||
in OSTree is an example.</p>
|
||||
|
||||
<p>Once you have a git clone or recursive archive, building is the
|
||||
same as almost every autotools project:</p>
|
||||
|
||||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>git submodule update --init
|
||||
env NOCONFIGURE=1 ./autogen.sh
|
||||
./configure --prefix=...
|
||||
make
|
||||
make install DESTDIR=/path/to/dest
|
||||
</code></pre></div></div>
|
||||
<h2 id="api-reference">
|
||||
|
||||
|
||||
<a href="#api-reference" class="anchor-heading" aria-labelledby="api-reference"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> API Reference
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>The libostree API documentation is available in <a href="reference/">Reference</a>.</p>
|
||||
<h2 id="manual-pages">
|
||||
|
||||
|
||||
<a href="#manual-pages" class="anchor-heading" aria-labelledby="manual-pages"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Manual Pages
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>The ostree manual pages are available in <a href="man/">Manual</a>.</p>
|
||||
<h2 id="contact-and-discussion-forums">
|
||||
|
||||
|
||||
<a href="#contact-and-discussion-forums" class="anchor-heading" aria-labelledby="contact-and-discussion-forums"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Contact and discussion forums
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>There is also an <code class="language-plaintext highlighter-rouge">#ostree</code> channel on <a href="ircs://irc.libera.chat/ostree">Libera.Chat</a> as
|
||||
well as <a href="https://github.com/ostreedev/ostree/discussions/">enabled Github discussions</a>.</p>
|
||||
<h2 id="contributing">
|
||||
|
||||
|
||||
<a href="#contributing" class="anchor-heading" aria-labelledby="contributing"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Contributing
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>See <a href="/ostree/CONTRIBUTING/">Contributing</a>.</p>
|
||||
<h2 id="licensing">
|
||||
|
||||
|
||||
<a href="#licensing" class="anchor-heading" aria-labelledby="licensing"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Licensing
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>The licensing for the <em>code</em> of libostree can be canonically found in the individual files;
|
||||
and the overall status in the <a href="https://github.com/ostreedev/ostree/blob/main/COPYING">COPYING</a>
|
||||
file in the source. Currently, that’s LGPLv2+. This also covers the man pages and API docs.</p>
|
||||
|
||||
<p>The license for the manual documentation in the <code class="language-plaintext highlighter-rouge">doc/</code> directory is:
|
||||
<code class="language-plaintext highlighter-rouge">SPDX-License-Identifier: (CC-BY-SA-3.0 OR GFDL-1.3-or-later)</code>
|
||||
This is intended to allow use by Wikipedia and other projects.</p>
|
||||
|
||||
<p>In general, files should have a <code class="language-plaintext highlighter-rouge">SPDX-License-Identifier</code> and that is canonical.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<hr>
|
||||
<footer>
|
||||
|
||||
|
||||
<p class="text-small text-grey-dk-100 mb-0">Copyright © <a href="https://www.redhat.com">Red Hat, Inc.</a> and <a href="https://github.com/ostreedev">others</a>.</p>
|
||||
|
||||
|
||||
<div class="d-flex mt-2">
|
||||
|
||||
|
||||
<p class="text-small text-grey-dk-000 mb-0">
|
||||
<a href="https://github.com/ostreedev/ostree/tree/main/docs/index.md" id="edit-this-page">Edit this page on GitHub</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="search-overlay"></div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
441
introduction/index.html
Normal file
@ -0,0 +1,441 @@
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
||||
|
||||
<link rel="stylesheet" href="/ostree/assets/css/just-the-docs-default.css">
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="/ostree/assets/js/vendor/lunr.min.js"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="/ostree/assets/js/just-the-docs.js"></script>
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Begin Jekyll SEO tag v2.8.0 -->
|
||||
<title>OSTree Overview | ostreedev/ostree</title>
|
||||
<meta name="generator" content="Jekyll v3.9.5" />
|
||||
<meta property="og:title" content="OSTree Overview" />
|
||||
<meta property="og:locale" content="en_US" />
|
||||
<meta name="description" content="ostree documentation" />
|
||||
<meta property="og:description" content="ostree documentation" />
|
||||
<link rel="canonical" href="https://ostreedev.github.io/ostree/introduction/" />
|
||||
<meta property="og:url" content="https://ostreedev.github.io/ostree/introduction/" />
|
||||
<meta property="og:site_name" content="ostreedev/ostree" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
<meta property="twitter:title" content="OSTree Overview" />
|
||||
<script type="application/ld+json">
|
||||
{"@context":"https://schema.org","@type":"WebPage","description":"ostree documentation","headline":"OSTree Overview","url":"https://ostreedev.github.io/ostree/introduction/"}</script>
|
||||
<!-- End Jekyll SEO tag -->
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<a class="skip-to-main" href="#main-content">Skip to main content</a>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="d-none">
|
||||
<symbol id="svg-link" viewBox="0 0 24 24">
|
||||
<title>Link</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link">
|
||||
<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<symbol id="svg-menu" viewBox="0 0 24 24">
|
||||
<title>Menu</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-menu">
|
||||
<line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
|
||||
<title>Expand</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right">
|
||||
<polyline points="9 18 15 12 9 6"></polyline>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<!-- Feather. MIT License: https://github.com/feathericons/feather/blob/master/LICENSE -->
|
||||
<symbol id="svg-external-link" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-external-link">
|
||||
<title id="svg-external-link-title">(external link)</title>
|
||||
<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line>
|
||||
</symbol>
|
||||
|
||||
|
||||
<symbol id="svg-doc" viewBox="0 0 24 24">
|
||||
<title>Document</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-file">
|
||||
<path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"></path><polyline points="13 2 13 9 20 9"></polyline>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
<symbol id="svg-search" viewBox="0 0 24 24">
|
||||
<title>Search</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search">
|
||||
<circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
|
||||
|
||||
<!-- Bootstrap Icons. MIT License: https://github.com/twbs/icons/blob/main/LICENSE.md -->
|
||||
<symbol id="svg-copy" viewBox="0 0 16 16">
|
||||
<title>Copy</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-clipboard" viewBox="0 0 16 16">
|
||||
<path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z"/>
|
||||
<path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-copied" viewBox="0 0 16 16">
|
||||
<title>Copied</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-clipboard-check-fill" viewBox="0 0 16 16">
|
||||
<path d="M6.5 0A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3Zm3 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3Z"/>
|
||||
<path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1A2.5 2.5 0 0 1 9.5 5h-3A2.5 2.5 0 0 1 4 2.5v-1Zm6.854 7.354-3 3a.5.5 0 0 1-.708 0l-1.5-1.5a.5.5 0 0 1 .708-.708L7.5 10.793l2.646-2.647a.5.5 0 0 1 .708.708Z"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
|
||||
|
||||
</svg>
|
||||
|
||||
<div class="side-bar">
|
||||
<div class="site-header">
|
||||
<a href="/ostree/" class="site-title lh-tight">
|
||||
ostreedev/ostree
|
||||
|
||||
</a>
|
||||
<a href="#" id="menu-button" class="site-button">
|
||||
<svg viewBox="0 0 24 24" class="icon"><use xlink:href="#svg-menu"></use></svg>
|
||||
</a>
|
||||
</div>
|
||||
<nav aria-label="Main" id="site-nav" class="site-nav">
|
||||
|
||||
|
||||
<ul class="nav-list"><li class="nav-list-item"><a href="/ostree/" class="nav-list-link">libostree</a></li><li class="nav-list-item active"><a href="/ostree/introduction/" class="nav-list-link active">OSTree Overview</a></li><li class="nav-list-item"><a href="/ostree/repo/" class="nav-list-link">Anatomy of an OSTree repository</a></li><li class="nav-list-item"><a href="/ostree/deployment/" class="nav-list-link">Deployments</a></li><li class="nav-list-item"><a href="/ostree/atomic-upgrades/" class="nav-list-link">Atomic Upgrades</a></li><li class="nav-list-item"><a href="/ostree/atomic-rollbacks/" class="nav-list-link">Atomic Rollbacks</a></li><li class="nav-list-item"><a href="/ostree/adapting-existing/" class="nav-list-link">Adapting existing mainstream distributions</a></li><li class="nav-list-item"><a href="/ostree/var/" class="nav-list-link">OSTree and /var handling</a></li><li class="nav-list-item"><a href="/ostree/formats/" class="nav-list-link">OSTree data formats</a></li><li class="nav-list-item"><a href="/ostree/buildsystem-and-repos/" class="nav-list-link">Writing a buildsystem and managing repositories</a></li><li class="nav-list-item"><a href="/ostree/authenticated-repos/" class="nav-list-link">Handling access to authenticated remote repositories</a></li><li class="nav-list-item"><a href="/ostree/repository-management/" class="nav-list-link">Managing content in OSTree repositories</a></li><li class="nav-list-item"><a href="/ostree/copying-deltas/" class="nav-list-link">Static deltas for offline updates</a></li><li class="nav-list-item"><a href="/ostree/ima/" class="nav-list-link">Using Linux IMA with OSTree</a></li><li class="nav-list-item"><a href="/ostree/related-projects/" class="nav-list-link">Related Projects</a></li><li class="nav-list-item"><a href="/ostree/composefs/" class="nav-list-link">Using composefs with OSTree</a></li><li class="nav-list-item"><a href="/ostree/bootloaders/" class="nav-list-link">Bootloaders</a></li><li class="nav-list-item"><a href="/ostree/CONTRIBUTING/" class="nav-list-link">Contributing</a></li><li class="nav-list-item"><a href="/ostree/contributing-tutorial/" class="nav-list-link">OSTree Contributing Tutorial</a></li><li class="nav-list-item"><a href="/ostree/README-historical/" class="nav-list-link">Historical OSTree README</a></li></ul>
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
|
||||
<footer class="site-footer">
|
||||
This site uses <a href="https://github.com/just-the-docs/just-the-docs">Just the Docs</a>, a documentation theme for Jekyll.
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="main" id="top">
|
||||
<div id="main-header" class="main-header">
|
||||
|
||||
|
||||
|
||||
<div class="search">
|
||||
<div class="search-input-wrap">
|
||||
<input type="text" id="search-input" class="search-input" tabindex="0" placeholder="Search ostreedev/ostree" aria-label="Search ostreedev/ostree" autocomplete="off">
|
||||
<label for="search-input" class="search-label"><svg viewBox="0 0 24 24" class="search-icon"><use xlink:href="#svg-search"></use></svg></label>
|
||||
</div>
|
||||
<div id="search-results" class="search-results"></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<nav aria-label="Auxiliary" class="aux-nav">
|
||||
<ul class="aux-nav-list">
|
||||
|
||||
<li class="aux-nav-list-item">
|
||||
<a href="https://github.com/ostreedev/ostree" class="site-button"
|
||||
|
||||
>
|
||||
OSTree on GitHub
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="main-content-wrap" class="main-content-wrap">
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="main-content" class="main-content" role="main">
|
||||
|
||||
<h1 class="no_toc" id="ostree-overview">
|
||||
|
||||
|
||||
<a href="#ostree-overview" class="anchor-heading" aria-labelledby="ostree-overview"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> OSTree Overview
|
||||
|
||||
|
||||
</h1>
|
||||
|
||||
|
||||
<ol id="markdown-toc">
|
||||
<li><a href="#introduction" id="markdown-toc-introduction">Introduction</a></li>
|
||||
<li><a href="#hello-world-example" id="markdown-toc-hello-world-example">Hello World example</a></li>
|
||||
<li><a href="#comparison-with-package-managers" id="markdown-toc-comparison-with-package-managers">Comparison with “package managers”</a></li>
|
||||
<li><a href="#comparison-with-blockimage-replication" id="markdown-toc-comparison-with-blockimage-replication">Comparison with block/image replication</a></li>
|
||||
<li><a href="#atomic-transitions-between-parallel-installable-read-only-filesystem-trees" id="markdown-toc-atomic-transitions-between-parallel-installable-read-only-filesystem-trees">Atomic transitions between parallel-installable read-only filesystem trees</a></li>
|
||||
</ol>
|
||||
|
||||
<!-- SPDX-License-Identifier: (CC-BY-SA-3.0 OR GFDL-1.3-or-later) -->
|
||||
<h2 id="introduction">
|
||||
|
||||
|
||||
<a href="#introduction" class="anchor-heading" aria-labelledby="introduction"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Introduction
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>OSTree is an upgrade system for Linux-based operating systems that
|
||||
performs atomic upgrades of complete filesystem trees. It is
|
||||
not a package system; rather, it is intended to complement them.
|
||||
A primary model is composing packages on a server, and then
|
||||
replicating them to clients.</p>
|
||||
|
||||
<p>The underlying architecture might be summarized as “git for
|
||||
operating system binaries”. It operates in userspace, and will
|
||||
work on top of any Linux filesystem. At its core is a git-like
|
||||
content-addressed object store with branches (or “refs”) to track
|
||||
meaningful filesystem trees within the store. Similarly, one can
|
||||
check out or commit to these branches.</p>
|
||||
|
||||
<p>Layered on top of that is bootloader configuration, management of
|
||||
<code class="language-plaintext highlighter-rouge">/etc</code>, and other functions to perform an upgrade beyond just
|
||||
replicating files.</p>
|
||||
|
||||
<p>You can use OSTree standalone in the pure replication model,
|
||||
but another approach is to add a package manager on top,
|
||||
thus creating a hybrid tree/package system.</p>
|
||||
<h2 id="hello-world-example">
|
||||
|
||||
|
||||
<a href="#hello-world-example" class="anchor-heading" aria-labelledby="hello-world-example"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Hello World example
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>OSTree is mostly used as a library, but a quick tour of using its
|
||||
CLI tools can give a general idea of how it works at its most
|
||||
basic level.</p>
|
||||
|
||||
<p>You can create a new OSTree repository using <code class="language-plaintext highlighter-rouge">init</code>:</p>
|
||||
|
||||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ ostree --repo=repo init
|
||||
</code></pre></div></div>
|
||||
|
||||
<p>This will create a new <code class="language-plaintext highlighter-rouge">repo</code> directory containing your
|
||||
repository. Feel free to inspect it.</p>
|
||||
|
||||
<p>Now, let’s prepare some data to add to the repo:</p>
|
||||
|
||||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ mkdir tree
|
||||
$ echo "Hello world!" > tree/hello.txt
|
||||
</code></pre></div></div>
|
||||
|
||||
<p>We can now import our <code class="language-plaintext highlighter-rouge">tree/</code> directory using the <code class="language-plaintext highlighter-rouge">commit</code>
|
||||
command:</p>
|
||||
|
||||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ ostree --repo=repo commit --branch=foo tree/
|
||||
</code></pre></div></div>
|
||||
|
||||
<p>This will create a new branch <code class="language-plaintext highlighter-rouge">foo</code> pointing to the full tree
|
||||
imported from <code class="language-plaintext highlighter-rouge">tree/</code>. In fact, we could now delete <code class="language-plaintext highlighter-rouge">tree/</code> if we
|
||||
wanted to.</p>
|
||||
|
||||
<p>To check that we indeed now have a <code class="language-plaintext highlighter-rouge">foo</code> branch, you can use the
|
||||
<code class="language-plaintext highlighter-rouge">refs</code> command:</p>
|
||||
|
||||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ ostree --repo=repo refs
|
||||
foo
|
||||
</code></pre></div></div>
|
||||
|
||||
<p>We can also inspect the filesystem tree using the <code class="language-plaintext highlighter-rouge">ls</code> and <code class="language-plaintext highlighter-rouge">cat</code>
|
||||
commands:</p>
|
||||
|
||||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ ostree --repo=repo ls foo
|
||||
d00775 1000 1000 0 /
|
||||
-00664 1000 1000 13 /hello.txt
|
||||
$ ostree --repo=repo cat foo /hello.txt
|
||||
Hello world!
|
||||
</code></pre></div></div>
|
||||
|
||||
<p>And finally, we can check out our tree from the repository:</p>
|
||||
|
||||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ ostree --repo=repo checkout foo tree-checkout/
|
||||
$ cat tree-checkout/hello.txt
|
||||
Hello world!
|
||||
</code></pre></div></div>
|
||||
<h2 id="comparison-with-package-managers">
|
||||
|
||||
|
||||
<a href="#comparison-with-package-managers" class="anchor-heading" aria-labelledby="comparison-with-package-managers"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Comparison with “package managers”
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>Because OSTree is designed for deploying core operating
|
||||
systems, a comparison with traditional “package managers” such
|
||||
as dpkg and rpm is illustrative. Packages are traditionally
|
||||
composed of partial filesystem trees with metadata and scripts
|
||||
attached, and these are dynamically assembled on the client
|
||||
machine, after a process of dependency resolution.</p>
|
||||
|
||||
<p>In contrast, OSTree only supports recording and deploying
|
||||
<em>complete</em> (bootable) filesystem trees. It
|
||||
has no built-in knowledge of how a given filesystem tree was
|
||||
generated or the origin of individual files, or dependencies,
|
||||
descriptions of individual components. Put another way, OSTree
|
||||
only handles delivery and deployment; you will likely still want
|
||||
to include inside each tree metadata about the individual
|
||||
components that went into the tree. For example, a system
|
||||
administrator may want to know what version of OpenSSL was
|
||||
included in your tree, so you should support the equivalent of
|
||||
<code class="language-plaintext highlighter-rouge">rpm -q</code> or <code class="language-plaintext highlighter-rouge">dpkg -L</code>.</p>
|
||||
|
||||
<p>The OSTree core emphasizes replicating read-only OS trees via
|
||||
HTTP, and where the OS includes (if desired) an entirely
|
||||
separate mechanism to install applications, stored in <code class="language-plaintext highlighter-rouge">/var</code> if they’re system global, or
|
||||
<code class="language-plaintext highlighter-rouge">/home</code> for per-user
|
||||
application installation. An example application mechanism is
|
||||
<a href="http://docker.io/">http://docker.io/</a></p>
|
||||
|
||||
<p>However, it is entirely possible to use OSTree underneath a
|
||||
package system, where the contents of <code class="language-plaintext highlighter-rouge">/usr</code> are computed on the client.
|
||||
For example, when installing a package, rather than changing the
|
||||
currently running filesystem, the package manager could assemble
|
||||
a new filesystem tree that layers the new packages on top of a
|
||||
base tree, record it in the local OSTree repository, and then
|
||||
set it up for the next boot. To support this model, OSTree
|
||||
provides an (introspectable) C shared library.</p>
|
||||
<h2 id="comparison-with-blockimage-replication">
|
||||
|
||||
|
||||
<a href="#comparison-with-blockimage-replication" class="anchor-heading" aria-labelledby="comparison-with-blockimage-replication"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Comparison with block/image replication
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>OSTree shares some similarity with “dumb” replication and
|
||||
stateless deployments, such as the model common in “cloud”
|
||||
deployments where nodes are booted from an (effectively)
|
||||
readonly disk, and user data is kept on a different volumes.
|
||||
The advantage of “dumb” replication, shared by both OSTree and
|
||||
the cloud model, is that it’s <em>reliable</em>
|
||||
and <em>predictable</em>.</p>
|
||||
|
||||
<p>But unlike many default image-based deployments, OSTree supports
|
||||
exactly two persistent writable directories that are preserved across
|
||||
upgrades: <code class="language-plaintext highlighter-rouge">/etc</code> and <code class="language-plaintext highlighter-rouge">/var</code>.</p>
|
||||
|
||||
<p>Because OSTree operates at the Unix filesystem layer, it works
|
||||
on top of any filesystem or block storage layout; it’s possible
|
||||
to replicate a given filesystem tree from an OSTree repository
|
||||
into plain ext4, BTRFS, XFS, or in general any Unix-compatible
|
||||
filesystem that supports hard links. Note: OSTree will
|
||||
transparently take advantage of some BTRFS features if deployed
|
||||
on it.</p>
|
||||
|
||||
<p>OSTree is orthogonal to virtualization mechanisms like AMIs and qcow2
|
||||
images, though it’s most useful though if you plan to update stateful
|
||||
VMs in-place, rather than generating new images.</p>
|
||||
|
||||
<p>In practice, users of “bare metal” configurations will find the OSTree
|
||||
model most useful.</p>
|
||||
<h2 id="atomic-transitions-between-parallel-installable-read-only-filesystem-trees">
|
||||
|
||||
|
||||
<a href="#atomic-transitions-between-parallel-installable-read-only-filesystem-trees" class="anchor-heading" aria-labelledby="atomic-transitions-between-parallel-installable-read-only-filesystem-trees"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Atomic transitions between parallel-installable read-only filesystem trees
|
||||
|
||||
|
||||
</h2>
|
||||
|
||||
|
||||
<p>Another deeply fundamental difference between both package
|
||||
managers and image-based replication is that OSTree is
|
||||
designed to parallel-install <em>multiple versions</em> of multiple
|
||||
<em>independent</em> operating systems. OSTree
|
||||
relies on a new toplevel <code class="language-plaintext highlighter-rouge">ostree</code> directory; it can in fact
|
||||
parallel install inside an existing OS or distribution
|
||||
occupying the physical <code class="language-plaintext highlighter-rouge">/</code> root.</p>
|
||||
|
||||
<p>On each client machine, there is an OSTree repository stored
|
||||
in <code class="language-plaintext highlighter-rouge">/ostree/repo</code>, and a set of “deployments” stored in <code class="language-plaintext highlighter-rouge">/ostree/deploy/$STATEROOT/$CHECKSUM</code>.
|
||||
Each deployment is primarily composed of a set of hardlinks
|
||||
into the repository. This means each version is deduplicated;
|
||||
an upgrade process only costs disk space proportional to the
|
||||
new files, plus some constant overhead.</p>
|
||||
|
||||
<p>The model OSTree emphasizes is that the OS read-only content
|
||||
is kept in the classic Unix <code class="language-plaintext highlighter-rouge">/usr</code>; it comes with code to
|
||||
create a Linux read-only bind mount to prevent inadvertent
|
||||
corruption. There is exactly one <code class="language-plaintext highlighter-rouge">/var</code> writable directory shared
|
||||
between each deployment for a given OS. The OSTree core code
|
||||
does not touch content in this directory; it is up to the code
|
||||
in each operating system for how to manage and upgrade state.</p>
|
||||
|
||||
<p>Finally, each deployment has its own writable copy of the
|
||||
configuration store <code class="language-plaintext highlighter-rouge">/etc</code>. On upgrade, OSTree will
|
||||
perform a basic 3-way diff, and apply any local changes to the
|
||||
new copy, while leaving the old untouched.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<hr>
|
||||
<footer>
|
||||
|
||||
|
||||
<p class="text-small text-grey-dk-100 mb-0">Copyright © <a href="https://www.redhat.com">Red Hat, Inc.</a> and <a href="https://github.com/ostreedev">others</a>.</p>
|
||||
|
||||
|
||||
<div class="d-flex mt-2">
|
||||
|
||||
|
||||
<p class="text-small text-grey-dk-000 mb-0">
|
||||
<a href="https://github.com/ostreedev/ostree/tree/main/docs/introduction.md" id="edit-this-page">Edit this page on GitHub</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="search-overlay"></div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
1
man/index.html
Normal file
3
man/ostree-admin-cleanup.html
Normal file
@ -0,0 +1,3 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ostree admin cleanup</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="ostree"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ostree-admin-cleanup — Delete untagged deployments and repository objects</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">ostree admin cleanup </code> </p></div></div><div class="refsect1"><a name="id1337"></a><h2>Description</h2><p>
|
||||
OSTree sysroot cleans up other bootversions and old deployments. If/when a pull or deployment is interrupted, a partially written state may remain on disk. This command cleans up any such partial states.
|
||||
</p></div><div class="refsect1"><a name="id1338"></a><h2>Example</h2><p><span class="command"><strong>$ ostree admin cleanup</strong></span></p></div></div></body></html>
|
8
man/ostree-admin-config-diff.html
Normal file
@ -0,0 +1,8 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ostree admin config-diff</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="ostree"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ostree-admin-config-diff — Diff current /etc configuration versus default</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">ostree admin config-diff</code> [OPTIONS...]</p></div></div><div class="refsect1"><a name="id1337"></a><h2>Description</h2><p>
|
||||
Prints the differences between the current /etc directory and the default configuration in /usr/etc. Newly added files (present in /etc but not in /usr/etc) will be prefixed with 'A'. Modified files will be prefixed with 'M', and deleted files with 'D'.
|
||||
</p></div><div class="refsect1"><a name="id1338"></a><h2>Options</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">--os</code>="STATEROOT"</span></dt><dd><p>
|
||||
Use a different operating system stateroot than the current one.
|
||||
</p></dd></dl></div></div><div class="refsect1"><a name="id1339"></a><h2>Example</h2><p><span class="command"><strong>$ ostree admin config-diff</strong></span></p><pre class="programlisting">
|
||||
M shadow
|
||||
A example.txt
|
||||
</pre></div></div></body></html>
|
42
man/ostree-admin-deploy.html
Normal file
@ -0,0 +1,42 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ostree admin deploy</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="ostree"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ostree-admin-deploy — Checkout a revision as the new default deployment</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">ostree admin deploy</code> [OPTIONS...] {REFSPEC}</p></div></div><div class="refsect1"><a name="id1337"></a><h2>Description</h2><p>
|
||||
Takes a commit or revision REFSPEC, and queues the new deployment as default upon reboot.
|
||||
</p></div><div class="refsect1"><a name="id1338"></a><h2>Options</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">--stateroot</code>="STATEROOT"</span></dt><dd><p>
|
||||
Use a different operating system stateroot than the current one.
|
||||
</p></dd><dt><span class="term"><code class="option">--os</code>="STATEROOT"</span></dt><dd><p>
|
||||
Alias for <code class="literal">--stateroot</code>.
|
||||
</p></dd><dt><span class="term"><code class="option">--origin-file</code>="FILENAME"</span></dt><dd><p>
|
||||
Use FILENAME as the origin, which is where OSTree will look for updated versions of the tree.
|
||||
</p></dd><dt><span class="term"><code class="option">--retain</code></span></dt><dd><p>
|
||||
Do not delete previous deployment.
|
||||
</p></dd><dt><span class="term"><code class="option">--retain-pending</code></span></dt><dd><p>
|
||||
Do not delete pending deployments.
|
||||
</p></dd><dt><span class="term"><code class="option">--retain-rollback</code></span></dt><dd><p>
|
||||
Do not delete rollback deployments.
|
||||
</p></dd><dt><span class="term"><code class="option">--not-as-default</code></span></dt><dd><p>
|
||||
Append rather than prepend new deployment.
|
||||
</p></dd><dt><span class="term"><code class="option">--lock-finalization</code></span></dt><dd><p>
|
||||
The deployment will not be "finalized" by default on shutdown; to later
|
||||
queue it, use <code class="literal">ostree admin lock-finalization --unlock</code>.
|
||||
</p></dd><dt><span class="term"><code class="option">--karg-proc-cmdline</code></span></dt><dd><p>
|
||||
Import current /proc/cmdline.
|
||||
</p></dd><dt><span class="term"><code class="option">--karg</code>="NAME=VALUE"</span></dt><dd><p>
|
||||
Set kernel argument, like root=/dev/sda1; this overrides any earlier argument with the same name.
|
||||
</p></dd><dt><span class="term"><code class="option">--karg-append</code>="NAME=VALUE"</span></dt><dd><p>
|
||||
Append kernel argument; useful with e.g. console= that can be used multiple times.
|
||||
</p></dd><dt><span class="term"><code class="option">--karg-delete</code>="NAME=VALUE"</span></dt><dd><p>
|
||||
Delete kernel argument if exists, can be used multiple times.
|
||||
</p></dd></dl></div></div><div class="refsect1"><a name="id1339"></a><h2>Example</h2><p><span class="command"><strong>$ ostree admin status</strong></span></p><pre class="programlisting">
|
||||
* gnome-ostree 67e382b11d213a402a5313e61cbc69dfd5ab93cb07.0
|
||||
origin refspec: gnome-ostree/buildmain/x86_64-runtime
|
||||
gnome-ostree ce19c41036cc45e49b0cecf6b157523c2105c4de1ce3.0
|
||||
origin refspec: gnome-ostree/buildmain/x86_64-runtime
|
||||
</pre><p><span class="command"><strong>$ ostree admin deploy gnome-ostree/buildmain/x86_64-runtime</strong></span></p><pre class="programlisting">
|
||||
ostadmin: Creating deployment /ostree/deploy/gnome-ostree/deploy/7e382b11d213a402a5313e61cbc69dfd5ab93cb07.1
|
||||
ostadmin: Processing /etc: 3 modified, 0 removed, 29 added
|
||||
Transaction complete: bootconfig swap: no deployment count change: 0)
|
||||
</pre><p><span class="command"><strong>$ ostree admin status</strong></span></p><pre class="programlisting">
|
||||
gnome-ostree 67e382b11d213a402a5313e61cbc69dfd5ab93cb07.1
|
||||
origin refspec: gnome-ostree/buildmain/x86_64-runtime
|
||||
* gnome-ostree 67e382b11d213a402a5313e61cbc69dfd5ab93cb07.0
|
||||
origin refspec: gnome-ostree/buildmain/x86_64-runtime
|
||||
</pre></div></div></body></html>
|
24
man/ostree-admin-init-fs.html
Normal file
@ -0,0 +1,24 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ostree admin init-fs</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="ostree"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ostree-admin-init-fs — Initialize a new root filesystem</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">ostree admin init-fs</code> [OPTIONS...] {PATH}</p></div></div><div class="refsect1"><a name="id1337"></a><h2>Description</h2><p>
|
||||
Initialize an empty physical root filesystem in the designated PATH, with normal toplevels and correct permissions for each directory.
|
||||
Primarily useful for operating system installers.
|
||||
</p></div><div class="refsect1"><a name="id1338"></a><h2>Options</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">--modern</code></span></dt><dd><p>
|
||||
Equivalent to <code class="literal">--epoch=1</code>.
|
||||
</p></dd><dt><span class="term"><code class="option">--epoch</code></span></dt><dd><p>
|
||||
This accepts an integer value in the range [0-1], inclusive. The default is zero
|
||||
for compatibility.
|
||||
</p><p>
|
||||
When set to 1, the command will skip adding a number of toplevel "API filesystems"
|
||||
such as <code class="literal">/proc</code>
|
||||
to the toplevel of the physical root. These should be unnecessary, as they
|
||||
should only be mounted in the final deployment root. The main exception
|
||||
is <code class="literal">/boot</code>, which may need to be mounted in some setups
|
||||
before the target root.
|
||||
</p><p>
|
||||
Epoch 2 is the same as 1, except that the toplevel <code class="literal">ostree</code>
|
||||
directory is mode 0700, denying access from unprivileged code. This
|
||||
is a new recommended best practice as it avoids access to old configuration
|
||||
files in <code class="literal">/etc</code> in previous deployments, as well as
|
||||
potentially old setuid binaries in <code class="literal">/ostree/repo</code>.
|
||||
</p></dd></dl></div></div><div class="refsect1"><a name="id1339"></a><h2>Example</h2><p><span class="command"><strong>$ mkdir /example</strong></span></p><p><span class="command"><strong>$ ostree admin init-fs --epoch=1 /example</strong></span></p><p><span class="command"><strong>$ ls /example </strong></span></p><p>
|
||||
<span class="emphasis"><em>boot</em></span>
|
||||
</p></div></div></body></html>
|
10
man/ostree-admin-instutil.html
Normal file
@ -0,0 +1,10 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ostree admin instutil</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="ostree"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ostree-admin-instutil — Utility functions intended primarily for operating system installation programs</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">ostree admin instutil</code> {SUBCOMMAND} [ARGS]</p></div></div><div class="refsect1"><a name="id1337"></a><h2>Description</h2><p>
|
||||
Use the subcommands to toggle admin installation utilities for selinux policies and kernel arguments.
|
||||
</p></div><div class="refsect1"><a name="id1338"></a><h2>Subcommands</h2><div class="variablelist"><div class="cmdsynopsis"><p><code class="command">selinux-ensure-labeled</code> [SUBPATH PREFIX]</p></div><dl class="variablelist"><dt></dt><dd><p>
|
||||
Ensure all files and directories are labeled according to SELinux policy of the first deployment.
|
||||
</p></dd></dl></div><div class="variablelist"><div class="cmdsynopsis"><p><code class="command">set-kargs</code> [--merge] [--import-proc-cmdline] [--append="NAME=VALUE"] [--replace="NAME=VALUE"] [MORE_APPEND_ARGS]</p></div><dl class="variablelist"><dt></dt><dd><p>
|
||||
Replace the kernel arguments of the default deployment. The new arguments are based
|
||||
on an empty list (the default), the current options (--merge), or the arguments
|
||||
of the loaded kernel (--import-proc-cmdline), and new options either are added to the
|
||||
end (--append="NAME=VALUE") or replace existing arguments of the same name (--replace="NAME=VALUE").
|
||||
</p></dd></dl></div></div></div></body></html>
|
14
man/ostree-admin-lock-finalization.html
Normal file
@ -0,0 +1,14 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ostree admin lock-finalization</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="ostree"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ostree-admin-lock-finalization — Change whether staged deployment will be queued for next boot</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">ostree admin lock-finalization</code> [OPTIONS...]</p></div></div><div class="refsect1"><a name="id1337"></a><h2>Description</h2><p>
|
||||
This command requires a staged deployment. By default, this command ensures the deployment
|
||||
will be set into a "finalization locked" state, which means it will not be queued for the next boot by default.
|
||||
</p><p>
|
||||
This is the same as the <code class="literal">--lock-finalization</code> argument for <code class="literal">ostree admin deploy</code>,
|
||||
which is the recommended way to use this feature in a race-free way.
|
||||
</p><p>
|
||||
However more commonly, one will use the <code class="literal">--unlock</code> argument for this command to later unlock
|
||||
a deployment which was finalization locked.
|
||||
</p></div><div class="refsect1"><a name="id1338"></a><h2>Options</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">--sysroot</code>="PATH"</span></dt><dd><p>
|
||||
Path to the system to use rather than the current one.
|
||||
</p></dd><dt><span class="term"><code class="option">--unlock</code>,<code class="option">-u</code></span></dt><dd><p>
|
||||
Unlock the deployment finalization state.
|
||||
</p></dd></dl></div></div></div></body></html>
|
3
man/ostree-admin-os-init.html
Normal file
@ -0,0 +1,3 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ostree admin os-init</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="ostree"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ostree-admin-os-init — Soft-deprecated alias for stateroot-init</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">ostree admin os-init</code> {STATEROOT}</p></div></div><div class="refsect1"><a name="id1337"></a><h2>Description</h2><p>
|
||||
This is a soft-deprecated alias for stateroot-init. Please see the documentation for that.
|
||||
</p></div></div></body></html>
|
9
man/ostree-admin-pin.html
Normal file
@ -0,0 +1,9 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ostree admin pin</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="ostree"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ostree-admin-pin — Explicitly retain deployment at a given index</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">ostree admin pin</code> {INDEX}</p></div></div><div class="refsect1"><a name="id1337"></a><h2>Description</h2><p>
|
||||
Ensures the deployment at <code class="literal">INDEX</code>, will not be garbage
|
||||
collected by default. This is termed "pinning". If the
|
||||
<code class="literal">-u</code> option is provided, undoes a pinning operation.
|
||||
<code class="literal">INDEX</code> can be >= 0 or one of booted, pending or
|
||||
rollback strings.
|
||||
</p></div><div class="refsect1"><a name="id1338"></a><h2>Options</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">--unpin</code>,<code class="option">-u</code></span></dt><dd><p>
|
||||
Undoes a pinning operation.
|
||||
</p></dd></dl></div></div></div></body></html>
|
7
man/ostree-admin-post-copy.html
Normal file
@ -0,0 +1,7 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ostree admin post-copy</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="ostree"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ostree-admin-post-copy — Fix up sysroot after a (file based) copy</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">ostree admin post-copy</code> [OPTIONS...]</p></div></div><div class="refsect1"><a name="id1337"></a><h2>Description</h2><p>
|
||||
Applies any fixes to a sysroot that are needed after having copyed it file by file.
|
||||
This includes enabling fs-verity to any files that lack it, which can happen if
|
||||
you copy a file.
|
||||
</p></div><div class="refsect1"><a name="id1338"></a><h2>Options</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">--sysroot</code>="PATH"</span></dt><dd><p>
|
||||
Path to the system to use rather than the current one.
|
||||
</p></dd></dl></div></div></div></body></html>
|
16
man/ostree-admin-set-default.html
Normal file
@ -0,0 +1,16 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ostree admin set-default</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="ostree"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ostree-admin-set-default — Make deployment at a given index the default for the next boot</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">ostree admin set-default</code> {INDEX}</p></div></div><div class="refsect1"><a name="id1337"></a><h2>Description</h2><p>
|
||||
Make the deployment at INDEX the default for the next boot.
|
||||
</p></div><div class="refsect1"><a name="id1338"></a><h2>Example</h2><p><span class="command"><strong>$ ostree admin status</strong></span></p><pre class="programlisting">
|
||||
* exampleos 67e382b11d213a402a5313e61cbc69dfd5ab93cb07.0
|
||||
origin refspec: exampleos/buildmain/x86_64-runtime
|
||||
exampleos ce19c41036cc45e49b0cecf6b157523c2105c4de1c.0
|
||||
origin refspec: exampleos/buildmain/x86_64-runtime
|
||||
</pre><p><span class="command"><strong>$ ostree admin set-default 1</strong></span></p><pre class="programlisting">
|
||||
Transaction complete; bootconfig swap: deployment count change: 0
|
||||
</pre><p><span class="command"><strong>$ ostree admin status</strong></span></p>
|
||||
exampleos ce19c41036cc45e49b0cecf6b157523c2105c4de1c.0
|
||||
origin refspec: exampleos/buildmain/x86_64-runtime
|
||||
* exampleos 67e382b11d213a402a5313e61cbc69dfd5ab93cb07.0
|
||||
origin refspec: exampleos/buildmain/x86_64-runtime
|
||||
<pre class="programlisting">
|
||||
</pre></div></div></body></html>
|
12
man/ostree-admin-set-origin.html
Normal file
@ -0,0 +1,12 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ostree admin set-origin</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="ostree"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ostree-admin-set-origin — Change the "origin" (location for upgrades)</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">ostree admin set-origin </code> {REMOTENAME} {URL} [BRANCH]</p></div></div><div class="refsect1"><a name="id1337"></a><h2>Description</h2><p>
|
||||
Add a new remote named
|
||||
<em class="replaceable"><code>REMOTENAME</code></em> (if it does not
|
||||
already exist). Then change the origin file for the
|
||||
current deployment. This is the ref that will be
|
||||
"tracked" and upgraded with <span class="command"><strong>ostree admin
|
||||
upgrade</strong></span>.
|
||||
</p></div><div class="refsect1"><a name="id1338"></a><h2>Options</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">--set</code>=KEY=VALUE</span></dt><dd><p>
|
||||
Set an option for the remote.
|
||||
</p></dd><dt><span class="term"><code class="option">--index</code>=INDEX</span></dt><dd><p> Change the origin of the deployment
|
||||
numbered <em class="replaceable"><code>INDEX</code></em> (starting
|
||||
from 0). </p></dd></dl></div></div><div class="refsect1"><a name="id1339"></a><h2>Example</h2><p><span class="command"><strong>$ ostree admin set-origin exampleos http://os.example.com/repo exampleos/10.0/main/router</strong></span></p></div></div></body></html>
|
9
man/ostree-admin-stateroot-init.html
Normal file
@ -0,0 +1,9 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ostree admin stateroot-init</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="ostree"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ostree-admin-stateroot-init — Initialize empty state for a given operating system</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">ostree admin stateroot-init</code> {STATEROOT}</p></div></div><div class="refsect1"><a name="id1337"></a><h2>Description</h2><p>
|
||||
Initializes an new stateroot (AKA "osname") for an operating system.
|
||||
Ensures that the core subdirectories of /var (/tmp, /lib, /run, and
|
||||
/lock) exist and initialize the given STATEROOT as OSTree stateroot.
|
||||
Each deployment location is comprised of a single shared
|
||||
<code class="filename">var</code> and a set of deployments (chroots).
|
||||
</p></div><div class="refsect1"><a name="id1338"></a><h2>Example</h2><p><span class="command"><strong>$ ostree admin stateroot-init exampleos</strong></span></p><pre class="programlisting">
|
||||
ostree/deploy/exampleos initialized as OSTree stateroot
|
||||
</pre></div></div></body></html>
|
25
man/ostree-admin-status.html
Normal file
@ -0,0 +1,25 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ostree admin status</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="ostree"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ostree-admin-status — List deployments</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">ostree admin status</code> </p></div></div><div class="refsect1"><a name="id1337"></a><h2>Description</h2><p>
|
||||
Lists the deployments available to be booted into. Includes osname, the checksum followed by the deploy serial, and the refspec. An asterisk indicates the current booted deployment.
|
||||
</p></div><div class="refsect1"><a name="id1338"></a><h2>Options</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">--sysroot</code>="PATH"</span></dt><dd><p>
|
||||
Create a new OSTree sysroot at PATH
|
||||
</p></dd><dt><span class="term"><code class="option">-V, --verify</code></span></dt><dd><p>
|
||||
Print the commit verification status
|
||||
</p></dd><dt><span class="term"><code class="option">-S, --skip-signatures</code></span></dt><dd><p>
|
||||
Skip signatures in output
|
||||
</p></dd><dt><span class="term"><code class="option">-D, --is-default</code></span></dt><dd><p>
|
||||
Output the string <code class="literal">default</code> if the default deployment
|
||||
is the booted one, <code class="literal">not-default</code> if we are booted in
|
||||
a non-default deployment (e.g. the user interactively chose a
|
||||
different entry in the bootloader menu, or the bootloader rolled back
|
||||
automatically, etc.). If we are not in a booted OSTree system, an
|
||||
error is returned.
|
||||
</p></dd><dt><span class="term"><code class="option">-v, --verbose</code></span></dt><dd><p>
|
||||
Print debug information during command processing
|
||||
</p></dd><dt><span class="term"><code class="option">--version</code></span></dt><dd><p>
|
||||
Print version information and exit
|
||||
</p></dd></dl></div></div><div class="refsect1"><a name="id1339"></a><h2>Example</h2><p><span class="command"><strong>$ ostree admin status</strong></span></p><pre class="programlisting">
|
||||
* gnome-ostree 67e382b11d213a402a5313e61cbc69dfd5ab93cb07.0
|
||||
origin refspec: gnome-ostree/buildmain/x86_64-runtime
|
||||
gnome-ostree ce19c41036cc45e49b0cecf6b157523c2105c4de1c.0
|
||||
origin refspec: gnome-ostree/buildmain/x86_64-runtime
|
||||
</pre></div></div></body></html>
|
5
man/ostree-admin-switch.html
Normal file
@ -0,0 +1,5 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ostree admin switch</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="ostree"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ostree-admin-switch — Construct new tree from current origin and deploy it, if it changed</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">ostree admin switch</code> {REF}</p></div></div><div class="refsect1"><a name="id1337"></a><h2>Description</h2><p>
|
||||
Choose a different REF from the current remote to track. This is the ref that will be "tracked" and upgraded with <span class="command"><strong>ostree admin upgrade</strong></span>. Like an upgrade, the operating system state will be preserved.
|
||||
</p></div><div class="refsect1"><a name="id1338"></a><h2>Options</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">--os</code>="STATEROOT"</span></dt><dd><p>
|
||||
Use a different operating system root than the current one.
|
||||
</p></dd></dl></div></div><div class="refsect1"><a name="id1339"></a><h2>Example</h2><p><span class="command"><strong>$ ostree admin switch fedostree/20/workstation/gnome/core</strong></span></p></div></div></body></html>
|
15
man/ostree-admin-undeploy.html
Normal file
@ -0,0 +1,15 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ostree admin undeploy</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="ostree"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ostree-admin-undeploy — Delete deployment at a given index</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">ostree admin undeploy</code> {INDEX}</p></div></div><div class="refsect1"><a name="id1337"></a><h2>Description</h2><p>
|
||||
Deletes the deployment at INDEX. INDEX must be in range and not reference the currently booted deployment.
|
||||
</p></div><div class="refsect1"><a name="id1338"></a><h2>Example</h2><p><span class="command"><strong>$ ostree admin status</strong></span></p><pre class="programlisting">
|
||||
* gnome-ostree 67e382b11d213a402a5313e61cbc69dfd5ab93cb07.0
|
||||
origin refspec: gnome-ostree/buildmain/x86_64-runtime
|
||||
gnome-ostree ce19c41036cc45e49b0cecf6b157523c2105c4de1c.0
|
||||
origin refspec: gnome-ostree/buildmain/x86_64-runtime
|
||||
</pre><p><span class="command"><strong>$ ostree admin undeploy 1</strong></span></p><pre class="programlisting">
|
||||
Transaction complete; bootconfig swap: no deployment count change: -1)
|
||||
Freed objects: 326.5 kB
|
||||
Deleted deployment ce19c41036cc45e49b0cecf6b157523c2105c4de1c.0
|
||||
</pre><p><span class="command"><strong>$ ostree admin status</strong></span></p><pre class="programlisting">
|
||||
* gnome-ostree 67e382b11d213a402a5313e61cbc69dfd5ab93cb07.0
|
||||
origin refspec: gnome-ostree/buildmain/x86_64-runtime
|
||||
</pre></div></div></body></html>
|
16
man/ostree-admin-unlock.html
Normal file
@ -0,0 +1,16 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ostree admin unlock</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="ostree"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ostree-admin-unlock — Prepare the current deployment for hotfix or development</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">ostree admin unlock</code> [OPTIONS...]</p></div></div><div class="refsect1"><a name="id1337"></a><h2>Description</h2><p>
|
||||
Remove the read-only bind mount on <code class="literal">/usr</code>
|
||||
and replace it with a writable overlay filesystem. This
|
||||
default invocation of "unlock" is intended for
|
||||
development/testing purposes. All changes in the overlay
|
||||
are lost on reboot. However, this command also supports
|
||||
"hotfixes", see below.
|
||||
</p></div><div class="refsect1"><a name="id1338"></a><h2>Options</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">--hotfix</code></span></dt><dd><p>If this option is provided, the
|
||||
current deployment will be cloned as a rollback
|
||||
target. This option is intended for things like
|
||||
emergency security updates to userspace components
|
||||
such as <code class="literal">sshd</code>. The semantics here
|
||||
differ from the default "development" unlock mode
|
||||
in that reboots will retain any changes (which is what
|
||||
you likely want for security hotfixes).
|
||||
</p></dd></dl></div></div></div></body></html>
|
25
man/ostree-admin-upgrade.html
Normal file
@ -0,0 +1,25 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ostree admin upgrade</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="ostree"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ostree-admin-upgrade — Construct new tree from current origin and deploy it, if it changed</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">ostree admin upgrade</code> [OPTIONS...]</p></div></div><div class="refsect1"><a name="id1337"></a><h2>Description</h2><p>
|
||||
Downloads the latest version of the current ref from the build
|
||||
server and deploys it, if it changed. Reboot the machine for the
|
||||
changes to take effect. These phases can be split via
|
||||
<code class="option">--pull-only</code> and <code class="option">--deploy-only</code>.
|
||||
</p></div><div class="refsect1"><a name="id1338"></a><h2>Options</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">--os</code>="STATEROOT"</span></dt><dd><p>
|
||||
Use a different operating system root than the current one.
|
||||
</p></dd><dt><span class="term"><code class="option">--pull-only</code></span></dt><dd><p> Only perform a pull into the repository; do not
|
||||
create a deployment. This option can hence safely be used in a
|
||||
background scheduled job with the assurance of not changing
|
||||
system state.</p></dd><dt><span class="term"><code class="option">--deploy-only</code></span></dt><dd><p>Create a new deployment from the latest commit
|
||||
in the tracked origin refspec. This option is intended to be used
|
||||
by a scheduled system that detected changes via <code class="option">--pull-only</code>,
|
||||
and is ready to deploy them.</p></dd><dt><span class="term"><code class="option">--stage</code></span></dt><dd><p>
|
||||
Perform deployment finalization at shutdown time. Recommended,
|
||||
and will likely become the default in the future.
|
||||
</p></dd><dt><span class="term"><code class="option">--reboot</code>,<code class="option">-r</code></span></dt><dd><p>
|
||||
Reboot after a successful upgrade.
|
||||
</p></dd><dt><span class="term"><code class="option">--allow-downgrade</code></span></dt><dd><p>
|
||||
Permit deployment of chronologically older trees.
|
||||
</p></dd><dt><span class="term"><code class="option">--override-commit</code>="CHECKSUM"</span></dt><dd><p>
|
||||
Deploy CHECKSUM instead of the latest tree.
|
||||
</p></dd></dl></div></div><div class="refsect1"><a name="id1339"></a><h2>Example</h2><p><span class="command"><strong>$ ostree admin upgrade</strong></span></p><pre class="programlisting">
|
||||
No update available.
|
||||
</pre></div></div></body></html>
|
9
man/ostree-admin.html
Normal file
@ -0,0 +1,9 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ostree admin</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="ostree"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ostree-admin — Use one of the ostree admin commands</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">ostree admin</code> {SUBCOMMAND}</p></div></div><div class="refsect1"><a name="id1337"></a><h2>Description</h2><p>
|
||||
Use ostree admin subcommands.
|
||||
</p></div><div class="refsect1"><a name="id1338"></a><h2>Subcommands</h2><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><span class="command"><strong>cleanup</strong></span></p></li><li class="listitem"><p><span class="command"><strong>config-diff</strong></span></p></li><li class="listitem"><p><span class="command"><strong>deploy</strong></span></p></li><li class="listitem"><p><span class="command"><strong>init-fs</strong></span></p></li><li class="listitem"><p><span class="command"><strong>instutil</strong></span></p></li><li class="listitem"><p><span class="command"><strong>os-init</strong></span></p></li><li class="listitem"><p><span class="command"><strong>pin</strong></span></p></li><li class="listitem"><p><span class="command"><strong>post-copy</strong></span></p></li><li class="listitem"><p><span class="command"><strong>set-origin</strong></span></p></li><li class="listitem"><p><span class="command"><strong>status</strong></span></p></li><li class="listitem"><p><span class="command"><strong>switch</strong></span></p></li><li class="listitem"><p><span class="command"><strong>undeploy</strong></span></p></li><li class="listitem"><p><span class="command"><strong>unlock</strong></span></p></li><li class="listitem"><p><span class="command"><strong>upgrade</strong></span></p></li></ul></div><p>
|
||||
View manpages for each admin subcommand using, for example:
|
||||
</p><p>
|
||||
<span class="command"><strong>$ man ostree-admin cleanup</strong></span>
|
||||
</p></div><div class="refsect1"><a name="id1339"></a><h2>Options</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">--help</code>, <code class="option">-h</code></span></dt><dd><p>Usage help</p></dd><dt><span class="term"><code class="option">--sysroot</code>="PATH"</span></dt><dd><p>Creates a new OSTree sysroot at PATH</p></dd><dt><span class="term"><code class="option">--print-current-dir</code></span></dt><dd><p>
|
||||
Prints the full path to the deployment directory for the currently active deployment in the specified sysroot to standard out. This is incompatible with specifying a subcommand.
|
||||
</p></dd></dl></div></div></div></body></html>
|
5
man/ostree-cat.html
Normal file
@ -0,0 +1,5 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ostree cat</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="ostree"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ostree-cat — Display or concatenate contents of files</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">ostree cat</code> {COMMIT} {PATH...}</p></div></div><div class="refsect1"><a name="id1337"></a><h2>Description</h2><p>
|
||||
This command functions much like the typical Unix "cat" command, in that it displays the contents of a file, or concatenates them given two or more files. However, this command requires the user to specify a commit - a checksum or refspec corresponding to a given build. If you use a refspec, OSTree will refer to the most recent commit, unless you specify a parent build using the carat (^) at the end of the refspec. It will then operate the command in that given commit.
|
||||
</p></div><div class="refsect1"><a name="id1338"></a><h2>Example</h2><p><span class="command"><strong>$ ostree cat my-branch helloworld.txt</strong></span></p><pre class="programlisting">
|
||||
Hello, world!
|
||||
</pre></div></div></body></html>
|
50
man/ostree-checkout.html
Normal file
@ -0,0 +1,50 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ostree checkout</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="ostree"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ostree-checkout — Check out a commit into a filesystem</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">ostree checkout</code> [OPTIONS...] {COMMIT} [DESTINATION]</p></div></div><div class="refsect1"><a name="id1337"></a><h2>Description</h2><p>
|
||||
Checks out the given commit into the filesystem under directory DESTINATION. If DESTINATION is not specified, the COMMIT will become the destination checkout target. If COMMIT destination already exists, command will error unless <code class="option">--union</code> option is selected.
|
||||
</p></div><div class="refsect1"><a name="id1338"></a><h2>Options</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">--user-mode</code>, <code class="option">-U</code></span></dt><dd><p>
|
||||
Do not change file ownership or initialize extended attributes.
|
||||
</p></dd><dt><span class="term"><code class="option">--subpath</code>="PATH"</span></dt><dd><p>
|
||||
Checkout sub-directory PATH.
|
||||
</p></dd><dt><span class="term"><code class="option">--union</code></span></dt><dd><p>
|
||||
Keep existing directories and unchanged files, overwrite existing files.
|
||||
</p></dd><dt><span class="term"><code class="option">--union-add</code></span></dt><dd><p>
|
||||
Keep existing directories and files.
|
||||
</p></dd><dt><span class="term"><code class="option">--union-identical</code></span></dt><dd><p>Like <code class="literal">--union</code>, but error out
|
||||
if a file would be replaced with a different file. Add new files
|
||||
and directories, ignore identical files, and keep existing
|
||||
directories. Requires <code class="literal">-H</code>.</p></dd><dt><span class="term"><code class="option">--whiteouts</code></span></dt><dd><p>
|
||||
Process whiteout files (Docker style).
|
||||
</p></dd><dt><span class="term"><code class="option">--process-passthrough-whiteouts</code></span></dt><dd><p>
|
||||
Enable overlayfs whiteout extraction into 0:0 character devices.
|
||||
Overlayfs whiteouts are encoded inside ostree as <code class="literal">.ostree-wh.filename</code>
|
||||
and extracted as 0:0 character devices. This is useful to carry
|
||||
container storage embedded into ostree.
|
||||
</p></dd><dt><span class="term"><code class="option">--allow-noent</code></span></dt><dd><p>
|
||||
Do nothing if specified path does not exist.
|
||||
</p></dd><dt><span class="term"><code class="option">--from-stdin</code></span></dt><dd><p>
|
||||
Process many checkouts from standard input.
|
||||
</p></dd><dt><span class="term"><code class="option">--from-file</code>="FILE"</span></dt><dd><p>
|
||||
Process many checkouts from input file.
|
||||
</p></dd><dt><span class="term"><code class="option">--fsync</code>="POLICY"</span></dt><dd><p>
|
||||
POLICY is a boolean which specifies whether fsync should be
|
||||
used or not. Default to true.
|
||||
</p></dd><dt><span class="term"><code class="option">--require-hardlinks</code>,
|
||||
<code class="option">-H</code></span></dt><dd><p>
|
||||
Do not fall back to full copies if hardlinking fails.
|
||||
</p></dd><dt><span class="term"><code class="option">--force-copy-zerosized</code>,
|
||||
<code class="option">-z</code></span></dt><dd><p>
|
||||
This option does nothing; the functionality is now always on by default.
|
||||
</p></dd><dt><span class="term"><code class="option">--force-copy</code>, <code class="option">-C</code></span></dt><dd><p>
|
||||
Never hardlink (but may reflink if available).
|
||||
</p></dd><dt><span class="term"><code class="option">--bareuseronly-dirs</code>,
|
||||
<code class="option">-M</code></span></dt><dd><p>
|
||||
Suppress mode bits outside of 0775 for directories (suid,
|
||||
world writable, etc.).
|
||||
</p></dd><dt><span class="term"><code class="option">--skip-list</code>="FILE"</span></dt><dd><p>
|
||||
Skip checking out the absolute file paths listed in FILE,
|
||||
one per line.
|
||||
</p></dd><dt><span class="term"><code class="option">--selinux-policy</code></span></dt><dd><p>
|
||||
Set SELinux labels based on policy in root filesystem PATH
|
||||
(may be /). This implies <code class="literal">--force-copy</code>.
|
||||
</p></dd></dl></div></div><div class="refsect1"><a name="id1339"></a><h2>Example</h2><p><span class="command"><strong>$ ostree checkout my-branch</strong></span></p><p><span class="command"><strong>$ ls</strong></span></p><pre class="programlisting">
|
||||
file1 file2 <span class="emphasis"><em>my-branch</em></span>
|
||||
</pre></div></div></body></html>
|
7
man/ostree-checksum.html
Normal file
@ -0,0 +1,7 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ostree checksum</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="ostree"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ostree-checksum — Checksum a file or directory</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">ostree checksum</code> {PATH}</p></div></div><div class="refsect1"><a name="id1337"></a><h2>Description</h2><p>
|
||||
Generates a checksum for a given file or directory.
|
||||
</p></div><div class="refsect1"><a name="id1338"></a><h2>Options</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">--ignore-xattrs</code></span></dt><dd><p>
|
||||
Ignore extended attributes when checksumming.
|
||||
</p></dd></dl></div></div><div class="refsect1"><a name="id1339"></a><h2>Example</h2><p><span class="command"><strong>$ ostree checksum file1</strong></span></p><pre class="programlisting">
|
||||
67e382b11d213a402a5313e61cbc69dfd5ab93cb07fbb8b71c2e84f79fa5d7dc
|
||||
</pre></div></div></body></html>
|
89
man/ostree-commit.html
Normal file
@ -0,0 +1,89 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ostree commit</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="ostree"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ostree-commit — Commit a new revision</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">ostree commit</code> [OPTIONS...] --branch= {BRANCH} [PATH]</p></div></div><div class="refsect1"><a name="id1337"></a><h2>Description</h2><p>
|
||||
This allows you to commit changes to a branch. The specification of the branch is required. The command will print the checksum of a successful commit.
|
||||
</p></div><div class="refsect1"><a name="id1338"></a><h2>Options</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">--subject</code>, <code class="option">-s</code>="SUBJECT"</span></dt><dd><p>
|
||||
One line subject. (optional)
|
||||
</p></dd><dt><span class="term"><code class="option">--body</code>, <code class="option">-m</code>="BODY"</span></dt><dd><p>
|
||||
Full description. (optional)
|
||||
</p></dd><dt><span class="term"><code class="option">--body-file</code>, <code class="option">-F</code>="FILE"</span></dt><dd><p>
|
||||
Full commit description from a file. (optional)
|
||||
</p></dd><dt><span class="term"><code class="option">--editor</code>, <code class="option">-e</code></span></dt><dd><p>
|
||||
Open a text editor for the commit description. It will use OSTREE_EDITOR, VISUAL, EDITOR, or vi, in descending order of preference. The commit will be aborted if the message is left empty.
|
||||
</p></dd><dt><span class="term"><code class="option">--branch</code>, <code class="option">-b</code>="BRANCH"</span></dt><dd><p>
|
||||
Branch. Required, unless --orphan is given.
|
||||
</p></dd><dt><span class="term"><code class="option">--parent</code>="COMMIT"</span></dt><dd><p>
|
||||
Parent checksum or "none" to explicitly use no parent. If not specified, <code class="literal">BRANCH</code> is used as parent (no parent in case <code class="literal">BRANCH</code> does not exist).
|
||||
</p></dd><dt><span class="term"><code class="option">--tree</code>="dir=PATH" or "tar=TARFILE" or "ref=COMMIT"</span></dt><dd><p>
|
||||
Overlay the given argument as a tree. When committing an archive, the TARFILE can be specified as <code class="literal">-</code> to read the archive from standard input.
|
||||
</p></dd><dt><span class="term"><code class="option">--base</code>="REV"</span></dt><dd><p>
|
||||
Start from the content in a commit. This differs from <code class="literal">--tree=ref=REV</code> in that no commit modifiers are applied. This is usually what you want when
|
||||
creating a derived commit. This is also used for <code class="literal">--selinux-policy-from-base</code>.
|
||||
</p></dd><dt><span class="term"><code class="option">--add-metadata-string</code>="KEY=VALUE"</span></dt><dd><p>
|
||||
Add a key/value pair to metadata. Can be specified multiple times.
|
||||
</p></dd><dt><span class="term"><code class="option">--add-metadata</code>="KEY=VALUE"</span></dt><dd><p>
|
||||
Add a key/value pair to metadata, where the KEY is a string, and VALUE is g_variant_parse() formatted. Can be specified multiple times.
|
||||
</p></dd><dt><span class="term"><code class="option">--keep-metadata</code>="KEY"</span></dt><dd><p>
|
||||
Keep metadata KEY and its associated VALUE from parent. Can be specified multiple times.
|
||||
</p></dd><dt><span class="term"><code class="option">--add-detached-metadata-string</code>="KEY=VALUE"</span></dt><dd><p>
|
||||
Add a key/value pair to detached metadata.
|
||||
</p></dd><dt><span class="term"><code class="option">--owner-uid</code>="UID"</span></dt><dd><p>
|
||||
Set file ownership user id.
|
||||
</p></dd><dt><span class="term"><code class="option">--owner-gid</code>="GID"</span></dt><dd><p>
|
||||
Set file ownership group id.
|
||||
</p></dd><dt><span class="term"><code class="option">--no-xattrs</code></span></dt><dd><p>
|
||||
Do not import extended attributes.
|
||||
</p></dd><dt><span class="term"><code class="option">--selinux-labeling-epoch</code>0 | 1</span></dt><dd><p>
|
||||
When SELinux labeling is enabled, epoch <code class="literal">1</code> ensures that <code class="literal">/usr/etc</code> is labeled as if it was <code class="literal">/etc</code>.
|
||||
</p></dd><dt><span class="term"><code class="option">--bootable</code></span></dt><dd><p>
|
||||
Inject standard metadata for a bootable Linux filesystem tree.
|
||||
</p></dd><dt><span class="term"><code class="option">--link-checkout-speedup</code></span></dt><dd><p>
|
||||
Optimize for commits of trees composed of hardlinks into the repository.
|
||||
</p></dd><dt><span class="term"><code class="option">--tar-autocreate-parents</code></span></dt><dd><p>
|
||||
When loading tar archives, automatically create parent directories as needed.
|
||||
</p></dd><dt><span class="term"><code class="option">--skip-if-unchanged</code></span></dt><dd><p>
|
||||
If the contents are unchanged from previous commit, do nothing.
|
||||
</p></dd><dt><span class="term"><code class="option">--consume</code></span></dt><dd><p>
|
||||
When committing from a local directory (i.e. not an archive or --tree=ref),
|
||||
assume ownership of the content. This may simply involve deleting it,
|
||||
but if possible, the content may simply be <code class="literal">rename()</code>ed
|
||||
into the repository rather than creating a new copy.
|
||||
</p></dd><dt><span class="term"><code class="option">--statoverride</code>="PATH"</span></dt><dd><p>
|
||||
File containing list of modifications to make permissions (file mode in
|
||||
decimal, followed by space, followed by file path). The specified mode
|
||||
is ORed with the file's original mode unless preceded by "=".
|
||||
</p></dd><dt><span class="term"><code class="option">--skip-list</code>="PATH"</span></dt><dd><p>
|
||||
File containing list of file paths to skip (one path per line).
|
||||
</p></dd><dt><span class="term"><code class="option">--table-output</code></span></dt><dd><p>
|
||||
Output more information in a KEY: VALUE format.
|
||||
</p></dd><dt><span class="term"><code class="option">--generate-sizes</code></span></dt><dd><p>
|
||||
Generate size information along with commit metadata.
|
||||
</p></dd><dt><span class="term"><code class="option">--gpg-sign</code>="KEY-ID"</span></dt><dd><p>
|
||||
GPG Key ID with which to sign the commit (if have GPGME - GNU Privacy Guard Made Easy).
|
||||
</p></dd><dt><span class="term"><code class="option">--gpg-homedir</code>="HOMEDIR"</span></dt><dd><p>
|
||||
GPG home directory to use when looking for keyrings (if have GPGME - GNU Privacy Guard Made Easy).
|
||||
</p></dd><dt><span class="term"><code class="option">--timestamp</code>="TIMESTAMP"</span></dt><dd><p>
|
||||
Override the timestamp of the commit to TIMESTAMP.
|
||||
</p></dd><dt><span class="term"><code class="option">--orphan</code></span></dt><dd><p>
|
||||
Create a commit without writing to a ref (branch)
|
||||
</p></dd><dt><span class="term"><code class="option">--fsync</code>="POLICY"</span></dt><dd><p>
|
||||
POLICY is a boolean which specifies whether fsync should be used or not. Default to true.
|
||||
</p></dd><dt><span class="term"><code class="option">-s, --sign-type</code></span></dt><dd><p>
|
||||
Use particular signature engine. Currently
|
||||
available ed25519 and dummy
|
||||
signature types.
|
||||
|
||||
The default is ed25519 .
|
||||
</p></dd><dt><span class="term"><code class="option">--sign-from-file</code>="PATH"</span></dt><dd><p>
|
||||
This will read a key (corresponding to the provided <code class="literal">--sign-type</code> from the provided path. The key should be base64 encoded.
|
||||
</p></dd><dt><span class="term"><code class="option">--sign</code>="KEY-ID"</span></dt><dd><p>
|
||||
In new code, avoid using this because passing private keys via command line arguments
|
||||
are prone to leakage in logs and process listings.
|
||||
</p><p>
|
||||
The <code class="literal">KEY-ID</code> is:
|
||||
</p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">for ed25519:</code></span></dt><dd><p>
|
||||
<code class="literal">base64</code>-encoded secret key for commit signing.
|
||||
</p></dd><dt><span class="term"><code class="option">for dummy:</code></span></dt><dd><p>
|
||||
ASCII-string used as secret key.
|
||||
</p></dd></dl></div><p>
|
||||
</p></dd></dl></div></div><div class="refsect1"><a name="id1339"></a><h2>Example</h2><p><span class="command"><strong>$ ostree commit --branch=my-branch --subject="Initial commit"</strong></span></p><pre class="programlisting">
|
||||
67e382b11d213a402a5313e61cbc69dfd5ab93cb07fbb8b71c2e84f79fa5d7dc
|
||||
</pre></div></div></body></html>
|
14
man/ostree-config.html
Normal file
@ -0,0 +1,14 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ostree config</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="ostree"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ostree-config — Change configuration settings</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">ostree config get</code> {GROUPNAME.KEYNAME}</p></div><div class="cmdsynopsis"><p><code class="command">ostree config get</code> { --group=GROUPNAME} { KEYNAME}</p></div><div class="cmdsynopsis"><p><code class="command">ostree config set</code> {GROUPNAME.KEYNAME} {VALUE}</p></div><div class="cmdsynopsis"><p><code class="command">ostree config set</code> { --group=GROUPNAME} { KEYNAME} {VALUE}</p></div><div class="cmdsynopsis"><p><code class="command">ostree config unset</code> {GROUPNAME.KEYNAME}</p></div><div class="cmdsynopsis"><p><code class="command">ostree config unset</code> { --group=GROUPNAME} { KEYNAME}</p></div></div><div class="refsect1"><a name="id1337"></a><h2>Description</h2><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
|
||||
<span class="command"><strong>ostree config get</strong></span> displays the value of
|
||||
KEYNAME in the group GROUPNAME
|
||||
</p></li><li class="listitem"><p>
|
||||
<span class="command"><strong>ostree config set</strong></span> sets the value of
|
||||
KEYNAME in the group GROUPNAME
|
||||
to VALUE .
|
||||
</p></li><li class="listitem"><p>
|
||||
<span class="command"><strong>ostree config unset</strong></span> removes the key
|
||||
KEYNAME from the group GROUPNAME
|
||||
so that OSTree uses the default value for it. It is not an
|
||||
error for the specified GROUPNAME or
|
||||
KEYNAME not to exist.
|
||||
</p></li></ul></div></div><div class="refsect1"><a name="id1338"></a><h2>Example</h2><p><span class="command"><strong>$ ostree config get core.mode</strong></span></p><p>bare</p><p><span class="command"><strong>$ ostree config set --group='remote "myremote"' url http://example.com/repo</strong></span></p><p><span class="command"><strong>$ ostree config unset core.lock-timeout-secs</strong></span></p></div></div></body></html>
|
35
man/ostree-create-usb.html
Normal file
@ -0,0 +1,35 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ostree create-usb</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="ostree"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ostree-create-usb — Put the given refs on an external drive for P2P distribution.</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">ostree create-usb</code> [OPTIONS...] {MOUNT-PATH} {COLLECTION-ID REF} [COLLECTION-ID REF...]</p></div></div><div class="refsect1"><a name="id1337"></a><h2>Description</h2><p>
|
||||
This command creates a repository in MOUNT-PATH and pulls the given
|
||||
REF(s) into it so they can be found and pulled from (perhaps by another computer that's offline).
|
||||
See
|
||||
<a href="ostree-find-remotes.html"><span class="citerefentry"><span class="refentrytitle">ostree-find-remotes</span>(1)</span></a>
|
||||
for more information on P2P distribution.
|
||||
</p><p>
|
||||
In order for ostree to pull refs from a mounted filesystem (such as
|
||||
a USB drive) the repo must be in a standard location. Specifically,
|
||||
subdirectories of <code class="filename">.ostree/repos.d</code> are checked,
|
||||
then <code class="filename">.ostree/repo</code>, <code class="filename">ostree/repo</code>,
|
||||
and <code class="filename">var/lib/flatpak/repo</code> are checked. By default
|
||||
<span class="command"><strong>ostree create-usb</strong></span> uses <code class="filename">.ostree/repo</code>,
|
||||
but if you specify another location using <code class="option">--destination-repo</code>
|
||||
a symbolic link will be created for you in <code class="filename">.ostree/repos.d</code>.
|
||||
</p><p>
|
||||
This command will regenerate the <code class="filename">summary</code> file
|
||||
in the destination repo so that it stays accurate, so you shouldn't
|
||||
try to use summary signatures in the destination repo. This
|
||||
shouldn't be a concern because clients that support pulling from
|
||||
USB mounts use signed per-repo and per-commit metadata instead of
|
||||
summary signatures.
|
||||
</p></div><div class="refsect1"><a name="id1338"></a><h2>Options</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">--disable-fsync</code></span></dt><dd><p>
|
||||
Do not invoke fsync().
|
||||
</p></dd><dt><span class="term"><code class="option">--destination-repo</code>=DEST</span></dt><dd><p>
|
||||
Create the repository in DEST under MOUNT-PATH, rather than
|
||||
the default location.
|
||||
</p></dd><dt><span class="term"><code class="option">--commit</code>=COMMIT</span></dt><dd><p>
|
||||
Pull COMMIT instead of whatever REF points to. This can only
|
||||
be used if a single ref is specified.
|
||||
</p></dd></dl></div></div><div class="refsect1"><a name="id1339"></a><h2>Example</h2><p><span class="command"><strong>ostree --repo=/var/lib/flatpak/repo create-usb /run/media/mwleeds/f6d04c7a-60f6-4ba3-bb96-0f40498675be com.exampleos.Apps app/org.kde.Khangman/x86_64/stable com.exampleos.Apps ostree-metadata com.exampleos.Apps appstream/x86_64</strong></span></p><pre class="programlisting">
|
||||
|
||||
5 metadata, 213 content objects imported; 1 KiB transferred in 1 seconds Copied 3/3 refs successfully from ‘/var/lib/flatpak/repo’ to ‘.ostree/repo’ repository in ‘/run/media/mwleeds/f6d04c7a-60f6-4ba3-bb96-0f40498675be’.
|
||||
|
||||
</pre></div></div></body></html>
|
17
man/ostree-diff.html
Normal file
@ -0,0 +1,17 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ostree diff</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="ostree"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ostree-diff — Compare a directory against a revision</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">ostree diff</code> [OPTIONS...] {REV_OR_DIR} {REV_OR_DIR}</p></div></div><div class="refsect1"><a name="id1337"></a><h2>Description</h2><p>
|
||||
Compare a directory or revision against another directory or revision. If REV_OR_DIR starts with `/` or `./`, it is interpreted as a directory, otherwise a revision. Shows files and directories modified, added, and deleted. If there is a file in the second REV_OR_DIR not in the first, it will show with an "A" for "added". If a file in the first REV_OR_DIR is not in the second, it shows "D" for "deleted". "M" for "modified" will also show.
|
||||
</p></div><div class="refsect1"><a name="id1338"></a><h2>Options</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">--stats</code></span></dt><dd><p>
|
||||
Print various statistics.
|
||||
</p></dd><dt><span class="term"><code class="option">--fs-diff</code></span></dt><dd><p>
|
||||
Print filesystem diff.
|
||||
</p></dd><dt><span class="term"><code class="option">--owner-uid</code></span></dt><dd><p>
|
||||
Use file ownership user id for local files.
|
||||
</p></dd><dt><span class="term"><code class="option">--owner-gid</code></span></dt><dd><p>
|
||||
Use file ownership group id for local files.
|
||||
</p></dd></dl></div></div><div class="refsect1"><a name="id1339"></a><h2>Example</h2><p><span class="command"><strong>$ ostree diff my-branch^ my-branch</strong></span></p><pre class="programlisting">
|
||||
A /testdirectory
|
||||
M /helloworld.txt
|
||||
</pre><p><span class="command"><strong>$ ostree diff my-branch my-branch^</strong></span></p><pre class="programlisting">
|
||||
D /testdirectory
|
||||
M /helloworld.txt
|
||||
</pre></div></div></body></html>
|
5
man/ostree-export.html
Normal file
@ -0,0 +1,5 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ostree export</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="ostree"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ostree-export — Generate a tar archive from an OSTree commit</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">ostree export</code> [OPTIONS...] {BRANCH}</p></div></div><div class="refsect1"><a name="id1337"></a><h2>Description</h2><p>
|
||||
This command generates a GNU tar formatted archive from an
|
||||
OSTree commit. This is useful for cases like backups,
|
||||
converting OSTree commits into Docker images, and the like.
|
||||
</p></div><div class="refsect1"><a name="id1338"></a><h2>Example</h2><p><span class="command"><strong>$ ostree export exampleos/x86_64/standard | gzip > exampleos-standard.tar.gz</strong></span></p></div></div></body></html>
|
47
man/ostree-find-remotes.html
Normal file
@ -0,0 +1,47 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ostree find-remotes</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="ostree"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ostree-find-remotes — Find remotes to serve the given refs</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">ostree find-remotes</code> [OPTIONS...] {COLLECTION-ID} {REF} [COLLECTION-ID REF...]</p></div></div><div class="refsect1"><a name="id1337"></a><h2>Description</h2><p>
|
||||
OSTree has the ability to pull not just from the configured remote
|
||||
servers but also from peer computers on the LAN and from mounted
|
||||
filesystems such as USB drives. This functionality requires the use
|
||||
of collection IDs and GPG verification.
|
||||
</p><p>
|
||||
The <span class="command"><strong>find-remotes</strong></span> command searches for remotes
|
||||
which claim to provide one or more of the given COLLECTION-ID REF
|
||||
pairs and prints information about them, with remotes sorted by
|
||||
latency (Mounts > LAN > Internet). By default, OSTree searches for
|
||||
remotes in configuration files, on mounted filesystems (in a
|
||||
well-known location), and on the LAN using Avahi. Searching for LAN
|
||||
remotes requires OSTree to have been compiled with Avahi support,
|
||||
and it requires an Avahi daemon to be running. You can override the
|
||||
default set of finders (sources for remotes) using the
|
||||
<code class="option">--finders</code> option documented below.
|
||||
</p><p>
|
||||
The <span class="command"><strong>create-usb</strong></span> command is the recommended way to
|
||||
put refs on a USB such that <span class="command"><strong>find-remotes</strong></span> will
|
||||
discover them. See
|
||||
<a href="ostree-create-usb.html"><span class="citerefentry"><span class="refentrytitle">ostree-create-usb</span>(1)</span></a>.
|
||||
</p></div><div class="refsect1"><a name="id1338"></a><h2>Options</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">--cache-dir</code>=DIR</span></dt><dd><p>
|
||||
Use an alternate cache directory in <code class="literal">DIR</code>.
|
||||
</p></dd><dt><span class="term"><code class="option">--disable-fsync</code></span></dt><dd><p>
|
||||
Do not invoke fsync().
|
||||
</p></dd><dt><span class="term"><code class="option">--finders</code>=FINDERS</span></dt><dd><p>
|
||||
Use the specified comma separated list of finders rather than
|
||||
the default set. Possible values: <code class="literal">config</code>,
|
||||
<code class="literal">lan</code>, and <code class="literal">mount</code> (or any
|
||||
combination thereof).
|
||||
</p></dd><dt><span class="term"><code class="option">--pull</code></span></dt><dd><p>
|
||||
Pull the most recent commit found for each ref.
|
||||
</p></dd><dt><span class="term"><code class="option">--mirror</code></span></dt><dd><p>
|
||||
Do a mirror pull (see the documentation for
|
||||
<span class="command"><strong>ostree pull --mirror</strong></span>). This option can
|
||||
only be used in combination with <code class="option">--pull</code>.
|
||||
</p></dd></dl></div></div><div class="refsect1"><a name="id1339"></a><h2>Example</h2><p><span class="command"><strong>$ ostree find-remotes --finders=mount,lan com.exampleos.Os exampleos/x86_64/standard</strong></span></p><pre class="programlisting">
|
||||
Result 0: http://10.0.64.202:43381/0
|
||||
- Finder: OstreeRepoFinderAvahi
|
||||
- Keyring: exampleos.trustedkeys.gpg
|
||||
- Priority: 60
|
||||
- Summary last modified: 2018-01-12T19:00:28Z
|
||||
- Refs:
|
||||
- (com.exampleos.Os, exampleos/x86_64/standard) = c91acd964b3fda561b87bfb7f7c80e36220d76b567f0ce90c0e60742ef33c360
|
||||
|
||||
1/1 refs were found.
|
||||
</pre></div></div></body></html>
|
25
man/ostree-fsck.html
Normal file
@ -0,0 +1,25 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ostree fsck</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="ostree"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ostree-fsck — Check the repository for consistency</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">ostree fsck</code> [OPTIONS...]</p></div></div><div class="refsect1"><a name="id1337"></a><h2>Description</h2><p>
|
||||
Checks the repository to verify the content integrity of commit objects. Looks for missing and corrupted objects and metadata, and validates directory structure and metadata.
|
||||
</p></div><div class="refsect1"><a name="id1338"></a><h2>Options</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">--quiet</code>,<code class="option">-q</code></span></dt><dd><p>
|
||||
Only print error messages.
|
||||
</p></dd><dt><span class="term"><code class="option">--delete</code></span></dt><dd><p>
|
||||
Remove corrupted objects.
|
||||
</p></dd><dt><span class="term"><code class="option">--add-tombstones</code></span></dt><dd><p>
|
||||
Add tombstone commit for referenced but missing commits.
|
||||
</p></dd><dt><span class="term"><code class="option">--verify-bindings</code></span></dt><dd><p>
|
||||
Verify that the commits pointed to by each ref have that
|
||||
ref in the binding set. You should usually add this
|
||||
option; it only defaults to off for backwards compatibility.
|
||||
</p></dd><dt><span class="term"><code class="option">--verify-back-refs</code></span></dt><dd><p>
|
||||
Verify that all the refs listed in a commit’s ref-bindings
|
||||
point to that commit. This cannot be used in repositories
|
||||
where the target of refs is changed over time as new commits
|
||||
are added, but can be used in repositories which are
|
||||
regenerated from scratch for each commit.
|
||||
Implies <code class="literal">--verify-bindings</code> as well.
|
||||
</p></dd></dl></div></div><div class="refsect1"><a name="id1339"></a><h2>Example</h2><p><span class="command"><strong>$ ostree fsck</strong></span></p><pre class="programlisting">
|
||||
Enumerating objects...
|
||||
Verifying content integrity of of 2 commit objects
|
||||
0/2572 objects
|
||||
2571/2572 objects
|
||||
</pre></div></div></body></html>
|
10
man/ostree-gpg-sign.html
Normal file
@ -0,0 +1,10 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ostree gpg-sign</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="ostree"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ostree-gpg-sign — Sign a commit</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">ostree gpg-sign</code> [OPTIONS...] {COMMIT} {KEY-ID...}</p></div></div><div class="refsect1"><a name="id1337"></a><h2>Description</h2><p>
|
||||
Add a new signature to a commit for each specified GPG key.
|
||||
|
||||
Note that currently, this will append a new signature even if
|
||||
the commit is already signed with a given key.
|
||||
</p></div><div class="refsect1"><a name="id1338"></a><h2>Options</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">--delete</code></span></dt><dd><p>
|
||||
Delete signatures having any of the GPG KEY-IDs.
|
||||
</p></dd><dt><span class="term"><code class="option">--gpg-homedir</code>="HOMEDIR"</span></dt><dd><p>
|
||||
GPG Homedir to use when looking for keyrings.
|
||||
</p></dd></dl></div></div></div></body></html>
|
33
man/ostree-init.html
Normal file
@ -0,0 +1,33 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ostree init</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="ostree"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ostree-init — Initialize a new empty repository</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">ostree init</code> [OPTIONS...]</p></div></div><div class="refsect1"><a name="id1337"></a><h2>Description</h2><p>
|
||||
Creates a new empty repository.
|
||||
</p></div><div class="refsect1"><a name="id1338"></a><h2>Options</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">--mode</code>="MODE"</span></dt><dd><p>
|
||||
Initialize repository in given mode
|
||||
(<code class="literal">bare</code>, <code class="literal">bare-user</code>,
|
||||
<code class="literal">bare-user-only</code>, <code class="literal">archive</code>).
|
||||
The default is <code class="literal">bare</code>. Note that for
|
||||
<code class="literal">archive</code> the repository configuration file
|
||||
will actually have <code class="literal">archive-z2</code>, as that's
|
||||
the historical name.</p><p>See the manual for differences between these modes.
|
||||
Briefly, <code class="literal">bare</code> mode stores files as they
|
||||
are, so they can be directly hardlinked,
|
||||
<code class="literal">bare-user</code> uses extended attributes to
|
||||
store ownership and xattr information, allowing non-root
|
||||
operations, <code class="literal">bare-user-only</code> does not store
|
||||
ownership information, and <code class="literal">archive</code> stores
|
||||
files compressed, to be served over the network.
|
||||
</p></dd><dt><span class="term"><code class="option">--collection-id</code>=COLLECTION-ID</span></dt><dd><p>
|
||||
Set the collection ID of the repository. Remotes in clones
|
||||
of this repository must configure the same value in order to
|
||||
pull refs which originated in this repository over peer to
|
||||
peer.</p><p>This collection ID must be persistent and globally
|
||||
unique. It is formatted as a reverse DNS name (like a D-Bus
|
||||
interface). It must be set to a reverse DNS domain under your
|
||||
control.</p><p>This option may be omitted (the default) to leave
|
||||
peer to peer distribution unsupported for the repository. A
|
||||
collection ID may be added to an existing repository in
|
||||
future to enable peer to peer distribution from that point
|
||||
onwards.</p><p>If the collection ID is changed for the repository
|
||||
in future, peer to peer distribution of refs from the
|
||||
repository will break for all peers who do not update their
|
||||
remote configuration to the new collection ID.
|
||||
</p></dd></dl></div></div></div></body></html>
|
13
man/ostree-log.html
Normal file
@ -0,0 +1,13 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ostree log</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="ostree"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ostree-log — Show log starting at a commit or ref</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">ostree log</code> [OPTIONS...] {REF}</p></div></div><div class="refsect1"><a name="id1337"></a><h2>Description</h2><p>
|
||||
Shows a log of commits to a given ref or branch. Includes commit checksum, timestamp, and commit message.
|
||||
</p></div><div class="refsect1"><a name="id1338"></a><h2>Options</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">--raw</code></span></dt><dd><p>
|
||||
Show raw variant data.
|
||||
</p></dd></dl></div></div><div class="refsect1"><a name="id1339"></a><h2>Example</h2><p><span class="command"><strong>$ ostree log my-branch</strong></span></p><pre class="programlisting">
|
||||
commit 67e382b11d213a402a5313e61cbc69dfd5ab93cb07fbb8b71c2e84f79fa5d7dc
|
||||
Date: 2014-06-12 13:42:54 +0000
|
||||
This is the second commit
|
||||
|
||||
commit ce19c41036cc45e49b0cecf6b157523c2105c4de1ce30101def1f759daafcc3e
|
||||
Date: 2014-06-12 11:20:08 +0000
|
||||
Initial commit
|
||||
</pre></div></div></body></html>
|
17
man/ostree-ls.html
Normal file
@ -0,0 +1,17 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ostree ls</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="ostree"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ostree-ls — List file paths</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">ostree ls</code> [OPTIONS...] {COMMIT} [PATHS...]</p></div></div><div class="refsect1"><a name="id1337"></a><h2>Description</h2><p>
|
||||
Prints a list of file paths within the given commit, and within the given path(s) if specified. The first letter of the file line output specifies the type: "-" for regular file, "d" for directory, "l" for symbolic link. See EXAMPLE section for more detail on the specific output.
|
||||
</p></div><div class="refsect1"><a name="id1338"></a><h2>Options</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">--dironly</code>,<code class="option">-d</code></span></dt><dd><p>
|
||||
Do not recurse into directory arguments.
|
||||
</p></dd><dt><span class="term"><code class="option">--recursive</code>,<code class="option">-R</code></span></dt><dd><p>
|
||||
Print directories recursively.
|
||||
</p></dd><dt><span class="term"><code class="option">--checksum</code>,<code class="option">-C</code></span></dt><dd><p>
|
||||
Print checksum.
|
||||
</p></dd><dt><span class="term"><code class="option">--xattrs</code>,<code class="option">-X</code></span></dt><dd><p>
|
||||
Print extended attributes.
|
||||
</p></dd><dt><span class="term"><code class="option">--nul-filenames-only</code></span></dt><dd><p>
|
||||
Print only filenames, NUL separated.
|
||||
</p></dd></dl></div></div><div class="refsect1"><a name="id1339"></a><h2>Example</h2><p><span class="command"><strong>$ ostree ls my-branch</strong></span></p><pre class="programlisting">
|
||||
d00644 0 0 0 /
|
||||
-00644 0 0 2 /helloworld.txt
|
||||
d00755 0 0 0 /testdirectory
|
||||
</pre><p>Here, the first column is the file-type symbol (as explained in the DESCRIPTION section) followed by the S_IFMT file type. The next two columns (here: 0 0) are respectively the user ID and group ID for the file. After the break, the next number represents that file's standard size. The final column is the file path.</p></div></div></body></html>
|
63
man/ostree-prepare-root.html
Normal file
@ -0,0 +1,63 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ostree prepare-root</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="ostree"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ostree-prepare-root — Change the view of a mounted root filesystem to an ostree deployment</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">ostree prepare-root</code> {TARGET}</p></div></div><div class="refsect1"><a name="id1337"></a><h2>Description</h2><p>
|
||||
At its core, ostree operates on an existing mounted filesystem. Tooling such
|
||||
as <code class="literal">ostree admin deploy</code> will create a new directory that can be
|
||||
used as a bootable target. This tool is designed to run in an initramfs and
|
||||
set up "remapping" mounts as a view into that filesystem.
|
||||
</p><p>
|
||||
As of more recently, this tool also has optional support for composefs, which
|
||||
creates a distinct mount point layered on top of the underlying filesystem.
|
||||
</p><p>
|
||||
The most common pattern today is to use systemd in an initramfs. The systemd
|
||||
unit shipped upstream is ordered in this way:
|
||||
|
||||
<code class="literal">After=sysroot.mount</code> and <code class="literal">Before=initrd-root-fs.target</code>
|
||||
</p><p>
|
||||
When it runs, the mounted filesystem at the provided <code class="literal">TARGET</code> (usually <code class="literal">/sysroot</code>)
|
||||
will be changed such that what appears at <code class="literal">/sysroot</code> is actually the
|
||||
"deployment root" - i.e. a particular versioned subdirectory. What was formerly the
|
||||
"physical root" i.e. the real root of the filesystem will appear as <code class="literal">/sysroot/sysroot</code>.
|
||||
</p><p>
|
||||
For <code class="literal">/var</code>, by default a bind mount is created from the deployment root to <code class="literal">/sysroot/var</code>.
|
||||
</p><p>
|
||||
A read-only bind mount is created over <code class="literal">/sysroot/usr</code>. The immutable bit (see chattr(1)) is set on the deployment
|
||||
root, so this provides basic protection for filesystem mutation. If the <code class="literal">sysroot.readonly</code>
|
||||
option is enabled, then <code class="literal">/sysroot/sysroot</code> is mounted read-only to provide further protection and a writable bind mount for
|
||||
<code class="literal">/sysroot/etc</code> is created.
|
||||
</p><p>
|
||||
Finally, when higher level tooling such as systemd performs a switch-root operation, what
|
||||
was <code class="literal">/sysroot</code> becomes <code class="literal">/</code> and after the transition into
|
||||
the real root, the system will be booted into the "deployment", which is a versioned immutable
|
||||
filesystem tree. The ostree tooling running in the real root thereafter performs further changes
|
||||
by operating on <code class="literal">/sysroot</code> which is now the "physical root".
|
||||
</p></div><div class="refsect1"><a name="id1338"></a><h2>Configuration</h2><p>
|
||||
The <code class="literal">/usr/lib/ostree/prepare-root.conf</code> (or <code class="literal">/etc/ostree/prepare-root.conf</code>) config file is parsed by <code class="literal">ostree-prepare-root</code>. This file must
|
||||
be present in the initramfs. The default dracut module will copy it from the real root if present.
|
||||
</p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="varname">sysroot.readonly</code></span></dt><dd><p>A boolean value; the default is <code class="literal">false</code> unless composefs is enabled. If this is set to <code class="literal">true</code>, then the <code class="literal">/sysroot</code> mount point is mounted read-only.</p></dd><dt><span class="term"><code class="varname">etc.transient</code></span></dt><dd><p>A boolean value; the default is <code class="literal">false</code>. If this is set to <code class="literal">true</code>, then the <code class="literal">/etc</code> mount point is mounted transiently i.e. a non-persistent location.</p></dd><dt><span class="term"><code class="varname">root.transient</code></span></dt><dd><p>A boolean value; the default is <code class="literal">false</code>.
|
||||
If this is set to <code class="literal">true</code>, then the <code class="literal">/</code> filesystem will be a writable <code class="literal">overlayfs</code>,
|
||||
with the upper directory being a hidden directory (in the underlying system root filesystem) that will persist across reboots by default.
|
||||
However, changes will <span class="emphasis"><em>be discarded</em></span> on OS updates!
|
||||
</p><p>
|
||||
Enabling this option can be very useful for cases such as packages (dpkg/rpm/etc) that write content into <code class="literal">/opt</code>,
|
||||
particularly where they expect the target to be writable at runtime. To make that work, ensure that your <code class="literal">/opt</code>
|
||||
directory is *not* a symlink to <code class="literal">/var/opt</code>, but is just an empty directory.
|
||||
</p><p>
|
||||
Note the <code class="literal">/usr</code> mount point remains read-only by default. This option is independent of <code class="literal">etc.transient</code> and <code class="literal">sysroot.readonly</code>;
|
||||
it is supported for example to have <code class="literal">root.transient=true</code> but <code class="literal">etc.transient=false</code> in which case changes to <code class="literal">/etc</code> continue
|
||||
to persist across updates, with the default OSTree 3-way merge applied.
|
||||
</p></dd><dt><span class="term"><code class="varname">composefs.enabled</code></span></dt><dd><p>This can be <code class="literal">yes</code>, <code class="literal">no</code>. <code class="literal">maybe</code> or
|
||||
<code class="literal">signed</code>. The default is <code class="literal">maybe</code>. If set to <code class="literal">yes</code> or
|
||||
<code class="literal">signed</code>, then composefs is always used, and the boot fails if it is not
|
||||
available. Additionally if set to <code class="literal">signed</code>, boot will fail if the image cannot be
|
||||
validated by a public key. If set to <code class="literal">maybe</code>, then composefs is used if supported.
|
||||
</p></dd><dt><span class="term"><code class="varname">composefs.keypath</code></span></dt><dd><p>Path to a file with Ed25519 public keys in the initramfs, used if
|
||||
<code class="literal">composefs.enabled</code> is set to <code class="literal">signed</code>. The default value for this is
|
||||
<code class="literal">/etc/ostree/initramfs-root-binding.key</code>. For a valid signed boot the target OSTree
|
||||
commit must be signed by at least one public key in this file, and the commitfs digest listed in the
|
||||
commit must match the target composefs image.</p></dd></dl></div></div><div class="refsect1"><a name="id1339"></a><h2>systemd</h2><p>
|
||||
As mentioned above, this tool comes with a systemd unit file <code class="literal">ostree-prepare-root.service</code>
|
||||
and it is primarily expected to be invoked this way.
|
||||
</p></div><div class="refsect1"><a name="id1340"></a><h2>Composefs</h2><p>
|
||||
The default for ostree is to create a plain hardlinked filesystem tree.
|
||||
composefs support is currently experimental; see the upstream <code class="literal">doc/composefs.md</code>
|
||||
for more information on using it.
|
||||
</p></div></div></body></html>
|
31
man/ostree-prune.html
Normal file
@ -0,0 +1,31 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ostree prune</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="ostree"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ostree-prune — Search for unreachable objects</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">ostree prune</code> [OPTIONS...]</p></div></div><div class="refsect1"><a name="id1337"></a><h2>Description</h2><p>
|
||||
This searches for unreachable objects in the current repository. If unreachable objects are found, the command delete them to free space. If the <code class="option">--no-prune</code> option is invoked, the command will just print unreachable objects and recommend deleting them.
|
||||
</p></div><div class="refsect1"><a name="id1338"></a><h2>Options</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">--no-prune</code></span></dt><dd><p>
|
||||
Only display unreachable objects; don't delete.
|
||||
</p></dd><dt><span class="term"><code class="option">--refs-only</code></span></dt><dd><p>
|
||||
Only compute reachability via refs.
|
||||
</p></dd><dt><span class="term"><code class="option">--delete-commit</code>=COMMIT</span></dt><dd><p>
|
||||
Specify a COMMIT to delete.
|
||||
</p></dd><dt><span class="term"><code class="option">--keep-younger-than</code>=DATE</span></dt><dd><p>
|
||||
All commits older than DATE will be
|
||||
pruned. The format of DATE is the same as that
|
||||
accepted by GNU <code class="literal">date</code> utility - for more information
|
||||
see <code class="literal">info date</code>.
|
||||
</p></dd><dt><span class="term"><code class="option">--depth</code>=DEPTH</span></dt><dd><p>
|
||||
Only traverse DEPTH (integer) parents for each commit (default: -1=infinite).
|
||||
</p></dd><dt><span class="term"><code class="option">--static-deltas-only</code>=DEPTH</span></dt><dd><p>
|
||||
This option may currently <span class="emphasis"><em>only</em></span> be used in combination with
|
||||
<code class="option">--delete-commit</code>. Previous versions of ostree silently accepted
|
||||
the option without that, and ignored it. However, there are desired use
|
||||
cases for pruning just static deltas (while retaining the commits), and it's
|
||||
likely at some point this option will be supported for use cases outside of just
|
||||
<code class="option">--delete-commit</code>.
|
||||
</p></dd><dt><span class="term"><code class="option">--commit-only</code></span></dt><dd><p>
|
||||
Only traverse and delete commit objects. This leaves orphaned meta and
|
||||
content objects, which can be cleaned up with another prune invocation.
|
||||
One may want to use this option to cheaply delete multiple commits,
|
||||
and then clean up with a more expensive prune at the end.
|
||||
</p></dd></dl></div></div><div class="refsect1"><a name="id1339"></a><h2>Example</h2><p><span class="command"><strong>$ ostree prune</strong></span></p><pre class="programlisting">
|
||||
Total objects: 25627
|
||||
No unreachable objects
|
||||
</pre></div></div></body></html>
|
15
man/ostree-pull-local.html
Normal file
@ -0,0 +1,15 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ostree pull-local</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="ostree"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ostree-pull-local — Copy data from a source repository</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">ostree pull-local</code> [OPTIONS...] {SOURCE_REPO} [REFS...]</p></div></div><div class="refsect1"><a name="id1337"></a><h2>Description</h2><p>
|
||||
Copies data from a given repository; optimized for copies only between repositories on the same system.
|
||||
</p></div><div class="refsect1"><a name="id1338"></a><h2>Options</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">--remote</code>="REMOTE"</span></dt><dd><p>
|
||||
Add REMOTE to refspec.
|
||||
</p></dd><dt><span class="term"><code class="option">--disable-fsync</code></span></dt><dd><p>
|
||||
Do no invoke fsync().
|
||||
</p></dd><dt><span class="term"><code class="option">--untrusted</code></span></dt><dd><p>
|
||||
Do not trust source, verify checksums and don't hardlink into source.
|
||||
</p></dd><dt><span class="term"><code class="option">--disable-verify-bindings</code></span></dt><dd><p>
|
||||
Disable verification of commit metadata bindings.
|
||||
</p></dd></dl></div></div><div class="refsect1"><a name="id1339"></a><h2>Example</h2><p><span class="command"><strong>$ ostree pull-local /ostree/repo</strong></span></p><pre class="programlisting">
|
||||
Enumerating objects...
|
||||
pull: 25709/25709 scanned, 0 objects copied
|
||||
Writing 5 refs
|
||||
</pre></div></div></body></html>
|
63
man/ostree-pull.html
Normal file
@ -0,0 +1,63 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ostree pull</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="ostree"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ostree-pull — Download data from a remote repository</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">ostree pull {REMOTE} [BRANCH]</code> </p></div></div><div class="refsect1"><a name="id1337"></a><h2>Options</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">--commit-metadata-only</code></span></dt><dd><p>
|
||||
Fetch only the commit metadata.
|
||||
</p></dd><dt><span class="term"><code class="option">--cache-dir</code>=DIR</span></dt><dd><p>
|
||||
Use an alternate cache directory in <code class="literal">DIR</code>.
|
||||
</p></dd><dt><span class="term"><code class="option">--disable-fsync</code></span></dt><dd><p>
|
||||
Do no invoke fsync().
|
||||
</p></dd><dt><span class="term"><code class="option">--localcache-repo</code></span></dt><dd><p>
|
||||
Like git's <code class="literal">clone --reference</code>. Reuse the provided
|
||||
OSTree repo as a local object cache when doing HTTP fetches.
|
||||
May be specified multiple times.
|
||||
</p></dd><dt><span class="term"><code class="option">--untrusted</code></span></dt><dd><p>
|
||||
Do not trust local sources, verify checksums and don't hardlink into source.
|
||||
</p></dd><dt><span class="term"><code class="option">--disable-static-deltas</code></span></dt><dd><p>
|
||||
Do not use static deltas.
|
||||
</p></dd><dt><span class="term"><code class="option">--mirror</code></span></dt><dd><p>
|
||||
Write refs suitable for a mirror, i.e. refs are stored in the
|
||||
<code class="literal">heads/</code> directory rather than the
|
||||
<code class="literal">remotes/</code> directory. This makes the target repo
|
||||
suitable to be exported for other clients to pull from as an ostree
|
||||
remote. If no specific refs are specified, all refs will be fetched (the
|
||||
remote must have a summary file present).
|
||||
</p></dd><dt><span class="term"><code class="option">--subpath</code>=SUBPATH</span></dt><dd><p>
|
||||
Only pull the provided subpath.
|
||||
</p></dd><dt><span class="term"><code class="option">--depth</code>=DEPTH</span></dt><dd><p>
|
||||
Traverse DEPTH parents (-1=infinite) (default: 0).
|
||||
</p></dd><dt><span class="term"><code class="option">--network-retries</code>=N</span></dt><dd><p>
|
||||
Specifies how many times each download should be retried upon error (default: 5)
|
||||
</p></dd><dt><span class="term"><code class="option">--disable-retry-on-network-errors</code></span></dt><dd><p>
|
||||
Do not retry when network issues happen, instead fail automatically. (Currently only affects libcurl)
|
||||
</p></dd><dt><span class="term"><code class="option">--low-speed-limit-bytes</code>=N</span></dt><dd><p>
|
||||
The average transfer speed per second of a transfer during the
|
||||
time set via 'low-speed-time-seconds' for libcurl to abort
|
||||
(default: 1000)
|
||||
</p></dd><dt><span class="term"><code class="option">--low-speed-time-seconds</code>=N</span></dt><dd><p>
|
||||
The time in number seconds that the transfer speed should be
|
||||
below the 'low-speed-limit-bytes' setting for libcurl to abort
|
||||
(default: 30)
|
||||
</p></dd><dt><span class="term"><code class="option">--max-outstanding-fetcher-requests</code>=N</span></dt><dd><p>
|
||||
The max amount of concurrent connections allowed. (default: 8)
|
||||
</p></dd><dt><span class="term"><code class="option">--disable-verify-bindings</code></span></dt><dd><p>
|
||||
Disable verification of commit metadata bindings.
|
||||
</p></dd></dl></div></div><div class="refsect1"><a name="id1338"></a><h2>Description</h2><p>
|
||||
Without --mirror, this command will create new refs
|
||||
under <code class="literal">remotes/REMOTE/</code> directory
|
||||
for each pulled branch unless they are already created. Such
|
||||
refs can be then referenced by <code class="literal">REMOTE:BRANCH</code> in
|
||||
<code class="literal">ostree</code> subcommands (e.g. <code class="literal">ostree log origin:exampleos/x86_64/standard</code>).
|
||||
</p><p>
|
||||
This command can retrieve just a specific commit, or go all
|
||||
the way to performing a full mirror of the remote
|
||||
repository. If no <code class="literal">BRANCH</code> is specified,
|
||||
all configured branches are retrieved.
|
||||
</p><p>
|
||||
A special syntax in the <code class="literal">@</code> character allows
|
||||
specifying a specific commit to retrieve from a branch. The
|
||||
use cases for this are somewhat similar to pulling a specific
|
||||
git tag; one could e.g. script a system upgrade to a known-good
|
||||
version, rather than the latest from the content provider.
|
||||
</p></div><div class="refsect1"><a name="id1339"></a><h2>Example</h2><p><span class="command"><strong>$ ostree --repo=repo pull --depth=-1 --mirror remote_name</strong></span></p><p>Perform a complete mirror of the remote. (This is
|
||||
likely most useful if your repository is also
|
||||
<code class="literal">archive</code> mode)</p><p><span class="command"><strong>$ ostree --repo=repo pull remote_name exampleos/x86_64/standard</strong></span></p><p>Fetch the most recent commit to <code class="literal">exampleos/x86_64/standard</code>.</p><p><span class="command"><strong>$ ostree --repo=repo pull remote_name exampleos/x86_64/standard@98ea6e4f216f2fb4b69fff9b3a44842c38686ca685f3f55dc48c5d3fb1107be4</strong></span></p><p>Download the specific commit starting with
|
||||
<code class="literal">98ea6e</code> as if it was the latest commit for
|
||||
<code class="literal">exampleos/x86_64/standard</code>.</p></div></div></body></html>
|
36
man/ostree-refs.html
Normal file
@ -0,0 +1,36 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ostree refs</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="ostree"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ostree-refs — List refs</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">ostree refs</code> [OPTIONS...] [PREFIX]</p></div><div class="cmdsynopsis"><p><code class="command">ostree refs</code> {EXISTING} {--create=NEWREF}</p></div></div><div class="refsect1"><a name="id1337"></a><h2>Description</h2><p>
|
||||
Lists all refs available on the host. If specified, PREFIX assigns the refspec prefix; default
|
||||
prefix is null, which lists all refs. This command can also be used to create or delete refs.
|
||||
</p></div><div class="refsect1"><a name="id1338"></a><h2>Options</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">--list</code></span></dt><dd><p> For historical reasons, <code class="literal">refs</code>
|
||||
without this option will strip the specified prefix
|
||||
from the output. Normally, one wants to see the full
|
||||
ref, so providing this option ensures the refs are
|
||||
printed in full, rather than
|
||||
truncated. </p></dd><dt><span class="term"><code class="option">--create</code>=NEWREF</span></dt><dd><p>
|
||||
Create a ref pointing to the commit EXISTING. NEWREF must not already exist, and EXISTING
|
||||
must be an existing commit. More than one ref can point to the same commit.
|
||||
</p></dd><dt><span class="term"><code class="option">--delete</code></span></dt><dd><p>
|
||||
Delete refs which match PREFIX, rather than listing them. If you are trying to reclaim space,
|
||||
you will then need to <span class="command"><strong>ostree prune</strong></span> or <span class="command"><strong>ostree admin cleanup</strong></span>.
|
||||
</p></dd><dt><span class="term"><code class="option">--revision</code>, <code class="option">-r</code></span></dt><dd><p>
|
||||
When listing refs, also print their revisions. The revisions
|
||||
will be separated by a tab character.
|
||||
</p></dd><dt><span class="term"><code class="option">--alias</code>, <code class="option">-A</code></span></dt><dd><p>
|
||||
If used with <code class="option">--create</code>, create an alias. Otherwise just list aliases.
|
||||
</p></dd><dt><span class="term"><code class="option">--collections</code>, <code class="option">-c</code></span></dt><dd><p>
|
||||
Enable interactions with refs using the combination of their
|
||||
collection IDs and ref names. When listing refs, this changes
|
||||
the output format to include collection IDs, and enables
|
||||
listing remote mirrored refs.</p><p>When creating refs, the refspec value passed to the
|
||||
<code class="option">--create</code> option is treated as
|
||||
<code class="literal">COLLECTION-ID:REF-NAME</code> and a mirrored ref
|
||||
is created. (This is an abuse of the refspec syntax.)</p><p>When deleting refs, all refs whose collection ID equals
|
||||
PREFIX are deleted.
|
||||
</p></dd><dt><span class="term"><code class="option">--force</code></span></dt><dd><p>
|
||||
When creating <code class="literal">NEWREF</code> with
|
||||
<code class="option">--create</code>, allow an existing ref to be
|
||||
updated instead of erroring.
|
||||
</p></dd></dl></div></div><div class="refsect1"><a name="id1339"></a><h2>Example</h2><p><span class="command"><strong>$ ostree refs</strong></span></p><pre class="programlisting">
|
||||
my-branch
|
||||
gnome-ostree/buildmain/x86_64-runtime
|
||||
</pre></div></div></body></html>
|
60
man/ostree-remote.html
Normal file
@ -0,0 +1,60 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ostree remote</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="ostree"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ostree-remote — Control remote repository configuration</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">ostree remote add</code> [OPTIONS...] {NAME} {URL} [BRANCH...]</p></div><div class="cmdsynopsis"><p><code class="command">ostree remote delete</code> {NAME}</p></div><div class="cmdsynopsis"><p><code class="command">ostree remote show-url</code> {NAME}</p></div><div class="cmdsynopsis"><p><code class="command">ostree remote list</code> [OPTIONS...] {NAME}</p></div><div class="cmdsynopsis"><p><code class="command">ostree remote gpg-import</code> [OPTIONS...] {NAME} [KEY-ID...]</p></div><div class="cmdsynopsis"><p><code class="command">ostree remote gpg-list-keys</code> {NAME}</p></div><div class="cmdsynopsis"><p><code class="command">ostree remote refs</code> {NAME}</p></div><div class="cmdsynopsis"><p><code class="command">ostree remote summary</code> [OPTIONS...] {NAME}</p></div><div class="cmdsynopsis"><p><code class="command">ostree remote add-cookie</code> {NAME} {DOMAIN} {PATH} {COOKIE_NAME} {VALUE}</p></div><div class="cmdsynopsis"><p><code class="command">ostree remote delete-cookie</code> {NAME} {DOMAIN} {PATH} {COOKIE_NAME} {VALUE}</p></div><div class="cmdsynopsis"><p><code class="command">ostree remote list-cookies</code> {NAME}</p></div></div><div class="refsect1"><a name="id1337"></a><h2>Description</h2><p>
|
||||
Changes remote repository configurations. The NAME refers to the name of the remote.
|
||||
</p><p>
|
||||
The <code class="literal">BRANCH</code> arguments to the
|
||||
<span class="command"><strong>add</strong></span> subcommand specifies the configured branches
|
||||
for the remote. See the <code class="literal">branches</code> section in
|
||||
<a href="ostree.repo-config.html"><span class="citerefentry"><span class="refentrytitle">ostree.repo-config</span>(5)</span></a>
|
||||
for more information.
|
||||
</p><p>
|
||||
The <span class="command"><strong>gpg-import</strong></span> subcommand can associate GPG
|
||||
keys to a specific remote repository for use when pulling signed
|
||||
commits from that repository (if GPG verification is enabled). The
|
||||
<span class="command"><strong>gpg-list-keys</strong></span> subcommand can be used to see the
|
||||
GPG keys currently associated with a remote repository.
|
||||
</p><p>
|
||||
The GPG keys to import may be in binary OpenPGP format or ASCII armored. The optional [KEY-ID] list can restrict which keys are imported from a keyring file or input stream. All keys are imported if this list is omitted. If neither <code class="option">--keyring</code> nor <code class="option">--stdin</code> options are given, then keys are imported from the user's personal GPG keyring.
|
||||
</p><p>
|
||||
The various cookie related command allow management of a remote specific cookie jar.
|
||||
</p></div><div class="refsect1"><a name="id1338"></a><h2>'Add' Options</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">--set</code>="KEY=VALUE"</span></dt><dd><p>
|
||||
Set config option KEY=VALUE for remote.
|
||||
</p></dd><dt><span class="term"><code class="option">--if-not-exists</code></span></dt><dd><p>
|
||||
Do nothing if the provided remote exists.
|
||||
</p></dd><dt><span class="term"><code class="option">--force</code></span></dt><dd><p>
|
||||
Replace the provided remote if it exists.
|
||||
</p></dd><dt><span class="term"><code class="option">--no-gpg-verify</code></span></dt><dd><p>
|
||||
Disable GPG verification.
|
||||
</p></dd><dt><span class="term"><code class="option">--gpg-import</code>=FILE</span></dt><dd><p>
|
||||
Import one or more GPG keys from a file.
|
||||
</p><p>
|
||||
Equivalent to
|
||||
<span class="command"><strong>ostree remote gpg-import --keyring=FILE</strong></span>.
|
||||
</p></dd><dt><span class="term"><code class="option">--collection-id</code>=COLLECTION-ID</span></dt><dd><p>
|
||||
Set the collection ID for the remote to a value provided by
|
||||
the repository owner, which allows refs from this remote to be
|
||||
shared peer to peer.
|
||||
</p></dd></dl></div></div><div class="refsect1"><a name="id1339"></a><h2>'List' Options</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">-u, --show-urls</code></span></dt><dd><p>
|
||||
Show remote URLs in list
|
||||
</p></dd></dl></div></div><div class="refsect1"><a name="id1340"></a><h2>'Refs' Options</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">--revision</code>, <code class="option">-r</code></span></dt><dd><p>
|
||||
Also print the revisions for each ref. The revisions will
|
||||
be separated by a tab character.
|
||||
</p></dd></dl></div><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">--cache-dir</code>=DIR</span></dt><dd><p>
|
||||
Use an alternate cache directory in <code class="literal">DIR</code>.
|
||||
</p></dd></dl></div></div><div class="refsect1"><a name="id1341"></a><h2>'GPG-Import' Options</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">-k, --keyring</code>=FILE</span></dt><dd><p>
|
||||
Import one or more keys from a file.
|
||||
</p><p>
|
||||
This option may be repeated to import from multiple files,
|
||||
but may not be used in combination with
|
||||
<code class="option">--stdin</code>.
|
||||
</p></dd><dt><span class="term"><code class="option">--stdin</code></span></dt><dd><p>
|
||||
Import one or more keys from standard input.
|
||||
</p><p>
|
||||
This option may not be used in combination with
|
||||
<code class="option">--keyring</code>.
|
||||
</p></dd></dl></div></div><div class="refsect1"><a name="id1342"></a><h2>'Summary' Options</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">--cache-dir</code>=DIR</span></dt><dd><p>
|
||||
Use an alternate cache directory in <code class="literal">DIR</code>.
|
||||
</p></dd><dt><span class="term"><code class="option">--raw</code></span></dt><dd><p>
|
||||
Show raw variant data
|
||||
</p></dd></dl></div></div><div class="refsect1"><a name="id1343"></a><h2>Example</h2><p><span class="command"><strong>$ ostree remote show-url local</strong></span></p><pre class="programlisting">
|
||||
http://192.168.122.1/repo
|
||||
</pre></div></div></body></html>
|
15
man/ostree-reset.html
Normal file
@ -0,0 +1,15 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ostree reset</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="ostree"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ostree-reset — Reset a ref to a previous commit</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">ostree reset </code> {REF} {REF_TO_RESET_TO}</p></div></div><div class="refsect1"><a name="id1337"></a><h2>Description</h2><p>
|
||||
Given a commit, this command will reset the ref to a previous specified commit.
|
||||
</p></div><div class="refsect1"><a name="id1338"></a><h2>Example</h2><p><span class="command"><strong>$ ostree log my-branch</strong></span></p><pre class="programlisting">
|
||||
commit 67e382b11d213a402a5313e61cbc69dfd5ab93cb07
|
||||
Date: 2014-06-12 13:42:54 +0000
|
||||
This is the second commit
|
||||
|
||||
commit ce19c41036cc45e49b0cecf6b157523c2105c4de1c
|
||||
Date: 2014-06-12 11:20:08 +0000
|
||||
Initial commit
|
||||
</pre><p><span class="command"><strong>$ ostree reset my-branch my-branch^</strong></span></p><p><span class="command"><strong>$ ostree log my-branch</strong></span></p><pre class="programlisting">
|
||||
commit ce19c41036cc45e49b0cecf6b157523c2105c4de1c
|
||||
Date: 2014-06-12 11:20:08 +0000
|
||||
Initial commit
|
||||
</pre></div></div></body></html>
|
7
man/ostree-rev-parse.html
Normal file
@ -0,0 +1,7 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ostree rev-parse</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="ostree"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ostree-rev-parse — Output the target of a rev</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">ostree rev-parse </code> {REV} {PATH}</p></div></div><div class="refsect1"><a name="id1337"></a><h2>Options</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">--single</code>, <code class="option">-S</code></span></dt><dd><p>
|
||||
If the repository has exactly one commit, then print it; any other case will result in an error.
|
||||
</p></dd></dl></div></div><div class="refsect1"><a name="id1338"></a><h2>Description</h2><p>
|
||||
Given a REV, outputs the checksum of the latest commit of that revision.
|
||||
</p></div><div class="refsect1"><a name="id1339"></a><h2>Example</h2><p><span class="command"><strong>$ ostree rev-parse my-branch</strong></span></p><pre class="programlisting">
|
||||
ce19c41036cc45e49b0cecf6b157523c2105c4de1ce30101def1f759daafcc3e
|
||||
</pre></div></div></body></html>
|
27
man/ostree-show.html
Normal file
@ -0,0 +1,27 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ostree show</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="ostree"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ostree-show — Output a metadata object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">ostree show</code> [OPTIONS...] {OBJECT}</p></div></div><div class="refsect1"><a name="id1337"></a><h2>Description</h2><p>
|
||||
Given an object, shows the metadata for that object. For a particular revision, it will show the data for the most recent commit to that revision.
|
||||
</p></div><div class="refsect1"><a name="id1338"></a><h2>Options</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">--print-related</code></span></dt><dd><p>
|
||||
Show the "related" commits.
|
||||
</p></dd><dt><span class="term"><code class="option">--print-variant-type</code>="TYPE"</span></dt><dd><p>
|
||||
Memory map <em class="replaceable"><code>OBJECT</code></em> (in this case a filename) to the GVariant type string.
|
||||
</p></dd><dt><span class="term"><code class="option">--list-metadata-keys</code></span></dt><dd><p>
|
||||
List the available metadata keys.
|
||||
</p></dd><dt><span class="term"><code class="option">--print-metadata-key</code>="KEY"</span></dt><dd><p>
|
||||
Print string value of metadata key.
|
||||
</p></dd><dt><span class="term"><code class="option">--list-detached-metadata-keys</code></span></dt><dd><p>
|
||||
List the available detached metadata keys.
|
||||
</p></dd><dt><span class="term"><code class="option">--print-detached-metadata-key</code>="KEY"</span></dt><dd><p>
|
||||
Print string value of detached metadata key.
|
||||
</p></dd><dt><span class="term"><code class="option">--print-sizes</code></span></dt><dd><p>
|
||||
Show the commit size metadata. This in only supported for
|
||||
commits that contain <code class="varname">ostree.sizes</code>
|
||||
metadata. This can be included when creating commits with
|
||||
<span class="command"><strong>ostree commit --generate-sizes</strong></span>.
|
||||
</p></dd><dt><span class="term"><code class="option">--raw</code></span></dt><dd><p>
|
||||
Show raw variant data.
|
||||
</p></dd><dt><span class="term"><code class="option">--gpg-homedir</code>="HOMEDIR"</span></dt><dd><p>
|
||||
GPG home directory to use when looking for keyrings (if have GPGME - GNU Privacy Guard Made Easy).
|
||||
</p></dd></dl></div></div><div class="refsect1"><a name="id1339"></a><h2>Example</h2><p><span class="command"><strong>$ ostree show my-branch</strong></span></p><pre class="programlisting">
|
||||
commit 67e382b11d213a402a5313e61cbc69dfd5ab93cb07
|
||||
Date: 2014-06-12 13:42:54 +0000
|
||||
</pre></div></div></body></html>
|
35
man/ostree-sign.html
Normal file
@ -0,0 +1,35 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ostree sign</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="ostree"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ostree-sign — Sign a commit</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">ostree sign</code> [OPTIONS...] {COMMIT} {KEY-ID...}</p></div></div><div class="refsect1"><a name="id1337"></a><h2>Description</h2><p>
|
||||
Add a new signature to a commit.
|
||||
|
||||
Note that currently, this will append a new signature even if
|
||||
the commit is already signed with a given key.
|
||||
</p><p>
|
||||
There are several "well-known" system places for `ed25519` trusted and revoked public keys -- expected single <code class="literal">base64</code>-encoded key per line.
|
||||
</p><p>Files:
|
||||
</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><code class="filename">/etc/ostree/trusted.ed25519</code></p></li><li class="listitem"><p><code class="filename">/etc/ostree/revoked.ed25519</code></p></li><li class="listitem"><p><code class="filename">/usr/share/ostree/trusted.ed25519</code></p></li><li class="listitem"><p><code class="filename">/usr/share/ostree/revoked.ed25519</code></p></li></ul></div><p>
|
||||
</p><p>Directories containing files with keys:
|
||||
</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><code class="filename">/etc/ostree/trusted.ed25519.d</code></p></li><li class="listitem"><p><code class="filename">/etc/ostree/revoked.ed25519.d</code></p></li><li class="listitem"><p><code class="filename">/usr/share/ostree/trusted.ed25519.d</code></p></li><li class="listitem"><p><code class="filename">/usr/share/ostree/rvokeded.ed25519.d</code></p></li></ul></div><p>
|
||||
</p></div><div class="refsect1"><a name="id1338"></a><h2>Options</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">KEY-ID</code></span></dt><dd><p>
|
||||
</p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">for ed25519:</code></span></dt><dd><p>
|
||||
<code class="literal">base64</code>-encoded secret (for signing) or public key (for verifying).
|
||||
</p></dd><dt><span class="term"><code class="option">for dummy:</code></span></dt><dd><p>
|
||||
ASCII-string used as secret key and public key.
|
||||
</p></dd></dl></div><p>
|
||||
</p></dd><dt><span class="term"><code class="option">--verify</code></span></dt><dd><p>
|
||||
Verify signatures
|
||||
</p></dd><dt><span class="term"><code class="option">-s, --sign-type</code></span></dt><dd><p>
|
||||
Use particular signature mechanism. Currently
|
||||
available ed25519 and dummy
|
||||
signature types.
|
||||
|
||||
The default is ed25519 .
|
||||
</p></dd><dt><span class="term"><code class="option">--keys-file</code></span></dt><dd><p>
|
||||
Read key(s) from file <code class="filename">filename</code>.
|
||||
</p><p>
|
||||
Valid for <code class="literal">ed25519</code> signature type.
|
||||
For <code class="literal">ed25519</code> this file must contain <code class="literal">base64</code>-encoded
|
||||
secret key(s) (for signing) or public key(s) (for verifying) per line.
|
||||
</p></dd><dt><span class="term"><code class="option">--keys-dir</code></span></dt><dd><p>
|
||||
Redefine the system path, where to search files and subdirectories with
|
||||
well-known and revoked keys.
|
||||
</p></dd></dl></div></div></div></body></html>
|
35
man/ostree-state-overlay@.service.html
Normal file
@ -0,0 +1,35 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ostree-state-overlay</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="ostree-state-overlay@.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ostree-state-overlay@.service — Set up state overlays</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">ostree-state-overlay@.service</code></p></div><div class="refsect1"><a name="id1337"></a><h2>Experimental</h2><p>
|
||||
<span class="bold"><strong>Note this feature is currently considered
|
||||
experimental.</strong></span> It may not work correctly and some of its
|
||||
semantics may be subject to change. Positive or negative feedback are both
|
||||
welcome and may be provided at
|
||||
<a class="ulink" href="https://github.com/ostreedev/ostree/discussions" target="_top">https://github.com/ostreedev/ostree/discussions</a>. If using
|
||||
the feature via rpm-ostree, feedback may also be provided at
|
||||
<a class="ulink" href="https://github.com/coreos/rpm-ostree/issues/233" target="_top">https://github.com/coreos/rpm-ostree/issues/233</a>.
|
||||
</p></div><div class="refsect1"><a name="id1338"></a><h2>Description</h2><p>
|
||||
In some cases, it's useful to be able to have a directory as part of the
|
||||
OSTree commit yet still have this directory be writable client-side. One
|
||||
example is software that ships in <code class="filename">/opt</code>.
|
||||
<code class="filename">/opt</code> is its own vendor-namespaced alternate file
|
||||
hierarchy which may contain both code and state. With state overlays, it's
|
||||
possible to have the code part baked in the OSTree, but still allowing the
|
||||
directory to be writable so that state can be kept there.
|
||||
</p><p>
|
||||
Since it's writable, nothing prevents sufficiently privileged code to
|
||||
modify or delete content that comes from the OSTree commit. This is in
|
||||
sharp contrast with content in <code class="filename">/usr</code>, and more
|
||||
closely matches a package manager-based distro.
|
||||
</p><p>
|
||||
Crucially, this state is automatically rebased during upgrades (or more
|
||||
generally, anytime a different OSTree commit is booted). The semantics
|
||||
of the rebase are as follows: any state file or directory that modified
|
||||
OSTree content is deleted, otherwise it is kept and merged onto the new
|
||||
base content (using overlayfs). This mostly matches the semantics of a
|
||||
package manager.
|
||||
</p><p>
|
||||
To enable this feature, simply instantiate the unit template, using the
|
||||
target path (in escaped systemd path notation) as the instance name. For
|
||||
example, to enable it on <code class="filename">/opt</code>:
|
||||
</p><div class="literallayout"><p><br>
|
||||
$ systemctl enable --now ostree-state-overlay@opt.service<br>
|
||||
</p></div></div></div></body></html>
|
68
man/ostree-static-delta.html
Normal file
@ -0,0 +1,68 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ostree static-delta</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="ostree"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ostree-static-delta — Manage static delta files</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">ostree static-delta list</code> </p></div><div class="cmdsynopsis"><p><code class="command">ostree static-delta show</code> </p></div><div class="cmdsynopsis"><p><code class="command">ostree static-delta delete</code> </p></div><div class="cmdsynopsis"><p><code class="command">ostree static-delta generate</code> {--to=REV} [OPTIONS...]</p></div><div class="cmdsynopsis"><p><code class="command">ostree static-delta apply-offline</code> [OPTIONS...] {PATH} [KEY-ID...]</p></div><div class="cmdsynopsis"><p><code class="command">ostree static-delta verify</code> [OPTIONS...] {STATIC-DELTA} [KEY-ID...]</p></div></div><div class="refsect1"><a name="id1337"></a><h2>Description</h2><p>
|
||||
List and manipulate static delta files.
|
||||
</p></div><div class="refsect1"><a name="id1338"></a><h2>'Generate' Options</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">--from</code>="REV"</span></dt><dd><p>
|
||||
Create delta from revision REV.
|
||||
</p></dd><dt><span class="term"><code class="option">--to</code>="REV"</span></dt><dd><p>
|
||||
Create delta to revision REV. (This option is required.)
|
||||
The delta is from the parent of REV, unless specified otherwise by <code class="option">--from</code>
|
||||
or <code class="option">--empty</code>.
|
||||
</p></dd><dt><span class="term"><code class="option">--empty</code></span></dt><dd><p>
|
||||
Create delta from scratch.
|
||||
</p></dd><dt><span class="term"><code class="option">--max-usize</code>=SIZE</span></dt><dd><p>
|
||||
Maximum uncompressed size in megabytes.
|
||||
</p></dd><dt><span class="term"><code class="option">--sign-type</code>=ENGINE</span></dt><dd><p>
|
||||
Use particular signature engine. Currently
|
||||
available ed25519 and dummy
|
||||
signature types.
|
||||
|
||||
The default is ed25519 .
|
||||
</p></dd><dt><span class="term"><code class="option">--sign</code>="KEY-ID"</span></dt><dd><p>
|
||||
There <code class="literal">KEY-ID</code> is:
|
||||
</p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">for ed25519:</code></span></dt><dd><p>
|
||||
<code class="literal">base64</code>-encoded secret key for signing.
|
||||
</p></dd><dt><span class="term"><code class="option">for dummy:</code></span></dt><dd><p>
|
||||
ASCII-string used as secret key.
|
||||
</p></dd></dl></div><p>
|
||||
</p></dd></dl></div></div><div class="refsect1"><a name="id1339"></a><h2>'Apply-offline' Options</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">KEY-ID</code></span></dt><dd><p>
|
||||
</p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">for ed25519:</code></span></dt><dd><p>
|
||||
<code class="literal">base64</code>-encoded public key for verifying.
|
||||
</p></dd><dt><span class="term"><code class="option">for dummy:</code></span></dt><dd><p>
|
||||
ASCII-string used as public key.
|
||||
</p></dd></dl></div><p>
|
||||
</p></dd><dt><span class="term"><code class="option">--sign-type</code>=ENGINE</span></dt><dd><p>
|
||||
Use particular signature engine. Currently
|
||||
available ed25519 and dummy
|
||||
signature types.
|
||||
</p></dd><dt><span class="term"><code class="option">--keys-file</code></span></dt><dd><p>
|
||||
Read key(s) from file <code class="filename">filename</code>.
|
||||
</p><p>
|
||||
Valid for <code class="literal">ed25519</code> signature type.
|
||||
For <code class="literal">ed25519</code> this file must contain <code class="literal">base64</code>-encoded
|
||||
public key(s) per line for verifying.
|
||||
</p></dd><dt><span class="term"><code class="option">--keys-dir</code></span></dt><dd><p>
|
||||
Redefine the system path, where to search files and subdirectories with
|
||||
well-known and revoked keys.
|
||||
</p></dd></dl></div></div><div class="refsect1"><a name="id1340"></a><h2>'Verify' Options</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">KEY-ID</code></span></dt><dd><p>
|
||||
</p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">for ed25519:</code></span></dt><dd><p>
|
||||
<code class="literal">base64</code>-encoded public key for verifying.
|
||||
</p></dd><dt><span class="term"><code class="option">for dummy:</code></span></dt><dd><p>
|
||||
ASCII-string used as public key.
|
||||
</p></dd></dl></div><p>
|
||||
</p></dd><dt><span class="term"><code class="option">--sign-type</code>=ENGINE</span></dt><dd><p>
|
||||
Use particular signature engine. Currently
|
||||
available ed25519 and dummy
|
||||
signature types.
|
||||
|
||||
The default is ed25519 .
|
||||
</p></dd><dt><span class="term"><code class="option">--keys-file</code></span></dt><dd><p>
|
||||
Read key(s) from file <code class="filename">filename</code>.
|
||||
</p><p>
|
||||
Valid for <code class="literal">ed25519</code> signature type.
|
||||
For <code class="literal">ed25519</code> this file must contain <code class="literal">base64</code>-encoded
|
||||
public key(s) per line for verifying.
|
||||
</p></dd><dt><span class="term"><code class="option">--keys-dir</code></span></dt><dd><p>
|
||||
Redefine the system path, where to search files and subdirectories with
|
||||
well-known and revoked keys.
|
||||
</p></dd></dl></div></div><div class="refsect1"><a name="id1341"></a><h2>Example</h2><p><span class="command"><strong>$ ostree static-delta</strong></span></p><pre class="programlisting">
|
||||
(No static deltas)
|
||||
</pre></div></div></body></html>
|
52
man/ostree-summary.html
Normal file
@ -0,0 +1,52 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ostree summary</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="ostree"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ostree-summary — Regenerate or view the summary metadata file</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">ostree summary</code> [--gpg-sign=KEYID] [--gpg-homedir=HOMEDIR] [--sign=KEYID] [--sign-type=ENGINE] {--update} [--add-metadata=<em class="replaceable"><code>KEY</code></em>=<em class="replaceable"><code>VALUE</code></em>...]</p></div><div class="cmdsynopsis"><p><code class="command">ostree summary</code> { --view | --raw }</p></div></div><div class="refsect1"><a name="id1337"></a><h2>Description</h2><p>
|
||||
The <code class="filename">summary</code> file is an optional higher
|
||||
level form of repository metadata that describes the
|
||||
available branches. It needs to be manually regenerated after
|
||||
a series of commits. Among other things, this allows atomically
|
||||
updating multiple commits.
|
||||
</p></div><div class="refsect1"><a name="id1338"></a><h2>Options</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">--update</code>,<code class="option">-u</code></span></dt><dd><p>
|
||||
Update the summary file. This option can be combined
|
||||
with <code class="option">--add-metadata</code> to add metadata
|
||||
fields to the summary.
|
||||
</p><p>If the repository has a collection ID configured, the
|
||||
<code class="filename">ostree-metadata</code> branch for that collection ID
|
||||
will also be updated with a new commit containing the given metadata,
|
||||
which will be signed if the summary file is signed.</p></dd><dt><span class="term"><code class="option">--add-metadata</code>,<code class="option">-m</code>=KEY=VALUE</span></dt><dd><p>
|
||||
Specify an additional metadata field to add to the summary.
|
||||
It must be in the format
|
||||
<span class="command"><strong><em class="replaceable"><code>KEY</code></em>=<em class="replaceable"><code>VALUE</code></em></strong></span>
|
||||
or as two separate arguments. The keys must be namespaced
|
||||
for your organisation or repository using a dot prefix. The
|
||||
values must be in GVariant text format. For example,
|
||||
<span class="command"><strong>exampleos.end-of-life "@t 1445385600"</strong></span>.
|
||||
This option can be used multiple times.
|
||||
</p></dd><dt><span class="term"><code class="option">--view</code>,<code class="option">-v</code></span></dt><dd><p>
|
||||
View the contents of the summary file in a human readable format.
|
||||
</p></dd><dt><span class="term"><code class="option">--raw</code></span></dt><dd><p>
|
||||
View the raw bytes of the summary file.
|
||||
</p></dd><dt><span class="term"><code class="option">--gpg-sign</code>=KEYID</span></dt><dd><p>
|
||||
GPG Key ID to sign the summary with.
|
||||
</p></dd><dt><span class="term"><code class="option">--gpg-homedir</code>=HOMEDIR</span></dt><dd><p>
|
||||
GPG Homedir to use when looking for keyrings.
|
||||
</p></dd><dt><span class="term"><code class="option">--sign-type</code>=ENGINE</span></dt><dd><p>
|
||||
Use particular signature engine. Currently
|
||||
available ed25519 and dummy
|
||||
signature types.
|
||||
|
||||
The default is ed25519 .
|
||||
</p></dd><dt><span class="term"><code class="option">--sign</code>="KEY-ID"</span></dt><dd><p>
|
||||
There <code class="literal">KEY-ID</code> is:
|
||||
</p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">for ed25519:</code></span></dt><dd><p>
|
||||
<code class="literal">base64</code>-encoded secret key for commit signing.
|
||||
</p></dd><dt><span class="term"><code class="option">for dummy:</code></span></dt><dd><p>
|
||||
ASCII-string used as secret key.
|
||||
</p></dd></dl></div><p>
|
||||
</p></dd></dl></div></div><div class="refsect1"><a name="id1339"></a><h2>Examples</h2><p><span class="command"><strong>$ ostree summary -u</strong></span></p><p><span class="command"><strong>$ ostree summary -u -m key="'value'"</strong></span></p><p><span class="command"><strong>$ ostree summary -v</strong></span></p><pre class="programlisting">
|
||||
* ostree/1/1/0
|
||||
Latest Commit (4.2 MB):
|
||||
9828ab80f357459b4ab50f0629beab2ae3b67318fc3d161d10a89fae353afa90
|
||||
Timestamp (ostree.commit.timestamp): 2017-11-21T01:41:10-08
|
||||
Version (ostree.commit.version): 1.2.3
|
||||
|
||||
Last-Modified (ostree.summary.last-modified): 2018-01-12T22:06:38-08
|
||||
</pre></div></div></body></html>
|
194
man/ostree.html
Normal file
@ -0,0 +1,194 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ostree</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="ostree"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ostree — Manage multiple bootable versioned filesystem trees</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">ostree</code> {COMMAND} [OPTIONS...]</p></div></div><div class="refsect1"><a name="id1337"></a><h2>Description</h2><p>
|
||||
OSTree is a tool for managing multiple bootable
|
||||
versioned filesystem trees, or just "tree" for
|
||||
short. In the OSTree model, operating systems no
|
||||
longer live in the physical "/" root directory.
|
||||
Instead, they parallel install to the new toplevel
|
||||
<code class="filename">/ostree</code> directory. Each
|
||||
installed system gets its own
|
||||
<code class="filename">/ostree/deploy/<em class="replaceable"><code>stateroot</code></em></code>
|
||||
directory. (<code class="literal">stateroot</code> is the
|
||||
newer term for <code class="literal">osname</code>).
|
||||
</p><p>
|
||||
Unlike <code class="literal">rpm</code> or
|
||||
<code class="literal">dpkg</code>, OSTree is only aware of
|
||||
complete filesystem trees. It has no built-in
|
||||
knowledge of what components went into creating the
|
||||
filesystem tree.
|
||||
</p><p>
|
||||
It is possible to use OSTree in several modes; the
|
||||
most basic form is to replicate pre-built trees from
|
||||
a build server. Usually, these pre-built trees are
|
||||
derived from packages. You might also be using
|
||||
OSTree underneath a higher level tool which computes
|
||||
filesystem trees locally.
|
||||
</p><p>
|
||||
It must be emphasized that OSTree only supports
|
||||
<span class="emphasis"><em>read-only</em></span> trees. To change to
|
||||
a different tree (upgrade, downgrade, install
|
||||
software), a new tree is checked out, and a 3-way
|
||||
merge of configuration is performed. The currently
|
||||
running tree is not ever modified; the new tree will
|
||||
become active on a system reboot.
|
||||
</p><p>
|
||||
To see the man page for a command run <span class="command"><strong>man ostree <em class="replaceable"><code>COMMAND</code></em></strong></span> or <span class="command"><strong>man ostree-admin <em class="replaceable"><code>COMMAND</code></em></strong></span>
|
||||
</p></div><div class="refsect1"><a name="id1338"></a><h2>Options</h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">--repo</code></span></dt><dd><p>
|
||||
For most commands, a repository is
|
||||
required. If unspecified, the current
|
||||
directory is used if it appears to be an
|
||||
OSTree repository. If it isn't, either
|
||||
the <code class="envar">OSTREE_REPO</code>
|
||||
environment variable is used, or the
|
||||
system repository located at
|
||||
<code class="filename">/sysroot/ostree/repo</code>.
|
||||
</p></dd><dt><span class="term"><code class="option">-v, --verbose</code></span></dt><dd><p>
|
||||
Produce debug level output.
|
||||
</p></dd><dt><span class="term"><code class="option">--version</code></span></dt><dd><p>
|
||||
Print version information, including the features enabled
|
||||
at compile time, and exit.
|
||||
</p></dd></dl></div></div><div class="refsect1"><a name="id1339"></a><h2>Commands</h2><p>System administrators will primarily interact
|
||||
with OSTree via the subcommand <span class="command"><strong>ostree
|
||||
admin</strong></span>.</p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><a href="ostree-admin-cleanup.html"><span class="citerefentry"><span class="refentrytitle">ostree-admin-cleanup</span>(1)</span></a></span></dt><dd><p>
|
||||
Delete untagged
|
||||
deployments and repository objects.
|
||||
</p></dd><dt><span class="term"><a href="ostree-admin-config-diff.html"><span class="citerefentry"><span class="refentrytitle">ostree-admin-config-diff</span>(1)</span></a></span></dt><dd><p>
|
||||
See changes to
|
||||
<code class="filename">/etc</code> as compared
|
||||
to the current default (from
|
||||
<code class="filename">/usr/etc</code>).
|
||||
</p></dd><dt><span class="term"><a href="ostree-admin-deploy.html"><span class="citerefentry"><span class="refentrytitle">ostree-admin-deploy</span>(1)</span></a></span></dt><dd><p>
|
||||
Takes a particular
|
||||
commit or revision, and sets it up for
|
||||
the next boot.
|
||||
</p></dd><dt><span class="term"><a href="ostree-admin-init-fs.html"><span class="citerefentry"><span class="refentrytitle">ostree-admin-init-fs</span>(1)</span></a></span></dt><dd><p>
|
||||
Initialize a root filesystem
|
||||
in a specified path.
|
||||
</p></dd><dt><span class="term"><a href="ostree-admin-instutil.html"><span class="citerefentry"><span class="refentrytitle">ostree-admin-instutil</span>(1)</span></a></span></dt><dd><p>
|
||||
Utility functions intended primarily for operating system installation programs
|
||||
</p></dd><dt><span class="term"><a href="ostree-admin-os-init.html"><span class="citerefentry"><span class="refentrytitle">ostree-admin-os-init</span>(1)</span></a></span></dt><dd><p>
|
||||
Initialize the
|
||||
deployment location for an operating
|
||||
system with a specified name.
|
||||
</p></dd><dt><span class="term"><a href="ostree-admin-status.html"><span class="citerefentry"><span class="refentrytitle">ostree-admin-status</span>(1)</span></a></span></dt><dd><p>
|
||||
Show and list the deployments.
|
||||
</p></dd><dt><span class="term"><a href="ostree-admin-switch.html"><span class="citerefentry"><span class="refentrytitle">ostree-admin-switch</span>(1)</span></a></span></dt><dd><p>
|
||||
Choose a different ref
|
||||
to track from the same remote as the
|
||||
current tree.
|
||||
</p></dd><dt><span class="term"><a href="ostree-admin-undeploy.html"><span class="citerefentry"><span class="refentrytitle">ostree-admin-undeploy</span>(1)</span></a></span></dt><dd><p>
|
||||
Remove the previously
|
||||
<em class="replaceable"><code>INDEX</code></em>
|
||||
deployed tree from the bootloader
|
||||
configuration.
|
||||
</p></dd><dt><span class="term"><a href="ostree-admin-upgrade.html"><span class="citerefentry"><span class="refentrytitle">ostree-admin-upgrade</span>(1)</span></a></span></dt><dd><p>
|
||||
Download the latest version for the
|
||||
current ref, and deploy it.
|
||||
</p></dd></dl></div><p>Both administrators and operating system
|
||||
builders may interact with OSTree via the regular
|
||||
filesystem manipulation commands.
|
||||
</p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><a href="ostree-cat.html"><span class="citerefentry"><span class="refentrytitle">ostree-cat</span>(1)</span></a></span></dt><dd><p>
|
||||
Concatenate contents of files
|
||||
</p></dd><dt><span class="term"><a href="ostree-checkout.html"><span class="citerefentry"><span class="refentrytitle">ostree-checkout</span>(1)</span></a></span></dt><dd><p>
|
||||
Check out a commit into a filesystem tree.
|
||||
</p></dd><dt><span class="term"><a href="ostree-checksum.html"><span class="citerefentry"><span class="refentrytitle">ostree-checksum</span>(1)</span></a></span></dt><dd><p>
|
||||
Gives checksum of any file.
|
||||
</p></dd><dt><span class="term"><a href="ostree-commit.html"><span class="citerefentry"><span class="refentrytitle">ostree-commit</span>(1)</span></a></span></dt><dd><p>
|
||||
Given one or more
|
||||
trees, create a new commit using those contents.
|
||||
</p></dd><dt><span class="term"><a href="ostree-config.html"><span class="citerefentry"><span class="refentrytitle">ostree-config</span>(1)</span></a></span></dt><dd><p>
|
||||
Change settings.
|
||||
</p></dd><dt><span class="term"><a href="ostree-create-usb.html"><span class="citerefentry"><span class="refentrytitle">ostree-create-usb</span>(1)</span></a></span></dt><dd><p>
|
||||
Put the given refs on an external drive for P2P distribution.
|
||||
</p></dd><dt><span class="term"><a href="ostree-diff.html"><span class="citerefentry"><span class="refentrytitle">ostree-diff</span>(1)</span></a></span></dt><dd><p>
|
||||
Concisely list
|
||||
differences between the given refs.
|
||||
</p></dd><dt><span class="term"><a href="ostree-find-remotes.html"><span class="citerefentry"><span class="refentrytitle">ostree-find-remotes</span>(1)</span></a></span></dt><dd><p>
|
||||
Find remotes to serve the given refs.
|
||||
</p></dd><dt><span class="term"><a href="ostree-fsck.html"><span class="citerefentry"><span class="refentrytitle">ostree-fsck</span>(1)</span></a></span></dt><dd><p>
|
||||
Check a repository for consistency.
|
||||
</p></dd><dt><span class="term"><a href="ostree-init.html"><span class="citerefentry"><span class="refentrytitle">ostree-init</span>(1)</span></a></span></dt><dd><p>
|
||||
Initialize a new repository.
|
||||
</p></dd><dt><span class="term"><a href="ostree-log.html"><span class="citerefentry"><span class="refentrytitle">ostree-log</span>(1)</span></a></span></dt><dd><p>
|
||||
Show revision log.
|
||||
</p></dd><dt><span class="term"><a href="ostree-ls.html"><span class="citerefentry"><span class="refentrytitle">ostree-ls</span>(1)</span></a></span></dt><dd><p>
|
||||
List the contents of a given commit.
|
||||
</p></dd><dt><span class="term"><a href="ostree-prune.html"><span class="citerefentry"><span class="refentrytitle">ostree-prune</span>(1)</span></a></span></dt><dd><p>
|
||||
Search for unreachable objects.
|
||||
</p></dd><dt><span class="term"><a href="ostree-pull-local.html"><span class="citerefentry"><span class="refentrytitle">ostree-pull-local</span>(1)</span></a></span></dt><dd><p>
|
||||
Copy data from source-repo.
|
||||
</p></dd><dt><span class="term"><a href="ostree-pull.html"><span class="citerefentry"><span class="refentrytitle">ostree-pull</span>(1)</span></a></span></dt><dd><p>
|
||||
Download data from remote repo. If you have libsoup.
|
||||
</p></dd><dt><span class="term"><a href="ostree-refs.html"><span class="citerefentry"><span class="refentrytitle">ostree-refs</span>(1)</span></a></span></dt><dd><p>
|
||||
List refs.
|
||||
</p></dd><dt><span class="term"><a href="ostree-remote.html"><span class="citerefentry"><span class="refentrytitle">ostree-remote</span>(1)</span></a></span></dt><dd><p>
|
||||
Manipulate remote archive configuration.
|
||||
</p></dd><dt><span class="term"><a href="ostree-reset.html"><span class="citerefentry"><span class="refentrytitle">ostree-reset</span>(1)</span></a></span></dt><dd><p>
|
||||
Reset a ref to a previous commit.
|
||||
</p></dd><dt><span class="term"><a href="ostree-rev-parse.html"><span class="citerefentry"><span class="refentrytitle">ostree-rev-parse</span>(1)</span></a></span></dt><dd><p>
|
||||
Show the SHA256 corresponding to a given rev.
|
||||
</p></dd><dt><span class="term"><a href="ostree-show.html"><span class="citerefentry"><span class="refentrytitle">ostree-show</span>(1)</span></a></span></dt><dd><p>
|
||||
Given an OSTree SHA256 checksum, display its contents.
|
||||
</p></dd><dt><span class="term"><a href="ostree-static-delta.html"><span class="citerefentry"><span class="refentrytitle">ostree-static-delta</span>(1)</span></a></span></dt><dd><p>
|
||||
Manage static delta files.
|
||||
</p></dd><dt><span class="term"><a href="ostree-summary.html"><span class="citerefentry"><span class="refentrytitle">ostree-summary</span>(1)</span></a></span></dt><dd><p>
|
||||
Regenerate the repository summary metadata.
|
||||
</p></dd></dl></div></div><div class="refsect1"><a name="id1340"></a><h2>Examples</h2><p>
|
||||
For specific examples, please see the man page regarding the specific ostree command. For example:
|
||||
</p><p>
|
||||
<span class="command"><strong>man ostree init</strong></span> or <span class="command"><strong>man ostree-admin status</strong></span>
|
||||
</p></div><div class="refsect1"><a name="id1341"></a><h2>GPG verification</h2><p>
|
||||
OSTree supports signing commits with GPG. Operations on the system
|
||||
repository by default use keyring files in
|
||||
<code class="filename">/usr/share/ostree/trusted.gpg.d</code>. Any
|
||||
public key in a keyring file in that directory will be
|
||||
trusted by the client. No private keys should be present
|
||||
in this directory.
|
||||
</p><p>
|
||||
In addition to the system repository, OSTree supports two
|
||||
other paths. First, there is a
|
||||
<code class="literal">gpgkeypath</code> option for remotes, which must point
|
||||
to the filename of an ASCII-armored GPG key, or a directory containing
|
||||
ASCII-armored GPG keys to import. Multiple file and directory paths
|
||||
to import from can be specified, as a comma-separated list of paths. This option
|
||||
may be specified by using <span class="command"><strong>--set</strong></span> in <span class="command"><strong>ostree remote add</strong></span>.
|
||||
</p><p>
|
||||
Second, there is support for a per-remote
|
||||
<code class="filename"><em class="replaceable"><code>remotename</code></em>.trustedkeys.gpg</code>
|
||||
file stored in the toplevel of the repository (alongside
|
||||
<code class="filename">objects/</code> and such). This is
|
||||
particularly useful when downloading content that may not
|
||||
be fully trusted (e.g. you want to inspect it but not
|
||||
deploy it as an OS), or use it for containers. This file
|
||||
is written via <span class="command"><strong>ostree remote add
|
||||
--gpg-import</strong></span>.
|
||||
</p></div><div class="refsect1"><a name="id1342"></a><h2>Terminology</h2><p>
|
||||
The following terms are commonly used throughout the man pages. Terms in upper case letters
|
||||
are literals used in command line arguments.
|
||||
</p><div class="glosslist"><dl><dt><span class="glossterm"><code class="literal">BRANCH</code></span></dt><dd class="glossdef"><p>
|
||||
Branch name. Part of a <em class="glossterm"><code class="literal">REF</code></em>.
|
||||
</p></dd><dt><span class="glossterm"><code class="literal">CHECKSUM</code></span></dt><dd class="glossdef"><p>
|
||||
A SHA256 hash of a object stored in the OSTree repository. This can be a content,
|
||||
a dirtree, a dirmeta or a commit object. If the SHA256 hash of a commit object is
|
||||
meant, the term <em class="glossterm"><code class="literal">COMMIT</code></em> is used.
|
||||
</p></dd><dt><span class="glossterm"><code class="literal">COMMIT</code></span></dt><dd class="glossdef"><p>
|
||||
A SHA256 hash of a commit object.
|
||||
</p></dd><dt><span class="glossterm"><code class="literal">REF</code></span></dt><dd class="glossdef"><p>
|
||||
A reference to a particular commit. References are text files stored in
|
||||
<code class="filename">refs/</code> that name (refer to) a particular commit. A
|
||||
reference can only be the branch name part, in which case a local reference
|
||||
is used (e.g. <code class="literal">mybranch/stable</code>). If a remote branch
|
||||
is referred to, the remote name followed by a colon and the branch name
|
||||
needs to be used (e.g. <code class="literal">myremote:mybranch/stable</code>).
|
||||
</p></dd><dt><span class="glossterm"><code class="literal">REV</code></span>, <span class="glossterm"><code class="literal">REFSPEC</code></span></dt><dd class="glossdef"><p>
|
||||
A specific revision, a commit. This can be anything which can be resolved to a
|
||||
commit, e.g. a <em class="glossterm"><code class="literal">REF</code></em> or a
|
||||
<em class="glossterm"><code class="literal">COMMIT</code></em>.
|
||||
</p></dd><dt><span class="glossterm">SHA256</span></dt><dd class="glossdef"><p>
|
||||
A cryptographic hash function used to store objects in the OSTree
|
||||
repository. The hashes have a length of 256 bites and are typically
|
||||
shown and passed to ostree in its 64 ASCII character long hexadecimal
|
||||
representation
|
||||
(e.g. 0fc70ed33cfd7d26fe99ae29afb7682ddd0e2157a4898bd8cfcdc8a03565b870).
|
||||
</p></dd></dl></div></div><div class="refsect1"><a name="id1343"></a><h2>See Also</h2><p>
|
||||
<a href="ostree.repo.html"><span class="citerefentry"><span class="refentrytitle">ostree.repo</span>(5)</span></a>
|
||||
</p></div></div></body></html>
|
219
man/ostree.repo-config.html
Normal file
@ -0,0 +1,219 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ostree.repo-config</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="ostree.repo-config"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ostree.repo-config — OSTree repository configuration</p></div><div class="refsect1"><a name="id1337"></a><h2>Description</h2><p>
|
||||
The <code class="filename">config</code> file in an OSTree
|
||||
repository is a "keyfile" in the <a class="ulink" href="http://standards.freedesktop.org/desktop-entry-spec/latest/" target="_top">XDG
|
||||
Desktop Entry Specification</a> format. It has
|
||||
several global flags, as well as zero or more remote
|
||||
entries which describe how to access remote
|
||||
repositories.
|
||||
</p><p>
|
||||
See <a href="ostree.repo.html"><span class="citerefentry"><span class="refentrytitle">ostree.repo</span>(5)</span></a> for more information
|
||||
about OSTree repositories.
|
||||
</p></div><div class="refsect1"><a name="id1338"></a><h2>[core] Section Options</h2><p>
|
||||
Repository-global options. The following entries are defined:
|
||||
</p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="varname">mode</code></span></dt><dd><p>One of <code class="literal">bare</code>, <code class="literal">bare-user</code>, <code class="literal">bare-user-only</code>, or <code class="literal">archive-z2</code> (note that <code class="literal">archive</code> is used everywhere else.)</p></dd><dt><span class="term"><code class="varname">repo_version</code></span></dt><dd><p>Currently, this must be set to <code class="literal">1</code>.</p></dd><dt><span class="term"><code class="varname">auto-update-summary</code></span></dt><dd><p>Boolean value controlling whether or not to
|
||||
automatically update the summary file after any ref is added,
|
||||
removed, or updated. Other modifications which may render a
|
||||
summary file stale (like static deltas, or collection IDs) do
|
||||
not currently trigger an auto-update.
|
||||
</p></dd><dt><span class="term"><code class="varname">commit-update-summary</code></span></dt><dd><p>This option is deprecated. Use
|
||||
<code class="literal">auto-update-summary</code> instead, for which this
|
||||
option is now an alias.</p></dd><dt><span class="term"><code class="varname">fsync</code></span></dt><dd><p>Boolean value controlling whether or not to
|
||||
ensure files are on stable storage when performing operations
|
||||
such as commits, pulls, and checkouts. Defaults to
|
||||
<code class="literal">true</code>.</p><p>
|
||||
If you disable fsync, OSTree will no longer be robust
|
||||
against kernel crashes or power loss.
|
||||
</p><p>
|
||||
You might choose to disable this for local development
|
||||
repositories, under the assumption they can be recreated from
|
||||
source. Similarly, you could disable for a mirror where you could
|
||||
re-pull.
|
||||
</p><p>
|
||||
For the system repository, you might choose to disable fsync
|
||||
if you have uninterruptable power supplies and a well tested
|
||||
kernel.
|
||||
</p></dd><dt><span class="term"><code class="varname">per-object-fsync</code></span></dt><dd><p>By default, OSTree will batch fsync() after
|
||||
writing everything; however, this can cause latency spikes
|
||||
for other processes which are also invoking fsync().
|
||||
Turn on this boolean to reduce potential latency spikes,
|
||||
at the cost of slowing down OSTree updates. You most
|
||||
likely want this on by default for "background" OS updates.
|
||||
</p></dd><dt><span class="term"><code class="varname">min-free-space-percent</code></span></dt><dd><p>
|
||||
Integer percentage value (0-99) that specifies a minimum percentage
|
||||
of total space (in blocks) in the underlying filesystem to keep
|
||||
free. The default value is 3, which is enforced when neither this
|
||||
option nor <code class="varname">min-free-space-size</code> are set.
|
||||
</p><p>
|
||||
If <code class="varname">min-free-space-size</code> is set to a non-zero
|
||||
value, <code class="varname">min-free-space-percent</code> is ignored. Note
|
||||
that, <code class="varname">min-free-space-percent</code> is not enforced on
|
||||
metadata objects. It is assumed that metadata objects are relatively
|
||||
small in size compared to content objects and thus kept outside the
|
||||
scope of this option.
|
||||
</p></dd><dt><span class="term"><code class="varname">min-free-space-size</code></span></dt><dd><p>
|
||||
Value (in power-of-2 MB, GB or TB) that specifies a minimum space
|
||||
in the underlying filesystem to keep free. Examples of acceptable
|
||||
values: <code class="literal">500MB</code> (524 288 000 bytes),
|
||||
<code class="literal">1GB</code> (1 073 741 824 bytes),
|
||||
<code class="literal">1TB</code> (1 099 511 627 776 bytes).
|
||||
</p><p>
|
||||
If this option is set to a non-zero value, and
|
||||
<code class="varname">min-free-space-percent</code> is also set, this option
|
||||
takes priority. Note that, <code class="varname">min-free-space-size</code> is
|
||||
not enforced on metadata objects. It is assumed that metadata objects
|
||||
are relatively small in size compared to content objects and thus kept
|
||||
outside the scope of this option.
|
||||
</p></dd><dt><span class="term"><code class="varname">add-remotes-config-dir</code></span></dt><dd><p>
|
||||
Boolean value controlling whether new remotes will be added
|
||||
in the remotes configuration directory. Defaults to
|
||||
<code class="literal">true</code> for system ostree repositories. When
|
||||
this is <code class="literal">false</code>, remotes will be added in
|
||||
the repository's <code class="filename">config</code> file.
|
||||
</p><p>
|
||||
This only applies to repositories that use a remotes
|
||||
configuration directory such as system ostree repositories,
|
||||
which use <code class="filename">/etc/ostree/remotes.d</code>.
|
||||
Non-system repositories do not use a remotes configuration
|
||||
directory unless one is specified when the repository is
|
||||
opened.
|
||||
</p></dd><dt><span class="term"><code class="varname">payload-link-threshold</code></span></dt><dd><p>An integer value that specifies a minimum file size for creating
|
||||
a payload link. By default it is disabled.
|
||||
</p></dd><dt><span class="term"><code class="varname">collection-id</code></span></dt><dd><p>A reverse DNS domain name under your control, which enables peer
|
||||
to peer distribution of refs in this repository. See the
|
||||
<code class="literal">--collection-id</code> section in
|
||||
<a href="ostree-init.html"><span class="citerefentry"><span class="refentrytitle">ostree-init</span>(1)</span></a>
|
||||
</p></dd><dt><span class="term"><code class="varname">locking</code></span></dt><dd><p>Boolean value controlling whether or not OSTree does
|
||||
repository locking internally. This uses file locks and is
|
||||
hence for multiple process exclusion (e.g. Flatpak and OSTree
|
||||
writing to the same repository separately). This is enabled by
|
||||
default since 2018.5.
|
||||
</p></dd><dt><span class="term"><code class="varname">lock-timeout-secs</code></span></dt><dd><p>Integer value controlling the number of seconds to
|
||||
block while attempting to acquire a lock (see above). A value
|
||||
of -1 means block indefinitely. The default value is 300. This timeout
|
||||
is now regarded as a mistake; because it's likely to cause flakes.
|
||||
It's recommended to set it to -1, and have timeouts at a higher application
|
||||
level if desired.
|
||||
</p></dd><dt><span class="term"><code class="varname">default-repo-finders</code></span></dt><dd><p>Semicolon separated default list of finders (sources
|
||||
for refs) to use when pulling. This can be used to disable
|
||||
pulling from mounted filesystems, peers on the local network,
|
||||
or the Internet. However note that it only applies when a set
|
||||
of finders isn't explicitly specified, either by a consumer of
|
||||
libostree API or on the command line. Possible values:
|
||||
<code class="literal">config</code>, <code class="literal">lan</code>, and
|
||||
<code class="literal">mount</code> (or any combination thereof). If unset, this
|
||||
defaults to <code class="literal">config;mount;</code> (since the LAN finder is
|
||||
costly).
|
||||
</p></dd><dt><span class="term"><code class="varname">no-deltas-in-summary</code></span></dt><dd><p>Boolean value controlling whether OSTree should skip
|
||||
putting an index of available deltas in the summary file. Defaults to false.
|
||||
</p><p>
|
||||
Since 2020.7 OSTree can use delta indexes outside the summary file,
|
||||
making the summary file smaller (especially for larger repositories). However
|
||||
by default we still create the index in the summary file to make older clients
|
||||
work. If you know all clients will be 2020.7 later you can enable this to
|
||||
save network bandwidth.
|
||||
</p></dd></dl></div></div><div class="refsect1"><a name="id1339"></a><h2>[remote "name"] Section Options</h2><p>
|
||||
Describes a remote repository location.
|
||||
</p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="varname">url</code></span></dt><dd><p>Must be present; declares URL for accessing metadata and
|
||||
content for remote. See also <code class="literal">contenturl</code>. The
|
||||
supported schemes are documented below.</p></dd><dt><span class="term"><code class="varname">contenturl</code></span></dt><dd><p>Declares URL for accessing content (filez, static delta
|
||||
parts). When specified, <code class="literal">url</code> is used just for
|
||||
metadata: summary, static delta "superblocks".</p></dd><dt><span class="term"><code class="varname">branches</code></span></dt><dd><p>A list of strings. Represents the default configured
|
||||
branches to fetch from the remote when no specific branches are
|
||||
requested during a pull operation.</p></dd><dt><span class="term"><code class="varname">proxy</code></span></dt><dd><p>A string value, if given should be a URL for a
|
||||
HTTP proxy to use for access to this repository.</p></dd><dt><span class="term"><code class="varname">gpg-verify</code></span></dt><dd><p>A boolean value, defaults to true.
|
||||
Controls whether or not OSTree will require commits to be
|
||||
signed by a known GPG key. For more information, see the
|
||||
<a href="ostree.html"><span class="citerefentry"><span class="refentrytitle">ostree</span>(1)</span></a>
|
||||
manual under GPG.</p></dd><dt><span class="term"><code class="varname">gpg-verify-summary</code></span></dt><dd><p>A boolean value, defaults to false.
|
||||
Controls whether or not OSTree will check if the summary
|
||||
is signed by a known GPG key.
|
||||
For more information, see the <a href="ostree.html"><span class="citerefentry"><span class="refentrytitle">ostree</span>(1)</span></a>
|
||||
manual under GPG.</p></dd><dt><span class="term"><code class="varname">tls-permissive</code></span></dt><dd><p>A boolean value, defaults to false. By
|
||||
default, server TLS certificates will be checked against the
|
||||
system certificate store. If this variable is set, any
|
||||
certificate will be accepted.</p></dd><dt><span class="term"><code class="varname">tls-client-cert-path</code></span></dt><dd><p>Path to file for client-side certificate, to present when making requests to this repository.</p></dd><dt><span class="term"><code class="varname">tls-client-key-path</code></span></dt><dd><p>Path to file containing client-side certificate key, to present when making requests to this repository.</p></dd><dt><span class="term"><code class="varname">tls-ca-path</code></span></dt><dd><p>Path to file containing trusted anchors instead of the system CA database.</p></dd><dt><span class="term"><code class="varname">http2</code></span></dt><dd><p>A boolean value, defaults to true. By
|
||||
default, libostree will use HTTP2; setting this to <code class="literal">false</code>
|
||||
will disable it. May be useful to work around broken servers.
|
||||
</p></dd><dt><span class="term"><code class="varname">unconfigured-state</code></span></dt><dd><p>If set, pulls from this remote will fail with the configured text. This is intended for OS vendors which have a subscription process to access content.</p></dd><dt><span class="term"><code class="varname">custom-backend</code></span></dt><dd><p>If set, pulls from this remote via libostree will fail with an error that mentions the value.
|
||||
It is recommended to make this a software identifier token (e.g. "examplecorp-fetcher"), not freeform text ("ExampleCorp Fetcher").
|
||||
This is intended to be used by higher level software that wants to fetch ostree commits via some other mechanism, while still reusing the core libostree infrastructure around e.g. signatures.
|
||||
</p></dd></dl></div></div><div class="refsect1"><a name="id1340"></a><h2>[sysroot] Section Options</h2><p>
|
||||
Options for the sysroot, which contains the OSTree repository,
|
||||
deployments, and stateroots. The following entries are defined:
|
||||
</p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="varname">readonly</code></span></dt><dd><p>A boolean value. If this is set to <code class="literal">true</code>, then the
|
||||
<code class="literal">/sysroot</code> mount point is mounted read-only. This is configured a
|
||||
legacy repository configuration and the equivalent option in <code class="literal">ostree/prepare-root.conf</code>
|
||||
should be used instead - see <a href="ostree-prepare-root.html"><span class="citerefentry"><span class="refentrytitle">ostree-prepare-root</span>(1)</span></a>.
|
||||
</p></dd><dt><span class="term"><code class="varname">bootloader</code></span></dt><dd><p>Configure the bootloader that OSTree uses when
|
||||
deploying the sysroot. This may take the values
|
||||
<code class="literal">bootloader=none</code>, <code class="literal">bootloader=auto</code>,
|
||||
<code class="literal">bootloader=grub2</code>, <code class="literal">bootloader=syslinux</code>,
|
||||
<code class="literal">bootloader=uboot</code> or <code class="literal">bootloader=zipl</code>.
|
||||
Default is <code class="literal">auto</code>.
|
||||
</p><p>
|
||||
If <code class="literal">none</code>, then OSTree will generate only BLS (Boot
|
||||
Loader Specification) fragments in <code class="literal">sysroot/boot/loader/entries/</code>
|
||||
for the deployment.
|
||||
</p><p>
|
||||
If <code class="literal">auto</code>, then in addition to generating BLS
|
||||
fragments, OSTree will dynamically check for the existence of grub2,
|
||||
uboot, and syslinux bootloaders. If one of the bootloaders is found,
|
||||
then OSTree will generate a config for the bootloader found. For
|
||||
example, <code class="literal">grub2-mkconfig</code> is run for the grub2 case.
|
||||
</p><p>
|
||||
A specific bootloader type may also be explicitly requested by choosing
|
||||
<code class="literal">grub2</code>, <code class="literal">syslinux</code>, <code class="literal">uboot</code> or
|
||||
<code class="literal">zipl</code>.
|
||||
</p></dd><dt><span class="term"><code class="varname">bls-append-except-default</code></span></dt><dd><p>A semicolon separated string list of key-value pairs. For example:
|
||||
<code class="literal">bls-append-except-default=key1=value1;key2=value2</code>. These key-value
|
||||
pairs will be injected into the generated BLS fragments of the non-default deployments.
|
||||
In other words, the BLS fragment of the default deployment will be unaffected by
|
||||
<code class="literal">bls-append-except-default</code>.
|
||||
</p></dd><dt><span class="term"><code class="varname">bootprefix</code></span></dt><dd><p>A boolean value; defaults to false. If set to true, the bootloader entries
|
||||
generated will include <code class="literal">/boot</code> as a prefix. This will likely be turned
|
||||
on by default in the future.
|
||||
</p></dd></dl></div></div><div class="refsect1"><a name="id1341"></a><h2>[ex-integrity] Section Options</h2><p>
|
||||
The "ex-" prefix here signifies experimental options. The <code class="literal">ex-integrity</code> section
|
||||
contains options related to system integrity. Information about experimental
|
||||
options is canonically found in upstream tracking issues.
|
||||
</p></div><div class="refsect1"><a name="id1342"></a><h2>/etc/ostree/remotes.d</h2><p>
|
||||
In addition to the <code class="filename">/ostree/repo/config</code>
|
||||
file, remotes may also be specified in
|
||||
<code class="filename">/etc/ostree/remotes.d</code>. The remote
|
||||
configuration file must end in <code class="literal">.conf</code>; files
|
||||
whose name does not end in <code class="literal">.conf</code> will be
|
||||
ignored.
|
||||
</p></div><div class="refsect1"><a name="id1343"></a><h2>Repository url/contenturl</h2><p>
|
||||
Originally, OSTree had just a <code class="literal">url</code> option
|
||||
for remotes. Since then, the <code class="literal">contenturl</code>
|
||||
option was introduced. Both of these support
|
||||
<code class="literal">file</code>, <code class="literal">http</code>, and
|
||||
<code class="literal">https</code> schemes.
|
||||
</p><p>
|
||||
Additionally, both of these can be prefixed with the string
|
||||
<code class="literal">mirrorlist=</code>, which instructs the client
|
||||
that the target url is a "mirrorlist" format, which is
|
||||
a plain text file of newline-separated URLs. Earlier
|
||||
URLs will be given precedence.
|
||||
</p><p>
|
||||
Note that currently, the <code class="literal">tls-ca-path</code> and
|
||||
<code class="literal">tls-client-cert-path</code> options apply to every HTTP
|
||||
request, even when <code class="literal">contenturl</code> and/or
|
||||
<code class="literal">mirrorlist</code> are in use. This may change in the future to
|
||||
only apply to metadata (i.e. <code class="literal">url</code>, not
|
||||
<code class="literal">contenturl</code>) fetches.
|
||||
</p></div><div class="refsect1"><a name="id1344"></a><h2>Per-remote GPG keyrings and verification</h2><p>
|
||||
OSTree supports a per-remote GPG keyring, as well as a
|
||||
<code class="literal">gpgkeypath</code> option. For more information see
|
||||
<a href="ostree.html"><span class="citerefentry"><span class="refentrytitle">ostree</span>(1)</span></a>.
|
||||
in the section <code class="literal">GPG verification</code>.
|
||||
</p></div><div class="refsect1"><a name="id1345"></a><h2>Per-remote HTTP cookies</h2><p>
|
||||
Some content providers may want to control access to remote
|
||||
repositories via HTTP cookies. The <span class="command"><strong>ostree remote
|
||||
add-cookie</strong></span> and <span class="command"><strong>ostree remote
|
||||
delete-cookie</strong></span> commands will update a per-remote
|
||||
lookaside cookie jar, named
|
||||
<code class="filename">$remotename.cookies.txt</code>.
|
||||
</p></div><div class="refsect1"><a name="id1346"></a><h2>See Also</h2><p>
|
||||
<a href="ostree.html"><span class="citerefentry"><span class="refentrytitle">ostree</span>(1)</span></a>, <a href="ostree.repo.html"><span class="citerefentry"><span class="refentrytitle">ostree.repo</span>(5)</span></a>
|
||||
</p></div></div></body></html>
|
30
man/ostree.repo.html
Normal file
@ -0,0 +1,30 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ostree.repo</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="ostree.repo"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ostree.repo — OSTree repository configuration and layout</p></div><div class="refsect1"><a name="id1337"></a><h2>Description</h2><p>
|
||||
An OSTree repository is structurally similar to a
|
||||
git repository; it is a content-addressed object
|
||||
store containing filesystem trees. However, unlike
|
||||
git, ostree is designed to store operating system
|
||||
binaries. It records the Unix uid and gid,
|
||||
permissions, as well as extended attributes.
|
||||
</p><p>
|
||||
A repository can be in one of three modes;
|
||||
<code class="literal">bare</code>, which is designed as a hard
|
||||
link source for operating system checkouts,
|
||||
<code class="literal">bare-user</code>, which is like
|
||||
<code class="literal">bare</code> but works on systems that
|
||||
run as non-root as well as non-root containers, and
|
||||
<code class="literal">archive-z2</code>, which is designed for
|
||||
static HTTP servers.
|
||||
</p><p>
|
||||
There is a system repository located at
|
||||
<code class="filename">/ostree/repo</code>. If no repository
|
||||
is specified -- either by a command-line option or the
|
||||
<code class="envar">OSTREE_REPO</code> environment variable --
|
||||
the <span class="command"><strong>ostree</strong></span> as well as many API
|
||||
calls will use it by default.
|
||||
</p></div><div class="refsect1"><a name="id1338"></a><h2>Components of a repository</h2><p>
|
||||
The only user-editable component is the
|
||||
<code class="filename">config</code> file. For more
|
||||
information, see <a href="ostree.repo-config.html"><span class="citerefentry"><span class="refentrytitle">ostree.repo-config</span>(5)</span></a>.
|
||||
</p></div><div class="refsect1"><a name="id1339"></a><h2>See Also</h2><p>
|
||||
<a href="ostree.html"><span class="citerefentry"><span class="refentrytitle">ostree</span>(1)</span></a>, <a href="ostree.repo-config.html"><span class="citerefentry"><span class="refentrytitle">ostree.repo-config</span>(1)</span></a>
|
||||
</p></div></div></body></html>
|
31
man/rofiles-fuse.html
Normal file
@ -0,0 +1,31 @@
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>rofiles-fuse</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="ostree"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>rofiles-fuse — Use FUSE to create a view where directories are writable, files are immutable</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">rofiles-fuse SRCDIR MNTPOINT</code> </p></div></div><div class="refsect1"><a name="id1337"></a><h2>Description</h2><p>
|
||||
Creating a checkout from an OSTree repository by default
|
||||
uses hard links, which means an in-place mutation to any
|
||||
file corrupts the repository and all checkouts. This can be
|
||||
problematic if one wishes to run arbitrary programs against
|
||||
such a checkout. For example, RPM <code class="literal">%post</code>
|
||||
scripts or equivalent.
|
||||
</p><p>
|
||||
In the case where one wants to create a tree commit derived
|
||||
from other content, using <span class="command"><strong>rofiles-fuse</strong></span> in
|
||||
concert with <span class="command"><strong>ostree commit
|
||||
--link-checkout-speedup</strong></span> (or the underlying API)
|
||||
can ensure that only new files are checksummed.
|
||||
</p></div><div class="refsect1"><a name="id1338"></a><h2>Example: Update an OSTree commit</h2><pre class="programlisting">
|
||||
# Initialize a checkout and mount
|
||||
$ ostree --repo=repo checkout somebranch branch-checkout
|
||||
$ mkdir mnt
|
||||
$ rofiles-fuse branch-checkout mnt
|
||||
|
||||
# Now, arbitrary changes to mnt/ are reflected in branch-checkout
|
||||
$ echo somenewcontent > mnt/anewfile
|
||||
$ mkdir mnt/anewdir
|
||||
$ rm mnt/someoriginalcontent -rf
|
||||
|
||||
# Commit and cleanup
|
||||
$ fusermount -u mnt
|
||||
$ ostree --repo=repo commit --link-checkout-speedup -b somebranch -s 'Commit new content' --tree=dir=branch-checkout
|
||||
$ rm mnt branch-checkout -rf
|
||||
</pre></div><div class="refsect1"><a name="id1339"></a><h2>See Also</h2><p>
|
||||
<a href="ostree.html"><span class="citerefentry"><span class="refentrytitle">ostree</span>(1)</span></a>
|
||||
</p></div></div></body></html>
|
BIN
reference/home.png
Normal file
After Width: | Height: | Size: 256 B |
97
reference/index.html
Normal file
@ -0,0 +1,97 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>OSTree API references: OSTree API references</title>
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
<link rel="home" href="index.html" title="OSTree API references">
|
||||
<link rel="next" href="reference.html" title="API Reference">
|
||||
<meta name="generator" content="GTK-Doc V1.34.0 (XML mode)">
|
||||
<link rel="stylesheet" href="style.css" type="text/css">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<div class="book">
|
||||
<div class="titlepage">
|
||||
<div>
|
||||
<div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">OSTree API references</p></th></tr></table></div>
|
||||
<div><p class="releaseinfo">for OSTree 2024.7</p></div>
|
||||
</div>
|
||||
<hr>
|
||||
</div>
|
||||
<div class="toc"><dl class="toc">
|
||||
<dt><span class="chapter"><a href="reference.html">API Reference</a></span></dt>
|
||||
<dd><dl>
|
||||
<dt>
|
||||
<span class="refentrytitle"><a href="ostree-Core-repository-independent-functions.html">Core repository-independent functions</a></span><span class="refpurpose"> — Create, validate, and convert core data types</span>
|
||||
</dt>
|
||||
<dt>
|
||||
<span class="refentrytitle"><a href="ostree-OstreeRepo.html">OstreeRepo: Content-addressed object store</a></span><span class="refpurpose"> — A git-like storage system for operating system binaries</span>
|
||||
</dt>
|
||||
<dt>
|
||||
<span class="refentrytitle"><a href="ostree-In-memory-modifiable-filesystem-tree.html">In-memory modifiable filesystem tree</a></span><span class="refpurpose"> — Modifiable filesystem tree</span>
|
||||
</dt>
|
||||
<dt>
|
||||
<span class="refentrytitle"><a href="ostree-Root-partition-mount-point.html">Root partition mount point</a></span><span class="refpurpose"> — Manage physical root filesystem</span>
|
||||
</dt>
|
||||
<dt>
|
||||
<span class="refentrytitle"><a href="ostree-Progress-notification-system-for-asynchronous-operations.html">Progress notification system for asynchronous operations</a></span><span class="refpurpose"> — Values representing progress</span>
|
||||
</dt>
|
||||
<dt>
|
||||
<span class="refentrytitle"><a href="ostree-SELinux-policy-management.html">SELinux policy management</a></span><span class="refpurpose"> — Read SELinux policy and manage filesystem labels</span>
|
||||
</dt>
|
||||
<dt>
|
||||
<span class="refentrytitle"><a href="ostree-Simple-upgrade-class.html">Simple upgrade class</a></span><span class="refpurpose"> — Upgrade OSTree systems</span>
|
||||
</dt>
|
||||
<dt>
|
||||
<span class="refentrytitle"><a href="ostree-GPG-signature-verification-results.html">GPG signature verification results</a></span><span class="refpurpose"> — Inspect detached GPG signatures</span>
|
||||
</dt>
|
||||
<dt>
|
||||
<span class="refentrytitle"><a href="ostree-Signature-management.html">Signature management</a></span><span class="refpurpose"> — Sign and verify commits</span>
|
||||
</dt>
|
||||
<dt>
|
||||
<span class="refentrytitle"><a href="ostree-ostree-bootconfig-parser.html">ostree-bootconfig-parser</a></span><span class="refpurpose"></span>
|
||||
</dt>
|
||||
<dt>
|
||||
<span class="refentrytitle"><a href="ostree-ostree-chain-input-stream.html">ostree-chain-input-stream</a></span><span class="refpurpose"></span>
|
||||
</dt>
|
||||
<dt>
|
||||
<span class="refentrytitle"><a href="ostree-ostree-checksum-input-stream.html">ostree-checksum-input-stream</a></span><span class="refpurpose"></span>
|
||||
</dt>
|
||||
<dt>
|
||||
<span class="refentrytitle"><a href="ostree-ostree-content-writer.html">ostree-content-writer</a></span><span class="refpurpose"></span>
|
||||
</dt>
|
||||
<dt>
|
||||
<span class="refentrytitle"><a href="ostree-ostree-deployment.html">ostree-deployment</a></span><span class="refpurpose"></span>
|
||||
</dt>
|
||||
<dt>
|
||||
<span class="refentrytitle"><a href="ostree-ostree-diff.html">ostree-diff</a></span><span class="refpurpose"></span>
|
||||
</dt>
|
||||
<dt>
|
||||
<span class="refentrytitle"><a href="ostree-ostree-kernel-args.html">ostree-kernel-args</a></span><span class="refpurpose"></span>
|
||||
</dt>
|
||||
<dt>
|
||||
<span class="refentrytitle"><a href="ostree-ostree-ref.html">ostree-ref</a></span><span class="refpurpose"></span>
|
||||
</dt>
|
||||
<dt>
|
||||
<span class="refentrytitle"><a href="ostree-ostree-remote.html">ostree-remote</a></span><span class="refpurpose"></span>
|
||||
</dt>
|
||||
<dt>
|
||||
<span class="refentrytitle"><a href="ostree-ostree-repo-file.html">ostree-repo-file</a></span><span class="refpurpose"></span>
|
||||
</dt>
|
||||
<dt>
|
||||
<span class="refentrytitle"><a href="ostree-ostree-repo-finder.html">ostree-repo-finder</a></span><span class="refpurpose"></span>
|
||||
</dt>
|
||||
<dt>
|
||||
<span class="refentrytitle"><a href="ostree-ostree-repo-remote-finder.html">ostree-repo-remote-finder</a></span><span class="refpurpose"></span>
|
||||
</dt>
|
||||
<dt>
|
||||
<span class="refentrytitle"><a href="ostree-ostree-version.html">ostree-version</a></span><span class="refpurpose"> — ostree version checking</span>
|
||||
</dt>
|
||||
<dt><span class="index"><a href="reference.html#api-index-full">API Index</a></span></dt>
|
||||
</dl></dd>
|
||||
</dl></div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<hr>Generated by GTK-Doc V1.34.0</div>
|
||||
</body>
|
||||
</html>
|
BIN
reference/left-insensitive.png
Normal file
After Width: | Height: | Size: 395 B |
BIN
reference/left.png
Normal file
After Width: | Height: | Size: 262 B |
3058
reference/ostree-Core-repository-independent-functions.html
Normal file
757
reference/ostree-GPG-signature-verification-results.html
Normal file
@ -0,0 +1,757 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>GPG signature verification results: OSTree API references</title>
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
<link rel="home" href="index.html" title="OSTree API references">
|
||||
<link rel="up" href="reference.html" title="API Reference">
|
||||
<link rel="prev" href="ostree-Simple-upgrade-class.html" title="Simple upgrade class">
|
||||
<link rel="next" href="ostree-Signature-management.html" title="Signature management">
|
||||
<meta name="generator" content="GTK-Doc V1.34.0 (XML mode)">
|
||||
<link rel="stylesheet" href="style.css" type="text/css">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
|
||||
<td width="100%" align="left" class="shortcuts">
|
||||
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
|
||||
<a href="#ostree-GPG-signature-verification-results.description" class="shortcut">Description</a></span>
|
||||
</td>
|
||||
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
|
||||
<td><a accesskey="u" href="reference.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
|
||||
<td><a accesskey="p" href="ostree-Simple-upgrade-class.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
|
||||
<td><a accesskey="n" href="ostree-Signature-management.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
|
||||
</tr></table>
|
||||
<div class="refentry">
|
||||
<a name="ostree-GPG-signature-verification-results"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv"><table width="100%"><tr>
|
||||
<td valign="top">
|
||||
<h2><span class="refentrytitle"><a name="ostree-GPG-signature-verification-results.top_of_page"></a>GPG signature verification results</span></h2>
|
||||
<p>GPG signature verification results — Inspect detached GPG signatures</p>
|
||||
</td>
|
||||
<td class="gallery_image" valign="top" align="right"></td>
|
||||
</tr></table></div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-GPG-signature-verification-results.functions"></a><h2>Functions</h2>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="functions_proto_type">
|
||||
<col class="functions_proto_name">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">guint</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-GPG-signature-verification-results.html#ostree-gpg-verify-result-count-all" title="ostree_gpg_verify_result_count_all ()">ostree_gpg_verify_result_count_all</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">guint</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-GPG-signature-verification-results.html#ostree-gpg-verify-result-count-valid" title="ostree_gpg_verify_result_count_valid ()">ostree_gpg_verify_result_count_valid</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">gboolean</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-GPG-signature-verification-results.html#ostree-gpg-verify-result-lookup" title="ostree_gpg_verify_result_lookup ()">ostree_gpg_verify_result_lookup</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">GVariant</span> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-GPG-signature-verification-results.html#ostree-gpg-verify-result-get" title="ostree_gpg_verify_result_get ()">ostree_gpg_verify_result_get</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">GVariant</span> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-GPG-signature-verification-results.html#ostree-gpg-verify-result-get-all" title="ostree_gpg_verify_result_get_all ()">ostree_gpg_verify_result_get_all</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">void</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-GPG-signature-verification-results.html#ostree-gpg-verify-result-describe" title="ostree_gpg_verify_result_describe ()">ostree_gpg_verify_result_describe</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">void</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-GPG-signature-verification-results.html#ostree-gpg-verify-result-describe-variant" title="ostree_gpg_verify_result_describe_variant ()">ostree_gpg_verify_result_describe_variant</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">gboolean</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-GPG-signature-verification-results.html#ostree-gpg-verify-result-require-valid-signature" title="ostree_gpg_verify_result_require_valid_signature ()">ostree_gpg_verify_result_require_valid_signature</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-GPG-signature-verification-results.other"></a><h2>Types and Values</h2>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="other_proto_type">
|
||||
<col class="other_proto_name">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="datatype_keyword">enum</td>
|
||||
<td class="function_name"><a class="link" href="ostree-GPG-signature-verification-results.html#OstreeGpgError" title="enum OstreeGpgError">OstreeGpgError</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="typedef_keyword">typedef</td>
|
||||
<td class="function_name"><a class="link" href="ostree-GPG-signature-verification-results.html#OstreeGpgVerifyResult" title="OstreeGpgVerifyResult">OstreeGpgVerifyResult</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="datatype_keyword">enum</td>
|
||||
<td class="function_name"><a class="link" href="ostree-GPG-signature-verification-results.html#OstreeGpgSignatureAttr" title="enum OstreeGpgSignatureAttr">OstreeGpgSignatureAttr</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="datatype_keyword">enum</td>
|
||||
<td class="function_name"><a class="link" href="ostree-GPG-signature-verification-results.html#OstreeGpgSignatureFormatFlags" title="enum OstreeGpgSignatureFormatFlags">OstreeGpgSignatureFormatFlags</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-GPG-signature-verification-results.description"></a><h2>Description</h2>
|
||||
<p><a class="link" href="ostree-GPG-signature-verification-results.html#OstreeGpgVerifyResult" title="OstreeGpgVerifyResult"><span class="type">OstreeGpgVerifyResult</span></a> contains verification details for GPG signatures
|
||||
read from a detached <a class="link" href="ostree-OstreeRepo.html#OstreeRepo" title="OstreeRepo"><span class="type">OstreeRepo</span></a> metadata object.</p>
|
||||
<p>Use <a class="link" href="ostree-GPG-signature-verification-results.html#ostree-gpg-verify-result-count-all" title="ostree_gpg_verify_result_count_all ()"><code class="function">ostree_gpg_verify_result_count_all()</code></a> and
|
||||
<a class="link" href="ostree-GPG-signature-verification-results.html#ostree-gpg-verify-result-count-valid" title="ostree_gpg_verify_result_count_valid ()"><code class="function">ostree_gpg_verify_result_count_valid()</code></a> to quickly check overall signature
|
||||
validity.</p>
|
||||
<p>Use <a class="link" href="ostree-GPG-signature-verification-results.html#ostree-gpg-verify-result-lookup" title="ostree_gpg_verify_result_lookup ()"><code class="function">ostree_gpg_verify_result_lookup()</code></a> to find a signature by the key ID
|
||||
or fingerprint of the signing key.</p>
|
||||
<p>For more in-depth inspection, such as presenting signature details to the
|
||||
user, pass an array of attribute values to <a class="link" href="ostree-GPG-signature-verification-results.html#ostree-gpg-verify-result-get" title="ostree_gpg_verify_result_get ()"><code class="function">ostree_gpg_verify_result_get()</code></a>
|
||||
or get all signature details with <a class="link" href="ostree-GPG-signature-verification-results.html#ostree-gpg-verify-result-get-all" title="ostree_gpg_verify_result_get_all ()"><code class="function">ostree_gpg_verify_result_get_all()</code></a>.</p>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-GPG-signature-verification-results.functions_details"></a><h2>Functions</h2>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-gpg-verify-result-count-all"></a><h3>ostree_gpg_verify_result_count_all ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">guint</span>
|
||||
ostree_gpg_verify_result_count_all (<em class="parameter"><code><a class="link" href="ostree-GPG-signature-verification-results.html#OstreeGpgVerifyResult" title="OstreeGpgVerifyResult"><span class="type">OstreeGpgVerifyResult</span></a> *result</code></em>);</pre>
|
||||
<p>Counts all the signatures in <em class="parameter"><code>result</code></em>
|
||||
.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-gpg-verify-result-count-all.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody><tr>
|
||||
<td class="parameter_name"><p>result</p></td>
|
||||
<td class="parameter_description"><p>an <a class="link" href="ostree-GPG-signature-verification-results.html#OstreeGpgVerifyResult" title="OstreeGpgVerifyResult"><span class="type">OstreeGpgVerifyResult</span></a></p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-gpg-verify-result-count-all.returns"></a><h4>Returns</h4>
|
||||
<p> signature count</p>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-gpg-verify-result-count-valid"></a><h3>ostree_gpg_verify_result_count_valid ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">guint</span>
|
||||
ostree_gpg_verify_result_count_valid (<em class="parameter"><code><a class="link" href="ostree-GPG-signature-verification-results.html#OstreeGpgVerifyResult" title="OstreeGpgVerifyResult"><span class="type">OstreeGpgVerifyResult</span></a> *result</code></em>);</pre>
|
||||
<p>Counts only the valid signatures in <em class="parameter"><code>result</code></em>
|
||||
.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-gpg-verify-result-count-valid.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody><tr>
|
||||
<td class="parameter_name"><p>result</p></td>
|
||||
<td class="parameter_description"><p>an <a class="link" href="ostree-GPG-signature-verification-results.html#OstreeGpgVerifyResult" title="OstreeGpgVerifyResult"><span class="type">OstreeGpgVerifyResult</span></a></p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-gpg-verify-result-count-valid.returns"></a><h4>Returns</h4>
|
||||
<p> valid signature count</p>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-gpg-verify-result-lookup"></a><h3>ostree_gpg_verify_result_lookup ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||||
ostree_gpg_verify_result_lookup (<em class="parameter"><code><a class="link" href="ostree-GPG-signature-verification-results.html#OstreeGpgVerifyResult" title="OstreeGpgVerifyResult"><span class="type">OstreeGpgVerifyResult</span></a> *result</code></em>,
|
||||
<em class="parameter"><code>const <span class="type">gchar</span> *key_id</code></em>,
|
||||
<em class="parameter"><code><span class="type">guint</span> *out_signature_index</code></em>);</pre>
|
||||
<p>Searches <em class="parameter"><code>result</code></em>
|
||||
for a signature signed by <em class="parameter"><code>key_id</code></em>
|
||||
. If a match is found,
|
||||
the function returns <code class="literal">TRUE</code> and sets <em class="parameter"><code>out_signature_index</code></em>
|
||||
so that further
|
||||
signature details can be obtained through <a class="link" href="ostree-GPG-signature-verification-results.html#ostree-gpg-verify-result-get" title="ostree_gpg_verify_result_get ()"><code class="function">ostree_gpg_verify_result_get()</code></a>.
|
||||
If no match is found, the function returns <code class="literal">FALSE</code> and leaves
|
||||
<em class="parameter"><code>out_signature_index</code></em>
|
||||
unchanged.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-gpg-verify-result-lookup.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>result</p></td>
|
||||
<td class="parameter_description"><p>an <a class="link" href="ostree-GPG-signature-verification-results.html#OstreeGpgVerifyResult" title="OstreeGpgVerifyResult"><span class="type">OstreeGpgVerifyResult</span></a></p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>key_id</p></td>
|
||||
<td class="parameter_description"><p>a GPG key ID or fingerprint</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>out_signature_index</p></td>
|
||||
<td class="parameter_description"><p>return location for the index of the signature
|
||||
signed by <em class="parameter"><code>key_id</code></em>
|
||||
, or <code class="literal">NULL</code>. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/out"><span class="acronym">out</span></a>]</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-gpg-verify-result-lookup.returns"></a><h4>Returns</h4>
|
||||
<p> <code class="literal">TRUE</code> on success, <code class="literal">FALSE</code> on failure</p>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-gpg-verify-result-get"></a><h3>ostree_gpg_verify_result_get ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">GVariant</span> *
|
||||
ostree_gpg_verify_result_get (<em class="parameter"><code><a class="link" href="ostree-GPG-signature-verification-results.html#OstreeGpgVerifyResult" title="OstreeGpgVerifyResult"><span class="type">OstreeGpgVerifyResult</span></a> *result</code></em>,
|
||||
<em class="parameter"><code><span class="type">guint</span> signature_index</code></em>,
|
||||
<em class="parameter"><code><a class="link" href="ostree-GPG-signature-verification-results.html#OstreeGpgSignatureAttr" title="enum OstreeGpgSignatureAttr"><span class="type">OstreeGpgSignatureAttr</span></a> *attrs</code></em>,
|
||||
<em class="parameter"><code><span class="type">guint</span> n_attrs</code></em>);</pre>
|
||||
<p>Builds a <span class="type">GVariant</span> tuple of requested attributes for the GPG signature at
|
||||
<em class="parameter"><code>signature_index</code></em>
|
||||
in <em class="parameter"><code>result</code></em>
|
||||
. See the <a class="link" href="ostree-GPG-signature-verification-results.html#OstreeGpgSignatureAttr" title="enum OstreeGpgSignatureAttr"><span class="type">OstreeGpgSignatureAttr</span></a> description
|
||||
for the <span class="type">GVariantType</span> of each available attribute.</p>
|
||||
<p>It is a programmer error to request an invalid <a class="link" href="ostree-GPG-signature-verification-results.html#OstreeGpgSignatureAttr" title="enum OstreeGpgSignatureAttr"><span class="type">OstreeGpgSignatureAttr</span></a> or
|
||||
an invalid <em class="parameter"><code>signature_index</code></em>
|
||||
. Use <a class="link" href="ostree-GPG-signature-verification-results.html#ostree-gpg-verify-result-count-all" title="ostree_gpg_verify_result_count_all ()"><code class="function">ostree_gpg_verify_result_count_all()</code></a> to
|
||||
find the number of signatures in <em class="parameter"><code>result</code></em>
|
||||
.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-gpg-verify-result-get.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>result</p></td>
|
||||
<td class="parameter_description"><p>an <a class="link" href="ostree-GPG-signature-verification-results.html#OstreeGpgVerifyResult" title="OstreeGpgVerifyResult"><span class="type">OstreeGpgVerifyResult</span></a></p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>signature_index</p></td>
|
||||
<td class="parameter_description"><p>which signature to get attributes from</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>attrs</p></td>
|
||||
<td class="parameter_description"><p>Array of requested attributes. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/array"><span class="acronym">array</span></a> length=n_attrs]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>n_attrs</p></td>
|
||||
<td class="parameter_description"><p>Length of the <em class="parameter"><code>attrs</code></em>
|
||||
array</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-gpg-verify-result-get.returns"></a><h4>Returns</h4>
|
||||
<p>a new, floating, <span class="type">GVariant</span> tuple. </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20floating"><span class="acronym">transfer floating</span></a>]</span></p>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-gpg-verify-result-get-all"></a><h3>ostree_gpg_verify_result_get_all ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">GVariant</span> *
|
||||
ostree_gpg_verify_result_get_all (<em class="parameter"><code><a class="link" href="ostree-GPG-signature-verification-results.html#OstreeGpgVerifyResult" title="OstreeGpgVerifyResult"><span class="type">OstreeGpgVerifyResult</span></a> *result</code></em>,
|
||||
<em class="parameter"><code><span class="type">guint</span> signature_index</code></em>);</pre>
|
||||
<p>Builds a <span class="type">GVariant</span> tuple of all available attributes for the GPG signature
|
||||
at <em class="parameter"><code>signature_index</code></em>
|
||||
in <em class="parameter"><code>result</code></em>
|
||||
.</p>
|
||||
<p>The child values in the returned <span class="type">GVariant</span> tuple are ordered to match the
|
||||
<a class="link" href="ostree-GPG-signature-verification-results.html#OstreeGpgSignatureAttr" title="enum OstreeGpgSignatureAttr"><span class="type">OstreeGpgSignatureAttr</span></a> enumeration, which means the enum values can be
|
||||
used as index values in functions like <code class="function">g_variant_get_child()</code>. See the
|
||||
<a class="link" href="ostree-GPG-signature-verification-results.html#OstreeGpgSignatureAttr" title="enum OstreeGpgSignatureAttr"><span class="type">OstreeGpgSignatureAttr</span></a> description for the <span class="type">GVariantType</span> of each
|
||||
available attribute.</p>
|
||||
<div class="note"><p>
|
||||
The <a class="link" href="ostree-GPG-signature-verification-results.html#OstreeGpgSignatureAttr" title="enum OstreeGpgSignatureAttr"><span class="type">OstreeGpgSignatureAttr</span></a> enumeration may be extended in the future
|
||||
with new attributes, which would affect the <span class="type">GVariant</span> tuple returned by
|
||||
this function. While the position and type of current child values in
|
||||
the <span class="type">GVariant</span> tuple will not change, to avoid backward-compatibility
|
||||
issues <span class="emphasis"><em>please do not depend on the tuple's overall size or
|
||||
type signature</em></span>.
|
||||
</p></div>
|
||||
<p>It is a programmer error to request an invalid <em class="parameter"><code>signature_index</code></em>
|
||||
. Use
|
||||
<a class="link" href="ostree-GPG-signature-verification-results.html#ostree-gpg-verify-result-count-all" title="ostree_gpg_verify_result_count_all ()"><code class="function">ostree_gpg_verify_result_count_all()</code></a> to find the number of signatures in
|
||||
<em class="parameter"><code>result</code></em>
|
||||
.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-gpg-verify-result-get-all.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>result</p></td>
|
||||
<td class="parameter_description"><p>an <a class="link" href="ostree-GPG-signature-verification-results.html#OstreeGpgVerifyResult" title="OstreeGpgVerifyResult"><span class="type">OstreeGpgVerifyResult</span></a></p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>signature_index</p></td>
|
||||
<td class="parameter_description"><p>which signature to get attributes from</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-gpg-verify-result-get-all.returns"></a><h4>Returns</h4>
|
||||
<p>a new, floating, <span class="type">GVariant</span> tuple. </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20floating"><span class="acronym">transfer floating</span></a>]</span></p>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-gpg-verify-result-describe"></a><h3>ostree_gpg_verify_result_describe ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||||
ostree_gpg_verify_result_describe (<em class="parameter"><code><a class="link" href="ostree-GPG-signature-verification-results.html#OstreeGpgVerifyResult" title="OstreeGpgVerifyResult"><span class="type">OstreeGpgVerifyResult</span></a> *result</code></em>,
|
||||
<em class="parameter"><code><span class="type">guint</span> signature_index</code></em>,
|
||||
<em class="parameter"><code><span class="type">GString</span> *output_buffer</code></em>,
|
||||
<em class="parameter"><code>const <span class="type">gchar</span> *line_prefix</code></em>,
|
||||
<em class="parameter"><code><a class="link" href="ostree-GPG-signature-verification-results.html#OstreeGpgSignatureFormatFlags" title="enum OstreeGpgSignatureFormatFlags"><span class="type">OstreeGpgSignatureFormatFlags</span></a> flags</code></em>);</pre>
|
||||
<p>Appends a brief, human-readable description of the GPG signature at
|
||||
<em class="parameter"><code>signature_index</code></em>
|
||||
in <em class="parameter"><code>result</code></em>
|
||||
to the <em class="parameter"><code>output_buffer</code></em>
|
||||
. The description
|
||||
spans multiple lines. A <em class="parameter"><code>line_prefix</code></em>
|
||||
string, if given, will precede
|
||||
each line of the description.</p>
|
||||
<p>The <em class="parameter"><code>flags</code></em>
|
||||
argument is reserved for future variations to the description
|
||||
format. Currently must be 0.</p>
|
||||
<p>It is a programmer error to request an invalid <em class="parameter"><code>signature_index</code></em>
|
||||
. Use
|
||||
<a class="link" href="ostree-GPG-signature-verification-results.html#ostree-gpg-verify-result-count-all" title="ostree_gpg_verify_result_count_all ()"><code class="function">ostree_gpg_verify_result_count_all()</code></a> to find the number of signatures in
|
||||
<em class="parameter"><code>result</code></em>
|
||||
.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-gpg-verify-result-describe.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>result</p></td>
|
||||
<td class="parameter_description"><p>an <a class="link" href="ostree-GPG-signature-verification-results.html#OstreeGpgVerifyResult" title="OstreeGpgVerifyResult"><span class="type">OstreeGpgVerifyResult</span></a></p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>signature_index</p></td>
|
||||
<td class="parameter_description"><p>which signature to describe</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>output_buffer</p></td>
|
||||
<td class="parameter_description"><p>a <span class="type">GString</span> to hold the description</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>line_prefix</p></td>
|
||||
<td class="parameter_description"><p>optional line prefix string. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>flags</p></td>
|
||||
<td class="parameter_description"><p>flags to adjust the description format</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-gpg-verify-result-describe-variant"></a><h3>ostree_gpg_verify_result_describe_variant ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||||
ostree_gpg_verify_result_describe_variant
|
||||
(<em class="parameter"><code><span class="type">GVariant</span> *variant</code></em>,
|
||||
<em class="parameter"><code><span class="type">GString</span> *output_buffer</code></em>,
|
||||
<em class="parameter"><code>const <span class="type">gchar</span> *line_prefix</code></em>,
|
||||
<em class="parameter"><code><a class="link" href="ostree-GPG-signature-verification-results.html#OstreeGpgSignatureFormatFlags" title="enum OstreeGpgSignatureFormatFlags"><span class="type">OstreeGpgSignatureFormatFlags</span></a> flags</code></em>);</pre>
|
||||
<p>Similar to <a class="link" href="ostree-GPG-signature-verification-results.html#ostree-gpg-verify-result-describe" title="ostree_gpg_verify_result_describe ()"><code class="function">ostree_gpg_verify_result_describe()</code></a> but takes a <span class="type">GVariant</span> of
|
||||
all attributes for a GPG signature instead of an <a class="link" href="ostree-GPG-signature-verification-results.html#OstreeGpgVerifyResult" title="OstreeGpgVerifyResult"><span class="type">OstreeGpgVerifyResult</span></a>
|
||||
and signature index.</p>
|
||||
<p>The <em class="parameter"><code>variant</code></em>
|
||||
<span class="emphasis"><em>MUST</em></span> have been created by
|
||||
<a class="link" href="ostree-GPG-signature-verification-results.html#ostree-gpg-verify-result-get-all" title="ostree_gpg_verify_result_get_all ()"><code class="function">ostree_gpg_verify_result_get_all()</code></a>.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-gpg-verify-result-describe-variant.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>variant</p></td>
|
||||
<td class="parameter_description"><p>a <span class="type">GVariant</span> from <a class="link" href="ostree-GPG-signature-verification-results.html#ostree-gpg-verify-result-get-all" title="ostree_gpg_verify_result_get_all ()"><code class="function">ostree_gpg_verify_result_get_all()</code></a></p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>output_buffer</p></td>
|
||||
<td class="parameter_description"><p>a <span class="type">GString</span> to hold the description</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>line_prefix</p></td>
|
||||
<td class="parameter_description"><p>optional line prefix string. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>flags</p></td>
|
||||
<td class="parameter_description"><p>flags to adjust the description format</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-gpg-verify-result-require-valid-signature"></a><h3>ostree_gpg_verify_result_require_valid_signature ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||||
ostree_gpg_verify_result_require_valid_signature
|
||||
(<em class="parameter"><code><a class="link" href="ostree-GPG-signature-verification-results.html#OstreeGpgVerifyResult" title="OstreeGpgVerifyResult"><span class="type">OstreeGpgVerifyResult</span></a> *result</code></em>,
|
||||
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
|
||||
<p>Checks if the result contains at least one signature from the
|
||||
trusted keyring. You can call this function immediately after
|
||||
<a class="link" href="ostree-OstreeRepo.html#ostree-repo-verify-summary" title="ostree_repo_verify_summary ()"><code class="function">ostree_repo_verify_summary()</code></a> or <a class="link" href="ostree-OstreeRepo.html#ostree-repo-verify-commit-ext" title="ostree_repo_verify_commit_ext ()"><code class="function">ostree_repo_verify_commit_ext()</code></a> -
|
||||
it will handle the <code class="literal">NULL</code> <em class="parameter"><code>result</code></em>
|
||||
and filled <em class="parameter"><code>error</code></em>
|
||||
too.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-gpg-verify-result-require-valid-signature.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>result</p></td>
|
||||
<td class="parameter_description"><p>an <a class="link" href="ostree-GPG-signature-verification-results.html#OstreeGpgVerifyResult" title="OstreeGpgVerifyResult"><span class="type">OstreeGpgVerifyResult</span></a>. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/nullable"><span class="acronym">nullable</span></a>]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>error</p></td>
|
||||
<td class="parameter_description"><p>A <span class="type">GError</span></p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-gpg-verify-result-require-valid-signature.returns"></a><h4>Returns</h4>
|
||||
<p> <code class="literal">TRUE</code> if <em class="parameter"><code>result</code></em>
|
||||
was not <code class="literal">NULL</code> and had at least one
|
||||
signature from trusted keyring, otherwise <code class="literal">FALSE</code></p>
|
||||
</div>
|
||||
<p class="since">Since: 2016.6</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-GPG-signature-verification-results.other_details"></a><h2>Types and Values</h2>
|
||||
<div class="refsect2">
|
||||
<a name="OstreeGpgError"></a><h3>enum OstreeGpgError</h3>
|
||||
<p>Errors returned by signature creation and verification operations in OSTree.
|
||||
These may be returned by any API which creates or verifies signatures.</p>
|
||||
<div class="refsect3">
|
||||
<a name="OstreeGpgError.members"></a><h4>Members</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="300px" class="enum_members_name">
|
||||
<col class="enum_members_description">
|
||||
<col width="200px" class="enum_members_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="enum_member_name"><p><a name="OSTREE-GPG-ERROR-NO-SIGNATURE:CAPS"></a>OSTREE_GPG_ERROR_NO_SIGNATURE</p></td>
|
||||
<td class="enum_member_description">
|
||||
<p>A signature was expected, but not found.</p>
|
||||
</td>
|
||||
<td class="enum_member_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="enum_member_name"><p><a name="OSTREE-GPG-ERROR-INVALID-SIGNATURE:CAPS"></a>OSTREE_GPG_ERROR_INVALID_SIGNATURE</p></td>
|
||||
<td class="enum_member_description">
|
||||
<p>A signature was malformed.</p>
|
||||
</td>
|
||||
<td class="enum_member_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="enum_member_name"><p><a name="OSTREE-GPG-ERROR-MISSING-KEY:CAPS"></a>OSTREE_GPG_ERROR_MISSING_KEY</p></td>
|
||||
<td class="enum_member_description">
|
||||
<p>A signature was found, but was created with a key not in the
|
||||
configured keyrings.</p>
|
||||
</td>
|
||||
<td class="enum_member_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="enum_member_name"><p><a name="OSTREE-GPG-ERROR-EXPIRED-SIGNATURE:CAPS"></a>OSTREE_GPG_ERROR_EXPIRED_SIGNATURE</p></td>
|
||||
<td class="enum_member_description">
|
||||
<p>A signature was expired. Since: 2020.1.</p>
|
||||
</td>
|
||||
<td class="enum_member_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="enum_member_name"><p><a name="OSTREE-GPG-ERROR-EXPIRED-KEY:CAPS"></a>OSTREE_GPG_ERROR_EXPIRED_KEY</p></td>
|
||||
<td class="enum_member_description">
|
||||
<p>A signature was found, but the key used to
|
||||
sign it has expired. Since: 2020.1.</p>
|
||||
</td>
|
||||
<td class="enum_member_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="enum_member_name"><p><a name="OSTREE-GPG-ERROR-REVOKED-KEY:CAPS"></a>OSTREE_GPG_ERROR_REVOKED_KEY</p></td>
|
||||
<td class="enum_member_description">
|
||||
<p>A signature was found, but the key used to
|
||||
sign it has been revoked. Since: 2020.1.</p>
|
||||
</td>
|
||||
<td class="enum_member_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<p class="since">Since: 2017.10</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="OstreeGpgVerifyResult"></a><h3>OstreeGpgVerifyResult</h3>
|
||||
<pre class="programlisting">typedef struct OstreeGpgVerifyResult OstreeGpgVerifyResult;
|
||||
</pre>
|
||||
<p>Private instance structure.</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="OstreeGpgSignatureAttr"></a><h3>enum OstreeGpgSignatureAttr</h3>
|
||||
<p>Signature attributes available from an <a class="link" href="ostree-GPG-signature-verification-results.html#OstreeGpgVerifyResult" title="OstreeGpgVerifyResult"><span class="type">OstreeGpgVerifyResult</span></a>.
|
||||
The attribute's <span class="type">GVariantType</span> is shown in brackets.</p>
|
||||
<div class="refsect3">
|
||||
<a name="OstreeGpgSignatureAttr.members"></a><h4>Members</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="300px" class="enum_members_name">
|
||||
<col class="enum_members_description">
|
||||
<col width="200px" class="enum_members_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="enum_member_name"><p><a name="OSTREE-GPG-SIGNATURE-ATTR-VALID:CAPS"></a>OSTREE_GPG_SIGNATURE_ATTR_VALID</p></td>
|
||||
<td class="enum_member_description">
|
||||
<p>[<span class="type">G_VARIANT_TYPE_BOOLEAN</span>] Is the signature valid?</p>
|
||||
</td>
|
||||
<td class="enum_member_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="enum_member_name"><p><a name="OSTREE-GPG-SIGNATURE-ATTR-SIG-EXPIRED:CAPS"></a>OSTREE_GPG_SIGNATURE_ATTR_SIG_EXPIRED</p></td>
|
||||
<td class="enum_member_description">
|
||||
<p>[<span class="type">G_VARIANT_TYPE_BOOLEAN</span>] Has the signature expired?</p>
|
||||
</td>
|
||||
<td class="enum_member_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="enum_member_name"><p><a name="OSTREE-GPG-SIGNATURE-ATTR-KEY-EXPIRED:CAPS"></a>OSTREE_GPG_SIGNATURE_ATTR_KEY_EXPIRED</p></td>
|
||||
<td class="enum_member_description">
|
||||
<p>[<span class="type">G_VARIANT_TYPE_BOOLEAN</span>] Has the signing key expired?</p>
|
||||
</td>
|
||||
<td class="enum_member_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="enum_member_name"><p><a name="OSTREE-GPG-SIGNATURE-ATTR-KEY-REVOKED:CAPS"></a>OSTREE_GPG_SIGNATURE_ATTR_KEY_REVOKED</p></td>
|
||||
<td class="enum_member_description">
|
||||
<p>[<span class="type">G_VARIANT_TYPE_BOOLEAN</span>] Has the signing key been revoked?</p>
|
||||
</td>
|
||||
<td class="enum_member_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="enum_member_name"><p><a name="OSTREE-GPG-SIGNATURE-ATTR-KEY-MISSING:CAPS"></a>OSTREE_GPG_SIGNATURE_ATTR_KEY_MISSING</p></td>
|
||||
<td class="enum_member_description">
|
||||
<p>[<span class="type">G_VARIANT_TYPE_BOOLEAN</span>] Is the signing key missing?</p>
|
||||
</td>
|
||||
<td class="enum_member_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="enum_member_name"><p><a name="OSTREE-GPG-SIGNATURE-ATTR-FINGERPRINT:CAPS"></a>OSTREE_GPG_SIGNATURE_ATTR_FINGERPRINT</p></td>
|
||||
<td class="enum_member_description">
|
||||
<p>[<span class="type">G_VARIANT_TYPE_STRING</span>] Fingerprint of the signing key</p>
|
||||
</td>
|
||||
<td class="enum_member_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="enum_member_name"><p><a name="OSTREE-GPG-SIGNATURE-ATTR-TIMESTAMP:CAPS"></a>OSTREE_GPG_SIGNATURE_ATTR_TIMESTAMP</p></td>
|
||||
<td class="enum_member_description">
|
||||
<p>[<span class="type">G_VARIANT_TYPE_INT64</span>] Signature creation Unix timestamp</p>
|
||||
</td>
|
||||
<td class="enum_member_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="enum_member_name"><p><a name="OSTREE-GPG-SIGNATURE-ATTR-EXP-TIMESTAMP:CAPS"></a>OSTREE_GPG_SIGNATURE_ATTR_EXP_TIMESTAMP</p></td>
|
||||
<td class="enum_member_description">
|
||||
<p>[<span class="type">G_VARIANT_TYPE_INT64</span>] Signature expiration Unix timestamp (0 if no
|
||||
expiration)</p>
|
||||
</td>
|
||||
<td class="enum_member_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="enum_member_name"><p><a name="OSTREE-GPG-SIGNATURE-ATTR-PUBKEY-ALGO-NAME:CAPS"></a>OSTREE_GPG_SIGNATURE_ATTR_PUBKEY_ALGO_NAME</p></td>
|
||||
<td class="enum_member_description">
|
||||
<p>[<span class="type">G_VARIANT_TYPE_STRING</span>] Name of the public key algorithm used to create
|
||||
the signature</p>
|
||||
</td>
|
||||
<td class="enum_member_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="enum_member_name"><p><a name="OSTREE-GPG-SIGNATURE-ATTR-HASH-ALGO-NAME:CAPS"></a>OSTREE_GPG_SIGNATURE_ATTR_HASH_ALGO_NAME</p></td>
|
||||
<td class="enum_member_description">
|
||||
<p>[<span class="type">G_VARIANT_TYPE_STRING</span>] Name of the hash algorithm used to create the
|
||||
signature</p>
|
||||
</td>
|
||||
<td class="enum_member_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="enum_member_name"><p><a name="OSTREE-GPG-SIGNATURE-ATTR-USER-NAME:CAPS"></a>OSTREE_GPG_SIGNATURE_ATTR_USER_NAME</p></td>
|
||||
<td class="enum_member_description">
|
||||
<p>[<span class="type">G_VARIANT_TYPE_STRING</span>] The name of the signing key's primary user</p>
|
||||
</td>
|
||||
<td class="enum_member_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="enum_member_name"><p><a name="OSTREE-GPG-SIGNATURE-ATTR-USER-EMAIL:CAPS"></a>OSTREE_GPG_SIGNATURE_ATTR_USER_EMAIL</p></td>
|
||||
<td class="enum_member_description">
|
||||
<p>[<span class="type">G_VARIANT_TYPE_STRING</span>] The email address of the signing key's primary
|
||||
user</p>
|
||||
</td>
|
||||
<td class="enum_member_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="enum_member_name"><p><a name="OSTREE-GPG-SIGNATURE-ATTR-FINGERPRINT-PRIMARY:CAPS"></a>OSTREE_GPG_SIGNATURE_ATTR_FINGERPRINT_PRIMARY</p></td>
|
||||
<td class="enum_member_description">
|
||||
<p>[<span class="type">G_VARIANT_TYPE_STRING</span>] Fingerprint of the signing key's primary key
|
||||
(will be the same as OSTREE_GPG_SIGNATURE_ATTR_FINGERPRINT if the
|
||||
the signature is already from the primary key rather than a subkey,
|
||||
and will be the empty string if the key is missing.)</p>
|
||||
</td>
|
||||
<td class="enum_member_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="enum_member_name"><p><a name="OSTREE-GPG-SIGNATURE-ATTR-KEY-EXP-TIMESTAMP:CAPS"></a>OSTREE_GPG_SIGNATURE_ATTR_KEY_EXP_TIMESTAMP</p></td>
|
||||
<td class="enum_member_description">
|
||||
<p>[<span class="type">G_VARIANT_TYPE_INT64</span>] Key expiration Unix timestamp (0 if no
|
||||
expiration or if the key is missing)</p>
|
||||
</td>
|
||||
<td class="enum_member_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="enum_member_name"><p><a name="OSTREE-GPG-SIGNATURE-ATTR-KEY-EXP-TIMESTAMP-PRIMARY:CAPS"></a>OSTREE_GPG_SIGNATURE_ATTR_KEY_EXP_TIMESTAMP_PRIMARY</p></td>
|
||||
<td class="enum_member_description">
|
||||
<p>[<span class="type">G_VARIANT_TYPE_INT64</span>] Key expiration Unix timestamp of the signing key's
|
||||
primary key (will be the same as OSTREE_GPG_SIGNATURE_ATTR_KEY_EXP_TIMESTAMP
|
||||
if the signing key is the primary key and 0 if no expiration or if the key
|
||||
is missing)</p>
|
||||
</td>
|
||||
<td class="enum_member_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="OstreeGpgSignatureFormatFlags"></a><h3>enum OstreeGpgSignatureFormatFlags</h3>
|
||||
<p>Formatting flags for <a class="link" href="ostree-GPG-signature-verification-results.html#ostree-gpg-verify-result-describe" title="ostree_gpg_verify_result_describe ()"><code class="function">ostree_gpg_verify_result_describe()</code></a>. Currently
|
||||
there's only one possible output format, but this enumeration allows
|
||||
for future variations.</p>
|
||||
<div class="refsect3">
|
||||
<a name="OstreeGpgSignatureFormatFlags.members"></a><h4>Members</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="300px" class="enum_members_name">
|
||||
<col class="enum_members_description">
|
||||
<col width="200px" class="enum_members_annotations">
|
||||
</colgroup>
|
||||
<tbody><tr>
|
||||
<td class="enum_member_name"><p><a name="OSTREE-GPG-SIGNATURE-FORMAT-DEFAULT:CAPS"></a>OSTREE_GPG_SIGNATURE_FORMAT_DEFAULT</p></td>
|
||||
<td class="enum_member_description">
|
||||
<p>Use the default output format</p>
|
||||
</td>
|
||||
<td class="enum_member_annotations"> </td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<hr>Generated by GTK-Doc V1.34.0</div>
|
||||
</body>
|
||||
</html>
|
685
reference/ostree-In-memory-modifiable-filesystem-tree.html
Normal file
@ -0,0 +1,685 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>In-memory modifiable filesystem tree: OSTree API references</title>
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
<link rel="home" href="index.html" title="OSTree API references">
|
||||
<link rel="up" href="reference.html" title="API Reference">
|
||||
<link rel="prev" href="ostree-OstreeRepo.html" title="OstreeRepo: Content-addressed object store">
|
||||
<link rel="next" href="ostree-Root-partition-mount-point.html" title="Root partition mount point">
|
||||
<meta name="generator" content="GTK-Doc V1.34.0 (XML mode)">
|
||||
<link rel="stylesheet" href="style.css" type="text/css">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
|
||||
<td width="100%" align="left" class="shortcuts">
|
||||
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
|
||||
<a href="#ostree-In-memory-modifiable-filesystem-tree.description" class="shortcut">Description</a></span>
|
||||
</td>
|
||||
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
|
||||
<td><a accesskey="u" href="reference.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
|
||||
<td><a accesskey="p" href="ostree-OstreeRepo.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
|
||||
<td><a accesskey="n" href="ostree-Root-partition-mount-point.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
|
||||
</tr></table>
|
||||
<div class="refentry">
|
||||
<a name="ostree-In-memory-modifiable-filesystem-tree"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv"><table width="100%"><tr>
|
||||
<td valign="top">
|
||||
<h2><span class="refentrytitle"><a name="ostree-In-memory-modifiable-filesystem-tree.top_of_page"></a>In-memory modifiable filesystem tree</span></h2>
|
||||
<p>In-memory modifiable filesystem tree — Modifiable filesystem tree</p>
|
||||
</td>
|
||||
<td class="gallery_image" valign="top" align="right"></td>
|
||||
</tr></table></div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-In-memory-modifiable-filesystem-tree.functions"></a><h2>Functions</h2>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="functions_proto_type">
|
||||
<col class="functions_proto_name">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="returnvalue">OstreeMutableTree</span></a> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-new" title="ostree_mutable_tree_new ()">ostree_mutable_tree_new</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="returnvalue">OstreeMutableTree</span></a> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-new-from-commit" title="ostree_mutable_tree_new_from_commit ()">ostree_mutable_tree_new_from_commit</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="returnvalue">OstreeMutableTree</span></a> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-new-from-checksum" title="ostree_mutable_tree_new_from_checksum ()">ostree_mutable_tree_new_from_checksum</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">gboolean</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-check-error" title="ostree_mutable_tree_check_error ()">ostree_mutable_tree_check_error</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">void</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-set-metadata-checksum" title="ostree_mutable_tree_set_metadata_checksum ()">ostree_mutable_tree_set_metadata_checksum</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">const <span class="returnvalue">char</span> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-get-metadata-checksum" title="ostree_mutable_tree_get_metadata_checksum ()">ostree_mutable_tree_get_metadata_checksum</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">void</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-set-contents-checksum" title="ostree_mutable_tree_set_contents_checksum ()">ostree_mutable_tree_set_contents_checksum</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">const <span class="returnvalue">char</span> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-get-contents-checksum" title="ostree_mutable_tree_get_contents_checksum ()">ostree_mutable_tree_get_contents_checksum</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">gboolean</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-replace-file" title="ostree_mutable_tree_replace_file ()">ostree_mutable_tree_replace_file</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">gboolean</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-remove" title="ostree_mutable_tree_remove ()">ostree_mutable_tree_remove</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">gboolean</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-ensure-dir" title="ostree_mutable_tree_ensure_dir ()">ostree_mutable_tree_ensure_dir</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">gboolean</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-lookup" title="ostree_mutable_tree_lookup ()">ostree_mutable_tree_lookup</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">gboolean</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-ensure-parent-dirs" title="ostree_mutable_tree_ensure_parent_dirs ()">ostree_mutable_tree_ensure_parent_dirs</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">gboolean</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-walk" title="ostree_mutable_tree_walk ()">ostree_mutable_tree_walk</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">GHashTable</span> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-get-subdirs" title="ostree_mutable_tree_get_subdirs ()">ostree_mutable_tree_get_subdirs</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">GHashTable</span> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-get-files" title="ostree_mutable_tree_get_files ()">ostree_mutable_tree_get_files</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">gboolean</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-fill-empty-from-dirtree" title="ostree_mutable_tree_fill_empty_from_dirtree ()">ostree_mutable_tree_fill_empty_from_dirtree</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-In-memory-modifiable-filesystem-tree.other"></a><h2>Types and Values</h2>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="other_proto_type">
|
||||
<col class="other_proto_name">
|
||||
</colgroup>
|
||||
<tbody><tr>
|
||||
<td class="typedef_keyword">typedef</td>
|
||||
<td class="function_name"><a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree">OstreeMutableTree</a></td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-In-memory-modifiable-filesystem-tree.description"></a><h2>Description</h2>
|
||||
<p>In order to commit content into an <a class="link" href="ostree-OstreeRepo.html#OstreeRepo" title="OstreeRepo"><span class="type">OstreeRepo</span></a>, it must first be
|
||||
imported into an <a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="type">OstreeMutableTree</span></a>. There are several high level
|
||||
APIs to create an initiable <a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="type">OstreeMutableTree</span></a> from a physical
|
||||
filesystem directory, but they may also be computed
|
||||
programmatically.</p>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-In-memory-modifiable-filesystem-tree.functions_details"></a><h2>Functions</h2>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-mutable-tree-new"></a><h3>ostree_mutable_tree_new ()</h3>
|
||||
<pre class="programlisting"><a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="returnvalue">OstreeMutableTree</span></a> *
|
||||
ostree_mutable_tree_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-mutable-tree-new.returns"></a><h4>Returns</h4>
|
||||
<p>A new tree. </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>]</span></p>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-mutable-tree-new-from-commit"></a><h3>ostree_mutable_tree_new_from_commit ()</h3>
|
||||
<pre class="programlisting"><a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="returnvalue">OstreeMutableTree</span></a> *
|
||||
ostree_mutable_tree_new_from_commit (<em class="parameter"><code><a class="link" href="ostree-OstreeRepo.html#OstreeRepo" title="OstreeRepo"><span class="type">OstreeRepo</span></a> *repo</code></em>,
|
||||
<em class="parameter"><code>const <span class="type">char</span> *rev</code></em>,
|
||||
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
|
||||
<p>Creates a new OstreeMutableTree with the contents taken from the given commit.
|
||||
The data will be loaded from the repo lazily as needed.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-mutable-tree-new-from-commit.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>repo</p></td>
|
||||
<td class="parameter_description"><p>The repo which contains the objects refered by the checksums.</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>rev</p></td>
|
||||
<td class="parameter_description"><p>ref or SHA-256 checksum</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-mutable-tree-new-from-commit.returns"></a><h4>Returns</h4>
|
||||
<p>A new tree. </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>]</span></p>
|
||||
</div>
|
||||
<p class="since">Since: 2021.5</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-mutable-tree-new-from-checksum"></a><h3>ostree_mutable_tree_new_from_checksum ()</h3>
|
||||
<pre class="programlisting"><a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="returnvalue">OstreeMutableTree</span></a> *
|
||||
ostree_mutable_tree_new_from_checksum (<em class="parameter"><code><a class="link" href="ostree-OstreeRepo.html#OstreeRepo" title="OstreeRepo"><span class="type">OstreeRepo</span></a> *repo</code></em>,
|
||||
<em class="parameter"><code>const <span class="type">char</span> *contents_checksum</code></em>,
|
||||
<em class="parameter"><code>const <span class="type">char</span> *metadata_checksum</code></em>);</pre>
|
||||
<p>Creates a new OstreeMutableTree with the contents taken from the given repo
|
||||
and checksums. The data will be loaded from the repo lazily as needed.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-mutable-tree-new-from-checksum.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>repo</p></td>
|
||||
<td class="parameter_description"><p>The repo which contains the objects refered by the checksums.</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>contents_checksum</p></td>
|
||||
<td class="parameter_description"><p>dirtree checksum</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>metadata_checksum</p></td>
|
||||
<td class="parameter_description"><p>dirmeta checksum</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-mutable-tree-new-from-checksum.returns"></a><h4>Returns</h4>
|
||||
<p>A new tree. </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>]</span></p>
|
||||
</div>
|
||||
<p class="since">Since: 2018.7</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-mutable-tree-check-error"></a><h3>ostree_mutable_tree_check_error ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||||
ostree_mutable_tree_check_error (<em class="parameter"><code><a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="type">OstreeMutableTree</span></a> *self</code></em>,
|
||||
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
|
||||
<p>In some cases, a tree may be in a "lazy" state that loads
|
||||
data in the background; if an error occurred during a non-throwing
|
||||
API call, it will have been cached. This function checks for a
|
||||
cached error. The tree remains in error state.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-mutable-tree-check-error.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody><tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>Tree</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-mutable-tree-check-error.returns"></a><h4>Returns</h4>
|
||||
<p> <code class="literal">TRUE</code> on success</p>
|
||||
</div>
|
||||
<p class="since">Since: 2018.7</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-mutable-tree-set-metadata-checksum"></a><h3>ostree_mutable_tree_set_metadata_checksum ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||||
ostree_mutable_tree_set_metadata_checksum
|
||||
(<em class="parameter"><code><a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="type">OstreeMutableTree</span></a> *self</code></em>,
|
||||
<em class="parameter"><code>const <span class="type">char</span> *checksum</code></em>);</pre>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-mutable-tree-get-metadata-checksum"></a><h3>ostree_mutable_tree_get_metadata_checksum ()</h3>
|
||||
<pre class="programlisting">const <span class="returnvalue">char</span> *
|
||||
ostree_mutable_tree_get_metadata_checksum
|
||||
(<em class="parameter"><code><a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="type">OstreeMutableTree</span></a> *self</code></em>);</pre>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-mutable-tree-set-contents-checksum"></a><h3>ostree_mutable_tree_set_contents_checksum ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||||
ostree_mutable_tree_set_contents_checksum
|
||||
(<em class="parameter"><code><a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="type">OstreeMutableTree</span></a> *self</code></em>,
|
||||
<em class="parameter"><code>const <span class="type">char</span> *checksum</code></em>);</pre>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-mutable-tree-get-contents-checksum"></a><h3>ostree_mutable_tree_get_contents_checksum ()</h3>
|
||||
<pre class="programlisting">const <span class="returnvalue">char</span> *
|
||||
ostree_mutable_tree_get_contents_checksum
|
||||
(<em class="parameter"><code><a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="type">OstreeMutableTree</span></a> *self</code></em>);</pre>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-mutable-tree-replace-file"></a><h3>ostree_mutable_tree_replace_file ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||||
ostree_mutable_tree_replace_file (<em class="parameter"><code><a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="type">OstreeMutableTree</span></a> *self</code></em>,
|
||||
<em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
|
||||
<em class="parameter"><code>const <span class="type">char</span> *checksum</code></em>,
|
||||
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-mutable-tree-remove"></a><h3>ostree_mutable_tree_remove ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||||
ostree_mutable_tree_remove (<em class="parameter"><code><a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="type">OstreeMutableTree</span></a> *self</code></em>,
|
||||
<em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
|
||||
<em class="parameter"><code><span class="type">gboolean</span> allow_noent</code></em>,
|
||||
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
|
||||
<p>Remove the file or subdirectory named <em class="parameter"><code>name</code></em>
|
||||
from the mutable tree <em class="parameter"><code>self</code></em>
|
||||
.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-mutable-tree-remove.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>Tree</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>name</p></td>
|
||||
<td class="parameter_description"><p>Name of file or subdirectory to remove</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>allow_noent</p></td>
|
||||
<td class="parameter_description"><p>If <em class="parameter"><code>FALSE</code></em>
|
||||
, an error will be thrown if <em class="parameter"><code>name</code></em>
|
||||
does not exist in the tree</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>error</p></td>
|
||||
<td class="parameter_description"><p>a <span class="type">GError</span></p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<p class="since">Since: 2018.9</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-mutable-tree-ensure-dir"></a><h3>ostree_mutable_tree_ensure_dir ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||||
ostree_mutable_tree_ensure_dir (<em class="parameter"><code><a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="type">OstreeMutableTree</span></a> *self</code></em>,
|
||||
<em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
|
||||
<em class="parameter"><code><a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="type">OstreeMutableTree</span></a> **out_subdir</code></em>,
|
||||
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
|
||||
<p>Returns the subdirectory of self with filename <em class="parameter"><code>name</code></em>
|
||||
, creating an empty one
|
||||
it if it doesn't exist.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-mutable-tree-ensure-dir.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>Tree</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>name</p></td>
|
||||
<td class="parameter_description"><p>Name of subdirectory of self to retrieve/creates</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>out_subdir</p></td>
|
||||
<td class="parameter_description"><p>the subdirectory. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/out"><span class="acronym">out</span></a>][<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>][<a href="http://foldoc.org/optional"><span class="acronym">optional</span></a>]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>error</p></td>
|
||||
<td class="parameter_description"><p>a <span class="type">GError</span></p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-mutable-tree-lookup"></a><h3>ostree_mutable_tree_lookup ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||||
ostree_mutable_tree_lookup (<em class="parameter"><code><a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="type">OstreeMutableTree</span></a> *self</code></em>,
|
||||
<em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
|
||||
<em class="parameter"><code><span class="type">char</span> **out_file_checksum</code></em>,
|
||||
<em class="parameter"><code><a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="type">OstreeMutableTree</span></a> **out_subdir</code></em>,
|
||||
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
|
||||
<p>Lookup <em class="parameter"><code>name</code></em>
|
||||
and returns <em class="parameter"><code>out_file_checksum</code></em>
|
||||
or <em class="parameter"><code>out_subdir</code></em>
|
||||
depending on its
|
||||
file type.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-mutable-tree-lookup.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>Tree</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>name</p></td>
|
||||
<td class="parameter_description"><p>name</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>out_file_checksum</p></td>
|
||||
<td class="parameter_description"><p>checksum. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/out"><span class="acronym">out</span></a>][<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>][<a href="http://foldoc.org/nullable"><span class="acronym">nullable</span></a>][<a href="http://foldoc.org/optional"><span class="acronym">optional</span></a>]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>out_subdir</p></td>
|
||||
<td class="parameter_description"><p>subdirectory. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/out"><span class="acronym">out</span></a>][<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>][<a href="http://foldoc.org/nullable"><span class="acronym">nullable</span></a>][<a href="http://foldoc.org/optional"><span class="acronym">optional</span></a>]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>error</p></td>
|
||||
<td class="parameter_description"><p>a <span class="type">GError</span></p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-mutable-tree-lookup.returns"></a><h4>Returns</h4>
|
||||
<p> <code class="literal">TRUE</code> on success and either <em class="parameter"><code>out_file_checksum</code></em>
|
||||
or <em class="parameter"><code>out_subdir</code></em>
|
||||
are
|
||||
filled, <code class="literal">FALSE</code> otherwise.</p>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-mutable-tree-ensure-parent-dirs"></a><h3>ostree_mutable_tree_ensure_parent_dirs ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||||
ostree_mutable_tree_ensure_parent_dirs
|
||||
(<em class="parameter"><code><a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="type">OstreeMutableTree</span></a> *self</code></em>,
|
||||
<em class="parameter"><code><span class="type">GPtrArray</span> *split_path</code></em>,
|
||||
<em class="parameter"><code>const <span class="type">char</span> *metadata_checksum</code></em>,
|
||||
<em class="parameter"><code><a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="type">OstreeMutableTree</span></a> **out_parent</code></em>,
|
||||
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
|
||||
<p>Create all parent trees necessary for the given <em class="parameter"><code>split_path</code></em>
|
||||
to
|
||||
exist.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-mutable-tree-ensure-parent-dirs.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>Tree</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>split_path</p></td>
|
||||
<td class="parameter_description"><p>File path components. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/element-type"><span class="acronym">element-type</span></a> utf8]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>metadata_checksum</p></td>
|
||||
<td class="parameter_description"><p>SHA256 checksum for metadata</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>out_parent</p></td>
|
||||
<td class="parameter_description"><p>The parent tree. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/out"><span class="acronym">out</span></a>][<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>][<a href="http://foldoc.org/optional"><span class="acronym">optional</span></a>]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>error</p></td>
|
||||
<td class="parameter_description"><p>a <span class="type">GError</span></p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-mutable-tree-walk"></a><h3>ostree_mutable_tree_walk ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||||
ostree_mutable_tree_walk (<em class="parameter"><code><a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="type">OstreeMutableTree</span></a> *self</code></em>,
|
||||
<em class="parameter"><code><span class="type">GPtrArray</span> *split_path</code></em>,
|
||||
<em class="parameter"><code><span class="type">guint</span> start</code></em>,
|
||||
<em class="parameter"><code><a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="type">OstreeMutableTree</span></a> **out_subdir</code></em>,
|
||||
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
|
||||
<p>Traverse <em class="parameter"><code>start</code></em>
|
||||
number of elements starting from <em class="parameter"><code>split_path</code></em>
|
||||
; the
|
||||
child will be returned in <em class="parameter"><code>out_subdir</code></em>
|
||||
.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-mutable-tree-walk.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>Tree</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>split_path</p></td>
|
||||
<td class="parameter_description"><p>Split pathname. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/element-type"><span class="acronym">element-type</span></a> utf8]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>start</p></td>
|
||||
<td class="parameter_description"><p>Descend from this number of elements in <em class="parameter"><code>split_path</code></em>
|
||||
</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>out_subdir</p></td>
|
||||
<td class="parameter_description"><p>Target parent. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/out"><span class="acronym">out</span></a>][<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>error</p></td>
|
||||
<td class="parameter_description"><p>Error</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-mutable-tree-get-subdirs"></a><h3>ostree_mutable_tree_get_subdirs ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">GHashTable</span> *
|
||||
ostree_mutable_tree_get_subdirs (<em class="parameter"><code><a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="type">OstreeMutableTree</span></a> *self</code></em>);</pre>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-mutable-tree-get-subdirs.returns"></a><h4>Returns</h4>
|
||||
<p>All children directories. </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20none"><span class="acronym">transfer none</span></a>][<a href="http://foldoc.org/element-type"><span class="acronym">element-type</span></a> utf8 OstreeMutableTree]</span></p>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-mutable-tree-get-files"></a><h3>ostree_mutable_tree_get_files ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">GHashTable</span> *
|
||||
ostree_mutable_tree_get_files (<em class="parameter"><code><a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="type">OstreeMutableTree</span></a> *self</code></em>);</pre>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-mutable-tree-get-files.returns"></a><h4>Returns</h4>
|
||||
<p>All children files (the value is a checksum). </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20none"><span class="acronym">transfer none</span></a>][<a href="http://foldoc.org/element-type"><span class="acronym">element-type</span></a> utf8 utf8]</span></p>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-mutable-tree-fill-empty-from-dirtree"></a><h3>ostree_mutable_tree_fill_empty_from_dirtree ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||||
ostree_mutable_tree_fill_empty_from_dirtree
|
||||
(<em class="parameter"><code><a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="type">OstreeMutableTree</span></a> *self</code></em>,
|
||||
<em class="parameter"><code><a class="link" href="ostree-OstreeRepo.html#OstreeRepo" title="OstreeRepo"><span class="type">OstreeRepo</span></a> *repo</code></em>,
|
||||
<em class="parameter"><code>const <span class="type">char</span> *contents_checksum</code></em>,
|
||||
<em class="parameter"><code>const <span class="type">char</span> *metadata_checksum</code></em>);</pre>
|
||||
<p>Merges <em class="parameter"><code>self</code></em>
|
||||
with the tree given by <em class="parameter"><code>contents_checksum</code></em>
|
||||
and
|
||||
<em class="parameter"><code>metadata_checksum</code></em>
|
||||
, but only if it's possible without writing new objects to
|
||||
the <em class="parameter"><code>repo</code></em>
|
||||
. We can do this if either <em class="parameter"><code>self</code></em>
|
||||
is empty, the tree given by
|
||||
<em class="parameter"><code>contents_checksum</code></em>
|
||||
is empty or if both trees already have the same
|
||||
<em class="parameter"><code>contents_checksum</code></em>
|
||||
.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-mutable-tree-fill-empty-from-dirtree.returns"></a><h4>Returns</h4>
|
||||
<p> <em class="parameter"><code>TRUE</code></em>
|
||||
if merge was successful, <em class="parameter"><code>FALSE</code></em>
|
||||
if it was not possible.</p>
|
||||
<p>This function enables optimisations when composing trees. The provided
|
||||
checksums are not loaded or checked when this function is called. Instead
|
||||
the contents will be loaded only when needed.</p>
|
||||
</div>
|
||||
<p class="since">Since: 2018.7</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-In-memory-modifiable-filesystem-tree.other_details"></a><h2>Types and Values</h2>
|
||||
<div class="refsect2">
|
||||
<a name="OstreeMutableTree"></a><h3>OstreeMutableTree</h3>
|
||||
<pre class="programlisting">typedef struct OstreeMutableTree OstreeMutableTree;
|
||||
</pre>
|
||||
<p>Private instance structure.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<hr>Generated by GTK-Doc V1.34.0</div>
|
||||
</body>
|
||||
</html>
|
10723
reference/ostree-OstreeRepo.html
Normal file
@ -0,0 +1,623 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Progress notification system for asynchronous operations: OSTree API references</title>
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
<link rel="home" href="index.html" title="OSTree API references">
|
||||
<link rel="up" href="reference.html" title="API Reference">
|
||||
<link rel="prev" href="ostree-Root-partition-mount-point.html" title="Root partition mount point">
|
||||
<link rel="next" href="ostree-SELinux-policy-management.html" title="SELinux policy management">
|
||||
<meta name="generator" content="GTK-Doc V1.34.0 (XML mode)">
|
||||
<link rel="stylesheet" href="style.css" type="text/css">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
|
||||
<td width="100%" align="left" class="shortcuts">
|
||||
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
|
||||
<a href="#ostree-Progress-notification-system-for-asynchronous-operations.description" class="shortcut">Description</a></span>
|
||||
</td>
|
||||
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
|
||||
<td><a accesskey="u" href="reference.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
|
||||
<td><a accesskey="p" href="ostree-Root-partition-mount-point.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
|
||||
<td><a accesskey="n" href="ostree-SELinux-policy-management.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
|
||||
</tr></table>
|
||||
<div class="refentry">
|
||||
<a name="ostree-Progress-notification-system-for-asynchronous-operations"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv"><table width="100%"><tr>
|
||||
<td valign="top">
|
||||
<h2><span class="refentrytitle"><a name="ostree-Progress-notification-system-for-asynchronous-operations.top_of_page"></a>Progress notification system for asynchronous operations</span></h2>
|
||||
<p>Progress notification system for asynchronous operations — Values representing progress</p>
|
||||
</td>
|
||||
<td class="gallery_image" valign="top" align="right"></td>
|
||||
</tr></table></div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-Progress-notification-system-for-asynchronous-operations.functions"></a><h2>Functions</h2>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="functions_proto_type">
|
||||
<col class="functions_proto_name">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#OstreeAsyncProgress" title="OstreeAsyncProgress"><span class="returnvalue">OstreeAsyncProgress</span></a> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#ostree-async-progress-new" title="ostree_async_progress_new ()">ostree_async_progress_new</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#OstreeAsyncProgress" title="OstreeAsyncProgress"><span class="returnvalue">OstreeAsyncProgress</span></a> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#ostree-async-progress-new-and-connect" title="ostree_async_progress_new_and_connect ()">ostree_async_progress_new_and_connect</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">void</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#ostree-async-progress-copy-state" title="ostree_async_progress_copy_state ()">ostree_async_progress_copy_state</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">char</span> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#ostree-async-progress-get-status" title="ostree_async_progress_get_status ()">ostree_async_progress_get_status</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">void</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#ostree-async-progress-get" title="ostree_async_progress_get ()">ostree_async_progress_get</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">GVariant</span> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#ostree-async-progress-get-variant" title="ostree_async_progress_get_variant ()">ostree_async_progress_get_variant</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">guint</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#ostree-async-progress-get-uint" title="ostree_async_progress_get_uint ()">ostree_async_progress_get_uint</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">guint64</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#ostree-async-progress-get-uint64" title="ostree_async_progress_get_uint64 ()">ostree_async_progress_get_uint64</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">void</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#ostree-async-progress-set-status" title="ostree_async_progress_set_status ()">ostree_async_progress_set_status</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">void</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#ostree-async-progress-set" title="ostree_async_progress_set ()">ostree_async_progress_set</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">void</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#ostree-async-progress-set-variant" title="ostree_async_progress_set_variant ()">ostree_async_progress_set_variant</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">void</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#ostree-async-progress-set-uint" title="ostree_async_progress_set_uint ()">ostree_async_progress_set_uint</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">void</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#ostree-async-progress-set-uint64" title="ostree_async_progress_set_uint64 ()">ostree_async_progress_set_uint64</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">void</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#ostree-async-progress-finish" title="ostree_async_progress_finish ()">ostree_async_progress_finish</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-Progress-notification-system-for-asynchronous-operations.other"></a><h2>Types and Values</h2>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="other_proto_type">
|
||||
<col class="other_proto_name">
|
||||
</colgroup>
|
||||
<tbody><tr>
|
||||
<td class="typedef_keyword">typedef</td>
|
||||
<td class="function_name"><a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#OstreeAsyncProgress" title="OstreeAsyncProgress">OstreeAsyncProgress</a></td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-Progress-notification-system-for-asynchronous-operations.description"></a><h2>Description</h2>
|
||||
<p>For many asynchronous operations, it's desirable for callers to be
|
||||
able to watch their status as they progress. For example, an user
|
||||
interface calling an asynchronous download operation will want to
|
||||
be able to see the total number of bytes downloaded.</p>
|
||||
<p>This class provides a mechanism for callees of asynchronous
|
||||
operations to communicate back with callers. It transparently
|
||||
handles thread safety, ensuring that the progress change
|
||||
notification occurs in the thread-default context of the calling
|
||||
operation.</p>
|
||||
<p>The <a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#ostree-async-progress-get-status" title="ostree_async_progress_get_status ()"><code class="function">ostree_async_progress_get_status()</code></a> and <a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#ostree-async-progress-set-status" title="ostree_async_progress_set_status ()"><code class="function">ostree_async_progress_set_status()</code></a>
|
||||
methods get and set a well-known <code class="literal">status</code> key of type <code class="literal">G_VARIANT_TYPE_STRING</code>.
|
||||
This key may be accessed using the other <a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#OstreeAsyncProgress" title="OstreeAsyncProgress"><span class="type">OstreeAsyncProgress</span></a> methods, but it
|
||||
must always have the correct type.</p>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-Progress-notification-system-for-asynchronous-operations.functions_details"></a><h2>Functions</h2>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-async-progress-new"></a><h3>ostree_async_progress_new ()</h3>
|
||||
<pre class="programlisting"><a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#OstreeAsyncProgress" title="OstreeAsyncProgress"><span class="returnvalue">OstreeAsyncProgress</span></a> *
|
||||
ostree_async_progress_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-async-progress-new.returns"></a><h4>Returns</h4>
|
||||
<p>A new progress object. </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>]</span></p>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-async-progress-new-and-connect"></a><h3>ostree_async_progress_new_and_connect ()</h3>
|
||||
<pre class="programlisting"><a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#OstreeAsyncProgress" title="OstreeAsyncProgress"><span class="returnvalue">OstreeAsyncProgress</span></a> *
|
||||
ostree_async_progress_new_and_connect (<em class="parameter"><code><span class="type">void</span> (*changed) (OstreeAsyncProgress *self, gpointer user_data)</code></em>,
|
||||
<em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);</pre>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/skip"><span class="acronym">skip</span></a>]</span></p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-async-progress-new-and-connect.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>changed</p></td>
|
||||
<td class="parameter_description"><p>a notification callback</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>user_data</p></td>
|
||||
<td class="parameter_description"><p>data to pass to <em class="parameter"><code>changed</code></em>
|
||||
</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-async-progress-new-and-connect.returns"></a><h4>Returns</h4>
|
||||
<p>A new progress object. </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>]</span></p>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-async-progress-copy-state"></a><h3>ostree_async_progress_copy_state ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||||
ostree_async_progress_copy_state (<em class="parameter"><code><a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#OstreeAsyncProgress" title="OstreeAsyncProgress"><span class="type">OstreeAsyncProgress</span></a> *self</code></em>,
|
||||
<em class="parameter"><code><a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#OstreeAsyncProgress" title="OstreeAsyncProgress"><span class="type">OstreeAsyncProgress</span></a> *dest</code></em>);</pre>
|
||||
<p>Atomically copies all the state from <em class="parameter"><code>self</code></em>
|
||||
to <em class="parameter"><code>dest</code></em>
|
||||
, without invoking the
|
||||
callback.
|
||||
This is used for proxying progress objects across different <span class="type">GMainContexts</span>.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-async-progress-copy-state.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>An <a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#OstreeAsyncProgress" title="OstreeAsyncProgress"><span class="type">OstreeAsyncProgress</span></a> to copy from</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>dest</p></td>
|
||||
<td class="parameter_description"><p>An <a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#OstreeAsyncProgress" title="OstreeAsyncProgress"><span class="type">OstreeAsyncProgress</span></a> to copy to</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<p class="since">Since: 2019.6</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-async-progress-get-status"></a><h3>ostree_async_progress_get_status ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">char</span> *
|
||||
ostree_async_progress_get_status (<em class="parameter"><code><a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#OstreeAsyncProgress" title="OstreeAsyncProgress"><span class="type">OstreeAsyncProgress</span></a> *self</code></em>);</pre>
|
||||
<p>Get the human-readable status string from the <a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#OstreeAsyncProgress" title="OstreeAsyncProgress"><span class="type">OstreeAsyncProgress</span></a>. This
|
||||
operation is thread-safe. The retuned value may be <code class="literal">NULL</code> if no status is
|
||||
set.</p>
|
||||
<p>This is a convenience function to get the well-known <code class="literal">status</code> key.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-async-progress-get-status.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody><tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>an <a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#OstreeAsyncProgress" title="OstreeAsyncProgress"><span class="type">OstreeAsyncProgress</span></a></p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-async-progress-get-status.returns"></a><h4>Returns</h4>
|
||||
<p>the current status, or <code class="literal">NULL</code> if none is set. </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>][<a href="http://foldoc.org/nullable"><span class="acronym">nullable</span></a>]</span></p>
|
||||
</div>
|
||||
<p class="since">Since: 2017.6</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-async-progress-get"></a><h3>ostree_async_progress_get ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||||
ostree_async_progress_get (<em class="parameter"><code><a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#OstreeAsyncProgress" title="OstreeAsyncProgress"><span class="type">OstreeAsyncProgress</span></a> *self</code></em>,
|
||||
<em class="parameter"><code>...</code></em>);</pre>
|
||||
<p>Get the values corresponding to zero or more keys from the
|
||||
<a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#OstreeAsyncProgress" title="OstreeAsyncProgress"><span class="type">OstreeAsyncProgress</span></a>. Each key is specified in @... as the key name, followed
|
||||
by a <span class="type">GVariant</span> format string, followed by the necessary arguments for that
|
||||
format string, just as for <code class="function">g_variant_get()</code>. After those arguments is the
|
||||
next key name. The varargs list must be <code class="literal">NULL</code>-terminated.</p>
|
||||
<p>Each format string must make deep copies of its value, as the values stored
|
||||
in the <a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#OstreeAsyncProgress" title="OstreeAsyncProgress"><span class="type">OstreeAsyncProgress</span></a> may be freed from another thread after this
|
||||
function returns.</p>
|
||||
<p>This operation is thread-safe, and all the keys are queried atomically.</p>
|
||||
<div class="informalexample">
|
||||
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="listing_lines" align="right"><pre>1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11</pre></td>
|
||||
<td class="listing_code"><pre class="programlisting"><span class="n">guint32</span><span class="w"> </span><span class="n">outstanding_fetches</span><span class="p">;</span>
|
||||
<span class="n">guint64</span><span class="w"> </span><span class="n">bytes_received</span><span class="p">;</span>
|
||||
<span class="n">g_autofree</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">status</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span>
|
||||
<span class="n">g_autoptr</span><span class="p">(</span><span class="n">GVariant</span><span class="p">)</span><span class="w"> </span><span class="n">refs_variant</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span>
|
||||
|
||||
<span class="n">ostree_async_progress_get</span><span class="w"> </span><span class="p">(</span><span class="n">progress</span><span class="p">,</span>
|
||||
<span class="w"> </span><span class="s">"outstanding-fetches"</span><span class="p">,</span><span class="w"> </span><span class="s">"u"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">outstanding_fetches</span><span class="p">,</span>
|
||||
<span class="w"> </span><span class="s">"bytes-received"</span><span class="p">,</span><span class="w"> </span><span class="s">"t"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">bytes_received</span><span class="p">,</span>
|
||||
<span class="w"> </span><span class="s">"status"</span><span class="p">,</span><span class="w"> </span><span class="s">"s"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">status</span><span class="p">,</span>
|
||||
<span class="w"> </span><span class="s">"refs"</span><span class="p">,</span><span class="w"> </span><span class="s">"@a{ss}"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">refs_variant</span><span class="p">,</span>
|
||||
<span class="w"> </span><span class="nb">NULL</span><span class="p">);</span></pre></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<p></p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-async-progress-get.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>an <a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#OstreeAsyncProgress" title="OstreeAsyncProgress"><span class="type">OstreeAsyncProgress</span></a></p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>...</p></td>
|
||||
<td class="parameter_description"><p>key name, format string, <span class="type">GVariant</span> return locations, …, followed by <code class="literal">NULL</code></p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<p class="since">Since: 2017.6</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-async-progress-get-variant"></a><h3>ostree_async_progress_get_variant ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">GVariant</span> *
|
||||
ostree_async_progress_get_variant (<em class="parameter"><code><a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#OstreeAsyncProgress" title="OstreeAsyncProgress"><span class="type">OstreeAsyncProgress</span></a> *self</code></em>,
|
||||
<em class="parameter"><code>const <span class="type">char</span> *key</code></em>);</pre>
|
||||
<p>Look up a key in the <a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#OstreeAsyncProgress" title="OstreeAsyncProgress"><span class="type">OstreeAsyncProgress</span></a> and return the <span class="type">GVariant</span> associated
|
||||
with it. The lookup is thread-safe.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-async-progress-get-variant.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>an <a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#OstreeAsyncProgress" title="OstreeAsyncProgress"><span class="type">OstreeAsyncProgress</span></a></p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>key</p></td>
|
||||
<td class="parameter_description"><p>a key to look up</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-async-progress-get-variant.returns"></a><h4>Returns</h4>
|
||||
<p>value for the given <em class="parameter"><code>key</code></em>
|
||||
, or <code class="literal">NULL</code> if
|
||||
it was not set. </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>][<a href="http://foldoc.org/nullable"><span class="acronym">nullable</span></a>]</span></p>
|
||||
</div>
|
||||
<p class="since">Since: 2017.6</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-async-progress-get-uint"></a><h3>ostree_async_progress_get_uint ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">guint</span>
|
||||
ostree_async_progress_get_uint (<em class="parameter"><code><a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#OstreeAsyncProgress" title="OstreeAsyncProgress"><span class="type">OstreeAsyncProgress</span></a> *self</code></em>,
|
||||
<em class="parameter"><code>const <span class="type">char</span> *key</code></em>);</pre>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-async-progress-get-uint64"></a><h3>ostree_async_progress_get_uint64 ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">guint64</span>
|
||||
ostree_async_progress_get_uint64 (<em class="parameter"><code><a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#OstreeAsyncProgress" title="OstreeAsyncProgress"><span class="type">OstreeAsyncProgress</span></a> *self</code></em>,
|
||||
<em class="parameter"><code>const <span class="type">char</span> *key</code></em>);</pre>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-async-progress-set-status"></a><h3>ostree_async_progress_set_status ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||||
ostree_async_progress_set_status (<em class="parameter"><code><a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#OstreeAsyncProgress" title="OstreeAsyncProgress"><span class="type">OstreeAsyncProgress</span></a> *self</code></em>,
|
||||
<em class="parameter"><code>const <span class="type">char</span> *status</code></em>);</pre>
|
||||
<p>Set the human-readable status string for the <a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#OstreeAsyncProgress" title="OstreeAsyncProgress"><span class="type">OstreeAsyncProgress</span></a>. This
|
||||
operation is thread-safe. <code class="literal">NULL</code> may be passed to clear the status.</p>
|
||||
<p>This is a convenience function to set the well-known <code class="literal">status</code> key.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-async-progress-set-status.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>an <a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#OstreeAsyncProgress" title="OstreeAsyncProgress"><span class="type">OstreeAsyncProgress</span></a></p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>status</p></td>
|
||||
<td class="parameter_description"><p>new status string, or <code class="literal">NULL</code> to clear the status. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/nullable"><span class="acronym">nullable</span></a>]</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<p class="since">Since: 2017.6</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-async-progress-set"></a><h3>ostree_async_progress_set ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||||
ostree_async_progress_set (<em class="parameter"><code><a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#OstreeAsyncProgress" title="OstreeAsyncProgress"><span class="type">OstreeAsyncProgress</span></a> *self</code></em>,
|
||||
<em class="parameter"><code>...</code></em>);</pre>
|
||||
<p>Set the values for zero or more keys in the <a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#OstreeAsyncProgress" title="OstreeAsyncProgress"><span class="type">OstreeAsyncProgress</span></a>. Each key is
|
||||
specified in @... as the key name, followed by a <span class="type">GVariant</span> format string,
|
||||
followed by the necessary arguments for that format string, just as for
|
||||
<code class="function">g_variant_new()</code>. After those arguments is the next key name. The varargs list
|
||||
must be <code class="literal">NULL</code>-terminated.</p>
|
||||
<p>g_variant_ref_sink() will be called as appropriate on the <span class="type">GVariant</span>
|
||||
parameters, so they may be floating.</p>
|
||||
<p>This operation is thread-safe, and all the keys are set atomically.</p>
|
||||
<div class="informalexample">
|
||||
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="listing_lines" align="right"><pre>1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9</pre></td>
|
||||
<td class="listing_code"><pre class="programlisting"><span class="n">guint32</span><span class="w"> </span><span class="n">outstanding_fetches</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">15</span><span class="p">;</span>
|
||||
<span class="n">guint64</span><span class="w"> </span><span class="n">bytes_received</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1000</span><span class="p">;</span>
|
||||
|
||||
<span class="n">ostree_async_progress_set</span><span class="w"> </span><span class="p">(</span><span class="n">progress</span><span class="p">,</span>
|
||||
<span class="w"> </span><span class="s">"outstanding-fetches"</span><span class="p">,</span><span class="w"> </span><span class="s">"u"</span><span class="p">,</span><span class="w"> </span><span class="n">outstanding_fetches</span><span class="p">,</span>
|
||||
<span class="w"> </span><span class="s">"bytes-received"</span><span class="p">,</span><span class="w"> </span><span class="s">"t"</span><span class="p">,</span><span class="w"> </span><span class="n">bytes_received</span><span class="p">,</span>
|
||||
<span class="w"> </span><span class="s">"status"</span><span class="p">,</span><span class="w"> </span><span class="s">"s"</span><span class="p">,</span><span class="w"> </span><span class="s">"Updated status"</span><span class="p">,</span>
|
||||
<span class="w"> </span><span class="s">"refs"</span><span class="p">,</span><span class="w"> </span><span class="s">"@a{ss}"</span><span class="p">,</span><span class="w"> </span><span class="n">g_variant_new_parsed</span><span class="w"> </span><span class="p">(</span><span class="s">"@a{ss} {}"</span><span class="p">),</span>
|
||||
<span class="w"> </span><span class="nb">NULL</span><span class="p">);</span></pre></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<p></p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-async-progress-set.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>an <a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#OstreeAsyncProgress" title="OstreeAsyncProgress"><span class="type">OstreeAsyncProgress</span></a></p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>...</p></td>
|
||||
<td class="parameter_description"><p>key name, format string, <span class="type">GVariant</span> parameters, …, followed by <code class="literal">NULL</code></p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<p class="since">Since: 2017.6</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-async-progress-set-variant"></a><h3>ostree_async_progress_set_variant ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||||
ostree_async_progress_set_variant (<em class="parameter"><code><a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#OstreeAsyncProgress" title="OstreeAsyncProgress"><span class="type">OstreeAsyncProgress</span></a> *self</code></em>,
|
||||
<em class="parameter"><code>const <span class="type">char</span> *key</code></em>,
|
||||
<em class="parameter"><code><span class="type">GVariant</span> *value</code></em>);</pre>
|
||||
<p>Assign a new <em class="parameter"><code>value</code></em>
|
||||
to the given <em class="parameter"><code>key</code></em>
|
||||
, replacing any existing value. The
|
||||
operation is thread-safe. <em class="parameter"><code>value</code></em>
|
||||
may be a floating reference;
|
||||
<code class="function">g_variant_ref_sink()</code> will be called on it.</p>
|
||||
<p>Any watchers of the <a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#OstreeAsyncProgress" title="OstreeAsyncProgress"><span class="type">OstreeAsyncProgress</span></a> will be notified of the change if
|
||||
<em class="parameter"><code>value</code></em>
|
||||
differs from the existing value for <em class="parameter"><code>key</code></em>
|
||||
.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-async-progress-set-variant.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>an <a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#OstreeAsyncProgress" title="OstreeAsyncProgress"><span class="type">OstreeAsyncProgress</span></a></p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>key</p></td>
|
||||
<td class="parameter_description"><p>a key to set</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>value</p></td>
|
||||
<td class="parameter_description"><p>the value to assign to <em class="parameter"><code>key</code></em>
|
||||
</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<p class="since">Since: 2017.6</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-async-progress-set-uint"></a><h3>ostree_async_progress_set_uint ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||||
ostree_async_progress_set_uint (<em class="parameter"><code><a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#OstreeAsyncProgress" title="OstreeAsyncProgress"><span class="type">OstreeAsyncProgress</span></a> *self</code></em>,
|
||||
<em class="parameter"><code>const <span class="type">char</span> *key</code></em>,
|
||||
<em class="parameter"><code><span class="type">guint</span> value</code></em>);</pre>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-async-progress-set-uint64"></a><h3>ostree_async_progress_set_uint64 ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||||
ostree_async_progress_set_uint64 (<em class="parameter"><code><a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#OstreeAsyncProgress" title="OstreeAsyncProgress"><span class="type">OstreeAsyncProgress</span></a> *self</code></em>,
|
||||
<em class="parameter"><code>const <span class="type">char</span> *key</code></em>,
|
||||
<em class="parameter"><code><span class="type">guint64</span> value</code></em>);</pre>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-async-progress-finish"></a><h3>ostree_async_progress_finish ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||||
ostree_async_progress_finish (<em class="parameter"><code><a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#OstreeAsyncProgress" title="OstreeAsyncProgress"><span class="type">OstreeAsyncProgress</span></a> *self</code></em>);</pre>
|
||||
<p>Process any pending signals, ensuring the main context is cleared
|
||||
of sources used by this object. Also ensures that no further
|
||||
events will be queued.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-async-progress-finish.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody><tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>Self</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-Progress-notification-system-for-asynchronous-operations.other_details"></a><h2>Types and Values</h2>
|
||||
<div class="refsect2">
|
||||
<a name="OstreeAsyncProgress"></a><h3>OstreeAsyncProgress</h3>
|
||||
<pre class="programlisting">typedef struct OstreeAsyncProgress OstreeAsyncProgress;
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<hr>Generated by GTK-Doc V1.34.0</div>
|
||||
</body>
|
||||
</html>
|
2586
reference/ostree-Root-partition-mount-point.html
Normal file
566
reference/ostree-SELinux-policy-management.html
Normal file
@ -0,0 +1,566 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>SELinux policy management: OSTree API references</title>
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
<link rel="home" href="index.html" title="OSTree API references">
|
||||
<link rel="up" href="reference.html" title="API Reference">
|
||||
<link rel="prev" href="ostree-Progress-notification-system-for-asynchronous-operations.html" title="Progress notification system for asynchronous operations">
|
||||
<link rel="next" href="ostree-Simple-upgrade-class.html" title="Simple upgrade class">
|
||||
<meta name="generator" content="GTK-Doc V1.34.0 (XML mode)">
|
||||
<link rel="stylesheet" href="style.css" type="text/css">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
|
||||
<td width="100%" align="left" class="shortcuts">
|
||||
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
|
||||
<a href="#ostree-SELinux-policy-management.description" class="shortcut">Description</a></span>
|
||||
</td>
|
||||
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
|
||||
<td><a accesskey="u" href="reference.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
|
||||
<td><a accesskey="p" href="ostree-Progress-notification-system-for-asynchronous-operations.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
|
||||
<td><a accesskey="n" href="ostree-Simple-upgrade-class.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
|
||||
</tr></table>
|
||||
<div class="refentry">
|
||||
<a name="ostree-SELinux-policy-management"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv"><table width="100%"><tr>
|
||||
<td valign="top">
|
||||
<h2><span class="refentrytitle"><a name="ostree-SELinux-policy-management.top_of_page"></a>SELinux policy management</span></h2>
|
||||
<p>SELinux policy management — Read SELinux policy and manage filesystem labels</p>
|
||||
</td>
|
||||
<td class="gallery_image" valign="top" align="right"></td>
|
||||
</tr></table></div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-SELinux-policy-management.functions"></a><h2>Functions</h2>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="functions_proto_type">
|
||||
<col class="functions_proto_name">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<a class="link" href="ostree-SELinux-policy-management.html#OstreeSePolicy" title="OstreeSePolicy"><span class="returnvalue">OstreeSePolicy</span></a> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-SELinux-policy-management.html#ostree-sepolicy-new" title="ostree_sepolicy_new ()">ostree_sepolicy_new</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<a class="link" href="ostree-SELinux-policy-management.html#OstreeSePolicy" title="OstreeSePolicy"><span class="returnvalue">OstreeSePolicy</span></a> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-SELinux-policy-management.html#ostree-sepolicy-new-at" title="ostree_sepolicy_new_at ()">ostree_sepolicy_new_at</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<a class="link" href="ostree-SELinux-policy-management.html#OstreeSePolicy" title="OstreeSePolicy"><span class="returnvalue">OstreeSePolicy</span></a> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-SELinux-policy-management.html#ostree-sepolicy-new-from-commit" title="ostree_sepolicy_new_from_commit ()">ostree_sepolicy_new_from_commit</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">GFile</span> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-SELinux-policy-management.html#ostree-sepolicy-get-path" title="ostree_sepolicy_get_path ()">ostree_sepolicy_get_path</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">const <span class="returnvalue">char</span> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-SELinux-policy-management.html#ostree-sepolicy-get-name" title="ostree_sepolicy_get_name ()">ostree_sepolicy_get_name</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">gboolean</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-SELinux-policy-management.html#ostree-sepolicy-get-label" title="ostree_sepolicy_get_label ()">ostree_sepolicy_get_label</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">const <span class="returnvalue">char</span> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-SELinux-policy-management.html#ostree-sepolicy-get-csum" title="ostree_sepolicy_get_csum ()">ostree_sepolicy_get_csum</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">gboolean</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-SELinux-policy-management.html#ostree-sepolicy-restorecon" title="ostree_sepolicy_restorecon ()">ostree_sepolicy_restorecon</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">gboolean</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-SELinux-policy-management.html#ostree-sepolicy-setfscreatecon" title="ostree_sepolicy_setfscreatecon ()">ostree_sepolicy_setfscreatecon</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">void</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-SELinux-policy-management.html#ostree-sepolicy-fscreatecon-cleanup" title="ostree_sepolicy_fscreatecon_cleanup ()">ostree_sepolicy_fscreatecon_cleanup</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-SELinux-policy-management.other"></a><h2>Types and Values</h2>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="other_proto_type">
|
||||
<col class="other_proto_name">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="typedef_keyword">typedef</td>
|
||||
<td class="function_name"><a class="link" href="ostree-SELinux-policy-management.html#OstreeSePolicy" title="OstreeSePolicy">OstreeSePolicy</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="datatype_keyword">enum</td>
|
||||
<td class="function_name"><a class="link" href="ostree-SELinux-policy-management.html#OstreeSePolicyRestoreconFlags" title="enum OstreeSePolicyRestoreconFlags">OstreeSePolicyRestoreconFlags</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-SELinux-policy-management.description"></a><h2>Description</h2>
|
||||
<p>A <a class="link" href="ostree-SELinux-policy-management.html#OstreeSePolicy" title="OstreeSePolicy"><span class="type">OstreeSePolicy</span></a> object can load the SELinux policy from a given
|
||||
root and perform labeling.</p>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-SELinux-policy-management.functions_details"></a><h2>Functions</h2>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-sepolicy-new"></a><h3>ostree_sepolicy_new ()</h3>
|
||||
<pre class="programlisting"><a class="link" href="ostree-SELinux-policy-management.html#OstreeSePolicy" title="OstreeSePolicy"><span class="returnvalue">OstreeSePolicy</span></a> *
|
||||
ostree_sepolicy_new (<em class="parameter"><code><span class="type">GFile</span> *path</code></em>,
|
||||
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
|
||||
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sepolicy-new.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>path</p></td>
|
||||
<td class="parameter_description"><p>Path to a root directory</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>cancellable</p></td>
|
||||
<td class="parameter_description"><p>Cancellable</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>error</p></td>
|
||||
<td class="parameter_description"><p>Error</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sepolicy-new.returns"></a><h4>Returns</h4>
|
||||
<p>An accessor object for SELinux policy in root located at <em class="parameter"><code>path</code></em>
|
||||
. </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>]</span></p>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-sepolicy-new-at"></a><h3>ostree_sepolicy_new_at ()</h3>
|
||||
<pre class="programlisting"><a class="link" href="ostree-SELinux-policy-management.html#OstreeSePolicy" title="OstreeSePolicy"><span class="returnvalue">OstreeSePolicy</span></a> *
|
||||
ostree_sepolicy_new_at (<em class="parameter"><code><span class="type">int</span> rootfs_dfd</code></em>,
|
||||
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
|
||||
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sepolicy-new-at.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>rootfs_dfd</p></td>
|
||||
<td class="parameter_description"><p>Directory fd for rootfs (will not be cloned)</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>cancellable</p></td>
|
||||
<td class="parameter_description"><p>Cancellable</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>error</p></td>
|
||||
<td class="parameter_description"><p>Error</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sepolicy-new-at.returns"></a><h4>Returns</h4>
|
||||
<p>An accessor object for SELinux policy in root located at <em class="parameter"><code>rootfs_dfd</code></em>
|
||||
. </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>]</span></p>
|
||||
</div>
|
||||
<p class="since">Since: 2017.4</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-sepolicy-new-from-commit"></a><h3>ostree_sepolicy_new_from_commit ()</h3>
|
||||
<pre class="programlisting"><a class="link" href="ostree-SELinux-policy-management.html#OstreeSePolicy" title="OstreeSePolicy"><span class="returnvalue">OstreeSePolicy</span></a> *
|
||||
ostree_sepolicy_new_from_commit (<em class="parameter"><code><a class="link" href="ostree-OstreeRepo.html#OstreeRepo" title="OstreeRepo"><span class="type">OstreeRepo</span></a> *repo</code></em>,
|
||||
<em class="parameter"><code>const <span class="type">char</span> *rev</code></em>,
|
||||
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
|
||||
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
|
||||
<p>Extract the SELinux policy from a commit object via a partial checkout. This is useful
|
||||
for labeling derived content as separate commits.</p>
|
||||
<p>This function is the backend of <code class="literal"><a class="link" href="ostree-OstreeRepo.html#ostree-repo-commit-modifier-set-sepolicy-from-commit" title="ostree_repo_commit_modifier_set_sepolicy_from_commit ()"><code class="function">ostree_repo_commit_modifier_set_sepolicy_from_commit()</code></a></code>.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sepolicy-new-from-commit.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>repo</p></td>
|
||||
<td class="parameter_description"><p>The repo</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>rev</p></td>
|
||||
<td class="parameter_description"><p>ostree ref or checksum</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>cancellable</p></td>
|
||||
<td class="parameter_description"><p>Cancellable</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>error</p></td>
|
||||
<td class="parameter_description"><p>Error</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sepolicy-new-from-commit.returns"></a><h4>Returns</h4>
|
||||
<p>A new policy. </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>]</span></p>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-sepolicy-get-path"></a><h3>ostree_sepolicy_get_path ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">GFile</span> *
|
||||
ostree_sepolicy_get_path (<em class="parameter"><code><a class="link" href="ostree-SELinux-policy-management.html#OstreeSePolicy" title="OstreeSePolicy"><span class="type">OstreeSePolicy</span></a> *self</code></em>);</pre>
|
||||
<p>This API should be considered deprecated, because it's supported for
|
||||
policy objects to be created from file-descriptor relative paths, which
|
||||
may not be globally accessible.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sepolicy-get-path.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody><tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>A SePolicy object</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sepolicy-get-path.returns"></a><h4>Returns</h4>
|
||||
<p>Path to rootfs. </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20none"><span class="acronym">transfer none</span></a>][<a href="http://foldoc.org/nullable"><span class="acronym">nullable</span></a>]</span></p>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-sepolicy-get-name"></a><h3>ostree_sepolicy_get_name ()</h3>
|
||||
<pre class="programlisting">const <span class="returnvalue">char</span> *
|
||||
ostree_sepolicy_get_name (<em class="parameter"><code><a class="link" href="ostree-SELinux-policy-management.html#OstreeSePolicy" title="OstreeSePolicy"><span class="type">OstreeSePolicy</span></a> *self</code></em>);</pre>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sepolicy-get-name.returns"></a><h4>Returns</h4>
|
||||
<p>Type of current policy. </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20none"><span class="acronym">transfer none</span></a>][<a href="http://foldoc.org/nullable"><span class="acronym">nullable</span></a>]</span></p>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-sepolicy-get-label"></a><h3>ostree_sepolicy_get_label ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||||
ostree_sepolicy_get_label (<em class="parameter"><code><a class="link" href="ostree-SELinux-policy-management.html#OstreeSePolicy" title="OstreeSePolicy"><span class="type">OstreeSePolicy</span></a> *self</code></em>,
|
||||
<em class="parameter"><code>const <span class="type">char</span> *relpath</code></em>,
|
||||
<em class="parameter"><code><span class="type">guint32</span> unix_mode</code></em>,
|
||||
<em class="parameter"><code><span class="type">char</span> **out_label</code></em>,
|
||||
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
|
||||
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
|
||||
<p>Store in <em class="parameter"><code>out_label</code></em>
|
||||
the security context for the given <em class="parameter"><code>relpath</code></em>
|
||||
and
|
||||
mode <em class="parameter"><code>unix_mode</code></em>
|
||||
. If the policy does not specify a label, <code class="literal">NULL</code>
|
||||
will be returned.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sepolicy-get-label.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>Self</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>relpath</p></td>
|
||||
<td class="parameter_description"><p>Path</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>unix_mode</p></td>
|
||||
<td class="parameter_description"><p>Unix mode</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>out_label</p></td>
|
||||
<td class="parameter_description"><p>Return location for security context. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/nullable"><span class="acronym">nullable</span></a>][<a href="http://foldoc.org/out"><span class="acronym">out</span></a>][<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>cancellable</p></td>
|
||||
<td class="parameter_description"><p>Cancellable</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>error</p></td>
|
||||
<td class="parameter_description"><p>Error</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-sepolicy-get-csum"></a><h3>ostree_sepolicy_get_csum ()</h3>
|
||||
<pre class="programlisting">const <span class="returnvalue">char</span> *
|
||||
ostree_sepolicy_get_csum (<em class="parameter"><code><a class="link" href="ostree-SELinux-policy-management.html#OstreeSePolicy" title="OstreeSePolicy"><span class="type">OstreeSePolicy</span></a> *self</code></em>);</pre>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sepolicy-get-csum.returns"></a><h4>Returns</h4>
|
||||
<p>Checksum of current policy. </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20none"><span class="acronym">transfer none</span></a>][<a href="http://foldoc.org/nullable"><span class="acronym">nullable</span></a>]</span></p>
|
||||
</div>
|
||||
<p class="since">Since: 2016.5</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-sepolicy-restorecon"></a><h3>ostree_sepolicy_restorecon ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||||
ostree_sepolicy_restorecon (<em class="parameter"><code><a class="link" href="ostree-SELinux-policy-management.html#OstreeSePolicy" title="OstreeSePolicy"><span class="type">OstreeSePolicy</span></a> *self</code></em>,
|
||||
<em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
|
||||
<em class="parameter"><code><span class="type">GFileInfo</span> *info</code></em>,
|
||||
<em class="parameter"><code><span class="type">GFile</span> *target</code></em>,
|
||||
<em class="parameter"><code><a class="link" href="ostree-SELinux-policy-management.html#OstreeSePolicyRestoreconFlags" title="enum OstreeSePolicyRestoreconFlags"><span class="type">OstreeSePolicyRestoreconFlags</span></a> flags</code></em>,
|
||||
<em class="parameter"><code><span class="type">char</span> **out_new_label</code></em>,
|
||||
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
|
||||
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
|
||||
<p>Reset the security context of <em class="parameter"><code>target</code></em>
|
||||
based on the SELinux policy.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sepolicy-restorecon.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>Self</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>path</p></td>
|
||||
<td class="parameter_description"><p>Path string to use for policy lookup</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>info</p></td>
|
||||
<td class="parameter_description"><p>File attributes. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/nullable"><span class="acronym">nullable</span></a>]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>target</p></td>
|
||||
<td class="parameter_description"><p>Physical path to target file</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>flags</p></td>
|
||||
<td class="parameter_description"><p>Flags controlling behavior</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>out_new_label</p></td>
|
||||
<td class="parameter_description"><p>New label, or <code class="literal">NULL</code> if unchanged. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/nullable"><span class="acronym">nullable</span></a>][<a href="http://foldoc.org/optional"><span class="acronym">optional</span></a>][<a href="http://foldoc.org/out"><span class="acronym">out</span></a>]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>cancellable</p></td>
|
||||
<td class="parameter_description"><p>Cancellable</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>error</p></td>
|
||||
<td class="parameter_description"><p>Error</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-sepolicy-setfscreatecon"></a><h3>ostree_sepolicy_setfscreatecon ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||||
ostree_sepolicy_setfscreatecon (<em class="parameter"><code><a class="link" href="ostree-SELinux-policy-management.html#OstreeSePolicy" title="OstreeSePolicy"><span class="type">OstreeSePolicy</span></a> *self</code></em>,
|
||||
<em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
|
||||
<em class="parameter"><code><span class="type">guint32</span> mode</code></em>,
|
||||
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sepolicy-setfscreatecon.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>Policy</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>path</p></td>
|
||||
<td class="parameter_description"><p>Use this path to determine a label</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>mode</p></td>
|
||||
<td class="parameter_description"><p>Used along with <em class="parameter"><code>path</code></em>
|
||||
</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>error</p></td>
|
||||
<td class="parameter_description"><p>Error</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-sepolicy-fscreatecon-cleanup"></a><h3>ostree_sepolicy_fscreatecon_cleanup ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||||
ostree_sepolicy_fscreatecon_cleanup (<em class="parameter"><code><span class="type">void</span> **unused</code></em>);</pre>
|
||||
<p>Cleanup function for <a class="link" href="ostree-SELinux-policy-management.html#ostree-sepolicy-setfscreatecon" title="ostree_sepolicy_setfscreatecon ()"><code class="function">ostree_sepolicy_setfscreatecon()</code></a>.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sepolicy-fscreatecon-cleanup.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody><tr>
|
||||
<td class="parameter_name"><p>unused</p></td>
|
||||
<td class="parameter_description"><p>Not used, just in case you didn't infer that from the parameter name</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-SELinux-policy-management.other_details"></a><h2>Types and Values</h2>
|
||||
<div class="refsect2">
|
||||
<a name="OstreeSePolicy"></a><h3>OstreeSePolicy</h3>
|
||||
<pre class="programlisting">typedef struct OstreeSePolicy OstreeSePolicy;
|
||||
</pre>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="OstreeSePolicyRestoreconFlags"></a><h3>enum OstreeSePolicyRestoreconFlags</h3>
|
||||
<div class="refsect3">
|
||||
<a name="OstreeSePolicyRestoreconFlags.members"></a><h4>Members</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="300px" class="enum_members_name">
|
||||
<col class="enum_members_description">
|
||||
<col width="200px" class="enum_members_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="enum_member_name"><p><a name="OSTREE-SEPOLICY-RESTORECON-FLAGS-NONE:CAPS"></a>OSTREE_SEPOLICY_RESTORECON_FLAGS_NONE</p></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="enum_member_name"><p><a name="OSTREE-SEPOLICY-RESTORECON-FLAGS-ALLOW-NOLABEL:CAPS"></a>OSTREE_SEPOLICY_RESTORECON_FLAGS_ALLOW_NOLABEL</p></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="enum_member_name"><p><a name="OSTREE-SEPOLICY-RESTORECON-FLAGS-KEEP-EXISTING:CAPS"></a>OSTREE_SEPOLICY_RESTORECON_FLAGS_KEEP_EXISTING</p></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<hr>Generated by GTK-Doc V1.34.0</div>
|
||||
</body>
|
||||
</html>
|
878
reference/ostree-Signature-management.html
Normal file
@ -0,0 +1,878 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Signature management: OSTree API references</title>
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
<link rel="home" href="index.html" title="OSTree API references">
|
||||
<link rel="up" href="reference.html" title="API Reference">
|
||||
<link rel="prev" href="ostree-GPG-signature-verification-results.html" title="GPG signature verification results">
|
||||
<link rel="next" href="ostree-ostree-bootconfig-parser.html" title="ostree-bootconfig-parser">
|
||||
<meta name="generator" content="GTK-Doc V1.34.0 (XML mode)">
|
||||
<link rel="stylesheet" href="style.css" type="text/css">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
|
||||
<td width="100%" align="left" class="shortcuts">
|
||||
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
|
||||
<a href="#ostree-Signature-management.description" class="shortcut">Description</a></span>
|
||||
</td>
|
||||
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
|
||||
<td><a accesskey="u" href="reference.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
|
||||
<td><a accesskey="p" href="ostree-GPG-signature-verification-results.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
|
||||
<td><a accesskey="n" href="ostree-ostree-bootconfig-parser.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
|
||||
</tr></table>
|
||||
<div class="refentry">
|
||||
<a name="ostree-Signature-management"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv"><table width="100%"><tr>
|
||||
<td valign="top">
|
||||
<h2><span class="refentrytitle"><a name="ostree-Signature-management.top_of_page"></a>Signature management</span></h2>
|
||||
<p>Signature management — Sign and verify commits</p>
|
||||
</td>
|
||||
<td class="gallery_image" valign="top" align="right"></td>
|
||||
</tr></table></div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-Signature-management.functions"></a><h2>Functions</h2>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="functions_proto_type">
|
||||
<col class="functions_proto_name">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">GPtrArray</span> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-Signature-management.html#ostree-sign-get-all" title="ostree_sign_get_all ()">ostree_sign_get_all</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">gboolean</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-Signature-management.html#ostree-sign-commit" title="ostree_sign_commit ()">ostree_sign_commit</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">gboolean</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-Signature-management.html#ostree-sign-commit-verify" title="ostree_sign_commit_verify ()">ostree_sign_commit_verify</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">gboolean</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-Signature-management.html#ostree-sign-data" title="ostree_sign_data ()">ostree_sign_data</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">gboolean</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-Signature-management.html#ostree-sign-data-verify" title="ostree_sign_data_verify ()">ostree_sign_data_verify</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<a class="link" href="ostree-Signature-management.html#OstreeSign" title="OstreeSign"><span class="returnvalue">OstreeSign</span></a> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-Signature-management.html#ostree-sign-get-by-name" title="ostree_sign_get_by_name ()">ostree_sign_get_by_name</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">const <span class="returnvalue">gchar</span> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-Signature-management.html#ostree-sign-get-name" title="ostree_sign_get_name ()">ostree_sign_get_name</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">gboolean</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-Signature-management.html#ostree-sign-add-pk" title="ostree_sign_add_pk ()">ostree_sign_add_pk</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">gboolean</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-Signature-management.html#ostree-sign-clear-keys" title="ostree_sign_clear_keys ()">ostree_sign_clear_keys</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">gboolean</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-Signature-management.html#ostree-sign-load-pk" title="ostree_sign_load_pk ()">ostree_sign_load_pk</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">const <span class="returnvalue">gchar</span> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-Signature-management.html#ostree-sign-metadata-format" title="ostree_sign_metadata_format ()">ostree_sign_metadata_format</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">const <span class="returnvalue">gchar</span> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-Signature-management.html#ostree-sign-metadata-key" title="ostree_sign_metadata_key ()">ostree_sign_metadata_key</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">gboolean</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-Signature-management.html#ostree-sign-set-pk" title="ostree_sign_set_pk ()">ostree_sign_set_pk</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">gboolean</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-Signature-management.html#ostree-sign-set-sk" title="ostree_sign_set_sk ()">ostree_sign_set_sk</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">gboolean</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-Signature-management.html#ostree-sign-summary" title="ostree_sign_summary ()">ostree_sign_summary</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-Signature-management.other"></a><h2>Types and Values</h2>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="other_proto_type">
|
||||
<col class="other_proto_name">
|
||||
</colgroup>
|
||||
<tbody><tr>
|
||||
<td class="datatype_keyword"> </td>
|
||||
<td class="function_name"><a class="link" href="ostree-Signature-management.html#OstreeSign" title="OstreeSign">OstreeSign</a></td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-Signature-management.description"></a><h2>Description</h2>
|
||||
<p>An <a class="link" href="ostree-Signature-management.html#OstreeSign" title="OstreeSign"><span class="type">OstreeSign</span></a> interface allows to select and use any available engine
|
||||
for signing or verifying the commit object or summary file.</p>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-Signature-management.functions_details"></a><h2>Functions</h2>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-sign-get-all"></a><h3>ostree_sign_get_all ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">GPtrArray</span> *
|
||||
ostree_sign_get_all (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
|
||||
<p>Return an array with newly allocated instances of all available
|
||||
signing engines; they will not be initialized.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sign-get-all.returns"></a><h4>Returns</h4>
|
||||
<p>an array of signing engines. </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>][<a href="http://foldoc.org/element-type"><span class="acronym">element-type</span></a> OstreeSign]</span></p>
|
||||
</div>
|
||||
<p class="since">Since: 2020.2</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-sign-commit"></a><h3>ostree_sign_commit ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||||
ostree_sign_commit (<em class="parameter"><code><a class="link" href="ostree-Signature-management.html#OstreeSign" title="OstreeSign"><span class="type">OstreeSign</span></a> *self</code></em>,
|
||||
<em class="parameter"><code><a class="link" href="ostree-OstreeRepo.html#OstreeRepo" title="OstreeRepo"><span class="type">OstreeRepo</span></a> *repo</code></em>,
|
||||
<em class="parameter"><code>const <span class="type">gchar</span> *commit_checksum</code></em>,
|
||||
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
|
||||
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
|
||||
<p>Add a signature to a commit.</p>
|
||||
<p>Depending of the signing engine used you will need to load
|
||||
the secret key with <a class="link" href="ostree-Signature-management.html#ostree-sign-set-sk" title="ostree_sign_set_sk ()"><span class="type">ostree_sign_set_sk</span></a>.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sign-commit.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>an <a class="link" href="ostree-Signature-management.html#OstreeSign" title="OstreeSign"><span class="type">OstreeSign</span></a> object</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>repo</p></td>
|
||||
<td class="parameter_description"><p>an <span class="type">OsreeRepo</span> object</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>commit_checksum</p></td>
|
||||
<td class="parameter_description"><p>SHA256 of given commit to sign</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>cancellable</p></td>
|
||||
<td class="parameter_description"><p>A <span class="type">GCancellable</span></p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>error</p></td>
|
||||
<td class="parameter_description"><p>a <span class="type">GError</span></p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sign-commit.returns"></a><h4>Returns</h4>
|
||||
<p> <em class="parameter"><code>TRUE</code></em>
|
||||
if commit has been signed successfully,
|
||||
<em class="parameter"><code>FALSE</code></em>
|
||||
in case of error (<em class="parameter"><code>error</code></em>
|
||||
will contain the reason).</p>
|
||||
</div>
|
||||
<p class="since">Since: 2020.2</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-sign-commit-verify"></a><h3>ostree_sign_commit_verify ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||||
ostree_sign_commit_verify (<em class="parameter"><code><a class="link" href="ostree-Signature-management.html#OstreeSign" title="OstreeSign"><span class="type">OstreeSign</span></a> *self</code></em>,
|
||||
<em class="parameter"><code><a class="link" href="ostree-OstreeRepo.html#OstreeRepo" title="OstreeRepo"><span class="type">OstreeRepo</span></a> *repo</code></em>,
|
||||
<em class="parameter"><code>const <span class="type">gchar</span> *commit_checksum</code></em>,
|
||||
<em class="parameter"><code><span class="type">char</span> **out_success_message</code></em>,
|
||||
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
|
||||
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
|
||||
<p>Verify if commit is signed with known key.</p>
|
||||
<p>Depending of the signing engine used you will need to load
|
||||
the public key(s) for verification with <a class="link" href="ostree-Signature-management.html#ostree-sign-set-pk" title="ostree_sign_set_pk ()"><span class="type">ostree_sign_set_pk</span></a>,
|
||||
<a class="link" href="ostree-Signature-management.html#ostree-sign-add-pk" title="ostree_sign_add_pk ()"><span class="type">ostree_sign_add_pk</span></a> and/or <a class="link" href="ostree-Signature-management.html#ostree-sign-load-pk" title="ostree_sign_load_pk ()"><span class="type">ostree_sign_load_pk</span></a>.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sign-commit-verify.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>an <a class="link" href="ostree-Signature-management.html#OstreeSign" title="OstreeSign"><span class="type">OstreeSign</span></a> object</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>repo</p></td>
|
||||
<td class="parameter_description"><p>an <span class="type">OsreeRepo</span> object</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>commit_checksum</p></td>
|
||||
<td class="parameter_description"><p>SHA256 of given commit to verify</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>out_success_message</p></td>
|
||||
<td class="parameter_description"><p>success message returned by the signing
|
||||
engine. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/out"><span class="acronym">out</span></a>][<a href="http://foldoc.org/nullable"><span class="acronym">nullable</span></a>][<a href="http://foldoc.org/optional"><span class="acronym">optional</span></a>]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>cancellable</p></td>
|
||||
<td class="parameter_description"><p>A <span class="type">GCancellable</span></p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>error</p></td>
|
||||
<td class="parameter_description"><p>a <span class="type">GError</span></p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sign-commit-verify.returns"></a><h4>Returns</h4>
|
||||
<p> <em class="parameter"><code>TRUE</code></em>
|
||||
if commit has been verified successfully,
|
||||
<em class="parameter"><code>FALSE</code></em>
|
||||
in case of error or no valid keys are available (<em class="parameter"><code>error</code></em>
|
||||
will contain the reason).</p>
|
||||
</div>
|
||||
<p class="since">Since: 2020.2</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-sign-data"></a><h3>ostree_sign_data ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||||
ostree_sign_data (<em class="parameter"><code><a class="link" href="ostree-Signature-management.html#OstreeSign" title="OstreeSign"><span class="type">OstreeSign</span></a> *self</code></em>,
|
||||
<em class="parameter"><code><span class="type">GBytes</span> *data</code></em>,
|
||||
<em class="parameter"><code><span class="type">GBytes</span> **signature</code></em>,
|
||||
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
|
||||
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
|
||||
<p>Sign the given <em class="parameter"><code>data</code></em>
|
||||
with pre-loaded secret key.</p>
|
||||
<p>Depending of the signing engine used you will need to load
|
||||
the secret key with <a class="link" href="ostree-Signature-management.html#ostree-sign-set-sk" title="ostree_sign_set_sk ()"><span class="type">ostree_sign_set_sk</span></a>.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sign-data.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>an <a class="link" href="ostree-Signature-management.html#OstreeSign" title="OstreeSign"><span class="type">OstreeSign</span></a> object</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>data</p></td>
|
||||
<td class="parameter_description"><p>the raw data to be signed with pre-loaded secret key</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>signature</p></td>
|
||||
<td class="parameter_description"><p>in case of success will contain signature. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/out"><span class="acronym">out</span></a>]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>cancellable</p></td>
|
||||
<td class="parameter_description"><p>A <span class="type">GCancellable</span></p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>error</p></td>
|
||||
<td class="parameter_description"><p>a <span class="type">GError</span></p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sign-data.returns"></a><h4>Returns</h4>
|
||||
<p> <em class="parameter"><code>TRUE</code></em>
|
||||
if <em class="parameter"><code>data</code></em>
|
||||
has been signed successfully,
|
||||
<em class="parameter"><code>FALSE</code></em>
|
||||
in case of error (<em class="parameter"><code>error</code></em>
|
||||
will contain the reason).</p>
|
||||
</div>
|
||||
<p class="since">Since: 2020.2</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-sign-data-verify"></a><h3>ostree_sign_data_verify ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||||
ostree_sign_data_verify (<em class="parameter"><code><a class="link" href="ostree-Signature-management.html#OstreeSign" title="OstreeSign"><span class="type">OstreeSign</span></a> *self</code></em>,
|
||||
<em class="parameter"><code><span class="type">GBytes</span> *data</code></em>,
|
||||
<em class="parameter"><code><span class="type">GVariant</span> *signatures</code></em>,
|
||||
<em class="parameter"><code><span class="type">char</span> **out_success_message</code></em>,
|
||||
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
|
||||
<p>Verify given data against signatures with pre-loaded public keys.</p>
|
||||
<p>Depending of the signing engine used you will need to load
|
||||
the public key(s) with <a class="link" href="ostree-Signature-management.html#ostree-sign-set-pk" title="ostree_sign_set_pk ()"><span class="type">ostree_sign_set_pk</span></a>, <a class="link" href="ostree-Signature-management.html#ostree-sign-add-pk" title="ostree_sign_add_pk ()"><span class="type">ostree_sign_add_pk</span></a>
|
||||
or <a class="link" href="ostree-Signature-management.html#ostree-sign-load-pk" title="ostree_sign_load_pk ()"><span class="type">ostree_sign_load_pk</span></a>.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sign-data-verify.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>an <a class="link" href="ostree-Signature-management.html#OstreeSign" title="OstreeSign"><span class="type">OstreeSign</span></a> object</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>data</p></td>
|
||||
<td class="parameter_description"><p>the raw data to check</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>signatures</p></td>
|
||||
<td class="parameter_description"><p>the signatures to be checked</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>out_success_message</p></td>
|
||||
<td class="parameter_description"><p>success message returned by the signing
|
||||
engine. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/out"><span class="acronym">out</span></a>][<a href="http://foldoc.org/nullable"><span class="acronym">nullable</span></a>][<a href="http://foldoc.org/optional"><span class="acronym">optional</span></a>]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>error</p></td>
|
||||
<td class="parameter_description"><p>a <span class="type">GError</span></p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sign-data-verify.returns"></a><h4>Returns</h4>
|
||||
<p> <em class="parameter"><code>TRUE</code></em>
|
||||
if <em class="parameter"><code>data</code></em>
|
||||
has been signed at least with any single valid key,
|
||||
<em class="parameter"><code>FALSE</code></em>
|
||||
in case of error or no valid keys are available (<em class="parameter"><code>error</code></em>
|
||||
will contain the reason).</p>
|
||||
</div>
|
||||
<p class="since">Since: 2020.2</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-sign-get-by-name"></a><h3>ostree_sign_get_by_name ()</h3>
|
||||
<pre class="programlisting"><a class="link" href="ostree-Signature-management.html#OstreeSign" title="OstreeSign"><span class="returnvalue">OstreeSign</span></a> *
|
||||
ostree_sign_get_by_name (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
|
||||
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
|
||||
<p>Create a new instance of a signing engine.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sign-get-by-name.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>name</p></td>
|
||||
<td class="parameter_description"><p>the name of desired signature engine</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>error</p></td>
|
||||
<td class="parameter_description"><p>return location for a <span class="type">GError</span></p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sign-get-by-name.returns"></a><h4>Returns</h4>
|
||||
<p>New signing engine, or <code class="literal">NULL</code> if the engine is not known. </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>]</span></p>
|
||||
</div>
|
||||
<p class="since">Since: 2020.2</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-sign-get-name"></a><h3>ostree_sign_get_name ()</h3>
|
||||
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
|
||||
ostree_sign_get_name (<em class="parameter"><code><a class="link" href="ostree-Signature-management.html#OstreeSign" title="OstreeSign"><span class="type">OstreeSign</span></a> *self</code></em>);</pre>
|
||||
<p>Return the pointer to the name of currently used/selected signing engine.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sign-get-name.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody><tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>an <a class="link" href="ostree-Signature-management.html#OstreeSign" title="OstreeSign"><span class="type">OstreeSign</span></a> object</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sign-get-name.returns"></a><h4>Returns</h4>
|
||||
<p>pointer to the name
|
||||
<em class="parameter"><code>NULL</code></em>
|
||||
in case of error (unlikely). </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20none"><span class="acronym">transfer none</span></a>]</span></p>
|
||||
</div>
|
||||
<p class="since">Since: 2020.2</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-sign-add-pk"></a><h3>ostree_sign_add_pk ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||||
ostree_sign_add_pk (<em class="parameter"><code><a class="link" href="ostree-Signature-management.html#OstreeSign" title="OstreeSign"><span class="type">OstreeSign</span></a> *self</code></em>,
|
||||
<em class="parameter"><code><span class="type">GVariant</span> *public_key</code></em>,
|
||||
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
|
||||
<p>Add the public key for verification. Could be called multiple times for
|
||||
adding all needed keys to be used for verification.</p>
|
||||
<p>The <em class="parameter"><code>public_key</code></em>
|
||||
argument depends of the particular engine implementation.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sign-add-pk.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>an <a class="link" href="ostree-Signature-management.html#OstreeSign" title="OstreeSign"><span class="type">OstreeSign</span></a> object</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>public_key</p></td>
|
||||
<td class="parameter_description"><p>single public key to be added</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>error</p></td>
|
||||
<td class="parameter_description"><p>a <span class="type">GError</span></p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sign-add-pk.returns"></a><h4>Returns</h4>
|
||||
<p> <em class="parameter"><code>TRUE</code></em>
|
||||
in case if the key could be added successfully,
|
||||
<em class="parameter"><code>FALSE</code></em>
|
||||
in case of error (<em class="parameter"><code>error</code></em>
|
||||
will contain the reason).</p>
|
||||
</div>
|
||||
<p class="since">Since: 2020.2</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-sign-clear-keys"></a><h3>ostree_sign_clear_keys ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||||
ostree_sign_clear_keys (<em class="parameter"><code><a class="link" href="ostree-Signature-management.html#OstreeSign" title="OstreeSign"><span class="type">OstreeSign</span></a> *self</code></em>,
|
||||
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
|
||||
<p>Clear all previously preloaded secret and public keys.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sign-clear-keys.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>an <a class="link" href="ostree-Signature-management.html#OstreeSign" title="OstreeSign"><span class="type">OstreeSign</span></a> object</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>error</p></td>
|
||||
<td class="parameter_description"><p>a <span class="type">GError</span></p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sign-clear-keys.returns"></a><h4>Returns</h4>
|
||||
<p> <em class="parameter"><code>TRUE</code></em>
|
||||
in case if no errors, <em class="parameter"><code>FALSE</code></em>
|
||||
in case of error</p>
|
||||
</div>
|
||||
<p class="since">Since: 2020.2</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-sign-load-pk"></a><h3>ostree_sign_load_pk ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||||
ostree_sign_load_pk (<em class="parameter"><code><a class="link" href="ostree-Signature-management.html#OstreeSign" title="OstreeSign"><span class="type">OstreeSign</span></a> *self</code></em>,
|
||||
<em class="parameter"><code><span class="type">GVariant</span> *options</code></em>,
|
||||
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
|
||||
<p>Load public keys for verification from anywhere.
|
||||
It is expected that all keys would be added to already pre-loaded keys.</p>
|
||||
<p>The <em class="parameter"><code>options</code></em>
|
||||
argument depends of the particular engine implementation.</p>
|
||||
<p>For example, <em class="parameter"><code>ed25515</code></em>
|
||||
engine could use following string-formatted options:</p>
|
||||
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
|
||||
<li class="listitem"><p><em class="parameter"><code>filename</code></em>
|
||||
-- single file to use to load keys from</p></li>
|
||||
<li class="listitem"><p><em class="parameter"><code>basedir</code></em>
|
||||
-- directory containing subdirectories
|
||||
'trusted.ed25519.d' and 'revoked.ed25519.d' with appropriate
|
||||
public keys. Used for testing and re-definition of system-wide
|
||||
directories if defaults are not suitable for any reason.</p></li>
|
||||
</ul></div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sign-load-pk.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>an <a class="link" href="ostree-Signature-management.html#OstreeSign" title="OstreeSign"><span class="type">OstreeSign</span></a> object</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>options</p></td>
|
||||
<td class="parameter_description"><p>any options</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>error</p></td>
|
||||
<td class="parameter_description"><p>a <span class="type">GError</span></p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sign-load-pk.returns"></a><h4>Returns</h4>
|
||||
<p> <em class="parameter"><code>TRUE</code></em>
|
||||
in case if at least one key could be load successfully,
|
||||
<em class="parameter"><code>FALSE</code></em>
|
||||
in case of error (<em class="parameter"><code>error</code></em>
|
||||
will contain the reason).</p>
|
||||
</div>
|
||||
<p class="since">Since: 2020.2</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-sign-metadata-format"></a><h3>ostree_sign_metadata_format ()</h3>
|
||||
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
|
||||
ostree_sign_metadata_format (<em class="parameter"><code><a class="link" href="ostree-Signature-management.html#OstreeSign" title="OstreeSign"><span class="type">OstreeSign</span></a> *self</code></em>);</pre>
|
||||
<p>Return the pointer to the string with format used in (detached) metadata for
|
||||
current signing engine.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sign-metadata-format.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody><tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>an <a class="link" href="ostree-Signature-management.html#OstreeSign" title="OstreeSign"><span class="type">OstreeSign</span></a> object</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sign-metadata-format.returns"></a><h4>Returns</h4>
|
||||
<p>pointer to the metadata format,
|
||||
<em class="parameter"><code>NULL</code></em>
|
||||
in case of error (unlikely). </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20none"><span class="acronym">transfer none</span></a>]</span></p>
|
||||
</div>
|
||||
<p class="since">Since: 2020.2</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-sign-metadata-key"></a><h3>ostree_sign_metadata_key ()</h3>
|
||||
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
|
||||
ostree_sign_metadata_key (<em class="parameter"><code><a class="link" href="ostree-Signature-management.html#OstreeSign" title="OstreeSign"><span class="type">OstreeSign</span></a> *self</code></em>);</pre>
|
||||
<p>Return the pointer to the name of the key used in (detached) metadata for
|
||||
current signing engine.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sign-metadata-key.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody><tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>an <a class="link" href="ostree-Signature-management.html#OstreeSign" title="OstreeSign"><span class="type">OstreeSign</span></a> object</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sign-metadata-key.returns"></a><h4>Returns</h4>
|
||||
<p>pointer to the metadata key name,
|
||||
<em class="parameter"><code>NULL</code></em>
|
||||
in case of error (unlikely). </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20none"><span class="acronym">transfer none</span></a>]</span></p>
|
||||
</div>
|
||||
<p class="since">Since: 2020.2</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-sign-set-pk"></a><h3>ostree_sign_set_pk ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||||
ostree_sign_set_pk (<em class="parameter"><code><a class="link" href="ostree-Signature-management.html#OstreeSign" title="OstreeSign"><span class="type">OstreeSign</span></a> *self</code></em>,
|
||||
<em class="parameter"><code><span class="type">GVariant</span> *public_key</code></em>,
|
||||
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
|
||||
<p>Set the public key for verification. It is expected what all
|
||||
previously pre-loaded public keys will be dropped.</p>
|
||||
<p>The <em class="parameter"><code>public_key</code></em>
|
||||
argument depends of the particular engine implementation.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sign-set-pk.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>an <a class="link" href="ostree-Signature-management.html#OstreeSign" title="OstreeSign"><span class="type">OstreeSign</span></a> object</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>public_key</p></td>
|
||||
<td class="parameter_description"><p>single public key to be added</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>error</p></td>
|
||||
<td class="parameter_description"><p>a <span class="type">GError</span></p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sign-set-pk.returns"></a><h4>Returns</h4>
|
||||
<p> <em class="parameter"><code>TRUE</code></em>
|
||||
in case if the key could be set successfully,
|
||||
<em class="parameter"><code>FALSE</code></em>
|
||||
in case of error (<em class="parameter"><code>error</code></em>
|
||||
will contain the reason).</p>
|
||||
</div>
|
||||
<p class="since">Since: 2020.2</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-sign-set-sk"></a><h3>ostree_sign_set_sk ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||||
ostree_sign_set_sk (<em class="parameter"><code><a class="link" href="ostree-Signature-management.html#OstreeSign" title="OstreeSign"><span class="type">OstreeSign</span></a> *self</code></em>,
|
||||
<em class="parameter"><code><span class="type">GVariant</span> *secret_key</code></em>,
|
||||
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
|
||||
<p>Set the secret key to be used for signing data, commits and summary.</p>
|
||||
<p>The <em class="parameter"><code>secret_key</code></em>
|
||||
argument depends of the particular engine implementation.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sign-set-sk.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>an <a class="link" href="ostree-Signature-management.html#OstreeSign" title="OstreeSign"><span class="type">OstreeSign</span></a> object</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>secret_key</p></td>
|
||||
<td class="parameter_description"><p>secret key to be added</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>error</p></td>
|
||||
<td class="parameter_description"><p>a <span class="type">GError</span></p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sign-set-sk.returns"></a><h4>Returns</h4>
|
||||
<p> <em class="parameter"><code>TRUE</code></em>
|
||||
in case if the key could be set successfully,
|
||||
<em class="parameter"><code>FALSE</code></em>
|
||||
in case of error (<em class="parameter"><code>error</code></em>
|
||||
will contain the reason).</p>
|
||||
</div>
|
||||
<p class="since">Since: 2020.2</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-sign-summary"></a><h3>ostree_sign_summary ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||||
ostree_sign_summary (<em class="parameter"><code><a class="link" href="ostree-Signature-management.html#OstreeSign" title="OstreeSign"><span class="type">OstreeSign</span></a> *self</code></em>,
|
||||
<em class="parameter"><code><a class="link" href="ostree-OstreeRepo.html#OstreeRepo" title="OstreeRepo"><span class="type">OstreeRepo</span></a> *repo</code></em>,
|
||||
<em class="parameter"><code><span class="type">GVariant</span> *keys</code></em>,
|
||||
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
|
||||
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
|
||||
<p>Add a signature to a summary file.
|
||||
Based on ostree_repo_add_gpg_signature_summary implementation.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sign-summary.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>Self</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>repo</p></td>
|
||||
<td class="parameter_description"><p>ostree repository</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>keys</p></td>
|
||||
<td class="parameter_description"><p>keys -- GVariant containing keys as GVarints specific to signature type.</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>cancellable</p></td>
|
||||
<td class="parameter_description"><p>A <span class="type">GCancellable</span></p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>error</p></td>
|
||||
<td class="parameter_description"><p>a <span class="type">GError</span></p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sign-summary.returns"></a><h4>Returns</h4>
|
||||
<p> <em class="parameter"><code>TRUE</code></em>
|
||||
if summary file has been signed with all provided keys</p>
|
||||
</div>
|
||||
<p class="since">Since: 2020.2</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-Signature-management.other_details"></a><h2>Types and Values</h2>
|
||||
<div class="refsect2">
|
||||
<a name="OstreeSign"></a><h3>OstreeSign</h3>
|
||||
<pre class="programlisting">typedef struct _OstreeSign OstreeSign;</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<hr>Generated by GTK-Doc V1.34.0</div>
|
||||
</body>
|
||||
</html>
|
726
reference/ostree-Simple-upgrade-class.html
Normal file
@ -0,0 +1,726 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Simple upgrade class: OSTree API references</title>
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
<link rel="home" href="index.html" title="OSTree API references">
|
||||
<link rel="up" href="reference.html" title="API Reference">
|
||||
<link rel="prev" href="ostree-SELinux-policy-management.html" title="SELinux policy management">
|
||||
<link rel="next" href="ostree-GPG-signature-verification-results.html" title="GPG signature verification results">
|
||||
<meta name="generator" content="GTK-Doc V1.34.0 (XML mode)">
|
||||
<link rel="stylesheet" href="style.css" type="text/css">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
|
||||
<td width="100%" align="left" class="shortcuts">
|
||||
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
|
||||
<a href="#ostree-Simple-upgrade-class.description" class="shortcut">Description</a></span>
|
||||
</td>
|
||||
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
|
||||
<td><a accesskey="u" href="reference.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
|
||||
<td><a accesskey="p" href="ostree-SELinux-policy-management.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
|
||||
<td><a accesskey="n" href="ostree-GPG-signature-verification-results.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
|
||||
</tr></table>
|
||||
<div class="refentry">
|
||||
<a name="ostree-Simple-upgrade-class"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv"><table width="100%"><tr>
|
||||
<td valign="top">
|
||||
<h2><span class="refentrytitle"><a name="ostree-Simple-upgrade-class.top_of_page"></a>Simple upgrade class</span></h2>
|
||||
<p>Simple upgrade class — Upgrade OSTree systems</p>
|
||||
</td>
|
||||
<td class="gallery_image" valign="top" align="right"></td>
|
||||
</tr></table></div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-Simple-upgrade-class.functions"></a><h2>Functions</h2>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="functions_proto_type">
|
||||
<col class="functions_proto_name">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<a class="link" href="ostree-Simple-upgrade-class.html#OstreeSysrootUpgrader" title="OstreeSysrootUpgrader"><span class="returnvalue">OstreeSysrootUpgrader</span></a> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-Simple-upgrade-class.html#ostree-sysroot-upgrader-new" title="ostree_sysroot_upgrader_new ()">ostree_sysroot_upgrader_new</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<a class="link" href="ostree-Simple-upgrade-class.html#OstreeSysrootUpgrader" title="OstreeSysrootUpgrader"><span class="returnvalue">OstreeSysrootUpgrader</span></a> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-Simple-upgrade-class.html#ostree-sysroot-upgrader-new-for-os" title="ostree_sysroot_upgrader_new_for_os ()">ostree_sysroot_upgrader_new_for_os</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<a class="link" href="ostree-Simple-upgrade-class.html#OstreeSysrootUpgrader" title="OstreeSysrootUpgrader"><span class="returnvalue">OstreeSysrootUpgrader</span></a> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-Simple-upgrade-class.html#ostree-sysroot-upgrader-new-for-os-with-flags" title="ostree_sysroot_upgrader_new_for_os_with_flags ()">ostree_sysroot_upgrader_new_for_os_with_flags</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">GKeyFile</span> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-Simple-upgrade-class.html#ostree-sysroot-upgrader-get-origin" title="ostree_sysroot_upgrader_get_origin ()">ostree_sysroot_upgrader_get_origin</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">GKeyFile</span> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-Simple-upgrade-class.html#ostree-sysroot-upgrader-dup-origin" title="ostree_sysroot_upgrader_dup_origin ()">ostree_sysroot_upgrader_dup_origin</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">gboolean</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-Simple-upgrade-class.html#ostree-sysroot-upgrader-set-origin" title="ostree_sysroot_upgrader_set_origin ()">ostree_sysroot_upgrader_set_origin</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">char</span> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-Simple-upgrade-class.html#ostree-sysroot-upgrader-get-origin-description" title="ostree_sysroot_upgrader_get_origin_description ()">ostree_sysroot_upgrader_get_origin_description</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">gboolean</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-Simple-upgrade-class.html#ostree-sysroot-upgrader-check-timestamps" title="ostree_sysroot_upgrader_check_timestamps ()">ostree_sysroot_upgrader_check_timestamps</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">gboolean</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-Simple-upgrade-class.html#ostree-sysroot-upgrader-pull" title="ostree_sysroot_upgrader_pull ()">ostree_sysroot_upgrader_pull</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">gboolean</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-Simple-upgrade-class.html#ostree-sysroot-upgrader-pull-one-dir" title="ostree_sysroot_upgrader_pull_one_dir ()">ostree_sysroot_upgrader_pull_one_dir</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">gboolean</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-Simple-upgrade-class.html#ostree-sysroot-upgrader-deploy" title="ostree_sysroot_upgrader_deploy ()">ostree_sysroot_upgrader_deploy</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-Simple-upgrade-class.other"></a><h2>Types and Values</h2>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="other_proto_type">
|
||||
<col class="other_proto_name">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="typedef_keyword">typedef</td>
|
||||
<td class="function_name"><a class="link" href="ostree-Simple-upgrade-class.html#OstreeSysrootUpgrader" title="OstreeSysrootUpgrader">OstreeSysrootUpgrader</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="datatype_keyword">enum</td>
|
||||
<td class="function_name"><a class="link" href="ostree-Simple-upgrade-class.html#OstreeSysrootUpgraderFlags" title="enum OstreeSysrootUpgraderFlags">OstreeSysrootUpgraderFlags</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="datatype_keyword">enum</td>
|
||||
<td class="function_name"><a class="link" href="ostree-Simple-upgrade-class.html#OstreeSysrootUpgraderPullFlags" title="enum OstreeSysrootUpgraderPullFlags">OstreeSysrootUpgraderPullFlags</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-Simple-upgrade-class.description"></a><h2>Description</h2>
|
||||
<p>The <a class="link" href="ostree-Simple-upgrade-class.html#OstreeSysrootUpgrader" title="OstreeSysrootUpgrader"><span class="type">OstreeSysrootUpgrader</span></a> class allows performing simple upgrade
|
||||
operations.</p>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-Simple-upgrade-class.functions_details"></a><h2>Functions</h2>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-sysroot-upgrader-new"></a><h3>ostree_sysroot_upgrader_new ()</h3>
|
||||
<pre class="programlisting"><a class="link" href="ostree-Simple-upgrade-class.html#OstreeSysrootUpgrader" title="OstreeSysrootUpgrader"><span class="returnvalue">OstreeSysrootUpgrader</span></a> *
|
||||
ostree_sysroot_upgrader_new (<em class="parameter"><code><a class="link" href="ostree-Root-partition-mount-point.html#OstreeSysroot" title="OstreeSysroot"><span class="type">OstreeSysroot</span></a> *sysroot</code></em>,
|
||||
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
|
||||
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sysroot-upgrader-new.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>sysroot</p></td>
|
||||
<td class="parameter_description"><p>An <a class="link" href="ostree-Root-partition-mount-point.html#OstreeSysroot" title="OstreeSysroot"><span class="type">OstreeSysroot</span></a></p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>cancellable</p></td>
|
||||
<td class="parameter_description"><p>Cancellable</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>error</p></td>
|
||||
<td class="parameter_description"><p>Error</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sysroot-upgrader-new.returns"></a><h4>Returns</h4>
|
||||
<p>An upgrader. </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>]</span></p>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-sysroot-upgrader-new-for-os"></a><h3>ostree_sysroot_upgrader_new_for_os ()</h3>
|
||||
<pre class="programlisting"><a class="link" href="ostree-Simple-upgrade-class.html#OstreeSysrootUpgrader" title="OstreeSysrootUpgrader"><span class="returnvalue">OstreeSysrootUpgrader</span></a> *
|
||||
ostree_sysroot_upgrader_new_for_os (<em class="parameter"><code><a class="link" href="ostree-Root-partition-mount-point.html#OstreeSysroot" title="OstreeSysroot"><span class="type">OstreeSysroot</span></a> *sysroot</code></em>,
|
||||
<em class="parameter"><code>const <span class="type">char</span> *osname</code></em>,
|
||||
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
|
||||
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sysroot-upgrader-new-for-os.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>sysroot</p></td>
|
||||
<td class="parameter_description"><p>An <a class="link" href="ostree-Root-partition-mount-point.html#OstreeSysroot" title="OstreeSysroot"><span class="type">OstreeSysroot</span></a></p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>osname</p></td>
|
||||
<td class="parameter_description"><p>Operating system name. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>cancellable</p></td>
|
||||
<td class="parameter_description"><p>Cancellable</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>error</p></td>
|
||||
<td class="parameter_description"><p>Error</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sysroot-upgrader-new-for-os.returns"></a><h4>Returns</h4>
|
||||
<p>An upgrader. </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>]</span></p>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-sysroot-upgrader-new-for-os-with-flags"></a><h3>ostree_sysroot_upgrader_new_for_os_with_flags ()</h3>
|
||||
<pre class="programlisting"><a class="link" href="ostree-Simple-upgrade-class.html#OstreeSysrootUpgrader" title="OstreeSysrootUpgrader"><span class="returnvalue">OstreeSysrootUpgrader</span></a> *
|
||||
ostree_sysroot_upgrader_new_for_os_with_flags
|
||||
(<em class="parameter"><code><a class="link" href="ostree-Root-partition-mount-point.html#OstreeSysroot" title="OstreeSysroot"><span class="type">OstreeSysroot</span></a> *sysroot</code></em>,
|
||||
<em class="parameter"><code>const <span class="type">char</span> *osname</code></em>,
|
||||
<em class="parameter"><code><a class="link" href="ostree-Simple-upgrade-class.html#OstreeSysrootUpgraderFlags" title="enum OstreeSysrootUpgraderFlags"><span class="type">OstreeSysrootUpgraderFlags</span></a> flags</code></em>,
|
||||
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
|
||||
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sysroot-upgrader-new-for-os-with-flags.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>sysroot</p></td>
|
||||
<td class="parameter_description"><p>An <a class="link" href="ostree-Root-partition-mount-point.html#OstreeSysroot" title="OstreeSysroot"><span class="type">OstreeSysroot</span></a></p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>osname</p></td>
|
||||
<td class="parameter_description"><p>Operating system name. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>flags</p></td>
|
||||
<td class="parameter_description"><p>Flags</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>cancellable</p></td>
|
||||
<td class="parameter_description"><p>Cancellable</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>error</p></td>
|
||||
<td class="parameter_description"><p>Error</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sysroot-upgrader-new-for-os-with-flags.returns"></a><h4>Returns</h4>
|
||||
<p>An upgrader. </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>]</span></p>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-sysroot-upgrader-get-origin"></a><h3>ostree_sysroot_upgrader_get_origin ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">GKeyFile</span> *
|
||||
ostree_sysroot_upgrader_get_origin (<em class="parameter"><code><a class="link" href="ostree-Simple-upgrade-class.html#OstreeSysrootUpgrader" title="OstreeSysrootUpgrader"><span class="type">OstreeSysrootUpgrader</span></a> *self</code></em>);</pre>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sysroot-upgrader-get-origin.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody><tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>Sysroot</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sysroot-upgrader-get-origin.returns"></a><h4>Returns</h4>
|
||||
<p>The origin file, or <code class="literal">NULL</code> if unknown. </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20none"><span class="acronym">transfer none</span></a>][<a href="http://foldoc.org/nullable"><span class="acronym">nullable</span></a>]</span></p>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-sysroot-upgrader-dup-origin"></a><h3>ostree_sysroot_upgrader_dup_origin ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">GKeyFile</span> *
|
||||
ostree_sysroot_upgrader_dup_origin (<em class="parameter"><code><a class="link" href="ostree-Simple-upgrade-class.html#OstreeSysrootUpgrader" title="OstreeSysrootUpgrader"><span class="type">OstreeSysrootUpgrader</span></a> *self</code></em>);</pre>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sysroot-upgrader-dup-origin.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody><tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>Sysroot</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sysroot-upgrader-dup-origin.returns"></a><h4>Returns</h4>
|
||||
<p>A copy of the origin file, or <code class="literal">NULL</code> if unknown. </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>][<a href="http://foldoc.org/nullable"><span class="acronym">nullable</span></a>]</span></p>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-sysroot-upgrader-set-origin"></a><h3>ostree_sysroot_upgrader_set_origin ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||||
ostree_sysroot_upgrader_set_origin (<em class="parameter"><code><a class="link" href="ostree-Simple-upgrade-class.html#OstreeSysrootUpgrader" title="OstreeSysrootUpgrader"><span class="type">OstreeSysrootUpgrader</span></a> *self</code></em>,
|
||||
<em class="parameter"><code><span class="type">GKeyFile</span> *origin</code></em>,
|
||||
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
|
||||
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
|
||||
<p>Replace the origin with <em class="parameter"><code>origin</code></em>
|
||||
.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sysroot-upgrader-set-origin.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>Sysroot</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>origin</p></td>
|
||||
<td class="parameter_description"><p>The new origin. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>cancellable</p></td>
|
||||
<td class="parameter_description"><p>Cancellable</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>error</p></td>
|
||||
<td class="parameter_description"><p>Error</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-sysroot-upgrader-get-origin-description"></a><h3>ostree_sysroot_upgrader_get_origin_description ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">char</span> *
|
||||
ostree_sysroot_upgrader_get_origin_description
|
||||
(<em class="parameter"><code><a class="link" href="ostree-Simple-upgrade-class.html#OstreeSysrootUpgrader" title="OstreeSysrootUpgrader"><span class="type">OstreeSysrootUpgrader</span></a> *self</code></em>);</pre>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sysroot-upgrader-get-origin-description.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody><tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>Upgrader</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sysroot-upgrader-get-origin-description.returns"></a><h4>Returns</h4>
|
||||
<p>A one-line descriptive summary of the origin, or <code class="literal">NULL</code> if
|
||||
unknown. </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>][<a href="http://foldoc.org/nullable"><span class="acronym">nullable</span></a>]</span></p>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-sysroot-upgrader-check-timestamps"></a><h3>ostree_sysroot_upgrader_check_timestamps ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||||
ostree_sysroot_upgrader_check_timestamps
|
||||
(<em class="parameter"><code><a class="link" href="ostree-OstreeRepo.html#OstreeRepo" title="OstreeRepo"><span class="type">OstreeRepo</span></a> *repo</code></em>,
|
||||
<em class="parameter"><code>const <span class="type">char</span> *from_rev</code></em>,
|
||||
<em class="parameter"><code>const <span class="type">char</span> *to_rev</code></em>,
|
||||
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
|
||||
<p>Check that the timestamp on <em class="parameter"><code>to_rev</code></em>
|
||||
is equal to or newer than
|
||||
<em class="parameter"><code>from_rev</code></em>
|
||||
. This protects systems against man-in-the-middle
|
||||
attackers which provide a client with an older commit.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sysroot-upgrader-check-timestamps.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>repo</p></td>
|
||||
<td class="parameter_description"><p>Repo</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>from_rev</p></td>
|
||||
<td class="parameter_description"><p>From revision</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>to_rev</p></td>
|
||||
<td class="parameter_description"><p>To revision</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>error</p></td>
|
||||
<td class="parameter_description"><p>Error</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-sysroot-upgrader-pull"></a><h3>ostree_sysroot_upgrader_pull ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||||
ostree_sysroot_upgrader_pull (<em class="parameter"><code><a class="link" href="ostree-Simple-upgrade-class.html#OstreeSysrootUpgrader" title="OstreeSysrootUpgrader"><span class="type">OstreeSysrootUpgrader</span></a> *self</code></em>,
|
||||
<em class="parameter"><code><a class="link" href="ostree-OstreeRepo.html#OstreeRepoPullFlags" title="enum OstreeRepoPullFlags"><span class="type">OstreeRepoPullFlags</span></a> flags</code></em>,
|
||||
<em class="parameter"><code><a class="link" href="ostree-Simple-upgrade-class.html#OstreeSysrootUpgraderPullFlags" title="enum OstreeSysrootUpgraderPullFlags"><span class="type">OstreeSysrootUpgraderPullFlags</span></a> upgrader_flags</code></em>,
|
||||
<em class="parameter"><code><a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#OstreeAsyncProgress" title="OstreeAsyncProgress"><span class="type">OstreeAsyncProgress</span></a> *progress</code></em>,
|
||||
<em class="parameter"><code><span class="type">gboolean</span> *out_changed</code></em>,
|
||||
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
|
||||
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
|
||||
<p>Perform a pull from the origin. First check if the ref has
|
||||
changed, if so download the linked objects, and store the updated
|
||||
ref locally. Then <em class="parameter"><code>out_changed</code></em>
|
||||
will be <code class="literal">TRUE</code>.</p>
|
||||
<p>If the origin remote is unchanged, <em class="parameter"><code>out_changed</code></em>
|
||||
will be set to
|
||||
<code class="literal">FALSE</code>.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sysroot-upgrader-pull.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>Upgrader</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>flags</p></td>
|
||||
<td class="parameter_description"><p>Flags controlling pull behavior</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>upgrader_flags</p></td>
|
||||
<td class="parameter_description"><p>Flags controlling upgrader behavior</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>progress</p></td>
|
||||
<td class="parameter_description"><p>Progress. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>out_changed</p></td>
|
||||
<td class="parameter_description"><p>Whether or not the origin changed. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/out"><span class="acronym">out</span></a>]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>cancellable</p></td>
|
||||
<td class="parameter_description"><p>Cancellable</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>error</p></td>
|
||||
<td class="parameter_description"><p>Error</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-sysroot-upgrader-pull-one-dir"></a><h3>ostree_sysroot_upgrader_pull_one_dir ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||||
ostree_sysroot_upgrader_pull_one_dir (<em class="parameter"><code><a class="link" href="ostree-Simple-upgrade-class.html#OstreeSysrootUpgrader" title="OstreeSysrootUpgrader"><span class="type">OstreeSysrootUpgrader</span></a> *self</code></em>,
|
||||
<em class="parameter"><code>const <span class="type">char</span> *dir_to_pull</code></em>,
|
||||
<em class="parameter"><code><a class="link" href="ostree-OstreeRepo.html#OstreeRepoPullFlags" title="enum OstreeRepoPullFlags"><span class="type">OstreeRepoPullFlags</span></a> flags</code></em>,
|
||||
<em class="parameter"><code><a class="link" href="ostree-Simple-upgrade-class.html#OstreeSysrootUpgraderPullFlags" title="enum OstreeSysrootUpgraderPullFlags"><span class="type">OstreeSysrootUpgraderPullFlags</span></a> upgrader_flags</code></em>,
|
||||
<em class="parameter"><code><a class="link" href="ostree-Progress-notification-system-for-asynchronous-operations.html#OstreeAsyncProgress" title="OstreeAsyncProgress"><span class="type">OstreeAsyncProgress</span></a> *progress</code></em>,
|
||||
<em class="parameter"><code><span class="type">gboolean</span> *out_changed</code></em>,
|
||||
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
|
||||
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
|
||||
<p>Like <a class="link" href="ostree-Simple-upgrade-class.html#ostree-sysroot-upgrader-pull" title="ostree_sysroot_upgrader_pull ()"><code class="function">ostree_sysroot_upgrader_pull()</code></a>, but allows retrieving just a
|
||||
subpath of the tree. This can be used to download metadata files
|
||||
from inside the tree such as package databases.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sysroot-upgrader-pull-one-dir.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>Upgrader</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>dir_to_pull</p></td>
|
||||
<td class="parameter_description"><p>Subdirectory path (should include a leading /)</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>flags</p></td>
|
||||
<td class="parameter_description"><p>Flags controlling pull behavior</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>upgrader_flags</p></td>
|
||||
<td class="parameter_description"><p>Flags controlling upgrader behavior</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>progress</p></td>
|
||||
<td class="parameter_description"><p>Progress. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>out_changed</p></td>
|
||||
<td class="parameter_description"><p>Whether or not the origin changed. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/out"><span class="acronym">out</span></a>]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>cancellable</p></td>
|
||||
<td class="parameter_description"><p>Cancellable</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>error</p></td>
|
||||
<td class="parameter_description"><p>Error</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-sysroot-upgrader-deploy"></a><h3>ostree_sysroot_upgrader_deploy ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||||
ostree_sysroot_upgrader_deploy (<em class="parameter"><code><a class="link" href="ostree-Simple-upgrade-class.html#OstreeSysrootUpgrader" title="OstreeSysrootUpgrader"><span class="type">OstreeSysrootUpgrader</span></a> *self</code></em>,
|
||||
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
|
||||
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
|
||||
<p>Write the new deployment to disk, perform a configuration merge
|
||||
with /etc, and update the bootloader configuration.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-sysroot-upgrader-deploy.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>Self</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>cancellable</p></td>
|
||||
<td class="parameter_description"><p>Cancellable</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>error</p></td>
|
||||
<td class="parameter_description"><p>Error</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-Simple-upgrade-class.other_details"></a><h2>Types and Values</h2>
|
||||
<div class="refsect2">
|
||||
<a name="OstreeSysrootUpgrader"></a><h3>OstreeSysrootUpgrader</h3>
|
||||
<pre class="programlisting">typedef struct OstreeSysrootUpgrader OstreeSysrootUpgrader;
|
||||
</pre>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="OstreeSysrootUpgraderFlags"></a><h3>enum OstreeSysrootUpgraderFlags</h3>
|
||||
<p>Flags controlling operation of an <a class="link" href="ostree-Simple-upgrade-class.html#OstreeSysrootUpgrader" title="OstreeSysrootUpgrader"><span class="type">OstreeSysrootUpgrader</span></a>.</p>
|
||||
<div class="refsect3">
|
||||
<a name="OstreeSysrootUpgraderFlags.members"></a><h4>Members</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="300px" class="enum_members_name">
|
||||
<col class="enum_members_description">
|
||||
<col width="200px" class="enum_members_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="enum_member_name"><p><a name="OSTREE-SYSROOT-UPGRADER-FLAGS-NONE:CAPS"></a>OSTREE_SYSROOT_UPGRADER_FLAGS_NONE</p></td>
|
||||
<td class="enum_member_description">
|
||||
<p>No options</p>
|
||||
</td>
|
||||
<td class="enum_member_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="enum_member_name"><p><a name="OSTREE-SYSROOT-UPGRADER-FLAGS-IGNORE-UNCONFIGURED:CAPS"></a>OSTREE_SYSROOT_UPGRADER_FLAGS_IGNORE_UNCONFIGURED</p></td>
|
||||
<td class="enum_member_description">
|
||||
<p>Do not error if the origin has an
|
||||
unconfigured-state key</p>
|
||||
</td>
|
||||
<td class="enum_member_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="enum_member_name"><p><a name="OSTREE-SYSROOT-UPGRADER-FLAGS-STAGE:CAPS"></a>OSTREE_SYSROOT_UPGRADER_FLAGS_STAGE</p></td>
|
||||
<td class="enum_member_description">
|
||||
<p>Enable "staging" (finalization at shutdown); recommended
|
||||
(Since: 2021.4)</p>
|
||||
</td>
|
||||
<td class="enum_member_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="OstreeSysrootUpgraderPullFlags"></a><h3>enum OstreeSysrootUpgraderPullFlags</h3>
|
||||
<div class="refsect3">
|
||||
<a name="OstreeSysrootUpgraderPullFlags.members"></a><h4>Members</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="300px" class="enum_members_name">
|
||||
<col class="enum_members_description">
|
||||
<col width="200px" class="enum_members_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="enum_member_name"><p><a name="OSTREE-SYSROOT-UPGRADER-PULL-FLAGS-NONE:CAPS"></a>OSTREE_SYSROOT_UPGRADER_PULL_FLAGS_NONE</p></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="enum_member_name"><p><a name="OSTREE-SYSROOT-UPGRADER-PULL-FLAGS-ALLOW-OLDER:CAPS"></a>OSTREE_SYSROOT_UPGRADER_PULL_FLAGS_ALLOW_OLDER</p></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="enum_member_name"><p><a name="OSTREE-SYSROOT-UPGRADER-PULL-FLAGS-SYNTHETIC:CAPS"></a>OSTREE_SYSROOT_UPGRADER_PULL_FLAGS_SYNTHETIC</p></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<hr>Generated by GTK-Doc V1.34.0</div>
|
||||
</body>
|
||||
</html>
|
400
reference/ostree-ostree-bootconfig-parser.html
Normal file
@ -0,0 +1,400 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>ostree-bootconfig-parser: OSTree API references</title>
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
<link rel="home" href="index.html" title="OSTree API references">
|
||||
<link rel="up" href="reference.html" title="API Reference">
|
||||
<link rel="prev" href="ostree-Signature-management.html" title="Signature management">
|
||||
<link rel="next" href="ostree-ostree-chain-input-stream.html" title="ostree-chain-input-stream">
|
||||
<meta name="generator" content="GTK-Doc V1.34.0 (XML mode)">
|
||||
<link rel="stylesheet" href="style.css" type="text/css">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
|
||||
<td width="100%" align="left" class="shortcuts">
|
||||
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
|
||||
<a href="#ostree-ostree-bootconfig-parser.description" class="shortcut">Description</a></span>
|
||||
</td>
|
||||
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
|
||||
<td><a accesskey="u" href="reference.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
|
||||
<td><a accesskey="p" href="ostree-Signature-management.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
|
||||
<td><a accesskey="n" href="ostree-ostree-chain-input-stream.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
|
||||
</tr></table>
|
||||
<div class="refentry">
|
||||
<a name="ostree-ostree-bootconfig-parser"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv"><table width="100%"><tr>
|
||||
<td valign="top">
|
||||
<h2><span class="refentrytitle"><a name="ostree-ostree-bootconfig-parser.top_of_page"></a>ostree-bootconfig-parser</span></h2>
|
||||
<p>ostree-bootconfig-parser</p>
|
||||
</td>
|
||||
<td class="gallery_image" valign="top" align="right"></td>
|
||||
</tr></table></div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-ostree-bootconfig-parser.functions"></a><h2>Functions</h2>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="functions_proto_type">
|
||||
<col class="functions_proto_name">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<a class="link" href="ostree-ostree-bootconfig-parser.html#OstreeBootconfigParser" title="OstreeBootconfigParser"><span class="returnvalue">OstreeBootconfigParser</span></a> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-bootconfig-parser.html#ostree-bootconfig-parser-new" title="ostree_bootconfig_parser_new ()">ostree_bootconfig_parser_new</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<a class="link" href="ostree-ostree-bootconfig-parser.html#OstreeBootconfigParser" title="OstreeBootconfigParser"><span class="returnvalue">OstreeBootconfigParser</span></a> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-bootconfig-parser.html#ostree-bootconfig-parser-clone" title="ostree_bootconfig_parser_clone ()">ostree_bootconfig_parser_clone</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">gboolean</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-bootconfig-parser.html#ostree-bootconfig-parser-parse" title="ostree_bootconfig_parser_parse ()">ostree_bootconfig_parser_parse</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">gboolean</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-bootconfig-parser.html#ostree-bootconfig-parser-parse-at" title="ostree_bootconfig_parser_parse_at ()">ostree_bootconfig_parser_parse_at</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">gboolean</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-bootconfig-parser.html#ostree-bootconfig-parser-write" title="ostree_bootconfig_parser_write ()">ostree_bootconfig_parser_write</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">gboolean</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-bootconfig-parser.html#ostree-bootconfig-parser-write-at" title="ostree_bootconfig_parser_write_at ()">ostree_bootconfig_parser_write_at</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">void</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-bootconfig-parser.html#ostree-bootconfig-parser-set" title="ostree_bootconfig_parser_set ()">ostree_bootconfig_parser_set</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">const <span class="returnvalue">char</span> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-bootconfig-parser.html#ostree-bootconfig-parser-get" title="ostree_bootconfig_parser_get ()">ostree_bootconfig_parser_get</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">void</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-bootconfig-parser.html#ostree-bootconfig-parser-set-overlay-initrds" title="ostree_bootconfig_parser_set_overlay_initrds ()">ostree_bootconfig_parser_set_overlay_initrds</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">char</span> **
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-bootconfig-parser.html#ostree-bootconfig-parser-get-overlay-initrds" title="ostree_bootconfig_parser_get_overlay_initrds ()">ostree_bootconfig_parser_get_overlay_initrds</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-ostree-bootconfig-parser.other"></a><h2>Types and Values</h2>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="other_proto_type">
|
||||
<col class="other_proto_name">
|
||||
</colgroup>
|
||||
<tbody><tr>
|
||||
<td class="datatype_keyword"> </td>
|
||||
<td class="function_name"><a class="link" href="ostree-ostree-bootconfig-parser.html#OstreeBootconfigParser" title="OstreeBootconfigParser">OstreeBootconfigParser</a></td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-ostree-bootconfig-parser.description"></a><h2>Description</h2>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-ostree-bootconfig-parser.functions_details"></a><h2>Functions</h2>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-bootconfig-parser-new"></a><h3>ostree_bootconfig_parser_new ()</h3>
|
||||
<pre class="programlisting"><a class="link" href="ostree-ostree-bootconfig-parser.html#OstreeBootconfigParser" title="OstreeBootconfigParser"><span class="returnvalue">OstreeBootconfigParser</span></a> *
|
||||
ostree_bootconfig_parser_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-bootconfig-parser-clone"></a><h3>ostree_bootconfig_parser_clone ()</h3>
|
||||
<pre class="programlisting"><a class="link" href="ostree-ostree-bootconfig-parser.html#OstreeBootconfigParser" title="OstreeBootconfigParser"><span class="returnvalue">OstreeBootconfigParser</span></a> *
|
||||
ostree_bootconfig_parser_clone (<em class="parameter"><code><a class="link" href="ostree-ostree-bootconfig-parser.html#OstreeBootconfigParser" title="OstreeBootconfigParser"><span class="type">OstreeBootconfigParser</span></a> *self</code></em>);</pre>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-bootconfig-parser-clone.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody><tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>Bootconfig to clone</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-bootconfig-parser-clone.returns"></a><h4>Returns</h4>
|
||||
<p>Copy of <em class="parameter"><code>self</code></em>
|
||||
. </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>]</span></p>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-bootconfig-parser-parse"></a><h3>ostree_bootconfig_parser_parse ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||||
ostree_bootconfig_parser_parse (<em class="parameter"><code><a class="link" href="ostree-ostree-bootconfig-parser.html#OstreeBootconfigParser" title="OstreeBootconfigParser"><span class="type">OstreeBootconfigParser</span></a> *self</code></em>,
|
||||
<em class="parameter"><code><span class="type">GFile</span> *path</code></em>,
|
||||
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
|
||||
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-bootconfig-parser-parse-at"></a><h3>ostree_bootconfig_parser_parse_at ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||||
ostree_bootconfig_parser_parse_at (<em class="parameter"><code><a class="link" href="ostree-ostree-bootconfig-parser.html#OstreeBootconfigParser" title="OstreeBootconfigParser"><span class="type">OstreeBootconfigParser</span></a> *self</code></em>,
|
||||
<em class="parameter"><code><span class="type">int</span> dfd</code></em>,
|
||||
<em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
|
||||
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
|
||||
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
|
||||
<p>Initialize a bootconfig from the given file.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-bootconfig-parser-parse-at.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>Parser</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>dfd</p></td>
|
||||
<td class="parameter_description"><p>Directory fd</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>path</p></td>
|
||||
<td class="parameter_description"><p>File path</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>cancellable</p></td>
|
||||
<td class="parameter_description"><p>Cancellable</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>error</p></td>
|
||||
<td class="parameter_description"><p>Error</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-bootconfig-parser-write"></a><h3>ostree_bootconfig_parser_write ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||||
ostree_bootconfig_parser_write (<em class="parameter"><code><a class="link" href="ostree-ostree-bootconfig-parser.html#OstreeBootconfigParser" title="OstreeBootconfigParser"><span class="type">OstreeBootconfigParser</span></a> *self</code></em>,
|
||||
<em class="parameter"><code><span class="type">GFile</span> *output</code></em>,
|
||||
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
|
||||
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-bootconfig-parser-write-at"></a><h3>ostree_bootconfig_parser_write_at ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||||
ostree_bootconfig_parser_write_at (<em class="parameter"><code><a class="link" href="ostree-ostree-bootconfig-parser.html#OstreeBootconfigParser" title="OstreeBootconfigParser"><span class="type">OstreeBootconfigParser</span></a> *self</code></em>,
|
||||
<em class="parameter"><code><span class="type">int</span> dfd</code></em>,
|
||||
<em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
|
||||
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
|
||||
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-bootconfig-parser-set"></a><h3>ostree_bootconfig_parser_set ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||||
ostree_bootconfig_parser_set (<em class="parameter"><code><a class="link" href="ostree-ostree-bootconfig-parser.html#OstreeBootconfigParser" title="OstreeBootconfigParser"><span class="type">OstreeBootconfigParser</span></a> *self</code></em>,
|
||||
<em class="parameter"><code>const <span class="type">char</span> *key</code></em>,
|
||||
<em class="parameter"><code>const <span class="type">char</span> *value</code></em>);</pre>
|
||||
<p>Set the <em class="parameter"><code>key</code></em>
|
||||
/<em class="parameter"><code>value</code></em>
|
||||
pair to the boot configuration dictionary.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-bootconfig-parser-set.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>Parser</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>key</p></td>
|
||||
<td class="parameter_description"><p>the key</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>value</p></td>
|
||||
<td class="parameter_description"><p>the key</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-bootconfig-parser-get"></a><h3>ostree_bootconfig_parser_get ()</h3>
|
||||
<pre class="programlisting">const <span class="returnvalue">char</span> *
|
||||
ostree_bootconfig_parser_get (<em class="parameter"><code><a class="link" href="ostree-ostree-bootconfig-parser.html#OstreeBootconfigParser" title="OstreeBootconfigParser"><span class="type">OstreeBootconfigParser</span></a> *self</code></em>,
|
||||
<em class="parameter"><code>const <span class="type">char</span> *key</code></em>);</pre>
|
||||
<p>Get the value corresponding to <em class="parameter"><code>key</code></em>
|
||||
from the boot configuration dictionary.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-bootconfig-parser-get.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>Parser</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>key</p></td>
|
||||
<td class="parameter_description"><p>the key name to retrieve</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-bootconfig-parser-get.returns"></a><h4>Returns</h4>
|
||||
<p>The corresponding value, or <code class="literal">NULL</code> if the key hasn't been
|
||||
found. </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/nullable"><span class="acronym">nullable</span></a>]</span></p>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-bootconfig-parser-set-overlay-initrds"></a><h3>ostree_bootconfig_parser_set_overlay_initrds ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||||
ostree_bootconfig_parser_set_overlay_initrds
|
||||
(<em class="parameter"><code><a class="link" href="ostree-ostree-bootconfig-parser.html#OstreeBootconfigParser" title="OstreeBootconfigParser"><span class="type">OstreeBootconfigParser</span></a> *self</code></em>,
|
||||
<em class="parameter"><code><span class="type">char</span> **initrds</code></em>);</pre>
|
||||
<p>These are rendered as additional <code class="literal">initrd</code> keys in the final bootloader configs. The
|
||||
base initrd is part of the primary keys.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-bootconfig-parser-set-overlay-initrds.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>Parser</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>initrds</p></td>
|
||||
<td class="parameter_description"><p>Array of overlay
|
||||
initrds or <code class="literal">NULL</code> to unset. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/array"><span class="acronym">array</span></a> zero-terminated=1][<a href="http://foldoc.org/transfer%20none"><span class="acronym">transfer none</span></a>][<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>]</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<p class="since">Since: 2020.7</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-bootconfig-parser-get-overlay-initrds"></a><h3>ostree_bootconfig_parser_get_overlay_initrds ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">char</span> **
|
||||
ostree_bootconfig_parser_get_overlay_initrds
|
||||
(<em class="parameter"><code><a class="link" href="ostree-ostree-bootconfig-parser.html#OstreeBootconfigParser" title="OstreeBootconfigParser"><span class="type">OstreeBootconfigParser</span></a> *self</code></em>);</pre>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-bootconfig-parser-get-overlay-initrds.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody><tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>Parser</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-bootconfig-parser-get-overlay-initrds.returns"></a><h4>Returns</h4>
|
||||
<p>Array of initrds or <code class="literal">NULL</code>
|
||||
if none are set. </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/array"><span class="acronym">array</span></a> zero-terminated=1][<a href="http://foldoc.org/transfer%20none"><span class="acronym">transfer none</span></a>][<a href="http://foldoc.org/nullable"><span class="acronym">nullable</span></a>]</span></p>
|
||||
</div>
|
||||
<p class="since">Since: 2020.7</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-ostree-bootconfig-parser.other_details"></a><h2>Types and Values</h2>
|
||||
<div class="refsect2">
|
||||
<a name="OstreeBootconfigParser"></a><h3>OstreeBootconfigParser</h3>
|
||||
<pre class="programlisting">typedef struct _OstreeBootconfigParser OstreeBootconfigParser;</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<hr>Generated by GTK-Doc V1.34.0</div>
|
||||
</body>
|
||||
</html>
|
89
reference/ostree-ostree-chain-input-stream.html
Normal file
@ -0,0 +1,89 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>ostree-chain-input-stream: OSTree API references</title>
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
<link rel="home" href="index.html" title="OSTree API references">
|
||||
<link rel="up" href="reference.html" title="API Reference">
|
||||
<link rel="prev" href="ostree-ostree-bootconfig-parser.html" title="ostree-bootconfig-parser">
|
||||
<link rel="next" href="ostree-ostree-checksum-input-stream.html" title="ostree-checksum-input-stream">
|
||||
<meta name="generator" content="GTK-Doc V1.34.0 (XML mode)">
|
||||
<link rel="stylesheet" href="style.css" type="text/css">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
|
||||
<td width="100%" align="left" class="shortcuts">
|
||||
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
|
||||
<a href="#ostree-ostree-chain-input-stream.description" class="shortcut">Description</a></span>
|
||||
</td>
|
||||
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
|
||||
<td><a accesskey="u" href="reference.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
|
||||
<td><a accesskey="p" href="ostree-ostree-bootconfig-parser.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
|
||||
<td><a accesskey="n" href="ostree-ostree-checksum-input-stream.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
|
||||
</tr></table>
|
||||
<div class="refentry">
|
||||
<a name="ostree-ostree-chain-input-stream"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv"><table width="100%"><tr>
|
||||
<td valign="top">
|
||||
<h2><span class="refentrytitle"><a name="ostree-ostree-chain-input-stream.top_of_page"></a>ostree-chain-input-stream</span></h2>
|
||||
<p>ostree-chain-input-stream</p>
|
||||
</td>
|
||||
<td class="gallery_image" valign="top" align="right"></td>
|
||||
</tr></table></div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-ostree-chain-input-stream.functions"></a><h2>Functions</h2>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="functions_proto_type">
|
||||
<col class="functions_proto_name">
|
||||
</colgroup>
|
||||
<tbody><tr>
|
||||
<td class="function_type">
|
||||
<a class="link" href="ostree-ostree-chain-input-stream.html#OstreeChainInputStream" title="struct OstreeChainInputStream"><span class="returnvalue">OstreeChainInputStream</span></a> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-chain-input-stream.html#ostree-chain-input-stream-new" title="ostree_chain_input_stream_new ()">ostree_chain_input_stream_new</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-ostree-chain-input-stream.other"></a><h2>Types and Values</h2>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="other_proto_type">
|
||||
<col class="other_proto_name">
|
||||
</colgroup>
|
||||
<tbody><tr>
|
||||
<td class="datatype_keyword">struct</td>
|
||||
<td class="function_name"><a class="link" href="ostree-ostree-chain-input-stream.html#OstreeChainInputStream" title="struct OstreeChainInputStream">OstreeChainInputStream</a></td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-ostree-chain-input-stream.description"></a><h2>Description</h2>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-ostree-chain-input-stream.functions_details"></a><h2>Functions</h2>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-chain-input-stream-new"></a><h3>ostree_chain_input_stream_new ()</h3>
|
||||
<pre class="programlisting"><a class="link" href="ostree-ostree-chain-input-stream.html#OstreeChainInputStream" title="struct OstreeChainInputStream"><span class="returnvalue">OstreeChainInputStream</span></a> *
|
||||
ostree_chain_input_stream_new (<em class="parameter"><code><span class="type">GPtrArray</span> *streams</code></em>);</pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-ostree-chain-input-stream.other_details"></a><h2>Types and Values</h2>
|
||||
<div class="refsect2">
|
||||
<a name="OstreeChainInputStream"></a><h3>struct OstreeChainInputStream</h3>
|
||||
<pre class="programlisting">struct OstreeChainInputStream {
|
||||
GInputStream parent_instance;
|
||||
};
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<hr>Generated by GTK-Doc V1.34.0</div>
|
||||
</body>
|
||||
</html>
|
90
reference/ostree-ostree-checksum-input-stream.html
Normal file
@ -0,0 +1,90 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>ostree-checksum-input-stream: OSTree API references</title>
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
<link rel="home" href="index.html" title="OSTree API references">
|
||||
<link rel="up" href="reference.html" title="API Reference">
|
||||
<link rel="prev" href="ostree-ostree-chain-input-stream.html" title="ostree-chain-input-stream">
|
||||
<link rel="next" href="ostree-ostree-content-writer.html" title="ostree-content-writer">
|
||||
<meta name="generator" content="GTK-Doc V1.34.0 (XML mode)">
|
||||
<link rel="stylesheet" href="style.css" type="text/css">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
|
||||
<td width="100%" align="left" class="shortcuts">
|
||||
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
|
||||
<a href="#ostree-ostree-checksum-input-stream.description" class="shortcut">Description</a></span>
|
||||
</td>
|
||||
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
|
||||
<td><a accesskey="u" href="reference.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
|
||||
<td><a accesskey="p" href="ostree-ostree-chain-input-stream.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
|
||||
<td><a accesskey="n" href="ostree-ostree-content-writer.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
|
||||
</tr></table>
|
||||
<div class="refentry">
|
||||
<a name="ostree-ostree-checksum-input-stream"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv"><table width="100%"><tr>
|
||||
<td valign="top">
|
||||
<h2><span class="refentrytitle"><a name="ostree-ostree-checksum-input-stream.top_of_page"></a>ostree-checksum-input-stream</span></h2>
|
||||
<p>ostree-checksum-input-stream</p>
|
||||
</td>
|
||||
<td class="gallery_image" valign="top" align="right"></td>
|
||||
</tr></table></div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-ostree-checksum-input-stream.functions"></a><h2>Functions</h2>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="functions_proto_type">
|
||||
<col class="functions_proto_name">
|
||||
</colgroup>
|
||||
<tbody><tr>
|
||||
<td class="function_type">
|
||||
<a class="link" href="ostree-ostree-checksum-input-stream.html#OstreeChecksumInputStream" title="struct OstreeChecksumInputStream"><span class="returnvalue">OstreeChecksumInputStream</span></a> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-checksum-input-stream.html#ostree-checksum-input-stream-new" title="ostree_checksum_input_stream_new ()">ostree_checksum_input_stream_new</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-ostree-checksum-input-stream.other"></a><h2>Types and Values</h2>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="other_proto_type">
|
||||
<col class="other_proto_name">
|
||||
</colgroup>
|
||||
<tbody><tr>
|
||||
<td class="datatype_keyword">struct</td>
|
||||
<td class="function_name"><a class="link" href="ostree-ostree-checksum-input-stream.html#OstreeChecksumInputStream" title="struct OstreeChecksumInputStream">OstreeChecksumInputStream</a></td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-ostree-checksum-input-stream.description"></a><h2>Description</h2>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-ostree-checksum-input-stream.functions_details"></a><h2>Functions</h2>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-checksum-input-stream-new"></a><h3>ostree_checksum_input_stream_new ()</h3>
|
||||
<pre class="programlisting"><a class="link" href="ostree-ostree-checksum-input-stream.html#OstreeChecksumInputStream" title="struct OstreeChecksumInputStream"><span class="returnvalue">OstreeChecksumInputStream</span></a> *
|
||||
ostree_checksum_input_stream_new (<em class="parameter"><code><span class="type">GInputStream</span> *stream</code></em>,
|
||||
<em class="parameter"><code><span class="type">GChecksum</span> *checksum</code></em>);</pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-ostree-checksum-input-stream.other_details"></a><h2>Types and Values</h2>
|
||||
<div class="refsect2">
|
||||
<a name="OstreeChecksumInputStream"></a><h3>struct OstreeChecksumInputStream</h3>
|
||||
<pre class="programlisting">struct OstreeChecksumInputStream {
|
||||
GFilterInputStream parent_instance;
|
||||
};
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<hr>Generated by GTK-Doc V1.34.0</div>
|
||||
</body>
|
||||
</html>
|
101
reference/ostree-ostree-content-writer.html
Normal file
@ -0,0 +1,101 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>ostree-content-writer: OSTree API references</title>
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
<link rel="home" href="index.html" title="OSTree API references">
|
||||
<link rel="up" href="reference.html" title="API Reference">
|
||||
<link rel="prev" href="ostree-ostree-checksum-input-stream.html" title="ostree-checksum-input-stream">
|
||||
<link rel="next" href="ostree-ostree-deployment.html" title="ostree-deployment">
|
||||
<meta name="generator" content="GTK-Doc V1.34.0 (XML mode)">
|
||||
<link rel="stylesheet" href="style.css" type="text/css">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
|
||||
<td width="100%" align="left" class="shortcuts">
|
||||
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
|
||||
<a href="#ostree-ostree-content-writer.description" class="shortcut">Description</a></span>
|
||||
</td>
|
||||
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
|
||||
<td><a accesskey="u" href="reference.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
|
||||
<td><a accesskey="p" href="ostree-ostree-checksum-input-stream.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
|
||||
<td><a accesskey="n" href="ostree-ostree-deployment.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
|
||||
</tr></table>
|
||||
<div class="refentry">
|
||||
<a name="ostree-ostree-content-writer"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv"><table width="100%"><tr>
|
||||
<td valign="top">
|
||||
<h2><span class="refentrytitle"><a name="ostree-ostree-content-writer.top_of_page"></a>ostree-content-writer</span></h2>
|
||||
<p>ostree-content-writer</p>
|
||||
</td>
|
||||
<td class="gallery_image" valign="top" align="right"></td>
|
||||
</tr></table></div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-ostree-content-writer.functions"></a><h2>Functions</h2>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="functions_proto_type">
|
||||
<col class="functions_proto_name">
|
||||
</colgroup>
|
||||
<tbody><tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">char</span> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-content-writer.html#ostree-content-writer-finish" title="ostree_content_writer_finish ()">ostree_content_writer_finish</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-ostree-content-writer.description"></a><h2>Description</h2>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-ostree-content-writer.functions_details"></a><h2>Functions</h2>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-content-writer-finish"></a><h3>ostree_content_writer_finish ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">char</span> *
|
||||
ostree_content_writer_finish (<em class="parameter"><code><span class="type">OstreeContentWriter</span> *self</code></em>,
|
||||
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
|
||||
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
|
||||
<p>Complete the object write and return the checksum.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-content-writer-finish.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>Writer</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>cancellable</p></td>
|
||||
<td class="parameter_description"><p>Cancellable</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>error</p></td>
|
||||
<td class="parameter_description"><p>Error</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-content-writer-finish.returns"></a><h4>Returns</h4>
|
||||
<p>Checksum, or <code class="literal">NULL</code> on error. </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>]</span></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<hr>Generated by GTK-Doc V1.34.0</div>
|
||||
</body>
|
||||
</html>
|
884
reference/ostree-ostree-deployment.html
Normal file
@ -0,0 +1,884 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>ostree-deployment: OSTree API references</title>
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
<link rel="home" href="index.html" title="OSTree API references">
|
||||
<link rel="up" href="reference.html" title="API Reference">
|
||||
<link rel="prev" href="ostree-ostree-content-writer.html" title="ostree-content-writer">
|
||||
<link rel="next" href="ostree-ostree-diff.html" title="ostree-diff">
|
||||
<meta name="generator" content="GTK-Doc V1.34.0 (XML mode)">
|
||||
<link rel="stylesheet" href="style.css" type="text/css">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
|
||||
<td width="100%" align="left" class="shortcuts">
|
||||
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
|
||||
<a href="#ostree-ostree-deployment.description" class="shortcut">Description</a></span>
|
||||
</td>
|
||||
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
|
||||
<td><a accesskey="u" href="reference.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
|
||||
<td><a accesskey="p" href="ostree-ostree-content-writer.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
|
||||
<td><a accesskey="n" href="ostree-ostree-diff.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
|
||||
</tr></table>
|
||||
<div class="refentry">
|
||||
<a name="ostree-ostree-deployment"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv"><table width="100%"><tr>
|
||||
<td valign="top">
|
||||
<h2><span class="refentrytitle"><a name="ostree-ostree-deployment.top_of_page"></a>ostree-deployment</span></h2>
|
||||
<p>ostree-deployment</p>
|
||||
</td>
|
||||
<td class="gallery_image" valign="top" align="right"></td>
|
||||
</tr></table></div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-ostree-deployment.functions"></a><h2>Functions</h2>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="functions_proto_type">
|
||||
<col class="functions_proto_name">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">guint</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-deployment.html#ostree-deployment-hash" title="ostree_deployment_hash ()">ostree_deployment_hash</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">gboolean</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-deployment.html#ostree-deployment-equal" title="ostree_deployment_equal ()">ostree_deployment_equal</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<a class="link" href="ostree-ostree-deployment.html#OstreeDeployment" title="OstreeDeployment"><span class="returnvalue">OstreeDeployment</span></a> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-deployment.html#ostree-deployment-new" title="ostree_deployment_new ()">ostree_deployment_new</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">int</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-deployment.html#ostree-deployment-get-index" title="ostree_deployment_get_index ()">ostree_deployment_get_index</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">const <span class="returnvalue">char</span> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-deployment.html#ostree-deployment-get-osname" title="ostree_deployment_get_osname ()">ostree_deployment_get_osname</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">int</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-deployment.html#ostree-deployment-get-deployserial" title="ostree_deployment_get_deployserial ()">ostree_deployment_get_deployserial</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">const <span class="returnvalue">char</span> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-deployment.html#ostree-deployment-get-csum" title="ostree_deployment_get_csum ()">ostree_deployment_get_csum</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">const <span class="returnvalue">char</span> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-deployment.html#ostree-deployment-get-bootcsum" title="ostree_deployment_get_bootcsum ()">ostree_deployment_get_bootcsum</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">int</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-deployment.html#ostree-deployment-get-bootserial" title="ostree_deployment_get_bootserial ()">ostree_deployment_get_bootserial</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<a class="link" href="ostree-ostree-bootconfig-parser.html#OstreeBootconfigParser" title="OstreeBootconfigParser"><span class="returnvalue">OstreeBootconfigParser</span></a> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-deployment.html#ostree-deployment-get-bootconfig" title="ostree_deployment_get_bootconfig ()">ostree_deployment_get_bootconfig</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">GKeyFile</span> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-deployment.html#ostree-deployment-get-origin" title="ostree_deployment_get_origin ()">ostree_deployment_get_origin</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">char</span> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-deployment.html#ostree-deployment-get-origin-relpath" title="ostree_deployment_get_origin_relpath ()">ostree_deployment_get_origin_relpath</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">OstreeDeploymentUnlockedState</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-deployment.html#ostree-deployment-get-unlocked" title="ostree_deployment_get_unlocked ()">ostree_deployment_get_unlocked</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">gboolean</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-deployment.html#ostree-deployment-is-pinned" title="ostree_deployment_is_pinned ()">ostree_deployment_is_pinned</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">gboolean</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-deployment.html#ostree-deployment-is-staged" title="ostree_deployment_is_staged ()">ostree_deployment_is_staged</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">gboolean</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-deployment.html#ostree-deployment-is-finalization-locked" title="ostree_deployment_is_finalization_locked ()">ostree_deployment_is_finalization_locked</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">void</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-deployment.html#ostree-deployment-set-index" title="ostree_deployment_set_index ()">ostree_deployment_set_index</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">void</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-deployment.html#ostree-deployment-set-bootserial" title="ostree_deployment_set_bootserial ()">ostree_deployment_set_bootserial</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">void</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-deployment.html#ostree-deployment-set-bootconfig" title="ostree_deployment_set_bootconfig ()">ostree_deployment_set_bootconfig</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">void</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-deployment.html#ostree-deployment-set-origin" title="ostree_deployment_set_origin ()">ostree_deployment_set_origin</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">void</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-deployment.html#ostree-deployment-origin-remove-transient-state" title="ostree_deployment_origin_remove_transient_state ()">ostree_deployment_origin_remove_transient_state</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<a class="link" href="ostree-ostree-deployment.html#OstreeDeployment" title="OstreeDeployment"><span class="returnvalue">OstreeDeployment</span></a> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-deployment.html#ostree-deployment-clone" title="ostree_deployment_clone ()">ostree_deployment_clone</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">const <span class="returnvalue">char</span> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-deployment.html#ostree-deployment-unlocked-state-to-string" title="ostree_deployment_unlocked_state_to_string ()">ostree_deployment_unlocked_state_to_string</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-ostree-deployment.other"></a><h2>Types and Values</h2>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="other_proto_type">
|
||||
<col class="other_proto_name">
|
||||
</colgroup>
|
||||
<tbody><tr>
|
||||
<td class="datatype_keyword"> </td>
|
||||
<td class="function_name"><a class="link" href="ostree-ostree-deployment.html#OstreeDeployment" title="OstreeDeployment">OstreeDeployment</a></td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-ostree-deployment.description"></a><h2>Description</h2>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-ostree-deployment.functions_details"></a><h2>Functions</h2>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-deployment-hash"></a><h3>ostree_deployment_hash ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">guint</span>
|
||||
ostree_deployment_hash (<em class="parameter"><code><span class="type">gconstpointer</span> v</code></em>);</pre>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-deployment-hash.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody><tr>
|
||||
<td class="parameter_name"><p>v</p></td>
|
||||
<td class="parameter_description"><p>Deployment. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/type"><span class="acronym">type</span></a> OstreeDeployment]</span></td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-deployment-hash.returns"></a><h4>Returns</h4>
|
||||
<p> An integer suitable for use in a <code class="literal">GHashTable</code></p>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-deployment-equal"></a><h3>ostree_deployment_equal ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||||
ostree_deployment_equal (<em class="parameter"><code><span class="type">gconstpointer</span> ap</code></em>,
|
||||
<em class="parameter"><code><span class="type">gconstpointer</span> bp</code></em>);</pre>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-deployment-equal.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>ap</p></td>
|
||||
<td class="parameter_description"><p>A deployment. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/type"><span class="acronym">type</span></a> OstreeDeployment]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>bp</p></td>
|
||||
<td class="parameter_description"><p>A deployment. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/type"><span class="acronym">type</span></a> OstreeDeployment]</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-deployment-equal.returns"></a><h4>Returns</h4>
|
||||
<p> <code class="literal">TRUE</code> if deployments have the same osname, csum, and deployserial</p>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-deployment-new"></a><h3>ostree_deployment_new ()</h3>
|
||||
<pre class="programlisting"><a class="link" href="ostree-ostree-deployment.html#OstreeDeployment" title="OstreeDeployment"><span class="returnvalue">OstreeDeployment</span></a> *
|
||||
ostree_deployment_new (<em class="parameter"><code><span class="type">int</span> index</code></em>,
|
||||
<em class="parameter"><code>const <span class="type">char</span> *osname</code></em>,
|
||||
<em class="parameter"><code>const <span class="type">char</span> *csum</code></em>,
|
||||
<em class="parameter"><code><span class="type">int</span> deployserial</code></em>,
|
||||
<em class="parameter"><code>const <span class="type">char</span> *bootcsum</code></em>,
|
||||
<em class="parameter"><code><span class="type">int</span> bootserial</code></em>);</pre>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-deployment-new.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>index</p></td>
|
||||
<td class="parameter_description"><p>Global index into the bootloader entries</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>osname</p></td>
|
||||
<td class="parameter_description"><p>"stateroot" for this deployment</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>csum</p></td>
|
||||
<td class="parameter_description"><p>OSTree commit that will be deployed</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>deployserial</p></td>
|
||||
<td class="parameter_description"><p>Unique counter</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>bootcsum</p></td>
|
||||
<td class="parameter_description"><p>Kernel/initrd checksum. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/nullable"><span class="acronym">nullable</span></a>]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>bootserial</p></td>
|
||||
<td class="parameter_description"><p>Unique index</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-deployment-new.returns"></a><h4>Returns</h4>
|
||||
<p>New deployment. </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>][<a href="http://foldoc.org/not%20nullable"><span class="acronym">not nullable</span></a>]</span></p>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-deployment-get-index"></a><h3>ostree_deployment_get_index ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">int</span>
|
||||
ostree_deployment_get_index (<em class="parameter"><code><a class="link" href="ostree-ostree-deployment.html#OstreeDeployment" title="OstreeDeployment"><span class="type">OstreeDeployment</span></a> *self</code></em>);</pre>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-deployment-get-index.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody><tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>Deployment</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-deployment-get-index.returns"></a><h4>Returns</h4>
|
||||
<p> The global index into the bootloader ordering</p>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-deployment-get-osname"></a><h3>ostree_deployment_get_osname ()</h3>
|
||||
<pre class="programlisting">const <span class="returnvalue">char</span> *
|
||||
ostree_deployment_get_osname (<em class="parameter"><code><a class="link" href="ostree-ostree-deployment.html#OstreeDeployment" title="OstreeDeployment"><span class="type">OstreeDeployment</span></a> *self</code></em>);</pre>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-deployment-get-deployserial"></a><h3>ostree_deployment_get_deployserial ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">int</span>
|
||||
ostree_deployment_get_deployserial (<em class="parameter"><code><a class="link" href="ostree-ostree-deployment.html#OstreeDeployment" title="OstreeDeployment"><span class="type">OstreeDeployment</span></a> *self</code></em>);</pre>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-deployment-get-csum"></a><h3>ostree_deployment_get_csum ()</h3>
|
||||
<pre class="programlisting">const <span class="returnvalue">char</span> *
|
||||
ostree_deployment_get_csum (<em class="parameter"><code><a class="link" href="ostree-ostree-deployment.html#OstreeDeployment" title="OstreeDeployment"><span class="type">OstreeDeployment</span></a> *self</code></em>);</pre>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-deployment-get-bootcsum"></a><h3>ostree_deployment_get_bootcsum ()</h3>
|
||||
<pre class="programlisting">const <span class="returnvalue">char</span> *
|
||||
ostree_deployment_get_bootcsum (<em class="parameter"><code><a class="link" href="ostree-ostree-deployment.html#OstreeDeployment" title="OstreeDeployment"><span class="type">OstreeDeployment</span></a> *self</code></em>);</pre>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-deployment-get-bootserial"></a><h3>ostree_deployment_get_bootserial ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">int</span>
|
||||
ostree_deployment_get_bootserial (<em class="parameter"><code><a class="link" href="ostree-ostree-deployment.html#OstreeDeployment" title="OstreeDeployment"><span class="type">OstreeDeployment</span></a> *self</code></em>);</pre>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-deployment-get-bootconfig"></a><h3>ostree_deployment_get_bootconfig ()</h3>
|
||||
<pre class="programlisting"><a class="link" href="ostree-ostree-bootconfig-parser.html#OstreeBootconfigParser" title="OstreeBootconfigParser"><span class="returnvalue">OstreeBootconfigParser</span></a> *
|
||||
ostree_deployment_get_bootconfig (<em class="parameter"><code><a class="link" href="ostree-ostree-deployment.html#OstreeDeployment" title="OstreeDeployment"><span class="type">OstreeDeployment</span></a> *self</code></em>);</pre>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-deployment-get-bootconfig.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody><tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>Deployment</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-deployment-get-bootconfig.returns"></a><h4>Returns</h4>
|
||||
<p>Boot configuration. </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20none"><span class="acronym">transfer none</span></a>][<a href="http://foldoc.org/nullable"><span class="acronym">nullable</span></a>]</span></p>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-deployment-get-origin"></a><h3>ostree_deployment_get_origin ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">GKeyFile</span> *
|
||||
ostree_deployment_get_origin (<em class="parameter"><code><a class="link" href="ostree-ostree-deployment.html#OstreeDeployment" title="OstreeDeployment"><span class="type">OstreeDeployment</span></a> *self</code></em>);</pre>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-deployment-get-origin.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody><tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>Deployment</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-deployment-get-origin.returns"></a><h4>Returns</h4>
|
||||
<p>Origin. </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20none"><span class="acronym">transfer none</span></a>][<a href="http://foldoc.org/nullable"><span class="acronym">nullable</span></a>]</span></p>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-deployment-get-origin-relpath"></a><h3>ostree_deployment_get_origin_relpath ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">char</span> *
|
||||
ostree_deployment_get_origin_relpath (<em class="parameter"><code><a class="link" href="ostree-ostree-deployment.html#OstreeDeployment" title="OstreeDeployment"><span class="type">OstreeDeployment</span></a> *self</code></em>);</pre>
|
||||
<p>Note this function only returns a *relative* path - if you want to
|
||||
access, it, you must either use fd-relative api such as <code class="function">openat()</code>,
|
||||
or concatenate it with the full <a class="link" href="ostree-Root-partition-mount-point.html#ostree-sysroot-get-path" title="ostree_sysroot_get_path ()"><code class="function">ostree_sysroot_get_path()</code></a>.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-deployment-get-origin-relpath.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody><tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>A deployment</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-deployment-get-origin-relpath.returns"></a><h4>Returns</h4>
|
||||
<p>Path to deployment root directory, relative to sysroot. </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/not%20nullable"><span class="acronym">not nullable</span></a>][<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>]</span></p>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-deployment-get-unlocked"></a><h3>ostree_deployment_get_unlocked ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">OstreeDeploymentUnlockedState</span>
|
||||
ostree_deployment_get_unlocked (<em class="parameter"><code><a class="link" href="ostree-ostree-deployment.html#OstreeDeployment" title="OstreeDeployment"><span class="type">OstreeDeployment</span></a> *self</code></em>);</pre>
|
||||
<p class="since">Since: 2016.4</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-deployment-is-pinned"></a><h3>ostree_deployment_is_pinned ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||||
ostree_deployment_is_pinned (<em class="parameter"><code><a class="link" href="ostree-ostree-deployment.html#OstreeDeployment" title="OstreeDeployment"><span class="type">OstreeDeployment</span></a> *self</code></em>);</pre>
|
||||
<p>See <a class="link" href="ostree-Root-partition-mount-point.html#ostree-sysroot-deployment-set-pinned" title="ostree_sysroot_deployment_set_pinned ()"><code class="function">ostree_sysroot_deployment_set_pinned()</code></a>.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-deployment-is-pinned.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody><tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>Deployment</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-deployment-is-pinned.returns"></a><h4>Returns</h4>
|
||||
<p> <code class="literal">TRUE</code> if deployment will not be subject to GC</p>
|
||||
</div>
|
||||
<p class="since">Since: 2018.3</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-deployment-is-staged"></a><h3>ostree_deployment_is_staged ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||||
ostree_deployment_is_staged (<em class="parameter"><code><a class="link" href="ostree-ostree-deployment.html#OstreeDeployment" title="OstreeDeployment"><span class="type">OstreeDeployment</span></a> *self</code></em>);</pre>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-deployment-is-staged.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody><tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>Deployment</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-deployment-is-staged.returns"></a><h4>Returns</h4>
|
||||
<p> <code class="literal">TRUE</code> if deployment should be "finalized" at shutdown time</p>
|
||||
</div>
|
||||
<p class="since">Since: 2018.3</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-deployment-is-finalization-locked"></a><h3>ostree_deployment_is_finalization_locked ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||||
ostree_deployment_is_finalization_locked
|
||||
(<em class="parameter"><code><a class="link" href="ostree-ostree-deployment.html#OstreeDeployment" title="OstreeDeployment"><span class="type">OstreeDeployment</span></a> *self</code></em>);</pre>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-deployment-is-finalization-locked.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody><tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>Deployment</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-deployment-is-finalization-locked.returns"></a><h4>Returns</h4>
|
||||
<p> <code class="literal">TRUE</code> if deployment is queued to be "finalized" at shutdown time, but requires
|
||||
additional action.</p>
|
||||
</div>
|
||||
<p class="since">Since: 2023.8</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-deployment-set-index"></a><h3>ostree_deployment_set_index ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||||
ostree_deployment_set_index (<em class="parameter"><code><a class="link" href="ostree-ostree-deployment.html#OstreeDeployment" title="OstreeDeployment"><span class="type">OstreeDeployment</span></a> *self</code></em>,
|
||||
<em class="parameter"><code><span class="type">int</span> index</code></em>);</pre>
|
||||
<p>Sets the global index into the bootloader ordering.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-deployment-set-index.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>Deployment</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>index</p></td>
|
||||
<td class="parameter_description"><p>Index into bootloader ordering</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-deployment-set-bootserial"></a><h3>ostree_deployment_set_bootserial ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||||
ostree_deployment_set_bootserial (<em class="parameter"><code><a class="link" href="ostree-ostree-deployment.html#OstreeDeployment" title="OstreeDeployment"><span class="type">OstreeDeployment</span></a> *self</code></em>,
|
||||
<em class="parameter"><code><span class="type">int</span> index</code></em>);</pre>
|
||||
<p>Should never have been made public API; don't use this.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-deployment-set-bootserial.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>Deployment</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>index</p></td>
|
||||
<td class="parameter_description"><p>Don't use this</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-deployment-set-bootconfig"></a><h3>ostree_deployment_set_bootconfig ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||||
ostree_deployment_set_bootconfig (<em class="parameter"><code><a class="link" href="ostree-ostree-deployment.html#OstreeDeployment" title="OstreeDeployment"><span class="type">OstreeDeployment</span></a> *self</code></em>,
|
||||
<em class="parameter"><code><a class="link" href="ostree-ostree-bootconfig-parser.html#OstreeBootconfigParser" title="OstreeBootconfigParser"><span class="type">OstreeBootconfigParser</span></a> *bootconfig</code></em>);</pre>
|
||||
<p>Set or clear the bootloader configuration.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-deployment-set-bootconfig.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>Deployment</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>bootconfig</p></td>
|
||||
<td class="parameter_description"><p>Bootloader configuration object. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/nullable"><span class="acronym">nullable</span></a>]</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-deployment-set-origin"></a><h3>ostree_deployment_set_origin ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||||
ostree_deployment_set_origin (<em class="parameter"><code><a class="link" href="ostree-ostree-deployment.html#OstreeDeployment" title="OstreeDeployment"><span class="type">OstreeDeployment</span></a> *self</code></em>,
|
||||
<em class="parameter"><code><span class="type">GKeyFile</span> *origin</code></em>);</pre>
|
||||
<p>Replace the "origin", which is a description of the source
|
||||
of the deployment and how to update to the next version.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-deployment-set-origin.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>Deployment</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>origin</p></td>
|
||||
<td class="parameter_description"><p>Set the origin for this deployment. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/nullable"><span class="acronym">nullable</span></a>]</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-deployment-origin-remove-transient-state"></a><h3>ostree_deployment_origin_remove_transient_state ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||||
ostree_deployment_origin_remove_transient_state
|
||||
(<em class="parameter"><code><span class="type">GKeyFile</span> *origin</code></em>);</pre>
|
||||
<p>The intention of an origin file is primarily describe the "inputs" that
|
||||
resulted in a deployment, and it's commonly used to derive the new state. For
|
||||
example, a key value (in pure libostree mode) is the "refspec". However,
|
||||
libostree (or other applications) may want to store "transient" state that
|
||||
should not be carried across upgrades.</p>
|
||||
<p>This function just removes all members of the <code class="literal">libostree-transient</code> group.
|
||||
The name of that group is available to all libostree users; best practice
|
||||
would be to prefix values underneath there with a short identifier for your
|
||||
software.</p>
|
||||
<p>Additionally, this function will remove the <code class="literal">origin/unlocked</code> and
|
||||
<code class="literal">origin/override-commit</code> members; these should be considered transient state
|
||||
that should have been under an explicit group.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-deployment-origin-remove-transient-state.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody><tr>
|
||||
<td class="parameter_name"><p>origin</p></td>
|
||||
<td class="parameter_description"><p>An origin</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<p class="since">Since: 2018.3</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-deployment-clone"></a><h3>ostree_deployment_clone ()</h3>
|
||||
<pre class="programlisting"><a class="link" href="ostree-ostree-deployment.html#OstreeDeployment" title="OstreeDeployment"><span class="returnvalue">OstreeDeployment</span></a> *
|
||||
ostree_deployment_clone (<em class="parameter"><code><a class="link" href="ostree-ostree-deployment.html#OstreeDeployment" title="OstreeDeployment"><span class="type">OstreeDeployment</span></a> *self</code></em>);</pre>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-deployment-clone.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody><tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>Deployment</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-deployment-clone.returns"></a><h4>Returns</h4>
|
||||
<p>New deep copy of <em class="parameter"><code>self</code></em>
|
||||
. </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/not%20nullable"><span class="acronym">not nullable</span></a>][<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>]</span></p>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-deployment-unlocked-state-to-string"></a><h3>ostree_deployment_unlocked_state_to_string ()</h3>
|
||||
<pre class="programlisting">const <span class="returnvalue">char</span> *
|
||||
ostree_deployment_unlocked_state_to_string
|
||||
(<em class="parameter"><code><span class="type">OstreeDeploymentUnlockedState</span> state</code></em>);</pre>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-deployment-unlocked-state-to-string.returns"></a><h4>Returns</h4>
|
||||
<p>Description of state. </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/not%20nullable"><span class="acronym">not nullable</span></a>]</span></p>
|
||||
</div>
|
||||
<p class="since">Since: 2016.4</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-ostree-deployment.other_details"></a><h2>Types and Values</h2>
|
||||
<div class="refsect2">
|
||||
<a name="OstreeDeployment"></a><h3>OstreeDeployment</h3>
|
||||
<pre class="programlisting">typedef struct {
|
||||
GObject parent_instance;
|
||||
|
||||
int index;
|
||||
char *osname;
|
||||
char *csum;
|
||||
int deployserial;
|
||||
char *bootcsum;
|
||||
int bootserial;
|
||||
OstreeBootconfigParser *bootconfig;
|
||||
GKeyFile *origin;
|
||||
OstreeDeploymentUnlockedState unlocked;
|
||||
gboolean staged;
|
||||
gboolean finalization_locked;
|
||||
char **overlay_initrds;
|
||||
char *overlay_initrds_id;
|
||||
} OstreeDeployment;
|
||||
</pre>
|
||||
<div class="refsect3">
|
||||
<a name="OstreeDeployment.members"></a><h4>Members</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="300px" class="struct_members_name">
|
||||
<col class="struct_members_description">
|
||||
<col width="200px" class="struct_members_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="struct_member_name"><p><span class="type">int</span> <em class="structfield"><code><a name="OstreeDeployment.index"></a>index</code></em>;</p></td>
|
||||
<td class="struct_member_description"><p>Global offset</p></td>
|
||||
<td class="struct_member_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="struct_member_name"><p><span class="type">char</span> *<em class="structfield"><code><a name="OstreeDeployment.osname"></a>osname</code></em>;</p></td>
|
||||
<td class="struct_member_description"> </td>
|
||||
<td class="struct_member_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="struct_member_name"><p><span class="type">char</span> *<em class="structfield"><code><a name="OstreeDeployment.csum"></a>csum</code></em>;</p></td>
|
||||
<td class="struct_member_description"><p>OSTree checksum of tree</p></td>
|
||||
<td class="struct_member_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="struct_member_name"><p><span class="type">int</span> <em class="structfield"><code><a name="OstreeDeployment.deployserial"></a>deployserial</code></em>;</p></td>
|
||||
<td class="struct_member_description"><p>How many times this particular csum appears in deployment list</p></td>
|
||||
<td class="struct_member_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="struct_member_name"><p><span class="type">char</span> *<em class="structfield"><code><a name="OstreeDeployment.bootcsum"></a>bootcsum</code></em>;</p></td>
|
||||
<td class="struct_member_description"><p>Checksum of kernel+initramfs</p></td>
|
||||
<td class="struct_member_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="struct_member_name"><p><span class="type">int</span> <em class="structfield"><code><a name="OstreeDeployment.bootserial"></a>bootserial</code></em>;</p></td>
|
||||
<td class="struct_member_description"><p>An integer assigned to this tree per its ${bootcsum}</p></td>
|
||||
<td class="struct_member_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="struct_member_name"><p><a class="link" href="ostree-ostree-bootconfig-parser.html#OstreeBootconfigParser" title="OstreeBootconfigParser"><span class="type">OstreeBootconfigParser</span></a> *<em class="structfield"><code><a name="OstreeDeployment.bootconfig"></a>bootconfig</code></em>;</p></td>
|
||||
<td class="struct_member_description"><p>Bootloader configuration</p></td>
|
||||
<td class="struct_member_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="struct_member_name"><p><span class="type">GKeyFile</span> *<em class="structfield"><code><a name="OstreeDeployment.origin"></a>origin</code></em>;</p></td>
|
||||
<td class="struct_member_description"><p>How to construct an upgraded version of this tree</p></td>
|
||||
<td class="struct_member_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="struct_member_name"><p><span class="type">OstreeDeploymentUnlockedState</span> <em class="structfield"><code><a name="OstreeDeployment.unlocked"></a>unlocked</code></em>;</p></td>
|
||||
<td class="struct_member_description"><p>The unlocked state</p></td>
|
||||
<td class="struct_member_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="struct_member_name"><p><span class="type">gboolean</span> <em class="structfield"><code><a name="OstreeDeployment.staged"></a>staged</code></em>;</p></td>
|
||||
<td class="struct_member_description"><p>TRUE iff this deployment is staged</p></td>
|
||||
<td class="struct_member_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="struct_member_name"><p><span class="type">gboolean</span> <em class="structfield"><code><a name="OstreeDeployment.finalization-locked"></a>finalization_locked</code></em>;</p></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="struct_member_name"><p><span class="type">char</span> **<em class="structfield"><code><a name="OstreeDeployment.overlay-initrds"></a>overlay_initrds</code></em>;</p></td>
|
||||
<td class="struct_member_description"><p>Checksums of staged additional initrds for this deployment</p></td>
|
||||
<td class="struct_member_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="struct_member_name"><p><span class="type">char</span> *<em class="structfield"><code><a name="OstreeDeployment.overlay-initrds-id"></a>overlay_initrds_id</code></em>;</p></td>
|
||||
<td class="struct_member_description"><p>Unique ID generated from initrd checksums; used to compare deployments</p></td>
|
||||
<td class="struct_member_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<hr>Generated by GTK-Doc V1.34.0</div>
|
||||
</body>
|
||||
</html>
|
369
reference/ostree-ostree-diff.html
Normal file
@ -0,0 +1,369 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>ostree-diff: OSTree API references</title>
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
<link rel="home" href="index.html" title="OSTree API references">
|
||||
<link rel="up" href="reference.html" title="API Reference">
|
||||
<link rel="prev" href="ostree-ostree-deployment.html" title="ostree-deployment">
|
||||
<link rel="next" href="ostree-ostree-kernel-args.html" title="ostree-kernel-args">
|
||||
<meta name="generator" content="GTK-Doc V1.34.0 (XML mode)">
|
||||
<link rel="stylesheet" href="style.css" type="text/css">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
|
||||
<td width="100%" align="left" class="shortcuts">
|
||||
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
|
||||
<a href="#ostree-ostree-diff.description" class="shortcut">Description</a></span>
|
||||
</td>
|
||||
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
|
||||
<td><a accesskey="u" href="reference.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
|
||||
<td><a accesskey="p" href="ostree-ostree-deployment.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
|
||||
<td><a accesskey="n" href="ostree-ostree-kernel-args.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
|
||||
</tr></table>
|
||||
<div class="refentry">
|
||||
<a name="ostree-ostree-diff"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv"><table width="100%"><tr>
|
||||
<td valign="top">
|
||||
<h2><span class="refentrytitle"><a name="ostree-ostree-diff.top_of_page"></a>ostree-diff</span></h2>
|
||||
<p>ostree-diff</p>
|
||||
</td>
|
||||
<td class="gallery_image" valign="top" align="right"></td>
|
||||
</tr></table></div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-ostree-diff.functions"></a><h2>Functions</h2>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="functions_proto_type">
|
||||
<col class="functions_proto_name">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<a class="link" href="ostree-ostree-diff.html#OstreeDiffItem" title="struct OstreeDiffItem"><span class="returnvalue">OstreeDiffItem</span></a> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-diff.html#ostree-diff-item-ref" title="ostree_diff_item_ref ()">ostree_diff_item_ref</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">void</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-diff.html#ostree-diff-item-unref" title="ostree_diff_item_unref ()">ostree_diff_item_unref</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">gboolean</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-diff.html#ostree-diff-dirs" title="ostree_diff_dirs ()">ostree_diff_dirs</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">gboolean</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-diff.html#ostree-diff-dirs-with-options" title="ostree_diff_dirs_with_options ()">ostree_diff_dirs_with_options</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">void</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-diff.html#ostree-diff-print" title="ostree_diff_print ()">ostree_diff_print</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-ostree-diff.other"></a><h2>Types and Values</h2>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="other_proto_type">
|
||||
<col class="other_proto_name">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="datatype_keyword">enum</td>
|
||||
<td class="function_name"><a class="link" href="ostree-ostree-diff.html#OstreeDiffFlags" title="enum OstreeDiffFlags">OstreeDiffFlags</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="datatype_keyword">struct</td>
|
||||
<td class="function_name"><a class="link" href="ostree-ostree-diff.html#OstreeDiffItem" title="struct OstreeDiffItem">OstreeDiffItem</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-ostree-diff.description"></a><h2>Description</h2>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-ostree-diff.functions_details"></a><h2>Functions</h2>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-diff-item-ref"></a><h3>ostree_diff_item_ref ()</h3>
|
||||
<pre class="programlisting"><a class="link" href="ostree-ostree-diff.html#OstreeDiffItem" title="struct OstreeDiffItem"><span class="returnvalue">OstreeDiffItem</span></a> *
|
||||
ostree_diff_item_ref (<em class="parameter"><code><a class="link" href="ostree-ostree-diff.html#OstreeDiffItem" title="struct OstreeDiffItem"><span class="type">OstreeDiffItem</span></a> *diffitem</code></em>);</pre>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-diff-item-unref"></a><h3>ostree_diff_item_unref ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||||
ostree_diff_item_unref (<em class="parameter"><code><a class="link" href="ostree-ostree-diff.html#OstreeDiffItem" title="struct OstreeDiffItem"><span class="type">OstreeDiffItem</span></a> *diffitem</code></em>);</pre>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-diff-dirs"></a><h3>ostree_diff_dirs ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||||
ostree_diff_dirs (<em class="parameter"><code><a class="link" href="ostree-ostree-diff.html#OstreeDiffFlags" title="enum OstreeDiffFlags"><span class="type">OstreeDiffFlags</span></a> flags</code></em>,
|
||||
<em class="parameter"><code><span class="type">GFile</span> *a</code></em>,
|
||||
<em class="parameter"><code><span class="type">GFile</span> *b</code></em>,
|
||||
<em class="parameter"><code><span class="type">GPtrArray</span> *modified</code></em>,
|
||||
<em class="parameter"><code><span class="type">GPtrArray</span> *removed</code></em>,
|
||||
<em class="parameter"><code><span class="type">GPtrArray</span> *added</code></em>,
|
||||
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
|
||||
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
|
||||
<p>Compute the difference between directory <em class="parameter"><code>a</code></em>
|
||||
and <em class="parameter"><code>b</code></em>
|
||||
as 3 separate
|
||||
sets of <a class="link" href="ostree-ostree-diff.html#OstreeDiffItem" title="struct OstreeDiffItem"><span class="type">OstreeDiffItem</span></a> in <em class="parameter"><code>modified</code></em>
|
||||
, <em class="parameter"><code>removed</code></em>
|
||||
, and <em class="parameter"><code>added</code></em>
|
||||
.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-diff-dirs.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>flags</p></td>
|
||||
<td class="parameter_description"><p>Flags</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>a</p></td>
|
||||
<td class="parameter_description"><p>First directory path, or <code class="literal">NULL</code></p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>b</p></td>
|
||||
<td class="parameter_description"><p>First directory path</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>modified</p></td>
|
||||
<td class="parameter_description"><p>Modified files. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/element-type"><span class="acronym">element-type</span></a> OstreeDiffItem]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>removed</p></td>
|
||||
<td class="parameter_description"><p>Removed files. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/element-type"><span class="acronym">element-type</span></a> Gio.File]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>added</p></td>
|
||||
<td class="parameter_description"><p>Added files. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/element-type"><span class="acronym">element-type</span></a> Gio.File]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>cancellable</p></td>
|
||||
<td class="parameter_description"><p>Cancellable</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>error</p></td>
|
||||
<td class="parameter_description"><p>Error</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-diff-dirs-with-options"></a><h3>ostree_diff_dirs_with_options ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||||
ostree_diff_dirs_with_options (<em class="parameter"><code><a class="link" href="ostree-ostree-diff.html#OstreeDiffFlags" title="enum OstreeDiffFlags"><span class="type">OstreeDiffFlags</span></a> flags</code></em>,
|
||||
<em class="parameter"><code><span class="type">GFile</span> *a</code></em>,
|
||||
<em class="parameter"><code><span class="type">GFile</span> *b</code></em>,
|
||||
<em class="parameter"><code><span class="type">GPtrArray</span> *modified</code></em>,
|
||||
<em class="parameter"><code><span class="type">GPtrArray</span> *removed</code></em>,
|
||||
<em class="parameter"><code><span class="type">GPtrArray</span> *added</code></em>,
|
||||
<em class="parameter"><code><span class="type">OstreeDiffDirsOptions</span> *options</code></em>,
|
||||
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
|
||||
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
|
||||
<p>Compute the difference between directory <em class="parameter"><code>a</code></em>
|
||||
and <em class="parameter"><code>b</code></em>
|
||||
as 3 separate
|
||||
sets of <a class="link" href="ostree-ostree-diff.html#OstreeDiffItem" title="struct OstreeDiffItem"><span class="type">OstreeDiffItem</span></a> in <em class="parameter"><code>modified</code></em>
|
||||
, <em class="parameter"><code>removed</code></em>
|
||||
, and <em class="parameter"><code>added</code></em>
|
||||
.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-diff-dirs-with-options.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>flags</p></td>
|
||||
<td class="parameter_description"><p>Flags</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>a</p></td>
|
||||
<td class="parameter_description"><p>First directory path, or <code class="literal">NULL</code></p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>b</p></td>
|
||||
<td class="parameter_description"><p>First directory path</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>modified</p></td>
|
||||
<td class="parameter_description"><p>Modified files. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/element-type"><span class="acronym">element-type</span></a> OstreeDiffItem]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>removed</p></td>
|
||||
<td class="parameter_description"><p>Removed files. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/element-type"><span class="acronym">element-type</span></a> Gio.File]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>added</p></td>
|
||||
<td class="parameter_description"><p>Added files. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/element-type"><span class="acronym">element-type</span></a> Gio.File]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>cancellable</p></td>
|
||||
<td class="parameter_description"><p>Cancellable</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>options</p></td>
|
||||
<td class="parameter_description"><p>Options. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>error</p></td>
|
||||
<td class="parameter_description"><p>Error</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<p class="since">Since: 2017.4</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-diff-print"></a><h3>ostree_diff_print ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||||
ostree_diff_print (<em class="parameter"><code><span class="type">GFile</span> *a</code></em>,
|
||||
<em class="parameter"><code><span class="type">GFile</span> *b</code></em>,
|
||||
<em class="parameter"><code><span class="type">GPtrArray</span> *modified</code></em>,
|
||||
<em class="parameter"><code><span class="type">GPtrArray</span> *removed</code></em>,
|
||||
<em class="parameter"><code><span class="type">GPtrArray</span> *added</code></em>);</pre>
|
||||
<p>Print the contents of a diff to stdout.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-diff-print.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>a</p></td>
|
||||
<td class="parameter_description"><p>First directory path</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>b</p></td>
|
||||
<td class="parameter_description"><p>First directory path</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>modified</p></td>
|
||||
<td class="parameter_description"><p>Modified files. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/element-type"><span class="acronym">element-type</span></a> OstreeDiffItem]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>removed</p></td>
|
||||
<td class="parameter_description"><p>Removed files. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/element-type"><span class="acronym">element-type</span></a> Gio.File]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>added</p></td>
|
||||
<td class="parameter_description"><p>Added files. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/element-type"><span class="acronym">element-type</span></a> Gio.File]</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-ostree-diff.other_details"></a><h2>Types and Values</h2>
|
||||
<div class="refsect2">
|
||||
<a name="OstreeDiffFlags"></a><h3>enum OstreeDiffFlags</h3>
|
||||
<div class="refsect3">
|
||||
<a name="OstreeDiffFlags.members"></a><h4>Members</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="300px" class="enum_members_name">
|
||||
<col class="enum_members_description">
|
||||
<col width="200px" class="enum_members_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="enum_member_name"><p><a name="OSTREE-DIFF-FLAGS-NONE:CAPS"></a>OSTREE_DIFF_FLAGS_NONE</p></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="enum_member_name"><p><a name="OSTREE-DIFF-FLAGS-IGNORE-XATTRS:CAPS"></a>OSTREE_DIFF_FLAGS_IGNORE_XATTRS</p></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="OstreeDiffItem"></a><h3>struct OstreeDiffItem</h3>
|
||||
<pre class="programlisting">struct OstreeDiffItem {
|
||||
gint refcount; /* atomic */
|
||||
|
||||
GFile *src;
|
||||
GFile *target;
|
||||
|
||||
GFileInfo *src_info;
|
||||
GFileInfo *target_info;
|
||||
|
||||
char *src_checksum;
|
||||
char *target_checksum;
|
||||
};
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<hr>Generated by GTK-Doc V1.34.0</div>
|
||||
</body>
|
||||
</html>
|
1005
reference/ostree-ostree-kernel-args.html
Normal file
373
reference/ostree-ostree-ref.html
Normal file
@ -0,0 +1,373 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>ostree-ref: OSTree API references</title>
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
<link rel="home" href="index.html" title="OSTree API references">
|
||||
<link rel="up" href="reference.html" title="API Reference">
|
||||
<link rel="prev" href="ostree-ostree-kernel-args.html" title="ostree-kernel-args">
|
||||
<link rel="next" href="ostree-ostree-remote.html" title="ostree-remote">
|
||||
<meta name="generator" content="GTK-Doc V1.34.0 (XML mode)">
|
||||
<link rel="stylesheet" href="style.css" type="text/css">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
|
||||
<td width="100%" align="left" class="shortcuts">
|
||||
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
|
||||
<a href="#ostree-ostree-ref.description" class="shortcut">Description</a></span>
|
||||
</td>
|
||||
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
|
||||
<td><a accesskey="u" href="reference.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
|
||||
<td><a accesskey="p" href="ostree-ostree-kernel-args.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
|
||||
<td><a accesskey="n" href="ostree-ostree-remote.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
|
||||
</tr></table>
|
||||
<div class="refentry">
|
||||
<a name="ostree-ostree-ref"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv"><table width="100%"><tr>
|
||||
<td valign="top">
|
||||
<h2><span class="refentrytitle"><a name="ostree-ostree-ref.top_of_page"></a>ostree-ref</span></h2>
|
||||
<p>ostree-ref</p>
|
||||
</td>
|
||||
<td class="gallery_image" valign="top" align="right"></td>
|
||||
</tr></table></div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-ostree-ref.functions"></a><h2>Functions</h2>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="functions_proto_type">
|
||||
<col class="functions_proto_name">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">OstreeCollectionRef</span> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-ref.html#ostree-collection-ref-new" title="ostree_collection_ref_new ()">ostree_collection_ref_new</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">OstreeCollectionRef</span> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-ref.html#ostree-collection-ref-dup" title="ostree_collection_ref_dup ()">ostree_collection_ref_dup</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">void</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-ref.html#ostree-collection-ref-free" title="ostree_collection_ref_free ()">ostree_collection_ref_free</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">guint</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-ref.html#ostree-collection-ref-hash" title="ostree_collection_ref_hash ()">ostree_collection_ref_hash</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">gboolean</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-ref.html#ostree-collection-ref-equal" title="ostree_collection_ref_equal ()">ostree_collection_ref_equal</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">OstreeCollectionRef</span> **
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-ref.html#ostree-collection-ref-dupv" title="ostree_collection_ref_dupv ()">ostree_collection_ref_dupv</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">void</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-ref.html#ostree-collection-ref-freev" title="ostree_collection_ref_freev ()">ostree_collection_ref_freev</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-ostree-ref.other"></a><h2>Types and Values</h2>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="other_proto_type">
|
||||
<col class="other_proto_name">
|
||||
</colgroup>
|
||||
<tbody><tr>
|
||||
<td class="typedef_keyword">typedef</td>
|
||||
<td class="function_name"><a class="link" href="ostree-ostree-ref.html#OstreeCollectionRefv" title="OstreeCollectionRefv">OstreeCollectionRefv</a></td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-ostree-ref.description"></a><h2>Description</h2>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-ostree-ref.functions_details"></a><h2>Functions</h2>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-collection-ref-new"></a><h3>ostree_collection_ref_new ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">OstreeCollectionRef</span> *
|
||||
ostree_collection_ref_new (<em class="parameter"><code>const <span class="type">gchar</span> *collection_id</code></em>,
|
||||
<em class="parameter"><code>const <span class="type">gchar</span> *ref_name</code></em>);</pre>
|
||||
<p>Create a new <span class="type">OstreeCollectionRef</span> containing (<em class="parameter"><code>collection_id</code></em>
|
||||
, <em class="parameter"><code>ref_name</code></em>
|
||||
). If
|
||||
<em class="parameter"><code>collection_id</code></em>
|
||||
is <code class="literal">NULL</code>, this is equivalent to a plain ref name string (not a
|
||||
refspec; no remote name is included), which can be used for non-P2P
|
||||
operations.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-collection-ref-new.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>collection_id</p></td>
|
||||
<td class="parameter_description"><p>a collection ID, or <code class="literal">NULL</code> for a plain ref. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/nullable"><span class="acronym">nullable</span></a>]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>ref_name</p></td>
|
||||
<td class="parameter_description"><p>a ref name</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-collection-ref-new.returns"></a><h4>Returns</h4>
|
||||
<p>a new <span class="type">OstreeCollectionRef</span>. </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>]</span></p>
|
||||
</div>
|
||||
<p class="since">Since: 2018.6</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-collection-ref-dup"></a><h3>ostree_collection_ref_dup ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">OstreeCollectionRef</span> *
|
||||
ostree_collection_ref_dup (<em class="parameter"><code>const <span class="type">OstreeCollectionRef</span> *ref</code></em>);</pre>
|
||||
<p>Create a copy of the given <em class="parameter"><code>ref</code></em>
|
||||
.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-collection-ref-dup.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody><tr>
|
||||
<td class="parameter_name"><p>ref</p></td>
|
||||
<td class="parameter_description"><p>an <span class="type">OstreeCollectionRef</span>. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/not%20nullable"><span class="acronym">not nullable</span></a>]</span></td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-collection-ref-dup.returns"></a><h4>Returns</h4>
|
||||
<p>a newly allocated copy of <em class="parameter"><code>ref</code></em>
|
||||
. </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>]</span></p>
|
||||
</div>
|
||||
<p class="since">Since: 2018.6</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-collection-ref-free"></a><h3>ostree_collection_ref_free ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||||
ostree_collection_ref_free (<em class="parameter"><code><span class="type">OstreeCollectionRef</span> *ref</code></em>);</pre>
|
||||
<p>Free the given <em class="parameter"><code>ref</code></em>
|
||||
.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-collection-ref-free.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody><tr>
|
||||
<td class="parameter_name"><p>ref</p></td>
|
||||
<td class="parameter_description"><p>an <span class="type">OstreeCollectionRef</span>. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>]</span></td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<p class="since">Since: 2018.6</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-collection-ref-hash"></a><h3>ostree_collection_ref_hash ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">guint</span>
|
||||
ostree_collection_ref_hash (<em class="parameter"><code><span class="type">gconstpointer</span> ref</code></em>);</pre>
|
||||
<p>Hash the given <em class="parameter"><code>ref</code></em>
|
||||
. This function is suitable for use with <span class="type">GHashTable</span>.
|
||||
<em class="parameter"><code>ref</code></em>
|
||||
must be non-<code class="literal">NULL</code>.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-collection-ref-hash.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody><tr>
|
||||
<td class="parameter_name"><p>ref</p></td>
|
||||
<td class="parameter_description"><p>an <span class="type">OstreeCollectionRef</span>. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/not%20nullable"><span class="acronym">not nullable</span></a>][<a href="http://foldoc.org/type"><span class="acronym">type</span></a> OstreeCollectionRef]</span></td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-collection-ref-hash.returns"></a><h4>Returns</h4>
|
||||
<p> hash value for <em class="parameter"><code>ref</code></em>
|
||||
</p>
|
||||
</div>
|
||||
<p class="since">Since: 2018.6</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-collection-ref-equal"></a><h3>ostree_collection_ref_equal ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||||
ostree_collection_ref_equal (<em class="parameter"><code><span class="type">gconstpointer</span> ref1</code></em>,
|
||||
<em class="parameter"><code><span class="type">gconstpointer</span> ref2</code></em>);</pre>
|
||||
<p>Compare <em class="parameter"><code>ref1</code></em>
|
||||
and <em class="parameter"><code>ref2</code></em>
|
||||
and return <code class="literal">TRUE</code> if they have the same collection ID and
|
||||
ref name, and <code class="literal">FALSE</code> otherwise. Both <em class="parameter"><code>ref1</code></em>
|
||||
and <em class="parameter"><code>ref2</code></em>
|
||||
must be non-<code class="literal">NULL</code>.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-collection-ref-equal.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>ref1</p></td>
|
||||
<td class="parameter_description"><p>an <span class="type">OstreeCollectionRef</span>. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/not%20nullable"><span class="acronym">not nullable</span></a>][<a href="http://foldoc.org/type"><span class="acronym">type</span></a> OstreeCollectionRef]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>ref2</p></td>
|
||||
<td class="parameter_description"><p>another <span class="type">OstreeCollectionRef</span>. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/not%20nullable"><span class="acronym">not nullable</span></a>][<a href="http://foldoc.org/type"><span class="acronym">type</span></a> OstreeCollectionRef]</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-collection-ref-equal.returns"></a><h4>Returns</h4>
|
||||
<p> <code class="literal">TRUE</code> if <em class="parameter"><code>ref1</code></em>
|
||||
and <em class="parameter"><code>ref2</code></em>
|
||||
are equal, <code class="literal">FALSE</code> otherwise</p>
|
||||
</div>
|
||||
<p class="since">Since: 2018.6</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-collection-ref-dupv"></a><h3>ostree_collection_ref_dupv ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">OstreeCollectionRef</span> **
|
||||
ostree_collection_ref_dupv (<em class="parameter"><code>const <span class="type">OstreeCollectionRef</span> *const *refs</code></em>);</pre>
|
||||
<p>Copy an array of <span class="type">OstreeCollectionRefs</span>, including deep copies of all its
|
||||
elements. <em class="parameter"><code>refs</code></em>
|
||||
must be <code class="literal">NULL</code>-terminated; it may be empty, but must not be
|
||||
<code class="literal">NULL</code>.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-collection-ref-dupv.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody><tr>
|
||||
<td class="parameter_name"><p>refs</p></td>
|
||||
<td class="parameter_description"><p><code class="literal">NULL</code>-terminated array of <span class="type">OstreeCollectionRefs</span>. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/array"><span class="acronym">array</span></a> zero-terminated=1]</span></td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-collection-ref-dupv.returns"></a><h4>Returns</h4>
|
||||
<p>a newly allocated copy of <em class="parameter"><code>refs</code></em>
|
||||
. </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>][<a href="http://foldoc.org/array"><span class="acronym">array</span></a> zero-terminated=1]</span></p>
|
||||
</div>
|
||||
<p class="since">Since: 2018.6</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-collection-ref-freev"></a><h3>ostree_collection_ref_freev ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||||
ostree_collection_ref_freev (<em class="parameter"><code><span class="type">OstreeCollectionRef</span> **refs</code></em>);</pre>
|
||||
<p>Free the given array of <em class="parameter"><code>refs</code></em>
|
||||
, including freeing all its elements. <em class="parameter"><code>refs</code></em>
|
||||
|
||||
must be <code class="literal">NULL</code>-terminated; it may be empty, but must not be <code class="literal">NULL</code>.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-collection-ref-freev.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody><tr>
|
||||
<td class="parameter_name"><p>refs</p></td>
|
||||
<td class="parameter_description"><p>an array of <span class="type">OstreeCollectionRefs</span>. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>][<a href="http://foldoc.org/array"><span class="acronym">array</span></a> zero-terminated=1]</span></td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<p class="since">Since: 2018.6</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-ostree-ref.other_details"></a><h2>Types and Values</h2>
|
||||
<div class="refsect2">
|
||||
<a name="OstreeCollectionRefv"></a><h3>OstreeCollectionRefv</h3>
|
||||
<pre class="programlisting">typedef OstreeCollectionRef **OstreeCollectionRefv;
|
||||
</pre>
|
||||
<p>A <code class="literal">NULL</code>-terminated array of <span class="type">OstreeCollectionRef</span> instances, designed to
|
||||
be used with <code class="function">g_auto()</code>:</p>
|
||||
<div class="informalexample">
|
||||
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="listing_lines" align="right"><pre>1</pre></td>
|
||||
<td class="listing_code"><pre class="programlisting"><span class="n">g_auto</span><span class="p">(</span><span class="n">OstreeCollectionRefv</span><span class="p">)</span><span class="w"> </span><span class="n">refs</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span></pre></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<p></p>
|
||||
<p class="since">Since: 2018.6</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<hr>Generated by GTK-Doc V1.34.0</div>
|
||||
</body>
|
||||
</html>
|
230
reference/ostree-ostree-remote.html
Normal file
@ -0,0 +1,230 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>ostree-remote: OSTree API references</title>
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
<link rel="home" href="index.html" title="OSTree API references">
|
||||
<link rel="up" href="reference.html" title="API Reference">
|
||||
<link rel="prev" href="ostree-ostree-ref.html" title="ostree-ref">
|
||||
<link rel="next" href="ostree-ostree-repo-file.html" title="ostree-repo-file">
|
||||
<meta name="generator" content="GTK-Doc V1.34.0 (XML mode)">
|
||||
<link rel="stylesheet" href="style.css" type="text/css">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
|
||||
<td width="100%" align="left" class="shortcuts">
|
||||
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
|
||||
<a href="#ostree-ostree-remote.description" class="shortcut">Description</a></span>
|
||||
</td>
|
||||
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
|
||||
<td><a accesskey="u" href="reference.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
|
||||
<td><a accesskey="p" href="ostree-ostree-ref.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
|
||||
<td><a accesskey="n" href="ostree-ostree-repo-file.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
|
||||
</tr></table>
|
||||
<div class="refentry">
|
||||
<a name="ostree-ostree-remote"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv"><table width="100%"><tr>
|
||||
<td valign="top">
|
||||
<h2><span class="refentrytitle"><a name="ostree-ostree-remote.top_of_page"></a>ostree-remote</span></h2>
|
||||
<p>ostree-remote</p>
|
||||
</td>
|
||||
<td class="gallery_image" valign="top" align="right"></td>
|
||||
</tr></table></div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-ostree-remote.functions"></a><h2>Functions</h2>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="functions_proto_type">
|
||||
<col class="functions_proto_name">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<a class="link" href="ostree-ostree-remote.html#OstreeRemote" title="struct OstreeRemote"><span class="returnvalue">OstreeRemote</span></a> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-remote.html#ostree-remote-ref" title="ostree_remote_ref ()">ostree_remote_ref</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">void</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-remote.html#ostree-remote-unref" title="ostree_remote_unref ()">ostree_remote_unref</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">const <span class="returnvalue">gchar</span> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-remote.html#ostree-remote-get-name" title="ostree_remote_get_name ()">ostree_remote_get_name</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">gchar</span> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-remote.html#ostree-remote-get-url" title="ostree_remote_get_url ()">ostree_remote_get_url</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-ostree-remote.other"></a><h2>Types and Values</h2>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="other_proto_type">
|
||||
<col class="other_proto_name">
|
||||
</colgroup>
|
||||
<tbody><tr>
|
||||
<td class="datatype_keyword">struct</td>
|
||||
<td class="function_name"><a class="link" href="ostree-ostree-remote.html#OstreeRemote" title="struct OstreeRemote">OstreeRemote</a></td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-ostree-remote.description"></a><h2>Description</h2>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-ostree-remote.functions_details"></a><h2>Functions</h2>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-remote-ref"></a><h3>ostree_remote_ref ()</h3>
|
||||
<pre class="programlisting"><a class="link" href="ostree-ostree-remote.html#OstreeRemote" title="struct OstreeRemote"><span class="returnvalue">OstreeRemote</span></a> *
|
||||
ostree_remote_ref (<em class="parameter"><code><a class="link" href="ostree-ostree-remote.html#OstreeRemote" title="struct OstreeRemote"><span class="type">OstreeRemote</span></a> *remote</code></em>);</pre>
|
||||
<p>Increase the reference count on the given <em class="parameter"><code>remote</code></em>
|
||||
.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-remote-ref.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody><tr>
|
||||
<td class="parameter_name"><p>remote</p></td>
|
||||
<td class="parameter_description"><p>an <a class="link" href="ostree-ostree-remote.html#OstreeRemote" title="struct OstreeRemote"><span class="type">OstreeRemote</span></a></p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-remote-ref.returns"></a><h4>Returns</h4>
|
||||
<p>a copy of <em class="parameter"><code>remote</code></em>
|
||||
, for convenience. </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>]</span></p>
|
||||
</div>
|
||||
<p class="since">Since: 2018.6</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-remote-unref"></a><h3>ostree_remote_unref ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||||
ostree_remote_unref (<em class="parameter"><code><a class="link" href="ostree-ostree-remote.html#OstreeRemote" title="struct OstreeRemote"><span class="type">OstreeRemote</span></a> *remote</code></em>);</pre>
|
||||
<p>Decrease the reference count on the given <em class="parameter"><code>remote</code></em>
|
||||
and free it if the
|
||||
reference count reaches 0.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-remote-unref.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody><tr>
|
||||
<td class="parameter_name"><p>remote</p></td>
|
||||
<td class="parameter_description"><p>an <a class="link" href="ostree-ostree-remote.html#OstreeRemote" title="struct OstreeRemote"><span class="type">OstreeRemote</span></a>. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>]</span></td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<p class="since">Since: 2018.6</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-remote-get-name"></a><h3>ostree_remote_get_name ()</h3>
|
||||
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
|
||||
ostree_remote_get_name (<em class="parameter"><code><a class="link" href="ostree-ostree-remote.html#OstreeRemote" title="struct OstreeRemote"><span class="type">OstreeRemote</span></a> *remote</code></em>);</pre>
|
||||
<p>Get the human-readable name of the remote. This is what the user configured,
|
||||
if the remote was explicitly configured; and will otherwise be a stable,
|
||||
arbitrary, string.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-remote-get-name.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody><tr>
|
||||
<td class="parameter_name"><p>remote</p></td>
|
||||
<td class="parameter_description"><p>an <a class="link" href="ostree-ostree-remote.html#OstreeRemote" title="struct OstreeRemote"><span class="type">OstreeRemote</span></a></p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-remote-get-name.returns"></a><h4>Returns</h4>
|
||||
<p> remote’s name</p>
|
||||
</div>
|
||||
<p class="since">Since: 2018.6</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-remote-get-url"></a><h3>ostree_remote_get_url ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">gchar</span> *
|
||||
ostree_remote_get_url (<em class="parameter"><code><a class="link" href="ostree-ostree-remote.html#OstreeRemote" title="struct OstreeRemote"><span class="type">OstreeRemote</span></a> *remote</code></em>);</pre>
|
||||
<p>Get the URL from the remote.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-remote-get-url.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody><tr>
|
||||
<td class="parameter_name"><p>remote</p></td>
|
||||
<td class="parameter_description"><p>an <a class="link" href="ostree-ostree-remote.html#OstreeRemote" title="struct OstreeRemote"><span class="type">OstreeRemote</span></a></p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-remote-get-url.returns"></a><h4>Returns</h4>
|
||||
<p>the remote's URL. </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>][<a href="http://foldoc.org/nullable"><span class="acronym">nullable</span></a>]</span></p>
|
||||
</div>
|
||||
<p class="since">Since: 2018.6</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-ostree-remote.other_details"></a><h2>Types and Values</h2>
|
||||
<div class="refsect2">
|
||||
<a name="OstreeRemote"></a><h3>struct OstreeRemote</h3>
|
||||
<pre class="programlisting">struct OstreeRemote {
|
||||
int ref_count; /* atomic */
|
||||
char *name; /* (not nullable) */
|
||||
char *refspec_name; /* (nullable) */
|
||||
char *group; /* group name in options (not nullable) */
|
||||
char *keyring; /* keyring name ($refspec_name.trustedkeys.gpg) (not nullable) */
|
||||
GFile *file; /* NULL if remote defined in repo/config */
|
||||
GKeyFile *options;
|
||||
};
|
||||
</pre>
|
||||
<p>This represents the configuration for a single remote repository. Currently,
|
||||
remotes can only be passed around as (reference counted) opaque handles. In
|
||||
future, more API may be added to create and interrogate them.</p>
|
||||
<p class="since">Since: 2018.6</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<hr>Generated by GTK-Doc V1.34.0</div>
|
||||
</body>
|
||||
</html>
|
512
reference/ostree-ostree-repo-file.html
Normal file
@ -0,0 +1,512 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>ostree-repo-file: OSTree API references</title>
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
<link rel="home" href="index.html" title="OSTree API references">
|
||||
<link rel="up" href="reference.html" title="API Reference">
|
||||
<link rel="prev" href="ostree-ostree-remote.html" title="ostree-remote">
|
||||
<link rel="next" href="ostree-ostree-repo-finder.html" title="ostree-repo-finder">
|
||||
<meta name="generator" content="GTK-Doc V1.34.0 (XML mode)">
|
||||
<link rel="stylesheet" href="style.css" type="text/css">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
|
||||
<td width="100%" align="left" class="shortcuts">
|
||||
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
|
||||
<a href="#ostree-ostree-repo-file.description" class="shortcut">Description</a></span>
|
||||
</td>
|
||||
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
|
||||
<td><a accesskey="u" href="reference.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
|
||||
<td><a accesskey="p" href="ostree-ostree-remote.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
|
||||
<td><a accesskey="n" href="ostree-ostree-repo-finder.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
|
||||
</tr></table>
|
||||
<div class="refentry">
|
||||
<a name="ostree-ostree-repo-file"></a><div class="titlepage"></div>
|
||||
<div class="refnamediv"><table width="100%"><tr>
|
||||
<td valign="top">
|
||||
<h2><span class="refentrytitle"><a name="ostree-ostree-repo-file.top_of_page"></a>ostree-repo-file</span></h2>
|
||||
<p>ostree-repo-file</p>
|
||||
</td>
|
||||
<td class="gallery_image" valign="top" align="right"></td>
|
||||
</tr></table></div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-ostree-repo-file.functions"></a><h2>Functions</h2>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="functions_proto_type">
|
||||
<col class="functions_proto_name">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">gboolean</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-repo-file.html#ostree-repo-file-ensure-resolved" title="ostree_repo_file_ensure_resolved ()">ostree_repo_file_ensure_resolved</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">gboolean</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-repo-file.html#ostree-repo-file-get-xattrs" title="ostree_repo_file_get_xattrs ()">ostree_repo_file_get_xattrs</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<a class="link" href="ostree-OstreeRepo.html#OstreeRepo" title="OstreeRepo"><span class="returnvalue">OstreeRepo</span></a> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-repo-file.html#ostree-repo-file-get-repo" title="ostree_repo_file_get_repo ()">ostree_repo_file_get_repo</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<a class="link" href="ostree-ostree-repo-file.html#OstreeRepoFile" title="OstreeRepoFile"><span class="returnvalue">OstreeRepoFile</span></a> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-repo-file.html#ostree-repo-file-get-root" title="ostree_repo_file_get_root ()">ostree_repo_file_get_root</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">void</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-repo-file.html#ostree-repo-file-tree-set-metadata" title="ostree_repo_file_tree_set_metadata ()">ostree_repo_file_tree_set_metadata</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">const <span class="returnvalue">char</span> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-repo-file.html#ostree-repo-file-tree-get-contents-checksum" title="ostree_repo_file_tree_get_contents_checksum ()">ostree_repo_file_tree_get_contents_checksum</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">const <span class="returnvalue">char</span> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-repo-file.html#ostree-repo-file-tree-get-metadata-checksum" title="ostree_repo_file_tree_get_metadata_checksum ()">ostree_repo_file_tree_get_metadata_checksum</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">GVariant</span> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-repo-file.html#ostree-repo-file-tree-get-contents" title="ostree_repo_file_tree_get_contents ()">ostree_repo_file_tree_get_contents</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">GVariant</span> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-repo-file.html#ostree-repo-file-tree-get-metadata" title="ostree_repo_file_tree_get_metadata ()">ostree_repo_file_tree_get_metadata</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">const <span class="returnvalue">char</span> *
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-repo-file.html#ostree-repo-file-get-checksum" title="ostree_repo_file_get_checksum ()">ostree_repo_file_get_checksum</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">int</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-repo-file.html#ostree-repo-file-tree-find-child" title="ostree_repo_file_tree_find_child ()">ostree_repo_file_tree_find_child</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="function_type">
|
||||
<span class="returnvalue">gboolean</span>
|
||||
</td>
|
||||
<td class="function_name">
|
||||
<a class="link" href="ostree-ostree-repo-file.html#ostree-repo-file-tree-query-child" title="ostree_repo_file_tree_query_child ()">ostree_repo_file_tree_query_child</a> <span class="c_punctuation">()</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-ostree-repo-file.other"></a><h2>Types and Values</h2>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="other_proto_type">
|
||||
<col class="other_proto_name">
|
||||
</colgroup>
|
||||
<tbody><tr>
|
||||
<td class="typedef_keyword">typedef</td>
|
||||
<td class="function_name"><a class="link" href="ostree-ostree-repo-file.html#OstreeRepoFile" title="OstreeRepoFile">OstreeRepoFile</a></td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-ostree-repo-file.description"></a><h2>Description</h2>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-ostree-repo-file.functions_details"></a><h2>Functions</h2>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-repo-file-ensure-resolved"></a><h3>ostree_repo_file_ensure_resolved ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||||
ostree_repo_file_ensure_resolved (<em class="parameter"><code><a class="link" href="ostree-ostree-repo-file.html#OstreeRepoFile" title="OstreeRepoFile"><span class="type">OstreeRepoFile</span></a> *self</code></em>,
|
||||
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
|
||||
<p>Ensure that the backing metadata is loaded.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-repo-file-ensure-resolved.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>A repo file</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>error</p></td>
|
||||
<td class="parameter_description"><p>Error</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-repo-file-ensure-resolved.returns"></a><h4>Returns</h4>
|
||||
<p> <code class="literal">FALSE</code> if the operation failed, <code class="literal">TRUE</code> otherwise</p>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-repo-file-get-xattrs"></a><h3>ostree_repo_file_get_xattrs ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||||
ostree_repo_file_get_xattrs (<em class="parameter"><code><a class="link" href="ostree-ostree-repo-file.html#OstreeRepoFile" title="OstreeRepoFile"><span class="type">OstreeRepoFile</span></a> *self</code></em>,
|
||||
<em class="parameter"><code><span class="type">GVariant</span> **out_xattrs</code></em>,
|
||||
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
|
||||
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-repo-file-get-xattrs.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p><a class="link" href="ostree-ostree-repo-file.html#OstreeRepoFile" title="OstreeRepoFile"><span class="type">OstreeRepoFile</span></a></p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>out_xattrs</p></td>
|
||||
<td class="parameter_description"><p>the extended attributes. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/out"><span class="acronym">out</span></a>][<a href="http://foldoc.org/optional"><span class="acronym">optional</span></a>]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>cancellable</p></td>
|
||||
<td class="parameter_description"><p>Cancellable</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>error</p></td>
|
||||
<td class="parameter_description"><p>Error</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-repo-file-get-repo"></a><h3>ostree_repo_file_get_repo ()</h3>
|
||||
<pre class="programlisting"><a class="link" href="ostree-OstreeRepo.html#OstreeRepo" title="OstreeRepo"><span class="returnvalue">OstreeRepo</span></a> *
|
||||
ostree_repo_file_get_repo (<em class="parameter"><code><a class="link" href="ostree-ostree-repo-file.html#OstreeRepoFile" title="OstreeRepoFile"><span class="type">OstreeRepoFile</span></a> *self</code></em>);</pre>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-repo-file-get-repo.returns"></a><h4>Returns</h4>
|
||||
<p>Repository. </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20none"><span class="acronym">transfer none</span></a>]</span></p>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-repo-file-get-root"></a><h3>ostree_repo_file_get_root ()</h3>
|
||||
<pre class="programlisting"><a class="link" href="ostree-ostree-repo-file.html#OstreeRepoFile" title="OstreeRepoFile"><span class="returnvalue">OstreeRepoFile</span></a> *
|
||||
ostree_repo_file_get_root (<em class="parameter"><code><a class="link" href="ostree-ostree-repo-file.html#OstreeRepoFile" title="OstreeRepoFile"><span class="type">OstreeRepoFile</span></a> *self</code></em>);</pre>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-repo-file-get-root.returns"></a><h4>Returns</h4>
|
||||
<p>The root directory for the commit referenced by this file. </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20none"><span class="acronym">transfer none</span></a>]</span></p>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-repo-file-tree-set-metadata"></a><h3>ostree_repo_file_tree_set_metadata ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||||
ostree_repo_file_tree_set_metadata (<em class="parameter"><code><a class="link" href="ostree-ostree-repo-file.html#OstreeRepoFile" title="OstreeRepoFile"><span class="type">OstreeRepoFile</span></a> *self</code></em>,
|
||||
<em class="parameter"><code>const <span class="type">char</span> *checksum</code></em>,
|
||||
<em class="parameter"><code><span class="type">GVariant</span> *metadata</code></em>);</pre>
|
||||
<p>Replace the metadata checksum and metadata object.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-repo-file-tree-set-metadata.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody><tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>A repo file</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-repo-file-tree-get-contents-checksum"></a><h3>ostree_repo_file_tree_get_contents_checksum ()</h3>
|
||||
<pre class="programlisting">const <span class="returnvalue">char</span> *
|
||||
ostree_repo_file_tree_get_contents_checksum
|
||||
(<em class="parameter"><code><a class="link" href="ostree-ostree-repo-file.html#OstreeRepoFile" title="OstreeRepoFile"><span class="type">OstreeRepoFile</span></a> *self</code></em>);</pre>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-repo-file-tree-get-contents-checksum.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody><tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>A repo file</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-repo-file-tree-get-contents-checksum.returns"></a><h4>Returns</h4>
|
||||
<p>The SHA256 digest of the content object, or <code class="literal">NULL</code> if this is not a
|
||||
directory. </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/nullable"><span class="acronym">nullable</span></a>]</span></p>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-repo-file-tree-get-metadata-checksum"></a><h3>ostree_repo_file_tree_get_metadata_checksum ()</h3>
|
||||
<pre class="programlisting">const <span class="returnvalue">char</span> *
|
||||
ostree_repo_file_tree_get_metadata_checksum
|
||||
(<em class="parameter"><code><a class="link" href="ostree-ostree-repo-file.html#OstreeRepoFile" title="OstreeRepoFile"><span class="type">OstreeRepoFile</span></a> *self</code></em>);</pre>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-repo-file-tree-get-metadata-checksum.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody><tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>A repo file</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-repo-file-tree-get-metadata-checksum.returns"></a><h4>Returns</h4>
|
||||
<p>The SHA256 digest of the metadata object, or <code class="literal">NULL</code> if this is not a
|
||||
directory. </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/nullable"><span class="acronym">nullable</span></a>]</span></p>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-repo-file-tree-get-contents"></a><h3>ostree_repo_file_tree_get_contents ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">GVariant</span> *
|
||||
ostree_repo_file_tree_get_contents (<em class="parameter"><code><a class="link" href="ostree-ostree-repo-file.html#OstreeRepoFile" title="OstreeRepoFile"><span class="type">OstreeRepoFile</span></a> *self</code></em>);</pre>
|
||||
<p>This API will return <code class="literal">NULL</code> if the file is not "resolved" i.e. in a loaded
|
||||
state. It will also return <code class="literal">NULL</code> if this path is not a directory tree.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-repo-file-tree-get-contents.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody><tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>A repo file</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-repo-file-tree-get-contents.returns"></a><h4>Returns</h4>
|
||||
<p>The GVariant representing the children of this directory. </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/nullable"><span class="acronym">nullable</span></a>]</span></p>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-repo-file-tree-get-metadata"></a><h3>ostree_repo_file_tree_get_metadata ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">GVariant</span> *
|
||||
ostree_repo_file_tree_get_metadata (<em class="parameter"><code><a class="link" href="ostree-ostree-repo-file.html#OstreeRepoFile" title="OstreeRepoFile"><span class="type">OstreeRepoFile</span></a> *self</code></em>);</pre>
|
||||
<p>This API will return <code class="literal">NULL</code> if the file is not "resolved" i.e. in a loaded
|
||||
state. It will also return <code class="literal">NULL</code> if this path is not a directory tree.</p>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-repo-file-tree-get-metadata.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody><tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p>A repo file</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-repo-file-tree-get-metadata.returns"></a><h4>Returns</h4>
|
||||
<p>The GVariant representing the metadata for this directory. </p>
|
||||
<p><span class="annotation">[<a href="http://foldoc.org/nullable"><span class="acronym">nullable</span></a>]</span></p>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-repo-file-get-checksum"></a><h3>ostree_repo_file_get_checksum ()</h3>
|
||||
<pre class="programlisting">const <span class="returnvalue">char</span> *
|
||||
ostree_repo_file_get_checksum (<em class="parameter"><code><a class="link" href="ostree-ostree-repo-file.html#OstreeRepoFile" title="OstreeRepoFile"><span class="type">OstreeRepoFile</span></a> *self</code></em>);</pre>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-repo-file-tree-find-child"></a><h3>ostree_repo_file_tree_find_child ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">int</span>
|
||||
ostree_repo_file_tree_find_child (<em class="parameter"><code><a class="link" href="ostree-ostree-repo-file.html#OstreeRepoFile" title="OstreeRepoFile"><span class="type">OstreeRepoFile</span></a> *self</code></em>,
|
||||
<em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
|
||||
<em class="parameter"><code><span class="type">gboolean</span> *is_dir</code></em>,
|
||||
<em class="parameter"><code><span class="type">GVariant</span> **out_container</code></em>);</pre>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-repo-file-tree-find-child.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p><a class="link" href="ostree-ostree-repo-file.html#OstreeRepoFile" title="OstreeRepoFile"><span class="type">OstreeRepoFile</span></a></p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>name</p></td>
|
||||
<td class="parameter_description"><p>name of the child</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>is_dir</p></td>
|
||||
<td class="parameter_description"><p>. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/out%20caller-allocates"><span class="acronym">out caller-allocates</span></a>]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>out_container</p></td>
|
||||
<td class="parameter_description"><p>. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/out"><span class="acronym">out</span></a>]</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="ostree-repo-file-tree-query-child"></a><h3>ostree_repo_file_tree_query_child ()</h3>
|
||||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||||
ostree_repo_file_tree_query_child (<em class="parameter"><code><a class="link" href="ostree-ostree-repo-file.html#OstreeRepoFile" title="OstreeRepoFile"><span class="type">OstreeRepoFile</span></a> *self</code></em>,
|
||||
<em class="parameter"><code><span class="type">int</span> n</code></em>,
|
||||
<em class="parameter"><code>const <span class="type">char</span> *attributes</code></em>,
|
||||
<em class="parameter"><code><span class="type">GFileQueryInfoFlags</span> flags</code></em>,
|
||||
<em class="parameter"><code><span class="type">GFileInfo</span> **out_info</code></em>,
|
||||
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
|
||||
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-repo-file-tree-query-child.parameters"></a><h4>Parameters</h4>
|
||||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||||
<colgroup>
|
||||
<col width="150px" class="parameters_name">
|
||||
<col class="parameters_description">
|
||||
<col width="200px" class="parameters_annotations">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>self</p></td>
|
||||
<td class="parameter_description"><p><a class="link" href="ostree-ostree-repo-file.html#OstreeRepoFile" title="OstreeRepoFile"><span class="type">OstreeRepoFile</span></a></p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>n</p></td>
|
||||
<td class="parameter_description"><p>the child number</p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>attributes</p></td>
|
||||
<td class="parameter_description"><p>an attribute string to match, see <code class="function">g_file_attribute_matcher_new()</code></p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>flags</p></td>
|
||||
<td class="parameter_description"><p>a <span class="type">GFileQueryInfoFlags</span></p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>out_info</p></td>
|
||||
<td class="parameter_description"><p>the <span class="type">GFileInfo</span> of the child. </p></td>
|
||||
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/out"><span class="acronym">out</span></a>][<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>][<a href="http://foldoc.org/optional"><span class="acronym">optional</span></a>]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>cancellable</p></td>
|
||||
<td class="parameter_description"><p>a <span class="type">GCancellable</span> or <code class="literal">NULL</code></p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="parameter_name"><p>error</p></td>
|
||||
<td class="parameter_description"><p>a <span class="type">GError</span> or <code class="literal">NULL</code></p></td>
|
||||
<td class="parameter_annotations"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="ostree-repo-file-tree-query-child.returns"></a><h4>Returns</h4>
|
||||
<p> <code class="literal">TRUE</code> on success and the <em class="parameter"><code>out_info</code></em>
|
||||
is set, <code class="literal">FALSE</code> otherwise.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="ostree-ostree-repo-file.other_details"></a><h2>Types and Values</h2>
|
||||
<div class="refsect2">
|
||||
<a name="OstreeRepoFile"></a><h3>OstreeRepoFile</h3>
|
||||
<pre class="programlisting">typedef struct OstreeRepoFile OstreeRepoFile;
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<hr>Generated by GTK-Doc V1.34.0</div>
|
||||
</body>
|
||||
</html>
|