summaryrefslogtreecommitdiff
path: root/src/libostree/ostree-sysroot.h
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2018-02-22 15:27:59 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2018-04-12 14:55:12 +0000
commiteb506c759c666af2461f1ba3dda4e31ea49ebc41 (patch)
treeec78dcc19982e3b14545ad2b22902a85c9a7e4ef /src/libostree/ostree-sysroot.h
parentff50495f67a95c9b2fef5f9b84bc91469a46eb27 (diff)
downloadostree-eb506c759c666af2461f1ba3dda4e31ea49ebc41.tar.gz
Add concept of "staged" deployment
Add API to write a deployment state to `/run/ostree/staged-deployment`, along with a systemd service which runs at shutdown time. This is a big change to the ostree model for hosts, but it closes a longstanding set of bugs; many, many people have hit the "losing changes in /etc" problem. It also avoids the other problem of racing with programs that modify `/etc` such as LVM backups: https://bugzilla.redhat.com/show_bug.cgi?id=1365297 We need this in particular to go to a full-on model for automatically updated host systems where (like a dual-partition model) everything is fully prepared and the reboot can be taken asynchronously. Closes: https://github.com/ostreedev/ostree/issues/545 Closes: #1503 Approved by: jlebon
Diffstat (limited to 'src/libostree/ostree-sysroot.h')
-rw-r--r--src/libostree/ostree-sysroot.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/libostree/ostree-sysroot.h b/src/libostree/ostree-sysroot.h
index e4763d37..47cbb022 100644
--- a/src/libostree/ostree-sysroot.h
+++ b/src/libostree/ostree-sysroot.h
@@ -74,6 +74,8 @@ _OSTREE_PUBLIC
GPtrArray *ostree_sysroot_get_deployments (OstreeSysroot *self);
_OSTREE_PUBLIC
OstreeDeployment *ostree_sysroot_get_booted_deployment (OstreeSysroot *self);
+_OSTREE_PUBLIC
+OstreeDeployment *ostree_sysroot_get_staged_deployment (OstreeSysroot *self);
_OSTREE_PUBLIC
GFile *ostree_sysroot_get_deployment_directory (OstreeSysroot *self,
@@ -175,6 +177,17 @@ gboolean ostree_sysroot_deploy_tree (OstreeSysroot *self,
GError **error);
_OSTREE_PUBLIC
+gboolean ostree_sysroot_stage_tree (OstreeSysroot *self,
+ const char *osname,
+ const char *revision,
+ GKeyFile *origin,
+ OstreeDeployment *merge_deployment,
+ char **override_kernel_argv,
+ OstreeDeployment **out_new_deployment,
+ GCancellable *cancellable,
+ GError **error);
+
+_OSTREE_PUBLIC
gboolean ostree_sysroot_deployment_set_mutable (OstreeSysroot *self,
OstreeDeployment *deployment,
gboolean is_mutable,