Browse code

dockerversion placeholder for library import

- Add a *version* file placeholder.
- Update autogen and builds to use it and an autogen build flag

Signed-off-by: Vincent Demeester <vincent@sbr.pm>

Vincent Demeester authored on 2015/11/10 03:32:46
Showing 23 changed files
... ...
@@ -22,6 +22,7 @@ bin
22 22
 build_src
23 23
 bundles/
24 24
 docker/docker
25
+dockerversion/version_autogen.go
25 26
 docs/AWS_S3_BUCKET
26 27
 docs/GITCOMMIT
27 28
 docs/GIT_BRANCH
... ...
@@ -15,7 +15,7 @@ import (
15 15
 
16 16
 	"github.com/Sirupsen/logrus"
17 17
 	"github.com/docker/docker/api"
18
-	"github.com/docker/docker/autogen/dockerversion"
18
+	"github.com/docker/docker/dockerversion"
19 19
 	"github.com/docker/docker/pkg/stdcopy"
20 20
 	"github.com/docker/docker/pkg/term"
21 21
 )
... ...
@@ -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/"+dockerversion.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,8 +20,8 @@ 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"
24 23
 	"github.com/docker/docker/cliconfig"
24
+	"github.com/docker/docker/dockerversion"
25 25
 	"github.com/docker/docker/pkg/jsonmessage"
26 26
 	"github.com/docker/docker/pkg/signal"
27 27
 	"github.com/docker/docker/pkg/stdcopy"
... ...
@@ -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/"+dockerversion.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,8 +7,8 @@ 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"
11 10
 	Cli "github.com/docker/docker/cli"
11
+	"github.com/docker/docker/dockerversion"
12 12
 	flag "github.com/docker/docker/pkg/mflag"
13 13
 	"github.com/docker/docker/utils"
14 14
 )
... ...
@@ -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:      dockerversion.VERSION,
63
+			Version:      dockerversion.Version,
64 64
 			APIVersion:   api.Version,
65 65
 			GoVersion:    runtime.Version(),
66
-			GitCommit:    dockerversion.GITCOMMIT,
67
-			BuildTime:    dockerversion.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,7 +11,7 @@ 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
+	"github.com/docker/docker/dockerversion"
15 15
 	"github.com/docker/docker/errors"
16 16
 	"github.com/docker/docker/pkg/version"
17 17
 	"golang.org/x/net/context"
... ...
@@ -111,7 +111,7 @@ func versionMiddleware(handler httputils.APIFunc) httputils.APIFunc {
111 111
 			return errors.ErrorCodeOldClientVersion.WithArgs(apiVersion, api.Version)
112 112
 		}
113 113
 
114
-		w.Header().Set("Server", "Docker/"+dockerversion.VERSION+" ("+runtime.GOOS+")")
114
+		w.Header().Set("Server", "Docker/"+dockerversion.Version+" ("+runtime.GOOS+")")
115 115
 		ctx = context.WithValue(ctx, httputils.APIVersionKey, apiVersion)
116 116
 		return handler(ctx, w, r, vars)
117 117
 	}
... ...
@@ -10,7 +10,7 @@ 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
+	"github.com/docker/docker/dockerversion"
14 14
 	"github.com/docker/docker/pkg/ioutils"
15 15
 	"github.com/docker/docker/pkg/jsonmessage"
16 16
 	"github.com/docker/docker/pkg/parsers/filters"
... ...
@@ -21,13 +21,13 @@ import (
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:    dockerversion.VERSION,
24
+		Version:    dockerversion.Version,
25 25
 		APIVersion: api.Version,
26
-		GitCommit:  dockerversion.GITCOMMIT,
26
+		GitCommit:  dockerversion.GitCommit,
27 27
 		GoVersion:  runtime.Version(),
28 28
 		Os:         runtime.GOOS,
29 29
 		Arch:       runtime.GOARCH,
30
-		BuildTime:  dockerversion.BUILDTIME,
30
+		BuildTime:  dockerversion.BuildTime,
31 31
 	}
32 32
 
33 33
 	version := httputils.VersionFromContext(ctx)
... ...
@@ -12,8 +12,8 @@ import (
12 12
 	"syscall"
13 13
 
14 14
 	"github.com/Sirupsen/logrus"
15
-	"github.com/docker/docker/autogen/dockerversion"
16 15
 	"github.com/docker/docker/daemon/graphdriver"
16
+	"github.com/docker/docker/dockerversion"
17 17
 	derr "github.com/docker/docker/errors"
18 18
 	"github.com/docker/docker/pkg/fileutils"
19 19
 	"github.com/docker/docker/pkg/idtools"
... ...
@@ -283,7 +283,7 @@ func migrateIfDownlevel(driver graphdriver.Driver, root string) error {
283 283
 }
284 284
 
285 285
 func configureSysInit(config *Config, rootUID, rootGID int) (string, error) {
286
-	localCopy := filepath.Join(config.Root, "init", fmt.Sprintf("dockerinit-%s", dockerversion.VERSION))
286
+	localCopy := filepath.Join(config.Root, "init", fmt.Sprintf("dockerinit-%s", dockerversion.Version))
287 287
 	sysInitPath := utils.DockerInitPath(localCopy)
288 288
 	if sysInitPath == "" {
289 289
 		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,8 +8,8 @@ import (
8 8
 	"sync"
9 9
 
10 10
 	"github.com/Sirupsen/logrus"
11
-	"github.com/docker/docker/autogen/dockerversion"
12 11
 	"github.com/docker/docker/daemon/execdriver"
12
+	"github.com/docker/docker/dockerversion"
13 13
 	"github.com/docker/docker/pkg/parsers"
14 14
 )
15 15
 
... ...
@@ -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    = dockerversion.VERSION + " " + dockerversion.GITCOMMIT
27
+	Version    = dockerversion.Version + " " + dockerversion.GitCommit
28 28
 )
29 29
 
30 30
 type activeContainer struct {
... ...
@@ -16,8 +16,8 @@ import (
16 16
 	"time"
17 17
 
18 18
 	"github.com/Sirupsen/logrus"
19
-	"github.com/docker/docker/autogen/dockerversion"
20 19
 	"github.com/docker/docker/daemon/graphdriver"
20
+	"github.com/docker/docker/dockerversion"
21 21
 	"github.com/docker/docker/image"
22 22
 	"github.com/docker/docker/pkg/archive"
23 23
 	"github.com/docker/docker/pkg/chrootarchive"
... ...
@@ -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: dockerversion.VERSION,
443
+				DockerVersion: dockerversion.Version,
444 444
 				Architecture:  runtime.GOARCH,
445 445
 				OS:            runtime.GOOS,
446 446
 				Size:          imageData.Size,
... ...
@@ -7,7 +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
+	"github.com/docker/docker/dockerversion"
11 11
 	"github.com/docker/docker/pkg/fileutils"
12 12
 	"github.com/docker/docker/pkg/parsers/kernel"
13 13
 	"github.com/docker/docker/pkg/parsers/operatingsystem"
... ...
@@ -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:           dockerversion.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:      dockerversion.VERSION,
93
+		ServerVersion:      dockerversion.Version,
94 94
 		ClusterStore:       daemon.config().ClusterStore,
95 95
 		ClusterAdvertise:   daemon.config().ClusterAdvertise,
96 96
 	}
... ...
@@ -18,8 +18,8 @@ import (
18 18
 	"github.com/aws/aws-sdk-go/aws/ec2metadata"
19 19
 	"github.com/aws/aws-sdk-go/aws/request"
20 20
 	"github.com/aws/aws-sdk-go/service/cloudwatchlogs"
21
-	"github.com/docker/docker/autogen/dockerversion"
22 21
 	"github.com/docker/docker/daemon/logger"
22
+	"github.com/docker/docker/dockerversion"
23 23
 )
24 24
 
25 25
 const (
... ...
@@ -150,7 +150,7 @@ func newAWSLogsClient(ctx logger.Context) (api, error) {
150 150
 			currentAgent := r.HTTPRequest.Header.Get(userAgentHeader)
151 151
 			r.HTTPRequest.Header.Set(userAgentHeader,
152 152
 				fmt.Sprintf("Docker %s (%s) %s",
153
-					dockerversion.VERSION, runtime.GOOS, currentAgent))
153
+					dockerversion.Version, runtime.GOOS, currentAgent))
154 154
 		},
155 155
 	})
156 156
 	return client, nil
... ...
@@ -13,8 +13,8 @@ import (
13 13
 	"github.com/aws/aws-sdk-go/aws/awserr"
14 14
 	"github.com/aws/aws-sdk-go/aws/request"
15 15
 	"github.com/aws/aws-sdk-go/service/cloudwatchlogs"
16
-	"github.com/docker/docker/autogen/dockerversion"
17 16
 	"github.com/docker/docker/daemon/logger"
17
+	"github.com/docker/docker/dockerversion"
18 18
 )
19 19
 
20 20
 const (
... ...
@@ -48,7 +48,7 @@ func TestNewAWSLogsClientUserAgentHandler(t *testing.T) {
48 48
 	}
49 49
 	buildHandlerList.Run(request)
50 50
 	expectedUserAgentString := fmt.Sprintf("Docker %s (%s) %s/%s",
51
-		dockerversion.VERSION, runtime.GOOS, aws.SDKName, aws.SDKVersion)
51
+		dockerversion.Version, runtime.GOOS, aws.SDKName, aws.SDKVersion)
52 52
 	userAgent := request.HTTPRequest.Header.Get("User-Agent")
53 53
 	if userAgent != expectedUserAgentString {
54 54
 		t.Errorf("Wrong User-Agent string, expected \"%s\" but was \"%s\"",
... ...
@@ -14,11 +14,11 @@ 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"
18 17
 	"github.com/docker/docker/cli"
19 18
 	"github.com/docker/docker/cliconfig"
20 19
 	"github.com/docker/docker/daemon"
21 20
 	"github.com/docker/docker/daemon/logger"
21
+	"github.com/docker/docker/dockerversion"
22 22
 	"github.com/docker/docker/opts"
23 23
 	flag "github.com/docker/docker/pkg/mflag"
24 24
 	"github.com/docker/docker/pkg/pidfile"
... ...
@@ -206,7 +206,7 @@ func (cli *DaemonCli) CmdDaemon(args ...string) error {
206 206
 
207 207
 	serverConfig := &apiserver.Config{
208 208
 		Logging: true,
209
-		Version: dockerversion.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":     dockerversion.VERSION,
283
-		"commit":      dockerversion.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,8 +6,8 @@ import (
6 6
 
7 7
 	"github.com/Sirupsen/logrus"
8 8
 	"github.com/docker/docker/api/client"
9
-	"github.com/docker/docker/autogen/dockerversion"
10 9
 	"github.com/docker/docker/cli"
10
+	"github.com/docker/docker/dockerversion"
11 11
 	flag "github.com/docker/docker/pkg/mflag"
12 12
 	"github.com/docker/docker/pkg/reexec"
13 13
 	"github.com/docker/docker/pkg/term"
... ...
@@ -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", dockerversion.VERSION, dockerversion.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", dockerversion.VERSION, dockerversion.GITCOMMIT)
82
+		fmt.Printf("Docker version %s, build %s\n", dockerversion.Version, dockerversion.GitCommit)
83 83
 	}
84 84
 }
85 85
new file mode 100644
... ...
@@ -0,0 +1,16 @@
0
+// +build !autogen
1
+
2
+// Package dockerversion is auto-generated at build-time
3
+package dockerversion
4
+
5
+// Default build-time variable for library-import.
6
+// This file is overridden on build with build-time informations.
7
+const (
8
+	GitCommit string = "library-import"
9
+	Version   string = "library-import"
10
+	BuildTime string = "library-import"
11
+
12
+	IAmStatic string = "library-import"
13
+	InitSHA1  string = "library-import"
14
+	InitPath  string = "library-import"
15
+)
... ...
@@ -17,8 +17,8 @@ import (
17 17
 
18 18
 	"github.com/Sirupsen/logrus"
19 19
 	"github.com/docker/distribution/digest"
20
-	"github.com/docker/docker/autogen/dockerversion"
21 20
 	"github.com/docker/docker/daemon/graphdriver"
21
+	"github.com/docker/docker/dockerversion"
22 22
 	"github.com/docker/docker/image"
23 23
 	"github.com/docker/docker/pkg/archive"
24 24
 	"github.com/docker/docker/pkg/idtools"
... ...
@@ -251,7 +251,7 @@ func (graph *Graph) Create(layerData io.Reader, containerID, containerImage, com
251 251
 		ID:            stringid.GenerateRandomID(),
252 252
 		Comment:       comment,
253 253
 		Created:       time.Now().UTC(),
254
-		DockerVersion: dockerversion.VERSION,
254
+		DockerVersion: dockerversion.Version,
255 255
 		Author:        author,
256 256
 		Config:        config,
257 257
 		Architecture:  runtime.GOARCH,
... ...
@@ -9,8 +9,8 @@ import (
9 9
 	"testing"
10 10
 	"time"
11 11
 
12
-	"github.com/docker/docker/autogen/dockerversion"
13 12
 	"github.com/docker/docker/daemon/graphdriver"
13
+	"github.com/docker/docker/dockerversion"
14 14
 	"github.com/docker/docker/image"
15 15
 	"github.com/docker/docker/pkg/stringid"
16 16
 )
... ...
@@ -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 != dockerversion.VERSION {
110
-		t.Fatalf("Wrong docker_version: should be '%s', not '%s'", dockerversion.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 "netgo static_build sqlite_omit_load_extension $DOCKER_BUILDTAGS" -installsuffix netgo )
149
+ORIG_BUILDFLAGS=( -a -tags "autogen 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,20 +2,23 @@
2 2
 
3 3
 rm -rf autogen
4 4
 
5
-mkdir -p autogen/dockerversion
6
-cat > autogen/dockerversion/dockerversion.go <<DVEOF
7
-// AUTOGENERATED FILE; see $BASH_SOURCE
5
+cat > dockerversion/version_autogen.go <<DVEOF
6
+// +build autogen
7
+// Package version is auto-generated at build-time
8 8
 package dockerversion
9 9
 
10
-var (
11
-	GITCOMMIT string = "$GITCOMMIT"
12
-	VERSION   string = "$VERSION"
13
-	BUILDTIME string = "$BUILDTIME"
10
+// Default build-time variable for library-import.
11
+// This file is overridden on build with build-time informations.
12
+const (
13
+	GitCommit string = "$GITCOMMIT"
14
+	Version   string = "$VERSION"
15
+	BuildTime string = "$BUILDTIME"
14 16
 
15
-	IAMSTATIC string = "${IAMSTATIC:-true}"
16
-	INITSHA1  string = "$DOCKER_INITSHA1"
17
-	INITPATH  string = "$DOCKER_INITPATH"
17
+	IAmStatic string = "${IAMSTATIC:-true}"
18
+	InitSHA1  string = "$DOCKER_INITSHA1"
19
+	InitPath  string = "$DOCKER_INITPATH"
18 20
 )
21
+// AUTOGENERATED FILE; see $BASH_SOURCE
19 22
 DVEOF
20 23
 
21 24
 # Compile the Windows resources into the sources
... ...
@@ -5,7 +5,7 @@ import (
5 5
 	"net/http"
6 6
 
7 7
 	"github.com/docker/docker/api/types"
8
-	"github.com/docker/docker/autogen/dockerversion"
8
+	"github.com/docker/docker/dockerversion"
9 9
 	"github.com/docker/docker/pkg/integration/checker"
10 10
 	"github.com/go-check/check"
11 11
 )
... ...
@@ -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, dockerversion.VERSION, check.Commentf("Version mismatch"))
22
+	c.Assert(v.Version, checker.Equals, dockerversion.Version, check.Commentf("Version mismatch"))
23 23
 }
... ...
@@ -9,7 +9,7 @@ import (
9 9
 	"path/filepath"
10 10
 	"runtime"
11 11
 
12
-	"github.com/docker/docker/autogen/dockerversion"
12
+	"github.com/docker/docker/dockerversion"
13 13
 	"github.com/docker/docker/pkg/homedir"
14 14
 	"github.com/docker/docker/pkg/integration/checker"
15 15
 	"github.com/go-check/check"
... ...
@@ -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/"+dockerversion.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,7 +20,7 @@ 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
+	"github.com/docker/docker/dockerversion"
24 24
 	"github.com/docker/docker/pkg/parsers/kernel"
25 25
 	"github.com/docker/docker/pkg/tlsconfig"
26 26
 	"github.com/docker/docker/pkg/useragent"
... ...
@@ -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{Name: "docker", Version: dockerversion.VERSION})
42
+	httpVersion = append(httpVersion, useragent.VersionInfo{Name: "docker", Version: dockerversion.Version})
43 43
 	httpVersion = append(httpVersion, useragent.VersionInfo{Name: "go", Version: runtime.Version()})
44
-	httpVersion = append(httpVersion, useragent.VersionInfo{Name: "git-commit", Version: dockerversion.GITCOMMIT})
44
+	httpVersion = append(httpVersion, useragent.VersionInfo{Name: "git-commit", Version: dockerversion.GitCommit})
45 45
 	if kernelVersion, err := kernel.GetKernelVersion(); err == nil {
46 46
 		httpVersion = append(httpVersion, useragent.VersionInfo{Name: "kernel", Version: kernelVersion.String()})
47 47
 	}
... ...
@@ -14,7 +14,7 @@ import (
14 14
 	"strings"
15 15
 
16 16
 	"github.com/docker/distribution/registry/api/errcode"
17
-	"github.com/docker/docker/autogen/dockerversion"
17
+	"github.com/docker/docker/dockerversion"
18 18
 	"github.com/docker/docker/pkg/archive"
19 19
 	"github.com/docker/docker/pkg/fileutils"
20 20
 	"github.com/docker/docker/pkg/stringid"
... ...
@@ -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 dockerversion.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 dockerversion.INITSHA1 != "" && dockerInitSha1(target) == dockerversion.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
-		dockerversion.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."