Skip to content
Snippets Groups Projects
Commit 98c2cb84 authored by Walter Lozano's avatar Walter Lozano
Browse files

Add information about OSTree and settings


Improve the system updates and rollback document with information about
OSTree and how to handle settings.

Signed-off-by: default avatarWalter Lozano <walter.lozano@collabora.com>
parent c4d29e14
No related branches found
No related tags found
1 merge request!153T7253: Improve documentation about upgrades with recommendations
......@@ -778,6 +778,36 @@ image for decompression.
The content of the update file is extracted into the temporary directory
and the signature is checked for the extracted commit tree.
### Settings
As described in
[preferences and persistence]( {{< ref "preferences-and-persistence.md" >}} )
there are different types of settings which should be preserved across updates.
The setting should either be kept intact or updated to reflect new logic of the
application.
When using `OSTree`, most of the file system is read-only. Since system
settings need write support, the `/etc` and `/var` partitions
are configured to be read-write. This also applies to the `/home`
partition, with it being configured as read-write so user data and
settings can be preserved.
During an `OSTree` upgrade, a new commit is applied on the `OSTree` repo,
this provides the new content that will be used for the read-only portions of
the rootfs, but does not modify the read-write parts.
To handle the upgrade of system settings stored in `/etc`, a copy of its
default values are kept in `/usr/etc` which is updated with the new commit.
default values is kept in `/usr/etc` which is updated with the new commit.
Thanks to this information `OSTree` can detect the files that have been changed
and apply a 3-way merge, to update the `/etc`.
This process allows to update settings to new defaults for files that were not
modified and keep intact those that were.
Applications are encouraged to handle settings adaptation to new version
following the guidelines described in [user and user data management]( {{< ref "#user-and-user-data-management" >}} )
and [preference and persistence]( {{< ref preferences-and-persistence.md >}} ).
### Error handling
If for any reason the update process fails to complete, the update will
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment