Skip to content

composefs deployment path discovery #2513

Description

@jmpolom

An installer wrapping bootc install to-filesystem --composefs-backend may need to write machine-specific configuration into the installed deployment's /etc before the first boot. This is an ordinary and extremely common installer function that many would consider bare minimum functionality. For composefs, the /etc path is generally of the form <target>/state/deploy/<deployment-id>/etc. Bootc computes the deployment ID and creates this directory, but does not provide a method to obtain the ID or path after installation. I believe deployment-id is synonymous with "composefs digest" here.

My installer currently finds the directory by assuming that <target>/state/deploy contains exactly one deployment. That works for a fresh installation in a clean directory tree, but that's a naive assumption. Determining the digest via a boot entry is not a viable substitute: pre-existing entries and bootloader defaults can affect which entry is primary, and the running system cannot identify a new deployment that has not booted yet. The OCI image digest is also not the composefs deployment ID.

Bootc needs a simple feature (read: not something that requires the overhead of an IPC API) to provide the deployment ID or absolute deployment path created by that specific install invocation in a stable, parseable format that a wrapping installer can capture. This would let the installer configure the right /etc without relying on assumptions and inferences (directory counts, log parsing, or bootloader ordering). The analogous ostree workflow can query the deployment path with ostree admin --sysroot=<target> --print-current-dir.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions