mirror of
https://github.com/containers/podman.git
synced 2025-12-03 11:49:18 +08:00
vendor: update buildah to latest main
Includes one breaking change for the flag as BuildOutputs now accept a slice. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
30
vendor/github.com/containers/buildah/run_linux.go
generated
vendored
30
vendor/github.com/containers/buildah/run_linux.go
generated
vendored
@@ -543,6 +543,33 @@ rootless=%d
|
||||
|
||||
defer b.cleanupTempVolumes()
|
||||
|
||||
// Handle mount flags that request that the source locations for "bind" mountpoints be
|
||||
// relabeled, and filter those flags out of the list of mount options we pass to the
|
||||
// runtime.
|
||||
for i := range spec.Mounts {
|
||||
switch spec.Mounts[i].Type {
|
||||
default:
|
||||
continue
|
||||
case "bind", "rbind":
|
||||
// all good, keep going
|
||||
}
|
||||
zflag := ""
|
||||
for _, opt := range spec.Mounts[i].Options {
|
||||
if opt == "z" || opt == "Z" {
|
||||
zflag = opt
|
||||
}
|
||||
}
|
||||
if zflag == "" {
|
||||
continue
|
||||
}
|
||||
spec.Mounts[i].Options = slices.DeleteFunc(spec.Mounts[i].Options, func(opt string) bool {
|
||||
return opt == "z" || opt == "Z"
|
||||
})
|
||||
if err := relabel(spec.Mounts[i].Source, b.MountLabel, zflag == "z"); err != nil {
|
||||
return fmt.Errorf("setting file label %q on %q: %w", b.MountLabel, spec.Mounts[i].Source, err)
|
||||
}
|
||||
}
|
||||
|
||||
switch isolation {
|
||||
case define.IsolationOCI:
|
||||
var moreCreateArgs []string
|
||||
@@ -1139,16 +1166,19 @@ func (b *Builder) runSetupVolumeMounts(mountLabel string, volumeMounts []string,
|
||||
if err := relabel(host, mountLabel, true); err != nil {
|
||||
return specs.Mount{}, err
|
||||
}
|
||||
options = slices.DeleteFunc(options, func(o string) bool { return o == "z" })
|
||||
}
|
||||
if foundZ {
|
||||
if err := relabel(host, mountLabel, false); err != nil {
|
||||
return specs.Mount{}, err
|
||||
}
|
||||
options = slices.DeleteFunc(options, func(o string) bool { return o == "Z" })
|
||||
}
|
||||
if foundU {
|
||||
if err := chown.ChangeHostPathOwnership(host, true, idMaps.processUID, idMaps.processGID); err != nil {
|
||||
return specs.Mount{}, err
|
||||
}
|
||||
options = slices.DeleteFunc(options, func(o string) bool { return o == "U" })
|
||||
}
|
||||
if foundO {
|
||||
if (upperDir != "" && workDir == "") || (workDir != "" && upperDir == "") {
|
||||
|
||||
Reference in New Issue
Block a user