mirror of
https://github.com/containers/podman.git
synced 2025-12-01 10:38:05 +08:00
vendor: update containers/{buildah,common,image,storage}
The change in healthcheck_run_test.go, depends on the containers/image change: commit b6afa8ca7b324aca8fd5a7b5b206fc05c0c04874 Author: Mikhail Sokolov <msokolov@evolution.com> Date: Fri Mar 15 13:37:44 2024 +0200 Add support for Docker HealthConfig.StartInterval (v25.0.0+) Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
20
vendor/github.com/containers/buildah/pkg/parse/parse.go
generated
vendored
20
vendor/github.com/containers/buildah/pkg/parse/parse.go
generated
vendored
@@ -7,6 +7,7 @@ package parse
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/fs"
|
||||
"net"
|
||||
"os"
|
||||
"path/filepath"
|
||||
@@ -26,6 +27,7 @@ import (
|
||||
"github.com/containers/common/pkg/parse"
|
||||
"github.com/containers/image/v5/docker/reference"
|
||||
"github.com/containers/image/v5/types"
|
||||
"github.com/containers/storage/pkg/fileutils"
|
||||
"github.com/containers/storage/pkg/idtools"
|
||||
"github.com/containers/storage/pkg/unshare"
|
||||
storageTypes "github.com/containers/storage/types"
|
||||
@@ -252,14 +254,14 @@ func parseSecurityOpts(securityOpts []string, commonOpts *define.CommonBuildOpti
|
||||
}
|
||||
|
||||
if commonOpts.SeccompProfilePath == "" {
|
||||
if _, err := os.Stat(SeccompOverridePath); err == nil {
|
||||
if err := fileutils.Exists(SeccompOverridePath); err == nil {
|
||||
commonOpts.SeccompProfilePath = SeccompOverridePath
|
||||
} else {
|
||||
if !errors.Is(err, os.ErrNotExist) {
|
||||
if !errors.Is(err, fs.ErrNotExist) {
|
||||
return err
|
||||
}
|
||||
if _, err := os.Stat(SeccompDefaultPath); err != nil {
|
||||
if !errors.Is(err, os.ErrNotExist) {
|
||||
if err := fileutils.Exists(SeccompDefaultPath); err != nil {
|
||||
if !errors.Is(err, fs.ErrNotExist) {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
@@ -982,7 +984,7 @@ func IDMappingOptionsFromFlagSet(flags *pflag.FlagSet, persistentFlags *pflag.Fl
|
||||
usernsOption.Host = true
|
||||
default:
|
||||
how = strings.TrimPrefix(how, "ns:")
|
||||
if _, err := os.Stat(how); err != nil {
|
||||
if err := fileutils.Exists(how); err != nil {
|
||||
return nil, nil, fmt.Errorf("checking %s namespace: %w", string(specs.UserNamespace), err)
|
||||
}
|
||||
logrus.Debugf("setting %q namespace to %q", string(specs.UserNamespace), how)
|
||||
@@ -1077,7 +1079,7 @@ func NamespaceOptionsFromFlagSet(flags *pflag.FlagSet, findFlagFunc func(name st
|
||||
how = strings.TrimPrefix(how, "ns:")
|
||||
// if not a path we assume it is a comma separated network list, see setupNamespaces() in run_linux.go
|
||||
if filepath.IsAbs(how) || what != string(specs.NetworkNamespace) {
|
||||
if _, err := os.Stat(how); err != nil {
|
||||
if err := fileutils.Exists(how); err != nil {
|
||||
return nil, define.NetworkDefault, fmt.Errorf("checking %s namespace: %w", what, err)
|
||||
}
|
||||
}
|
||||
@@ -1243,7 +1245,7 @@ func Secrets(secrets []string) (map[string]define.Secret, error) {
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("could not parse secrets: %w", err)
|
||||
}
|
||||
_, err = os.Stat(fullPath)
|
||||
err = fileutils.Exists(fullPath)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("could not parse secrets: %w", err)
|
||||
}
|
||||
@@ -1293,10 +1295,10 @@ func ContainerIgnoreFile(contextDir, path string, containerFiles []string) ([]st
|
||||
containerfile = filepath.Join(contextDir, containerfile)
|
||||
}
|
||||
containerfileIgnore := ""
|
||||
if _, err := os.Stat(containerfile + ".containerignore"); err == nil {
|
||||
if err := fileutils.Exists(containerfile + ".containerignore"); err == nil {
|
||||
containerfileIgnore = containerfile + ".containerignore"
|
||||
}
|
||||
if _, err := os.Stat(containerfile + ".dockerignore"); err == nil {
|
||||
if err := fileutils.Exists(containerfile + ".dockerignore"); err == nil {
|
||||
containerfileIgnore = containerfile + ".dockerignore"
|
||||
}
|
||||
if containerfileIgnore != "" {
|
||||
|
||||
7
vendor/github.com/containers/buildah/pkg/parse/parse_unix.go
generated
vendored
7
vendor/github.com/containers/buildah/pkg/parse/parse_unix.go
generated
vendored
@@ -18,6 +18,13 @@ func DeviceFromPath(device string) (define.ContainerDevices, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if linkTarget, err := os.Readlink(src); err == nil {
|
||||
if filepath.IsAbs(linkTarget) {
|
||||
src = linkTarget
|
||||
} else {
|
||||
src = filepath.Join(filepath.Dir(src), linkTarget)
|
||||
}
|
||||
}
|
||||
srcInfo, err := os.Stat(src)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("getting info of source device %s: %w", src, err)
|
||||
|
||||
Reference in New Issue
Block a user