ostree/tests/kolainst/destructive
Jonathan Lebon 92b1a27202 Add concept of state overlays
In the OSTree model, executables go in `/usr`, state in `/var` and
configuration in `/etc`. Software that lives in `/opt` however messes
this up because it often mixes code *and* state, making it harder to
manage.

More generally, it's sometimes useful to have the OSTree commit contain
code under a certain path, but still allow that path to be writable by
software and the sysadmin at runtime (`/usr/local` is another instance).

Add the concept of state overlays. A state overlay is an overlayfs
mount whose upper directory, which contains unmanaged state, is carried
forward on top of a lower directory, containing OSTree-managed files.

In the example of `/usr/local`, OSTree commits can ship content there,
all while allowing users to e.g. add scripts in `/usr/local/bin` when
booted into that commit.

Some reconciliation logic is executed whenever the base is updated so
that newer files in the base are never shadowed by a copied up version
in the upper directory. This matches RPM semantics when upgrading
packages whose files may have been modified.

For ease of integration, this is exposed as a systemd template unit which
any downstream distro/user can enable. The instance name is the mountpath
in escaped systemd path notation (e.g.
`ostree-state-overlay@usr-local.service`).

See discussions in https://github.com/ostreedev/ostree/issues/3113 for
more details.
2024-01-09 23:20:41 -05:00
..
auto-prune.sh lib/deploy: Round to block size in early prune space check 2024-01-04 12:57:43 -05:00
basic-misc.sh main: Also support CLI extensions in /usr/libexec/libostree/ext 2022-01-11 20:13:33 -05:00
boot-automount.sh tests: Work around systemd regression for boot id parsing 2023-11-09 15:10:33 -05:00
data tests/kolainst: Avoid recursive symlinks 2022-01-25 16:44:39 -05:00
deployment-lint deploy: Warn if we find content in the deployment's /var 2021-06-10 07:33:17 -04:00
finalization.sh tests: Add a dedicated finalization test 2023-11-28 18:45:11 -05:00
itest-bare-root.sh tests/kola: Move to tests/kolainst 2020-05-27 15:16:50 +00:00
itest-deploy-selinux.sh tests/kola: Move to tests/kolainst 2020-05-27 15:16:50 +00:00
itest-label-selinux.sh commit: Try reflinks for local commits by default 2023-12-04 20:45:08 -05:00
kargs-edit-in-place.sh Fix ostree admin kargs edit-in-place assertion when deployments 2022-08-29 11:31:32 +08:00
overlay-initrds.sh lib/deploy: Add support for overlay initrds 2020-09-30 13:29:32 -04:00
staged-delay.sh tests: Work around systemd regression for boot id parsing 2023-11-09 15:10:33 -05:00
staged-deploy.sh sysroot: Stabilize deployment finalization, add API and CLI 2023-11-27 10:59:56 -05:00
state-overlay.sh Add concept of state overlays 2024-01-09 23:20:41 -05:00
unlock-transient.sh unlock: Don't pass options again to overlayfs 2023-11-09 20:53:52 -05:00
var-mount.sh tests/var-mount: tweak test setup 2021-10-19 08:03:09 +00:00
var-tmpfiles.sh tmpfiles: Copy /usr/share/factory/var to /var 2023-11-30 18:11:33 -05:00