mirror of
https://github.com/containers/podman.git
synced 2025-06-20 00:51:16 +08:00
bump containers/image to v5.0.0, buildah to v1.11.4
Move to containers/image v5 and containers/buildah to v1.11.4. Replace an equality check with a type assertion when checking for a docker.ErrUnauthorizedForCredentials in `podman login`. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
This commit is contained in:
cmd/podman
contrib/perftest
go.modgo.sumlibpod
container.gocontainer_commit.gocontainer_inspect.go
image
options.goruntime.goruntime_img.gostorage.gopkg
adapter
registries
spec
trust
util
varlinkapi
vendor
github.com
containerd
containerd
continuity
containers
buildah
CHANGELOG.mdOWNERSbuildah.gochangelog.txtcommit.gocommon.goconfig.go
docker
go.modgo.sumimage.goimagebuildah
import.gonew.gopkg
pull.goutil.goutil
image
v4/image
v5
LICENSE
copy
directory
docker
archive
cache.godaemon
docker_client.godocker_image.godocker_image_dest.godocker_image_src.godocker_transport.goerrors.golookaside.gopolicyconfiguration
reference
tarfile
wwwauthenticate.goimage
docker_list.godocker_schema1.godocker_schema2.gomanifest.gomemory.gooci.gooci_index.gosourced.gounparsed.go
internal
manifest
oci
archive
internal
layout
openshift
ostree
pkg
blobinfocache
compression
docker/config
strslice
sysregistriesv2
tlsclientconfig
signature
docker.gojson.gomechanism.gomechanism_gpgme.gomechanism_openpgp.gopolicy_config.gopolicy_eval.gopolicy_eval_baselayer.gopolicy_eval_signedby.gopolicy_eval_simple.gopolicy_reference_match.gopolicy_types.gosignature.go
storage
tarball
transports
alltransports
alltransports.godocker_daemon.godocker_daemon_stub.goostree.goostree_stub.gostorage.gostorage_stub.go
stub.gotransports.gotypes
version
docker/docker
NOTICE
api
client
client.gocontainer_list.goevents.gohijack.goimage_list.gonetwork_list.goplugin_list.gorequest.goservice_create.govolume_list.go
errdefs
pkg
archive
README.mdarchive.goarchive_linux.goarchive_other.goarchive_unix.goarchive_windows.gochanges.gochanges_linux.gochanges_other.gochanges_unix.gochanges_windows.gocopy.gocopy_unix.gocopy_windows.godiff.goexample_changes.gotime_linux.gotime_unsupported.gowhiteouts.gowrap.go
homedir
idtools
jsonmessage
namesgenerator
parsers/kernel
pools
system
filesys_unix.gofilesys_windows.gomeminfo_linux.gopath.gostat_linux.gostat_solaris.gosyscall_windows.goutimes_linux.goutimes_unix.go
term
profiles/seccomp
fsouza/go-dockerclient
.gitattributes.gitignore.golangci.yaml.travis.ymlAUTHORSMakefileREADME.mdappveyor.ymlauth.goclient.goclient_windows.gocontainer.godistribution.goevent.goexec.gogo.modgo.sumimage.gomisc.gonetwork.goplugin.goswarm.goswarm_configs.goswarm_node.goswarm_secrets.goswarm_service.goswarm_task.gosystem.gotar.gotls.govolume.go
internal
archive
term
ijc/Gotty
morikuni/aec
openshift/imagebuilder
golang.org/x/sync/errgroup
modules.txt
38
vendor/github.com/containers/buildah/pkg/parse/parse_unix.go
generated
vendored
38
vendor/github.com/containers/buildah/pkg/parse/parse_unix.go
generated
vendored
@ -4,6 +4,8 @@ package parse
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/containers/buildah/pkg/unshare"
|
||||
"github.com/opencontainers/runc/libcontainer/configs"
|
||||
@ -24,18 +26,40 @@ func getDefaultProcessLimits() []string {
|
||||
return defaultLimits
|
||||
}
|
||||
|
||||
func DeviceFromPath(device string) (configs.Device, error) {
|
||||
func DeviceFromPath(device string) ([]configs.Device, error) {
|
||||
var devs []configs.Device
|
||||
src, dst, permissions, err := Device(device)
|
||||
if err != nil {
|
||||
return configs.Device{}, err
|
||||
return nil, err
|
||||
}
|
||||
if unshare.IsRootless() {
|
||||
return configs.Device{}, errors.Errorf("Renaming device %s to %s is not a supported in rootless containers", src, dst)
|
||||
return nil, errors.Errorf("Renaming device %s to %s is not a supported in rootless containers", src, dst)
|
||||
}
|
||||
dev, err := devices.DeviceFromPath(src, permissions)
|
||||
srcInfo, err := os.Stat(src)
|
||||
if err != nil {
|
||||
return configs.Device{}, errors.Wrapf(err, "%s is not a valid device", src)
|
||||
return nil, errors.Wrapf(err, "error getting info of source device %s", src)
|
||||
}
|
||||
dev.Path = dst
|
||||
return *dev, nil
|
||||
|
||||
if !srcInfo.IsDir() {
|
||||
|
||||
dev, err := devices.DeviceFromPath(src, permissions)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "%s is not a valid device", src)
|
||||
}
|
||||
dev.Path = dst
|
||||
devs = append(devs, *dev)
|
||||
return devs, nil
|
||||
}
|
||||
|
||||
// If source device is a directory
|
||||
srcDevices, err := devices.GetDevices(src)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "error getting source devices from directory %s", src)
|
||||
}
|
||||
for _, d := range srcDevices {
|
||||
d.Path = filepath.Join(dst, filepath.Base(d.Path))
|
||||
d.Permissions = permissions
|
||||
devs = append(devs, *d)
|
||||
}
|
||||
return devs, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user