vendor: update c/{buildah,common,image,storage} to main

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
Paul Holzinger
2025-05-28 14:53:37 +02:00
parent e98e128012
commit b551939be6
123 changed files with 2454 additions and 1568 deletions

View File

@@ -8,10 +8,11 @@ import (
"path/filepath"
"github.com/containers/storage/pkg/unshare"
"github.com/opencontainers/cgroups/devices/config"
"github.com/opencontainers/runc/libcontainer/devices"
)
func DeviceFromPath(device string) ([]devices.Device, error) {
func DeviceFromPath(device string) ([]config.Device, error) {
src, dst, permissions, err := Device(device)
if err != nil {
return nil, err
@@ -25,7 +26,7 @@ func DeviceFromPath(device string) ([]devices.Device, error) {
}
if !srcInfo.IsDir() {
devs := make([]devices.Device, 0, 1)
devs := make([]config.Device, 0, 1)
dev, err := devices.DeviceFromPath(src, permissions)
if err != nil {
return nil, fmt.Errorf("%s is not a valid device: %w", src, err)
@@ -40,10 +41,10 @@ func DeviceFromPath(device string) ([]devices.Device, error) {
if err != nil {
return nil, fmt.Errorf("getting source devices from directory %s: %w", src, err)
}
devs := make([]devices.Device, 0, len(srcDevices))
devs := make([]config.Device, 0, len(srcDevices))
for _, d := range srcDevices {
d.Path = filepath.Join(dst, filepath.Base(d.Path))
d.Permissions = devices.Permissions(permissions)
d.Permissions = config.Permissions(permissions)
devs = append(devs, *d)
}
return devs, nil