mirror of
https://github.com/containers/skopeo.git
synced 2025-09-22 02:18:41 +00:00
Update c/image
... to bring in github.com/proglottis/gpgme 0.1.2. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
4
vendor/github.com/containers/image/v5/copy/copy.go
generated
vendored
4
vendor/github.com/containers/image/v5/copy/copy.go
generated
vendored
@@ -305,7 +305,7 @@ func Image(ctx context.Context, policyContext *signature.PolicyContext, destRef,
|
||||
unparsedInstance := image.UnparsedInstance(rawSource, &instanceDigest)
|
||||
|
||||
if copiedManifest, _, _, err = c.copyOneImage(ctx, policyContext, options, unparsedToplevel, unparsedInstance, nil); err != nil {
|
||||
return nil, err
|
||||
return nil, errors.Wrap(err, "copying system image from manifest list")
|
||||
}
|
||||
} else { /* options.ImageListSelection == CopyAllImages or options.ImageListSelection == CopySpecificImages, */
|
||||
// If we were asked to copy multiple images and can't, that's an error.
|
||||
@@ -501,7 +501,7 @@ func (c *copier) copyMultipleImages(ctx context.Context, policyContext *signatur
|
||||
unparsedInstance := image.UnparsedInstance(c.rawSource, &instanceDigest)
|
||||
updatedManifest, updatedManifestType, updatedManifestDigest, err := c.copyOneImage(ctx, policyContext, options, unparsedToplevel, unparsedInstance, &instanceDigest)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return nil, errors.Wrapf(err, "copying image %d/%d from manifest list", instancesCopied+1, imagesToCopy)
|
||||
}
|
||||
instancesCopied++
|
||||
// Record the result of a possible conversion here.
|
||||
|
4
vendor/github.com/containers/image/v5/docker/docker_client.go
generated
vendored
4
vendor/github.com/containers/image/v5/docker/docker_client.go
generated
vendored
@@ -61,8 +61,8 @@ type certPath struct {
|
||||
var (
|
||||
homeCertDir = filepath.FromSlash(".config/containers/certs.d")
|
||||
perHostCertDirs = []certPath{
|
||||
{path: "/etc/containers/certs.d", absolute: true},
|
||||
{path: "/etc/docker/certs.d", absolute: true},
|
||||
{path: etcDir + "/containers/certs.d", absolute: true},
|
||||
{path: etcDir + "/docker/certs.d", absolute: true},
|
||||
}
|
||||
|
||||
defaultUserAgent = "containers/" + version.Version + " (github.com/containers/image)"
|
||||
|
32
vendor/github.com/containers/image/v5/docker/docker_image_src.go
generated
vendored
32
vendor/github.com/containers/image/v5/docker/docker_image_src.go
generated
vendored
@@ -9,6 +9,7 @@ import (
|
||||
"net/http"
|
||||
"net/url"
|
||||
"os"
|
||||
"regexp"
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
@@ -343,12 +344,16 @@ func handle206Response(streams chan io.ReadCloser, errs chan error, body io.Read
|
||||
buffered := makeBufferedNetworkReader(body, 64, 16384)
|
||||
defer buffered.Close()
|
||||
mr := multipart.NewReader(buffered, boundary)
|
||||
parts := 0
|
||||
for {
|
||||
p, err := mr.NextPart()
|
||||
if err != nil {
|
||||
if err != io.EOF {
|
||||
errs <- err
|
||||
}
|
||||
if parts != len(chunks) {
|
||||
errs <- errors.Errorf("invalid number of chunks returned by the server")
|
||||
}
|
||||
return
|
||||
}
|
||||
s := signalCloseReader{
|
||||
@@ -359,9 +364,34 @@ func handle206Response(streams chan io.ReadCloser, errs chan error, body io.Read
|
||||
// NextPart() cannot be called while the current part
|
||||
// is being read, so wait until it is closed
|
||||
<-s.closed
|
||||
parts++
|
||||
}
|
||||
}
|
||||
|
||||
var multipartByteRangesRe = regexp.MustCompile("multipart/byteranges; boundary=([A-Za-z-0-9:]+)")
|
||||
|
||||
func parseMediaType(contentType string) (string, map[string]string, error) {
|
||||
mediaType, params, err := mime.ParseMediaType(contentType)
|
||||
if err != nil {
|
||||
if err == mime.ErrInvalidMediaParameter {
|
||||
// CloudFront returns an invalid MIME type, that contains an unquoted ":" in the boundary
|
||||
// param, let's handle it here.
|
||||
matches := multipartByteRangesRe.FindStringSubmatch(contentType)
|
||||
if len(matches) == 2 {
|
||||
mediaType = "multipart/byteranges"
|
||||
params = map[string]string{
|
||||
"boundary": matches[1],
|
||||
}
|
||||
err = nil
|
||||
}
|
||||
}
|
||||
if err != nil {
|
||||
return "", nil, err
|
||||
}
|
||||
}
|
||||
return mediaType, params, err
|
||||
}
|
||||
|
||||
// GetBlobAt returns a sequential channel of readers that contain data for the requested
|
||||
// blob chunks, and a channel that might get a single error value.
|
||||
// The specified chunks must be not overlapping and sorted by their offset.
|
||||
@@ -397,7 +427,7 @@ func (s *dockerImageSource) GetBlobAt(ctx context.Context, info types.BlobInfo,
|
||||
go splitHTTP200ResponseToPartial(streams, errs, res.Body, chunks)
|
||||
return streams, errs, nil
|
||||
case http.StatusPartialContent:
|
||||
mediaType, params, err := mime.ParseMediaType(res.Header.Get("Content-Type"))
|
||||
mediaType, params, err := parseMediaType(res.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
2
vendor/github.com/containers/image/v5/docker/lookaside.go
generated
vendored
2
vendor/github.com/containers/image/v5/docker/lookaside.go
generated
vendored
@@ -25,7 +25,7 @@ var systemRegistriesDirPath = builtinRegistriesDirPath
|
||||
|
||||
// builtinRegistriesDirPath is the path to registries.d.
|
||||
// DO NOT change this, instead see systemRegistriesDirPath above.
|
||||
const builtinRegistriesDirPath = "/etc/containers/registries.d"
|
||||
const builtinRegistriesDirPath = etcDir + "/containers/registries.d"
|
||||
|
||||
// userRegistriesDirPath is the path to the per user registries.d.
|
||||
var userRegistriesDir = filepath.FromSlash(".config/containers/registries.d")
|
||||
|
6
vendor/github.com/containers/image/v5/docker/paths_common.go
generated
vendored
Normal file
6
vendor/github.com/containers/image/v5/docker/paths_common.go
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
//go:build !freebsd
|
||||
// +build !freebsd
|
||||
|
||||
package docker
|
||||
|
||||
const etcDir = "/etc"
|
6
vendor/github.com/containers/image/v5/docker/paths_freebsd.go
generated
vendored
Normal file
6
vendor/github.com/containers/image/v5/docker/paths_freebsd.go
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
//go:build freebsd
|
||||
// +build freebsd
|
||||
|
||||
package docker
|
||||
|
||||
const etcDir = "/usr/local/etc"
|
2
vendor/github.com/containers/image/v5/image/docker_list.go
generated
vendored
2
vendor/github.com/containers/image/v5/image/docker_list.go
generated
vendored
@@ -19,7 +19,7 @@ func manifestSchema2FromManifestList(ctx context.Context, sys *types.SystemConte
|
||||
}
|
||||
manblob, mt, err := src.GetManifest(ctx, &targetManifestDigest)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "loading manifest for target platform")
|
||||
return nil, errors.Wrapf(err, "fetching target platform image selected from manifest list")
|
||||
}
|
||||
|
||||
matches, err := manifest.MatchesDigest(manblob, targetManifestDigest)
|
||||
|
2
vendor/github.com/containers/image/v5/image/oci_index.go
generated
vendored
2
vendor/github.com/containers/image/v5/image/oci_index.go
generated
vendored
@@ -19,7 +19,7 @@ func manifestOCI1FromImageIndex(ctx context.Context, sys *types.SystemContext, s
|
||||
}
|
||||
manblob, mt, err := src.GetManifest(ctx, &targetManifestDigest)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "loading manifest for target platform")
|
||||
return nil, errors.Wrapf(err, "fetching target platform image selected from image index")
|
||||
}
|
||||
|
||||
matches, err := manifest.MatchesDigest(manblob, targetManifestDigest)
|
||||
|
12
vendor/github.com/containers/image/v5/pkg/sysregistriesv2/paths_common.go
generated
vendored
Normal file
12
vendor/github.com/containers/image/v5/pkg/sysregistriesv2/paths_common.go
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
//go:build !freebsd
|
||||
// +build !freebsd
|
||||
|
||||
package sysregistriesv2
|
||||
|
||||
// builtinRegistriesConfPath is the path to the registry configuration file.
|
||||
// DO NOT change this, instead see systemRegistriesConfPath above.
|
||||
const builtinRegistriesConfPath = "/etc/containers/registries.conf"
|
||||
|
||||
// builtinRegistriesConfDirPath is the path to the registry configuration directory.
|
||||
// DO NOT change this, instead see systemRegistriesConfDirectoryPath above.
|
||||
const builtinRegistriesConfDirPath = "/etc/containers/registries.conf.d"
|
12
vendor/github.com/containers/image/v5/pkg/sysregistriesv2/paths_freebsd.go
generated
vendored
Normal file
12
vendor/github.com/containers/image/v5/pkg/sysregistriesv2/paths_freebsd.go
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
//go:build freebsd
|
||||
// +build freebsd
|
||||
|
||||
package sysregistriesv2
|
||||
|
||||
// builtinRegistriesConfPath is the path to the registry configuration file.
|
||||
// DO NOT change this, instead see systemRegistriesConfPath above.
|
||||
const builtinRegistriesConfPath = "/usr/local/etc/containers/registries.conf"
|
||||
|
||||
// builtinRegistriesConfDirPath is the path to the registry configuration directory.
|
||||
// DO NOT change this, instead see systemRegistriesConfDirectoryPath above.
|
||||
const builtinRegistriesConfDirPath = "/usr/local/etc/containers/registries.conf.d"
|
8
vendor/github.com/containers/image/v5/pkg/sysregistriesv2/system_registries_v2.go
generated
vendored
8
vendor/github.com/containers/image/v5/pkg/sysregistriesv2/system_registries_v2.go
generated
vendored
@@ -25,20 +25,12 @@ import (
|
||||
// -ldflags '-X github.com/containers/image/v5/sysregistries.systemRegistriesConfPath=$your_path'
|
||||
var systemRegistriesConfPath = builtinRegistriesConfPath
|
||||
|
||||
// builtinRegistriesConfPath is the path to the registry configuration file.
|
||||
// DO NOT change this, instead see systemRegistriesConfPath above.
|
||||
const builtinRegistriesConfPath = "/etc/containers/registries.conf"
|
||||
|
||||
// systemRegistriesConfDirPath is the path to the system-wide registry
|
||||
// configuration directory and is used to add/subtract potential registries for
|
||||
// obtaining images. You can override this at build time with
|
||||
// -ldflags '-X github.com/containers/image/v5/sysregistries.systemRegistriesConfDirectoryPath=$your_path'
|
||||
var systemRegistriesConfDirPath = builtinRegistriesConfDirPath
|
||||
|
||||
// builtinRegistriesConfDirPath is the path to the registry configuration directory.
|
||||
// DO NOT change this, instead see systemRegistriesConfDirectoryPath above.
|
||||
const builtinRegistriesConfDirPath = "/etc/containers/registries.conf.d"
|
||||
|
||||
// AuthenticationFileHelper is a special key for credential helpers indicating
|
||||
// the usage of consulting containers-auth.json files instead of a credential
|
||||
// helper.
|
||||
|
4
vendor/github.com/containers/image/v5/signature/policy_config.go
generated
vendored
4
vendor/github.com/containers/image/v5/signature/policy_config.go
generated
vendored
@@ -32,10 +32,6 @@ import (
|
||||
// -ldflags '-X github.com/containers/image/v5/signature.systemDefaultPolicyPath=$your_path'
|
||||
var systemDefaultPolicyPath = builtinDefaultPolicyPath
|
||||
|
||||
// builtinDefaultPolicyPath is the policy path used for DefaultPolicy().
|
||||
// DO NOT change this, instead see systemDefaultPolicyPath above.
|
||||
const builtinDefaultPolicyPath = "/etc/containers/policy.json"
|
||||
|
||||
// userPolicyFile is the path to the per user policy path.
|
||||
var userPolicyFile = filepath.FromSlash(".config/containers/policy.json")
|
||||
|
||||
|
8
vendor/github.com/containers/image/v5/signature/policy_paths_common.go
generated
vendored
Normal file
8
vendor/github.com/containers/image/v5/signature/policy_paths_common.go
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
//go:build !freebsd
|
||||
// +build !freebsd
|
||||
|
||||
package signature
|
||||
|
||||
// builtinDefaultPolicyPath is the policy path used for DefaultPolicy().
|
||||
// DO NOT change this, instead see systemDefaultPolicyPath above.
|
||||
const builtinDefaultPolicyPath = "/etc/containers/policy.json"
|
8
vendor/github.com/containers/image/v5/signature/policy_paths_freebsd.go
generated
vendored
Normal file
8
vendor/github.com/containers/image/v5/signature/policy_paths_freebsd.go
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
//go:build freebsd
|
||||
// +build freebsd
|
||||
|
||||
package signature
|
||||
|
||||
// builtinDefaultPolicyPath is the policy path used for DefaultPolicy().
|
||||
// DO NOT change this, instead see systemDefaultPolicyPath above.
|
||||
const builtinDefaultPolicyPath = "/usr/local/etc/containers/policy.json"
|
4
vendor/github.com/containers/image/v5/version/version.go
generated
vendored
4
vendor/github.com/containers/image/v5/version/version.go
generated
vendored
@@ -8,10 +8,10 @@ const (
|
||||
// VersionMinor is for functionality in a backwards-compatible manner
|
||||
VersionMinor = 21
|
||||
// VersionPatch is for backwards-compatible bug fixes
|
||||
VersionPatch = 1
|
||||
VersionPatch = 2
|
||||
|
||||
// VersionDev indicates development branch. Releases will be empty string.
|
||||
VersionDev = ""
|
||||
VersionDev = "-dev"
|
||||
)
|
||||
|
||||
// Version is the specification version that the package types support.
|
||||
|
1
vendor/github.com/proglottis/gpgme/gpgme.go
generated
vendored
1
vendor/github.com/proglottis/gpgme/gpgme.go
generated
vendored
@@ -1,6 +1,7 @@
|
||||
// Package gpgme provides a Go wrapper for the GPGME library
|
||||
package gpgme
|
||||
|
||||
// #cgo pkg-config: gpgme
|
||||
// #cgo LDFLAGS: -lgpgme -lassuan -lgpg-error
|
||||
// #cgo CPPFLAGS: -D_FILE_OFFSET_BITS=64
|
||||
// #include <stdlib.h>
|
||||
|
Reference in New Issue
Block a user