Skip to contentSkip to conversation

package/docker-cli: fix version ldflags

PATCH New Christian Stewart 2 participants 2 messages Aug 31, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/docker-cli: fix version ldflags

The variables for the "docker version" output are located at $(DOCKER_CLI_GOMOD)/cli/version - correct the path to these in the ldflags to fix the following "unknown" lines in "docker version" output:

Client:

 Version:           unknown-version
 Git commit:        unknown-commit
 Built:             unknown-buildtime
---
 package/docker-cli/docker-cli.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
package/docker-cli/docker-cli.mk +2 -2
index 07700809d5..147807cfc9 100644
@@ -15,8 +15,8 @@ DOCKER_CLI_DEPENDENCIES = host-pkgconf
 
 DOCKER_CLI_GOMOD = github.com/docker/cli
 DOCKER_CLI_LDFLAGS = \
-	-X $(DOCKER_CLI_GOMOD).GitCommit=$(DOCKER_CLI_VERSION) \
-	-X $(DOCKER_CLI_GOMOD).Version=$(DOCKER_CLI_VERSION)
+	-X $(DOCKER_CLI_GOMOD)/cli/version.GitCommit=$(DOCKER_CLI_VERSION) \
+	-X $(DOCKER_CLI_GOMOD)/cli/version.Version=$(DOCKER_CLI_VERSION)
 
 DOCKER_CLI_BUILD_TARGETS = $(DOCKER_CLI_GOMOD)/cmd/docker
 DOCKER_CLI_TAGS = autogen
Signature · 1 line
2.28.0
#1 lore raw

PATCH 1/1 package/docker-cli: fix version ldflags

Quoted 21 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Christian" == Christian Stewart <[email protected]> writes:

The variables for the "docker version" output are located at $(DOCKER_CLI_GOMOD)/cli/version - correct the path to these in the ldflags to fix the following "unknown" lines in "docker version" output:

Client:

 Version:           unknown-version
 Git commit:        unknown-commit
 Built:             unknown-buildtime
---
 package/docker-cli/docker-cli.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
package/docker-cli/docker-cli.mk +0 -0
index 07700809d5..147807cfc9 100644

package/docker-cli/docker-cli.mk DOCKER_CLI_DEPENDENCIES = host-pkgconf · line 19

Quoted 7 lines
package/docker-cli/docker-cli.mk +2 -2
@@ -15,8 +15,8 @@ DOCKER_CLI_DEPENDENCIES = host-pkgconf
 
 DOCKER_CLI_GOMOD = github.com/docker/cli
 DOCKER_CLI_LDFLAGS = \
-	-X $(DOCKER_CLI_GOMOD).GitCommit=$(DOCKER_CLI_VERSION) \
-	-X $(DOCKER_CLI_GOMOD).Version=$(DOCKER_CLI_VERSION)
+	-X $(DOCKER_CLI_GOMOD)/cli/version.GitCommit=$(DOCKER_CLI_VERSION) \
+	-X $(DOCKER_CLI_GOMOD)/cli/version.Version=$(DOCKER_CLI_VERSION)

This seems to be against next. Please clearly mark such patches (E.G. using the --subject-prefix='PATCH-NEXT' argument to git send-email).

Master and LTS are also affected, so I sent a patch to fix it there as well:

https://patchwork.ozlabs.org/project/buildroot/patch/20200831065842.9869-1-peter at korsgaard.com/

Signature · 1 line
Bye, Peter Korsgaard