ostree/tests/kolainst
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
..
data-shared Support overlayfs whiteouts on checkout 2022-09-28 12:26:31 +02:00
destructive Add concept of state overlays 2024-01-09 23:20:41 -05:00
nondestructive tests: Drop bare-user on tmpfs negative test 2023-12-03 09:32:36 -05:00
.gitignore tests/inst: Add destructive test framework 2020-08-17 14:34:04 +00:00
destructive-stamp.ign tests/inst: Add destructive test framework 2020-08-17 14:34:04 +00:00
install-wrappers.sh tests/inst: Add destructive test framework 2020-08-17 14:34:04 +00:00
Makefile tests/kolainst: Add make localinstall 2023-04-14 15:19:17 -04:00
README.md tests/kola: Move to tests/kolainst 2020-05-27 15:16:50 +00:00