You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A few changes were made to what was in the RFC when it came to update the spec.
This backports those changes to the RFC to try and prevent user confusion if they use the RFC as a means of learning about targets when implementing.
Specifically, the spec renamed `io.buildpacks.distributions.*` to `io.buildpacks.distros.*`, and similarly renamed the `buildpack.toml` table `[[targets.distributions]]` to `[[targets.distros]]`.
Lastly, `io.buildpacks.id` was renamed to `io.buildpacks.base.id`.
See:
https://github.com/buildpacks/spec/blob/platform/0.13/platform.md#target-data
Signed-off-by: Ed Morley <[email protected]>
Copy file name to clipboardexpand all lines: text/0096-remove-stacks-mixins.md
+26-10
Original file line number
Diff line number
Diff line change
@@ -41,19 +41,19 @@ Instead of a stack ID, runtime and build-time base images must contain the follo
41
41
- OS (e.g., "linux", `$GOOS`), specified as `os` in the base image `config`
42
42
- Architecture (e.g., "arm", `$GOARCH`), specified as `architecture` in the base image `config`
43
43
- Architecture Variant (optional) (e.g., "v6", `$GOARM`), specified as `variant` in the base image `config`
44
-
- Distribution (optional) (e.g., "ubuntu", `$ID`), specified as a label `io.buildpacks.distribution.name`
45
-
- Version (optional) (e.g., "18.04", `$VERSION_ID`), specified as a label `io.buildpacks.distribution.version`
44
+
- Distribution (optional) (e.g., "ubuntu", `$ID`), specified as a label `io.buildpacks.distros.name`
45
+
- Version (optional) (e.g., "18.04", `$VERSION_ID`), specified as a label `io.buildpacks.distros.version`
46
46
47
47
Additionally, the runtime base may contain the following metadata:
48
-
- Target ID (optional) (e.g., "minimal"), specified as a label `io.buildpacks.id`
48
+
- Target ID (optional) (e.g., "minimal"), specified as a label `io.buildpacks.base.id`
49
49
50
50
OS, Architecture, and Architecture Variant must be valid identifiers as defined in the [OCI Image specification](https://github.com/opencontainers/image-spec/blob/main/config.md).
51
51
52
52
Target ID is an identifier specified on the runtime base image that must be provided to buildpacks as `CNB_TARGET_ID` during the build process.
53
53
This allows buildpacks to change their behavior if a run image is selected (e.g., distroless) that has special properties outside of OS, architecture, etc.
54
54
55
55
For Linux-based images, each field should be canonicalized against values specified in `/etc/os-release` (`$ID` and `$VERSION_ID`).
56
-
The `os.version` field in an base image `config` may contain combined distribution and version information, but it is not used by the lifecycle.
56
+
The `os.version` field in a base image `config` may contain combined distribution and version information, but it is not used by the lifecycle.
57
57
58
58
For Windows-based images, Distribution should be empty. Version should be the [suggested value of `os.version`](https://github.com/opencontainers/image-spec/blob/main/config.md#properties) in the OCI spec (e.g., `10.0.14393.1066`).
59
59
@@ -81,15 +81,15 @@ versions = ["18.04", "20.04"]
81
81
[[targets]]
82
82
os = "linux"
83
83
arch = "amd64"
84
-
[[targets.distributions]]
84
+
[[targets.distros]]
85
85
name = "ubuntu"
86
86
versions = ["14.04", "16.04"]
87
87
88
88
[[targets]]
89
89
os = "linux"
90
90
arch = "arm"
91
91
variant = "v6"
92
-
[[targets.distributions]]
92
+
[[targets.distros]]
93
93
name = "ubuntu"
94
94
versions = ["14.04", "16.04"]
95
95
```
@@ -153,11 +153,11 @@ If the newly-specified field values are missing, the lifecycle and pack may used
153
153
```
154
154
config.os = "linux"
155
155
config.architecture = "amd64"
156
-
io.buildpacks.distribution.name = "ubuntu"
157
-
io.buildpacks.distribution.version = "18.04"
156
+
io.buildpacks.base.distros.name = "ubuntu"
157
+
io.buildpacks.base.distros.version = "18.04"
158
158
```
159
159
160
-
Moving forward it's encouraged for buildpack authors to support both `[[stacks]]` and `[[targets]]` sections in `buildpack.toml` for maximum compatibility. In order to ease this process for those using the `io.buildpacks.stacks.bionic`, lifecycle will translate any section that sets this as on of the `stacks`:
160
+
Moving forward it's encouraged for buildpack authors to support both `[[stacks]]` and `[[targets]]` sections in `buildpack.toml` for maximum compatibility. In order to ease this process for those using the `io.buildpacks.stacks.bionic`, lifecycle will translate any section that sets this as one of the `stacks`:
161
161
162
162
```toml
163
163
[[stacks]]
@@ -170,7 +170,7 @@ to
170
170
[[targets]]
171
171
os = "linux"
172
172
arch = "amd64"
173
-
[[targets.distributions]]
173
+
[[targets.distros]]
174
174
name = "ubuntu"
175
175
versions = ["18.04"]
176
176
```
@@ -210,3 +210,19 @@ rename x86_64 -> amd64 in keeping with all other usages of arch. descriptors.
210
210
### Motivation
211
211
212
212
This is how we do it everywhere else, this is the way.
213
+
214
+
## Amended
215
+
### Meta
216
+
[meta-1]: #meta-1
217
+
- Name: Rename Docker labels and `buildpack.toml` table names
Changes were made to the Docker label and `buildpack.toml` table names between when this RFC was written and the changes were made to the spec in [spec#365](https://github.com/buildpacks/spec/pull/365), which have been backported to the RFC. In particular, the `io.buildpacks.distributions.*` Docker labels were renamed to `io.buildpacks.base.distros.*`, and the `buildpack.toml` table `[[targets.distributions]]` to `[[targets.distros]]`.
225
+
226
+
### Motivation
227
+
228
+
To prevent use of the wrong Docker label or `buildpack.toml` table names, if users base their implementations on the RFC rather than reading the spec.
0 commit comments