Commit f037cf36 authored by Ritesh Raj Sarraf's avatar Ritesh Raj Sarraf

Import Upstream version 2018.9.1

parent 119b14e2
......@@ -39,7 +39,10 @@ endif
if BUILDOPT_SYSTEMD
systemdsystemunit_DATA = src/boot/ostree-prepare-root.service \
src/boot/ostree-remount.service src/boot/ostree-finalize-staged.service
src/boot/ostree-remount.service \
src/boot/ostree-finalize-staged.service \
src/boot/ostree-finalize-staged.path \
$(NULL)
systemdtmpfilesdir = $(prefix)/lib/tmpfiles.d
dist_systemdtmpfiles_DATA = src/boot/ostree-tmpfiles.conf
......@@ -64,6 +67,7 @@ EXTRA_DIST += src/boot/dracut/module-setup.sh \
src/boot/dracut/ostree.conf \
src/boot/mkinitcpio/ostree \
src/boot/ostree-prepare-root.service \
src/boot/ostree-finalize-staged.path \
src/boot/ostree-remount.service \
src/boot/ostree-finalize-staged.service \
src/boot/grub2/grub2-15_ostree \
......
......@@ -2075,6 +2075,7 @@ EXTRA_DIST = $(all_dist_test_scripts) $(all_dist_test_data) autogen.sh \
src/boot/dracut/module-setup.sh src/boot/dracut/ostree.conf \
src/boot/mkinitcpio/ostree \
src/boot/ostree-prepare-root.service \
src/boot/ostree-finalize-staged.path \
src/boot/ostree-remount.service \
src/boot/ostree-finalize-staged.service \
src/boot/grub2/grub2-15_ostree \
......@@ -2764,7 +2765,10 @@ tests_test_gpg_verify_result_LDADD = $(TESTS_LDADD) $(OT_INTERNAL_GPGME_LIBS)
@BUILDOPT_MKINITCPIO_TRUE@mkinitcpioconfdir = $(sysconfdir)
@BUILDOPT_MKINITCPIO_TRUE@mkinitcpioconf_DATA = src/boot/mkinitcpio/ostree-mkinitcpio.conf
@BUILDOPT_SYSTEMD_TRUE@systemdsystemunit_DATA = src/boot/ostree-prepare-root.service \
@BUILDOPT_SYSTEMD_TRUE@ src/boot/ostree-remount.service src/boot/ostree-finalize-staged.service
@BUILDOPT_SYSTEMD_TRUE@ src/boot/ostree-remount.service \
@BUILDOPT_SYSTEMD_TRUE@ src/boot/ostree-finalize-staged.service \
@BUILDOPT_SYSTEMD_TRUE@ src/boot/ostree-finalize-staged.path \
@BUILDOPT_SYSTEMD_TRUE@ $(NULL)
@BUILDOPT_SYSTEMD_TRUE@systemdtmpfilesdir = $(prefix)/lib/tmpfiles.d
@BUILDOPT_SYSTEMD_TRUE@dist_systemdtmpfiles_DATA = src/boot/ostree-tmpfiles.conf
......
......@@ -74,6 +74,22 @@ The [BuildStream](https://gitlab.com/BuildStream/buildstream) build and
integration tool uses libostree as a caching system to store and share
built artifacts.
Language bindings
----
libostree is accessible via [GObject Introspection](https://gi.readthedocs.io/en/latest/);
any language which has implemented the GI binding model should work.
For example, Both [pygobject](https://pygobject.readthedocs.io/en/latest/)
and [gjs](https://gitlab.gnome.org/GNOME/gjs) are known to work
and further are actually used in libostree's test suite today.
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:
- [ostree-go](https://github.com/ostreedev/ostree-go/)
- [rust-libostree](https://gitlab.com/fkrull/rust-libostree/)
Building
--------
......
......@@ -2420,17 +2420,17 @@ ostree_check_version (<em class="parameter"><code><span class="type">guint</span
<a name="OSTREE-MAX-METADATA-SIZE:CAPS"></a><h3>OSTREE_MAX_METADATA_SIZE</h3>
<pre class="programlisting">#define OSTREE_MAX_METADATA_SIZE (10 * 1024 * 1024)
</pre>
<p>Maximum permitted size in bytes of metadata objects. This is an
arbitrary number, but really, no one should be putting humongous
data in metadata.</p>
<p>Default limit for maximum permitted size in bytes of metadata objects fetched
over HTTP (including repo/config files, refs, and commit/dirtree/dirmeta
objects). This is an arbitrary number intended to mitigate disk space
exhaustion attacks.</p>
</div>
<hr>
<div class="refsect2">
<a name="OSTREE-MAX-METADATA-WARN-SIZE:CAPS"></a><h3>OSTREE_MAX_METADATA_WARN_SIZE</h3>
<pre class="programlisting">#define OSTREE_MAX_METADATA_WARN_SIZE (7 * 1024 * 1024)
</pre>
<p>Objects committed above this size will be allowed, but a warning
will be emitted.</p>
<p>This variable is no longer meaningful, it is kept only for compatibility.</p>
</div>
<hr>
<div class="refsect2">
......
......@@ -106,6 +106,14 @@
<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>
......@@ -307,6 +315,52 @@ ostree_mutable_tree_replace_file (<em class="parameter"><code><a class="link" hr
</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>
</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>,
......
......@@ -153,6 +153,14 @@
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-OstreeRepo.html#ostree-repo-get-min-free-space-bytes" title="ostree_repo_get_min_free_space_bytes ()">ostree_repo_get_min_free_space_bytes</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GKeyFile</span> *
</td>
<td class="function_name">
......@@ -168,6 +176,13 @@
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">gchar</span> * const *
</td>
<td class="function_name">
<a class="link" href="ostree-OstreeRepo.html#ostree-repo-get-default-repo-finders" title="ostree_repo_get_default_repo_finders ()">ostree_repo_get_default_repo_finders</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">guint</span>
</td>
......@@ -1209,16 +1224,18 @@
<a name="ostree-OstreeRepo.description"></a><h2>Description</h2>
<p>The <a class="link" href="ostree-OstreeRepo.html#OstreeRepo" title="OstreeRepo"><span class="type">OstreeRepo</span></a> is like git, a content-addressed object store.
Unlike git, it records uid, gid, and extended attributes.</p>
<p>There are three possible "modes" for an <a class="link" href="ostree-OstreeRepo.html#OstreeRepo" title="OstreeRepo"><span class="type">OstreeRepo</span></a>;
<a class="link" href="ostree-OstreeRepo.html#OSTREE-REPO-MODE-BARE:CAPS"><code class="literal">OSTREE_REPO_MODE_BARE</code></a> is very simple - content files are
represented exactly as they are, and checkouts are just hardlinks.
<a class="link" href="ostree-OstreeRepo.html#OSTREE-REPO-MODE-BARE-USER:CAPS"><code class="literal">OSTREE_REPO_MODE_BARE_USER</code></a> is similar, except the uid/gids are not
set on the files, and checkouts as hardlinks hardlinks work only for user checkouts.
A <a class="link" href="ostree-OstreeRepo.html#OSTREE-REPO-MODE-ARCHIVE-Z2:CAPS"><code class="literal">OSTREE_REPO_MODE_ARCHIVE_Z2</code></a> repository in contrast stores
content files zlib-compressed. It is suitable for non-root-owned
<p>There are four possible "modes" for an <a class="link" href="ostree-OstreeRepo.html#OstreeRepo" title="OstreeRepo"><span class="type">OstreeRepo</span></a>; <a class="link" href="ostree-OstreeRepo.html#OSTREE-REPO-MODE-BARE:CAPS"><code class="literal">OSTREE_REPO_MODE_BARE</code></a>
is very simple - content files are represented exactly as they are, and
checkouts are just hardlinks. <a class="link" href="ostree-OstreeRepo.html#OSTREE-REPO-MODE-BARE-USER:CAPS"><code class="literal">OSTREE_REPO_MODE_BARE_USER</code></a> is similar, except
the uid/gids are not set on the files, and checkouts as hardlinks work only
for user checkouts. <a class="link" href="ostree-OstreeRepo.html#OSTREE-REPO-MODE-BARE-USER-ONLY:CAPS"><code class="literal">OSTREE_REPO_MODE_BARE_USER_ONLY</code></a> is the same as
BARE_USER, but all metadata is not stored, so it can only be used for user
checkouts. This mode does not require xattrs. A <a class="link" href="ostree-OstreeRepo.html#OSTREE-REPO-MODE-ARCHIVE:CAPS"><code class="literal">OSTREE_REPO_MODE_ARCHIVE</code></a>
(also known as <a class="link" href="ostree-OstreeRepo.html#OSTREE-REPO-MODE-ARCHIVE-Z2:CAPS"><code class="literal">OSTREE_REPO_MODE_ARCHIVE_Z2</code></a>) repository in contrast stores
content files zlib-compressed. It is suitable for non-root-owned
repositories that can be served via a static HTTP server.</p>
<p>Creating an <a class="link" href="ostree-OstreeRepo.html#OstreeRepo" title="OstreeRepo"><span class="type">OstreeRepo</span></a> does not invoke any file I/O, and thus needs
to be initialized, either from an existing contents or with a new
to be initialized, either from existing contents or as a new
repository. If you have an existing repo, use <a class="link" href="ostree-OstreeRepo.html#ostree-repo-open" title="ostree_repo_open ()"><code class="function">ostree_repo_open()</code></a>
to load it from disk and check its validity. To initialize a new
repository in the given filepath, use <a class="link" href="ostree-OstreeRepo.html#ostree-repo-create" title="ostree_repo_create ()"><code class="function">ostree_repo_create()</code></a> instead.</p>
......@@ -1664,6 +1681,14 @@ ostree_repo_get_mode (<em class="parameter"><code><a class="link" href="ostree-O
</div>
<hr>
<div class="refsect2">
<a name="ostree-repo-get-min-free-space-bytes"></a><h3>ostree_repo_get_min_free_space_bytes ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_repo_get_min_free_space_bytes (<em class="parameter"><code><a class="link" href="ostree-OstreeRepo.html#OstreeRepo" title="OstreeRepo"><span class="type">OstreeRepo</span></a> *self</code></em>,
<em class="parameter"><code><span class="type">guint64</span> *out_reserved_bytes</code></em>,
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="ostree-repo-get-config"></a><h3>ostree_repo_get_config ()</h3>
<pre class="programlisting"><span class="returnvalue">GKeyFile</span> *
ostree_repo_get_config (<em class="parameter"><code><a class="link" href="ostree-OstreeRepo.html#OstreeRepo" title="OstreeRepo"><span class="type">OstreeRepo</span></a> *self</code></em>);</pre>
......@@ -1705,6 +1730,35 @@ repository (to see whether a ref was written).</p>
</div>
<hr>
<div class="refsect2">
<a name="ostree-repo-get-default-repo-finders"></a><h3>ostree_repo_get_default_repo_finders ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> * const *
ostree_repo_get_default_repo_finders (<em class="parameter"><code><a class="link" href="ostree-OstreeRepo.html#OstreeRepo" title="OstreeRepo"><span class="type">OstreeRepo</span></a> *self</code></em>);</pre>
<p>Get the set of default repo finders configured. See the documentation for
the "core.default-repo-finders" config key.</p>
<div class="refsect3">
<a name="ostree-repo-get-default-repo-finders.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-OstreeRepo.html#OstreeRepo" title="OstreeRepo"><span class="type">OstreeRepo</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="ostree-repo-get-default-repo-finders.returns"></a><h4>Returns</h4>
<p><code class="literal">NULL</code>-terminated array of strings. </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/element-type"><span class="acronym">element-type</span></a> utf8]</span></p>
</div>
<p class="since">Since: 2018.9</p>
</div>
<hr>
<div class="refsect2">
<a name="ostree-repo-hash"></a><h3>ostree_repo_hash ()</h3>
<pre class="programlisting"><span class="returnvalue">guint</span>
ostree_repo_hash (<em class="parameter"><code><a class="link" href="ostree-OstreeRepo.html#OstreeRepo" title="OstreeRepo"><span class="type">OstreeRepo</span></a> *self</code></em>);</pre>
......@@ -7111,6 +7165,7 @@ string to pull the latest commit for that ref</p></li>
<li class="listitem"><p>require-static-deltas (b): Require static deltas</p></li>
<li class="listitem"><p>override-commit-ids (as): Array of specific commit IDs to fetch for refs</p></li>
<li class="listitem"><p>timestamp-check (b): Verify commit timestamps are newer than current (when pulling via ref); Since: 2017.11</p></li>
<li class="listitem"><p>metadata-size-restriction (t): Restrict metadata objects to a maximum number of bytes; 0 to disable. Since: 2018.9</p></li>
<li class="listitem"><p>dry-run (b): Only print information on what will be downloaded (requires static deltas)</p></li>
<li class="listitem"><p>override-url (s): Fetch objects from this URL if remote specifies no metalink in options</p></li>
<li class="listitem"><p>inherit-transaction (b): Don't initiate, finish or abort a transaction, useful to do multiple pulls in one transaction.</p></li>
......@@ -8127,7 +8182,8 @@ by <a class="link" href="ostree-OstreeRepo.html#ostree-repo-load-commit" title="
gboolean no_copy_fallback;
gboolean force_copy; /* Since: 2017.6 */
gboolean bareuseronly_dirs; /* Since: 2017.7 */
gboolean unused_bools[5];
gboolean force_copy_zerosized; /* Since: 2018.9 */
gboolean unused_bools[4];
/* 4 byte hole on 64 bit */
const char *subpath;
......
......@@ -98,8 +98,10 @@
<keyword type="function" name="ostree_repo_create ()" link="ostree-OstreeRepo.html#ostree-repo-create"/>
<keyword type="function" name="ostree_repo_get_path ()" link="ostree-OstreeRepo.html#ostree-repo-get-path"/>
<keyword type="function" name="ostree_repo_get_mode ()" link="ostree-OstreeRepo.html#ostree-repo-get-mode"/>
<keyword type="function" name="ostree_repo_get_min_free_space_bytes ()" link="ostree-OstreeRepo.html#ostree-repo-get-min-free-space-bytes"/>
<keyword type="function" name="ostree_repo_get_config ()" link="ostree-OstreeRepo.html#ostree-repo-get-config"/>
<keyword type="function" name="ostree_repo_get_dfd ()" link="ostree-OstreeRepo.html#ostree-repo-get-dfd"/>
<keyword type="function" name="ostree_repo_get_default_repo_finders ()" link="ostree-OstreeRepo.html#ostree-repo-get-default-repo-finders" since="2018.9"/>
<keyword type="function" name="ostree_repo_hash ()" link="ostree-OstreeRepo.html#ostree-repo-hash" since="2017.12"/>
<keyword type="function" name="ostree_repo_equal ()" link="ostree-OstreeRepo.html#ostree-repo-equal" since="2017.12"/>
<keyword type="function" name="ostree_repo_copy_config ()" link="ostree-OstreeRepo.html#ostree-repo-copy-config"/>
......@@ -246,6 +248,7 @@
<keyword type="function" name="ostree_mutable_tree_set_contents_checksum ()" link="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-set-contents-checksum"/>
<keyword type="function" name="ostree_mutable_tree_get_contents_checksum ()" link="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-get-contents-checksum"/>
<keyword type="function" name="ostree_mutable_tree_replace_file ()" link="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-replace-file"/>
<keyword type="function" name="ostree_mutable_tree_remove ()" link="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-remove"/>
<keyword type="function" name="ostree_mutable_tree_ensure_dir ()" link="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-ensure-dir"/>
<keyword type="function" name="ostree_mutable_tree_lookup ()" link="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-lookup"/>
<keyword type="function" name="ostree_mutable_tree_ensure_parent_dirs ()" link="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-ensure-parent-dirs"/>
......
......@@ -539,6 +539,10 @@ ostree_collection_ref_new, function in ostree-ref
</dt>
<dd></dd>
<dt>
OSTREE_META_KEY_DEPLOY_COLLECTION_ID, macro in ostree-repo-experimental
</dt>
<dd></dd>
<dt>
<a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree">OstreeMutableTree</a>, typedef in <a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html" title="In-memory modifiable filesystem tree">In-memory modifiable filesystem tree</a>
</dt>
<dd></dd>
......@@ -587,6 +591,10 @@ ostree_collection_ref_new, function in ostree-ref
</dt>
<dd></dd>
<dt>
<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>, function in <a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html" title="In-memory modifiable filesystem tree">In-memory modifiable filesystem tree</a>
</dt>
<dd></dd>
<dt>
<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>, function in <a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html" title="In-memory modifiable filesystem tree">In-memory modifiable filesystem tree</a>
</dt>
<dd></dd>
......@@ -1022,6 +1030,10 @@ ostree_repo_get_collection_id, function in ostree-misc-experimental
</dt>
<dd></dd>
<dt>
<a class="link" href="ostree-OstreeRepo.html#ostree-repo-get-default-repo-finders" title="ostree_repo_get_default_repo_finders ()">ostree_repo_get_default_repo_finders</a>, function in <a class="link" href="ostree-OstreeRepo.html" title="OstreeRepo: Content-addressed object store">OstreeRepo</a>
</dt>
<dd></dd>
<dt>
<a class="link" href="ostree-OstreeRepo.html#ostree-repo-get-dfd" title="ostree_repo_get_dfd ()">ostree_repo_get_dfd</a>, function in <a class="link" href="ostree-OstreeRepo.html" title="OstreeRepo: Content-addressed object store">OstreeRepo</a>
</dt>
<dd></dd>
......@@ -1030,6 +1042,10 @@ ostree_repo_get_collection_id, function in ostree-misc-experimental
</dt>
<dd></dd>
<dt>
<a class="link" href="ostree-OstreeRepo.html#ostree-repo-get-min-free-space-bytes" title="ostree_repo_get_min_free_space_bytes ()">ostree_repo_get_min_free_space_bytes</a>, function in <a class="link" href="ostree-OstreeRepo.html" title="OstreeRepo: Content-addressed object store">OstreeRepo</a>
</dt>
<dd></dd>
<dt>
<a class="link" href="ostree-OstreeRepo.html#ostree-repo-get-mode" title="ostree_repo_get_mode ()">ostree_repo_get_mode</a>, function in <a class="link" href="ostree-OstreeRepo.html" title="OstreeRepo: Content-addressed object store">OstreeRepo</a>
</dt>
<dd></dd>
......
......@@ -257,6 +257,7 @@ ostree_mutable_tree_get_metadata_checksum
ostree_mutable_tree_set_contents_checksum
ostree_mutable_tree_get_contents_checksum
ostree_mutable_tree_replace_file
ostree_mutable_tree_remove
ostree_mutable_tree_ensure_dir
ostree_mutable_tree_lookup
ostree_mutable_tree_ensure_parent_dirs
......@@ -294,8 +295,10 @@ ostree_repo_create_at
ostree_repo_create
ostree_repo_get_path
ostree_repo_get_mode
ostree_repo_get_min_free_space_bytes
ostree_repo_get_config
ostree_repo_get_dfd
ostree_repo_get_default_repo_finders
ostree_repo_hash
ostree_repo_equal
ostree_repo_copy_config
......@@ -596,6 +599,7 @@ ostree_repo_pull_from_remotes_async
ostree_repo_pull_from_remotes_finish
ostree_repo_resolve_keyring_for_collection
OSTREE_REPO_METADATA_REF
OSTREE_META_KEY_DEPLOY_COLLECTION_ID
</SECTION>
<SECTION>
......
......@@ -24,12 +24,6 @@
# - Structured option arguments (e.g. --foo KEY=VALUE) are not parsed.
#
# - Static deltas could likely be completed. (e.g. ostree static-delta delete [TAB])
#
# - The "--repo PATH" option needs to come after the subcommand or it
# won't be picked up for completion of subsequent options.
# i.e. ostree commit --repo PATH ... <-- works
# ostree --repo PATH commit ... <-- does not work
# (Possibly an easy fix.)
# Finds the position of the first non-flag word.
......@@ -183,9 +177,16 @@ __ostree_subcommands() {
# This handles "ostree [TAB]" (without a subcommand).
_ostree_ostree() {
case "$prev" in
--repo)
__ostree_compreply_dirs_only
return 0
;;
esac
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "$main_boolean_options" -- "$cur" ) )
COMPREPLY=( $( compgen -W "$main_options" -- "$cur" ) )
;;
*)
COMPREPLY=( $( compgen -W "$commands" -- "$cur" ) )
......@@ -1753,6 +1754,14 @@ _ostree() {
--verbose -v
--version
"
local main_options_with_args="
--repo
"
local main_options_with_args_glob=$( __ostree_to_extglob "$main_options_with_args" )
local main_options="
$main_boolean_options
$main_options_with_args
"
COMPREPLY=()
local cur prev words cword
......
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for libostree 2018.8.
# Generated by GNU Autoconf 2.69 for libostree 2018.9.
#
# Report bugs to <walters@verbum.org>.
#
......@@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='libostree'
PACKAGE_TARNAME='libostree'
PACKAGE_VERSION='2018.8'
PACKAGE_STRING='libostree 2018.8'
PACKAGE_VERSION='2018.9'
PACKAGE_STRING='libostree 2018.9'
PACKAGE_BUGREPORT='walters@verbum.org'
PACKAGE_URL=''
......@@ -1547,7 +1547,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures libostree 2018.8 to adapt to many kinds of systems.
\`configure' configures libostree 2018.9 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
......@@ -1617,7 +1617,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of libostree 2018.8:";;
short | recursive ) echo "Configuration of libostree 2018.9:";;
esac
cat <<\_ACEOF
......@@ -1864,7 +1864,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
libostree configure 2018.8
libostree configure 2018.9
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
......@@ -2336,7 +2336,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by libostree $as_me 2018.8, which was
It was created by libostree $as_me 2018.9, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
......@@ -3204,7 +3204,7 @@ fi
# Define the identity of the package.
PACKAGE='libostree'
VERSION='2018.8'
VERSION='2018.9'
# Some tools Automake needs.
......@@ -5938,9 +5938,9 @@ test -n "$YACC" || YACC="yacc"
YEAR_VERSION=2018
RELEASE_VERSION=8
RELEASE_VERSION=9
PACKAGE_VERSION=2018.8
PACKAGE_VERSION=2018.9
if echo "$CFLAGS" | grep -q -E -e '-Werror($| )'; then :
......@@ -18623,7 +18623,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by libostree $as_me 2018.8, which was
This file was extended by libostree $as_me 2018.9, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
......@@ -18689,7 +18689,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
libostree config.status 2018.8
libostree config.status 2018.9
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
......
......@@ -4,7 +4,7 @@ dnl update libostree-released.sym from libostree-devel.sym, and update the check
dnl in test-symbols.sh, and also set is_release_build=yes below. Then make
dnl another post-release commit to bump the version, and set is_release_build=no.
m4_define([year_version], [2018])
m4_define([release_version], [8])
m4_define([release_version], [9])
m4_define([package_version], [year_version.release_version])
AC_INIT([libostree], [package_version], [walters@verbum.org])
is_release_build=yes
......
......@@ -83,11 +83,6 @@ Boston, MA 02111-1307, USA.
USB mounts use signed per-repo and per-commit metadata instead of
summary signatures.
</para>
<para>
This command relies on the summary file in the source repo, so you
may want to run <command>ostree summary -u</command> before running
this command.
</para>
</refsect1>
<refsect1>
......@@ -112,6 +107,15 @@ Boston, MA 02111-1307, USA.
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>--commit</option>=COMMIT</term>
<listitem><para>
Pull COMMIT instead of whatever REF points to. This can only
be used if a single ref is specified.
</para></listitem>
</varlistentry>
</variablelist>
</refsect1>
......
......@@ -198,6 +198,38 @@ Boston, MA 02111-1307, USA.
</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>locking</varname></term>
<listitem><para>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.
</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>lock-timeout-secs</varname></term>
<listitem><para>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 30.
</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>default-repo-finders</varname></term>
<listitem><para>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:
<literal>config</literal>, <literal>lan</literal>, and
<literal>mount</literal> (or any combination thereof). If unset, this
defaults to <literal>config;mount;</literal> (since the LAN finder is
costly).
</para></listitem>
</varlistentry>
</variablelist>
</refsect1>
......
......@@ -36,7 +36,7 @@ depends() {
install() {
dracut_install /usr/lib/ostree/ostree-prepare-root
inst_simple "${systemdsystemunitdir}/ostree-prepare-root.service"
mkdir -p "${initdir}${systemdsystemconfdir}/initrd-switch-root.target.wants"
mkdir -p "${initdir}${systemdsystemconfdir}/initrd-root-fs.target.wants"
ln_r "${systemdsystemunitdir}/ostree-prepare-root.service" \
"${systemdsystemconfdir}/initrd-switch-root.target.wants/ostree-prepare-root.service"
"${systemdsystemconfdir}/initrd-root-fs.target.wants/ostree-prepare-root.service"
}
# Copyright (C) 2018 Red Hat, Inc.
#
# This library 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 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
# For some implementation discussion, see:
# https://lists.freedesktop.org/archives/systemd-devel/2018-March/040557.html
[Unit]
Description=OSTree Monitor Staged Deployment
Documentation=man:ostree(1)
[Path]
PathExists=/run/ostree/staged-deployment
[Install]
WantedBy=multi-user.target
......@@ -19,6 +19,7 @@
# https://lists.freedesktop.org/archives/systemd-devel/2018-March/040557.html
[Unit]
Description=OSTree Finalize Staged Deployment
Documentation=man:ostree(1)
ConditionPathExists=/run/ostree-booted
DefaultDependencies=no
......@@ -31,6 +32,7 @@ Conflicts=final.target
Type=oneshot
RemainAfterExit=yes
ExecStop=/usr/bin/ostree admin finalize-staged
[Install]
WantedBy=multi-user.target
# This is a quite long timeout intentionally; the failure mode
# here is that people don't get an upgrade. We need to handle
# cases with slow rotational media, etc.
TimeoutStopSec=5m
......@@ -17,13 +17,13 @@
[Unit]
Description=OSTree Prepare OS/
Documentation=man:ostree(1)
DefaultDependencies=no
ConditionKernelCommandLine=ostree
ConditionPathExists=/etc/initrd-release
OnFailure=emergency.target
After=initrd-switch-root.target
Before=initrd-switch-root.service
Before=plymouth-switch-root.service
After=sysroot.mount
Before=initrd-root-fs.target
[Service]
Type=oneshot
......@@ -31,3 +31,4 @@ ExecStart=/usr/lib/ostree/ostree-prepare-root /sysroot
StandardInput=null
StandardOutput=syslog
StandardError=syslog+console
RemainAfterExit=yes
......@@ -16,7 +16,8 @@
# Boston, MA 02111-1307, USA.
[Unit]
Description=OSTree Remount OS/ bind mounts
Description=OSTree Remount OS/ Bind Mounts
Documentation=man:ostree(1)
DefaultDependencies=no
ConditionKernelCommandLine=ostree
OnFailure=emergency.target
......
......@@ -18,8 +18,6 @@
***/
/* Add new symbols here. Release commits should copy this section into -released.sym. */
LIBOSTREE_2018.9 {
} LIBOSTREE_2018.7;
/* Stub section for the stable release *after* this development one; don't
* edit this other than to update the last number. This is just a copy/paste
......
......@@ -536,6 +536,12 @@ global:
/* No new symbols in 2018.8 */
LIBOSTREE_2018.9 {
ostree_mutable_tree_remove;
ostree_repo_get_min_free_space_bytes;
ostree_repo_get_default_repo_finders;
} LIBOSTREE_2018.7;
/* NOTE: Only add more content here in release commits! See the
* comments at the top of this file.
*/
......@@ -228,7 +228,7 @@ idle_invoke_async_progress (gpointer user_data)
OstreeAsyncProgress *self = user_data;
g_mutex_lock (&self->lock);
self->idle_source = NULL;
g_clear_pointer (&self->idle_source, g_source_unref);
g_mutex_unlock (&self->lock);
g_signal_emit (self, signals[CHANGED], 0);
......
......@@ -57,7 +57,8 @@ struct _OstreeBootloaderGrub2
GObject parent_instance;
OstreeSysroot *sysroot;
GFile *config_path_bios;
GFile *config_path_bios_1;
GFile *config_path_bios_2;
GFile *config_path_efi;
gboolean is_efi;
};
......@@ -77,7 +78,8 @@ _ostree_bootloader_grub2_query (OstreeBootloader *bootloader,
OstreeBootloaderGrub2 *self = OSTREE_BOOTLOADER_GRUB2 (bootloader);
/* Look for the BIOS path first */
if (g_file_query_exists (self->config_path_bios, NULL))
if (g_file_query_exists (self->config_path_bios_1, NULL) ||
g_file_query_exists (self->config_path_bios_2, NULL))