This reverts commit d5cd032a86617249eadd7142227c5355ba9164b4.
Commit caused issues on systems with case-insensitive filesystems.
Revert for now
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
| ... | ... |
@@ -15,9 +15,9 @@ import ( |
| 15 | 15 |
|
| 16 | 16 |
"github.com/Sirupsen/logrus" |
| 17 | 17 |
"github.com/docker/docker/api" |
| 18 |
+ "github.com/docker/docker/autogen/dockerversion" |
|
| 18 | 19 |
"github.com/docker/docker/pkg/stdcopy" |
| 19 | 20 |
"github.com/docker/docker/pkg/term" |
| 20 |
- "github.com/docker/docker/version" |
|
| 21 | 21 |
) |
| 22 | 22 |
|
| 23 | 23 |
type tlsClientCon struct {
|
| ... | ... |
@@ -152,7 +152,7 @@ func (cli *DockerCli) hijackWithContentType(method, path, contentType string, se |
| 152 | 152 |
req.Header.Set(k, v) |
| 153 | 153 |
} |
| 154 | 154 |
|
| 155 |
- req.Header.Set("User-Agent", "Docker-Client/"+version.VERSION+" ("+runtime.GOOS+")")
|
|
| 155 |
+ req.Header.Set("User-Agent", "Docker-Client/"+dockerversion.VERSION+" ("+runtime.GOOS+")")
|
|
| 156 | 156 |
req.Header.Set("Content-Type", contentType)
|
| 157 | 157 |
req.Header.Set("Connection", "Upgrade")
|
| 158 | 158 |
req.Header.Set("Upgrade", "tcp")
|
| ... | ... |
@@ -20,6 +20,7 @@ import ( |
| 20 | 20 |
"github.com/Sirupsen/logrus" |
| 21 | 21 |
"github.com/docker/docker/api" |
| 22 | 22 |
"github.com/docker/docker/api/types" |
| 23 |
+ "github.com/docker/docker/autogen/dockerversion" |
|
| 23 | 24 |
"github.com/docker/docker/cliconfig" |
| 24 | 25 |
"github.com/docker/docker/pkg/jsonmessage" |
| 25 | 26 |
"github.com/docker/docker/pkg/signal" |
| ... | ... |
@@ -27,7 +28,6 @@ import ( |
| 27 | 27 |
"github.com/docker/docker/pkg/term" |
| 28 | 28 |
"github.com/docker/docker/registry" |
| 29 | 29 |
"github.com/docker/docker/utils" |
| 30 |
- "github.com/docker/docker/version" |
|
| 31 | 30 |
) |
| 32 | 31 |
|
| 33 | 32 |
var ( |
| ... | ... |
@@ -77,7 +77,7 @@ func (cli *DockerCli) clientRequest(method, path string, in io.Reader, headers m |
| 77 | 77 |
req.Header.Set(k, v) |
| 78 | 78 |
} |
| 79 | 79 |
|
| 80 |
- req.Header.Set("User-Agent", "Docker-Client/"+version.VERSION+" ("+runtime.GOOS+")")
|
|
| 80 |
+ req.Header.Set("User-Agent", "Docker-Client/"+dockerversion.VERSION+" ("+runtime.GOOS+")")
|
|
| 81 | 81 |
req.URL.Host = cli.addr |
| 82 | 82 |
req.URL.Scheme = cli.scheme |
| 83 | 83 |
|
| ... | ... |
@@ -7,10 +7,10 @@ import ( |
| 7 | 7 |
|
| 8 | 8 |
"github.com/docker/docker/api" |
| 9 | 9 |
"github.com/docker/docker/api/types" |
| 10 |
+ "github.com/docker/docker/autogen/dockerversion" |
|
| 10 | 11 |
Cli "github.com/docker/docker/cli" |
| 11 | 12 |
flag "github.com/docker/docker/pkg/mflag" |
| 12 | 13 |
"github.com/docker/docker/utils" |
| 13 |
- "github.com/docker/docker/version" |
|
| 14 | 14 |
) |
| 15 | 15 |
|
| 16 | 16 |
var versionTemplate = `Client: |
| ... | ... |
@@ -60,11 +60,11 @@ func (cli *DockerCli) CmdVersion(args ...string) (err error) {
|
| 60 | 60 |
|
| 61 | 61 |
vd := versionData{
|
| 62 | 62 |
Client: types.Version{
|
| 63 |
- Version: version.VERSION, |
|
| 63 |
+ Version: dockerversion.VERSION, |
|
| 64 | 64 |
APIVersion: api.Version, |
| 65 | 65 |
GoVersion: runtime.Version(), |
| 66 |
- GitCommit: version.GITCOMMIT, |
|
| 67 |
- BuildTime: version.BUILDTIME, |
|
| 66 |
+ GitCommit: dockerversion.GITCOMMIT, |
|
| 67 |
+ BuildTime: dockerversion.BUILDTIME, |
|
| 68 | 68 |
Os: runtime.GOOS, |
| 69 | 69 |
Arch: runtime.GOARCH, |
| 70 | 70 |
Experimental: utils.ExperimentalBuild(), |
| ... | ... |
@@ -11,9 +11,9 @@ import ( |
| 11 | 11 |
"github.com/Sirupsen/logrus" |
| 12 | 12 |
"github.com/docker/docker/api" |
| 13 | 13 |
"github.com/docker/docker/api/server/httputils" |
| 14 |
+ "github.com/docker/docker/autogen/dockerversion" |
|
| 14 | 15 |
"github.com/docker/docker/errors" |
| 15 | 16 |
"github.com/docker/docker/pkg/version" |
| 16 |
- dockerversion "github.com/docker/docker/version" |
|
| 17 | 17 |
"golang.org/x/net/context" |
| 18 | 18 |
) |
| 19 | 19 |
|
| ... | ... |
@@ -10,24 +10,24 @@ import ( |
| 10 | 10 |
"github.com/docker/docker/api" |
| 11 | 11 |
"github.com/docker/docker/api/server/httputils" |
| 12 | 12 |
"github.com/docker/docker/api/types" |
| 13 |
+ "github.com/docker/docker/autogen/dockerversion" |
|
| 13 | 14 |
"github.com/docker/docker/pkg/ioutils" |
| 14 | 15 |
"github.com/docker/docker/pkg/jsonmessage" |
| 15 | 16 |
"github.com/docker/docker/pkg/parsers/filters" |
| 16 | 17 |
"github.com/docker/docker/pkg/parsers/kernel" |
| 17 | 18 |
"github.com/docker/docker/utils" |
| 18 |
- "github.com/docker/docker/version" |
|
| 19 | 19 |
"golang.org/x/net/context" |
| 20 | 20 |
) |
| 21 | 21 |
|
| 22 | 22 |
func (s *router) getVersion(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error {
|
| 23 | 23 |
v := &types.Version{
|
| 24 |
- Version: version.VERSION, |
|
| 24 |
+ Version: dockerversion.VERSION, |
|
| 25 | 25 |
APIVersion: api.Version, |
| 26 |
- GitCommit: version.GITCOMMIT, |
|
| 26 |
+ GitCommit: dockerversion.GITCOMMIT, |
|
| 27 | 27 |
GoVersion: runtime.Version(), |
| 28 | 28 |
Os: runtime.GOOS, |
| 29 | 29 |
Arch: runtime.GOARCH, |
| 30 |
- BuildTime: version.BUILDTIME, |
|
| 30 |
+ BuildTime: dockerversion.BUILDTIME, |
|
| 31 | 31 |
} |
| 32 | 32 |
|
| 33 | 33 |
version := httputils.VersionFromContext(ctx) |
| ... | ... |
@@ -12,6 +12,7 @@ import ( |
| 12 | 12 |
"syscall" |
| 13 | 13 |
|
| 14 | 14 |
"github.com/Sirupsen/logrus" |
| 15 |
+ "github.com/docker/docker/autogen/dockerversion" |
|
| 15 | 16 |
"github.com/docker/docker/daemon/graphdriver" |
| 16 | 17 |
derr "github.com/docker/docker/errors" |
| 17 | 18 |
"github.com/docker/docker/pkg/fileutils" |
| ... | ... |
@@ -21,7 +22,6 @@ import ( |
| 21 | 21 |
"github.com/docker/docker/pkg/sysinfo" |
| 22 | 22 |
"github.com/docker/docker/runconfig" |
| 23 | 23 |
"github.com/docker/docker/utils" |
| 24 |
- "github.com/docker/docker/version" |
|
| 25 | 24 |
"github.com/docker/docker/volume" |
| 26 | 25 |
"github.com/docker/libnetwork" |
| 27 | 26 |
nwconfig "github.com/docker/libnetwork/config" |
| ... | ... |
@@ -286,7 +286,7 @@ func migrateIfDownlevel(driver graphdriver.Driver, root string) error {
|
| 286 | 286 |
} |
| 287 | 287 |
|
| 288 | 288 |
func configureSysInit(config *Config, rootUID, rootGID int) (string, error) {
|
| 289 |
- localCopy := filepath.Join(config.Root, "init", fmt.Sprintf("dockerinit-%s", version.VERSION))
|
|
| 289 |
+ localCopy := filepath.Join(config.Root, "init", fmt.Sprintf("dockerinit-%s", dockerversion.VERSION))
|
|
| 290 | 290 |
sysInitPath := utils.DockerInitPath(localCopy) |
| 291 | 291 |
if sysInitPath == "" {
|
| 292 | 292 |
return "", fmt.Errorf("Could not locate dockerinit: This usually means docker was built incorrectly. See https://docs.docker.com/project/set-up-dev-env/ for official build instructions.")
|
| ... | ... |
@@ -8,9 +8,9 @@ import ( |
| 8 | 8 |
"sync" |
| 9 | 9 |
|
| 10 | 10 |
"github.com/Sirupsen/logrus" |
| 11 |
+ "github.com/docker/docker/autogen/dockerversion" |
|
| 11 | 12 |
"github.com/docker/docker/daemon/execdriver" |
| 12 | 13 |
"github.com/docker/docker/pkg/parsers" |
| 13 |
- "github.com/docker/docker/version" |
|
| 14 | 14 |
) |
| 15 | 15 |
|
| 16 | 16 |
// This is a daemon development variable only and should not be |
| ... | ... |
@@ -24,7 +24,7 @@ var forceKill bool |
| 24 | 24 |
// Define name and version for windows |
| 25 | 25 |
var ( |
| 26 | 26 |
DriverName = "Windows 1854" |
| 27 |
- Version = version.VERSION + " " + version.GITCOMMIT |
|
| 27 |
+ Version = dockerversion.VERSION + " " + dockerversion.GITCOMMIT |
|
| 28 | 28 |
) |
| 29 | 29 |
|
| 30 | 30 |
type activeContainer struct {
|
| ... | ... |
@@ -16,6 +16,7 @@ import ( |
| 16 | 16 |
"time" |
| 17 | 17 |
|
| 18 | 18 |
"github.com/Sirupsen/logrus" |
| 19 |
+ "github.com/docker/docker/autogen/dockerversion" |
|
| 19 | 20 |
"github.com/docker/docker/daemon/graphdriver" |
| 20 | 21 |
"github.com/docker/docker/image" |
| 21 | 22 |
"github.com/docker/docker/pkg/archive" |
| ... | ... |
@@ -23,7 +24,6 @@ import ( |
| 23 | 23 |
"github.com/docker/docker/pkg/idtools" |
| 24 | 24 |
"github.com/docker/docker/pkg/ioutils" |
| 25 | 25 |
"github.com/docker/docker/pkg/random" |
| 26 |
- "github.com/docker/docker/version" |
|
| 27 | 26 |
"github.com/microsoft/hcsshim" |
| 28 | 27 |
) |
| 29 | 28 |
|
| ... | ... |
@@ -440,7 +440,7 @@ func (d *Driver) RestoreCustomImages(tagger graphdriver.Tagger, recorder graphdr |
| 440 | 440 |
img := &image.Image{
|
| 441 | 441 |
ID: id, |
| 442 | 442 |
Created: imageData.CreatedTime, |
| 443 |
- DockerVersion: version.VERSION, |
|
| 443 |
+ DockerVersion: dockerversion.VERSION, |
|
| 444 | 444 |
Architecture: runtime.GOARCH, |
| 445 | 445 |
OS: runtime.GOOS, |
| 446 | 446 |
Size: imageData.Size, |
| ... | ... |
@@ -7,6 +7,7 @@ import ( |
| 7 | 7 |
|
| 8 | 8 |
"github.com/Sirupsen/logrus" |
| 9 | 9 |
"github.com/docker/docker/api/types" |
| 10 |
+ "github.com/docker/docker/autogen/dockerversion" |
|
| 10 | 11 |
"github.com/docker/docker/pkg/fileutils" |
| 11 | 12 |
"github.com/docker/docker/pkg/parsers/kernel" |
| 12 | 13 |
"github.com/docker/docker/pkg/parsers/operatingsystem" |
| ... | ... |
@@ -14,7 +15,6 @@ import ( |
| 14 | 14 |
"github.com/docker/docker/pkg/system" |
| 15 | 15 |
"github.com/docker/docker/registry" |
| 16 | 16 |
"github.com/docker/docker/utils" |
| 17 |
- "github.com/docker/docker/version" |
|
| 18 | 17 |
) |
| 19 | 18 |
|
| 20 | 19 |
// SystemInfo returns information about the host server the daemon is running on. |
| ... | ... |
@@ -83,14 +83,14 @@ func (daemon *Daemon) SystemInfo() (*types.Info, error) {
|
| 83 | 83 |
OperatingSystem: operatingSystem, |
| 84 | 84 |
IndexServerAddress: registry.IndexServer, |
| 85 | 85 |
RegistryConfig: daemon.RegistryService.Config, |
| 86 |
- InitSha1: version.INITSHA1, |
|
| 86 |
+ InitSha1: dockerversion.INITSHA1, |
|
| 87 | 87 |
InitPath: initPath, |
| 88 | 88 |
NCPU: runtime.NumCPU(), |
| 89 | 89 |
MemTotal: meminfo.MemTotal, |
| 90 | 90 |
DockerRootDir: daemon.config().Root, |
| 91 | 91 |
Labels: daemon.config().Labels, |
| 92 | 92 |
ExperimentalBuild: utils.ExperimentalBuild(), |
| 93 |
- ServerVersion: version.VERSION, |
|
| 93 |
+ ServerVersion: dockerversion.VERSION, |
|
| 94 | 94 |
ClusterStore: daemon.config().ClusterStore, |
| 95 | 95 |
ClusterAdvertise: daemon.config().ClusterAdvertise, |
| 96 | 96 |
} |
| ... | ... |
@@ -14,6 +14,7 @@ import ( |
| 14 | 14 |
"github.com/Sirupsen/logrus" |
| 15 | 15 |
"github.com/docker/distribution/uuid" |
| 16 | 16 |
apiserver "github.com/docker/docker/api/server" |
| 17 |
+ "github.com/docker/docker/autogen/dockerversion" |
|
| 17 | 18 |
"github.com/docker/docker/cli" |
| 18 | 19 |
"github.com/docker/docker/cliconfig" |
| 19 | 20 |
"github.com/docker/docker/daemon" |
| ... | ... |
@@ -27,7 +28,6 @@ import ( |
| 27 | 27 |
"github.com/docker/docker/pkg/tlsconfig" |
| 28 | 28 |
"github.com/docker/docker/registry" |
| 29 | 29 |
"github.com/docker/docker/utils" |
| 30 |
- "github.com/docker/docker/version" |
|
| 31 | 30 |
) |
| 32 | 31 |
|
| 33 | 32 |
const daemonUsage = " docker daemon [ --help | ... ]\n" |
| ... | ... |
@@ -206,7 +206,7 @@ func (cli *DaemonCli) CmdDaemon(args ...string) error {
|
| 206 | 206 |
|
| 207 | 207 |
serverConfig := &apiserver.Config{
|
| 208 | 208 |
Logging: true, |
| 209 |
- Version: version.VERSION, |
|
| 209 |
+ Version: dockerversion.VERSION, |
|
| 210 | 210 |
} |
| 211 | 211 |
serverConfig = setPlatformServerConfig(serverConfig, cli.Config) |
| 212 | 212 |
|
| ... | ... |
@@ -279,8 +279,8 @@ func (cli *DaemonCli) CmdDaemon(args ...string) error {
|
| 279 | 279 |
logrus.Info("Daemon has completed initialization")
|
| 280 | 280 |
|
| 281 | 281 |
logrus.WithFields(logrus.Fields{
|
| 282 |
- "version": version.VERSION, |
|
| 283 |
- "commit": version.GITCOMMIT, |
|
| 282 |
+ "version": dockerversion.VERSION, |
|
| 283 |
+ "commit": dockerversion.GITCOMMIT, |
|
| 284 | 284 |
"execdriver": d.ExecutionDriver().Name(), |
| 285 | 285 |
"graphdriver": d.GraphDriver().String(), |
| 286 | 286 |
}).Info("Docker daemon")
|
| ... | ... |
@@ -6,12 +6,12 @@ import ( |
| 6 | 6 |
|
| 7 | 7 |
"github.com/Sirupsen/logrus" |
| 8 | 8 |
"github.com/docker/docker/api/client" |
| 9 |
+ "github.com/docker/docker/autogen/dockerversion" |
|
| 9 | 10 |
"github.com/docker/docker/cli" |
| 10 | 11 |
flag "github.com/docker/docker/pkg/mflag" |
| 11 | 12 |
"github.com/docker/docker/pkg/reexec" |
| 12 | 13 |
"github.com/docker/docker/pkg/term" |
| 13 | 14 |
"github.com/docker/docker/utils" |
| 14 |
- "github.com/docker/docker/version" |
|
| 15 | 15 |
) |
| 16 | 16 |
|
| 17 | 17 |
func main() {
|
| ... | ... |
@@ -77,8 +77,8 @@ func main() {
|
| 77 | 77 |
|
| 78 | 78 |
func showVersion() {
|
| 79 | 79 |
if utils.ExperimentalBuild() {
|
| 80 |
- fmt.Printf("Docker version %s, build %s, experimental\n", version.VERSION, version.GITCOMMIT)
|
|
| 80 |
+ fmt.Printf("Docker version %s, build %s, experimental\n", dockerversion.VERSION, dockerversion.GITCOMMIT)
|
|
| 81 | 81 |
} else {
|
| 82 |
- fmt.Printf("Docker version %s, build %s\n", version.VERSION, version.GITCOMMIT)
|
|
| 82 |
+ fmt.Printf("Docker version %s, build %s\n", dockerversion.VERSION, dockerversion.GITCOMMIT)
|
|
| 83 | 83 |
} |
| 84 | 84 |
} |
| ... | ... |
@@ -17,6 +17,7 @@ import ( |
| 17 | 17 |
|
| 18 | 18 |
"github.com/Sirupsen/logrus" |
| 19 | 19 |
"github.com/docker/distribution/digest" |
| 20 |
+ "github.com/docker/docker/autogen/dockerversion" |
|
| 20 | 21 |
"github.com/docker/docker/daemon/graphdriver" |
| 21 | 22 |
"github.com/docker/docker/image" |
| 22 | 23 |
"github.com/docker/docker/pkg/archive" |
| ... | ... |
@@ -26,7 +27,6 @@ import ( |
| 26 | 26 |
"github.com/docker/docker/pkg/stringid" |
| 27 | 27 |
"github.com/docker/docker/pkg/truncindex" |
| 28 | 28 |
"github.com/docker/docker/runconfig" |
| 29 |
- "github.com/docker/docker/version" |
|
| 30 | 29 |
"github.com/vbatts/tar-split/tar/asm" |
| 31 | 30 |
"github.com/vbatts/tar-split/tar/storage" |
| 32 | 31 |
) |
| ... | ... |
@@ -247,7 +247,7 @@ func (graph *Graph) Create(layerData io.Reader, containerID, containerImage, com |
| 247 | 247 |
ID: stringid.GenerateRandomID(), |
| 248 | 248 |
Comment: comment, |
| 249 | 249 |
Created: time.Now().UTC(), |
| 250 |
- DockerVersion: version.VERSION, |
|
| 250 |
+ DockerVersion: dockerversion.VERSION, |
|
| 251 | 251 |
Author: author, |
| 252 | 252 |
Config: config, |
| 253 | 253 |
Architecture: runtime.GOARCH, |
| ... | ... |
@@ -9,10 +9,10 @@ import ( |
| 9 | 9 |
"testing" |
| 10 | 10 |
"time" |
| 11 | 11 |
|
| 12 |
+ "github.com/docker/docker/autogen/dockerversion" |
|
| 12 | 13 |
"github.com/docker/docker/daemon/graphdriver" |
| 13 | 14 |
"github.com/docker/docker/image" |
| 14 | 15 |
"github.com/docker/docker/pkg/stringid" |
| 15 |
- "github.com/docker/docker/version" |
|
| 16 | 16 |
) |
| 17 | 17 |
|
| 18 | 18 |
func TestMount(t *testing.T) {
|
| ... | ... |
@@ -106,8 +106,8 @@ func TestGraphCreate(t *testing.T) {
|
| 106 | 106 |
if img.Comment != "Testing" {
|
| 107 | 107 |
t.Fatalf("Wrong comment: should be '%s', not '%s'", "Testing", img.Comment)
|
| 108 | 108 |
} |
| 109 |
- if img.DockerVersion != version.VERSION {
|
|
| 110 |
- t.Fatalf("Wrong docker_version: should be '%s', not '%s'", version.VERSION, img.DockerVersion)
|
|
| 109 |
+ if img.DockerVersion != dockerversion.VERSION {
|
|
| 110 |
+ t.Fatalf("Wrong docker_version: should be '%s', not '%s'", dockerversion.VERSION, img.DockerVersion)
|
|
| 111 | 111 |
} |
| 112 | 112 |
images := graph.Map() |
| 113 | 113 |
if l := len(images); l != 1 {
|
| ... | ... |
@@ -146,7 +146,7 @@ fi |
| 146 | 146 |
EXTLDFLAGS_STATIC='-static' |
| 147 | 147 |
# ORIG_BUILDFLAGS is necessary for the cross target which cannot always build |
| 148 | 148 |
# with options like -race. |
| 149 |
-ORIG_BUILDFLAGS=( -a -tags "autogen netgo static_build sqlite_omit_load_extension $DOCKER_BUILDTAGS" -installsuffix netgo ) |
|
| 149 |
+ORIG_BUILDFLAGS=( -a -tags "netgo static_build sqlite_omit_load_extension $DOCKER_BUILDTAGS" -installsuffix netgo ) |
|
| 150 | 150 |
# see https://github.com/golang/go/issues/9369#issuecomment-69864440 for why -installsuffix is necessary here |
| 151 | 151 |
BUILDFLAGS=( $BUILDFLAGS "${ORIG_BUILDFLAGS[@]}" )
|
| 152 | 152 |
# Test timeout. |
| ... | ... |
@@ -2,14 +2,12 @@ |
| 2 | 2 |
|
| 3 | 3 |
rm -rf autogen |
| 4 | 4 |
|
| 5 |
-cat > version/version_autogen.go <<DVEOF |
|
| 6 |
-// +build autogen |
|
| 7 |
-// Package version is auto-generated at build-time |
|
| 8 |
-package version |
|
| 9 |
- |
|
| 10 |
-// Default build-time variable for library-import. |
|
| 11 |
-// This file is overridden on build with build-time informations. |
|
| 12 |
-const ( |
|
| 5 |
+mkdir -p autogen/dockerversion |
|
| 6 |
+cat > autogen/dockerversion/dockerversion.go <<DVEOF |
|
| 7 |
+// AUTOGENERATED FILE; see $BASH_SOURCE |
|
| 8 |
+package dockerversion |
|
| 9 |
+ |
|
| 10 |
+var ( |
|
| 13 | 11 |
GITCOMMIT string = "$GITCOMMIT" |
| 14 | 12 |
VERSION string = "$VERSION" |
| 15 | 13 |
BUILDTIME string = "$BUILDTIME" |
| ... | ... |
@@ -18,7 +16,6 @@ const ( |
| 18 | 18 |
INITSHA1 string = "$DOCKER_INITSHA1" |
| 19 | 19 |
INITPATH string = "$DOCKER_INITPATH" |
| 20 | 20 |
) |
| 21 |
-// AUTOGENERATED FILE; see $BASH_SOURCE |
|
| 22 | 21 |
DVEOF |
| 23 | 22 |
|
| 24 | 23 |
# Compile the Windows resources into the sources |
| ... | ... |
@@ -5,8 +5,8 @@ import ( |
| 5 | 5 |
"net/http" |
| 6 | 6 |
|
| 7 | 7 |
"github.com/docker/docker/api/types" |
| 8 |
+ "github.com/docker/docker/autogen/dockerversion" |
|
| 8 | 9 |
"github.com/docker/docker/pkg/integration/checker" |
| 9 |
- "github.com/docker/docker/version" |
|
| 10 | 10 |
"github.com/go-check/check" |
| 11 | 11 |
) |
| 12 | 12 |
|
| ... | ... |
@@ -19,5 +19,5 @@ func (s *DockerSuite) TestGetVersion(c *check.C) {
|
| 19 | 19 |
|
| 20 | 20 |
c.Assert(json.Unmarshal(body, &v), checker.IsNil) |
| 21 | 21 |
|
| 22 |
- c.Assert(v.Version, checker.Equals, version.VERSION, check.Commentf("Version mismatch"))
|
|
| 22 |
+ c.Assert(v.Version, checker.Equals, dockerversion.VERSION, check.Commentf("Version mismatch"))
|
|
| 23 | 23 |
} |
| ... | ... |
@@ -9,9 +9,9 @@ import ( |
| 9 | 9 |
"path/filepath" |
| 10 | 10 |
"runtime" |
| 11 | 11 |
|
| 12 |
+ "github.com/docker/docker/autogen/dockerversion" |
|
| 12 | 13 |
"github.com/docker/docker/pkg/homedir" |
| 13 | 14 |
"github.com/docker/docker/pkg/integration/checker" |
| 14 |
- "github.com/docker/docker/version" |
|
| 15 | 15 |
"github.com/go-check/check" |
| 16 | 16 |
) |
| 17 | 17 |
|
| ... | ... |
@@ -54,7 +54,7 @@ func (s *DockerSuite) TestConfigHttpHeader(c *check.C) {
|
| 54 | 54 |
|
| 55 | 55 |
c.Assert(headers["User-Agent"], checker.NotNil, check.Commentf("Missing User-Agent"))
|
| 56 | 56 |
|
| 57 |
- c.Assert(headers["User-Agent"][0], checker.Equals, "Docker-Client/"+version.VERSION+" ("+runtime.GOOS+")", check.Commentf("Badly formatted User-Agent,out:%v", out))
|
|
| 57 |
+ c.Assert(headers["User-Agent"][0], checker.Equals, "Docker-Client/"+dockerversion.VERSION+" ("+runtime.GOOS+")", check.Commentf("Badly formatted User-Agent,out:%v", out))
|
|
| 58 | 58 |
|
| 59 | 59 |
c.Assert(headers["Myheader"], checker.NotNil) |
| 60 | 60 |
c.Assert(headers["Myheader"][0], checker.Equals, "MyValue", check.Commentf("Missing/bad header,out:%v", out))
|
| ... | ... |
@@ -20,10 +20,10 @@ import ( |
| 20 | 20 |
"github.com/docker/distribution/registry/api/v2" |
| 21 | 21 |
"github.com/docker/distribution/registry/client" |
| 22 | 22 |
"github.com/docker/distribution/registry/client/transport" |
| 23 |
+ "github.com/docker/docker/autogen/dockerversion" |
|
| 23 | 24 |
"github.com/docker/docker/pkg/parsers/kernel" |
| 24 | 25 |
"github.com/docker/docker/pkg/tlsconfig" |
| 25 | 26 |
"github.com/docker/docker/pkg/useragent" |
| 26 |
- "github.com/docker/docker/version" |
|
| 27 | 27 |
) |
| 28 | 28 |
|
| 29 | 29 |
var ( |
| ... | ... |
@@ -39,9 +39,9 @@ var dockerUserAgent string |
| 39 | 39 |
|
| 40 | 40 |
func init() {
|
| 41 | 41 |
httpVersion := make([]useragent.VersionInfo, 0, 6) |
| 42 |
- httpVersion = append(httpVersion, useragent.VersionInfo{"docker", version.VERSION})
|
|
| 42 |
+ httpVersion = append(httpVersion, useragent.VersionInfo{"docker", dockerversion.VERSION})
|
|
| 43 | 43 |
httpVersion = append(httpVersion, useragent.VersionInfo{"go", runtime.Version()})
|
| 44 |
- httpVersion = append(httpVersion, useragent.VersionInfo{"git-commit", version.GITCOMMIT})
|
|
| 44 |
+ httpVersion = append(httpVersion, useragent.VersionInfo{"git-commit", dockerversion.GITCOMMIT})
|
|
| 45 | 45 |
if kernelVersion, err := kernel.GetKernelVersion(); err == nil {
|
| 46 | 46 |
httpVersion = append(httpVersion, useragent.VersionInfo{"kernel", kernelVersion.String()})
|
| 47 | 47 |
} |
| ... | ... |
@@ -14,10 +14,10 @@ import ( |
| 14 | 14 |
"strings" |
| 15 | 15 |
|
| 16 | 16 |
"github.com/docker/distribution/registry/api/errcode" |
| 17 |
+ "github.com/docker/docker/autogen/dockerversion" |
|
| 17 | 18 |
"github.com/docker/docker/pkg/archive" |
| 18 | 19 |
"github.com/docker/docker/pkg/fileutils" |
| 19 | 20 |
"github.com/docker/docker/pkg/stringid" |
| 20 |
- "github.com/docker/docker/version" |
|
| 21 | 21 |
) |
| 22 | 22 |
|
| 23 | 23 |
// SelfPath figures out the absolute path of our own binary (if it's still around). |
| ... | ... |
@@ -60,7 +60,7 @@ func isValidDockerInitPath(target string, selfPath string) bool { // target and
|
| 60 | 60 |
if target == "" {
|
| 61 | 61 |
return false |
| 62 | 62 |
} |
| 63 |
- if version.IAMSTATIC == "true" {
|
|
| 63 |
+ if dockerversion.IAMSTATIC == "true" {
|
|
| 64 | 64 |
if selfPath == "" {
|
| 65 | 65 |
return false |
| 66 | 66 |
} |
| ... | ... |
@@ -77,7 +77,7 @@ func isValidDockerInitPath(target string, selfPath string) bool { // target and
|
| 77 | 77 |
} |
| 78 | 78 |
return os.SameFile(targetFileInfo, selfPathFileInfo) |
| 79 | 79 |
} |
| 80 |
- return version.INITSHA1 != "" && dockerInitSha1(target) == version.INITSHA1 |
|
| 80 |
+ return dockerversion.INITSHA1 != "" && dockerInitSha1(target) == dockerversion.INITSHA1 |
|
| 81 | 81 |
} |
| 82 | 82 |
|
| 83 | 83 |
// DockerInitPath figures out the path of our dockerinit (which may be SelfPath()) |
| ... | ... |
@@ -89,7 +89,7 @@ func DockerInitPath(localCopy string) string {
|
| 89 | 89 |
} |
| 90 | 90 |
var possibleInits = []string{
|
| 91 | 91 |
localCopy, |
| 92 |
- version.INITPATH, |
|
| 92 |
+ dockerversion.INITPATH, |
|
| 93 | 93 |
filepath.Join(filepath.Dir(selfPath), "dockerinit"), |
| 94 | 94 |
|
| 95 | 95 |
// FHS 3.0 Draft: "/usr/libexec includes internal binaries that are not intended to be executed directly by users or shell scripts. Applications may use a single subdirectory under /usr/libexec." |
| 96 | 96 |
deleted file mode 100644 |
| ... | ... |
@@ -1,16 +0,0 @@ |
| 1 |
-// +build !autogen |
|
| 2 |
- |
|
| 3 |
-// Package version is auto-generated at build-time |
|
| 4 |
-package version |
|
| 5 |
- |
|
| 6 |
-// Default build-time variable for library-import. |
|
| 7 |
-// This file is overridden on build with build-time informations. |
|
| 8 |
-const ( |
|
| 9 |
- GITCOMMIT string = "library-import" |
|
| 10 |
- VERSION string = "library-import" |
|
| 11 |
- BUILDTIME string = "library-import" |
|
| 12 |
- |
|
| 13 |
- IAMSTATIC string = "library-import" |
|
| 14 |
- INITSHA1 string = "library-import" |
|
| 15 |
- INITPATH string = "library-import" |
|
| 16 |
-) |