libglnx: bump and use new helper methods
Update submodule: libglnx Closes: #857 Approved by: cgwalters
This commit is contained in:
parent
5811d4e8a3
commit
23c60cda22
2
libglnx
2
libglnx
|
|
@ -1 +1 @@
|
||||||
Subproject commit 3a4d0f4684f4653338c4756c8a1abfc6b5738467
|
Subproject commit 32231fdb5273dd2a812c61549d6c0e681c0f5d59
|
||||||
|
|
@ -516,7 +516,7 @@ checkout_one_file_at (OstreeRepo *repo,
|
||||||
if (!checkout_object_for_uncompressed_cache (repo, loose_path_buf,
|
if (!checkout_object_for_uncompressed_cache (repo, loose_path_buf,
|
||||||
source_info, input,
|
source_info, input,
|
||||||
cancellable, error))
|
cancellable, error))
|
||||||
return g_prefix_error (error, "Unpacking loose object %s: ", checksum), FALSE;
|
return glnx_prefix_error (error, "Unpacking loose object %s", checksum);
|
||||||
|
|
||||||
g_clear_object (&input);
|
g_clear_object (&input);
|
||||||
|
|
||||||
|
|
@ -549,7 +549,7 @@ checkout_one_file_at (OstreeRepo *repo,
|
||||||
destination_dfd, destination_name,
|
destination_dfd, destination_name,
|
||||||
FALSE, &hardlink_res,
|
FALSE, &hardlink_res,
|
||||||
cancellable, error))
|
cancellable, error))
|
||||||
return g_prefix_error (error, "Using new cached uncompressed hardlink of %s to %s: ", checksum, destination_name), FALSE;
|
return glnx_prefix_error (error, "Using new cached uncompressed hardlink of %s to %s", checksum, destination_name);
|
||||||
|
|
||||||
need_copy = (hardlink_res == HARDLINK_RESULT_NOT_SUPPORTED);
|
need_copy = (hardlink_res == HARDLINK_RESULT_NOT_SUPPORTED);
|
||||||
}
|
}
|
||||||
|
|
@ -571,7 +571,7 @@ checkout_one_file_at (OstreeRepo *repo,
|
||||||
if (!create_file_copy_from_input_at (repo, options, state, source_info, xattrs, input,
|
if (!create_file_copy_from_input_at (repo, options, state, source_info, xattrs, input,
|
||||||
destination_dfd, destination_name,
|
destination_dfd, destination_name,
|
||||||
cancellable, error))
|
cancellable, error))
|
||||||
return g_prefix_error (error, "Copy checkout of %s to %s: ", checksum, destination_name), FALSE;
|
return glnx_prefix_error (error, "Copy checkout of %s to %s", checksum, destination_name);
|
||||||
|
|
||||||
if (input)
|
if (input)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -2009,13 +2009,13 @@ ostree_repo_read_commit_detached_metadata (OstreeRepo *self,
|
||||||
!ot_util_variant_map_at (self->commit_stagedir_fd, buf,
|
!ot_util_variant_map_at (self->commit_stagedir_fd, buf,
|
||||||
G_VARIANT_TYPE ("a{sv}"),
|
G_VARIANT_TYPE ("a{sv}"),
|
||||||
OT_VARIANT_MAP_ALLOW_NOENT | OT_VARIANT_MAP_TRUSTED, &ret_metadata, error))
|
OT_VARIANT_MAP_ALLOW_NOENT | OT_VARIANT_MAP_TRUSTED, &ret_metadata, error))
|
||||||
return g_prefix_error (error, "Unable to read existing detached metadata: "), FALSE;
|
return glnx_prefix_error (error, "Unable to read existing detached metadata");
|
||||||
|
|
||||||
if (ret_metadata == NULL &&
|
if (ret_metadata == NULL &&
|
||||||
!ot_util_variant_map_at (self->objects_dir_fd, buf,
|
!ot_util_variant_map_at (self->objects_dir_fd, buf,
|
||||||
G_VARIANT_TYPE ("a{sv}"),
|
G_VARIANT_TYPE ("a{sv}"),
|
||||||
OT_VARIANT_MAP_ALLOW_NOENT | OT_VARIANT_MAP_TRUSTED, &ret_metadata, error))
|
OT_VARIANT_MAP_ALLOW_NOENT | OT_VARIANT_MAP_TRUSTED, &ret_metadata, error))
|
||||||
return g_prefix_error (error, "Unable to read existing detached metadata: "), FALSE;
|
return glnx_prefix_error (error, "Unable to read existing detached metadata");
|
||||||
|
|
||||||
if (ret_metadata == NULL && self->parent_repo)
|
if (ret_metadata == NULL && self->parent_repo)
|
||||||
return ostree_repo_read_commit_detached_metadata (self->parent_repo,
|
return ostree_repo_read_commit_detached_metadata (self->parent_repo,
|
||||||
|
|
|
||||||
|
|
@ -3917,7 +3917,7 @@ ostree_repo_sign_commit (OstreeRepo *self,
|
||||||
g_autoptr(GVariant) commit_variant = NULL;
|
g_autoptr(GVariant) commit_variant = NULL;
|
||||||
if (!ostree_repo_load_variant (self, OSTREE_OBJECT_TYPE_COMMIT,
|
if (!ostree_repo_load_variant (self, OSTREE_OBJECT_TYPE_COMMIT,
|
||||||
commit_checksum, &commit_variant, error))
|
commit_checksum, &commit_variant, error))
|
||||||
return g_prefix_error (error, "Failed to read commit: "), FALSE;
|
return glnx_prefix_error (error, "Failed to read commit");
|
||||||
|
|
||||||
g_autoptr(GVariant) old_metadata = NULL;
|
g_autoptr(GVariant) old_metadata = NULL;
|
||||||
if (!ostree_repo_read_commit_detached_metadata (self,
|
if (!ostree_repo_read_commit_detached_metadata (self,
|
||||||
|
|
@ -3925,7 +3925,7 @@ ostree_repo_sign_commit (OstreeRepo *self,
|
||||||
&old_metadata,
|
&old_metadata,
|
||||||
cancellable,
|
cancellable,
|
||||||
error))
|
error))
|
||||||
return g_prefix_error (error, "Failed to read detached metadata: "), FALSE;
|
return glnx_prefix_error (error, "Failed to read detached metadata");
|
||||||
|
|
||||||
commit_data = g_variant_get_data_as_bytes (commit_variant);
|
commit_data = g_variant_get_data_as_bytes (commit_variant);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -383,7 +383,7 @@ initable_init (GInitable *initable,
|
||||||
freecon (con);
|
freecon (con);
|
||||||
|
|
||||||
if (!get_policy_checksum (&self->selinux_policy_csum, cancellable, error))
|
if (!get_policy_checksum (&self->selinux_policy_csum, cancellable, error))
|
||||||
return g_prefix_error (error, "While calculating SELinux checksum: "), FALSE;
|
return glnx_prefix_error (error, "While calculating SELinux checksum");
|
||||||
|
|
||||||
self->selinux_policy_name = g_steal_pointer (&policytype);
|
self->selinux_policy_name = g_steal_pointer (&policytype);
|
||||||
self->selinux_policy_root = g_object_ref (etc_selinux_dir);
|
self->selinux_policy_root = g_object_ref (etc_selinux_dir);
|
||||||
|
|
|
||||||
|
|
@ -1306,7 +1306,7 @@ install_deployment_kernel (OstreeSysroot *sysroot,
|
||||||
contents = glnx_file_get_contents_utf8_at (deployment_dfd, "etc/os-release", NULL,
|
contents = glnx_file_get_contents_utf8_at (deployment_dfd, "etc/os-release", NULL,
|
||||||
cancellable, error);
|
cancellable, error);
|
||||||
if (!contents)
|
if (!contents)
|
||||||
return g_prefix_error (error, "Reading /etc/os-release: "), FALSE;
|
return glnx_prefix_error (error, "Reading /etc/os-release");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -1314,7 +1314,7 @@ install_deployment_kernel (OstreeSysroot *sysroot,
|
||||||
contents = glnx_file_get_contents_utf8_at (deployment_dfd, "usr/lib/os-release", NULL,
|
contents = glnx_file_get_contents_utf8_at (deployment_dfd, "usr/lib/os-release", NULL,
|
||||||
cancellable, error);
|
cancellable, error);
|
||||||
if (!contents)
|
if (!contents)
|
||||||
return g_prefix_error (error, "Reading /usr/lib/os-release: "), FALSE;
|
return glnx_prefix_error (error, "Reading /usr/lib/os-release");
|
||||||
}
|
}
|
||||||
|
|
||||||
g_autoptr(GHashTable) osrelease_values = parse_os_release (contents, "\n");
|
g_autoptr(GHashTable) osrelease_values = parse_os_release (contents, "\n");
|
||||||
|
|
|
||||||
|
|
@ -459,7 +459,7 @@ _ostree_sysroot_read_boot_loader_configs (OstreeSysroot *self,
|
||||||
glnx_unref_object OstreeBootconfigParser *config = ostree_bootconfig_parser_new ();
|
glnx_unref_object OstreeBootconfigParser *config = ostree_bootconfig_parser_new ();
|
||||||
|
|
||||||
if (!ostree_bootconfig_parser_parse_at (config, dfd_iter.fd, dent->d_name, cancellable, error))
|
if (!ostree_bootconfig_parser_parse_at (config, dfd_iter.fd, dent->d_name, cancellable, error))
|
||||||
return g_prefix_error (error, "Parsing %s: ", dent->d_name), FALSE;
|
return glnx_prefix_error (error, "Parsing %s", dent->d_name);
|
||||||
|
|
||||||
g_ptr_array_add (ret_loader_configs, g_object_ref (config));
|
g_ptr_array_add (ret_loader_configs, g_object_ref (config));
|
||||||
}
|
}
|
||||||
|
|
@ -533,7 +533,7 @@ parse_origin (OstreeSysroot *self,
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if (!g_key_file_load_from_data (ret_origin, origin_contents, -1, 0, error))
|
if (!g_key_file_load_from_data (ret_origin, origin_contents, -1, 0, error))
|
||||||
return g_prefix_error (error, "Parsing %s: ", origin_path), FALSE;
|
return glnx_prefix_error (error, "Parsing %s", origin_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
ot_transfer_out_value(out_origin, &ret_origin);
|
ot_transfer_out_value(out_origin, &ret_origin);
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,7 @@ ot_admin_builtin_undeploy (int argc, char **argv, GCancellable *cancellable, GEr
|
||||||
ostree_deployment_get_deployserial (target_deployment));
|
ostree_deployment_get_deployserial (target_deployment));
|
||||||
|
|
||||||
if (!ostree_sysroot_cleanup (sysroot, cancellable, error))
|
if (!ostree_sysroot_cleanup (sysroot, cancellable, error))
|
||||||
return g_prefix_error (error, "Performing final cleanup: "), FALSE;
|
return glnx_prefix_error (error, "Performing final cleanup");
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -377,7 +377,7 @@ ostree_ensure_repo_writable (OstreeRepo *repo,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
if (!ostree_repo_is_writable (repo, error))
|
if (!ostree_repo_is_writable (repo, error))
|
||||||
return g_prefix_error (error, "Cannot write to repository: "), FALSE;
|
return glnx_prefix_error (error, "Cannot write to repository");
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -99,7 +99,7 @@ ot_test_setup_sysroot (GCancellable *cancellable,
|
||||||
|
|
||||||
{ g_autoptr(GString) buf = g_string_new ("mutable-deployments");
|
{ g_autoptr(GString) buf = g_string_new ("mutable-deployments");
|
||||||
if (statfs ("/", &stbuf) < 0)
|
if (statfs ("/", &stbuf) < 0)
|
||||||
return glnx_throw_errno (error), NULL;
|
return glnx_null_throw_errno (error);
|
||||||
/* Keep this in sync with the overlayfs bits in libtest.sh */
|
/* Keep this in sync with the overlayfs bits in libtest.sh */
|
||||||
#ifndef OVERLAYFS_SUPER_MAGIC
|
#ifndef OVERLAYFS_SUPER_MAGIC
|
||||||
#define OVERLAYFS_SUPER_MAGIC 0x794c7630
|
#define OVERLAYFS_SUPER_MAGIC 0x794c7630
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue