mirror of
https://github.com/MiyooCFW/buildroot.git
synced 2025-09-27 22:24:19 +03:00
Merge from bittboy/buildroot@26c91a9
This commit is contained in:
@@ -1,45 +0,0 @@
|
||||
From 324e7be4b252c13002bca6a9d82e7b2e43664634 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Stewart <christian@paral.in>
|
||||
Date: Mon, 26 Nov 2018 22:59:32 -0800
|
||||
Subject: [PATCH] Fix faulty runc version commit scrape
|
||||
|
||||
This commit replaces faulty logic to determine the runc version commit hash.
|
||||
|
||||
The original logic takes the second line of the output of "runc --version" and
|
||||
does not work if there are a different number of lines printed from the command
|
||||
than expected. The buildroot version of runc outputs two lines instead of the
|
||||
expected three, causing the error:
|
||||
|
||||
unknown output format: runc version commit: ...
|
||||
|
||||
This patch replaces this logic with a simple scan of the "runc --version"
|
||||
output, searching for the "runc version commit" prefixed line.
|
||||
|
||||
Signed-off-by: Christian Stewart <christian@paral.in>
|
||||
---
|
||||
daemon/info_unix.go | 9 +++++----
|
||||
1 file changed, 5 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/daemon/info_unix.go b/daemon/info_unix.go
|
||||
index 60b2f99870..688a510796 100644
|
||||
--- a/daemon/info_unix.go
|
||||
+++ b/daemon/info_unix.go
|
||||
@@ -32,10 +32,11 @@ func (daemon *Daemon) fillPlatformInfo(v *types.Info, sysInfo *sysinfo.SysInfo)
|
||||
defaultRuntimeBinary := daemon.configStore.GetRuntime(v.DefaultRuntime).Path
|
||||
if rv, err := exec.Command(defaultRuntimeBinary, "--version").Output(); err == nil {
|
||||
parts := strings.Split(strings.TrimSpace(string(rv)), "\n")
|
||||
- if len(parts) == 3 {
|
||||
- parts = strings.Split(parts[1], ": ")
|
||||
- if len(parts) == 2 {
|
||||
- v.RuncCommit.ID = strings.TrimSpace(parts[1])
|
||||
+ for _, pt := range parts {
|
||||
+ ptKv := strings.Split(pt, ":")
|
||||
+ if strings.HasSuffix(strings.TrimSpace(ptKv[0]), "commit") {
|
||||
+ v.RuncCommit.ID = strings.TrimSpace(ptKv[1])
|
||||
+ break
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.18.1
|
||||
|
||||
@@ -5,6 +5,7 @@ config BR2_PACKAGE_DOCKER_ENGINE
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS
|
||||
depends on !BR2_TOOLCHAIN_USES_UCLIBC # docker-containerd -> runc
|
||||
depends on BR2_USE_MMU # docker-containerd
|
||||
select BR2_PACKAGE_CGROUPFS_MOUNT if !BR2_PACKAGE_SYSTEMD # runtime dependency
|
||||
select BR2_PACKAGE_DOCKER_CONTAINERD # runtime dependency
|
||||
select BR2_PACKAGE_DOCKER_PROXY # runtime dependency
|
||||
select BR2_PACKAGE_IPTABLES # runtime dependency
|
||||
@@ -44,6 +45,7 @@ config BR2_PACKAGE_DOCKER_ENGINE_DRIVER_VFS
|
||||
depends on BR2_USE_WCHAR # gvfs
|
||||
depends on BR2_USE_MMU # gvfs
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS # gvfs
|
||||
depends on !BR2_STATIC_LIBS # gvfs
|
||||
select BR2_PACKAGE_GVFS
|
||||
help
|
||||
Build the vfs filesystem driver for Docker.
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
# Locally calculated
|
||||
sha256 b4f55831f5e7c5a92cd91f77aad1541ccd572eb18df2f44a01c372bceb3f9b6b docker-engine-18.09.7.tar.gz
|
||||
sha256 2d81ea060825006fc8f3fe28aa5dc0ffeb80faf325b612c955229157b8c10dc0 LICENSE
|
||||
sha256 858e4e74ee0097bcbdb71d737e268dfcfd1970efa4a1600354253b02fd403e39 docker-engine-19.03.12.tar.gz
|
||||
sha256 7c87873291f289713ac5df48b1f2010eb6963752bbd6b530416ab99fc37914a8 LICENSE
|
||||
|
||||
@@ -4,14 +4,14 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
DOCKER_ENGINE_VERSION = 18.09.7
|
||||
DOCKER_ENGINE_VERSION = 19.03.12
|
||||
DOCKER_ENGINE_SITE = $(call github,docker,engine,v$(DOCKER_ENGINE_VERSION))
|
||||
|
||||
DOCKER_ENGINE_LICENSE = Apache-2.0
|
||||
DOCKER_ENGINE_LICENSE_FILES = LICENSE
|
||||
|
||||
DOCKER_ENGINE_DEPENDENCIES = host-pkgconf
|
||||
DOCKER_ENGINE_SRC_SUBDIR = github.com/docker/docker
|
||||
DOCKER_ENGINE_GOMOD = github.com/docker/docker
|
||||
|
||||
DOCKER_ENGINE_LDFLAGS = \
|
||||
-X main.GitCommit=$(DOCKER_ENGINE_VERSION) \
|
||||
@@ -68,9 +68,6 @@ define DOCKER_ENGINE_INSTALL_INIT_SYSTEMD
|
||||
$(TARGET_DIR)/usr/lib/systemd/system/docker.service
|
||||
$(INSTALL) -D -m 0644 $(@D)/contrib/init/systemd/docker.socket \
|
||||
$(TARGET_DIR)/usr/lib/systemd/system/docker.socket
|
||||
mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/
|
||||
ln -fs ../../../../usr/lib/systemd/system/docker.service \
|
||||
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/docker.service
|
||||
endef
|
||||
|
||||
define DOCKER_ENGINE_INSTALL_INIT_SYSV
|
||||
@@ -82,4 +79,59 @@ define DOCKER_ENGINE_USERS
|
||||
- - docker -1 * - - - Docker Application Container Framework
|
||||
endef
|
||||
|
||||
ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_DRIVER_BTRFS),y)
|
||||
define DOCKER_ENGINE_DRIVER_BTRFS_LINUX_CONFIG_FIXUPS
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_BTRFS_FS)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_BTRFS_FS_POSIX_ACL)
|
||||
endef
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_DRIVER_DEVICEMAPPER),y)
|
||||
define DOCKER_ENGINE_DRIVER_DM_LINUX_CONFIG_FIXUPS
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_MD)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_BLK_DEV_DM)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_MD_THIN_PROVISIONING)
|
||||
endef
|
||||
endif
|
||||
|
||||
# based on contrib/check-config.sh
|
||||
define DOCKER_ENGINE_LINUX_CONFIG_FIXUPS
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_POSIX_MQUEUE)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_CGROUPS)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_MEMCG)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_CGROUP_SCHED)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_CGROUP_FREEZER)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_CPUSETS)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_CGROUP_DEVICE)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_CGROUP_CPUACCT)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_NAMESPACES)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_UTS_NS)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_IPC_NS)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_PID_NS)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_NET_NS)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_NETFILTER)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_NETFILTER_ADVANCED)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_BRIDGE_NETFILTER)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_NF_CONNTRACK)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_NETFILTER_XTABLES)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_NETFILTER_XT_MATCH_ADDRTYPE)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_NETFILTER_XT_MATCH_CONNTRACK)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_NETFILTER_XT_MATCH_IPVS)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_IP_NF_IPTABLES)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_IP_NF_FILTER)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_IP_NF_NAT)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_IP_NF_TARGET_MASQUERADE)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_BRIDGE)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_NET_CORE)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_DUMMY)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_MACVLAN)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_IPVLAN)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_VXLAN)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_VETH)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_OVERLAY_FS)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_KEYS)
|
||||
$(DOCKER_ENGINE_DRIVER_BTRFS_LINUX_CONFIG_FIXUPS)
|
||||
$(DOCKER_ENGINE_DRIVER_DM_LINUX_CONFIG_FIXUPS)
|
||||
endef
|
||||
|
||||
$(eval $(golang-package))
|
||||
|
||||
Reference in New Issue
Block a user