Commit ac5ce03
committed
install/aleph: include the image labels in aleph
Include the container labels in the aleph file, since they often contain
useful information about the image provenance, such as the source
commit the image was build from.
Also we skip serializing the source image reference if it start with
`/tmp` since this is a good signal it was source from a local copy
of an image, e.g. in an osbuild environnement.
Whith this, a build of Fedora CoreOS through osbuild goes from:
```
{
"image": "/tmp/tmpb29j6pi3/image",
"kernel": "6.18.12-200.fc43.x86_64",
"selinux": "disabled",
"timestamp": null,
"version": "43.20260301.20.dev1"
}
```
to
```
{
"digest": "sha256:07bf537cc4e4d208eb0b978f76e5046e55529ce6192b982d8c1a41fa1d61b95a",
"kernel": "6.18.13-200.fc43.x86_64",
"labels": {
"com.coreos.inputhash": "fe9883169714c593d98058606e886b9747710ed15ab1b9cdbd7fa538fb435b3c",
"com.coreos.osname": "fedora-coreos",
"com.coreos.stream": "testing-devel",
"containers.bootc": "1",
"io.buildah.version": "1.42.2",
"org.opencontainers.image.description": "Fedora CoreOS testing-devel",
"org.opencontainers.image.revision": "233fe18749c7d2749581e4307c4cac60967acde4",
"org.opencontainers.image.source": "git@github.com:jbtrystram/fedora-coreos-config.git",
"org.opencontainers.image.title": "Fedora CoreOS testing-devel",
"org.opencontainers.image.version": "43.20260301.20.dev1",
"ostree.bootable": "1",
"ostree.commit": "89635f7cba9de932fc60d71a6bded65ad0db06a35c9d016da03ca7ade9ba4736",
"ostree.final-diffid": "sha256:12787d84fa137cd5649a9005efe98ec9d05ea46245fdc50aecb7dd007f2035b1"
},
"selinux": "disabled",
"target-image": "ostree-image-signed:docker://quay.io/fedora/fedora-coreos:testing-devel",
"timestamp": null,
"version": "43.20260301.20.dev1"
}
```
which is way more useful.
See #2038
Assisted-by: OpenCode(Opus 4.6)1 parent c3c1602 commit ac5ce03
3 files changed
Lines changed: 38 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1209 | 1209 | | |
1210 | 1210 | | |
1211 | 1211 | | |
1212 | | - | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
1213 | 1218 | | |
1214 | 1219 | | |
1215 | 1220 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
1 | 3 | | |
2 | 4 | | |
3 | 5 | | |
| |||
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
20 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
21 | 32 | | |
22 | 33 | | |
23 | 34 | | |
| |||
32 | 43 | | |
33 | 44 | | |
34 | 45 | | |
| 46 | + | |
35 | 47 | | |
36 | 48 | | |
37 | 49 | | |
38 | 50 | | |
39 | | - | |
40 | | - | |
| 51 | + | |
| 52 | + | |
41 | 53 | | |
42 | 54 | | |
43 | 55 | | |
44 | 56 | | |
45 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
46 | 69 | | |
47 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
48 | 74 | | |
49 | 75 | | |
50 | 76 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
535 | 535 | | |
536 | 536 | | |
537 | 537 | | |
| 538 | + | |
| 539 | + | |
538 | 540 | | |
539 | 541 | | |
540 | 542 | | |
| |||
0 commit comments