summaryrefslogtreecommitdiff
path: root/vendor/github.com/fsouza/go-dockerclient/internal/archive/archive_unix.go
diff options
context:
space:
mode:
authorNalin Dahyabhai <nalin@redhat.com>2019-10-24 10:37:22 -0400
committerNalin Dahyabhai <nalin@redhat.com>2019-10-29 13:35:18 -0400
commita4a70b4506ec4abb8b3bbc3873ee5ca015a8ed08 (patch)
tree4e7a50576d4db83450c58054e276f33bbd2cdb3a /vendor/github.com/fsouza/go-dockerclient/internal/archive/archive_unix.go
parent59582c55b798f0a2d086981ca9a8ddd8314fd0c2 (diff)
downloadpodman-a4a70b4506ec4abb8b3bbc3873ee5ca015a8ed08.tar.gz
podman-a4a70b4506ec4abb8b3bbc3873ee5ca015a8ed08.tar.bz2
podman-a4a70b4506ec4abb8b3bbc3873ee5ca015a8ed08.zip
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>
Diffstat (limited to 'vendor/github.com/fsouza/go-dockerclient/internal/archive/archive_unix.go')
-rw-r--r--vendor/github.com/fsouza/go-dockerclient/internal/archive/archive_unix.go77
1 files changed, 0 insertions, 77 deletions
diff --git a/vendor/github.com/fsouza/go-dockerclient/internal/archive/archive_unix.go b/vendor/github.com/fsouza/go-dockerclient/internal/archive/archive_unix.go
deleted file mode 100644
index bb6bf7145..000000000
--- a/vendor/github.com/fsouza/go-dockerclient/internal/archive/archive_unix.go
+++ /dev/null
@@ -1,77 +0,0 @@
-// Copyright 2014 Docker authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the DOCKER-LICENSE file.
-
-// +build !windows
-
-package archive
-
-import (
- "archive/tar"
- "errors"
- "os"
- "path/filepath"
- "syscall"
-
- "github.com/docker/docker/pkg/idtools"
- "golang.org/x/sys/unix"
-)
-
-// CanonicalTarNameForPath returns platform-specific filepath
-// to canonical posix-style path for tar archival. p is relative
-// path.
-func CanonicalTarNameForPath(p string) (string, error) {
- return p, nil // already unix-style
-}
-
-// fixVolumePathPrefix does platform specific processing to ensure that if
-// the path being passed in is not in a volume path format, convert it to one.
-func fixVolumePathPrefix(srcPath string) string {
- return srcPath
-}
-
-// getWalkRoot calculates the root path when performing a TarWithOptions.
-// We use a separate function as this is platform specific. On Linux, we
-// can't use filepath.Join(srcPath,include) because this will clean away
-// a trailing "." or "/" which may be important.
-func getWalkRoot(srcPath string, include string) string {
- return srcPath + string(filepath.Separator) + include
-}
-
-func getInodeFromStat(stat interface{}) (inode uint64, err error) {
- s, ok := stat.(*syscall.Stat_t)
-
- if ok {
- inode = s.Ino
- }
-
- return
-}
-
-func getFileIdentity(stat interface{}) (idtools.Identity, error) {
- s, ok := stat.(*syscall.Stat_t)
-
- if !ok {
- return idtools.Identity{}, errors.New("cannot convert stat value to syscall.Stat_t")
- }
- return idtools.Identity{UID: int(s.Uid), GID: int(s.Gid)}, nil
-}
-
-func chmodTarEntry(perm os.FileMode) os.FileMode {
- return perm // noop for unix as golang APIs provide perm bits correctly
-}
-
-func setHeaderForSpecialDevice(hdr *tar.Header, name string, stat interface{}) (err error) {
- s, ok := stat.(*syscall.Stat_t)
-
- if ok {
- // Currently go does not fill in the major/minors
- if s.Mode&unix.S_IFBLK != 0 ||
- s.Mode&unix.S_IFCHR != 0 {
- hdr.Devmajor = int64(unix.Major(uint64(s.Rdev))) // nolint: unconvert
- hdr.Devminor = int64(unix.Minor(uint64(s.Rdev))) // nolint: unconvert
- }
- }
-
- return
-}