Bump Buidah to v1.42.0 for Podman v5.7

Vendor Buildah v1.42.0 into Podman for v5.7.0.
This will also drag in:

go.podman.io/common v0.66.0
go.podman.io/image v5.38.0
go.podman.io/storage v1.61.0

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
This commit is contained in:
tomsweeneyredhat
2025-10-22 11:38:57 -04:00
parent 08c670b232
commit c72102d1b2
48 changed files with 367 additions and 903 deletions

View File

@@ -2,6 +2,7 @@ package config
import (
"fmt"
"maps"
"os"
"slices"
"strings"
@@ -136,9 +137,7 @@ func OverrideOCI(oconfig *v1.ImageConfig, overrideChanges []string, overrideConf
if oconfig.Labels == nil {
oconfig.Labels = make(map[string]string)
}
for k, v := range overrideConfig.Labels {
oconfig.Labels[k] = v
}
maps.Copy(oconfig.Labels, overrideConfig.Labels)
}
oconfig.StopSignal = overrideConfig.StopSignal
}
@@ -206,9 +205,7 @@ func OverrideDocker(dconfig *docker.Config, overrideChanges []string, overrideCo
if dconfig.Labels == nil {
dconfig.Labels = make(map[string]string)
}
for k, v := range overrideConfig.Labels {
dconfig.Labels[k] = v
}
maps.Copy(dconfig.Labels, overrideConfig.Labels)
}
dconfig.StopSignal = overrideConfig.StopSignal
dconfig.StopTimeout = overrideConfig.StopTimeout

View File

@@ -543,7 +543,7 @@ func slop(size int64, slop string) int64 {
if slop == "" {
return size * 5 / 4
}
for _, factor := range strings.Split(slop, "+") {
for factor := range strings.SplitSeq(slop, "+") {
factor = strings.TrimSpace(factor)
if factor == "" {
continue

View File

@@ -240,8 +240,8 @@ func GenerateMeasurement(workloadConfig WorkloadConfig, firmwareLibrary string)
scanner := bufio.NewScanner(&stdout)
for scanner.Scan() {
line := scanner.Text()
if strings.HasPrefix(line, prefix+":") {
return strings.TrimSpace(strings.TrimPrefix(line, prefix+":")), nil
if after, ok := strings.CutPrefix(line, prefix+":"); ok {
return strings.TrimSpace(after), nil
}
}
return "", fmt.Errorf("generating measurement: no line starting with %q found in output from krunfw_measurement", prefix+":")

View File

@@ -202,7 +202,7 @@ func Merge(mergeStrategy define.SBOMMergeStrategy, inputOutputSBOM, inputSBOM, o
Dependencies []string `json:"dependencies,omitempty"`
}
type purlDocument struct {
ImageContents purlImageContents `json:"image_contents,omitempty"`
ImageContents purlImageContents `json:"image_contents"`
}
purls := []string{}
seenPurls := make(map[string]struct{})