diff --git a/Makefile-tests.am b/Makefile-tests.am index 6c2301ce..2160cd55 100644 --- a/Makefile-tests.am +++ b/Makefile-tests.am @@ -46,6 +46,7 @@ dist_test_scripts = \ tests/test-archivez.sh \ tests/test-remote-add.sh \ tests/test-remote-cookies.sh \ + tests/test-remote-headers.sh \ tests/test-remote-gpg-import.sh \ tests/test-commit-sign.sh \ tests/test-export.sh \ diff --git a/Makefile.in b/Makefile.in index 9509dfcb..46a49b67 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1327,12 +1327,13 @@ RECHECK_LOGS = $(TEST_LOGS) am__EXEEXT_10 = am__EXEEXT_11 = tests/test-basic.sh tests/test-pull-subpath.sh \ tests/test-archivez.sh tests/test-remote-add.sh \ - tests/test-remote-cookies.sh tests/test-remote-gpg-import.sh \ - tests/test-commit-sign.sh tests/test-export.sh \ - tests/test-help.sh tests/test-libarchive.sh \ - tests/test-parent.sh tests/test-pull-archive-z.sh \ - tests/test-pull-commit-only.sh tests/test-pull-corruption.sh \ - tests/test-pull-depth.sh tests/test-pull-mirror-summary.sh \ + tests/test-remote-cookies.sh tests/test-remote-headers.sh \ + tests/test-remote-gpg-import.sh tests/test-commit-sign.sh \ + tests/test-export.sh tests/test-help.sh \ + tests/test-libarchive.sh tests/test-parent.sh \ + tests/test-pull-archive-z.sh tests/test-pull-commit-only.sh \ + tests/test-pull-corruption.sh tests/test-pull-depth.sh \ + tests/test-pull-mirror-summary.sh \ tests/test-pull-large-metadata.sh tests/test-pull-metalink.sh \ tests/test-pull-summary-sigs.sh tests/test-pull-resume.sh \ tests/test-pull-repeated.sh tests/test-pull-untrusted.sh \ @@ -2041,12 +2042,13 @@ uninstalled_test_data = tests/ostree-symlink-stamp tests/ostree-prepare-root-sym dist_uninstalled_test_scripts = tests/test-symbols.sh dist_test_scripts = tests/test-basic.sh tests/test-pull-subpath.sh \ tests/test-archivez.sh tests/test-remote-add.sh \ - tests/test-remote-cookies.sh tests/test-remote-gpg-import.sh \ - tests/test-commit-sign.sh tests/test-export.sh \ - tests/test-help.sh tests/test-libarchive.sh \ - tests/test-parent.sh tests/test-pull-archive-z.sh \ - tests/test-pull-commit-only.sh tests/test-pull-corruption.sh \ - tests/test-pull-depth.sh tests/test-pull-mirror-summary.sh \ + tests/test-remote-cookies.sh tests/test-remote-headers.sh \ + tests/test-remote-gpg-import.sh tests/test-commit-sign.sh \ + tests/test-export.sh tests/test-help.sh \ + tests/test-libarchive.sh tests/test-parent.sh \ + tests/test-pull-archive-z.sh tests/test-pull-commit-only.sh \ + tests/test-pull-corruption.sh tests/test-pull-depth.sh \ + tests/test-pull-mirror-summary.sh \ tests/test-pull-large-metadata.sh tests/test-pull-metalink.sh \ tests/test-pull-summary-sigs.sh tests/test-pull-resume.sh \ tests/test-pull-repeated.sh tests/test-pull-untrusted.sh \ @@ -6080,6 +6082,13 @@ tests/test-remote-cookies.sh.log: tests/test-remote-cookies.sh --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/test-remote-headers.sh.log: tests/test-remote-headers.sh + @p='tests/test-remote-headers.sh'; \ + b='tests/test-remote-headers.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) tests/test-remote-gpg-import.sh.log: tests/test-remote-gpg-import.sh @p='tests/test-remote-gpg-import.sh'; \ b='tests/test-remote-gpg-import.sh'; \ diff --git a/apidoc/html/index.html b/apidoc/html/index.html index 78f899bc..7dd1ebb2 100644 --- a/apidoc/html/index.html +++ b/apidoc/html/index.html @@ -14,7 +14,7 @@
-

for OSTree 2016.12

+

for OSTree 2016.13


diff --git a/apidoc/html/ostree-Content-addressed-object-store.html b/apidoc/html/ostree-Content-addressed-object-store.html index f506463a..21021af0 100644 --- a/apidoc/html/ostree-Content-addressed-object-store.html +++ b/apidoc/html/ostree-Content-addressed-object-store.html @@ -41,7 +41,7 @@ -gboolean +gboolean ostree_repo_mode_from_string () @@ -73,7 +73,7 @@ -gboolean +gboolean ostree_repo_open () @@ -89,7 +89,7 @@ -gboolean +gboolean ostree_repo_get_disable_fsync () @@ -97,7 +97,7 @@ -gboolean +gboolean ostree_repo_is_system () @@ -105,7 +105,7 @@ -gboolean +gboolean ostree_repo_is_writable () @@ -113,7 +113,7 @@ -gboolean +gboolean ostree_repo_create () @@ -121,7 +121,7 @@ -GFile * +GFile * ostree_repo_get_path () @@ -137,7 +137,7 @@ -GKeyFile * +GKeyFile * ostree_repo_get_config () @@ -153,7 +153,7 @@ -GKeyFile * +GKeyFile * ostree_repo_copy_config () @@ -161,7 +161,7 @@ -gboolean +gboolean ostree_repo_remote_add () @@ -169,7 +169,7 @@ -gboolean +gboolean ostree_repo_remote_delete () @@ -177,7 +177,7 @@ -gboolean +gboolean ostree_repo_remote_change () @@ -193,7 +193,7 @@ -gboolean +gboolean ostree_repo_remote_get_url () @@ -201,7 +201,7 @@ -gboolean +gboolean ostree_repo_remote_get_gpg_verify () @@ -209,7 +209,7 @@ -gboolean +gboolean ostree_repo_remote_get_gpg_verify_summary () @@ -217,7 +217,7 @@ -gboolean +gboolean ostree_repo_remote_gpg_import () @@ -225,7 +225,7 @@ -gboolean +gboolean ostree_repo_remote_fetch_summary () @@ -233,7 +233,7 @@ -gboolean +gboolean ostree_repo_remote_fetch_summary_with_options () @@ -241,7 +241,7 @@ -gboolean +gboolean ostree_repo_get_remote_boolean_option () @@ -249,7 +249,7 @@ -gboolean +gboolean ostree_repo_get_remote_list_option () @@ -257,7 +257,7 @@ -gboolean +gboolean ostree_repo_get_remote_option () @@ -273,7 +273,7 @@ -gboolean +gboolean ostree_repo_write_config () @@ -281,7 +281,7 @@ -gboolean +gboolean ostree_repo_scan_hardlinks () @@ -289,7 +289,7 @@ -gboolean +gboolean ostree_repo_prepare_transaction () @@ -297,7 +297,7 @@ -gboolean +gboolean ostree_repo_commit_transaction () @@ -305,7 +305,7 @@ -gboolean +gboolean ostree_repo_abort_transaction () @@ -329,7 +329,7 @@ -gboolean +gboolean ostree_repo_set_ref_immediate () @@ -337,7 +337,7 @@ -gboolean +gboolean ostree_repo_set_cache_dir () @@ -345,7 +345,7 @@ -gboolean +gboolean ostree_repo_sign_delta () @@ -353,7 +353,7 @@ -gboolean +gboolean ostree_repo_has_object () @@ -361,7 +361,7 @@ -gboolean +gboolean ostree_repo_write_metadata () @@ -377,7 +377,7 @@ -gboolean +gboolean ostree_repo_write_metadata_finish () @@ -385,7 +385,7 @@ -gboolean +gboolean ostree_repo_write_content () @@ -393,7 +393,7 @@ -gboolean +gboolean ostree_repo_write_metadata_trusted () @@ -401,7 +401,7 @@ -gboolean +gboolean ostree_repo_write_metadata_stream_trusted () @@ -409,7 +409,7 @@ -gboolean +gboolean ostree_repo_write_content_trusted () @@ -425,7 +425,7 @@ -gboolean +gboolean ostree_repo_write_content_finish () @@ -433,7 +433,7 @@ -gboolean +gboolean ostree_repo_resolve_rev () @@ -441,7 +441,7 @@ -gboolean +gboolean ostree_repo_resolve_rev_ext () @@ -449,7 +449,7 @@ -gboolean +gboolean ostree_repo_list_refs () @@ -457,7 +457,7 @@ -gboolean +gboolean ostree_repo_list_refs_ext () @@ -465,7 +465,7 @@ -gboolean +gboolean ostree_repo_remote_list_refs () @@ -473,7 +473,7 @@ -gboolean +gboolean ostree_repo_load_variant () @@ -481,7 +481,7 @@ -gboolean +gboolean ostree_repo_load_commit () @@ -489,7 +489,7 @@ -gboolean +gboolean ostree_repo_load_variant_if_exists () @@ -497,7 +497,7 @@ -gboolean +gboolean ostree_repo_load_file () @@ -505,7 +505,7 @@ -gboolean +gboolean ostree_repo_load_object_stream () @@ -513,7 +513,7 @@ -gboolean +gboolean ostree_repo_query_object_storage_size () @@ -521,7 +521,7 @@ -gboolean +gboolean ostree_repo_import_object_from () @@ -529,7 +529,7 @@ -gboolean +gboolean ostree_repo_import_object_from_with_trust () @@ -537,7 +537,7 @@ -gboolean +gboolean ostree_repo_import_archive_to_mtree () @@ -545,7 +545,7 @@ -gboolean +gboolean ostree_repo_export_tree_to_archive () @@ -553,7 +553,7 @@ -gboolean +gboolean ostree_repo_delete_object () @@ -577,7 +577,7 @@ -GVariant * +GVariant * (*OstreeRepoCommitModifierXattrCallback) () @@ -649,7 +649,7 @@ -GType +GType ostree_repo_devino_cache_get_type () @@ -657,7 +657,7 @@ -gboolean +gboolean ostree_repo_write_directory_to_mtree () @@ -665,7 +665,7 @@ -gboolean +gboolean ostree_repo_write_dfd_to_mtree () @@ -673,7 +673,7 @@ -gboolean +gboolean ostree_repo_write_archive_to_mtree () @@ -681,7 +681,7 @@ -gboolean +gboolean ostree_repo_write_mtree () @@ -689,7 +689,7 @@ -gboolean +gboolean ostree_repo_write_commit () @@ -697,7 +697,7 @@ -gboolean +gboolean ostree_repo_write_commit_with_time () @@ -705,7 +705,7 @@ -gboolean +gboolean ostree_repo_read_commit_detached_metadata () @@ -713,7 +713,7 @@ -gboolean +gboolean ostree_repo_write_commit_detached_metadata () @@ -721,7 +721,7 @@ -gboolean +gboolean ostree_repo_checkout_tree () @@ -729,7 +729,7 @@ -gboolean +gboolean ostree_repo_checkout_tree_at () @@ -737,7 +737,7 @@ -gboolean +gboolean ostree_repo_checkout_at () @@ -745,7 +745,7 @@ -gboolean +gboolean ostree_repo_checkout_gc () @@ -753,7 +753,7 @@ -gboolean +gboolean ostree_repo_read_commit () @@ -761,7 +761,7 @@ -gboolean +gboolean ostree_repo_list_objects () @@ -769,7 +769,7 @@ -gboolean +gboolean ostree_repo_list_commit_objects_starting_with () @@ -777,7 +777,7 @@ -gboolean +gboolean ostree_repo_list_static_delta_names () @@ -785,7 +785,7 @@ -gboolean +gboolean ostree_repo_static_delta_generate () @@ -793,7 +793,7 @@ -gboolean +gboolean ostree_repo_static_delta_execute_offline () @@ -801,7 +801,7 @@ -GHashTable * +GHashTable * ostree_repo_traverse_new_reachable () @@ -809,7 +809,7 @@ -gboolean +gboolean ostree_repo_traverse_commit () @@ -817,7 +817,7 @@ -gboolean +gboolean ostree_repo_traverse_commit_union () @@ -857,7 +857,7 @@ -gboolean +gboolean ostree_repo_commit_traverse_iter_init_commit () @@ -865,7 +865,7 @@ -gboolean +gboolean ostree_repo_commit_traverse_iter_init_dirtree () @@ -881,7 +881,7 @@ -gboolean +gboolean ostree_repo_prune () @@ -889,7 +889,7 @@ -gboolean +gboolean ostree_repo_prune_static_deltas () @@ -897,7 +897,7 @@ -gboolean +gboolean ostree_repo_pull () @@ -905,7 +905,7 @@ -gboolean +gboolean ostree_repo_pull_one_dir () @@ -913,7 +913,7 @@ -gboolean +gboolean ostree_repo_pull_with_options () @@ -929,7 +929,7 @@ -gboolean +gboolean ostree_repo_sign_commit () @@ -937,7 +937,7 @@ -gboolean +gboolean ostree_repo_append_gpg_signature () @@ -945,7 +945,7 @@ -gboolean +gboolean ostree_repo_add_gpg_signature_summary () @@ -961,7 +961,7 @@ -gboolean +gboolean ostree_repo_verify_commit () @@ -980,12 +980,20 @@ OstreeGpgVerifyResult * +ostree_repo_verify_commit_for_remote () + + + + +OstreeGpgVerifyResult * + + ostree_repo_verify_summary () -gboolean +gboolean ostree_repo_regenerate_summary () @@ -1091,16 +1099,16 @@ with

Functions

ostree_repo_mode_from_string ()

-
gboolean
+
gboolean
 ostree_repo_mode_from_string (const char *mode,
                               OstreeRepoMode *out_mode,
-                              GError **error);
+ GError **error);

ostree_repo_new ()

OstreeRepo *
-ostree_repo_new (GFile *path);
+ostree_repo_new (GFile *path);

Parameters

@@ -1127,8 +1135,8 @@ ostree_repo_new (GFile *pa

ostree_repo_new_for_sysroot_path ()

OstreeRepo *
-ostree_repo_new_for_sysroot_path (GFile *repo_path,
-                                  GFile *sysroot_path);
+ostree_repo_new_for_sysroot_path (GFile *repo_path, + GFile *sysroot_path);

Creates a new OstreeRepo instance, taking the system root path explicitly instead of assuming "/".

@@ -1179,17 +1187,17 @@ Otherwise use the path in the OSTREE_REPO environment variable

ostree_repo_open ()

-
gboolean
+
gboolean
 ostree_repo_open (OstreeRepo *self,
-                  GCancellable *cancellable,
-                  GError **error);
+ GCancellable *cancellable, + GError **error);

ostree_repo_set_disable_fsync ()

void
 ostree_repo_set_disable_fsync (OstreeRepo *self,
-                               gboolean disable_fsync);
+ gboolean disable_fsync);

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 @@ -1210,7 +1218,7 @@ ensuring data consistency.

- + @@ -1220,7 +1228,7 @@ ensuring data consistency.


ostree_repo_get_disable_fsync ()

-
gboolean
+
gboolean
 ostree_repo_get_disable_fsync (OstreeRepo *self);

For more information see ostree_repo_set_disable_fsync().

@@ -1246,7 +1254,7 @@ ostree_repo_get_disable_fsync (

ostree_repo_is_system ()

-
gboolean
+
gboolean
 ostree_repo_is_system (OstreeRepo *repo);

Parameters

@@ -1265,15 +1273,15 @@ ostree_repo_is_system (

Returns

-

TRUE if this repository is the root-owned system global repository

+

TRUE if this repository is the root-owned system global repository


ostree_repo_is_writable ()

-
gboolean
+
gboolean
 ostree_repo_is_writable (OstreeRepo *self,
-                         GError **error);
+ GError **error);

Returns whether the repository is writable by the current user. If the repository is not writable, the error indicates why.

@@ -1293,7 +1301,7 @@ If the repository is not writable, the error<
- + @@ -1301,17 +1309,17 @@ If the repository is not writable, the error<

Returns

-

TRUE if this repository is writable

+

TRUE if this repository is writable


ostree_repo_create ()

-
gboolean
+
gboolean
 ostree_repo_create (OstreeRepo *self,
                     OstreeRepoMode mode,
-                    GCancellable *cancellable,
-                    GError **error);
+ GCancellable *cancellable, + GError **error);

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 @@ -1355,7 +1363,7 @@ do so.


ostree_repo_get_path ()

-
GFile *
+
GFile *
 ostree_repo_get_path (OstreeRepo *self);

Returns

@@ -1372,7 +1380,7 @@ ostree_repo_get_mode (

ostree_repo_get_config ()

-
GKeyFile *
+
GKeyFile *
 ostree_repo_get_config (OstreeRepo *self);

Returns

@@ -1413,7 +1421,7 @@ repository (to see whether a ref was written).


ostree_repo_copy_config ()

-
GKeyFile *
+
GKeyFile *
 ostree_repo_copy_config (OstreeRepo *self);

Returns

@@ -1424,24 +1432,24 @@ ostree_repo_copy_config (

ostree_repo_remote_add ()

-
gboolean
+
gboolean
 ostree_repo_remote_add (OstreeRepo *self,
                         const char *name,
                         const char *url,
-                        GVariant *options,
-                        GCancellable *cancellable,
-                        GError **error);
+ GVariant *options, + GCancellable *cancellable, + GError **error);

Create a new remote named name pointing to url . If options is -provided, then it will be mapped to GKeyFile entries, where the +provided, then it will be mapped to GKeyFile entries, where the GVariant dictionary key is an option string, and the value is mapped as follows:

Parameters

@@ -1489,11 +1497,11 @@ mapped as follows:


ostree_repo_remote_delete ()

-
gboolean
+
gboolean
 ostree_repo_remote_delete (OstreeRepo *self,
                            const char *name,
-                           GCancellable *cancellable,
-                           GError **error);
+ GCancellable *cancellable, + GError **error);

Delete the remote named name . It is an error if the provided remote does not exist.

@@ -1533,15 +1541,15 @@ remote does not exist.


ostree_repo_remote_change ()

-
gboolean
+
gboolean
 ostree_repo_remote_change (OstreeRepo *self,
-                           GFile *sysroot,
+                           GFile *sysroot,
                            OstreeRepoRemoteChange changeop,
                            const char *name,
                            const char *url,
-                           GVariant *options,
-                           GCancellable *cancellable,
-                           GError **error);
+ GVariant *options, + GCancellable *cancellable, + GError **error);

A combined function handling the equivalent of ostree_repo_remote_add(), ostree_repo_remote_delete(), with more options.

@@ -1603,9 +1611,9 @@ options.

ostree_repo_remote_list ()

char **
 ostree_repo_remote_list (OstreeRepo *self,
-                         guint *out_n_remotes);
+ guint *out_n_remotes);

List available remote names in an OstreeRepo. Remote names are sorted -alphabetically. If no remotes are available the function returns NULL.

+alphabetically. If no remotes are available the function returns NULL.

Parameters

disable_fsync

If TRUE, do not fsync

If TRUE, do not fsync

 

error

a GError

a GError

 
@@ -1630,7 +1638,7 @@ alphabetically. If no remotes are available the function returns

Returns

-

a NULL-terminated +

a NULL-terminated array of remote names.

[array length=out_n_remotes][transfer full]

@@ -1638,11 +1646,11 @@ array of remote names.


ostree_repo_remote_get_url ()

-
gboolean
+
gboolean
 ostree_repo_remote_get_url (OstreeRepo *self,
                             const char *name,
                             char **out_url,
-                            GError **error);
+ GError **error);

Return the URL of the remote named name through out_url . It is an @@ -1681,17 +1689,17 @@ error if the provided remote does not exist.

Returns

-

TRUE on success, FALSE on failure

+

TRUE on success, FALSE on failure


ostree_repo_remote_get_gpg_verify ()

-
gboolean
+
gboolean
 ostree_repo_remote_get_gpg_verify (OstreeRepo *self,
                                    const char *name,
-                                   gboolean *out_gpg_verify,
-                                   GError **error);
+ gboolean *out_gpg_verify, + GError **error);

Return whether GPG verification is enabled for the remote named name through out_gpg_verify @@ -1731,18 +1739,18 @@ not exist.

Returns

-

TRUE on success, FALSE on failure

+

TRUE on success, FALSE on failure


ostree_repo_remote_get_gpg_verify_summary ()

-
gboolean
+
gboolean
 ostree_repo_remote_get_gpg_verify_summary
                                (OstreeRepo *self,
                                 const char *name,
-                                gboolean *out_gpg_verify_summary,
-                                GError **error);
+ gboolean *out_gpg_verify_summary, + GError **error);

Return whether GPG verification of the summary is enabled for the remote named name through out_gpg_verify_summary @@ -1782,27 +1790,27 @@ remote does not exist.

Returns

-

TRUE on success, FALSE on failure

+

TRUE on success, FALSE on failure


ostree_repo_remote_gpg_import ()

-
gboolean
+
gboolean
 ostree_repo_remote_gpg_import (OstreeRepo *self,
                                const char *name,
-                               GInputStream *source_stream,
+                               GInputStream *source_stream,
                                const char * const *key_ids,
-                               guint *out_imported,
-                               GCancellable *cancellable,
-                               GError **error);
+ guint *out_imported, + GCancellable *cancellable, + GError **error);

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 + is NULL. The key_ids array can optionally restrict which keys are imported. If key_ids - is NULL, + is NULL, then all keys are imported.

The imported keys will be used to conduct GPG verification when pulling from the remote named name @@ -1828,28 +1836,28 @@ from the remote named name

- + - + +keys, or NULL.

- + - + @@ -1857,19 +1865,19 @@ keys, or NULL.

Returns

-

TRUE on success, FALSE on failure

+

TRUE on success, FALSE on failure


ostree_repo_remote_fetch_summary ()

-
gboolean
+
gboolean
 ostree_repo_remote_fetch_summary (OstreeRepo *self,
                                   const char *name,
-                                  GBytes **out_summary,
-                                  GBytes **out_signatures,
-                                  GCancellable *cancellable,
-                                  GError **error);
+ GBytes **out_summary, + GBytes **out_signatures, + GCancellable *cancellable, + GError **error);

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 @@ -1881,8 +1889,8 @@ respectively.

. Likewise if the summary file is not signed, out_signatures is set to NULL -. In either case the function still returns TRUE.

-

Parse the summary data into a GVariant using g_variant_new_from_bytes() +. In either case the function still returns TRUE.

+

Parse the summary data into a GVariant using g_variant_new_from_bytes() with OSTREE_SUMMARY_GVARIANT_FORMAT as the format string.

Parameters

@@ -1905,23 +1913,23 @@ with

out_summary

-
+ +data, or NULL.

- + - + @@ -1929,21 +1937,21 @@ data, or NULL.

Returns

-

TRUE on success, FALSE on failure

+

TRUE on success, FALSE on failure


ostree_repo_remote_fetch_summary_with_options ()

-
gboolean
+
gboolean
 ostree_repo_remote_fetch_summary_with_options
                                (OstreeRepo *self,
                                 const char *name,
-                                GVariant *options,
-                                GBytes **out_summary,
-                                GBytes **out_signatures,
-                                GCancellable *cancellable,
-                                GError **error);
+ GVariant *options, + GBytes **out_summary, + GBytes **out_signatures, + GCancellable *cancellable, + GError **error);

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

@@ -1973,23 +1981,23 @@ The following are currently defined:

- + +data, or NULL.

- + - + @@ -1997,19 +2005,19 @@ data, or NULL.

Returns

-

TRUE on success, FALSE on failure

+

TRUE on success, FALSE on failure


ostree_repo_get_remote_boolean_option ()

-
gboolean
+
gboolean
 ostree_repo_get_remote_boolean_option (OstreeRepo *self,
                                        const char *remote_name,
                                        const char *option_name,
-                                       gboolean default_value,
-                                       gboolean *out_value,
-                                       GError **error);
+ gboolean default_value, + gboolean *out_value, + GError **error);

OSTree remotes are represented by keyfile groups, formatted like: [remote "remotename"]. This function returns a value named option_name @@ -2062,25 +2070,25 @@ is not present

Returns

-

TRUE on success, otherwise FALSE with error +

TRUE on success, otherwise FALSE with error set


ostree_repo_get_remote_list_option ()

-
gboolean
+
gboolean
 ostree_repo_get_remote_list_option (OstreeRepo *self,
                                     const char *remote_name,
                                     const char *option_name,
                                     char ***out_value,
-                                    GError **error);
+ GError **error);

OSTree remotes are represented by keyfile groups, formatted like: [remote "remotename"]. This function returns a value named option_name underneath that group, and returns it as an zero terminated array of strings. If the option is not set, out_value - will be set to NULL.

+ will be set to NULL.

Parameters

source_stream

a GInputStream, or NULL.

a GInputStream, or NULL.

[allow-none]

key_ids

a NULL-terminated array of GPG key IDs, or NULL.

a NULL-terminated array of GPG key IDs, or NULL.

[array zero-terminated=1][element-type utf8][allow-none]

out_imported

return location for the number of imported -keys, or NULL.

[allow-none]

cancellable

a GCancellable

a GCancellable

 

error

a GError

a GError

 

return location for raw summary data, or NULL.

return location for raw summary data, or NULL.

[nullable]

out_signatures

return location for raw summary signature -data, or NULL.

[nullable]

cancellable

a GCancellable

a GCancellable

 

error

a GError

a GError

 

out_summary

return location for raw summary data, or NULL.

return location for raw summary data, or NULL.

[nullable]

out_signatures

return location for raw summary signature -data, or NULL.

[nullable]

cancellable

a GCancellable

a GCancellable

 

error

a GError

a GError

 
@@ -2109,7 +2117,7 @@ If the option is not set, out_value +g_strfreev().

@@ -2122,20 +2130,20 @@ of strings. The list should be freed with

Returns

-

TRUE on success, otherwise FALSE with error +

TRUE on success, otherwise FALSE with error set


ostree_repo_get_remote_option ()

-
gboolean
+
gboolean
 ostree_repo_get_remote_option (OstreeRepo *self,
                                const char *remote_name,
                                const char *option_name,
                                const char *default_value,
                                char **out_value,
-                               GError **error);
+ GError **error);

OSTree remotes are represented by keyfile groups, formatted like: [remote "remotename"]. This function returns a value named option_name @@ -2187,7 +2195,7 @@ is not present.

Returns

-

TRUE on success, otherwise FALSE with error +

TRUE on success, otherwise FALSE with error set

@@ -2215,17 +2223,17 @@ called.

Returns

-

Parent repository, or NULL if none.

+

Parent repository, or NULL if none.

[transfer none]


ostree_repo_write_config ()

-
gboolean
+
gboolean
 ostree_repo_write_config (OstreeRepo *self,
-                          GKeyFile *new_config,
-                          GError **error);
+ GKeyFile *new_config, + GError **error);

Save new_config in place of this repository's config file. Note that new_config @@ -2252,7 +2260,7 @@ simply adds a reference.

- + @@ -2262,10 +2270,10 @@ simply adds a reference.


ostree_repo_scan_hardlinks ()

-
gboolean
+
gboolean
 ostree_repo_scan_hardlinks (OstreeRepo *self,
-                            GCancellable *cancellable,
-                            GError **error);
+ GCancellable *cancellable, + GError **error);

When ostree builds a mutable tree from directory like in ostree_repo_write_directory_to_mtree(), it has to scan all files that you pass in and compute their checksums. If your commit contains hardlinks from @@ -2306,11 +2314,11 @@ before you call ostree_write_directory_to_mtree()


ostree_repo_prepare_transaction ()

-
gboolean
+
gboolean
 ostree_repo_prepare_transaction (OstreeRepo *self,
-                                 gboolean *out_transaction_resume,
-                                 GCancellable *cancellable,
-                                 GError **error);
+ gboolean *out_transaction_resume, + GCancellable *cancellable, + GError **error);

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 @@ -2355,11 +2363,11 @@ pulls use per-commit state/.commitpartial files.

ostree_repo_commit_transaction ()

-
gboolean
+
gboolean
 ostree_repo_commit_transaction (OstreeRepo *self,
                                 OstreeRepoTransactionStats *out_stats,
-                                GCancellable *cancellable,
-                                GError **error);
+ GCancellable *cancellable, + GError **error);

Complete the transaction. Any refs set with ostree_repo_transaction_set_ref() or ostree_repo_transaction_set_refspec() will be written out.

@@ -2400,10 +2408,10 @@ that happened during this transaction.


ostree_repo_abort_transaction ()

-
gboolean
+
gboolean
 ostree_repo_abort_transaction (OstreeRepo *self,
-                               GCancellable *cancellable,
-                               GError **error);
+ GCancellable *cancellable, + GError **error);

@@ -2453,13 +2461,13 @@ ostree_repo_transaction_set_ref (const char *ref, const char *checksum);

If checksum - is not NULL, then record it as the target of ref named + is not NULL, then record it as the target of ref named ref ; if remote is provided, the ref will appear to originate from that remote.

Otherwise, if checksum - is NULL, then record that the ref should + is NULL, then record that the ref should be deleted.

The change will not be written out immediately, but when the transaction is completed with ostree_repo_commit_transaction(). If the transaction @@ -2501,13 +2509,13 @@ be made to the repository.


ostree_repo_set_ref_immediate ()

-
gboolean
+
gboolean
 ostree_repo_set_ref_immediate (OstreeRepo *self,
                                const char *remote,
                                const char *ref,
                                const char *checksum,
-                               GCancellable *cancellable,
-                               GError **error);
+ GCancellable *cancellable, + GError **error);

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.

@@ -2537,7 +2545,7 @@ case where we're creating or overwriting an existing ref.

- + @@ -2557,12 +2565,12 @@ case where we're creating or overwriting an existing ref.


ostree_repo_set_cache_dir ()

-
gboolean
+
gboolean
 ostree_repo_set_cache_dir (OstreeRepo *self,
                            int dfd,
                            const char *path,
-                           GCancellable *cancellable,
-                           GError **error);
+ GCancellable *cancellable, + GError **error);

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 @@ -2594,12 +2602,12 @@ write permissions in the repo, where the cache is normally stored.

- + - + @@ -2609,31 +2617,31 @@ write permissions in the repo, where the cache is normally stored.


ostree_repo_sign_delta ()

-
gboolean
+
gboolean
 ostree_repo_sign_delta (OstreeRepo *self,
-                        const gchar *from_commit,
-                        const gchar *to_commit,
-                        const gchar *key_id,
-                        const gchar *homedir,
-                        GCancellable *cancellable,
-                        GError **error);
+ const gchar *from_commit, + const gchar *to_commit, + const gchar *key_id, + const gchar *homedir, + GCancellable *cancellable, + GError **error);

This function is deprecated, sign the summary file instead. Add a GPG signature to a static delta.


ostree_repo_has_object ()

-
gboolean
+
gboolean
 ostree_repo_has_object (OstreeRepo *self,
                         OstreeObjectType objtype,
                         const char *checksum,
-                        gboolean *out_have_object,
-                        GCancellable *cancellable,
-                        GError **error);
+ gboolean *out_have_object, + GCancellable *cancellable, + GError **error);

Set out_have_object - to TRUE if self + to TRUE if self contains the given object; -FALSE otherwise.

+FALSE otherwise.

Parameters

out_value

location to store the list of strings. The list should be freed with -g_strfreev().

[out][array zero-terminated=1]

error

a GError

a GError

 

checksum

The checksum to point it to, or NULL to unset.

The checksum to point it to, or NULL to unset.

[allow-none]

cancellable

a GCancellable

a GCancellable

 

error

a GError

a GError

 
@@ -2660,7 +2668,7 @@ ostree_repo_has_object (

out_have_object

-
+ @@ -2678,26 +2686,26 @@ ostree_repo_has_object (

Returns

-

FALSE if an unexpected error occurred, TRUE otherwise

+

FALSE if an unexpected error occurred, TRUE otherwise


ostree_repo_write_metadata ()

-
gboolean
+
gboolean
 ostree_repo_write_metadata (OstreeRepo *self,
                             OstreeObjectType objtype,
                             const char *expected_checksum,
-                            GVariant *object,
-                            guchar **out_csum,
-                            GCancellable *cancellable,
-                            GError **error);
+ GVariant *object, + guchar **out_csum, + GCancellable *cancellable, + GError **error);

Store the metadata object variant . Return the checksum as out_csum .

If expected_checksum - is not NULL, verify it against the + is not NULL, verify it against the computed checksum.

Parameters

@@ -2754,10 +2762,10 @@ computed checksum.

ostree_repo_write_metadata_async (OstreeRepo *self, OstreeObjectType objtype, const char *expected_checksum, - GVariant *object, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); + GVariant *object, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data);

Asynchronously store the metadata object variant . If provided, the checksum expected_checksum @@ -2814,23 +2822,23 @@ the checksum expected_checksum


ostree_repo_write_metadata_finish ()

-
gboolean
+
gboolean
 ostree_repo_write_metadata_finish (OstreeRepo *self,
-                                   GAsyncResult *result,
-                                   guchar **out_csum,
-                                   GError **error);
+ GAsyncResult *result, + guchar **out_csum, + GError **error);

ostree_repo_write_content ()

-
gboolean
+
gboolean
 ostree_repo_write_content (OstreeRepo *self,
                            const char *expected_checksum,
-                           GInputStream *object_input,
-                           guint64 length,
-                           guchar **out_csum,
-                           GCancellable *cancellable,
-                           GError **error);
+ GInputStream *object_input, + guint64 length, + guchar **out_csum, + GCancellable *cancellable, + GError **error);

Store the content object streamed as object_input , with total length length @@ -2889,13 +2897,13 @@ be returned as out_csum


ostree_repo_write_metadata_trusted ()

-
gboolean
+
gboolean
 ostree_repo_write_metadata_trusted (OstreeRepo *self,
                                     OstreeObjectType objtype,
                                     const char *checksum,
-                                    GVariant *variant,
-                                    GCancellable *cancellable,
-                                    GError **error);
+ GVariant *variant, + GCancellable *cancellable, + GError **error);

Store the metadata object variant ; the provided checksum is @@ -2946,15 +2954,15 @@ trusted.


ostree_repo_write_metadata_stream_trusted ()

-
gboolean
+
gboolean
 ostree_repo_write_metadata_stream_trusted
                                (OstreeRepo *self,
                                 OstreeObjectType objtype,
                                 const char *checksum,
-                                GInputStream *object_input,
-                                guint64 length,
-                                GCancellable *cancellable,
-                                GError **error);
+ GInputStream *object_input, + guint64 length, + GCancellable *cancellable, + GError **error);

Store the metadata object variant ; the provided checksum is @@ -3010,13 +3018,13 @@ trusted.


ostree_repo_write_content_trusted ()

-
gboolean
+
gboolean
 ostree_repo_write_content_trusted (OstreeRepo *self,
                                    const char *checksum,
-                                   GInputStream *object_input,
-                                   guint64 length,
-                                   GCancellable *cancellable,
-                                   GError **error);
+ GInputStream *object_input, + guint64 length, + GCancellable *cancellable, + GError **error);

Store the content object streamed as object_input , with total length length @@ -3075,11 +3083,11 @@ disk, for example.

void
 ostree_repo_write_content_async (OstreeRepo *self,
                                  const char *expected_checksum,
-                                 GInputStream *object,
-                                 guint64 length,
-                                 GCancellable *cancellable,
-                                 GAsyncReadyCallback callback,
-                                 gpointer user_data);
+ GInputStream *object, + guint64 length, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data);

Asynchronously store the content object object . If provided, the checksum expected_checksum @@ -3137,11 +3145,11 @@ checksum expected_checksum


ostree_repo_write_content_finish ()

-
gboolean
+
gboolean
 ostree_repo_write_content_finish (OstreeRepo *self,
-                                  GAsyncResult *result,
-                                  guchar **out_csum,
-                                  GError **error);
+ GAsyncResult *result, + guchar **out_csum, + GError **error);

Completes an invocation of ostree_repo_write_content_async().

Parameters

@@ -3159,7 +3167,7 @@ ostree_repo_write_content_finish (
- + @@ -3169,7 +3177,7 @@ ostree_repo_write_content_finish ( - + @@ -3179,12 +3187,12 @@ ostree_repo_write_content_finish (

ostree_repo_resolve_rev ()

-
gboolean
+
gboolean
 ostree_repo_resolve_rev (OstreeRepo *self,
                          const char *refspec,
-                         gboolean allow_noent,
+                         gboolean allow_noent,
                          char **out_rev,
-                         GError **error);
+ GError **error);

Look up the given refspec, returning the checksum it references in the parameter out_rev . Will fall back on remote directory if cannot @@ -3215,7 +3223,7 @@ find the given refspec in local.

- @@ -3231,13 +3239,13 @@ is true and it does not exist.


ostree_repo_resolve_rev_ext ()

-
gboolean
+
gboolean
 ostree_repo_resolve_rev_ext (OstreeRepo *self,
                              const char *refspec,
-                             gboolean allow_noent,
+                             gboolean allow_noent,
                              OstreeRepoResolveRevExtFlags flags,
                              char **out_rev,
-                             GError **error);
+ GError **error);

Look up the given refspec, returning the checksum it references in the parameter out_rev . Differently from ostree_repo_resolve_rev(), @@ -3274,7 +3282,7 @@ local ref is specified but not found.

- @@ -3290,14 +3298,14 @@ is true and it does not exist.


ostree_repo_list_refs ()

-
gboolean
+
gboolean
 ostree_repo_list_refs (OstreeRepo *self,
                        const char *refspec_prefix,
-                       GHashTable **out_all_refs,
-                       GCancellable *cancellable,
-                       GError **error);
+ GHashTable **out_all_refs, + GCancellable *cancellable, + GError **error);

If refspec_prefix - is NULL, list all local and remote refspecs, + is NULL, list all local and remote refspecs, with their current values in out_all_refs . Otherwise, only list refspecs which have refspec_prefix @@ -3343,15 +3351,15 @@ refspecs which have refspec_prefix


ostree_repo_list_refs_ext ()

-
gboolean
+
gboolean
 ostree_repo_list_refs_ext (OstreeRepo *self,
                            const char *refspec_prefix,
-                           GHashTable **out_all_refs,
+                           GHashTable **out_all_refs,
                            OstreeRepoListRefsExtFlags flags,
-                           GCancellable *cancellable,
-                           GError **error);
+ GCancellable *cancellable, + GError **error);

If refspec_prefix - is NULL, list all local and remote refspecs, + is NULL, list all local and remote refspecs, with their current values in out_all_refs . Otherwise, only list refspecs which have refspec_prefix @@ -3404,12 +3412,12 @@ name.


ostree_repo_remote_list_refs ()

-
gboolean
+
gboolean
 ostree_repo_remote_list_refs (OstreeRepo *self,
                               const char *remote_name,
-                              GHashTable **out_all_refs,
-                              GCancellable *cancellable,
-                              GError **error);
+ GHashTable **out_all_refs, + GCancellable *cancellable, + GError **error);

Parameters

TRUE if repository contains object.

TRUE if repository contains object.

[out]

result

a GAsyncResult

a GAsyncResult

 

error

a GError

a GError

 

out_rev

A checksum,or NULL if allow_noent +

A checksum,or NULL if allow_noent is true and it does not exist.

[out][transfer full]

out_rev

A checksum,or NULL if allow_noent +

A checksum,or NULL if allow_noent is true and it does not exist.

[out][transfer full]
@@ -3451,12 +3459,12 @@ ostree_repo_remote_list_refs (

ostree_repo_load_variant ()

-
gboolean
+
gboolean
 ostree_repo_load_variant (OstreeRepo *self,
                           OstreeObjectType objtype,
                           const char *sha256,
-                          GVariant **out_variant,
-                          GError **error);
+ GVariant **out_variant, + GError **error);

Load the metadata object sha256 of type objtype , storing the @@ -3503,12 +3511,12 @@ result in out_variant


ostree_repo_load_commit ()

-
gboolean
+
gboolean
 ostree_repo_load_commit (OstreeRepo *self,
                          const char *checksum,
-                         GVariant **out_commit,
+                         GVariant **out_commit,
                          OstreeRepoCommitState *out_state,
-                         GError **error);
+ GError **error);

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 @@ -3554,18 +3562,18 @@ means that only a sub-path of the commit is available.


ostree_repo_load_variant_if_exists ()

-
gboolean
+
gboolean
 ostree_repo_load_variant_if_exists (OstreeRepo *self,
                                     OstreeObjectType objtype,
                                     const char *sha256,
-                                    GVariant **out_variant,
-                                    GError **error);
+ GVariant **out_variant, + GError **error);

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.

+NULL is returned.

Parameters

@@ -3607,14 +3615,14 @@ exists, storing the result in out_variant

ostree_repo_load_file ()

-
gboolean
+
gboolean
 ostree_repo_load_file (OstreeRepo *self,
                        const char *checksum,
-                       GInputStream **out_input,
-                       GFileInfo **out_file_info,
-                       GVariant **out_xattrs,
-                       GCancellable *cancellable,
-                       GError **error);
+ GInputStream **out_input, + GFileInfo **out_file_info, + GVariant **out_xattrs, + GCancellable *cancellable, + GError **error);

Load content object, decomposing it into three parts: the actual content (for regular files), the metadata, and extended attributes.

@@ -3668,14 +3676,14 @@ content (for regular files), the metadata, and extended attributes.


ostree_repo_load_object_stream ()

-
gboolean
+
gboolean
 ostree_repo_load_object_stream (OstreeRepo *self,
                                 OstreeObjectType objtype,
                                 const char *checksum,
-                                GInputStream **out_input,
-                                guint64 *out_size,
-                                GCancellable *cancellable,
-                                GError **error);
+ GInputStream **out_input, + guint64 *out_size, + GCancellable *cancellable, + GError **error);

Load object as a stream; useful when copying objects between repositories.

@@ -3730,13 +3738,13 @@ repositories.


ostree_repo_query_object_storage_size ()

-
gboolean
+
gboolean
 ostree_repo_query_object_storage_size (OstreeRepo *self,
                                        OstreeObjectType objtype,
                                        const char *sha256,
-                                       guint64 *out_size,
-                                       GCancellable *cancellable,
-                                       GError **error);
+ guint64 *out_size, + GCancellable *cancellable, + GError **error);

Return the size in bytes of object with checksum sha256 , after any compression has been applied.

@@ -3786,13 +3794,13 @@ compression has been applied.


ostree_repo_import_object_from ()

-
gboolean
+
gboolean
 ostree_repo_import_object_from (OstreeRepo *self,
                                 OstreeRepo *source,
                                 OstreeObjectType objtype,
                                 const char *checksum,
-                                GCancellable *cancellable,
-                                GError **error);
+ GCancellable *cancellable, + GError **error);

Copy object named by objtype and checksum into self @@ -3848,15 +3856,15 @@ hard link operation.


ostree_repo_import_object_from_with_trust ()

-
gboolean
+
gboolean
 ostree_repo_import_object_from_with_trust
                                (OstreeRepo *self,
                                 OstreeRepo *source,
                                 OstreeObjectType objtype,
                                 const char *checksum,
-                                gboolean trusted,
-                                GCancellable *cancellable,
-                                GError **error);
+ gboolean trusted, + GCancellable *cancellable, + GError **error);

Copy object named by objtype and checksum into self @@ -3897,7 +3905,7 @@ hard link operation.

- + @@ -3917,14 +3925,14 @@ hard link operation.


ostree_repo_import_archive_to_mtree ()

-
gboolean
+
gboolean
 ostree_repo_import_archive_to_mtree (OstreeRepo *self,
                                      OstreeRepoImportArchiveOptions *opts,
                                      void *archive,
                                      OstreeMutableTree *mtree,
                                      OstreeRepoCommitModifier *modifier,
-                                     GCancellable *cancellable,
-                                     GError **error);
+ GCancellable *cancellable, + GError **error);

Import an archive file archive into the repository, and write its file structure to mtree @@ -3981,13 +3989,13 @@ file structure to mtree


ostree_repo_export_tree_to_archive ()

-
gboolean
+
gboolean
 ostree_repo_export_tree_to_archive (OstreeRepo *self,
                                     OstreeRepoExportArchiveOptions *opts,
                                     OstreeRepoFile *root,
                                     void *archive,
-                                    GCancellable *cancellable,
-                                    GError **error);
+ GCancellable *cancellable, + GError **error);

Import an archive file archive into the repository, and write its file structure to mtree @@ -4039,16 +4047,16 @@ file structure to mtree


ostree_repo_delete_object ()

-
gboolean
+
gboolean
 ostree_repo_delete_object (OstreeRepo *self,
                            OstreeObjectType objtype,
                            const char *sha256,
-                           GCancellable *cancellable,
-                           GError **error);
+ GCancellable *cancellable, + GError **error);

Remove the object of type objtype with checksum sha256 -from the repository. An error of type G_IO_ERROR_NOT_FOUND +from the repository. An error of type G_IO_ERROR_NOT_FOUND is thrown if the object does not exist.

Parameters

@@ -4094,8 +4102,8 @@ is thrown if the object does not exist.

OstreeRepoCommitFilterResult
 (*OstreeRepoCommitFilter) (OstreeRepo *repo,
                            const char *path,
-                           GFileInfo *file_info,
-                           gpointer user_data);
+ GFileInfo *file_info, + gpointer user_data);

Parameters

trusted

If TRUE, assume the source repo is valid and trusted

If TRUE, assume the source repo is valid and trusted

 
@@ -4139,8 +4147,8 @@ is thrown if the object does not exist.

OstreeRepoCommitModifier *
 ostree_repo_commit_modifier_new (OstreeRepoCommitModifierFlags flags,
                                  OstreeRepoCommitFilter commit_filter,
-                                 gpointer user_data,
-                                 GDestroyNotify destroy_notify);
+ gpointer user_data, + GDestroyNotify destroy_notify);

Parameters

@@ -4167,7 +4175,7 @@ ostree_repo_commit_modifier_new ( - + @@ -4182,12 +4190,12 @@ ostree_repo_commit_modifier_new (

OstreeRepoCommitModifierXattrCallback ()

-
GVariant *
+
GVariant *
 (*OstreeRepoCommitModifierXattrCallback)
                                (OstreeRepo *repo,
                                 const char *path,
-                                GFileInfo *file_info,
-                                gpointer user_data);
+ GFileInfo *file_info, + gpointer user_data);

@@ -4196,8 +4204,8 @@ ostree_repo_commit_modifier_new (OstreeRepoCommitModifier *modifier, OstreeRepoCommitModifierXattrCallback callback, - GDestroyNotify destroy, - gpointer user_data); + GDestroyNotify destroy, + gpointer user_data);

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 @@ -4244,7 +4252,7 @@ ostree_repo_commit_modifier_set_sepolicy (OstreeRepoCommitModifier *modifier, OstreeSePolicy *sepolicy);

If policy - is non-NULL, use it to look up labels to use for + is non-NULL, use it to look up labels to use for "security.selinux" extended attributes.

Note that any policy specified this way operates in addition to any extended attributes provided via @@ -4358,19 +4366,19 @@ ostree_repo_devino_cache_unref (O


ostree_repo_devino_cache_get_type ()

-
GType
+
GType
 ostree_repo_devino_cache_get_type (void);

ostree_repo_write_directory_to_mtree ()

-
gboolean
+
gboolean
 ostree_repo_write_directory_to_mtree (OstreeRepo *self,
-                                      GFile *dir,
+                                      GFile *dir,
                                       OstreeMutableTree *mtree,
                                       OstreeRepoCommitModifier *modifier,
-                                      GCancellable *cancellable,
-                                      GError **error);
+ GCancellable *cancellable, + GError **error);

Store objects for dir and all children into the repository self , @@ -4422,14 +4430,14 @@ overlaying the resulting filesystem hierarchy into m


ostree_repo_write_dfd_to_mtree ()

-
gboolean
+
gboolean
 ostree_repo_write_dfd_to_mtree (OstreeRepo *self,
                                 int dfd,
                                 const char *path,
                                 OstreeMutableTree *mtree,
                                 OstreeRepoCommitModifier *modifier,
-                                GCancellable *cancellable,
-                                GError **error);
+ GCancellable *cancellable, + GError **error);

Store as objects all contents of the directory referred to by dfd and path @@ -4488,14 +4496,14 @@ resulting filesystem hierarchy into mtree

ostree_repo_write_archive_to_mtree ()

-
gboolean
+
gboolean
 ostree_repo_write_archive_to_mtree (OstreeRepo *self,
-                                    GFile *archive,
+                                    GFile *archive,
                                     OstreeMutableTree *mtree,
                                     OstreeRepoCommitModifier *modifier,
-                                    gboolean autocreate_parents,
-                                    GCancellable *cancellable,
-                                    GError **error);
+ gboolean autocreate_parents, + GCancellable *cancellable, + GError **error);

Import an archive file archive into the repository, and write its file structure to mtree @@ -4551,12 +4559,12 @@ file structure to mtree


ostree_repo_write_mtree ()

-
gboolean
+
gboolean
 ostree_repo_write_mtree (OstreeRepo *self,
                          OstreeMutableTree *mtree,
-                         GFile **out_file,
-                         GCancellable *cancellable,
-                         GError **error);
+ GFile **out_file, + GCancellable *cancellable, + GError **error);

Write all metadata objects for mtree to repo; the resulting out_file @@ -4605,16 +4613,16 @@ the mtree


ostree_repo_write_commit ()

-
gboolean
+
gboolean
 ostree_repo_write_commit (OstreeRepo *self,
                           const char *parent,
                           const char *subject,
                           const char *body,
-                          GVariant *metadata,
+                          GVariant *metadata,
                           OstreeRepoFile *root,
                           char **out_commit,
-                          GCancellable *cancellable,
-                          GError **error);
+ GCancellable *cancellable, + GError **error);

Write a commit metadata object, referencing root_contents_checksum and root_metadata_checksum @@ -4635,7 +4643,7 @@ and root_metadata_checksum

- + @@ -4650,7 +4658,7 @@ and root_metadata_checksum - + @@ -4680,17 +4688,17 @@ and root_metadata_checksum

ostree_repo_write_commit_with_time ()

-
gboolean
+
gboolean
 ostree_repo_write_commit_with_time (OstreeRepo *self,
                                     const char *parent,
                                     const char *subject,
                                     const char *body,
-                                    GVariant *metadata,
+                                    GVariant *metadata,
                                     OstreeRepoFile *root,
-                                    guint64 time,
+                                    guint64 time,
                                     char **out_commit,
-                                    GCancellable *cancellable,
-                                    GError **error);
+ GCancellable *cancellable, + GError **error);

Write a commit metadata object, referencing root_contents_checksum and root_metadata_checksum @@ -4711,7 +4719,7 @@ and root_metadata_checksum

- + @@ -4726,7 +4734,7 @@ and root_metadata_checksum - + @@ -4761,17 +4769,17 @@ and root_metadata_checksum

ostree_repo_read_commit_detached_metadata ()

-
gboolean
+
gboolean
 ostree_repo_read_commit_detached_metadata
                                (OstreeRepo *self,
                                 const char *checksum,
-                                GVariant **out_metadata,
-                                GCancellable *cancellable,
-                                GError **error);
+ GVariant **out_metadata, + GCancellable *cancellable, + GError **error);

OSTree commits can have arbitrary metadata associated; this function retrieves them. If none exists, out_metadata will be set -to NULL.

+to NULL.

Parameters

destroy_notify

A GDestroyNotify

A GDestroyNotify

 

parent

ASCII SHA256 checksum for parent, or NULL for none.

ASCII SHA256 checksum for parent, or NULL for none.

[allow-none]

metadata

GVariant of type a{sv}, or NULL for none.

GVariant of type a{sv}, or NULL for none.

[allow-none]

parent

ASCII SHA256 checksum for parent, or NULL for none.

ASCII SHA256 checksum for parent, or NULL for none.

[allow-none]

metadata

GVariant of type a{sv}, or NULL for none.

GVariant of type a{sv}, or NULL for none.

[allow-none]
@@ -4793,7 +4801,7 @@ to NULL.

- + @@ -4813,18 +4821,18 @@ to NULL.


ostree_repo_write_commit_detached_metadata ()

-
gboolean
+
gboolean
 ostree_repo_write_commit_detached_metadata
                                (OstreeRepo *self,
                                 const char *checksum,
-                                GVariant *metadata,
-                                GCancellable *cancellable,
-                                GError **error);
+ GVariant *metadata, + GCancellable *cancellable, + GError **error);

Replace any existing metadata associated with commit referred to by checksum with metadata . If metadata - is NULL, then existing + is NULL, then existing data will be deleted.

Parameters

@@ -4847,7 +4855,7 @@ data will be deleted.

- + @@ -4867,15 +4875,15 @@ data will be deleted.


ostree_repo_checkout_tree ()

-
gboolean
+
gboolean
 ostree_repo_checkout_tree (OstreeRepo *self,
                            OstreeRepoCheckoutMode mode,
                            OstreeRepoCheckoutOverwriteMode overwrite_mode,
-                           GFile *destination,
+                           GFile *destination,
                            OstreeRepoFile *source,
-                           GFileInfo *source_info,
-                           GCancellable *cancellable,
-                           GError **error);
+ GFileInfo *source_info, + GCancellable *cancellable, + GError **error);

Check out source into destination , which must live on the @@ -4941,14 +4949,14 @@ files are checked out.


ostree_repo_checkout_tree_at ()

-
gboolean
+
gboolean
 ostree_repo_checkout_tree_at (OstreeRepo *self,
                               OstreeRepoCheckoutOptions *options,
                               int destination_dfd,
                               const char *destination_path,
                               const char *commit,
-                              GCancellable *cancellable,
-                              GError **error);
+ GCancellable *cancellable, + GError **error);

ostree_repo_checkout_tree_at is deprecated and should not be used in newly-written code.

Similar to ostree_repo_checkout_tree(), but uses directory-relative paths for the destination, uses a new OstreeRepoCheckoutAtOptions, @@ -5010,14 +5018,14 @@ cache.


ostree_repo_checkout_at ()

-
gboolean
+
gboolean
 ostree_repo_checkout_at (OstreeRepo *self,
                          OstreeRepoCheckoutAtOptions *options,
                          int destination_dfd,
                          const char *destination_path,
                          const char *commit,
-                         GCancellable *cancellable,
-                         GError **error);
+ GCancellable *cancellable, + GError **error);

Similar to ostree_repo_checkout_tree(), but uses directory-relative paths for the destination, uses a new OstreeRepoCheckoutAtOptions, and takes a commit checksum and optional subpath pair, rather than @@ -5078,10 +5086,10 @@ cache.


ostree_repo_checkout_gc ()

-
gboolean
+
gboolean
 ostree_repo_checkout_gc (OstreeRepo *self,
-                         GCancellable *cancellable,
-                         GError **error);
+ GCancellable *cancellable, + GError **error);

Call this after finishing a succession of checkout operations; it will delete any currently-unused uncompressed objects from the cache.

@@ -5116,13 +5124,13 @@ cache.


ostree_repo_read_commit ()

-
gboolean
+
gboolean
 ostree_repo_read_commit (OstreeRepo *self,
                          const char *ref,
-                         GFile **out_root,
+                         GFile **out_root,
                          char **out_commit,
-                         GCancellable *cancellable,
-                         GError **error);
+ GCancellable *cancellable, + GError **error);

Load the content for rev into out_root .

@@ -5172,18 +5180,18 @@ ostree_repo_read_commit (

ostree_repo_list_objects ()

-
gboolean
+
gboolean
 ostree_repo_list_objects (OstreeRepo *self,
                           OstreeRepoListObjectsFlags flags,
-                          GHashTable **out_objects,
-                          GCancellable *cancellable,
-                          GError **error);
+ GHashTable **out_objects, + GCancellable *cancellable, + GError **error);

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.

+to GVariant values of type OSTREE_REPO_LIST_OBJECTS_VARIANT_TYPE.

Parameters

out_metadata

Metadata associated with commit in with format "a{sv}", or NULL if none exists.

Metadata associated with commit in with format "a{sv}", or NULL if none exists.

[out][transfer full]

metadata

Metadata to associate with commit in with format "a{sv}", or NULL to delete.

Metadata to associate with commit in with format "a{sv}", or NULL to delete.

[allow-none]
@@ -5223,20 +5231,20 @@ to GVariant values of type

Returns

-

TRUE on success, FALSE on error, and error +

TRUE on success, FALSE on error, and error will be set


ostree_repo_list_commit_objects_starting_with ()

-
gboolean
+
gboolean
 ostree_repo_list_commit_objects_starting_with
                                (OstreeRepo *self,
                                 const char *start,
-                                GHashTable **out_commits,
-                                GCancellable *cancellable,
-                                GError **error);
+ GHashTable **out_commits, + GCancellable *cancellable, + GError **error);

This function synchronously enumerates all commit objects starting with start , returning data in out_commits @@ -5280,18 +5288,18 @@ with start

Returns

-

TRUE on success, FALSE on error, and error +

TRUE on success, FALSE on error, and error will be set


ostree_repo_list_static_delta_names ()

-
gboolean
+
gboolean
 ostree_repo_list_static_delta_names (OstreeRepo *self,
-                                     GPtrArray **out_deltas,
-                                     GCancellable *cancellable,
-                                     GError **error);
+ GPtrArray **out_deltas, + GCancellable *cancellable, + GError **error);

This function synchronously enumerates all static deltas in the repository, returning its result in out_deltas .

@@ -5331,17 +5339,17 @@ repository, returning its result in out_deltas

ostree_repo_static_delta_generate ()

-
gboolean
+
gboolean
 ostree_repo_static_delta_generate (OstreeRepo *self,
                                    OstreeStaticDeltaGenerateOpt opt,
                                    const char *from,
                                    const char *to,
-                                   GVariant *metadata,
-                                   GVariant *params,
-                                   GCancellable *cancellable,
-                                   GError **error);
+ GVariant *metadata, + GVariant *params, + GCancellable *cancellable, + GError **error);

Generate a lookaside "static delta" from from - (NULL means + (NULL means from-empty) which can generate the objects in to . This delta is an optimization over fetching individual objects, and can be @@ -5382,7 +5390,7 @@ for input files

- + @@ -5417,13 +5425,13 @@ for input files


ostree_repo_static_delta_execute_offline ()

-
gboolean
+
gboolean
 ostree_repo_static_delta_execute_offline
                                (OstreeRepo *self,
-                                GFile *dir_or_file,
-                                gboolean skip_validation,
-                                GCancellable *cancellable,
-                                GError **error);
+ GFile *dir_or_file, + gboolean skip_validation, + GCancellable *cancellable, + GError **error);

Given a directory representing an already-downloaded static delta on disk, apply it, generating a new commit. The directory must be named with the form "FROM-TO", where both are checksums, and it @@ -5449,7 +5457,7 @@ must contain a file named "superblock", along with at least one part.

- + @@ -5469,9 +5477,9 @@ must contain a file named "superblock", along with at least one part.


ostree_repo_traverse_new_reachable ()

-
GHashTable *
+
GHashTable *
 ostree_repo_traverse_new_reachable (void);
-

This hash table is a set of GVariant which can be accessed via +

This hash table is a set of GVariant which can be accessed via ostree_object_name_deserialize().

Returns

@@ -5482,13 +5490,13 @@ ostree_repo_traverse_new_reachable (

ostree_repo_traverse_commit ()

-
gboolean
+
gboolean
 ostree_repo_traverse_commit (OstreeRepo *repo,
                              const char *commit_checksum,
                              int maxdepth,
-                             GHashTable **out_reachable,
-                             GCancellable *cancellable,
-                             GError **error);
+ GHashTable **out_reachable, + GCancellable *cancellable, + GError **error);

Create a new set out_reachable containing all objects reachable from commit_checksum @@ -5540,13 +5548,13 @@ from commit_checksum


ostree_repo_traverse_commit_union ()

-
gboolean
+
gboolean
 ostree_repo_traverse_commit_union (OstreeRepo *repo,
                                    const char *commit_checksum,
                                    int maxdepth,
-                                   GHashTable *inout_reachable,
-                                   GCancellable *cancellable,
-                                   GError **error);
+ GHashTable *inout_reachable, + GCancellable *cancellable, + GError **error);

Update the set inout_reachable containing all objects reachable from commit_checksum @@ -5697,13 +5705,13 @@ called if OSTREE_REPO_COMMIT_ITER_RESULT_FILE was r


ostree_repo_commit_traverse_iter_init_commit ()

-
gboolean
+
gboolean
 ostree_repo_commit_traverse_iter_init_commit
                                (OstreeRepoCommitTraverseIter *iter,
                                 OstreeRepo *repo,
-                                GVariant *commit,
+                                GVariant *commit,
                                 OstreeRepoCommitTraverseFlags flags,
-                                GError **error);
+ GError **error);

Initialize (in place) an iterator over the root of a commit object.

Parameters

@@ -5746,13 +5754,13 @@ ostree_repo_commit_traverse_iter_init_commit

ostree_repo_commit_traverse_iter_init_dirtree ()

-
gboolean
+
gboolean
 ostree_repo_commit_traverse_iter_init_dirtree
                                (OstreeRepoCommitTraverseIter *iter,
                                 OstreeRepo *repo,
-                                GVariant *dirtree,
+                                GVariant *dirtree,
                                 OstreeRepoCommitTraverseFlags flags,
-                                GError **error);
+ GError **error);

Initialize (in place) an iterator over a directory tree.

Parameters

@@ -5797,8 +5805,8 @@ ostree_repo_commit_traverse_iter_init_dirtree

ostree_repo_commit_traverse_iter_next ()

OstreeRepoCommitIterResult
 ostree_repo_commit_traverse_iter_next (OstreeRepoCommitTraverseIter *iter,
-                                       GCancellable *cancellable,
-                                       GError **error);
+ GCancellable *cancellable, + GError **error);

Step the interator to the next item. Files will be returned first, then subdirectories. Call this in a loop; upon encountering OSTREE_REPO_COMMIT_ITER_RESULT_END, there will be no more files or @@ -5842,15 +5850,15 @@ program error to call any further API on iter


ostree_repo_prune ()

-
gboolean
+
gboolean
 ostree_repo_prune (OstreeRepo *self,
                    OstreeRepoPruneFlags flags,
-                   gint depth,
-                   gint *out_objects_total,
-                   gint *out_objects_pruned,
-                   guint64 *out_pruned_object_size_total,
-                   GCancellable *cancellable,
-                   GError **error);
+ gint depth, + gint *out_objects_total, + gint *out_objects_pruned, + guint64 *out_pruned_object_size_total, + GCancellable *cancellable, + GError **error);

Delete content from the repository. By default, this function will only delete "orphaned" objects not referred to by any commit. This can happen during a local commit operation, when we have written @@ -5919,11 +5927,11 @@ deleting them.


ostree_repo_prune_static_deltas ()

-
gboolean
+
gboolean
 ostree_repo_prune_static_deltas (OstreeRepo *self,
                                  const char *commit,
-                                 GCancellable *cancellable,
-                                 GError **error);
+ GCancellable *cancellable, + GError **error);

Prune static deltas, if COMMIT is specified then delete static delta files only targeting that commit; otherwise any static delta of non existing commits are deleted.

@@ -5943,7 +5951,7 @@ deleted.

- @@ -5964,14 +5972,14 @@ non existing commit.


ostree_repo_pull ()

-
gboolean
+
gboolean
 ostree_repo_pull (OstreeRepo *self,
                   const char *remote_name,
                   char **refs_to_fetch,
                   OstreeRepoPullFlags flags,
                   OstreeAsyncProgress *progress,
-                  GCancellable *cancellable,
-                  GError **error);
+ GCancellable *cancellable, + GError **error);

Connect to the remote repository, fetching the specified set of refs refs_to_fetch . For each ref that is changed, download the @@ -5981,7 +5989,7 @@ on disk in self

If flags contains OSTREE_REPO_PULL_FLAGS_MIRROR, and the refs_to_fetch - is NULL, and the remote repository contains a + is NULL, and the remote repository contains a summary file, then all refs will be fetched.

If flags contains OSTREE_REPO_PULL_FLAGS_COMMIT_ONLY, then only the @@ -5989,7 +5997,7 @@ metadata for the commits in refs_to_fetch

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 +avoid this, use g_main_context_push_thread_default() to push a new one around this call.

Parameters

@@ -6012,7 +6020,7 @@ one around this call.

- + @@ -6042,15 +6050,15 @@ one around this call.


ostree_repo_pull_one_dir ()

-
gboolean
+
gboolean
 ostree_repo_pull_one_dir (OstreeRepo *self,
                           const char *remote_name,
                           const char *dir_to_pull,
                           char **refs_to_fetch,
                           OstreeRepoPullFlags flags,
                           OstreeAsyncProgress *progress,
-                          GCancellable *cancellable,
-                          GError **error);
+ GCancellable *cancellable, + GError **error);

This is similar to ostree_repo_pull(), but only fetches a single subpath.

@@ -6079,7 +6087,7 @@ subpath.

- + @@ -6109,13 +6117,13 @@ subpath.


ostree_repo_pull_with_options ()

-
gboolean
+
gboolean
 ostree_repo_pull_with_options (OstreeRepo *self,
                                const char *remote_name_or_baseurl,
-                               GVariant *options,
+                               GVariant *options,
                                OstreeAsyncProgress *progress,
-                               GCancellable *cancellable,
-                               GError **error);
+ GCancellable *cancellable, + GError **error);

Like ostree_repo_pull(), but supports an extensible set of flags. The following are currently defined:

    @@ -6133,6 +6141,7 @@ The following are currently defined:

  • dry-run (b): Only print information on what will be downloaded (requires static deltas)

  • override-url (s): Fetch objects from this URL if remote specifies no metalink in options

  • inherit-transaction (b): Don't initiate, finish or abort a transaction, usefult to do mutliple pulls in one transaction.

  • +
  • http-headers (a(ss)): Additional headers to add to all HTTP requests

Parameters

@@ -6183,7 +6192,7 @@ The following are currently defined:

void
 ostree_repo_pull_default_console_progress_changed
                                (OstreeAsyncProgress *progress,
-                                gpointer user_data);
+ gpointer user_data);

Convenient "changed" callback for use with ostree_async_progress_new_and_connect() when pulling from a remote repository.

@@ -6222,13 +6231,13 @@ and user_data

ostree_repo_sign_commit ()

-
gboolean
+
gboolean
 ostree_repo_sign_commit (OstreeRepo *self,
-                         const gchar *commit_checksum,
-                         const gchar *key_id,
-                         const gchar *homedir,
-                         GCancellable *cancellable,
-                         GError **error);
+ const gchar *commit_checksum, + const gchar *key_id, + const gchar *homedir, + GCancellable *cancellable, + GError **error);

Add a GPG signature to a commit.

Parameters

@@ -6256,17 +6265,17 @@ ostree_repo_sign_commit (

homedir

-
+ - + - + @@ -6276,12 +6285,12 @@ ostree_repo_sign_commit (

ostree_repo_append_gpg_signature ()

-
gboolean
+
gboolean
 ostree_repo_append_gpg_signature (OstreeRepo *self,
-                                  const gchar *commit_checksum,
-                                  GBytes *signature_bytes,
-                                  GCancellable *cancellable,
-                                  GError **error);
+ const gchar *commit_checksum, + GBytes *signature_bytes, + GCancellable *cancellable, + GError **error);

Append a GPG signature to a commit.

Parameters

@@ -6309,12 +6318,12 @@ ostree_repo_append_gpg_signature (
- + - + @@ -6324,12 +6333,12 @@ ostree_repo_append_gpg_signature (

ostree_repo_add_gpg_signature_summary ()

-
gboolean
+
gboolean
 ostree_repo_add_gpg_signature_summary (OstreeRepo *self,
-                                       const gchar **key_id,
-                                       const gchar *homedir,
-                                       GCancellable *cancellable,
-                                       GError **error);
+ const gchar **key_id, + const gchar *homedir, + GCancellable *cancellable, + GError **error);

Add a GPG signature to a static delta.

Parameters

@@ -6352,17 +6361,17 @@ ostree_repo_add_gpg_signature_summary (

homedir

-
+ - + - + @@ -6374,20 +6383,20 @@ ostree_repo_add_gpg_signature_summary (

ostree_repo_gpg_verify_data ()

OstreeGpgVerifyResult *
 ostree_repo_gpg_verify_data (OstreeRepo *self,
-                             const gchar *remote_name,
-                             GBytes *data,
-                             GBytes *signatures,
-                             GFile *keyringdir,
-                             GFile *extra_keyring,
-                             GCancellable *cancellable,
-                             GError **error);
+ const gchar *remote_name, + GBytes *data, + GBytes *signatures, + GFile *keyringdir, + GFile *extra_keyring, + GCancellable *cancellable, + GError **error);

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 + parameter can be NULL. In that case it will do the verifications using GPG keys in the keyrings of all remotes.

Parameters

@@ -6410,12 +6419,12 @@ the verifications using GPG keys in the keyrings of all remotes.

- + - + @@ -6443,20 +6452,20 @@ the verifications using GPG keys in the keyrings of all remotes.

Returns

-

an OstreeGpgVerifyResult, or NULL on error.

+

an OstreeGpgVerifyResult, or NULL on error.

[transfer full]


ostree_repo_verify_commit ()

-
gboolean
+
gboolean
 ostree_repo_verify_commit (OstreeRepo *self,
-                           const gchar *commit_checksum,
-                           GFile *keyringdir,
-                           GFile *extra_keyring,
-                           GCancellable *cancellable,
-                           GError **error);
+ const gchar *commit_checksum, + GFile *keyringdir, + GFile *extra_keyring, + GCancellable *cancellable, + GError **error);

Check for a valid GPG signature on commit named by the ASCII checksum commit_checksum .

@@ -6504,7 +6513,7 @@ checksum commit_checksum

Returns

-

TRUE if there was a GPG signature from a trusted keyring, otherwise FALSE

+

TRUE if there was a GPG signature from a trusted keyring, otherwise FALSE


@@ -6512,11 +6521,11 @@ checksum commit_checksum

ostree_repo_verify_commit_ext ()

OstreeGpgVerifyResult *
 ostree_repo_verify_commit_ext (OstreeRepo *self,
-                               const gchar *commit_checksum,
-                               GFile *keyringdir,
-                               GFile *extra_keyring,
-                               GCancellable *cancellable,
-                               GError **error);
+ const gchar *commit_checksum, + GFile *keyringdir, + GFile *extra_keyring, + GCancellable *cancellable, + GError **error);

Read GPG signature(s) on the commit named by the ASCII checksum commit_checksum and return detailed results.

@@ -6564,7 +6573,64 @@ ostree_repo_verify_commit_ext (

Returns

-

an OstreeGpgVerifyResult, or NULL on error.

+

an OstreeGpgVerifyResult, or NULL on error.

+

[transfer full]

+
+ +
+
+

ostree_repo_verify_commit_for_remote ()

+
OstreeGpgVerifyResult *
+ostree_repo_verify_commit_for_remote (OstreeRepo *self,
+                                      const gchar *commit_checksum,
+                                      const gchar *remote_name,
+                                      GCancellable *cancellable,
+                                      GError **error);
+

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 +.

+
+

Parameters

+

from

ASCII SHA256 checksum of origin, or NULL

ASCII SHA256 checksum of origin, or NULL

 

skip_validation

If TRUE, assume data integrity

If TRUE, assume data integrity

 

commit

ASCII SHA256 checksum for commit, or NULL for each +

ASCII SHA256 checksum for commit, or NULL for each non existing commit.

[allow-none]

refs_to_fetch

Optional list of refs; if NULL, fetch all configured refs.

Optional list of refs; if NULL, fetch all configured refs.

[array zero-terminated=1][element-type utf8][allow-none]

refs_to_fetch

Optional list of refs; if NULL, fetch all configured refs.

Optional list of refs; if NULL, fetch all configured refs.

[array zero-terminated=1][element-type utf8][allow-none]

GPG home directory, or NULL.

GPG home directory, or NULL.

[allow-none]

cancellable

A GCancellable

A GCancellable

 

error

a GError

a GError

 

cancellable

A GCancellable

A GCancellable

 

error

a GError

a GError

 

GPG home directory, or NULL.

GPG home directory, or NULL.

[allow-none]

cancellable

A GCancellable

A GCancellable

 

error

a GError

a GError

 

data

Data as a GBytes

Data as a GBytes

 

signatures

Signatures as a GBytes

Signatures as a GBytes

 
+++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + +

self

Repository

 

commit_checksum

ASCII SHA256 checksum

 

remote_name

OSTree remote to use for configuration

 

cancellable

Cancellable

 

error

Error

 
+
+
+

Returns

+

an OstreeGpgVerifyResult, or NULL on error.

[transfer full]

@@ -6574,10 +6640,10 @@ ostree_repo_verify_commit_ext (OstreeGpgVerifyResult * ostree_repo_verify_summary (OstreeRepo *self, const char *remote_name, - GBytes *summary, - GBytes *signatures, - GCancellable *cancellable, - GError **error); + GBytes *summary, + GBytes *signatures, + GCancellable *cancellable, + GError **error);

Verify signatures for summary data using GPG keys in the keyring for @@ -6604,12 +6670,12 @@ ostree_repo_verify_summary (

summary

-

Summary data as a GBytes

+

Summary data as a GBytes

 

signatures

-

Summary signatures as a GBytes

+

Summary signatures as a GBytes

  @@ -6627,18 +6693,18 @@ ostree_repo_verify_summary (

Returns

-

an OstreeGpgVerifyResult, or NULL on error.

+

an OstreeGpgVerifyResult, or NULL on error.

[transfer full]


ostree_repo_regenerate_summary ()

-
gboolean
+
gboolean
 ostree_repo_regenerate_summary (OstreeRepo *self,
-                                GVariant *additional_metadata,
-                                GCancellable *cancellable,
-                                GError **error);
+ GVariant *additional_metadata, + GCancellable *cancellable, + GError **error);

An OSTree repository can contain a high level "summary" file that describes the available branches and other metadata.

It is regenerated automatically after a commit if @@ -6659,7 +6725,7 @@ describes the available branches and other metadata.

additional_metadata

-

A GVariant of type a{sv}, or NULL.

+

A GVariant of type a{sv}, or NULL.

[allow-none] @@ -6788,52 +6854,52 @@ interesting for reporting purposes.

-

guint metadata_objects_total;

+

guint metadata_objects_total;

The total number of metadata objects in the repository after this transaction has completed.

  -

guint metadata_objects_written;

+

guint metadata_objects_written;

The number of metadata objects that were written to the repository in this transaction.

  -

guint content_objects_total;

+

guint content_objects_total;

The total number of content objects in the repository after this transaction has completed.

  -

guint content_objects_written;

+

guint content_objects_written;

The number of content objects that were written to the repository in this transaction.

  -

guint64 content_bytes_written;

+

guint64 content_bytes_written;

The amount of data added to the repository, in bytes, counting only content objects.

  -

guint64 padding1;

+

guint64 padding1;

reserved

  -

guint64 padding2;

+

guint64 padding2;

reserved

  -

guint64 padding3;

+

guint64 padding3;

reserved

  -

guint64 padding4;

+

guint64 padding4;

reserved

  @@ -7024,7 +7090,7 @@ in bytes, counting only content objects.

OSTREE_REPO_LIST_OBJECTS_VARIANT_TYPE

#define OSTREE_REPO_LIST_OBJECTS_VARIANT_TYPE (G_VARIANT_TYPE ("(bas)")
 
-

b - TRUE if object is available "loose" +

b - TRUE if object is available "loose" as - List of pack file checksums in which this object appears


diff --git a/apidoc/html/ostree-Core-repository-independent-functions.html b/apidoc/html/ostree-Core-repository-independent-functions.html index 62721b01..97ee7d1c 100644 --- a/apidoc/html/ostree-Core-repository-independent-functions.html +++ b/apidoc/html/ostree-Core-repository-independent-functions.html @@ -46,7 +46,7 @@ -const GVariantType * +const GVariantType * ostree_metadata_variant_type () @@ -54,7 +54,7 @@ -gboolean +gboolean ostree_validate_checksum_string () @@ -62,7 +62,7 @@ -guchar * +guchar * ostree_checksum_to_bytes () @@ -70,7 +70,7 @@ -GVariant * +GVariant * ostree_checksum_to_bytes_v () @@ -109,14 +109,14 @@ -const guchar * +const guchar * ostree_checksum_bytes_peek () -const guchar * +const guchar * ostree_checksum_bytes_peek_validate () @@ -132,7 +132,7 @@ -guchar * +guchar * ostree_checksum_b64_to_bytes () @@ -164,7 +164,7 @@ -gboolean +gboolean ostree_validate_rev () @@ -172,7 +172,7 @@ -gboolean +gboolean ostree_parse_refspec () @@ -195,7 +195,7 @@ -guint +guint ostree_hash_object_name () @@ -203,7 +203,7 @@ -GVariant * +GVariant * ostree_object_name_serialize () @@ -235,7 +235,7 @@ -gboolean +gboolean ostree_content_stream_parse () @@ -243,7 +243,7 @@ -gboolean +gboolean ostree_content_file_parse () @@ -251,7 +251,7 @@ -gboolean +gboolean ostree_content_file_parse_at () @@ -259,7 +259,7 @@ -gboolean +gboolean ostree_raw_file_to_archive_z2_stream () @@ -267,7 +267,7 @@ -gboolean +gboolean ostree_raw_file_to_content_stream () @@ -275,7 +275,7 @@ -gboolean +gboolean ostree_checksum_file_from_input () @@ -283,7 +283,7 @@ -gboolean +gboolean ostree_checksum_file () @@ -299,7 +299,7 @@ -gboolean +gboolean ostree_checksum_file_async_finish () @@ -307,7 +307,7 @@ -GVariant * +GVariant * ostree_create_directory_metadata () @@ -315,7 +315,7 @@ -gboolean +gboolean ostree_validate_structureof_objtype () @@ -323,7 +323,7 @@ -gboolean +gboolean ostree_validate_structureof_csum_v () @@ -331,7 +331,7 @@ -gboolean +gboolean ostree_validate_structureof_checksum_string () @@ -339,7 +339,7 @@ -gboolean +gboolean ostree_validate_structureof_file_mode () @@ -347,7 +347,7 @@ -gboolean +gboolean ostree_validate_structureof_commit () @@ -355,7 +355,7 @@ -gboolean +gboolean ostree_validate_structureof_dirtree () @@ -363,7 +363,7 @@ -gboolean +gboolean ostree_validate_structureof_dirmeta () @@ -371,7 +371,7 @@ -gchar * +gchar * ostree_commit_get_parent () @@ -379,7 +379,7 @@ -guint64 +guint64 ostree_commit_get_timestamp () @@ -463,11 +463,11 @@

Description

These functions implement repository-independent algorithms for operating on the core OSTree data formats, such as converting -GFileInfo into a GVariant.

+GFileInfo into a GVariant.

There are 4 types of objects; file, dirmeta, tree, and commit. The last 3 are metadata, and the file object is the only content object type.

-

All metadata objects are stored as GVariant (big endian). The +

All metadata objects are stored as GVariant (big endian). The rationale for this is the same as that of the ext{2,3,4} family of filesystems; most developers will be using LE, and so it's better to continually test the BE->LE swap.

@@ -496,21 +496,21 @@ to continually test the BE->LE swap.

Returns

-

TRUE if object type is metadata

+

TRUE if object type is metadata


ostree_metadata_variant_type ()

-
const GVariantType *
+
const GVariantType *
 ostree_metadata_variant_type (OstreeObjectType objtype);

ostree_validate_checksum_string ()

-
gboolean
+
gboolean
 ostree_validate_checksum_string (const char *sha256,
-                                 GError **error);
+ GError **error);

Use this function to see if input strings are checksums.

Parameters

@@ -536,14 +536,14 @@ ostree_validate_checksum_string (const

Returns

-

TRUE if sha256 -is a valid checksum string, FALSE otherwise

+

TRUE if sha256 +is a valid checksum string, FALSE otherwise


ostree_checksum_to_bytes ()

-
guchar *
+
guchar *
 ostree_checksum_to_bytes (const char *checksum);

Parameters

@@ -563,14 +563,14 @@ ostree_checksum_to_bytes (const c

Returns

Binary checksum from checksum -of length 32; free with g_free().

+of length 32; free with g_free().

[transfer full][array fixed-size=32]


ostree_checksum_to_bytes_v ()

-
GVariant *
+
GVariant *
 ostree_checksum_to_bytes_v (const char *checksum);

Parameters

@@ -589,7 +589,7 @@ ostree_checksum_to_bytes_v (const

Returns

-

New GVariant of type ay with length 32.

+

New GVariant of type ay with length 32.

[transfer full]

@@ -597,7 +597,7 @@ ostree_checksum_to_bytes_v (const

ostree_checksum_from_bytes ()

char *
-ostree_checksum_from_bytes (const guchar *csum);
+ostree_checksum_from_bytes (const guchar *csum);

Parameters

@@ -624,7 +624,7 @@ ostree_checksum_from_bytes (const

ostree_checksum_from_bytes_v ()

char *
-ostree_checksum_from_bytes_v (GVariant *csum_v);
+ostree_checksum_from_bytes_v (GVariant *csum_v);

Parameters

@@ -635,7 +635,7 @@ ostree_checksum_from_bytes_v (GVa - +

csum_v

GVariant of type ay

GVariant of type ay

 
@@ -651,7 +651,7 @@ ostree_checksum_from_bytes_v (GVa

ostree_checksum_inplace_from_bytes ()

void
-ostree_checksum_inplace_from_bytes (const guchar *csum,
+ostree_checksum_inplace_from_bytes (const guchar *csum,
                                     char *buf);

Overwrite the contents of buf with stringified version of csum @@ -685,7 +685,7 @@ ostree_checksum_inplace_from_bytes (const

ostree_checksum_inplace_to_bytes ()

void
 ostree_checksum_inplace_to_bytes (const char *checksum,
-                                  guchar *buf);
+ guchar *buf);

Convert checksum from a string to binary in-place, without allocating memory. Use this function in hot code paths.

@@ -715,8 +715,8 @@ allocating memory. Use this function in hot code paths.


ostree_checksum_bytes_peek ()

-
const guchar *
-ostree_checksum_bytes_peek (GVariant *bytes);
+
const guchar *
+ostree_checksum_bytes_peek (GVariant *bytes);

Parameters

@@ -727,7 +727,7 @@ ostree_checksum_bytes_peek (GVari - +

bytes

GVariant of type ay

GVariant of type ay

 
@@ -736,16 +736,16 @@ ostree_checksum_bytes_peek (GVari

Returns

Binary checksum data in bytes ; do not free. If bytes -does not have the correct length, return NULL.

+does not have the correct length, return NULL.

[transfer none][array fixed-size=32][element-type guint8]


ostree_checksum_bytes_peek_validate ()

-
const guchar *
-ostree_checksum_bytes_peek_validate (GVariant *bytes,
-                                     GError **error);
+
const guchar *
+ostree_checksum_bytes_peek_validate (GVariant *bytes,
+                                     GError **error);

Like ostree_checksum_bytes_peek(), but also throws error .

@@ -759,7 +759,7 @@ ostree_checksum_bytes_peek_validate (

bytes

-

GVariant of type ay

+

GVariant of type ay

  @@ -780,7 +780,7 @@ ostree_checksum_bytes_peek_validate (

ostree_checksum_b64_from_bytes ()

char *
-ostree_checksum_b64_from_bytes (const guchar *csum);
+ostree_checksum_b64_from_bytes (const guchar *csum);

Parameters

@@ -808,7 +808,7 @@ character is used.


ostree_checksum_b64_to_bytes ()

-
guchar *
+
guchar *
 ostree_checksum_b64_to_bytes (const char *checksum);

Parameters

@@ -837,7 +837,7 @@ ostree_checksum_b64_to_bytes (const

ostree_checksum_b64_inplace_from_bytes ()

void
 ostree_checksum_b64_inplace_from_bytes
-                               (const guchar *csum,
+                               (const guchar *csum,
                                 char *buf);

Overwrite the contents of buf with modified base64 encoding of csum @@ -873,7 +873,7 @@ character is used.

ostree_checksum_b64_inplace_to_bytes ()

void
 ostree_checksum_b64_inplace_to_bytes (const char *checksum,
-                                      guint8 *buf);
+ guint8 *buf);

Overwrite the contents of buf with stringified version of csum .

@@ -905,8 +905,8 @@ ostree_checksum_b64_inplace_to_bytes (const

ostree_cmp_checksum_bytes ()

int
-ostree_cmp_checksum_bytes (const guchar *a,
-                           const guchar *b);
+ostree_cmp_checksum_bytes (const guchar *a, + const guchar *b);

Compare two binary checksums, using memcmp().

Parameters

@@ -934,9 +934,9 @@ ostree_cmp_checksum_bytes (const

ostree_validate_rev ()

-
gboolean
+
gboolean
 ostree_validate_rev (const char *rev,
-                     GError **error);
+ GError **error);

Parameters

@@ -961,18 +961,18 @@ ostree_validate_rev (const char

Returns

-

TRUE if rev +

TRUE if rev is a valid ref string


ostree_parse_refspec ()

-
gboolean
+
gboolean
 ostree_parse_refspec (const char *refspec,
                       char **out_remote,
                       char **out_ref,
-                      GError **error);
+ GError **error);

Split a refspec like "gnome-ostree:gnome-ostree/buildmaster" into two parts; out_remote will be set to "gnome-ostree", and out_ref @@ -980,7 +980,7 @@ two parts; out_remote will be "gnome-ostree/buildmaster".

If refspec refers to a local ref, out_remote - will be NULL.

+ will be NULL.

Parameters

@@ -997,7 +997,7 @@ will be "gnome-ostree/buildmaster".

- + @@ -1062,9 +1062,9 @@ ostree_object_type_from_string (const

ostree_hash_object_name ()

-
guint
-ostree_hash_object_name (gconstpointer a);
-

Use this function with GHashTable and ostree_object_name_serialize().

+
guint
+ostree_hash_object_name (gconstpointer a);
+

Use this function with GHashTable and ostree_object_name_serialize().

Parameters

out_remote

The remote name, or NULL if the refspec refs to a local ref.

The remote name, or NULL if the refspec refs to a local ref.

[out][allow-none]
@@ -1075,7 +1075,7 @@ ostree_hash_object_name (gconstpo - +

a

A GVariant containing a serialized object

A GVariant containing a serialized object

 
@@ -1084,7 +1084,7 @@ ostree_hash_object_name (gconstpo

ostree_object_name_serialize ()

-
GVariant *
+
GVariant *
 ostree_object_name_serialize (const char *checksum,
                               OstreeObjectType objtype);
@@ -1111,7 +1111,7 @@ ostree_object_name_serialize (const

Returns

-

A new floating GVariant containing checksum string and objtype.

+

A new floating GVariant containing checksum string and objtype.

[transfer floating]

@@ -1119,7 +1119,7 @@ ostree_object_name_serialize (const

ostree_object_name_deserialize ()

void
-ostree_object_name_deserialize (GVariant *variant,
+ostree_object_name_deserialize (GVariant *variant,
                                 const char **out_checksum,
                                 OstreeObjectType *out_objtype);

Reverse ostree_object_name_serialize(). Note that out_checksum @@ -1137,7 +1137,7 @@ only valid for the lifetime of variant

variant

-

A GVariant of type (su)

+

A GVariant of type (su)

  @@ -1195,7 +1195,7 @@ and a stringifed version of objtype

ostree_object_from_string ()

void
 ostree_object_from_string (const char *str,
-                           gchar **out_checksum,
+                           gchar **out_checksum,
                            OstreeObjectType *out_objtype);

Reverse ostree_object_to_string().

@@ -1229,16 +1229,16 @@ ostree_object_from_string (const

ostree_content_stream_parse ()

-
gboolean
-ostree_content_stream_parse (gboolean compressed,
-                             GInputStream *input,
-                             guint64 input_length,
-                             gboolean trusted,
-                             GInputStream **out_input,
-                             GFileInfo **out_file_info,
-                             GVariant **out_xattrs,
-                             GCancellable *cancellable,
-                             GError **error);
+
gboolean
+ostree_content_stream_parse (gboolean compressed,
+                             GInputStream *input,
+                             guint64 input_length,
+                             gboolean trusted,
+                             GInputStream **out_input,
+                             GFileInfo **out_file_info,
+                             GVariant **out_xattrs,
+                             GCancellable *cancellable,
+                             GError **error);

The reverse of ostree_raw_file_to_content_stream(); this function converts an object content stream back into components.

@@ -1267,7 +1267,7 @@ converts an object content stream back into components.

trusted

-

If TRUE, assume the content has been validated

+

If TRUE, assume the content has been validated

  @@ -1302,15 +1302,15 @@ converts an object content stream back into components.


ostree_content_file_parse ()

-
gboolean
-ostree_content_file_parse (gboolean compressed,
-                           GFile *content_path,
-                           gboolean trusted,
-                           GInputStream **out_input,
-                           GFileInfo **out_file_info,
-                           GVariant **out_xattrs,
-                           GCancellable *cancellable,
-                           GError **error);
+
gboolean
+ostree_content_file_parse (gboolean compressed,
+                           GFile *content_path,
+                           gboolean trusted,
+                           GInputStream **out_input,
+                           GFileInfo **out_file_info,
+                           GVariant **out_xattrs,
+                           GCancellable *cancellable,
+                           GError **error);

A thin wrapper for ostree_content_stream_parse(); this function converts an object content stream back into components.

@@ -1334,7 +1334,7 @@ converts an object content stream back into components.

trusted

-

If TRUE, assume the content has been validated

+

If TRUE, assume the content has been validated

  @@ -1369,16 +1369,16 @@ converts an object content stream back into components.


ostree_content_file_parse_at ()

-
gboolean
-ostree_content_file_parse_at (gboolean compressed,
+
gboolean
+ostree_content_file_parse_at (gboolean compressed,
                               int parent_dfd,
                               const char *path,
-                              gboolean trusted,
-                              GInputStream **out_input,
-                              GFileInfo **out_file_info,
-                              GVariant **out_xattrs,
-                              GCancellable *cancellable,
-                              GError **error);
+ gboolean trusted, + GInputStream **out_input, + GFileInfo **out_file_info, + GVariant **out_xattrs, + GCancellable *cancellable, + GError **error);

A thin wrapper for ostree_content_stream_parse(); this function converts an object content stream back into components.

@@ -1407,7 +1407,7 @@ converts an object content stream back into components.

trusted

-

If TRUE, assume the content has been validated

+

If TRUE, assume the content has been validated

  @@ -1442,13 +1442,13 @@ converts an object content stream back into components.


ostree_raw_file_to_archive_z2_stream ()

-
gboolean
-ostree_raw_file_to_archive_z2_stream (GInputStream *input,
-                                      GFileInfo *file_info,
-                                      GVariant *xattrs,
-                                      GInputStream **out_input,
-                                      GCancellable *cancellable,
-                                      GError **error);
+
gboolean
+ostree_raw_file_to_archive_z2_stream (GInputStream *input,
+                                      GFileInfo *file_info,
+                                      GVariant *xattrs,
+                                      GInputStream **out_input,
+                                      GCancellable *cancellable,
+                                      GError **error);

Convert from a "bare" file representation into an OSTREE_OBJECT_TYPE_FILE stream suitable for ostree pull.

@@ -1497,14 +1497,14 @@ OSTREE_OBJECT_TYPE_FILE stream suitable for ostree pull.


ostree_raw_file_to_content_stream ()

-
gboolean
-ostree_raw_file_to_content_stream (GInputStream *input,
-                                   GFileInfo *file_info,
-                                   GVariant *xattrs,
-                                   GInputStream **out_input,
-                                   guint64 *out_length,
-                                   GCancellable *cancellable,
-                                   GError **error);
+
gboolean
+ostree_raw_file_to_content_stream (GInputStream *input,
+                                   GFileInfo *file_info,
+                                   GVariant *xattrs,
+                                   GInputStream **out_input,
+                                   guint64 *out_length,
+                                   GCancellable *cancellable,
+                                   GError **error);

Convert from a "bare" file representation into an OSTREE_OBJECT_TYPE_FILE stream. This is a fundamental operation for writing data to an OstreeRepo.

@@ -1559,14 +1559,14 @@ for writing data to an

ostree_checksum_file_from_input ()

-
gboolean
-ostree_checksum_file_from_input (GFileInfo *file_info,
-                                 GVariant *xattrs,
-                                 GInputStream *in,
+
gboolean
+ostree_checksum_file_from_input (GFileInfo *file_info,
+                                 GVariant *xattrs,
+                                 GInputStream *in,
                                  OstreeObjectType objtype,
-                                 guchar **out_csum,
-                                 GCancellable *cancellable,
-                                 GError **error);
+ guchar **out_csum, + GCancellable *cancellable, + GError **error);

Compute the OSTree checksum for a given input.

Parameters

@@ -1589,7 +1589,7 @@ ostree_checksum_file_from_input (

in

-

File content, should be NULL for symbolic links.

+

File content, should be NULL for symbolic links.

[allow-none] @@ -1619,12 +1619,12 @@ ostree_checksum_file_from_input (

ostree_checksum_file ()

-
gboolean
-ostree_checksum_file (GFile *f,
+
gboolean
+ostree_checksum_file (GFile *f,
                       OstreeObjectType objtype,
-                      guchar **out_csum,
-                      GCancellable *cancellable,
-                      GError **error);
+ guchar **out_csum, + GCancellable *cancellable, + GError **error);

Compute the OSTree checksum for a given file.

Parameters

@@ -1668,12 +1668,12 @@ ostree_checksum_file (GFile

ostree_checksum_file_async ()

void
-ostree_checksum_file_async (GFile *f,
+ostree_checksum_file_async (GFile *f,
                             OstreeObjectType objtype,
                             int io_priority,
-                            GCancellable *cancellable,
-                            GAsyncReadyCallback callback,
-                            gpointer user_data);
+ GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data);

Asynchronously compute the OSTree checksum for a given file; complete with ostree_checksum_file_async_finish().

@@ -1723,11 +1723,11 @@ complete with

ostree_checksum_file_async_finish ()

-
gboolean
-ostree_checksum_file_async_finish (GFile *f,
-                                   GAsyncResult *result,
-                                   guchar **out_csum,
-                                   GError **error);
+
gboolean
+ostree_checksum_file_async_finish (GFile *f,
+                                   GAsyncResult *result,
+                                   guchar **out_csum,
+                                   GError **error);

Finish computing the OSTree checksum for a given file; see ostree_checksum_file_async().

@@ -1766,9 +1766,9 @@ ostree_checksum_file_async_finish (

ostree_create_directory_metadata ()

-
GVariant *
-ostree_create_directory_metadata (GFileInfo *dir_info,
-                                  GVariant *xattrs);
+
GVariant *
+ostree_create_directory_metadata (GFileInfo *dir_info,
+                                  GVariant *xattrs);

Parameters

@@ -1780,7 +1780,7 @@ ostree_create_directory_metadata ( - + @@ -1793,16 +1793,16 @@ ostree_create_directory_metadata (

Returns

-

A new GVariant containing OSTREE_OBJECT_TYPE_DIR_META.

+

A new GVariant containing OSTREE_OBJECT_TYPE_DIR_META.

[transfer full]


ostree_validate_structureof_objtype ()

-
gboolean
-ostree_validate_structureof_objtype (guchar objtype,
-                                     GError **error);
+
gboolean
+ostree_validate_structureof_objtype (guchar objtype,
+                                     GError **error);

Parameters

dir_info

a GFileInfo containing directory information

a GFileInfo containing directory information

 
@@ -1820,16 +1820,16 @@ ostree_validate_structureof_objtype (

Returns

-

TRUE if objtype +

TRUE if objtype represents a valid object type


ostree_validate_structureof_csum_v ()

-
gboolean
-ostree_validate_structureof_csum_v (GVariant *checksum,
-                                    GError **error);
+
gboolean
+ostree_validate_structureof_csum_v (GVariant *checksum,
+                                    GError **error);

Parameters

@@ -1841,7 +1841,7 @@ ostree_validate_structureof_csum_v (

checksum

-
+ @@ -1854,17 +1854,17 @@ ostree_validate_structureof_csum_v (

Returns

-

TRUE if checksum +

TRUE if checksum is a valid binary SHA256 checksum


ostree_validate_structureof_checksum_string ()

-
gboolean
+
gboolean
 ostree_validate_structureof_checksum_string
                                (const char *checksum,
-                                GError **error);
+ GError **error);

Parameters

a GVariant of type "ay"

a GVariant of type "ay"

 
@@ -1889,16 +1889,16 @@ ostree_validate_structureof_checksum_string

Returns

-

TRUE if checksum +

TRUE if checksum is a valid ASCII SHA256 checksum


ostree_validate_structureof_file_mode ()

-
gboolean
-ostree_validate_structureof_file_mode (guint32 mode,
-                                       GError **error);
+
gboolean
+ostree_validate_structureof_file_mode (guint32 mode,
+                                       GError **error);

Parameters

@@ -1923,16 +1923,16 @@ ostree_validate_structureof_file_mode (

Returns

-

TRUE if mode +

TRUE if mode represents a valid file type and permissions


ostree_validate_structureof_commit ()

-
gboolean
-ostree_validate_structureof_commit (GVariant *commit,
-                                    GError **error);
+
gboolean
+ostree_validate_structureof_commit (GVariant *commit,
+                                    GError **error);

Use this to validate the basic structure of commit , independent of any other objects it references.

@@ -1960,16 +1960,16 @@ any other objects it references.

Returns

-

TRUE if commit +

TRUE if commit is structurally valid


ostree_validate_structureof_dirtree ()

-
gboolean
-ostree_validate_structureof_dirtree (GVariant *dirtree,
-                                     GError **error);
+
gboolean
+ostree_validate_structureof_dirtree (GVariant *dirtree,
+                                     GError **error);

Use this to validate the basic structure of dirtree , independent of any other objects it references.

@@ -1997,16 +1997,16 @@ any other objects it references.

Returns

-

TRUE if dirtree +

TRUE if dirtree is structurally valid


ostree_validate_structureof_dirmeta ()

-
gboolean
-ostree_validate_structureof_dirmeta (GVariant *dirmeta,
-                                     GError **error);
+
gboolean
+ostree_validate_structureof_dirmeta (GVariant *dirmeta,
+                                     GError **error);

Use this to validate the basic structure of dirmeta .

@@ -2033,15 +2033,15 @@ ostree_validate_structureof_dirmeta (

Returns

-

TRUE if dirmeta +

TRUE if dirmeta is structurally valid


ostree_commit_get_parent ()

-
gchar *
-ostree_commit_get_parent (GVariant *commit_variant);
+
gchar *
+ostree_commit_get_parent (GVariant *commit_variant);

Parameters

@@ -2060,15 +2060,15 @@ ostree_commit_get_parent (GVarian

Returns

Checksum of the parent commit of commit_variant -, or NULL +, or NULL if none


ostree_commit_get_timestamp ()

-
guint64
-ostree_commit_get_timestamp (GVariant *commit_variant);
+
guint64
+ostree_commit_get_timestamp (GVariant *commit_variant);
diff --git a/apidoc/html/ostree-GPG-signature-verification-results.html b/apidoc/html/ostree-GPG-signature-verification-results.html index df248994..6b7eec3b 100644 --- a/apidoc/html/ostree-GPG-signature-verification-results.html +++ b/apidoc/html/ostree-GPG-signature-verification-results.html @@ -41,7 +41,7 @@
+, or NULL.

@@ -244,22 +244,22 @@ signed by key_id

Returns

-

TRUE on success, FALSE on failure

+

TRUE on success, FALSE on failure


ostree_gpg_verify_result_get ()

-
GVariant *
+
GVariant *
 ostree_gpg_verify_result_get (OstreeGpgVerifyResult *result,
-                              guint signature_index,
+                              guint signature_index,
                               OstreeGpgSignatureAttr *attrs,
-                              guint n_attrs);
-

Builds a GVariant tuple of requested attributes for the GPG signature at + guint n_attrs);

+

Builds a GVariant tuple of requested attributes for the GPG signature at signature_index in result . See the OstreeGpgSignatureAttr description -for the GVariantType of each available attribute.

+for the GVariantType of each available attribute.

It is a programmer error to request an invalid OstreeGpgSignatureAttr or an invalid signature_index . Use ostree_gpg_verify_result_count_all() to @@ -300,29 +300,29 @@ array

Returns

-

a new, floating, GVariant tuple

+

a new, floating, GVariant tuple


ostree_gpg_verify_result_get_all ()

-
GVariant *
+
GVariant *
 ostree_gpg_verify_result_get_all (OstreeGpgVerifyResult *result,
-                                  guint signature_index);
-

Builds a GVariant tuple of all available attributes for the GPG signature + guint signature_index);

+

Builds a GVariant tuple of all available attributes for the GPG signature at signature_index in result .

-

The child values in the returned GVariant tuple are ordered to match the +

The child values in the returned GVariant tuple are ordered to match the OstreeGpgSignatureAttr enumeration, which means the enum values can be -used as index values in functions like g_variant_get_child(). See the -OstreeGpgSignatureAttr description for the GVariantType of each +used as index values in functions like g_variant_get_child(). See the +OstreeGpgSignatureAttr description for the GVariantType of each available attribute.

The OstreeGpgSignatureAttr enumeration may be extended in the future - with new attributes, which would affect the GVariant tuple returned by + with new attributes, which would affect the GVariant tuple returned by this function. While the position and type of current child values in - the GVariant tuple will not change, to avoid backward-compatibility + the GVariant tuple will not change, to avoid backward-compatibility issues please do not depend on the tuple's overall size or type signature.

@@ -355,7 +355,7 @@ available attribute.

Returns

-

a new, floating, GVariant tuple

+

a new, floating, GVariant tuple


@@ -363,9 +363,9 @@ available attribute.

ostree_gpg_verify_result_describe ()

void
 ostree_gpg_verify_result_describe (OstreeGpgVerifyResult *result,
-                                   guint signature_index,
-                                   GString *output_buffer,
-                                   const gchar *line_prefix,
+                                   guint signature_index,
+                                   GString *output_buffer,
+                                   const gchar *line_prefix,
                                    OstreeGpgSignatureFormatFlags flags);

Appends a brief, human-readable description of the GPG signature at signature_index @@ -404,7 +404,7 @@ format. Currently must be 0.

- + @@ -426,11 +426,11 @@ format. Currently must be 0.

ostree_gpg_verify_result_describe_variant ()

void
 ostree_gpg_verify_result_describe_variant
-                               (GVariant *variant,
-                                GString *output_buffer,
-                                const gchar *line_prefix,
+                               (GVariant *variant,
+                                GString *output_buffer,
+                                const gchar *line_prefix,
                                 OstreeGpgSignatureFormatFlags flags);
-

Similar to ostree_gpg_verify_result_describe() but takes a GVariant of +

Similar to ostree_gpg_verify_result_describe() but takes a GVariant of all attributes for a GPG signature instead of an OstreeGpgVerifyResult and signature index.

The variant @@ -447,12 +447,12 @@ and signature index.

- + - + @@ -472,14 +472,14 @@ and signature index.


ostree_gpg_verify_result_require_valid_signature ()

-
gboolean
+
gboolean
 ostree_gpg_verify_result_require_valid_signature
                                (OstreeGpgVerifyResult *result,
-                                GError **error);
+ GError **error);

Checks if the result contains at least one signature from the trusted keyring. You can call this function immediately after ostree_repo_verify_summary() or ostree_repo_verify_commit_ext() - -it will handle the NULL result +it will handle the NULL result and filled error too.

@@ -498,7 +498,7 @@ it will handle the NULL
- + @@ -506,9 +506,9 @@ it will handle the NULL

Returns

-

TRUE if result -was not NULL and had at least one -signature from trusted keyring, otherwise FALSE

+

TRUE if result +was not NULL and had at least one +signature from trusted keyring, otherwise FALSE

@@ -524,7 +524,7 @@ signature from trusted keyring, otherwise FALSE

enum OstreeGpgSignatureAttr

Signature attributes available from an OstreeGpgVerifyResult. -The attribute's GVariantType is shown in brackets.

+The attribute's GVariantType is shown in brackets.

Members

-guint +guint ostree_gpg_verify_result_count_all () @@ -49,7 +49,7 @@
-guint +guint ostree_gpg_verify_result_count_valid () @@ -57,7 +57,7 @@
-gboolean +gboolean ostree_gpg_verify_result_lookup () @@ -65,7 +65,7 @@
-GVariant * +GVariant * ostree_gpg_verify_result_get () @@ -73,7 +73,7 @@
-GVariant * +GVariant * ostree_gpg_verify_result_get_all () @@ -97,7 +97,7 @@
-gboolean +gboolean ostree_gpg_verify_result_require_valid_signature () @@ -146,7 +146,7 @@ or get all signature details with

Functions

ostree_gpg_verify_result_count_all ()

-
guint
+
guint
 ostree_gpg_verify_result_count_all (OstreeGpgVerifyResult *result);

Counts all the signatures in result .

@@ -173,7 +173,7 @@ ostree_gpg_verify_result_count_all (

ostree_gpg_verify_result_count_valid ()

-
guint
+
guint
 ostree_gpg_verify_result_count_valid (OstreeGpgVerifyResult *result);

Counts only the valid signatures in result .

@@ -200,17 +200,17 @@ ostree_gpg_verify_result_count_valid (

ostree_gpg_verify_result_lookup ()

-
gboolean
+
gboolean
 ostree_gpg_verify_result_lookup (OstreeGpgVerifyResult *result,
-                                 const gchar *key_id,
-                                 guint *out_signature_index);
+ const gchar *key_id, + guint *out_signature_index);

Searches result for a signature signed by key_id . If a match is found, -the function returns TRUE and sets out_signature_index +the function returns TRUE and sets out_signature_index so that further signature details can be obtained through ostree_gpg_verify_result_get(). -If no match is found, the function returns FALSE and leaves +If no match is found, the function returns FALSE and leaves out_signature_index unchanged.

@@ -236,7 +236,7 @@ If no match is found, the function returns FALSE an

out_signature_index

return location for the index of the signature signed by key_id -, or NULL.

[out]

output_buffer

a GString to hold the description

a GString to hold the description

 

variant

a GVariant from ostree_gpg_verify_result_get_all()

a GVariant from ostree_gpg_verify_result_get_all()

 

output_buffer

a GString to hold the description

a GString to hold the description

 

error

A GError

A GError

 
@@ -537,56 +537,56 @@ The attribute's GVariantType is shown in brackets.

@@ -594,7 +594,7 @@ The attribute's GVariantType is shown in brackets.

@@ -602,7 +602,7 @@ The attribute's GVariantType is shown in brackets.

@@ -610,14 +610,14 @@ The attribute's GVariantType is shown in brackets.

diff --git a/apidoc/html/ostree-In-memory-modifiable-filesystem-tree.html b/apidoc/html/ostree-In-memory-modifiable-filesystem-tree.html index 6cec6408..9e58eb2a 100644 --- a/apidoc/html/ostree-In-memory-modifiable-filesystem-tree.html +++ b/apidoc/html/ostree-In-memory-modifiable-filesystem-tree.html @@ -79,7 +79,7 @@ - + @@ -281,12 +281,12 @@ exist.


ostree_mutable_tree_walk ()

-
gboolean
+
gboolean
 ostree_mutable_tree_walk (OstreeMutableTree *self,
-                          GPtrArray *split_path,
-                          guint start,
+                          GPtrArray *split_path,
+                          guint start,
                           OstreeMutableTree **out_subdir,
-                          GError **error);
+ GError **error);

Traverse start number of elements starting from split_path ; the @@ -334,7 +334,7 @@ child will be returned in out_subdir


ostree_mutable_tree_get_subdirs ()

-
GHashTable *
+
GHashTable *
 ostree_mutable_tree_get_subdirs (OstreeMutableTree *self);

Returns

@@ -345,7 +345,7 @@ ostree_mutable_tree_get_subdirs (

ostree_mutable_tree_get_files ()

-
GHashTable *
+
GHashTable *
 ostree_mutable_tree_get_files (OstreeMutableTree *self);

Returns

diff --git a/apidoc/html/ostree-Progress-notification-system-for-asynchronous-operations.html b/apidoc/html/ostree-Progress-notification-system-for-asynchronous-operations.html index 588132f6..ef53bdc7 100644 --- a/apidoc/html/ostree-Progress-notification-system-for-asynchronous-operations.html +++ b/apidoc/html/ostree-Progress-notification-system-for-asynchronous-operations.html @@ -65,7 +65,7 @@

OSTREE_GPG_SIGNATURE_ATTR_VALID

-

[G_VARIANT_TYPE_BOOLEAN] Is the signature valid?

+

[G_VARIANT_TYPE_BOOLEAN] Is the signature valid?

 

OSTREE_GPG_SIGNATURE_ATTR_SIG_EXPIRED

-

[G_VARIANT_TYPE_BOOLEAN] Has the signature expired?

+

[G_VARIANT_TYPE_BOOLEAN] Has the signature expired?

 

OSTREE_GPG_SIGNATURE_ATTR_KEY_EXPIRED

-

[G_VARIANT_TYPE_BOOLEAN] Has the signing key expired?

+

[G_VARIANT_TYPE_BOOLEAN] Has the signing key expired?

 

OSTREE_GPG_SIGNATURE_ATTR_KEY_REVOKED

-

[G_VARIANT_TYPE_BOOLEAN] Has the signing key been revoked?

+

[G_VARIANT_TYPE_BOOLEAN] Has the signing key been revoked?

 

OSTREE_GPG_SIGNATURE_ATTR_KEY_MISSING

-

[G_VARIANT_TYPE_BOOLEAN] Is the signing key missing?

+

[G_VARIANT_TYPE_BOOLEAN] Is the signing key missing?

 

OSTREE_GPG_SIGNATURE_ATTR_FINGERPRINT

-

[G_VARIANT_TYPE_STRING] Fingerprint of the signing key

+

[G_VARIANT_TYPE_STRING] Fingerprint of the signing key

 

OSTREE_GPG_SIGNATURE_ATTR_TIMESTAMP

-

[G_VARIANT_TYPE_INT64] Signature creation Unix timestamp

+

[G_VARIANT_TYPE_INT64] Signature creation Unix timestamp

 

OSTREE_GPG_SIGNATURE_ATTR_EXP_TIMESTAMP

-

[G_VARIANT_TYPE_INT64] Signature expiration Unix timestamp (0 if no +

[G_VARIANT_TYPE_INT64] Signature expiration Unix timestamp (0 if no expiration)

 

OSTREE_GPG_SIGNATURE_ATTR_PUBKEY_ALGO_NAME

-

[G_VARIANT_TYPE_STRING] Name of the public key algorithm used to create +

[G_VARIANT_TYPE_STRING] Name of the public key algorithm used to create the signature

 

OSTREE_GPG_SIGNATURE_ATTR_HASH_ALGO_NAME

-

[G_VARIANT_TYPE_STRING] Name of the hash algorithm used to create the +

[G_VARIANT_TYPE_STRING] Name of the hash algorithm used to create the signature

 

OSTREE_GPG_SIGNATURE_ATTR_USER_NAME

-

[G_VARIANT_TYPE_STRING] The name of the signing key's primary user

+

[G_VARIANT_TYPE_STRING] The name of the signing key's primary user

 

OSTREE_GPG_SIGNATURE_ATTR_USER_EMAIL

-

[G_VARIANT_TYPE_STRING] The email address of the signing key's primary +

[G_VARIANT_TYPE_STRING] The email address of the signing key's primary user

 
-gboolean +gboolean ostree_mutable_tree_replace_file () @@ -87,7 +87,7 @@
-gboolean +gboolean ostree_mutable_tree_ensure_dir () @@ -95,7 +95,7 @@
-gboolean +gboolean ostree_mutable_tree_lookup () @@ -103,7 +103,7 @@
-gboolean +gboolean ostree_mutable_tree_ensure_parent_dirs () @@ -111,7 +111,7 @@
-gboolean +gboolean ostree_mutable_tree_walk () @@ -119,7 +119,7 @@
-GHashTable * +GHashTable * ostree_mutable_tree_get_subdirs () @@ -127,7 +127,7 @@
-GHashTable * +GHashTable * ostree_mutable_tree_get_files () @@ -202,41 +202,41 @@ ostree_mutable_tree_get_contents_checksum

ostree_mutable_tree_replace_file ()

-
gboolean
+
gboolean
 ostree_mutable_tree_replace_file (OstreeMutableTree *self,
                                   const char *name,
                                   const char *checksum,
-                                  GError **error);
+ GError **error);

ostree_mutable_tree_ensure_dir ()

-
gboolean
+
gboolean
 ostree_mutable_tree_ensure_dir (OstreeMutableTree *self,
                                 const char *name,
                                 OstreeMutableTree **out_subdir,
-                                GError **error);
+ GError **error);

ostree_mutable_tree_lookup ()

-
gboolean
+
gboolean
 ostree_mutable_tree_lookup (OstreeMutableTree *self,
                             const char *name,
                             char **out_file_checksum,
                             OstreeMutableTree **out_subdir,
-                            GError **error);
+ GError **error);

ostree_mutable_tree_ensure_parent_dirs ()

-
gboolean
+
gboolean
 ostree_mutable_tree_ensure_parent_dirs
                                (OstreeMutableTree *self,
-                                GPtrArray *split_path,
+                                GPtrArray *split_path,
                                 const char *metadata_checksum,
                                 OstreeMutableTree **out_parent,
-                                GError **error);
+ GError **error);

Create all parent trees necessary for the given split_path to exist.

@@ -271,7 +271,7 @@ exist.

error

a GError

a GError

 
-guint +guint ostree_async_progress_get_uint () @@ -73,7 +73,7 @@
-guint64 +guint64 ostree_async_progress_get_uint64 () @@ -156,7 +156,7 @@ ostree_async_progress_new (void

ostree_async_progress_new_and_connect ()

OstreeAsyncProgress *
 ostree_async_progress_new_and_connect (void (*changed) (OstreeAsyncProgress *self, gpointer user_data),
-                                       gpointer user_data);
+ gpointer user_data);
@@ -167,14 +167,14 @@ ostree_async_progress_get_status (

ostree_async_progress_get_uint ()

-
guint
+
guint
 ostree_async_progress_get_uint (OstreeAsyncProgress *self,
                                 const char *key);

ostree_async_progress_get_uint64 ()

-
guint64
+
guint64
 ostree_async_progress_get_uint64 (OstreeAsyncProgress *self,
                                   const char *key);
@@ -191,7 +191,7 @@ ostree_async_progress_set_status (void ostree_async_progress_set_uint (OstreeAsyncProgress *self, const char *key, - guint value); + guint value);

@@ -199,7 +199,7 @@ ostree_async_progress_set_uint (void ostree_async_progress_set_uint64 (OstreeAsyncProgress *self, const char *key, - guint64 value); + guint64 value);

diff --git a/apidoc/html/ostree-Root-partition-mount-point.html b/apidoc/html/ostree-Root-partition-mount-point.html index 0e974b9e..51a6d1b6 100644 --- a/apidoc/html/ostree-Root-partition-mount-point.html +++ b/apidoc/html/ostree-Root-partition-mount-point.html @@ -57,7 +57,7 @@
-GFile * +GFile * ostree_sysroot_get_path () @@ -65,7 +65,7 @@
-gboolean +gboolean ostree_sysroot_load () @@ -73,7 +73,7 @@
-gboolean +gboolean ostree_sysroot_load_if_changed () @@ -81,7 +81,7 @@
-gboolean +gboolean ostree_sysroot_lock () @@ -89,7 +89,7 @@
-gboolean +gboolean ostree_sysroot_try_lock () @@ -105,7 +105,7 @@
-gboolean +gboolean ostree_sysroot_lock_finish () @@ -137,7 +137,7 @@
-gboolean +gboolean ostree_sysroot_ensure_initialized () @@ -161,7 +161,7 @@
-GPtrArray * +GPtrArray * ostree_sysroot_get_deployments () @@ -177,7 +177,7 @@
-GFile * +GFile * ostree_sysroot_get_deployment_directory () @@ -193,7 +193,7 @@
-GFile * +GFile * ostree_sysroot_get_deployment_origin_path () @@ -201,7 +201,7 @@
-gboolean +gboolean ostree_sysroot_cleanup () @@ -209,7 +209,7 @@
-gboolean +gboolean ostree_sysroot_prepare_cleanup () @@ -217,7 +217,7 @@
-gboolean +gboolean ostree_sysroot_get_repo () @@ -225,7 +225,7 @@
-gboolean +gboolean ostree_sysroot_init_osname () @@ -233,7 +233,7 @@
-gboolean +gboolean ostree_sysroot_deployment_set_kargs () @@ -241,7 +241,7 @@
-gboolean +gboolean ostree_sysroot_deployment_set_mutable () @@ -249,7 +249,7 @@
-gboolean +gboolean ostree_sysroot_deployment_unlock () @@ -257,7 +257,7 @@
-gboolean +gboolean ostree_sysroot_write_deployments () @@ -265,7 +265,7 @@
-gboolean +gboolean ostree_sysroot_write_origin_file () @@ -273,7 +273,7 @@
-gboolean +gboolean ostree_sysroot_deploy_tree () @@ -289,7 +289,7 @@
-GKeyFile * +GKeyFile * ostree_sysroot_origin_new_from_refspec () @@ -297,7 +297,7 @@
-gboolean +gboolean ostree_sysroot_simple_write_deployment () @@ -340,7 +340,7 @@ perform locking externally.

ostree_sysroot_new ()

OstreeSysroot *
-ostree_sysroot_new (GFile *path);
+ostree_sysroot_new (GFile *path);

Parameters

@@ -351,7 +351,7 @@ ostree_sysroot_new (GFile - +

path

Path to a system root directory, or NULL.

Path to a system root directory, or NULL.

[allow-none]
@@ -377,7 +377,7 @@ ostree_sysroot_new_default (void<

ostree_sysroot_get_path ()

-
GFile *
+
GFile *
 ostree_sysroot_get_path (OstreeSysroot *self);

Returns

@@ -388,10 +388,10 @@ ostree_sysroot_get_path (

ostree_sysroot_load ()

-
gboolean
+
gboolean
 ostree_sysroot_load (OstreeSysroot *self,
-                     GCancellable *cancellable,
-                     GError **error);
+ GCancellable *cancellable, + GError **error);

Load deployment list, bootversion, and subbootversion from the rootfs self .

@@ -426,18 +426,18 @@ rootfs self

ostree_sysroot_load_if_changed ()

-
gboolean
+
gboolean
 ostree_sysroot_load_if_changed (OstreeSysroot *self,
-                                gboolean *out_changed,
-                                GCancellable *cancellable,
-                                GError **error);
+ gboolean *out_changed, + GCancellable *cancellable, + GError **error);

ostree_sysroot_lock ()

-
gboolean
+
gboolean
 ostree_sysroot_lock (OstreeSysroot *self,
-                     GError **error);
+ GError **error);

Acquire an exclusive multi-process write lock for self . This call blocks until the lock has been acquired. The lock is not @@ -471,15 +471,15 @@ be released if self


ostree_sysroot_try_lock ()

-
gboolean
+
gboolean
 ostree_sysroot_try_lock (OstreeSysroot *self,
-                         gboolean *out_acquired,
-                         GError **error);
+ gboolean *out_acquired, + GError **error);

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 + to FALSE, and returning TRUE (and no error).

Release the lock with ostree_sysroot_unlock(). The lock will also be released if self @@ -517,9 +517,9 @@ be released if self

ostree_sysroot_lock_async ()

void
 ostree_sysroot_lock_async (OstreeSysroot *self,
-                           GCancellable *cancellable,
-                           GAsyncReadyCallback callback,
-                           gpointer user_data);
+ GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data);

An asynchronous version of ostree_sysroot_lock().

Parameters

@@ -557,10 +557,10 @@ ostree_sysroot_lock_async (

ostree_sysroot_lock_finish ()

-
gboolean
+
gboolean
 ostree_sysroot_lock_finish (OstreeSysroot *self,
-                            GAsyncResult *result,
-                            GError **error);
+ GAsyncResult *result, + GError **error);

Call when ostree_sysroot_lock_async() is ready.

Parameters

@@ -672,10 +672,10 @@ calling this function.


ostree_sysroot_ensure_initialized ()

-
gboolean
+
gboolean
 ostree_sysroot_ensure_initialized (OstreeSysroot *self,
-                                   GCancellable *cancellable,
-                                   GError **error);
+ GCancellable *cancellable, + GError **error);

Ensure that self is set up as a valid rootfs, by creating /ostree/repo, among other things.

@@ -722,7 +722,7 @@ ostree_sysroot_get_subbootversion (

ostree_sysroot_get_deployments ()

-
GPtrArray *
+
GPtrArray *
 ostree_sysroot_get_deployments (OstreeSysroot *self);

Parameters

@@ -767,14 +767,14 @@ ostree_sysroot_get_booted_deployment (

Returns

-

The currently booted deployment, or NULL if none.

+

The currently booted deployment, or NULL if none.

[transfer none]


ostree_sysroot_get_deployment_directory ()

-
GFile *
+
GFile *
 ostree_sysroot_get_deployment_directory
                                (OstreeSysroot *self,
                                 OstreeDeployment *deployment);
@@ -846,9 +846,9 @@ or concatenate it with the full

ostree_sysroot_get_deployment_origin_path ()

-
GFile *
+
GFile *
 ostree_sysroot_get_deployment_origin_path
-                               (GFile *deployment_path);
+ (GFile *deployment_path);

Parameters

@@ -873,10 +873,10 @@ ostree_sysroot_get_deployment_origin_path

ostree_sysroot_cleanup ()

-
gboolean
+
gboolean
 ostree_sysroot_cleanup (OstreeSysroot *self,
-                        GCancellable *cancellable,
-                        GError **error);
+ GCancellable *cancellable, + GError **error);

Delete any state that resulted from a partially completed transaction, such as incomplete deployments.

@@ -910,10 +910,10 @@ transaction, such as incomplete deployments.


ostree_sysroot_prepare_cleanup ()

-
gboolean
+
gboolean
 ostree_sysroot_prepare_cleanup (OstreeSysroot *self,
-                                GCancellable *cancellable,
-                                GError **error);
+ GCancellable *cancellable, + GError **error);

Like ostree_sysroot_cleanup() in that it cleans up incomplete deployments and old boot versions, but does NOT prune the repository.

@@ -947,11 +947,11 @@ and old boot versions, but does NOT prune the repository.


ostree_sysroot_get_repo ()

-
gboolean
+
gboolean
 ostree_sysroot_get_repo (OstreeSysroot *self,
                          OstreeRepo **out_repo,
-                         GCancellable *cancellable,
-                         GError **error);
+ GCancellable *cancellable, + GError **error);

Retrieve the OSTree repository in sysroot self .

@@ -991,11 +991,11 @@ ostree_sysroot_get_repo (

ostree_sysroot_init_osname ()

-
gboolean
+
gboolean
 ostree_sysroot_init_osname (OstreeSysroot *self,
                             const char *osname,
-                            GCancellable *cancellable,
-                            GError **error);
+ GCancellable *cancellable, + GError **error);

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.

@@ -1035,12 +1035,12 @@ is required for generating a deployment.


ostree_sysroot_deployment_set_kargs ()

-
gboolean
+
gboolean
 ostree_sysroot_deployment_set_kargs (OstreeSysroot *self,
                                      OstreeDeployment *deployment,
                                      char **new_kargs,
-                                     GCancellable *cancellable,
-                                     GError **error);
+ GCancellable *cancellable, + GError **error);

Entirely replace the kernel arguments of deployment with the values in new_kargs @@ -1086,12 +1086,12 @@ values in new_kargs


ostree_sysroot_deployment_set_mutable ()

-
gboolean
+
gboolean
 ostree_sysroot_deployment_set_mutable (OstreeSysroot *self,
                                        OstreeDeployment *deployment,
-                                       gboolean is_mutable,
-                                       GCancellable *cancellable,
-                                       GError **error);
+ gboolean is_mutable, + GCancellable *cancellable, + GError **error);

By default, deployment directories are not mutable. This function will allow making them temporarily mutable, for example to allow layering additional non-OSTree content.

@@ -1131,12 +1131,12 @@ layering additional non-OSTree content.


ostree_sysroot_deployment_unlock ()

-
gboolean
+
gboolean
 ostree_sysroot_deployment_unlock (OstreeSysroot *self,
                                   OstreeDeployment *deployment,
                                   OstreeDeploymentUnlockedState unlocked_state,
-                                  GCancellable *cancellable,
-                                  GError **error);
+ GCancellable *cancellable, + GError **error);

Configure the target deployment deployment such that it is writable. There are multiple modes, essentially differing @@ -1184,11 +1184,11 @@ across reboots.


ostree_sysroot_write_deployments ()

-
gboolean
+
gboolean
 ostree_sysroot_write_deployments (OstreeSysroot *self,
-                                  GPtrArray *new_deployments,
-                                  GCancellable *cancellable,
-                                  GError **error);
+ GPtrArray *new_deployments, + GCancellable *cancellable, + GError **error);

Assuming new_deployments have already been deployed in place on disk, atomically update bootloader configuration.

@@ -1228,17 +1228,17 @@ disk, atomically update bootloader configuration.


ostree_sysroot_write_origin_file ()

-
gboolean
+
gboolean
 ostree_sysroot_write_origin_file (OstreeSysroot *sysroot,
                                   OstreeDeployment *deployment,
-                                  GKeyFile *new_origin,
-                                  GCancellable *cancellable,
-                                  GError **error);
+ GKeyFile *new_origin, + GCancellable *cancellable, + GError **error);

Immediately replace the origin file of the referenced deployment with the contents of new_origin . If new_origin - is NULL, + is NULL, this function will write the current origin of deployment .

@@ -1282,16 +1282,16 @@ this function will write the current origin of deplo

ostree_sysroot_deploy_tree ()

-
gboolean
+
gboolean
 ostree_sysroot_deploy_tree (OstreeSysroot *self,
                             const char *osname,
                             const char *revision,
-                            GKeyFile *origin,
+                            GKeyFile *origin,
                             OstreeDeployment *provided_merge_deployment,
                             char **override_kernel_argv,
                             OstreeDeployment **out_new_deployment,
-                            GCancellable *cancellable,
-                            GError **error);
+ GCancellable *cancellable, + GError **error);

Check out deployment tree with revision revision , performing a 3 way merge with provided_merge_deployment @@ -1332,7 +1332,7 @@ way merge with provided_merge_deployment

- + @@ -1393,7 +1393,7 @@ the first one in the current deployment list which matches osname.


ostree_sysroot_origin_new_from_refspec ()

-
GKeyFile *
+
GKeyFile *
 ostree_sysroot_origin_new_from_refspec
                                (OstreeSysroot *self,
                                 const char *refspec);
@@ -1422,15 +1422,15 @@ as an origin.


ostree_sysroot_simple_write_deployment ()

-
gboolean
+
gboolean
 ostree_sysroot_simple_write_deployment
                                (OstreeSysroot *sysroot,
                                 const char *osname,
                                 OstreeDeployment *new_deployment,
                                 OstreeDeployment *merge_deployment,
                                 OstreeSysrootSimpleWriteDeploymentFlags flags,
-                                GCancellable *cancellable,
-                                GError **error);
+ GCancellable *cancellable, + GError **error);

Prepend new_deployment to the list of deployments, commit, and cleanup. By default, all other deployments for the given osname diff --git a/apidoc/html/ostree-SELinux-policy-management.html b/apidoc/html/ostree-SELinux-policy-management.html index 47e03010..e73f0cc4 100644 --- a/apidoc/html/ostree-SELinux-policy-management.html +++ b/apidoc/html/ostree-SELinux-policy-management.html @@ -49,7 +49,7 @@

override_kernel_argv

Use these as kernel arguments; if NULL, inherit options from provided_merge_deployment.

Use these as kernel arguments; if NULL, inherit options from provided_merge_deployment.

[allow-none][array zero-terminated=1][element-type utf8]
-GFile * +GFile * ostree_sepolicy_get_path () @@ -64,7 +64,7 @@
-gboolean +gboolean ostree_sepolicy_get_label () @@ -79,7 +79,7 @@
-gboolean +gboolean ostree_sepolicy_restorecon () @@ -87,7 +87,7 @@
-gboolean +gboolean ostree_sepolicy_setfscreatecon () @@ -133,9 +133,9 @@ root and perform labeling.

ostree_sepolicy_new ()

OstreeSePolicy *
-ostree_sepolicy_new (GFile *path,
-                     GCancellable *cancellable,
-                     GError **error);
+ostree_sepolicy_new (GFile *path, + GCancellable *cancellable, + GError **error);

Parameters

@@ -161,7 +161,7 @@ ostree_sepolicy_new (GFile

ostree_sepolicy_get_path ()

-
GFile *
+
GFile *
 ostree_sepolicy_get_path (OstreeSePolicy *self);

Returns

@@ -183,18 +183,18 @@ ostree_sepolicy_get_name (

ostree_sepolicy_get_label ()

-
gboolean
+
gboolean
 ostree_sepolicy_get_label (OstreeSePolicy *self,
                            const char *relpath,
-                           guint32 unix_mode,
+                           guint32 unix_mode,
                            char **out_label,
-                           GCancellable *cancellable,
-                           GError **error);
+ GCancellable *cancellable, + GError **error);

Store in out_label the security context for the given relpath and mode unix_mode -. If the policy does not specify a label, NULL +. If the policy does not specify a label, NULL will be returned.

Parameters

@@ -253,15 +253,15 @@ ostree_sepolicy_get_csum (

ostree_sepolicy_restorecon ()

-
gboolean
+
gboolean
 ostree_sepolicy_restorecon (OstreeSePolicy *self,
                             const char *path,
-                            GFileInfo *info,
-                            GFile *target,
+                            GFileInfo *info,
+                            GFile *target,
                             OstreeSePolicyRestoreconFlags flags,
                             char **out_new_label,
-                            GCancellable *cancellable,
-                            GError **error);
+ GCancellable *cancellable, + GError **error);

Reset the security context of target based on the SELinux policy.

@@ -300,7 +300,7 @@ ostree_sepolicy_restorecon (

out_new_label

-
+ @@ -320,11 +320,11 @@ ostree_sepolicy_restorecon (

ostree_sepolicy_setfscreatecon ()

-
gboolean
+
gboolean
 ostree_sepolicy_setfscreatecon (OstreeSePolicy *self,
                                 const char *path,
-                                guint32 mode,
-                                GError **error);
+ guint32 mode, + GError **error);

Parameters

New label, or NULL if unchanged.

New label, or NULL if unchanged.

[allow-none][out]
diff --git a/apidoc/html/ostree-Simple-upgrade-class.html b/apidoc/html/ostree-Simple-upgrade-class.html index ff65fba7..29d25638 100644 --- a/apidoc/html/ostree-Simple-upgrade-class.html +++ b/apidoc/html/ostree-Simple-upgrade-class.html @@ -65,7 +65,7 @@
-GKeyFile * +GKeyFile * ostree_sysroot_upgrader_get_origin () @@ -73,7 +73,7 @@
-GKeyFile * +GKeyFile * ostree_sysroot_upgrader_dup_origin () @@ -81,7 +81,7 @@
-gboolean +gboolean ostree_sysroot_upgrader_set_origin () @@ -97,7 +97,7 @@
-gboolean +gboolean ostree_sysroot_upgrader_check_timestamps () @@ -105,7 +105,7 @@
-gboolean +gboolean ostree_sysroot_upgrader_pull () @@ -113,7 +113,7 @@
-gboolean +gboolean ostree_sysroot_upgrader_pull_one_dir () @@ -121,7 +121,7 @@
-gboolean +gboolean ostree_sysroot_upgrader_deploy () @@ -164,8 +164,8 @@ operations.

ostree_sysroot_upgrader_new ()

OstreeSysrootUpgrader *
 ostree_sysroot_upgrader_new (OstreeSysroot *sysroot,
-                             GCancellable *cancellable,
-                             GError **error);
+ GCancellable *cancellable, + GError **error);

Parameters

@@ -193,8 +193,8 @@ ostree_sysroot_upgrader_new (OstreeSysrootUpgrader * ostree_sysroot_upgrader_new_for_os (OstreeSysroot *sysroot, const char *osname, - GCancellable *cancellable, - GError **error); + GCancellable *cancellable, + GError **error);

Parameters

@@ -231,8 +231,8 @@ ostree_sysroot_upgrader_new_for_os_with_flags (OstreeSysroot *sysroot, const char *osname, OstreeSysrootUpgraderFlags flags, - GCancellable *cancellable, - GError **error); + GCancellable *cancellable, + GError **error);

Parameters

@@ -269,7 +269,7 @@ ostree_sysroot_upgrader_new_for_os_with_flags

ostree_sysroot_upgrader_get_origin ()

-
GKeyFile *
+
GKeyFile *
 ostree_sysroot_upgrader_get_origin (OstreeSysrootUpgrader *self);

Parameters

@@ -288,14 +288,14 @@ ostree_sysroot_upgrader_get_origin (

Returns

-

The origin file, or NULL if unknown.

+

The origin file, or NULL if unknown.

[transfer none]


ostree_sysroot_upgrader_dup_origin ()

-
GKeyFile *
+
GKeyFile *
 ostree_sysroot_upgrader_dup_origin (OstreeSysrootUpgrader *self);

Parameters

@@ -314,18 +314,18 @@ ostree_sysroot_upgrader_dup_origin (

Returns

-

A copy of the origin file, or NULL if unknown.

+

A copy of the origin file, or NULL if unknown.

[transfer full]


ostree_sysroot_upgrader_set_origin ()

-
gboolean
+
gboolean
 ostree_sysroot_upgrader_set_origin (OstreeSysrootUpgrader *self,
-                                    GKeyFile *origin,
-                                    GCancellable *cancellable,
-                                    GError **error);
+ GKeyFile *origin, + GCancellable *cancellable, + GError **error);

Replace the origin with origin .

@@ -384,18 +384,18 @@ ostree_sysroot_upgrader_get_origin_description

Returns

-

A one-line descriptive summary of the origin, or NULL if unknown

+

A one-line descriptive summary of the origin, or NULL if unknown


ostree_sysroot_upgrader_check_timestamps ()

-
gboolean
+
gboolean
 ostree_sysroot_upgrader_check_timestamps
                                (OstreeRepo *repo,
                                 const char *from_rev,
                                 const char *to_rev,
-                                GError **error);
+ GError **error);

Check that the timestamp on to_rev is equal to or newer than from_rev @@ -437,21 +437,21 @@ attackers which provide a client with an older commit.


ostree_sysroot_upgrader_pull ()

-
gboolean
+
gboolean
 ostree_sysroot_upgrader_pull (OstreeSysrootUpgrader *self,
                               OstreeRepoPullFlags flags,
                               OstreeSysrootUpgraderPullFlags upgrader_flags,
                               OstreeAsyncProgress *progress,
-                              gboolean *out_changed,
-                              GCancellable *cancellable,
-                              GError **error);
+ gboolean *out_changed, + GCancellable *cancellable, + GError **error);

Perform a pull from the origin. First check if the ref has changed, if so download the linked objects, and store the updated ref locally. Then out_changed - will be TRUE.

+ will be TRUE.

If the origin remote is unchanged, out_changed will be set to -FALSE.

+FALSE.

Parameters

@@ -503,15 +503,15 @@ ref locally. Then out_changed

ostree_sysroot_upgrader_pull_one_dir ()

-
gboolean
+
gboolean
 ostree_sysroot_upgrader_pull_one_dir (OstreeSysrootUpgrader *self,
                                       const char *dir_to_pull,
                                       OstreeRepoPullFlags flags,
                                       OstreeSysrootUpgraderPullFlags upgrader_flags,
                                       OstreeAsyncProgress *progress,
-                                      gboolean *out_changed,
-                                      GCancellable *cancellable,
-                                      GError **error);
+ gboolean *out_changed, + GCancellable *cancellable, + GError **error);

Like ostree_sysroot_upgrader_pull(), but allows retrieving just a subpath of the tree. This can be used to download metadata files from inside the tree such as package databases.

@@ -519,10 +519,10 @@ from inside the tree such as package databases.


ostree_sysroot_upgrader_deploy ()

-
gboolean
+
gboolean
 ostree_sysroot_upgrader_deploy (OstreeSysrootUpgrader *self,
-                                GCancellable *cancellable,
-                                GError **error);
+ GCancellable *cancellable, + GError **error);

Write the new deployment to disk, perform a configuration merge with /etc, and update the bootloader configuration.

diff --git a/apidoc/html/ostree-ostree-bootconfig-parser.html b/apidoc/html/ostree-ostree-bootconfig-parser.html index 476e0e45..27cad96e 100644 --- a/apidoc/html/ostree-ostree-bootconfig-parser.html +++ b/apidoc/html/ostree-ostree-bootconfig-parser.html @@ -57,7 +57,7 @@
-gboolean +gboolean ostree_bootconfig_parser_parse () @@ -65,7 +65,7 @@
-gboolean +gboolean ostree_bootconfig_parser_parse_at () @@ -73,7 +73,7 @@
-gboolean +gboolean ostree_bootconfig_parser_write () @@ -81,7 +81,7 @@
-gboolean +gboolean ostree_bootconfig_parser_write_at () @@ -158,21 +158,21 @@ ostree_bootconfig_parser_clone (

ostree_bootconfig_parser_parse ()

-
gboolean
+
gboolean
 ostree_bootconfig_parser_parse (OstreeBootconfigParser *self,
-                                GFile *path,
-                                GCancellable *cancellable,
-                                GError **error);
+ GFile *path, + GCancellable *cancellable, + GError **error);

ostree_bootconfig_parser_parse_at ()

-
gboolean
+
gboolean
 ostree_bootconfig_parser_parse_at (OstreeBootconfigParser *self,
                                    int dfd,
                                    const char *path,
-                                   GCancellable *cancellable,
-                                   GError **error);
+ GCancellable *cancellable, + GError **error);

Initialize a bootconfig from the given file.

Parameters

@@ -215,21 +215,21 @@ ostree_bootconfig_parser_parse_at (

ostree_bootconfig_parser_write ()

-
gboolean
+
gboolean
 ostree_bootconfig_parser_write (OstreeBootconfigParser *self,
-                                GFile *output,
-                                GCancellable *cancellable,
-                                GError **error);
+ GFile *output, + GCancellable *cancellable, + GError **error);

ostree_bootconfig_parser_write_at ()

-
gboolean
+
gboolean
 ostree_bootconfig_parser_write_at (OstreeBootconfigParser *self,
                                    int dfd,
                                    const char *path,
-                                   GCancellable *cancellable,
-                                   GError **error);
+ GCancellable *cancellable, + GError **error);

diff --git a/apidoc/html/ostree-ostree-chain-input-stream.html b/apidoc/html/ostree-ostree-chain-input-stream.html index 495053c2..98706ac1 100644 --- a/apidoc/html/ostree-ostree-chain-input-stream.html +++ b/apidoc/html/ostree-ostree-chain-input-stream.html @@ -69,7 +69,7 @@

ostree_chain_input_stream_new ()

OstreeChainInputStream *
-ostree_chain_input_stream_new (GPtrArray *streams);
+ostree_chain_input_stream_new (GPtrArray *streams);
diff --git a/apidoc/html/ostree-ostree-checksum-input-stream.html b/apidoc/html/ostree-ostree-checksum-input-stream.html index 89d2ab98..90d2b818 100644 --- a/apidoc/html/ostree-ostree-checksum-input-stream.html +++ b/apidoc/html/ostree-ostree-checksum-input-stream.html @@ -69,8 +69,8 @@

ostree_checksum_input_stream_new ()

OstreeChecksumInputStream *
-ostree_checksum_input_stream_new (GInputStream *stream,
-                                  GChecksum *checksum);
+ostree_checksum_input_stream_new (GInputStream *stream, + GChecksum *checksum);
diff --git a/apidoc/html/ostree-ostree-deployment.html b/apidoc/html/ostree-ostree-deployment.html index d276aaef..fbd7e98e 100644 --- a/apidoc/html/ostree-ostree-deployment.html +++ b/apidoc/html/ostree-ostree-deployment.html @@ -41,7 +41,7 @@
-guint +guint ostree_deployment_hash () @@ -49,7 +49,7 @@
-gboolean +gboolean ostree_deployment_equal () @@ -118,7 +118,7 @@
-GKeyFile * +GKeyFile * ostree_deployment_get_origin () @@ -210,15 +210,15 @@

Functions

ostree_deployment_hash ()

-
guint
-ostree_deployment_hash (gconstpointer v);
+
guint
+ostree_deployment_hash (gconstpointer v);

ostree_deployment_equal ()

-
gboolean
-ostree_deployment_equal (gconstpointer ap,
-                         gconstpointer bp);
+
gboolean
+ostree_deployment_equal (gconstpointer ap,
+                         gconstpointer bp);

Parameters

@@ -243,7 +243,7 @@ ostree_deployment_equal (gconstpo

Returns

-

TRUE if deployments have the same osname, csum, and deployserial

+

TRUE if deployments have the same osname, csum, and deployserial


@@ -322,7 +322,7 @@ ostree_deployment_get_bootconfig (

ostree_deployment_get_origin ()

-
GKeyFile *
+
GKeyFile *
 ostree_deployment_get_origin (OstreeDeployment *self);

Parameters

@@ -406,7 +406,7 @@ ostree_deployment_set_bootconfig (

ostree_deployment_set_origin ()

void
 ostree_deployment_set_origin (OstreeDeployment *self,
-                              GKeyFile *origin);
+ GKeyFile *origin);

@@ -506,7 +506,7 @@ ostree_deployment_unlocked_state_to_string
- + diff --git a/apidoc/html/ostree-ostree-diff.html b/apidoc/html/ostree-ostree-diff.html index 7145d121..ef6d6bb7 100644 --- a/apidoc/html/ostree-ostree-diff.html +++ b/apidoc/html/ostree-ostree-diff.html @@ -57,7 +57,7 @@ - + @@ -185,11 +185,11 @@ sets of

ostree_diff_print ()

void
-ostree_diff_print (GFile *a,
-                   GFile *b,
-                   GPtrArray *modified,
-                   GPtrArray *removed,
-                   GPtrArray *added);
+ostree_diff_print (GFile *a, + GFile *b, + GPtrArray *modified, + GPtrArray *removed, + GPtrArray *added);

Print the contents of a diff to stdout.

Parameters

diff --git a/apidoc/html/ostree-ostree-repo-file.html b/apidoc/html/ostree-ostree-repo-file.html index 392f8bbd..95d140c9 100644 --- a/apidoc/html/ostree-ostree-repo-file.html +++ b/apidoc/html/ostree-ostree-repo-file.html @@ -40,7 +40,7 @@
 

GKeyFile *origin;

GKeyFile *origin;

How to construct an upgraded version of this tree

 
-gboolean +gboolean ostree_diff_dirs () @@ -112,15 +112,15 @@ ostree_diff_item_unref (

ostree_diff_dirs ()

-
gboolean
+
gboolean
 ostree_diff_dirs (OstreeDiffFlags flags,
-                  GFile *a,
-                  GFile *b,
-                  GPtrArray *modified,
-                  GPtrArray *removed,
-                  GPtrArray *added,
-                  GCancellable *cancellable,
-                  GError **error);
+ GFile *a, + GFile *b, + GPtrArray *modified, + GPtrArray *removed, + GPtrArray *added, + GCancellable *cancellable, + GError **error);

Compute the difference between directory a and b as 3 separate @@ -144,7 +144,7 @@ sets of

a

First directory path, or NULL

First directory path, or NULL

 
-gboolean +gboolean ostree_repo_file_ensure_resolved () @@ -48,7 +48,7 @@
-gboolean +gboolean ostree_repo_file_get_xattrs () @@ -94,7 +94,7 @@
-GVariant * +GVariant * ostree_repo_file_tree_get_contents () @@ -102,7 +102,7 @@
-GVariant * +GVariant * ostree_repo_file_tree_get_metadata () @@ -125,7 +125,7 @@
-gboolean +gboolean ostree_repo_file_tree_query_child () @@ -154,18 +154,18 @@

Functions

ostree_repo_file_ensure_resolved ()

-
gboolean
+
gboolean
 ostree_repo_file_ensure_resolved (OstreeRepoFile *self,
-                                  GError **error);
+ GError **error);

ostree_repo_file_get_xattrs ()

-
gboolean
+
gboolean
 ostree_repo_file_get_xattrs (OstreeRepoFile *self,
-                             GVariant **out_xattrs,
-                             GCancellable *cancellable,
-                             GError **error);
+ GVariant **out_xattrs, + GCancellable *cancellable, + GError **error);

@@ -195,7 +195,7 @@ ostree_repo_file_get_root (void ostree_repo_file_tree_set_metadata (OstreeRepoFile *self, const char *checksum, - GVariant *metadata); + GVariant *metadata);

@@ -214,13 +214,13 @@ ostree_repo_file_tree_get_metadata_checksum

ostree_repo_file_tree_get_contents ()

-
GVariant *
+
GVariant *
 ostree_repo_file_tree_get_contents (OstreeRepoFile *self);

ostree_repo_file_tree_get_metadata ()

-
GVariant *
+
GVariant *
 ostree_repo_file_tree_get_metadata (OstreeRepoFile *self);

@@ -235,20 +235,20 @@ ostree_repo_file_get_checksum (int ostree_repo_file_tree_find_child (OstreeRepoFile *self, const char *name, - gboolean *is_dir, - GVariant **out_container); + gboolean *is_dir, + GVariant **out_container);

ostree_repo_file_tree_query_child ()

-
gboolean
+
gboolean
 ostree_repo_file_tree_query_child (OstreeRepoFile *self,
                                    int n,
                                    const char *attributes,
-                                   GFileQueryInfoFlags flags,
-                                   GFileInfo **out_info,
-                                   GCancellable *cancellable,
-                                   GError **error);
+ GFileQueryInfoFlags flags, + GFileInfo **out_info, + GCancellable *cancellable, + GError **error);
diff --git a/apidoc/html/ostree.devhelp2 b/apidoc/html/ostree.devhelp2 index ed3cdb53..734596e6 100644 --- a/apidoc/html/ostree.devhelp2 +++ b/apidoc/html/ostree.devhelp2 @@ -196,6 +196,7 @@ + diff --git a/apidoc/html/reference.html b/apidoc/html/reference.html index d22e7153..5643d548 100644 --- a/apidoc/html/reference.html +++ b/apidoc/html/reference.html @@ -1066,6 +1066,10 @@
+ostree_repo_verify_commit_for_remote, function in Content-addressed object store +
+
+
ostree_repo_verify_summary, function in Content-addressed object store
diff --git a/apidoc/ostree-sections.txt b/apidoc/ostree-sections.txt index 37c7e11e..3cda9150 100644 --- a/apidoc/ostree-sections.txt +++ b/apidoc/ostree-sections.txt @@ -379,6 +379,7 @@ ostree_repo_add_gpg_signature_summary ostree_repo_gpg_verify_data ostree_repo_verify_commit ostree_repo_verify_commit_ext +ostree_repo_verify_commit_for_remote ostree_repo_verify_summary ostree_repo_regenerate_summary diff --git a/apidoc/version.xml b/apidoc/version.xml index 106e625c..59b8f451 100644 --- a/apidoc/version.xml +++ b/apidoc/version.xml @@ -1 +1 @@ -2016.12 \ No newline at end of file +2016.13 \ No newline at end of file diff --git a/buildutil/tap-test b/buildutil/tap-test index 6b2eb5c1..c8da31e7 100755 --- a/buildutil/tap-test +++ b/buildutil/tap-test @@ -11,13 +11,24 @@ bn=$(basename $1) tempdir=$(mktemp -d /var/tmp/tap-test.XXXXXX) touch ${tempdir}/.testtmp function cleanup () { - if test -n "${TEST_SKIP_CLEANUP:-}"; then - echo "Skipping cleanup of ${tempdir}" - else if test -f ${tempdir}/.testtmp; then + if test -f ${tempdir}/.testtmp; then rm "${tempdir}" -rf fi - fi } -trap cleanup EXIT +function skip_cleanup() { + echo "Skipping cleanup of ${tempdir}" +} cd ${tempdir} ${srcd}/${bn} -k --tap +rc=$? +case "${TEST_SKIP_CLEANUP:-}" in + no|"") cleanup ;; + err) + if test $rc != 0; then + skip_cleanup + else + cleanup + fi ;; + *) skip_cleanup ;; +esac +exit $rc diff --git a/configure b/configure index 9a24850c..7ea80c0f 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for ostree 2016.13. +# Generated by GNU Autoconf 2.69 for ostree 2016.14. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='ostree' PACKAGE_TARNAME='ostree' -PACKAGE_VERSION='2016.13' -PACKAGE_STRING='ostree 2016.13' +PACKAGE_VERSION='2016.14' +PACKAGE_STRING='ostree 2016.14' PACKAGE_BUGREPORT='walters@verbum.org' PACKAGE_URL='' @@ -1480,7 +1480,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures ostree 2016.13 to adapt to many kinds of systems. +\`configure' configures ostree 2016.14 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1550,7 +1550,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of ostree 2016.13:";; + short | recursive ) echo "Configuration of ostree 2016.14:";; esac cat <<\_ACEOF @@ -1759,7 +1759,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -ostree configure 2016.13 +ostree configure 2016.14 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2174,7 +2174,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by ostree $as_me 2016.13, which was +It was created by ostree $as_me 2016.14, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3041,7 +3041,7 @@ fi # Define the identity of the package. PACKAGE='ostree' - VERSION='2016.13' + VERSION='2016.14' # Some tools Automake needs. @@ -17092,7 +17092,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by ostree $as_me 2016.13, which was +This file was extended by ostree $as_me 2016.14, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17158,7 +17158,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -ostree config.status 2016.13 +ostree config.status 2016.14 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index ffa86295..cb1cc980 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ AC_PREREQ([2.63]) dnl If incrementing the version here, remember to update libostree.sym too -AC_INIT([ostree], [2016.13], [walters@verbum.org]) +AC_INIT([ostree], [2016.14], [walters@verbum.org]) AC_CONFIG_HEADER([config.h]) AC_CONFIG_MACRO_DIR([buildutil]) AC_CONFIG_AUX_DIR([build-aux]) diff --git a/man/ostree-admin-cleanup.1 b/man/ostree-admin-cleanup.1 index 69429cba..2574ebf9 100644 --- a/man/ostree-admin-cleanup.1 +++ b/man/ostree-admin-cleanup.1 @@ -2,7 +2,7 @@ .\" Title: ostree admin cleanup .\" Author: Colin Walters .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 11/03/2016 +.\" Date: 11/23/2016 .\" Manual: ostree admin cleanup .\" Source: OSTree .\" Language: English diff --git a/man/ostree-admin-config-diff.1 b/man/ostree-admin-config-diff.1 index a5fe7eae..534df818 100644 --- a/man/ostree-admin-config-diff.1 +++ b/man/ostree-admin-config-diff.1 @@ -2,7 +2,7 @@ .\" Title: ostree admin config-diff .\" Author: Colin Walters .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 11/03/2016 +.\" Date: 11/23/2016 .\" Manual: ostree admin config-diff .\" Source: OSTree .\" Language: English diff --git a/man/ostree-admin-deploy.1 b/man/ostree-admin-deploy.1 index 978409d4..2abfefbf 100644 --- a/man/ostree-admin-deploy.1 +++ b/man/ostree-admin-deploy.1 @@ -2,7 +2,7 @@ .\" Title: ostree admin deploy .\" Author: Colin Walters .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 11/03/2016 +.\" Date: 11/23/2016 .\" Manual: ostree admin deploy .\" Source: OSTree .\" Language: English diff --git a/man/ostree-admin-init-fs.1 b/man/ostree-admin-init-fs.1 index 2bcff108..431afcd8 100644 --- a/man/ostree-admin-init-fs.1 +++ b/man/ostree-admin-init-fs.1 @@ -2,7 +2,7 @@ .\" Title: ostree admin init-fs .\" Author: Colin Walters .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 11/03/2016 +.\" Date: 11/23/2016 .\" Manual: ostree admin init-fs .\" Source: OSTree .\" Language: English diff --git a/man/ostree-admin-instutil.1 b/man/ostree-admin-instutil.1 index f6b837e1..130c1511 100644 --- a/man/ostree-admin-instutil.1 +++ b/man/ostree-admin-instutil.1 @@ -2,7 +2,7 @@ .\" Title: ostree admin instutil .\" Author: Colin Walters .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 11/03/2016 +.\" Date: 11/23/2016 .\" Manual: ostree admin instutil .\" Source: OSTree .\" Language: English diff --git a/man/ostree-admin-os-init.1 b/man/ostree-admin-os-init.1 index 699d505e..88e7463b 100644 --- a/man/ostree-admin-os-init.1 +++ b/man/ostree-admin-os-init.1 @@ -2,7 +2,7 @@ .\" Title: ostree admin os-init .\" Author: Colin Walters .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 11/03/2016 +.\" Date: 11/23/2016 .\" Manual: ostree admin os-init .\" Source: OSTree .\" Language: English diff --git a/man/ostree-admin-set-origin.1 b/man/ostree-admin-set-origin.1 index c06100c6..d44cf6cd 100644 --- a/man/ostree-admin-set-origin.1 +++ b/man/ostree-admin-set-origin.1 @@ -2,7 +2,7 @@ .\" Title: ostree admin set-origin .\" Author: Colin Walters .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 11/03/2016 +.\" Date: 11/23/2016 .\" Manual: ostree admin set-origin .\" Source: OSTree .\" Language: English diff --git a/man/ostree-admin-status.1 b/man/ostree-admin-status.1 index 9f8e7dc9..9b92d3d9 100644 --- a/man/ostree-admin-status.1 +++ b/man/ostree-admin-status.1 @@ -2,7 +2,7 @@ .\" Title: ostree admin status .\" Author: Colin Walters .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 11/03/2016 +.\" Date: 11/23/2016 .\" Manual: ostree admin status .\" Source: OSTree .\" Language: English diff --git a/man/ostree-admin-switch.1 b/man/ostree-admin-switch.1 index cead83b5..9434d242 100644 --- a/man/ostree-admin-switch.1 +++ b/man/ostree-admin-switch.1 @@ -2,7 +2,7 @@ .\" Title: ostree admin switch .\" Author: Colin Walters .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 11/03/2016 +.\" Date: 11/23/2016 .\" Manual: ostree admin switch .\" Source: OSTree .\" Language: English diff --git a/man/ostree-admin-undeploy.1 b/man/ostree-admin-undeploy.1 index bb81c978..de53813b 100644 --- a/man/ostree-admin-undeploy.1 +++ b/man/ostree-admin-undeploy.1 @@ -2,7 +2,7 @@ .\" Title: ostree admin undeploy .\" Author: Colin Walters .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 11/03/2016 +.\" Date: 11/23/2016 .\" Manual: ostree admin undeploy .\" Source: OSTree .\" Language: English diff --git a/man/ostree-admin-unlock.1 b/man/ostree-admin-unlock.1 index e6b302ba..266228db 100644 --- a/man/ostree-admin-unlock.1 +++ b/man/ostree-admin-unlock.1 @@ -2,7 +2,7 @@ .\" Title: ostree admin unlock .\" Author: Colin Walters .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 11/03/2016 +.\" Date: 11/23/2016 .\" Manual: ostree admin unlock .\" Source: OSTree .\" Language: English diff --git a/man/ostree-admin-upgrade.1 b/man/ostree-admin-upgrade.1 index 8394a57b..9182a17d 100644 --- a/man/ostree-admin-upgrade.1 +++ b/man/ostree-admin-upgrade.1 @@ -2,7 +2,7 @@ .\" Title: ostree admin upgrade .\" Author: Colin Walters .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 11/03/2016 +.\" Date: 11/23/2016 .\" Manual: ostree admin upgrade .\" Source: OSTree .\" Language: English diff --git a/man/ostree-admin.1 b/man/ostree-admin.1 index 4ff2251f..9d378799 100644 --- a/man/ostree-admin.1 +++ b/man/ostree-admin.1 @@ -2,7 +2,7 @@ .\" Title: ostree admin .\" Author: Colin Walters .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 11/03/2016 +.\" Date: 11/23/2016 .\" Manual: ostree admin .\" Source: OSTree .\" Language: English diff --git a/man/ostree-cat.1 b/man/ostree-cat.1 index 79136515..f715b1f4 100644 --- a/man/ostree-cat.1 +++ b/man/ostree-cat.1 @@ -2,7 +2,7 @@ .\" Title: ostree cat .\" Author: Colin Walters .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 11/03/2016 +.\" Date: 11/23/2016 .\" Manual: ostree cat .\" Source: OSTree .\" Language: English diff --git a/man/ostree-checkout.1 b/man/ostree-checkout.1 index 431b2b8c..cad60467 100644 --- a/man/ostree-checkout.1 +++ b/man/ostree-checkout.1 @@ -2,7 +2,7 @@ .\" Title: ostree checkout .\" Author: Colin Walters .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 11/03/2016 +.\" Date: 11/23/2016 .\" Manual: ostree checkout .\" Source: OSTree .\" Language: English diff --git a/man/ostree-checksum.1 b/man/ostree-checksum.1 index 008bd1b5..ea294a0c 100644 --- a/man/ostree-checksum.1 +++ b/man/ostree-checksum.1 @@ -2,7 +2,7 @@ .\" Title: ostree checksum .\" Author: Colin Walters .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 11/03/2016 +.\" Date: 11/23/2016 .\" Manual: ostree checksum .\" Source: OSTree .\" Language: English diff --git a/man/ostree-commit.1 b/man/ostree-commit.1 index 6fc6d5f4..60d49645 100644 --- a/man/ostree-commit.1 +++ b/man/ostree-commit.1 @@ -2,7 +2,7 @@ .\" Title: ostree commit .\" Author: Colin Walters .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 11/03/2016 +.\" Date: 11/23/2016 .\" Manual: ostree commit .\" Source: OSTree .\" Language: English diff --git a/man/ostree-config.1 b/man/ostree-config.1 index 3848f060..52516b0c 100644 --- a/man/ostree-config.1 +++ b/man/ostree-config.1 @@ -2,7 +2,7 @@ .\" Title: ostree config .\" Author: Colin Walters .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 11/03/2016 +.\" Date: 11/23/2016 .\" Manual: ostree config .\" Source: OSTree .\" Language: English diff --git a/man/ostree-diff.1 b/man/ostree-diff.1 index ea338208..dd0ad736 100644 --- a/man/ostree-diff.1 +++ b/man/ostree-diff.1 @@ -2,7 +2,7 @@ .\" Title: ostree diff .\" Author: Colin Walters .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 11/03/2016 +.\" Date: 11/23/2016 .\" Manual: ostree diff .\" Source: OSTree .\" Language: English diff --git a/man/ostree-export.1 b/man/ostree-export.1 index 8be2b9d1..49d614f5 100644 --- a/man/ostree-export.1 +++ b/man/ostree-export.1 @@ -2,7 +2,7 @@ .\" Title: ostree export .\" Author: Colin Walters .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 11/03/2016 +.\" Date: 11/23/2016 .\" Manual: ostree export .\" Source: OSTree .\" Language: English diff --git a/man/ostree-fsck.1 b/man/ostree-fsck.1 index d462f4aa..2892efd6 100644 --- a/man/ostree-fsck.1 +++ b/man/ostree-fsck.1 @@ -2,7 +2,7 @@ .\" Title: ostree fsck .\" Author: Colin Walters .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 11/03/2016 +.\" Date: 11/23/2016 .\" Manual: ostree fsck .\" Source: OSTree .\" Language: English diff --git a/man/ostree-gpg-sign.1 b/man/ostree-gpg-sign.1 index ceed986e..bea9b740 100644 --- a/man/ostree-gpg-sign.1 +++ b/man/ostree-gpg-sign.1 @@ -2,7 +2,7 @@ .\" Title: ostree gpg-sign .\" Author: Colin Walters .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 11/03/2016 +.\" Date: 11/23/2016 .\" Manual: ostree gpg-sign .\" Source: OSTree .\" Language: English diff --git a/man/ostree-init.1 b/man/ostree-init.1 index 9cb66110..e8711761 100644 --- a/man/ostree-init.1 +++ b/man/ostree-init.1 @@ -2,7 +2,7 @@ .\" Title: ostree init .\" Author: Colin Walters .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 11/03/2016 +.\" Date: 11/23/2016 .\" Manual: ostree init .\" Source: OSTree .\" Language: English diff --git a/man/ostree-log.1 b/man/ostree-log.1 index 4b9a1889..3da63f50 100644 --- a/man/ostree-log.1 +++ b/man/ostree-log.1 @@ -2,7 +2,7 @@ .\" Title: ostree log .\" Author: Colin Walters .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 11/03/2016 +.\" Date: 11/23/2016 .\" Manual: ostree log .\" Source: OSTree .\" Language: English diff --git a/man/ostree-ls.1 b/man/ostree-ls.1 index e38daa72..7a9e4eef 100644 --- a/man/ostree-ls.1 +++ b/man/ostree-ls.1 @@ -2,7 +2,7 @@ .\" Title: ostree ls .\" Author: Colin Walters .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 11/03/2016 +.\" Date: 11/23/2016 .\" Manual: ostree ls .\" Source: OSTree .\" Language: English diff --git a/man/ostree-prune.1 b/man/ostree-prune.1 index df3bfb4e..9012e0ad 100644 --- a/man/ostree-prune.1 +++ b/man/ostree-prune.1 @@ -2,7 +2,7 @@ .\" Title: ostree prune .\" Author: Colin Walters .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 11/03/2016 +.\" Date: 11/23/2016 .\" Manual: ostree prune .\" Source: OSTree .\" Language: English diff --git a/man/ostree-pull-local.1 b/man/ostree-pull-local.1 index 05437600..80551754 100644 --- a/man/ostree-pull-local.1 +++ b/man/ostree-pull-local.1 @@ -2,7 +2,7 @@ .\" Title: ostree pull-local .\" Author: Colin Walters .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 11/03/2016 +.\" Date: 11/23/2016 .\" Manual: ostree pull-local .\" Source: OSTree .\" Language: English diff --git a/man/ostree-pull.1 b/man/ostree-pull.1 index f5902218..1a326248 100644 --- a/man/ostree-pull.1 +++ b/man/ostree-pull.1 @@ -2,7 +2,7 @@ .\" Title: ostree pull .\" Author: Colin Walters .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 11/03/2016 +.\" Date: 11/23/2016 .\" Manual: ostree pull .\" Source: OSTree .\" Language: English diff --git a/man/ostree-refs.1 b/man/ostree-refs.1 index 030e85ca..669ac8e8 100644 --- a/man/ostree-refs.1 +++ b/man/ostree-refs.1 @@ -2,7 +2,7 @@ .\" Title: ostree refs .\" Author: Colin Walters .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 11/03/2016 +.\" Date: 11/23/2016 .\" Manual: ostree refs .\" Source: OSTree .\" Language: English diff --git a/man/ostree-remote.1 b/man/ostree-remote.1 index f347bad4..57359f7a 100644 --- a/man/ostree-remote.1 +++ b/man/ostree-remote.1 @@ -2,7 +2,7 @@ .\" Title: ostree remote .\" Author: Colin Walters .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 11/10/2016 +.\" Date: 11/23/2016 .\" Manual: ostree remote .\" Source: OSTree .\" Language: English diff --git a/man/ostree-reset.1 b/man/ostree-reset.1 index 0091b0a1..fe4d901c 100644 --- a/man/ostree-reset.1 +++ b/man/ostree-reset.1 @@ -2,7 +2,7 @@ .\" Title: ostree reset .\" Author: Colin Walters .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 11/03/2016 +.\" Date: 11/23/2016 .\" Manual: ostree reset .\" Source: OSTree .\" Language: English diff --git a/man/ostree-rev-parse.1 b/man/ostree-rev-parse.1 index 728cf340..372f2ea9 100644 --- a/man/ostree-rev-parse.1 +++ b/man/ostree-rev-parse.1 @@ -2,7 +2,7 @@ .\" Title: ostree rev-parse .\" Author: Colin Walters .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 11/03/2016 +.\" Date: 11/23/2016 .\" Manual: ostree rev-parse .\" Source: OSTree .\" Language: English diff --git a/man/ostree-show.1 b/man/ostree-show.1 index 99a01eca..eee57251 100644 --- a/man/ostree-show.1 +++ b/man/ostree-show.1 @@ -2,7 +2,7 @@ .\" Title: ostree show .\" Author: Colin Walters .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 11/03/2016 +.\" Date: 11/23/2016 .\" Manual: ostree show .\" Source: OSTree .\" Language: English diff --git a/man/ostree-static-delta.1 b/man/ostree-static-delta.1 index 1583cc17..67eef6de 100644 --- a/man/ostree-static-delta.1 +++ b/man/ostree-static-delta.1 @@ -2,7 +2,7 @@ .\" Title: ostree static-delta .\" Author: Colin Walters .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 11/03/2016 +.\" Date: 11/23/2016 .\" Manual: ostree static-delta .\" Source: OSTree .\" Language: English diff --git a/man/ostree-summary.1 b/man/ostree-summary.1 index 668a780f..b42b9eab 100644 --- a/man/ostree-summary.1 +++ b/man/ostree-summary.1 @@ -2,7 +2,7 @@ .\" Title: ostree summary .\" Author: Colin Walters .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 11/03/2016 +.\" Date: 11/23/2016 .\" Manual: ostree summary .\" Source: OSTree .\" Language: English diff --git a/man/ostree-trivial-httpd.1 b/man/ostree-trivial-httpd.1 index 635981f4..26460d5e 100644 --- a/man/ostree-trivial-httpd.1 +++ b/man/ostree-trivial-httpd.1 @@ -2,7 +2,7 @@ .\" Title: ostree trivial-httpd .\" Author: Colin Walters .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 11/03/2016 +.\" Date: 11/23/2016 .\" Manual: ostree trivial-httpd .\" Source: OSTree .\" Language: English diff --git a/man/ostree.1 b/man/ostree.1 index f77a3aaa..60cb46bc 100644 --- a/man/ostree.1 +++ b/man/ostree.1 @@ -2,7 +2,7 @@ .\" Title: ostree .\" Author: Colin Walters .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 11/03/2016 +.\" Date: 11/23/2016 .\" Manual: ostree .\" Source: OSTree .\" Language: English @@ -250,7 +250,11 @@ or OSTree supports signing commits with GPG\&. Operations on the system repository by default use keyring files in /usr/share/ostree/trusted\&.gpg\&.d\&. Any public key in a keyring file in that directory will be trusted by the client\&. No private keys should be present in this directory\&. .PP -In addition to the system repository, OSTree supports a per\-remote +In addition to the system repository, OSTree supports two other paths\&. First, there is a +gpgkeypath +option for remotes, which must point to the filename of an ASCII\-armored key\&. +.PP +Second, there is support for a per\-remote \fIremotename\fR\&.trustedkeys\&.gpg file stored in the toplevel of the repository (alongside objects/ diff --git a/man/ostree.repo-config.5 b/man/ostree.repo-config.5 index 988f8a11..d397af15 100644 --- a/man/ostree.repo-config.5 +++ b/man/ostree.repo-config.5 @@ -2,7 +2,7 @@ .\" Title: ostree.repo-config .\" Author: Colin Walters .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 11/10/2016 +.\" Date: 11/23/2016 .\" Manual: ostree.repo-config .\" Source: OSTree .\" Language: English @@ -136,7 +136,9 @@ file, remotes may also be specified in will be ignored\&. .SH "PER\-REMOTE GPG KEYRINGS AND VERIFICATION" .PP -OSTree supports a per\-remote GPG keyring\&. For more information see +OSTree supports a per\-remote GPG keyring, as well as a +gpgkeypath +option\&. For more information see \fBostree\fR(1)\&. in the section GPG verification\&. .SH "PER\-REMOTE HTTP COOKIES" diff --git a/man/ostree.repo-config.xml b/man/ostree.repo-config.xml index 1182aa93..876c9dfc 100644 --- a/man/ostree.repo-config.xml +++ b/man/ostree.repo-config.xml @@ -199,7 +199,8 @@ Boston, MA 02111-1307, USA. Per-remote GPG keyrings and verification - OSTree supports a per-remote GPG keyring. For more information see + OSTree supports a per-remote GPG keyring, as well as a + gpgkeypath option. For more information see ostree1. in the section GPG verification. diff --git a/man/ostree.repo.5 b/man/ostree.repo.5 index 5c7286c9..886a537c 100644 --- a/man/ostree.repo.5 +++ b/man/ostree.repo.5 @@ -2,7 +2,7 @@ .\" Title: ostree.repo .\" Author: Colin Walters .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 11/03/2016 +.\" Date: 11/23/2016 .\" Manual: ostree.repo .\" Source: OSTree .\" Language: English diff --git a/man/ostree.xml b/man/ostree.xml index 80b0b0c1..e31d58b2 100644 --- a/man/ostree.xml +++ b/man/ostree.xml @@ -433,8 +433,12 @@ Boston, MA 02111-1307, USA. in this directory. - In addition to the system repository, OSTree supports a - per-remote + In addition to the system repository, OSTree supports two + other paths. First, there is a + gpgkeypath option for remotes, which must + point to the filename of an ASCII-armored key. + + Second, there is support for a per-remote remotename.trustedkeys.gpg file stored in the toplevel of the repository (alongside objects/ and such). This is diff --git a/man/rofiles-fuse.1 b/man/rofiles-fuse.1 index fe6ec453..523b5380 100644 --- a/man/rofiles-fuse.1 +++ b/man/rofiles-fuse.1 @@ -2,7 +2,7 @@ .\" Title: rofiles-fuse .\" Author: Colin Walters .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 11/03/2016 +.\" Date: 11/23/2016 .\" Manual: rofiles-fuse .\" Source: rofiles-fuse .\" Language: English diff --git a/src/libostree/libostree.sym b/src/libostree/libostree.sym index fb7e5848..0540cba6 100644 --- a/src/libostree/libostree.sym +++ b/src/libostree/libostree.sym @@ -359,14 +359,28 @@ global: /* No new symbols in 2016.12 */ /* No new symbols in 2016.13 */ +LIBOSTREE_2016.14 { +global: + ostree_repo_verify_commit_for_remote; +} LIBOSTREE_2016.8; + /* NOTE NOTE NOTE * Versions above here are released. Only add symbols below this line. * NOTE NOTE NOTE */ -/* Remove comment when first new symbol is added, replace XX with new stable version. -LIBOSTREE_2016.XX +/* Remove comment when first new symbol is added +LIBOSTREE_2016.XX { global: someostree_symbol_deleteme; -} LIBOSTREE_2016.8; - * Remove comment when first new symbol is added */ +} LIBOSTREE_2016.14; +*/ + +/* Stub section for the stable release *after* this development one; don't + * edit this other than to update the last number. This is just a copy/paste + * source. +LIBOSTREE_2016.XX { +global: + someostree_symbol_deleteme; +} LIBOSTREE_2016.14; +*/ diff --git a/src/libostree/ostree-fetcher.c b/src/libostree/ostree-fetcher.c index 18794ce1..c9161d40 100644 --- a/src/libostree/ostree-fetcher.c +++ b/src/libostree/ostree-fetcher.c @@ -53,6 +53,7 @@ typedef struct { GLnxLockFile tmpdir_lock; int base_tmpdir_dfd; + GVariant *extra_headers; int max_outstanding; /* Queue for libsoup, see bgo#708591 */ @@ -127,11 +128,10 @@ G_DEFINE_TYPE (OstreeFetcher, _ostree_fetcher, G_TYPE_OBJECT) static ThreadClosure * thread_closure_ref (ThreadClosure *thread_closure) { + int refcount; g_return_val_if_fail (thread_closure != NULL, NULL); - g_return_val_if_fail (thread_closure->ref_count > 0, NULL); - - g_atomic_int_inc (&thread_closure->ref_count); - + refcount = g_atomic_int_add (&thread_closure->ref_count, 1); + g_assert (refcount > 0); return thread_closure; } @@ -139,7 +139,6 @@ static void thread_closure_unref (ThreadClosure *thread_closure) { g_return_if_fail (thread_closure != NULL); - g_return_if_fail (thread_closure->ref_count > 0); if (g_atomic_int_dec_and_test (&thread_closure->ref_count)) { @@ -148,6 +147,8 @@ thread_closure_unref (ThreadClosure *thread_closure) g_clear_pointer (&thread_closure->main_context, g_main_context_unref); + g_clear_pointer (&thread_closure->extra_headers, (GDestroyNotify)g_variant_unref); + if (thread_closure->tmpdir_dfd != -1) close (thread_closure->tmpdir_dfd); @@ -194,11 +195,10 @@ pending_task_compare (gconstpointer a, static OstreeFetcherPendingURI * pending_uri_ref (OstreeFetcherPendingURI *pending) { + gint refcount; g_return_val_if_fail (pending != NULL, NULL); - g_return_val_if_fail (pending->ref_count > 0, NULL); - - g_atomic_int_inc (&pending->ref_count); - + refcount = g_atomic_int_add (&pending->ref_count, 1); + g_assert (refcount > 0); return pending; } @@ -336,6 +336,16 @@ session_thread_set_cookie_jar_cb (ThreadClosure *thread_closure, SOUP_SESSION_FEATURE (jar)); } +static void +session_thread_set_headers_cb (ThreadClosure *thread_closure, + gpointer data) +{ + GVariant *headers = data; + + g_clear_pointer (&thread_closure->extra_headers, (GDestroyNotify)g_variant_unref); + thread_closure->extra_headers = g_variant_ref (headers); +} + #ifdef HAVE_LIBSOUP_CLIENT_CERTS static void session_thread_set_tls_interaction_cb (ThreadClosure *thread_closure, @@ -448,6 +458,17 @@ session_thread_request_uri (ThreadClosure *thread_closure, return; } + if (SOUP_IS_REQUEST_HTTP (pending->request) && thread_closure->extra_headers) + { + glnx_unref_object SoupMessage *msg = soup_request_http_get_message ((SoupRequestHTTP*) pending->request); + g_autoptr(GVariantIter) viter = g_variant_iter_new (thread_closure->extra_headers); + const char *key; + const char *value; + + while (g_variant_iter_next (viter, "(&s&s)", &key, &value)) + soup_message_headers_append (msg->request_headers, key, value); + } + if (pending->is_stream) { soup_request_send_async (pending->request, @@ -812,6 +833,16 @@ _ostree_fetcher_set_tls_database (OstreeFetcher *self, } } +void +_ostree_fetcher_set_extra_headers (OstreeFetcher *self, + GVariant *extra_headers) +{ + session_thread_idle_add (self->thread_closure, + session_thread_set_headers_cb, + g_variant_ref (extra_headers), + (GDestroyNotify) g_variant_unref); +} + static gboolean finish_stream (OstreeFetcherPendingURI *pending, GCancellable *cancellable, diff --git a/src/libostree/ostree-fetcher.h b/src/libostree/ostree-fetcher.h index ae20edaa..0bfba5b2 100644 --- a/src/libostree/ostree-fetcher.h +++ b/src/libostree/ostree-fetcher.h @@ -71,6 +71,9 @@ void _ostree_fetcher_set_client_cert (OstreeFetcher *fetcher, void _ostree_fetcher_set_tls_database (OstreeFetcher *self, GTlsDatabase *db); +void _ostree_fetcher_set_extra_headers (OstreeFetcher *self, + GVariant *extra_headers); + guint64 _ostree_fetcher_bytes_transferred (OstreeFetcher *self); void _ostree_fetcher_mirrored_request_with_partial_async (OstreeFetcher *self, diff --git a/src/libostree/ostree-gpg-verifier.c b/src/libostree/ostree-gpg-verifier.c index d487507f..eda05e9a 100644 --- a/src/libostree/ostree-gpg-verifier.c +++ b/src/libostree/ostree-gpg-verifier.c @@ -25,6 +25,7 @@ #include "libglnx.h" #include "ostree-gpg-verifier.h" +#include "ot-gpg-utils.h" #include "ostree-gpg-verify-result-private.h" #include "otutil.h" @@ -39,6 +40,7 @@ struct OstreeGpgVerifier { GObject parent; GList *keyrings; + GPtrArray *key_ascii_files; }; G_DEFINE_TYPE (OstreeGpgVerifier, _ostree_gpg_verifier, G_TYPE_OBJECT) @@ -49,6 +51,8 @@ ostree_gpg_verifier_finalize (GObject *object) OstreeGpgVerifier *self = OSTREE_GPG_VERIFIER (object); g_list_free_full (self->keyrings, g_object_unref); + if (self->key_ascii_files) + g_ptr_array_unref (self->key_ascii_files); G_OBJECT_CLASS (_ostree_gpg_verifier_parent_class)->finalize (object); } @@ -89,15 +93,15 @@ _ostree_gpg_verifier_check_signature (OstreeGpgVerifier *self, GCancellable *cancellable, GError **error) { - gpgme_ctx_t gpg_ctx = NULL; gpgme_error_t gpg_error = 0; - gpgme_data_t data_buffer = NULL; - gpgme_data_t signature_buffer = NULL; + ot_auto_gpgme_data gpgme_data_t data_buffer = NULL; + ot_auto_gpgme_data gpgme_data_t signature_buffer = NULL; g_autofree char *tmp_dir = NULL; g_autoptr(GOutputStream) target_stream = NULL; OstreeGpgVerifyResult *result = NULL; gboolean success = FALSE; GList *link; + int armor; /* GPGME has no API for using multiple keyrings (aka, gpg --keyring), * so we concatenate all the keyring files into one pubring.gpg in a @@ -149,6 +153,44 @@ _ostree_gpg_verifier_check_signature (OstreeGpgVerifier *self, if (!g_output_stream_close (target_stream, cancellable, error)) goto out; + /* Save the previous armor value - we need it on for importing ASCII keys */ + armor = gpgme_get_armor (result->context); + gpgme_set_armor (result->context, 1); + + /* Now, use the API to import ASCII-armored keys */ + if (self->key_ascii_files) + { + for (guint i = 0; i < self->key_ascii_files->len; i++) + { + const char *path = self->key_ascii_files->pdata[i]; + glnx_fd_close int fd = -1; + ot_auto_gpgme_data gpgme_data_t kdata = NULL; + + fd = openat (AT_FDCWD, path, O_RDONLY | O_CLOEXEC) ; + if (fd < 0) + { + glnx_set_prefix_error_from_errno (error, "Opening %s", path); + goto out; + } + + gpg_error = gpgme_data_new_from_fd (&kdata, fd); + if (gpg_error != GPG_ERR_NO_ERROR) + { + ot_gpgme_error_to_gio_error (gpg_error, error); + goto out; + } + + gpg_error = gpgme_op_import (result->context, kdata); + if (gpg_error != GPG_ERR_NO_ERROR) + { + ot_gpgme_error_to_gio_error (gpg_error, error); + goto out; + } + } + } + + gpgme_set_armor (result->context, armor); + /* Both the signed data and signature GBytes instances will outlive the * gpgme_data_t structs, so we can safely reuse the GBytes memory buffer * directly and avoid a copy. */ @@ -191,14 +233,6 @@ _ostree_gpg_verifier_check_signature (OstreeGpgVerifier *self, success = TRUE; out: - - if (gpg_ctx != NULL) - gpgme_release (gpg_ctx); - if (data_buffer != NULL) - gpgme_data_release (data_buffer); - if (signature_buffer != NULL) - gpgme_data_release (signature_buffer); - if (success) { /* Keep the temporary directory around for the life of the result @@ -233,6 +267,15 @@ _ostree_gpg_verifier_add_keyring (OstreeGpgVerifier *self, self->keyrings = g_list_append (self->keyrings, g_object_ref (path)); } +void +_ostree_gpg_verifier_add_key_ascii_file (OstreeGpgVerifier *self, + const char *path) +{ + if (!self->key_ascii_files) + self->key_ascii_files = g_ptr_array_new_with_free_func (g_free); + g_ptr_array_add (self->key_ascii_files, g_strdup (path)); +} + gboolean _ostree_gpg_verifier_add_keyring_dir (OstreeGpgVerifier *self, GFile *path, diff --git a/src/libostree/ostree-gpg-verifier.h b/src/libostree/ostree-gpg-verifier.h index 2db39f3b..4156d1bd 100644 --- a/src/libostree/ostree-gpg-verifier.h +++ b/src/libostree/ostree-gpg-verifier.h @@ -62,4 +62,7 @@ gboolean _ostree_gpg_verifier_add_global_keyring_dir (OstreeGpgVerifier *s void _ostree_gpg_verifier_add_keyring (OstreeGpgVerifier *self, GFile *path); +void _ostree_gpg_verifier_add_key_ascii_file (OstreeGpgVerifier *self, + const char *path); + G_END_DECLS diff --git a/src/libostree/ostree-metalink.c b/src/libostree/ostree-metalink.c index b850818d..ad3d5bf9 100644 --- a/src/libostree/ostree-metalink.c +++ b/src/libostree/ostree-metalink.c @@ -632,6 +632,9 @@ _ostree_metalink_request_sync (OstreeMetalink *self, if (mainctx) g_main_context_pop_thread_default (mainctx); g_clear_object (&request.metalink); + g_clear_pointer (&request.verification_sha256, g_free); + g_clear_pointer (&request.verification_sha512, g_free); + g_clear_pointer (&request.last_metalink_error, g_free); g_clear_pointer (&request.urls, g_ptr_array_unref); g_clear_pointer (&request.parser, g_markup_parse_context_free); return ret; diff --git a/src/libostree/ostree-repo-commit.c b/src/libostree/ostree-repo-commit.c index 7d78a19b..eb9733e8 100644 --- a/src/libostree/ostree-repo-commit.c +++ b/src/libostree/ostree-repo-commit.c @@ -2281,7 +2281,15 @@ get_modified_xattrs (OstreeRepo *self, } else if (!(modifier && (modifier->flags & OSTREE_REPO_COMMIT_MODIFIER_FLAGS_SKIP_XATTRS) > 0)) { - if (path) + if (path && OSTREE_IS_REPO_FILE (path)) + { + if (!ostree_repo_file_get_xattrs (OSTREE_REPO_FILE (path), + &ret_xattrs, + cancellable, + error)) + goto out; + } + else if (path) { if (!glnx_dfd_name_get_all_xattrs (AT_FDCWD, gs_file_get_path_cached (path), &ret_xattrs, cancellable, error)) @@ -2542,16 +2550,6 @@ write_directory_to_mtree_internal (OstreeRepo *self, ostree_mutable_tree_set_metadata_checksum (mtree, ostree_repo_file_tree_get_metadata_checksum (repo_dir)); - /* If the mtree was empty beforehand, the checksums on the mtree can simply - * become the checksums on the tree in the repo. Super simple. */ - if (g_hash_table_size (ostree_mutable_tree_get_files (mtree)) == 0 && - g_hash_table_size (ostree_mutable_tree_get_subdirs (mtree)) == 0) - { - ostree_mutable_tree_set_contents_checksum (mtree, ostree_repo_file_tree_get_contents_checksum (repo_dir)); - ret = TRUE; - goto out; - } - filter_result = OSTREE_REPO_COMMIT_FILTER_ALLOW; } else @@ -2961,7 +2959,8 @@ ostree_repo_commit_modifier_new (OstreeRepoCommitModifierFlags flags, OstreeRepoCommitModifier * ostree_repo_commit_modifier_ref (OstreeRepoCommitModifier *modifier) { - g_atomic_int_inc (&modifier->refcount); + gint refcount = g_atomic_int_add (&modifier->refcount, 1); + g_assert (refcount > 0); return modifier; } diff --git a/src/libostree/ostree-repo-libarchive.c b/src/libostree/ostree-repo-libarchive.c index 3a58d106..02a1180a 100644 --- a/src/libostree/ostree-repo-libarchive.c +++ b/src/libostree/ostree-repo-libarchive.c @@ -943,7 +943,10 @@ ostree_repo_write_archive_to_mtree (OstreeRepo *self, ret = TRUE; out: if (a) - (void)archive_read_close (a); + { + (void)archive_read_close (a); + (void)archive_read_free (a); + } return ret; #else g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, diff --git a/src/libostree/ostree-repo-pull.c b/src/libostree/ostree-repo-pull.c index 8facf8cb..9e960792 100644 --- a/src/libostree/ostree-repo-pull.c +++ b/src/libostree/ostree-repo-pull.c @@ -54,6 +54,8 @@ typedef struct { GCancellable *cancellable; OstreeAsyncProgress *progress; + GVariant *extra_headers; + gboolean dry_run; gboolean dry_run_emitted_progress; gboolean legacy_transaction_resuming; @@ -100,7 +102,6 @@ typedef struct { gboolean is_untrusted; GPtrArray *dirs; - gboolean commitpartial_exists; gboolean have_previous_bytes; guint64 previous_bytes_sec; @@ -1026,6 +1027,57 @@ static_deltapart_fetch_on_complete (GObject *object, fetch_static_delta_data_free (fetch_data); } +static gboolean +process_verify_result (OtPullData *pull_data, + const char *checksum, + OstreeGpgVerifyResult *result, + GError **error) +{ + if (result == NULL) + return FALSE; + + /* Allow callers to output the results immediately. */ + g_signal_emit_by_name (pull_data->repo, + "gpg-verify-result", + checksum, result); + + return ostree_gpg_verify_result_require_valid_signature (result, error); +} + +static gboolean +gpg_verify_unwritten_commit (OtPullData *pull_data, + const char *checksum, + GVariant *commit, + GVariant *detached_metadata, + GCancellable *cancellable, + GError **error) +{ + if (pull_data->gpg_verify) + { + glnx_unref_object OstreeGpgVerifyResult *result = NULL; + g_autoptr(GBytes) signed_data = g_variant_get_data_as_bytes (commit); + + if (!detached_metadata) + { + g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED, + "No detached metadata found for GPG verification"); + return FALSE; + } + + result = _ostree_repo_gpg_verify_with_metadata (pull_data->repo, + signed_data, + detached_metadata, + pull_data->remote_name, + NULL, NULL, + cancellable, + error); + if (!process_verify_result (pull_data, checksum, result, error)) + return FALSE; + } + + return TRUE; +} + static gboolean scan_commit_object (OtPullData *pull_data, const char *checksum, @@ -1034,11 +1086,17 @@ scan_commit_object (OtPullData *pull_data, GError **error) { gboolean ret = FALSE; + /* If we found a legacy transaction flag, assume we have to scan. + * We always do a scan of dirtree objects; see + * https://github.com/ostreedev/ostree/issues/543 + */ + OstreeRepoCommitState commitstate; g_autoptr(GVariant) commit = NULL; g_autoptr(GVariant) parent_csum = NULL; const guchar *parent_csum_bytes = NULL; gpointer depthp; gint depth; + gboolean is_partial; if (recursion_depth > OSTREE_MAX_RECURSION) { @@ -1063,30 +1121,22 @@ scan_commit_object (OtPullData *pull_data, { glnx_unref_object OstreeGpgVerifyResult *result = NULL; - result = _ostree_repo_verify_commit_internal (pull_data->repo, - checksum, - pull_data->remote_name, - NULL, - NULL, - cancellable, - error); - - if (result == NULL) + result = ostree_repo_verify_commit_for_remote (pull_data->repo, + checksum, + pull_data->remote_name, + cancellable, + error); + if (!process_verify_result (pull_data, checksum, result, error)) goto out; - - /* Allow callers to output the results immediately. */ - g_signal_emit_by_name (pull_data->repo, - "gpg-verify-result", - checksum, result); - - if (ostree_gpg_verify_result_count_valid (result) == 0) - { - g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, - "GPG signatures found, but none are in trusted keyring"); - goto out; - } } + if (!ostree_repo_load_commit (pull_data->repo, checksum, &commit, &commitstate, error)) + goto out; + + /* If we found a legacy transaction flag, assume all commits are partial */ + is_partial = pull_data->legacy_transaction_resuming + || (commitstate & OSTREE_REPO_COMMIT_STATE_PARTIAL) > 0; + if (!ostree_repo_load_variant (pull_data->repo, OSTREE_OBJECT_TYPE_COMMIT, checksum, &commit, error)) goto out; @@ -1135,7 +1185,11 @@ scan_commit_object (OtPullData *pull_data, } } - if (!pull_data->is_commit_only) + /* We only recurse to looking whether we need dirtree/dirmeta + * objects if the commit is partial, and we're not doing a + * commit-only fetch. + */ + if (is_partial && !pull_data->is_commit_only) { g_autoptr(GVariant) tree_contents_csum = NULL; g_autoptr(GVariant) tree_meta_csum = NULL; @@ -1249,8 +1303,11 @@ scan_one_metadata_object_c (OtPullData *pull_data, do_fetch_detached = (objtype == OSTREE_OBJECT_TYPE_COMMIT); enqueue_one_object_request (pull_data, tmp_checksum, objtype, path, do_fetch_detached, FALSE); } - else if (objtype == OSTREE_OBJECT_TYPE_COMMIT && pull_data->is_commit_only) + else if (is_stored && objtype == OSTREE_OBJECT_TYPE_COMMIT) { + /* For commits, always refetch detached metadata. */ + enqueue_one_object_request (pull_data, tmp_checksum, objtype, path, TRUE, TRUE); + if (!scan_commit_object (pull_data, tmp_checksum, recursion_depth, pull_data->cancellable, error)) goto out; @@ -1258,59 +1315,12 @@ scan_one_metadata_object_c (OtPullData *pull_data, g_hash_table_insert (pull_data->scanned_metadata, g_variant_ref (object), object); pull_data->n_scanned_metadata++; } - else if (is_stored) + else if (is_stored && objtype == OSTREE_OBJECT_TYPE_DIR_TREE) { - gboolean do_scan = pull_data->legacy_transaction_resuming || is_requested || pull_data->commitpartial_exists; + if (!scan_dirtree_object (pull_data, tmp_checksum, path, recursion_depth, + pull_data->cancellable, error)) + goto out; - /* For commits, always refetch detached metadata. */ - if (objtype == OSTREE_OBJECT_TYPE_COMMIT) - enqueue_one_object_request (pull_data, tmp_checksum, objtype, path, TRUE, TRUE); - - /* For commits, check whether we only had a partial fetch */ - if (!do_scan && objtype == OSTREE_OBJECT_TYPE_COMMIT) - { - OstreeRepoCommitState commitstate; - - if (!ostree_repo_load_commit (pull_data->repo, tmp_checksum, NULL, &commitstate, error)) - goto out; - - if (commitstate & OSTREE_REPO_COMMIT_STATE_PARTIAL) - { - do_scan = TRUE; - pull_data->commitpartial_exists = TRUE; - } - else if (pull_data->maxdepth != 0) - { - /* Not fully accurate, but the cost here of scanning all - * input commit objects if we're doing a depth fetch is - * pretty low. We'll do more accurate handling of depth - * when parsing the actual commit. - */ - do_scan = TRUE; - } - } - - if (do_scan) - { - switch (objtype) - { - case OSTREE_OBJECT_TYPE_COMMIT: - if (!scan_commit_object (pull_data, tmp_checksum, recursion_depth, - pull_data->cancellable, error)) - goto out; - break; - case OSTREE_OBJECT_TYPE_DIR_META: - break; - case OSTREE_OBJECT_TYPE_DIR_TREE: - if (!scan_dirtree_object (pull_data, tmp_checksum, path, recursion_depth, - pull_data->cancellable, error)) - goto out; - break; - default: - g_assert_not_reached (); - break; - } - } g_hash_table_insert (pull_data->scanned_metadata, g_variant_ref (object), object); pull_data->n_scanned_metadata++; } @@ -1595,7 +1605,6 @@ process_one_static_delta (OtPullData *pull_data, { g_autoptr(GVariant) to_csum_v = NULL; g_autofree char *to_checksum = NULL; - g_autoptr(GVariant) to_commit = NULL; gboolean have_to_commit; to_csum_v = g_variant_get_child_value (delta_superblock, 3); @@ -1610,10 +1619,16 @@ process_one_static_delta (OtPullData *pull_data, if (!have_to_commit) { FetchObjectData *fetch_data; + g_autoptr(GVariant) to_commit = g_variant_get_child_value (delta_superblock, 4); g_autofree char *detached_path = _ostree_get_relative_static_delta_path (from_revision, to_revision, "commitmeta"); g_autoptr(GVariant) detached_data = NULL; detached_data = g_variant_lookup_value (metadata, detached_path, G_VARIANT_TYPE("a{sv}")); + + if (!gpg_verify_unwritten_commit (pull_data, to_revision, to_commit, detached_data, + cancellable, error)) + goto out; + if (detached_data && !ostree_repo_write_commit_detached_metadata (pull_data->repo, to_revision, detached_data, @@ -1627,8 +1642,6 @@ process_one_static_delta (OtPullData *pull_data, fetch_data->is_detached_meta = FALSE; fetch_data->object_is_stored = FALSE; - to_commit = g_variant_get_child_value (delta_superblock, 4); - ostree_repo_write_metadata_async (pull_data->repo, OSTREE_OBJECT_TYPE_COMMIT, to_checksum, to_commit, pull_data->cancellable, @@ -1969,7 +1982,7 @@ _ostree_repo_remote_new_fetcher (OstreeRepo *self, g_autofree char *cookie_file = g_strdup_printf ("%s.cookies.txt", remote_name); - jar_path = g_build_filename (g_file_get_path (self->repodir), cookie_file, + jar_path = g_build_filename (gs_file_get_path_cached (self->repodir), cookie_file, NULL); if (g_file_test(jar_path, G_FILE_TEST_IS_REGULAR)) @@ -2048,7 +2061,7 @@ fetch_mirrorlist (OstreeFetcher *fetcher, GError **error) { gboolean ret = FALSE; - char **lines = NULL; + g_auto(GStrv) lines = NULL; g_autofree char *contents = NULL; SoupURI *mirrorlist = NULL; g_autoptr(GPtrArray) ret_mirrorlist = @@ -2276,6 +2289,23 @@ repo_remote_fetch_summary (OstreeRepo *self, return ret; } +/* Create the fetcher by unioning options from the remote config, plus + * any options specific to this pull (such as extra headers). + */ +static gboolean +reinitialize_fetcher (OtPullData *pull_data, const char *remote_name, GError **error) +{ + g_clear_object (&pull_data->fetcher); + pull_data->fetcher = _ostree_repo_remote_new_fetcher (pull_data->repo, remote_name, error); + if (pull_data->fetcher == NULL) + return FALSE; + + if (pull_data->extra_headers) + _ostree_fetcher_set_extra_headers (pull_data->fetcher, pull_data->extra_headers); + + return TRUE; +} + /* ------------------------------------------------------------------------------------------ * Below is the libsoup-invariant API; these should match * the stub functions in the #else clause @@ -2308,6 +2338,7 @@ repo_remote_fetch_summary (OstreeRepo *self, * * dry-run (b): Only print information on what will be downloaded (requires static deltas) * * override-url (s): Fetch objects from this URL if remote specifies no metalink in options * * inherit-transaction (b): Don't initiate, finish or abort a transaction, usefult to do mutliple pulls in one transaction. + * * http-headers (a(ss)): Additional headers to add to all HTTP requests */ gboolean ostree_repo_pull_with_options (OstreeRepo *self, @@ -2336,7 +2367,7 @@ ostree_repo_pull_with_options (OstreeRepo *self, const char *dir_to_pull = NULL; g_autofree char **dirs_to_pull = NULL; g_autofree char **refs_to_fetch = NULL; - char **override_commit_ids = NULL; + g_autofree char **override_commit_ids = NULL; GSource *update_timeout = NULL; gboolean disable_static_deltas = FALSE; gboolean require_static_deltas = FALSE; @@ -2368,6 +2399,7 @@ ostree_repo_pull_with_options (OstreeRepo *self, (void) g_variant_lookup (options, "dry-run", "b", &pull_data->dry_run); (void) g_variant_lookup (options, "override-url", "&s", &url_override); (void) g_variant_lookup (options, "inherit-transaction", "b", &inherit_transaction); + (void) g_variant_lookup (options, "http-headers", "@a(ss)", &pull_data->extra_headers); } g_return_val_if_fail (pull_data->maxdepth >= -1, FALSE); @@ -2467,8 +2499,7 @@ ostree_repo_pull_with_options (OstreeRepo *self, pull_data->phase = OSTREE_PULL_PHASE_FETCHING_REFS; - pull_data->fetcher = _ostree_repo_remote_new_fetcher (self, remote_name_or_baseurl, error); - if (pull_data->fetcher == NULL) + if (!reinitialize_fetcher (pull_data, remote_name_or_baseurl, error)) goto out; pull_data->tmpdir_dfd = pull_data->repo->tmp_dir_fd; @@ -2745,15 +2776,8 @@ ostree_repo_pull_with_options (OstreeRepo *self, NULL, cancellable, error); - if (result == NULL) + if (!ostree_gpg_verify_result_require_valid_signature (result, error)) goto out; - - if (ostree_gpg_verify_result_count_valid (result) == 0) - { - g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, - "GPG signatures found, but none are in trusted keyring"); - goto out; - } } if (pull_data->summary) @@ -2906,9 +2930,7 @@ ostree_repo_pull_with_options (OstreeRepo *self, /* Now discard the previous fetcher, as it was bound to a temporary main context * for synchronous requests. */ - g_clear_object (&pull_data->fetcher); - pull_data->fetcher = _ostree_repo_remote_new_fetcher (self, remote_name_or_baseurl, error); - if (pull_data->fetcher == NULL) + if (!reinitialize_fetcher (pull_data, remote_name_or_baseurl, error)) goto out; pull_data->legacy_transaction_resuming = FALSE; @@ -3120,6 +3142,7 @@ ostree_repo_pull_with_options (OstreeRepo *self, g_source_destroy (update_timeout); g_strfreev (configured_branches); g_clear_object (&pull_data->fetcher); + g_clear_pointer (&pull_data->extra_headers, (GDestroyNotify)g_variant_unref); g_clear_object (&pull_data->cancellable); g_clear_object (&pull_data->remote_repo_local); g_free (pull_data->remote_name); diff --git a/src/libostree/ostree-repo-static-delta-compilation-analysis.c b/src/libostree/ostree-repo-static-delta-compilation-analysis.c index c1990591..2b9b006f 100644 --- a/src/libostree/ostree-repo-static-delta-compilation-analysis.c +++ b/src/libostree/ostree-repo-static-delta-compilation-analysis.c @@ -243,7 +243,7 @@ _ostree_delta_compute_similar_objects (OstreeRepo *repo, { gboolean ret = FALSE; g_autoptr(GHashTable) ret_modified_regfile_content = - g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify)g_ptr_array_unref); + g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free); g_autoptr(GPtrArray) from_sizes = NULL; g_autoptr(GPtrArray) to_sizes = NULL; guint i, j; diff --git a/src/libostree/ostree-repo-static-delta-compilation.c b/src/libostree/ostree-repo-static-delta-compilation.c index 286c74e1..4b0bc507 100644 --- a/src/libostree/ostree-repo-static-delta-compilation.c +++ b/src/libostree/ostree-repo-static-delta-compilation.c @@ -157,6 +157,9 @@ xattr_chunk_equals (const void *one, const void *two) if (l1 != l2) return FALSE; + if (l1 == 0) + return l2 == 0; + return memcmp (g_variant_get_data (v1), g_variant_get_data (v2), l1) == 0; } diff --git a/src/libostree/ostree-repo-static-delta-core.c b/src/libostree/ostree-repo-static-delta-core.c index 0b0d7067..133ab016 100644 --- a/src/libostree/ostree-repo-static-delta-core.c +++ b/src/libostree/ostree-repo-static-delta-core.c @@ -880,7 +880,9 @@ _ostree_repo_static_delta_dump (OstreeRepo *self, OT_VARIANT_MAP_TRUSTED, &delta_superblock, error)) goto out; - g_print ("%s\n", g_variant_print (delta_superblock, 1)); + { g_autofree char *variant_string = g_variant_print (delta_superblock, 1); + g_print ("%s\n", variant_string); + } g_print ("Delta: %s\n", delta_id); { const char *endianness_description; diff --git a/src/libostree/ostree-repo-static-delta-processing.c b/src/libostree/ostree-repo-static-delta-processing.c index 95f9ddba..eabe3925 100644 --- a/src/libostree/ostree-repo-static-delta-processing.c +++ b/src/libostree/ostree-repo-static-delta-processing.c @@ -842,7 +842,7 @@ dispatch_set_read_source (OstreeRepo *repo, gboolean ret = FALSE; guint64 source_offset; - if (state->read_source_fd) + if (state->read_source_fd != -1) { (void) close (state->read_source_fd); state->read_source_fd = -1; @@ -887,7 +887,7 @@ dispatch_unset_read_source (OstreeRepo *repo, goto out; } - if (state->read_source_fd) + if (state->read_source_fd != -1) { (void) close (state->read_source_fd); state->read_source_fd = -1; diff --git a/src/libostree/ostree-repo.c b/src/libostree/ostree-repo.c index ad629421..8aa76dac 100644 --- a/src/libostree/ostree-repo.c +++ b/src/libostree/ostree-repo.c @@ -161,11 +161,10 @@ ost_remote_new_from_keyfile (GKeyFile *keyfile, static OstreeRemote * ost_remote_ref (OstreeRemote *remote) { + gint refcount; g_return_val_if_fail (remote != NULL, NULL); - g_return_val_if_fail (remote->ref_count > 0, NULL); - - g_atomic_int_inc (&remote->ref_count); - + refcount = g_atomic_int_add (&remote->ref_count, 1); + g_assert (refcount > 0); return remote; } @@ -1440,9 +1439,9 @@ ostree_repo_remote_gpg_import (OstreeRepo *self, GError **error) { OstreeRemote *remote; - gpgme_ctx_t source_context = NULL; - gpgme_ctx_t target_context = NULL; - gpgme_data_t data_buffer = NULL; + ot_auto_gpgme_ctx gpgme_ctx_t source_context = NULL; + ot_auto_gpgme_ctx gpgme_ctx_t target_context = NULL; + ot_auto_gpgme_data gpgme_data_t data_buffer = NULL; gpgme_import_result_t import_result; gpgme_import_status_t import_status; const char *tmp_dir = NULL; @@ -1479,13 +1478,9 @@ ostree_repo_remote_gpg_import (OstreeRepo *self, * the keys to a new pubring.gpg file. If the key data format is ASCII * armored, this step will convert them to binary. */ - gpg_error = gpgme_new (&source_context); - if (gpg_error != GPG_ERR_NO_ERROR) - { - ot_gpgme_error_to_gio_error (gpg_error, error); - g_prefix_error (error, "Unable to create context: "); - goto out; - } + source_context = ot_gpgme_new_ctx (NULL, error); + if (!source_context) + goto out; if (source_stream != NULL) { @@ -1569,13 +1564,9 @@ ostree_repo_remote_gpg_import (OstreeRepo *self, * of the remote's keyring file. We'll let the import operation alter * the pubring.gpg file, then rename it back to its permanent home. */ - gpg_error = gpgme_new (&target_context); - if (gpg_error != GPG_ERR_NO_ERROR) - { - ot_gpgme_error_to_gio_error (gpg_error, error); - g_prefix_error (error, "Unable to create context: "); - goto out; - } + target_context = ot_gpgme_new_ctx (NULL, error); + if (!target_context) + goto out; /* No need for an output stream since we copy in a pubring.gpg. */ if (!ot_gpgme_ctx_tmp_home_dir (target_context, tmp_dir, &target_tmp_dir, @@ -1700,15 +1691,6 @@ out: if (target_tmp_dir != NULL) (void) glnx_shutil_rm_rf_at (AT_FDCWD, target_tmp_dir, NULL, NULL); - if (source_context != NULL) - gpgme_release (source_context); - - if (target_context != NULL) - gpgme_release (target_context); - - if (data_buffer != NULL) - gpgme_data_release (data_buffer); - g_prefix_error (error, "GPG: "); return ret; @@ -3989,7 +3971,6 @@ sign_data (OstreeRepo *self, g_autoptr(GOutputStream) tmp_signature_output = NULL; gpgme_ctx_t context = NULL; g_autoptr(GBytes) ret_signature = NULL; - gpgme_engine_info_t info; gpgme_error_t err; gpgme_key_t key = NULL; gpgme_data_t commit_buffer = NULL; @@ -4001,34 +3982,9 @@ sign_data (OstreeRepo *self, goto out; tmp_signature_output = g_unix_output_stream_new (tmp_fd, FALSE); - if ((err = gpgme_new (&context)) != GPG_ERR_NO_ERROR) - { - ot_gpgme_error_to_gio_error (err, error); - g_prefix_error (error, "Unable to create gpg context: "); - goto out; - } - - info = gpgme_ctx_get_engine_info (context); - - if ((err = gpgme_set_protocol (context, GPGME_PROTOCOL_OpenPGP)) != - GPG_ERR_NO_ERROR) - { - ot_gpgme_error_to_gio_error (err, error); - g_prefix_error (error, "Unable to set gpg protocol: "); - goto out; - } - - if (homedir != NULL) - { - if ((err = gpgme_ctx_set_engine_info (context, info->protocol, NULL, homedir)) - != GPG_ERR_NO_ERROR) - { - ot_gpgme_error_to_gio_error (err, error); - g_prefix_error (error, "Unable to set gpg homedir to '%s': ", - homedir); - goto out; - } - } + context = ot_gpgme_new_ctx (homedir, error); + if (!context) + goto out; /* Get the secret keys with the given key id */ err = gpgme_get_key (context, key_id, &key, 1); @@ -4045,7 +4001,7 @@ sign_data (OstreeRepo *self, g_prefix_error (error, "Unable to lookup key ID %s: ", key_id); goto out; } - + /* Add the key to the context as a signer */ if ((err = gpgme_signers_add (context, key)) != GPG_ERR_NO_ERROR) { @@ -4325,6 +4281,7 @@ _ostree_repo_gpg_verify_data_internal (OstreeRepo *self, } else if (remote_name != NULL) { + g_autofree char *gpgkeypath = NULL; /* Add the remote's keyring file if it exists. */ OstreeRemote *remote; @@ -4342,6 +4299,13 @@ _ostree_repo_gpg_verify_data_internal (OstreeRepo *self, add_global_keyring_dir = FALSE; } + if (!ot_keyfile_get_value_with_default (remote->options, remote->group, "gpgkeypath", NULL, + &gpgkeypath, error)) + return NULL; + + if (gpgkeypath) + _ostree_gpg_verifier_add_key_ascii_file (verifier, gpgkeypath); + ost_remote_unref (remote); } @@ -4544,6 +4508,36 @@ ostree_repo_verify_commit_ext (OstreeRepo *self, error); } +/** + * ostree_repo_verify_commit_for_remote: + * @self: Repository + * @commit_checksum: ASCII SHA256 checksum + * @remote_name: OSTree remote to use for configuration + * @cancellable: Cancellable + * @error: Error + * + * 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. + * + * Returns: (transfer full): an #OstreeGpgVerifyResult, or %NULL on error + */ +OstreeGpgVerifyResult * +ostree_repo_verify_commit_for_remote (OstreeRepo *self, + const gchar *commit_checksum, + const gchar *remote_name, + GCancellable *cancellable, + GError **error) +{ + return _ostree_repo_verify_commit_internal (self, + commit_checksum, + remote_name, + NULL, + NULL, + cancellable, + error); +} + /** * ostree_repo_gpg_verify_data: * @self: Repository @@ -4875,7 +4869,7 @@ _ostree_repo_allocate_tmpdir (int tmpdir_dfd, /* We put the lock outside the dir, so we can hold the lock * until the directory is fully removed */ - if (!_ostree_repo_try_lock_tmpdir (dfd_iter.fd, dent->d_name, + if (!_ostree_repo_try_lock_tmpdir (tmpdir_dfd, dent->d_name, file_lock_out, &did_lock, error)) goto out; diff --git a/src/libostree/ostree-repo.h b/src/libostree/ostree-repo.h index f1f9da41..d5303e41 100644 --- a/src/libostree/ostree-repo.h +++ b/src/libostree/ostree-repo.h @@ -1064,6 +1064,14 @@ OstreeGpgVerifyResult * ostree_repo_verify_commit_ext (OstreeRepo *self, GCancellable *cancellable, GError **error); +_OSTREE_PUBLIC +OstreeGpgVerifyResult * +ostree_repo_verify_commit_for_remote (OstreeRepo *self, + const gchar *commit_checksum, + const gchar *remote_name, + GCancellable *cancellable, + GError **error); + _OSTREE_PUBLIC OstreeGpgVerifyResult * ostree_repo_gpg_verify_data (OstreeRepo *self, const gchar *remote_name, diff --git a/src/libostree/ostree-sepolicy.c b/src/libostree/ostree-sepolicy.c index 8e49428f..fa264704 100644 --- a/src/libostree/ostree-sepolicy.c +++ b/src/libostree/ostree-sepolicy.c @@ -258,7 +258,7 @@ initable_init (GInitable *initable, g_autoptr(GFileInputStream) filein = NULL; g_autoptr(GDataInputStream) datain = NULL; gboolean enabled = FALSE; - char *policytype = NULL; + g_autofree char *policytype = NULL; const char *selinux_prefix = "SELINUX="; const char *selinuxtype_prefix = "SELINUXTYPE="; @@ -352,7 +352,7 @@ initable_init (GInitable *initable, goto out; } - self->selinux_policy_name = g_strdup (policytype); + self->selinux_policy_name = g_steal_pointer (&policytype); self->selinux_policy_root = g_object_ref (etc_selinux_dir); } diff --git a/src/libostree/ostree-sysroot-cleanup.c b/src/libostree/ostree-sysroot-cleanup.c index 862d8154..2a78d2ce 100644 --- a/src/libostree/ostree-sysroot-cleanup.c +++ b/src/libostree/ostree-sysroot-cleanup.c @@ -491,7 +491,7 @@ prune_repo (OstreeRepo *repo, if (freed_space > 0) { - char *freed_space_str = g_format_size_full (freed_space, 0); + g_autofree char *freed_space_str = g_format_size_full (freed_space, 0); g_print ("Freed objects: %s\n", freed_space_str); } diff --git a/src/libostree/ostree-sysroot-upgrader.c b/src/libostree/ostree-sysroot-upgrader.c index b0061c87..447bd82b 100644 --- a/src/libostree/ostree-sysroot-upgrader.c +++ b/src/libostree/ostree-sysroot-upgrader.c @@ -105,6 +105,7 @@ parse_refspec (OstreeSysrootUpgrader *self, csum = g_key_file_get_string (self->origin, "origin", "override-commit", NULL); if (csum != NULL && !ostree_validate_checksum_string (csum, error)) goto out; + g_clear_pointer (&self->override_csum, g_free); self->override_csum = g_steal_pointer (&csum); ret = TRUE; diff --git a/src/libotutil/ot-gpg-utils.c b/src/libotutil/ot-gpg-utils.c index 9042d88b..b71f4845 100644 --- a/src/libotutil/ot-gpg-utils.c +++ b/src/libotutil/ot-gpg-utils.c @@ -411,3 +411,36 @@ ot_gpgme_data_output (GOutputStream *output_stream) return data; } + +gpgme_ctx_t +ot_gpgme_new_ctx (const char *homedir, + GError **error) +{ + gpgme_error_t err; + ot_auto_gpgme_ctx gpgme_ctx_t context = NULL; + + if ((err = gpgme_new (&context)) != GPG_ERR_NO_ERROR) + { + ot_gpgme_error_to_gio_error (err, error); + g_prefix_error (error, "Unable to create gpg context: "); + return NULL; + } + + if (homedir != NULL) + { + gpgme_engine_info_t info; + + info = gpgme_ctx_get_engine_info (context); + + if ((err = gpgme_ctx_set_engine_info (context, info->protocol, NULL, homedir)) + != GPG_ERR_NO_ERROR) + { + ot_gpgme_error_to_gio_error (err, error); + g_prefix_error (error, "Unable to set gpg homedir to '%s': ", + homedir); + return NULL; + } + } + + return g_steal_pointer (&context); +} diff --git a/src/libotutil/ot-gpg-utils.h b/src/libotutil/ot-gpg-utils.h index edb249f4..c2337f7b 100644 --- a/src/libotutil/ot-gpg-utils.h +++ b/src/libotutil/ot-gpg-utils.h @@ -22,9 +22,15 @@ #include #include +#include "libglnx.h" G_BEGIN_DECLS +GLNX_DEFINE_CLEANUP_FUNCTION0(gpgme_data_t, ot_cleanup_gpgme_data, gpgme_data_release) +#define ot_auto_gpgme_data __attribute__((cleanup(ot_cleanup_gpgme_data))) +GLNX_DEFINE_CLEANUP_FUNCTION0(gpgme_ctx_t, ot_cleanup_gpgme_ctx, gpgme_release) +#define ot_auto_gpgme_ctx __attribute__((cleanup(ot_cleanup_gpgme_ctx))) + void ot_gpgme_error_to_gio_error (gpgme_error_t gpg_error, GError **error); gboolean ot_gpgme_ctx_tmp_home_dir (gpgme_ctx_t gpgme_ctx, @@ -37,4 +43,7 @@ gboolean ot_gpgme_ctx_tmp_home_dir (gpgme_ctx_t gpgme_ctx, gpgme_data_t ot_gpgme_data_input (GInputStream *input_stream); gpgme_data_t ot_gpgme_data_output (GOutputStream *output_stream); +gpgme_ctx_t ot_gpgme_new_ctx (const char *homedir, + GError **error); + G_END_DECLS diff --git a/src/ostree/ot-builtin-export.c b/src/ostree/ot-builtin-export.c index 5b84d1ab..db4dbc31 100644 --- a/src/ostree/ot-builtin-export.c +++ b/src/ostree/ot-builtin-export.c @@ -67,7 +67,7 @@ ostree_builtin_export (int argc, char **argv, GCancellable *cancellable, GError g_autoptr(GFile) subtree = NULL; g_autofree char *commit = NULL; g_autoptr(GVariant) commit_data = NULL; - struct archive *a; + struct archive *a = NULL; OstreeRepoExportArchiveOptions opts = { 0, }; context = g_option_context_new ("COMMIT - Stream COMMIT to stdout in tar format"); @@ -154,6 +154,10 @@ ostree_builtin_export (int argc, char **argv, GCancellable *cancellable, GError ret = TRUE; out: +#ifdef HAVE_LIBARCHIVE + if (a) + archive_write_free (a); +#endif if (context) g_option_context_free (context); return ret; diff --git a/src/ostree/ot-builtin-fsck.c b/src/ostree/ot-builtin-fsck.c index 5afa435f..9809ad29 100644 --- a/src/ostree/ot-builtin-fsck.c +++ b/src/ostree/ot-builtin-fsck.c @@ -287,7 +287,7 @@ ostree_builtin_fsck (int argc, char **argv, GCancellable *cancellable, GError ** if (opt_add_tombstones) { GError *local_error = NULL; - const char *parent = ostree_commit_get_parent (commit); + g_autofree char *parent = ostree_commit_get_parent (commit); if (parent) { g_autoptr(GVariant) parent_commit = NULL; diff --git a/src/ostree/ot-builtin-pull.c b/src/ostree/ot-builtin-pull.c index 7981f18a..8fa51002 100644 --- a/src/ostree/ot-builtin-pull.c +++ b/src/ostree/ot-builtin-pull.c @@ -35,6 +35,7 @@ static gboolean opt_disable_static_deltas; static gboolean opt_require_static_deltas; static gboolean opt_untrusted; static char** opt_subpaths; +static char** opt_http_headers; static char* opt_cache_dir; static int opt_depth = 0; static char* opt_url; @@ -51,6 +52,7 @@ static GOptionEntry options[] = { { "dry-run", 0, 0, G_OPTION_ARG_NONE, &opt_dry_run, "Only print information on what will be downloaded (requires static deltas)", NULL }, { "depth", 0, 0, G_OPTION_ARG_INT, &opt_depth, "Traverse DEPTH parents (-1=infinite) (default: 0)", "DEPTH" }, { "url", 0, 0, G_OPTION_ARG_STRING, &opt_url, "Pull objects from this URL instead of the one from the remote config", NULL }, + { "http-header", 0, 0, G_OPTION_ARG_STRING_ARRAY, &opt_http_headers, "Add NAME=VALUE as HTTP header to all requests", "NAME=VALUE" }, { NULL } }; @@ -249,6 +251,29 @@ ostree_builtin_pull (int argc, char **argv, GCancellable *cancellable, GError ** g_variant_builder_add (&builder, "{s@v}", "override-commit-ids", g_variant_new_variant (g_variant_new_strv ((const char*const*)override_commit_ids->pdata, override_commit_ids->len))); + if (opt_http_headers) + { + GVariantBuilder hdr_builder; + g_variant_builder_init (&hdr_builder, G_VARIANT_TYPE ("a(ss)")); + + for (char **iter = opt_http_headers; iter && *iter; iter++) + { + const char *kv = *iter; + const char *eq = strchr (kv, '='); + g_autofree char *key = NULL; + if (!eq) + { + g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, + "Missing '=' in --http-header"); + goto out; + } + key = g_strndup (kv, eq - kv); + g_variant_builder_add (&hdr_builder, "(ss)", key, eq + 1); + } + g_variant_builder_add (&builder, "{s@v}", "http-headers", + g_variant_new_variant (g_variant_builder_end (&hdr_builder))); + } + if (!opt_dry_run) { if (console.is_tty) diff --git a/src/ostree/ot-builtin-show.c b/src/ostree/ot-builtin-show.c index ef541c2a..a9c1fbbc 100644 --- a/src/ostree/ot-builtin-show.c +++ b/src/ostree/ot-builtin-show.c @@ -34,6 +34,7 @@ static char* opt_print_metadata_key; static char* opt_print_detached_metadata_key; static gboolean opt_raw; static char *opt_gpg_homedir; +static char *opt_gpg_verify_remote; static GOptionEntry options[] = { { "print-related", 0, 0, G_OPTION_ARG_NONE, &opt_print_related, "Show the \"related\" commits", NULL }, @@ -42,6 +43,7 @@ static GOptionEntry options[] = { { "print-detached-metadata-key", 0, 0, G_OPTION_ARG_STRING, &opt_print_detached_metadata_key, "Print string value of detached metadata key", "KEY" }, { "raw", 0, 0, G_OPTION_ARG_NONE, &opt_raw, "Show raw variant data" }, { "gpg-homedir", 0, 0, G_OPTION_ARG_STRING, &opt_gpg_homedir, "GPG Homedir to use when looking for keyrings", "HOMEDIR"}, + { "gpg-verify-remote", 0, 0, G_OPTION_ARG_STRING, &opt_gpg_verify_remote, "Use REMOTE name for GPG configuration", "REMOTE"}, { NULL } }; @@ -170,9 +172,17 @@ print_object (OstreeRepo *repo, GError *local_error = NULL; g_autoptr(GFile) gpg_homedir = opt_gpg_homedir ? g_file_new_for_path (opt_gpg_homedir) : NULL; - result = ostree_repo_verify_commit_ext (repo, checksum, - gpg_homedir, NULL, NULL, - &local_error); + if (opt_gpg_verify_remote) + { + result = ostree_repo_verify_commit_for_remote (repo, checksum, opt_gpg_verify_remote, + NULL, &local_error); + } + else + { + result = ostree_repo_verify_commit_ext (repo, checksum, + gpg_homedir, NULL, NULL, + &local_error); + } if (g_error_matches (local_error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND)) { diff --git a/src/ostree/ot-builtin-trivial-httpd.c b/src/ostree/ot-builtin-trivial-httpd.c index 6e6415dd..0a553858 100644 --- a/src/ostree/ot-builtin-trivial-httpd.c +++ b/src/ostree/ot-builtin-trivial-httpd.c @@ -43,8 +43,8 @@ static int opt_random_500s_percentage; * cases involving repeated random 500s. */ static int opt_random_500s_max = 100; static gint opt_port = 0; - static gchar **opt_expected_cookies; +static gchar **opt_expected_headers; static guint emitted_random_500s_count = 0; @@ -64,6 +64,7 @@ static GOptionEntry options[] = { { "random-500s-max", 0, 0, G_OPTION_ARG_INT, &opt_random_500s_max, "Limit HTTP 500 errors to MAX (default 100)", "MAX" }, { "log-file", 0, 0, G_OPTION_ARG_FILENAME, &opt_log, "Put logs here", "PATH" }, { "expected-cookies", 0, 0, G_OPTION_ARG_STRING_ARRAY, &opt_expected_cookies, "Expect given cookies in the http request", "KEY=VALUE" }, + { "expected-header", 0, 0, G_OPTION_ARG_STRING_ARRAY, &opt_expected_headers, "Expect given headers in the http request", "KEY=VALUE" }, { NULL } }; @@ -238,6 +239,36 @@ do_get (OtTrivialHttpd *self, soup_cookies_free (cookies); } + if (opt_expected_headers) + { + for (int i = 0 ; opt_expected_headers[i] != NULL; i++) + { + const gchar *kv = opt_expected_headers[i]; + const gchar *eq = strchr (kv, '='); + + g_assert (eq); + + { + g_autofree char *k = g_strndup (kv, eq - kv); + const gchar *expected_v = eq + 1; + const gchar *found_v = soup_message_headers_get_one (msg->request_headers, k); + + if (!found_v) + { + httpd_log (self, "Expected header not found %s\n", k); + soup_message_set_status (msg, SOUP_STATUS_FORBIDDEN); + goto out; + } + if (strcmp (found_v, expected_v) != 0) + { + httpd_log (self, "Expected header %s: %s but found %s\n", k, expected_v, found_v); + soup_message_set_status (msg, SOUP_STATUS_FORBIDDEN); + goto out; + } + } + } + } + if (strstr (path, "../") != NULL) { soup_message_set_status (msg, SOUP_STATUS_FORBIDDEN); diff --git a/src/ostree/ot-main.c b/src/ostree/ot-main.c index 5080e8c6..0d0587f2 100644 --- a/src/ostree/ot-main.c +++ b/src/ostree/ot-main.c @@ -125,7 +125,6 @@ ostree_run (int argc, GError *error = NULL; GCancellable *cancellable = NULL; const char *command_name = NULL; - g_autofree char *prgname = NULL; gboolean success = FALSE; int in, out; @@ -202,10 +201,6 @@ ostree_run (int argc, goto out; } - prgname = g_strdup_printf ("%s %s", g_get_prgname (), command_name); - g_set_prgname (prgname); - - if (!command->fn (argc, argv, cancellable, &error)) goto out; diff --git a/src/ostree/ot-remote-builtin-add-cookie.c b/src/ostree/ot-remote-builtin-add-cookie.c index 439e7503..f1657bb8 100644 --- a/src/ostree/ot-remote-builtin-add-cookie.c +++ b/src/ostree/ot-remote-builtin-add-cookie.c @@ -68,7 +68,7 @@ ot_remote_builtin_add_cookie (int argc, char **argv, GCancellable *cancellable, value = argv[5]; cookie_file = g_strdup_printf ("%s.cookies.txt", remote_name); - jar_path = g_build_filename (g_file_get_path (repo->repodir), cookie_file, NULL); + jar_path = g_build_filename (gs_file_get_path_cached (repo->repodir), cookie_file, NULL); jar = soup_cookie_jar_text_new (jar_path, FALSE); @@ -80,5 +80,7 @@ ot_remote_builtin_add_cookie (int argc, char **argv, GCancellable *cancellable, /* jar takes ownership of cookie */ soup_cookie_jar_add_cookie (jar, cookie); + if (context) + g_option_context_free (context); return TRUE; } diff --git a/src/ostree/ot-remote-builtin-delete-cookie.c b/src/ostree/ot-remote-builtin-delete-cookie.c index 9f05a564..df65b277 100644 --- a/src/ostree/ot-remote-builtin-delete-cookie.c +++ b/src/ostree/ot-remote-builtin-delete-cookie.c @@ -67,7 +67,7 @@ ot_remote_builtin_delete_cookie (int argc, char **argv, GCancellable *cancellabl cookie_name = argv[4]; cookie_file = g_strdup_printf ("%s.cookies.txt", remote_name); - jar_path = g_build_filename (g_file_get_path (repo->repodir), cookie_file, NULL); + jar_path = g_build_filename (gs_file_get_path_cached (repo->repodir), cookie_file, NULL); jar = soup_cookie_jar_text_new (jar_path, FALSE); cookies = soup_cookie_jar_all_cookies (jar); @@ -92,5 +92,7 @@ ot_remote_builtin_delete_cookie (int argc, char **argv, GCancellable *cancellabl if (!found) g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED, "Cookie not found in jar"); + if (context) + g_option_context_free (context); return found; } diff --git a/tests/basic-test.sh b/tests/basic-test.sh index 9db56e77..bb387501 100755 --- a/tests/basic-test.sh +++ b/tests/basic-test.sh @@ -19,7 +19,7 @@ set -euo pipefail -echo "1..58" +echo "1..60" $OSTREE checkout test2 checkout-test2 echo "ok checkout" @@ -178,6 +178,9 @@ echo "ok user checkout" $OSTREE commit -b test2 -s "Another commit" --tree=ref=test2 echo "ok commit from ref" +$OSTREE commit -b test2 -s "Another commit with modifier" --tree=ref=test2 --owner-uid=`id -u` +echo "ok commit from ref with modifier" + $OSTREE commit -b trees/test2 -s 'ref with / in it' --tree=ref=test2 echo "ok commit ref with /" @@ -191,6 +194,20 @@ cd ${test_tmpdir}/checkout-test2-4 $OSTREE commit -b test2 -s "no xattrs" --no-xattrs echo "ok commit with no xattrs" +mkdir tree-A tree-B +touch tree-A/file-a tree-B/file-b + +$OSTREE commit -b test3-1 -s "Initial tree" --tree=dir=tree-A +$OSTREE commit -b test3-2 -s "Replacement tree" --tree=dir=tree-B +$OSTREE commit -b test3-combined -s "combined tree" --tree=ref=test3-1 --tree=ref=test3-2 + +$OSTREE checkout test3-combined checkout-test3-combined + +assert_has_file checkout-test3-combined/file-a +assert_has_file checkout-test3-combined/file-b + +echo "ok commit combined ref trees" + # NB: The + is optional, but we need to make sure we support it cd ${test_tmpdir} cat > test-statoverride.txt < show-verify-remote +assert_file_has_content show-verify-remote 'Found 1 signature' rm repo -rf # A test with corrupted detached signature diff --git a/tests/test-libarchive-import.c b/tests/test-libarchive-import.c index ad2e4c94..05c5568d 100644 --- a/tests/test-libarchive-import.c +++ b/tests/test-libarchive-import.c @@ -468,6 +468,8 @@ entry_pathname_test_helper (gconstpointer data, gboolean on) goto out; } + archive_read_free (a); + ostree_repo_commit_modifier_unref (modifier); out: g_assert_no_error (error); } @@ -534,6 +536,7 @@ test_libarchive_selinux (gconstpointer data) g_assert_cmpstr (buf, ==, "system_u:object_r:etc_t:s0"); out: + archive_read_free (a); if (modifier) ostree_repo_commit_modifier_unref (modifier); g_assert_no_error (error); @@ -562,5 +565,6 @@ int main (int argc, char **argv) if (td.tmpd && g_getenv ("TEST_SKIP_CLEANUP") == NULL) (void) glnx_shutil_rm_rf_at (AT_FDCWD, td.tmpd, NULL, NULL); + g_free (td.tmpd); return r; } diff --git a/tests/test-remote-gpg-import.sh b/tests/test-remote-gpg-import.sh index 8d155f79..4429d8bc 100755 --- a/tests/test-remote-gpg-import.sh +++ b/tests/test-remote-gpg-import.sh @@ -26,7 +26,7 @@ unset OSTREE_GPG_HOME setup_fake_remote_repo1 "archive-z2" -echo "1..1" +echo "1..4" cd ${test_tmpdir} mkdir repo @@ -143,5 +143,67 @@ if ${OSTREE} pull R2:main >/dev/null 2>&1; then fi ${OSTREE} pull R3:main >/dev/null -libtest_cleanup_gpg echo "ok" + +rm repo/refs/remotes/* -rf +${OSTREE} prune --refs-only + +# Test the successful gpgkeypath option +${OSTREE} remote add --set=gpgkeypath=${test_tmpdir}/gpghome/key3.asc R4 $(cat httpd-address)/ostree/gnomerepo +${OSTREE} pull R4:main >/dev/null + +rm repo/refs/remotes/* -rf +${OSTREE} prune --refs-only + +${OSTREE} remote add --set=gpgkeypath=${test_tmpdir}/gpghome/INVALIDKEYPATH.asc R5 $(cat httpd-address)/ostree/gnomerepo +if ${OSTREE} pull R5:main 2>err.txt; then + assert_not_reached "Unexpectedly succeeded at pulling with nonexistent key" +fi +assert_file_has_content err.txt "INVALIDKEYPATH.*No such file or directory" + +rm repo/refs/remotes/* -rf +${OSTREE} prune --refs-only + +${OSTREE} remote add --set=gpgkeypath=${test_tmpdir}/gpghome/key2.asc R6 $(cat httpd-address)/ostree/gnomerepo +if ${OSTREE} pull R6:main 2>err.txt; then + assert_not_reached "Unexpectedly succeeded at pulling with different key" +fi +assert_file_has_content err.txt "GPG signatures found, but none are in trusted keyring" + +echo "ok" + +# Test deltas with signed commits; this test is a bit +# weird here but this file has separate per-remote keys. +cd ${test_tmpdir} +rm repo/refs/remotes/* -rf +${OSTREE} prune --refs-only +echo $(date) > workdir/testfile-for-deltas-1 +# Sign with keyid 1 for first commit +${CMD_PREFIX} ostree --repo=${test_tmpdir}/ostree-srv/gnomerepo commit -b main --gpg-sign ${TEST_GPG_KEYID_1} --gpg-homedir ${test_tmpdir}/gpghome workdir +prevrev=$(${CMD_PREFIX} ostree --repo=${test_tmpdir}/ostree-srv/gnomerepo rev-parse main) +# Pull the previous revision +${OSTREE} pull R1:main +assert_streq $(${OSTREE} rev-parse R1:main) ${prevrev} +# Sign with keyid 2, but use remote r1 +echo $(date) > workdir/testfile-for-deltas-2 +${CMD_PREFIX} ostree --repo=${test_tmpdir}/ostree-srv/gnomerepo commit -b main --gpg-sign ${TEST_GPG_KEYID_2} --gpg-homedir ${test_tmpdir}/gpghome workdir +${CMD_PREFIX} ostree --repo=${test_tmpdir}/ostree-srv/gnomerepo static-delta generate main +# Summary is signed with key1 +${CMD_PREFIX} ostree --repo=${test_tmpdir}/ostree-srv/gnomerepo summary -u --gpg-sign ${TEST_GPG_KEYID_1} --gpg-homedir ${test_tmpdir}/gpghome +newrev=$(${CMD_PREFIX} ostree --repo=${test_tmpdir}/ostree-srv/gnomerepo rev-parse main) +if ${OSTREE} pull --require-static-deltas R1:main 2>err.txt; then + assert_not_reached "Unexpectedly succeeded at pulling commit signed with untrusted key" +fi +assert_file_has_content err.txt "GPG signatures found, but none are in trusted keyring" + +echo "ok gpg untrusted signed commit for delta upgrades" + +${CMD_PREFIX} ostree --repo=${test_tmpdir}/ostree-srv/gnomerepo reset main{,^} +${CMD_PREFIX} ostree --repo=${test_tmpdir}/ostree-srv/gnomerepo commit -b main --gpg-sign ${TEST_GPG_KEYID_1} --gpg-homedir ${test_tmpdir}/gpghome workdir +${CMD_PREFIX} ostree --repo=${test_tmpdir}/ostree-srv/gnomerepo static-delta generate main +${CMD_PREFIX} ostree --repo=${test_tmpdir}/ostree-srv/gnomerepo summary -u --gpg-sign ${TEST_GPG_KEYID_1} --gpg-homedir ${test_tmpdir}/gpghome +${OSTREE} pull --require-static-deltas R1:main + +echo "ok gpg trusted signed commit for delta upgrades" + +libtest_cleanup_gpg diff --git a/tests/test-remote-headers.sh b/tests/test-remote-headers.sh new file mode 100755 index 00000000..bca46204 --- /dev/null +++ b/tests/test-remote-headers.sh @@ -0,0 +1,52 @@ +#!/bin/bash +# +# Copyright (C) 2016 Red Hat, Inc. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the +# Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. + +set -euo pipefail + +echo '1..2' + +. $(dirname $0)/libtest.sh + +setup_fake_remote_repo1 "archive" "" \ + "--expected-header foo=bar --expected-header baz=badger" + +assert_fail (){ + set +e + $@ + if [ $? = 0 ] ; then + echo 1>&2 "$@ did not fail"; exit 1 + fi + set -euo pipefail +} + +cd ${test_tmpdir} +rm repo -rf +mkdir repo +${CMD_PREFIX} ostree --repo=repo init +${CMD_PREFIX} ostree --repo=repo remote add --set=gpg-verify=false origin $(cat httpd-address)/ostree/gnomerepo + +# Sanity check the setup, without headers the pull should fail +assert_fail ${CMD_PREFIX} ostree --repo=repo pull origin main + +echo "ok, setup done" + +# Now pull should succeed now +${CMD_PREFIX} ostree --repo=repo pull --http-header foo=bar --http-header baz=badger origin main + +echo "ok, pull succeeded"