ostree/man
Alexander Larsson f617a341f3 Support transient /etc
If the `prepare-root.conf` file contains:
```
[etc]
transient=yes
```

Then during prepare-root, an overlayfs is mounted as /etc, with the
upper dir being in /run. If composefs is used, the lower dir is
`usr/etc` from the composefs image , or it is the deployed
`$deploydir/usr/etc`.

Note that for this to work with selinux, the commit must have been
built with OSTREE_REPO_COMMIT_MODIFIER_FLAGS_USRETC_AS_ETC. Otherwise
the lowerdir (/usr/etc) will have the wrong selinux contexts for the
final location of the mount (/etc).

We also set the transient-etc key in the ostree-booted file, pointing it
to the directory that is used for the overlayfs.

There are some additional work happening in ostree-remount, mostly
related to selinux (as this needs to happen post selinux policy
load):

 * Recent versions of selinux-poliy have issues with the overlayfs
   mount being kernel_t, and that is not allowed to manage files as
   needed. This is fixed in
   https://github.com/fedora-selinux/selinux-policy/pull/1893

 * Any /etc files created in the initramfs will not be labeled,
   because the selinux policy has not been loaded. In addition, the
   upper dir is on a tmpfs, and any manually set xattr-based selinux
   labels on those are reset during policy load. To work around this
   ostree-remount will relabel all files on /etc that have
   corresponding files in overlayfs upper dir.

 * During early boot, systemd mounts /run/machine-id on top of
   /etc/machine-id (as /etc is readonly). Later during boot, when etc
   is readwrite, systemd-machine-id-commit.service will remove the
   mount and update the real file under it with the right content. To
   ensure that this keeps working, we need to ensure that when we
   relabel /etc/machine-id we relabel the real (covered) file, not the
   temporary bind-mount.

 * ostree-remount no longer needs to remount /etc read-only in the
   transient-etc case.

Signed-off-by: Alexander Larsson <alexl@redhat.com>
2023-10-12 17:03:22 +02:00
..
html.xsl man: Use custom XSL stylesheet for HTML output 2022-04-08 19:25:32 -06:00
index.xml More fully drop trivial-httpd entrypoint 2023-08-03 15:10:11 -04:00
ostree-admin-cleanup.xml Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-admin-config-diff.xml Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-admin-deploy.xml admin-deploy: Add --stateroot as alias for --os 2023-08-17 16:49:09 -04:00
ostree-admin-init-fs.xml Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-admin-instutil.xml man: Fix ostree-admin-instutil subcommands 2022-05-19 18:48:17 -05:00
ostree-admin-os-init.xml Add ostree admin stateroot-init as alias for os-init 2023-08-17 16:46:02 -04:00
ostree-admin-pin.xml Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-admin-set-default.xml Add admin set-default 2023-08-03 15:09:57 -04:00
ostree-admin-set-origin.xml Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-admin-stateroot-init.xml Add ostree admin stateroot-init as alias for os-init 2023-08-17 16:46:02 -04:00
ostree-admin-status.xml Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-admin-switch.xml man: Fix typo in ostree-admin-switch 2022-02-12 18:48:35 +01:00
ostree-admin-undeploy.xml Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-admin-unlock.xml Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-admin-upgrade.xml Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-admin.xml Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-cat.xml Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-checkout.xml Support overlayfs whiteouts on checkout 2022-09-28 12:26:31 +02:00
ostree-checksum.xml Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-commit.xml repo: Add an option to label /usr/etc as /etc 2023-10-11 13:25:08 -04:00
ostree-config.xml Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-create-usb.xml Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-diff.xml Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-export.xml Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-find-remotes.xml bin: Cleanup documentation of --cache-dir option 2023-02-07 22:59:20 -07:00
ostree-fsck.xml Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-gpg-sign.xml Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-init.xml Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-log.xml Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-ls.xml Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-prepare-root.xml Support transient /etc 2023-10-12 17:03:22 +02:00
ostree-prune.xml man/prune, bash: Add --commit-only flag for ostree prune 2022-02-25 18:32:25 -05:00
ostree-pull-local.xml Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-pull.xml bin: Cleanup documentation of --cache-dir option 2023-02-07 22:59:20 -07:00
ostree-refs.xml bin/refs: Add option to print revisions 2023-02-07 22:59:30 -07:00
ostree-remote.xml bin/remote-refs: Add option to print revisions 2023-02-07 22:59:30 -07:00
ostree-reset.xml Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-rev-parse.xml cli/rev-parse: Add --single option 2022-08-18 11:08:17 -04:00
ostree-show.xml bin/show: Add options to list metadata keys 2023-02-07 22:59:30 -07:00
ostree-sign.xml Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-static-delta.xml Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-summary.xml lib/repo: Add commit version metadata to summary metadata 2022-02-04 14:28:11 -07:00
ostree.repo-config.xml repo: Bump lock timeout to 5 minutes 2023-08-17 08:28:16 -04:00
ostree.repo.xml Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree.xml More fully drop trivial-httpd entrypoint 2023-08-03 15:10:11 -04:00
rofiles-fuse.xml Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00