github.com/kaisenlinux/docker@v0.0.0-20230510090727-ea55db55fac7/debian/patches/cli-dont-duplicate-authconfig.patch (about)

     1  Author: Arnaud Rebillout <arnaud.rebillout@collabora.com>
     2  Bug-Upsteam: https://github.com/docker/cli/issues/2181
     3  Forwarded: not-needed, Debian-specific
     4  Description: Prevent reverse build-deps nomad and gitlab-runner to FTBFS
     5  
     6  ~~~~ gitlab-runner
     7  src/gitlab.com/gitlab-org/gitlab-runner/helpers/docker/auth_config.go:102:22: cannot use config.AuthConfigs (type map[string]"github.com/docker/cli/cli/config/types".AuthConfig] as type map[string]"github.com/docker/docker/api/types".AuthConfig] in argument to addAll 
     8  src/gitlab.com/gitlab-org/gitlab-runner/helpers/docker/auth_config.go:130:2: cannot use newAuths (type map[string]"github.com/docker/cli/cli/config/types".AuthConfig] as type map[string]"github.com/docker/docker/api/types".AuthConfig] in return argument 
     9  src/gitlab.com/gitlab-org/gitlab-runner/helpers/docker/auth_config.go:144:26: cannot use newAuths (type "github.com/docker/cli/cli/config/types".AuthConfig)
    10  ~~~~
    11  
    12  ~~~~ nomad
    13  src/github.com/hashicorp/nomad/drivers/docker/utils.go:118:57: cannot use cfile.AuthConfigs (type map[string]"github.com/docker/cli/cli/config/types".AuthConfig] as type map[string]"github.com/docker/docker/api/types".AuthConfig] in argument to "github.com/docker/docker/registry".ResolveAuthConfig
    14  ~~~~
    15  
    16  Please update this patch when upstream provides a fix.
    17  
    18  Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
    19  
    20  Index: docker/cli/cli/config/types/authconfig.go
    21  ===================================================================
    22  --- docker.orig/cli/cli/config/types/authconfig.go
    23  +++ docker/cli/cli/config/types/authconfig.go
    24  @@ -1,22 +1,7 @@
    25   package types
    26   
    27  -// AuthConfig contains authorization information for connecting to a Registry
    28  -type AuthConfig struct {
    29  -	Username string `json:"username,omitempty"`
    30  -	Password string `json:"password,omitempty"`
    31  -	Auth     string `json:"auth,omitempty"`
    32  +import (
    33  +	"github.com/docker/docker/api/types"
    34  +)
    35   
    36  -	// Email is an optional value associated with the username.
    37  -	// This field is deprecated and will be removed in a later
    38  -	// version of docker.
    39  -	Email string `json:"email,omitempty"`
    40  -
    41  -	ServerAddress string `json:"serveraddress,omitempty"`
    42  -
    43  -	// IdentityToken is used to authenticate the user and get
    44  -	// an access token for the registry.
    45  -	IdentityToken string `json:"identitytoken,omitempty"`
    46  -
    47  -	// RegistryToken is a bearer token to be sent to a registry
    48  -	RegistryToken string `json:"registrytoken,omitempty"`
    49  -}
    50  +type AuthConfig = types.AuthConfig