Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

variants: Document the image-layout options #1896

Merged
merged 1 commit into from
Jan 13, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions variants/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,11 @@ included-packages = [
"my-agent",
]

[package.metadata.build-variant.image-layout]
os-image-size-gib = 8
data-image-size-gib = 20
partition-plan = "unified"

[lib]
path = "lib.rs"

Expand All @@ -175,6 +180,14 @@ This populates the Cargo build graph with all of the RPM packages that need to b
Variants should almost always include the `release` package.
This pulls in the other core packages and includes essential configuration and services.

This variant includes the (optional) `image-layout` section, which allows the user to customize the layout of the image they are building.
`os-image-size-gib` is the size of the "OS" disk image in GiB.
`data-image-size-gib` is the size of the "data" disk image in GiB.
Though we've done so here for sake of demonstration, resizing the "data" disk image isn't necessary as it expands to fill the disk on boot.
`partition-plan` is the strategy used for image partitioning, with the options being "split" (the default) or "unified".
The "split" partition strategy has separate volumes for "OS" and "data", while "unified" has "OS" and "data" on a single volume.
See [the documentation](../tools/buildsys/src/manifest.rs) for the defaults and additional details.

Be sure to include `publish = false` for all packages, as these are not standard crates and should never appear on [crates.io](https://crates.io/).

### build.rs
Expand Down