From aee92d14a82e7e303b628f212c49bcb02e323854 Mon Sep 17 00:00:00 2001 From: Felix Krull Date: Tue, 25 Aug 2020 18:36:37 +0200 Subject: [PATCH] Update to OSTree 2020.4 --- rust-bindings/rust/conf/ostree.toml | 3 + rust-bindings/rust/gir-files/OSTree-1.0.gir | 3204 ++++++++++++----- rust-bindings/rust/src/auto/constants.rs | 3 + rust-bindings/rust/src/auto/enums.rs | 88 - rust-bindings/rust/src/auto/flags.rs | 46 + rust-bindings/rust/src/auto/functions.rs | 1 + rust-bindings/rust/src/auto/mod.rs | 12 +- .../rust/src/auto/repo_commit_modifier.rs | 10 + rust-bindings/rust/src/auto/sign.rs | 367 ++ rust-bindings/rust/src/auto/sysroot.rs | 8 - rust-bindings/rust/src/auto/versions.txt | 2 +- rust-bindings/rust/sys/Cargo.toml | 8 +- rust-bindings/rust/sys/src/auto/versions.txt | 2 +- rust-bindings/rust/sys/src/lib.rs | 154 +- rust-bindings/rust/sys/tests/abi.rs | 13 +- 15 files changed, 2958 insertions(+), 963 deletions(-) create mode 100644 rust-bindings/rust/src/auto/sign.rs diff --git a/rust-bindings/rust/conf/ostree.toml b/rust-bindings/rust/conf/ostree.toml index 8289bf53..512beefb 100644 --- a/rust-bindings/rust/conf/ostree.toml +++ b/rust-bindings/rust/conf/ostree.toml @@ -47,6 +47,9 @@ generate = [ "OSTree.RepoPullFlags", "OSTree.RepoRemoteChange", "OSTree.RepoResolveRevExtFlags", + "OSTree.Sign", + "OSTree.SignDummy", + "OSTree.SignEd25519", "OSTree.SePolicy", "OSTree.SePolicyRestoreconFlags", "OSTree.StaticDeltaGenerateOpt", diff --git a/rust-bindings/rust/gir-files/OSTree-1.0.gir b/rust-bindings/rust/gir-files/OSTree-1.0.gir index e8b7fb11..737c8d14 100644 --- a/rust-bindings/rust/gir-files/OSTree-1.0.gir +++ b/rust-bindings/rust/gir-files/OSTree-1.0.gir @@ -898,18 +898,31 @@ of ostree is equal or greater than the required one. + + GVariant type `s`. Intended to describe the CPU architecture. This is a freeform string, and some distributions +which have existing package managers might want to match that schema. If you +don't have a prior schema, it's recommended to use `uname -m` by default (i.e. the Linux kernel schema). In the future +ostree might include a builtin function to compare architectures. + + + GVariant type `s`. If this is added to a commit, `ostree_repo_pull()` + line="278">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. - + version="2017.7"> GVariant type `s`. This metadata key is used to display vendor's message + line="238">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. - + version="2017.7"> GVariant type `s`. Should contain a refspec defining a new target branch; + line="228">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. - + version="2017.9"> GVariant type `as`; each element is a branch name. If this is added to a + line="265">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. - + version="2017.13"> GVariant type `s`. This should hold a relatively short single line value + line="248">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 @@ -966,7 +979,7 @@ 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. - + - + c:symbol-prefix="commit_sizes_entry"> Structure representing an entry in the "ostree.sizes" commit metadata. Each + line="537">Structure representing an entry in the "ostree.sizes" commit metadata. Each entry corresponds to an object in the associated commit. - + object checksum + line="539">object checksum object type + line="540">object type unpacked object size + line="541">unpacked object size compressed object size + line="542">compressed object size version="2020.1"> Create a new #OstreeCommitSizesEntry for representing an object in a + line="2444">Create a new #OstreeCommitSizesEntry for representing an object in a commit's "ostree.sizes" metadata. - + a new #OstreeCommitSizesEntry + line="2454">a new #OstreeCommitSizesEntry object checksum + line="2446">object checksum object type + line="2447">object type unpacked object size + line="2448">unpacked object size compressed object size + line="2449">compressed object size @@ -1516,19 +1529,19 @@ commit's "ostree.sizes" metadata. version="2020.1"> Create a copy of the given @entry. - + line="2474">Create a copy of the given @entry. + a new copy of @entry + line="2480">a new copy of @entry an #OstreeCommitSizesEntry + line="2476">an #OstreeCommitSizesEntry @@ -1539,8 +1552,8 @@ commit's "ostree.sizes" metadata. version="2020.1"> Free given @entry. - + line="2494">Free given @entry. + @@ -1548,7 +1561,7 @@ commit's "ostree.sizes" metadata. an #OstreeCommitSizesEntry + line="2496">an #OstreeCommitSizesEntry @@ -2261,8 +2274,8 @@ The attribute's #GVariantType is shown in brackets. is missing) - + Formatting flags for ostree_gpg_verify_result_describe(). Currently @@ -2276,7 +2289,7 @@ for future variations. filename="ostree-gpg-verify-result.h" line="129">Use the default output format - + @@ -3591,7 +3604,7 @@ exhaustion attacks. version="2018.9"> GVariant type `s`. This key can be used in the repo metadata which is stored + line="1443">GVariant type `s`. This key can be used in the repo metadata which is stored in OSTREE_REPO_METADATA_REF as well as in the summary. The semantics of this are that the remote repository wants clients to update their remote config to add this collection ID (clients can't do P2P operations involving a @@ -3606,7 +3619,7 @@ Flatpak may implement it. This is a replacement for the similar metadata key implemented by flatpak, `xa.collection-id`, which is now deprecated as clients which supported it had bugs with their P2P implementations. - + version="2018.6"> The name of a ref which is used to store metadata for the entire repository, + line="1420">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. @@ -4238,7 +4251,7 @@ 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. - + throws="1"> This is a file-descriptor relative version of ostree_repo_create(). + line="2583">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. @@ -4427,32 +4440,32 @@ The @options dict may contain: A new OSTree repository reference + line="2605">A new OSTree repository reference Directory fd + line="2585">Directory fd Path + line="2586">Path The mode to store the repository in + line="2587">The mode to store the repository in a{sv}: See below for accepted keys + line="2588">a{sv}: See below for accepted keys Cancellable + line="2589">Cancellable @@ -4477,7 +4490,7 @@ The @options dict may contain: a repo mode as a string + line="2409">a repo mode as a string the corresponding #OstreeRepoMode + line="2410">the corresponding #OstreeRepoMode @@ -4532,7 +4545,7 @@ already extant repository. If you want to create one, use ostree_repo_create_at c:identifier="ostree_repo_pull_default_console_progress_changed"> Convenient "changed" callback for use with + line="4789">Convenient "changed" callback for use with ostree_async_progress_new_and_connect() when pulling from a remote repository. @@ -4544,7 +4557,7 @@ 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. - + @@ -4552,7 +4565,7 @@ and @user_data is ignored. Async progress + line="4791">Async progress allow-none="1"> User data + line="4792">User data @@ -4574,7 +4587,7 @@ and @user_data is ignored. line="297">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. - + filename="ostree-repo-traverse.c" line="282">This hash table is a set of #GVariant which can be accessed via ostree_object_name_deserialize(). - + filename="ostree-repo-traverse.c" line="348">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. - + throws="1"> Abort the active transaction; any staged objects and ref changes will be + line="2465">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. @@ -4648,7 +4661,7 @@ transaction will do nothing and return successfully. An #OstreeRepo + line="2467">An #OstreeRepo allow-none="1"> Cancellable + line="2468">Cancellable @@ -4667,8 +4680,8 @@ transaction will do nothing and return successfully. throws="1"> Add a GPG signature to a summary file. - + line="5160">Add a GPG signature to a summary file. + @@ -4676,13 +4689,13 @@ transaction will do nothing and return successfully. Self + line="5162">Self NULL-terminated array of GPG keys. + line="5163">NULL-terminated array of GPG keys. @@ -4693,7 +4706,7 @@ transaction will do nothing and return successfully. allow-none="1"> GPG home directory, or %NULL + line="5164">GPG home directory, or %NULL allow-none="1"> A #GCancellable + line="5165">A #GCancellable @@ -4712,8 +4725,8 @@ transaction will do nothing and return successfully. throws="1"> Append a GPG signature to a commit. - + line="4939">Append a GPG signature to a commit. + @@ -4721,19 +4734,19 @@ transaction will do nothing and return successfully. Self + line="4941">Self SHA256 of given commit to sign + line="4942">SHA256 of given commit to sign Signature data + line="4943">Signature data allow-none="1"> A #GCancellable + line="4944">A #GCancellable @@ -4764,7 +4777,7 @@ 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. - + @@ -4822,7 +4835,7 @@ cache. line="1444">Call this after finishing a succession of checkout operations; it will delete any currently-unused uncompressed objects from the cache. - + @@ -4853,7 +4866,7 @@ cache. 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. - + @@ -4922,7 +4935,7 @@ default is not to use the repository-internal uncompressed objects cache. This function is deprecated. Use ostree_repo_checkout_at() instead. - + @@ -4977,7 +4990,7 @@ This function is deprecated. Use ostree_repo_checkout_at() instead. throws="1"> Complete the transaction. Any refs set with + line="2369">Complete the transaction. Any refs set with ostree_repo_transaction_set_ref() or ostree_repo_transaction_set_refspec() will be written out. @@ -4995,7 +5008,7 @@ active at a time. An #OstreeRepo + line="2371">An #OstreeRepo allow-none="1"> A set of statistics of things + line="2372">A set of statistics of things that happened during this transaction. @@ -5017,7 +5030,7 @@ that happened during this transaction. allow-none="1"> Cancellable + line="2374">Cancellable @@ -5039,7 +5052,7 @@ that happened during this transaction. Create the underlying structure on disk for the repository, and call + line="2535">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 @@ -5061,13 +5074,13 @@ this function on a repository initialized via ostree_repo_open_at(). An #OstreeRepo + line="2537">An #OstreeRepo The mode to store the repository in + line="2538">The mode to store the repository in allow-none="1"> Cancellable + line="2539">Cancellable @@ -5086,7 +5099,7 @@ this function on a repository initialized via ostree_repo_open_at(). throws="1"> Remove the object of type @objtype with checksum @sha256 + line="4234">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. @@ -5097,19 +5110,19 @@ is thrown if the object does not exist. Repo + line="4236">Repo Object type + line="4237">Object type Checksum + line="4238">Checksum allow-none="1"> Cancellable + line="4239">Cancellable @@ -5126,27 +5139,27 @@ is thrown if the object does not exist. Check whether two opened repositories are the same on disk: if their root + line="3508">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 + line="3517">%TRUE if @a and @b are the same repository on disk, %FALSE otherwise an #OstreeRepo + line="3510">an #OstreeRepo an #OstreeRepo + line="3511">an #OstreeRepo @@ -5159,7 +5172,7 @@ ostree_repo_open() not being called on them yet), %FALSE will be returned. filename="ostree-repo-libarchive.c" line="1223">Import an archive file @archive into the repository, and write its file structure to @mtree. - + @@ -5208,7 +5221,7 @@ file structure to @mtree. version="2018.6"> Find reachable remote URIs which claim to provide any of the given named + line="4893">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 @@ -5248,7 +5261,7 @@ this is not guaranteed). GPG verification of commits will be used unconditionally. This will use the thread-default #GMainContext, but will not iterate it. - + @@ -5256,13 +5269,13 @@ This will use the thread-default #GMainContext, but will not iterate it. an #OstreeRepo + line="4895">an #OstreeRepo non-empty array of collection–ref pairs to find remotes for + line="4896">non-empty array of collection–ref pairs to find remotes for @@ -5273,13 +5286,13 @@ This will use the thread-default #GMainContext, but will not iterate it. allow-none="1"> a GVariant `a{sv}` with an extensible set of flags + line="4897">a GVariant `a{sv}` with an extensible set of flags non-empty array of + line="4898">non-empty array of #OstreeRepoFinder instances to use, or %NULL to use the system defaults @@ -5291,7 +5304,7 @@ This will use the thread-default #GMainContext, but will not iterate it. allow-none="1"> an #OstreeAsyncProgress to update with the operation’s + line="4900">an #OstreeAsyncProgress to update with the operation’s progress, or %NULL @@ -5301,7 +5314,7 @@ This will use the thread-default #GMainContext, but will not iterate it. allow-none="1"> a #GCancellable, or %NULL + line="4902">a #GCancellable, or %NULL closure="6"> asynchronous completion callback + line="4903">asynchronous completion callback allow-none="1"> data to pass to @callback + line="4904">data to pass to @callback @@ -5332,13 +5345,13 @@ This will use the thread-default #GMainContext, but will not iterate it. throws="1"> Finish an asynchronous pull operation started with + line="5690">Finish an asynchronous pull operation started with ostree_repo_find_remotes_async(). - + a potentially empty array + line="5699">a potentially empty array of #OstreeRepoFinderResults, followed by a %NULL terminator element; or %NULL on error @@ -5349,13 +5362,13 @@ ostree_repo_find_remotes_async(). an #OstreeRepo + line="5692">an #OstreeRepo the asynchronous result + line="5693">the asynchronous result @@ -5366,7 +5379,7 @@ ostree_repo_find_remotes_async(). throws="1"> Verify consistency of the object; this performs checks only relevant to the + line="4350">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. @@ -5377,19 +5390,19 @@ traverse metadata objects for example. Repo + line="4352">Repo Object type + line="4353">Object type Checksum + line="4354">Checksum allow-none="1"> Cancellable + line="4355">Cancellable @@ -5408,20 +5421,20 @@ traverse metadata objects for example. version="2019.2"> Get the bootloader configured. See the documentation for the + line="6233">Get the bootloader configured. See the documentation for the "sysroot.bootloader" config key. bootloader configuration for the sysroot + line="6240">bootloader configuration for the sysroot an #OstreeRepo + line="6235">an #OstreeRepo @@ -5431,19 +5444,19 @@ traverse metadata objects for example. version="2018.6"> Get the collection ID of this repository. See [collection IDs][collection-ids]. + line="6161">Get the collection ID of this repository. See [collection IDs][collection-ids]. collection ID for the repository + line="6167">collection ID for the repository an #OstreeRepo + line="6163">an #OstreeRepo @@ -5467,13 +5480,13 @@ traverse metadata objects for example. version="2018.9"> Get the set of default repo finders configured. See the documentation for + line="6214">Get the set of default repo finders configured. See the documentation for the "core.default-repo-finders" config key. + line="6221"> %NULL-terminated array of strings. @@ -5483,7 +5496,7 @@ the "core.default-repo-finders" config key. an #OstreeRepo + line="6216">an #OstreeRepo @@ -5493,7 +5506,7 @@ the "core.default-repo-finders" config key. version="2016.4"> In some cases it's useful for applications to access the repository + line="3459">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). @@ -5501,14 +5514,14 @@ repository (to see whether a ref was written). File descriptor for repository root - owned by @self + line="3468">File descriptor for repository root - owned by @self Repo + line="3461">Repo @@ -5517,19 +5530,19 @@ repository (to see whether a ref was written). c:identifier="ostree_repo_get_disable_fsync"> For more information see ostree_repo_set_disable_fsync(). + line="3406">For more information see ostree_repo_set_disable_fsync(). Whether or not fsync() is enabled for this repo. + line="3412">Whether or not fsync() is enabled for this repo. An #OstreeRepo + line="3408">An #OstreeRepo @@ -5540,7 +5553,7 @@ repository (to see whether a ref was written). throws="1"> Determine the number of bytes of free disk space that are reserved according + line="3541">Determine the number of bytes of free disk space that are reserved according to the repo config and return that number in @out_reserved_bytes. See the documentation for the core.min-free-space-size and core.min-free-space-percent repo config options. @@ -5548,14 +5561,14 @@ core.min-free-space-percent repo config options. %TRUE on success, %FALSE otherwise. + line="3552">%TRUE on success, %FALSE otherwise. Repo + line="3543">Repo transfer-ownership="full"> Location to store the result + line="3544">Location to store the result @@ -5583,20 +5596,20 @@ core.min-free-space-percent repo config options. Before this function can be used, ostree_repo_init() must have been + line="3568">Before this function can be used, ostree_repo_init() must have been called. Parent repository, or %NULL if none + line="3575">Parent repository, or %NULL if none Repo + line="3570">Repo @@ -5604,21 +5617,21 @@ called. Note that since the introduction of ostree_repo_open_at(), this function may + line="3437">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 + line="3445">Path to repo Repo + line="3439">Repo @@ -5791,23 +5804,23 @@ option name. If an error is returned, @out_value will be set to %NULL. throws="1"> Verify @signatures for @data using GPG keys in the keyring for + line="5572">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 + line="5589">an #OstreeGpgVerifyResult, or %NULL on error Repository + line="5574">Repository allow-none="1"> Name of remote + line="5575">Name of remote Data as a #GBytes + line="5576">Data as a #GBytes Signatures as a #GBytes + line="5577">Signatures as a #GBytes allow-none="1"> Path to directory GPG keyrings; overrides built-in default if given + line="5578">Path to directory GPG keyrings; overrides built-in default if given allow-none="1"> Path to additional keyring file (not a directory) + line="5579">Path to additional keyring file (not a directory) allow-none="1"> Cancellable + line="5580">Cancellable @@ -5865,32 +5878,32 @@ the verifications using GPG keys in the keyrings of all remotes. throws="1"> Set @out_have_object to %TRUE if @self contains the given object; + line="4192">Set @out_have_object to %TRUE if @self contains the given object; %FALSE otherwise. %FALSE if an unexpected error occurred, %TRUE otherwise + line="4204">%FALSE if an unexpected error occurred, %TRUE otherwise Repo + line="4194">Repo Object type + line="4195">Object type ASCII SHA256 checksum + line="4196">ASCII SHA256 checksum transfer-ownership="full"> %TRUE if repository contains object + line="4197">%TRUE if repository contains object allow-none="1"> Cancellable + line="4198">Cancellable @@ -5916,7 +5929,7 @@ the verifications using GPG keys in the keyrings of all remotes. Calculate a hash value for the given open repository, suitable for use when + line="3478">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. @@ -5926,14 +5939,14 @@ This function does no I/O. hash value for the #OstreeRepo + line="3489">hash value for the #OstreeRepo an #OstreeRepo + line="3480">an #OstreeRepo @@ -5946,7 +5959,7 @@ This function does no I/O. filename="ostree-repo-libarchive.c" line="809">Import an archive file @archive into the repository, and write its file structure to @mtree. - + @@ -6005,7 +6018,7 @@ file structure to @mtree. throws="1"> Copy object named by @objtype and @checksum into @self from the + line="4377">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. @@ -6019,25 +6032,25 @@ Otherwise, a copy will be performed. Destination repo + line="4379">Destination repo Source repo + line="4380">Source repo Object type + line="4381">Object type checksum + line="4382">checksum allow-none="1"> Cancellable + line="4383">Cancellable @@ -6057,7 +6070,7 @@ Otherwise, a copy will be performed. throws="1"> Copy object named by @objtype and @checksum into @self from the + line="4406">Copy object named by @objtype and @checksum into @self from the source repository @source. If @trusted is %TRUE and both repositories are of the same type and on the same filesystem, this will simply be a fast Unix hard link operation. @@ -6071,31 +6084,31 @@ Otherwise, a copy will be performed. Destination repo + line="4408">Destination repo Source repo + line="4409">Source repo Object type + line="4410">Object type checksum + line="4411">checksum If %TRUE, assume the source repo is valid and trusted + line="4412">If %TRUE, assume the source repo is valid and trusted allow-none="1"> Cancellable + line="4413">Cancellable @@ -6169,7 +6182,7 @@ If you want to exclude refs from `refs/remotes`, use %OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_REMOTES in @flags. Similarly use %OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_MIRRORS to exclude refs from `refs/mirrors`. - + This function synchronously enumerates all commit objects starting + line="4599">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 + line="4611">%TRUE on success, %FALSE on error, and @error will be set Repo + line="4601">Repo List commits starting with this checksum + line="4602">List commits starting with this checksum transfer-ownership="container"> + line="4603"> Map of serialized commit name to variant data @@ -6269,7 +6282,7 @@ Map of serialized commit name to variant data allow-none="1"> Cancellable + line="4605">Cancellable @@ -6279,28 +6292,28 @@ Map of serialized commit name to variant data throws="1"> This function synchronously enumerates all objects in the + line="4545">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 + line="4559">%TRUE on success, %FALSE on error, and @error will be set Repo + line="4547">Repo Flags controlling enumeration + line="4548">Flags controlling enumeration @@ -6310,7 +6323,7 @@ to #GVariant values of type %OSTREE_REPO_LIST_OBJECTS_VARIANT_TYPE. transfer-ownership="container"> + line="4549"> Map of serialized object name to variant data @@ -6323,7 +6336,7 @@ Map of serialized object name to variant data allow-none="1"> Cancellable + line="4551">Cancellable @@ -6453,7 +6466,7 @@ remote name) to checksums. Differently from ostree_repo_list_refs(), the filename="ostree-repo-static-delta-core.c" line="58">This function synchronously enumerates all static deltas in the repository, returning its result in @out_deltas. - + @@ -6491,7 +6504,7 @@ repository, returning its result in @out_deltas. throws="1"> A version of ostree_repo_load_variant() specialized to commits, + line="4521">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. @@ -6503,13 +6516,13 @@ means that only a sub-path of the commit is available. Repo + line="4523">Repo Commit checksum + line="4524">Commit checksum allow-none="1"> Commit + line="4525">Commit allow-none="1"> Commit state + line="4526">Commit state @@ -6539,7 +6552,7 @@ means that only a sub-path of the commit is available. Load content object, decomposing it into three parts: the actual + line="4031">Load content object, decomposing it into three parts: the actual content (for regular files), the metadata, and extended attributes. @@ -6549,13 +6562,13 @@ content (for regular files), the metadata, and extended attributes. Repo + line="4033">Repo ASCII SHA256 checksum + line="4034">ASCII SHA256 checksum allow-none="1"> File content + line="4035">File content allow-none="1"> File information + line="4036">File information allow-none="1"> Extended attributes + line="4037">Extended attributes allow-none="1"> Cancellable + line="4038">Cancellable @@ -6610,7 +6623,7 @@ content (for regular files), the metadata, and extended attributes. throws="1"> Load object as a stream; useful when copying objects between + line="4092">Load object as a stream; useful when copying objects between repositories. @@ -6620,19 +6633,19 @@ repositories. Repo + line="4094">Repo Object type + line="4095">Object type ASCII SHA256 checksum + line="4096">ASCII SHA256 checksum transfer-ownership="full"> Stream for object + line="4097">Stream for object transfer-ownership="full"> Length of @out_input + line="4098">Length of @out_input allow-none="1"> Cancellable + line="4099">Cancellable @@ -6669,7 +6682,7 @@ repositories. throws="1"> Load the metadata object @sha256 of type @objtype, storing the + line="4499">Load the metadata object @sha256 of type @objtype, storing the result in @out_variant. @@ -6679,19 +6692,19 @@ result in @out_variant. Repo + line="4501">Repo Expected object type + line="4502">Expected object type Checksum string + line="4503">Checksum string transfer-ownership="full"> Metadata object + line="4504">Metadata object @@ -6710,7 +6723,7 @@ result in @out_variant. throws="1"> Attempt to load the metadata object @sha256 of type @objtype if it + line="4476">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. @@ -6721,19 +6734,19 @@ exists, storing the result in @out_variant. If it doesn't exist, Repo + line="4478">Repo Object type + line="4479">Object type ASCII checksum + line="4480">ASCII checksum Metadata + line="4481">Metadata @@ -6753,7 +6766,7 @@ exists, storing the result in @out_variant. If it doesn't exist, throws="1"> Commits in the "partial" state do not have all their child objects + line="2143">Commits in the "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. @@ -6768,19 +6781,19 @@ should use this if you are implementing a different type of transport. Repo + line="2145">Repo Commit SHA-256 + line="2146">Commit SHA-256 Whether or not this commit is partial + line="2147">Whether or not this commit is partial @@ -6791,7 +6804,7 @@ should use this if you are implementing a different type of transport. throws="1"> Allows the setting of a reason code for a partial commit. Presently + line="2092">Allows the setting of a reason code for a partial commit. Presently it only supports setting reason bitmask to OSTREE_REPO_COMMIT_STATE_FSCK_PARTIAL, or OSTREE_REPO_COMMIT_STATE_NORMAL. This will allow successive ostree @@ -6806,25 +6819,25 @@ it. Repo + line="2094">Repo Commit SHA-256 + line="2095">Commit SHA-256 Whether or not this commit is partial + line="2096">Whether or not this commit is partial Reason bitmask for partial commit + line="2097">Reason bitmask for partial commit @@ -6851,7 +6864,7 @@ it. throws="1"> Starts or resumes a transaction. In order to write to a repo, you + line="1752">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(). @@ -6876,7 +6889,7 @@ active at a time. An #OstreeRepo + line="1754">An #OstreeRepo allow-none="1"> Whether this transaction + line="1755">Whether this transaction is resuming from a previous one. This is a legacy state, now OSTree pulls use per-commit `state/.commitpartial` files. @@ -6898,7 +6911,7 @@ pulls use per-commit `state/.commitpartial` files. allow-none="1"> Cancellable + line="1758">Cancellable @@ -6921,7 +6934,7 @@ statistics on objects that would be deleted, without actually deleting them. Locking: exclusive - + @@ -7001,7 +7014,7 @@ 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 - + @@ -7066,7 +7079,7 @@ targeting that commit; otherwise any static delta of non existing commits are deleted. Locking: exclusive - + @@ -7101,7 +7114,7 @@ non existing commit Connect to the remote repository, fetching the specified set of + line="4677">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. @@ -7117,7 +7130,7 @@ 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. - + @@ -7125,13 +7138,13 @@ one around this call. Repo + line="4679">Repo Name of remote + line="4680">Name of remote allow-none="1"> Optional list of refs; if %NULL, fetch all configured refs + line="4681">Optional list of refs; if %NULL, fetch all configured refs @@ -7148,7 +7161,7 @@ one around this call. Options controlling fetch behavior + line="4682">Options controlling fetch behavior allow-none="1"> Progress + line="4683">Progress allow-none="1"> Cancellable + line="4684">Cancellable @@ -7176,7 +7189,7 @@ one around this call. version="2018.6"> Pull refs from multiple remotes which have been found using + line="5738">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 @@ -7218,7 +7231,7 @@ The following @options are currently defined: not being pulled will be ignored and any ref without a keyring remote will be verified with the keyring of the remote being pulled from. Since: 2019.2 - + @@ -7226,13 +7239,13 @@ The following @options are currently defined: an #OstreeRepo + line="5740">an #OstreeRepo %NULL-terminated array of remotes to + line="5741">%NULL-terminated array of remotes to pull from, including the refs to pull from each @@ -7244,7 +7257,7 @@ The following @options are currently defined: allow-none="1"> A GVariant `a{sv}` with an extensible set of flags + line="5743">A GVariant `a{sv}` with an extensible set of flags an #OstreeAsyncProgress to update with the operation’s + line="5744">an #OstreeAsyncProgress to update with the operation’s progress, or %NULL @@ -7263,7 +7276,7 @@ The following @options are currently defined: allow-none="1"> a #GCancellable, or %NULL + line="5746">a #GCancellable, or %NULL asynchronous completion callback + line="5747">asynchronous completion callback data to pass to @callback + line="5748">data to pass to @callback @@ -7294,26 +7307,26 @@ The following @options are currently defined: throws="1"> Finish an asynchronous pull operation started with + line="5991">Finish an asynchronous pull operation started with ostree_repo_pull_from_remotes_async(). - + %TRUE on success, %FALSE otherwise + line="6000">%TRUE on success, %FALSE otherwise an #OstreeRepo + line="5993">an #OstreeRepo the asynchronous result + line="5994">the asynchronous result @@ -7323,9 +7336,9 @@ ostree_repo_pull_from_remotes_async(). throws="1"> This is similar to ostree_repo_pull(), but only fetches a single + line="4716">This is similar to ostree_repo_pull(), but only fetches a single subpath. - + @@ -7333,19 +7346,19 @@ subpath. Repo + line="4718">Repo Name of remote + line="4719">Name of remote Subdirectory path + line="4720">Subdirectory path allow-none="1"> Optional list of refs; if %NULL, fetch all configured refs + line="4721">Optional list of refs; if %NULL, fetch all configured refs @@ -7362,7 +7375,7 @@ subpath. Options controlling fetch behavior + line="4722">Options controlling fetch behavior allow-none="1"> Progress + line="4723">Progress allow-none="1"> Cancellable + line="4724">Cancellable @@ -7390,7 +7403,7 @@ subpath. throws="1"> Like ostree_repo_pull(), but supports an extensible set of flags. + line="3264">Like ostree_repo_pull(), but supports an extensible set of flags. The following are currently defined: * refs (as): Array of string refs @@ -7403,11 +7416,15 @@ The following are currently defined: * override-remote-name (s): If local, add this remote to refspec * gpg-verify (b): GPG verify commits * gpg-verify-summary (b): GPG verify summary + * disable-sign-verify (b): Disable signapi verification of commits + * disable-sign-verify-summary (b): Disable signapi verification of the summary * depth (i): How far in the history to traverse; default is 0, -1 means infinite + * per-object-fsync (b): Perform disk writes more slowly, avoiding a single large I/O sync * 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 + * timestamp-check-from-rev (s): Verify that all fetched commit timestamps are newer than timestamp of given rev; Since: 2020.4 * metadata-size-restriction (t): Restrict metadata objects to a maximum number of bytes; 0 to disable. Since: 2018.9 * 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 @@ -7427,7 +7444,7 @@ The following are currently defined: not being pulled will be ignored and any ref without a keyring remote will be verified with the keyring of the remote being pulled from. Since: 2019.2 - + @@ -7435,19 +7452,19 @@ The following are currently defined: Repo + line="3266">Repo Name of remote or file:// url + line="3267">Name of remote or file:// url A GVariant a{sv} with an extensible set of flags. + line="3268">A GVariant a{sv} with an extensible set of flags. Progress + line="3269">Progress Cancellable + line="3270">Cancellable @@ -7475,7 +7492,7 @@ The following are currently defined: throws="1"> Return the size in bytes of object with checksum @sha256, after any + line="4440">Return the size in bytes of object with checksum @sha256, after any compression has been applied. @@ -7485,19 +7502,19 @@ compression has been applied. Repo + line="4442">Repo Object type + line="4443">Object type Checksum + line="4444">Checksum transfer-ownership="full"> Size in bytes object occupies physically + line="4445">Size in bytes object occupies physically allow-none="1"> Cancellable + line="4446">Cancellable @@ -7525,8 +7542,8 @@ compression has been applied. throws="1"> Load the content for @rev into @out_root. - + line="4642">Load the content for @rev into @out_root. + @@ -7534,13 +7551,13 @@ compression has been applied. Repo + line="4644">Repo Ref or ASCII checksum + line="4645">Ref or ASCII checksum transfer-ownership="full"> An #OstreeRepoFile corresponding to the root + line="4646">An #OstreeRepoFile corresponding to the root transfer-ownership="full"> The resolved commit checksum + line="4647">The resolved commit checksum allow-none="1"> Cancellable + line="4648">Cancellable @@ -7577,10 +7594,10 @@ compression has been applied. throws="1"> OSTree commits can have arbitrary metadata associated; this + line="3085">OSTree commits can have arbitrary metadata associated; this function retrieves them. If none exists, @out_metadata will be set to %NULL. - + @@ -7588,13 +7605,13 @@ to %NULL. Repo + line="3087">Repo ASCII SHA256 commit checksum + line="3088">ASCII SHA256 commit checksum transfer-ownership="full"> Metadata associated with commit in with format "a{sv}", or %NULL if none exists + line="3089">Metadata associated with commit in with format "a{sv}", or %NULL if none exists allow-none="1"> Cancellable + line="3090">Cancellable @@ -7622,7 +7639,7 @@ to %NULL. throws="1"> An OSTree repository can contain a high level "summary" file that + line="5713">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 @@ -7640,7 +7657,7 @@ and refs in %OSTREE_SUMMARY_COLLECTION_MAP are guaranteed to be in lexicographic order. Locking: exclusive - + @@ -7648,7 +7665,7 @@ Locking: exclusive Repo + line="5715">Repo allow-none="1"> A GVariant of type a{sv}, or %NULL + line="5716">A GVariant of type a{sv}, or %NULL allow-none="1"> Cancellable + line="5717">Cancellable @@ -7677,7 +7694,7 @@ Locking: exclusive throws="1"> By default, an #OstreeRepo will cache the remote configuration and its + line="3213">By default, an #OstreeRepo will cache the remote configuration and its own repo/config data. This API can be used to reload it. @@ -7687,7 +7704,7 @@ own repo/config data. This API can be used to reload it. repo + line="3215">repo allow-none="1"> cancellable + line="3216">cancellable @@ -7862,7 +7879,7 @@ remote does not exist. throws="1"> Tries to fetch the summary file and any GPG signatures on the summary file + line="2333">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. @@ -7879,20 +7896,20 @@ with #OSTREE_SUMMARY_GVARIANT_FORMAT as the format string. %TRUE on success, %FALSE on failure + line="2358">%TRUE on success, %FALSE on failure Self + line="2335">Self name of a remote + line="2336">name of a remote allow-none="1"> return location for raw summary data, or + line="2337">return location for raw summary data, or %NULL @@ -7915,7 +7932,7 @@ with #OSTREE_SUMMARY_GVARIANT_FORMAT as the format string. allow-none="1"> return location for raw summary + line="2339">return location for raw summary signature data, or %NULL @@ -7925,7 +7942,7 @@ with #OSTREE_SUMMARY_GVARIANT_FORMAT as the format string. allow-none="1"> a #GCancellable + line="2341">a #GCancellable @@ -7936,7 +7953,7 @@ with #OSTREE_SUMMARY_GVARIANT_FORMAT as the format string. throws="1"> Like ostree_repo_remote_fetch_summary(), but supports an extensible set of flags. + line="6016">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 @@ -7949,20 +7966,20 @@ The following are currently defined: %TRUE on success, %FALSE on failure + line="6038">%TRUE on success, %FALSE on failure Self + line="6018">Self name of a remote + line="6019">name of a remote A GVariant a{sv} with an extensible set of flags + line="6020">A GVariant a{sv} with an extensible set of flags return location for raw summary data, or + line="6021">return location for raw summary data, or %NULL @@ -7994,7 +8011,7 @@ The following are currently defined: allow-none="1"> return location for raw summary + line="6023">return location for raw summary signature data, or %NULL @@ -8004,7 +8021,7 @@ The following are currently defined: allow-none="1"> a #GCancellable + line="6025">a #GCancellable @@ -8017,7 +8034,7 @@ The following are currently defined: line="2001">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. - + throws="1"> Return whether GPG verification of the summary is enabled for the remote + line="2035">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 + line="2046">%TRUE on success, %FALSE on failure Repo + line="2037">Repo Name of remote + line="2038">Name of remote allow-none="1"> Remote's GPG option + line="2039">Remote's GPG option @@ -8136,31 +8153,31 @@ error if the provided remote does not exist. throws="1"> Imports one or more GPG keys from the open @source_stream, or from the + line="2058">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 + line="2077">%TRUE on success, %FALSE on failure Self + line="2060">Self name of a remote + line="2061">name of a remote allow-none="1"> a #GInputStream, or %NULL + line="2062">a #GInputStream, or %NULL allow-none="1"> a %NULL-terminated array of GPG key IDs, or %NULL + line="2063">a %NULL-terminated array of GPG key IDs, or %NULL @@ -8191,7 +8208,7 @@ from the remote named @name. allow-none="1"> return location for the number of imported + line="2064">return location for the number of imported keys, or %NULL @@ -8201,7 +8218,7 @@ from the remote named @name. allow-none="1"> a #GCancellable + line="2066">a #GCancellable @@ -8419,7 +8436,7 @@ ostree_repo_resolve_rev_ext() but for collection-refs. throws="1"> Find the GPG keyring for the given @collection_id, using the local + line="1393">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. @@ -8429,11 +8446,11 @@ 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 + line="1411">#OstreeRemote containing the GPG keyring for @collection_id @@ -8441,13 +8458,13 @@ If no match can be found, a %G_IO_ERROR_NOT_FOUND error will be returned. an #OstreeRepo + line="1395">an #OstreeRepo the collection ID to look up a keyring for + line="1396">the collection ID to look up a keyring for allow-none="1"> a #GCancellable, or %NULL + line="1397">a #GCancellable, or %NULL @@ -8562,7 +8579,7 @@ using it has no effect. throws="1"> This function is deprecated in favor of using ostree_repo_devino_cache_new(), + line="1715">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()`. @@ -8587,7 +8604,7 @@ Multithreading: This function is *not* MT safe. An #OstreeRepo + line="1717">An #OstreeRepo allow-none="1"> Cancellable + line="1718">Cancellable @@ -8607,7 +8624,7 @@ Multithreading: This function is *not* MT safe. throws="1"> Like ostree_repo_set_ref_immediate(), but creates an alias. + line="2311">Like ostree_repo_set_ref_immediate(), but creates an alias. @@ -8616,7 +8633,7 @@ Multithreading: This function is *not* MT safe. An #OstreeRepo + line="2313">An #OstreeRepo allow-none="1"> A remote for the ref + line="2314">A remote for the ref The ref to write + line="2315">The ref to write allow-none="1"> The ref target to point it to, or %NULL to unset + line="2316">The ref target to point it to, or %NULL to unset allow-none="1"> GCancellable + line="2317">GCancellable @@ -8660,7 +8677,7 @@ Multithreading: This function is *not* MT safe. throws="1"> Set a custom location for the cache directory used for e.g. + line="3374">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. @@ -8672,19 +8689,19 @@ write permissions in the repo, where the cache is normally stored. An #OstreeRepo + line="3376">An #OstreeRepo directory fd + line="3377">directory fd subpath in @dfd + line="3378">subpath in @dfd allow-none="1"> a #GCancellable + line="3379">a #GCancellable @@ -8704,21 +8721,21 @@ write permissions in the repo, where the cache is normally stored. throws="1"> Set or clear the collection ID of this repository. See [collection IDs][collection-ids]. + line="6178">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 + line="6188">%TRUE on success, %FALSE otherwise an #OstreeRepo + line="6180">an #OstreeRepo allow-none="1"> new collection ID, or %NULL to unset it + line="6181">new collection ID, or %NULL to unset it @@ -8738,27 +8755,27 @@ configuration on disk using ostree_repo_write_config(). throws="1"> This is like ostree_repo_transaction_set_collection_ref(), except it may be + line="2337">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 + line="2349">%TRUE on success, %FALSE otherwise An #OstreeRepo + line="2339">An #OstreeRepo The collection–ref to write + line="2340">The collection–ref to write allow-none="1"> The checksum to point it to, or %NULL to unset + line="2341">The checksum to point it to, or %NULL to unset allow-none="1"> GCancellable + line="2342">GCancellable @@ -8785,7 +8802,7 @@ case where we're creating or overwriting an existing ref. c:identifier="ostree_repo_set_disable_fsync"> Disable requests to fsync() to stable storage during commits. This + line="3357">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. @@ -8797,13 +8814,13 @@ ensuring data consistency. An #OstreeRepo + line="3359">An #OstreeRepo If %TRUE, do not fsync + line="3360">If %TRUE, do not fsync @@ -8813,7 +8830,7 @@ ensuring data consistency. throws="1"> This is like ostree_repo_transaction_set_ref(), except it may be + line="2283">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. @@ -8826,7 +8843,7 @@ Multithreading: This function is MT safe. An #OstreeRepo + line="2285">An #OstreeRepo allow-none="1"> A remote for the ref + line="2286">A remote for the ref The ref to write + line="2287">The ref to write allow-none="1"> The checksum to point it to, or %NULL to unset + line="2288">The checksum to point it to, or %NULL to unset allow-none="1"> GCancellable + line="2289">GCancellable @@ -8869,8 +8886,8 @@ Multithreading: This function is MT safe. throws="1"> Add a GPG signature to a commit. - + line="5044">Add a GPG signature to a commit. + @@ -8878,19 +8895,19 @@ Multithreading: This function is MT safe. Self + line="5046">Self SHA256 of given commit to sign + line="5047">SHA256 of given commit to sign Use this GPG key id + line="5048">Use this GPG key id allow-none="1"> GPG home directory, or %NULL + line="5049">GPG home directory, or %NULL allow-none="1"> A #GCancellable + line="5050">A #GCancellable @@ -8918,9 +8935,9 @@ Multithreading: This function is MT safe. throws="1"> This function is deprecated, sign the summary file instead. + line="5133">This function is deprecated, sign the summary file instead. Add a GPG signature to a static delta. - + @@ -8928,31 +8945,31 @@ Add a GPG signature to a static delta. Self + line="5135">Self From commit + line="5136">From commit To commit + line="5137">To commit key id + line="5138">key id homedir + line="5139">homedir allow-none="1"> cancellable + line="5140">cancellable @@ -8975,7 +8992,7 @@ Add a GPG signature to a 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. - + @@ -9031,7 +9048,7 @@ are known: - 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. - + @@ -9095,7 +9112,7 @@ are known: version="2018.6"> If @checksum is not %NULL, then record it as the target of local ref named + line="2245">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 @@ -9115,13 +9132,13 @@ Multithreading: Since v2017.15 this function is MT safe. An #OstreeRepo + line="2247">An #OstreeRepo The collection–ref to write + line="2248">The collection–ref to write allow-none="1"> The checksum to point it to + line="2249">The checksum to point it to @@ -9139,7 +9156,7 @@ Multithreading: Since v2017.15 this function is MT safe. c:identifier="ostree_repo_transaction_set_ref"> If @checksum is not %NULL, then record it as the target of ref named + line="2196">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. @@ -9168,7 +9185,7 @@ Multithreading: Since v2017.15 this function is MT safe. An #OstreeRepo + line="2198">An #OstreeRepo allow-none="1"> A remote for the ref + line="2199">A remote for the ref The ref to write + line="2200">The ref to write allow-none="1"> The checksum to point it to + line="2201">The checksum to point it to @@ -9201,7 +9218,7 @@ Multithreading: Since v2017.15 this function is MT safe. c:identifier="ostree_repo_transaction_set_refspec"> Like ostree_repo_transaction_set_ref(), but takes concatenated + line="2171">Like ostree_repo_transaction_set_ref(), but takes concatenated @refspec format as input instead of separate remote and name arguments. @@ -9214,13 +9231,13 @@ Multithreading: Since v2017.15 this function is MT safe. An #OstreeRepo + line="2173">An #OstreeRepo The refspec to write + line="2174">The refspec to write allow-none="1"> The checksum to point it to + line="2175">The checksum to point it to @@ -9241,7 +9258,7 @@ Multithreading: Since v2017.15 this function is MT safe. filename="ostree-repo-traverse.c" line="665">Create a new set @out_reachable containing all objects reachable from @commit_checksum, traversing @maxdepth parent commits. - + @@ -9295,7 +9312,7 @@ from @commit_checksum, traversing @maxdepth parent commits. filename="ostree-repo-traverse.c" line="639">Update the set @inout_reachable containing all objects reachable from @commit_checksum, traversing @maxdepth parent commits. - + @@ -9351,7 +9368,7 @@ 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. - + @@ -9412,7 +9429,7 @@ belongs to. line="307">Add all commit objects directly reachable via a ref to @reachable. Locking: shared - + @@ -9454,26 +9471,26 @@ Locking: shared throws="1"> Check for a valid GPG signature on commit named by the ASCII + line="5461">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 + line="5473">%TRUE if there was a GPG signature from a trusted keyring, otherwise %FALSE Repository + line="5463">Repository ASCII SHA256 checksum + line="5464">ASCII SHA256 checksum allow-none="1"> Path to directory GPG keyrings; overrides built-in default if given + line="5465">Path to directory GPG keyrings; overrides built-in default if given allow-none="1"> Path to additional keyring file (not a directory) + line="5466">Path to additional keyring file (not a directory) allow-none="1"> Cancellable + line="5467">Cancellable @@ -9510,26 +9527,26 @@ checksum @commit_checksum. throws="1"> Read GPG signature(s) on the commit named by the ASCII checksum + line="5499">Read GPG signature(s) on the commit named by the ASCII checksum @commit_checksum and return detailed results. - + an #OstreeGpgVerifyResult, or %NULL on error + line="5511">an #OstreeGpgVerifyResult, or %NULL on error Repository + line="5501">Repository ASCII SHA256 checksum + line="5502">ASCII SHA256 checksum allow-none="1"> Path to directory GPG keyrings; overrides built-in default if given + line="5503">Path to directory GPG keyrings; overrides built-in default if given allow-none="1"> Path to additional keyring file (not a directory) + line="5504">Path to additional keyring file (not a directory) allow-none="1"> Cancellable + line="5505">Cancellable @@ -9567,33 +9584,33 @@ checksum @commit_checksum. throws="1"> Read GPG signature(s) on the commit named by the ASCII checksum + line="5535">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 + line="5547">an #OstreeGpgVerifyResult, or %NULL on error Repository + line="5537">Repository ASCII SHA256 checksum + line="5538">ASCII SHA256 checksum OSTree remote to use for configuration + line="5539">OSTree remote to use for configuration allow-none="1"> Cancellable + line="5540">Cancellable @@ -9612,38 +9629,38 @@ configured for @remote. throws="1"> Verify @signatures for @summary data using GPG keys in the keyring for + line="5622">Verify @signatures for @summary data using GPG keys in the keyring for @remote_name, and return an #OstreeGpgVerifyResult. - + an #OstreeGpgVerifyResult, or %NULL on error + line="5634">an #OstreeGpgVerifyResult, or %NULL on error Repo + line="5624">Repo Name of remote + line="5625">Name of remote Summary data as a #GBytes + line="5626">Summary data as a #GBytes Summary signatures as a #GBytes + line="5627">Summary signatures as a #GBytes allow-none="1"> Cancellable + line="5628">Cancellable @@ -9664,7 +9681,7 @@ configured for @remote. filename="ostree-repo-libarchive.c" line="937">Import an archive file @archive into the repository, and write its file structure to @mtree. - + @@ -9721,7 +9738,7 @@ file structure to @mtree. filename="ostree-repo-libarchive.c" line="972">Read an archive from @fd and import it into the repository, writing its file structure to @mtree. - + @@ -9776,9 +9793,9 @@ its file structure to @mtree. throws="1"> Write a commit metadata object, referencing @root_contents_checksum + line="2999">Write a commit metadata object, referencing @root_contents_checksum and @root_metadata_checksum. - + @@ -9786,7 +9803,7 @@ and @root_metadata_checksum. Repo + line="3001">Repo allow-none="1"> ASCII SHA256 checksum for parent, or %NULL for none + line="3002">ASCII SHA256 checksum for parent, or %NULL for none allow-none="1"> Subject + line="3003">Subject allow-none="1"> Body + line="3004">Body allow-none="1"> GVariant of type a{sv}, or %NULL for none + line="3005">GVariant of type a{sv}, or %NULL for none The tree to point the commit to + line="3006">The tree to point the commit to transfer-ownership="full"> Resulting ASCII SHA256 checksum for commit + line="3007">Resulting ASCII SHA256 checksum for commit allow-none="1"> Cancellable + line="3008">Cancellable @@ -9856,10 +9873,10 @@ and @root_metadata_checksum. throws="1"> Replace any existing metadata associated with commit referred to by + line="3133">Replace any existing metadata associated with commit referred to by @checksum with @metadata. If @metadata is %NULL, then existing data will be deleted. - + @@ -9867,13 +9884,13 @@ data will be deleted. Repo + line="3135">Repo ASCII SHA256 commit checksum + line="3136">ASCII SHA256 commit checksum allow-none="1"> Metadata to associate with commit in with format "a{sv}", or %NULL to delete + line="3137">Metadata to associate with commit in with format "a{sv}", or %NULL to delete allow-none="1"> Cancellable + line="3138">Cancellable @@ -9901,9 +9918,9 @@ data will be deleted. throws="1"> Write a commit metadata object, referencing @root_contents_checksum + line="3031">Write a commit metadata object, referencing @root_contents_checksum and @root_metadata_checksum. - + @@ -9911,7 +9928,7 @@ and @root_metadata_checksum. Repo + line="3033">Repo allow-none="1"> ASCII SHA256 checksum for parent, or %NULL for none + line="3034">ASCII SHA256 checksum for parent, or %NULL for none allow-none="1"> Subject + line="3035">Subject allow-none="1"> Body + line="3036">Body allow-none="1"> GVariant of type a{sv}, or %NULL for none + line="3037">GVariant of type a{sv}, or %NULL for none The tree to point the commit to + line="3038">The tree to point the commit to The time to use to stamp the commit + line="3039">The time to use to stamp the commit transfer-ownership="full"> Resulting ASCII SHA256 checksum for commit + line="3040">Resulting ASCII SHA256 checksum for commit allow-none="1"> Cancellable + line="3041">Cancellable @@ -10012,7 +10029,7 @@ and @root_metadata_checksum. throws="1"> Store the content object streamed as @object_input, + line="2824">Store the content object streamed as @object_input, with total length @length. The actual checksum will be returned as @out_csum. @@ -10023,7 +10040,7 @@ be returned as @out_csum. Repo + line="2826">Repo allow-none="1"> If provided, validate content against this checksum + line="2827">If provided, validate content against this checksum Content object stream + line="2828">Content object stream Length of @object_input + line="2829">Length of @object_input allow-none="1"> Binary checksum + line="2830">Binary checksum @@ -10066,7 +10083,7 @@ be returned as @out_csum. allow-none="1"> Cancellable + line="2831">Cancellable @@ -10075,7 +10092,7 @@ be returned as @out_csum. c:identifier="ostree_repo_write_content_async"> Asynchronously store the content object @object. If provided, the + line="2922">Asynchronously store the content object @object. If provided, the checksum @expected_checksum will be verified. @@ -10085,7 +10102,7 @@ checksum @expected_checksum will be verified. Repo + line="2924">Repo allow-none="1"> If provided, validate content against this checksum + line="2925">If provided, validate content against this checksum Input + line="2926">Input Length of @object + line="2927">Length of @object allow-none="1"> Cancellable + line="2928">Cancellable closure="5"> Invoked when content is writed + line="2929">Invoked when content is writed allow-none="1"> User data for @callback + line="2930">User data for @callback @@ -10145,7 +10162,7 @@ checksum @expected_checksum will be verified. throws="1"> Completes an invocation of ostree_repo_write_content_async(). + line="2963">Completes an invocation of ostree_repo_write_content_async(). @@ -10154,13 +10171,13 @@ checksum @expected_checksum will be verified. a #OstreeRepo + line="2965">a #OstreeRepo a #GAsyncResult + line="2966">a #GAsyncResult transfer-ownership="full"> A binary SHA256 checksum of the content object + line="2967">A binary SHA256 checksum of the content object @@ -10179,7 +10196,7 @@ checksum @expected_checksum will be verified. throws="1"> Store the content object streamed as @object_input, with total + line="2797">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 @@ -10192,25 +10209,25 @@ disk, for example. Repo + line="2799">Repo Store content using this ASCII SHA256 checksum + line="2800">Store content using this ASCII SHA256 checksum Content stream + line="2801">Content stream Length of @object_input + line="2802">Length of @object_input allow-none="1"> Cancellable + line="2803">Cancellable @@ -10229,10 +10246,10 @@ disk, for example. throws="1"> Store as objects all contents of the directory referred to by @dfd + line="4091">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. - + @@ -10240,25 +10257,25 @@ resulting filesystem hierarchy into @mtree. Repo + line="4093">Repo Directory file descriptor + line="4094">Directory file descriptor Path + line="4095">Path Overlay directory contents into this tree + line="4096">Overlay directory contents into this tree allow-none="1"> Optional modifier + line="4097">Optional modifier @@ -10277,7 +10294,7 @@ resulting filesystem hierarchy into @mtree. allow-none="1"> Cancellable + line="4098">Cancellable @@ -10287,9 +10304,9 @@ resulting filesystem hierarchy into @mtree. throws="1"> Store objects for @dir and all children into the repository @self, + line="4050">Store objects for @dir and all children into the repository @self, overlaying the resulting filesystem hierarchy into @mtree. - + @@ -10297,19 +10314,19 @@ overlaying the resulting filesystem hierarchy into @mtree. Repo + line="4052">Repo Path to a directory + line="4053">Path to a directory Overlay directory contents into this tree + line="4054">Overlay directory contents into this tree allow-none="1"> Optional modifier + line="4055">Optional modifier @@ -10328,7 +10345,7 @@ overlaying the resulting filesystem hierarchy into @mtree. allow-none="1"> Cancellable + line="4056">Cancellable @@ -10338,7 +10355,7 @@ overlaying the resulting filesystem hierarchy into @mtree. throws="1"> Store the metadata object @object. Return the checksum + line="2527">Store the metadata object @object. Return the checksum as @out_csum. If @expected_checksum is not %NULL, verify it against the @@ -10351,13 +10368,13 @@ computed checksum. Repo + line="2529">Repo Object type + line="2530">Object type allow-none="1"> If provided, validate content against this checksum + line="2531">If provided, validate content against this checksum Metadata + line="2532">Metadata allow-none="1"> Binary checksum + line="2533">Binary checksum @@ -10394,7 +10411,7 @@ computed checksum. allow-none="1"> Cancellable + line="2534">Cancellable @@ -10403,7 +10420,7 @@ computed checksum. c:identifier="ostree_repo_write_metadata_async"> Asynchronously store the metadata object @variant. If provided, + line="2706">Asynchronously store the metadata object @variant. If provided, the checksum @expected_checksum will be verified. @@ -10413,13 +10430,13 @@ the checksum @expected_checksum will be verified. Repo + line="2708">Repo Object type + line="2709">Object type allow-none="1"> If provided, validate content against this checksum + line="2710">If provided, validate content against this checksum Metadata + line="2711">Metadata allow-none="1"> Cancellable + line="2712">Cancellable closure="5"> Invoked when metadata is writed + line="2713">Invoked when metadata is writed allow-none="1"> Data for @callback + line="2714">Data for @callback @@ -10473,7 +10490,7 @@ the checksum @expected_checksum will be verified. throws="1"> Complete a call to ostree_repo_write_metadata_async(). + line="2747">Complete a call to ostree_repo_write_metadata_async(). @@ -10482,13 +10499,13 @@ the checksum @expected_checksum will be verified. Repo + line="2749">Repo Result + line="2750">Result transfer-ownership="full"> Binary checksum value + line="2751">Binary checksum value @@ -10509,7 +10526,7 @@ the checksum @expected_checksum will be verified. throws="1"> Store the metadata object @variant; the provided @checksum is + line="2604">Store the metadata object @variant; the provided @checksum is trusted. @@ -10519,31 +10536,31 @@ trusted. Repo + line="2606">Repo Object type + line="2607">Object type Store object with this ASCII SHA256 checksum + line="2608">Store object with this ASCII SHA256 checksum Metadata object stream + line="2609">Metadata object stream Length, may be 0 for unknown + line="2610">Length, may be 0 for unknown allow-none="1"> Cancellable + line="2611">Cancellable @@ -10562,7 +10579,7 @@ trusted. throws="1"> Store the metadata object @variant; the provided @checksum is + line="2641">Store the metadata object @variant; the provided @checksum is trusted. @@ -10572,25 +10589,25 @@ trusted. Repo + line="2643">Repo Object type + line="2644">Object type Store object with this ASCII SHA256 checksum + line="2645">Store object with this ASCII SHA256 checksum Metadata object + line="2646">Metadata object allow-none="1"> Cancellable + line="2647">Cancellable @@ -10609,10 +10626,10 @@ trusted. throws="1"> Write all metadata objects for @mtree to repo; the resulting + line="4141">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. - + @@ -10620,13 +10637,13 @@ the @mtree represented. Repo + line="4143">Repo Mutable tree + line="4144">Mutable tree transfer-ownership="full"> An #OstreeRepoFile representing @mtree's root. + line="4145">An #OstreeRepoFile representing @mtree's root. allow-none="1"> Cancellable + line="4146">Cancellable @@ -10723,12 +10740,12 @@ is called. An extensible options structure controlling checkout. Ensure that + line="937">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(). - + @@ -10800,7 +10817,7 @@ ostree_repo_checkout_tree() and ostree_repo_checkout_tree_at(). Note that cache does *not* have its refcount incremented - the lifetime of @cache must be equal to or greater than that of @opts. - + @@ -10827,11 +10844,11 @@ Note that cache does *not* have its refcount incremented - the lifetime of - + #OstreeRepoCheckoutFilterResult saying whether or not to checkout this file + line="928">#OstreeRepoCheckoutFilterResult saying whether or not to checkout this file @@ -10839,13 +10856,13 @@ Note that cache does *not* have its refcount incremented - the lifetime of Repo + line="923">Repo Path to file + line="924">Path to file File information + line="925">File information User data + line="926">User data @@ -10872,37 +10889,37 @@ Note that cache does *not* have its refcount incremented - the lifetime of - + Do checkout this object + line="911">Do checkout this object Ignore this object + line="912">Ignore this object - + No special options + line="876">No special options Ignore uid/gid of files + line="877">Ignore uid/gid of files An extensible options structure controlling checkout. Ensure that + line="35">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(). - + @@ -10957,34 +10974,34 @@ ostree_repo_checkout_tree(). - + No special options + line="886">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) + line="887">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 + line="888">Only add new files/directories Like UNION_FILES, but error if files are not identical (requires hardlink checkouts) + line="889">Like UNION_FILES, but error if files are not identical (requires hardlink checkouts) @@ -11047,7 +11064,7 @@ ostree_repo_checkout_tree(). - + @@ -11079,14 +11096,14 @@ ostree_repo_checkout_tree(). A new commit modifier. + line="4229">A new commit modifier. Control options for filter + line="4224">Control options for filter @@ -11099,7 +11116,7 @@ ostree_repo_checkout_tree(). destroy="3"> Function that can inspect individual files + line="4225">Function that can inspect individual files allow-none="1"> User data + line="4226">User data scope="async"> A #GDestroyNotify + line="4227">A #GDestroyNotify - + @@ -11138,7 +11155,7 @@ ostree_repo_checkout_tree(). version="2017.13"> See the documentation for + line="4378">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. @@ -11148,7 +11165,7 @@ Note if your process has multiple writers, you should use separate This function will add a reference to @cache without copying - you should avoid further mutation of the cache. - + @@ -11156,14 +11173,14 @@ should avoid further mutation of the cache. Modifier + line="4380">Modifier A hash table caching device,inode to checksums + line="4381">A hash table caching device,inode to checksums @@ -11172,7 +11189,7 @@ should avoid further mutation of the cache. c:identifier="ostree_repo_commit_modifier_set_sepolicy"> If @policy is non-%NULL, use it to look up labels to use for + line="4302">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 @@ -11188,7 +11205,7 @@ policy wins. An #OstreeRepoCommitModifier + line="4304">An #OstreeRepoCommitModifier @@ -11198,16 +11215,56 @@ policy wins. allow-none="1"> Policy to use for labeling + line="4305">Policy to use for labeling + + In many cases, one wants to create a "derived" commit from base commit. +SELinux policy labels are part of that base commit. This API allows +one to easily set up SELinux labeling from a base commit. + + + + + + + Commit modifier + + + + OSTree repo containing @rev + + + + Find SELinux policy from this base commit + + + + + + + If set, this function should return extended attributes to use for + line="4279">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. @@ -11219,7 +11276,7 @@ repository. An #OstreeRepoCommitModifier + line="4281">An #OstreeRepoCommitModifier @@ -11230,14 +11287,14 @@ repository. destroy="1"> Function to be invoked, should return extended attributes for path + line="4282">Function to be invoked, should return extended attributes for path Destroy notification + line="4283">Destroy notification allow-none="1"> Data for @callback: + line="4284">Data for @callback: - + @@ -11377,7 +11434,7 @@ by ostree_repo_load_commit(). - + @@ -11385,7 +11442,7 @@ by ostree_repo_load_commit(). - + @@ -11401,7 +11458,7 @@ by ostree_repo_load_commit(). - + @@ -11419,7 +11476,7 @@ by ostree_repo_load_commit(). line="235">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(). - + @@ -11467,7 +11524,7 @@ from ostree_repo_commit_traverse_iter_next(). line="214">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(). - + @@ -11505,7 +11562,7 @@ ostree_repo_commit_traverse_iter_next(). Initialize (in place) an iterator over the root of a commit object. - + @@ -11544,7 +11601,7 @@ ostree_repo_commit_traverse_iter_next(). Initialize (in place) an iterator over a directory tree. - + @@ -11594,7 +11651,7 @@ 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(). - + @@ -11620,7 +11677,7 @@ ostree_repo_commit_traverse_iter_clear(). - + @@ -11650,7 +11707,7 @@ 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(). - + - + @@ -11670,7 +11727,7 @@ ostree_repo_commit_set_devino_cache(). - + @@ -11686,10 +11743,10 @@ ostree_repo_commit_set_devino_cache(). introspectable="0"> An extensible options structure controlling archive creation. Ensure that + line="801">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(). - + @@ -12310,14 +12367,13 @@ Pass the results to ostree_repo_pull_from_remotes_async() to pull the given glib:type-name="OstreeRepoFinderAvahi" glib:get-type="ostree_repo_finder_avahi_get_type" glib:type-struct="RepoFinderAvahiClass"> - + Create a new #OstreeRepoFinderAvahi instance. It is intended that one such instance be created per process, and it be used to answer all resolution requests from #OstreeRepos. @@ -12327,11 +12383,10 @@ the #OstreeRepoFinderAvahi is running (after ostree_repo_finder_avahi_start() is called). This may be done from any thread. If @context is %NULL, the current thread-default #GMainContext is used. - + a new #OstreeRepoFinderAvahi @@ -12341,7 +12396,7 @@ If @context is %NULL, the current thread-default #GMainContext is used. nullable="1" allow-none="1"> a #GMainContext for processing Avahi events in, or %NULL to use the current thread-default @@ -12921,10 +12976,10 @@ to pull from, and hence needs to be ordered before the other. introspectable="0"> An extensible options structure controlling archive import. Ensure that + line="772">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(). - + @@ -12963,7 +13018,7 @@ options. This is used by ostree_repo_import_archive_to_mtree(). version="2017.11"> Possibly change a pathname while importing an archive. If %NULL is returned, + line="747">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()`. @@ -12973,7 +13028,7 @@ 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`. - + @@ -12981,7 +13036,7 @@ Note that enabling pathname translation will always override the setting for Repo + line="749">Repo Stat buffer + line="750">Stat buffer Path in the archive + line="751">Path in the archive User data + line="752">User data - + List only loose (plain file) objects + line="1008">List only loose (plain file) objects List only packed (compacted into blobs) objects + line="1009">List only packed (compacted into blobs) objects List all objects + line="1010">List all objects Only list objects in this repo, not parents + line="1011">Only list objects in this repo, not parents @@ -13109,32 +13164,32 @@ possible modes. line="191">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 + line="1172">No special options for pruning Don't actually delete objects + line="1173">Don't actually delete objects Do not traverse individual commit objects, only follow refs + line="1174">Do not traverse individual commit objects, only follow refs - + - + @@ -13161,46 +13216,46 @@ possible modes. - + No special options for pull + line="1231">No special options for pull Write out refs suitable for mirrors and fetch all refs if none requested + line="1232">Write out refs suitable for mirrors and fetch all refs if none requested Fetch only the commit metadata + line="1233">Fetch only the commit metadata Do verify checksums of local (filesystem-accessible) repositories (defaults on for HTTP) + line="1234">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. + line="1235">Since 2017.7. Reject writes of content objects with modes outside of 0775. Don't verify checksums of objects HTTP repositories (Since: 2017.12) + line="1236">Don't verify checksums of objects HTTP repositories (Since: 2017.12) @@ -13394,6 +13449,15 @@ in bytes, counting only content objects. + + The name of the default ed25519 signing type. + + + @@ -13728,25 +13792,1431 @@ will be returned. c:identifier="OSTREE_SEPOLICY_RESTORECON_FLAGS_KEEP_EXISTING"> + + + + Return an array with newly allocated instances of all available +signing engines; they will not be initialized. + + + an array of signing engines + + + + + + + Create a new instance of a signing engine. + + + New signing engine, or %NULL if the engine is not known + + + + + the name of desired signature engine + + + + + + Add the public key for verification. Could be called multiple times for +adding all needed keys to be used for verification. + +The @public_key argument depends of the particular engine implementation. + + + @TRUE in case if the key could be added successfully, +@FALSE in case of error (@error will contain the reason). + + + + + an #OstreeSign object + + + + single public key to be added + + + + + + Clear all previously preloaded secret and public keys. + + + @TRUE in case if no errors, @FALSE in case of error + + + + + an #OstreeSign object + + + + + + Sign the given @data with pre-loaded secret key. + +Depending of the signing engine used you will need to load +the secret key with #ostree_sign_set_sk. + + + @TRUE if @data has been signed successfully, +@FALSE in case of error (@error will contain the reason). + + + + + an #OstreeSign object + + + + the raw data to be signed with pre-loaded secret key + + + + in case of success will contain signature + + + + A #GCancellable + + + + + + Verify given data against signatures with pre-loaded public keys. + +Depending of the signing engine used you will need to load +the public key(s) with #ostree_sign_set_pk, #ostree_sign_add_pk +or #ostree_sign_load_pk. + + + @TRUE if @data has been signed at least with any single valid key, +@FALSE in case of error or no valid keys are available (@error will contain the reason). + + + + + an #OstreeSign object + + + + the raw data to check + + + + the signatures to be checked + + + + + + + + + Return the pointer to the name of currently used/selected signing engine. + + + pointer to the name +@NULL in case of error (unlikely). + + + + + an #OstreeSign object + + + + + + Load public keys for verification from anywhere. +It is expected that all keys would be added to already pre-loaded keys. + +The @options argument depends of the particular engine implementation. + +For example, @ed25515 engine could use following string-formatted options: +- @filename -- single file to use to load keys from +- @basedir -- directory containing subdirectories + 'trusted.ed25519.d' and 'revoked.ed25519.d' with appropriate + public keys. Used for testing and re-definition of system-wide + directories if defaults are not suitable for any reason. + + + @TRUE in case if at least one key could be load successfully, +@FALSE in case of error (@error will contain the reason). + + + + + an #OstreeSign object + + + + any options + + + + + + Return the pointer to the string with format used in (detached) metadata for +current signing engine. + + + pointer to the metadata format, +@NULL in case of error (unlikely). + + + + + an #OstreeSign object + + + + + + Return the pointer to the name of the key used in (detached) metadata for +current signing engine. + + + pointer to the metadata key name, +@NULL in case of error (unlikely). + + + + + an #OstreeSign object + + + + + + Set the public key for verification. It is expected what all +previously pre-loaded public keys will be dropped. + +The @public_key argument depends of the particular engine implementation. + + + @TRUE in case if the key could be set successfully, +@FALSE in case of error (@error will contain the reason). + + + + + an #OstreeSign object + + + + single public key to be added + + + + + + Set the secret key to be used for signing data, commits and summary. + +The @secret_key argument depends of the particular engine implementation. + + + @TRUE in case if the key could be set successfully, +@FALSE in case of error (@error will contain the reason). + + + + + an #OstreeSign object + + + + secret key to be added + + + + + + Add the public key for verification. Could be called multiple times for +adding all needed keys to be used for verification. + +The @public_key argument depends of the particular engine implementation. + + + @TRUE in case if the key could be added successfully, +@FALSE in case of error (@error will contain the reason). + + + + + an #OstreeSign object + + + + single public key to be added + + + + + + Clear all previously preloaded secret and public keys. + + + @TRUE in case if no errors, @FALSE in case of error + + + + + an #OstreeSign object + + + + + + Add a signature to a commit. + +Depending of the signing engine used you will need to load +the secret key with #ostree_sign_set_sk. + + + @TRUE if commit has been signed successfully, +@FALSE in case of error (@error will contain the reason). + + + + + an #OstreeSign object + + + + an #OsreeRepo object + + + + SHA256 of given commit to sign + + + + A #GCancellable + + + + + + Verify if commit is signed with known key. + +Depending of the signing engine used you will need to load +the public key(s) for verification with #ostree_sign_set_pk, +#ostree_sign_add_pk and/or #ostree_sign_load_pk. + + + @TRUE if commit has been verified successfully, +@FALSE in case of error or no valid keys are available (@error will contain the reason). + + + + + an #OstreeSign object + + + + an #OsreeRepo object + + + + SHA256 of given commit to verify + + + + + + + A #GCancellable + + + + + + Sign the given @data with pre-loaded secret key. + +Depending of the signing engine used you will need to load +the secret key with #ostree_sign_set_sk. + + + @TRUE if @data has been signed successfully, +@FALSE in case of error (@error will contain the reason). + + + + + an #OstreeSign object + + + + the raw data to be signed with pre-loaded secret key + + + + in case of success will contain signature + + + + A #GCancellable + + + + + + Verify given data against signatures with pre-loaded public keys. + +Depending of the signing engine used you will need to load +the public key(s) with #ostree_sign_set_pk, #ostree_sign_add_pk +or #ostree_sign_load_pk. + + + @TRUE if @data has been signed at least with any single valid key, +@FALSE in case of error or no valid keys are available (@error will contain the reason). + + + + + an #OstreeSign object + + + + the raw data to check + + + + the signatures to be checked + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Return the pointer to the name of currently used/selected signing engine. + + + pointer to the name +@NULL in case of error (unlikely). + + + + + an #OstreeSign object + + + + + + Load public keys for verification from anywhere. +It is expected that all keys would be added to already pre-loaded keys. + +The @options argument depends of the particular engine implementation. + +For example, @ed25515 engine could use following string-formatted options: +- @filename -- single file to use to load keys from +- @basedir -- directory containing subdirectories + 'trusted.ed25519.d' and 'revoked.ed25519.d' with appropriate + public keys. Used for testing and re-definition of system-wide + directories if defaults are not suitable for any reason. + + + @TRUE in case if at least one key could be load successfully, +@FALSE in case of error (@error will contain the reason). + + + + + an #OstreeSign object + + + + any options + + + + + + Return the pointer to the string with format used in (detached) metadata for +current signing engine. + + + pointer to the metadata format, +@NULL in case of error (unlikely). + + + + + an #OstreeSign object + + + + + + Return the pointer to the name of the key used in (detached) metadata for +current signing engine. + + + pointer to the metadata key name, +@NULL in case of error (unlikely). + + + + + an #OstreeSign object + + + + + + Set the public key for verification. It is expected what all +previously pre-loaded public keys will be dropped. + +The @public_key argument depends of the particular engine implementation. + + + @TRUE in case if the key could be set successfully, +@FALSE in case of error (@error will contain the reason). + + + + + an #OstreeSign object + + + + single public key to be added + + + + + + Set the secret key to be used for signing data, commits and summary. + +The @secret_key argument depends of the particular engine implementation. + + + @TRUE in case if the key could be set successfully, +@FALSE in case of error (@error will contain the reason). + + + + + an #OstreeSign object + + + + secret key to be added + + + + + + Add a signature to a summary file. +Based on ostree_repo_add_gpg_signature_summary implementation. + + + @TRUE if summary file has been signed with all provided keys + + + + + Self + + + + ostree repository + + + + keys -- GVariant containing keys as GVarints specific to signature type. + + + + A #GCancellable + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + pointer to the name +@NULL in case of error (unlikely). + + + + + an #OstreeSign object + + + + + + + + + + @TRUE if @data has been signed successfully, +@FALSE in case of error (@error will contain the reason). + + + + + an #OstreeSign object + + + + the raw data to be signed with pre-loaded secret key + + + + in case of success will contain signature + + + + A #GCancellable + + + + + + + + + + @TRUE if @data has been signed at least with any single valid key, +@FALSE in case of error or no valid keys are available (@error will contain the reason). + + + + + an #OstreeSign object + + + + the raw data to check + + + + the signatures to be checked + + + + + + + + + + + + + pointer to the metadata key name, +@NULL in case of error (unlikely). + + + + + an #OstreeSign object + + + + + + + + + + pointer to the metadata format, +@NULL in case of error (unlikely). + + + + + an #OstreeSign object + + + + + + + + + + @TRUE in case if no errors, @FALSE in case of error + + + + + an #OstreeSign object + + + + + + + + + + @TRUE in case if the key could be set successfully, +@FALSE in case of error (@error will contain the reason). + + + + + an #OstreeSign object + + + + secret key to be added + + + + + + + + + + @TRUE in case if the key could be set successfully, +@FALSE in case of error (@error will contain the reason). + + + + + an #OstreeSign object + + + + single public key to be added + + + + + + + + + + @TRUE in case if the key could be added successfully, +@FALSE in case of error (@error will contain the reason). + + + + + an #OstreeSign object + + + + single public key to be added + + + + + + + + + + @TRUE in case if at least one key could be load successfully, +@FALSE in case of error (@error will contain the reason). + + + + + an #OstreeSign object + + + + any options + + + + + + Parameters controlling optimization of static deltas. - + line="1048">Parameters controlling optimization of static deltas. + Optimize for speed of delta creation over space + line="1050">Optimize for speed of delta creation over space Optimize for delta size (may be very slow) + line="1051">Optimize for delta size (may be very slow) Path to deployment origin file + line="1244">Path to deployment origin file A deployment path + line="1242">A deployment path @@ -13814,7 +15284,7 @@ ostree_sysroot_new_default(). filename="ostree-sysroot-cleanup.c" line="500">Delete any state that resulted from a partially completed transaction, such as incomplete deployments. - + @@ -13851,7 +15321,7 @@ 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 - + @@ -13911,12 +15381,12 @@ Locking: exclusive throws="1"> Check out deployment tree with revision @revision, performing a 3 + line="2848">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. - + @@ -13924,7 +15394,7 @@ ostree_sysroot_stage_tree() API. Sysroot + line="2850">Sysroot allow-none="1"> osname to use for merge deployment + line="2851">osname to use for merge deployment Checksum to add + line="2852">Checksum to add allow-none="1"> Origin to use for upgrades + line="2853">Origin to use for upgrades allow-none="1"> Use this deployment for merge path + line="2854">Use this deployment for merge path allow-none="1"> Use these as kernel arguments; if %NULL, inherit options from provided_merge_deployment + line="2855">Use these as kernel arguments; if %NULL, inherit options from provided_merge_deployment @@ -13977,7 +15447,7 @@ ostree_sysroot_stage_tree() API. transfer-ownership="full"> The new deployment path + line="2856">The new deployment path allow-none="1"> Cancellable + line="2857">Cancellable @@ -13996,9 +15466,9 @@ ostree_sysroot_stage_tree() API. throws="1"> Entirely replace the kernel arguments of @deployment with the + line="3192">Entirely replace the kernel arguments of @deployment with the values in @new_kargs. - + @@ -14006,19 +15476,19 @@ values in @new_kargs. Sysroot + line="3194">Sysroot A deployment + line="3195">A deployment Replace deployment's kernel arguments + line="3196">Replace deployment's kernel arguments @@ -14029,7 +15499,7 @@ values in @new_kargs. allow-none="1"> Cancellable + line="3197">Cancellable @@ -14039,10 +15509,10 @@ values in @new_kargs. throws="1"> By default, deployment directories are not mutable. This function + line="3241">By default, deployment directories are not mutable. This function will allow making them temporarily mutable, for example to allow layering additional non-OSTree content. - + @@ -14050,19 +15520,19 @@ layering additional non-OSTree content. Sysroot + line="3243">Sysroot A deployment + line="3244">A deployment Whether or not deployment's files can be changed + line="3245">Whether or not deployment's files can be changed allow-none="1"> Cancellable + line="3246">Cancellable @@ -14082,7 +15552,7 @@ layering additional non-OSTree content. throws="1"> By default, deployments may be subject to garbage collection. Typical uses of + line="2063">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 @@ -14091,7 +15561,7 @@ 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). - + @@ -14099,19 +15569,19 @@ the staged deployment (as it's not in the bootloader entries). Sysroot + line="2065">Sysroot A deployment + line="2066">A deployment Whether or not deployment will be automatically GC'd + line="2067">Whether or not deployment will be automatically GC'd @@ -14122,13 +15592,13 @@ the staged deployment (as it's not in the bootloader entries). throws="1"> Configure the target deployment @deployment such that it + line="1867">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. - + @@ -14136,19 +15606,19 @@ across reboots. Sysroot + line="1869">Sysroot Deployment + line="1870">Deployment Transition to this unlocked state + line="1871">Transition to this unlocked state @@ -14158,7 +15628,7 @@ across reboots. allow-none="1"> Cancellable + line="1872">Cancellable @@ -14198,14 +15668,14 @@ across reboots. The currently booted deployment, or %NULL if none + line="1161">The currently booted deployment, or %NULL if none Sysroot + line="1159">Sysroot @@ -14228,20 +15698,20 @@ across reboots. Path to deployment root directory + line="1230">Path to deployment root directory Sysroot + line="1227">Sysroot A deployment + line="1228">A deployment @@ -14250,27 +15720,27 @@ across reboots. c:identifier="ostree_sysroot_get_deployment_dirpath"> Note this function only returns a *relative* path - if you want + line="1204">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 + line="1213">Path to deployment root directory, relative to sysroot Repo + line="1206">Repo A deployment + line="1207">A deployment @@ -14281,7 +15751,7 @@ or concatenate it with the full ostree_sysroot_get_path(). Ordered list of deployments + line="1191">Ordered list of deployments @@ -14290,7 +15760,7 @@ or concatenate it with the full ostree_sysroot_get_path(). Sysroot + line="1189">Sysroot @@ -14321,20 +15791,20 @@ prior to calling this function. c:identifier="ostree_sysroot_get_merge_deployment"> Find the deployment to use as a configuration merge source; this is + line="1422">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 + line="1430">Configuration merge deployment Sysroot + line="1424">Sysroot allow-none="1"> Operating system group + line="1425">Operating system group @@ -14367,20 +15837,20 @@ the first one in the current deployment list which matches osname. throws="1"> Retrieve the OSTree repository in sysroot @self. The repo is guaranteed to be open + line="1255">Retrieve the OSTree repository in sysroot @self. The repo is guaranteed to be open (see ostree_repo_open()). - + %TRUE on success, %FALSE otherwise + line="1265">%TRUE on success, %FALSE otherwise Sysroot + line="1257">Sysroot allow-none="1"> Repository in sysroot @self + line="1258">Repository in sysroot @self allow-none="1"> Cancellable + line="1259">Cancellable @@ -14412,14 +15882,14 @@ the first one in the current deployment list which matches osname. The currently staged deployment, or %NULL if none + line="1175">The currently staged deployment, or %NULL if none Sysroot + line="1173">Sysroot @@ -14442,10 +15912,10 @@ the first one in the current deployment list which matches osname. throws="1"> Initialize the directory structure for an "osname", which is a + line="1618">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. - + @@ -14453,13 +15923,13 @@ is required for generating a deployment. Sysroot + line="1620">Sysroot Name group of operating system checkouts + line="1621">Name group of operating system checkouts allow-none="1"> Cancellable + line="1622">Cancellable @@ -14558,7 +16028,7 @@ rootfs @self. #OstreeSysroot + line="1091">#OstreeSysroot allow-none="1"> Cancellable + line="1093">Cancellable @@ -14581,7 +16051,7 @@ rootfs @self. Acquire an exclusive multi-process write lock for @self. This call + line="1472">Acquire an exclusive multi-process write lock for @self. This call blocks until the lock has been acquired. The lock is not reentrant. @@ -14595,7 +16065,7 @@ be released if @self is deallocated. Self + line="1474">Self @@ -14603,8 +16073,8 @@ be released if @self is deallocated. An asynchronous version of ostree_sysroot_lock(). - + line="1582">An asynchronous version of ostree_sysroot_lock(). + @@ -14612,7 +16082,7 @@ be released if @self is deallocated. Self + line="1584">Self allow-none="1"> Cancellable + line="1585">Cancellable closure="2"> Callback + line="1586">Callback allow-none="1"> User data + line="1587">User data @@ -14651,8 +16121,8 @@ be released if @self is deallocated. throws="1"> Call when ostree_sysroot_lock_async() is ready. - + line="1601">Call when ostree_sysroot_lock_async() is ready. + @@ -14660,50 +16130,37 @@ be released if @self is deallocated. Self + line="1603">Self Result + line="1604">Result - - - - - - - - - - - - + A new config file which sets @refspec as an origin + line="1461">A new config file which sets @refspec as an origin Sysroot + line="1458">Sysroot A refspec + line="1459">A refspec @@ -14715,7 +16172,7 @@ be released if @self is deallocated. filename="ostree-sysroot-cleanup.c" line="517">Like ostree_sysroot_cleanup() in that it cleans up incomplete deployments and old boot versions, but does NOT prune the repository. - + @@ -14742,12 +16199,12 @@ and old boot versions, but does NOT prune the repository. version="2017.7"> Find the pending and rollback deployments for @osname. Pass %NULL for @osname + line="1365">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. - + @@ -14755,7 +16212,7 @@ we're not looking at the booted deployment. Sysroot + line="1367">Sysroot allow-none="1"> "stateroot" name + line="1368">"stateroot" name allow-none="1"> The pending deployment + line="1369">The pending deployment allow-none="1"> The rollback deployment + line="1370">The rollback deployment @@ -14794,21 +16251,21 @@ we're not looking at the booted deployment. This function is a variant of ostree_sysroot_get_repo() that cannot fail, and + line="1280">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_initialize() or ostree_sysroot_load() has been invoked successfully. - + The OSTree repository in sysroot @self. + line="1288">The OSTree repository in sysroot @self. Sysroot + line="1282">Sysroot @@ -14845,7 +16302,7 @@ be invoked before or after ostree_sysroot_initialize(). throws="1"> Prepend @new_deployment to the list of deployments, commit, and + line="1682">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. @@ -14867,7 +16324,7 @@ 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. - + @@ -14875,7 +16332,7 @@ later, instead. Sysroot + line="1684">Sysroot allow-none="1"> OS name + line="1685">OS name Prepend this deployment to the list + line="1686">Prepend this deployment to the list allow-none="1"> Use this deployment for configuration merge + line="1687">Use this deployment for configuration merge Flags controlling behavior + line="1688">Flags controlling behavior @@ -14915,7 +16372,7 @@ later, instead. allow-none="1"> Cancellable + line="1689">Cancellable @@ -14926,9 +16383,9 @@ later, instead. throws="1"> Like ostree_sysroot_deploy_tree(), but "finalization" only occurs at OS + line="2953">Like ostree_sysroot_deploy_tree(), but "finalization" only occurs at OS shutdown time. - + @@ -14936,7 +16393,7 @@ shutdown time. Sysroot + line="2955">Sysroot allow-none="1"> osname to use for merge deployment + line="2956">osname to use for merge deployment Checksum to add + line="2957">Checksum to add allow-none="1"> Origin to use for upgrades + line="2958">Origin to use for upgrades allow-none="1"> Use this deployment for merge path + line="2959">Use this deployment for merge path allow-none="1"> Use these as kernel arguments; if %NULL, inherit options from provided_merge_deployment + line="2960">Use these as kernel arguments; if %NULL, inherit options from provided_merge_deployment @@ -14989,7 +16446,7 @@ shutdown time. transfer-ownership="full"> The new deployment path + line="2961">The new deployment path allow-none="1"> Cancellable + line="2962">Cancellable @@ -15008,14 +16465,14 @@ shutdown time. throws="1"> Try to acquire an exclusive multi-process write lock for @self. If + line="1498">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. - + @@ -15023,7 +16480,7 @@ be released if @self is deallocated. Self + line="1500">Self transfer-ownership="full"> Whether or not the lock has been acquired + line="1501">Whether or not the lock has been acquired @@ -15062,10 +16519,10 @@ This undoes the effect of `ostree_sysroot_load()`. Clear the lock previously acquired with ostree_sysroot_lock(). It + line="1546">Clear the lock previously acquired with ostree_sysroot_lock(). It is safe to call this function if the lock has not been previously acquired. - + @@ -15073,7 +16530,7 @@ acquired. Self + line="1548">Self @@ -15083,9 +16540,9 @@ acquired. throws="1"> Older version of ostree_sysroot_write_deployments_with_options(). This + line="2224">Older version of ostree_sysroot_write_deployments_with_options(). This version will perform post-deployment cleanup by default. - + @@ -15093,13 +16550,13 @@ version will perform post-deployment cleanup by default. Sysroot + line="2226">Sysroot List of new deployments + line="2227">List of new deployments @@ -15110,7 +16567,7 @@ version will perform post-deployment cleanup by default. allow-none="1"> Cancellable + line="2228">Cancellable @@ -15121,13 +16578,13 @@ version will perform post-deployment cleanup by default. throws="1"> Assuming @new_deployments have already been deployed in place on disk via + line="2350">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. - + @@ -15135,13 +16592,13 @@ if for example you want to control pruning of the repository. Sysroot + line="2352">Sysroot List of new deployments + line="2353">List of new deployments @@ -15149,7 +16606,7 @@ if for example you want to control pruning of the repository. Options + line="2354">Options @@ -15159,7 +16616,7 @@ if for example you want to control pruning of the repository. allow-none="1"> Cancellable + line="2355">Cancellable @@ -15169,10 +16626,10 @@ if for example you want to control pruning of the repository. throws="1"> Immediately replace the origin file of the referenced @deployment + line="958">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. - + @@ -15180,13 +16637,13 @@ this function will write the current origin of @deployment. System root + line="960">System root Deployment + line="961">Deployment allow-none="1"> Origin content + line="962">Origin content allow-none="1"> Cancellable + line="963">Cancellable @@ -15239,7 +16696,7 @@ Currently, the structured data is only available via the systemd journal. - + @@ -15718,7 +17175,7 @@ from inside the tree such as package databases. - + @@ -15791,7 +17248,7 @@ users who had been using zero before. - + @@ -15875,24 +17332,24 @@ care of synchronization. - + %TRUE if current libostree has at least the requested version, %FALSE otherwise + line="2714">%TRUE if current libostree has at least the requested version, %FALSE otherwise Major/year required + line="2711">Major/year required Release version required + line="2712">Release version required @@ -15900,7 +17357,7 @@ care of synchronization. - + line="1503">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. - + @@ -15956,7 +17413,7 @@ character is used. Overwrite the contents of @buf with stringified version of @csum. - + @@ -15980,7 +17437,7 @@ character is used. - + - + Like ostree_checksum_bytes_peek(), but also throws @error. - + Compute the OSTree checksum for a given file. - + @@ -16093,7 +17550,7 @@ character is used. filename="ostree-core.c" line="1075">Asynchronously compute the OSTree checksum for a given file; complete with ostree_checksum_file_async_finish(). - + @@ -16154,7 +17611,7 @@ complete with ostree_checksum_file_async_finish(). filename="ostree-core.c" line="1109">Finish computing the OSTree checksum for a given file; see ostree_checksum_file_async(). - + @@ -16193,7 +17650,7 @@ ostree_checksum_file_async(). line="968">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. - + @@ -16250,7 +17707,7 @@ allocated buffer. Compute the OSTree checksum for a given input. - + @@ -16309,7 +17766,7 @@ allocated buffer. - + - + Overwrite the contents of @buf with stringified version of @csum. - + @@ -16378,7 +17835,7 @@ allocated buffer. filename="ostree-core.c" line="1413">Convert @checksum from a string to binary in-place, without allocating memory. Use this function in hot code paths. - + @@ -16398,7 +17855,7 @@ allocating memory. Use this function in hot code paths. - + - + Compare two binary checksums, using memcmp(). - + @@ -16575,7 +18032,7 @@ must be %NULL-terminated; it may be empty, but must not be %NULL. version="2018.2"> There are use cases where one wants a checksum just of the content of a + line="2395">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. @@ -16586,18 +18043,18 @@ 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 + line="2411">A SHA-256 hex string, or %NULL if @commit_variant is not well-formed A commit object + line="2397">A commit object @@ -16608,12 +18065,12 @@ root "dirmeta" checksum (both in binary form, not hexadecimal). throws="1"> Reads a commit's "ostree.sizes" metadata and returns an array of + line="2569">Reads a commit's "ostree.sizes" metadata and returns an array of #OstreeCommitSizesEntry in @out_sizes_entries. Each element represents an object in the commit. If the commit does not contain the "ostree.sizes" metadata, a %G_IO_ERROR_NOT_FOUND error will be returned. - + @@ -16621,7 +18078,7 @@ returned. variant of type %OSTREE_OBJECT_TYPE_COMMIT + line="2571">variant of type %OSTREE_OBJECT_TYPE_COMMIT allow-none="1"> + line="2572"> return location for an array of object size entries @@ -16641,7 +18098,7 @@ returned. - + - + c:identifier="ostree_commit_get_timestamp" + version="2016.3"> + + timestamp in seconds since the Unix epoch, UTC + Commit object @@ -16677,7 +18141,7 @@ if none filename="ostree-core.c" line="730">A thin wrapper for ostree_content_stream_parse(); this function converts an object content stream back into components. - + @@ -16745,7 +18209,7 @@ converts an object content stream back into components. filename="ostree-core.c" line="679">A thin wrapper for ostree_content_stream_parse(); this function converts an object content stream back into components. - + @@ -16819,7 +18283,7 @@ converts an object content stream back into components. filename="ostree-core.c" line="580">The reverse of ostree_raw_file_to_content_stream(); this function converts an object content stream back into components. - + @@ -16888,7 +18352,7 @@ converts an object content stream back into components. - + Use this function with #GHashTable and ostree_object_name_serialize(). - + @@ -17191,7 +18655,7 @@ to the empty OstreeKernelArgs - + @@ -17206,7 +18670,7 @@ to the empty OstreeKernelArgs Reverse ostree_object_to_string(). - + @@ -17243,7 +18707,7 @@ to the empty OstreeKernelArgs filename="ostree-core.c" line="1365">Reverse ostree_object_name_serialize(). Note that @out_checksum is only valid for the lifetime of @variant, and must not be freed. - + @@ -17276,7 +18740,7 @@ only valid for the lifetime of @variant, and must not be freed. - + - + The reverse of ostree_object_type_to_string(). - + @@ -17344,7 +18808,7 @@ only valid for the lifetime of @variant, and must not be freed. Serialize @objtype to a string; this is used for file extensions. - + @@ -17367,7 +18831,7 @@ only valid for the lifetime of @variant, and must not be freed. 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. - + filename="ostree-core.c" line="478">Convert from a "bare" file representation into an OSTREE_OBJECT_TYPE_FILE stream suitable for ostree pull. - + @@ -17472,7 +18936,7 @@ 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). - + @@ -17535,7 +18999,7 @@ of flags. The following flags are currently defined: line="545">Convert from a "bare" file representation into an OSTREE_OBJECT_TYPE_FILE stream. This is a fundamental operation for writing data to an #OstreeRepo. - + @@ -17593,7 +19057,7 @@ for writing data to an #OstreeRepo. - + @@ -17722,13 +19186,55 @@ for writing data to an #OstreeRepo. + + Return an array with newly allocated instances of all available +signing engines; they will not be initialized. + + + an array of signing engines + + + + + + + Create a new instance of a signing engine. + + + New signing engine, or %NULL if the engine is not known + + + + + the name of desired signature engine + + + + Use this function to see if input strings are checksums. - + - + - + - + - + Use this to validate the basic structure of @commit, independent of any other objects it references. - + - + Use this to validate the basic structure of @dirmeta. - + filename="ostree-core.c" line="2220">Use this to validate the basic structure of @dirtree, independent of any other objects it references. - + - + - + = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ostree_sys::OSTREE_COMMIT_GVARIANT_STRING).to_str().unwrap()}); +#[cfg(any(feature = "v2020_4", feature = "dox"))] +pub static COMMIT_META_KEY_ARCHITECTURE: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ostree_sys::OSTREE_COMMIT_META_KEY_ARCHITECTURE).to_str().unwrap()}); #[cfg(any(feature = "v2018_6", feature = "dox"))] pub static COMMIT_META_KEY_COLLECTION_BINDING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ostree_sys::OSTREE_COMMIT_META_KEY_COLLECTION_BINDING).to_str().unwrap()}); #[cfg(any(feature = "v2017_7", feature = "dox"))] @@ -26,6 +28,7 @@ pub static META_KEY_DEPLOY_COLLECTION_ID: once_cell::sync::Lazy<&'static str> = pub static ORIGIN_TRANSIENT_GROUP: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ostree_sys::OSTREE_ORIGIN_TRANSIENT_GROUP).to_str().unwrap()}); #[cfg(any(feature = "v2018_6", feature = "dox"))] pub static REPO_METADATA_REF: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ostree_sys::OSTREE_REPO_METADATA_REF).to_str().unwrap()}); +pub static SIGN_NAME_ED25519: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ostree_sys::OSTREE_SIGN_NAME_ED25519).to_str().unwrap()}); pub static SUMMARY_GVARIANT_STRING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ostree_sys::OSTREE_SUMMARY_GVARIANT_STRING).to_str().unwrap()}); pub static SUMMARY_SIG_GVARIANT_STRING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ostree_sys::OSTREE_SUMMARY_SIG_GVARIANT_STRING).to_str().unwrap()}); pub static TREE_GVARIANT_STRING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe{CStr::from_ptr(ostree_sys::OSTREE_TREE_GVARIANT_STRING).to_str().unwrap()}); diff --git a/rust-bindings/rust/src/auto/enums.rs b/rust-bindings/rust/src/auto/enums.rs index a7f29439..4ed7c2ab 100644 --- a/rust-bindings/rust/src/auto/enums.rs +++ b/rust-bindings/rust/src/auto/enums.rs @@ -150,46 +150,6 @@ impl FromGlib for GpgSignatureAttr { } } -#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] -#[derive(Clone, Copy)] -#[non_exhaustive] -pub enum GpgSignatureFormatFlags { - GpgSignatureFormatDefault, - #[doc(hidden)] - __Unknown(i32), -} - -impl fmt::Display for GpgSignatureFormatFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "GpgSignatureFormatFlags::{}", match *self { - GpgSignatureFormatFlags::GpgSignatureFormatDefault => "GpgSignatureFormatDefault", - _ => "Unknown", - }) - } -} - -#[doc(hidden)] -impl ToGlib for GpgSignatureFormatFlags { - type GlibType = ostree_sys::OstreeGpgSignatureFormatFlags; - - fn to_glib(&self) -> ostree_sys::OstreeGpgSignatureFormatFlags { - match *self { - GpgSignatureFormatFlags::GpgSignatureFormatDefault => ostree_sys::OSTREE_GPG_SIGNATURE_FORMAT_DEFAULT, - GpgSignatureFormatFlags::__Unknown(value) => value - } - } -} - -#[doc(hidden)] -impl FromGlib for GpgSignatureFormatFlags { - fn from_glib(value: ostree_sys::OstreeGpgSignatureFormatFlags) -> Self { - match value { - 0 => GpgSignatureFormatFlags::GpgSignatureFormatDefault, - value => GpgSignatureFormatFlags::__Unknown(value), - } - } -} - #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] #[derive(Clone, Copy)] #[non_exhaustive] @@ -546,54 +506,6 @@ impl FromGlib for RepoMode { } } -#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] -#[derive(Clone, Copy)] -#[non_exhaustive] -pub enum RepoPruneFlags { - None, - NoPrune, - RefsOnly, - #[doc(hidden)] - __Unknown(i32), -} - -impl fmt::Display for RepoPruneFlags { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "RepoPruneFlags::{}", match *self { - RepoPruneFlags::None => "None", - RepoPruneFlags::NoPrune => "NoPrune", - RepoPruneFlags::RefsOnly => "RefsOnly", - _ => "Unknown", - }) - } -} - -#[doc(hidden)] -impl ToGlib for RepoPruneFlags { - type GlibType = ostree_sys::OstreeRepoPruneFlags; - - fn to_glib(&self) -> ostree_sys::OstreeRepoPruneFlags { - match *self { - RepoPruneFlags::None => ostree_sys::OSTREE_REPO_PRUNE_FLAGS_NONE, - RepoPruneFlags::NoPrune => ostree_sys::OSTREE_REPO_PRUNE_FLAGS_NO_PRUNE, - RepoPruneFlags::RefsOnly => ostree_sys::OSTREE_REPO_PRUNE_FLAGS_REFS_ONLY, - RepoPruneFlags::__Unknown(value) => value - } - } -} - -#[doc(hidden)] -impl FromGlib for RepoPruneFlags { - fn from_glib(value: ostree_sys::OstreeRepoPruneFlags) -> Self { - match value { - 0 => RepoPruneFlags::None, - 1 => RepoPruneFlags::NoPrune, - 2 => RepoPruneFlags::RefsOnly, - value => RepoPruneFlags::__Unknown(value), - } - } -} - #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] #[derive(Clone, Copy)] #[non_exhaustive] diff --git a/rust-bindings/rust/src/auto/flags.rs b/rust-bindings/rust/src/auto/flags.rs index 6b481f23..4da3f940 100644 --- a/rust-bindings/rust/src/auto/flags.rs +++ b/rust-bindings/rust/src/auto/flags.rs @@ -61,6 +61,28 @@ impl FromGlib for DiffFlags { } } +bitflags! { + pub struct GpgSignatureFormatFlags: u32 { + const GPG_SIGNATURE_FORMAT_DEFAULT = 0; + } +} + +#[doc(hidden)] +impl ToGlib for GpgSignatureFormatFlags { + type GlibType = ostree_sys::OstreeGpgSignatureFormatFlags; + + fn to_glib(&self) -> ostree_sys::OstreeGpgSignatureFormatFlags { + self.bits() + } +} + +#[doc(hidden)] +impl FromGlib for GpgSignatureFormatFlags { + fn from_glib(value: ostree_sys::OstreeGpgSignatureFormatFlags) -> GpgSignatureFormatFlags { + GpgSignatureFormatFlags::from_bits_truncate(value) + } +} + bitflags! { pub struct RepoCommitModifierFlags: u32 { const NONE = 0; @@ -188,6 +210,30 @@ impl FromGlib for RepoListRefsExtFlags { } } +bitflags! { + pub struct RepoPruneFlags: u32 { + const NONE = 0; + const NO_PRUNE = 1; + const REFS_ONLY = 2; + } +} + +#[doc(hidden)] +impl ToGlib for RepoPruneFlags { + type GlibType = ostree_sys::OstreeRepoPruneFlags; + + fn to_glib(&self) -> ostree_sys::OstreeRepoPruneFlags { + self.bits() + } +} + +#[doc(hidden)] +impl FromGlib for RepoPruneFlags { + fn from_glib(value: ostree_sys::OstreeRepoPruneFlags) -> RepoPruneFlags { + RepoPruneFlags::from_bits_truncate(value) + } +} + bitflags! { pub struct RepoPullFlags: u32 { const NONE = 0; diff --git a/rust-bindings/rust/src/auto/functions.rs b/rust-bindings/rust/src/auto/functions.rs index 0558bbea..9ae950ec 100644 --- a/rust-bindings/rust/src/auto/functions.rs +++ b/rust-bindings/rust/src/auto/functions.rs @@ -120,6 +120,7 @@ pub fn commit_get_parent(commit_variant: &glib::Variant) -> Option { } } +#[cfg(any(feature = "v2016_3", feature = "dox"))] pub fn commit_get_timestamp(commit_variant: &glib::Variant) -> u64 { unsafe { ostree_sys::ostree_commit_get_timestamp(commit_variant.to_glib_none().0) diff --git a/rust-bindings/rust/src/auto/mod.rs b/rust-bindings/rust/src/auto/mod.rs index 6a066f06..796b21e4 100644 --- a/rust-bindings/rust/src/auto/mod.rs +++ b/rust-bindings/rust/src/auto/mod.rs @@ -62,6 +62,10 @@ pub use self::repo_finder_override::RepoFinderOverrideExt; mod se_policy; pub use self::se_policy::{SePolicy, SePolicyClass}; +mod sign; +pub use self::sign::{Sign, NONE_SIGN}; +pub use self::sign::SignExt; + mod sysroot; pub use self::sysroot::{Sysroot, SysrootClass}; @@ -98,7 +102,6 @@ pub use self::repo_transaction_stats::RepoTransactionStats; mod enums; pub use self::enums::DeploymentUnlockedState; pub use self::enums::GpgSignatureAttr; -pub use self::enums::GpgSignatureFormatFlags; pub use self::enums::ObjectType; #[cfg(any(feature = "v2018_2", feature = "dox"))] pub use self::enums::RepoCheckoutFilterResult; @@ -107,7 +110,6 @@ pub use self::enums::RepoCheckoutOverwriteMode; pub use self::enums::RepoCommitFilterResult; pub use self::enums::RepoCommitIterResult; pub use self::enums::RepoMode; -pub use self::enums::RepoPruneFlags; pub use self::enums::RepoRemoteChange; pub use self::enums::StaticDeltaGenerateOpt; @@ -115,12 +117,14 @@ mod flags; #[cfg(any(feature = "v2017_13", feature = "dox"))] pub use self::flags::ChecksumFlags; pub use self::flags::DiffFlags; +pub use self::flags::GpgSignatureFormatFlags; pub use self::flags::RepoCommitModifierFlags; #[cfg(any(feature = "v2015_7", feature = "dox"))] pub use self::flags::RepoCommitState; pub use self::flags::RepoCommitTraverseFlags; pub use self::flags::RepoListObjectsFlags; pub use self::flags::RepoListRefsExtFlags; +pub use self::flags::RepoPruneFlags; pub use self::flags::RepoPullFlags; pub use self::flags::RepoResolveRevExtFlags; pub use self::flags::SePolicyRestoreconFlags; @@ -132,6 +136,8 @@ pub mod functions; mod constants; pub use self::constants::COMMIT_GVARIANT_STRING; +#[cfg(any(feature = "v2020_4", feature = "dox"))] +pub use self::constants::COMMIT_META_KEY_ARCHITECTURE; #[cfg(any(feature = "v2018_6", feature = "dox"))] pub use self::constants::COMMIT_META_KEY_COLLECTION_BINDING; #[cfg(any(feature = "v2017_7", feature = "dox"))] @@ -152,6 +158,7 @@ pub use self::constants::META_KEY_DEPLOY_COLLECTION_ID; pub use self::constants::ORIGIN_TRANSIENT_GROUP; #[cfg(any(feature = "v2018_6", feature = "dox"))] pub use self::constants::REPO_METADATA_REF; +pub use self::constants::SIGN_NAME_ED25519; pub use self::constants::SUMMARY_GVARIANT_STRING; pub use self::constants::SUMMARY_SIG_GVARIANT_STRING; pub use self::constants::TREE_GVARIANT_STRING; @@ -169,4 +176,5 @@ pub mod traits { pub use super::RepoFinderMountExt; #[cfg(any(feature = "v2018_6", feature = "dox"))] pub use super::RepoFinderOverrideExt; + pub use super::SignExt; } diff --git a/rust-bindings/rust/src/auto/repo_commit_modifier.rs b/rust-bindings/rust/src/auto/repo_commit_modifier.rs index c1d9850a..048474ae 100644 --- a/rust-bindings/rust/src/auto/repo_commit_modifier.rs +++ b/rust-bindings/rust/src/auto/repo_commit_modifier.rs @@ -4,10 +4,12 @@ use gio; use glib; +use glib::object::IsA; use glib::translate::*; use glib::GString; use ostree_sys; use std::boxed::Box as Box_; +use std::ptr; use Repo; use RepoCommitFilterResult; use RepoCommitModifierFlags; @@ -65,6 +67,14 @@ impl RepoCommitModifier { } } + pub fn set_sepolicy_from_commit>(&self, repo: &Repo, rev: &str, cancellable: Option<&P>) -> Result<(), glib::Error> { + unsafe { + let mut error = ptr::null_mut(); + let _ = ostree_sys::ostree_repo_commit_modifier_set_sepolicy_from_commit(self.to_glib_none().0, repo.to_glib_none().0, rev.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error); + if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) } + } + } + pub fn set_xattr_callback glib::Variant + 'static>(&self, callback: P) { let callback_data: Box_

= Box_::new(callback); unsafe extern "C" fn callback_func glib::Variant + 'static>(repo: *mut ostree_sys::OstreeRepo, path: *const libc::c_char, file_info: *mut gio_sys::GFileInfo, user_data: glib_sys::gpointer) -> *mut glib_sys::GVariant { diff --git a/rust-bindings/rust/src/auto/sign.rs b/rust-bindings/rust/src/auto/sign.rs new file mode 100644 index 00000000..2c4f7275 --- /dev/null +++ b/rust-bindings/rust/src/auto/sign.rs @@ -0,0 +1,367 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir) +// from gir-files (https://github.com/gtk-rs/gir-files) +// DO NOT EDIT + +use gio; +use glib; +use glib::object::IsA; +use glib::translate::*; +use glib::GString; +use ostree_sys; +use std::fmt; +use std::ptr; +use Repo; + +glib_wrapper! { + pub struct Sign(Interface); + + match fn { + get_type => || ostree_sys::ostree_sign_get_type(), + } +} + +impl Sign { + #[cfg(any(feature = "v2020_2", feature = "dox"))] + pub fn get_all() -> Vec { + unsafe { + FromGlibPtrContainer::from_glib_full(ostree_sys::ostree_sign_get_all()) + } + } + + #[cfg(any(feature = "v2020_2", feature = "dox"))] + pub fn get_by_name(name: &str) -> Result { + unsafe { + let mut error = ptr::null_mut(); + let ret = ostree_sys::ostree_sign_get_by_name(name.to_glib_none().0, &mut error); + if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) } + } + } +} + +pub const NONE_SIGN: Option<&Sign> = None; + +pub trait SignExt: 'static { + #[cfg(any(feature = "v2020_2", feature = "dox"))] + fn add_pk(&self, public_key: &glib::Variant) -> Result<(), glib::Error>; + + #[cfg(any(feature = "v2020_2", feature = "dox"))] + fn clear_keys(&self) -> Result<(), glib::Error>; + + #[cfg(any(feature = "v2020_2", feature = "dox"))] + fn commit>(&self, repo: &Repo, commit_checksum: &str, cancellable: Option<&P>) -> Result<(), glib::Error>; + + #[cfg(any(feature = "v2020_2", feature = "dox"))] + fn commit_verify>(&self, repo: &Repo, commit_checksum: &str, out_success_message: &str, cancellable: Option<&P>) -> Result<(), glib::Error>; + + #[cfg(any(feature = "v2020_2", feature = "dox"))] + fn data>(&self, data: &glib::Bytes, signature: &glib::Bytes, cancellable: Option<&P>) -> Result<(), glib::Error>; + + #[cfg(any(feature = "v2020_2", feature = "dox"))] + fn data_verify(&self, data: &glib::Bytes, signatures: &glib::Variant, out_success_message: &str) -> Result<(), glib::Error>; + + fn dummy_add_pk(&self, key: &glib::Variant) -> Result<(), glib::Error>; + + fn dummy_data>(&self, data: &glib::Bytes, signature: &glib::Bytes, cancellable: Option<&P>) -> Result<(), glib::Error>; + + fn dummy_data_verify(&self, data: &glib::Bytes, signatures: &glib::Variant, success_message: &str) -> Result<(), glib::Error>; + + fn dummy_get_name(&self) -> Option; + + fn dummy_metadata_format(&self) -> Option; + + fn dummy_metadata_key(&self) -> Option; + + fn dummy_set_pk(&self, key: &glib::Variant) -> Result<(), glib::Error>; + + fn dummy_set_sk(&self, key: &glib::Variant) -> Result<(), glib::Error>; + + fn ed25519_add_pk(&self, public_key: &glib::Variant) -> Result<(), glib::Error>; + + fn ed25519_clear_keys(&self) -> Result<(), glib::Error>; + + fn ed25519_data>(&self, data: &glib::Bytes, signature: &glib::Bytes, cancellable: Option<&P>) -> Result<(), glib::Error>; + + fn ed25519_data_verify(&self, data: &glib::Bytes, signatures: &glib::Variant, out_success_message: &str) -> Result<(), glib::Error>; + + fn ed25519_get_name(&self) -> Option; + + fn ed25519_load_pk(&self, options: &glib::Variant) -> Result<(), glib::Error>; + + fn ed25519_metadata_format(&self) -> Option; + + fn ed25519_metadata_key(&self) -> Option; + + fn ed25519_set_pk(&self, public_key: &glib::Variant) -> Result<(), glib::Error>; + + fn ed25519_set_sk(&self, secret_key: &glib::Variant) -> Result<(), glib::Error>; + + #[cfg(any(feature = "v2020_2", feature = "dox"))] + fn get_name(&self) -> Option; + + #[cfg(any(feature = "v2020_2", feature = "dox"))] + fn load_pk(&self, options: &glib::Variant) -> Result<(), glib::Error>; + + #[cfg(any(feature = "v2020_2", feature = "dox"))] + fn metadata_format(&self) -> Option; + + #[cfg(any(feature = "v2020_2", feature = "dox"))] + fn metadata_key(&self) -> Option; + + #[cfg(any(feature = "v2020_2", feature = "dox"))] + fn set_pk(&self, public_key: &glib::Variant) -> Result<(), glib::Error>; + + #[cfg(any(feature = "v2020_2", feature = "dox"))] + fn set_sk(&self, secret_key: &glib::Variant) -> Result<(), glib::Error>; + + fn summary>(&self, repo: &Repo, keys: &glib::Variant, cancellable: Option<&P>) -> Result<(), glib::Error>; +} + +impl> SignExt for O { + #[cfg(any(feature = "v2020_2", feature = "dox"))] + fn add_pk(&self, public_key: &glib::Variant) -> Result<(), glib::Error> { + unsafe { + let mut error = ptr::null_mut(); + let _ = ostree_sys::ostree_sign_add_pk(self.as_ref().to_glib_none().0, public_key.to_glib_none().0, &mut error); + if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) } + } + } + + #[cfg(any(feature = "v2020_2", feature = "dox"))] + fn clear_keys(&self) -> Result<(), glib::Error> { + unsafe { + let mut error = ptr::null_mut(); + let _ = ostree_sys::ostree_sign_clear_keys(self.as_ref().to_glib_none().0, &mut error); + if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) } + } + } + + #[cfg(any(feature = "v2020_2", feature = "dox"))] + fn commit>(&self, repo: &Repo, commit_checksum: &str, cancellable: Option<&P>) -> Result<(), glib::Error> { + unsafe { + let mut error = ptr::null_mut(); + let _ = ostree_sys::ostree_sign_commit(self.as_ref().to_glib_none().0, repo.to_glib_none().0, commit_checksum.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error); + if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) } + } + } + + #[cfg(any(feature = "v2020_2", feature = "dox"))] + fn commit_verify>(&self, repo: &Repo, commit_checksum: &str, out_success_message: &str, cancellable: Option<&P>) -> Result<(), glib::Error> { + unsafe { + let mut error = ptr::null_mut(); + let _ = ostree_sys::ostree_sign_commit_verify(self.as_ref().to_glib_none().0, repo.to_glib_none().0, commit_checksum.to_glib_none().0, out_success_message.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error); + if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) } + } + } + + #[cfg(any(feature = "v2020_2", feature = "dox"))] + fn data>(&self, data: &glib::Bytes, signature: &glib::Bytes, cancellable: Option<&P>) -> Result<(), glib::Error> { + unsafe { + let mut error = ptr::null_mut(); + let _ = ostree_sys::ostree_sign_data(self.as_ref().to_glib_none().0, data.to_glib_none().0, signature.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error); + if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) } + } + } + + #[cfg(any(feature = "v2020_2", feature = "dox"))] + fn data_verify(&self, data: &glib::Bytes, signatures: &glib::Variant, out_success_message: &str) -> Result<(), glib::Error> { + unsafe { + let mut error = ptr::null_mut(); + let _ = ostree_sys::ostree_sign_data_verify(self.as_ref().to_glib_none().0, data.to_glib_none().0, signatures.to_glib_none().0, out_success_message.to_glib_none().0, &mut error); + if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) } + } + } + + fn dummy_add_pk(&self, key: &glib::Variant) -> Result<(), glib::Error> { + unsafe { + let mut error = ptr::null_mut(); + let _ = ostree_sys::ostree_sign_dummy_add_pk(self.as_ref().to_glib_none().0, key.to_glib_none().0, &mut error); + if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) } + } + } + + fn dummy_data>(&self, data: &glib::Bytes, signature: &glib::Bytes, cancellable: Option<&P>) -> Result<(), glib::Error> { + unsafe { + let mut error = ptr::null_mut(); + let _ = ostree_sys::ostree_sign_dummy_data(self.as_ref().to_glib_none().0, data.to_glib_none().0, signature.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error); + if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) } + } + } + + fn dummy_data_verify(&self, data: &glib::Bytes, signatures: &glib::Variant, success_message: &str) -> Result<(), glib::Error> { + unsafe { + let mut error = ptr::null_mut(); + let _ = ostree_sys::ostree_sign_dummy_data_verify(self.as_ref().to_glib_none().0, data.to_glib_none().0, signatures.to_glib_none().0, success_message.to_glib_none().0, &mut error); + if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) } + } + } + + fn dummy_get_name(&self) -> Option { + unsafe { + from_glib_none(ostree_sys::ostree_sign_dummy_get_name(self.as_ref().to_glib_none().0)) + } + } + + fn dummy_metadata_format(&self) -> Option { + unsafe { + from_glib_none(ostree_sys::ostree_sign_dummy_metadata_format(self.as_ref().to_glib_none().0)) + } + } + + fn dummy_metadata_key(&self) -> Option { + unsafe { + from_glib_none(ostree_sys::ostree_sign_dummy_metadata_key(self.as_ref().to_glib_none().0)) + } + } + + fn dummy_set_pk(&self, key: &glib::Variant) -> Result<(), glib::Error> { + unsafe { + let mut error = ptr::null_mut(); + let _ = ostree_sys::ostree_sign_dummy_set_pk(self.as_ref().to_glib_none().0, key.to_glib_none().0, &mut error); + if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) } + } + } + + fn dummy_set_sk(&self, key: &glib::Variant) -> Result<(), glib::Error> { + unsafe { + let mut error = ptr::null_mut(); + let _ = ostree_sys::ostree_sign_dummy_set_sk(self.as_ref().to_glib_none().0, key.to_glib_none().0, &mut error); + if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) } + } + } + + fn ed25519_add_pk(&self, public_key: &glib::Variant) -> Result<(), glib::Error> { + unsafe { + let mut error = ptr::null_mut(); + let _ = ostree_sys::ostree_sign_ed25519_add_pk(self.as_ref().to_glib_none().0, public_key.to_glib_none().0, &mut error); + if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) } + } + } + + fn ed25519_clear_keys(&self) -> Result<(), glib::Error> { + unsafe { + let mut error = ptr::null_mut(); + let _ = ostree_sys::ostree_sign_ed25519_clear_keys(self.as_ref().to_glib_none().0, &mut error); + if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) } + } + } + + fn ed25519_data>(&self, data: &glib::Bytes, signature: &glib::Bytes, cancellable: Option<&P>) -> Result<(), glib::Error> { + unsafe { + let mut error = ptr::null_mut(); + let _ = ostree_sys::ostree_sign_ed25519_data(self.as_ref().to_glib_none().0, data.to_glib_none().0, signature.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error); + if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) } + } + } + + fn ed25519_data_verify(&self, data: &glib::Bytes, signatures: &glib::Variant, out_success_message: &str) -> Result<(), glib::Error> { + unsafe { + let mut error = ptr::null_mut(); + let _ = ostree_sys::ostree_sign_ed25519_data_verify(self.as_ref().to_glib_none().0, data.to_glib_none().0, signatures.to_glib_none().0, out_success_message.to_glib_none().0, &mut error); + if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) } + } + } + + fn ed25519_get_name(&self) -> Option { + unsafe { + from_glib_none(ostree_sys::ostree_sign_ed25519_get_name(self.as_ref().to_glib_none().0)) + } + } + + fn ed25519_load_pk(&self, options: &glib::Variant) -> Result<(), glib::Error> { + unsafe { + let mut error = ptr::null_mut(); + let _ = ostree_sys::ostree_sign_ed25519_load_pk(self.as_ref().to_glib_none().0, options.to_glib_none().0, &mut error); + if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) } + } + } + + fn ed25519_metadata_format(&self) -> Option { + unsafe { + from_glib_none(ostree_sys::ostree_sign_ed25519_metadata_format(self.as_ref().to_glib_none().0)) + } + } + + fn ed25519_metadata_key(&self) -> Option { + unsafe { + from_glib_none(ostree_sys::ostree_sign_ed25519_metadata_key(self.as_ref().to_glib_none().0)) + } + } + + fn ed25519_set_pk(&self, public_key: &glib::Variant) -> Result<(), glib::Error> { + unsafe { + let mut error = ptr::null_mut(); + let _ = ostree_sys::ostree_sign_ed25519_set_pk(self.as_ref().to_glib_none().0, public_key.to_glib_none().0, &mut error); + if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) } + } + } + + fn ed25519_set_sk(&self, secret_key: &glib::Variant) -> Result<(), glib::Error> { + unsafe { + let mut error = ptr::null_mut(); + let _ = ostree_sys::ostree_sign_ed25519_set_sk(self.as_ref().to_glib_none().0, secret_key.to_glib_none().0, &mut error); + if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) } + } + } + + #[cfg(any(feature = "v2020_2", feature = "dox"))] + fn get_name(&self) -> Option { + unsafe { + from_glib_none(ostree_sys::ostree_sign_get_name(self.as_ref().to_glib_none().0)) + } + } + + #[cfg(any(feature = "v2020_2", feature = "dox"))] + fn load_pk(&self, options: &glib::Variant) -> Result<(), glib::Error> { + unsafe { + let mut error = ptr::null_mut(); + let _ = ostree_sys::ostree_sign_load_pk(self.as_ref().to_glib_none().0, options.to_glib_none().0, &mut error); + if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) } + } + } + + #[cfg(any(feature = "v2020_2", feature = "dox"))] + fn metadata_format(&self) -> Option { + unsafe { + from_glib_none(ostree_sys::ostree_sign_metadata_format(self.as_ref().to_glib_none().0)) + } + } + + #[cfg(any(feature = "v2020_2", feature = "dox"))] + fn metadata_key(&self) -> Option { + unsafe { + from_glib_none(ostree_sys::ostree_sign_metadata_key(self.as_ref().to_glib_none().0)) + } + } + + #[cfg(any(feature = "v2020_2", feature = "dox"))] + fn set_pk(&self, public_key: &glib::Variant) -> Result<(), glib::Error> { + unsafe { + let mut error = ptr::null_mut(); + let _ = ostree_sys::ostree_sign_set_pk(self.as_ref().to_glib_none().0, public_key.to_glib_none().0, &mut error); + if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) } + } + } + + #[cfg(any(feature = "v2020_2", feature = "dox"))] + fn set_sk(&self, secret_key: &glib::Variant) -> Result<(), glib::Error> { + unsafe { + let mut error = ptr::null_mut(); + let _ = ostree_sys::ostree_sign_set_sk(self.as_ref().to_glib_none().0, secret_key.to_glib_none().0, &mut error); + if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) } + } + } + + fn summary>(&self, repo: &Repo, keys: &glib::Variant, cancellable: Option<&P>) -> Result<(), glib::Error> { + unsafe { + let mut error = ptr::null_mut(); + let _ = ostree_sys::ostree_sign_summary(self.as_ref().to_glib_none().0, repo.to_glib_none().0, keys.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, &mut error); + if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) } + } + } +} + +impl fmt::Display for Sign { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + write!(f, "Sign") + } +} diff --git a/rust-bindings/rust/src/auto/sysroot.rs b/rust-bindings/rust/src/auto/sysroot.rs index 213a5924..d5f1583d 100644 --- a/rust-bindings/rust/src/auto/sysroot.rs +++ b/rust-bindings/rust/src/auto/sysroot.rs @@ -270,14 +270,6 @@ impl Sysroot { })) } - pub fn lock_with_mount_namespace(&self) -> Result<(), glib::Error> { - unsafe { - let mut error = ptr::null_mut(); - let _ = ostree_sys::ostree_sysroot_lock_with_mount_namespace(self.to_glib_none().0, &mut error); - if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) } - } - } - pub fn origin_new_from_refspec(&self, refspec: &str) -> Option { unsafe { from_glib_full(ostree_sys::ostree_sysroot_origin_new_from_refspec(self.to_glib_none().0, refspec.to_glib_none().0)) diff --git a/rust-bindings/rust/src/auto/versions.txt b/rust-bindings/rust/src/auto/versions.txt index 83191cd5..68dbffb7 100644 --- a/rust-bindings/rust/src/auto/versions.txt +++ b/rust-bindings/rust/src/auto/versions.txt @@ -1,2 +1,2 @@ Generated by gir (https://github.com/gtk-rs/gir @ 2d1ffab1) -from gir-files (https://github.com/gtk-rs/gir-files @ aa3c638) +from gir-files (https://github.com/gtk-rs/gir-files @ 48a4a23+) diff --git a/rust-bindings/rust/sys/Cargo.toml b/rust-bindings/rust/sys/Cargo.toml index 789acb97..e04e4fff 100644 --- a/rust-bindings/rust/sys/Cargo.toml +++ b/rust-bindings/rust/sys/Cargo.toml @@ -17,7 +17,8 @@ tempfile = "3" [features] v2014_9 = [] v2015_7 = ["v2014_9"] -v2016_4 = ["v2015_7"] +v2016_3 = ["v2015_7"] +v2016_4 = ["v2016_3"] v2016_5 = ["v2016_4"] v2016_6 = ["v2016_5"] v2016_7 = ["v2016_6"] @@ -47,6 +48,8 @@ v2019_3 = ["v2019_2"] v2019_4 = ["v2019_3"] v2019_6 = ["v2019_4"] v2020_1 = ["v2019_6"] +v2020_2 = ["v2020_1"] +v2020_4 = ["v2020_2"] dox = [] [lib] @@ -73,6 +76,7 @@ version = "0.0" [package.metadata.system-deps.ostree_1.feature-versions] v2014_9 = "2014.9" v2015_7 = "2015.7" +v2016_3 = "2016.3" v2016_4 = "2016.4" v2016_5 = "2016.5" v2016_6 = "2016.6" @@ -103,3 +107,5 @@ v2019_3 = "2019.3" v2019_4 = "2019.4" v2019_6 = "2019.6" v2020_1 = "2020.1" +v2020_2 = "2020.2" +v2020_4 = "2020.4" diff --git a/rust-bindings/rust/sys/src/auto/versions.txt b/rust-bindings/rust/sys/src/auto/versions.txt index 83191cd5..68dbffb7 100644 --- a/rust-bindings/rust/sys/src/auto/versions.txt +++ b/rust-bindings/rust/sys/src/auto/versions.txt @@ -1,2 +1,2 @@ Generated by gir (https://github.com/gtk-rs/gir @ 2d1ffab1) -from gir-files (https://github.com/gtk-rs/gir-files @ aa3c638) +from gir-files (https://github.com/gtk-rs/gir-files @ 48a4a23+) diff --git a/rust-bindings/rust/sys/src/lib.rs b/rust-bindings/rust/sys/src/lib.rs index 9dbba33b..80e1a5ce 100644 --- a/rust-bindings/rust/sys/src/lib.rs +++ b/rust-bindings/rust/sys/src/lib.rs @@ -57,9 +57,6 @@ pub const OSTREE_GPG_SIGNATURE_ATTR_FINGERPRINT_PRIMARY: OstreeGpgSignatureAttr pub const OSTREE_GPG_SIGNATURE_ATTR_KEY_EXP_TIMESTAMP: OstreeGpgSignatureAttr = 13; pub const OSTREE_GPG_SIGNATURE_ATTR_KEY_EXP_TIMESTAMP_PRIMARY: OstreeGpgSignatureAttr = 14; -pub type OstreeGpgSignatureFormatFlags = c_int; -pub const OSTREE_GPG_SIGNATURE_FORMAT_DEFAULT: OstreeGpgSignatureFormatFlags = 0; - pub type OstreeObjectType = c_int; pub const OSTREE_OBJECT_TYPE_FILE: OstreeObjectType = 1; pub const OSTREE_OBJECT_TYPE_DIR_TREE: OstreeObjectType = 2; @@ -100,11 +97,6 @@ pub const OSTREE_REPO_MODE_ARCHIVE_Z2: OstreeRepoMode = 1; pub const OSTREE_REPO_MODE_BARE_USER: OstreeRepoMode = 2; pub const OSTREE_REPO_MODE_BARE_USER_ONLY: OstreeRepoMode = 3; -pub type OstreeRepoPruneFlags = c_int; -pub const OSTREE_REPO_PRUNE_FLAGS_NONE: OstreeRepoPruneFlags = 0; -pub const OSTREE_REPO_PRUNE_FLAGS_NO_PRUNE: OstreeRepoPruneFlags = 1; -pub const OSTREE_REPO_PRUNE_FLAGS_REFS_ONLY: OstreeRepoPruneFlags = 2; - pub type OstreeRepoRemoteChange = c_int; pub const OSTREE_REPO_REMOTE_CHANGE_ADD: OstreeRepoRemoteChange = 0; pub const OSTREE_REPO_REMOTE_CHANGE_ADD_IF_NOT_EXISTS: OstreeRepoRemoteChange = 1; @@ -118,6 +110,7 @@ pub const OSTREE_STATIC_DELTA_GENERATE_OPT_MAJOR: OstreeStaticDeltaGenerateOpt = // Constants pub const OSTREE_COMMIT_GVARIANT_STRING: *const c_char = b"(a{sv}aya(say)sstayay)\0" as *const u8 as *const c_char; +pub const OSTREE_COMMIT_META_KEY_ARCHITECTURE: *const c_char = b"ostree.architecture\0" as *const u8 as *const c_char; pub const OSTREE_COMMIT_META_KEY_COLLECTION_BINDING: *const c_char = b"ostree.collection-binding\0" as *const u8 as *const c_char; pub const OSTREE_COMMIT_META_KEY_ENDOFLIFE: *const c_char = b"ostree.endoflife\0" as *const u8 as *const c_char; pub const OSTREE_COMMIT_META_KEY_ENDOFLIFE_REBASE: *const c_char = b"ostree.endoflife-rebase\0" as *const u8 as *const c_char; @@ -133,6 +126,7 @@ pub const OSTREE_ORIGIN_TRANSIENT_GROUP: *const c_char = b"libostree-transient\0 pub const OSTREE_REPO_METADATA_REF: *const c_char = b"ostree-metadata\0" as *const u8 as *const c_char; pub const OSTREE_SHA256_DIGEST_LEN: c_int = 32; pub const OSTREE_SHA256_STRING_LEN: c_int = 64; +pub const OSTREE_SIGN_NAME_ED25519: *const c_char = b"ed25519\0" as *const u8 as *const c_char; pub const OSTREE_SUMMARY_GVARIANT_STRING: *const c_char = b"(a(s(taya{sv}))a{sv})\0" as *const u8 as *const c_char; pub const OSTREE_SUMMARY_SIG_GVARIANT_STRING: *const c_char = b"a{sv}\0" as *const u8 as *const c_char; pub const OSTREE_TIMESTAMP: c_int = 0; @@ -147,6 +141,9 @@ pub type OstreeDiffFlags = c_uint; pub const OSTREE_DIFF_FLAGS_NONE: OstreeDiffFlags = 0; pub const OSTREE_DIFF_FLAGS_IGNORE_XATTRS: OstreeDiffFlags = 1; +pub type OstreeGpgSignatureFormatFlags = c_uint; +pub const OSTREE_GPG_SIGNATURE_FORMAT_DEFAULT: OstreeGpgSignatureFormatFlags = 0; + pub type OstreeRepoCommitModifierFlags = c_uint; pub const OSTREE_REPO_COMMIT_MODIFIER_FLAGS_NONE: OstreeRepoCommitModifierFlags = 0; pub const OSTREE_REPO_COMMIT_MODIFIER_FLAGS_SKIP_XATTRS: OstreeRepoCommitModifierFlags = 1; @@ -176,6 +173,11 @@ pub const OSTREE_REPO_LIST_REFS_EXT_ALIASES: OstreeRepoListRefsExtFlags = 1; pub const OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_REMOTES: OstreeRepoListRefsExtFlags = 2; pub const OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_MIRRORS: OstreeRepoListRefsExtFlags = 4; +pub type OstreeRepoPruneFlags = c_uint; +pub const OSTREE_REPO_PRUNE_FLAGS_NONE: OstreeRepoPruneFlags = 0; +pub const OSTREE_REPO_PRUNE_FLAGS_NO_PRUNE: OstreeRepoPruneFlags = 1; +pub const OSTREE_REPO_PRUNE_FLAGS_REFS_ONLY: OstreeRepoPruneFlags = 2; + pub type OstreeRepoPullFlags = c_uint; pub const OSTREE_REPO_PULL_FLAGS_NONE: OstreeRepoPullFlags = 0; pub const OSTREE_REPO_PULL_FLAGS_MIRROR: OstreeRepoPullFlags = 1; @@ -723,6 +725,78 @@ impl ::std::fmt::Debug for OstreeRepoTransactionStats { } } +#[repr(C)] +pub struct _OstreeSignDummy(c_void); + +pub type OstreeSignDummy = *mut _OstreeSignDummy; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct OstreeSignDummyClass { + pub parent_class: gobject::GObjectClass, +} + +impl ::std::fmt::Debug for OstreeSignDummyClass { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeSignDummyClass @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +pub struct _OstreeSignEd25519(c_void); + +pub type OstreeSignEd25519 = *mut _OstreeSignEd25519; + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct OstreeSignEd25519Class { + pub parent_class: gobject::GObjectClass, +} + +impl ::std::fmt::Debug for OstreeSignEd25519Class { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeSignEd25519Class @ {:?}", self as *const _)) + .field("parent_class", &self.parent_class) + .finish() + } +} + +#[repr(C)] +#[derive(Copy, Clone)] +pub struct OstreeSignInterface { + pub g_iface: gobject::GTypeInterface, + pub get_name: Option *const c_char>, + pub data: Option gboolean>, + pub data_verify: Option gboolean>, + pub metadata_key: Option *const c_char>, + pub metadata_format: Option *const c_char>, + pub clear_keys: Option gboolean>, + pub set_sk: Option gboolean>, + pub set_pk: Option gboolean>, + pub add_pk: Option gboolean>, + pub load_pk: Option gboolean>, +} + +impl ::std::fmt::Debug for OstreeSignInterface { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.debug_struct(&format!("OstreeSignInterface @ {:?}", self as *const _)) + .field("g_iface", &self.g_iface) + .field("get_name", &self.get_name) + .field("data", &self.data) + .field("data_verify", &self.data_verify) + .field("metadata_key", &self.metadata_key) + .field("metadata_format", &self.metadata_format) + .field("clear_keys", &self.clear_keys) + .field("set_sk", &self.set_sk) + .field("set_pk", &self.set_pk) + .field("add_pk", &self.add_pk) + .field("load_pk", &self.load_pk) + .finish() + } +} + #[repr(C)] #[derive(Copy, Clone)] pub struct OstreeSysrootWriteDeploymentsOpts { @@ -904,6 +978,15 @@ impl ::std::fmt::Debug for OstreeRepoFinder { } } +#[repr(C)] +pub struct OstreeSign(c_void); + +impl ::std::fmt::Debug for OstreeSign { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + write!(f, "OstreeSign @ {:?}", self as *const _) + } +} + extern "C" { @@ -1019,6 +1102,7 @@ extern "C" { #[cfg(any(feature = "v2017_13", feature = "dox"))] pub fn ostree_repo_commit_modifier_set_devino_cache(modifier: *mut OstreeRepoCommitModifier, cache: *mut OstreeRepoDevInoCache); pub fn ostree_repo_commit_modifier_set_sepolicy(modifier: *mut OstreeRepoCommitModifier, sepolicy: *mut OstreeSePolicy); + pub fn ostree_repo_commit_modifier_set_sepolicy_from_commit(modifier: *mut OstreeRepoCommitModifier, repo: *mut OstreeRepo, rev: *const c_char, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; pub fn ostree_repo_commit_modifier_set_xattr_callback(modifier: *mut OstreeRepoCommitModifier, callback: OstreeRepoCommitModifierXattrCallback, destroy: glib::GDestroyNotify, user_data: gpointer); pub fn ostree_repo_commit_modifier_unref(modifier: *mut OstreeRepoCommitModifier); @@ -1465,7 +1549,6 @@ extern "C" { pub fn ostree_sysroot_lock(self_: *mut OstreeSysroot, error: *mut *mut glib::GError) -> gboolean; pub fn ostree_sysroot_lock_async(self_: *mut OstreeSysroot, cancellable: *mut gio::GCancellable, callback: gio::GAsyncReadyCallback, user_data: gpointer); pub fn ostree_sysroot_lock_finish(self_: *mut OstreeSysroot, result: *mut gio::GAsyncResult, error: *mut *mut glib::GError) -> gboolean; - pub fn ostree_sysroot_lock_with_mount_namespace(self_: *mut OstreeSysroot, error: *mut *mut glib::GError) -> gboolean; pub fn ostree_sysroot_origin_new_from_refspec(self_: *mut OstreeSysroot, refspec: *const c_char) -> *mut glib::GKeyFile; pub fn ostree_sysroot_prepare_cleanup(self_: *mut OstreeSysroot, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; #[cfg(any(feature = "v2017_7", feature = "dox"))] @@ -1514,6 +1597,58 @@ extern "C" { #[cfg(any(feature = "v2018_6", feature = "dox"))] pub fn ostree_repo_finder_resolve_finish(self_: *mut OstreeRepoFinder, result: *mut gio::GAsyncResult, error: *mut *mut glib::GError) -> *mut glib::GPtrArray; + //========================================================================= + // OstreeSign + //========================================================================= + pub fn ostree_sign_get_type() -> GType; + #[cfg(any(feature = "v2020_2", feature = "dox"))] + pub fn ostree_sign_get_all() -> *mut glib::GPtrArray; + #[cfg(any(feature = "v2020_2", feature = "dox"))] + pub fn ostree_sign_get_by_name(name: *const c_char, error: *mut *mut glib::GError) -> *mut OstreeSign; + #[cfg(any(feature = "v2020_2", feature = "dox"))] + pub fn ostree_sign_add_pk(self_: *mut OstreeSign, public_key: *mut glib::GVariant, error: *mut *mut glib::GError) -> gboolean; + #[cfg(any(feature = "v2020_2", feature = "dox"))] + pub fn ostree_sign_clear_keys(self_: *mut OstreeSign, error: *mut *mut glib::GError) -> gboolean; + #[cfg(any(feature = "v2020_2", feature = "dox"))] + pub fn ostree_sign_commit(self_: *mut OstreeSign, repo: *mut OstreeRepo, commit_checksum: *const c_char, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; + #[cfg(any(feature = "v2020_2", feature = "dox"))] + pub fn ostree_sign_commit_verify(self_: *mut OstreeSign, repo: *mut OstreeRepo, commit_checksum: *const c_char, out_success_message: *mut *mut c_char, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; + #[cfg(any(feature = "v2020_2", feature = "dox"))] + pub fn ostree_sign_data(self_: *mut OstreeSign, data: *mut glib::GBytes, signature: *mut *mut glib::GBytes, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; + #[cfg(any(feature = "v2020_2", feature = "dox"))] + pub fn ostree_sign_data_verify(self_: *mut OstreeSign, data: *mut glib::GBytes, signatures: *mut glib::GVariant, out_success_message: *mut *mut c_char, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_sign_dummy_add_pk(self_: *mut OstreeSign, key: *mut glib::GVariant, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_sign_dummy_data(self_: *mut OstreeSign, data: *mut glib::GBytes, signature: *mut *mut glib::GBytes, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_sign_dummy_data_verify(self_: *mut OstreeSign, data: *mut glib::GBytes, signatures: *mut glib::GVariant, success_message: *mut *mut c_char, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_sign_dummy_get_name(self_: *mut OstreeSign) -> *const c_char; + pub fn ostree_sign_dummy_metadata_format(self_: *mut OstreeSign) -> *const c_char; + pub fn ostree_sign_dummy_metadata_key(self_: *mut OstreeSign) -> *const c_char; + pub fn ostree_sign_dummy_set_pk(self_: *mut OstreeSign, key: *mut glib::GVariant, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_sign_dummy_set_sk(self_: *mut OstreeSign, key: *mut glib::GVariant, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_sign_ed25519_add_pk(self_: *mut OstreeSign, public_key: *mut glib::GVariant, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_sign_ed25519_clear_keys(self_: *mut OstreeSign, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_sign_ed25519_data(self_: *mut OstreeSign, data: *mut glib::GBytes, signature: *mut *mut glib::GBytes, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_sign_ed25519_data_verify(self_: *mut OstreeSign, data: *mut glib::GBytes, signatures: *mut glib::GVariant, out_success_message: *mut *mut c_char, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_sign_ed25519_get_name(self_: *mut OstreeSign) -> *const c_char; + pub fn ostree_sign_ed25519_load_pk(self_: *mut OstreeSign, options: *mut glib::GVariant, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_sign_ed25519_metadata_format(self_: *mut OstreeSign) -> *const c_char; + pub fn ostree_sign_ed25519_metadata_key(self_: *mut OstreeSign) -> *const c_char; + pub fn ostree_sign_ed25519_set_pk(self_: *mut OstreeSign, public_key: *mut glib::GVariant, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_sign_ed25519_set_sk(self_: *mut OstreeSign, secret_key: *mut glib::GVariant, error: *mut *mut glib::GError) -> gboolean; + #[cfg(any(feature = "v2020_2", feature = "dox"))] + pub fn ostree_sign_get_name(self_: *mut OstreeSign) -> *const c_char; + #[cfg(any(feature = "v2020_2", feature = "dox"))] + pub fn ostree_sign_load_pk(self_: *mut OstreeSign, options: *mut glib::GVariant, error: *mut *mut glib::GError) -> gboolean; + #[cfg(any(feature = "v2020_2", feature = "dox"))] + pub fn ostree_sign_metadata_format(self_: *mut OstreeSign) -> *const c_char; + #[cfg(any(feature = "v2020_2", feature = "dox"))] + pub fn ostree_sign_metadata_key(self_: *mut OstreeSign) -> *const c_char; + #[cfg(any(feature = "v2020_2", feature = "dox"))] + pub fn ostree_sign_set_pk(self_: *mut OstreeSign, public_key: *mut glib::GVariant, error: *mut *mut glib::GError) -> gboolean; + #[cfg(any(feature = "v2020_2", feature = "dox"))] + pub fn ostree_sign_set_sk(self_: *mut OstreeSign, secret_key: *mut glib::GVariant, error: *mut *mut glib::GError) -> gboolean; + pub fn ostree_sign_summary(self_: *mut OstreeSign, repo: *mut OstreeRepo, keys: *mut glib::GVariant, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; + //========================================================================= // Other functions //========================================================================= @@ -1548,6 +1683,7 @@ extern "C" { #[cfg(any(feature = "v2020_1", feature = "dox"))] pub fn ostree_commit_get_object_sizes(commit_variant: *mut glib::GVariant, out_sizes_entries: *mut *mut glib::GPtrArray, error: *mut *mut glib::GError) -> gboolean; pub fn ostree_commit_get_parent(commit_variant: *mut glib::GVariant) -> *mut c_char; + #[cfg(any(feature = "v2016_3", feature = "dox"))] pub fn ostree_commit_get_timestamp(commit_variant: *mut glib::GVariant) -> u64; pub fn ostree_content_file_parse(compressed: gboolean, content_path: *mut gio::GFile, trusted: gboolean, out_input: *mut *mut gio::GInputStream, out_file_info: *mut *mut gio::GFileInfo, out_xattrs: *mut *mut glib::GVariant, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; pub fn ostree_content_file_parse_at(compressed: gboolean, parent_dfd: c_int, path: *const c_char, trusted: gboolean, out_input: *mut *mut gio::GInputStream, out_file_info: *mut *mut gio::GFileInfo, out_xattrs: *mut *mut glib::GVariant, cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError) -> gboolean; diff --git a/rust-bindings/rust/sys/tests/abi.rs b/rust-bindings/rust/sys/tests/abi.rs index 0d0e6ec7..5e22cb11 100644 --- a/rust-bindings/rust/sys/tests/abi.rs +++ b/rust-bindings/rust/sys/tests/abi.rs @@ -282,6 +282,9 @@ const RUST_LAYOUTS: &[(&str, Layout)] = &[ ("OstreeRepoResolveRevExtFlags", Layout {size: size_of::(), alignment: align_of::()}), ("OstreeRepoTransactionStats", Layout {size: size_of::(), alignment: align_of::()}), ("OstreeSePolicyRestoreconFlags", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeSignDummyClass", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeSignEd25519Class", Layout {size: size_of::(), alignment: align_of::()}), + ("OstreeSignInterface", Layout {size: size_of::(), alignment: align_of::()}), ("OstreeStaticDeltaGenerateOpt", Layout {size: size_of::(), alignment: align_of::()}), ("OstreeSysrootSimpleWriteDeploymentFlags", Layout {size: size_of::(), alignment: align_of::()}), ("OstreeSysrootUpgraderFlags", Layout {size: size_of::(), alignment: align_of::()}), @@ -293,6 +296,7 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(guint) OSTREE_CHECKSUM_FLAGS_IGNORE_XATTRS", "1"), ("(guint) OSTREE_CHECKSUM_FLAGS_NONE", "0"), ("OSTREE_COMMIT_GVARIANT_STRING", "(a{sv}aya(say)sstayay)"), + ("OSTREE_COMMIT_META_KEY_ARCHITECTURE", "ostree.architecture"), ("OSTREE_COMMIT_META_KEY_COLLECTION_BINDING", "ostree.collection-binding"), ("OSTREE_COMMIT_META_KEY_ENDOFLIFE", "ostree.endoflife"), ("OSTREE_COMMIT_META_KEY_ENDOFLIFE_REBASE", "ostree.endoflife-rebase"), @@ -327,7 +331,7 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) OSTREE_GPG_SIGNATURE_ATTR_USER_EMAIL", "11"), ("(gint) OSTREE_GPG_SIGNATURE_ATTR_USER_NAME", "10"), ("(gint) OSTREE_GPG_SIGNATURE_ATTR_VALID", "0"), - ("(gint) OSTREE_GPG_SIGNATURE_FORMAT_DEFAULT", "0"), + ("(guint) OSTREE_GPG_SIGNATURE_FORMAT_DEFAULT", "0"), ("OSTREE_MAX_METADATA_SIZE", "10485760"), ("OSTREE_MAX_METADATA_WARN_SIZE", "7340032"), ("OSTREE_META_KEY_DEPLOY_COLLECTION_ID", "ostree.deploy-collection-id"), @@ -378,9 +382,9 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) OSTREE_REPO_MODE_BARE", "0"), ("(gint) OSTREE_REPO_MODE_BARE_USER", "2"), ("(gint) OSTREE_REPO_MODE_BARE_USER_ONLY", "3"), - ("(gint) OSTREE_REPO_PRUNE_FLAGS_NONE", "0"), - ("(gint) OSTREE_REPO_PRUNE_FLAGS_NO_PRUNE", "1"), - ("(gint) OSTREE_REPO_PRUNE_FLAGS_REFS_ONLY", "2"), + ("(guint) OSTREE_REPO_PRUNE_FLAGS_NONE", "0"), + ("(guint) OSTREE_REPO_PRUNE_FLAGS_NO_PRUNE", "1"), + ("(guint) OSTREE_REPO_PRUNE_FLAGS_REFS_ONLY", "2"), ("(guint) OSTREE_REPO_PULL_FLAGS_BAREUSERONLY_FILES", "8"), ("(guint) OSTREE_REPO_PULL_FLAGS_COMMIT_ONLY", "2"), ("(guint) OSTREE_REPO_PULL_FLAGS_MIRROR", "1"), @@ -399,6 +403,7 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(guint) OSTREE_SEPOLICY_RESTORECON_FLAGS_NONE", "0"), ("OSTREE_SHA256_DIGEST_LEN", "32"), ("OSTREE_SHA256_STRING_LEN", "64"), + ("OSTREE_SIGN_NAME_ED25519", "ed25519"), ("(gint) OSTREE_STATIC_DELTA_GENERATE_OPT_LOWLATENCY", "0"), ("(gint) OSTREE_STATIC_DELTA_GENERATE_OPT_MAJOR", "1"), ("OSTREE_SUMMARY_GVARIANT_STRING", "(a(s(taya{sv}))a{sv})"),