Skip to main content

bootc_lib/
composefs_consts.rs

1/// composefs= parameter in kernel cmdline
2pub const COMPOSEFS_CMDLINE: &str = "composefs";
3
4/// Directory to store transient state, such as staged deployemnts etc
5pub(crate) const COMPOSEFS_TRANSIENT_STATE_DIR: &str = "/run/composefs";
6/// File created in /run/composefs to record a staged-deployment
7pub(crate) const COMPOSEFS_STAGED_DEPLOYMENT_FNAME: &str = "staged-deployment";
8
9/// Absolute path to composefs-backend state directory
10pub(crate) const STATE_DIR_ABS: &str = "/sysroot/state/deploy";
11/// Relative path to composefs-backend state directory. Relative to /sysroot
12pub(crate) const STATE_DIR_RELATIVE: &str = "state/deploy";
13/// Relative path to the shared 'var' directory. Relative to /sysroot
14pub(crate) const SHARED_VAR_PATH: &str = "state/os/default/var";
15
16/// Section in .origin file to store boot related metadata
17pub(crate) const ORIGIN_KEY_BOOT: &str = "boot";
18/// Whether the deployment was booted with BLS or UKI
19pub(crate) const ORIGIN_KEY_BOOT_TYPE: &str = "boot_type";
20/// Key to store the SHA256 sum of vmlinuz + initrd for a deployment
21pub(crate) const ORIGIN_KEY_BOOT_DIGEST: &str = "digest";
22
23/// Section in .origin file to store OCI image metadata
24pub(crate) const ORIGIN_KEY_IMAGE: &str = "image";
25/// Key to store the OCI manifest digest (e.g. "sha256:abc...")
26pub(crate) const ORIGIN_KEY_MANIFEST_DIGEST: &str = "manifest_digest";
27
28/// Filename for `loader/entries`
29pub(crate) const BOOT_LOADER_ENTRIES: &str = "entries";
30/// Filename for staged boot loader entries
31pub(crate) const STAGED_BOOT_LOADER_ENTRIES: &str = "entries.staged";
32
33/// Filename for grub user config
34pub(crate) const USER_CFG: &str = "user.cfg";
35/// Filename for staged grub user config
36pub(crate) const USER_CFG_STAGED: &str = "user.cfg.staged";
37
38/// Path to the config files directory for Type1 boot entries
39/// This is relative to the boot/efi directory
40pub(crate) const TYPE1_ENT_PATH: &str = "loader/entries";
41pub(crate) const TYPE1_ENT_PATH_STAGED: &str = "loader/entries.staged";
42
43pub(crate) const BOOTC_FINALIZE_STAGED_SERVICE: &str = "bootc-finalize-staged.service";
44
45/// The prefix for the directories containing kernel + initrd
46pub(crate) const TYPE1_BOOT_DIR_PREFIX: &str = "bootc_composefs-";
47
48/// The prefix for names of UKI and UKI Addons
49pub(crate) const UKI_NAME_PREFIX: &str = TYPE1_BOOT_DIR_PREFIX;
50
51/// Prefix for OCI tags owned by bootc in the composefs repository.
52///
53/// Tags are created as `localhost/bootc-<manifest_digest>` to act as GC roots
54/// that keep the manifest, config, and layer splitstreams alive. This is
55/// analogous to how ostree uses `ostree/` refs.
56pub(crate) const BOOTC_TAG_PREFIX: &str = "localhost/bootc-";