Commit eda1ac7
committed
validate: With --host-specific, compare config platform vs. runtime
This is a bit aggressive. For example, maybe a Linux kernel was
compiled with CONFIG_64BIT, CONFIG_X86, and CONFIG_X86_X32. Your
ocitools build may be 386 and validating an amd64 image (or vice
versa) and both would run fine. I'm not sure x32 is supported by Go,
but you could have and x32 container if somebody submits it to the OCI
specs as an extention arch. So I'd rather have an arch mismatch be a
warning than a fatal error.
But in most cases, you'll want the arch to match (e.g. no arm configs
if ocitools is amd64), so I don't want to ignore the missmatch
completely. In the absence of warning-support, an overly strict check
seems safer than an overly lax check, because the caller can always
read the error messages and decide if they care ;).
Signed-off-by: W. Trevor King <wking@tremily.us>1 parent ea1d5dd commit eda1ac7
1 file changed
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
170 | 171 | | |
171 | 172 | | |
172 | 173 | | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
173 | 184 | | |
174 | 185 | | |
175 | 186 | | |
| |||
0 commit comments