Add buildroot 2018-02

This commit is contained in:
Pascal Vizeli
2018-03-17 23:47:00 +00:00
parent 3776c47f83
commit 67742041ad
10007 changed files with 405098 additions and 0 deletions

View File

@@ -0,0 +1,97 @@
config BR2_PACKAGE_DOCKER_ENGINE
bool "docker-engine"
depends on BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS
depends on BR2_PACKAGE_HOST_GO_CGO_LINKING_SUPPORTS
depends on BR2_TOOLCHAIN_HAS_THREADS
help
Docker is a platform to build, ship,
and run applications as lightweight containers.
https://github.com/docker/docker
if BR2_PACKAGE_DOCKER_ENGINE
config BR2_PACKAGE_DOCKER_ENGINE_DAEMON
bool "docker daemon"
default y
depends on BR2_USE_MMU # docker-containerd
select BR2_PACKAGE_DOCKER_CONTAINERD # runtime dependency
select BR2_PACKAGE_IPTABLES # runtime dependency
select BR2_PACKAGE_SQLITE # runtime dependency
help
Build the Docker system daemon.
If not selected, will build client only.
config BR2_PACKAGE_DOCKER_ENGINE_EXPERIMENTAL
bool "build experimental features"
config BR2_PACKAGE_DOCKER_ENGINE_STATIC_CLIENT
bool "build static client"
depends on !BR2_STATIC_LIBS
help
Build a static docker client.
if BR2_PACKAGE_DOCKER_ENGINE_DAEMON
choice
bool "docker-init to use"
default BR2_PACKAGE_DOCKER_ENGINE_INIT_TINI
help
The docker engine uses a minimal init process as PID 1
inside containers. There are several implementations
of this init process.
config BR2_PACKAGE_DOCKER_ENGINE_INIT_TINI
bool "tini"
select BR2_PACKAGE_TINI
help
Use Tini as the container init process.
https://github.com/krallin/tini
config BR2_PACKAGE_DOCKER_ENGINE_INIT_DUMB_INIT
bool "dumb-init"
select BR2_PACKAGE_DUMB_INIT
help
Use dumb-init as the container init process.
https://github.com/Yelp/dumb-init
endchoice
config BR2_PACKAGE_DOCKER_ENGINE_DRIVER_BTRFS
bool "btrfs filesystem driver"
depends on BR2_USE_MMU # btrfs-progs
depends on BR2_TOOLCHAIN_HAS_THREADS # btrfs-progs
select BR2_PACKAGE_BTRFS_PROGS
help
Build the btrfs filesystem driver for Docker.
config BR2_PACKAGE_DOCKER_ENGINE_DRIVER_DEVICEMAPPER
bool "devicemapper filesystem driver"
depends on BR2_TOOLCHAIN_HAS_THREADS # lvm2
depends on BR2_USE_MMU # lvm2
depends on !BR2_STATIC_LIBS # lvm2
depends on !BR2_TOOLCHAIN_USES_MUSL # lvm2
select BR2_PACKAGE_LVM2
select BR2_PACKAGE_LVM2_APP_LIBRARY
help
Build the devicemapper filesystem driver for Docker.
config BR2_PACKAGE_DOCKER_ENGINE_DRIVER_VFS
bool "vfs filesystem driver"
depends on BR2_USE_WCHAR # gvfs
depends on BR2_USE_MMU # gvfs
depends on BR2_TOOLCHAIN_HAS_THREADS # gvfs
select BR2_PACKAGE_GVFS
help
Build the vfs filesystem driver for Docker.
endif
endif
comment "docker-engine needs a toolchain w/ threads"
depends on BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS
depends on BR2_PACKAGE_HOST_GO_CGO_LINKING_SUPPORTS
depends on !BR2_TOOLCHAIN_HAS_THREADS

View File

@@ -0,0 +1,2 @@
# Locally calculated
sha256 e4b58c26c05a800d96d3e5d76375654751d4d1367b5727c798369cf3c78a590e docker-engine-v17.12.1-ce.tar.gz

View File

@@ -0,0 +1,143 @@
################################################################################
#
# docker-engine
#
################################################################################
DOCKER_ENGINE_VERSION = v17.12.1-ce
DOCKER_ENGINE_SITE = $(call github,docker,docker-ce,$(DOCKER_ENGINE_VERSION))
DOCKER_ENGINE_LICENSE = Apache-2.0
DOCKER_ENGINE_LICENSE_FILES = LICENSE
DOCKER_ENGINE_DEPENDENCIES = host-go host-pkgconf
DOCKER_ENGINE_GOPATH = "$(@D)/gopath"
DOCKER_ENGINE_MAKE_ENV = $(HOST_GO_TARGET_ENV) \
CGO_ENABLED=1 \
CGO_NO_EMULATION=1 \
GOBIN="$(@D)/bin" \
GOPATH="$(DOCKER_ENGINE_GOPATH)" \
PKG_CONFIG="$(PKG_CONFIG)" \
$(TARGET_MAKE_ENV)
DOCKER_ENGINE_GLDFLAGS = \
-X main.GitCommit=$(DOCKER_ENGINE_VERSION) \
-X main.Version=$(DOCKER_ENGINE_VERSION) \
-X github.com/docker/cli/cli.GitCommit=$(DOCKER_ENGINE_VERSION) \
-X github.com/docker/cli/cli.Version=$(DOCKER_ENGINE_VERSION)
DOCKER_ENGINE_BUILD_TAGS = cgo exclude_graphdriver_zfs autogen
DOCKER_ENGINE_BUILD_TARGETS = cli:docker
DOCKER_ENGINE_BUILD_TARGET_PARSE = \
export targetpkg=$$(echo $(target) | cut -d: -f1); \
export targetbin=$$(echo $(target) | cut -d: -f2)
ifeq ($(BR2_STATIC_LIBS),y)
DOCKER_ENGINE_GLDFLAGS += -extldflags '-static'
DOCKER_ENGINE_BUILD_TAGS += static_build
else
ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_STATIC_CLIENT),y)
DOCKER_ENGINE_GLDFLAGS_DOCKER += -extldflags '-static'
endif
endif
ifeq ($(BR2_PACKAGE_LIBSECCOMP),y)
DOCKER_ENGINE_BUILD_TAGS += seccomp
DOCKER_ENGINE_DEPENDENCIES += libseccomp
endif
ifeq ($(BR2_INIT_SYSTEMD),y)
DOCKER_ENGINE_DEPENDENCIES += systemd
DOCKER_ENGINE_BUILD_TAGS += systemd journald
endif
ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_DAEMON),y)
DOCKER_ENGINE_BUILD_TAGS += daemon
DOCKER_ENGINE_BUILD_TARGETS += docker:dockerd
ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_INIT_DUMB_INIT),y)
DOCKER_ENGINE_INIT = dumb-init
else
DOCKER_ENGINE_INIT = tini
endif
endif
ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_EXPERIMENTAL),y)
DOCKER_ENGINE_BUILD_TAGS += experimental
endif
ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_DRIVER_BTRFS),y)
DOCKER_ENGINE_DEPENDENCIES += btrfs-progs
else
DOCKER_ENGINE_BUILD_TAGS += exclude_graphdriver_btrfs
endif
ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_DRIVER_DEVICEMAPPER),y)
DOCKER_ENGINE_DEPENDENCIES += lvm2
else
DOCKER_ENGINE_BUILD_TAGS += exclude_graphdriver_devicemapper
endif
ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_DRIVER_VFS),y)
DOCKER_ENGINE_DEPENDENCIES += gvfs
else
DOCKER_ENGINE_BUILD_TAGS += exclude_graphdriver_vfs
endif
define DOCKER_ENGINE_CONFIGURE_CMDS
mkdir -p $(DOCKER_ENGINE_GOPATH)/src/github.com/docker
ln -fs $(@D)/components/engine $(DOCKER_ENGINE_GOPATH)/src/github.com/docker/docker
ln -fs $(@D)/components/cli $(DOCKER_ENGINE_GOPATH)/src/github.com/docker/cli
cd $(@D)/components/engine && \
BUILDTIME="$$(date)" \
IAMSTATIC="true" \
VERSION="$(patsubst v%,%,$(DOCKER_ENGINE_VERSION))" \
PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" $(TARGET_MAKE_ENV) \
bash ./hack/make/.go-autogen
endef
ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_DAEMON),y)
define DOCKER_ENGINE_INSTALL_INIT_SYSTEMD
$(INSTALL) -D -m 0644 $(@D)/components/engine/contrib/init/systemd/docker.service \
$(TARGET_DIR)/usr/lib/systemd/system/docker.service
$(INSTALL) -D -m 0644 $(@D)/components/engine/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_USERS
- - docker -1 * - - - Docker Application Container Framework
endef
endif
define DOCKER_ENGINE_BUILD_CMDS
$(foreach target,$(DOCKER_ENGINE_BUILD_TARGETS), \
$(DOCKER_ENGINE_BUILD_TARGET_PARSE); \
cd $(@D)/gopath/src/github.com/docker/$${targetpkg}; \
$(DOCKER_ENGINE_MAKE_ENV) \
$(HOST_DIR)/bin/go build -v \
-o $(@D)/bin/$${targetbin} \
-tags "$(DOCKER_ENGINE_BUILD_TAGS)" \
-ldflags "$(DOCKER_ENGINE_GLDFLAGS)" \
./cmd/$${targetbin}
)
endef
define DOCKER_ENGINE_INSTALL_TARGET_CMDS
$(foreach target,$(DOCKER_ENGINE_BUILD_TARGETS), \
$(DOCKER_ENGINE_BUILD_TARGET_PARSE); \
$(INSTALL) -D -m 0755 $(@D)/bin/$${targetbin} $(TARGET_DIR)/usr/bin/$${targetbin}
)
$(if $(filter $(BR2_PACKAGE_DOCKER_ENGINE_DAEMON),y), \
ln -fs $(DOCKER_ENGINE_INIT) $(TARGET_DIR)/usr/bin/docker-init
)
endef
$(eval $(generic-package))