diff -Nru ostree-2017.8/aclocal.m4 ostree-2017.9/aclocal.m4 --- ostree-2017.8/aclocal.m4 2017-07-06 19:02:20.000000000 +0000 +++ ostree-2017.9/aclocal.m4 2017-07-27 13:11:22.000000000 +0000 @@ -613,9 +613,9 @@ _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1], [require]) ]) -dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- -dnl serial 11 (pkg-config-0.29.1) -dnl +# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- +# serial 11 (pkg-config-0.29.1) + dnl Copyright © 2004 Scott James Remnant . dnl Copyright © 2012-2015 Dan Nicholson dnl @@ -889,6 +889,74 @@ AS_VAR_IF([$1], [""], [$5], [$4])dnl ])dnl PKG_CHECK_VAR +dnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES, +dnl [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND], +dnl [DESCRIPTION], [DEFAULT]) +dnl ------------------------------------------ +dnl +dnl Prepare a "--with-" configure option using the lowercase +dnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and +dnl PKG_CHECK_MODULES in a single macro. +AC_DEFUN([PKG_WITH_MODULES], +[ +m4_pushdef([with_arg], m4_tolower([$1])) + +m4_pushdef([description], + [m4_default([$5], [build with ]with_arg[ support])]) + +m4_pushdef([def_arg], [m4_default([$6], [auto])]) +m4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes]) +m4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no]) + +m4_case(def_arg, + [yes],[m4_pushdef([with_without], [--without-]with_arg)], + [m4_pushdef([with_without],[--with-]with_arg)]) + +AC_ARG_WITH(with_arg, + AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),, + [AS_TR_SH([with_]with_arg)=def_arg]) + +AS_CASE([$AS_TR_SH([with_]with_arg)], + [yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)], + [auto],[PKG_CHECK_MODULES([$1],[$2], + [m4_n([def_action_if_found]) $3], + [m4_n([def_action_if_not_found]) $4])]) + +m4_popdef([with_arg]) +m4_popdef([description]) +m4_popdef([def_arg]) + +])dnl PKG_WITH_MODULES + +dnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES, +dnl [DESCRIPTION], [DEFAULT]) +dnl ----------------------------------------------- +dnl +dnl Convenience macro to trigger AM_CONDITIONAL after PKG_WITH_MODULES +dnl check._[VARIABLE-PREFIX] is exported as make variable. +AC_DEFUN([PKG_HAVE_WITH_MODULES], +[ +PKG_WITH_MODULES([$1],[$2],,,[$3],[$4]) + +AM_CONDITIONAL([HAVE_][$1], + [test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"]) +])dnl PKG_HAVE_WITH_MODULES + +dnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES, +dnl [DESCRIPTION], [DEFAULT]) +dnl ------------------------------------------------------ +dnl +dnl Convenience macro to run AM_CONDITIONAL and AC_DEFINE after +dnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make +dnl and preprocessor variable. +AC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES], +[ +PKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4]) + +AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"], + [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])]) +])dnl PKG_HAVE_DEFINE_WITH_MODULES + # Copyright (C) 2002-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation diff -Nru ostree-2017.8/apidoc/html/index.html ostree-2017.9/apidoc/html/index.html --- ostree-2017.8/apidoc/html/index.html 2017-07-06 19:03:27.000000000 +0000 +++ ostree-2017.9/apidoc/html/index.html 2017-07-27 13:12:13.000000000 +0000 @@ -3,7 +3,7 @@ OSTree API references: OSTree API references - + @@ -14,7 +14,7 @@
-

for OSTree 2017.8

+

for OSTree 2017.9


diff -Nru ostree-2017.8/apidoc/html/ostree-Content-addressed-object-store.html ostree-2017.9/apidoc/html/ostree-Content-addressed-object-store.html --- ostree-2017.8/apidoc/html/ostree-Content-addressed-object-store.html 2017-07-06 19:03:27.000000000 +0000 +++ ostree-2017.9/apidoc/html/ostree-Content-addressed-object-store.html 2017-07-27 13:12:13.000000000 +0000 @@ -3,7 +3,7 @@ Content-addressed object store: OSTree API references - + @@ -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_reload_config () @@ -249,7 +249,7 @@ -gboolean +gboolean ostree_repo_get_remote_boolean_option () @@ -257,7 +257,7 @@ -gboolean +gboolean ostree_repo_get_remote_list_option () @@ -265,7 +265,7 @@ -gboolean +gboolean ostree_repo_get_remote_option () @@ -281,7 +281,7 @@ -gboolean +gboolean ostree_repo_write_config () @@ -289,7 +289,7 @@ -gboolean +gboolean ostree_repo_scan_hardlinks () @@ -297,7 +297,7 @@ -gboolean +gboolean ostree_repo_prepare_transaction () @@ -305,7 +305,7 @@ -gboolean +gboolean ostree_repo_commit_transaction () @@ -313,7 +313,7 @@ -gboolean +gboolean ostree_repo_abort_transaction () @@ -337,7 +337,7 @@ -gboolean +gboolean ostree_repo_set_ref_immediate () @@ -345,7 +345,7 @@ -gboolean +gboolean ostree_repo_set_cache_dir () @@ -353,7 +353,7 @@ -gboolean +gboolean ostree_repo_sign_delta () @@ -361,7 +361,7 @@ -gboolean +gboolean ostree_repo_has_object () @@ -369,7 +369,7 @@ -gboolean +gboolean ostree_repo_write_metadata () @@ -385,7 +385,7 @@ -gboolean +gboolean ostree_repo_write_metadata_finish () @@ -393,7 +393,7 @@ -gboolean +gboolean ostree_repo_write_content () @@ -401,7 +401,7 @@ -gboolean +gboolean ostree_repo_write_metadata_trusted () @@ -409,7 +409,7 @@ -gboolean +gboolean ostree_repo_write_metadata_stream_trusted () @@ -417,7 +417,7 @@ -gboolean +gboolean ostree_repo_write_content_trusted () @@ -433,7 +433,7 @@ -gboolean +gboolean ostree_repo_write_content_finish () @@ -441,7 +441,7 @@ -gboolean +gboolean ostree_repo_resolve_rev () @@ -449,7 +449,7 @@ -gboolean +gboolean ostree_repo_resolve_rev_ext () @@ -457,7 +457,7 @@ -gboolean +gboolean ostree_repo_list_refs () @@ -465,7 +465,7 @@ -gboolean +gboolean ostree_repo_list_refs_ext () @@ -473,7 +473,7 @@ -gboolean +gboolean ostree_repo_remote_list_refs () @@ -481,7 +481,7 @@ -gboolean +gboolean ostree_repo_load_variant () @@ -489,7 +489,7 @@ -gboolean +gboolean ostree_repo_load_commit () @@ -497,7 +497,7 @@ -gboolean +gboolean ostree_repo_load_variant_if_exists () @@ -505,7 +505,7 @@ -gboolean +gboolean ostree_repo_load_file () @@ -513,7 +513,7 @@ -gboolean +gboolean ostree_repo_load_object_stream () @@ -521,7 +521,7 @@ -gboolean +gboolean ostree_repo_query_object_storage_size () @@ -529,7 +529,7 @@ -gboolean +gboolean ostree_repo_import_object_from () @@ -537,7 +537,7 @@ -gboolean +gboolean ostree_repo_import_object_from_with_trust () @@ -545,7 +545,7 @@ -gboolean +gboolean ostree_repo_import_archive_to_mtree () @@ -553,7 +553,7 @@ -gboolean +gboolean ostree_repo_export_tree_to_archive () @@ -561,7 +561,7 @@ -gboolean +gboolean ostree_repo_delete_object () @@ -585,7 +585,7 @@ -GVariant * +GVariant * (*OstreeRepoCommitModifierXattrCallback) () @@ -657,7 +657,7 @@ -GType +GType ostree_repo_devino_cache_get_type () @@ -665,7 +665,7 @@ -gboolean +gboolean ostree_repo_write_directory_to_mtree () @@ -673,7 +673,7 @@ -gboolean +gboolean ostree_repo_write_dfd_to_mtree () @@ -681,7 +681,7 @@ -gboolean +gboolean ostree_repo_write_archive_to_mtree () @@ -689,7 +689,7 @@ -gboolean +gboolean ostree_repo_write_mtree () @@ -697,7 +697,7 @@ -gboolean +gboolean ostree_repo_write_commit () @@ -705,7 +705,7 @@ -gboolean +gboolean ostree_repo_write_commit_with_time () @@ -713,7 +713,7 @@ -gboolean +gboolean ostree_repo_read_commit_detached_metadata () @@ -721,7 +721,7 @@ -gboolean +gboolean ostree_repo_write_commit_detached_metadata () @@ -729,7 +729,7 @@ -gboolean +gboolean ostree_repo_checkout_tree () @@ -737,7 +737,7 @@ -gboolean +gboolean ostree_repo_checkout_tree_at () @@ -745,7 +745,7 @@ -gboolean +gboolean ostree_repo_checkout_at () @@ -753,7 +753,7 @@ -gboolean +gboolean ostree_repo_checkout_gc () @@ -761,7 +761,7 @@ -gboolean +gboolean ostree_repo_read_commit () @@ -769,7 +769,7 @@ -gboolean +gboolean ostree_repo_list_objects () @@ -777,7 +777,7 @@ -gboolean +gboolean ostree_repo_list_commit_objects_starting_with () @@ -785,7 +785,7 @@ -gboolean +gboolean ostree_repo_list_static_delta_names () @@ -793,7 +793,7 @@ -gboolean +gboolean ostree_repo_static_delta_generate () @@ -801,7 +801,7 @@ -gboolean +gboolean ostree_repo_static_delta_execute_offline () @@ -809,7 +809,7 @@ -GHashTable * +GHashTable * ostree_repo_traverse_new_reachable () @@ -817,7 +817,7 @@ -gboolean +gboolean ostree_repo_traverse_commit () @@ -825,7 +825,7 @@ -gboolean +gboolean ostree_repo_traverse_commit_union () @@ -865,7 +865,7 @@ -gboolean +gboolean ostree_repo_commit_traverse_iter_init_commit () @@ -873,7 +873,7 @@ -gboolean +gboolean ostree_repo_commit_traverse_iter_init_dirtree () @@ -889,7 +889,7 @@ -gboolean +gboolean ostree_repo_prune () @@ -897,7 +897,7 @@ -gboolean +gboolean ostree_repo_prune_static_deltas () @@ -905,7 +905,7 @@ -gboolean +gboolean ostree_repo_prune_from_reachable () @@ -913,7 +913,7 @@ -gboolean +gboolean ostree_repo_pull () @@ -921,7 +921,7 @@ -gboolean +gboolean ostree_repo_pull_one_dir () @@ -929,7 +929,7 @@ -gboolean +gboolean ostree_repo_pull_with_options () @@ -945,7 +945,7 @@ -gboolean +gboolean ostree_repo_sign_commit () @@ -953,7 +953,7 @@ -gboolean +gboolean ostree_repo_append_gpg_signature () @@ -961,7 +961,7 @@ -gboolean +gboolean ostree_repo_add_gpg_signature_summary () @@ -977,7 +977,7 @@ -gboolean +gboolean ostree_repo_verify_commit () @@ -1009,7 +1009,7 @@ -gboolean +gboolean ostree_repo_regenerate_summary () @@ -1151,16 +1151,16 @@

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

@@ -1187,8 +1187,8 @@

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 "/".

@@ -1239,17 +1239,17 @@

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 @@ -1270,7 +1270,7 @@

- + @@ -1280,7 +1280,7 @@

ostree_repo_get_disable_fsync ()

-
gboolean
+
gboolean
 ostree_repo_get_disable_fsync (OstreeRepo *self);

For more information see ostree_repo_set_disable_fsync().

@@ -1306,7 +1306,7 @@

ostree_repo_is_system ()

-
gboolean
+
gboolean
 ostree_repo_is_system (OstreeRepo *repo);

Parameters

@@ -1325,15 +1325,15 @@

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.

@@ -1353,7 +1353,7 @@
- + @@ -1361,17 +1361,17 @@

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 @@ -1415,7 +1415,7 @@


ostree_repo_get_path ()

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

Returns

@@ -1432,7 +1432,7 @@

ostree_repo_get_config ()

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

Returns

@@ -1473,7 +1473,7 @@

ostree_repo_copy_config ()

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

Returns

@@ -1484,24 +1484,24 @@

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

@@ -1549,11 +1549,11 @@

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.

@@ -1593,15 +1593,15 @@

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.

@@ -1663,9 +1663,9 @@

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

 
@@ -1690,7 +1690,7 @@

Returns

-

a NULL-terminated +

a NULL-terminated array of remote names.

[array length=out_n_remotes][transfer full]

@@ -1698,11 +1698,11 @@

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 @@ -1741,17 +1741,17 @@

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 @@ -1791,18 +1791,18 @@

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 @@ -1842,27 +1842,27 @@

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 @@ -1888,28 +1888,28 @@

- + - + +keys, or NULL.

- + - + @@ -1917,19 +1917,19 @@

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 @@ -1941,8 +1941,8 @@ . 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

@@ -1966,23 +1966,23 @@
+NULL.

+signature data, or NULL.

- + - + @@ -1990,21 +1990,21 @@

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:

    @@ -2038,23 +2038,23 @@
+NULL.

+signature data, or NULL.

- + - + @@ -2062,16 +2062,16 @@

Returns

-

TRUE on success, FALSE on failure

+

TRUE on success, FALSE on failure


ostree_repo_reload_config ()

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

By default, an OstreeRepo will cache the remote configuration and its own repo/config data. This API can be used to reload it.

@@ -2105,13 +2105,13 @@

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 @@ -2120,7 +2120,7 @@ will be set to default_value . If an error is returned, out_value - will be set to FALSE.

+ will be set to FALSE.

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

 

out_summary

return location for raw summary data, or -NULL.

[out][optional]

out_signatures

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

[out][optional]

cancellable

a GCancellable

a GCancellable

 

error

a GError

a GError

 

out_summary

return location for raw summary data, or -NULL.

[out][optional]

out_signatures

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

[out][optional]

cancellable

a GCancellable

a GCancellable

 

error

a GError

a GError

 
@@ -2166,26 +2166,26 @@

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 a zero terminated array of strings. If the option is not set, or if an error is returned, out_value will be set -to NULL.

+to NULL.

Parameters

@@ -2214,7 +2214,7 @@ +g_strfreev().

@@ -2227,27 +2227,27 @@

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 underneath that group, or default_value if the remote exists but not the option name. If an error is returned, out_value - will be set to NULL.

+ will be set to NULL.

Parameters

out_value

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

[out][array zero-terminated=1]
@@ -2293,7 +2293,7 @@

Returns

-

TRUE on success, otherwise FALSE with error +

TRUE on success, otherwise FALSE with error set

@@ -2321,17 +2321,17 @@

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 @@ -2358,7 +2358,7 @@

- + @@ -2368,10 +2368,10 @@

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 @@ -2412,11 +2412,11 @@


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 @@ -2461,11 +2461,11 @@


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.

@@ -2506,10 +2506,10 @@

ostree_repo_abort_transaction ()

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

@@ -2559,13 +2559,13 @@ 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 @@ -2607,13 +2607,13 @@


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.

@@ -2643,7 +2643,7 @@
- + @@ -2663,12 +2663,12 @@

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 @@ -2700,12 +2700,12 @@

- + - + @@ -2715,14 +2715,14 @@

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.

@@ -2776,17 +2776,17 @@

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

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

 
@@ -2813,7 +2813,7 @@ - + @@ -2831,26 +2831,26 @@

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

@@ -2907,10 +2907,10 @@ 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 @@ -2967,23 +2967,23 @@


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 @@ -3042,13 +3042,13 @@


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 @@ -3099,15 +3099,15 @@


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 @@ -3163,13 +3163,13 @@


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 @@ -3228,11 +3228,11 @@

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 @@ -3290,11 +3290,11 @@


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

@@ -3312,7 +3312,7 @@
- + @@ -3322,7 +3322,7 @@ - + @@ -3332,12 +3332,12 @@

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 @@ -3368,7 +3368,7 @@

- @@ -3384,13 +3384,13 @@

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(), @@ -3427,7 +3427,7 @@

- @@ -3443,14 +3443,14 @@

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 @@ -3496,15 +3496,15 @@


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 @@ -3557,12 +3557,12 @@


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

out_have_object

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]
@@ -3604,12 +3604,12 @@

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 @@ -3656,12 +3656,12 @@


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 @@ -3707,18 +3707,18 @@


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

@@ -3760,14 +3760,14 @@

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.

@@ -3821,14 +3821,14 @@

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.

@@ -3883,13 +3883,13 @@

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.

@@ -3939,13 +3939,13 @@

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 @@ -4001,15 +4001,15 @@


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 @@ -4050,7 +4050,7 @@

- + @@ -4070,14 +4070,14 @@

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 @@ -4134,13 +4134,13 @@


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 @@ -4192,16 +4192,16 @@


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

@@ -4247,8 +4247,8 @@
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

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

Parameters

@@ -4320,7 +4320,7 @@ - + @@ -4335,12 +4335,12 @@

OstreeRepoCommitModifierXattrCallback ()

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

@@ -4349,8 +4349,8 @@ ostree_repo_commit_modifier_set_xattr_callback (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 @@ -4397,7 +4397,7 @@ (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 @@ -4511,19 +4511,19 @@


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 , @@ -4575,14 +4575,14 @@


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 @@ -4641,14 +4641,14 @@


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 @@ -4704,12 +4704,12 @@


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 @@ -4758,16 +4758,16 @@


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 @@ -4788,7 +4788,7 @@

- + @@ -4803,7 +4803,7 @@ - + @@ -4833,17 +4833,17 @@

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 @@ -4864,7 +4864,7 @@

- + @@ -4879,7 +4879,7 @@ - + @@ -4914,17 +4914,17 @@

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]
@@ -4946,7 +4946,7 @@ - + @@ -4966,18 +4966,18 @@

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

@@ -5000,7 +5000,7 @@
- + @@ -5020,15 +5020,15 @@

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 @@ -5094,14 +5094,14 @@


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, @@ -5163,14 +5163,14 @@


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 @@ -5231,10 +5231,10 @@


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.

@@ -5269,13 +5269,13 @@

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 .

@@ -5325,18 +5325,18 @@

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]
@@ -5376,20 +5376,20 @@

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 @@ -5433,18 +5433,18 @@

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 .

@@ -5484,17 +5484,17 @@

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 @@ -5535,7 +5535,7 @@

- + @@ -5570,13 +5570,13 @@

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 @@ -5602,7 +5602,7 @@

- + @@ -5622,9 +5622,9 @@

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

@@ -5635,13 +5635,13 @@

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 @@ -5693,13 +5693,13 @@


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 @@ -5850,13 +5850,13 @@


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

@@ -5899,13 +5899,13 @@

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

@@ -5950,8 +5950,8 @@

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 @@ -5995,15 +5995,15 @@


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 @@ -6072,11 +6072,11 @@


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.

@@ -6096,7 +6096,7 @@
- @@ -6117,14 +6117,14 @@

ostree_repo_prune_from_reachable ()

-
gboolean
+
gboolean
 ostree_repo_prune_from_reachable (OstreeRepo *self,
                                   OstreeRepoPruneOptions *options,
-                                  gint *out_objects_total,
-                                  gint *out_objects_pruned,
-                                  guint64 *out_pruned_object_size_total,
-                                  GCancellable *cancellable,
-                                  GError **error);
+ gint *out_objects_total, + gint *out_objects_pruned, + guint64 *out_pruned_object_size_total, + GCancellable *cancellable, + GError **error);

Delete content from the repository. This function is the "backend" half of the higher level ostree_repo_prune(). To use this function, you determine the root set yourself, and this function finds all other @@ -6185,14 +6185,14 @@


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 @@ -6202,7 +6202,7 @@

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 @@ -6210,7 +6210,7 @@ is pulled.

Warning: This API will iterate the thread default main context, which is a bug, but kept for compatibility reasons. If you want to -avoid this, use g_main_context_push_thread_default() to push a new +avoid this, use g_main_context_push_thread_default() to push a new one around this call.

Parameters

@@ -6233,7 +6233,7 @@
- + @@ -6263,15 +6263,15 @@

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.

@@ -6300,7 +6300,7 @@
- + @@ -6330,13 +6330,13 @@

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:

    @@ -6410,7 +6410,7 @@
    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.

    @@ -6449,13 +6449,13 @@

    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

    @@ -6483,17 +6483,17 @@
- + - + - + @@ -6503,12 +6503,12 @@

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

@@ -6536,12 +6536,12 @@
- + - + @@ -6551,12 +6551,12 @@

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 summary file.

Parameters

@@ -6579,17 +6579,17 @@
- + - + - + @@ -6601,20 +6601,20 @@

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

@@ -6637,12 +6637,12 @@
- + - + @@ -6670,20 +6670,20 @@

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 .

@@ -6731,7 +6731,7 @@

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


@@ -6739,11 +6739,11 @@

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.

@@ -6791,7 +6791,7 @@

Returns

-

an OstreeGpgVerifyResult, or NULL on error.

+

an OstreeGpgVerifyResult, or NULL on error.

[transfer full]

@@ -6800,10 +6800,10 @@

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);
+ 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 @@ -6848,7 +6848,7 @@

Returns

-

an OstreeGpgVerifyResult, or NULL on error.

+

an OstreeGpgVerifyResult, or NULL on error.

[transfer full]

@@ -6858,10 +6858,10 @@
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 @@ -6888,12 +6888,12 @@

- + - + @@ -6911,18 +6911,18 @@

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.

If the timetable for making commits and updating the summary file is fairly @@ -6953,7 +6953,7 @@

- + @@ -7097,52 +7097,52 @@ - + - + - + - + - + - + - + - + - + @@ -7415,7 +7415,7 @@

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 -Nru ostree-2017.8/apidoc/html/ostree-Core-repository-independent-functions.html ostree-2017.9/apidoc/html/ostree-Core-repository-independent-functions.html --- ostree-2017.8/apidoc/html/ostree-Core-repository-independent-functions.html 2017-07-06 19:03:27.000000000 +0000 +++ ostree-2017.9/apidoc/html/ostree-Core-repository-independent-functions.html 2017-07-27 13:12:13.000000000 +0000 @@ -3,7 +3,7 @@ Core repository-independent functions: OSTree API references - + @@ -46,7 +46,7 @@ - - - - + @@ -800,7 +800,7 @@

ostree_checksum_b64_from_bytes ()

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

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]

homedir

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

 

homedir

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

 

summary

Summary data as a GBytes

Summary data as a GBytes

 

signatures

Summary signatures as a GBytes

Summary signatures as a GBytes

 

additional_metadata

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

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

[allow-none]

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

 
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_validate_remote_name () @@ -180,7 +180,7 @@
-gboolean +gboolean ostree_parse_refspec () @@ -203,7 +203,7 @@
-guint +guint ostree_hash_object_name () @@ -211,7 +211,7 @@
-GVariant * +GVariant * ostree_object_name_serialize () @@ -243,7 +243,7 @@
-gboolean +gboolean ostree_content_stream_parse () @@ -251,7 +251,7 @@
-gboolean +gboolean ostree_content_file_parse () @@ -259,7 +259,7 @@
-gboolean +gboolean ostree_content_file_parse_at () @@ -267,7 +267,7 @@
-gboolean +gboolean ostree_raw_file_to_archive_z2_stream () @@ -275,7 +275,7 @@
-gboolean +gboolean ostree_raw_file_to_archive_z2_stream_with_options () @@ -283,7 +283,7 @@
-gboolean +gboolean ostree_raw_file_to_content_stream () @@ -291,7 +291,7 @@
-gboolean +gboolean ostree_checksum_file_from_input () @@ -299,7 +299,7 @@
-gboolean +gboolean ostree_checksum_file () @@ -315,7 +315,7 @@
-gboolean +gboolean ostree_checksum_file_async_finish () @@ -323,7 +323,7 @@
-GVariant * +GVariant * ostree_create_directory_metadata () @@ -331,7 +331,7 @@
-gboolean +gboolean ostree_validate_structureof_objtype () @@ -339,7 +339,7 @@
-gboolean +gboolean ostree_validate_structureof_csum_v () @@ -347,7 +347,7 @@
-gboolean +gboolean ostree_validate_structureof_checksum_string () @@ -355,7 +355,7 @@
-gboolean +gboolean ostree_validate_structureof_file_mode () @@ -363,7 +363,7 @@
-gboolean +gboolean ostree_validate_structureof_commit () @@ -371,7 +371,7 @@
-gboolean +gboolean ostree_validate_structureof_dirtree () @@ -379,7 +379,7 @@
-gboolean +gboolean ostree_validate_structureof_dirmeta () @@ -387,7 +387,7 @@
-gchar * +gchar * ostree_commit_get_parent () @@ -395,7 +395,7 @@
-guint64 +guint64 ostree_commit_get_timestamp () @@ -403,7 +403,7 @@
-gboolean +gboolean ostree_check_version () @@ -483,11 +483,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.

@@ -516,21 +516,21 @@

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

@@ -556,14 +556,14 @@

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

@@ -583,14 +583,14 @@

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

@@ -609,7 +609,7 @@

Returns

-

New GVariant of type ay with length 32.

+

New GVariant of type ay with length 32.

[transfer full]

@@ -617,7 +617,7 @@

ostree_checksum_from_bytes ()

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

Parameters

@@ -644,7 +644,7 @@

ostree_checksum_from_bytes_v ()

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

Parameters

@@ -655,7 +655,7 @@ - +

csum_v

GVariant of type ay

GVariant of type ay

 
@@ -671,7 +671,7 @@

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 @@ -705,7 +705,7 @@

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.

@@ -735,8 +735,8 @@

ostree_checksum_bytes_peek ()

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

Parameters

@@ -747,7 +747,7 @@ - +

bytes

GVariant of type ay

GVariant of type ay

 
@@ -756,16 +756,16 @@

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 .

@@ -779,7 +779,7 @@

bytes

GVariant of type ay

GVariant of type ay

 
@@ -828,7 +828,7 @@

ostree_checksum_b64_to_bytes ()

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

Parameters

@@ -857,7 +857,7 @@

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 @@ -893,7 +893,7 @@

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 .

@@ -925,8 +925,8 @@

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

@@ -954,9 +954,9 @@

ostree_validate_rev ()

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

Parameters

@@ -981,16 +981,16 @@

Returns

-

TRUE if rev +

TRUE if rev is a valid ref string


ostree_validate_remote_name ()

-
gboolean
+
gboolean
 ostree_validate_remote_name (const char *remote_name,
-                             GError **error);
+ GError **error);

Parameters

@@ -1015,7 +1015,7 @@

Returns

-

TRUE if remote_name +

TRUE if remote_name is a valid remote name

Since: 2017.8

@@ -1023,11 +1023,11 @@

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 @@ -1035,7 +1035,7 @@ will be "gnome-ostree/buildmaster".

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

+ will be NULL.

Parameters

@@ -1052,7 +1052,7 @@ - + @@ -1117,9 +1117,9 @@

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]
@@ -1130,7 +1130,7 @@ - +

a

A GVariant containing a serialized object

A GVariant containing a serialized object

 
@@ -1139,7 +1139,7 @@

ostree_object_name_serialize ()

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

Returns

-

A new floating GVariant containing checksum string and objtype.

+

A new floating GVariant containing checksum string and objtype.

[transfer floating]

@@ -1174,7 +1174,7 @@

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 @@ -1192,7 +1192,7 @@

variant

-

A GVariant of type (su)

+

A GVariant of type (su)

  @@ -1250,7 +1250,7 @@

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().

@@ -1284,16 +1284,16 @@

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.

@@ -1322,7 +1322,7 @@

trusted

-

If TRUE, assume the content has been validated

+

If TRUE, assume the content has been validated

  @@ -1357,15 +1357,15 @@

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.

@@ -1389,7 +1389,7 @@

trusted

-

If TRUE, assume the content has been validated

+

If TRUE, assume the content has been validated

  @@ -1424,16 +1424,16 @@

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.

@@ -1462,7 +1462,7 @@

trusted

-

If TRUE, assume the content has been validated

+

If TRUE, assume the content has been validated

  @@ -1497,13 +1497,13 @@

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.

@@ -1552,15 +1552,15 @@

ostree_raw_file_to_archive_z2_stream_with_options ()

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

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

  • compression-level (i): Level of compression to use, 0–9, with 0 being @@ -1617,14 +1617,14 @@


    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.

    @@ -1679,14 +1679,14 @@

    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

    @@ -1709,7 +1709,7 @@

    in

    -

    File content, should be NULL for symbolic links.

    +

    File content, should be NULL for symbolic links.

    [allow-none] @@ -1739,12 +1739,12 @@

    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

    @@ -1788,12 +1788,12 @@

    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().

    @@ -1843,11 +1843,11 @@

    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().

    @@ -1886,9 +1886,9 @@

    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

    @@ -1900,7 +1900,7 @@ - + @@ -1913,16 +1913,16 @@

    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

     
    @@ -1940,16 +1940,16 @@

    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

    @@ -1961,7 +1961,7 @@ - + @@ -1974,17 +1974,17 @@

    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

    checksum

    a GVariant of type "ay"

    a GVariant of type "ay"

     
    @@ -2009,16 +2009,16 @@

    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

    @@ -2043,16 +2043,16 @@

    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.

    @@ -2080,16 +2080,16 @@

    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.

    @@ -2117,16 +2117,16 @@

    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 .

    @@ -2153,15 +2153,15 @@

    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

    @@ -2180,22 +2180,22 @@

    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);

    ostree_check_version ()

    -
    gboolean
    -ostree_check_version (guint required_year,
    -                      guint required_release);
    +
    gboolean
    +ostree_check_version (guint required_year,
    +                      guint required_release);

    Parameters

    @@ -2220,7 +2220,7 @@

    Returns

    -

    TRUE if current libostree has at least the requested version, FALSE otherwise

    +

    TRUE if current libostree has at least the requested version, FALSE otherwise

    diff -Nru ostree-2017.8/apidoc/html/ostree-GPG-signature-verification-results.html ostree-2017.9/apidoc/html/ostree-GPG-signature-verification-results.html --- ostree-2017.8/apidoc/html/ostree-GPG-signature-verification-results.html 2017-07-06 19:03:27.000000000 +0000 +++ ostree-2017.9/apidoc/html/ostree-GPG-signature-verification-results.html 2017-07-27 13:12:13.000000000 +0000 @@ -3,7 +3,7 @@ GPG signature verification results: OSTree API references - + @@ -41,7 +41,7 @@ +, or NULL.

    @@ -244,22 +244,22 @@

    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 @@

    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 @@

    Returns

    -

    a new, floating, GVariant tuple

    +

    a new, floating, GVariant tuple


    @@ -363,9 +363,9 @@

    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 @@

    - + @@ -426,11 +426,11 @@

    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 @@

    - + - + @@ -472,14 +472,14 @@

    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 @@
    - + @@ -506,9 +506,9 @@

    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 @@

    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 @@

    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_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_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 @@

    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 @@ @@ -594,7 +594,7 @@ @@ -602,7 +602,7 @@ @@ -610,14 +610,14 @@ diff -Nru ostree-2017.8/apidoc/html/ostree-In-memory-modifiable-filesystem-tree.html ostree-2017.9/apidoc/html/ostree-In-memory-modifiable-filesystem-tree.html --- ostree-2017.8/apidoc/html/ostree-In-memory-modifiable-filesystem-tree.html 2017-07-06 19:03:27.000000000 +0000 +++ ostree-2017.9/apidoc/html/ostree-In-memory-modifiable-filesystem-tree.html 2017-07-27 13:12:13.000000000 +0000 @@ -3,7 +3,7 @@ In-memory modifiable filesystem tree: OSTree API references - + @@ -79,7 +79,7 @@ - + @@ -281,12 +281,12 @@

    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 @@


    ostree_mutable_tree_get_subdirs ()

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

    Returns

    @@ -345,7 +345,7 @@

    ostree_mutable_tree_get_files ()

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

    Returns

    diff -Nru ostree-2017.8/apidoc/html/ostree-ostree-bootconfig-parser.html ostree-2017.9/apidoc/html/ostree-ostree-bootconfig-parser.html --- ostree-2017.8/apidoc/html/ostree-ostree-bootconfig-parser.html 2017-07-06 19:03:27.000000000 +0000 +++ ostree-2017.9/apidoc/html/ostree-ostree-bootconfig-parser.html 2017-07-27 13:12:13.000000000 +0000 @@ -3,7 +3,7 @@ ostree-bootconfig-parser: OSTree API references - + @@ -57,7 +57,7 @@
    - + @@ -299,10 +299,10 @@

    ostree_async_progress_get_variant ()

    -
    GVariant *
    +
    GVariant *
     ostree_async_progress_get_variant (OstreeAsyncProgress *self,
                                        const char *key);
    -

    Look up a key in the OstreeAsyncProgress and return the GVariant associated +

    Look up a key in the OstreeAsyncProgress and return the GVariant associated with it. The lookup is thread-safe.

    Parameters

    @@ -329,7 +329,7 @@

    Returns

    value for the given key -, or NULL if +, or NULL if it was not set.

    [transfer full][nullable]

    @@ -338,14 +338,14 @@

    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);
    @@ -356,7 +356,7 @@ ostree_async_progress_set_status (OstreeAsyncProgress *self, const char *status);

    Set the human-readable status string for the OstreeAsyncProgress. This -operation is thread-safe. NULL may be passed to clear the status.

    +operation is thread-safe. NULL may be passed to clear the status.

    This is a convenience function to set the well-known status key.

    Parameters

    @@ -374,7 +374,7 @@
    - + @@ -389,11 +389,11 @@ ostree_async_progress_set (OstreeAsyncProgress *self, ...);

    Set the values for zero or more keys in the OstreeAsyncProgress. Each key is -specified in @... as the key name, followed by a GVariant format string, +specified in @... as the key name, followed by a GVariant format string, followed by the necessary arguments for that format string, just as for -g_variant_new(). After those arguments is the next key name. The varargs list -must be NULL-terminated.

    -

    g_variant_ref_sink() will be called as appropriate on the GVariant +g_variant_new(). After those arguments is the next key name. The varargs list +must be NULL-terminated.

    +

    g_variant_ref_sink() will be called as appropriate on the GVariant parameters, so they may be floating.

    This operation is thread-safe, and all the keys are set atomically.

    @@ -416,8 +416,8 @@ "outstanding-fetches", "u", outstanding_fetches, "bytes-received", "t", bytes_received, "status", "s", "Updated status", - "refs", "@a{ss}", g_variant_new_parsed ("@a{ss} {}"), - NULL); + "refs", "@a{ss}", g_variant_new_parsed ("@a{ss} {}"), + NULL);

    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_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 @@

    error

    a GError

    a GError

     
    -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_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_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 -Nru ostree-2017.8/apidoc/html/ostree-ostree-chain-input-stream.html ostree-2017.9/apidoc/html/ostree-ostree-chain-input-stream.html --- ostree-2017.8/apidoc/html/ostree-ostree-chain-input-stream.html 2017-07-06 19:03:27.000000000 +0000 +++ ostree-2017.9/apidoc/html/ostree-ostree-chain-input-stream.html 2017-07-27 13:12:13.000000000 +0000 @@ -3,7 +3,7 @@ ostree-chain-input-stream: OSTree API references - + @@ -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 -Nru ostree-2017.8/apidoc/html/ostree-ostree-checksum-input-stream.html ostree-2017.9/apidoc/html/ostree-ostree-checksum-input-stream.html --- ostree-2017.8/apidoc/html/ostree-ostree-checksum-input-stream.html 2017-07-06 19:03:27.000000000 +0000 +++ ostree-2017.9/apidoc/html/ostree-ostree-checksum-input-stream.html 2017-07-27 13:12:13.000000000 +0000 @@ -3,7 +3,7 @@ ostree-checksum-input-stream: OSTree API references - + @@ -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 -Nru ostree-2017.8/apidoc/html/ostree-ostree-deployment.html ostree-2017.9/apidoc/html/ostree-ostree-deployment.html --- ostree-2017.8/apidoc/html/ostree-ostree-deployment.html 2017-07-06 19:03:27.000000000 +0000 +++ ostree-2017.9/apidoc/html/ostree-ostree-deployment.html 2017-07-27 13:12:13.000000000 +0000 @@ -3,7 +3,7 @@ ostree-deployment: OSTree API references - + @@ -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 @@

    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_origin ()

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

    Parameters

    @@ -406,7 +406,7 @@

    ostree_deployment_set_origin ()

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

    @@ -506,7 +506,7 @@
    - + diff -Nru ostree-2017.8/apidoc/html/ostree-ostree-diff.html ostree-2017.9/apidoc/html/ostree-ostree-diff.html --- ostree-2017.8/apidoc/html/ostree-ostree-diff.html 2017-07-06 19:03:27.000000000 +0000 +++ ostree-2017.9/apidoc/html/ostree-ostree-diff.html 2017-07-27 13:12:13.000000000 +0000 @@ -3,7 +3,7 @@ ostree-diff: OSTree API references - + @@ -57,7 +57,7 @@ - + @@ -192,16 +192,16 @@

    ostree_diff_dirs_with_options ()

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

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

    - + @@ -271,11 +271,11 @@

    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 -Nru ostree-2017.8/apidoc/html/ostree-ostree-repo-file.html ostree-2017.9/apidoc/html/ostree-ostree-repo-file.html --- ostree-2017.8/apidoc/html/ostree-ostree-repo-file.html 2017-07-06 19:03:27.000000000 +0000 +++ ostree-2017.9/apidoc/html/ostree-ostree-repo-file.html 2017-07-27 13:12:13.000000000 +0000 @@ -3,7 +3,7 @@ ostree-repo-file: OSTree API references - + @@ -40,7 +40,7 @@
    + NULL);
     

    GKeyFile *origin;

    GKeyFile *origin;

    How to construct an upgraded version of this tree

     
    -gboolean +gboolean ostree_diff_dirs () @@ -65,7 +65,7 @@
    -gboolean +gboolean ostree_diff_dirs_with_options () @@ -120,15 +120,15 @@

    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 @@ -152,7 +152,7 @@

    a

    First directory path, or NULL

    First directory path, or NULL

     

    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 @@
    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_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 @@
    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 -Nru ostree-2017.8/apidoc/html/ostree-Progress-notification-system-for-asynchronous-operations.html ostree-2017.9/apidoc/html/ostree-Progress-notification-system-for-asynchronous-operations.html --- ostree-2017.8/apidoc/html/ostree-Progress-notification-system-for-asynchronous-operations.html 2017-07-06 19:03:27.000000000 +0000 +++ ostree-2017.9/apidoc/html/ostree-Progress-notification-system-for-asynchronous-operations.html 2017-07-27 13:12:13.000000000 +0000 @@ -3,7 +3,7 @@ Progress notification system for asynchronous operations: OSTree API references - + @@ -73,7 +73,7 @@
    -GVariant * +GVariant * ostree_async_progress_get_variant () @@ -81,7 +81,7 @@
    -guint +guint ostree_async_progress_get_uint () @@ -89,7 +89,7 @@
    -guint64 +guint64 ostree_async_progress_get_uint64 () @@ -171,7 +171,7 @@ notification occurs in the thread-default context of the calling operation.

    The ostree_async_progress_get_status() and ostree_async_progress_set_status() -methods get and set a well-known status key of type G_VARIANT_TYPE_STRING. +methods get and set a well-known status key of type G_VARIANT_TYPE_STRING. This key may be accessed using the other OstreeAsyncProgress methods, but it must always have the correct type.

    @@ -192,7 +192,7 @@

    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);
    @@ -200,7 +200,7 @@
    char *
     ostree_async_progress_get_status (OstreeAsyncProgress *self);

    Get the human-readable status string from the OstreeAsyncProgress. This -operation is thread-safe. The retuned value may be NULL if no status is +operation is thread-safe. The retuned value may be NULL if no status is set.

    This is a convenience function to get the well-known status key.

    @@ -220,7 +220,7 @@

    Returns

    -

    the current status, or NULL if none is set.

    +

    the current status, or NULL if none is set.

    [transfer full][nullable]

    Since: 2017.6

    @@ -233,9 +233,9 @@ ...);

    Get the values corresponding to zero or more keys from the OstreeAsyncProgress. Each key is specified in @... as the key name, followed -by a GVariant format string, followed by the necessary arguments for that -format string, just as for g_variant_get(). After those arguments is the -next key name. The varargs list must be NULL-terminated.

    +by a GVariant format string, followed by the necessary arguments for that +format string, just as for g_variant_get(). After those arguments is the +next key name. The varargs list must be NULL-terminated.

    Each format string must make deep copies of its value, as the values stored in the OstreeAsyncProgress may be freed from another thread after this function returns.

    @@ -257,15 +257,15 @@ 11
    guint32 outstanding_fetches;
     guint64 bytes_received;
    -g_autofree gchar *status = NULL;
    -g_autoptr(GVariant) refs_variant = NULL;
    +g_autofree gchar *status = NULL;
    +g_autoptr(GVariant) refs_variant = NULL;
     
     ostree_async_progress_get (progress,
                                "outstanding-fetches", "u", &outstanding_fetches,
                                "bytes-received", "t", &bytes_received,
                                "status", "s", &status,
                                "refs", "@a{ss}", &refs_variant,
    -                           NULL);
    @@ -288,7 +288,7 @@

    ...

    key name, format string, GVariant return locations, …, followed by NULL

    key name, format string, GVariant return locations, …, followed by NULL

     

    status

    new status string, or NULL to clear the status.

    new status string, or NULL to clear the status.

    [nullable]
    @@ -440,7 +440,7 @@

    ...

    -

    key name, format string, GVariant parameters, …, followed by NULL

    +

    key name, format string, GVariant parameters, …, followed by NULL

      @@ -454,13 +454,13 @@
    void
     ostree_async_progress_set_variant (OstreeAsyncProgress *self,
                                        const char *key,
    -                                   GVariant *value);
    + GVariant *value);

    Assign a new value to the given key , replacing any existing value. The operation is thread-safe. value may be a floating reference; -g_variant_ref_sink() will be called on it.

    +g_variant_ref_sink() will be called on it.

    Any watchers of the OstreeAsyncProgress will be notified of the change if value differs from the existing value for key @@ -501,7 +501,7 @@

    void
     ostree_async_progress_set_uint (OstreeAsyncProgress *self,
                                     const char *key,
    -                                guint value);
    + guint value);

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

    diff -Nru ostree-2017.8/apidoc/html/ostree-Root-partition-mount-point.html ostree-2017.9/apidoc/html/ostree-Root-partition-mount-point.html --- ostree-2017.8/apidoc/html/ostree-Root-partition-mount-point.html 2017-07-06 19:03:27.000000000 +0000 +++ ostree-2017.9/apidoc/html/ostree-Root-partition-mount-point.html 2017-07-27 13:12:13.000000000 +0000 @@ -3,7 +3,7 @@ Root partition mount point: OSTree API references - + @@ -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 () @@ -225,7 +225,7 @@ -gboolean +gboolean ostree_sysroot_get_repo () @@ -233,7 +233,7 @@ -gboolean +gboolean ostree_sysroot_init_osname () @@ -241,7 +241,7 @@ -gboolean +gboolean ostree_sysroot_deployment_set_kargs () @@ -249,7 +249,7 @@ -gboolean +gboolean ostree_sysroot_deployment_set_mutable () @@ -257,7 +257,7 @@ -gboolean +gboolean ostree_sysroot_deployment_unlock () @@ -265,7 +265,7 @@ -gboolean +gboolean ostree_sysroot_write_deployments () @@ -273,7 +273,7 @@ -gboolean +gboolean ostree_sysroot_write_deployments_with_options () @@ -281,7 +281,7 @@ -gboolean +gboolean ostree_sysroot_write_origin_file () @@ -289,7 +289,7 @@ -gboolean +gboolean ostree_sysroot_deploy_tree () @@ -313,7 +313,7 @@ -GKeyFile * +GKeyFile * ostree_sysroot_origin_new_from_refspec () @@ -321,7 +321,7 @@ -gboolean +gboolean ostree_sysroot_simple_write_deployment () @@ -364,7 +364,7 @@

    ostree_sysroot_new ()

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

    Parameters

    @@ -375,7 +375,7 @@ - +

    path

    Path to a system root directory, or NULL.

    Path to a system root directory, or NULL.

    [allow-none]
    @@ -401,7 +401,7 @@

    ostree_sysroot_get_path ()

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

    Returns

    @@ -412,10 +412,10 @@

    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 .

    @@ -450,18 +450,18 @@

    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 @@ -495,15 +495,15 @@


    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 @@ -541,9 +541,9 @@

    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

    @@ -581,10 +581,10 @@

    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

    @@ -696,10 +696,10 @@

    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.

    @@ -746,7 +746,7 @@

    ostree_sysroot_get_deployments ()

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

    Parameters

    @@ -791,14 +791,14 @@

    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);
    @@ -870,9 +870,9 @@

    ostree_sysroot_get_deployment_origin_path ()

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

    Parameters

    @@ -897,10 +897,10 @@

    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.

    @@ -934,10 +934,10 @@

    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.

    @@ -1001,11 +1001,11 @@

    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 .

    @@ -1045,11 +1045,11 @@

    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.

    @@ -1089,12 +1089,12 @@

    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 @@ -1140,12 +1140,12 @@


    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.

    @@ -1190,12 +1190,12 @@

    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 @@ -1243,11 +1243,11 @@


    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);

    Older version of ostree_sysroot_write_deployments_with_options(). This version will perform post-deployment cleanup by default.

    @@ -1286,13 +1286,13 @@

    ostree_sysroot_write_deployments_with_options ()

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

    Assuming new_deployments have already been deployed in place on disk via ostree_sysroot_deploy_tree(), atomically update bootloader configuration. By @@ -1342,17 +1342,17 @@


    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 .

    @@ -1396,16 +1396,16 @@

    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 @@ -1446,7 +1446,7 @@

    - + @@ -1513,7 +1513,7 @@ OstreeDeployment **out_pending, OstreeDeployment **out_rollback);

    Find the pending and rollback deployments for osname -. Pass NULL for osname +. Pass NULL for osname to use the booted deployment's osname. By default, pending deployment is the first deployment in the order that matches osname @@ -1558,7 +1558,7 @@


    ostree_sysroot_origin_new_from_refspec ()

    -
    GKeyFile *
    +
    GKeyFile *
     ostree_sysroot_origin_new_from_refspec
                                    (OstreeSysroot *self,
                                     const char *refspec);
    @@ -1594,15 +1594,15 @@

    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 -Nru ostree-2017.8/apidoc/html/ostree-SELinux-policy-management.html ostree-2017.9/apidoc/html/ostree-SELinux-policy-management.html --- ostree-2017.8/apidoc/html/ostree-SELinux-policy-management.html 2017-07-06 19:03:27.000000000 +0000 +++ ostree-2017.9/apidoc/html/ostree-SELinux-policy-management.html 2017-07-27 13:12:13.000000000 +0000 @@ -3,7 +3,7 @@ SELinux policy management: OSTree API references - + @@ -57,7 +57,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 () @@ -72,7 +72,7 @@
    -gboolean +gboolean ostree_sepolicy_get_label () @@ -87,7 +87,7 @@
    -gboolean +gboolean ostree_sepolicy_restorecon () @@ -95,7 +95,7 @@
    -gboolean +gboolean ostree_sepolicy_setfscreatecon () @@ -141,9 +141,9 @@

    ostree_sepolicy_new ()

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

    Parameters

    @@ -183,8 +183,8 @@

    ostree_sepolicy_new_at ()

    OstreeSePolicy *
     ostree_sepolicy_new_at (int rootfs_dfd,
    -                        GCancellable *cancellable,
    -                        GError **error);
    + GCancellable *cancellable, + GError **error);

    Parameters

    @@ -222,7 +222,7 @@

    ostree_sepolicy_get_path ()

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

    Returns

    @@ -244,18 +244,18 @@

    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

    @@ -314,15 +314,15 @@

    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.

    @@ -361,7 +361,7 @@
    - + @@ -381,11 +381,11 @@

    ostree_sepolicy_setfscreatecon ()

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

    Parameters

    out_new_label

    New label, or NULL if unchanged.

    New label, or NULL if unchanged.

    [allow-none][out]
    diff -Nru ostree-2017.8/apidoc/html/ostree-Simple-upgrade-class.html ostree-2017.9/apidoc/html/ostree-Simple-upgrade-class.html --- ostree-2017.8/apidoc/html/ostree-Simple-upgrade-class.html 2017-07-06 19:03:27.000000000 +0000 +++ ostree-2017.9/apidoc/html/ostree-Simple-upgrade-class.html 2017-07-27 13:12:13.000000000 +0000 @@ -3,7 +3,7 @@ Simple upgrade class: OSTree API references - + @@ -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 @@

    ostree_sysroot_upgrader_new ()

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

    Parameters

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

    Parameters

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

    Parameters

    @@ -301,7 +301,7 @@

    ostree_sysroot_upgrader_get_origin ()

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

    Parameters

    @@ -320,14 +320,14 @@

    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

    @@ -346,18 +346,18 @@

    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 .

    @@ -416,18 +416,18 @@

    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 @@ -469,21 +469,21 @@


    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

    @@ -535,15 +535,15 @@

    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.

    @@ -603,10 +603,10 @@

    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 -Nru ostree-2017.8/apidoc/html/reference.html ostree-2017.9/apidoc/html/reference.html --- ostree-2017.8/apidoc/html/reference.html 2017-07-06 19:03:27.000000000 +0000 +++ ostree-2017.9/apidoc/html/reference.html 2017-07-27 13:12:13.000000000 +0000 @@ -3,7 +3,7 @@ API Reference: OSTree API references - + diff -Nru ostree-2017.8/apidoc/ostree-experimental-sections.txt ostree-2017.9/apidoc/ostree-experimental-sections.txt --- ostree-2017.8/apidoc/ostree-experimental-sections.txt 2017-07-04 09:59:08.000000000 +0000 +++ ostree-2017.9/apidoc/ostree-experimental-sections.txt 2017-07-26 20:37:59.000000000 +0000 @@ -28,6 +28,7 @@ ostree_repo_pull_from_remotes_async ostree_repo_pull_from_remotes_finish ostree_repo_resolve_keyring_for_collection +OSTREE_REPO_METADATA_REF
    diff -Nru ostree-2017.8/apidoc/version.xml ostree-2017.9/apidoc/version.xml --- ostree-2017.8/apidoc/version.xml 2017-06-29 17:30:17.000000000 +0000 +++ ostree-2017.9/apidoc/version.xml 2017-07-27 13:12:07.000000000 +0000 @@ -1 +1 @@ -2017.8 \ No newline at end of file +2017.9 \ No newline at end of file diff -Nru ostree-2017.8/build-aux/config.guess ostree-2017.9/build-aux/config.guess --- ostree-2017.8/build-aux/config.guess 2017-06-29 17:29:14.000000000 +0000 +++ ostree-2017.9/build-aux/config.guess 2017-07-26 20:31:10.000000000 +0000 @@ -1,8 +1,8 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2015 Free Software Foundation, Inc. +# Copyright 1992-2016 Free Software Foundation, Inc. -timestamp='2015-01-01' +timestamp='2016-10-02' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -27,7 +27,7 @@ # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess # # Please send patches to . @@ -50,7 +50,7 @@ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2015 Free Software Foundation, Inc. +Copyright 1992-2016 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -168,19 +168,29 @@ # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ + /sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || \ + echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; + earmv*) + arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'` + endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'` + machine=${arch}${endian}-unknown + ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. + # to ELF recently (or will in the future) and ABI. case "${UNAME_MACHINE_ARCH}" in + earm*) + os=netbsdelf + ;; arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ @@ -197,6 +207,13 @@ os=netbsd ;; esac + # Determine ABI tags. + case "${UNAME_MACHINE_ARCH}" in + earm*) + expr='s/^earmv[0-9]/-eabi/;s/eb$//' + abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"` + ;; + esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need @@ -207,13 +224,13 @@ release='-gnu' ;; *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" + echo "${machine}-${os}${release}${abi}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` @@ -223,6 +240,10 @@ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; + *:LibertyBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE} + exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; @@ -235,6 +256,9 @@ *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; + *:Sortix:*:*) + echo ${UNAME_MACHINE}-unknown-sortix + exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) @@ -251,42 +275,42 @@ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; + UNAME_MACHINE=alphaev5 ;; "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; + UNAME_MACHINE=alphaev56 ;; "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; + UNAME_MACHINE=alphapca56 ;; "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; + UNAME_MACHINE=alphapca57 ;; "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; + UNAME_MACHINE=alphaev6 ;; "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; + UNAME_MACHINE=alphaev67 ;; "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; + UNAME_MACHINE=alphaev69 ;; "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; + UNAME_MACHINE=alphaev7 ;; "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; + UNAME_MACHINE=alphaev79 ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 @@ -359,16 +383,16 @@ exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build - SUN_ARCH="i386" + SUN_ARCH=i386 # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then - SUN_ARCH="x86_64" + SUN_ARCH=x86_64 fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` @@ -393,7 +417,7 @@ exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} @@ -618,13 +642,13 @@ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 + 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + 32) HP_ARCH=hppa2.0n ;; + 64) HP_ARCH=hppa2.0w ;; + '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 esac ;; esac fi @@ -663,11 +687,11 @@ exit (0); } EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac - if [ ${HP_ARCH} = "hppa2.0w" ] + if [ ${HP_ARCH} = hppa2.0w ] then eval $set_cc_for_build @@ -680,12 +704,12 @@ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then - HP_ARCH="hppa2.0w" + HP_ARCH=hppa2.0w else - HP_ARCH="hppa64" + HP_ARCH=hppa64 fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} @@ -790,14 +814,14 @@ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) @@ -879,7 +903,7 @@ exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix @@ -902,7 +926,7 @@ EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="gnulibc1" ; fi + if test "$?" = 0 ; then LIBC=gnulibc1 ; fi echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arc:Linux:*:* | arceb:Linux:*:*) @@ -933,6 +957,9 @@ crisv32:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; + e2k:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; frv:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; @@ -945,6 +972,9 @@ ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; + k1om:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; @@ -970,6 +1000,9 @@ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; + mips64el:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; openrisc*:Linux:*:*) echo or1k-unknown-linux-${LIBC} exit ;; @@ -1002,6 +1035,9 @@ ppcle:Linux:*:*) echo powerpcle-unknown-linux-${LIBC} exit ;; + riscv32:Linux:*:* | riscv64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; @@ -1021,7 +1057,7 @@ echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} @@ -1100,7 +1136,7 @@ # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configury will decide that + # prints for the "djgpp" host, or else GDB configure will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; @@ -1249,6 +1285,9 @@ SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; + SX-ACE:SUPER-UX:*:*) + echo sxace-nec-superux${UNAME_RELEASE} + exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; @@ -1262,9 +1301,9 @@ UNAME_PROCESSOR=powerpc fi if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in @@ -1286,7 +1325,7 @@ exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then + if test "$UNAME_PROCESSOR" = x86; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi @@ -1317,7 +1356,7 @@ # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. - if test "$cputype" = "386"; then + if test "$cputype" = 386; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" @@ -1359,7 +1398,7 @@ echo i386-pc-xenix exit ;; i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'` exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos @@ -1370,23 +1409,25 @@ x86_64:VMkernel:*:*) echo ${UNAME_MACHINE}-unknown-esx exit ;; + amd64:Isilon\ OneFS:*:*) + echo x86_64-unknown-onefs + exit ;; esac cat >&2 < in order to provide the needed -information to handle your system. +If $0 has already been updated, send the following data and any +information you think might be pertinent to config-patches@gnu.org to +provide the necessary information to handle your system. config.guess timestamp = $timestamp diff -Nru ostree-2017.8/build-aux/config.sub ostree-2017.9/build-aux/config.sub --- ostree-2017.8/build-aux/config.sub 2017-06-29 17:29:14.000000000 +0000 +++ ostree-2017.9/build-aux/config.sub 2017-07-26 20:31:10.000000000 +0000 @@ -1,8 +1,8 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright 1992-2015 Free Software Foundation, Inc. +# Copyright 1992-2016 Free Software Foundation, Inc. -timestamp='2015-01-01' +timestamp='2016-09-05' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -33,7 +33,7 @@ # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases @@ -53,8 +53,7 @@ me=`echo "$0" | sed -e 's,.*/,,'` usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS +Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS Canonicalize a configuration name. @@ -68,7 +67,7 @@ version="\ GNU config.sub ($timestamp) -Copyright 1992-2015 Free Software Foundation, Inc. +Copyright 1992-2016 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -117,8 +116,8 @@ case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ - knetbsd*-gnu* | netbsd*-gnu* | \ - kopensolaris*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ + kopensolaris*-gnu* | cloudabi*-eabi* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` @@ -255,11 +254,12 @@ | arc | arceb \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ + | ba \ | be32 | be64 \ | bfin \ | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ - | epiphany \ + | e2k | epiphany \ | fido | fr30 | frv | ft32 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ @@ -305,7 +305,7 @@ | riscv32 | riscv64 \ | rl78 | rx \ | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ @@ -376,12 +376,13 @@ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ + | ba-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ + | e2k-* | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ @@ -428,12 +429,13 @@ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ + | riscv32-* | riscv64-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ @@ -518,6 +520,9 @@ basic_machine=i386-pc os=-aros ;; + asmjs) + basic_machine=asmjs-unknown + ;; aux) basic_machine=m68k-apple os=-aux @@ -638,6 +643,14 @@ basic_machine=m68k-bull os=-sysv3 ;; + e500v[12]) + basic_machine=powerpc-unknown + os=$os"spe" + ;; + e500v[12]-*) + basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + os=$os"spe" + ;; ebmon29k) basic_machine=a29k-amd os=-ebmon @@ -1017,7 +1030,7 @@ ppc-* | ppcbe-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; - ppcle | powerpclittle | ppc-le | powerpc-little) + ppcle | powerpclittle) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) @@ -1027,7 +1040,7 @@ ;; ppc64-* | ppc64p7-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) + ppc64le | powerpc64little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) @@ -1373,18 +1386,18 @@ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* \ + | -aos* | -aros* | -cloudabi* | -sortix* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -bitrig* | -openbsd* | -solidbsd* \ + | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ @@ -1393,7 +1406,8 @@ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ + | -onefs* | -tirtos* | -phoenix*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1525,6 +1539,8 @@ ;; -nacl*) ;; + -ios) + ;; -none) ;; *) diff -Nru ostree-2017.8/configure ostree-2017.9/configure --- ostree-2017.8/configure 2017-07-06 19:02:21.000000000 +0000 +++ ostree-2017.9/configure 2017-07-27 13:11:22.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for libostree 2017.8. +# Generated by GNU Autoconf 2.69 for libostree 2017.9. # # Report bugs to . # @@ -590,8 +590,8 @@ # Identity of this package. PACKAGE_NAME='libostree' PACKAGE_TARNAME='libostree' -PACKAGE_VERSION='2017.8' -PACKAGE_STRING='libostree 2017.8' +PACKAGE_VERSION='2017.9' +PACKAGE_STRING='libostree 2017.9' PACKAGE_BUGREPORT='walters@verbum.org' PACKAGE_URL='' @@ -1533,7 +1533,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures libostree 2017.8 to adapt to many kinds of systems. +\`configure' configures libostree 2017.9 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1603,7 +1603,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libostree 2017.8:";; + short | recursive ) echo "Configuration of libostree 2017.9:";; esac cat <<\_ACEOF @@ -1839,7 +1839,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libostree configure 2017.8 +libostree configure 2017.9 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2254,7 +2254,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libostree $as_me 2017.8, which was +It was created by libostree $as_me 2017.9, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3122,7 +3122,7 @@ # Define the identity of the package. PACKAGE='libostree' - VERSION='2017.8' + VERSION='2017.9' # Some tools Automake needs. @@ -5856,11 +5856,15 @@ YEAR_VERSION=2017 -RELEASE_VERSION=8 +RELEASE_VERSION=9 -PACKAGE_VERSION=2017.8 +PACKAGE_VERSION=2017.9 +if echo "$CFLAGS" | grep -q -E -e '-Werror($| )'; then : + +else + for flag in \ -pipe \ @@ -5912,6 +5916,7 @@ done +fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fsanitize=address in CFLAGS" >&5 @@ -17956,7 +17961,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libostree $as_me 2017.8, which was +This file was extended by libostree $as_me 2017.9, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18022,7 +18027,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -libostree config.status 2017.8 +libostree config.status 2017.9 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -Nru ostree-2017.8/configure.ac ostree-2017.9/configure.ac --- ostree-2017.8/configure.ac 2017-07-06 18:58:30.000000000 +0000 +++ ostree-2017.9/configure.ac 2017-07-27 10:20:07.000000000 +0000 @@ -4,7 +4,7 @@ dnl in test-symbols.sh, and also set is_release_build=yes below. Then make dnl another post-release commit to bump the version, and set is_release_build=no. m4_define([year_version], [2017]) -m4_define([release_version], [8]) +m4_define([release_version], [9]) m4_define([package_version], [year_version.release_version]) AC_INIT([libostree], [package_version], [walters@verbum.org]) is_release_build=yes @@ -28,6 +28,7 @@ AC_SUBST([RELEASE_VERSION], [release_version]) AC_SUBST([PACKAGE_VERSION], [package_version]) +AS_IF([echo "$CFLAGS" | grep -q -E -e '-Werror($| )'], [], [ CC_CHECK_FLAGS_APPEND([WARN_CFLAGS], [CFLAGS], [\ -pipe \ -Wall \ @@ -46,7 +47,7 @@ -Werror=misleading-indentation \ -Werror=missing-include-dirs -Werror=aggregate-return \ -Werror=unused-result \ -]) +])]) AC_SUBST(WARN_CFLAGS) AC_MSG_CHECKING([for -fsanitize=address in CFLAGS]) diff -Nru ostree-2017.8/debian/changelog ostree-2017.9/debian/changelog --- ostree-2017.8/debian/changelog 2017-07-19 21:18:20.000000000 +0000 +++ ostree-2017.9/debian/changelog 2017-07-28 13:43:30.000000000 +0000 @@ -1,3 +1,13 @@ +ostree (2017.9-1) unstable; urgency=medium + + * New upstream release + - Drop backported patch + - Update symbols file + * debian/rules: Adjust a comment to avoid Lintian thinking this is a + dh_make template + + -- Simon McVittie Fri, 28 Jul 2017 14:43:30 +0100 + ostree (2017.8-1) unstable; urgency=medium * New upstream release diff -Nru ostree-2017.8/debian/libostree-1-1.symbols ostree-2017.9/debian/libostree-1-1.symbols --- ostree-2017.8/debian/libostree-1-1.symbols 2017-07-19 21:18:20.000000000 +0000 +++ ostree-2017.9/debian/libostree-1-1.symbols 2017-07-28 13:43:30.000000000 +0000 @@ -14,6 +14,7 @@ LIBOSTREE_2017.6@LIBOSTREE_2017.6 2017.6 LIBOSTREE_2017.7@LIBOSTREE_2017.7 2017.7 LIBOSTREE_2017.8@LIBOSTREE_2017.8 2017.8 + LIBOSTREE_2017.9@LIBOSTREE_2017.9 2017.9 ostree_async_progress_finish@LIBOSTREE_2016.3 2016.4 ostree_async_progress_get@LIBOSTREE_2017.6 2017.6 ostree_async_progress_get_status@LIBOSTREE_2016.3 2016.4 diff -Nru ostree-2017.8/debian/patches/lib-commit-Fix-EBADF-with-GENERATE_SIZES-option-for-commi.patch ostree-2017.9/debian/patches/lib-commit-Fix-EBADF-with-GENERATE_SIZES-option-for-commi.patch --- ostree-2017.8/debian/patches/lib-commit-Fix-EBADF-with-GENERATE_SIZES-option-for-commi.patch 2017-07-19 21:18:20.000000000 +0000 +++ ostree-2017.9/debian/patches/lib-commit-Fix-EBADF-with-GENERATE_SIZES-option-for-commi.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,57 +0,0 @@ -From: Colin Walters -Date: Wed, 19 Jul 2017 09:19:16 -0400 -Subject: lib/commit: Fix EBADF with GENERATE_SIZES option for commit - -Regression from previous tmpfile refactoring; unfortunately -the `OSTREE_REPO_COMMIT_MODIFIER_FLAGS_GENERATE_SIZES` option -only has coverage via gjs currently. - -Might expose it via the cmdline in a later option, but in the big picture the -idea was that this data is better kept in static deltas. - -Bug: https://github.com/ostreedev/ostree/issues/1014 -Forwarded: https://github.com/ostreedev/ostree/pull/1016 ---- - src/libostree/ostree-repo-commit.c | 22 +++++++++++----------- - 1 file changed, 11 insertions(+), 11 deletions(-) - -diff --git a/src/libostree/ostree-repo-commit.c b/src/libostree/ostree-repo-commit.c -index baeef3f..332f22a 100644 ---- a/src/libostree/ostree-repo-commit.c -+++ b/src/libostree/ostree-repo-commit.c -@@ -733,6 +733,17 @@ write_content_object (OstreeRepo *self, - } - else - { -+ /* Update size metadata if configured */ -+ if (indexable && object_file_type == G_FILE_TYPE_REGULAR) -+ { -+ struct stat stbuf; -+ -+ if (!glnx_fstat (tmpf.fd, &stbuf, error)) -+ return FALSE; -+ -+ repo_store_size_entry (self, actual_checksum, unpacked_size, stbuf.st_size); -+ } -+ - /* This path is for regular files */ - if (!commit_loose_regfile_object (self, actual_checksum, &tmpf, - uid, gid, mode, -@@ -742,17 +753,6 @@ write_content_object (OstreeRepo *self, - ostree_object_type_to_string (OSTREE_OBJECT_TYPE_FILE)); - } - -- /* Update size metadata if configured */ -- if (indexable && object_file_type == G_FILE_TYPE_REGULAR) -- { -- struct stat stbuf; -- -- if (!glnx_fstat (tmpf.fd, &stbuf, error)) -- return FALSE; -- -- repo_store_size_entry (self, actual_checksum, unpacked_size, stbuf.st_size); -- } -- - /* Update statistics */ - g_mutex_lock (&self->txn_stats_lock); - self->txn_stats.content_objects_written++; diff -Nru ostree-2017.8/debian/patches/series ostree-2017.9/debian/patches/series --- ostree-2017.8/debian/patches/series 2017-07-19 21:18:20.000000000 +0000 +++ ostree-2017.9/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -lib-commit-Fix-EBADF-with-GENERATE_SIZES-option-for-commi.patch diff -Nru ostree-2017.8/debian/rules ostree-2017.9/debian/rules --- ostree-2017.8/debian/rules 2017-07-19 21:18:20.000000000 +0000 +++ ostree-2017.9/debian/rules 2017-07-28 13:43:30.000000000 +0000 @@ -58,7 +58,7 @@ rm -f debian/tmp/usr/lib/*/*.la rm -f debian/tmp/usr/lib/installed-tests/libostree/*.la : - # FIXME: when someone documents how to test these (#824649) they + # TODO: when someone documents how to test these (#824649) they # should be installed in a new ostree-boot package: see # debian/ostree-boot.* and https://bugs.debian.org/824650 rm -f debian/tmp/etc/dracut.conf.d/ostree.conf diff -Nru ostree-2017.8/libglnx/glnx-dirfd.c ostree-2017.9/libglnx/glnx-dirfd.c --- ostree-2017.8/libglnx/glnx-dirfd.c 2017-06-30 16:12:17.000000000 +0000 +++ ostree-2017.9/libglnx/glnx-dirfd.c 2017-07-26 20:38:01.000000000 +0000 @@ -67,9 +67,7 @@ { int ret = glnx_opendirat_with_errno (dfd, path, follow); if (ret == -1) - { - return glnx_throw_errno_prefix (error, "openat"); - } + return glnx_throw_errno_prefix (error, "opendir(%s)", path); *out_fd = ret; return TRUE; } diff -Nru ostree-2017.8/libglnx/glnx-dirfd.h ostree-2017.9/libglnx/glnx-dirfd.h --- ostree-2017.8/libglnx/glnx-dirfd.h 2017-06-30 16:12:17.000000000 +0000 +++ ostree-2017.9/libglnx/glnx-dirfd.h 2017-07-26 20:38:01.000000000 +0000 @@ -21,6 +21,8 @@ #pragma once #include +#include +#include #include #include #include @@ -83,6 +85,34 @@ void glnx_gen_temp_name (gchar *tmpl); +/** + * glnx_ensure_dir: + * @dfd: directory fd + * @path: Directory path + * @mode: Mode + * @error: Return location for a #GError, or %NULL + * + * Wrapper around mkdirat() which ignores adds #GError support, ensures that + * it retries on %EINTR, and also ignores `EEXIST`. + * + * See also `glnx_shutil_mkdir_p_at()` for recursive handling. + * + * Returns: %TRUE on success, %FALSE otherwise + */ +static inline gboolean +glnx_ensure_dir (int dfd, + const char *path, + mode_t mode, + GError **error) +{ + if (TEMP_FAILURE_RETRY (mkdirat (dfd, path, mode)) != 0) + { + if (G_UNLIKELY (errno != EEXIST)) + return glnx_throw_errno_prefix (error, "mkdirat(%s)", path); + } + return TRUE; +} + gboolean glnx_mkdtempat (int dfd, gchar *tmpl, int mode, diff -Nru ostree-2017.8/libglnx/glnx-errors.h ostree-2017.9/libglnx/glnx-errors.h --- ostree-2017.8/libglnx/glnx-errors.h 2017-05-26 00:45:56.000000000 +0000 +++ ostree-2017.9/libglnx/glnx-errors.h 2017-07-26 20:38:01.000000000 +0000 @@ -84,6 +84,38 @@ #define glnx_prefix_error_null(error, args...) \ ({glnx_prefix_error (error, args); NULL;}) +/** + * GLNX_AUTO_PREFIX_ERROR: + * + * An autocleanup-based macro to automatically call `g_prefix_error()` (also with a colon+space `: `) + * when it goes out of scope. This is useful when one wants error strings built up by the callee + * function, not all callers. + * + * ``` + * gboolean start_http_request (..., GError **error) + * { + * GLNX_AUTO_PREFIX_ERROR ("HTTP request", error) + * + * if (!libhttp_request_start (..., error)) + * return FALSE; + * ... + * return TRUE; + * ``` + */ +typedef struct { + const char *prefix; + GError **error; +} GLnxAutoErrorPrefix; +static inline void +glnx_cleanup_auto_prefix_error (GLnxAutoErrorPrefix *prefix) +{ + if (prefix->error && *(prefix->error)) + g_prefix_error (prefix->error, "%s: ", prefix->prefix); +} +G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(GLnxAutoErrorPrefix, glnx_cleanup_auto_prefix_error) +#define GLNX_AUTO_PREFIX_ERROR(text, error) \ + G_GNUC_UNUSED g_auto(GLnxAutoErrorPrefix) _GLNX_MAKE_ANONYMOUS(_glnxautoprefixerror_) = { text, error } + /* Set @error using the value of `g_strerror (errno)`. * * This function returns %FALSE so it can be used conveniently in a single diff -Nru ostree-2017.8/libglnx/glnx-fdio.c ostree-2017.9/libglnx/glnx-fdio.c --- ostree-2017.8/libglnx/glnx-fdio.c 2017-06-30 16:12:17.000000000 +0000 +++ ostree-2017.9/libglnx/glnx-fdio.c 2017-07-26 20:38:01.000000000 +0000 @@ -53,6 +53,15 @@ sizeof(type) <= 4 ? 10 : \ sizeof(type) <= 8 ? 20 : sizeof(int[-2*(sizeof(type) > 8)]))) +gboolean +glnx_stdio_file_flush (FILE *f, GError **error) +{ + if (fflush (f) != 0) + return glnx_throw_errno_prefix (error, "fflush"); + if (ferror (f) != 0) + return glnx_throw_errno_prefix (error, "ferror"); + return TRUE; +} /* An implementation of renameat2(..., RENAME_NOREPLACE) * with fallback to a non-atomic version. @@ -169,13 +178,12 @@ tmpf->initialized = FALSE; } -/* Allocate a temporary file, using Linux O_TMPFILE if available. +/* Allocate a temporary file, using Linux O_TMPFILE if available. The file mode + * will be 0600. + * * The result will be stored in @out_tmpf, which is caller allocated * so you can store it on the stack in common scenarios. * - * Note that with O_TMPFILE, the file mode will be `000`; you likely - * want to chmod it before calling glnx_link_tmpfile_at(). - * * The directory fd @dfd must live at least as long as the output @out_tmpf. */ gboolean @@ -185,6 +193,7 @@ GLnxTmpfile *out_tmpf, GError **error) { + const guint mode = 0600; glnx_fd_close int fd = -1; int count; @@ -200,11 +209,16 @@ * link_tmpfile() below to rename the result after writing the file * in full. */ #if defined(O_TMPFILE) && !defined(DISABLE_OTMPFILE) && !defined(ENABLE_WRPSEUDO_COMPAT) - fd = openat (dfd, subpath, O_TMPFILE|flags, 0600); + fd = openat (dfd, subpath, O_TMPFILE|flags, mode); if (fd == -1 && !(G_IN_SET(errno, ENOSYS, EISDIR, EOPNOTSUPP))) return glnx_throw_errno_prefix (error, "open(O_TMPFILE)"); if (fd != -1) { + /* Workaround for https://sourceware.org/bugzilla/show_bug.cgi?id=17523 + * See also https://github.com/ostreedev/ostree/issues/991 + */ + if (fchmod (fd, mode) < 0) + return glnx_throw_errno_prefix (error, "fchmod"); out_tmpf->initialized = TRUE; out_tmpf->src_dfd = dfd; /* Copied; caller must keep open */ out_tmpf->fd = glnx_steal_fd (&fd); @@ -221,7 +235,7 @@ { glnx_gen_temp_name (tmp); - fd = openat (dfd, tmp, O_CREAT|O_EXCL|O_NOFOLLOW|O_NOCTTY|flags, 0600); + fd = openat (dfd, tmp, O_CREAT|O_EXCL|O_NOFOLLOW|O_NOCTTY|flags, mode); if (fd < 0) { if (errno == EEXIST) @@ -373,6 +387,35 @@ return TRUE; } +/** + * glnx_openat_rdonly: + * @dfd: File descriptor for origin directory + * @path: Pathname, relative to @dfd + * @follow: Whether or not to follow symbolic links in the final component + * @out_fd: (out): File descriptor + * @error: Error + * + * Use openat() to open a file, with flags `O_RDONLY | O_CLOEXEC | O_NOCTTY`. + * Like the other libglnx wrappers, will use `TEMP_FAILURE_RETRY` and + * also includes @path in @error in case of failure. + */ +gboolean +glnx_openat_rdonly (int dfd, + const char *path, + gboolean follow, + int *out_fd, + GError **error) +{ + int flags = O_RDONLY | O_CLOEXEC | O_NOCTTY; + if (!follow) + flags |= O_NOFOLLOW; + int fd = TEMP_FAILURE_RETRY (openat (dfd, path, flags)); + if (fd == -1) + return glnx_throw_errno_prefix (error, "openat(%s)", path); + *out_fd = fd; + return TRUE; +} + static guint8* glnx_fd_readall_malloc (int fd, gsize *out_len, @@ -510,9 +553,9 @@ { dfd = glnx_dirfd_canonicalize (dfd); - glnx_fd_close int fd = TEMP_FAILURE_RETRY (openat (dfd, subpath, O_RDONLY | O_NOCTTY | O_CLOEXEC)); - if (G_UNLIKELY (fd == -1)) - return glnx_null_throw_errno_prefix (error, "open(%s)", subpath); + glnx_fd_close int fd = -1; + if (!glnx_openat_rdonly (dfd, subpath, TRUE, &fd, error)) + return NULL; gsize len; g_autofree char *buf = glnx_fd_readall_utf8 (fd, &len, cancellable, error); @@ -808,12 +851,8 @@ goto out; } - src_fd = TEMP_FAILURE_RETRY (openat (src_dfd, src_subpath, O_RDONLY | O_CLOEXEC | O_NOCTTY | O_NOFOLLOW)); - if (src_fd == -1) - { - glnx_set_error_from_errno (error); - goto out; - } + if (!glnx_openat_rdonly (src_dfd, src_subpath, FALSE, &src_fd, error)) + goto out; dest_open_flags = O_WRONLY | O_CREAT | O_CLOEXEC | O_NOCTTY; if (!(copyflags & GLNX_FILE_COPY_OVERWRITE)) @@ -1008,28 +1047,3 @@ return TRUE; } - -/** - * glnx_stream_fstat: - * @stream: A stream containing a Unix file descriptor - * @stbuf: Memory location to write stat buffer - * @error: - * - * Some streams created via libgsystem are #GUnixInputStream; these do - * not support e.g. g_file_input_stream_query_info(). This function - * allows dropping to the raw unix fstat() call for these types of - * streams, while still conveniently wrapped with the normal GLib - * handling of @error. - */ -gboolean -glnx_stream_fstat (GFileDescriptorBased *stream, - struct stat *stbuf, - GError **error) -{ - int fd = g_file_descriptor_based_get_fd (stream); - - if (fstat (fd, stbuf) == -1) - return glnx_throw_errno_prefix (error, "fstat"); - - return TRUE; -} diff -Nru ostree-2017.8/libglnx/glnx-fdio.h ostree-2017.9/libglnx/glnx-fdio.h --- ostree-2017.8/libglnx/glnx-fdio.h 2017-06-30 16:12:17.000000000 +0000 +++ ostree-2017.9/libglnx/glnx-fdio.h 2017-07-26 20:38:01.000000000 +0000 @@ -50,6 +50,23 @@ return (basename) (path); } +/* Utilities for standard FILE* */ +static inline void +glnx_stdio_file_cleanup (void *filep) +{ + FILE *f = filep; + if (f) + fclose (f); +} +G_DEFINE_AUTOPTR_CLEANUP_FUNC(FILE, glnx_stdio_file_cleanup) + +/** + * glnx_stdio_file_flush: + * Call fflush() and check ferror(). + */ +gboolean +glnx_stdio_file_flush (FILE *f, GError **error); + typedef struct { gboolean initialized; gboolean anonymous; @@ -85,6 +102,13 @@ const char *target, GError **error); +gboolean +glnx_openat_rdonly (int dfd, + const char *path, + gboolean follow, + int *out_fd, + GError **error); + GBytes * glnx_fd_readall_bytes (int fd, GCancellable *cancellable, @@ -164,11 +188,6 @@ GCancellable *cancellable, GError **error); -gboolean -glnx_stream_fstat (GFileDescriptorBased *stream, - struct stat *stbuf, - GError **error); - int glnx_renameat2_noreplace (int olddirfd, const char *oldpath, int newdirfd, const char *newpath); int glnx_renameat2_exchange (int olddirfd, const char *oldpath, @@ -224,8 +243,29 @@ GError **error) { if (TEMP_FAILURE_RETRY (fstat (fd, buf)) != 0) - return glnx_throw_errno (error); + return glnx_throw_errno_prefix (error, "fstat"); + return TRUE; +} +/** + * glnx_fchmod: + * @fd: FD + * @mode: Mode + * @error: Return location for a #GError, or %NULL + * + * Wrapper around fchmod() which adds #GError support and ensures that it + * retries on %EINTR. + * + * Returns: %TRUE on success, %FALSE otherwise + * Since: UNRELEASED + */ +static inline gboolean +glnx_fchmod (int fd, + mode_t mode, + GError **error) +{ + if (TEMP_FAILURE_RETRY (fchmod (fd, mode)) != 0) + return glnx_throw_errno_prefix (error, "fchmod"); return TRUE; } diff -Nru ostree-2017.8/libglnx/glnx-shutil.c ostree-2017.9/libglnx/glnx-shutil.c --- ostree-2017.8/libglnx/glnx-shutil.c 2017-06-30 16:12:17.000000000 +0000 +++ ostree-2017.9/libglnx/glnx-shutil.c 2017-07-26 20:38:01.000000000 +0000 @@ -185,6 +185,8 @@ * * Similar to g_mkdir_with_parents(), except operates relative to the * directory fd @dfd. + * + * See also glnx_ensure_dir() for a non-recursive version. */ gboolean glnx_shutil_mkdir_p_at (int dfd, diff -Nru ostree-2017.8/libglnx/README.md ostree-2017.9/libglnx/README.md --- ostree-2017.8/libglnx/README.md 2017-05-15 20:08:12.000000000 +0000 +++ ostree-2017.9/libglnx/README.md 2017-07-26 20:38:01.000000000 +0000 @@ -17,7 +17,7 @@ ---- There are multiple projects which have a hard dependency on Linux and -GLib, such as NetworkManager, ostree, xdg-app, etc. It makes sense +GLib, such as NetworkManager, ostree, flatpak, etc. It makes sense for them to be able to share Linux-specific APIs. This module also contains some code taken from systemd, which has very diff -Nru ostree-2017.8/libglnx/tests/test-libglnx-errors.c ostree-2017.9/libglnx/tests/test-libglnx-errors.c --- ostree-2017.8/libglnx/tests/test-libglnx-errors.c 2017-05-26 18:35:01.000000000 +0000 +++ ostree-2017.9/libglnx/tests/test-libglnx-errors.c 2017-07-26 20:38:01.000000000 +0000 @@ -125,6 +125,48 @@ g_assert_cmpint (fd, ==, -1); } +static void +test_error_auto_nothrow (GError **error) +{ + GLNX_AUTO_PREFIX_ERROR("foo", error); + /* Side effect to avoid otherwise empty function */ + g_assert_no_error (*error); +} + +static void +test_error_auto_throw (GError **error) +{ + GLNX_AUTO_PREFIX_ERROR("foo", error); + (void) glnx_throw (error, "oops"); +} + +static void +test_error_auto_throw_recurse (GError **error) +{ + GLNX_AUTO_PREFIX_ERROR("foo", error); + + if (TRUE) + { + GLNX_AUTO_PREFIX_ERROR("bar", error); + (void) glnx_throw (error, "oops"); + } +} + +static void +test_error_auto (void) +{ + g_autoptr(GError) error = NULL; + test_error_auto_nothrow (&error); + g_assert_no_error (error); + test_error_auto_throw (&error); + g_assert_nonnull (error); + g_assert_cmpstr (error->message, ==, "foo: oops"); + g_clear_error (&error); + test_error_auto_throw_recurse (&error); + g_assert_nonnull (error); + g_assert_cmpstr (error->message, ==, "foo: bar: oops"); +} + int main (int argc, char **argv) { int ret; @@ -133,6 +175,7 @@ g_test_add_func ("/error-throw", test_error_throw); g_test_add_func ("/error-errno", test_error_errno); + g_test_add_func ("/error-auto", test_error_auto); ret = g_test_run(); diff -Nru ostree-2017.8/libglnx/tests/test-libglnx-fdio.c ostree-2017.9/libglnx/tests/test-libglnx-fdio.c --- ostree-2017.8/libglnx/tests/test-libglnx-fdio.c 2017-06-30 16:12:17.000000000 +0000 +++ ostree-2017.9/libglnx/tests/test-libglnx-fdio.c 2017-07-26 20:38:01.000000000 +0000 @@ -137,12 +137,66 @@ g_assert_no_error (local_error); } +static void +test_tmpfile (void) +{ + g_autoptr(GError) local_error = NULL; + GError **error = &local_error; + g_auto(GLnxTmpfile) tmpf = { 0, }; + + if (!glnx_open_tmpfile_linkable_at (AT_FDCWD, ".", O_WRONLY|O_CLOEXEC, &tmpf, error)) + goto out; + + if (glnx_loop_write (tmpf.fd, "foo", strlen ("foo")) < 0) + { + (void)glnx_throw_errno_prefix (error, "write"); + goto out; + } + + if (glnx_link_tmpfile_at (&tmpf, GLNX_LINK_TMPFILE_NOREPLACE, AT_FDCWD, "foo", error)) + goto out; + + out: + g_assert_no_error (local_error); +} + +static void +test_stdio_file (void) +{ + g_autoptr(GError) local_error = NULL; + GError **error = &local_error; + g_auto(GLnxTmpfile) tmpf = { 0, }; + g_autoptr(FILE) f = NULL; + + if (!glnx_open_anonymous_tmpfile (O_RDWR|O_CLOEXEC, &tmpf, error)) + goto out; + f = fdopen (tmpf.fd, "w"); + if (!f) + { + (void)glnx_throw_errno_prefix (error, "fdopen"); + goto out; + } + + if (fwrite ("hello", 1, strlen ("hello"), f) != strlen ("hello")) + { + (void)glnx_throw_errno_prefix (error, "fwrite"); + goto out; + } + if (!glnx_stdio_file_flush (f, error)) + goto out; + + out: + g_assert_no_error (local_error); +} + int main (int argc, char **argv) { int ret; g_test_init (&argc, &argv, NULL); + g_test_add_func ("/tmpfile", test_tmpfile); + g_test_add_func ("/stdio-file", test_stdio_file); g_test_add_func ("/renameat2-noreplace", test_renameat2_noreplace); g_test_add_func ("/renameat2-exchange", test_renameat2_exchange); diff -Nru ostree-2017.8/libglnx/tests/test-libglnx-xattrs.c ostree-2017.9/libglnx/tests/test-libglnx-xattrs.c --- ostree-2017.8/libglnx/tests/test-libglnx-xattrs.c 2017-05-26 18:35:01.000000000 +0000 +++ ostree-2017.9/libglnx/tests/test-libglnx-xattrs.c 2017-07-26 20:38:01.000000000 +0000 @@ -107,22 +107,17 @@ { while (TRUE) { - g_autoptr(GVariant) current_xattrs = NULL; - glnx_fd_close int fd = -1; - struct dirent *dent; if (!glnx_dirfd_iterator_next_dent (dfd_iter, &dent, NULL, error)) return FALSE; if (!dent) break; - fd = openat (dfd_iter->fd, dent->d_name, O_RDONLY | O_CLOEXEC); - if (fd < 0) - { - glnx_set_error_from_errno (error); - return FALSE; - } + glnx_fd_close int fd = -1; + if (!glnx_openat_rdonly (dfd_iter->fd, dent->d_name, FALSE, &fd, error)) + return FALSE; + g_autoptr(GVariant) current_xattrs = NULL; if (!glnx_fd_get_all_xattrs (fd, ¤t_xattrs, NULL, error)) return FALSE; @@ -156,22 +151,17 @@ guint nattrs = 0; while (TRUE) { - g_autoptr(GVariant) current_xattrs = NULL; - glnx_fd_close int fd = -1; - struct dirent *dent; if (!glnx_dirfd_iterator_next_dent (dfd_iter, &dent, NULL, error)) return FALSE; if (!dent) break; - fd = openat (dfd_iter->fd, dent->d_name, O_RDONLY | O_CLOEXEC); - if (fd < 0) - { - glnx_set_error_from_errno (error); - return FALSE; - } + glnx_fd_close int fd = -1; + if (!glnx_openat_rdonly (dfd_iter->fd, dent->d_name, FALSE, &fd, error)) + return FALSE; + g_autoptr(GVariant) current_xattrs = NULL; if (!glnx_fd_get_all_xattrs (fd, ¤t_xattrs, NULL, error)) return FALSE; diff -Nru ostree-2017.8/Makefile.in ostree-2017.9/Makefile.in --- ostree-2017.8/Makefile.in 2017-07-06 19:02:22.000000000 +0000 +++ ostree-2017.9/Makefile.in 2017-07-27 13:11:23.000000000 +0000 @@ -343,7 +343,7 @@ pkglibexec_PROGRAMS = $(am__EXEEXT_18) noinst_PROGRAMS = $(am__EXEEXT_15) tests/test-rollsum-cli$(EXEEXT) ostree_boot_PROGRAMS = $(am__EXEEXT_16) $(am__EXEEXT_17) -TESTS = $(am__EXEEXT_8) $(am__EXEEXT_22) \ +TESTS = $(am__EXEEXT_8) $(am__EXEEXT_25) \ $(dist_uninstalled_test_scripts) $(am__EXEEXT_12) installed_test_PROGRAMS = $(am__EXEEXT_14) check_PROGRAMS = $(am__EXEEXT_11) $(am__EXEEXT_12) $(am__EXEEXT_13) @@ -476,47 +476,39 @@ @BUILDOPT_SYSTEMD_AND_LIBMOUNT_TRUE@am__append_60 = $(systemdsystemgenerator_PROGRAMS) @BUILDOPT_FUSE_TRUE@am__append_61 = rofiles-fuse @BUILDOPT_ASAN_TRUE@am__append_62 = OT_SKIP_READDIR_RAND=1 G_SLICE=always-malloc -@ENABLE_EXPERIMENTAL_API_TRUE@am__append_63 = \ -@ENABLE_EXPERIMENTAL_API_TRUE@ tests/test-find-remotes.sh \ -@ENABLE_EXPERIMENTAL_API_TRUE@ tests/test-fsck-collections.sh \ -@ENABLE_EXPERIMENTAL_API_TRUE@ tests/test-init-collections.sh \ -@ENABLE_EXPERIMENTAL_API_TRUE@ tests/test-prune-collections.sh \ -@ENABLE_EXPERIMENTAL_API_TRUE@ tests/test-refs-collections.sh \ -@ENABLE_EXPERIMENTAL_API_TRUE@ tests/test-remote-add-collections.sh \ -@ENABLE_EXPERIMENTAL_API_TRUE@ tests/test-summary-collections.sh \ -@ENABLE_EXPERIMENTAL_API_TRUE@ $(NULL) - -@BUILDOPT_FUSE_TRUE@am__append_64 = tests/test-rofiles-fuse.sh -@BUILDOPT_FUSE_FALSE@am__append_65 = tests/test-rofiles-fuse.sh -@USE_LIBSOUP_TRUE@am__append_66 = tests/test-remote-cookies.sh -@BUILDOPT_GJS_TRUE@am__append_67 = $(js_tests) -@BUILDOPT_GJS_FALSE@am__append_68 = $(js_tests) -@BUILDOPT_GJS_FALSE@am__append_69 = $(js_installed_tests) -@ENABLE_INSTALLED_TESTS_FALSE@am__append_70 = -rpath $(abs_builddir) -@ENABLE_EXPERIMENTAL_API_TRUE@am__append_71 = \ +@ENABLE_EXPERIMENTAL_API_TRUE@am__append_63 = $(experimental_test_scripts) +@ENABLE_EXPERIMENTAL_API_FALSE@am__append_64 = $(experimental_test_scripts) +@BUILDOPT_FUSE_TRUE@am__append_65 = tests/test-rofiles-fuse.sh +@BUILDOPT_FUSE_FALSE@am__append_66 = tests/test-rofiles-fuse.sh +@USE_LIBSOUP_TRUE@am__append_67 = tests/test-remote-cookies.sh +@BUILDOPT_GJS_TRUE@am__append_68 = $(js_tests) $(js_installed_tests) +@BUILDOPT_GJS_FALSE@am__append_69 = $(js_tests) +@BUILDOPT_GJS_FALSE@am__append_70 = $(js_installed_tests) +@ENABLE_INSTALLED_TESTS_FALSE@am__append_71 = -rpath $(abs_builddir) +@ENABLE_EXPERIMENTAL_API_TRUE@am__append_72 = \ @ENABLE_EXPERIMENTAL_API_TRUE@ tests/test-bloom \ @ENABLE_EXPERIMENTAL_API_TRUE@ tests/test-repo-finder-config \ @ENABLE_EXPERIMENTAL_API_TRUE@ tests/test-repo-finder-mount \ @ENABLE_EXPERIMENTAL_API_TRUE@ $(NULL) -@ENABLE_EXPERIMENTAL_API_TRUE@@USE_AVAHI_TRUE@am__append_72 = tests/test-repo-finder-avahi -@USE_LIBARCHIVE_TRUE@am__append_73 = tests/test-libarchive-import -@ENABLE_INSTALLED_TESTS_EXCLUSIVE_FALSE@am__append_74 = $(_installed_or_uninstalled_test_scripts) -@ENABLE_INSTALLED_TESTS_EXCLUSIVE_FALSE@am__append_75 = $(_installed_or_uninstalled_test_programs) -@ENABLE_INSTALLED_TESTS_TRUE@am__append_76 = install-installed-tests-extra +@ENABLE_EXPERIMENTAL_API_TRUE@@USE_AVAHI_TRUE@am__append_73 = tests/test-repo-finder-avahi +@USE_LIBARCHIVE_TRUE@am__append_74 = tests/test-libarchive-import +@ENABLE_INSTALLED_TESTS_EXCLUSIVE_FALSE@am__append_75 = $(_installed_or_uninstalled_test_scripts) +@ENABLE_INSTALLED_TESTS_EXCLUSIVE_FALSE@am__append_76 = $(_installed_or_uninstalled_test_programs) +@ENABLE_INSTALLED_TESTS_TRUE@am__append_77 = install-installed-tests-extra # Allow the distcheck install under $prefix test to pass -@BUILDOPT_SYSTEMD_TRUE@am__append_77 = --with-systemdsystemunitdir='$${libdir}/systemd/system' +@BUILDOPT_SYSTEMD_TRUE@am__append_78 = --with-systemdsystemunitdir='$${libdir}/systemd/system' # We're using the system grub2-mkconfig generator -@BUILDOPT_BUILTIN_GRUB2_MKCONFIG_FALSE@am__append_78 = src/boot/grub2/grub2-15_ostree -@BUILDOPT_BUILTIN_GRUB2_MKCONFIG_FALSE@am__append_79 = install-grub2-config-hook -@BUILDOPT_TRIVIAL_HTTPD_TRUE@@ENABLE_MAN_TRUE@am__append_80 = ostree-trivial-httpd.1 +@BUILDOPT_BUILTIN_GRUB2_MKCONFIG_FALSE@am__append_79 = src/boot/grub2/grub2-15_ostree +@BUILDOPT_BUILTIN_GRUB2_MKCONFIG_FALSE@am__append_80 = install-grub2-config-hook +@BUILDOPT_TRIVIAL_HTTPD_TRUE@@ENABLE_MAN_TRUE@am__append_81 = ostree-trivial-httpd.1 # We still want to distribute the source, even if we are not building it -@BUILDOPT_TRIVIAL_HTTPD_FALSE@@ENABLE_MAN_TRUE@am__append_81 = man/ostree-trivial-httpd.xml -@BUILDOPT_FUSE_TRUE@@ENABLE_MAN_TRUE@am__append_82 = rofiles-fuse.1 -@ENABLE_MAN_TRUE@am__append_83 = $(man1_MANS) $(man5_MANS) $(man1_MANS:.1=.xml) $(man5_MANS:.5=.xml) -@ENABLE_MAN_TRUE@am__append_84 = \ +@BUILDOPT_TRIVIAL_HTTPD_FALSE@@ENABLE_MAN_TRUE@am__append_82 = man/ostree-trivial-httpd.xml +@BUILDOPT_FUSE_TRUE@@ENABLE_MAN_TRUE@am__append_83 = rofiles-fuse.1 +@ENABLE_MAN_TRUE@am__append_84 = $(man1_MANS:.1=.xml) $(man5_MANS:.5=.xml) +@ENABLE_MAN_TRUE@am__append_85 = \ @ENABLE_MAN_TRUE@ $(man1_MANS) \ @ENABLE_MAN_TRUE@ $(man5_MANS) \ @ENABLE_MAN_TRUE@ $(NULL) @@ -1616,24 +1608,26 @@ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` RECHECK_LOGS = $(TEST_LOGS) -@ENABLE_EXPERIMENTAL_API_TRUE@am__EXEEXT_19 = \ -@ENABLE_EXPERIMENTAL_API_TRUE@ tests/test-find-remotes.sh \ -@ENABLE_EXPERIMENTAL_API_TRUE@ tests/test-fsck-collections.sh \ -@ENABLE_EXPERIMENTAL_API_TRUE@ tests/test-init-collections.sh \ -@ENABLE_EXPERIMENTAL_API_TRUE@ tests/test-prune-collections.sh \ -@ENABLE_EXPERIMENTAL_API_TRUE@ tests/test-refs-collections.sh \ -@ENABLE_EXPERIMENTAL_API_TRUE@ tests/test-remote-add-collections.sh \ -@ENABLE_EXPERIMENTAL_API_TRUE@ tests/test-summary-collections.sh \ -@ENABLE_EXPERIMENTAL_API_TRUE@ $(am__EXEEXT_2) -am__EXEEXT_20 = tests/test-basic.sh tests/test-basic-user.sh \ +am__EXEEXT_19 = tests/test-find-remotes.sh \ + tests/test-fsck-collections.sh tests/test-init-collections.sh \ + tests/test-prune-collections.sh tests/test-refs-collections.sh \ + tests/test-remote-add-collections.sh \ + tests/test-summary-collections.sh \ + tests/test-pull-collections.sh $(am__EXEEXT_2) +@ENABLE_EXPERIMENTAL_API_TRUE@am__EXEEXT_20 = $(am__EXEEXT_19) +am__EXEEXT_21 = tests/test-core.js tests/test-sizes.js \ + tests/test-sysroot.js $(am__EXEEXT_2) +@BUILDOPT_GJS_TRUE@am__EXEEXT_22 = $(js_tests) $(am__EXEEXT_21) +am__EXEEXT_23 = tests/test-basic.sh tests/test-basic-user.sh \ tests/test-basic-user-only.sh tests/test-basic-root.sh \ tests/test-pull-subpath.sh tests/test-archivez.sh \ tests/test-remote-add.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.sh tests/test-pull-commit-only.sh \ - tests/test-pull-depth.sh tests/test-pull-mirror-summary.sh \ + tests/test-pull-bare.sh tests/test-pull-bareuser.sh \ + tests/test-pull-commit-only.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 \ @@ -1660,11 +1654,11 @@ tests/test-refs.sh tests/test-demo-buildsystem.sh \ tests/test-switchroot.sh tests/test-pull-contenturl.sh \ tests/test-pull-mirrorlist.sh tests/test-summary-update.sh \ - tests/test-summary-view.sh $(am__EXEEXT_2) $(am__EXEEXT_19) \ - $(am__append_64) $(am__append_66) $(am__append_67) -@ENABLE_INSTALLED_TESTS_EXCLUSIVE_FALSE@am__EXEEXT_21 = \ -@ENABLE_INSTALLED_TESTS_EXCLUSIVE_FALSE@ $(am__EXEEXT_20) -am__EXEEXT_22 = $(am__EXEEXT_2) $(am__EXEEXT_21) + tests/test-summary-view.sh $(am__EXEEXT_2) $(am__EXEEXT_20) \ + $(am__append_65) $(am__append_67) $(am__EXEEXT_22) +@ENABLE_INSTALLED_TESTS_EXCLUSIVE_FALSE@am__EXEEXT_24 = \ +@ENABLE_INSTALLED_TESTS_EXCLUSIVE_FALSE@ $(am__EXEEXT_23) +am__EXEEXT_25 = $(am__EXEEXT_2) $(am__EXEEXT_24) TEST_SUITE_LOG = test-suite.log TEST_EXTENSIONS = @EXEEXT@ .test LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) @@ -1953,7 +1947,7 @@ -DSOUP_VERSION_MAX_ALLOWED=SOUP_VERSION_2_48 AM_CFLAGS = -std=gnu99 $(WARN_CFLAGS) AM_DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-man \ - --disable-maintainer-mode $(NULL) $(am__append_77) + --disable-maintainer-mode $(NULL) $(am__append_78) SUBDIRS = . $(am__append_14) NULL = BUILT_SOURCES = $(nodist_libostree_1_la_SOURCES) @@ -1965,32 +1959,36 @@ tests/ostree-remount-symlink-stamp \ tests/rofiles-fuse-symlink-stamp tests/ostree \ tests/ostree-prepare-root tests/ostree-remount \ - tests/rofiles-fuse $(am__append_84) + tests/rofiles-fuse $(am__append_85) EXTRA_DIST = $(all_dist_test_scripts) $(all_dist_test_data) autogen.sh \ COPYING README.md $(am__append_15) libglnx/README.md \ libglnx/COPYING libglnx/libglnx.m4 $(NULL) \ libglnx/Makefile-libglnx.am bsdiff/bsdiff.h bsdiff/bspatch.h \ bsdiff/LICENSE bsdiff/README.md bsdiff/Makefile-bsdiff.am \ - $(am__append_17) $(symbol_files) src/libostree/README-gpg \ - src/libostree/bupsplit.h \ + $(am__append_17) \ + $(top_srcdir)/src/libostree/libostree-devel.sym \ + $(top_srcdir)/src/libostree/libostree-experimental.sym \ + $(top_srcdir)/src/libostree/libostree-released.sym $(NULL) \ + src/libostree/README-gpg src/libostree/bupsplit.h \ src/libostree/ostree-enumtypes.h.template \ src/libostree/ostree-enumtypes.c.template \ src/libostree/ostree-deployment-private.h \ src/libostree/ostree-repo-deprecated.h \ src/libostree/ostree-version.h src/ostree/parse-datetime.y \ buildutil/tap-driver.sh buildutil/tap-test tests/glib.supp \ - tests/ostree.supp $(NULL) $(am__append_65) $(am__append_68) \ - tests/libtest.sh $(am__append_69) tests/libostreetest.h \ - tests/libtest.sh tests/gpg-verify-data/README.md $(NULL) \ + tests/ostree.supp $(NULL) $(am__append_64) $(am__append_66) \ + $(am__append_69) tests/libtest.sh $(am__append_70) \ + tests/libostreetest.h tests/libtest.sh \ + tests/gpg-verify-data/README.md $(NULL) \ src/boot/dracut/module-setup.sh src/boot/dracut/ostree.conf \ src/boot/mkinitcpio/ostree \ src/boot/ostree-prepare-root.service \ src/boot/ostree-remount.service src/boot/grub2/grub2-15_ostree \ - src/boot/grub2/ostree-grub-generator $(NULL) $(am__append_81) \ - $(am__append_83) + src/boot/grub2/ostree-grub-generator $(NULL) $(am__append_82) \ + $(am__append_84) bin_SCRIPTS = lib_LTLIBRARIES = libostree-1.la -pkglibexec_SCRIPTS = $(am__append_78) +pkglibexec_SCRIPTS = $(am__append_79) noinst_LTLIBRARIES = $(am__append_1) libglnx.la libbsdiff.la \ libotutil.la libostree-kernel-args.la $(am__append_18) \ libostreetest.la @@ -2060,8 +2058,8 @@ # This initializes some more variables # This is a special facility to chain together hooks easily -INSTALL_DATA_HOOKS = install-mkdir-remotes-d-hook $(am__append_76) \ - $(am__append_79) +INSTALL_DATA_HOOKS = install-mkdir-remotes-d-hook $(am__append_77) \ + $(am__append_80) ALL_LOCAL_RULES = tests/libreaddir-rand.so shortened_sysconfdir = $$(echo "$(sysconfdir)" | sed -e 's|^$(prefix)||' -e 's|^/||') OSTREE_GITREV = $(shell cd $(srcdir) && if command -v git >/dev/null 2>&1 && test -d .git; then git describe --abbrev=42 --tags --always HEAD; fi) @@ -2422,9 +2420,9 @@ # tests *only* run installed, to avoid having to run them twice in CI. # This overrides the glib-tap.mk emphasis on doing both, if we'd # used e.g. `dist_test_scripts`. -dist_test_scripts = $(NULL) $(am__append_74) -test_programs = $(NULL) $(am__append_71) $(am__append_72) \ - $(am__append_75) +dist_test_scripts = $(NULL) $(am__append_75) +test_programs = $(NULL) $(am__append_72) $(am__append_73) \ + $(am__append_76) _installed_or_uninstalled_test_scripts = tests/test-basic.sh \ tests/test-basic-user.sh tests/test-basic-user-only.sh \ tests/test-basic-root.sh tests/test-pull-subpath.sh \ @@ -2432,9 +2430,9 @@ 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.sh \ - tests/test-pull-commit-only.sh tests/test-pull-depth.sh \ - tests/test-pull-mirror-summary.sh \ + tests/test-parent.sh tests/test-pull-bare.sh \ + tests/test-pull-bareuser.sh tests/test-pull-commit-only.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 \ @@ -2462,7 +2460,18 @@ tests/test-switchroot.sh tests/test-pull-contenturl.sh \ tests/test-pull-mirrorlist.sh tests/test-summary-update.sh \ tests/test-summary-view.sh $(NULL) $(am__append_63) \ - $(am__append_64) $(am__append_66) $(am__append_67) + $(am__append_65) $(am__append_67) $(am__append_68) +experimental_test_scripts = \ + tests/test-find-remotes.sh \ + tests/test-fsck-collections.sh \ + tests/test-init-collections.sh \ + tests/test-prune-collections.sh \ + tests/test-refs-collections.sh \ + tests/test-remote-add-collections.sh \ + tests/test-summary-collections.sh \ + tests/test-pull-collections.sh \ + $(NULL) + # These call into gjs scripts js_tests = tests/test-corruption.sh tests/test-pull-corruption.sh @@ -2504,10 +2513,6 @@ tests/test-sysroot.js \ $(NULL) -@BUILDOPT_GJS_TRUE@dist_installed_test_scripts = $(js_installed_tests) - -# See above comment on binding the tests to be either installed or not. -@ENABLE_INSTALLED_TESTS_EXCLUSIVE_TRUE@dist_installed_test_scripts = $(_installed_or_uninstalled_test_scripts) test_ltlibraries = libreaddir-rand.la libreaddir_rand_la_SOURCES = tests/readdir-rand.c libreaddir_rand_la_CFLAGS = $(AM_CFLAGS) $(OT_INTERNAL_GIO_UNIX_CFLAGS) @@ -2517,14 +2522,14 @@ $(NULL) libreaddir_rand_la_LDFLAGS = $(AM_LDFLAGS) -avoid-version \ - $(am__append_70) + $(am__append_71) _installed_or_uninstalled_test_programs = tests/test-varint \ tests/test-ot-unix-utils tests/test-bsdiff \ tests/test-mutable-tree tests/test-keyfile-utils \ tests/test-ot-opt-utils tests/test-ot-tool-util \ tests/test-gpg-verify-result tests/test-checksum \ tests/test-lzma tests/test-rollsum tests/test-basic-c \ - tests/test-sysroot-c tests/test-pull-c $(am__append_73) + tests/test-sysroot-c tests/test-pull-c $(am__append_74) common_tests_cflags = $(ostree_bin_shared_cflags) $(OT_INTERNAL_GIO_UNIX_CFLAGS) -I$(srcdir)/libglnx common_tests_ldadd = $(ostree_bin_shared_ldadd) $(OT_INTERNAL_GIO_UNIX_LIBS) libostreetest_la_SOURCES = tests/libostreetest.c tests/test-mock-gio.c tests/test-mock-gio.h @@ -2588,6 +2593,9 @@ tests_test_gpg_verify_result_CFLAGS = $(TESTS_CFLAGS) $(OT_INTERNAL_GPGME_CFLAGS) tests_test_gpg_verify_result_LDADD = $(TESTS_LDADD) $(OT_INTERNAL_GPGME_LIBS) + +# See above comment on binding the tests to be either installed or not. +@ENABLE_INSTALLED_TESTS_EXCLUSIVE_TRUE@dist_installed_test_scripts = $(_installed_or_uninstalled_test_scripts) @ENABLE_INSTALLED_TESTS_EXCLUSIVE_TRUE@installed_test_programs = $(_installed_or_uninstalled_test_programs) # Not using $(libdir) here is intentional, dracut modules go in prefix/lib @@ -2620,8 +2628,8 @@ @ENABLE_MAN_TRUE@ ostree-pull.1 ostree-refs.1 ostree-remote.1 \ @ENABLE_MAN_TRUE@ ostree-reset.1 ostree-rev-parse.1 \ @ENABLE_MAN_TRUE@ ostree-show.1 ostree-summary.1 \ -@ENABLE_MAN_TRUE@ ostree-static-delta.1 $(am__append_80) \ -@ENABLE_MAN_TRUE@ $(am__append_82) +@ENABLE_MAN_TRUE@ ostree-static-delta.1 $(am__append_81) \ +@ENABLE_MAN_TRUE@ $(am__append_83) @ENABLE_MAN_TRUE@man5_files = ostree.repo.5 ostree.repo-config.5 @ENABLE_MAN_TRUE@man1_MANS = $(addprefix man/,$(man1_files)) @ENABLE_MAN_TRUE@man5_MANS = $(addprefix man/,$(man5_files)) @@ -7138,9 +7146,16 @@ --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-pull-archive.sh.log: tests/test-pull-archive.sh - @p='tests/test-pull-archive.sh'; \ - b='tests/test-pull-archive.sh'; \ +tests/test-pull-bare.sh.log: tests/test-pull-bare.sh + @p='tests/test-pull-bare.sh'; \ + b='tests/test-pull-bare.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-pull-bareuser.sh.log: tests/test-pull-bareuser.sh + @p='tests/test-pull-bareuser.sh'; \ + b='tests/test-pull-bareuser.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) \ @@ -7495,6 +7510,13 @@ --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-pull-collections.sh.log: tests/test-pull-collections.sh + @p='tests/test-pull-collections.sh'; \ + b='tests/test-pull-collections.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-rofiles-fuse.sh.log: tests/test-rofiles-fuse.sh @p='tests/test-rofiles-fuse.sh'; \ b='tests/test-rofiles-fuse.sh'; \ @@ -7523,6 +7545,27 @@ --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-core.js.log: tests/test-core.js + @p='tests/test-core.js'; \ + b='tests/test-core.js'; \ + $(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-sizes.js.log: tests/test-sizes.js + @p='tests/test-sizes.js'; \ + b='tests/test-sizes.js'; \ + $(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-sysroot.js.log: tests/test-sysroot.js + @p='tests/test-sysroot.js'; \ + b='tests/test-sysroot.js'; \ + $(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-symbols.sh.log: tests/test-symbols.sh @p='tests/test-symbols.sh'; \ b='tests/test-symbols.sh'; \ @@ -8062,7 +8105,6 @@ src/libostree/ostree-enumtypes.c: src/libostree/ostree-enumtypes.c.template $(ENUM_TYPES) $(AM_V_GEN) $(GLIB_MKENUMS) \ --template $< \ - --fhead "#include \"ostree-enumtypes.h\"" \ $(ENUM_TYPES) > $@.tmp && mv $@.tmp $@ @BUILDOPT_INTROSPECTION_TRUE@OSTree-1.0.gir: libostree-1.la Makefile diff -Nru ostree-2017.8/Makefile-libostree.am ostree-2017.9/Makefile-libostree.am --- ostree-2017.8/Makefile-libostree.am 2017-07-04 09:59:08.000000000 +0000 +++ ostree-2017.9/Makefile-libostree.am 2017-07-26 20:37:59.000000000 +0000 @@ -57,7 +57,6 @@ src/libostree/ostree-enumtypes.c: src/libostree/ostree-enumtypes.c.template $(ENUM_TYPES) $(AM_V_GEN) $(GLIB_MKENUMS) \ --template $< \ - --fhead "#include \"ostree-enumtypes.h\"" \ $(ENUM_TYPES) > $@.tmp && mv $@.tmp $@ nodist_libostree_1_la_SOURCES = \ @@ -187,7 +186,11 @@ endif # http://blog.jgc.org/2007/06/escaping-comma-and-space-in-gnu-make.html wl_versionscript_arg = -Wl,--version-script= -EXTRA_DIST += $(symbol_files) +EXTRA_DIST += \ + $(top_srcdir)/src/libostree/libostree-devel.sym \ + $(top_srcdir)/src/libostree/libostree-experimental.sym \ + $(top_srcdir)/src/libostree/libostree-released.sym \ + $(NULL) libostree_1_la_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/bsdiff -I$(srcdir)/libglnx -I$(srcdir)/src/libotutil -I$(srcdir)/src/libostree -I$(builddir)/src/libostree \ $(OT_INTERNAL_GIO_UNIX_CFLAGS) $(OT_INTERNAL_GPGME_CFLAGS) $(OT_DEP_LZMA_CFLAGS) $(OT_DEP_ZLIB_CFLAGS) $(OT_DEP_OPENSSL_CFLAGS) \ diff -Nru ostree-2017.8/Makefile-man.am ostree-2017.9/Makefile-man.am --- ostree-2017.8/Makefile-man.am 2017-07-04 09:59:08.000000000 +0000 +++ ostree-2017.9/Makefile-man.am 2017-07-26 20:37:59.000000000 +0000 @@ -46,7 +46,7 @@ man1_MANS = $(addprefix man/,$(man1_files)) man5_MANS = $(addprefix man/,$(man5_files)) -EXTRA_DIST += $(man1_MANS) $(man5_MANS) $(man1_MANS:.1=.xml) $(man5_MANS:.5=.xml) +EXTRA_DIST += $(man1_MANS:.1=.xml) $(man5_MANS:.5=.xml) XSLT_STYLESHEET = http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl diff -Nru ostree-2017.8/Makefile-tests.am ostree-2017.9/Makefile-tests.am --- ostree-2017.8/Makefile-tests.am 2017-07-04 11:21:58.000000000 +0000 +++ ostree-2017.9/Makefile-tests.am 2017-07-26 20:37:59.000000000 +0000 @@ -67,7 +67,8 @@ tests/test-help.sh \ tests/test-libarchive.sh \ tests/test-parent.sh \ - tests/test-pull-archive.sh \ + tests/test-pull-bare.sh \ + tests/test-pull-bareuser.sh \ tests/test-pull-commit-only.sh \ tests/test-pull-depth.sh \ tests/test-pull-mirror-summary.sh \ @@ -113,8 +114,7 @@ tests/test-summary-view.sh \ $(NULL) -if ENABLE_EXPERIMENTAL_API -_installed_or_uninstalled_test_scripts += \ +experimental_test_scripts = \ tests/test-find-remotes.sh \ tests/test-fsck-collections.sh \ tests/test-init-collections.sh \ @@ -122,7 +122,13 @@ tests/test-refs-collections.sh \ tests/test-remote-add-collections.sh \ tests/test-summary-collections.sh \ + tests/test-pull-collections.sh \ $(NULL) + +if ENABLE_EXPERIMENTAL_API +_installed_or_uninstalled_test_scripts += $(experimental_test_scripts) +else +EXTRA_DIST += $(experimental_test_scripts) endif if BUILDOPT_FUSE @@ -185,7 +191,7 @@ $(NULL) if BUILDOPT_GJS -dist_installed_test_scripts = $(js_installed_tests) +_installed_or_uninstalled_test_scripts += $(js_installed_tests) else EXTRA_DIST += $(js_installed_tests) endif diff -Nru ostree-2017.8/man/ostree.1 ostree-2017.9/man/ostree.1 --- ostree-2017.8/man/ostree.1 2017-06-29 17:29:24.000000000 +0000 +++ ostree-2017.9/man/ostree.1 1970-01-01 00:00:00.000000000 +0000 @@ -1,267 +0,0 @@ -'\" t -.\" Title: ostree -.\" Author: Colin Walters -.\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 06/29/2017 -.\" Manual: ostree -.\" Source: OSTree -.\" Language: English -.\" -.TH "OSTREE" "1" "" "OSTree" "ostree" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -ostree \- Manage multiple bootable versioned filesystem trees -.SH "SYNOPSIS" -.HP \w'\fBostree\fR\ 'u -\fBostree\fR {COMMAND} [OPTIONS...] -.SH "DESCRIPTION" -.PP -OSTree is a tool for managing multiple bootable versioned filesystem trees, or just "tree" for short\&. In the OSTree model, operating systems no longer live in the physical "/" root directory\&. Instead, they parallel install to the new toplevel -/ostree -directory\&. Each installed system gets its own -/ostree/deploy/\fIstateroot\fR -directory\&. (stateroot -is the newer term for -osname)\&. -.PP -Unlike -rpm -or -dpkg, OSTree is only aware of complete filesystem trees\&. It has no built\-in knowledge of what components went into creating the filesystem tree\&. -.PP -It is possible to use OSTree in several modes; the most basic form is to replicate pre\-built trees from a build server\&. Usually, these pre\-built trees are derived from packages\&. You might also be using OSTree underneath a higher level tool which computes filesystem trees locally\&. -.PP -It must be emphasized that OSTree only supports -\fIread\-only\fR -trees\&. To change to a different tree (upgrade, downgrade, install software), a new tree is checked out, and a 3\-way merge of configuration is performed\&. The currently running tree is not ever modified; the new tree will become active on a system reboot\&. -.PP -To see the man page for a command run -\fBman ostree \fR\fB\fICOMMAND\fR\fR -or -\fBman ostree\-admin \fR\fB\fICOMMAND\fR\fR -.SH "OPTIONS" -.PP -The following options are understood: -.PP -\fB\-\-repo\fR -.RS 4 -For most commands, when run as non\-root, repository is required\&. If -\fBostree\fR -is run as root, it is assumed operations will be performed on the -/sysroot/ostree/repo -repository\&. -.RE -.PP -\fB\-v, \-\-verbose\fR -.RS 4 -Produce debug level output\&. -.RE -.SH "COMMANDS" -.PP -System administrators will primarily interact with OSTree via the subcommand -\fBostree admin\fR\&. -.PP -\fBostree-admin-cleanup\fR(1) -.RS 4 -\ \&Delete untagged deployments and repository objects\&. -.RE -.PP -\fBostree-admin-config-diff\fR(1) -.RS 4 -\ \&See changes to -/etc -as compared to the current default (from -/usr/etc)\&. -.RE -.PP -\fBostree-admin-deploy\fR(1) -.RS 4 -\ \&Takes a particular commit or revision, and sets it up for the next boot\&. -.RE -.PP -\fBostree-admin-init-fs\fR(1) -.RS 4 -\ \&Initialize a root filesystem in a specified path\&. -.RE -.PP -\fBostree-admin-instutil\fR(1) -.RS 4 -\ \&Utility functions intended primarily for operating system installation programs -.RE -.PP -\fBostree-admin-os-init\fR(1) -.RS 4 -\ \&Initialize the deployment location for an operating system with a specified name\&. -.RE -.PP -\fBostree-admin-status\fR(1) -.RS 4 -\ \&Show and list the deployments\&. -.RE -.PP -\fBostree-admin-switch\fR(1) -.RS 4 -\ \&Choose a different ref to track from the same remote as the current tree\&. -.RE -.PP -\fBostree-admin-undeploy\fR(1) -.RS 4 -\ \&Remove the previously -\fIINDEX\fR -deployed tree from the bootloader configuration\&. -.RE -.PP -\fBostree-admin-upgrade\fR(1) -.RS 4 -\ \&Download the latest version for the current ref, and deploy it\&. -.RE -.PP -Both administrators and operating system builders may interact with OSTree via the regular filesystem manipulation commands\&. -.PP -\fBostree-cat\fR(1) -.RS 4 -\ \&Concatenate contents of files -.RE -.PP -\fBostree-checkout\fR(1) -.RS 4 -\ \&Check out a commit into a filesystem tree\&. -.RE -.PP -\fBostree-checksum\fR(1) -.RS 4 -\ \&Gives checksum of any file\&. -.RE -.PP -\fBostree-commit\fR(1) -.RS 4 -\ \&Given one or more trees, create a new commit using those contents\&. -.RE -.PP -\fBostree-config\fR(1) -.RS 4 -\ \&Change settings\&. -.RE -.PP -\fBostree-diff\fR(1) -.RS 4 -\ \&Concisely list differences between the given refs\&. -.RE -.PP -\fBostree-fsck\fR(1) -.RS 4 -\ \&Check a repository for consistency\&. -.RE -.PP -\fBostree-init\fR(1) -.RS 4 -\ \&Initialize a new repository\&. -.RE -.PP -\fBostree-log\fR(1) -.RS 4 -\ \&Show revision log\&. -.RE -.PP -\fBostree-ls\fR(1) -.RS 4 -\ \&List the contents of a given commit\&. -.RE -.PP -\fBostree-prune\fR(1) -.RS 4 -\ \&Search for unreachable objects\&. -.RE -.PP -\fBostree-pull-local\fR(1) -.RS 4 -\ \&Copy data from source\-repo\&. -.RE -.PP -\fBostree-pull\fR(1) -.RS 4 -\ \&Download data from remote repo\&. If you have libsoup\&. -.RE -.PP -\fBostree-refs\fR(1) -.RS 4 -\ \&List refs\&. -.RE -.PP -\fBostree-remote\fR(1) -.RS 4 -\ \&Manipulate remote archive configuration\&. -.RE -.PP -\fBostree-reset\fR(1) -.RS 4 -\ \&Reset a ref to a previous commit\&. -.RE -.PP -\fBostree-rev-parse\fR(1) -.RS 4 -\ \&Show the SHA256 corresponding to a given rev\&. -.RE -.PP -\fBostree-show\fR(1) -.RS 4 -\ \&Given an OSTree SHA256 checksum, display its contents\&. -.RE -.PP -\fBostree-static-delta\fR(1) -.RS 4 -\ \&Manage static delta files\&. -.RE -.PP -\fBostree-summary\fR(1) -.RS 4 -\ \&Regenerate the repository summary metadata\&. -.RE -.PP -\fBostree-trivial-httpd\fR(1) -.RS 4 -\ \&Simple webserver\&. -.RE -.SH "EXAMPLES" -.PP -For specific examples, please see the man page regarding the specific ostree command\&. For example: -.PP -\fBman ostree init\fR -or -\fBman ostree\-admin status\fR -.SH "GPG VERIFICATION" -.PP -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 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/ -and such)\&. This is particularly useful when downloading content that may not be fully trusted (e\&.g\&. you want to inspect it but not deploy it as an OS), or use it for containers\&. This file is written via -\fBostree remote add \-\-gpg\-import\fR\&. -.SH "SEE ALSO" -.PP -\fBostree.repo\fR(5) diff -Nru ostree-2017.8/man/ostree-admin.1 ostree-2017.9/man/ostree-admin.1 --- ostree-2017.8/man/ostree-admin.1 2017-06-29 17:29:25.000000000 +0000 +++ ostree-2017.9/man/ostree-admin.1 1970-01-01 00:00:00.000000000 +0000 @@ -1,179 +0,0 @@ -'\" t -.\" Title: ostree admin -.\" Author: Colin Walters -.\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 06/29/2017 -.\" Manual: ostree admin -.\" Source: OSTree -.\" Language: English -.\" -.TH "OSTREE ADMIN" "1" "" "OSTree" "ostree admin" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -ostree-admin \- Use one of the ostree admin commands -.SH "SYNOPSIS" -.HP \w'\fBostree\ admin\fR\ 'u -\fBostree admin\fR {SUBCOMMAND} -.SH "DESCRIPTION" -.PP -Use ostree admin subcommands\&. -.SH "SUBCOMMANDS" -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBcleanup\fR -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBconfig\-diff\fR -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBdeploy\fR -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBinit\-fs\fR -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBinstutil\fR -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBos\-init\fR -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBstatus\fR -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBset\-origin\fR -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBswitch\fR -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBundeploy\fR -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBupgrade\fR -.RE -.PP -View manpages for each admin subcommand using, for example: -.PP -\fB$ man ostree\-admin cleanup\fR -.SH "OPTIONS" -.PP -\fB\-\-help\fR, \fB\-h\fR -.RS 4 -Usage help -.RE -.PP -\fB\-\-sysroot\fR="PATH" -.RS 4 -Creates a new OSTree sysroot at PATH -.RE -.PP -\fB\-\-print\-current\-dir\fR -.RS 4 -Prints the full path to the deployment directory for the currently active deployment in the specified sysroot to standard out\&. This is incompatible with specifying a subcommand\&. -.RE diff -Nru ostree-2017.8/man/ostree-admin-cleanup.1 ostree-2017.9/man/ostree-admin-cleanup.1 --- ostree-2017.8/man/ostree-admin-cleanup.1 2017-06-29 17:29:24.000000000 +0000 +++ ostree-2017.9/man/ostree-admin-cleanup.1 1970-01-01 00:00:00.000000000 +0000 @@ -1,40 +0,0 @@ -'\" t -.\" Title: ostree admin cleanup -.\" Author: Colin Walters -.\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 06/29/2017 -.\" Manual: ostree admin cleanup -.\" Source: OSTree -.\" Language: English -.\" -.TH "OSTREE ADMIN CLEANUP" "1" "" "OSTree" "ostree admin cleanup" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -ostree-admin-cleanup \- Delete untagged deployments and repository objects -.SH "SYNOPSIS" -.HP \w'\fBostree\ admin\ cleanup\ \fR\ 'u -\fBostree admin cleanup \fR -.SH "DESCRIPTION" -.PP -OSTree sysroot cleans up other bootversions and old deployments\&. If/when a pull or deployment is interrupted, a partially written state may remain on disk\&. This command cleans up any such partial states\&. -.SH "EXAMPLE" -.PP -\fB$ ostree admin cleanup\fR diff -Nru ostree-2017.8/man/ostree-admin-config-diff.1 ostree-2017.9/man/ostree-admin-config-diff.1 --- ostree-2017.8/man/ostree-admin-config-diff.1 2017-06-29 17:29:24.000000000 +0000 +++ ostree-2017.9/man/ostree-admin-config-diff.1 1970-01-01 00:00:00.000000000 +0000 @@ -1,58 +0,0 @@ -'\" t -.\" Title: ostree admin config-diff -.\" Author: Colin Walters -.\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 06/29/2017 -.\" Manual: ostree admin config-diff -.\" Source: OSTree -.\" Language: English -.\" -.TH "OSTREE ADMIN CONFIG\" "1" "" "OSTree" "ostree admin config-diff" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -ostree-admin-config-diff \- Diff current /etc configuration versus default -.SH "SYNOPSIS" -.HP \w'\fBostree\ admin\ config\-diff\fR\ 'u -\fBostree admin config\-diff\fR [OPTIONS...] -.SH "DESCRIPTION" -.PP -Prints the differences between the current /etc directory and the default configuration in /usr/etc\&. Newly added files (present in /etc but not in /usr/etc) will be prefixed with \*(AqA\*(Aq\&. Modified files will be prefixed with \*(AqM\*(Aq, and deleted files with \*(AqD\*(Aq\&. -.SH "OPTIONS" -.PP -\fB\-\-os\fR="STATEROOT" -.RS 4 -Use a different operating system stateroot than the current one\&. -.RE -.SH "EXAMPLE" -.PP -\fB$ ostree admin config\-diff\fR -.sp -.if n \{\ -.RS 4 -.\} -.nf - M shadow - A example\&.txt - -.fi -.if n \{\ -.RE -.\} diff -Nru ostree-2017.8/man/ostree-admin-deploy.1 ostree-2017.9/man/ostree-admin-deploy.1 --- ostree-2017.8/man/ostree-admin-deploy.1 2017-06-29 17:29:24.000000000 +0000 +++ ostree-2017.9/man/ostree-admin-deploy.1 1970-01-01 00:00:00.000000000 +0000 @@ -1,113 +0,0 @@ -'\" t -.\" Title: ostree admin deploy -.\" Author: Colin Walters -.\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 06/29/2017 -.\" Manual: ostree admin deploy -.\" Source: OSTree -.\" Language: English -.\" -.TH "OSTREE ADMIN DEPLOY" "1" "" "OSTree" "ostree admin deploy" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -ostree-admin-deploy \- Checkout a revision as the new default deployment -.SH "SYNOPSIS" -.HP \w'\fBostree\ admin\ deploy\fR\ 'u -\fBostree admin deploy\fR [OPTIONS...] {REFSPEC} -.SH "DESCRIPTION" -.PP -Takes a commit or revision REFSPEC, and queues the new deployment as default upon reboot\&. -.SH "OPTIONS" -.PP -\fB\-\-os\fR="STATEROOT" -.RS 4 -Use a different operating system root than the current one\&. -.RE -.PP -\fB\-\-origin\-file\fR="FILENAME" -.RS 4 -Use FILENAME as the origin, which is where OSTree will look for updated versions of the tree\&. -.RE -.PP -\fB\-\-retain\fR -.RS 4 -Do not delete previous deployment\&. -.RE -.PP -\fB\-\-karg\-proc\-cmdline\fR -.RS 4 -Import current /proc/cmdline\&. -.RE -.PP -\fB\-\-karg\fR="NAME=VALUE" -.RS 4 -Set kernel argument, like root=/dev/sda1; this overrides any earlier argument with the same name\&. -.RE -.PP -\fB\-\-karg\-append\fR="NAME=VALUE" -.RS 4 -Append kernel argument; useful with e\&.g\&. console= that can be used multiple times\&. -.RE -.SH "EXAMPLE" -.PP -\fB$ ostree admin status\fR -.sp -.if n \{\ -.RS 4 -.\} -.nf - * gnome\-ostree 67e382b11d213a402a5313e61cbc69dfd5ab93cb07\&.0 - origin refspec: gnome\-ostree/buildmaster/x86_64\-runtime - gnome\-ostree ce19c41036cc45e49b0cecf6b157523c2105c4de1ce3\&.0 - origin refspec: gnome\-ostree/buildmaster/x86_64\-runtime -.fi -.if n \{\ -.RE -.\} -.PP -\fB$ ostree admin deploy gnome\-ostree/buildmaster/x86_64\-runtime\fR -.sp -.if n \{\ -.RS 4 -.\} -.nf - ostadmin: Creating deployment /ostree/deploy/gnome\-ostree/deploy/7e382b11d213a402a5313e61cbc69dfd5ab93cb07\&.1 - ostadmin: Processing /etc: 3 modified, 0 removed, 29 added - Transaction complete: bootconfig swap: no deployment count change: 0) -.fi -.if n \{\ -.RE -.\} -.PP -\fB$ ostree admin status\fR -.sp -.if n \{\ -.RS 4 -.\} -.nf - gnome\-ostree 67e382b11d213a402a5313e61cbc69dfd5ab93cb07\&.1 - origin refspec: gnome\-ostree/buildmaster/x86_64\-runtime - * gnome\-ostree 67e382b11d213a402a5313e61cbc69dfd5ab93cb07\&.0 - origin refspec: gnome\-ostree/buildmaster/x86_64\-runtime -.fi -.if n \{\ -.RE -.\} diff -Nru ostree-2017.8/man/ostree-admin-init-fs.1 ostree-2017.9/man/ostree-admin-init-fs.1 --- ostree-2017.8/man/ostree-admin-init-fs.1 2017-06-29 17:29:24.000000000 +0000 +++ ostree-2017.9/man/ostree-admin-init-fs.1 1970-01-01 00:00:00.000000000 +0000 @@ -1,54 +0,0 @@ -'\" t -.\" Title: ostree admin init-fs -.\" Author: Colin Walters -.\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 06/29/2017 -.\" Manual: ostree admin init-fs -.\" Source: OSTree -.\" Language: English -.\" -.TH "OSTREE ADMIN INIT\-F" "1" "" "OSTree" "ostree admin init-fs" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -ostree-admin-init-fs \- Initialize a new root filesystem -.SH "SYNOPSIS" -.HP \w'\fBostree\ admin\ init\-fs\fR\ 'u -\fBostree admin init\-fs\fR [OPTIONS...] {PATH} -.SH "DESCRIPTION" -.PP -Initialize an empty physical root filesystem in the designated PATH, with normal toplevels and correct permissions for each directory\&. Primarily useful for operating system installers\&. -.SH "EXAMPLE" -.PP -\fB$ mkdir /example\fR -.PP -\fB$ ostree admin init\-fs /example\fR -.PP -\fB$ ls /example \fR -.PP -\fIboot\fR\ \&\ \& -\fIdev\fR\ \&\ \& -\fIhome\fR\ \&\ \& -\fIostree\fR\ \&\ \& -\fIproc\fR\ \&\ \& -\fIroot\fR\ \&\ \& -\fIrun\fR\ \&\ \& -\fIsys\fR\ \&\ \& -\fItmp\fR diff -Nru ostree-2017.8/man/ostree-admin-instutil.1 ostree-2017.9/man/ostree-admin-instutil.1 --- ostree-2017.8/man/ostree-admin-instutil.1 2017-06-29 17:29:24.000000000 +0000 +++ ostree-2017.9/man/ostree-admin-instutil.1 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -'\" t -.\" Title: ostree admin instutil -.\" Author: Colin Walters -.\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 06/29/2017 -.\" Manual: ostree admin instutil -.\" Source: OSTree -.\" Language: English -.\" -.TH "OSTREE ADMIN INSTUTI" "1" "" "OSTree" "ostree admin instutil" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -ostree-admin-instutil \- Utility functions intended primarily for operating system installation programs -.SH "SYNOPSIS" -.HP \w'\fBostree\ admin\ instutil\fR\ 'u -\fBostree admin instutil\fR {SUBCOMMAND} [ARGS] -.SH "DESCRIPTION" -.PP -Use the subcommands to toggle admin installation utilities for selinux policies and kernel arguments\&. -.SH "SUBCOMMANDS" -.PP -.HP \w'\fBselinux\-ensure\-labeled\fR\ 'u \fBselinux\-ensure\-labeled\fR [SUBPATH\ PREFIX] -.RS 4 -Ensure all files and directories are labeled according to SELinux policy of the first deployment\&. -.RE -.PP -.HP \w'\fBset\-kargs\fR\ 'u \fBset\-kargs\fR [\-\-merge] [\-\-import\-proc\-cmdline] [\-\-append="NAME=VALUE"] [\-\-replace="NAME=VALUE"] [MORE_APPEND_ARGS] -.RS 4 -Replace the kernel arguments of the default deployment\&. The new arguments are based on an empty list (the default), the current options (\-\-merge), or the arguments of the loaded kernel (\-\-import\-proc\-cmdline), and new options either are added to the end (\-\-append="NAME=VALUE") or replace existing arguments of the same name (\-\-replace="NAME=VALUE")\&. -.RE diff -Nru ostree-2017.8/man/ostree-admin-os-init.1 ostree-2017.9/man/ostree-admin-os-init.1 --- ostree-2017.8/man/ostree-admin-os-init.1 2017-06-29 17:29:24.000000000 +0000 +++ ostree-2017.9/man/ostree-admin-os-init.1 1970-01-01 00:00:00.000000000 +0000 @@ -1,53 +0,0 @@ -'\" t -.\" Title: ostree admin os-init -.\" Author: Colin Walters -.\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 06/29/2017 -.\" Manual: ostree admin os-init -.\" Source: OSTree -.\" Language: English -.\" -.TH "OSTREE ADMIN OS\-INI" "1" "" "OSTree" "ostree admin os-init" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -ostree-admin-os-init \- Initialize empty state for a given operating system -.SH "SYNOPSIS" -.HP \w'\fBostree\ admin\ os\-init\fR\ 'u -\fBostree admin os\-init\fR {STATEROOT} -.SH "DESCRIPTION" -.PP -Initializes an new stateroot (AKA "osname") for an operating system\&. Ensures that the core subdirectories of /var (/tmp, /lib, /run, and /lock) exist and initialize the given STATEROOT as OSTree stateroot\&. Each deployment location is comprised of a single shared -var -and a set of deployments (chroots)\&. -.SH "EXAMPLE" -.PP -\fB$ ostree admin os\-init exampleos\fR -.sp -.if n \{\ -.RS 4 -.\} -.nf - ostree/deploy/exampleos initialized as OSTree root - -.fi -.if n \{\ -.RE -.\} diff -Nru ostree-2017.8/man/ostree-admin-set-origin.1 ostree-2017.9/man/ostree-admin-set-origin.1 --- ostree-2017.8/man/ostree-admin-set-origin.1 2017-06-29 17:29:24.000000000 +0000 +++ ostree-2017.9/man/ostree-admin-set-origin.1 1970-01-01 00:00:00.000000000 +0000 @@ -1,56 +0,0 @@ -'\" t -.\" Title: ostree admin set-origin -.\" Author: Colin Walters -.\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 06/29/2017 -.\" Manual: ostree admin set-origin -.\" Source: OSTree -.\" Language: English -.\" -.TH "OSTREE ADMIN SET\-OR" "1" "" "OSTree" "ostree admin set-origin" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -ostree-admin-set-origin \- Change the "origin" (location for upgrades) -.SH "SYNOPSIS" -.HP \w'\fBostree\ admin\ set\-origin\ \fR\ 'u -\fBostree admin set\-origin \fR {REMOTENAME} {URL} [BRANCH] -.SH "DESCRIPTION" -.PP -Add a new remote named -\fIREMOTENAME\fR -(if it does not already exist)\&. Then change the origin file for the current deployment\&. This is the ref that will be "tracked" and upgraded with -\fBostree admin upgrade\fR\&. -.SH "OPTIONS" -.PP -\fB\-\-set\fR=KEY=VALUE -.RS 4 -Set an option for the remote\&. -.RE -.PP -\fB\-\-index\fR=INDEX -.RS 4 -Change the origin of the deployment numbered -\fIINDEX\fR -(starting from 0)\&. -.RE -.SH "EXAMPLE" -.PP -\fB$ ostree admin set\-origin exampleos http://os\&.example\&.com/repo exampleos/10\&.0/master/router\fR diff -Nru ostree-2017.8/man/ostree-admin-status.1 ostree-2017.9/man/ostree-admin-status.1 --- ostree-2017.8/man/ostree-admin-status.1 2017-06-29 17:29:24.000000000 +0000 +++ ostree-2017.9/man/ostree-admin-status.1 1970-01-01 00:00:00.000000000 +0000 @@ -1,53 +0,0 @@ -'\" t -.\" Title: ostree admin status -.\" Author: Colin Walters -.\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 06/29/2017 -.\" Manual: ostree admin status -.\" Source: OSTree -.\" Language: English -.\" -.TH "OSTREE ADMIN STATUS" "1" "" "OSTree" "ostree admin status" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -ostree-admin-status \- List deployments -.SH "SYNOPSIS" -.HP \w'\fBostree\ admin\ status\fR\ 'u -\fBostree admin status\fR -.SH "DESCRIPTION" -.PP -Lists the deployments available to be booted into\&. Includes osname, the checksum followed by the deploy serial, and the refspec\&. An asterisk indicates the current booted deployment\&. -.SH "EXAMPLE" -.PP -\fB$ ostree admin status\fR -.sp -.if n \{\ -.RS 4 -.\} -.nf - * gnome\-ostree 67e382b11d213a402a5313e61cbc69dfd5ab93cb07\&.0 - origin refspec: gnome\-ostree/buildmaster/x86_64\-runtime - gnome\-ostree ce19c41036cc45e49b0cecf6b157523c2105c4de1c\&.0 - origin refspec: gnome\-ostree/buildmaster/x86_64\-runtime -.fi -.if n \{\ -.RE -.\} diff -Nru ostree-2017.8/man/ostree-admin-switch.1 ostree-2017.9/man/ostree-admin-switch.1 --- ostree-2017.8/man/ostree-admin-switch.1 2017-06-29 17:29:25.000000000 +0000 +++ ostree-2017.9/man/ostree-admin-switch.1 1970-01-01 00:00:00.000000000 +0000 @@ -1,47 +0,0 @@ -'\" t -.\" Title: ostree admin switch -.\" Author: Colin Walters -.\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 06/29/2017 -.\" Manual: ostree admin switch -.\" Source: OSTree -.\" Language: English -.\" -.TH "OSTREE ADMIN SWITCH" "1" "" "OSTree" "ostree admin switch" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -ostree-admin-switch \- Construct new tree from current origin and deploy it, if it changed -.SH "SYNOPSIS" -.HP \w'\fBostree\ admin\ switch\fR\ 'u -\fBostree admin switch\fR {REF} -.SH "DESCRIPTION" -.PP -Choose a different REF forom the current remote to track\&. This is the ref that will be "tracked" and upgraded with -\fBostree admin upgrade\fR\&. Like an upgrade, the operating system state will be preserved\&. -.SH "OPTIONS" -.PP -\fB\-\-os\fR="STATEROOT" -.RS 4 -Use a different operating system root than the current one\&. -.RE -.SH "EXAMPLE" -.PP -\fB$ ostree admin switch fedostree/20/workstation/gnome/core\fR diff -Nru ostree-2017.8/man/ostree-admin-undeploy.1 ostree-2017.9/man/ostree-admin-undeploy.1 --- ostree-2017.8/man/ostree-admin-undeploy.1 2017-06-29 17:29:25.000000000 +0000 +++ ostree-2017.9/man/ostree-admin-undeploy.1 1970-01-01 00:00:00.000000000 +0000 @@ -1,80 +0,0 @@ -'\" t -.\" Title: ostree admin undeploy -.\" Author: Colin Walters -.\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 06/29/2017 -.\" Manual: ostree admin undeploy -.\" Source: OSTree -.\" Language: English -.\" -.TH "OSTREE ADMIN UNDEPLO" "1" "" "OSTree" "ostree admin undeploy" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -ostree-admin-undeploy \- Delete deployment at a given index -.SH "SYNOPSIS" -.HP \w'\fBostree\ admin\ undeploy\fR\ 'u -\fBostree admin undeploy\fR {INDEX} -.SH "DESCRIPTION" -.PP -Deletes the deployment at INDEX\&. INDEX must be in range and not reference the currently booted deployment\&. -.SH "EXAMPLE" -.PP -\fB$ ostree admin status\fR -.sp -.if n \{\ -.RS 4 -.\} -.nf - * gnome\-ostree 67e382b11d213a402a5313e61cbc69dfd5ab93cb07\&.0 - origin refspec: gnome\-ostree/buildmaster/x86_64\-runtime - gnome\-ostree ce19c41036cc45e49b0cecf6b157523c2105c4de1c\&.0 - origin refspec: gnome\-ostree/buildmaster/x86_64\-runtime -.fi -.if n \{\ -.RE -.\} -.PP -\fB$ ostree admin undeploy 1\fR -.sp -.if n \{\ -.RS 4 -.\} -.nf - Transaction complete; bootconfig swap: no deployment count change: \-1) - Freed objects: 326\&.5 kB - Deleted deployment ce19c41036cc45e49b0cecf6b157523c2105c4de1c\&.0 -.fi -.if n \{\ -.RE -.\} -.PP -\fB$ ostree admin status\fR -.sp -.if n \{\ -.RS 4 -.\} -.nf - * gnome\-ostree 67e382b11d213a402a5313e61cbc69dfd5ab93cb07\&.0 - origin refspec: gnome\-ostree/buildmaster/x86_64\-runtime -.fi -.if n \{\ -.RE -.\} diff -Nru ostree-2017.8/man/ostree-admin-unlock.1 ostree-2017.9/man/ostree-admin-unlock.1 --- ostree-2017.8/man/ostree-admin-unlock.1 2017-06-29 17:29:25.000000000 +0000 +++ ostree-2017.9/man/ostree-admin-unlock.1 1970-01-01 00:00:00.000000000 +0000 @@ -1,46 +0,0 @@ -'\" t -.\" Title: ostree admin unlock -.\" Author: Colin Walters -.\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 06/29/2017 -.\" Manual: ostree admin unlock -.\" Source: OSTree -.\" Language: English -.\" -.TH "OSTREE ADMIN UNLOCK" "1" "" "OSTree" "ostree admin unlock" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -ostree-admin-unlock \- Prepare the current deployment for hotfix or development -.SH "SYNOPSIS" -.HP \w'\fBostree\ admin\ unlock\fR\ 'u -\fBostree admin unlock\fR [OPTIONS...] -.SH "DESCRIPTION" -.PP -Remove the read\-only bind mount on -/usr -and replace it with a writable overlay filesystem\&. This default invocation of "unlock" is intended for development/testing purposes\&. All changes in the overlay are lost on reboot\&. However, this command also supports "hotfixes", see below\&. -.SH "OPTIONS" -.PP -\fB\-\-hotfix\fR -.RS 4 -If this option is provided, the current deployment will be cloned as a rollback target\&. This option is intended for things like emergency security updates to userspace components such as -sshd\&. The semantics here differ from the default "development" unlock mode in that reboots will retain any changes (which is what you likely want for security hotfixes)\&. -.RE diff -Nru ostree-2017.8/man/ostree-admin-upgrade.1 ostree-2017.9/man/ostree-admin-upgrade.1 --- ostree-2017.8/man/ostree-admin-upgrade.1 2017-06-29 17:29:25.000000000 +0000 +++ ostree-2017.9/man/ostree-admin-upgrade.1 1970-01-01 00:00:00.000000000 +0000 @@ -1,85 +0,0 @@ -'\" t -.\" Title: ostree admin upgrade -.\" Author: Colin Walters -.\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 06/29/2017 -.\" Manual: ostree admin upgrade -.\" Source: OSTree -.\" Language: English -.\" -.TH "OSTREE ADMIN UPGRADE" "1" "" "OSTree" "ostree admin upgrade" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -ostree-admin-upgrade \- Construct new tree from current origin and deploy it, if it changed -.SH "SYNOPSIS" -.HP \w'\fBostree\ admin\ upgrade\fR\ 'u -\fBostree admin upgrade\fR [OPTIONS...] -.SH "DESCRIPTION" -.PP -Downloads the latest version of the current ref from the build server and deploys it, if it changed\&. Reboot the machine for the changes to take effect\&. These phases can be split via -\fB\-\-pull\-only\fR -and -\fB\-\-deploy\-only\fR\&. -.SH "OPTIONS" -.PP -\fB\-\-os\fR="STATEROOT" -.RS 4 -Use a different operating system root than the current one\&. -.RE -.PP -\fB\-\-pull\-only\fR -.RS 4 -Only perform a pull into the repository; do not create a deployment\&. This option can hence safely be used in a background scheduled job with the assurance of not changing system state\&. -.RE -.PP -\fB\-\-deploy\-only\fR -.RS 4 -Create a new deployment from the latest commit in the tracked origin refspec\&. This option is intended to be used by a scheduled system that detected changes via -\fB\-\-pull\-only\fR, and is ready to deploy them\&. -.RE -.PP -\fB\-\-reboot\fR,\fB\-r\fR -.RS 4 -Reboot after a successful upgrade\&. -.RE -.PP -\fB\-\-allow\-downgrade\fR -.RS 4 -Permit deployment of chronologically older trees\&. -.RE -.PP -\fB\-\-override\-commit\fR="CHECKSUM" -.RS 4 -Deploy CHECKSUM instead of the latest tree\&. -.RE -.SH "EXAMPLE" -.PP -\fB$ ostree admin upgrade\fR -.sp -.if n \{\ -.RS 4 -.\} -.nf - No update available\&. -.fi -.if n \{\ -.RE -.\} diff -Nru ostree-2017.8/man/ostree-cat.1 ostree-2017.9/man/ostree-cat.1 --- ostree-2017.8/man/ostree-cat.1 2017-06-29 17:29:25.000000000 +0000 +++ ostree-2017.9/man/ostree-cat.1 1970-01-01 00:00:00.000000000 +0000 @@ -1,50 +0,0 @@ -'\" t -.\" Title: ostree cat -.\" Author: Colin Walters -.\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 06/29/2017 -.\" Manual: ostree cat -.\" Source: OSTree -.\" Language: English -.\" -.TH "OSTREE CAT" "1" "" "OSTree" "ostree cat" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -ostree-cat \- Display or concatenate contents of files -.SH "SYNOPSIS" -.HP \w'\fBostree\ cat\fR\ 'u -\fBostree cat\fR {COMMIT} {PATH...} -.SH "DESCRIPTION" -.PP -This command functions much like the typical Unix "cat" command, in that it displays the contents of a file, or concatenates them given two or more files\&. However, this command requires the user to specify a commit \- a checksum or refspec corresponding to a given build\&. If you use a refspec, OSTree will refer to the most recent commit, unless you specify a parent build using the carat (^) at the end of the refspec\&. It will then operate the command in that given commit\&. -.SH "EXAMPLE" -.PP -\fB$ ostree cat my\-branch helloworld\&.txt\fR -.sp -.if n \{\ -.RS 4 -.\} -.nf - Hello, world! -.fi -.if n \{\ -.RE -.\} diff -Nru ostree-2017.8/man/ostree-checkout.1 ostree-2017.9/man/ostree-checkout.1 --- ostree-2017.8/man/ostree-checkout.1 2017-06-29 17:29:25.000000000 +0000 +++ ostree-2017.9/man/ostree-checkout.1 1970-01-01 00:00:00.000000000 +0000 @@ -1,90 +0,0 @@ -'\" t -.\" Title: ostree checkout -.\" Author: Colin Walters -.\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 06/29/2017 -.\" Manual: ostree checkout -.\" Source: OSTree -.\" Language: English -.\" -.TH "OSTREE CHECKOUT" "1" "" "OSTree" "ostree checkout" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -ostree-checkout \- Check out a commit into a filesystem -.SH "SYNOPSIS" -.HP \w'\fBostree\ checkout\fR\ 'u -\fBostree checkout\fR [OPTIONS...] {COMMIT} [DESTINATION] -.SH "DESCRIPTION" -.PP -Checks out the given commit into the filesystem under directory DESTINATION\&. If DESTINATION is not specified, the COMMIT will become the destination checkout target\&. If COMMIT destination already exists, command will error unless -\fB\-\-union\fR -option is selected\&. -.SH "OPTIONS" -.PP -\fB\-\-user\-mode\fR,\fB \-u\fR -.RS 4 -Do not change file ownership or initialize extended attributes\&. -.RE -.PP -\fB\-\-subpath\fR="PATH" -.RS 4 -Checkout sub\-directory PATH\&. -.RE -.PP -\fB\-\-union\fR -.RS 4 -Keep existing directories and unchanged files, overwrite existing files\&. -.RE -.PP -\fB\-\-union\-add\fR -.RS 4 -Keep existing directories and files\&. -.RE -.PP -\fB\-\-allow\-noent\fR -.RS 4 -Do nothing if specified path does not exist\&. -.RE -.PP -\fB\-\-from\-stdin\fR -.RS 4 -Process many checkouts from standard input\&. -.RE -.PP -\fB\-\-from\-file\fR="FILE" -.RS 4 -Process many checkouts from input file\&. -.RE -.SH "EXAMPLE" -.PP -\fB$ ostree checkout my\-branch\fR -.PP -\fB$ ls\fR -.sp -.if n \{\ -.RS 4 -.\} -.nf - file1\ \&\ \&\ \&\ \&file2\ \&\ \&\ \&\ \&\fImy\-branch\fR -.fi -.if n \{\ -.RE -.\} diff -Nru ostree-2017.8/man/ostree-checksum.1 ostree-2017.9/man/ostree-checksum.1 --- ostree-2017.8/man/ostree-checksum.1 2017-06-29 17:29:25.000000000 +0000 +++ ostree-2017.9/man/ostree-checksum.1 1970-01-01 00:00:00.000000000 +0000 @@ -1,50 +0,0 @@ -'\" t -.\" Title: ostree checksum -.\" Author: Colin Walters -.\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 06/29/2017 -.\" Manual: ostree checksum -.\" Source: OSTree -.\" Language: English -.\" -.TH "OSTREE CHECKSUM" "1" "" "OSTree" "ostree checksum" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -ostree-checksum \- Checksum a file or directory -.SH "SYNOPSIS" -.HP \w'\fBostree\ checksum\fR\ 'u -\fBostree checksum\fR {PATH} -.SH "DESCRIPTION" -.PP -Generates a checksum for a given file or directory\&. -.SH "EXAMPLE" -.PP -\fB$ ostree checksum file1\fR -.sp -.if n \{\ -.RS 4 -.\} -.nf - 67e382b11d213a402a5313e61cbc69dfd5ab93cb07fbb8b71c2e84f79fa5d7dc -.fi -.if n \{\ -.RE -.\} diff -Nru ostree-2017.8/man/ostree-commit.1 ostree-2017.9/man/ostree-commit.1 --- ostree-2017.8/man/ostree-commit.1 2017-06-29 17:29:25.000000000 +0000 +++ ostree-2017.9/man/ostree-commit.1 1970-01-01 00:00:00.000000000 +0000 @@ -1,161 +0,0 @@ -'\" t -.\" Title: ostree commit -.\" Author: Colin Walters -.\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 06/29/2017 -.\" Manual: ostree commit -.\" Source: OSTree -.\" Language: English -.\" -.TH "OSTREE COMMIT" "1" "" "OSTree" "ostree commit" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -ostree-commit \- Commit a new revision -.SH "SYNOPSIS" -.HP \w'\fBostree\ commit\fR\ 'u -\fBostree commit\fR [OPTIONS...] \-\-branch= {BRANCH} [PATH] -.SH "DESCRIPTION" -.PP -This allows you to commit changes to a branch\&. The specification of the branch is required\&. The command will print the checksum of a successful commit\&. -.SH "OPTIONS" -.PP -\fB\-\-subject\fR, \fB\-s\fR="SUBJECT" -.RS 4 -One line subject\&. (optional) -.RE -.PP -\fB\-\-body\fR, \fB\-m\fR="BODY" -.RS 4 -Full description\&. (optional) -.RE -.PP -\fB\-\-editor\fR, \fB\-e\fR -.RS 4 -Open a text editor for the commit description\&. It will use OSTREE_EDITOR, VISUAL, EDITOR, or vi, in descending order of preference\&. The commit will be aborted if the message is left empty\&. -.RE -.PP -\fB\-\-branch\fR, \fB\-b\fR="BRANCH" -.RS 4 -Branch\&. Required, unless \-\-orphan is given\&. -.RE -.PP -\fB\-\-tree\fR="dir=PATH" or "tar=TARFILE" or "ref=COMMIT" -.RS 4 -Overlay the given argument as a tree\&. -.RE -.PP -\fB\-\-add\-metadata\-string\fR="KEY=VALUE" -.RS 4 -Add a key/value pair to metadata\&. -.RE -.PP -\fB\-\-add\-detached\-metadata\-string\fR="KEY=VALUE" -.RS 4 -Add a key/value pair to detached metadata\&. -.RE -.PP -\fB\-\-owner\-uid\fR="UID" -.RS 4 -Set file ownership user id\&. -.RE -.PP -\fB\-\-owner\-gid\fR="GID" -.RS 4 -Set file ownership group id\&. -.RE -.PP -\fB\-\-no\-xattrs\fR -.RS 4 -Do not import extended attributes\&. -.RE -.PP -\fB\-\-link\-checkout\-speedup\fR -.RS 4 -Optimize for commits of trees composed of hardlinks into the repository\&. -.RE -.PP -\fB\-\-tar\-autocreate\-parents\fR -.RS 4 -When loading tar archives, automatically create parent directories as needed\&. -.RE -.PP -\fB\-\-skip\-if\-unchanged\fR -.RS 4 -If the contents are unchanged from previous commit, do nothing\&. -.RE -.PP -\fB\-\-statoverride\fR="PATH" -.RS 4 -File containing list of modifications to make permissions (file mode, followed by space, followed by file path)\&. -.RE -.PP -\fB\-\-skip\-list\fR="PATH" -.RS 4 -File containing list of file paths to skip (one path per line)\&. -.RE -.PP -\fB\-\-table\-output\fR -.RS 4 -Output more information in a KEY: VALUE format\&. -.RE -.PP -\fB\-\-generate\-sizes\fR -.RS 4 -Generate size information along with commit metadata\&. -.RE -.PP -\fB\-\-gpg\-sign\fR="KEY\-ID" -.RS 4 -GPG Key ID with which to sign the commit (if have GPGME \- GNU Privacy Guard Made Easy)\&. -.RE -.PP -\fB\-\-gpg\-homedir\fR="HOMEDIR" -.RS 4 -GPG home directory to use when looking for keyrings (if have GPGME \- GNU Privacy Guard Made Easy)\&. -.RE -.PP -\fB\-\-timestamp\fR="TIMESTAMP" -.RS 4 -Override the timestamp of the commit to TIMESTAMP\&. -.RE -.PP -\fB\-\-orphan\fR -.RS 4 -Create a commit without writing to a ref (branch) -.RE -.PP -\fB\-\-fsync\fR="POLICY" -.RS 4 -POLICY is a boolean which specifies whether fsync should be used or not\&. Default to true\&. -.RE -.SH "EXAMPLE" -.PP -\fB$ ostree commit \-\-branch=my\-branch \-\-subject="Initial commit"\fR -.sp -.if n \{\ -.RS 4 -.\} -.nf - 67e382b11d213a402a5313e61cbc69dfd5ab93cb07fbb8b71c2e84f79fa5d7dc -.fi -.if n \{\ -.RE -.\} diff -Nru ostree-2017.8/man/ostree-config.1 ostree-2017.9/man/ostree-config.1 --- ostree-2017.8/man/ostree-config.1 2017-06-29 17:29:26.000000000 +0000 +++ ostree-2017.9/man/ostree-config.1 1970-01-01 00:00:00.000000000 +0000 @@ -1,44 +0,0 @@ -'\" t -.\" Title: ostree config -.\" Author: Colin Walters -.\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 06/29/2017 -.\" Manual: ostree config -.\" Source: OSTree -.\" Language: English -.\" -.TH "OSTREE CONFIG" "1" "" "OSTree" "ostree config" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -ostree-config \- Change configuration settings -.SH "SYNOPSIS" -.HP \w'\fBostree\ config\ get\fR\ 'u -\fBostree config get\fR {SECTIONNAME\&.KEYNAME} -.HP \w'\fBostree\ config\ set\fR\ 'u -\fBostree config set\fR {SECTIONNAME\&.KEYNAME} {VALUE} -.SH "DESCRIPTION" -.PP -Displays or changes a configuration setting\&. -.SH "EXAMPLE" -.PP -\fB$ ostree config get core\&.mode\fR -.PP -bare diff -Nru ostree-2017.8/man/ostree-diff.1 ostree-2017.9/man/ostree-diff.1 --- ostree-2017.8/man/ostree-diff.1 2017-06-29 17:29:26.000000000 +0000 +++ ostree-2017.9/man/ostree-diff.1 1970-01-01 00:00:00.000000000 +0000 @@ -1,85 +0,0 @@ -'\" t -.\" Title: ostree diff -.\" Author: Colin Walters -.\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 06/29/2017 -.\" Manual: ostree diff -.\" Source: OSTree -.\" Language: English -.\" -.TH "OSTREE DIFF" "1" "" "OSTree" "ostree diff" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -ostree-diff \- Compare a directory against a revision -.SH "SYNOPSIS" -.HP \w'\fBostree\ diff\fR\ 'u -\fBostree diff\fR [OPTIONS...] {REV} {TARGETDIR} -.SH "DESCRIPTION" -.PP -Compare directory TARGETDIR against revision REV\&. Shows files and directories modified, added, and deleted\&. If there is a file in TARGETDIR not in REV, it will show with an "A" for "added"\&. If a file in REV is not in TARGETDIR, it shows "D" for "deleted"\&. "M" for "modified" will also show\&. -.SH "OPTIONS" -.PP -\fB\-\-stats\fR -.RS 4 -Print various statistics\&. -.RE -.PP -\fB\-\-fs\-diff\fR -.RS 4 -Print filesystem diff\&. -.RE -.PP -\fB\-\-owner\-uid\fR -.RS 4 -Use file ownership user id for local files\&. -.RE -.PP -\fB\-\-owner\-gid\fR -.RS 4 -Use file ownership group id for local files\&. -.RE -.SH "EXAMPLE" -.PP -\fB$ ostree diff my\-branch^ my\-branch\fR -.sp -.if n \{\ -.RS 4 -.\} -.nf - A /testdirectory - M /helloworld\&.txt -.fi -.if n \{\ -.RE -.\} -.PP -\fB$ ostree diff my\-branch my\-branch^\fR -.sp -.if n \{\ -.RS 4 -.\} -.nf - D /testdirectory - M /helloworld\&.txt -.fi -.if n \{\ -.RE -.\} diff -Nru ostree-2017.8/man/ostree-export.1 ostree-2017.9/man/ostree-export.1 --- ostree-2017.8/man/ostree-export.1 2017-06-29 17:29:26.000000000 +0000 +++ ostree-2017.9/man/ostree-export.1 1970-01-01 00:00:00.000000000 +0000 @@ -1,40 +0,0 @@ -'\" t -.\" Title: ostree export -.\" Author: Colin Walters -.\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 06/29/2017 -.\" Manual: ostree export -.\" Source: OSTree -.\" Language: English -.\" -.TH "OSTREE EXPORT" "1" "" "OSTree" "ostree export" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -ostree-export \- Generate a tar archive from an OSTree commit -.SH "SYNOPSIS" -.HP \w'\fBostree\ export\fR\ 'u -\fBostree export\fR [OPTIONS...] {BRANCH} -.SH "DESCRIPTION" -.PP -This command generates a GNU tar formatted archive from an OSTree commit\&. This is useful for cases like backups, converting OSTree commits into Docker images, and the like\&. -.SH "EXAMPLE" -.PP -\fB$ ostree export exampleos/x86_64/standard | gzip > exampleos\-standard\&.tar\&.gz\fR diff -Nru ostree-2017.8/man/ostree-fsck.1 ostree-2017.9/man/ostree-fsck.1 --- ostree-2017.8/man/ostree-fsck.1 2017-06-29 17:29:26.000000000 +0000 +++ ostree-2017.9/man/ostree-fsck.1 1970-01-01 00:00:00.000000000 +0000 @@ -1,69 +0,0 @@ -'\" t -.\" Title: ostree fsck -.\" Author: Colin Walters -.\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 06/29/2017 -.\" Manual: ostree fsck -.\" Source: OSTree -.\" Language: English -.\" -.TH "OSTREE FSCK" "1" "" "OSTree" "ostree fsck" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -ostree-fsck \- Check the repository for consistency -.SH "SYNOPSIS" -.HP \w'\fBostree\ fsck\fR\ 'u -\fBostree fsck\fR [OPTIONS...] -.SH "DESCRIPTION" -.PP -Checks the repository to verify the content integrity of commit objects\&. Looks for missing and corrupted objects and metadata, and validates directory structure and metadata\&. -.SH "OPTIONS" -.PP -\fB\-\-quiet\fR,\fB\-q\fR -.RS 4 -Only print error messages\&. -.RE -.PP -\fB\-\-delete\fR -.RS 4 -Remove corrupted objects\&. -.RE -.PP -\fB\-\-add\-tombstones\fR -.RS 4 -Add tombstone commit for referenced but missing commits\&. -.RE -.SH "EXAMPLE" -.PP -\fB$ ostree fsck\fR -.sp -.if n \{\ -.RS 4 -.\} -.nf - Enumerating objects\&.\&.\&. - Verifying content integrity of of 2 commit objects - 0/2572 objects - 2571/2572 objects -.fi -.if n \{\ -.RE -.\} diff -Nru ostree-2017.8/man/ostree-gpg-sign.1 ostree-2017.9/man/ostree-gpg-sign.1 --- ostree-2017.8/man/ostree-gpg-sign.1 2017-06-29 17:29:26.000000000 +0000 +++ ostree-2017.9/man/ostree-gpg-sign.1 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -'\" t -.\" Title: ostree gpg-sign -.\" Author: Colin Walters -.\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 06/29/2017 -.\" Manual: ostree gpg-sign -.\" Source: OSTree -.\" Language: English -.\" -.TH "OSTREE GPG\-SIGN" "1" "" "OSTree" "ostree gpg-sign" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -ostree-gpg-sign \- Sign a commit -.SH "SYNOPSIS" -.HP \w'\fBostree\ gpg\-sign\fR\ 'u -\fBostree gpg\-sign\fR [OPTIONS...] {COMMIT} {KEY\-ID...} -.SH "DESCRIPTION" -.PP -Add a new signature to a commit for each specified GPG key\&. Note that currently, this will append a new signature even if the commit is already signed with a given key\&. -.SH "OPTIONS" -.PP -\fB\-\-delete\fR -.RS 4 -Delete signatures having any of the GPG KEY\-IDs\&. -.RE -.PP -\fB\-\-gpg\-homedir\fR="HOMEDIR" -.RS 4 -GPG Homedir to use when looking for keyrings\&. -.RE diff -Nru ostree-2017.8/man/ostree-init.1 ostree-2017.9/man/ostree-init.1 --- ostree-2017.8/man/ostree-init.1 2017-07-04 10:36:49.000000000 +0000 +++ ostree-2017.9/man/ostree-init.1 1970-01-01 00:00:00.000000000 +0000 @@ -1,54 +0,0 @@ -'\" t -.\" Title: ostree init -.\" Author: Colin Walters -.\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 07/04/2017 -.\" Manual: ostree init -.\" Source: OSTree -.\" Language: English -.\" -.TH "OSTREE INIT" "1" "" "OSTree" "ostree init" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -ostree-init \- Initialize a new empty repository -.SH "SYNOPSIS" -.HP \w'\fBostree\ init\fR\ 'u -\fBostree init\fR [OPTIONS...] -.SH "DESCRIPTION" -.PP -Creates a new empty repository\&. -.SH "OPTIONS" -.PP -\fB\-\-mode\fR="MODE" -.RS 4 -Initialize repository in given mode (bare, bare\-user, archive\-z2)\&. Default is "bare"\&. -.RE -.PP -\fB\-\-collection\-id\fR=COLLECTION\-ID -.RS 4 -Set the collection ID of the repository\&. Remotes in clones of this repository must configure the same value in order to pull refs which originated in this repository over peer to peer\&. -.sp -This collection ID must be persistent and globally unique\&. It is formatted as a reverse DNS name (like a D\-Bus interface)\&. It must be set to a reverse DNS domain under your control\&. -.sp -This option may be omitted (the default) to leave peer to peer distribution unsupported for the repository\&. A collection ID may be added to an existing repository in future to enable peer to peer distribution from that point onwards\&. -.sp -If the collection ID is changed for the repository in future, peer to peer distribution of refs from the repository will break for all peers who do not update their remote configuration to the new collection ID\&. -.RE diff -Nru ostree-2017.8/man/ostree-log.1 ostree-2017.9/man/ostree-log.1 --- ostree-2017.8/man/ostree-log.1 2017-06-29 17:29:26.000000000 +0000 +++ ostree-2017.9/man/ostree-log.1 1970-01-01 00:00:00.000000000 +0000 @@ -1,62 +0,0 @@ -'\" t -.\" Title: ostree log -.\" Author: Colin Walters -.\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 06/29/2017 -.\" Manual: ostree log -.\" Source: OSTree -.\" Language: English -.\" -.TH "OSTREE LOG" "1" "" "OSTree" "ostree log" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -ostree-log \- Show log starting at a commit or ref -.SH "SYNOPSIS" -.HP \w'\fBostree\ log\fR\ 'u -\fBostree log\fR [OPTIONS...] {REF} -.SH "DESCRIPTION" -.PP -Shows a log of commits to a given ref or branch\&. Includes commit checksum, timestamp, and commit message\&. -.SH "OPTIONS" -.PP -\fB\-\-raw\fR -.RS 4 -Show raw variant data\&. -.RE -.SH "EXAMPLE" -.PP -\fB$ ostree log my\-branch\fR -.sp -.if n \{\ -.RS 4 -.\} -.nf - commit 67e382b11d213a402a5313e61cbc69dfd5ab93cb07fbb8b71c2e84f79fa5d7dc - Date: 2014\-06\-12 13:42:54 +0000 - This is the second commit - - commit ce19c41036cc45e49b0cecf6b157523c2105c4de1ce30101def1f759daafcc3e - Date: 2014\-06\-12 11:20:08 +0000 - Initial commit -.fi -.if n \{\ -.RE -.\} diff -Nru ostree-2017.8/man/ostree-ls.1 ostree-2017.9/man/ostree-ls.1 --- ostree-2017.8/man/ostree-ls.1 2017-06-29 17:29:26.000000000 +0000 +++ ostree-2017.9/man/ostree-ls.1 1970-01-01 00:00:00.000000000 +0000 @@ -1,80 +0,0 @@ -'\" t -.\" Title: ostree ls -.\" Author: Colin Walters -.\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 06/29/2017 -.\" Manual: ostree ls -.\" Source: OSTree -.\" Language: English -.\" -.TH "OSTREE LS" "1" "" "OSTree" "ostree ls" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -ostree-ls \- List file paths -.SH "SYNOPSIS" -.HP \w'\fBostree\ ls\fR\ 'u -\fBostree ls\fR [OPTIONS...] {COMMIT} [PATHS...] -.SH "DESCRIPTION" -.PP -Prints a list of file paths within the given commit, and within the given path(s) if specified\&. The first letter of the file line output specifies the type: "\-" for regular file, "d" for directory, "l" for symbolic link\&. See EXAMPLE section for more detail on the specific output\&. -.SH "OPTIONS" -.PP -\fB\-\-dironly\fR,\fB\-d\fR -.RS 4 -Do not recurse into directory arguments\&. -.RE -.PP -\fB\-\-recursive\fR,\fB\-R\fR -.RS 4 -Print directories recursively\&. -.RE -.PP -\fB\-\-checksum\fR,\fB\-C\fR -.RS 4 -Print checksum\&. -.RE -.PP -\fB\-\-xattrs\fR,\fB\-X\fR -.RS 4 -Print extended attributes\&. -.RE -.PP -\fB\-\-nul\-filenames\-only\fR -.RS 4 -Print only filenames, NUL separated\&. -.RE -.SH "EXAMPLE" -.PP -\fB$ ostree ls my\-branch\fR -.sp -.if n \{\ -.RS 4 -.\} -.nf - d00644 0 0 0 / - \-00644 0 0 2 /helloworld\&.txt - d00755 0 0 0 /testdirectory -.fi -.if n \{\ -.RE -.\} -.PP -Here, the first column is the file\-type symbol (as explained in the DESCRIPTION section) followed by the S_IFMT file type\&. The next two columns (here: 0 0) are respectively the user ID and group ID for the file\&. After the break, the next number represents that file\*(Aqs standard size\&. The final column is the file path\&. diff -Nru ostree-2017.8/man/ostree-prune.1 ostree-2017.9/man/ostree-prune.1 --- ostree-2017.8/man/ostree-prune.1 2017-06-29 17:29:27.000000000 +0000 +++ ostree-2017.9/man/ostree-prune.1 1970-01-01 00:00:00.000000000 +0000 @@ -1,87 +0,0 @@ -'\" t -.\" Title: ostree prune -.\" Author: Colin Walters -.\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 06/29/2017 -.\" Manual: ostree prune -.\" Source: OSTree -.\" Language: English -.\" -.TH "OSTREE PRUNE" "1" "" "OSTree" "ostree prune" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -ostree-prune \- Search for unreachable objects -.SH "SYNOPSIS" -.HP \w'\fBostree\ prune\fR\ 'u -\fBostree prune\fR [OPTIONS...] -.SH "DESCRIPTION" -.PP -This searches for unreachable objects in the current repository\&. If unreachable objects are found, the command delete them to free space\&. If the -\fB\-\-no\-prune\fR -option is invoked, the command will just print unreachable objects and recommend deleting them\&. -.SH "OPTIONS" -.PP -\fB\-\-no\-prune\fR -.RS 4 -Only display unreachable objects; don\*(Aqt delete\&. -.RE -.PP -\fB\-\-refs\-only\fR -.RS 4 -Only compute reachability via refs\&. -.RE -.PP -\fB\-\-delete\-commit\fR=COMMIT -.RS 4 -Specify a COMMIT to delete\&. -.RE -.PP -\fB\-\-keep\-younger\-than\fR=DATE -.RS 4 -All commits older than DATE will be pruned\&. The format of DATE is the same as that accepted by GNU -date -utility \- for more information see -info date\&. -.RE -.PP -\fB\-\-depth\fR=DEPTH -.RS 4 -Only traverse DEPTH (integer) parents for each commit (default: \-1=infinite)\&. -.RE -.PP -\fB\-\-static\-deltas\-only\fR=DEPTH -.RS 4 -Change the behaviour of \-\-keep\-younger\-than and \-\-delete\-commit to prune only the static deltas files\&. -.RE -.SH "EXAMPLE" -.PP -\fB$ ostree prune\fR -.sp -.if n \{\ -.RS 4 -.\} -.nf - Total objects: 25627 - No unreachable objects -.fi -.if n \{\ -.RE -.\} diff -Nru ostree-2017.8/man/ostree-pull.1 ostree-2017.9/man/ostree-pull.1 --- ostree-2017.8/man/ostree-pull.1 2017-07-04 11:22:04.000000000 +0000 +++ ostree-2017.9/man/ostree-pull.1 1970-01-01 00:00:00.000000000 +0000 @@ -1,104 +0,0 @@ -'\" t -.\" Title: ostree pull -.\" Author: Colin Walters -.\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 07/04/2017 -.\" Manual: ostree pull -.\" Source: OSTree -.\" Language: English -.\" -.TH "OSTREE PULL" "1" "" "OSTree" "ostree pull" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -ostree-pull \- Download data from a remote repository -.SH "SYNOPSIS" -.HP \w'\fBostree\ pull\ \fR\fB{REMOTE}\fR\fB\ \fR\fB[BRANCH]\fR\ 'u -\fBostree pull \fR\fB{REMOTE}\fR\fB \fR\fB[BRANCH]\fR -.SH "OPTIONS" -.PP -\fB\-\-commit\-metadata\-only\fR -.RS 4 -Fetch only the commit metadata\&. -.RE -.PP -\fB\-\-disable\-fsync\fR -.RS 4 -Do no invoke fsync()\&. -.RE -.PP -\fB\-\-localcache\-repo\fR -.RS 4 -Like git\*(Aqs -clone \-\-reference\&. Reuse the provided OSTree repo as a local object cache of objects when doing HTTP fetches\&. May be specified multiple times\&. -.RE -.PP -\fB\-\-untrusted\fR -.RS 4 -Do not trust local sources, verify checksums and don\*(Aqt hardlink into source\&. -.RE -.PP -\fB\-\-disable\-static\-deltas\fR -.RS 4 -Do not use static deltas\&. -.RE -.PP -\fB\-\-mirror\fR -.RS 4 -Write refs suitable for a mirror\&. -.RE -.PP -\fB\-\-subpath\fR=SUBPATH -.RS 4 -Only pull the provided subpath\&. -.RE -.PP -\fB\-\-depth\fR=DEPTH -.RS 4 -Traverse DEPTH parents (\-1=infinite) (default: 0)\&. -.RE -.SH "DESCRIPTION" -.PP -This command can retrieve just a specific commit, or go all the way to performing a full mirror of the remote repository\&. If no -BRANCH -is specified, all branches are retrieved\&. -.PP -A special syntax in the -@ -character allows specifying a specific commit to retrieve from a branch\&. This -.SH "EXAMPLE" -.PP -\fB$ ostree \-\-repo=repo pull \-\-depth=\-1 \-\-mirror remote_name\fR -.PP -Perform a complete mirror of the remote\&. (This is likely most useful if your repository is also -archive\-z2 -mode) -.PP -\fB$ ostree \-\-repo=repo pull remote_name exampleos/x86_64/standard\fR -.PP -Fetch the most recent commit to -exampleos/x86_64/standard\&. -.PP -\fB$ ostree \-\-repo=repo pull remote_name exampleos/x86_64/standard@98ea6e4f216f2fb4b69fff9b3a44842c38686ca685f3f55dc48c5d3fb1107be4\fR -.PP -Download the specific commit starting with -98ea6e -as if it was the latest commit for -exampleos/x86_64/standard\&. diff -Nru ostree-2017.8/man/ostree-pull-local.1 ostree-2017.9/man/ostree-pull-local.1 --- ostree-2017.8/man/ostree-pull-local.1 2017-06-29 17:29:27.000000000 +0000 +++ ostree-2017.9/man/ostree-pull-local.1 1970-01-01 00:00:00.000000000 +0000 @@ -1,68 +0,0 @@ -'\" t -.\" Title: ostree pull-local -.\" Author: Colin Walters -.\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 06/29/2017 -.\" Manual: ostree pull-local -.\" Source: OSTree -.\" Language: English -.\" -.TH "OSTREE PULL\-LOCAL" "1" "" "OSTree" "ostree pull-local" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -ostree-pull-local \- Copy data from a source repository -.SH "SYNOPSIS" -.HP \w'\fBostree\ pull\-local\fR\ 'u -\fBostree pull\-local\fR [OPTIONS...] {SOURCE_REPO} [REFS...] -.SH "DESCRIPTION" -.PP -Copies data from a given repository; optimized for copies only between repositories on the same system\&. -.SH "OPTIONS" -.PP -\fB\-\-remote\fR="REMOTE" -.RS 4 -Add REMOTE to refspec\&. -.RE -.PP -\fB\-\-disable\-fsync\fR -.RS 4 -Do no invoke fsync()\&. -.RE -.PP -\fB\-\-untrusted\fR -.RS 4 -Do not trust source, verify checksums and don\*(Aqt hardlink into source\&. -.RE -.SH "EXAMPLE" -.PP -\fB$ ostree pull\-local /ostree/repo\fR -.sp -.if n \{\ -.RS 4 -.\} -.nf - Enumerating objects\&.\&.\&. - pull: 25709/25709 scanned, 0 objects copied - Writing 5 refs -.fi -.if n \{\ -.RE -.\} diff -Nru ostree-2017.8/man/ostree-refs.1 ostree-2017.9/man/ostree-refs.1 --- ostree-2017.8/man/ostree-refs.1 2017-07-04 10:36:49.000000000 +0000 +++ ostree-2017.9/man/ostree-refs.1 1970-01-01 00:00:00.000000000 +0000 @@ -1,82 +0,0 @@ -'\" t -.\" Title: ostree refs -.\" Author: Colin Walters -.\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 07/04/2017 -.\" Manual: ostree refs -.\" Source: OSTree -.\" Language: English -.\" -.TH "OSTREE REFS" "1" "" "OSTree" "ostree refs" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -ostree-refs \- List refs -.SH "SYNOPSIS" -.HP \w'\fBostree\ refs\fR\ 'u -\fBostree refs\fR [OPTIONS...] [PREFIX] -.SH "DESCRIPTION" -.PP -Lists all refs available on the host\&. If specified, PREFIX assigns the refspec prefix; default prefix is null, which lists all refs\&. -.SH "OPTIONS" -.PP -\fB\-\-list\fR -.RS 4 -For historical reasons, -refs -without this option will strip the specified prefix from the output\&. Normally, one wants to see the full ref, so providing this option ensures the refs are printed in full, rather than truncated\&. -.RE -.PP -\fB\-\-delete\fR -.RS 4 -Delete refs which match PREFIX, rather than listing them\&. If you are trying to reclaim space, you will then need to -\fBostree prune\fR -or -\fBostree admin cleanup\fR\&. -.RE -.PP -\fB\-\-collections\fR -.RS 4 -Enable interactions with refs using the combination of their collection IDs and ref names\&. When listing refs, this changes the output format to include collection IDs, and enables listing remote mirrored refs\&. -.sp -When creating refs, the refspec value passed to the -\fB\-\-create\fR -option is treated as -COLLECTION\-ID:REF\-NAME -and a mirrored ref is created\&. (This is an abuse of the refspec syntax\&.) -.sp -When deleting refs, all refs whose collection ID equals the value of the -\fB\-\-delete\fR -argument are deleted\&. -.RE -.SH "EXAMPLE" -.PP -\fB$ ostree refs\fR -.sp -.if n \{\ -.RS 4 -.\} -.nf - my\-branch - gnome\-ostree/buildmaster/x86_64\-runtime -.fi -.if n \{\ -.RE -.\} diff -Nru ostree-2017.8/man/ostree-remote.1 ostree-2017.9/man/ostree-remote.1 --- ostree-2017.8/man/ostree-remote.1 2017-07-04 10:36:49.000000000 +0000 +++ ostree-2017.9/man/ostree-remote.1 1970-01-01 00:00:00.000000000 +0000 @@ -1,135 +0,0 @@ -'\" t -.\" Title: ostree remote -.\" Author: Colin Walters -.\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 07/04/2017 -.\" Manual: ostree remote -.\" Source: OSTree -.\" Language: English -.\" -.TH "OSTREE REMOTE" "1" "" "OSTree" "ostree remote" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -ostree-remote \- Control remote repository configuration -.SH "SYNOPSIS" -.HP \w'\fBostree\ remote\ add\fR\ 'u -\fBostree remote add\fR [OPTIONS...] {NAME} {URL} [BRANCH...] -.HP \w'\fBostree\ remote\ delete\fR\ 'u -\fBostree remote delete\fR {NAME} -.HP \w'\fBostree\ remote\ show\-url\fR\ 'u -\fBostree remote show\-url\fR {NAME} -.HP \w'\fBostree\ remote\ list\fR\ 'u -\fBostree remote list\fR [OPTIONS...] {NAME} -.HP \w'\fBostree\ remote\ gpg\-import\fR\ 'u -\fBostree remote gpg\-import\fR [OPTIONS...] {NAME} [KEY\-ID...] -.HP \w'\fBostree\ remote\ refs\fR\ 'u -\fBostree remote refs\fR {NAME} -.HP \w'\fBostree\ remote\ summary\fR\ 'u -\fBostree remote summary\fR [OPTIONS...] {NAME} -.HP \w'\fBostree\ remote\ add\-cookie\fR\ 'u -\fBostree remote add\-cookie\fR {NAME} {DOMAIN} {PATH} {COOKIE_NAME} {VALUE} -.HP \w'\fBostree\ remote\ delete\-cookie\fR\ 'u -\fBostree remote delete\-cookie\fR {NAME} {DOMAIN} {PATH} {COOKIE_NAME} {VALUE} -.HP \w'\fBostree\ remote\ list\-cookies\fR\ 'u -\fBostree remote list\-cookies\fR {NAME} -.SH "DESCRIPTION" -.PP -Changes remote repository configurations\&. The NAME refers to the name of the remote\&. -.PP -The -\fBgpg\-import\fR -subcommand can associate GPG keys to a specific remote repository for use when pulling signed commits from that repository (if GPG verification is enabled)\&. -.PP -The GPG keys to import may be in binary OpenPGP format or ASCII armored\&. The optional -[KEY\-ID] -list can restrict which keys are imported from a keyring file or input stream\&. All keys are imported if this list is omitted\&. If neither -\fB\-\-keyring\fR -nor -\fB\-\-stdin\fR -options are given, then keys are imported from the user\*(Aqs personal GPG keyring\&. -.PP -The various cookie related command allow management of a remote specific cookie jar\&. -.SH "\*(AQADD\*(AQ OPTIONS" -.PP -\fB\-\-set\fR="KEY=VALUE" -.RS 4 -Set config option KEY=VALUE for remote\&. -.RE -.PP -\fB\-\-no\-gpg\-verify\fR -.RS 4 -Disable GPG verification\&. -.RE -.PP -\fB\-\-gpg\-import\fR=FILE -.RS 4 -Import one or more GPG keys from a file\&. -.sp -Equivalent to -\fBostree remote gpg\-import \-\-keyring=FILE\fR\&. -.RE -.PP -\fB\-\-collection\-id\fR=COLLECTION\-ID -.RS 4 -Set the collection ID for the remote to a value provided by the repository owner, which allows refs from this remote to be shared peer to peer\&. -.RE -.SH "\*(AQLIST\*(AQ OPTIONS" -.PP -\fB\-u, \-\-show\-urls\fR -.RS 4 -Show remote URLs in list -.RE -.SH "\*(AQGPG\-IMPORT\*(AQ OPTIONS" -.PP -\fB\-k, \-\-keyring\fR=FILE -.RS 4 -Import one or more keys from a file\&. -.sp -This option may be repeated to import from multiple files, but may not be used in combination with -\fB\-\-stdin\fR\&. -.RE -.PP -\fB\-\-stdin\fR -.RS 4 -Import one or more keys from standard input\&. -.sp -This option may not be used in combination with -\fB\-\-keyring\fR\&. -.RE -.SH "\*(AQSUMMARY\*(AQ OPTIONS" -.PP -\fB\-\-raw\fR -.RS 4 -Show raw variant data -.RE -.SH "EXAMPLE" -.PP -\fB$ ostree remote show\-url local\fR -.sp -.if n \{\ -.RS 4 -.\} -.nf - http://192\&.168\&.122\&.1/repo -.fi -.if n \{\ -.RE -.\} diff -Nru ostree-2017.8/man/ostree.repo.5 ostree-2017.9/man/ostree.repo.5 --- ostree-2017.8/man/ostree.repo.5 2017-06-29 17:29:27.000000000 +0000 +++ ostree-2017.9/man/ostree.repo.5 1970-01-01 00:00:00.000000000 +0000 @@ -1,58 +0,0 @@ -'\" t -.\" Title: ostree.repo -.\" Author: Colin Walters -.\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 06/29/2017 -.\" Manual: ostree.repo -.\" Source: OSTree -.\" Language: English -.\" -.TH "OSTREE\&.REPO" "5" "" "OSTree" "ostree.repo" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -ostree.repo \- OSTree repository configuration and layout -.SH "DESCRIPTION" -.PP -An OSTree repository is structurally similar to a git repository; it is a content\-addressed object store containing filesystem trees\&. However, unlike git, ostree is designed to store operating system binaries\&. It records the Unix uid and gid, permissions, as well as extended attributes\&. -.PP -A repository can be in one of three modes; -bare, which is designed as a hard link source for operating system checkouts, -bare\-user, which is like -bare -but works on systems that run as non\-root as well as non\-root containers, and -archive\-z2, which is designed for static HTTP servers\&. -.PP -There is a system repository located at -/ostree/repo\&. If no repository is specified \-\- either by a command\-line option or the -\fBOSTREE_REPO\fR -environment variable \-\- the -\fBostree\fR -as well as many API calls will use it by default\&. -.SH "COMPONENTS OF A REPOSITORY" -.PP -The only user\-editable component is the -config -file\&. For more information, see -\fBostree.repo-config\fR(5)\&. -.SH "SEE ALSO" -.PP -\fBostree\fR(1), -\fBostree.repo-config\fR(1) diff -Nru ostree-2017.8/man/ostree.repo-config.5 ostree-2017.9/man/ostree.repo-config.5 --- ostree-2017.8/man/ostree.repo-config.5 2017-07-05 14:24:59.000000000 +0000 +++ ostree-2017.9/man/ostree.repo-config.5 1970-01-01 00:00:00.000000000 +0000 @@ -1,203 +0,0 @@ -'\" t -.\" Title: ostree.repo-config -.\" Author: Colin Walters -.\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 07/05/2017 -.\" Manual: ostree.repo-config -.\" Source: OSTree -.\" Language: English -.\" -.TH "OSTREE\&.REPO\-CONFI" "5" "" "OSTree" "ostree.repo-config" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -ostree.repo-config \- OSTree repository configuration -.SH "DESCRIPTION" -.PP -The -config -file in an OSTree repository is a "keyfile" in the -\m[blue]\fBXDG Desktop Entry Specification\fR\m[]\&\s-2\u[1]\d\s+2 -format\&. It has several global flags, as well as zero or more remote entries which describe how to access remote repositories\&. -.PP -See -\fBostree.repo\fR(5) -for more information about OSTree repositories\&. -.SH "[CORE] SECTION OPTIONS" -.PP -Repository\-global options\&. The following entries are defined: -.PP -\fImode\fR -.RS 4 -One of -bare, -bare\-user -or -archive\-z2\&. -.RE -.PP -\fIrepo_version\fR -.RS 4 -Currently, this must be set to -1\&. -.RE -.PP -\fIcommit\-update\-summary\fR -.RS 4 -Boolean value controlling whether or not to automatically update the summary file after a commit\&. Defaults to -false\&. -.RE -.PP -\fIfsync\fR -.RS 4 -Boolean value controlling whether or not to ensure files are on stable storage when performing operations such as commits, pulls, and checkouts\&. Defaults to -true\&. -.sp -If you disable fsync, OSTree will no longer be robust against kernel crashes or power loss\&. -.sp -You might choose to disable this for local development repositories, under the assumption they can be recreated from source\&. Similarly, you could disable for a mirror where you could re\-pull\&. -.sp -For the system repository, you might choose to disable fsync if you have uninterruptable power supplies and a well tested kernel\&. -.RE -.SH "[REMOTE "NAME"] SECTION OPTIONS" -.PP -Describes a remote repository location\&. -.PP -\fIurl\fR -.RS 4 -Must be present; declares URL for accessing metadata and content for remote\&. See also -contenturl\&. The supported schemes are documented below\&. -.RE -.PP -\fIcontenturl\fR -.RS 4 -Declares URL for accessing content (filez, static delta parts)\&. When specified, -url -is used just for metadata: summary, static delta "superblocks"\&. -.RE -.PP -\fIproxy\fR -.RS 4 -A string value, if given should be a URL for a HTTP proxy to use for access to this repository\&. -.RE -.PP -\fIgpg\-verify\fR -.RS 4 -A boolean value, defaults to true\&. Controls whether or not OSTree will require commits to be signed by a known GPG key\&. For more information, see the -\fBostree\fR(1) -manual under GPG\&. -.RE -.PP -\fIgpg\-verify\-summary\fR -.RS 4 -A boolean value, defaults to false\&. Controls whether or not OSTree will check if the summary is signed by a known GPG key\&. For more information, see the -\fBostree\fR(1) -manual under GPG\&. -.RE -.PP -\fItls\-permissive\fR -.RS 4 -A boolean value, defaults to false\&. By default, server TLS certificates will be checked against the system certificate store\&. If this variable is set, any certificate will be accepted\&. -.RE -.PP -\fItls\-client\-cert\-path\fR -.RS 4 -Path to file for client\-side certificate, to present when making requests to this repository\&. -.RE -.PP -\fItls\-client\-key\-path\fR -.RS 4 -Path to file containing client\-side certificate key, to present when making requests to this repository\&. -.RE -.PP -\fItls\-ca\-path\fR -.RS 4 -Path to file containing trusted anchors instead of the system CA database\&. -.RE -.PP -\fIunconfigured\-state\fR -.RS 4 -If set, pulls from this remote will fail with the configured text\&. This is intended for OS vendors which have a subscription process to access content\&. -.RE -.PP -\fImin\-free\-space\-percent\fR -.RS 4 -Integer percentage value (0\-99) that specifies a minimum percentage of total space (in blocks) in the underlying filesystem to keep free\&. The default value is 3\&. -.RE -.SH "/ETC/OSTREE/REMOTES\&.D" -.PP -In addition to the -/ostree/repo/config -file, remotes may also be specified in -/etc/ostree/remotes\&.d\&. The remote configuration file must end in -\&.conf; files whose name does not end in -\&.conf -will be ignored\&. -.SH "REPOSITORY URL/CONTENTURL" -.PP -Originally, OSTree had just a -url -option for remotes\&. Since then, the -contenturl -option was introduced\&. Both of these support -file, -http, and -https -schemes\&. -.PP -Additionally, both of these can be prefixed with the string -mirrorlist=, which instructs the client that the target url is a "mirrorlist" format, which is a plain text file of newline\-separated URLs\&. Earlier URLs will be given precedence\&. -.PP -Note that currently, the -tls\-ca\-path -and -tls\-client\-cert\-path -options apply to every HTTP request, even when -contenturl -and/or -mirrorlist -are in use\&. This may change in the future to only apply to metadata (i\&.e\&. -url, not -contenturl) fetches\&. -.SH "PER\-REMOTE GPG KEYRINGS AND VERIFICATION" -.PP -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" -.PP -Some content providers may want to control access to remote repositories via HTTP cookies\&. The -\fBostree remote add\-cookie\fR -and -\fBostree remote delete\-cookie\fR -commands will update a per\-remote lookaside cookie jar, named -$remotename\&.cookies\&.txt\&. -.SH "SEE ALSO" -.PP -\fBostree\fR(1), -\fBostree.repo\fR(5) -.SH "NOTES" -.IP " 1." 4 -XDG Desktop Entry Specification -.RS 4 -\%http://standards.freedesktop.org/desktop-entry-spec/latest/ -.RE diff -Nru ostree-2017.8/man/ostree-reset.1 ostree-2017.9/man/ostree-reset.1 --- ostree-2017.8/man/ostree-reset.1 2017-06-29 17:29:27.000000000 +0000 +++ ostree-2017.9/man/ostree-reset.1 1970-01-01 00:00:00.000000000 +0000 @@ -1,72 +0,0 @@ -'\" t -.\" Title: ostree reset -.\" Author: Colin Walters -.\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 06/29/2017 -.\" Manual: ostree reset -.\" Source: OSTree -.\" Language: English -.\" -.TH "OSTREE RESET" "1" "" "OSTree" "ostree reset" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -ostree-reset \- Reset a ref to a previous commit -.SH "SYNOPSIS" -.HP \w'\fBostree\ reset\ \fR\ 'u -\fBostree reset \fR {REF} {REF_TO_RESET_TO} -.SH "DESCRIPTION" -.PP -Given a commit, this command will reset the ref to a previous specified commit\&. -.SH "EXAMPLE" -.PP -\fB$ ostree log my\-branch\fR -.sp -.if n \{\ -.RS 4 -.\} -.nf - commit 67e382b11d213a402a5313e61cbc69dfd5ab93cb07 - Date: 2014\-06\-12 13:42:54 +0000 - This is the second commit - - commit ce19c41036cc45e49b0cecf6b157523c2105c4de1c - Date: 2014\-06\-12 11:20:08 +0000 - Initial commit -.fi -.if n \{\ -.RE -.\} -.PP -\fB$ ostree reset my\-branch my\-branch^\fR -.PP -\fB$ ostree log my\-branch\fR -.sp -.if n \{\ -.RS 4 -.\} -.nf - commit ce19c41036cc45e49b0cecf6b157523c2105c4de1c - Date: 2014\-06\-12 11:20:08 +0000 - Initial commit -.fi -.if n \{\ -.RE -.\} diff -Nru ostree-2017.8/man/ostree-rev-parse.1 ostree-2017.9/man/ostree-rev-parse.1 --- ostree-2017.8/man/ostree-rev-parse.1 2017-06-29 17:29:27.000000000 +0000 +++ ostree-2017.9/man/ostree-rev-parse.1 1970-01-01 00:00:00.000000000 +0000 @@ -1,50 +0,0 @@ -'\" t -.\" Title: ostree rev-parse -.\" Author: Colin Walters -.\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 06/29/2017 -.\" Manual: ostree rev-parse -.\" Source: OSTree -.\" Language: English -.\" -.TH "OSTREE REV\-PARSE" "1" "" "OSTree" "ostree rev-parse" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -ostree-rev-parse \- Output the target of a rev -.SH "SYNOPSIS" -.HP \w'\fBostree\ rev\-parse\ \fR\ 'u -\fBostree rev\-parse \fR {REV} {PATH} -.SH "DESCRIPTION" -.PP -Given a REV, outputs the checksum of the latest commit of that revision\&. -.SH "EXAMPLE" -.PP -\fB$ ostree rev\-parse my\-branch\fR -.sp -.if n \{\ -.RS 4 -.\} -.nf - ce19c41036cc45e49b0cecf6b157523c2105c4de1ce30101def1f759daafcc3e -.fi -.if n \{\ -.RE -.\} diff -Nru ostree-2017.8/man/ostree-show.1 ostree-2017.9/man/ostree-show.1 --- ostree-2017.8/man/ostree-show.1 2017-06-29 17:29:27.000000000 +0000 +++ ostree-2017.9/man/ostree-show.1 1970-01-01 00:00:00.000000000 +0000 @@ -1,84 +0,0 @@ -'\" t -.\" Title: ostree show -.\" Author: Colin Walters -.\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 06/29/2017 -.\" Manual: ostree show -.\" Source: OSTree -.\" Language: English -.\" -.TH "OSTREE SHOW" "1" "" "OSTree" "ostree show" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -ostree-show \- Output a metadata object -.SH "SYNOPSIS" -.HP \w'\fBostree\ show\fR\ 'u -\fBostree show\fR [OPTIONS...] {OBJECT} -.SH "DESCRIPTION" -.PP -Given an object, shows the metadata for that object\&. For a particular revision, it will show the data for the most recent commit to that revision\&. -.SH "OPTIONS" -.PP -\fB\-\-print\-related\fR -.RS 4 -Show the "related" commits\&. -.RE -.PP -\fB\-\-print\-variant\-type\fR="TYPE" -.RS 4 -Memory map -\fIOBJECT\fR -(in this case a filename) to the GVariant type string\&. -.RE -.PP -\fB\-\-print\-metadata\-key\fR="KEY" -.RS 4 -Print string value of metadata key\&. -.RE -.PP -\fB\-\-print\-detached\-metadata\-key\fR="KEY" -.RS 4 -Print string value of detached metadata key\&. -.RE -.PP -\fB\-\-raw\fR -.RS 4 -Show raw variant data\&. -.RE -.PP -\fB\-\-gpg\-homedir\fR="HOMEDIR" -.RS 4 -GPG home directory to use when looking for keyrings (if have GPGME \- GNU Privacy Guard Made Easy)\&. -.RE -.SH "EXAMPLE" -.PP -\fB$ ostree show my\-branch\fR -.sp -.if n \{\ -.RS 4 -.\} -.nf - commit 67e382b11d213a402a5313e61cbc69dfd5ab93cb07 - Date: 2014\-06\-12 13:42:54 +0000 -.fi -.if n \{\ -.RE -.\} diff -Nru ostree-2017.8/man/ostree-static-delta.1 ostree-2017.9/man/ostree-static-delta.1 --- ostree-2017.8/man/ostree-static-delta.1 2017-06-29 17:29:27.000000000 +0000 +++ ostree-2017.9/man/ostree-static-delta.1 1970-01-01 00:00:00.000000000 +0000 @@ -1,79 +0,0 @@ -'\" t -.\" Title: ostree static-delta -.\" Author: Colin Walters -.\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 06/29/2017 -.\" Manual: ostree static-delta -.\" Source: OSTree -.\" Language: English -.\" -.TH "OSTREE STATIC\-DELTA" "1" "" "OSTree" "ostree static-delta" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -ostree-static-delta \- Manage static delta files -.SH "SYNOPSIS" -.HP \w'\fBostree\ static\-delta\ list\fR\ 'u -\fBostree static\-delta list\fR -.HP \w'\fBostree\ static\-delta\ show\fR\ 'u -\fBostree static\-delta show\fR -.HP \w'\fBostree\ static\-delta\ delete\fR\ 'u -\fBostree static\-delta delete\fR -.HP \w'\fBostree\ static\-delta\ generate\fR\ 'u -\fBostree static\-delta generate\fR {\-\-to=REV} [OPTIONS...] -.HP \w'\fBostree\ static\-delta\ apply\-offline\fR\ 'u -\fBostree static\-delta apply\-offline\fR {PATH} -.SH "DESCRIPTION" -.PP -List and manipulate static delta files\&. -.SH "\*(AQGENERATE\*(AQ OPTIONS" -.PP -\fB\-\-from\fR="REV" -.RS 4 -Create delta from revision REV\&. -.RE -.PP -\fB\-\-to\fR="REV" -.RS 4 -Create delta to revision REV\&. (This option is required\&.) -.RE -.PP -\fB\-\-empty\fR -.RS 4 -Create delta from scratch\&. -.RE -.PP -\fB\-\-max\-usize\fR=SIZE -.RS 4 -Maximum uncompressed size in megabytes\&. -.RE -.SH "EXAMPLE" -.PP -\fB$ ostree static\-delta\fR -.sp -.if n \{\ -.RS 4 -.\} -.nf - (No static deltas) -.fi -.if n \{\ -.RE -.\} diff -Nru ostree-2017.8/man/ostree-summary.1 ostree-2017.9/man/ostree-summary.1 --- ostree-2017.8/man/ostree-summary.1 2017-07-04 10:36:49.000000000 +0000 +++ ostree-2017.9/man/ostree-summary.1 1970-01-01 00:00:00.000000000 +0000 @@ -1,60 +0,0 @@ -'\" t -.\" Title: ostree summary -.\" Author: Colin Walters -.\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 07/04/2017 -.\" Manual: ostree summary -.\" Source: OSTree -.\" Language: English -.\" -.TH "OSTREE SUMMARY" "1" "" "OSTree" "ostree summary" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -ostree-summary \- Regenerate the summary metadata file -.SH "SYNOPSIS" -.HP \w'\fBostree\ summary\fR\ 'u -\fBostree summary\fR [OPTIONS...] -.SH "DESCRIPTION" -.PP -The -summary -file is an optional higher level form of repository metadata that describes the available branches\&. It needs to be manually regenerated after a series of commits\&. Among other things, this allows atomically updating multiple commits\&. -.SH "OPTIONS" -.PP -\fB\-u\fR -.RS 4 -Update the summary file\&. -.sp -Any additional arguments to the command are treated as additional key\(envalue pairs to be added to the summary file as additional metadata\&. They must be in the format -\fB\fIKEY\fR\fR\fB=\fR\fB\fIVALUE\fR\fR -or as two separate arguments\&. The keys must be namespaced for your organisation or repository using a dot prefix\&. The values must be in GVariant text format\&. For example, -\fBexampleos\&.end\-of\-life "@t 1445385600"\fR\&. -.RE -.PP -\fB\-\-gpg\-sign\fR=KEYID -.RS 4 -GPG Key ID to sign the delta with\&. -.RE -.PP -\fB\-\-gpg\-homedir\fR=HOMEDIR -.RS 4 -GPG Homedir to use when looking for keyrings\&. -.RE diff -Nru ostree-2017.8/man/rofiles-fuse.1 ostree-2017.9/man/rofiles-fuse.1 --- ostree-2017.8/man/rofiles-fuse.1 2017-06-29 17:29:27.000000000 +0000 +++ ostree-2017.9/man/rofiles-fuse.1 1970-01-01 00:00:00.000000000 +0000 @@ -1,73 +0,0 @@ -'\" t -.\" Title: rofiles-fuse -.\" Author: Colin Walters -.\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 06/29/2017 -.\" Manual: rofiles-fuse -.\" Source: rofiles-fuse -.\" Language: English -.\" -.TH "ROFILES\-FUSE" "1" "" "rofiles-fuse" "rofiles-fuse" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -rofiles-fuse \- Use FUSE to create a view where directories are writable, files are immutable -.SH "SYNOPSIS" -.HP \w'\fBrofiles\-fuse\ SRCDIR\ MNTPOINT\fR\ 'u -\fBrofiles\-fuse SRCDIR MNTPOINT\fR -.SH "DESCRIPTION" -.PP -Creating a checkout from an OSTree repository by default uses hard links, which means an in\-place mutation to any file corrupts the repository and all checkouts\&. This can be problematic if one wishes to run arbitrary programs against such a checkout\&. For example, RPM -%post -scripts or equivalent\&. -.PP -In the case where one wants to create a tree commit derived from other content, using -\fBrofiles\-fuse\fR -in concert with -\fBostree commit \-\-link\-checkout\-speedup\fR -(or the underlying API) can ensure that only new files are checksummed\&. -.SH "EXAMPLE: UPDATE AN OSTREE COMMIT" -.sp -.if n \{\ -.RS 4 -.\} -.nf -# Initialize a checkout and mount -$ ostree \-\-repo=repo checkout somebranch branch\-checkout -$ mkdir mnt -$ rofiles\-fuse branch\-checkout mnt - -# Now, arbitrary changes to mnt/ are reflected in branch\-checkout -$ echo somenewcontent > mnt/anewfile -$ mkdir mnt/anewdir -$ rm mnt/someoriginalcontent \-rf - -# Commit and cleanup -$ fusermount \-u mnt -$ ostree \-\-repo=repo commit \-\-link\-checkout\-speedup \-b somebranch \-s \*(AqCommit new content\*(Aq \-\-tree=dir=branch\-checkout -$ rm mnt branch\-checkout \-rf - -.fi -.if n \{\ -.RE -.\} -.SH "SEE ALSO" -.PP -\fBostree\fR(1) diff -Nru ostree-2017.8/src/libostree/libostree-devel.sym ostree-2017.9/src/libostree/libostree-devel.sym --- ostree-2017.8/src/libostree/libostree-devel.sym 1970-01-01 00:00:00.000000000 +0000 +++ ostree-2017.9/src/libostree/libostree-devel.sym 2017-07-27 10:19:59.000000000 +0000 @@ -0,0 +1,32 @@ +/* DEVEL symbol file - add new symbols here + Copyright (C) 2016 Colin Walters + + 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. +***/ + +/* Add new symbols here. Release commits should copy this section into -released.sym. */ +LIBOSTREE_2017.10 { +}; + +/* 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. Replace $LASTSTABLE with the last stable version, and $NEWVERSION + * with whatever the next version with new symbols will be. +LIBOSTREE_2017.$NEWVERSION { +global: + someostree_symbol_deleteme; +} LIBOSTREE_2017.$LASTSTABLE; +*/ diff -Nru ostree-2017.8/src/libostree/libostree-experimental.sym ostree-2017.9/src/libostree/libostree-experimental.sym --- ostree-2017.8/src/libostree/libostree-experimental.sym 1970-01-01 00:00:00.000000000 +0000 +++ ostree-2017.9/src/libostree/libostree-experimental.sym 2017-07-17 17:33:36.000000000 +0000 @@ -0,0 +1,78 @@ +/* + * Copyright © 2017 Endless Mobile, 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. + * + * Authors: + * - Philip Withnall + */ + +/* Symbols in this file are added to the build if OSTree is configured with + * --enable-experimental-api. They are not stable or officially supported, and + * might disappear or change in future releases. */ + +LIBOSTREE_2017.6_EXPERIMENTAL { +global: + ostree_remote_ref; + ostree_remote_unref; +} LIBOSTREE_2017.6; + +LIBOSTREE_2017.7_EXPERIMENTAL { +global: + ostree_remote_get_name; +} LIBOSTREE_2017.6_EXPERIMENTAL; + +LIBOSTREE_2017.8_EXPERIMENTAL { +global: + ostree_collection_ref_dup; + ostree_collection_ref_dupv; + ostree_collection_ref_equal; + ostree_collection_ref_free; + ostree_collection_ref_freev; + ostree_collection_ref_get_type; + ostree_collection_ref_hash; + ostree_collection_ref_new; + ostree_repo_find_remotes_async; + ostree_repo_find_remotes_finish; + ostree_repo_finder_avahi_get_type; + ostree_repo_finder_avahi_new; + ostree_repo_finder_avahi_start; + ostree_repo_finder_avahi_stop; + ostree_repo_finder_config_get_type; + ostree_repo_finder_config_new; + ostree_repo_finder_get_type; + ostree_repo_finder_mount_get_type; + ostree_repo_finder_mount_new; + ostree_repo_finder_resolve_async; + ostree_repo_finder_resolve_all_async; + ostree_repo_finder_resolve_all_finish; + ostree_repo_finder_resolve_finish; + ostree_repo_finder_result_compare; + ostree_repo_finder_result_dup; + ostree_repo_finder_result_free; + ostree_repo_finder_result_freev; + ostree_repo_finder_result_get_type; + ostree_repo_finder_result_new; + ostree_repo_get_collection_id; + ostree_repo_list_collection_refs; + ostree_repo_pull_from_remotes_async; + ostree_repo_pull_from_remotes_finish; + ostree_repo_resolve_keyring_for_collection; + ostree_repo_set_collection_id; + ostree_repo_set_collection_ref_immediate; + ostree_repo_transaction_set_collection_ref; + ostree_validate_collection_id; +} LIBOSTREE_2017.7_EXPERIMENTAL; diff -Nru ostree-2017.8/src/libostree/libostree-released.sym ostree-2017.9/src/libostree/libostree-released.sym --- ostree-2017.8/src/libostree/libostree-released.sym 2017-07-06 15:07:11.000000000 +0000 +++ ostree-2017.9/src/libostree/libostree-released.sym 2017-07-27 10:19:59.000000000 +0000 @@ -413,6 +413,9 @@ ostree_validate_remote_name; } LIBOSTREE_2017.7; +LIBOSTREE_2017.9 { +}; + /* NOTE: Only add more content here in release commits! See the * comments at the top of this file. */ diff -Nru ostree-2017.8/src/libostree/ostree-bootloader-grub2.c ostree-2017.9/src/libostree/ostree-bootloader-grub2.c --- ostree-2017.8/src/libostree/ostree-bootloader-grub2.c 2017-06-26 16:18:55.000000000 +0000 +++ ostree-2017.9/src/libostree/ostree-bootloader-grub2.c 2017-07-26 20:37:59.000000000 +0000 @@ -420,15 +420,13 @@ } /* Now let's fdatasync() for the new file */ - { glnx_fd_close int new_config_fd = open (gs_file_get_path_cached (new_config_path), O_RDONLY | O_CLOEXEC); - if (new_config_fd < 0) - { - glnx_set_prefix_error_from_errno (error, "Opening %s", gs_file_get_path_cached (new_config_path)); - goto out; - } + { glnx_fd_close int new_config_fd = -1; + if (!glnx_openat_rdonly (AT_FDCWD, gs_file_get_path_cached (new_config_path), TRUE, &new_config_fd, error)) + goto out; + if (fdatasync (new_config_fd) < 0) { - glnx_set_error_from_errno (error); + (void)glnx_throw_errno_prefix (error, "fdatasync"); goto out; } } diff -Nru ostree-2017.8/src/libostree/ostree-core.c ostree-2017.9/src/libostree/ostree-core.c --- ostree-2017.8/src/libostree/ostree-core.c 2017-07-04 09:59:08.000000000 +0000 +++ ostree-2017.9/src/libostree/ostree-core.c 2017-07-26 20:37:59.000000000 +0000 @@ -26,6 +26,7 @@ #include #include #include +#include #include "libglnx.h" #include "ostree.h" #include "ostree-core-private.h" @@ -35,6 +36,40 @@ #define ALIGN_VALUE(this, boundary) \ (( ((unsigned long)(this)) + (((unsigned long)(boundary)) -1)) & (~(((unsigned long)(boundary))-1))) +/* Return a copy of @input suitable for addition to + * a GError message; newlines are quashed, the value + * is forced to be UTF-8, is truncated to @maxlen (if maxlen != -1). + */ +static char * +quash_string_for_error_message (const char *input, + ssize_t len, + ssize_t maxlen) +{ + if (len == -1) + len = strlen (input); + if (maxlen != -1 && maxlen < len) + len = maxlen; +#if GLIB_CHECK_VERSION(2, 52, 0) + G_GNUC_BEGIN_IGNORE_DEPRECATIONS + char *buf = g_utf8_make_valid (input, len); + G_GNUC_END_IGNORE_DEPRECATIONS +#else + char *buf = g_strndup (input, len); +#endif + for (char *iter = buf; iter && *iter; iter++) + { + char c = *iter; + if (c == '\n') + *iter = ' '; +#if !GLIB_CHECK_VERSION(2, 52, 0) + /* No g_utf8_make_valid()? OK, let's just brute force this. */ + if (!g_ascii_isprint (c)) + *iter = ' '; +#endif + } + return buf; +} + static gboolean file_header_parse (GVariant *metadata, GFileInfo **out_file_info, @@ -740,15 +775,16 @@ GCancellable *cancellable, GError **error) { - g_autoptr(GInputStream) file_input = NULL; - if (!ot_openat_read_stream (parent_dfd, path, TRUE, &file_input, - cancellable, error)) + glnx_fd_close int fd = -1; + if (!glnx_openat_rdonly (parent_dfd, path, TRUE, &fd, error)) return FALSE; struct stat stbuf; - if (!glnx_stream_fstat ((GFileDescriptorBased*)file_input, &stbuf, error)) + if (!glnx_fstat (fd, &stbuf, error)) return FALSE; + g_autoptr(GInputStream) file_input = g_unix_input_stream_new (glnx_steal_fd (&fd), TRUE); + g_autoptr(GFileInfo) ret_file_info = NULL; g_autoptr(GVariant) ret_xattrs = NULL; g_autoptr(GInputStream) ret_input = NULL; @@ -1823,7 +1859,15 @@ size_t len = strlen (checksum); if (len != OSTREE_SHA256_STRING_LEN) - return glnx_throw (error, "Invalid rev '%s'", checksum); + { + /* If we happen to get e.g. an Apache directory listing HTML, don't + * dump it all to the error. + * https://github.com/projectatomic/rpm-ostree/issues/885 + */ + g_autofree char *sanitized = quash_string_for_error_message (checksum, len, + OSTREE_SHA256_STRING_LEN); + return glnx_throw (error, "Invalid rev %s", sanitized); + } for (i = 0; i < len; i++) { diff -Nru ostree-2017.8/src/libostree/ostree-core.h ostree-2017.9/src/libostree/ostree-core.h --- ostree-2017.8/src/libostree/ostree-core.h 2017-07-04 09:59:08.000000000 +0000 +++ ostree-2017.9/src/libostree/ostree-core.h 2017-07-26 20:37:59.000000000 +0000 @@ -195,6 +195,65 @@ OSTREE_REPO_MODE_BARE_USER_ONLY, } OstreeRepoMode; +/** + * OSTREE_COMMIT_META_KEY_VERSION: + * + * GVariant type `s`. This metadata key is used for version numbers. A freeform + * string; the intention is that systems using ostree do not interpret this + * semantically as traditional package managers do. + * + * This is the only ostree-defined metadata key that does not start with `ostree.`. + * Since: 2014.9 + */ +#define OSTREE_COMMIT_META_KEY_VERSION "version" +/** + * OSTREE_COMMIT_META_KEY_ENDOFLIFE_REBASE: + * + * GVariant type `s`. Should contain a refspec defining a new target branch; + * `ostree admin upgrade` and `OstreeSysrootUpgrader` will automatically initiate + * a rebase upon encountering this metadata key. + * + * Since: 2017.7 + */ +#define OSTREE_COMMIT_META_KEY_ENDOFLIFE_REBASE "ostree.endoflife-rebase" +/** + * OSTREE_COMMIT_META_KEY_ENDOFLIFE: + * + * GVariant type `s`. This metadata key is used to display vendor's message + * when an update stream for a particular branch ends. It usually provides + * update instructions for the users. + * + * Since: 2017.7 + */ +#define OSTREE_COMMIT_META_KEY_ENDOFLIFE "ostree.endoflife" +/** + * OSTREE_COMMIT_META_KEY_REF_BINDING: + * + * GVariant type `as`; each element is a branch name. If this is added to a + * commit, `ostree_repo_pull()` will enforce that the commit was retrieved from + * one of the branch names in this array. This prevents "sidegrade" attacks. + * The rationale for having this support multiple branch names is that it helps + * support a "promotion" model of taking a commit and moving it between development + * and production branches. + * + * Since: 2017.9 + */ +#define OSTREE_COMMIT_META_KEY_REF_BINDING "ostree.ref-binding" +/** + * OSTREE_COMMIT_META_KEY_COLLECTION_BINDING: + * + * GVariant type `s`. If this is added to a commit, `ostree_repo_pull()` + * will enforce that the commit was retrieved from a repository which has + * the same collection ID. See `ostree_repo_set_collection_id()`. + * This is most useful in concert with `OSTREE_COMMIT_META_KEY_REF_BINDING`, + * as it more strongly binds the commit to the repository and branch. + * + * Since: 2017.9 + */ +#ifdef OSTREE_ENABLE_EXPERIMENTAL_API +#define OSTREE_COMMIT_META_KEY_COLLECTION_BINDING "ostree.collection-binding" +#endif + _OSTREE_PUBLIC const GVariantType *ostree_metadata_variant_type (OstreeObjectType objtype); diff -Nru ostree-2017.8/src/libostree/ostree-enumtypes.c.template ostree-2017.9/src/libostree/ostree-enumtypes.c.template --- ostree-2017.8/src/libostree/ostree-enumtypes.c.template 2017-06-26 16:18:55.000000000 +0000 +++ ostree-2017.9/src/libostree/ostree-enumtypes.c.template 2017-07-26 20:37:59.000000000 +0000 @@ -23,6 +23,8 @@ #endif #include +#include "ostree-enumtypes.h" + /*** END file-header ***/ /*** BEGIN file-production ***/ diff -Nru ostree-2017.8/src/libostree/ostree-fetcher-curl.c ostree-2017.9/src/libostree/ostree-fetcher-curl.c --- ostree-2017.8/src/libostree/ostree-fetcher-curl.c 2017-07-05 20:42:13.000000000 +0000 +++ ostree-2017.9/src/libostree/ostree-fetcher-curl.c 2017-07-26 20:37:59.000000000 +0000 @@ -353,7 +353,9 @@ g_autofree char *msg = g_strdup_printf ("Server returned HTTP %lu", response); g_task_return_new_error (task, G_IO_ERROR, giocode, "%s", msg); - if (req->fetcher->remote_name) + if (req->fetcher->remote_name && + !((req->flags & OSTREE_FETCHER_REQUEST_OPTIONAL_CONTENT) > 0 && + giocode == G_IO_ERROR_NOT_FOUND)) _ostree_fetcher_journal_failure (req->fetcher->remote_name, eff_url, msg); @@ -859,13 +861,14 @@ _ostree_fetcher_request_to_tmpfile (OstreeFetcher *self, GPtrArray *mirrorlist, const char *filename, + OstreeFetcherRequestFlags flags, guint64 max_size, int priority, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { - _ostree_fetcher_request_async (self, mirrorlist, filename, 0, FALSE, + _ostree_fetcher_request_async (self, mirrorlist, filename, flags, FALSE, max_size, priority, cancellable, callback, user_data); } diff -Nru ostree-2017.8/src/libostree/ostree-fetcher.h ostree-2017.9/src/libostree/ostree-fetcher.h --- ostree-2017.8/src/libostree/ostree-fetcher.h 2017-07-05 20:42:29.000000000 +0000 +++ ostree-2017.9/src/libostree/ostree-fetcher.h 2017-07-26 20:37:59.000000000 +0000 @@ -54,6 +54,11 @@ OSTREE_FETCHER_FLAGS_TRANSFER_GZIP = (1 << 1) } OstreeFetcherConfigFlags; +typedef enum { + OSTREE_FETCHER_REQUEST_NUL_TERMINATION = (1 << 0), + OSTREE_FETCHER_REQUEST_OPTIONAL_CONTENT = (1 << 1) +} OstreeFetcherRequestFlags; + void _ostree_fetcher_uri_free (OstreeFetcherURI *uri); G_DEFINE_AUTOPTR_CLEANUP_FUNC(OstreeFetcherURI, _ostree_fetcher_uri_free) @@ -111,6 +116,7 @@ void _ostree_fetcher_request_to_tmpfile (OstreeFetcher *self, GPtrArray *mirrorlist, const char *filename, + OstreeFetcherRequestFlags flags, guint64 max_size, int priority, GCancellable *cancellable, @@ -122,10 +128,6 @@ char **out_filename, GError **error); -typedef enum { - OSTREE_FETCHER_REQUEST_NUL_TERMINATION = (1 << 0) -} OstreeFetcherRequestFlags; - void _ostree_fetcher_request_to_membuf (OstreeFetcher *self, GPtrArray *mirrorlist, const char *filename, diff -Nru ostree-2017.8/src/libostree/ostree-fetcher-soup.c ostree-2017.9/src/libostree/ostree-fetcher-soup.c --- ostree-2017.8/src/libostree/ostree-fetcher-soup.c 2017-07-04 09:59:08.000000000 +0000 +++ ostree-2017.9/src/libostree/ostree-fetcher-soup.c 2017-07-26 20:37:59.000000000 +0000 @@ -1128,7 +1128,9 @@ g_prefix_error (&local_error, "All %u mirrors failed. Last error was: ", pending->mirrorlist->len); - if (pending->thread_closure->remote_name) + if (pending->thread_closure->remote_name && + !((pending->flags & OSTREE_FETCHER_REQUEST_OPTIONAL_CONTENT) > 0 && + code == G_IO_ERROR_NOT_FOUND)) _ostree_fetcher_journal_failure (pending->thread_closure->remote_name, uristring, local_error->message); @@ -1238,13 +1240,14 @@ _ostree_fetcher_request_to_tmpfile (OstreeFetcher *self, GPtrArray *mirrorlist, const char *filename, + OstreeFetcherRequestFlags flags, guint64 max_size, int priority, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { - _ostree_fetcher_request_async (self, mirrorlist, filename, 0, FALSE, + _ostree_fetcher_request_async (self, mirrorlist, filename, flags, FALSE, max_size, priority, cancellable, callback, user_data); } @@ -1334,8 +1337,10 @@ { if (G_IS_FILE_DESCRIPTOR_BASED (stream)) { + int fd = g_file_descriptor_based_get_fd ((GFileDescriptorBased*)stream); struct stat stbuf; - if (glnx_stream_fstat ((GFileDescriptorBased*)stream, &stbuf, NULL)) + + if (glnx_fstat (fd, &stbuf, NULL)) ret += stbuf.st_size; } } diff -Nru ostree-2017.8/src/libostree/ostree-fetcher-util.c ostree-2017.9/src/libostree/ostree-fetcher-util.c --- ostree-2017.8/src/libostree/ostree-fetcher-util.c 2017-07-05 20:42:25.000000000 +0000 +++ ostree-2017.9/src/libostree/ostree-fetcher-util.c 2017-07-26 20:37:59.000000000 +0000 @@ -55,8 +55,7 @@ _ostree_fetcher_mirrored_request_to_membuf (OstreeFetcher *fetcher, GPtrArray *mirrorlist, const char *filename, - gboolean add_nul, - gboolean allow_noent, + OstreeFetcherRequestFlags flags, GBytes **out_contents, guint64 max_size, GCancellable *cancellable, @@ -79,7 +78,7 @@ data.error = error; _ostree_fetcher_request_to_membuf (fetcher, mirrorlist, filename, - add_nul ? OSTREE_FETCHER_REQUEST_NUL_TERMINATION : 0, + flags, max_size, OSTREE_FETCHER_DEFAULT_PRIORITY, cancellable, fetch_uri_sync_on_complete, &data); while (!data.done) @@ -87,7 +86,7 @@ if (!data.result_buf) { - if (allow_noent) + if (flags & OSTREE_FETCHER_REQUEST_OPTIONAL_CONTENT) { if (g_error_matches (*error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND)) { @@ -112,8 +111,7 @@ gboolean _ostree_fetcher_request_uri_to_membuf (OstreeFetcher *fetcher, OstreeFetcherURI *uri, - gboolean add_nul, - gboolean allow_noent, + OstreeFetcherRequestFlags flags, GBytes **out_contents, guint64 max_size, GCancellable *cancellable, @@ -121,8 +119,7 @@ { g_autoptr(GPtrArray) mirrorlist = g_ptr_array_new (); g_ptr_array_add (mirrorlist, uri); /* no transfer */ - return _ostree_fetcher_mirrored_request_to_membuf (fetcher, mirrorlist, NULL, - add_nul, allow_noent, + return _ostree_fetcher_mirrored_request_to_membuf (fetcher, mirrorlist, NULL, flags, out_contents, max_size, cancellable, error); } diff -Nru ostree-2017.8/src/libostree/ostree-fetcher-util.h ostree-2017.9/src/libostree/ostree-fetcher-util.h --- ostree-2017.8/src/libostree/ostree-fetcher-util.h 2017-07-05 20:42:29.000000000 +0000 +++ ostree-2017.9/src/libostree/ostree-fetcher-util.h 2017-07-26 20:37:59.000000000 +0000 @@ -29,8 +29,7 @@ gboolean _ostree_fetcher_mirrored_request_to_membuf (OstreeFetcher *fetcher, GPtrArray *mirrorlist, const char *filename, - gboolean add_nul, - gboolean allow_noent, + OstreeFetcherRequestFlags flags, GBytes **out_contents, guint64 max_size, GCancellable *cancellable, @@ -38,8 +37,7 @@ gboolean _ostree_fetcher_request_uri_to_membuf (OstreeFetcher *fetcher, OstreeFetcherURI *uri, - gboolean add_nul, - gboolean allow_noent, + OstreeFetcherRequestFlags flags, GBytes **out_contents, guint64 max_size, GCancellable *cancellable, diff -Nru ostree-2017.8/src/libostree/ostree-gpg-verifier.c ostree-2017.9/src/libostree/ostree-gpg-verifier.c --- ostree-2017.8/src/libostree/ostree-gpg-verifier.c 2017-06-26 16:18:55.000000000 +0000 +++ ostree-2017.9/src/libostree/ostree-gpg-verifier.c 2017-07-26 20:37:59.000000000 +0000 @@ -93,6 +93,7 @@ GCancellable *cancellable, GError **error) { + GLNX_AUTO_PREFIX_ERROR("GPG", error); gpgme_error_t gpg_error = 0; ot_auto_gpgme_data gpgme_data_t data_buffer = NULL; ot_auto_gpgme_data gpgme_data_t signature_buffer = NULL; @@ -166,12 +167,8 @@ 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; - } + if (!glnx_openat_rdonly (AT_FDCWD, path, TRUE, &fd, error)) + goto out; gpg_error = gpgme_data_new_from_fd (&kdata, fd); if (gpg_error != GPG_ERR_NO_ERROR) @@ -253,8 +250,6 @@ (void) glnx_shutil_rm_rf_at (AT_FDCWD, tmp_dir, NULL, NULL); } - g_prefix_error (error, "GPG: "); - return result; } diff -Nru ostree-2017.8/src/libostree/ostree-impl-system-generator.c ostree-2017.9/src/libostree/ostree-impl-system-generator.c --- ostree-2017.8/src/libostree/ostree-impl-system-generator.c 2017-07-04 09:59:08.000000000 +0000 +++ ostree-2017.9/src/libostree/ostree-impl-system-generator.c 2017-07-26 20:37:59.000000000 +0000 @@ -203,8 +203,8 @@ return FALSE; g_clear_object (&outstream); /* It should be readable */ - if (fchmod (tmpf.fd, 0644) < 0) - return glnx_throw_errno_prefix (error, "fchmod"); + if (!glnx_fchmod (tmpf.fd, 0644, error)) + return FALSE; /* Error out if somehow it already exists, that'll help us debug conflicts */ if (!glnx_link_tmpfile_at (&tmpf, GLNX_LINK_TMPFILE_NOREPLACE, normal_dir_dfd, "var.mount", error)) diff -Nru ostree-2017.8/src/libostree/ostree-metalink.c ostree-2017.9/src/libostree/ostree-metalink.c --- ostree-2017.8/src/libostree/ostree-metalink.c 2017-06-26 16:18:55.000000000 +0000 +++ ostree-2017.9/src/libostree/ostree-metalink.c 2017-07-26 20:37:59.000000000 +0000 @@ -431,10 +431,7 @@ gssize n_bytes; if (!_ostree_fetcher_request_uri_to_membuf (self->metalink->fetcher, - uri, - FALSE, - FALSE, - &bytes, + uri, 0, &bytes, self->metalink->max_size, self->cancellable, error)) @@ -614,14 +611,9 @@ request.urls = g_ptr_array_new_with_free_func ((GDestroyNotify) _ostree_fetcher_uri_free); request.parser = g_markup_parse_context_new (&metalink_parser, G_MARKUP_PREFIX_ERROR_POSITION, &request, NULL); - if (!_ostree_fetcher_request_uri_to_membuf (self->fetcher, - self->uri, - FALSE, - FALSE, - &contents, - self->max_size, - cancellable, - error)) + if (!_ostree_fetcher_request_uri_to_membuf (self->fetcher, self->uri, 0, + &contents, self->max_size, + cancellable, error)) goto out; data = g_bytes_get_data (contents, &len); diff -Nru ostree-2017.8/src/libostree/ostree-repo.c ostree-2017.9/src/libostree/ostree-repo.c --- ostree-2017.8/src/libostree/ostree-repo.c 2017-07-06 14:48:58.000000000 +0000 +++ ostree-2017.9/src/libostree/ostree-repo.c 2017-07-26 20:37:59.000000000 +0000 @@ -32,6 +32,7 @@ #include #include "ostree-core-private.h" +#include "ostree-sysroot-private.h" #include "ostree-remote-private.h" #include "ostree-repo-private.h" #include "ostree-repo-file.h" @@ -125,6 +126,10 @@ #define SYSCONF_REMOTES SHORTENED_SYSCONFDIR "/ostree/remotes.d" +static GFile * +get_remotes_d_dir (OstreeRepo *self, + GFile *sysroot); + OstreeRemote * _ostree_repo_get_remote (OstreeRepo *self, const char *name, @@ -467,6 +472,7 @@ if (self->uncompressed_objects_dir_fd != -1) (void) close (self->uncompressed_objects_dir_fd); g_clear_object (&self->sysroot_dir); + g_weak_ref_clear (&self->sysroot); g_free (self->remotes_config_dir); if (self->loose_object_devino_hash) @@ -547,10 +553,6 @@ g_assert (self->repodir != NULL); - /* Ensure the "sysroot-path" property is set. */ - if (self->sysroot_dir == NULL) - self->sysroot_dir = g_object_ref (_ostree_get_default_sysroot_path ()); - G_OBJECT_CLASS (ostree_repo_parent_class)->constructed (object); } @@ -645,6 +647,7 @@ self->objects_dir_fd = -1; self->uncompressed_objects_dir_fd = -1; self->commit_stagedir_lock = empty_lockfile; + self->sysroot_kind = OSTREE_REPO_SYSROOT_KIND_UNKNOWN; } /** @@ -728,18 +731,20 @@ gboolean ostree_repo_is_system (OstreeRepo *repo) { - g_autoptr(GFile) default_repo_path = NULL; - g_return_val_if_fail (OSTREE_IS_REPO (repo), FALSE); /* If we were created via ostree_sysroot_get_repo(), we know the answer is yes * without having to compare file paths. */ - if (repo->is_system) + if (repo->sysroot_kind == OSTREE_REPO_SYSROOT_KIND_VIA_SYSROOT || + repo->sysroot_kind == OSTREE_REPO_SYSROOT_KIND_IS_SYSROOT_OSTREE) return TRUE; - default_repo_path = get_default_repo_path (repo->sysroot_dir); + /* No sysroot_dir set? Not a system repo then. */ + if (!repo->sysroot_dir) + return FALSE; + g_autoptr(GFile) default_repo_path = get_default_repo_path (repo->sysroot_dir); return g_file_equal (repo->repodir, default_repo_path); } @@ -916,24 +921,11 @@ remote = ostree_remote_new (name); - /* The OstreeRepo maintains its own internal system root path, - * so we need to not only check if a "sysroot" argument was given - * but also whether it's actually different from OstreeRepo's. - * - * XXX Having API regret about the "sysroot" argument now. - */ - gboolean different_sysroot = FALSE; - if (sysroot != NULL) - different_sysroot = !g_file_equal (sysroot, self->sysroot_dir); - - if (different_sysroot || ostree_repo_is_system (self)) + g_autoptr(GFile) etc_ostree_remotes_d = get_remotes_d_dir (self, sysroot); + if (etc_ostree_remotes_d) { g_autoptr(GError) local_error = NULL; - if (sysroot == NULL) - sysroot = self->sysroot_dir; - - g_autoptr(GFile) etc_ostree_remotes_d = g_file_resolve_relative_path (sysroot, SYSCONF_REMOTES); if (!g_file_make_directory_with_parents (etc_ostree_remotes_d, cancellable, &local_error)) { @@ -1761,8 +1753,6 @@ if (!glnx_open_tmpfile_linkable_at (dfd, ".", O_RDWR|O_CLOEXEC, &tmpf, error)) return FALSE; - if (fchmod (tmpf.fd, 0600) < 0) - return glnx_throw_errno_prefix (error, "fchmod"); if (!_ostree_write_bareuser_metadata (tmpf.fd, 0, 0, 644, NULL, error)) return FALSE; } @@ -1874,14 +1864,55 @@ } static GFile * -get_remotes_d_dir (OstreeRepo *self) +get_remotes_d_dir (OstreeRepo *self, + GFile *sysroot) { - if (self->remotes_config_dir != NULL) + /* Support explicit override */ + if (self->sysroot_dir != NULL && self->remotes_config_dir != NULL) return g_file_resolve_relative_path (self->sysroot_dir, self->remotes_config_dir); - else if (ostree_repo_is_system (self)) - return g_file_resolve_relative_path (self->sysroot_dir, SYSCONF_REMOTES); - return NULL; + g_autoptr(GFile) sysroot_owned = NULL; + /* Very complicated sysroot logic; this bit breaks the otherwise mostly clean + * layering between OstreeRepo and OstreeSysroot. First, If a sysroot was + * provided, use it. Otherwise, check to see whether we reference + * /ostree/repo, or if not that, see if we have a ref to a sysroot (and it's + * physical). + */ + g_autoptr(OstreeSysroot) sysroot_ref = NULL; + if (sysroot == NULL) + { + /* No explicit sysroot? Let's see if we have a kind */ + switch (self->sysroot_kind) + { + case OSTREE_REPO_SYSROOT_KIND_UNKNOWN: + g_assert_not_reached (); + break; + case OSTREE_REPO_SYSROOT_KIND_NO: + break; + case OSTREE_REPO_SYSROOT_KIND_IS_SYSROOT_OSTREE: + sysroot = sysroot_owned = g_file_new_for_path ("/"); + break; + case OSTREE_REPO_SYSROOT_KIND_VIA_SYSROOT: + sysroot_ref = (OstreeSysroot*)g_weak_ref_get (&self->sysroot); + /* Only write to /etc/ostree/remotes.d if we are pointed at a deployment */ + if (sysroot_ref != NULL && !sysroot_ref->is_physical) + sysroot = ostree_sysroot_get_path (sysroot_ref); + break; + } + } + /* For backwards compat, also fall back to the sysroot-path variable, which we + * don't set anymore internally, and I hope no one else uses. + */ + if (sysroot == NULL && sysroot_ref == NULL) + sysroot = self->sysroot_dir; + + /* Did we find a sysroot? If not, NULL means use the repo config, otherwise + * return the path in /etc. + */ + if (sysroot == NULL) + return NULL; + else + return g_file_resolve_relative_path (sysroot, SYSCONF_REMOTES); } static gboolean @@ -2036,7 +2067,7 @@ if (!add_remotes_from_keyfile (self, self->config, NULL, error)) return FALSE; - g_autoptr(GFile) remotes_d = get_remotes_d_dir (self); + g_autoptr(GFile) remotes_d = get_remotes_d_dir (self, NULL); if (remotes_d == NULL) return TRUE; @@ -2101,6 +2132,7 @@ GCancellable *cancellable, GError **error) { + struct stat self_stbuf; struct stat stbuf; g_return_val_if_fail (error == NULL || *error == NULL, FALSE); @@ -2137,6 +2169,9 @@ return FALSE; } + if (!glnx_fstat (self->repo_dir_fd, &self_stbuf, error)) + return FALSE; + if (!glnx_opendirat (self->repo_dir_fd, "objects", TRUE, &self->objects_dir_fd, error)) { @@ -2166,6 +2201,20 @@ self->target_owner_uid = self->target_owner_gid = -1; } + if (self->writable) + { + /* Always try to recreate the tmpdir to be nice to people + * who are looking to free up space. + * + * https://github.com/ostreedev/ostree/issues/1018 + */ + if (mkdirat (self->repo_dir_fd, "tmp", 0755) == -1) + { + if (G_UNLIKELY (errno != EEXIST)) + return glnx_throw_errno_prefix (error, "mkdir(tmp)"); + } + } + if (!glnx_opendirat (self->repo_dir_fd, "tmp", TRUE, &self->tmp_dir_fd, error)) return FALSE; @@ -2178,6 +2227,27 @@ return FALSE; } + /* If we weren't created via ostree_sysroot_get_repo(), for backwards + * compatibility we need to figure out now whether or not we refer to the + * system repo. See also ostree-sysroot.c. + */ + if (self->sysroot_kind == OSTREE_REPO_SYSROOT_KIND_UNKNOWN) + { + struct stat system_stbuf; + /* Ignore any errors if we can't access /ostree/repo */ + if (fstatat (AT_FDCWD, "/ostree/repo", &system_stbuf, 0) == 0) + { + /* Are we the same as /ostree/repo? */ + if (self_stbuf.st_dev == system_stbuf.st_dev && + self_stbuf.st_ino == system_stbuf.st_ino) + self->sysroot_kind = OSTREE_REPO_SYSROOT_KIND_IS_SYSROOT_OSTREE; + else + self->sysroot_kind = OSTREE_REPO_SYSROOT_KIND_NO; + } + else + self->sysroot_kind = OSTREE_REPO_SYSROOT_KIND_NO; + } + if (!ostree_repo_reload_config (self, cancellable, error)) return FALSE; @@ -4144,7 +4214,7 @@ return g_steal_pointer (&file); } - g_autoptr(GFile) remotes_d = get_remotes_d_dir (self); + g_autoptr(GFile) remotes_d = get_remotes_d_dir (self, NULL); if (remotes_d) { g_autoptr(GFile) file2 = g_file_get_child (remotes_d, remote->keyring); @@ -4648,9 +4718,10 @@ return FALSE; g_autofree char *superblock = _ostree_get_relative_static_delta_superblock_path ((from && from[0]) ? from : NULL, to); - glnx_fd_close int superblock_file_fd = openat (self->repo_dir_fd, superblock, O_RDONLY | O_CLOEXEC); - if (superblock_file_fd == -1) - return glnx_throw_errno (error); + glnx_fd_close int superblock_file_fd = -1; + + if (!glnx_openat_rdonly (self->repo_dir_fd, superblock, TRUE, &superblock_file_fd, error)) + return FALSE; g_autoptr(GInputStream) in_stream = g_unix_input_stream_new (superblock_file_fd, FALSE); if (!in_stream) diff -Nru ostree-2017.8/src/libostree/ostree-repo-checkout.c ostree-2017.9/src/libostree/ostree-repo-checkout.c --- ostree-2017.8/src/libostree/ostree-repo-checkout.c 2017-07-04 11:21:58.000000000 +0000 +++ ostree-2017.9/src/libostree/ostree-repo-checkout.c 2017-07-26 20:37:59.000000000 +0000 @@ -81,8 +81,8 @@ if (!g_output_stream_close (temp_out, cancellable, error)) return FALSE; - if (fchmod (tmpf.fd, file_mode) < 0) - return glnx_throw_errno (error); + if (!glnx_fchmod (tmpf.fd, file_mode, error)) + return FALSE; if (!_ostree_repo_ensure_loose_objdir_at (self->uncompressed_objects_dir_fd, loose_path, @@ -770,9 +770,11 @@ } /* Set directory mtime to OSTREE_TIMESTAMP, so that it is constant for all checkouts. - * Must be done after setting permissions and creating all children. + * Must be done after setting permissions and creating all children. Note we skip doing + * this for directories that already exist (under the theory we possibly don't own them), + * and we also skip it if doing copying checkouts, which is mostly for /etc. */ - if (!did_exist) + if (!did_exist && !options->force_copy) { const struct timespec times[2] = { { OSTREE_TIMESTAMP, UTIME_OMIT }, { OSTREE_TIMESTAMP, 0} }; if (TEMP_FAILURE_RETRY (futimens (destination_dfd, times)) < 0) diff -Nru ostree-2017.8/src/libostree/ostree-repo-commit.c ostree-2017.9/src/libostree/ostree-repo-commit.c --- ostree-2017.8/src/libostree/ostree-repo-commit.c 2017-07-06 14:48:58.000000000 +0000 +++ ostree-2017.9/src/libostree/ostree-repo-commit.c 2017-07-26 20:37:59.000000000 +0000 @@ -253,8 +253,8 @@ if (S_ISREG (mode)) { const mode_t content_mode = (mode & (S_IFREG | 0775)) | S_IRUSR; - if (fchmod (tmpf->fd, content_mode) < 0) - return glnx_throw_errno_prefix (error, "fchmod"); + if (!glnx_fchmod (tmpf->fd, content_mode, error)) + return FALSE; } else g_assert (S_ISLNK (mode)); @@ -266,8 +266,8 @@ return glnx_throw (error, "Invalid mode 0%04o with bits 0%04o in bare-user-only repository", mode, invalid_modebits); - if (fchmod (tmpf->fd, mode) < 0) - return glnx_throw_errno_prefix (error, "fchmod"); + if (!glnx_fchmod (tmpf->fd, mode, error)) + return FALSE; } if (_ostree_repo_mode_is_bare (self->mode)) @@ -299,13 +299,13 @@ typedef struct { - gsize unpacked; - gsize archived; + goffset unpacked; + goffset archived; } OstreeContentSizeCacheEntry; static OstreeContentSizeCacheEntry * -content_size_cache_entry_new (gsize unpacked, - gsize archived) +content_size_cache_entry_new (goffset unpacked, + goffset archived) { OstreeContentSizeCacheEntry *entry = g_slice_new0 (OstreeContentSizeCacheEntry); @@ -325,8 +325,8 @@ static void repo_store_size_entry (OstreeRepo *self, const gchar *checksum, - gsize unpacked, - gsize archived) + goffset unpacked, + goffset archived) { if (G_UNLIKELY (self->object_sizes == NULL)) self->object_sizes = g_hash_table_new_full (g_str_hash, g_str_equal, @@ -495,8 +495,8 @@ } } - if (fchmod (tmpf.fd, 0644) < 0) - return glnx_throw_errno_prefix (error, "fchmod"); + if (!glnx_fchmod (tmpf.fd, 0644, error)) + return FALSE; *out_tmpf = tmpf; tmpf.initialized = FALSE; return TRUE; @@ -594,7 +594,7 @@ */ g_auto(OtCleanupUnlinkat) tmp_unlinker = { self->tmp_dir_fd, NULL }; g_auto(GLnxTmpfile) tmpf = { 0, }; - gssize unpacked_size = 0; + goffset unpacked_size = 0; gboolean indexable = FALSE; /* Is it a symlink physically? */ if (phys_object_is_symlink) @@ -643,17 +643,18 @@ /* Don't close the base; we'll do that later */ g_filter_output_stream_set_close_base_stream ((GFilterOutputStream*)compressed_out_stream, FALSE); - unpacked_size = g_output_stream_splice (compressed_out_stream, file_input, - 0, cancellable, error); - if (unpacked_size < 0) + if (g_output_stream_splice (compressed_out_stream, file_input, + 0, cancellable, error) < 0) return FALSE; + + unpacked_size = g_file_info_get_size (file_info); } if (!g_output_stream_flush (temp_out, cancellable, error)) return FALSE; - if (fchmod (tmpf.fd, 0644) < 0) - return glnx_throw_errno_prefix (error, "fchmod"); + if (!glnx_fchmod (tmpf.fd, 0644, error)) + return FALSE; } const char *actual_checksum = NULL; @@ -733,6 +734,17 @@ } else { + /* Update size metadata if configured */ + if (indexable && object_file_type == G_FILE_TYPE_REGULAR) + { + struct stat stbuf; + + if (!glnx_fstat (tmpf.fd, &stbuf, error)) + return FALSE; + + repo_store_size_entry (self, actual_checksum, unpacked_size, stbuf.st_size); + } + /* This path is for regular files */ if (!commit_loose_regfile_object (self, actual_checksum, &tmpf, uid, gid, mode, @@ -742,17 +754,6 @@ ostree_object_type_to_string (OSTREE_OBJECT_TYPE_FILE)); } - /* Update size metadata if configured */ - if (indexable && object_file_type == G_FILE_TYPE_REGULAR) - { - struct stat stbuf; - - if (!glnx_fstat (tmpf.fd, &stbuf, error)) - return FALSE; - - repo_store_size_entry (self, actual_checksum, unpacked_size, stbuf.st_size); - } - /* Update statistics */ g_mutex_lock (&self->txn_stats_lock); self->txn_stats.content_objects_written++; @@ -851,8 +852,8 @@ return FALSE; if (glnx_loop_write (tmpf.fd, bufp, len) < 0) return glnx_throw_errno_prefix (error, "write()"); - if (fchmod (tmpf.fd, 0644) < 0) - return glnx_throw_errno_prefix (error, "fchmod"); + if (!glnx_fchmod (tmpf.fd, 0644, error)) + return FALSE; /* And commit it into place */ if (!_ostree_repo_commit_tmpf_final (self, actual_checksum, objtype, @@ -2823,18 +2824,16 @@ while (TRUE) { struct dirent *dent; - struct stat stbuf; - g_autoptr(GFileInfo) child_info = NULL; - const char *loose_checksum; if (!glnx_dirfd_iterator_next_dent (src_dfd_iter, &dent, cancellable, error)) return FALSE; if (dent == NULL) break; - if (fstatat (src_dfd_iter->fd, dent->d_name, &stbuf, AT_SYMLINK_NOFOLLOW) == -1) - return glnx_throw_errno (error); + struct stat stbuf; + if (!glnx_fstatat (src_dfd_iter->fd, dent->d_name, &stbuf, AT_SYMLINK_NOFOLLOW, error)) + return FALSE; - loose_checksum = devino_cache_lookup (self, modifier, stbuf.st_dev, stbuf.st_ino); + const char *loose_checksum = devino_cache_lookup (self, modifier, stbuf.st_dev, stbuf.st_ino); if (loose_checksum) { if (!ostree_mutable_tree_replace_file (mtree, dent->d_name, loose_checksum, @@ -2844,7 +2843,7 @@ continue; } - child_info = _ostree_stbuf_to_gfileinfo (&stbuf); + g_autoptr(GFileInfo) child_info = _ostree_stbuf_to_gfileinfo (&stbuf); g_file_info_set_name (child_info, dent->d_name); if (S_ISREG (stbuf.st_mode)) diff -Nru ostree-2017.8/src/libostree/ostree-repo.h ostree-2017.9/src/libostree/ostree-repo.h --- ostree-2017.8/src/libostree/ostree-repo.h 2017-07-05 12:55:43.000000000 +0000 +++ ostree-2017.9/src/libostree/ostree-repo.h 2017-07-26 20:37:59.000000000 +0000 @@ -1244,6 +1244,32 @@ GCancellable *cancellable, GError **error); +#ifdef OSTREE_ENABLE_EXPERIMENTAL_API + +/** + * OSTREE_REPO_METADATA_REF: + * + * The name of a ref which is used to store metadata for the entire repository, + * such as its expected update time (`ostree.summary.expires`), name, or new + * GPG keys. Metadata is stored on contentless commits in the ref, and hence is + * signed with the commits. + * + * This supersedes the additional metadata dictionary in the `summary` file + * (see ostree_repo_regenerate_summary()), as the use of a ref means that the + * metadata for multiple upstream repositories can be included in a single mirror + * repository, disambiguating the refs using collection IDs. In order to support + * peer to peer redistribution of repository metadata, repositories must set a + * collection ID (ostree_repo_set_collection_id()). + * + * Users of OSTree may place arbitrary metadata in commits on this ref, but the + * keys must be namespaced by product or developer. For example, + * `exampleos.end-of-life`. The `ostree.` prefix is reserved. + * + * Since: 2017.8 + */ +#define OSTREE_REPO_METADATA_REF "ostree-metadata" + +#endif /* OSTREE_ENABLE_EXPERIMENTAL_API */ G_END_DECLS diff -Nru ostree-2017.8/src/libostree/ostree-repo-private.h ostree-2017.9/src/libostree/ostree-repo-private.h --- ostree-2017.8/src/libostree/ostree-repo-private.h 2017-07-06 14:48:58.000000000 +0000 +++ ostree-2017.9/src/libostree/ostree-repo-private.h 2017-07-26 20:37:59.000000000 +0000 @@ -76,6 +76,13 @@ GHashTable *devino_cache; }; +typedef enum { + OSTREE_REPO_SYSROOT_KIND_UNKNOWN, + OSTREE_REPO_SYSROOT_KIND_NO, /* Not a system repo */ + OSTREE_REPO_SYSROOT_KIND_VIA_SYSROOT, /* Constructed via ostree_sysroot_get_repo() */ + OSTREE_REPO_SYSROOT_KIND_IS_SYSROOT_OSTREE, /* We match /ostree/repo */ +} OstreeRepoSysrootKind; + /** * OstreeRepo: * @@ -97,6 +104,7 @@ int objects_dir_fd; int uncompressed_objects_dir_fd; GFile *sysroot_dir; + GWeakRef sysroot; /* Weak to avoid a circular ref; see also `is_system` */ char *remotes_config_dir; GHashTable *txn_refs; /* (element-type utf8 utf8) */ @@ -114,7 +122,7 @@ gboolean inited; gboolean writable; - gboolean is_system; /* Was this repo created via ostree_sysroot_get_repo() ? */ + OstreeRepoSysrootKind sysroot_kind; GError *writable_error; gboolean in_transaction; gboolean disable_fsync; diff -Nru ostree-2017.8/src/libostree/ostree-repo-pull.c ostree-2017.9/src/libostree/ostree-repo-pull.c --- ostree-2017.8/src/libostree/ostree-repo-pull.c 2017-07-05 20:42:16.000000000 +0000 +++ ostree-2017.9/src/libostree/ostree-repo-pull.c 2017-07-26 20:37:59.000000000 +0000 @@ -155,6 +155,8 @@ * whether to fetch the primary object after fetching its * detached metadata (no need if it's already stored). */ gboolean object_is_stored; + + OstreeCollectionRef *requested_ref; /* (nullable) */ } FetchObjectData; typedef struct { @@ -172,31 +174,35 @@ char *path; OstreeObjectType objtype; guint recursion_depth; /* NB: not used anymore, though might be nice to print */ + OstreeCollectionRef *requested_ref; /* (nullable) */ } ScanObjectQueueData; static void start_fetch (OtPullData *pull_data, FetchObjectData *fetch); static void start_fetch_deltapart (OtPullData *pull_data, FetchStaticDeltaData *fetch); static gboolean fetcher_queue_is_full (OtPullData *pull_data); -static void queue_scan_one_metadata_object (OtPullData *pull_data, - const char *csum, - OstreeObjectType objtype, - const char *path, - guint recursion_depth); - -static void queue_scan_one_metadata_object_c (OtPullData *pull_data, - const guchar *csum, - OstreeObjectType objtype, - const char *path, - guint recursion_depth); - -static gboolean scan_one_metadata_object_c (OtPullData *pull_data, - const guchar *csum, - OstreeObjectType objtype, - const char *path, - guint recursion_depth, - GCancellable *cancellable, - GError **error); +static void queue_scan_one_metadata_object (OtPullData *pull_data, + const char *csum, + OstreeObjectType objtype, + const char *path, + guint recursion_depth, + const OstreeCollectionRef *ref); + +static void queue_scan_one_metadata_object_c (OtPullData *pull_data, + const guchar *csum, + OstreeObjectType objtype, + const char *path, + guint recursion_depth, + const OstreeCollectionRef *ref); + +static gboolean scan_one_metadata_object_c (OtPullData *pull_data, + const guchar *csum, + OstreeObjectType objtype, + const char *path, + guint recursion_depth, + const OstreeCollectionRef *ref, + GCancellable *cancellable, + GError **error); static gboolean update_progress (gpointer user_data) @@ -422,11 +428,14 @@ scan_data->objtype, scan_data->path, scan_data->recursion_depth, + scan_data->requested_ref, pull_data->cancellable, &error); check_outstanding_requests_handle_error (pull_data, &error); g_free (scan_data->path); + if (scan_data->requested_ref != NULL) + ostree_collection_ref_free (scan_data->requested_ref); g_free (scan_data); return G_SOURCE_CONTINUE; } @@ -461,7 +470,7 @@ { g_autoptr(GBytes) bytes = NULL; if (!_ostree_fetcher_mirrored_request_to_membuf (fetcher, mirrorlist, - filename, TRUE, FALSE, + filename, OSTREE_FETCHER_REQUEST_NUL_TERMINATION, &bytes, OSTREE_MAX_METADATA_SIZE, cancellable, error)) @@ -507,12 +516,13 @@ } static void -enqueue_one_object_request (OtPullData *pull_data, - const char *checksum, - OstreeObjectType objtype, - const char *path, - gboolean is_detached_meta, - gboolean object_is_stored); +enqueue_one_object_request (OtPullData *pull_data, + const char *checksum, + OstreeObjectType objtype, + const char *path, + gboolean is_detached_meta, + gboolean object_is_stored, + const OstreeCollectionRef *ref); static gboolean matches_pull_dir (const char *current_file, @@ -604,18 +614,19 @@ return TRUE; } -/* Import a single content object in the case where - * we have pull_data->remote_repo_local. +/* Synchronously import a single content object; this is used async for content, + * or synchronously for metadata. @src_repo is either + * pull_data->remote_repo_local or one of pull_data->localcache_repos. * * One important special case here is handling the * OSTREE_REPO_PULL_FLAGS_BAREUSERONLY_FILES flag. */ static gboolean -import_one_local_content_object (OtPullData *pull_data, - OstreeRepo *src_repo, - const char *checksum, - GCancellable *cancellable, - GError **error) +import_one_local_content_object_sync (OtPullData *pull_data, + OstreeRepo *src_repo, + const char *checksum, + GCancellable *cancellable, + GError **error) { const gboolean trusted = !pull_data->is_untrusted; if (trusted && !pull_data->is_bareuseronly_files) @@ -664,6 +675,83 @@ return TRUE; } +typedef struct { + OtPullData *pull_data; + OstreeRepo *src_repo; + char checksum[OSTREE_SHA256_STRING_LEN+1]; +} ImportLocalAsyncData; + +static void +async_import_in_thread (GTask *task, + gpointer source, + gpointer task_data, + GCancellable *cancellable) +{ + ImportLocalAsyncData *iataskdata = task_data; + g_autoptr(GError) local_error = NULL; + if (!import_one_local_content_object_sync (iataskdata->pull_data, + iataskdata->src_repo, + iataskdata->checksum, + cancellable, + &local_error)) + g_task_return_error (task, g_steal_pointer (&local_error)); + else + g_task_return_boolean (task, TRUE); +} + +/* Start an async import of a single object; currently used for content objects. + * @src_repo is from pull_data->remote_repo_local or + * pull_data->localcache_repos. + * + * One important special case here is handling the + * OSTREE_REPO_PULL_FLAGS_BAREUSERONLY_FILES flag. + */ +static void +async_import_one_local_content_object (OtPullData *pull_data, + OstreeRepo *src_repo, + const char *checksum, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + ImportLocalAsyncData *iataskdata = g_new0 (ImportLocalAsyncData, 1); + iataskdata->pull_data = pull_data; + iataskdata->src_repo = src_repo; + memcpy (iataskdata->checksum, checksum, OSTREE_SHA256_STRING_LEN); + g_autoptr(GTask) task = g_task_new (pull_data->repo, cancellable, callback, user_data); + g_task_set_source_tag (task, async_import_one_local_content_object); + g_task_set_task_data (task, iataskdata, g_free); + pull_data->n_outstanding_content_write_requests++; + g_task_run_in_thread (task, async_import_in_thread); +} + +static gboolean +async_import_one_local_content_object_finish (OtPullData *pull_data, + GAsyncResult *result, + GError **error) +{ + g_return_val_if_fail (g_task_is_valid (result, pull_data->repo), FALSE); + return g_task_propagate_boolean ((GTask*)result, error); +} + +static void +on_local_object_imported (GObject *object, + GAsyncResult *result, + gpointer user_data) +{ + OtPullData *pull_data = user_data; + g_autoptr(GError) local_error = NULL; + GError **error = &local_error; + + if (!async_import_one_local_content_object_finish (pull_data, result, error)) + goto out; + + out: + g_assert_cmpint (pull_data->n_outstanding_content_write_requests, >, 0); + pull_data->n_outstanding_content_write_requests--; + check_outstanding_requests_handle_error (pull_data, &local_error); +} + static gboolean scan_dirtree_object (OtPullData *pull_data, const char *checksum, @@ -714,10 +802,11 @@ /* Is this a local repo? */ if (pull_data->remote_repo_local) { - if (!import_one_local_content_object (pull_data, pull_data->remote_repo_local, - file_checksum, cancellable, error)) - return FALSE; - + async_import_one_local_content_object (pull_data, pull_data->remote_repo_local, + file_checksum, cancellable, + on_local_object_imported, + pull_data); + g_hash_table_add (pull_data->requested_content, g_steal_pointer (&file_checksum)); /* Note early loop continue */ continue; } @@ -736,9 +825,9 @@ return FALSE; if (!localcache_repo_has_obj) continue; - if (!import_one_local_content_object (pull_data, localcache_repo, file_checksum, - cancellable, error)) - return FALSE; + async_import_one_local_content_object (pull_data, localcache_repo, file_checksum, cancellable, + on_local_object_imported, pull_data); + g_hash_table_add (pull_data->requested_content, g_steal_pointer (&file_checksum)); did_import_from_cache_repo = TRUE; pull_data->n_fetched_localcache_content++; break; @@ -749,7 +838,7 @@ /* Not available locally, queue a HTTP request */ g_hash_table_add (pull_data->requested_content, file_checksum); - enqueue_one_object_request (pull_data, file_checksum, OSTREE_OBJECT_TYPE_FILE, path, FALSE, FALSE); + enqueue_one_object_request (pull_data, file_checksum, OSTREE_OBJECT_TYPE_FILE, path, FALSE, FALSE, NULL); file_checksum = NULL; /* Transfer ownership */ } @@ -779,14 +868,15 @@ g_autofree char *subpath = g_strconcat (path, dirname, "/", NULL); queue_scan_one_metadata_object_c (pull_data, tree_csum_bytes, - OSTREE_OBJECT_TYPE_DIR_TREE, subpath, recursion_depth + 1); + OSTREE_OBJECT_TYPE_DIR_TREE, subpath, recursion_depth + 1, NULL); queue_scan_one_metadata_object_c (pull_data, meta_csum_bytes, - OSTREE_OBJECT_TYPE_DIR_META, subpath, recursion_depth + 1); + OSTREE_OBJECT_TYPE_DIR_META, subpath, recursion_depth + 1, NULL); } return TRUE; } +/* Given a @ref, fetch its contents (should be a SHA256 ASCII string) */ static gboolean fetch_ref_contents (OtPullData *pull_data, const char *main_collection_id, @@ -812,7 +902,7 @@ g_strchomp (ret_contents); if (!ostree_validate_checksum_string (ret_contents, error)) - return FALSE; + return glnx_prefix_error (error, "Fetching %s", filename); ot_transfer_out_value (out_contents, &ret_contents); return TRUE; @@ -883,6 +973,8 @@ { g_variant_unref (fetch_data->object); g_free (fetch_data->path); + if (fetch_data->requested_ref) + ostree_collection_ref_free (fetch_data->requested_ref); g_free (fetch_data); } @@ -1062,7 +1154,7 @@ goto out; } - queue_scan_one_metadata_object_c (pull_data, csum, objtype, fetch_data->path, 0); + queue_scan_one_metadata_object_c (pull_data, csum, objtype, fetch_data->path, 0, fetch_data->requested_ref); out: pull_data->n_outstanding_metadata_write_requests--; @@ -1108,9 +1200,9 @@ g_hash_table_add (pull_data->fetched_detached_metadata, g_strdup (checksum)); if (!fetch_data->object_is_stored) - enqueue_one_object_request (pull_data, checksum, objtype, fetch_data->path, FALSE, FALSE); + enqueue_one_object_request (pull_data, checksum, objtype, fetch_data->path, FALSE, FALSE, fetch_data->requested_ref); else - queue_scan_one_metadata_object (pull_data, checksum, objtype, fetch_data->path, 0); + queue_scan_one_metadata_object (pull_data, checksum, objtype, fetch_data->path, 0, fetch_data->requested_ref); } /* When traversing parents, do not fail on a missing commit. @@ -1125,7 +1217,7 @@ if (pull_data->has_tombstone_commits) { enqueue_one_object_request (pull_data, checksum, OSTREE_OBJECT_TYPE_TOMBSTONE_COMMIT, - fetch_data->path, FALSE, FALSE); + fetch_data->path, FALSE, FALSE, NULL); } } } @@ -1137,12 +1229,8 @@ if (objtype == OSTREE_OBJECT_TYPE_TOMBSTONE_COMMIT) goto out; - fd = openat (_ostree_fetcher_get_dfd (fetcher), tmp_unlinker.path, O_RDONLY | O_CLOEXEC); - if (fd == -1) - { - glnx_set_error_from_errno (error); - goto out; - } + if (!glnx_openat_rdonly (_ostree_fetcher_get_dfd (fetcher), tmp_unlinker.path, TRUE, &fd, error)) + goto out; /* Now delete it, keeping the fd open as the last reference; see comment in * corresponding content fetch path. @@ -1162,9 +1250,9 @@ g_hash_table_add (pull_data->fetched_detached_metadata, g_strdup (checksum)); if (!fetch_data->object_is_stored) - enqueue_one_object_request (pull_data, checksum, objtype, fetch_data->path, FALSE, FALSE); + enqueue_one_object_request (pull_data, checksum, objtype, fetch_data->path, FALSE, FALSE, fetch_data->requested_ref); else - queue_scan_one_metadata_object (pull_data, checksum, objtype, fetch_data->path, 0); + queue_scan_one_metadata_object (pull_data, checksum, objtype, fetch_data->path, 0, fetch_data->requested_ref); } else { @@ -1250,12 +1338,8 @@ if (!_ostree_fetcher_request_to_tmpfile_finish (fetcher, result, &temp_path, error)) goto out; - fd = openat (_ostree_fetcher_get_dfd (fetcher), temp_path, O_RDONLY | O_CLOEXEC); - if (fd == -1) - { - glnx_set_error_from_errno (error); - goto out; - } + if (!glnx_openat_rdonly (_ostree_fetcher_get_dfd (fetcher), temp_path, TRUE, &fd, error)) + goto out; /* From here on, if we fail to apply the delta, we'll re-fetch it */ if (unlinkat (_ostree_fetcher_get_dfd (fetcher), temp_path, 0) < 0) @@ -1295,11 +1379,10 @@ OstreeGpgVerifyResult *result, GError **error) { + const char *error_prefix = glnx_strjoina ("Commit ", checksum); + GLNX_AUTO_PREFIX_ERROR(error_prefix, error); if (result == NULL) - { - g_prefix_error (error, "Commit %s: ", checksum); - return FALSE; - } + return FALSE; /* Allow callers to output the results immediately. */ g_signal_emit_by_name (pull_data->repo, @@ -1307,10 +1390,8 @@ checksum, result); if (!ostree_gpg_verify_result_require_valid_signature (result, error)) - { - g_prefix_error (error, "Commit %s: ", checksum); - return FALSE; - } + return FALSE; + return TRUE; } @@ -1357,12 +1438,151 @@ || (commitstate & OSTREE_REPO_COMMIT_STATE_PARTIAL) > 0; } +#ifdef OSTREE_ENABLE_EXPERIMENTAL_API +/* Reads the collection-id of a given remote from the repo + * configuration. + */ +static char * +get_real_remote_repo_collection_id (OstreeRepo *repo, + const gchar *remote_name) +{ + g_autofree gchar *remote_collection_id = NULL; + if (!ostree_repo_get_remote_option (repo, remote_name, "collection-id", NULL, + &remote_collection_id, NULL) || + (remote_collection_id == NULL) || + (remote_collection_id[0] == '\0')) + return NULL; + + return g_steal_pointer (&remote_collection_id); +} + +/* Reads the collection-id of the remote repo. Where it will be read + * from depends on whether we pull from the "local" remote repo (the + * "file://" URL) or "remote" remote repo (likely the "http(s)://" + * URL). + */ +static char * +get_remote_repo_collection_id (OtPullData *pull_data) +{ + if (pull_data->remote_repo_local != NULL) + { + const char *remote_collection_id = + ostree_repo_get_collection_id (pull_data->remote_repo_local); + if ((remote_collection_id == NULL) || + (remote_collection_id[0] == '\0')) + return NULL; + return g_strdup (remote_collection_id); + } + + return get_real_remote_repo_collection_id (pull_data->repo, + pull_data->remote_name); +} +#endif /* OSTREE_ENABLE_EXPERIMENTAL_API */ + +/* Verify the ref and collection bindings. + * + * The ref binding is verified only if it exists. But if we have the + * collection ID specified in the remote configuration then the ref + * binding must exist, otherwise the verification will fail. Parts of + * the verification can be skipped by passing NULL to the requested_ref + * parameter (in case we requested a checksum directly, without looking it up + * from a ref). + * + * The collection binding is verified only when we have collection ID + * specified in the remote configuration. If it is specified, then the + * binding must exist and must be equal to the remote repository + * collection ID. + */ static gboolean -scan_commit_object (OtPullData *pull_data, - const char *checksum, - guint recursion_depth, - GCancellable *cancellable, - GError **error) +verify_bindings (OtPullData *pull_data, + GVariant *commit, + const OstreeCollectionRef *requested_ref, + GError **error) +{ + g_autofree char *remote_collection_id = NULL; +#ifdef OSTREE_ENABLE_EXPERIMENTAL_API + remote_collection_id = get_remote_repo_collection_id (pull_data); +#endif /* OSTREE_ENABLE_EXPERIMENTAL_API */ + g_autoptr(GVariant) metadata = g_variant_get_child_value (commit, 0); + g_autofree const char **refs = NULL; + if (!g_variant_lookup (metadata, + OSTREE_COMMIT_META_KEY_REF_BINDING, + "^a&s", + &refs)) + { + /* Early return here - if the remote collection ID is NULL, then + * we certainly will not verify the collection binding in the + * commit. + */ + if (remote_collection_id == NULL) + return TRUE; + + return glnx_throw (error, + "expected commit metadata to have ref " + "binding information, found none"); + } + + if (requested_ref != NULL) + { + if (!g_strv_contains ((const char *const *) refs, requested_ref->ref_name)) + { + g_autoptr(GString) refs_dump = g_string_new (NULL); + const char *refs_str; + + if (refs != NULL && (*refs) != NULL) + { + for (const char **iter = refs; *iter != NULL; ++iter) + { + const char *ref = *iter; + + if (refs_dump->len > 0) + g_string_append (refs_dump, ", "); + g_string_append_printf (refs_dump, "‘%s’", ref); + } + + refs_str = refs_dump->str; + } + else + { + refs_str = "no refs"; + } + + return glnx_throw (error, "commit has no requested ref ‘%s’ " + "in ref binding metadata (%s)", + requested_ref->ref_name, refs_str); + } + } + + if (remote_collection_id != NULL) + { +#ifdef OSTREE_ENABLE_EXPERIMENTAL_API + const char *collection_id; + if (!g_variant_lookup (metadata, + OSTREE_COMMIT_META_KEY_COLLECTION_BINDING, + "&s", + &collection_id)) + return glnx_throw (error, + "expected commit metadata to have collection ID " + "binding information, found none"); + if (!g_str_equal (collection_id, remote_collection_id)) + return glnx_throw (error, + "commit has collection ID ‘%s’ in collection binding " + "metadata, while the remote it came from has " + "collection ID ‘%s’", + collection_id, remote_collection_id); +#endif + } + + return TRUE; +} + +static gboolean +scan_commit_object (OtPullData *pull_data, + const char *checksum, + guint recursion_depth, + const OstreeCollectionRef *ref, + GCancellable *cancellable, + GError **error) { gboolean ret = FALSE; /* If we found a legacy transaction flag, assume we have to scan. @@ -1405,6 +1625,15 @@ if (!ostree_repo_load_commit (pull_data->repo, checksum, &commit, &commitstate, error)) goto out; + /* If ref is non-NULL then the commit we fetched was requested through the + * branch, otherwise we requested a commit checksum without specifying a branch. + */ + if (!verify_bindings (pull_data, commit, ref, error)) + { + g_prefix_error (error, "Commit %s: ", checksum); + goto out; + } + /* If we found a legacy transaction flag, assume all commits are partial */ is_partial = commitstate_is_partial (pull_data, commitstate); @@ -1421,7 +1650,7 @@ { queue_scan_one_metadata_object_c (pull_data, parent_csum_bytes, OSTREE_OBJECT_TYPE_COMMIT, NULL, - recursion_depth + 1); + recursion_depth + 1, NULL); } else if (parent_csum_bytes != NULL && depth > 0) { @@ -1448,7 +1677,8 @@ queue_scan_one_metadata_object_c (pull_data, parent_csum_bytes, OSTREE_OBJECT_TYPE_COMMIT, NULL, - recursion_depth + 1); + recursion_depth + 1, + NULL); } } @@ -1475,10 +1705,10 @@ goto out; queue_scan_one_metadata_object_c (pull_data, tree_contents_csum_bytes, - OSTREE_OBJECT_TYPE_DIR_TREE, "/", recursion_depth + 1); + OSTREE_OBJECT_TYPE_DIR_TREE, "/", recursion_depth + 1, NULL); queue_scan_one_metadata_object_c (pull_data, tree_meta_csum_bytes, - OSTREE_OBJECT_TYPE_DIR_META, NULL, recursion_depth + 1); + OSTREE_OBJECT_TYPE_DIR_META, NULL, recursion_depth + 1, NULL); } ret = TRUE; @@ -1487,23 +1717,25 @@ } static void -queue_scan_one_metadata_object (OtPullData *pull_data, - const char *csum, - OstreeObjectType objtype, - const char *path, - guint recursion_depth) +queue_scan_one_metadata_object (OtPullData *pull_data, + const char *csum, + OstreeObjectType objtype, + const char *path, + guint recursion_depth, + const OstreeCollectionRef *ref) { guchar buf[OSTREE_SHA256_DIGEST_LEN]; ostree_checksum_inplace_to_bytes (csum, buf); - queue_scan_one_metadata_object_c (pull_data, buf, objtype, path, recursion_depth); + queue_scan_one_metadata_object_c (pull_data, buf, objtype, path, recursion_depth, ref); } static void -queue_scan_one_metadata_object_c (OtPullData *pull_data, - const guchar *csum, - OstreeObjectType objtype, - const char *path, - guint recursion_depth) +queue_scan_one_metadata_object_c (OtPullData *pull_data, + const guchar *csum, + OstreeObjectType objtype, + const char *path, + guint recursion_depth, + const OstreeCollectionRef *ref) { ScanObjectQueueData *scan_data = g_new0 (ScanObjectQueueData, 1); @@ -1511,19 +1743,21 @@ scan_data->objtype = objtype; scan_data->path = g_strdup (path); scan_data->recursion_depth = recursion_depth; + scan_data->requested_ref = (ref != NULL) ? ostree_collection_ref_dup (ref) : NULL; g_queue_push_tail (&pull_data->scan_object_queue, scan_data); ensure_idle_queued (pull_data); } static gboolean -scan_one_metadata_object_c (OtPullData *pull_data, - const guchar *csum, - OstreeObjectType objtype, - const char *path, - guint recursion_depth, - GCancellable *cancellable, - GError **error) +scan_one_metadata_object_c (OtPullData *pull_data, + const guchar *csum, + OstreeObjectType objtype, + const char *path, + guint recursion_depth, + const OstreeCollectionRef *ref, + GCancellable *cancellable, + GError **error) { g_autofree char *tmp_checksum = ostree_checksum_from_bytes (csum); g_autoptr(GVariant) object = ostree_object_name_serialize (tmp_checksum, objtype); @@ -1594,7 +1828,7 @@ g_hash_table_add (pull_data->requested_metadata, g_variant_ref (object)); do_fetch_detached = (objtype == OSTREE_OBJECT_TYPE_COMMIT); - enqueue_one_object_request (pull_data, tmp_checksum, objtype, path, do_fetch_detached, FALSE); + enqueue_one_object_request (pull_data, tmp_checksum, objtype, path, do_fetch_detached, FALSE, ref); } else if (is_stored && objtype == OSTREE_OBJECT_TYPE_COMMIT) { @@ -1602,10 +1836,10 @@ * detached metadata before scanning it, in case new signatures appear. * https://github.com/projectatomic/rpm-ostree/issues/630 */ if (!g_hash_table_contains (pull_data->fetched_detached_metadata, tmp_checksum)) - enqueue_one_object_request (pull_data, tmp_checksum, objtype, path, TRUE, TRUE); + enqueue_one_object_request (pull_data, tmp_checksum, objtype, path, TRUE, TRUE, ref); else { - if (!scan_commit_object (pull_data, tmp_checksum, recursion_depth, + if (!scan_commit_object (pull_data, tmp_checksum, recursion_depth, ref, pull_data->cancellable, error)) return FALSE; @@ -1627,12 +1861,13 @@ } static void -enqueue_one_object_request (OtPullData *pull_data, - const char *checksum, - OstreeObjectType objtype, - const char *path, - gboolean is_detached_meta, - gboolean object_is_stored) +enqueue_one_object_request (OtPullData *pull_data, + const char *checksum, + OstreeObjectType objtype, + const char *path, + gboolean is_detached_meta, + gboolean object_is_stored, + const OstreeCollectionRef *ref) { gboolean is_meta; FetchObjectData *fetch_data; @@ -1645,6 +1880,7 @@ fetch_data->path = g_strdup (path); fetch_data->is_detached_meta = is_detached_meta; fetch_data->object_is_stored = object_is_stored; + fetch_data->requested_ref = (ref != NULL) ? ostree_collection_ref_dup (ref) : NULL; if (is_meta) pull_data->n_requested_metadata++; @@ -1699,6 +1935,7 @@ else pull_data->n_outstanding_content_fetches++; + OstreeFetcherRequestFlags flags = 0; /* Override the path if we're trying to fetch the .commitmeta file first */ if (fetch->is_detached_meta) { @@ -1706,6 +1943,7 @@ _ostree_loose_path (buf, expected_checksum, OSTREE_OBJECT_TYPE_COMMIT_META, pull_data->remote_mode); obj_subpath = g_build_filename ("objects", buf, NULL); mirrorlist = pull_data->meta_mirrorlist; + flags |= OSTREE_FETCHER_REQUEST_OPTIONAL_CONTENT; } else { @@ -1725,7 +1963,7 @@ expected_max_size = 0; _ostree_fetcher_request_to_tmpfile (pull_data->fetcher, mirrorlist, - obj_subpath, expected_max_size, + obj_subpath, flags, expected_max_size, is_meta ? OSTREE_REPO_PULL_METADATA_PRIORITY : OSTREE_REPO_PULL_CONTENT_PRIORITY, pull_data->cancellable, @@ -1749,7 +1987,7 @@ g_autoptr(GKeyFile) ret_keyfile = g_key_file_new (); if (!g_key_file_load_from_data (ret_keyfile, contents, strlen (contents), 0, error)) - return FALSE; + return glnx_prefix_error (error, "Parsing config"); ot_transfer_out_value (out_keyfile, &ret_keyfile); return TRUE; @@ -1812,7 +2050,7 @@ * for it as logically part of the delta fetch. */ g_hash_table_add (pull_data->requested_fallback_content, g_strdup (checksum)); - enqueue_one_object_request (pull_data, checksum, OSTREE_OBJECT_TYPE_FILE, NULL, FALSE, FALSE); + enqueue_one_object_request (pull_data, checksum, OSTREE_OBJECT_TYPE_FILE, NULL, FALSE, FALSE, NULL); checksum = NULL; /* We transferred ownership to the requested_content hash */ } } @@ -1830,7 +2068,7 @@ g_assert_cmpint (pull_data->n_outstanding_deltapart_fetches, <=, _OSTREE_MAX_OUTSTANDING_DELTAPART_REQUESTS); _ostree_fetcher_request_to_tmpfile (pull_data->fetcher, pull_data->content_mirrorlist, - deltapart_path, fetch->size, + deltapart_path, 0, fetch->size, OSTREE_FETCHER_DEFAULT_PRIORITY, pull_data->cancellable, static_deltapart_fetch_on_complete, @@ -1838,12 +2076,13 @@ } static gboolean -process_one_static_delta (OtPullData *pull_data, - const char *from_revision, - const char *to_revision, - GVariant *delta_superblock, - GCancellable *cancellable, - GError **error) +process_one_static_delta (OtPullData *pull_data, + const char *from_revision, + const char *to_revision, + GVariant *delta_superblock, + const OstreeCollectionRef *ref, + GCancellable *cancellable, + GError **error) { gboolean ret = FALSE; gboolean delta_byteswap; @@ -1918,6 +2157,7 @@ fetch_data->object = ostree_object_name_serialize (to_checksum, OSTREE_OBJECT_TYPE_COMMIT); fetch_data->is_detached_meta = FALSE; fetch_data->object_is_stored = FALSE; + fetch_data->requested_ref = (ref != NULL) ? ostree_collection_ref_dup (ref) : NULL; ostree_repo_write_metadata_async (pull_data->repo, OSTREE_OBJECT_TYPE_COMMIT, to_checksum, to_commit, @@ -2142,6 +2382,7 @@ OtPullData *pull_data; char *from_revision; char *to_revision; + OstreeCollectionRef *requested_ref; /* (nullable) */ } FetchDeltaSuperData; static void @@ -2183,7 +2424,7 @@ goto out; } - queue_scan_one_metadata_object (pull_data, to_revision, OSTREE_OBJECT_TYPE_COMMIT, NULL, 0); + queue_scan_one_metadata_object (pull_data, to_revision, OSTREE_OBJECT_TYPE_COMMIT, NULL, 0, fdata->requested_ref); } else { @@ -2224,7 +2465,7 @@ delta_superblock_data, FALSE)); g_ptr_array_add (pull_data->static_delta_superblocks, g_variant_ref (delta_superblock)); - if (!process_one_static_delta (pull_data, from_revision, to_revision, delta_superblock, + if (!process_one_static_delta (pull_data, from_revision, to_revision, delta_superblock, fdata->requested_ref, pull_data->cancellable, error)) goto out; } @@ -2232,6 +2473,8 @@ out: g_free (fdata->from_revision); g_free (fdata->to_revision); + if (fdata->requested_ref) + ostree_collection_ref_free (fdata->requested_ref); g_free (fdata); g_assert (pull_data->n_outstanding_metadata_fetches > 0); pull_data->n_outstanding_metadata_fetches--; @@ -2446,16 +2689,16 @@ } { - g_autofree char *jar_path = NULL; - g_autofree char *cookie_file = g_strdup_printf ("%s.cookies.txt", - remote_name); - - jar_path = g_build_filename (gs_file_get_path_cached (self->repodir), cookie_file, - NULL); + g_autofree char *cookie_file = g_strdup_printf ("%s.cookies.txt", remote_name); + /* TODO; port away from this; a bit hard since both libsoup and libcurl + * expect a file. Doing ot_fdrel_to_gfile() works for now though. + */ + GFile*repo_path = ostree_repo_get_path (self); + g_autofree char *jar_path = + g_build_filename (gs_file_get_path_cached (repo_path), cookie_file, NULL); - if (g_file_test(jar_path, G_FILE_TEST_IS_REGULAR)) + if (g_file_test (jar_path, G_FILE_TEST_IS_REGULAR)) _ostree_fetcher_set_cookie_jar (fetcher, jar_path); - } success = TRUE; @@ -2507,7 +2750,8 @@ else { ret = _ostree_fetcher_mirrored_request_to_membuf (fetcher, mirrorlist, - filename, FALSE, TRUE, + filename, + OSTREE_FETCHER_REQUEST_OPTIONAL_CONTENT, out_bytes, OSTREE_MAX_METADATA_SIZE, cancellable, error); @@ -2774,7 +3018,8 @@ static void initiate_delta_request (OtPullData *pull_data, const char *from_revision, - const char *to_revision) + const char *to_revision, + const OstreeCollectionRef *ref) { g_autofree char *delta_name = _ostree_get_relative_static_delta_superblock_path (from_revision, to_revision); @@ -2782,6 +3027,7 @@ fdata->pull_data = pull_data; fdata->from_revision = g_strdup (from_revision); fdata->to_revision = g_strdup (to_revision); + fdata->requested_ref = (ref != NULL) ? ostree_collection_ref_dup (ref) : NULL; _ostree_fetcher_request_to_membuf (pull_data->fetcher, pull_data->content_mirrorlist, @@ -2815,7 +3061,7 @@ /* Are deltas disabled? OK, just start an object fetch and be done */ if (pull_data->disable_static_deltas) { - queue_scan_one_metadata_object (pull_data, to_revision, OSTREE_OBJECT_TYPE_COMMIT, NULL, 0); + queue_scan_one_metadata_object (pull_data, to_revision, OSTREE_OBJECT_TYPE_COMMIT, NULL, 0, ref); return TRUE; } @@ -2831,16 +3077,16 @@ return FALSE; if (delta_from_revision) /* Did we find a delta FROM commit? */ - initiate_delta_request (pull_data, delta_from_revision, to_revision); + initiate_delta_request (pull_data, delta_from_revision, to_revision, ref); else if (have_scratch_delta) /* No delta FROM, do we have a scratch? */ - initiate_delta_request (pull_data, NULL, to_revision); + initiate_delta_request (pull_data, NULL, to_revision, ref); else if (pull_data->require_static_deltas) /* No deltas found; are they required? */ { set_required_deltas_error (error, (ref != NULL) ? ref->ref_name : "", to_revision); return FALSE; } else /* No deltas, fall back to object fetches. */ - queue_scan_one_metadata_object (pull_data, to_revision, OSTREE_OBJECT_TYPE_COMMIT, NULL, 0); + queue_scan_one_metadata_object (pull_data, to_revision, OSTREE_OBJECT_TYPE_COMMIT, NULL, 0, ref); } else if (ref != NULL) { @@ -2874,14 +3120,14 @@ /* This is similar to the below, except we *might* use the previous * commit, or we might do a scratch delta first. */ - initiate_delta_request (pull_data, delta_from_revision ?: NULL, to_revision); + initiate_delta_request (pull_data, delta_from_revision ?: NULL, to_revision, ref); } else { /* Legacy path without a summary file - let's try a scratch delta, if that * doesn't work, it'll drop down to object requests. */ - initiate_delta_request (pull_data, NULL, to_revision); + initiate_delta_request (pull_data, NULL, to_revision, NULL); } return TRUE; @@ -3342,7 +3588,7 @@ { if (!_ostree_fetcher_mirrored_request_to_membuf (pull_data->fetcher, pull_data->meta_mirrorlist, - "summary.sig", FALSE, TRUE, + "summary.sig", OSTREE_FETCHER_REQUEST_OPTIONAL_CONTENT, &bytes_sig, OSTREE_MAX_METADATA_SIZE, cancellable, error)) @@ -3366,7 +3612,7 @@ { if (!_ostree_fetcher_mirrored_request_to_membuf (pull_data->fetcher, pull_data->meta_mirrorlist, - "summary", FALSE, TRUE, + "summary", OSTREE_FETCHER_REQUEST_OPTIONAL_CONTENT, &bytes_summary, OSTREE_MAX_METADATA_SIZE, cancellable, error)) @@ -4604,8 +4850,7 @@ if (!_ostree_fetcher_mirrored_request_to_membuf (fetcher, mirrorlist, commit_filename, - FALSE, /* don’t add trailing nul */ - TRUE, /* return NULL on ENOENT */ + OSTREE_FETCHER_REQUEST_OPTIONAL_CONTENT, &commit_bytes, 0, /* no maximum size */ cancellable, @@ -5097,9 +5342,8 @@ { g_autofree gchar *remote_collection_id = NULL; - if (!ostree_repo_get_remote_option (repo, remote_name, "collection-id", NULL, - &remote_collection_id, NULL) || - remote_collection_id == NULL) + remote_collection_id = get_real_remote_repo_collection_id (repo, remote_name); + if (remote_collection_id == NULL) return FALSE; return g_str_equal (remote_collection_id, collection_id); diff -Nru ostree-2017.8/src/libostree/ostree-repo-static-delta-processing.c ostree-2017.9/src/libostree/ostree-repo-static-delta-processing.c --- ostree-2017.8/src/libostree/ostree-repo-static-delta-processing.c 2017-07-04 09:59:08.000000000 +0000 +++ ostree-2017.9/src/libostree/ostree-repo-static-delta-processing.c 2017-07-26 20:37:59.000000000 +0000 @@ -50,7 +50,7 @@ GVariant *mode_dict; GVariant *xattr_dict; - + gboolean object_start; gboolean caught_error; GError **async_error; @@ -68,12 +68,12 @@ guint32 gid; guint32 mode; GVariant *xattrs; - + const guint8 *output_target; const guint8 *input_target_csum; const guint8 *payload_data; - guint64 payload_size; + guint64 payload_size; } StaticDeltaExecutionState; typedef struct { @@ -127,26 +127,21 @@ GCancellable *cancellable, GError **error) { - gboolean ret = FALSE; - guint8 *objcsum; - g_assert (state->checksums != NULL); g_assert (state->output_target == NULL); g_assert (state->checksum_index < state->n_checksums); - objcsum = (guint8*)state->checksums + (state->checksum_index * OSTREE_STATIC_DELTA_OBJTYPE_CSUM_LEN); + guint8 *objcsum = (guint8*)state->checksums + (state->checksum_index * OSTREE_STATIC_DELTA_OBJTYPE_CSUM_LEN); if (G_UNLIKELY(!ostree_validate_structureof_objtype (*objcsum, error))) - goto out; + return FALSE; state->output_objtype = (OstreeObjectType) *objcsum; state->output_target = objcsum + 1; ostree_checksum_inplace_from_bytes (state->output_target, state->checksum); - ret = TRUE; - out: - return ret; + return TRUE; } static guint @@ -353,7 +348,7 @@ gboolean _ostree_static_delta_part_execute_finish (OstreeRepo *repo, GAsyncResult *result, - GError **error) + GError **error) { GSimpleAsyncResult *simple = G_SIMPLE_ASYNC_RESULT (result); @@ -386,7 +381,7 @@ StaticDeltaExecutionState *state, const guint8* buf, gsize len, - GCancellable *cancellable, + GCancellable *cancellable, GError **error) { gsize bytes_written; @@ -407,21 +402,19 @@ static gboolean do_content_open_generic (OstreeRepo *repo, StaticDeltaExecutionState *state, - GCancellable *cancellable, + GCancellable *cancellable, GError **error) { - gboolean ret = FALSE; - g_autoptr(GVariant) modev = NULL; guint64 mode_offset; guint64 xattr_offset; - guint32 uid, gid, mode; if (!read_varuint64 (state, &mode_offset, error)) - goto out; + return FALSE; if (!read_varuint64 (state, &xattr_offset, error)) - goto out; + return FALSE; - modev = g_variant_get_child_value (state->mode_dict, mode_offset); + g_autoptr(GVariant) modev = g_variant_get_child_value (state->mode_dict, mode_offset); + guint32 uid, gid, mode; g_variant_get (modev, "(uuu)", &uid, &gid, &mode); state->uid = GUINT32_FROM_BE (uid); state->gid = GUINT32_FROM_BE (gid); @@ -429,9 +422,7 @@ state->xattrs = g_variant_get_child_value (state->xattr_dict, xattr_offset); - ret = TRUE; - out: - return ret; + return TRUE; } struct bzpatch_opaque_s @@ -460,35 +451,29 @@ GCancellable *cancellable, GError **error) { - gboolean ret = FALSE; guint64 offset, length; - g_autoptr(GMappedFile) input_mfile = NULL; - g_autofree guchar *buf = NULL; - struct bspatch_stream stream; - struct bzpatch_opaque_s opaque; if (!read_varuint64 (state, &offset, error)) - goto out; + return FALSE; if (!read_varuint64 (state, &length, error)) - goto out; + return FALSE; if (state->stats_only) - { - ret = TRUE; - goto out; - } + return TRUE; /* Early return */ if (!state->have_obj) { - input_mfile = g_mapped_file_new_from_fd (state->read_source_fd, FALSE, error); + g_autoptr(GMappedFile) input_mfile = g_mapped_file_new_from_fd (state->read_source_fd, FALSE, error); if (!input_mfile) - goto out; + return FALSE; - buf = g_malloc0 (state->content_size); + g_autofree guchar *buf = g_malloc0 (state->content_size); + struct bzpatch_opaque_s opaque; opaque.state = state; opaque.offset = offset; opaque.length = length; + struct bspatch_stream stream; stream.read = bspatch_read; stream.opaque = &opaque; if (bspatch ((const guint8*)g_mapped_file_get_contents (input_mfile), @@ -496,16 +481,14 @@ buf, state->content_size, &stream) < 0) - goto out; + return FALSE; if (!content_out_write (repo, state, buf, state->content_size, cancellable, error)) - goto out; + return FALSE; } - ret = TRUE; - out: - return ret; + return TRUE; } /* Before, we had a distinction between "trusted" and "untrusted" deltas @@ -534,7 +517,7 @@ static gboolean dispatch_open_splice_and_close (OstreeRepo *repo, StaticDeltaExecutionState *state, - GCancellable *cancellable, + GCancellable *cancellable, GError **error) { gboolean ret = FALSE; @@ -560,7 +543,7 @@ ret = TRUE; goto out; } - + metadata = g_variant_new_from_data (ostree_metadata_variant_type (state->output_objtype), state->payload_data + offset, length, TRUE, NULL, NULL); @@ -581,7 +564,7 @@ guint64 objlen; g_autoptr(GInputStream) object_input = NULL; g_autoptr(GInputStream) memin = NULL; - + if (!do_content_open_generic (repo, state, cancellable, error)) goto out; @@ -591,7 +574,7 @@ goto out; if (!validate_ofs (state, content_offset, state->content_size, error)) goto out; - + if (state->stats_only) { ret = TRUE; @@ -599,7 +582,7 @@ } /* Fast path for regular files to bare repositories */ - if (S_ISREG (state->mode) && + if (S_ISREG (state->mode) && (repo->mode == OSTREE_REPO_MODE_BARE || repo->mode == OSTREE_REPO_MODE_BARE_USER)) { @@ -676,10 +659,10 @@ static gboolean dispatch_open (OstreeRepo *repo, StaticDeltaExecutionState *state, - GCancellable *cancellable, + GCancellable *cancellable, GError **error) { - gboolean ret = FALSE; + GLNX_AUTO_PREFIX_ERROR("opcode open", error); g_assert (state->output_target == NULL); /* FIXME - lift this restriction */ @@ -689,71 +672,58 @@ repo->mode == OSTREE_REPO_MODE_BARE_USER || repo->mode == OSTREE_REPO_MODE_BARE_USER_ONLY); } - + if (!open_output_target (state, cancellable, error)) - goto out; + return FALSE; if (!do_content_open_generic (repo, state, cancellable, error)) - goto out; + return FALSE; if (!read_varuint64 (state, &state->content_size, error)) - goto out; + return FALSE; if (state->stats_only) - { - ret = TRUE; - goto out; - } - + return TRUE; /* Early return */ + if (!_ostree_repo_open_content_bare (repo, state->checksum, state->content_size, &state->tmpf, &state->have_obj, cancellable, error)) - goto out; + return FALSE; if (!state->have_obj) state->content_out = g_unix_output_stream_new (state->tmpf.fd, FALSE); if (!handle_untrusted_content_checksum (repo, state, cancellable, error)) - goto out; + return FALSE; - ret = TRUE; - out: - if (!ret) - g_prefix_error (error, "opcode open: "); - return ret; + return TRUE; } static gboolean dispatch_write (OstreeRepo *repo, StaticDeltaExecutionState *state, - GCancellable *cancellable, + GCancellable *cancellable, GError **error) { - gboolean ret = FALSE; + GLNX_AUTO_PREFIX_ERROR("opcode open-splice-and-close", error); guint64 content_size; guint64 content_offset; - + if (!read_varuint64 (state, &content_size, error)) - goto out; + return FALSE; if (!read_varuint64 (state, &content_offset, error)) - goto out; + return FALSE; if (state->stats_only) - { - ret = TRUE; - goto out; - } + return TRUE; /* Early return */ if (!state->have_obj) { if (state->read_source_fd != -1) { if (lseek (state->read_source_fd, content_offset, SEEK_SET) == -1) - { - glnx_set_error_from_errno (error); - goto out; - } + return glnx_throw_errno_prefix (error, "lseek"); while (content_size > 0) { char buf[4096]; @@ -763,49 +733,38 @@ bytes_read = read (state->read_source_fd, buf, MIN(sizeof(buf), content_size)); while (G_UNLIKELY (bytes_read == -1 && errno == EINTR)); if (bytes_read == -1) - { - glnx_set_error_from_errno (error); - goto out; - } + return glnx_throw_errno_prefix (error, "read"); if (G_UNLIKELY (bytes_read == 0)) - { - g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, - "Unexpected EOF reading object %s", state->read_source_object); - goto out; - } - + return glnx_throw (error, "Unexpected EOF reading object %s", state->read_source_object); + if (!content_out_write (repo, state, (guint8*)buf, bytes_read, cancellable, error)) - goto out; - + return FALSE; + content_size -= bytes_read; } } else { if (!validate_ofs (state, content_offset, content_size, error)) - goto out; + return FALSE; if (!content_out_write (repo, state, state->payload_data + content_offset, content_size, cancellable, error)) - goto out; + return FALSE; } } - - ret = TRUE; - out: - if (!ret) - g_prefix_error (error, "opcode open-splice-and-close: "); - return ret; + + return TRUE; } static gboolean dispatch_set_read_source (OstreeRepo *repo, StaticDeltaExecutionState *state, - GCancellable *cancellable, + GCancellable *cancellable, GError **error) { - gboolean ret = FALSE; + GLNX_AUTO_PREFIX_ERROR("opcode set-read-source", error); guint64 source_offset; if (state->read_source_fd != -1) @@ -815,15 +774,12 @@ } if (!read_varuint64 (state, &source_offset, error)) - goto out; + return FALSE; if (!validate_ofs (state, source_offset, 32, error)) - goto out; + return FALSE; if (state->stats_only) - { - ret = TRUE; - goto out; - } + return TRUE; /* Early return */ g_free (state->read_source_object); state->read_source_object = ostree_checksum_from_bytes (state->payload_data + source_offset); @@ -832,28 +788,21 @@ &state->read_source_fd, NULL, NULL, NULL, cancellable, error)) - goto out; + return FALSE; - ret = TRUE; - out: - if (!ret) - g_prefix_error (error, "opcode set-read-source: "); - return ret; + return TRUE; } static gboolean dispatch_unset_read_source (OstreeRepo *repo, StaticDeltaExecutionState *state, - GCancellable *cancellable, + GCancellable *cancellable, GError **error) { - gboolean ret = FALSE; + GLNX_AUTO_PREFIX_ERROR("opcode unset-read-source", error); if (state->stats_only) - { - ret = TRUE; - goto out; - } + return TRUE; /* Early return */ if (state->read_source_fd != -1) { @@ -862,60 +811,48 @@ } g_clear_pointer (&state->read_source_object, g_free); - - ret = TRUE; - out: - if (!ret) - g_prefix_error (error, "opcode unset-read-source: "); - return ret; + + return TRUE; } static gboolean dispatch_close (OstreeRepo *repo, StaticDeltaExecutionState *state, - GCancellable *cancellable, + GCancellable *cancellable, GError **error) { - gboolean ret = FALSE; - + GLNX_AUTO_PREFIX_ERROR("opcode open-splice-and-close", error); + if (state->content_out) { if (!g_output_stream_flush (state->content_out, cancellable, error)) - goto out; + return FALSE; if (state->content_checksum) { const char *actual_checksum = g_checksum_get_string (state->content_checksum); if (strcmp (actual_checksum, state->checksum) != 0) - { - g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, - "Corrupted object %s (actual checksum is %s)", - state->checksum, actual_checksum); - goto out; - } + return glnx_throw (error, "Corrupted object %s (actual checksum is %s)", + state->checksum, actual_checksum); } if (!_ostree_repo_commit_trusted_content_bare (repo, state->checksum, &state->tmpf, state->uid, state->gid, state->mode, state->xattrs, cancellable, error)) - goto out; + return FALSE; g_clear_object (&state->content_out); } if (!dispatch_unset_read_source (repo, state, cancellable, error)) - goto out; - + return FALSE; + g_clear_pointer (&state->xattrs, g_variant_unref); g_clear_pointer (&state->content_checksum, g_checksum_free); - + state->checksum_index++; state->output_target = NULL; - ret = TRUE; - out: - if (!ret) - g_prefix_error (error, "opcode open-splice-and-close: "); - return ret; + return TRUE; } diff -Nru ostree-2017.8/src/libostree/ostree-sysroot.c ostree-2017.9/src/libostree/ostree-sysroot.c --- ostree-2017.8/src/libostree/ostree-sysroot.c 2017-06-30 16:12:45.000000000 +0000 +++ ostree-2017.9/src/libostree/ostree-sysroot.c 2017-07-26 20:37:59.000000000 +0000 @@ -134,7 +134,9 @@ repo_path = g_file_resolve_relative_path (self->path, "ostree/repo"); self->repo = ostree_repo_new_for_sysroot_path (repo_path, self->path); - self->repo->is_system = TRUE; + self->repo->sysroot_kind = OSTREE_REPO_SYSROOT_KIND_VIA_SYSROOT; + /* Hold a weak ref for the remote-add handling */ + g_weak_ref_init (&self->repo->sysroot, object); G_OBJECT_CLASS (ostree_sysroot_parent_class)->constructed (object); } @@ -813,6 +815,26 @@ cancellable, error)) return FALSE; + /* Determine whether we're "physical" or not, the first time we initialize */ + if (!self->loaded) + { + /* If we have a booted deployment, the sysroot is / and we're definitely + * not physical. + */ + if (self->booted_deployment) + self->is_physical = FALSE; /* (the default, but explicit for clarity) */ + /* Otherwise - check for /sysroot which should only exist in a deployment, + * not in ${sysroot} (a metavariable for the real physical root). + */ + else if (fstatat (self->sysroot_fd, "sysroot", &stbuf, 0) < 0) + { + if (errno != ENOENT) + return glnx_throw_errno_prefix (error, "fstatat"); + self->is_physical = TRUE; + } + /* Otherwise, the default is FALSE */ + } + self->bootversion = bootversion; self->subbootversion = subbootversion; self->deployments = deployments; diff -Nru ostree-2017.8/src/libostree/ostree-sysroot-deploy.c ostree-2017.9/src/libostree/ostree-sysroot-deploy.c --- ostree-2017.8/src/libostree/ostree-sysroot-deploy.c 2017-07-04 09:59:08.000000000 +0000 +++ ostree-2017.9/src/libostree/ostree-sysroot-deploy.c 2017-07-26 20:37:59.000000000 +0000 @@ -52,34 +52,24 @@ GCancellable *cancellable, GError **error) { - gboolean ret = FALSE; - int res; /* Possibly in the future generate a temporary random name here, * would need to move "generate a temporary name" code into * libglnx or glib? */ g_autofree char *temppath = g_strconcat (newpath, ".tmp", NULL); - /* Clean up any stale temporary links */ + /* Clean up any stale temporary links */ (void) unlinkat (parent_dfd, temppath, 0); - /* Create the temp link */ - do - res = symlinkat (oldpath, parent_dfd, temppath); - while (G_UNLIKELY (res == -1 && errno == EINTR)); - if (res == -1) - { - glnx_set_error_from_errno (error); - goto out; - } + /* Create the temp link */ + if (TEMP_FAILURE_RETRY (symlinkat (oldpath, parent_dfd, temppath)) < 0) + return glnx_throw_errno_prefix (error, "symlinkat"); /* Rename it into place */ if (!glnx_renameat (parent_dfd, temppath, parent_dfd, newpath, error)) - goto out; + return FALSE; - ret = TRUE; - out: - return ret; + return TRUE; } static GLnxFileCopyFlags @@ -104,26 +94,17 @@ GCancellable *cancellable, GError **error) { - gboolean ret = FALSE; - if (linkat (src_dfd, src_subpath, dest_dfd, dest_subpath, 0) != 0) { - if (errno == EMLINK || errno == EXDEV) - { - return glnx_file_copy_at (src_dfd, src_subpath, NULL, dest_dfd, dest_subpath, - sysroot_flags_to_copy_flags (0, flags), - cancellable, error); - } + if (G_IN_SET (errno, EMLINK, EXDEV)) + return glnx_file_copy_at (src_dfd, src_subpath, NULL, dest_dfd, dest_subpath, + sysroot_flags_to_copy_flags (0, flags), + cancellable, error); else - { - glnx_set_error_from_errno (error); - goto out; - } + return glnx_throw_errno_prefix (error, "linkat"); } - ret = TRUE; - out: - return ret; + return TRUE; } static gboolean @@ -135,8 +116,6 @@ GCancellable *cancellable, GError **error) { - gboolean ret = FALSE; - struct stat src_stbuf; g_autoptr(GVariant) xattrs = NULL; /* Clone all xattrs first, so we get the SELinux security context @@ -147,31 +126,21 @@ { if (!glnx_dfd_name_get_all_xattrs (src_parent_dfd, src_name, &xattrs, cancellable, error)) - goto out; + return FALSE; if (!glnx_fd_set_all_xattrs (dest_dfd, xattrs, cancellable, error)) - goto out; + return FALSE; } - if (fstat (src_dfd, &src_stbuf) != 0) - { - glnx_set_error_from_errno (error); - goto out; - } + struct stat src_stbuf; + if (!glnx_fstat (src_dfd, &src_stbuf, error)) + return FALSE; if (fchown (dest_dfd, src_stbuf.st_uid, src_stbuf.st_gid) != 0) - { - glnx_set_error_from_errno (error); - goto out; - } + return glnx_throw_errno_prefix (error, "fchown"); if (fchmod (dest_dfd, src_stbuf.st_mode) != 0) - { - glnx_set_error_from_errno (error); - goto out; - } + return glnx_throw_errno_prefix (error, "fchmod"); - ret = TRUE; - out: - return ret; + return TRUE; } static gboolean @@ -199,7 +168,7 @@ if (!dirfd_copy_attributes_and_xattrs (src_parent_dfd, name, src_dfd_iter.fd, dest_dfd, flags, cancellable, error)) return FALSE; - + while (TRUE) { struct stat child_stbuf; @@ -209,9 +178,9 @@ if (dent == NULL) break; - if (fstatat (src_dfd_iter.fd, dent->d_name, &child_stbuf, - AT_SYMLINK_NOFOLLOW) != 0) - return glnx_throw_errno (error); + if (!glnx_fstatat (src_dfd_iter.fd, dent->d_name, &child_stbuf, + AT_SYMLINK_NOFOLLOW, error)) + return FALSE; if (S_ISDIR (child_stbuf.st_mode)) { @@ -242,7 +211,6 @@ GCancellable *cancellable, GError **error) { - gboolean ret = FALSE; glnx_fd_close int src_dfd = -1; glnx_fd_close int target_dfd = -1; @@ -250,7 +218,7 @@ g_assert (*path != '/' && *path != '\0'); if (!glnx_opendirat (modified_etc_fd, path, TRUE, &src_dfd, error)) - goto out; + return FALSE; /* Create with mode 0700, we'll fchmod/fchown later */ again: @@ -268,7 +236,7 @@ { if (!ensure_directory_from_template (orig_etc_fd, modified_etc_fd, new_etc_fd, parent_path, NULL, flags, cancellable, error)) - goto out; + return FALSE; /* Loop */ goto again; @@ -280,29 +248,19 @@ } } else - { - glnx_set_error_from_errno (error); - g_prefix_error (error, "mkdirat: "); - goto out; - } + return glnx_throw_errno_prefix (error, "mkdirat"); } if (!glnx_opendirat (new_etc_fd, path, TRUE, &target_dfd, error)) - goto out; + return FALSE; if (!dirfd_copy_attributes_and_xattrs (modified_etc_fd, path, src_dfd, target_dfd, flags, cancellable, error)) - goto out; + return FALSE; - ret = TRUE; if (out_dfd) - { - g_assert (target_dfd != -1); - *out_dfd = target_dfd; - target_dfd = -1; - } - out: - return ret; + *out_dfd = glnx_steal_fd (&target_dfd); + return TRUE; } /** @@ -321,100 +279,79 @@ GCancellable *cancellable, GError **error) { - gboolean ret = FALSE; struct stat modified_stbuf; struct stat new_stbuf; - glnx_fd_close int dest_parent_dfd = -1; - if (fstatat (modified_etc_fd, path, &modified_stbuf, AT_SYMLINK_NOFOLLOW) < 0) - { - glnx_set_error_from_errno (error); - g_prefix_error (error, "Failed to read modified config file '%s': ", path); - goto out; - } + if (!glnx_fstatat (modified_etc_fd, path, &modified_stbuf, AT_SYMLINK_NOFOLLOW, error)) + return glnx_prefix_error (error, "Reading modified config file"); + glnx_fd_close int dest_parent_dfd = -1; if (strchr (path, '/') != NULL) { g_autofree char *parent = g_path_get_dirname (path); if (!ensure_directory_from_template (orig_etc_fd, modified_etc_fd, new_etc_fd, parent, &dest_parent_dfd, flags, cancellable, error)) - goto out; + return FALSE; } else { dest_parent_dfd = dup (new_etc_fd); if (dest_parent_dfd == -1) - { - glnx_set_error_from_errno (error); - goto out; - } + return glnx_throw_errno_prefix (error, "dup"); } g_assert (dest_parent_dfd != -1); if (fstatat (new_etc_fd, path, &new_stbuf, AT_SYMLINK_NOFOLLOW) < 0) { - if (errno == ENOENT) - ; - else - { - glnx_set_error_from_errno (error); - goto out; - } + if (errno != ENOENT) + return glnx_throw_errno_prefix (error, "fstatat"); } else if (S_ISDIR(new_stbuf.st_mode)) { if (!S_ISDIR(modified_stbuf.st_mode)) { - g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND, - "Modified config file newly defaults to directory '%s', cannot merge", - path); - goto out; + return g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND, + "Modified config file newly defaults to directory '%s', cannot merge", + path), FALSE; } else { /* Do nothing here - we assume that we've already * recursively copied the parent directory. */ - ret = TRUE; - goto out; + return TRUE; } } else { - if (unlinkat (new_etc_fd, path, 0) < 0) - { - glnx_set_error_from_errno (error); - goto out; - } + if (!glnx_unlinkat (new_etc_fd, path, 0, error)) + return FALSE; } if (S_ISDIR (modified_stbuf.st_mode)) { if (!copy_dir_recurse (modified_etc_fd, new_etc_fd, path, flags, cancellable, error)) - goto out; + return FALSE; } else if (S_ISLNK (modified_stbuf.st_mode) || S_ISREG (modified_stbuf.st_mode)) { - if (!glnx_file_copy_at (modified_etc_fd, path, &modified_stbuf, + if (!glnx_file_copy_at (modified_etc_fd, path, &modified_stbuf, new_etc_fd, path, sysroot_flags_to_copy_flags (GLNX_FILE_COPY_OVERWRITE, flags), cancellable, error)) - goto out; + return FALSE; } else { - g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, - "Unsupported non-regular/non-symlink file in /etc '%s'", - path); - goto out; + return glnx_throw (error, + "Unsupported non-regular/non-symlink file in /etc '%s'", + path); } - ret = TRUE; - out: - return ret; + return TRUE; } /* @@ -575,7 +512,7 @@ if (!glnx_opendirat (osdeploy_dfd, checkout_target_name, TRUE, &ret_fd, error)) goto out; - + ret = TRUE; *out_deployment_dfd = ret_fd; out: @@ -652,7 +589,7 @@ cancellable, error); if (!direnum) goto out; - + while (TRUE) { GFileInfo *file_info; @@ -706,7 +643,7 @@ cancellable, error); if (!root_info) goto out; - + g_ptr_array_add (path_parts, (char*)prefix); if (!relabel_recursively (sysroot, sepolicy, dir, root_info, path_parts, cancellable, error)) @@ -959,7 +896,7 @@ if (!glnx_dirfd_iterator_next_dent (&dfditer, &dent, cancellable, error)) goto out; - + if (dent == NULL) break; @@ -983,7 +920,7 @@ ret_initramfs_name = g_strdup (dent->d_name); } } - + if (ret_kernel_name != NULL && ret_initramfs_name != NULL) break; } @@ -1328,7 +1265,7 @@ &variant, NULL)) { metadata = g_variant_get_child_value (variant, 0); - g_variant_lookup (metadata, "version", "s", &deployment_version); + g_variant_lookup (metadata, OSTREE_COMMIT_META_KEY_VERSION, "s", &deployment_version); } } @@ -1355,7 +1292,7 @@ ostree_bootconfig_parser_set (bootconfig, "title", title_key->str); g_autofree char *version_key = g_strdup_printf ("%d", n_deployments - ostree_deployment_get_index (deployment)); - ostree_bootconfig_parser_set (bootconfig, "version", version_key); + ostree_bootconfig_parser_set (bootconfig, OSTREE_COMMIT_META_KEY_VERSION, version_key); g_autofree char * boot_relpath = g_strconcat ("/", bootcsumdir, "/", dest_kernel_name, NULL); ostree_bootconfig_parser_set (bootconfig, "linux", boot_relpath); @@ -1451,7 +1388,7 @@ assign_bootserials (GPtrArray *deployments) { guint i; - GHashTable *ret = + GHashTable *ret = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, NULL); for (i = 0; i < deployments->len; i++) @@ -1488,7 +1425,7 @@ __attribute__((cleanup(_ostree_kernel_args_cleanup))) OstreeKernelArgs *b_kargs = NULL; g_autofree char *a_boot_options_without_ostree = NULL; g_autofree char *b_boot_options_without_ostree = NULL; - + /* We checksum the kernel arguments *except* ostree= */ a_kargs = _ostree_kernel_args_from_string (a_boot_options); _ostree_kernel_args_replace (a_kargs, "ostree"); @@ -1662,10 +1599,10 @@ { OstreeDeployment *deployment = new_deployments->pdata[i]; g_autoptr(GFile) deployment_root = NULL; - + if (deployment == self->booted_deployment) found_booted_deployment = TRUE; - + deployment_root = ostree_sysroot_get_deployment_directory (self, deployment); if (!g_file_query_exists (deployment_root, NULL)) { @@ -1693,7 +1630,7 @@ g_prefix_error (error, "Creating new current bootlinks: "); goto out; } - + if (!full_system_sync (self, cancellable, error)) { g_prefix_error (error, "Full sync: "); @@ -1707,7 +1644,7 @@ g_prefix_error (error, "Swapping current bootlinks: "); goto out; } - + bootloader_is_atomic = TRUE; } else @@ -1741,7 +1678,7 @@ if (!glnx_shutil_mkdir_p_at (self->sysroot_fd, new_loader_entries_dir, 0755, cancellable, error)) goto out; - + /* Need the repo to try and extract the versions for deployments. * But this is a "nice-to-have" for the bootloader UI, so failure * here is not fatal to the whole operation. We just gracefully @@ -1819,7 +1756,7 @@ g_prefix_error (error, "Full sync: "); goto out; } - + if (!swap_bootloader (self, self->bootversion, new_bootversion, cancellable, error)) { diff -Nru ostree-2017.8/src/libostree/ostree-sysroot-private.h ostree-2017.9/src/libostree/ostree-sysroot-private.h --- ostree-2017.8/src/libostree/ostree-sysroot-private.h 2017-06-26 16:18:55.000000000 +0000 +++ ostree-2017.9/src/libostree/ostree-sysroot-private.h 2017-07-26 20:37:59.000000000 +0000 @@ -48,7 +48,8 @@ GLnxLockFile lock; gboolean loaded; - + + gboolean is_physical; /* TRUE if we're pointed at physical storage root and not a deployment */ GPtrArray *deployments; int bootversion; int subbootversion; diff -Nru ostree-2017.8/src/libostree/ostree-sysroot-upgrader.c ostree-2017.9/src/libostree/ostree-sysroot-upgrader.c --- ostree-2017.8/src/libostree/ostree-sysroot-upgrader.c 2017-06-26 16:18:55.000000000 +0000 +++ ostree-2017.9/src/libostree/ostree-sysroot-upgrader.c 2017-07-26 20:37:59.000000000 +0000 @@ -559,7 +559,7 @@ return FALSE; g_variant_get_child (new_variant, 0, "@a{sv}", &new_metadata); - rebase = g_variant_lookup_value (new_metadata, "ostree.endoflife-rebase", G_VARIANT_TYPE_STRING); + rebase = g_variant_lookup_value (new_metadata, OSTREE_COMMIT_META_KEY_ENDOFLIFE_REBASE, G_VARIANT_TYPE_STRING); if (rebase) { const char *new_ref = g_variant_get_string (rebase, 0); diff -Nru ostree-2017.8/src/libostree/ostree-version.h ostree-2017.9/src/libostree/ostree-version.h --- ostree-2017.8/src/libostree/ostree-version.h 2017-07-06 19:02:29.000000000 +0000 +++ ostree-2017.9/src/libostree/ostree-version.h 2017-07-27 13:11:27.000000000 +0000 @@ -44,7 +44,7 @@ * * Since: 2017.4 */ -#define OSTREE_RELEASE_VERSION (8) +#define OSTREE_RELEASE_VERSION (9) /** * OSTREE_VERSION @@ -53,7 +53,7 @@ * * Since: 2017.4 */ -#define OSTREE_VERSION (2017.8) +#define OSTREE_VERSION (2017.9) /** * OSTREE_VERSION_S: @@ -63,7 +63,7 @@ * * Since: 2017.4 */ -#define OSTREE_VERSION_S "2017.8" +#define OSTREE_VERSION_S "2017.9" #define OSTREE_ENCODE_VERSION(year,release) \ ((year) << 16 | (release)) diff -Nru ostree-2017.8/src/ostree/ot-admin-functions.c ostree-2017.9/src/ostree/ot-admin-functions.c --- ostree-2017.8/src/ostree/ot-admin-functions.c 2017-06-26 16:18:55.000000000 +0000 +++ ostree-2017.9/src/ostree/ot-admin-functions.c 2017-07-26 20:37:59.000000000 +0000 @@ -57,7 +57,7 @@ metadata = g_variant_get_child_value (checksum, 0); - if (!g_variant_lookup (metadata, "version", "&s", &ret)) + if (!g_variant_lookup (metadata, OSTREE_COMMIT_META_KEY_VERSION, "&s", &ret)) return NULL; return g_strdup (ret); diff -Nru ostree-2017.8/src/ostree/ot-builtin-commit.c ostree-2017.9/src/ostree/ot-builtin-commit.c --- ostree-2017.8/src/ostree/ot-builtin-commit.c 2017-07-04 11:21:58.000000000 +0000 +++ ostree-2017.9/src/ostree/ot-builtin-commit.c 2017-07-26 20:37:59.000000000 +0000 @@ -29,6 +29,7 @@ #include "otutil.h" #include "ot-tool-util.h" #include "parse-datetime.h" +#include "ostree-repo-private.h" static char *opt_subject; static char *opt_body; @@ -36,6 +37,7 @@ static gboolean opt_editor; static char *opt_parent; static gboolean opt_orphan; +static char **opt_bind_refs; static char *opt_branch; static char *opt_statoverride_file; static char *opt_skiplist_file; @@ -78,6 +80,7 @@ { "editor", 'e', 0, G_OPTION_ARG_NONE, &opt_editor, "Use an editor to write the commit message", NULL }, { "branch", 'b', 0, G_OPTION_ARG_STRING, &opt_branch, "Branch", "BRANCH" }, { "orphan", 0, 0, G_OPTION_ARG_NONE, &opt_orphan, "Create a commit without writing a ref", NULL }, + { "bind-ref", 0, 0, G_OPTION_ARG_STRING_ARRAY, &opt_bind_refs, "Add a ref to ref binding commit metadata", "BRANCH" }, { "tree", 0, 0, G_OPTION_ARG_STRING_ARRAY, &opt_trees, "Overlay the given argument as a tree", "dir=PATH or tar=TARFILE or ref=COMMIT" }, { "add-metadata-string", 0, 0, G_OPTION_ARG_STRING_ARRAY, &opt_metadata_strings, "Add a key/value pair to metadata", "KEY=VALUE" }, { "add-detached-metadata-string", 0, 0, G_OPTION_ARG_STRING_ARRAY, &opt_detached_metadata_strings, "Add a key/value pair to detached metadata", "KEY=VALUE" }, @@ -303,6 +306,71 @@ return TRUE; } +#ifdef OSTREE_ENABLE_EXPERIMENTAL_API +static void +add_collection_binding (OstreeRepo *repo, + GVariantBuilder *metadata_builder) +{ + const char *collection_id = ostree_repo_get_collection_id (repo); + + if (collection_id == NULL) + return; + + g_variant_builder_add (metadata_builder, "{s@v}", OSTREE_COMMIT_META_KEY_COLLECTION_BINDING, + g_variant_new_variant (g_variant_new_string (collection_id))); +} +#endif /* OSTREE_ENABLE_EXPERIMENTAL_API */ + +static int +compare_strings (gconstpointer a, gconstpointer b) +{ + const char **sa = (const char **)a; + const char **sb = (const char **)b; + + return strcmp (*sa, *sb); +} + +static void +add_ref_binding (GVariantBuilder *metadata_builder) +{ + if (opt_orphan) + return; + + g_assert_nonnull (opt_branch); + + g_autoptr(GPtrArray) refs = g_ptr_array_new (); + g_ptr_array_add (refs, opt_branch); + for (char **iter = opt_bind_refs; iter != NULL && *iter != NULL; ++iter) + g_ptr_array_add (refs, *iter); + g_ptr_array_sort (refs, compare_strings); + g_autoptr(GVariant) refs_v = g_variant_new_strv ((const char *const *)refs->pdata, + refs->len); + g_variant_builder_add (metadata_builder, "{s@v}", OSTREE_COMMIT_META_KEY_REF_BINDING, + g_variant_new_variant (g_steal_pointer (&refs_v))); +} + +/* Note if you're using the API, you currently need to do this yourself */ +static void +fill_bindings (OstreeRepo *repo, + GVariant *metadata, + GVariant **out_metadata) +{ + g_autoptr(GVariantBuilder) metadata_builder = + ot_util_variant_builder_from_variant (metadata, G_VARIANT_TYPE_VARDICT); + + add_ref_binding (metadata_builder); + +#ifdef OSTREE_ENABLE_EXPERIMENTAL_API + /* Allow the collection ID to be overridden using + * --add-metadata-string=ostree.collection-binding=blah */ + if (metadata == NULL || + !g_variant_lookup (metadata, OSTREE_COMMIT_META_KEY_COLLECTION_BINDING, "*", NULL)) + add_collection_binding (repo, metadata_builder); +#endif /* OSTREE_ENABLE_EXPERIMENTAL_API */ + + *out_metadata = g_variant_ref_sink (g_variant_builder_end (metadata_builder)); +} + gboolean ostree_builtin_commit (int argc, char **argv, GCancellable *cancellable, GError **error) { @@ -559,6 +627,10 @@ { gboolean update_summary; guint64 timestamp; + g_autoptr(GVariant) old_metadata = g_steal_pointer (&metadata); + + fill_bindings (repo, old_metadata, &metadata); + if (!opt_timestamp) { GDateTime *now = g_date_time_new_now_utc (); diff -Nru ostree-2017.8/src/ostree/ot-main.c ostree-2017.9/src/ostree/ot-main.c --- ostree-2017.8/src/ostree/ot-main.c 2017-07-04 09:59:08.000000000 +0000 +++ ostree-2017.9/src/ostree/ot-main.c 2017-07-26 20:37:59.000000000 +0000 @@ -207,6 +207,88 @@ return 0; } +/* Process a --repo arg; used below, and for the remote builtins */ +static OstreeRepo * +parse_repo_option (GOptionContext *context, + const char *repo_path, + gboolean skip_repo_open, + GCancellable *cancellable, + GError **error) +{ + g_autoptr(OstreeRepo) repo = NULL; + + if (repo_path == NULL) + { + g_autoptr(GError) local_error = NULL; + + repo = ostree_repo_new_default (); + if (!ostree_repo_open (repo, cancellable, &local_error)) + { + if (g_error_matches (local_error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND)) + { + g_autofree char *help = NULL; + + g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED, + "Command requires a --repo argument"); + + help = g_option_context_get_help (context, FALSE, NULL); + g_printerr ("%s", help); + } + else + { + g_propagate_error (error, g_steal_pointer (&local_error)); + } + return NULL; + } + } + else + { + g_autoptr(GFile) repo_file = g_file_new_for_path (repo_path); + + repo = ostree_repo_new (repo_file); + if (!skip_repo_open) + { + if (!ostree_repo_open (repo, cancellable, error)) + return NULL; + } + } + + return g_steal_pointer (&repo); +} + +/* Used by the remote builtins which are special in taking --sysroot or --repo */ +gboolean +ostree_parse_sysroot_or_repo_option (GOptionContext *context, + const char *sysroot_path, + const char *repo_path, + OstreeSysroot **out_sysroot, + OstreeRepo **out_repo, + GCancellable *cancellable, + GError **error) +{ + g_autoptr(OstreeSysroot) sysroot = NULL; + g_autoptr(OstreeRepo) repo = NULL; + if (sysroot_path) + { + g_autoptr(GFile) sysroot_file = g_file_new_for_path (sysroot_path); + sysroot = ostree_sysroot_new (sysroot_file); + if (!ostree_sysroot_load (sysroot, cancellable, error)) + return FALSE; + if (!ostree_sysroot_get_repo (sysroot, &repo, cancellable, error)) + return FALSE; + } + else + { + repo = parse_repo_option (context, repo_path, FALSE, cancellable, error); + if (!repo) + return FALSE; + } + + ot_transfer_out_value (out_sysroot, &sysroot); + ot_transfer_out_value (out_repo, &repo); + return TRUE; +} + gboolean ostree_option_context_parse (GOptionContext *context, const GOptionEntry *main_entries, @@ -217,7 +299,7 @@ GCancellable *cancellable, GError **error) { - glnx_unref_object OstreeRepo *repo = NULL; + g_autoptr(OstreeRepo) repo = NULL; /* Entries are listed in --help output in the order added. We add the * main entries ourselves so that we can add the --repo entry first. */ @@ -254,40 +336,12 @@ if (opt_verbose) g_log_set_handler (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, message_handler, NULL); - if (opt_repo == NULL && !(flags & OSTREE_BUILTIN_FLAG_NO_REPO)) - { - g_autoptr(GError) local_error = NULL; - - repo = ostree_repo_new_default (); - if (!ostree_repo_open (repo, cancellable, &local_error)) - { - if (g_error_matches (local_error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND)) - { - g_autofree char *help = NULL; - - g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED, - "Command requires a --repo argument"); - - help = g_option_context_get_help (context, FALSE, NULL); - g_printerr ("%s", help); - } - else - { - g_propagate_error (error, g_steal_pointer (&local_error)); - } - return FALSE; - } - } - else if (opt_repo != NULL) + if (!(flags & OSTREE_BUILTIN_FLAG_NO_REPO)) { - g_autoptr(GFile) repo_file = g_file_new_for_path (opt_repo); - - repo = ostree_repo_new (repo_file); - if (!(flags & OSTREE_BUILTIN_FLAG_NO_CHECK)) - { - if (!ostree_repo_open (repo, cancellable, error)) - return FALSE; - } + repo = parse_repo_option (context, opt_repo, (flags & OSTREE_BUILTIN_FLAG_NO_CHECK) > 0, + cancellable, error); + if (!repo) + return FALSE; } if (out_repo) diff -Nru ostree-2017.8/src/ostree/ot-main.h ostree-2017.9/src/ostree/ot-main.h --- ostree-2017.8/src/ostree/ot-main.h 2017-06-26 16:18:55.000000000 +0000 +++ ostree-2017.9/src/ostree/ot-main.h 2017-07-26 20:37:59.000000000 +0000 @@ -46,6 +46,14 @@ int ostree_usage (OstreeCommand *commands, gboolean is_error); +gboolean ostree_parse_sysroot_or_repo_option (GOptionContext *context, + const char *sysroot_path, + const char *repo_path, + OstreeSysroot **out_sysroot, + OstreeRepo **out_repo, + GCancellable *cancellable, + GError **error); + gboolean ostree_option_context_parse (GOptionContext *context, const GOptionEntry *main_entries, int *argc, char ***argv, diff -Nru ostree-2017.8/src/ostree/ot-remote-builtin-add.c ostree-2017.9/src/ostree/ot-remote-builtin-add.c --- ostree-2017.8/src/ostree/ot-remote-builtin-add.c 2017-07-04 09:59:08.000000000 +0000 +++ ostree-2017.9/src/ostree/ot-remote-builtin-add.c 2017-07-26 20:37:59.000000000 +0000 @@ -34,6 +34,8 @@ #ifdef OSTREE_ENABLE_EXPERIMENTAL_API static char *opt_collection_id; #endif /* OSTREE_ENABLE_EXPERIMENTAL_API */ +static char *opt_sysroot; +static char *opt_repo; static GOptionEntry option_entries[] = { { "set", 0, 0, G_OPTION_ARG_STRING_ARRAY, &opt_set, "Set config option KEY=VALUE for remote", "KEY=VALUE" }, @@ -45,6 +47,8 @@ { "collection-id", 0, 0, G_OPTION_ARG_STRING, &opt_collection_id, "Globally unique ID for this repository as an collection of refs for redistribution to other repositories", "COLLECTION-ID" }, #endif /* OSTREE_ENABLE_EXPERIMENTAL_API */ + { "repo", 0, 0, G_OPTION_ARG_FILENAME, &opt_repo, "Path to OSTree repository (defaults to /sysroot/ostree/repo)", "PATH" }, + { "sysroot", 0, 0, G_OPTION_ARG_FILENAME, &opt_sysroot, "Use sysroot at PATH (overrides --repo)", "PATH" }, { NULL } }; @@ -52,6 +56,7 @@ ot_remote_builtin_add (int argc, char **argv, GCancellable *cancellable, GError **error) { g_autoptr(GOptionContext) context = NULL; + g_autoptr(OstreeSysroot) sysroot = NULL; g_autoptr(OstreeRepo) repo = NULL; const char *remote_name; const char *remote_url; @@ -63,7 +68,12 @@ context = g_option_context_new ("NAME [metalink=|mirrorlist=]URL [BRANCH...] - Add a remote repository"); if (!ostree_option_context_parse (context, option_entries, &argc, &argv, - OSTREE_BUILTIN_FLAG_NONE, &repo, cancellable, error)) + OSTREE_BUILTIN_FLAG_NO_REPO, NULL, cancellable, error)) + goto out; + + if (!ostree_parse_sysroot_or_repo_option (context, opt_sysroot, opt_repo, + &sysroot, &repo, + cancellable, error)) goto out; if (argc < 3) diff -Nru ostree-2017.8/src/ostree/ot-remote-builtin-add-cookie.c ostree-2017.9/src/ostree/ot-remote-builtin-add-cookie.c --- ostree-2017.8/src/ostree/ot-remote-builtin-add-cookie.c 2017-06-26 16:18:55.000000000 +0000 +++ ostree-2017.9/src/ostree/ot-remote-builtin-add-cookie.c 2017-07-26 20:37:59.000000000 +0000 @@ -36,18 +36,8 @@ gboolean ot_remote_builtin_add_cookie (int argc, char **argv, GCancellable *cancellable, GError **error) { - g_autoptr(GOptionContext) context = NULL; + g_autoptr(GOptionContext) context = g_option_context_new ("NAME DOMAIN PATH COOKIE_NAME VALUE - Add a cookie to remote"); g_autoptr(OstreeRepo) repo = NULL; - const char *remote_name; - const char *domain; - const char *path; - const char *cookie_name; - const char *value; - g_autofree char *jar_path = NULL; - g_autofree char *cookie_file = NULL; - - context = g_option_context_new ("NAME DOMAIN PATH COOKIE_NAME VALUE - Add a cookie to remote"); - if (!ostree_option_context_parse (context, option_entries, &argc, &argv, OSTREE_BUILTIN_FLAG_NONE, &repo, cancellable, error)) return FALSE; @@ -58,16 +48,13 @@ return FALSE; } - remote_name = argv[1]; - domain = argv[2]; - path = argv[3]; - cookie_name = argv[4]; - value = argv[5]; - - cookie_file = g_strdup_printf ("%s.cookies.txt", remote_name); - jar_path = g_build_filename (gs_file_get_path_cached (repo->repodir), cookie_file, NULL); - - if (!ot_add_cookie_at (AT_FDCWD, jar_path, domain, path, cookie_name, value, error)) + const char *remote_name = argv[1]; + const char *domain = argv[2]; + const char *path = argv[3]; + const char *cookie_name = argv[4]; + const char *value = argv[5]; + g_autofree char *cookie_file = g_strdup_printf ("%s.cookies.txt", remote_name); + if (!ot_add_cookie_at (ostree_repo_get_dfd (repo), cookie_file, domain, path, cookie_name, value, error)) return FALSE; return TRUE; diff -Nru ostree-2017.8/src/ostree/ot-remote-builtin-delete.c ostree-2017.9/src/ostree/ot-remote-builtin-delete.c --- ostree-2017.8/src/ostree/ot-remote-builtin-delete.c 2017-06-26 16:18:55.000000000 +0000 +++ ostree-2017.9/src/ostree/ot-remote-builtin-delete.c 2017-07-26 20:37:59.000000000 +0000 @@ -25,43 +25,48 @@ #include "ot-main.h" #include "ot-remote-builtins.h" -gboolean opt_if_exists = FALSE; +static gboolean opt_if_exists = FALSE; +static char *opt_sysroot; +static char *opt_repo; static GOptionEntry option_entries[] = { { "if-exists", 0, 0, G_OPTION_ARG_NONE, &opt_if_exists, "Do nothing if the provided remote does not exist", NULL }, + { "repo", 0, 0, G_OPTION_ARG_FILENAME, &opt_repo, "Path to OSTree repository (defaults to /sysroot/ostree/repo)", "PATH" }, + { "sysroot", 0, 0, G_OPTION_ARG_FILENAME, &opt_sysroot, "Use sysroot at PATH (overrides --repo)", "PATH" }, { NULL } }; gboolean ot_remote_builtin_delete (int argc, char **argv, GCancellable *cancellable, GError **error) { - g_autoptr(GOptionContext) context = NULL; - g_autoptr(OstreeRepo) repo = NULL; - const char *remote_name; - gboolean ret = FALSE; - context = g_option_context_new ("NAME - Delete a remote repository"); + g_autoptr(GOptionContext) context = g_option_context_new ("NAME - Delete a remote repository"); if (!ostree_option_context_parse (context, option_entries, &argc, &argv, - OSTREE_BUILTIN_FLAG_NONE, &repo, cancellable, error)) - goto out; + OSTREE_BUILTIN_FLAG_NO_REPO, NULL, cancellable, error)) + return FALSE; + + g_autoptr(OstreeSysroot) sysroot = NULL; + g_autoptr(OstreeRepo) repo = NULL; + if (!ostree_parse_sysroot_or_repo_option (context, opt_sysroot, opt_repo, + &sysroot, &repo, + cancellable, error)) + return FALSE; if (argc < 2) { ot_util_usage_error (context, "NAME must be specified", error); - goto out; + return FALSE; } - remote_name = argv[1]; + const char *remote_name = argv[1]; if (!ostree_repo_remote_change (repo, NULL, - opt_if_exists ? OSTREE_REPO_REMOTE_CHANGE_DELETE_IF_EXISTS : + opt_if_exists ? OSTREE_REPO_REMOTE_CHANGE_DELETE_IF_EXISTS : OSTREE_REPO_REMOTE_CHANGE_DELETE, remote_name, NULL, NULL, cancellable, error)) - goto out; + return FALSE; - ret = TRUE; - out: - return ret; + return TRUE; } diff -Nru ostree-2017.8/src/ostree/ot-remote-builtin-delete-cookie.c ostree-2017.9/src/ostree/ot-remote-builtin-delete-cookie.c --- ostree-2017.8/src/ostree/ot-remote-builtin-delete-cookie.c 2017-06-26 16:18:55.000000000 +0000 +++ ostree-2017.9/src/ostree/ot-remote-builtin-delete-cookie.c 2017-07-26 20:37:59.000000000 +0000 @@ -36,16 +36,8 @@ gboolean ot_remote_builtin_delete_cookie (int argc, char **argv, GCancellable *cancellable, GError **error) { - g_autoptr(GOptionContext) context = NULL; g_autoptr(OstreeRepo) repo = NULL; - const char *remote_name; - const char *domain; - const char *path; - const char *cookie_name; - g_autofree char *jar_path = NULL; - g_autofree char *cookie_file = NULL; - - context = g_option_context_new ("NAME DOMAIN PATH COOKIE_NAME- Remote one cookie from remote"); + g_autoptr(GOptionContext) context = g_option_context_new ("NAME DOMAIN PATH COOKIE_NAME- Remote one cookie from remote"); if (!ostree_option_context_parse (context, option_entries, &argc, &argv, OSTREE_BUILTIN_FLAG_NONE, &repo, cancellable, error)) @@ -57,15 +49,12 @@ return FALSE; } - remote_name = argv[1]; - domain = argv[2]; - path = argv[3]; - cookie_name = argv[4]; - - cookie_file = g_strdup_printf ("%s.cookies.txt", remote_name); - jar_path = g_build_filename (gs_file_get_path_cached (repo->repodir), cookie_file, NULL); - - if (!ot_delete_cookie_at (AT_FDCWD, jar_path, domain, path, cookie_name, error)) + const char *remote_name = argv[1]; + const char *domain = argv[2]; + const char *path = argv[3]; + const char *cookie_name = argv[4]; + g_autofree char *cookie_file = g_strdup_printf ("%s.cookies.txt", remote_name); + if (!ot_delete_cookie_at (ostree_repo_get_dfd (repo), cookie_file, domain, path, cookie_name, error)) return FALSE; return TRUE; diff -Nru ostree-2017.8/src/ostree/ot-remote-builtin-list-cookies.c ostree-2017.9/src/ostree/ot-remote-builtin-list-cookies.c --- ostree-2017.8/src/ostree/ot-remote-builtin-list-cookies.c 2017-06-26 16:18:55.000000000 +0000 +++ ostree-2017.9/src/ostree/ot-remote-builtin-list-cookies.c 2017-07-26 20:37:59.000000000 +0000 @@ -35,13 +35,8 @@ gboolean ot_remote_builtin_list_cookies (int argc, char **argv, GCancellable *cancellable, GError **error) { - g_autoptr(GOptionContext) context = NULL; g_autoptr(OstreeRepo) repo = NULL; - const char *remote_name; - g_autofree char *jar_path = NULL; - g_autofree char *cookie_file = NULL; - - context = g_option_context_new ("NAME - Show remote repository cookies"); + g_autoptr(GOptionContext) context = g_option_context_new ("NAME - Show remote repository cookies"); if (!ostree_option_context_parse (context, option_entries, &argc, &argv, OSTREE_BUILTIN_FLAG_NONE, &repo, cancellable, error)) @@ -53,12 +48,9 @@ return FALSE; } - remote_name = argv[1]; - - cookie_file = g_strdup_printf ("%s.cookies.txt", remote_name); - jar_path = g_build_filename (g_file_get_path (repo->repodir), cookie_file, NULL); - - if (!ot_list_cookies_at (AT_FDCWD, jar_path, error)) + const char *remote_name = argv[1]; + g_autofree char *cookie_file = g_strdup_printf ("%s.cookies.txt", remote_name); + if (!ot_list_cookies_at (ostree_repo_get_dfd (repo), cookie_file, error)) return FALSE; return TRUE; diff -Nru ostree-2017.8/src/ostree/ot-remote-cookie-util.c ostree-2017.9/src/ostree/ot-remote-cookie-util.c --- ostree-2017.8/src/ostree/ot-remote-cookie-util.c 2017-07-04 09:59:08.000000000 +0000 +++ ostree-2017.9/src/ostree/ot-remote-cookie-util.c 2017-07-26 20:37:59.000000000 +0000 @@ -23,10 +23,6 @@ #include "ot-remote-cookie-util.h" -#ifndef HAVE_LIBCURL -#include -#endif - #include "otutil.h" #include "ot-main.h" #include "ot-remote-builtins.h" @@ -148,49 +144,24 @@ const char *name, const char *value, GError **error) { -#ifdef HAVE_LIBCURL - glnx_fd_close int fd = openat (AT_FDCWD, jar_path, O_WRONLY | O_APPEND | O_CREAT, 0644); - g_autofree char *buf = NULL; - g_autoptr(GDateTime) now = NULL; - g_autoptr(GDateTime) expires = NULL; - + glnx_fd_close int fd = openat (dfd, jar_path, O_WRONLY | O_APPEND | O_CREAT, 0644); if (fd < 0) - { - glnx_set_error_from_errno (error); - return FALSE; - } + return glnx_throw_errno_prefix (error, "open(%s)", jar_path); - now = g_date_time_new_now_utc (); - expires = g_date_time_add_years (now, 25); + g_autoptr(GDateTime) now = g_date_time_new_now_utc (); + g_autoptr(GDateTime) expires = g_date_time_add_years (now, 25); /* Adapted from soup-cookie-jar-text.c:write_cookie() */ - buf = g_strdup_printf ("%s\t%s\t%s\t%s\t%llu\t%s\t%s\n", - domain, - *domain == '.' ? "TRUE" : "FALSE", - path, - "FALSE", - (long long unsigned)g_date_time_to_unix (expires), - name, - value); + g_autofree char *buf = g_strdup_printf ("%s\t%s\t%s\t%s\t%llu\t%s\t%s\n", + domain, + *domain == '.' ? "TRUE" : "FALSE", + path, + "FALSE", + (long long unsigned)g_date_time_to_unix (expires), + name, + value); if (glnx_loop_write (fd, buf, strlen (buf)) < 0) - { - glnx_set_error_from_errno (error); - return FALSE; - } -#else - glnx_unref_object SoupCookieJar *jar = NULL; - SoupCookie *cookie; - - jar = soup_cookie_jar_text_new (jar_path, FALSE); - - /* Pick a silly long expire time, we're just storing the cookies in the - * jar and on pull the jar is read-only so expiry has little actual value */ - cookie = soup_cookie_new (name, value, domain, path, - SOUP_COOKIE_MAX_AGE_ONE_YEAR * 25); - - /* jar takes ownership of cookie */ - soup_cookie_jar_add_cookie (jar, cookie); -#endif + return glnx_throw_errno_prefix (error, "write"); return TRUE; } @@ -201,18 +172,14 @@ GError **error) { gboolean found = FALSE; -#ifdef HAVE_LIBCURL g_auto(GLnxTmpfile) tmpf = { 0, }; - g_autofree char *dnbuf = NULL; - const char *dn = NULL; g_autoptr(OtCookieParser) parser = NULL; if (!ot_parse_cookies_at (dfd, jar_path, &parser, NULL, error)) return FALSE; - dnbuf = g_strdup (jar_path); - dn = dirname (dnbuf); - if (!glnx_open_tmpfile_linkable_at (AT_FDCWD, dn, O_WRONLY | O_CLOEXEC, + g_assert (!strchr (jar_path, '/')); + if (!glnx_open_tmpfile_linkable_at (dfd, ".", O_WRONLY | O_CLOEXEC, &tmpf, error)) return FALSE; @@ -233,33 +200,9 @@ } if (!glnx_link_tmpfile_at (&tmpf, GLNX_LINK_TMPFILE_REPLACE, - AT_FDCWD, jar_path, + dfd, jar_path, error)) return FALSE; -#else - GSList *cookies; - glnx_unref_object SoupCookieJar *jar = NULL; - - jar = soup_cookie_jar_text_new (jar_path, FALSE); - cookies = soup_cookie_jar_all_cookies (jar); - - while (cookies != NULL) - { - SoupCookie *cookie = cookies->data; - - if (!strcmp (domain, soup_cookie_get_domain (cookie)) && - !strcmp (path, soup_cookie_get_path (cookie)) && - !strcmp (name, soup_cookie_get_name (cookie))) - { - soup_cookie_jar_delete_cookie (jar, cookie); - - found = TRUE; - } - - soup_cookie_free (cookie); - cookies = g_slist_delete_link (cookies, cookies); - } -#endif if (!found) g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED, "Cookie not found in jar"); @@ -271,7 +214,6 @@ gboolean ot_list_cookies_at (int dfd, const char *jar_path, GError **error) { -#ifdef HAVE_LIBCURL g_autoptr(OtCookieParser) parser = NULL; if (!ot_parse_cookies_at (AT_FDCWD, jar_path, &parser, NULL, error)) @@ -294,26 +236,6 @@ g_print ("Expires: %s\n", expires_str); g_print ("Value: %s\n", parser->value); } -#else - glnx_unref_object SoupCookieJar *jar = soup_cookie_jar_text_new (jar_path, TRUE); - GSList *cookies = soup_cookie_jar_all_cookies (jar); - - while (cookies != NULL) - { - SoupCookie *cookie = cookies->data; - SoupDate *expiry = soup_cookie_get_expires (cookie); - g_print ("--\n"); - g_print ("Domain: %s\n", soup_cookie_get_domain (cookie)); - g_print ("Path: %s\n", soup_cookie_get_path (cookie)); - g_print ("Name: %s\n", soup_cookie_get_name (cookie)); - g_print ("Secure: %s\n", soup_cookie_get_secure (cookie) ? "yes" : "no"); - g_print ("Expires: %s\n", soup_date_to_string (expiry, SOUP_DATE_COOKIE)); - g_print ("Value: %s\n", soup_cookie_get_value (cookie)); - - soup_cookie_free (cookie); - cookies = g_slist_delete_link (cookies, cookies); - } -#endif return TRUE; } diff -Nru ostree-2017.8/tests/admin-test.sh ostree-2017.9/tests/admin-test.sh --- ostree-2017.8/tests/admin-test.sh 2017-06-30 16:12:45.000000000 +0000 +++ ostree-2017.9/tests/admin-test.sh 2017-07-26 20:37:59.000000000 +0000 @@ -234,3 +234,18 @@ assert_streq ${curr_rev} ${head_rev} echo "ok upgrade with and without override-commit" + +deployment=$(${CMD_PREFIX} ostree admin --sysroot=sysroot --print-current-dir) +${CMD_PREFIX} ostree --sysroot=sysroot remote add --set=gpg-verify=false remote-test-physical file://$(pwd)/testos-repo +assert_not_has_file ${deployment}/etc/ostree/remotes.d/remote-test-physical.conf testos-repo +assert_file_has_content sysroot/ostree/repo/config remote-test-physical +echo "ok remote add physical sysroot" + +# Now a hack...symlink ${deployment}/sysroot to the sysroot in lieu of a bind +# mount which we can't do in unit tests. +ln -sr sysroot ${deployment}/sysroot +ln -s sysroot/ostree ${deployment}/ostree +${CMD_PREFIX} ostree --sysroot=${deployment} remote add --set=gpg-verify=false remote-test-nonphysical file://$(pwd)/testos-repo +assert_not_file_has_content sysroot/ostree/repo/config remote-test-nonphysical +assert_file_has_content ${deployment}/etc/ostree/remotes.d/remote-test-nonphysical.conf testos-repo +echo "ok remote add nonphysical sysroot" diff -Nru ostree-2017.8/tests/basic-test.sh ostree-2017.9/tests/basic-test.sh --- ostree-2017.8/tests/basic-test.sh 2017-07-04 11:21:58.000000000 +0000 +++ ostree-2017.9/tests/basic-test.sh 2017-07-26 20:37:59.000000000 +0000 @@ -19,7 +19,7 @@ set -euo pipefail -echo "1..$((69 + ${extra_basic_tests:-0}))" +echo "1..$((70 + ${extra_basic_tests:-0}))" $CMD_PREFIX ostree --version > version.yaml python -c 'import yaml; yaml.safe_load(open("version.yaml"))' @@ -112,6 +112,14 @@ rm test-repo -rf echo "ok repo-init on existing repo" +rm test-repo -rf +ostree_repo_init test-repo --mode=bare-user +${CMD_PREFIX} ostree --repo=test-repo refs +rm -rf test-repo/tmp +${CMD_PREFIX} ostree --repo=test-repo refs +assert_has_dir test-repo/tmp +echo "ok autocreate tmp" + rm checkout-test2 -rf $OSTREE checkout test2 checkout-test2 cd checkout-test2 @@ -171,8 +179,10 @@ echo "ok commit no parent" cd ${test_tmpdir} -empty_rev=$($OSTREE commit ${COMMIT_ARGS} -b test2-no-subject -s '' --timestamp="2005-10-29 12:43:29 +0000" $test_tmpdir/checkout-test2-4) -omitted_rev=$($OSTREE commit ${COMMIT_ARGS} -b test2-no-subject-2 --timestamp="2005-10-29 12:43:29 +0000" $test_tmpdir/checkout-test2-4) +# Do the --bind-ref=, so we store both branches sorted +# in metadata and thus the checksums remain the same. +empty_rev=$($OSTREE commit ${COMMIT_ARGS} -b test2-no-subject --bind-ref=test2-no-subject-2 -s '' --timestamp="2005-10-29 12:43:29 +0000" $test_tmpdir/checkout-test2-4) +omitted_rev=$($OSTREE commit ${COMMIT_ARGS} -b test2-no-subject-2 --bind-ref=test2-no-subject --timestamp="2005-10-29 12:43:29 +0000" $test_tmpdir/checkout-test2-4) assert_streq $empty_rev $omitted_rev echo "ok commit no subject" diff -Nru ostree-2017.8/tests/pull-test.sh ostree-2017.9/tests/pull-test.sh --- ostree-2017.8/tests/pull-test.sh 2017-07-05 14:05:48.000000000 +0000 +++ ostree-2017.9/tests/pull-test.sh 2017-07-26 20:37:59.000000000 +0000 @@ -23,7 +23,7 @@ cd ${test_tmpdir} rm repo -rf mkdir repo - ostree_repo_init repo + ostree_repo_init repo --mode=${repo_mode} ${CMD_PREFIX} ostree --repo=repo remote add origin $(cat httpd-address)/ostree/gnomerepo "$@" } @@ -35,7 +35,7 @@ assert_file_has_content baz/cow '^moo$' } -echo "1..26" +echo "1..27" # Try both syntaxes repo_init --no-gpg-verify @@ -413,3 +413,14 @@ ${CMD_PREFIX} ostree --repo=repo pull origin main test -f $localsig echo "ok re-pull signature for stored commit" + +cd ${test_tmpdir} +repo_init --no-gpg-verify +mv ostree-srv/gnomerepo/refs/heads/main{,.orig} +rm ostree-srv/gnomerepo/summary +(for x in $(seq 20); do echo "lots of html here "; done) > ostree-srv/gnomerepo/refs/heads/main +if ${CMD_PREFIX} ostree --repo=repo pull origin main 2>err.txt; then + fatal "pull of invalid ref succeeded" +fi +assert_file_has_content_literal err.txt 'error: Fetching refs/heads/main: Invalid rev lots of html here lots of html here lots of html here lots of' +echo "ok pull got HTML for a ref" diff -Nru ostree-2017.8/tests/test-admin-deploy-grub2.sh ostree-2017.9/tests/test-admin-deploy-grub2.sh --- ostree-2017.8/tests/test-admin-deploy-grub2.sh 2017-06-26 16:18:55.000000000 +0000 +++ ostree-2017.9/tests/test-admin-deploy-grub2.sh 2017-07-26 20:37:59.000000000 +0000 @@ -19,7 +19,7 @@ set -euo pipefail -echo "1..16" +echo "1..18" . $(dirname $0)/libtest.sh diff -Nru ostree-2017.8/tests/test-admin-deploy-syslinux.sh ostree-2017.9/tests/test-admin-deploy-syslinux.sh --- ostree-2017.8/tests/test-admin-deploy-syslinux.sh 2017-06-26 16:18:55.000000000 +0000 +++ ostree-2017.9/tests/test-admin-deploy-syslinux.sh 2017-07-26 20:37:59.000000000 +0000 @@ -19,7 +19,7 @@ set -euo pipefail -echo "1..16" +echo "1..18" . $(dirname $0)/libtest.sh diff -Nru ostree-2017.8/tests/test-admin-deploy-uboot.sh ostree-2017.9/tests/test-admin-deploy-uboot.sh --- ostree-2017.8/tests/test-admin-deploy-uboot.sh 2017-06-26 16:18:55.000000000 +0000 +++ ostree-2017.9/tests/test-admin-deploy-uboot.sh 2017-07-26 20:37:59.000000000 +0000 @@ -20,7 +20,7 @@ set -euo pipefail -echo "1..17" +echo "1..19" . $(dirname $0)/libtest.sh diff -Nru ostree-2017.8/tests/test-core.js ostree-2017.9/tests/test-core.js --- ostree-2017.8/tests/test-core.js 2017-06-26 16:18:55.000000000 +0000 +++ ostree-2017.9/tests/test-core.js 2017-07-26 20:37:59.000000000 +0000 @@ -25,6 +25,8 @@ throw new Error("assertion failed " + JSON.stringify(a) + " == " + JSON.stringify(b)); } +print('1..1') + let testDataDir = Gio.File.new_for_path('test-data'); testDataDir.make_directory(null); testDataDir.get_child('some-file').replace_contents("hello world!", null, false, 0, null); @@ -66,4 +68,4 @@ [,readCommit] = repo.resolve_rev('someref', true); assertEquals(readCommit, null); -print("test-core complete"); +print("ok test-core"); diff -Nru ostree-2017.8/tests/test-delta.sh ostree-2017.9/tests/test-delta.sh --- ostree-2017.8/tests/test-delta.sh 2017-06-26 16:18:55.000000000 +0000 +++ ostree-2017.9/tests/test-delta.sh 2017-07-26 20:37:59.000000000 +0000 @@ -258,6 +258,6 @@ if ${CMD_PREFIX} ostree --repo=repo static-delta show GARBAGE 2> err.txt; then assert_not_reached "static-delta show GARBAGE unexpectedly succeeded" fi -assert_file_has_content err.txt "Invalid rev 'GARBAGE'" +assert_file_has_content err.txt "Invalid rev GARBAGE" echo 'ok handle bad delta name' diff -Nru ostree-2017.8/tests/test-find-remotes.sh ostree-2017.9/tests/test-find-remotes.sh --- ostree-2017.8/tests/test-find-remotes.sh 1970-01-01 00:00:00.000000000 +0000 +++ ostree-2017.9/tests/test-find-remotes.sh 2017-07-17 17:33:36.000000000 +0000 @@ -0,0 +1,229 @@ +#!/bin/bash +# +# Copyright © 2017 Endless Mobile, 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 + +. $(dirname $0)/libtest.sh + +echo '1..1' + +# Create two upstream collection repositories with some example commits +cd ${test_tmpdir} + +mkdir apps-collection +ostree_repo_init apps-collection --collection-id org.example.AppsCollection +mkdir -p files +pushd files +${CMD_PREFIX} ostree --repo=../apps-collection commit -s "Test apps-collection commit 1" -b app1 --gpg-homedir=${TEST_GPG_KEYHOME} --gpg-sign=${TEST_GPG_KEYID_1} > ../app1-checksum +${CMD_PREFIX} ostree --repo=../apps-collection commit -s "Test apps-collection commit 2" -b app2 --gpg-homedir=${TEST_GPG_KEYHOME} --gpg-sign=${TEST_GPG_KEYID_1} > ../app2-checksum +popd +${CMD_PREFIX} ostree --repo=apps-collection summary --update --gpg-homedir=${TEST_GPG_KEYHOME} --gpg-sign=${TEST_GPG_KEYID_1} + +mkdir os-collection +ostree_repo_init os-collection --collection-id org.example.OsCollection +mkdir -p files +pushd files +${CMD_PREFIX} ostree --repo=../os-collection commit -s "Test os-collection commit 1" -b os/amd64/master --gpg-homedir=${TEST_GPG_KEYHOME} --gpg-sign=${TEST_GPG_KEYID_2} > ../os-checksum +popd +${CMD_PREFIX} ostree --repo=os-collection summary --update --gpg-homedir=${TEST_GPG_KEYHOME} --gpg-sign=${TEST_GPG_KEYID_2} + +# Create a local repository where we pull the branches from the two remotes as normal, using GPG. +mkdir local +ostree_repo_init local +${CMD_PREFIX} ostree --repo=local remote add apps-remote file://$(pwd)/apps-collection --collection-id org.example.AppsCollection --gpg-import=${test_tmpdir}/gpghome/key1.asc +${CMD_PREFIX} ostree --repo=local remote add os-remote file://$(pwd)/os-collection --collection-id org.example.OsCollection --gpg-import=${test_tmpdir}/gpghome/key2.asc + +${CMD_PREFIX} ostree --repo=local pull apps-remote app1 +${CMD_PREFIX} ostree --repo=local pull os-remote os/amd64/master + +${CMD_PREFIX} ostree --repo=local refs > refs +assert_file_has_content refs "^apps-remote:app1$" +assert_file_has_content refs "^os-remote:os/amd64/master$" + +${CMD_PREFIX} ostree --repo=local refs --collections | wc -l > refscount +assert_file_has_content refscount "^0$" + +# Create a local mirror repository where we pull the branches *in mirror mode* from the two remotes. +# This should pull them into refs/mirrors, since the remotes advertise a collection ID. +mkdir local-mirror +ostree_repo_init local-mirror +${CMD_PREFIX} ostree --repo=local-mirror remote add apps-remote file://$(pwd)/apps-collection --collection-id org.example.AppsCollection --gpg-import=${test_tmpdir}/gpghome/key1.asc +${CMD_PREFIX} ostree --repo=local-mirror remote add os-remote file://$(pwd)/os-collection --collection-id org.example.OsCollection --gpg-import=${test_tmpdir}/gpghome/key2.asc + +${CMD_PREFIX} ostree --repo=local-mirror pull --mirror apps-remote app1 +${CMD_PREFIX} ostree --repo=local-mirror pull --mirror os-remote os/amd64/master + +${CMD_PREFIX} ostree --repo=local-mirror refs | wc -l > refscount +assert_file_has_content refscount "^0$" + +${CMD_PREFIX} ostree --repo=local-mirror refs --collections > refs +assert_file_has_content refs "^(org.example.AppsCollection, app1)$" +assert_file_has_content refs "^(org.example.OsCollection, os/amd64/master)$" + +for repo in local local-mirror; do + # Try finding an update for an existing branch. + ${CMD_PREFIX} ostree --repo=$repo find-remotes org.example.AppsCollection app1 > find + assert_file_has_content find "^Result [0-9]\+: file://$(pwd)/apps-collection$" + assert_file_has_content find "^ - Keyring: apps-remote.trustedkeys.gpg$" + assert_file_has_content find "^ - (org.example.AppsCollection, app1) = $(cat app1-checksum)$" + assert_file_has_content find "^1/1 refs were found.$" + assert_not_file_has_content find "^No results.$" + + # Find several updates for several existing branches. + ${CMD_PREFIX} ostree --repo=$repo find-remotes org.example.AppsCollection app1 org.example.OsCollection os/amd64/master > find + assert_file_has_content find "^Result [0-9]\+: file://$(pwd)/apps-collection$" + assert_file_has_content find "^ - Keyring: apps-remote.trustedkeys.gpg$" + assert_file_has_content find "^ - (org.example.AppsCollection, app1) = $(cat app1-checksum)$" + assert_file_has_content find "^Result [0-9]\+: file://$(pwd)/os-collection$" + assert_file_has_content find "^ - Keyring: os-remote.trustedkeys.gpg$" + assert_file_has_content find "^ - (org.example.OsCollection, os/amd64/master) = $(cat os-checksum)$" + assert_file_has_content find "^2/2 refs were found.$" + assert_not_file_has_content find "^No results.$" + + # Find some updates and a new branch. + ${CMD_PREFIX} ostree --repo=$repo find-remotes org.example.AppsCollection app1 org.example.AppsCollection app2 org.example.OsCollection os/amd64/master > find + assert_file_has_content find "^Result [0-9]\+: file://$(pwd)/apps-collection$" + assert_file_has_content find "^ - Keyring: apps-remote.trustedkeys.gpg$" + assert_file_has_content find "^ - (org.example.AppsCollection, app1) = $(cat app1-checksum)$" + assert_file_has_content find "^ - (org.example.AppsCollection, app2) = $(cat app2-checksum)$" + assert_file_has_content find "^Result [0-9]\+: file://$(pwd)/os-collection$" + assert_file_has_content find "^ - Keyring: os-remote.trustedkeys.gpg$" + assert_file_has_content find "^ - (org.example.OsCollection, os/amd64/master) = $(cat os-checksum)$" + assert_file_has_content find "^3/3 refs were found.$" + assert_not_file_has_content find "^No results.$" + + # Find an update and a non-existent branch. + ${CMD_PREFIX} ostree --repo=$repo find-remotes org.example.AppsCollection app1 org.example.AppsCollection not-an-app > find + assert_file_has_content find "^Result [0-9]\+: file://$(pwd)/apps-collection$" + assert_file_has_content find "^ - Keyring: apps-remote.trustedkeys.gpg$" + assert_file_has_content find "^ - (org.example.AppsCollection, not-an-app) = (not found)$" + assert_file_has_content find "^ - (org.example.AppsCollection, app1) = $(cat app1-checksum)$" + assert_file_has_content find "^Refs not found in any remote:$" + assert_file_has_content find "^ - (org.example.AppsCollection, not-an-app)$" + assert_file_has_content find "^1/2 refs were found.$" + assert_not_file_has_content find "^No results.$" + + # Do all the above, but pull this time. + ${CMD_PREFIX} ostree --repo=$repo find-remotes --pull org.example.AppsCollection app1 > pull || true + assert_file_has_content pull "^1/1 refs were found.$" + assert_file_has_content pull "^Pulled 1/1 refs successfully.$" + assert_not_file_has_content pull "Failed to pull some refs from the remotes" + assert_ref $repo app1 $(cat app1-checksum) + + ${CMD_PREFIX} ostree --repo=$repo find-remotes --pull org.example.AppsCollection app1 org.example.OsCollection os/amd64/master > pull + assert_file_has_content pull "^2/2 refs were found.$" + assert_file_has_content pull "^Pulled 2/2 refs successfully.$" + assert_not_file_has_content pull "Failed to pull some refs from the remotes" + assert_ref $repo app1 $(cat app1-checksum) + assert_ref $repo os/amd64/master $(cat os-checksum) + + ${CMD_PREFIX} ostree --repo=$repo find-remotes --pull org.example.AppsCollection app1 org.example.AppsCollection app2 org.example.OsCollection os/amd64/master > pull + assert_file_has_content pull "^3/3 refs were found.$" + assert_file_has_content pull "^Pulled 3/3 refs successfully.$" + assert_not_file_has_content pull "Failed to pull some refs from the remotes" + assert_ref $repo app1 $(cat app1-checksum) + assert_ref $repo app2 $(cat app2-checksum) + assert_ref $repo os/amd64/master $(cat os-checksum) + + ${CMD_PREFIX} ostree --repo=$repo find-remotes --pull org.example.AppsCollection app1 org.example.AppsCollection not-an-app > pull + assert_file_has_content pull "^1/2 refs were found.$" + assert_not_file_has_content pull "Failed to pull some refs from the remotes" + assert_ref $repo app1 $(cat app1-checksum) + assert_not_ref $repo not-an-app +done + +# Test pulling a new commit into the local mirror from one of the repositories. +pushd files +${CMD_PREFIX} ostree --repo=../os-collection commit -s "Test os-collection commit 2" -b os/amd64/master --gpg-homedir=${TEST_GPG_KEYHOME} --gpg-sign=${TEST_GPG_KEYID_2} > ../os-checksum-2 +popd +${CMD_PREFIX} ostree --repo=os-collection summary --update --gpg-homedir=${TEST_GPG_KEYHOME} --gpg-sign=${TEST_GPG_KEYID_2} + +for repo in local-mirror; do + # Try finding an update for that branch. + ${CMD_PREFIX} ostree --repo=$repo find-remotes org.example.OsCollection os/amd64/master > find + assert_file_has_content find "^Result [0-9]\+: file://$(pwd)/os-collection$" + assert_file_has_content find "^ - Keyring: os-remote.trustedkeys.gpg$" + assert_file_has_content find "^ - (org.example.OsCollection, os/amd64/master) = $(cat os-checksum-2)$" + assert_file_has_content find "^1/1 refs were found.$" + assert_not_file_has_content find "^No results.$" + + # Pull it. + ${CMD_PREFIX} ostree --repo=$repo find-remotes --pull org.example.OsCollection os/amd64/master > pull || true + assert_file_has_content pull "^1/1 refs were found.$" + assert_file_has_content pull "^Pulled 1/1 refs successfully.$" + assert_not_file_has_content pull "Failed to pull some refs from the remotes" + assert_ref $repo os/amd64/master $(cat os-checksum-2) +done + +# Add the local mirror to the local repository as a remote, so that the local repo +# has two configured remotes for the os-collection. Ensure its summary is up to date first. +#${CMD_PREFIX} ostree --repo=local-mirror summary --update +# FIXME: This `cp` can be changed to `ostree summary --update` once PR #946 lands. +# Prior to that, we need to preserve the signatures. +cp os-collection/summary{,.sig} local-mirror/ +${CMD_PREFIX} ostree --repo=local remote add os-remote-local-mirror file://$(pwd)/local-mirror --collection-id org.example.OsCollection --gpg-import=${test_tmpdir}/gpghome/key2.asc + +for repo in local; do + # Try finding an update for that branch. + ${CMD_PREFIX} ostree --repo=$repo find-remotes org.example.OsCollection os/amd64/master > find + assert_file_has_content find "^Result [0-9]\+: file://$(pwd)/os-collection$" + assert_file_has_content find "^ - Keyring: os-remote.trustedkeys.gpg$" + assert_file_has_content find "^ - (org.example.OsCollection, os/amd64/master) = $(cat os-checksum-2)$" + assert_file_has_content find "^Result [0-9]\+: file://$(pwd)/local-mirror$" + assert_file_has_content find "^ - Keyring: os-remote-local-mirror.trustedkeys.gpg$" + assert_file_has_content find "^ - (org.example.OsCollection, os/amd64/master) = $(cat os-checksum-2)$" + assert_file_has_content find "^1/1 refs were found.$" + assert_not_file_has_content find "^No results.$" + + # Pull it. + ${CMD_PREFIX} ostree --repo=$repo find-remotes --pull org.example.OsCollection os/amd64/master > pull || true + assert_file_has_content pull "^1/1 refs were found.$" + assert_file_has_content pull "^Pulled 1/1 refs successfully.$" + assert_not_file_has_content pull "Failed to pull some refs from the remotes" + assert_ref $repo os/amd64/master $(cat os-checksum-2) +done + +# Add another commit to the OS collection, but don’t update the mirror. Then try pulling +# into the local repository again, and check that the outdated ref in the mirror is ignored. +pushd files +${CMD_PREFIX} ostree --repo=../os-collection commit -s "Test os-collection commit 3" -b os/amd64/master --gpg-homedir=${TEST_GPG_KEYHOME} --gpg-sign=${TEST_GPG_KEYID_2} > ../os-checksum-3 +popd +${CMD_PREFIX} ostree --repo=os-collection summary --update --gpg-homedir=${TEST_GPG_KEYHOME} --gpg-sign=${TEST_GPG_KEYID_2} + +for repo in local; do + # Try finding an update for that branch. + ${CMD_PREFIX} ostree --repo=$repo find-remotes org.example.OsCollection os/amd64/master > find + assert_file_has_content find "^Result [0-9]\+: file://$(pwd)/os-collection$" + assert_file_has_content find "^ - Keyring: os-remote.trustedkeys.gpg$" + assert_file_has_content find "^ - (org.example.OsCollection, os/amd64/master) = $(cat os-checksum-3)$" + assert_file_has_content find "^Result [0-9]\+: file://$(pwd)/local-mirror$" + assert_file_has_content find "^ - Keyring: os-remote-local-mirror.trustedkeys.gpg$" + assert_file_has_content find "^ - (org.example.OsCollection, os/amd64/master) = $(cat os-checksum-3)$" + assert_file_has_content find "^1/1 refs were found.$" + assert_not_file_has_content find "^No results.$" + + # Pull it. + ${CMD_PREFIX} ostree --repo=$repo find-remotes --pull org.example.OsCollection os/amd64/master > pull || true + assert_file_has_content pull "^1/1 refs were found.$" + assert_file_has_content pull "^Pulled 1/1 refs successfully.$" + assert_not_file_has_content pull "Failed to pull some refs from the remotes" + assert_ref $repo os/amd64/master $(cat os-checksum-3) +done + +echo "ok find-remotes" diff -Nru ostree-2017.8/tests/test-fsck-collections.sh ostree-2017.9/tests/test-fsck-collections.sh --- ostree-2017.8/tests/test-fsck-collections.sh 1970-01-01 00:00:00.000000000 +0000 +++ ostree-2017.9/tests/test-fsck-collections.sh 2017-07-17 17:33:36.000000000 +0000 @@ -0,0 +1,72 @@ +#!/bin/bash +# +# Copyright © 2017 Endless Mobile, 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 + +. $(dirname $0)/libtest.sh + +echo '1..2' + +cd ${test_tmpdir} + +# Check that fsck detects errors with refs which have collection IDs (i.e. refs in refs/mirrors). +set_up_repo() { + rm -rf repo files + + mkdir repo + ostree_repo_init repo + + mkdir files + pushd files + ${CMD_PREFIX} ostree --repo=../repo commit -s "Commit 1" -b original-ref > ../original-ref-checksum + popd + ${CMD_PREFIX} ostree --repo=repo refs --collections --create=org.example.Collection:some-ref $(cat original-ref-checksum) +} + +set_up_repo + +# fsck at this point should succeed +${CMD_PREFIX} ostree fsck --repo=repo > fsck +assert_file_has_content fsck "^Validating refs in collections...$" + +# Drop the commit the ref points to, and drop the original ref so that fsck doesn’t prematurely fail on that. +find repo/objects -name '*.commit' -delete -print | wc -l > commitcount +assert_file_has_content commitcount "^1$" + +rm repo/refs/heads/original-ref + +# fsck should now fail +if ${CMD_PREFIX} ostree fsck --repo=repo > fsck; then + assert_not_reached "fsck unexpectedly succeeded after deleting commit!" +fi +assert_file_has_content fsck "^Validating refs...$" +assert_file_has_content fsck "^Validating refs in collections...$" + +echo "ok 1 fsck-collections" + +# Try fsck in an old repository where refs/mirrors doesn’t exist to begin with. +# It should succeed. +set_up_repo +rm -rf repo/refs/mirrors + +${CMD_PREFIX} ostree fsck --repo=repo > fsck +assert_file_has_content fsck "^Validating refs...$" +assert_file_has_content fsck "^Validating refs in collections...$" + +echo "ok 2 fsck-collections in old repository" diff -Nru ostree-2017.8/tests/test-init-collections.sh ostree-2017.9/tests/test-init-collections.sh --- ostree-2017.8/tests/test-init-collections.sh 1970-01-01 00:00:00.000000000 +0000 +++ ostree-2017.9/tests/test-init-collections.sh 2017-07-17 17:33:36.000000000 +0000 @@ -0,0 +1,33 @@ +#!/bin/bash +# +# Copyright © 2017 Endless Mobile, 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 + +. $(dirname $0)/libtest.sh + +echo '1..1' + +cd ${test_tmpdir} + +# Check that initialising a repository with a collection ID results in the ID being in the config. +mkdir repo +ostree_repo_init repo --collection-id org.example.Collection +assert_file_has_content repo/config "^collection-id=org.example.Collection$" + +echo "ok init-collections" diff -Nru ostree-2017.8/tests/test-prune-collections.sh ostree-2017.9/tests/test-prune-collections.sh --- ostree-2017.8/tests/test-prune-collections.sh 1970-01-01 00:00:00.000000000 +0000 +++ ostree-2017.9/tests/test-prune-collections.sh 2017-07-17 17:33:36.000000000 +0000 @@ -0,0 +1,79 @@ +#!/bin/bash +# +# Copyright © 2017 Endless Mobile, 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 + +. $(dirname $0)/libtest.sh + +echo '1..2' + +cd ${test_tmpdir} + +# Check that refs with collection IDs (i.e. refs in refs/mirrors) are taken into account +# when computing reachability of objects while pruning. +set_up_repo() { + rm -rf repo files + + mkdir repo + ostree_repo_init repo + + mkdir files + pushd files + ${CMD_PREFIX} ostree --repo=../repo commit -s "Commit 1" -b original-ref > ../original-ref-checksum + popd + ${CMD_PREFIX} ostree --repo=repo refs --collections --create=org.example.Collection:some-ref $(cat original-ref-checksum) +} + +set_up_repo + +# Try deleting a specific commit which is still pointed to by both refs. +if ${CMD_PREFIX} ostree --repo=repo prune --delete-commit=$(cat original-ref-checksum) 2>/dev/null; then + assert_not_reached "prune unexpectedly succeeded in deleting a referenced commit!" +fi + +# Pruning normally should do nothing. +${CMD_PREFIX} ostree --repo=repo prune --refs-only > prune +assert_file_has_content prune "^Total objects: 3$" +assert_file_has_content prune "^No unreachable objects$" + +# Remove the original-ref so that only the some-ref with a collection ID points to the commit. +${CMD_PREFIX} ostree --repo=repo refs --delete original-ref + +${CMD_PREFIX} ostree --repo=repo prune --refs-only > prune +assert_file_has_content prune "^Total objects: 3$" +assert_file_has_content prune "^No unreachable objects$" + +# Remove the second ref so that the commit is now orphaned. +${CMD_PREFIX} ostree --repo=repo refs --collections --delete org.example.Collection + +${CMD_PREFIX} ostree --repo=repo prune --refs-only > prune +assert_file_has_content prune "^Total objects: 3$" +assert_file_has_content prune "^Deleted 3 objects, [0-9]\+ bytes freed$" + +echo "ok 1 prune-collections" + +# Try again, but in an old repository where refs/mirrors doesn’t exist to begin with. +set_up_repo +rm -rf repo/refs/mirrors + +${CMD_PREFIX} ostree --repo=repo prune --refs-only > prune +assert_file_has_content prune "^Total objects: 3$" +assert_file_has_content prune "^No unreachable objects$" + +echo "ok 2 prune-collections in old repository" diff -Nru ostree-2017.8/tests/test-pull-archive.sh ostree-2017.9/tests/test-pull-archive.sh --- ostree-2017.8/tests/test-pull-archive.sh 2017-07-04 09:59:08.000000000 +0000 +++ ostree-2017.9/tests/test-pull-archive.sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,26 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2011 Colin Walters -# -# 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 - -. $(dirname $0)/libtest.sh - -setup_fake_remote_repo1 "archive" - -. ${test_srcdir}/pull-test.sh diff -Nru ostree-2017.8/tests/test-pull-bare.sh ostree-2017.9/tests/test-pull-bare.sh --- ostree-2017.8/tests/test-pull-bare.sh 1970-01-01 00:00:00.000000000 +0000 +++ ostree-2017.9/tests/test-pull-bare.sh 2017-07-26 20:37:59.000000000 +0000 @@ -0,0 +1,27 @@ +#!/bin/bash +# +# Copyright (C) 2011 Colin Walters +# +# 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 + +. $(dirname $0)/libtest.sh + +setup_fake_remote_repo1 "archive" + +repo_mode=bare +. ${test_srcdir}/pull-test.sh diff -Nru ostree-2017.8/tests/test-pull-bareuser.sh ostree-2017.9/tests/test-pull-bareuser.sh --- ostree-2017.8/tests/test-pull-bareuser.sh 1970-01-01 00:00:00.000000000 +0000 +++ ostree-2017.9/tests/test-pull-bareuser.sh 2017-07-26 20:37:59.000000000 +0000 @@ -0,0 +1,27 @@ +#!/bin/bash +# +# Copyright (C) 2011 Colin Walters +# +# 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 + +. $(dirname $0)/libtest.sh + +setup_fake_remote_repo1 "archive" + +repo_mode=bare-user +. ${test_srcdir}/pull-test.sh diff -Nru ostree-2017.8/tests/test-pull-collections.sh ostree-2017.9/tests/test-pull-collections.sh --- ostree-2017.8/tests/test-pull-collections.sh 1970-01-01 00:00:00.000000000 +0000 +++ ostree-2017.9/tests/test-pull-collections.sh 2017-07-26 20:37:59.000000000 +0000 @@ -0,0 +1,246 @@ +#!/bin/bash +# +# Copyright © 2017 Endless Mobile, 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 + +. $(dirname $0)/libtest.sh + +echo '1..6' + +cd ${test_tmpdir} + +do_commit() { + local repo=$1 + local branch=$2 + shift 2 + + mkdir -p files + pushd files + ${CMD_PREFIX} ostree --repo="../${repo}" commit -s "Test ${repo} commit for branch ${branch}" -b "${branch}" --gpg-homedir="${TEST_GPG_KEYHOME}" --gpg-sign="${TEST_GPG_KEYID_1}" "$@" > "../${branch}-checksum" + popd +} + +do_summary() { + local repo=$1 + shift 1 + + ${CMD_PREFIX} ostree "--repo=${repo}" summary --update --gpg-homedir="${TEST_GPG_KEYHOME}" --gpg-sign="${TEST_GPG_KEYID_1}" +} + +do_collection_ref_show() { + local repo=$1 + local branch=$2 + shift 2 + + echo -n "collection ID: " + if ${CMD_PREFIX} ostree "--repo=${repo}" show --print-metadata-key=ostree.collection-binding $(cat "${branch}-checksum") + then : + else return 1 + fi + echo -n "refs: " + if ${CMD_PREFIX} ostree "--repo=${repo}" show --print-metadata-key=ostree.ref-binding $(cat "${branch}-checksum") + then return 0 + else return 1 + fi +} + +ensure_no_collection_ref() { + local repo=$1 + local branch=$2 + local error=$3 + shift 3 + + if do_collection_ref_show "${repo}" "${branch}" >/dev/null + then + assert_not_reached "${error}" + fi +} + +do_join() { + local IFS=', ' + echo "$*" +} + +ensure_collection_ref() { + local repo=$1 + local branch=$2 + local collection_id=$3 + shift 3 + local refs=$(do_join "$@") + + do_collection_ref_show "${repo}" "${branch}" >"${branch}-meta" + assert_file_has_content "${branch}-meta" "^collection ID: '${collection_id}'$" + assert_file_has_content "${branch}-meta" "^refs: \['${refs}'\]$" +} + +do_remote_add() { + local repo=$1 + local remote_repo=$2 + shift 2 + + ${CMD_PREFIX} ostree "--repo=${repo}" remote add "${remote_repo}-remote" "file://$(pwd)/${remote_repo}" "$@" --gpg-import="${test_tmpdir}/gpghome/key1.asc" +} + +do_pull() { + local repo=$1 + local remote_repo=$2 + local branch=$3 + shift 3 + + if ${CMD_PREFIX} ostree "--repo=${repo}" pull "${remote_repo}-remote" "${branch}" + then return 0 + else return 1 + fi +} + +do_local_pull() { + local repo=$1 + local remote_repo=$2 + local branch=$3 + shift 3 + + if ${CMD_PREFIX} ostree "--repo=${repo}" pull-local "${remote_repo}" "${branch}" + then return 0 + else return 1 + fi +} + +# Create a repo without the collection ID. +mkdir no-collection-repo +ostree_repo_init no-collection-repo +do_commit no-collection-repo goodncref1 +do_commit no-collection-repo sortofbadncref1 --add-metadata-string=ostree.collection-binding=org.example.Ignored +do_summary no-collection-repo +ensure_no_collection_ref \ + no-collection-repo \ + goodncref1 \ + "commits in repository without collection ID shouldn't normally contain the ostree.commit.collection metadata information" +ensure_collection_ref no-collection-repo sortofbadncref1 'org.example.Ignored' 'sortofbadncref1' + +echo "ok 1 setup remote repo without collection ID" + +# Create a repo with a collection ID. +mkdir collection-repo +ostree_repo_init collection-repo +do_commit collection-repo badcref1 # has no collection ref +# We set the repo collection ID in this hacky way to get the commit +# without the collection ID. +echo "collection-id=org.example.CollectionRepo" >>collection-repo/config +do_commit collection-repo badcref2 --add-metadata-string=ostree.collection-binding=org.example.Whatever +do_commit collection-repo badcref3 --add-metadata-string=ostree.collection-binding= +do_commit collection-repo goodcref1 +# create a badcref4 ref with a commit that has goodcref1 in its collection ref metadata +${CMD_PREFIX} ostree --repo=collection-repo refs --create=badcref4 $(cat goodcref1-checksum) +do_summary collection-repo +ensure_no_collection_ref \ + collection-repo \ + badcref1 \ + "commit in badcref1 should not have the collection ref metadata information" +ensure_collection_ref collection-repo badcref2 'org.example.Whatever' 'badcref2' +ensure_collection_ref collection-repo badcref3 '' 'badcref3' +ensure_collection_ref collection-repo goodcref1 'org.example.CollectionRepo' 'goodcref1' + +echo "ok 2 setup remote repo with collection ID" + +# Create a local repo without the collection ID. +mkdir no-collection-local-repo +ostree_repo_init no-collection-local-repo +do_commit no-collection-local-repo goodnclref1 +do_commit no-collection-local-repo sortofbadnclref1 --add-metadata-string=ostree.collection-binding=org.example.IgnoredLocal +do_summary no-collection-local-repo +ensure_no_collection_ref \ + no-collection-local-repo \ + goodnclref1 \ + "commits in repository without collection ID shouldn't normally contain the ostree.commit.collection metadata information" +ensure_collection_ref no-collection-local-repo sortofbadnclref1 'org.example.IgnoredLocal' 'sortofbadnclref1' + +echo "ok 3 setup local repo without collection ID" + +# Create a local repo with a collection ID. +mkdir collection-local-repo +ostree_repo_init collection-local-repo +do_commit collection-local-repo badclref1 # has no collection ref +# We set the repo collection ID in this hacky way to get the commit +# without the collection ID. +echo "collection-id=org.example.CollectionRepoLocal" >>collection-local-repo/config +do_commit collection-local-repo badclref2 --add-metadata-string=ostree.collection-binding=org.example.WhateverLocal +do_commit collection-local-repo badclref3 --add-metadata-string=ostree.collection-binding= +do_commit collection-local-repo goodclref1 +# create a badclref4 ref with a commit that has goodclref1 in its collection ref metadata +${CMD_PREFIX} ostree --repo=collection-local-repo refs --create=badclref4 $(cat goodclref1-checksum) +do_summary collection-local-repo +ensure_no_collection_ref \ + collection-local-repo \ + badclref1 \ + "commit in badclref1 should not have the collection ref metadata information" +ensure_collection_ref collection-local-repo badclref2 'org.example.WhateverLocal' 'badclref2' +ensure_collection_ref collection-local-repo badclref3 '' 'badclref3' +ensure_collection_ref collection-local-repo goodclref1 'org.example.CollectionRepoLocal' 'goodclref1' + +echo "ok 4 setup local repo with collection ID" + +# Create a local repository where we pull the branches from the remotes as normal, using GPG. +mkdir local +ostree_repo_init local +do_remote_add local collection-repo --collection-id org.example.CollectionRepo +do_remote_add local no-collection-repo + +do_pull local no-collection-repo goodncref1 +do_pull local no-collection-repo sortofbadncref1 +if do_pull local collection-repo badcref1 +then + assert_not_reached "pulling a commit without collection ID from a repo with collection ID should fail" +fi +if do_pull local collection-repo badcref2 +then + assert_not_reached "pulling a commit with a mismatched collection ID from a repo with collection ID should fail" +fi +if do_pull local collection-repo badcref3 +then + assert_not_reached "pulling a commit with empty collection ID from repo with collection ID should fail" +fi +do_pull local collection-repo goodcref1 +if do_pull local collection-repo badcref4 +then + assert_not_reached "pulling a commit that was not requested from repo with collection ID should fail" +fi + +echo "ok 5 pull refs from remote repos" + +do_local_pull local no-collection-local-repo goodnclref1 +do_local_pull local no-collection-local-repo sortofbadnclref1 +if do_local_pull local collection-local-repo badclref1 +then + assert_not_reached "pulling a commit without collection ID from a repo with collection ID should fail" +fi +if do_local_pull local collection-local-repo badclref2 +then + assert_not_reached "pulling a commit with a mismatched collection ID from a repo with collection ID should fail" +fi +if do_local_pull local collection-local-repo badclref3 +then + assert_not_reached "pulling a commit with empty collection ID from repo with collection ID should fail" +fi +do_local_pull local collection-local-repo goodclref1 +if do_local_pull local collection-local-repo badclref4 +then + assert_not_reached "pulling a commit that was not requested from repo with collection ID should fail" +fi + +echo "ok 6 pull refs from local repos" diff -Nru ostree-2017.8/tests/test-refs-collections.sh ostree-2017.9/tests/test-refs-collections.sh --- ostree-2017.8/tests/test-refs-collections.sh 1970-01-01 00:00:00.000000000 +0000 +++ ostree-2017.9/tests/test-refs-collections.sh 2017-07-17 17:33:36.000000000 +0000 @@ -0,0 +1,125 @@ +#!/bin/bash +# +# Copyright © 2016 Red Hat, Inc. +# Copyright © 2017 Endless Mobile, 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 + +. $(dirname $0)/libtest.sh + +echo '1..2' + +cd ${test_tmpdir} +mkdir repo +ostree_repo_init repo --collection-id org.example.Collection + +mkdir -p tree/root +touch tree/root/a + +# Add a few commits +seq 5 | while read i; do + echo a >> tree/root/a + ${CMD_PREFIX} ostree --repo=repo commit --branch=test-$i -m test -s test tree +done + +# The collection IDs should only be listed if --collections is passed. +${CMD_PREFIX} ostree --repo=repo refs | wc -l > refscount +assert_file_has_content refscount "^5$" + +${CMD_PREFIX} ostree --repo=repo refs > refs +assert_file_has_content refs "^test\-1$" +assert_file_has_content refs "^test\-5$" +assert_not_file_has_content refs "org.example.Collection" + +${CMD_PREFIX} ostree --repo=repo refs --collections > refs +assert_file_has_content refs "^(org.example.Collection, test-1)$" +assert_file_has_content refs "^(org.example.Collection, test-5)$" + +# Similarly, the collection IDs should only be listed when filtering if --collections is passed. +${CMD_PREFIX} ostree --repo=repo refs --list org.example.Collection | wc -l > refscount +assert_file_has_content refscount "^0$" + +${CMD_PREFIX} ostree --repo=repo refs --collections --list org.example.Collection | wc -l > refscount +assert_file_has_content refscount "^5$" + +# --delete by itself should fail. +${CMD_PREFIX} ostree --repo=repo refs --delete 2>/dev/null || true +${CMD_PREFIX} ostree --repo=repo refs | wc -l > refscount.delete1 +assert_file_has_content refscount.delete1 "^5$" + +# Deleting specific refs should work. +${CMD_PREFIX} ostree refs --delete 2>/dev/null && (echo 1>&2 "refs --delete (without prefix) unexpectedly succeeded!"; exit 1) +${CMD_PREFIX} ostree --repo=repo refs --delete test-1 test-2 +${CMD_PREFIX} ostree --repo=repo refs | wc -l > refscount.delete2 +assert_file_has_content refscount.delete2 "^3$" +${CMD_PREFIX} ostree --repo=repo refs > refs.delete2 +assert_not_file_has_content refs.delete2 '^test-1$' +assert_not_file_has_content refs.delete2 '^test-2$' +assert_file_has_content refs.delete2 '^test-3$' + +# Deleting by collection ID should only work if --collections is passed. +${CMD_PREFIX} ostree refs --repo=repo --delete org.example.Collection +${CMD_PREFIX} ostree refs --repo=repo | wc -l > refscount.delete3 +assert_file_has_content refscount.delete3 "^3$" + +${CMD_PREFIX} ostree refs --repo=repo --collections --delete org.example.Collection +${CMD_PREFIX} ostree refs --repo=repo | wc -l > refscount.delete4 +assert_file_has_content refscount.delete4 "^0$" + +# Add a few more commits, to test --create +${CMD_PREFIX} ostree --repo=repo commit --branch=ctest -m ctest -s ctest tree + +${CMD_PREFIX} ostree --repo=repo refs | wc -l > refscount +assert_file_has_content refscount "^1$" + +# and test mirrored branches +${CMD_PREFIX} ostree --repo=repo refs --collections --create=org.example.NewCollection:ctest-mirror ctest + +${CMD_PREFIX} ostree --repo=repo refs | wc -l > refscount +assert_file_has_content refscount "^1$" +${CMD_PREFIX} ostree --repo=repo refs --collections | wc -l > refscount +assert_file_has_content refscount "^2$" + +${CMD_PREFIX} ostree --repo=repo refs > refs +assert_file_has_content refs "^ctest$" +assert_not_file_has_content refs "^ctest-mirror$" + +${CMD_PREFIX} ostree --repo=repo refs --collections > refs +assert_file_has_content refs "^(org.example.Collection, ctest)$" +assert_file_has_content refs "^(org.example.NewCollection, ctest-mirror)$" + +echo "ok 1 refs collections" + +# Test that listing, creating and deleting refs works from an old repository +# where refs/mirrors doesn’t exist to begin with. +rm -rf repo/refs/mirrors +${CMD_PREFIX} ostree --repo=repo refs + +rm -rf repo/refs/mirrors +${CMD_PREFIX} ostree --repo=repo refs --collections + +rm -rf repo/refs/mirrors +${CMD_PREFIX} ostree --repo=repo refs --collections --create=org.example.NewCollection:ctest-mirror ctest +${CMD_PREFIX} ostree --repo=repo refs --collections > refs +assert_file_has_content refs "^(org.example.Collection, ctest)$" +assert_file_has_content refs "^(org.example.NewCollection, ctest-mirror)$" + +rm -rf repo/refs/mirrors +${CMD_PREFIX} ostree refs --repo=repo --collections --delete org.example.NonexistentCollection + +echo "ok 2 refs collections in old repository" diff -Nru ostree-2017.8/tests/test-remote-add-collections.sh ostree-2017.9/tests/test-remote-add-collections.sh --- ostree-2017.8/tests/test-remote-add-collections.sh 1970-01-01 00:00:00.000000000 +0000 +++ ostree-2017.9/tests/test-remote-add-collections.sh 2017-07-17 17:33:36.000000000 +0000 @@ -0,0 +1,35 @@ +#!/bin/bash +# +# Copyright © 2017 Endless Mobile, 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 + +. $(dirname $0)/libtest.sh + +echo '1..1' + +cd ${test_tmpdir} + +# Check that adding a remote with a collection ID results in the ID being in the config. +mkdir repo +ostree_repo_init repo +${CMD_PREFIX} ostree --repo=repo remote add some-remote https://example.com/ --collection-id example-id --gpg-import=${test_tmpdir}/gpghome/key1.asc + +assert_file_has_content repo/config "^collection-id=example-id$" + +echo "ok remote-add-collections" diff -Nru ostree-2017.8/tests/test-sizes.js ostree-2017.9/tests/test-sizes.js --- ostree-2017.8/tests/test-sizes.js 2016-04-05 16:46:09.000000000 +0000 +++ ostree-2017.9/tests/test-sizes.js 2017-07-26 20:37:59.000000000 +0000 @@ -26,6 +26,8 @@ throw new Error("assertion failed " + JSON.stringify(a) + " == " + JSON.stringify(b)); } +print('1..1') + let testDataDir = Gio.File.new_for_path('test-data'); testDataDir.make_directory(null); testDataDir.get_child('some-file').replace_contents("hello world!", null, false, 0, null); @@ -79,4 +81,4 @@ throw new Error("Failed to match expectedUncompressedSizes: " + JSON.stringify(expectedUncompressedSizes)); } -print("test-sizes complete"); +print("ok test-sizes"); diff -Nru ostree-2017.8/tests/test-summary-collections.sh ostree-2017.9/tests/test-summary-collections.sh --- ostree-2017.8/tests/test-summary-collections.sh 1970-01-01 00:00:00.000000000 +0000 +++ ostree-2017.9/tests/test-summary-collections.sh 2017-07-17 17:33:36.000000000 +0000 @@ -0,0 +1,58 @@ +#!/bin/bash +# +# Copyright © 2016 Red Hat, Inc. +# Copyright © 2017 Endless Mobile, 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 + +. $(dirname $0)/libtest.sh + +echo '1..1' + +cd ${test_tmpdir} +mkdir repo +ostree_repo_init repo --collection-id org.example.Collection + +mkdir -p tree/root +touch tree/root/a + +# Add a few commits +seq 5 | while read i; do + echo a >> tree/root/a + ${CMD_PREFIX} ostree --repo=repo commit --branch=test-$i -m test -s test tree +done + +# Check that they are all listed, with the repository’s collection ID, in the summary. +${CMD_PREFIX} ostree --repo=repo summary --update + +${CMD_PREFIX} ostree --repo=repo summary --view > summary +assert_file_has_content summary "(org.example.Collection, test-1)$" +assert_file_has_content summary "(org.example.Collection, test-2)$" +assert_file_has_content summary "(org.example.Collection, test-3)$" +assert_file_has_content summary "(org.example.Collection, test-4)$" +assert_file_has_content summary "(org.example.Collection, test-5)$" +assert_file_has_content summary "^Collection ID (ostree\.summary\.collection-id): org.example.Collection$" + +# Test that mirrored branches are listed too. +${CMD_PREFIX} ostree --repo=repo refs --collections --create=org.example.OtherCollection:test-1-mirror test-1 +${CMD_PREFIX} ostree --repo=repo summary --update + +${CMD_PREFIX} ostree --repo=repo summary --view > summary +assert_file_has_content summary "(org.example.OtherCollection, test-1-mirror)$" + +echo "ok summary collections" diff -Nru ostree-2017.8/tests/test-symbols.sh ostree-2017.9/tests/test-symbols.sh --- ostree-2017.8/tests/test-symbols.sh 2017-07-06 15:07:11.000000000 +0000 +++ ostree-2017.9/tests/test-symbols.sh 2017-07-27 10:19:59.000000000 +0000 @@ -52,7 +52,7 @@ # ONLY update this checksum in release commits! cat > released-sha256.txt <