package/docker-containerd: fix version output ldflags
PATCH 1/5 package/docker-containerd: fix version output ldflags
From: Tian Yuanhao <[email protected]>
Fix the ldflags specifying the version info for "version" command.
--- package/docker-containerd/docker-containerd.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
package/docker-containerd/docker-containerd.mk +1 -1
@@ -12,7 +12,7 @@ DOCKER_CONTAINERD_LICENSE_FILES = LICENSE DOCKER_CONTAINERD_GOMOD = github.com/containerd/containerd DOCKER_CONTAINERD_LDFLAGS = \ - -X github.com/docker/containerd.GitCommit=$(DOCKER_CONTAINERD_VERSION) + -X $(DOCKER_CONTAINERD_GOMOD)/version.Version=$(DOCKER_CONTAINERD_VERSION) DOCKER_CONTAINERD_BUILD_TARGETS = cmd/ctr cmd/containerd cmd/containerd-shim
Signature · 1 line
2.28.0
PATCH 2/5 package/runc: fix version output ldflags
Fix the ldflags specifying the version info for "version" command.
--- package/runc/runc.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
package/runc/runc.mk +1 -1
@@ -9,7 +9,7 @@ RUNC_SITE = $(call github,opencontainers,runc,v$(RUNC_VERSION)) RUNC_LICENSE = Apache-2.0 RUNC_LICENSE_FILES = LICENSE -RUNC_LDFLAGS = -X main.gitCommit=$(RUNC_VERSION) +RUNC_LDFLAGS = -X main.version=$(RUNC_VERSION) RUNC_TAGS = cgo static_build ifeq ($(BR2_PACKAGE_LIBSECCOMP),y)
Signature · 1 line
2.28.0
Thomas Petazzoni
AppliedPATCH 2/5 package/runc: fix version output ldflags
Quoted 7 lines · On Wed, 16 Dec 2020 00:00:09 -0800 Christian Stewart <[email protected]> wrote:
Fix the ldflags specifying the version info for "version" command.
Signed-off-by Christian Stewart <[email protected]>Signed-off-by Tian Yuanhao <[email protected]>--- package/runc/runc.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to master, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 2/5 package/runc: fix version output ldflags
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
On Wed, 16 Dec 2020 00:00:09 -0800
Christian Stewart <[email protected]> wrote:
Quoted 7 lines
Quoted 7 lines
Fix the ldflags specifying the version info for "version" command.
Signed-off-by Christian Stewart <[email protected]>Signed-off-by Tian Yuanhao <[email protected]>---
package/runc/runc.mk| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)
Committed to 2020.02.x and 2020.11.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 3/5 package/docker-containerd: specify correct build targets
In reply to Christian StewartAdds build targets "ctr" cli and runc shims.
Removes the outdated and now unnecessary symlinks to docker-runc docker-containerd etc as well.
--- .../docker-containerd/docker-containerd.mk | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-)
package/docker-containerd/docker-containerd.mk +8 -11
@@ -11,13 +11,16 @@ DOCKER_CONTAINERD_LICENSE_FILES = LICENSE DOCKER_CONTAINERD_GOMOD = github.com/containerd/containerd +DOCKER_CONTAINERD_BUILD_TARGETS = \ + cmd/containerd \ + cmd/containerd-shim \ + cmd/containerd-shim-runc-v1 \ + cmd/containerd-shim-runc-v2 \ + cmd/ctr + DOCKER_CONTAINERD_LDFLAGS = \ -X $(DOCKER_CONTAINERD_GOMOD)/version.Version=$(DOCKER_CONTAINERD_VERSION) -DOCKER_CONTAINERD_BUILD_TARGETS = cmd/ctr cmd/containerd cmd/containerd-shim - -DOCKER_CONTAINERD_INSTALL_BINS = containerd containerd-shim - ifeq ($(BR2_PACKAGE_LIBSECCOMP),y) DOCKER_CONTAINERD_DEPENDENCIES += libseccomp host-pkgconf DOCKER_CONTAINERD_TAGS += seccomp
@@ -29,12 +32,6 @@ else DOCKER_CONTAINERD_TAGS += no_btrfs endif -define DOCKER_CONTAINERD_INSTALL_SYMLINKS - ln -fs runc $(TARGET_DIR)/usr/bin/docker-runc - ln -fs containerd-shim $(TARGET_DIR)/usr/bin/docker-containerd-shim - ln -fs containerd $(TARGET_DIR)/usr/bin/docker-containerd -endef - -DOCKER_CONTAINERD_POST_INSTALL_TARGET_HOOKS += DOCKER_CONTAINERD_INSTALL_SYMLINKS +DOCKER_CONTAINERD_INSTALL_BINS = $(notdir $(DOCKER_CONTAINERD_BUILD_TARGETS)) $(eval $(golang-package))
Signature · 1 line
2.28.0
PATCH 3/5 package/docker-containerd: specify correct build targets
Quoted 1 line · On Wed, 16 Dec 2020 00:00:10 -0800 Christian Stewart <[email protected]> wrote:
Adds build targets "ctr" cli and runc shims.
ctr was already in the list of build targets:
-DOCKER_CONTAINERD_BUILD_TARGETS = cmd/ctr cmd/containerd cmd/containerd-shim
So I've amended the commit log, and applied. Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 4/5 package/docker-cli: bump version to 20.10.1
In reply to Christian Stewart--- package/docker-cli/docker-cli.hash | 2 +- package/docker-cli/docker-cli.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
package/docker-cli/docker-cli.hash +1 -1
@@ -1,3 +1,3 @@ # Locally calculated -sha256 21b88a00e8f7a3194c0ae1de5a31e3e1728ef6aa2804158dcb502a8b5fd6ae2b docker-cli-19.03.13.tar.gz +sha256 4ee7cc9c3f6287ca834166aaa1a945790c54d9a8345a1b449a193d9c739f2a7d docker-cli-20.10.1.tar.gz sha256 2d81ea060825006fc8f3fe28aa5dc0ffeb80faf325b612c955229157b8c10dc0 LICENSE
package/docker-cli/docker-cli.mk +1 -1
@@ -4,7 +4,7 @@ # ################################################################################ -DOCKER_CLI_VERSION = 19.03.13 +DOCKER_CLI_VERSION = 20.10.1 DOCKER_CLI_SITE = $(call github,docker,cli,v$(DOCKER_CLI_VERSION)) DOCKER_CLI_LICENSE = Apache-2.0
Signature · 1 line
2.28.0
Thomas Petazzoni
AppliedPATCH 4/5 package/docker-cli: bump version to 20.10.1
Quoted 5 lines · On Wed, 16 Dec 2020 00:00:11 -0800 Christian Stewart <[email protected]> wrote:
Signed-off-by Christian Stewart <[email protected]>--- package/docker-cli/docker-cli.hash | 2 +- package/docker-cli/docker-cli.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Applied to master, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 5/5 package/docker-engine: bump version to 20.10.1
In reply to Christian StewartAdditionally, fix the ldflags specification of the package version.
The "autogen" script does not actually configure anything anymore, and instead exports a LDFLAGS environment variable which we can't use. Instead, specify the version information via LDFLAGS directly in the Buildroot makefile, similar to containerd and other packages.
--- package/docker-engine/docker-engine.hash | 2 +- package/docker-engine/docker-engine.mk | 25 +++++++++--------------- 2 files changed, 10 insertions(+), 17 deletions(-)
package/docker-engine/docker-engine.hash +1 -1
@@ -1,3 +1,3 @@ # Locally calculated -sha256 f43331fef1d24e31f43392fc1fed72b48fc17fd432d341d6eb1f68ca11383406 docker-engine-19.03.13.tar.gz +sha256 f0fda46a82bf8f624eb349370358891d3bc65ef3e320675226f17dba8f62566d docker-engine-20.10.1.tar.gz sha256 7c87873291f289713ac5df48b1f2010eb6963752bbd6b530416ab99fc37914a8 LICENSE
package/docker-engine/docker-engine.mk +9 -16
@@ -4,7 +4,7 @@ # ################################################################################ -DOCKER_ENGINE_VERSION = 19.03.13 +DOCKER_ENGINE_VERSION = 20.10.1 DOCKER_ENGINE_SITE = $(call github,moby,moby,v$(DOCKER_ENGINE_VERSION)) DOCKER_ENGINE_LICENSE = Apache-2.0
@@ -13,13 +13,16 @@ DOCKER_ENGINE_LICENSE_FILES = LICENSE DOCKER_ENGINE_DEPENDENCIES = host-pkgconf DOCKER_ENGINE_GOMOD = github.com/docker/docker -DOCKER_ENGINE_LDFLAGS = \ - -X main.GitCommit=$(DOCKER_ENGINE_VERSION) \ - -X main.Version=$(DOCKER_ENGINE_VERSION) - -DOCKER_ENGINE_TAGS = cgo exclude_graphdriver_zfs autogen +DOCKER_ENGINE_TAGS = cgo exclude_graphdriver_zfs DOCKER_ENGINE_BUILD_TARGETS = cmd/dockerd +DOCKER_ENGINE_LDFLAGS = \ + -X $(DOCKER_ENGINE_GOMOD)/dockerversion.BuildTime="" \ + -X $(DOCKER_ENGINE_GOMOD)/dockerversion.GitCommit="buildroot" \ + -X $(DOCKER_ENGINE_GOMOD)/dockerversion.IAmStatic="false" \ + -X $(DOCKER_ENGINE_GOMOD)/dockerversion.InitCommitID="" \ + -X $(DOCKER_ENGINE_GOMOD)/dockerversion.Version="$(DOCKER_ENGINE_VERSION)" + ifeq ($(BR2_PACKAGE_LIBSECCOMP),y) DOCKER_ENGINE_TAGS += seccomp DOCKER_ENGINE_DEPENDENCIES += libseccomp
@@ -53,16 +56,6 @@ endif DOCKER_ENGINE_INSTALL_BINS = $(notdir $(DOCKER_ENGINE_BUILD_TARGETS)) -define DOCKER_ENGINE_RUN_AUTOGEN - cd $(@D) && \ - BUILDTIME="$$(date)" \ - VERSION="$(patsubst v%,%,$(DOCKER_ENGINE_VERSION))" \ - PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" $(TARGET_MAKE_ENV) \ - bash ./hack/make/.go-autogen -endef - -DOCKER_ENGINE_POST_CONFIGURE_HOOKS += DOCKER_ENGINE_RUN_AUTOGEN - define DOCKER_ENGINE_INSTALL_INIT_SYSTEMD $(INSTALL) -D -m 0644 $(@D)/contrib/init/systemd/docker.service \ $(TARGET_DIR)/usr/lib/systemd/system/docker.service
Signature · 1 line
2.28.0
PATCH 5/5 package/docker-engine: bump version to 20.10.1
Hi Christian,
After applying this series of patches, the output is as follows:
??? # docker version
??? Client:
??? ?Version:?????????? 20.10.1
??? ?Git commit:??????? 20.10.1
??? ?Built:???????????? unknown-buildtime
??? Server:
??? ?Engine:
??? ? Version:????????? 20.10.1
??? ? Git commit:?????? buildroot
??? ? Built:
??? ?containerd:
??? ? Version:????????? 1.4.3
??? ? GitCommit:
??? ?runc:
??? ? Version:????????? 1.0.0-rc92
??? ? GitCommit:
??? ?docker-init:
??? ? Version:????????? 0.19.0
??? ? GitCommit:
To make the output more consistent, I suggest setting both BuildTime and GitCommit empty.
Regards, Yuanhao
Thomas Petazzoni
AppliedPATCH 5/5 package/docker-engine: bump version to 20.10.1
In reply to Christian StewartQuoted 7 lines · On Wed, 16 Dec 2020 00:00:12 -0800 Christian Stewart <[email protected]> wrote:
Additionally, fix the ldflags specification of the package version.
The "autogen" script does not actually configure anything anymore, and instead exports a LDFLAGS environment variable which we can't use. Instead, specify the version information via LDFLAGS directly in the Buildroot makefile, similar to containerd and other packages.
Quoted 5 lines
Signed-off-by Christian Stewart <[email protected]>--- package/docker-engine/docker-engine.hash | 2 +- package/docker-engine/docker-engine.mk | 25 +++++++++--------------- 2 files changed, 10 insertions(+), 17 deletions(-)
Applied to master, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 1/1 package/delve: new package
In reply to Christian StewartDelve is a debugger for the Go programming language.
--- DEVELOPERS | 1 + package/Config.in | 1 + package/delve/Config.in | 18 ++++++++++++++++++ package/delve/delve.hash | 3 +++ package/delve/delve.mk | 21 +++++++++++++++++++++ 5 files changed, 44 insertions(+) create mode 100644 package/delve/Config.in create mode 100644 package/delve/delve.hash create mode 100644 package/delve/delve.mk
DEVELOPERS +1 -0
@@ -505,6 +505,7 @@ F: linux/linux-ext-aufs.mk F: package/aufs/ F: package/aufs-util/ F: package/batman-adv/ +F: package/delve/ F: package/docker-cli/ F: package/docker-containerd/ F: package/docker-engine/
package/Config.in +1 -0
@@ -88,6 +88,7 @@ menu "Debugging, profiling and benchmark" source "package/cache-calibrator/Config.in" source "package/clinfo/Config.in" source "package/dacapo/Config.in" + source "package/delve/Config.in" source "package/dhrystone/Config.in" source "package/dieharder/Config.in" source "package/dmalloc/Config.in"
package/delve/Config.in new file +18 -0
@@ -0,0 +1,18 @@ +config BR2_PACKAGE_DELVE + bool "delve" + depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS + depends on BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_TOOLCHAIN_USES_GLIBC # go, cgo + depends on !BR2_TOOLCHAIN_USES_UCLIBC # go + depends on BR2_USE_MMU # go + help + Delve is a debugger for the Go programming language. + + https://github.com/go-delve/delve + +comment "delve needs a glibc toolchain w/ threads" + depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS + depends on BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS + depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAIN_USES_GLIBC + depends on BR2_USE_MMU
package/delve/delve.hash new file +3 -0
@@ -0,0 +1,3 @@ +# Locally calculated +sha256 f8bbaecdfc9d1ff6148900d3dea44b6dd06a7f0197be4e9a75c289b7f62682ab delve-1.5.0.tar.gz +sha256 778864b990007e8cef6633f8c372dd05bac1fada6cf67b008afb1483f83b38f5 LICENSE
package/delve/delve.mk new file +21 -0
@@ -0,0 +1,21 @@ +################################################################################ +# +# delve +# +################################################################################ + +DELVE_VERSION = 1.5.0 +DELVE_SITE = $(call github,go-delve,delve,v$(DELVE_VERSION)) + +DELVE_LICENSE = MIT +DELVE_LICENSE_FILES = LICENSE + +DELVE_DEPENDENCIES = host-pkgconf + +DELVE_TAGS = cgo + +DELVE_BUILD_TARGETS = cmd/dlv + +DELVE_INSTALL_BINS = $(notdir $(DELVE_BUILD_TARGETS)) + +$(eval $(golang-package))
Signature · 1 line
2.28.0
PATCH 1/1 package/delve: new package
Hello Christian,
PLEASE try to trim down your CC list! I am definitely not interested in Go related packages!
Regards,
Peter
Quoted 98 lines · Christian Stewart
Delve is a debugger for the Go programming language.
Signed-off-by Christian Stewart <[email protected]>--- DEVELOPERS | 1 + package/Config.in | 1 + package/delve/Config.in | 18 ++++++++++++++++++ package/delve/delve.hash | 3 +++ package/delve/delve.mk | 21 +++++++++++++++++++++ 5 files changed, 44 insertions(+) create mode 100644 package/delve/Config.in create mode 100644 package/delve/delve.hash create mode 100644 package/delve/delve.mkDEVELOPERS +1
-0@@ -505,6 +505,7 @@ F: linux/linux-ext-aufs.mk F: package/aufs/ F: package/aufs-util/ F: package/batman-adv/ +F: package/delve/ F: package/docker-cli/ F: package/docker-containerd/ F: package/docker-engine/package/Config.in +1
-0@@ -88,6 +88,7 @@ menu "Debugging, profiling and benchmark" source "package/cache-calibrator/Config.in" source "package/clinfo/Config.in" source "package/dacapo/Config.in" + source "package/delve/Config.in" source "package/dhrystone/Config.in" source "package/dieharder/Config.in" source "package/dmalloc/Config.in"package/delve/Config.in new file +18
-0@@ -0,0 +1,18 @@ +config BR2_PACKAGE_DELVE + bool "delve" + depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS + depends on BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_TOOLCHAIN_USES_GLIBC # go, cgo + depends on !BR2_TOOLCHAIN_USES_UCLIBC # go + depends on BR2_USE_MMU # go + help + Delve is a debugger for the Go programming language. + + https://github.com/go-delve/delve + +comment "delve needs a glibc toolchain w/ threads" + depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS + depends on BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS + depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAIN_USES_GLIBC + depends on BR2_USE_MMUpackage/delve/delve.hash new file +3
-0@@ -0,0 +1,3 @@ +# Locally calculated +sha256 f8bbaecdfc9d1ff6148900d3dea44b6dd06a7f0197be4e9a75c289b7f62682ab delve-1.5.0.tar.gz +sha256 778864b990007e8cef6633f8c372dd05bac1fada6cf67b008afb1483f83b38f5 LICENSEpackage/delve/delve.mk new file +21
-0@@ -0,0 +1,21 @@ +################################################################################ +# +# delve +# +################################################################################ + +DELVE_VERSION = 1.5.0 +DELVE_SITE = $(call github,go-delve,delve,v$(DELVE_VERSION)) + +DELVE_LICENSE = MIT +DELVE_LICENSE_FILES = LICENSE + +DELVE_DEPENDENCIES = host-pkgconf + +DELVE_TAGS = cgo + +DELVE_BUILD_TARGETS = cmd/dlv + +DELVE_INSTALL_BINS = $(notdir $(DELVE_BUILD_TARGETS)) + +$(eval $(golang-package))
PATCH 1/1 package/delve: new package
In reply to Christian StewartHello Christian,
Quoted 3 lines · On Wed, 16 Dec 2020 00:00:13 -0800 Christian Stewart <[email protected]> wrote:
Delve is a debugger for the Go programming language.
Signed-off-by Christian Stewart <[email protected]>
I have applied, but after doing some changes. See below.
package/delve/Config.in line 7
Quoted 13 lines
package/delve/Config.in new file +7
-0@@ -0,0 +1,18 @@ +config BR2_PACKAGE_DELVE + bool "delve" + depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS + depends on BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_TOOLCHAIN_USES_GLIBC # go, cgo + depends on !BR2_TOOLCHAIN_USES_UCLIBC # go
There is no such dependency on glibc && !uclibc in Go.
package/delve/Config.in line 8
Quoted 1 line
package/delve/Config.in new file +1
-0+ depends on BR2_USE_MMU # go
There is no dependency on BR2_USE_MMU in Go.
So both of these do not make sense. However, delve has indeed a limited set of CPU architectures it supports. Apparently, just aarch64, i386 and x86-64, according to pkg/proc/native/support_sentinel.go in the code base.
So I've replaced the Config.in file with this:
# Supported architectures are listed in
# pkg/proc/native/support_sentinel.go
config BR2_PACKAGE_DELVE_ARCH_SUPPORTS
bool
default y if BR2_aarch64
default y if BR2_i386
default y if BR2_x86_64
depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS
depends on BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTSconfig BR2_PACKAGE_DELVE
bool "delve"
depends on BR2_PACKAGE_DELVE_ARCH_SUPPORTS depends on BR2_TOOLCHAIN_HAS_THREADS
help
Delve is a debugger for the Go programming language.
https://github.com/go-delve/delve
comment "delve needs a toolchain w/ threads"
depends on BR2_PACKAGE_DELVE_ARCH_SUPPORTS depends on !BR2_TOOLCHAIN_HAS_THREADS
I have verified that it builds fine on uClibc/i386 and musl/aarch64 for example, which confirms that the glibc && !uclibc dependency was not correct.
Applied with this fixed. Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Thomas Petazzoni
AppliedPATCH 1/5 package/docker-containerd: fix version output ldflags
In reply to Christian StewartQuoted 9 lines · On Wed, 16 Dec 2020 00:00:08 -0800 Christian Stewart <[email protected]> wrote:
From: Tian Yuanhao <[email protected]>
Fix the ldflags specifying the version info for "version" command.
Signed-off-by Christian Stewart <[email protected]>Signed-off-by Tian Yuanhao <[email protected]>--- package/docker-containerd/docker-containerd.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to master, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 1/5 package/docker-containerd: fix version output ldflags
Quoted 9 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
Quoted 4 lines · On Wed, 16 Dec 2020 00:00:08 -0800 Christian Stewart <[email protected]> wrote:
From: Tian Yuanhao <[email protected]>
Fix the ldflags specifying the version info for "version" command.
Quoted 7 lines
Quoted 5 lines
Signed-off-by Christian Stewart <[email protected]>Signed-off-by Tian Yuanhao <[email protected]>---
package/docker-containerd/docker-containerd.mk| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)Applied to master, thanks.
Committed to 2020.11.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard