A %NULL-terminated array of #OstreeCollectionRef instances, designed to be used with g_auto(): |[<!-- language="C" --> g_auto(OstreeCollectionRefv) refs = NULL; ]| A %NULL-terminated array of #OstreeRepoFinderResult instances, designed to be used with g_auto(): |[<!-- language="C" --> g_auto(OstreeRepoFinderResultv) results = NULL; ]| A new progress object 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. Self Get the values corresponding to zero or more keys from the #OstreeAsyncProgress. Each key is specified in @... as the key name, followed by a #GVariant format string, followed by the necessary arguments for that format string, just as for g_variant_get(). After those arguments is the next key name. The varargs list must be %NULL-terminated. Each format string must make deep copies of its value, as the values stored in the #OstreeAsyncProgress may be freed from another thread after this function returns. This operation is thread-safe, and all the keys are queried atomically. |[<!-- language="C" --> guint32 outstanding_fetches; guint64 bytes_received; g_autofree gchar *status = NULL; g_autoptr(GVariant) refs_variant = NULL; ostree_async_progress_get (progress, "outstanding-fetches", "u", &outstanding_fetches, "bytes-received", "t", &bytes_received, "status", "s", &status, "refs", "@a{ss}", &refs_variant, NULL); ]| an #OstreeAsyncProgress key name, format string, #GVariant return locations, …, followed by %NULL Get the human-readable status string from the #OstreeAsyncProgress. This operation is thread-safe. The retuned value may be %NULL if no status is set. This is a convenience function to get the well-known `status` key. the current status, or %NULL if none is set an #OstreeAsyncProgress Look up a key in the #OstreeAsyncProgress and return the #GVariant associated with it. The lookup is thread-safe. value for the given @key, or %NULL if it was not set an #OstreeAsyncProgress a key to look up Set the values for zero or more keys in the #OstreeAsyncProgress. Each key is specified in @... as the key name, followed by a #GVariant format string, followed by the necessary arguments for that format string, just as for g_variant_new(). After those arguments is the next key name. The varargs list must be %NULL-terminated. g_variant_ref_sink() will be called as appropriate on the #GVariant parameters, so they may be floating. This operation is thread-safe, and all the keys are set atomically. |[<!-- language="C" --> guint32 outstanding_fetches = 15; guint64 bytes_received = 1000; ostree_async_progress_set (progress, "outstanding-fetches", "u", outstanding_fetches, "bytes-received", "t", bytes_received, "status", "s", "Updated status", "refs", "@a{ss}", g_variant_new_parsed ("@a{ss} {}"), NULL); ]| an #OstreeAsyncProgress key name, format string, #GVariant parameters, …, followed by %NULL Set the human-readable status string for the #OstreeAsyncProgress. This operation is thread-safe. %NULL may be passed to clear the status. This is a convenience function to set the well-known `status` key. an #OstreeAsyncProgress new status string, or %NULL to clear the status Assign a new @value to the given @key, replacing any existing value. The operation is thread-safe. @value may be a floating reference; g_variant_ref_sink() will be called on it. Any watchers of the #OstreeAsyncProgress will be notified of the change if @value differs from the existing value for @key. an #OstreeAsyncProgress a key to set the value to assign to @key Emitted when @self has been changed. Copy of @self Bootconfig to clone Initialize a bootconfig from the given file. Parser Directory fd File path Cancellable GVariant type `s`. If this is added to a commit, `ostree_repo_pull()` will enforce that the commit was retrieved from a repository which has the same collection ID. See `ostree_repo_set_collection_id()`. This is most useful in concert with `OSTREE_COMMIT_META_KEY_REF_BINDING`, as it more strongly binds the commit to the repository and branch. GVariant type `s`. This metadata key is used to display vendor's message when an update stream for a particular branch ends. It usually provides update instructions for the users. GVariant type `s`. Should contain a refspec defining a new target branch; `ostree admin upgrade` and `OstreeSysrootUpgrader` will automatically initiate a rebase upon encountering this metadata key. GVariant type `as`; each element is a branch name. If this is added to a commit, `ostree_repo_pull()` will enforce that the commit was retrieved from one of the branch names in this array. This prevents "sidegrade" attacks. The rationale for having this support multiple branch names is that it helps support a "promotion" model of taking a commit and moving it between development and production branches. GVariant type `s`. This should hold a relatively short single line value containing a human-readable "source" for a commit, intended to be displayed near the origin ref. This is particularly useful for systems that inject content into an OSTree commit from elsewhere - for example, generating from an OCI or qcow2 image. Or if generating from packages, the enabled repository names and their versions. Try to keep this key short (e.g. < 80 characters) and human-readable; if you desire machine readable data, consider injecting separate metadata keys. GVariant type `s`. This metadata key is used for version numbers. A freeform string; the intention is that systems using ostree do not interpret this semantically as traditional package managers do. This is the only ostree-defined metadata key that does not start with `ostree.`. A structure which globally uniquely identifies a ref as the tuple (@collection_id, @ref_name). For backwards compatibility, @collection_id may be %NULL, indicating a ref name which is not globally unique. collection ID which provided the ref, or %NULL if there is no associated collection ref name Create a new #OstreeCollectionRef containing (@collection_id, @ref_name). If @collection_id is %NULL, 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. a new #OstreeCollectionRef a collection ID, or %NULL for a plain ref a ref name Create a copy of the given @ref. a newly allocated copy of @ref an #OstreeCollectionRef Free the given @ref. an #OstreeCollectionRef Copy an array of #OstreeCollectionRefs, including deep copies of all its elements. @refs must be %NULL-terminated; it may be empty, but must not be %NULL. a newly allocated copy of @refs %NULL-terminated array of #OstreeCollectionRefs Compare @ref1 and @ref2 and return %TRUE if they have the same collection ID and ref name, and %FALSE otherwise. Both @ref1 and @ref2 must be non-%NULL. %TRUE if @ref1 and @ref2 are equal, %FALSE otherwise an #OstreeCollectionRef another #OstreeCollectionRef Free the given array of @refs, including freeing all its elements. @refs must be %NULL-terminated; it may be empty, but must not be %NULL. an array of #OstreeCollectionRefs Hash the given @ref. This function is suitable for use with #GHashTable. @ref must be non-%NULL. hash value for @ref an #OstreeCollectionRef 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. This function just removes all members of the `libostree-transient` 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. Additionally, this function will remove the `origin/unlocked` and `origin/override-commit` members; these should be considered transient state that should have been under an explicit group. An origin New deep copy of @self Deployment %TRUE if deployments have the same osname, csum, and deployserial A deployment A deployment Boot configuration Deployment Origin Deployment Note this function only returns a *relative* path - if you want to access, it, you must either use fd-relative api such as openat(), or concatenate it with the full ostree_sysroot_get_path(). Path to deployment root directory, relative to sysroot A deployment See ostree_sysroot_deployment_set_pinned(). `TRUE` if deployment will not be subject to GC Deployment `TRUE` if deployment should be "finalized" at shutdown time Deployment An extensible options structure controlling diff dirs. Make sure that owner_uid/gid is set to -1 when not used. This is used by ostree_diff_dirs_with_options(). Errors returned by signature creation and verification operations in OSTree. These may be returned by any API which creates or verifies signatures. A signature was expected, but not found. A signature was malformed. A signature was found, but was created with a key not in the configured keyrings. Signature attributes available from an #OstreeGpgVerifyResult. The attribute's #GVariantType is shown in brackets. [#G_VARIANT_TYPE_BOOLEAN] Is the signature valid? [#G_VARIANT_TYPE_BOOLEAN] Has the signature expired? [#G_VARIANT_TYPE_BOOLEAN] Has the signing key expired? [#G_VARIANT_TYPE_BOOLEAN] Has the signing key been revoked? [#G_VARIANT_TYPE_BOOLEAN] Is the signing key missing? [#G_VARIANT_TYPE_STRING] Fingerprint of the signing key [#G_VARIANT_TYPE_INT64] Signature creation Unix timestamp [#G_VARIANT_TYPE_INT64] Signature expiration Unix timestamp (0 if no expiration) [#G_VARIANT_TYPE_STRING] Name of the public key algorithm used to create the signature [#G_VARIANT_TYPE_STRING] Name of the hash algorithm used to create the signature [#G_VARIANT_TYPE_STRING] The name of the signing key's primary user [#G_VARIANT_TYPE_STRING] The email address of the signing key's primary user [#G_VARIANT_TYPE_STRING] 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.) Formatting flags for ostree_gpg_verify_result_describe(). Currently there's only one possible output format, but this enumeration allows for future variations. Use the default output format Similar to ostree_gpg_verify_result_describe() but takes a #GVariant of all attributes for a GPG signature instead of an #OstreeGpgVerifyResult and signature index. The @variant <emphasis>MUST</emphasis> have been created by ostree_gpg_verify_result_get_all(). a #GVariant from ostree_gpg_verify_result_get_all() a #GString to hold the description optional line prefix string flags to adjust the description format Counts all the signatures in @result. signature count an #OstreeGpgVerifyResult Counts only the valid signatures in @result. valid signature count an #OstreeGpgVerifyResult Appends a brief, human-readable description of the GPG signature at @signature_index in @result to the @output_buffer. The description spans multiple lines. A @line_prefix string, if given, will precede each line of the description. The @flags argument is reserved for future variations to the description format. Currently must be 0. It is a programmer error to request an invalid @signature_index. Use ostree_gpg_verify_result_count_all() to find the number of signatures in @result. an #OstreeGpgVerifyResult which signature to describe a #GString to hold the description optional line prefix string flags to adjust the description format Builds a #GVariant tuple of requested attributes for the GPG signature at @signature_index in @result. See the #OstreeGpgSignatureAttr description for the #GVariantType of each available attribute. It is a programmer error to request an invalid #OstreeGpgSignatureAttr or an invalid @signature_index. Use ostree_gpg_verify_result_count_all() to find the number of signatures in @result. a new, floating, #GVariant tuple an #OstreeGpgVerifyResult which signature to get attributes from Array of requested attributes Length of the @attrs array Builds a #GVariant tuple of all available attributes for the GPG signature at @signature_index in @result. The child values in the returned #GVariant tuple are ordered to match the #OstreeGpgSignatureAttr enumeration, which means the enum values can be used as index values in functions like g_variant_get_child(). See the #OstreeGpgSignatureAttr description for the #GVariantType of each available attribute. <note> <para> The #OstreeGpgSignatureAttr enumeration may be extended in the future with new attributes, which would affect the #GVariant tuple returned by this function. While the position and type of current child values in the #GVariant tuple will not change, to avoid backward-compatibility issues <emphasis>please do not depend on the tuple's overall size or type signature</emphasis>. </para> </note> It is a programmer error to request an invalid @signature_index. Use ostree_gpg_verify_result_count_all() to find the number of signatures in @result. a new, floating, #GVariant tuple an #OstreeGpgVerifyResult which signature to get attributes from Searches @result for a signature signed by @key_id. If a match is found, the function returns %TRUE and sets @out_signature_index so that further signature details can be obtained through ostree_gpg_verify_result_get(). If no match is found, the function returns %FALSE and leaves @out_signature_index unchanged. %TRUE on success, %FALSE on failure an #OstreeGpgVerifyResult a GPG key ID or fingerprint return location for the index of the signature signed by @key_id, or %NULL Checks if the result contains at least one signature from the trusted keyring. You can call this function immediately after ostree_repo_verify_summary() or ostree_repo_verify_commit_ext() - it will handle the %NULL @result and filled @error too. %TRUE if @result was not %NULL and had at least one signature from trusted keyring, otherwise %FALSE an #OstreeGpgVerifyResult Zlib decompression Maximum permitted size in bytes of metadata objects. This is an arbitrary number, but really, no one should be putting humongous data in metadata. Objects committed above this size will be allowed, but a warning will be emitted. Private instance structure. A new tree 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. A new tree The repo which contains the objects refered by the checksums. dirtree checksum dirmeta checksum 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. `TRUE` on success Tree Returns the subdirectory of self with filename @name, creating an empty one it if it doesn't exist. Tree Name of subdirectory of self to retrieve/creates the subdirectory Create all parent trees necessary for the given @split_path to exist. Tree File path components SHA256 checksum for metadata The parent tree Merges @self with the tree given by @contents_checksum and @metadata_checksum, but only if it's possible without writing new objects to the @repo. We can do this if either @self is empty, the tree given by @contents_checksum is empty or if both trees already have the same @contents_checksum. @TRUE if merge was successful, @FALSE if it was not possible. 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. All children files (the value is a checksum) All children directories Traverse @start number of elements starting from @split_path; the child will be returned in @out_subdir. Tree Split pathname Descend from this number of elements in @split_path Target parent The name of a `GKeyFile` group for data that should not be carried across upgrades. For more information, see ostree_deployment_origin_remove_transient_state(). Enumeration for core object types; %OSTREE_OBJECT_TYPE_FILE is for content, the other types are metadata. Content; regular file, symbolic link List of children (trees or files), and metadata Directory metadata Toplevel object, refers to tree and dirmeta for root Toplevel object, refers to a deleted commit Detached metadata for a commit Symlink to a .file given its checksum on the payload only. ostree release version component (e.g. 2 if %OSTREE_VERSION is 2017.2) The name of a ref which is used to store metadata for the entire repository, such as its expected update time (`ostree.summary.expires`), name, or new GPG keys. Metadata is stored on contentless commits in the ref, and hence is signed with the commits. This supersedes the additional metadata dictionary in the `summary` file (see ostree_repo_regenerate_summary()), as the use of a ref means that the metadata for multiple upstream repositories can be included in a single mirror repository, disambiguating the refs using collection IDs. In order to support peer to peer redistribution of repository metadata, repositories must set a collection ID (ostree_repo_set_collection_id()). Users of OSTree may place arbitrary metadata in commits on this ref, but the keys must be namespaced by product or developer. For example, `exampleos.end-of-life`. The `ostree.` prefix is reserved. 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. 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. remote’s name an #OstreeRemote Get the URL from the remote. the remote's URL an #OstreeRemote Increase the reference count on the given @remote. a copy of @remote, for convenience an #OstreeRemote Decrease the reference count on the given @remote and free it if the reference count reaches 0. an #OstreeRemote An accessor object for an OSTree repository located at @path Path to a repository If the current working directory appears to be an OSTree repository, create a new #OstreeRepo object for accessing it. Otherwise use the path in the OSTREE_REPO environment variable (if defined) or else the default system repository located at /ostree/repo. An accessor object for an OSTree repository located at /ostree/repo Creates a new #OstreeRepo instance, taking the system root path explicitly instead of assuming "/". An accessor object for the OSTree repository located at @repo_path. Path to a repository Path to the system root This is a file-descriptor relative version of ostree_repo_create(). Create the underlying structure on disk for the repository, and call ostree_repo_open_at() on the result, preparing it for use. If a repository already exists at @dfd + @path (defined by an `objects/` subdirectory existing), then this function will simply call ostree_repo_open_at(). In other words, this function cannot be used to change the mode or configuration (`repo/config`) of an existing repo. The @options dict may contain: - collection-id: s: Set as collection ID in repo/config (Since 2017.9) A new OSTree repository reference Directory fd Path The mode to store the repository in a{sv}: See below for accepted keys Cancellable This combines ostree_repo_new() (but using fd-relative access) with ostree_repo_open(). Use this when you know you should be operating on an already extant repository. If you want to create one, use ostree_repo_create_at(). An accessor object for an OSTree repository located at @dfd + @path Directory fd Path Convenient "changed" callback for use with ostree_async_progress_new_and_connect() when pulling from a remote repository. Depending on the state of the #OstreeAsyncProgress, either displays a custom status message, or else outstanding fetch progress in bytes/sec, or else outstanding content or metadata writes to the repository in number of objects. Compatibility note: this function previously assumed that @user_data was a pointer to a #GSConsole instance. This is no longer the case, and @user_data is ignored. Async progress User data This hash table is a mapping from #GVariant which can be accessed via ostree_object_name_deserialize() to a #GVariant containing either a similar #GVariant or and array of them, listing the parents of the key. A new hash table This hash table is a set of #GVariant which can be accessed via ostree_object_name_deserialize(). A new hash table Gets all the commits that a certain object belongs to, as recorded by a parents table gotten from ostree_repo_traverse_commit_union_with_parents. An array of checksums for the commits the key belongs to. Abort the active transaction; any staged objects and ref changes will be discarded. You *must* invoke this if you have chosen not to invoke ostree_repo_commit_transaction(). Calling this function when not in a transaction will do nothing and return successfully. An #OstreeRepo Cancellable Add a GPG signature to a summary file. Self NULL-terminated array of GPG keys. GPG home directory, or %NULL A #GCancellable Append a GPG signature to a commit. Self SHA256 of given commit to sign Signature data A #GCancellable Similar to ostree_repo_checkout_tree(), but uses directory-relative paths for the destination, uses a new `OstreeRepoCheckoutAtOptions`, and takes a commit checksum and optional subpath pair, rather than requiring use of `GFile` APIs for the caller. It also replaces ostree_repo_checkout_at() which was not safe to use with GObject introspection. Note in addition that unlike ostree_repo_checkout_tree(), the default is not to use the repository-internal uncompressed objects cache. Repo Options Directory FD for destination Directory for destination Checksum for commit Cancellable Call this after finishing a succession of checkout operations; it will delete any currently-unused uncompressed objects from the cache. Repo Cancellable Check out @source into @destination, which must live on the physical filesystem. @source may be any subdirectory of a given commit. The @mode and @overwrite_mode allow control over how the files are checked out. Repo Options controlling all files Whether or not to overwrite files Place tree here Source tree Source info Cancellable Similar to ostree_repo_checkout_tree(), but uses directory-relative paths for the destination, uses a new `OstreeRepoCheckoutAtOptions`, and takes a commit checksum and optional subpath pair, rather than requiring use of `GFile` APIs for the caller. Note in addition that unlike ostree_repo_checkout_tree(), the default is not to use the repository-internal uncompressed objects cache. This function is deprecated. Use ostree_repo_checkout_at() instead. Repo Options Directory FD for destination Directory for destination Checksum for commit Cancellable Complete the transaction. Any refs set with ostree_repo_transaction_set_ref() or ostree_repo_transaction_set_refspec() will be written out. Note that if multiple threads are performing writes, all such threads must have terminated before this function is invoked. Locking: Releases `shared` lock acquired by `ostree_repo_prepare_transaction()` Multithreading: This function is *not* MT safe; only one transaction can be active at a time. An #OstreeRepo A set of statistics of things that happened during this transaction. Cancellable A newly-allocated copy of the repository config Create the underlying structure on disk for the repository, and call ostree_repo_open() on the result, preparing it for use. Since version 2016.8, this function will succeed on an existing repository, and finish creating any necessary files in a partially created repository. However, this function cannot change the mode of an existing repository, and will silently ignore an attempt to do so. Since 2017.9, "existing repository" is defined by the existence of an `objects` subdirectory. This function predates ostree_repo_create_at(). It is an error to call this function on a repository initialized via ostree_repo_open_at(). An #OstreeRepo The mode to store the repository in Cancellable Remove the object of type @objtype with checksum @sha256 from the repository. An error of type %G_IO_ERROR_NOT_FOUND is thrown if the object does not exist. Repo Object type Checksum Cancellable Check whether two opened repositories are the same on disk: if their root directories are the same inode. If @a or @b are not open yet (due to ostree_repo_open() not being called on them yet), %FALSE will be returned. %TRUE if @a and @b are the same repository on disk, %FALSE otherwise an #OstreeRepo an #OstreeRepo Import an archive file @archive into the repository, and write its file structure to @mtree. An #OstreeRepo Options controlling conversion An #OstreeRepoFile for the base directory A `struct archive`, but specified as void to avoid a dependency on the libarchive headers Cancellable Find reachable remote URIs which claim to provide any of the given named @refs. This will search for configured remotes (#OstreeRepoFinderConfig), mounted volumes (#OstreeRepoFinderMount) and (if enabled at compile time) local network peers (#OstreeRepoFinderAvahi). In order to use a custom configuration of #OstreeRepoFinder instances, call ostree_repo_finder_resolve_all_async() on them individually. Any remote which is found and which claims to support any of the given @refs will be returned in the results. It is possible that a remote claims to support a given ref, but turns out not to — it is not possible to verify this until ostree_repo_pull_from_remotes_async() is called. The returned results will be sorted with the most useful first — this is typically the remote which claims to provide the most of @refs, at the lowest latency. Each result contains a list of the subset of @refs it claims to provide. It is possible for a non-empty list of results to be returned, but for some of @refs to not be listed in any of the results. Callers must check for this. Pass the results to ostree_repo_pull_from_remotes_async() to pull the given @refs from those remotes. The following @options are currently defined: * `override-commit-ids` (`as`): Array of specific commit IDs to fetch. The nth commit ID applies to the nth ref, so this must be the same length as @refs, if provided. * `n-network-retries` (`u`): Number of times to retry each download on receiving a transient network error, such as a socket timeout; default is 5, 0 means return errors without retrying. @finders must be a non-empty %NULL-terminated array of the #OstreeRepoFinder instances to use, or %NULL to use the system default set of finders, which will typically be all available finders using their default options (but this is not guaranteed). GPG verification of commits will be used unconditionally. This will use the thread-default #GMainContext, but will not iterate it. an #OstreeRepo non-empty array of collection–ref pairs to find remotes for a GVariant `a{sv}` with an extensible set of flags non-empty array of #OstreeRepoFinder instances to use, or %NULL to use the system defaults an #OstreeAsyncProgress to update with the operation’s progress, or %NULL a #GCancellable, or %NULL asynchronous completion callback data to pass to @callback Finish an asynchronous pull operation started with ostree_repo_find_remotes_async(). a potentially empty array of #OstreeRepoFinderResults, followed by a %NULL terminator element; or %NULL on error an #OstreeRepo the asynchronous result Verify consistency of the object; this performs checks only relevant to the immediate object itself, such as checksumming. This API call will not itself traverse metadata objects for example. Repo Object type Checksum Cancellable Get the collection ID of this repository. See [collection IDs][collection-ids]. collection ID for the repository an #OstreeRepo The repository configuration; do not modify In some cases it's useful for applications to access the repository directly; for example, writing content into `repo/tmp` ensures it's on the same filesystem. Another case is detecting the mtime on the repository (to see whether a ref was written). File descriptor for repository root - owned by @self Repo For more information see ostree_repo_set_disable_fsync(). Whether or not fsync() is enabled for this repo. An #OstreeRepo Before this function can be used, ostree_repo_init() must have been called. Parent repository, or %NULL if none Repo Note that since the introduction of ostree_repo_open_at(), this function may return a process-specific path in `/proc` if the repository was created using that API. In general, you should avoid use of this API. Path to repo Repo OSTree remotes are represented by keyfile groups, formatted like: `[remote "remotename"]`. This function returns a value named @option_name underneath that group, and returns it as a boolean. If the option is not set, @out_value will be set to @default_value. If an error is returned, @out_value will be set to %FALSE. %TRUE on success, otherwise %FALSE with @error set A OstreeRepo Name Option Value returned if @option_name is not present location to store the result. OSTree remotes are represented by keyfile groups, formatted like: `[remote "remotename"]`. This function returns a value named @option_name underneath that group, and returns it as a zero terminated array of strings. If the option is not set, or if an error is returned, @out_value will be set to %NULL. %TRUE on success, otherwise %FALSE with @error set A OstreeRepo Name Option location to store the list of strings. The list should be freed with g_strfreev(). OSTree remotes are represented by keyfile groups, formatted like: `[remote "remotename"]`. This function returns a value named @option_name underneath that group, or @default_value if the remote exists but not the option name. If an error is returned, @out_value will be set to %NULL. %TRUE on success, otherwise %FALSE with @error set A OstreeRepo Name Option Value returned if @option_name is not present Return location for value Verify @signatures for @data using GPG keys in the keyring for @remote_name, and return an #OstreeGpgVerifyResult. The @remote_name parameter can be %NULL. In that case it will do the verifications using GPG keys in the keyrings of all remotes. an #OstreeGpgVerifyResult, or %NULL on error Repository Name of remote Data as a #GBytes Signatures as a #GBytes Path to directory GPG keyrings; overrides built-in default if given Path to additional keyring file (not a directory) Cancellable Set @out_have_object to %TRUE if @self contains the given object; %FALSE otherwise. %FALSE if an unexpected error occurred, %TRUE otherwise Repo Object type ASCII SHA256 checksum %TRUE if repository contains object Cancellable Calculate a hash value for the given open repository, suitable for use when putting it into a hash table. It is an error to call this on an #OstreeRepo which is not yet open, as a persistent hash value cannot be calculated until the repository is open and the inode of its root directory has been loaded. This function does no I/O. hash value for the #OstreeRepo an #OstreeRepo Import an archive file @archive into the repository, and write its file structure to @mtree. An #OstreeRepo Options structure, ensure this is zeroed, then set specific variables Really this is "struct archive*" The #OstreeMutableTree to write to Optional commit modifier Cancellable Copy object named by @objtype and @checksum into @self from the source repository @source. If both repositories are of the same type and on the same filesystem, this will simply be a fast Unix hard link operation. Otherwise, a copy will be performed. Destination repo Source repo Object type checksum Cancellable Copy object named by @objtype and @checksum into @self from the source repository @source. If both repositories are of the same type and on the same filesystem, this will simply be a fast Unix hard link operation. Otherwise, a copy will be performed. Destination repo Source repo Object type checksum If %TRUE, assume the source repo is valid and trusted Cancellable %TRUE if this repository is the root-owned system global repository Repository Returns whether the repository is writable by the current user. If the repository is not writable, the @error indicates why. %TRUE if this repository is writable Repo List all local, mirrored, and remote refs, mapping them to the commit checksums they currently point to in @out_all_refs. If @match_collection_id is specified, the results will be limited to those with an equal collection ID. #OstreeCollectionRefs are guaranteed to be returned with their collection ID set to a non-%NULL value; so no refs from `refs/heads` will be listed if no collection ID is configured for the repository (ostree_repo_get_collection_id()). If you want to exclude refs from `refs/remotes`, use %OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_REMOTES in @flags. %TRUE on success, %FALSE otherwise Repo If non-%NULL, only list refs from this collection Mapping from collection–ref to checksum Options controlling listing behavior Cancellable This function synchronously enumerates all commit objects starting with @start, returning data in @out_commits. %TRUE on success, %FALSE on error, and @error will be set Repo List commits starting with this checksum Map of serialized commit name to variant data Cancellable This function synchronously enumerates all objects in the repository, returning data in @out_objects. @out_objects maps from keys returned by ostree_object_name_serialize() to #GVariant values of type %OSTREE_REPO_LIST_OBJECTS_VARIANT_TYPE. %TRUE on success, %FALSE on error, and @error will be set Repo Flags controlling enumeration Map of serialized object name to variant data Cancellable If @refspec_prefix is %NULL, list all local and remote refspecs, with their current values in @out_all_refs. Otherwise, only list refspecs which have @refspec_prefix as a prefix. @out_all_refs will be returned as a mapping from refspecs (including the remote name) to checksums. If @refspec_prefix is non-%NULL, it will be removed as a prefix from the hash table keys. Repo Only list refs which match this prefix Mapping from refspec to checksum Cancellable If @refspec_prefix is %NULL, list all local and remote refspecs, with their current values in @out_all_refs. Otherwise, only list refspecs which have @refspec_prefix as a prefix. @out_all_refs will be returned as a mapping from refspecs (including the remote name) to checksums. Differently from ostree_repo_list_refs(), the @refspec_prefix will not be removed from the refspecs in the hash table. Repo Only list refs which match this prefix Mapping from refspec to checksum Options controlling listing behavior Cancellable This function synchronously enumerates all static deltas in the repository, returning its result in @out_deltas. Repo String name of deltas (checksum-checksum.delta) Cancellable A version of ostree_repo_load_variant() specialized to commits, capable of returning extended state information. Currently the only extended state is %OSTREE_REPO_COMMIT_STATE_PARTIAL, which means that only a sub-path of the commit is available. Repo Commit checksum Commit Commit state Load content object, decomposing it into three parts: the actual content (for regular files), the metadata, and extended attributes. Repo ASCII SHA256 checksum File content File information Extended attributes Cancellable Load object as a stream; useful when copying objects between repositories. Repo Object type ASCII SHA256 checksum Stream for object Length of @out_input Cancellable Load the metadata object @sha256 of type @objtype, storing the result in @out_variant. Repo Expected object type Checksum string Metadata object Attempt to load the metadata object @sha256 of type @objtype if it exists, storing the result in @out_variant. If it doesn't exist, %NULL is returned. Repo Object type ASCII checksum Metadata Commits in "partial" state do not have all their child objects written. This occurs in various situations, such as during a pull, but also if a "subpath" pull is used, as well as "commit only" pulls. This function is used by ostree_repo_pull_with_options(); you should use this if you are implementing a different type of transport. Repo Commit SHA-256 Whether or not this commit is partial Starts or resumes a transaction. In order to write to a repo, you need to start a transaction. You can complete the transaction with ostree_repo_commit_transaction(), or abort the transaction with ostree_repo_abort_transaction(). Currently, transactions may result in partial commits or data in the target repository if interrupted during ostree_repo_commit_transaction(), and further writing refs is also not currently atomic. There can be at most one transaction active on a repo at a time per instance of `OstreeRepo`; however, it is safe to have multiple threads writing objects on a single `OstreeRepo` instance as long as their lifetime is bounded by the transaction. Locking: Acquires a `shared` lock; release via commit or abort Multithreading: This function is *not* MT safe; only one transaction can be active at a time. An #OstreeRepo Whether this transaction is resuming from a previous one. This is a legacy state, now OSTree pulls use per-commit `state/.commitpartial` files. Cancellable Delete content from the repository. By default, this function will only delete "orphaned" objects not referred to by any commit. This can happen during a local commit operation, when we have written content objects but not saved the commit referencing them. However, if %OSTREE_REPO_PRUNE_FLAGS_REFS_ONLY is provided, instead of traversing all commits, only refs will be used. Particularly when combined with @depth, this is a convenient way to delete history from the repository. Use the %OSTREE_REPO_PRUNE_FLAGS_NO_PRUNE to just determine statistics on objects that would be deleted, without actually deleting them. Locking: exclusive Repo Options controlling prune process Stop traversal after this many iterations (-1 for unlimited) Number of objects found Number of objects deleted Storage size in bytes of objects deleted Cancellable Delete content from the repository. This function is the "backend" half of the higher level ostree_repo_prune(). To use this function, you determine the root set yourself, and this function finds all other unreferenced objects and deletes them. Use this API when you want to perform more selective pruning - for example, retain all commits from a production branch, but just GC some history from your dev branch. The %OSTREE_REPO_PRUNE_FLAGS_NO_PRUNE flag may be specified to just determine statistics on objects that would be deleted, without actually deleting them. Locking: exclusive Repo Options controlling prune process Number of objects found Number of objects deleted Storage size in bytes of objects deleted Cancellable Prune static deltas, if COMMIT is specified then delete static delta files only targeting that commit; otherwise any static delta of non existing commits are deleted. Locking: exclusive Repo ASCII SHA256 checksum for commit, or %NULL for each non existing commit Cancellable Connect to the remote repository, fetching the specified set of refs @refs_to_fetch. For each ref that is changed, download the commit, all metadata, and all content objects, storing them safely on disk in @self. If @flags contains %OSTREE_REPO_PULL_FLAGS_MIRROR, and the @refs_to_fetch is %NULL, and the remote repository contains a summary file, then all refs will be fetched. If @flags contains %OSTREE_REPO_PULL_FLAGS_COMMIT_ONLY, then only the metadata for the commits in @refs_to_fetch is pulled. Warning: This API will iterate the thread default main context, which is a bug, but kept for compatibility reasons. If you want to avoid this, use g_main_context_push_thread_default() to push a new one around this call. Repo Name of remote Optional list of refs; if %NULL, fetch all configured refs Options controlling fetch behavior Progress Cancellable Pull refs from multiple remotes which have been found using ostree_repo_find_remotes_async(). @results are expected to be in priority order, with the best remotes to pull from listed first. ostree_repo_pull_from_remotes_async() will generally pull from the remotes in order, but may parallelise its downloads. If an error is encountered when pulling from a given remote, that remote will be ignored and another will be tried instead. If any refs have not been downloaded successfully after all remotes have been tried, %G_IO_ERROR_FAILED will be returned. The results of any successful downloads will remain cached in the local repository. If @cancellable is cancelled, %G_IO_ERROR_CANCELLED will be returned immediately. The results of any successfully completed downloads at that point will remain cached in the local repository. GPG verification of commits will be used unconditionally. The following @options are currently defined: * `flags` (`i`): #OstreeRepoPullFlags to apply to the pull operation * `inherit-transaction` (`b`): %TRUE to inherit an ongoing transaction on the #OstreeRepo, rather than encapsulating the pull in a new one * `depth` (`i`): How far in the history to traverse; default is 0, -1 means infinite * `disable-static-deltas` (`b`): Do not use static deltas * `http-headers` (`a(ss)`): Additional headers to add to all HTTP requests * `subdirs` (`as`): Pull just these subdirectories * `update-frequency` (`u`): Frequency to call the async progress callback in milliseconds, if any; only values higher than 0 are valid * `append-user-agent` (`s`): Additional string to append to the user agent an #OstreeRepo %NULL-terminated array of remotes to pull from, including the refs to pull from each A GVariant `a{sv}` with an extensible set of flags an #OstreeAsyncProgress to update with the operation’s progress, or %NULL a #GCancellable, or %NULL asynchronous completion callback data to pass to @callback Finish an asynchronous pull operation started with ostree_repo_pull_from_remotes_async(). %TRUE on success, %FALSE otherwise an #OstreeRepo the asynchronous result This is similar to ostree_repo_pull(), but only fetches a single subpath. Repo Name of remote Subdirectory path Optional list of refs; if %NULL, fetch all configured refs Options controlling fetch behavior Progress Cancellable Like ostree_repo_pull(), but supports an extensible set of flags. The following are currently defined: * refs (as): Array of string refs * collection-refs (a(sss)): Array of (collection ID, ref name, checksum) tuples to pull; mutually exclusive with `refs` and `override-commit-ids`. Checksums may be the empty string to pull the latest commit for that ref * flags (i): An instance of #OstreeRepoPullFlags * subdir (s): Pull just this subdirectory * subdirs (as): Pull just these subdirectories * override-remote-name (s): If local, add this remote to refspec * gpg-verify (b): GPG verify commits * gpg-verify-summary (b): GPG verify summary * depth (i): How far in the history to traverse; default is 0, -1 means infinite * disable-static-deltas (b): Do not use static deltas * require-static-deltas (b): Require static deltas * override-commit-ids (as): Array of specific commit IDs to fetch for refs * timestamp-check (b): Verify commit timestamps are newer than current (when pulling via ref); Since: 2017.11 * dry-run (b): Only print information on what will be downloaded (requires static deltas) * override-url (s): Fetch objects from this URL if remote specifies no metalink in options * inherit-transaction (b): Don't initiate, finish or abort a transaction, useful to do multiple pulls in one transaction. * http-headers (a(ss)): Additional headers to add to all HTTP requests * update-frequency (u): Frequency to call the async progress callback in milliseconds, if any; only values higher than 0 are valid * localcache-repos (as): File paths for local repos to use as caches when doing remote fetches * append-user-agent (s): Additional string to append to the user agent * n-network-retries (u): Number of times to retry each download on receiving a transient network error, such as a socket timeout; default is 5, 0 means return errors without retrying Repo Name of remote or file:// url A GVariant a{sv} with an extensible set of flags. Progress Cancellable Return the size in bytes of object with checksum @sha256, after any compression has been applied. Repo Object type Checksum Size in bytes object occupies physically Cancellable Load the content for @rev into @out_root. Repo Ref or ASCII checksum An #OstreeRepoFile corresponding to the root The resolved commit checksum Cancellable OSTree commits can have arbitrary metadata associated; this function retrieves them. If none exists, @out_metadata will be set to %NULL. Repo ASCII SHA256 commit checksum Metadata associated with commit in with format "a{sv}", or %NULL if none exists Cancellable An OSTree repository can contain a high level "summary" file that describes the available branches and other metadata. If the timetable for making commits and updating the summary file is fairly regular, setting the `ostree.summary.expires` key in @additional_metadata will aid clients in working out when to check for updates. It is regenerated automatically after any ref is added, removed, or updated if `core/auto-update-summary` is set. If the `core/collection-id` key is set in the configuration, it will be included as %OSTREE_SUMMARY_COLLECTION_ID in the summary file. Refs that have associated collection IDs will be included in the generated summary file, listed under the %OSTREE_SUMMARY_COLLECTION_MAP key. Collection IDs and refs in %OSTREE_SUMMARY_COLLECTION_MAP are guaranteed to be in lexicographic order. Locking: exclusive Repo A GVariant of type a{sv}, or %NULL Cancellable By default, an #OstreeRepo will cache the remote configuration and its own repo/config data. This API can be used to reload it. repo cancellable Create a new remote named @name pointing to @url. If @options is provided, then it will be mapped to #GKeyFile entries, where the GVariant dictionary key is an option string, and the value is mapped as follows: * s: g_key_file_set_string() * b: g_key_file_set_boolean() * as: g_key_file_set_string_list() Repo Name of remote URL for remote (if URL begins with metalink=, it will be used as such) GVariant of type a{sv} Cancellable A combined function handling the equivalent of ostree_repo_remote_add(), ostree_repo_remote_delete(), with more options. Repo System root Operation to perform Name of remote URL for remote (if URL begins with metalink=, it will be used as such) GVariant of type a{sv} Cancellable Delete the remote named @name. It is an error if the provided remote does not exist. Repo Name of remote Cancellable Tries to fetch the summary file and any GPG signatures on the summary file over HTTP, and returns the binary data in @out_summary and @out_signatures respectively. If no summary file exists on the remote server, @out_summary is set to @NULL. Likewise if the summary file is not signed, @out_signatures is set to @NULL. In either case the function still returns %TRUE. This method does not verify the signature of the downloaded summary file. Use ostree_repo_verify_summary() for that. Parse the summary data into a #GVariant using g_variant_new_from_bytes() with #OSTREE_SUMMARY_GVARIANT_FORMAT as the format string. %TRUE on success, %FALSE on failure Self name of a remote return location for raw summary data, or %NULL return location for raw summary signature data, or %NULL a #GCancellable Like ostree_repo_remote_fetch_summary(), but supports an extensible set of flags. The following are currently defined: - override-url (s): Fetch summary from this URL if remote specifies no metalink in options - http-headers (a(ss)): Additional headers to add to all HTTP requests - append-user-agent (s): Additional string to append to the user agent - n-network-retries (u): Number of times to retry each download on receiving a transient network error, such as a socket timeout; default is 5, 0 means return errors without retrying %TRUE on success, %FALSE on failure Self name of a remote A GVariant a{sv} with an extensible set of flags return location for raw summary data, or %NULL return location for raw summary signature data, or %NULL a #GCancellable Return whether GPG verification is enabled for the remote named @name through @out_gpg_verify. It is an error if the provided remote does not exist. %TRUE on success, %FALSE on failure Repo Name of remote Remote's GPG option Return whether GPG verification of the summary is enabled for the remote named @name through @out_gpg_verify_summary. It is an error if the provided remote does not exist. %TRUE on success, %FALSE on failure Repo Name of remote Remote's GPG option Return the URL of the remote named @name through @out_url. It is an error if the provided remote does not exist. %TRUE on success, %FALSE on failure Repo Name of remote Remote's URL Imports one or more GPG keys from the open @source_stream, or from the user's personal keyring if @source_stream is %NULL. The @key_ids array can optionally restrict which keys are imported. If @key_ids is %NULL, then all keys are imported. The imported keys will be used to conduct GPG verification when pulling from the remote named @name. %TRUE on success, %FALSE on failure Self name of a remote a #GInputStream, or %NULL a %NULL-terminated array of GPG key IDs, or %NULL return location for the number of imported keys, or %NULL a #GCancellable List available remote names in an #OstreeRepo. Remote names are sorted alphabetically. If no remotes are available the function returns %NULL. a %NULL-terminated array of remote names Repo Number of remotes available List refs advertised by @remote_name, including refs which are part of collections. If the repository at @remote_name has a collection ID set, its refs will be returned with that collection ID; otherwise, they will be returned with a %NULL collection ID in each #OstreeCollectionRef key in @out_all_refs. Any refs for other collections stored in the repository will also be returned. No filtering is performed. Repo Name of the remote. Mapping from collection–ref to checksum Cancellable Repo Name of the remote. Mapping from ref to checksum Cancellable Look up the checksum for the given collection–ref, returning it in @out_rev. This will search through the mirrors and remote refs. If @allow_noent is %TRUE and the given @ref cannot be found, %TRUE will be returned and @out_rev will be set to %NULL. If @allow_noent is %FALSE and the given @ref cannot be found, a %G_IO_ERROR_NOT_FOUND error will be returned. There are currently no @flags which affect the behaviour of this function. %TRUE on success, %FALSE on failure an #OstreeRepo a collection–ref to resolve %TRUE to not throw an error if @ref doesn’t exist options controlling behaviour return location for the checksum corresponding to @ref, or %NULL if @allow_noent is %TRUE and the @ref could not be found a #GCancellable, or %NULL Find the GPG keyring for the given @collection_id, using the local configuration from the given #OstreeRepo. This will search the configured remotes for ones whose `collection-id` key matches @collection_id, and will return the first matching remote. If multiple remotes match and have different keyrings, a debug message will be emitted, and the first result will be returned. It is expected that the keyrings should match. If no match can be found, a %G_IO_ERROR_NOT_FOUND error will be returned. #OstreeRemote containing the GPG keyring for @collection_id an #OstreeRepo the collection ID to look up a keyring for a #GCancellable, or %NULL Look up the given refspec, returning the checksum it references in the parameter @out_rev. Will fall back on remote directory if cannot find the given refspec in local. Repo A refspec Do not throw an error if refspec does not exist A checksum,or %NULL if @allow_noent is true and it does not exist Look up the given refspec, returning the checksum it references in the parameter @out_rev. Differently from ostree_repo_resolve_rev(), this will not fall back to searching through remote repos if a local ref is specified but not found. Repo A refspec Do not throw an error if refspec does not exist Options controlling behavior A checksum,or %NULL if @allow_noent is true and it does not exist This function is deprecated in favor of using ostree_repo_devino_cache_new(), which allows a precise mapping to be built up between hardlink checkout files and their checksums between `ostree_repo_checkout_at()` and `ostree_repo_write_directory_to_mtree()`. When invoking ostree_repo_write_directory_to_mtree(), it has to compute the checksum of all files. If your commit contains hardlinks from a checkout, this functions builds a mapping of device numbers and inodes to their checksum. There is an upfront cost to creating this mapping, as this will scan the entire objects directory. If your commit is composed of mostly hardlinks to existing ostree objects, then this will speed up considerably, so call it before you call ostree_repo_write_directory_to_mtree() or similar. However, ostree_repo_devino_cache_new() is better as it avoids scanning all objects. Multithreading: This function is *not* MT safe. An #OstreeRepo Cancellable Like ostree_repo_set_ref_immediate(), but creates an alias. An #OstreeRepo A remote for the ref The ref to write The ref target to point it to, or %NULL to unset GCancellable Set a custom location for the cache directory used for e.g. per-remote summary caches. Setting this manually is useful when doing operations on a system repo as a user because you don't have write permissions in the repo, where the cache is normally stored. An #OstreeRepo directory fd subpath in @dfd a #GCancellable Set or clear the collection ID of this repository. See [collection IDs][collection-ids]. The update will be made in memory, but must be written out to the repository configuration on disk using ostree_repo_write_config(). %TRUE on success, %FALSE otherwise an #OstreeRepo new collection ID, or %NULL to unset it This is like ostree_repo_transaction_set_collection_ref(), except it may be invoked outside of a transaction. This is presently safe for the case where we're creating or overwriting an existing ref. %TRUE on success, %FALSE otherwise An #OstreeRepo The collection–ref to write The checksum to point it to, or %NULL to unset GCancellable Disable requests to fsync() to stable storage during commits. This option should only be used by build system tools which are creating disposable virtual machines, or have higher level mechanisms for ensuring data consistency. An #OstreeRepo If %TRUE, do not fsync This is like ostree_repo_transaction_set_ref(), except it may be invoked outside of a transaction. This is presently safe for the case where we're creating or overwriting an existing ref. Multithreading: This function is MT safe. An #OstreeRepo A remote for the ref The ref to write The checksum to point it to, or %NULL to unset GCancellable Add a GPG signature to a commit. Self SHA256 of given commit to sign Use this GPG key id GPG home directory, or %NULL A #GCancellable This function is deprecated, sign the summary file instead. Add a GPG signature to a static delta. Self From commit To commit key id homedir cancellable Given a directory representing an already-downloaded static delta on disk, apply it, generating a new commit. The directory must be named with the form "FROM-TO", where both are checksums, and it must contain a file named "superblock", along with at least one part. Repo Path to a directory containing static delta data, or directly to the superblock If %TRUE, assume data integrity Cancellable Generate a lookaside "static delta" from @from (%NULL means from-empty) which can generate the objects in @to. This delta is an optimization over fetching individual objects, and can be conveniently stored and applied offline. The @params argument should be an a{sv}. The following attributes are known: - min-fallback-size: u: Minimum uncompressed size in megabytes to use fallback, 0 to disable fallbacks - max-chunk-size: u: Maximum size in megabytes of a delta part - max-bsdiff-size: u: Maximum size in megabytes to consider bsdiff compression for input files - compression: y: Compression type: 0=none, x=lzma, g=gzip - bsdiff-enabled: b: Enable bsdiff compression. Default TRUE. - inline-parts: b: Put part data in header, to get a single file delta. Default FALSE. - verbose: b: Print diagnostic messages. Default FALSE. - endianness: b: Deltas use host byte order by default; this option allows choosing (G_BIG_ENDIAN or G_LITTLE_ENDIAN) - filename: ay: Save delta superblock to this filename, and parts in the same directory. Default saves to repository. Repo High level optimization choice ASCII SHA256 checksum of origin, or %NULL ASCII SHA256 checksum of target Optional metadata Parameters, see below Cancellable If @checksum is not %NULL, then record it as the target of local ref named @ref. Otherwise, if @checksum is %NULL, then record that the ref should be deleted. The change will not be written out immediately, but when the transaction is completed with ostree_repo_commit_transaction(). If the transaction is instead aborted with ostree_repo_abort_transaction(), no changes will be made to the repository. Multithreading: Since v2017.15 this function is MT safe. An #OstreeRepo The collection–ref to write The checksum to point it to If @checksum is not %NULL, then record it as the target of ref named @ref; if @remote is provided, the ref will appear to originate from that remote. Otherwise, if @checksum is %NULL, then record that the ref should be deleted. The change will be written when the transaction is completed with ostree_repo_commit_transaction(); that function takes care of writing all of the objects (such as the commit referred to by @checksum) before updating the refs. If the transaction is instead aborted with ostree_repo_abort_transaction(), no changes to the ref will be made to the repository. Note however that currently writing *multiple* refs is not truly atomic; if the process or system is terminated during ostree_repo_commit_transaction(), it is possible that just some of the refs will have been updated. Your application should take care to handle this case. Multithreading: Since v2017.15 this function is MT safe. An #OstreeRepo A remote for the ref The ref to write The checksum to point it to Like ostree_repo_transaction_set_ref(), but takes concatenated @refspec format as input instead of separate remote and name arguments. Multithreading: Since v2017.15 this function is MT safe. An #OstreeRepo The refspec to write The checksum to point it to Create a new set @out_reachable containing all objects reachable from @commit_checksum, traversing @maxdepth parent commits. Repo ASCII SHA256 checksum Traverse this many parent commits, -1 for unlimited Set of reachable objects Cancellable Update the set @inout_reachable containing all objects reachable from @commit_checksum, traversing @maxdepth parent commits. Repo ASCII SHA256 checksum Traverse this many parent commits, -1 for unlimited Set of reachable objects Cancellable Update the set @inout_reachable containing all objects reachable from @commit_checksum, traversing @maxdepth parent commits. Additionally this constructs a mapping from each object to the parents of the object, which can be used to track which commits an object belongs to. Repo ASCII SHA256 checksum Traverse this many parent commits, -1 for unlimited Set of reachable objects Map from object to parent object Cancellable Add all commit objects directly reachable via a ref to @reachable. Locking: shared Repo Depth of traversal Set of reachable objects (will be modified) Cancellable Check for a valid GPG signature on commit named by the ASCII checksum @commit_checksum. %TRUE if there was a GPG signature from a trusted keyring, otherwise %FALSE Repository ASCII SHA256 checksum Path to directory GPG keyrings; overrides built-in default if given Path to additional keyring file (not a directory) Cancellable Read GPG signature(s) on the commit named by the ASCII checksum @commit_checksum and return detailed results. an #OstreeGpgVerifyResult, or %NULL on error Repository ASCII SHA256 checksum Path to directory GPG keyrings; overrides built-in default if given Path to additional keyring file (not a directory) Cancellable Read GPG signature(s) on the commit named by the ASCII checksum @commit_checksum and return detailed results, based on the keyring configured for @remote. an #OstreeGpgVerifyResult, or %NULL on error Repository ASCII SHA256 checksum OSTree remote to use for configuration Cancellable Verify @signatures for @summary data using GPG keys in the keyring for @remote_name, and return an #OstreeGpgVerifyResult. an #OstreeGpgVerifyResult, or %NULL on error Repo Name of remote Summary data as a #GBytes Summary signatures as a #GBytes Cancellable Import an archive file @archive into the repository, and write its file structure to @mtree. An #OstreeRepo A path to an archive file The #OstreeMutableTree to write to Optional commit modifier Autocreate parent directories Cancellable Write a commit metadata object, referencing @root_contents_checksum and @root_metadata_checksum. Repo ASCII SHA256 checksum for parent, or %NULL for none Subject Body GVariant of type a{sv}, or %NULL for none The tree to point the commit to Resulting ASCII SHA256 checksum for commit Cancellable Replace any existing metadata associated with commit referred to by @checksum with @metadata. If @metadata is %NULL, then existing data will be deleted. Repo ASCII SHA256 commit checksum Metadata to associate with commit in with format "a{sv}", or %NULL to delete Cancellable Write a commit metadata object, referencing @root_contents_checksum and @root_metadata_checksum. Repo ASCII SHA256 checksum for parent, or %NULL for none Subject Body GVariant of type a{sv}, or %NULL for none The tree to point the commit to The time to use to stamp the commit Resulting ASCII SHA256 checksum for commit Cancellable Save @new_config in place of this repository's config file. Repo Overwrite the config file with this data Store the content object streamed as @object_input, with total length @length. The actual checksum will be returned as @out_csum. Repo If provided, validate content against this checksum Content object stream Length of @object_input Binary checksum Cancellable Asynchronously store the content object @object. If provided, the checksum @expected_checksum will be verified. Repo If provided, validate content against this checksum Input Length of @object Cancellable Invoked when content is writed User data for @callback Completes an invocation of ostree_repo_write_content_async(). a #OstreeRepo a #GAsyncResult A binary SHA256 checksum of the content object Store the content object streamed as @object_input, with total length @length. The given @checksum will be treated as trusted. This function should be used when importing file objects from local disk, for example. Repo Store content using this ASCII SHA256 checksum Content stream Length of @object_input Cancellable Store as objects all contents of the directory referred to by @dfd and @path all children into the repository @self, overlaying the resulting filesystem hierarchy into @mtree. Repo Directory file descriptor Path Overlay directory contents into this tree Optional modifier Cancellable Store objects for @dir and all children into the repository @self, overlaying the resulting filesystem hierarchy into @mtree. Repo Path to a directory Overlay directory contents into this tree Optional modifier Cancellable Store the metadata object @object. Return the checksum as @out_csum. If @expected_checksum is not %NULL, verify it against the computed checksum. Repo Object type If provided, validate content against this checksum Metadata Binary checksum Cancellable Asynchronously store the metadata object @variant. If provided, the checksum @expected_checksum will be verified. Repo Object type If provided, validate content against this checksum Metadata Cancellable Invoked when metadata is writed Data for @callback Complete a call to ostree_repo_write_metadata_async(). Repo Result Binary checksum value Store the metadata object @variant; the provided @checksum is trusted. Repo Object type Store object with this ASCII SHA256 checksum Metadata object stream Length, may be 0 for unknown Cancellable Store the metadata object @variant; the provided @checksum is trusted. Repo Object type Store object with this ASCII SHA256 checksum Metadata object Cancellable Write all metadata objects for @mtree to repo; the resulting @out_file points to the %OSTREE_OBJECT_TYPE_DIR_TREE object that the @mtree represented. Repo Mutable tree An #OstreeRepoFile representing @mtree's root. Cancellable Path to repository. Note that if this repository was created via `ostree_repo_new_at()`, this value will refer to a value in the Linux kernel's `/proc/self/fd` directory. Generally, you should avoid using this property at all; you can gain a reference to the repository's directory fd via `ostree_repo_get_dfd()` and use file-descriptor relative operations. Path to directory containing remote definitions. The default is `NULL`. If a `sysroot-path` property is defined, this value will default to `${sysroot_path}/etc/ostree/remotes.d`. This value will only be used for system repositories. A system using libostree for the host has a "system" repository; this property will be set for repositories referenced via `ostree_sysroot_repo()` for example. You should avoid using this property; if your code is operating on a system repository, use `OstreeSysroot` and access the repository object via `ostree_sysroot_repo()`. Emitted during a pull operation upon GPG verification (if enabled). Applications can connect to this signal to output the verification results if desired. The signal will be emitted from whichever #GMainContext is the thread-default at the point when ostree_repo_pull_with_options() is called. checksum of the signed object an #OstreeGpgVerifyResult An extensible options structure controlling checkout. Ensure that you have entirely zeroed the structure, then set just the desired options. This is used by ostree_repo_checkout_at() which supercedes previous separate enumeration usage in ostree_repo_checkout_tree() and ostree_repo_checkout_tree_at(). This function simply assigns @cache to the `devino_to_csum_cache` member of @opts; it's only useful for introspection. Note that cache does *not* have its refcount incremented - the lifetime of @cache must be equal to or greater than that of @opts. Checkout options Devino cache #OstreeRepoCheckoutFilterResult saying whether or not to checkout this file Repo Path to file File information User data Do checkout this object Ignore this object No special options Ignore uid/gid of files An extensible options structure controlling checkout. Ensure that you have entirely zeroed the structure, then set just the desired options. This is used by ostree_repo_checkout_tree_at() which supercedes previous separate enumeration usage in ostree_repo_checkout_tree(). No special options When layering checkouts, unlink() and replace existing files, but do not modify existing directories (unless whiteouts are enabled, then directories are replaced) Only add new files/directories Like UNION_FILES, but error if files are not identical (requires hardlink checkouts) #OstreeRepoCommitFilterResult saying whether or not to commit this file Repo Path to file File information User data Do commit this object Ignore this object A structure allowing control over commits. A new commit modifier. Control options for filter Function that can inspect individual files User data A #GDestroyNotify See the documentation for `ostree_repo_devino_cache_new()`. This function can then be used for later calls to `ostree_repo_write_directory_to_mtree()` to optimize commits. Note if your process has multiple writers, you should use separate `OSTreeRepo` instances if you want to also use this API. This function will add a reference to @cache without copying - you should avoid further mutation of the cache. Modifier A hash table caching device,inode to checksums If @policy is non-%NULL, use it to look up labels to use for "security.selinux" extended attributes. Note that any policy specified this way operates in addition to any extended attributes provided via ostree_repo_commit_modifier_set_xattr_callback(). However if both specify a value for "security.selinux", then the one from the policy wins. An #OstreeRepoCommitModifier Policy to use for labeling If set, this function should return extended attributes to use for the given path. This is useful for things like ACLs and SELinux, where a build system can label the files as it's committing to the repository. An #OstreeRepoCommitModifier Function to be invoked, should return extended attributes for path Destroy notification Data for @callback: No special flags Do not process extended attributes Generate size information. Canonicalize permissions for bare-user-only mode. Emit an error if configured SELinux policy does not provide a label Delete added files/directories after commit; Since: 2017.13 If a devino cache hit is found, skip modifier filters (non-directories only); Since: 2017.14 Flags representing the state of a commit in the local repository, as returned by ostree_repo_load_commit(). Commit is complete. This is the default. (Since: 2017.14.) One or more objects are missing from the local copy of the commit, but metadata is present. (Since: 2015.7.) Return information on the current directory. This function may only be called if %OSTREE_REPO_COMMIT_ITER_RESULT_DIR was returned from ostree_repo_commit_traverse_iter_next(). An iter Name of current dir Checksum of current content Checksum of current metadata Return information on the current file. This function may only be called if %OSTREE_REPO_COMMIT_ITER_RESULT_FILE was returned from ostree_repo_commit_traverse_iter_next(). An iter Name of current file Checksum of current file Initialize (in place) an iterator over the root of a commit object. An iter A repo Variant of type %OSTREE_OBJECT_TYPE_COMMIT Flags Initialize (in place) an iterator over a directory tree. An iter A repo Variant of type %OSTREE_OBJECT_TYPE_DIR_TREE Flags Step the interator to the next item. Files will be returned first, then subdirectories. Call this in a loop; upon encountering %OSTREE_REPO_COMMIT_ITER_RESULT_END, there will be no more files or directories. If %OSTREE_REPO_COMMIT_ITER_RESULT_DIR is returned, then call ostree_repo_commit_traverse_iter_get_dir() to retrieve data for that directory. Similarly, if %OSTREE_REPO_COMMIT_ITER_RESULT_FILE is returned, call ostree_repo_commit_traverse_iter_get_file(). If %OSTREE_REPO_COMMIT_ITER_RESULT_ERROR is returned, it is a program error to call any further API on @iter except for ostree_repo_commit_traverse_iter_clear(). An iter Cancellable OSTree has support for pairing ostree_repo_checkout_tree_at() using hardlinks in combination with a later ostree_repo_write_directory_to_mtree() using a (normally modified) directory. In order for OSTree to optimally detect just the new files, use this function and fill in the `devino_to_csum_cache` member of `OstreeRepoCheckoutAtOptions`, then call ostree_repo_commit_set_devino_cache(). Newly allocated cache An extensible options structure controlling archive creation. Ensure that you have entirely zeroed the structure, then set just the desired options. This is used by ostree_repo_export_tree_to_archive(). Repository The root directory for the commit referenced by this file A version of ostree_repo_finder_resolve_async() which queries one or more @finders in parallel and combines the results. non-empty array of #OstreeRepoFinders non-empty array of collection–ref pairs to find remotes for the local repository which the refs are being resolved for, which provides configuration information and GPG keys a #GCancellable, or %NULL asynchronous completion callback data to pass to @callback Get the results from a ostree_repo_finder_resolve_all_async() operation. array of zero or more results #GAsyncResult from the callback Find reachable remote URIs which claim to provide any of the given @refs. The specific method for finding the remotes depends on the #OstreeRepoFinder implementation. Any remote which is found and which claims to support any of the given @refs will be returned in the results. It is possible that a remote claims to support a given ref, but turns out not to — it is not possible to verify this until ostree_repo_pull_from_remotes_async() is called. The returned results will be sorted with the most useful first — this is typically the remote which claims to provide the most @refs, at the lowest latency. Each result contains a mapping of @refs to the checksums of the commits which the result provides. If the result provides the latest commit for a ref across all of the results, the checksum will be set. Otherwise, if the result provides an outdated commit, or doesn’t provide a given ref at all, the checksum will not be set. Results which provide none of the requested @refs may be listed with an empty refs map. Pass the results to ostree_repo_pull_from_remotes_async() to pull the given @refs from those remotes. an #OstreeRepoFinder non-empty array of collection–ref pairs to find remotes for the local repository which the refs are being resolved for, which provides configuration information and GPG keys a #GCancellable, or %NULL asynchronous completion callback data to pass to @callback Get the results from a ostree_repo_finder_resolve_async() operation. array of zero or more results an #OstreeRepoFinder #GAsyncResult from the callback Find reachable remote URIs which claim to provide any of the given @refs. The specific method for finding the remotes depends on the #OstreeRepoFinder implementation. Any remote which is found and which claims to support any of the given @refs will be returned in the results. It is possible that a remote claims to support a given ref, but turns out not to — it is not possible to verify this until ostree_repo_pull_from_remotes_async() is called. The returned results will be sorted with the most useful first — this is typically the remote which claims to provide the most @refs, at the lowest latency. Each result contains a mapping of @refs to the checksums of the commits which the result provides. If the result provides the latest commit for a ref across all of the results, the checksum will be set. Otherwise, if the result provides an outdated commit, or doesn’t provide a given ref at all, the checksum will not be set. Results which provide none of the requested @refs may be listed with an empty refs map. Pass the results to ostree_repo_pull_from_remotes_async() to pull the given @refs from those remotes. an #OstreeRepoFinder non-empty array of collection–ref pairs to find remotes for the local repository which the refs are being resolved for, which provides configuration information and GPG keys a #GCancellable, or %NULL asynchronous completion callback data to pass to @callback Get the results from a ostree_repo_finder_resolve_async() operation. array of zero or more results an #OstreeRepoFinder #GAsyncResult from the callback Start monitoring the local network for peers who are advertising OSTree repositories, using Avahi. In order for this to work, the #GMainContext passed to @self at construction time must be iterated (so it will typically be the global #GMainContext, or be a separate #GMainContext in a worker thread). This will return an error (%G_IO_ERROR_FAILED) if initialisation fails, or if Avahi support is not available (%G_IO_ERROR_NOT_SUPPORTED). In either case, the #OstreeRepoFinderAvahi instance is useless afterwards and should be destroyed. Call ostree_repo_finder_avahi_stop() to stop the repo finder. It is an error to call this function multiple times on the same #OstreeRepoFinderAvahi instance, or to call it after ostree_repo_finder_avahi_stop(). an #OstreeRepoFinderAvahi Stop monitoring the local network for peers who are advertising OSTree repositories. If any resolve tasks (from ostree_repo_finder_resolve_async()) are in progress, they will be cancelled and will return %G_IO_ERROR_CANCELLED. Call ostree_repo_finder_avahi_start() to start the repo finder. It is an error to call this function multiple times on the same #OstreeRepoFinderAvahi instance, or to call it before ostree_repo_finder_avahi_start(). an #OstreeRepoFinderAvahi Create a new #OstreeRepoFinderConfig. a new #OstreeRepoFinderConfig an #OstreeRepoFinder non-empty array of collection–ref pairs to find remotes for the local repository which the refs are being resolved for, which provides configuration information and GPG keys a #GCancellable, or %NULL asynchronous completion callback data to pass to @callback array of zero or more results an #OstreeRepoFinder #GAsyncResult from the callback Create a new #OstreeRepoFinderMount, using the given @monitor to look up volumes. If @monitor is %NULL, the monitor from g_volume_monitor_get() will be used. a new #OstreeRepoFinderMount volume monitor to use, or %NULL to use the system default Volume monitor to use to look up mounted volumes when queried. Create a new #OstreeRepoFinderOverride. a new #OstreeRepoFinderOverride Add the given @uri to the set of URIs which the repo finder will search for matching refs when ostree_repo_finder_resolve_async() is called on it. URI to add to the repo finder #OstreeRepoFinderResult gives a single result from an ostree_repo_finder_resolve_async() or ostree_repo_finder_resolve_all_async() operation. This represents a single remote which provides none, some or all of the refs being resolved. The structure includes various bits of metadata which allow ostree_repo_pull_from_remotes_async() (for example) to prioritise how to pull the refs. The @priority is used as one input of many to ordering functions like ostree_repo_finder_result_compare(). @ref_to_checksum indicates which refs (out of the ones queried for as inputs to ostree_repo_finder_resolve_async()) are provided by this remote. The refs are present as keys (of type #OstreeCollectionRef), and the corresponding values are the checksums of the commits the remote currently has for those refs. (These might not be the latest commits available out of all results.) A checksum may be %NULL if the remote does not advertise the corresponding ref. After ostree_repo_finder_resolve_async() has been called, the commit metadata should be available locally, so the details for each checksum can be looked up using ostree_repo_load_commit(). @ref_to_timestamp provides timestamps for the set of refs in @ref_to_checksum. The refs are keys (of type #OstreeCollectionRef) and the values are guint64 pointers with the timestamp associated with the checksum provided in @ref_to_checksum. @ref_to_timestamp can be %NULL, and when it's not, the timestamps are zero when any of the following conditions are met: (1) the override-commit-ids option was used on ostree_repo_find_remotes_async (2) there was an error in trying to get the commit metadata (3) the checksum for this ref is %NULL in @ref_to_checksum. #OstreeRemote which contains the transport details for the result, such as its URI and GPG key the #OstreeRepoFinder instance which produced this result static priority of the result, where higher numbers indicate lower priority map of collection–ref pairs to checksums provided by this remote; values may be %NULL to indicate this remote doesn’t provide that ref Unix timestamp (seconds since the epoch, UTC) when the summary file on the remote was last modified, or `0` if unknown map of collection–ref pairs to timestamps; values may be 0 for various reasons Create a new #OstreeRepoFinderResult instance. The semantics for the arguments are as described in the #OstreeRepoFinderResult documentation. a new #OstreeRepoFinderResult an #OstreeRemote containing the transport details for the result the #OstreeRepoFinder instance which produced the result static priority of the result, where higher numbers indicate lower priority map of collection–ref pairs to checksums provided by this result map of collection–ref pairs to timestamps provided by this result Unix timestamp (seconds since the epoch, UTC) when the summary file for the result was last modified, or `0` if this is unknown Compare two #OstreeRepoFinderResult instances to work out which one is better to pull from, and hence needs to be ordered before the other. <0 if @a is ordered before @b, 0 if they are ordered equally, >0 if @b is ordered before @a an #OstreeRepoFinderResult an #OstreeRepoFinderResult Copy an #OstreeRepoFinderResult. a newly allocated copy of @result an #OstreeRepoFinderResult to copy Free the given @result. an #OstreeRepoFinderResult Free the given @results array, freeing each element and the container. an #OstreeRepoFinderResult An extensible options structure controlling archive import. Ensure that you have entirely zeroed the structure, then set just the desired options. This is used by ostree_repo_import_archive_to_mtree(). Possibly change a pathname while importing an archive. If %NULL is returned, then @src_path will be used unchanged. Otherwise, return a new pathname which will be freed via `g_free()`. This pathname translation will be performed *before* any processing from an active `OstreeRepoCommitModifier`. Will be invoked for all directory and file types, first with outer directories, then their sub-files and directories. Note that enabling pathname translation will always override the setting for `use_ostree_convention`. Repo Stat buffer Path in the archive User data List only loose (plain file) objects List only packed (compacted into blobs) objects List all objects Only list objects in this repo, not parents No flags. Only list aliases. Since: 2017.10 Exclude remote refs. Since: 2017.11 See the documentation of #OstreeRepo for more information about the possible modes. Files are stored as themselves; checkouts are hardlinks; can only be written as root Files are compressed, should be owned by non-root. Can be served via HTTP. Since: 2017.12 Legacy alias for `OSTREE_REPO_MODE_ARCHIVE` Files are stored as themselves, except ownership; can be written by user. Hardlinks work only in user checkouts. Same as BARE_USER, but all metadata is not stored, so it can only be used for user checkouts. Does not need xattrs. No special options for pruning Don't actually delete objects Do not traverse individual commit objects, only follow refs No special options for pull Write out refs suitable for mirrors and fetch all refs if none requested Fetch only the commit metadata Do verify checksums of local (filesystem-accessible) repositories (defaults on for HTTP) Since 2017.7. Reject writes of content objects with modes outside of 0775. Don't verify checksums of objects HTTP repositories (Since: 2017.12) The remote change operation. Add a remote Like above, but do nothing if the remote exists Delete a remote Delete a remote, do nothing if the remote does not exist No flags. A list of statistics for each transaction that may be interesting for reporting purposes. The total number of metadata objects in the repository after this transaction has completed. The number of metadata objects that were written to the repository in this transaction. The total number of content objects in the repository after this transaction has completed. The number of content objects that were written to the repository in this transaction. The amount of data added to the repository, in bytes, counting only content objects. reserved reserved reserved reserved Length of a sha256 digest when expressed as raw bytes Length of a sha256 digest when expressed as a hexadecimal string An accessor object for SELinux policy in root located at @path Path to a root directory Cancellable An accessor object for SELinux policy in root located at @rootfs_dfd Directory fd for rootfs (will not be cloned) Cancellable Cleanup function for ostree_sepolicy_setfscreatecon(). Not used, just in case you didn't infer that from the parameter name Checksum of current policy Store in @out_label the security context for the given @relpath and mode @unix_mode. If the policy does not specify a label, %NULL will be returned. Self Path Unix mode Return location for security context Cancellable Type of current policy Path to rootfs Reset the security context of @target based on the SELinux policy. Self Path string to use for policy lookup File attributes Physical path to target file Flags controlling behavior New label, or %NULL if unchanged Cancellable Policy Use this path to determine a label Used along with @path Parameters controlling optimization of static deltas. Optimize for speed of delta creation over space Optimize for delta size (may be very slow) Create a new #OstreeSysroot object for the sysroot at @path. If @path is %NULL, the current visible root file system is used, equivalent to ostree_sysroot_new_default(). An accessor object for an system root located at @path Path to a system root directory, or %NULL to use the current visible root file system An accessor for the current visible root / filesystem Path to deployment origin file A deployment path Delete any state that resulted from a partially completed transaction, such as incomplete deployments. Sysroot Cancellable Prune the system repository. This is a thin wrapper around ostree_repo_prune_from_reachable(); the primary addition is that this function automatically gathers all deployed commits into the reachable set. You generally want to at least set the `OSTREE_REPO_PRUNE_FLAGS_REFS_ONLY` flag in @options. A commit traversal depth of `0` is assumed. Locking: exclusive Sysroot Flags controlling pruning Number of objects found Number of objects deleted Storage size in bytes of objects deleted Cancellable Check out deployment tree with revision @revision, performing a 3 way merge with @provided_merge_deployment for configuration. While this API is not deprecated, you most likely want to use the ostree_sysroot_stage_tree() API. Sysroot osname to use for merge deployment Checksum to add Origin to use for upgrades Use this deployment for merge path Use these as kernel arguments; if %NULL, inherit options from provided_merge_deployment The new deployment path Cancellable Entirely replace the kernel arguments of @deployment with the values in @new_kargs. Sysroot A deployment Replace deployment's kernel arguments Cancellable By default, deployment directories are not mutable. This function will allow making them temporarily mutable, for example to allow layering additional non-OSTree content. Sysroot A deployment Whether or not deployment's files can be changed Cancellable By default, deployments may be subject to garbage collection. Typical uses of libostree only retain at most 2 deployments. If @is_pinned is `TRUE`, a metadata bit will be set causing libostree to avoid automatic GC of the deployment. However, this is really an "advisory" note; it's still possible for e.g. older versions of libostree unaware of pinning to GC the deployment. This function does nothing and returns successfully if the deployment is already in the desired pinning state. It is an error to try to pin the staged deployment (as it's not in the bootloader entries). Sysroot A deployment Whether or not deployment will be automatically GC'd Configure the target deployment @deployment such that it is writable. There are multiple modes, essentially differing in whether or not any changes persist across reboot. The `OSTREE_DEPLOYMENT_UNLOCKED_HOTFIX` state is persistent across reboots. Sysroot Deployment Transition to this unlocked state Cancellable Ensure that @self is set up as a valid rootfs, by creating /ostree/repo, among other things. Sysroot Cancellable The currently booted deployment, or %NULL if none Sysroot Path to deployment root directory Sysroot A deployment Note this function only returns a *relative* path - if you want to access, it, you must either use fd-relative api such as openat(), or concatenate it with the full ostree_sysroot_get_path(). Path to deployment root directory, relative to sysroot Repo A deployment Ordered list of deployments Sysroot Access a file descriptor that refers to the root directory of this sysroot. ostree_sysroot_load() must have been invoked prior to calling this function. A file descriptor valid for the lifetime of @self Sysroot Find the deployment to use as a configuration merge source; this is the first one in the current deployment list which matches osname. Configuration merge deployment Sysroot Operating system group Path to rootfs Retrieve the OSTree repository in sysroot @self. The repo is guaranteed to be open (see ostree_repo_open()). %TRUE on success, %FALSE otherwise Sysroot Repository in sysroot @self Cancellable The currently staged deployment, or %NULL if none Sysroot Initialize the directory structure for an "osname", which is a group of operating system deployments, with a shared `/var`. One is required for generating a deployment. Sysroot Name group of operating system checkouts Cancellable Load deployment list, bootversion, and subbootversion from the rootfs @self. Sysroot Cancellable Acquire an exclusive multi-process write lock for @self. This call blocks until the lock has been acquired. The lock is not reentrant. Release the lock with ostree_sysroot_unlock(). The lock will also be released if @self is deallocated. Self An asynchronous version of ostree_sysroot_lock(). Self Cancellable Callback User data Call when ostree_sysroot_lock_async() is ready. Self Result A new config file which sets @refspec as an origin Sysroot A refspec Like ostree_sysroot_cleanup() in that it cleans up incomplete deployments and old boot versions, but does NOT prune the repository. Sysroot Cancellable Find the pending and rollback deployments for @osname. Pass %NULL for @osname to use the booted deployment's osname. By default, pending deployment is the first deployment in the order that matches @osname, and @rollback will be the next one after the booted deployment, or the deployment after the pending if we're not looking at the booted deployment. Sysroot "stateroot" name The pending deployment The rollback deployment This function is a variant of ostree_sysroot_get_repo() that cannot fail, and returns a cached repository. Can only be called after ostree_sysroot_load() has been invoked successfully. The OSTree repository in sysroot @self. Sysroot Prepend @new_deployment to the list of deployments, commit, and cleanup. By default, all other deployments for the given @osname except the merge deployment and the booted deployment will be garbage collected. If %OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_RETAIN is specified, then all current deployments will be kept. If %OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_RETAIN_PENDING is specified, then pending deployments will be kept. If %OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_RETAIN_ROLLBACK is specified, then rollback deployments will be kept. If %OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_NOT_DEFAULT is specified, then instead of prepending, the new deployment will be added right after the booted or merge deployment, instead of first. If %OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_NO_CLEAN is specified, then no cleanup will be performed after adding the deployment. Make sure to call ostree_sysroot_cleanup() sometime later, instead. Sysroot OS name Prepend this deployment to the list Use this deployment for configuration merge Flags controlling behavior Cancellable Like ostree_sysroot_deploy_tree(), but "finalization" only occurs at OS shutdown time. Sysroot osname to use for merge deployment Checksum to add Origin to use for upgrades Use this deployment for merge path Use these as kernel arguments; if %NULL, inherit options from provided_merge_deployment The new deployment path Cancellable Try to acquire an exclusive multi-process write lock for @self. If another process holds the lock, this function will return immediately, setting @out_acquired to %FALSE, and returning %TRUE (and no error). Release the lock with ostree_sysroot_unlock(). The lock will also be released if @self is deallocated. Self Whether or not the lock has been acquired Release any resources such as file descriptors referring to the root directory of this sysroot. Normally, those resources are cleared by finalization, but in garbage collected languages that may not be predictable. This undoes the effect of `ostree_sysroot_load()`. Sysroot Clear the lock previously acquired with ostree_sysroot_lock(). It is safe to call this function if the lock has not been previously acquired. Self Older version of ostree_sysroot_write_deployments_with_options(). This version will perform post-deployment cleanup by default. Sysroot List of new deployments Cancellable Assuming @new_deployments have already been deployed in place on disk via ostree_sysroot_deploy_tree(), atomically update bootloader configuration. By default, no post-transaction cleanup will be performed. You should invoke ostree_sysroot_cleanup() at some point after the transaction, or specify `do_postclean` in @opts. Skipping the post-transaction cleanup is useful if for example you want to control pruning of the repository. Sysroot List of new deployments Options Cancellable Immediately replace the origin file of the referenced @deployment with the contents of @new_origin. If @new_origin is %NULL, this function will write the current origin of @deployment. System root Deployment Origin content Cancellable libostree will log to the journal various events, such as the /etc merge status, and transaction completion. Connect to this signal to also synchronously receive the text for those messages. This is intended to be used by command line tools which link to libostree as a library. Currently, the structured data is only available via the systemd journal. Human-readable string (should not contain newlines) An upgrader An #OstreeSysroot Cancellable An upgrader An #OstreeSysroot Operating system name Cancellable An upgrader An #OstreeSysroot Operating system name Flags Cancellable Check that the timestamp on @to_rev is equal to or newer than @from_rev. This protects systems against man-in-the-middle attackers which provide a client with an older commit. Repo From revision To revision Write the new deployment to disk, perform a configuration merge with /etc, and update the bootloader configuration. Self Cancellable A copy of the origin file, or %NULL if unknown Sysroot The origin file, or %NULL if unknown Sysroot A one-line descriptive summary of the origin, or %NULL if unknown Upgrader 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 @out_changed will be %TRUE. If the origin remote is unchanged, @out_changed will be set to %FALSE. Upgrader Flags controlling pull behavior Flags controlling upgrader behavior Progress Whether or not the origin changed Cancellable Like ostree_sysroot_upgrader_pull(), 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. Upgrader Subdirectory path (should include a leading /) Flags controlling pull behavior Flags controlling upgrader behavior Progress Whether or not the origin changed Cancellable Replace the origin with @origin. Sysroot The new origin Cancellable Flags controlling operation of an #OstreeSysrootUpgrader. Do not error if the origin has an unconfigured-state key The mtime used for stored files. This was originally 0, changed to 1 for a few releases, then was reverted due to regressions it introduced from users who had been using zero before. ostree version. ostree version, encoded as a string, useful for printing and concatenation. ostree year version component (e.g. 2017 if %OSTREE_VERSION is 2017.2) In many cases using libostree, a program may need to "break" hardlinks by performing a copy. For example, in order to logically append to a file. This function performs full copying, including e.g. extended attributes and permissions of both regular files and symbolic links. If the file is not hardlinked, this function does nothing and returns successfully. This function does not perform synchronization via `fsync()` or `fdatasync()`; the idea is this will commonly be done as part of an `ostree_repo_commit_transaction()`, which itself takes care of synchronization. Directory fd Path relative to @dfd Do not copy extended attributes %TRUE if current libostree has at least the requested version, %FALSE otherwise Major/year required Release version required Modified base64 encoding of @csum The "modified" term refers to the fact that instead of '/', the '_' character is used. An binary checksum of length 32 Overwrite the contents of @buf with modified base64 encoding of @csum. The "modified" term refers to the fact that instead of '/', the '_' character is used. An binary checksum of length 32 Output location, must be at least 44 bytes in length Overwrite the contents of @buf with stringified version of @csum. An binary checksum of length 32 Output location, must be at least 45 bytes in length Binary version of @checksum. An ASCII checksum Binary checksum data in @bytes; do not free. If @bytes does not have the correct length, return %NULL. #GVariant of type ay Like ostree_checksum_bytes_peek(), but also throws @error. Binary checksum data #GVariant of type ay Compute the OSTree checksum for a given file. File path Object type Return location for binary checksum Cancellable Asynchronously compute the OSTree checksum for a given file; complete with ostree_checksum_file_async_finish(). File path Object type Priority for operation, see %G_IO_PRIORITY_DEFAULT Cancellable Invoked when operation is complete Data for @callback Finish computing the OSTree checksum for a given file; see ostree_checksum_file_async(). File path Async result Return location for binary checksum Compute the OSTree checksum for a given file. This is an fd-relative version of ostree_checksum_file() which also takes flags and fills in a caller allocated buffer. Directory file descriptor Subpath @stbuf (allow-none): Optional stat buffer Object type Flags @out_checksum (out) (transfer full): Return location for hex checksum Cancellable Compute the OSTree checksum for a given input. File information Optional extended attributes File content, should be %NULL for symbolic links Object type Return location for binary checksum Cancellable String form of @csum An binary checksum of length 32 String form of @csum_bytes #GVariant of type ay Overwrite the contents of @buf with stringified version of @csum. An binary checksum of length 32 Output location, must be at least OSTREE_SHA256_STRING_LEN+1 bytes in length Convert @checksum from a string to binary in-place, without allocating memory. Use this function in hot code paths. a SHA256 string Output buffer with at least 32 bytes of space Binary checksum from @checksum of length 32; free with g_free(). An ASCII checksum New #GVariant of type ay with length 32 An ASCII checksum Compare two binary checksums, using memcmp(). A binary checksum A binary checksum Copy an array of #OstreeCollectionRefs, including deep copies of all its elements. @refs must be %NULL-terminated; it may be empty, but must not be %NULL. a newly allocated copy of @refs %NULL-terminated array of #OstreeCollectionRefs Compare @ref1 and @ref2 and return %TRUE if they have the same collection ID and ref name, and %FALSE otherwise. Both @ref1 and @ref2 must be non-%NULL. %TRUE if @ref1 and @ref2 are equal, %FALSE otherwise an #OstreeCollectionRef another #OstreeCollectionRef Free the given array of @refs, including freeing all its elements. @refs must be %NULL-terminated; it may be empty, but must not be %NULL. an array of #OstreeCollectionRefs Hash the given @ref. This function is suitable for use with #GHashTable. @ref must be non-%NULL. hash value for @ref an #OstreeCollectionRef There are use cases where one wants a checksum just of the content of a commit. OSTree commits by default capture the current timestamp, and may have additional metadata, which means that re-committing identical content often results in a new checksum. By comparing checksums of content, it's possible to easily distinguish cases where nothing actually changed. The content checksums is simply defined as `SHA256(root dirtree_checksum || root_dirmeta_checksum)`, i.e. the SHA-256 of the root "dirtree" object's checksum concatenated with the root "dirmeta" checksum (both in binary form, not hexadecimal). A SHA-256 hex string, or %NULL if @commit_variant is not well-formed A commit object Checksum of the parent commit of @commit_variant, or %NULL if none Variant of type %OSTREE_OBJECT_TYPE_COMMIT A thin wrapper for ostree_content_stream_parse(); this function converts an object content stream back into components. Whether or not the stream is zlib-compressed Path to file containing content If %TRUE, assume the content has been validated The raw file content stream Normal metadata Extended attributes Cancellable A thin wrapper for ostree_content_stream_parse(); this function converts an object content stream back into components. Whether or not the stream is zlib-compressed Directory file descriptor Subpath If %TRUE, assume the content has been validated The raw file content stream Normal metadata Extended attributes Cancellable The reverse of ostree_raw_file_to_content_stream(); this function converts an object content stream back into components. Whether or not the stream is zlib-compressed Object content stream Length of stream If %TRUE, assume the content has been validated The raw file content stream Normal metadata Extended attributes Cancellable A new #GVariant containing %OSTREE_OBJECT_TYPE_DIR_META a #GFileInfo containing directory information Optional extended attributes Compute the difference between directory @a and @b as 3 separate sets of #OstreeDiffItem in @modified, @removed, and @added. Flags First directory path, or %NULL First directory path Modified files Removed files Added files Cancellable Compute the difference between directory @a and @b as 3 separate sets of #OstreeDiffItem in @modified, @removed, and @added. Flags First directory path, or %NULL First directory path Modified files Removed files Added files Options Cancellable Print the contents of a diff to stdout. First directory path First directory path Modified files Removed files Added files Use this function with #GHashTable and ostree_object_name_serialize(). A #GVariant containing a serialized object Reverse ostree_object_to_string(). An ASCII checksum Parsed checksum Parsed object type Reverse ostree_object_name_serialize(). Note that @out_checksum is only valid for the lifetime of @variant, and must not be freed. A #GVariant of type (su) Pointer into string memory of @variant with checksum Return object type A new floating #GVariant containing checksum string and objtype An ASCII checksum An object type A string containing both @checksum and a stringifed version of @objtype An ASCII checksum Object type The reverse of ostree_object_type_to_string(). A stringified version of #OstreeObjectType Serialize @objtype to a string; this is used for file extensions. an #OstreeObjectType Split a refspec like `gnome-ostree:gnome-ostree/buildmaster` or just `gnome-ostree/buildmaster` into two parts. In the first case, @out_remote will be set to `gnome-ostree`, and @out_ref to `gnome-ostree/buildmaster`. In the second case (a local ref), @out_remote will be %NULL, and @out_ref will be `gnome-ostree/buildmaster`. In both cases, %TRUE will be returned. %TRUE on successful parsing, %FALSE otherwise A "refspec" string Return location for the remote name, or %NULL if the refspec refs to a local ref Return location for the ref name Convert from a "bare" file representation into an OSTREE_OBJECT_TYPE_FILE stream suitable for ostree pull. File raw content stream A file info Optional extended attributes Serialized object stream Cancellable Like ostree_raw_file_to_archive_z2_stream(), but supports an extensible set of flags. The following flags are currently defined: - `compression-level` (`i`): Level of compression to use, 0–9, with 0 being the least compression, and <0 giving the default level (currently 6). File raw content stream A file info Optional extended attributes A GVariant `a{sv}` with an extensible set of flags Serialized object stream Cancellable Convert from a "bare" file representation into an OSTREE_OBJECT_TYPE_FILE stream. This is a fundamental operation for writing data to an #OstreeRepo. File raw content stream A file info Optional extended attributes Serialized object stream Length of stream Cancellable A version of ostree_repo_finder_resolve_async() which queries one or more @finders in parallel and combines the results. non-empty array of #OstreeRepoFinders non-empty array of collection–ref pairs to find remotes for the local repository which the refs are being resolved for, which provides configuration information and GPG keys a #GCancellable, or %NULL asynchronous completion callback data to pass to @callback Get the results from a ostree_repo_finder_resolve_all_async() operation. array of zero or more results #GAsyncResult from the callback Free the given @results array, freeing each element and the container. an #OstreeRepoFinderResult Use this function to see if input strings are checksums. %TRUE if @sha256 is a valid checksum string, %FALSE otherwise SHA256 hex string Check whether the given @collection_id is valid. Return an error if it is invalid or %NULL. Valid collection IDs are reverse DNS names: * They are composed of 1 or more elements separated by a period (`.`) character. All elements must contain at least one character. * Each element must only contain the ASCII characters `[A-Z][a-z][0-9]_` and must not begin with a digit. * They must contain at least one `.` (period) character (and thus at least two elements). * They must not begin with a `.` (period) character. * They must not exceed 255 characters in length. (This makes their format identical to D-Bus interface names, for consistency.) %TRUE if @collection_id is a valid collection ID, %FALSE if it is invalid or %NULL A collection ID %TRUE if @remote_name is a valid remote name A remote name %TRUE if @rev is a valid ref string A revision string %TRUE if @checksum is a valid ASCII SHA256 checksum an ASCII string Use this to validate the basic structure of @commit, independent of any other objects it references. %TRUE if @commit is structurally valid A commit object, %OSTREE_OBJECT_TYPE_COMMIT %TRUE if @checksum is a valid binary SHA256 checksum a #GVariant of type "ay" Use this to validate the basic structure of @dirmeta. %TRUE if @dirmeta is structurally valid A dirmeta object, %OSTREE_OBJECT_TYPE_DIR_META Use this to validate the basic structure of @dirtree, independent of any other objects it references. %TRUE if @dirtree is structurally valid A dirtree object, %OSTREE_OBJECT_TYPE_DIR_TREE %TRUE if @mode represents a valid file type and permissions A Unix filesystem mode %TRUE if @objtype represents a valid object type