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

Buildpack spec: rename distribution to distro #370

Merged
merged 1 commit into from
Jul 28, 2023
Merged
Show file tree
Hide file tree
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
12 changes: 6 additions & 6 deletions buildpack.md
Original file line number Diff line number Diff line change
Expand Up @@ -1060,7 +1060,7 @@ optional = false
os = "<OS name>"
arch = "<architecture>"
variant = "<architecture variant>"
[[targets.distributions]]
[[targets.distros]]
name = "<OS distribution name>"
version = "<OS distribution version>"

Expand Down Expand Up @@ -1108,17 +1108,17 @@ A buildpack descriptor SHOULD specify `targets`.
Each target in `targets`:
- MUST identify a compatible runtime environment:
- `os`, `arch`, and `variant` if provided MUST be valid identifiers as defined in the [OCI Image Specification](https://github.com/opencontainers/image-spec/blob/main/config.md)
- `distributions` if provided MUST describe the OS distributions supported by the buildpack
- For Linux-based images, `distributions.name` and `distributions.versions` SHOULD contain the values specified in `/etc/os-release` (`$ID` and `$VERSION_ID`), as the `os.version` field in an image config may contain combined distribution and version information
- For Windows-based images, `distributions.name` SHOULD be empty; `distributions.versions` SHOULD contain the value of `os.version` in the image config (e.g., `10.0.14393.1066`)
- `distros` if provided MUST describe the OS distributions supported by the buildpack
- For Linux-based images, `distros.name` and `distros.versions` SHOULD contain the values specified in `/etc/os-release` (`$ID` and `$VERSION_ID`), as the `os.version` field in an image config may contain combined distribution and version information
- For Windows-based images, `distros.name` SHOULD be empty; `distros.versions` SHOULD contain the value of `os.version` in the image config (e.g., `10.0.14393.1066`)
- Any field not provided will be interpreted as `<matches any>`

If the `targets` list is empty, tools reading `buildpack.toml` will assume:
- `os = "linux"` and `arch = <matches any>` if `./bin/build` is present
- `os = "windows"` and `arch = <matches any>` if `./bin/build.bat` or `./bin/build.exe` are present

Metadata specified in `[[targets]]` is validated against the runtime and build-time base images.
* A buildpack target satisfies a base image target when `os`, `arch`, and `variant` match and at least one distribution in `distributions` (if provided) matches
* A buildpack target satisfies a base image target when `os`, `arch`, and `variant` match and at least one distribution in `distros` (if provided) matches

#### Order

Expand Down Expand Up @@ -1169,7 +1169,7 @@ Tools reading `buildpack.toml` will translate any section that sets `stacks.id =
[[targets]]
os = "linux"
arch = "amd64"
[[targets.distributions]]
[[targets.distros]]
name = "ubuntu"
version = "18.04"
```
Expand Down
2 changes: 1 addition & 1 deletion image_extension.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ uri = "<uri>"
os = "<OS name>"
arch = "<architecture>"
variant = "<architecture variant>"
[[targets.distributions]]
[[targets.distros]]
name = "<OS distribution name>"
version = "<OS distribution version>"
```
Expand Down