diff --git a/meta-lmp-base/recipes-containers/docker/docker-ce/0001-dynbinary-use-go-cross-compiler.patch b/meta-lmp-base/recipes-containers/docker/docker-ce/0001-dynbinary-use-go-cross-compiler.patch deleted file mode 100644 index 55fd83ccc1..0000000000 --- a/meta-lmp-base/recipes-containers/docker/docker-ce/0001-dynbinary-use-go-cross-compiler.patch +++ /dev/null @@ -1,114 +0,0 @@ -From 6c1d9dea0ef2000cdeec38b46d60b2db66160ed3 Mon Sep 17 00:00:00 2001 -From: Bruce Ashfield -Date: Tue, 30 Jun 2020 22:23:33 -0400 -Subject: [PATCH] dynbinary: use go cross compiler - -MJ: use ${GO} also in "go env" calls, because native go: - $ go env GOARM - 5 -while go cross compiler for my target: - $ ${GO} env GOARM - 7 -this can lead to: - error: switch '-mcpu=cortex-a9' conflicts with switch '-march=armv5t' [-Werror] - -but even after fixing it to use "better" -march it still doesn't match with -mcpu -set in our GOBUILDFLAGS, causing e.g.: - error: switch '-mcpu=cortex-a9' conflicts with switch '-march=armv7-a+simd' [-Werror] - -so drop CGO_CFLAGS/CGO_CXXFLAGS as in OE builds we don't need them -as long as ${GO} and GOBUILDFLAGS are respected - -it was added in: -https://github.com/moby/moby/commit/12558c8d6ea9f388b54eb94ba6b9eb4a9fc5c9f2 - -and it wasn't an issue before: -https://github.com/moby/moby/commit/8c12a6648b368cc2acaea0339d6c57c920ed265c - -because it was using 'case "${GOARM}" in' and ${GOARM} was empty in our builds - -Upstream-Status: Inappropriate [embedded specific] - -Signed-off-by: Martin Jansa -Signed-off-by: Bruce Ashfield ---- - hack/make/.binary | 37 ++++++++----------------------------- - 1 file changed, 8 insertions(+), 29 deletions(-) - -diff --git a/hack/make/.binary b/hack/make/.binary -index 1dc9eeb88a..5911f8be9d 100644 ---- a/hack/make/.binary -+++ b/hack/make/.binary -@@ -3,7 +3,7 @@ set -e - - # a helper to provide ".exe" when it's appropriate - binary_extension() { -- if [ "$(go env GOOS)" = 'windows' ]; then -+ if [ "$(${GO} env GOOS)" = 'windows' ]; then - echo -n '.exe' - fi - } -@@ -16,33 +16,12 @@ source "${MAKEDIR}/.go-autogen" - ( - export GOGC=${DOCKER_BUILD_GOGC:-1000} - -- if [ "$(go env GOOS)/$(go env GOARCH)" != "$(go env GOHOSTOS)/$(go env GOHOSTARCH)" ]; then -- # must be cross-compiling! -- if [ "$(go env GOOS)/$(go env GOARCH)" = "linux/arm" ]; then -- # specify name of the target ARM architecture -- case "$(go env GOARM)" in -- 5) -- export CGO_CFLAGS="-march=armv5t" -- export CGO_CXXFLAGS="-march=armv5t" -- ;; -- 6) -- export CGO_CFLAGS="-march=armv6" -- export CGO_CXXFLAGS="-march=armv6" -- ;; -- 7) -- export CGO_CFLAGS="-march=armv7-a" -- export CGO_CXXFLAGS="-march=armv7-a" -- ;; -- esac -- fi -- fi -- - # -buildmode=pie is not supported on Windows arm64 and Linux mips*, ppc64be - # https://github.com/golang/go/blob/go1.19.4/src/cmd/internal/sys/supported.go#L125-L132 - if ! [ "$DOCKER_STATIC" = "1" ]; then - # -buildmode=pie not supported when -race is enabled - if [[ " $BUILDFLAGS " != *" -race "* ]]; then -- case "$(go env GOOS)/$(go env GOARCH)" in -+ case "$(${GO} env GOOS)/$(${GO} env GOARCH)" in - windows/arm64 | linux/mips* | linux/ppc64) ;; - *) - BUILDFLAGS+=("-buildmode=pie") -@@ -66,11 +45,11 @@ source "${MAKEDIR}/.go-autogen" - # only necessary for non-sandboxed invocation where TARGETPLATFORM is empty - PLATFORM_NAME=$TARGETPLATFORM - if [ -z "$PLATFORM_NAME" ]; then -- PLATFORM_NAME="$(go env GOOS)/$(go env GOARCH)" -- if [ -n "$(go env GOARM)" ]; then -- PLATFORM_NAME+="/v$(go env GOARM)" -- elif [ -n "$(go env GOAMD64)" ] && [ "$(go env GOAMD64)" != "v1" ]; then -- PLATFORM_NAME+="/$(go env GOAMD64)" -+ PLATFORM_NAME="$(${GO} env GOOS)/$(${GO} env GOARCH)" -+ if [ -n "$(${GO} env GOARM)" ]; then -+ PLATFORM_NAME+="/v$(${GO} env GOARM)" -+ elif [ -n "$(${GO} env GOAMD64)" ] && [ "$(${GO} env GOAMD64)" != "v1" ]; then -+ PLATFORM_NAME+="/$(${GO} env GOAMD64)" - fi - fi - -@@ -82,7 +61,7 @@ source "${MAKEDIR}/.go-autogen" - if [ -n "$DOCKER_DEBUG" ]; then - set -x - fi -- ./hack/with-go-mod.sh go build -mod=vendor -modfile=vendor.mod -o "$DEST/$BINARY_FULLNAME" "${BUILDFLAGS[@]}" -ldflags "$LDFLAGS $LDFLAGS_STATIC $DOCKER_LDFLAGS" -gcflags="${GCFLAGS}" "$GO_PACKAGE" -+ ./hack/with-go-mod.sh ${GO} build -trimpath -mod=vendor -modfile=vendor.mod -o "$DEST/$BINARY_FULLNAME" "${BUILDFLAGS[@]}" -ldflags "$LDFLAGS $LDFLAGS_STATIC $DOCKER_LDFLAGS" -gcflags="${GCFLAGS}" "$GO_PACKAGE" - ) - - echo "Created binary: $DEST/$BINARY_FULLNAME" --- -2.34.1 - diff --git a/meta-lmp-base/recipes-containers/docker/docker-ce_git.bb b/meta-lmp-base/recipes-containers/docker/docker-ce_git.bb deleted file mode 100644 index 9aebdeb8d0..0000000000 --- a/meta-lmp-base/recipes-containers/docker/docker-ce_git.bb +++ /dev/null @@ -1,55 +0,0 @@ -HOMEPAGE = "http://www.docker.com" -SUMMARY = "Linux container runtime" -DESCRIPTION = "Linux container runtime \ - Docker complements kernel namespacing with a high-level API which \ - operates at the process level. It runs unix processes with strong \ - guarantees of isolation and repeatability across servers. \ - . \ - Docker is a great building block for automating distributed systems: \ - large-scale web deployments, database clusters, continuous deployment \ - systems, private PaaS, service-oriented architectures, etc. \ - . \ - This package contains the daemon and client, which are \ - officially supported on x86_64 and arm hosts. \ - Other architectures are considered experimental. \ - . \ - Also, note that kernel version 3.10 or above is required for proper \ - operation of the daemon process, and that any lower versions may have \ - subtle and/or glaring issues. \ - " - -# -# https://github.com/docker/docker-ce-packaging.git -# common.mk: -# DOCKER_CLI_REPO ?= https://github.com/docker/cli.git -# DOCKER_ENGINE_REPO ?= https://github.com/docker/docker.git -# REF ?= HEAD -# DOCKER_CLI_REF ?= $(REF) -# DOCKER_ENGINE_REF ?= $(REF) -# -# These follow the tags for our releases in the listed repositories -# so we get that tag, and make it our SRCREVS: -# - -SRCREV_docker = "fce6e0ca9bc000888de3daa157af14fa41fcd0ff" -SRCREV_cli = "29cf62922279a56e122dc132eb84fe98f61d5950" -SRCREV_FORMAT = "docker_cli" -SRC_URI = "\ - git://github.com/docker/docker.git;branch=25.0;name=docker;protocol=https \ - git://github.com/docker/cli;branch=25.0;name=cli;destsuffix=git/cli;protocol=https \ - file://0001-dynbinary-use-go-cross-compiler.patch;patchdir=src/import \ - file://0001-cli-use-external-GO111MODULE-and-cross-compiler.patch \ - " - -DOCKER_COMMIT = "${SRCREV_docker}" - -require docker.inc - -# Apache-2.0 for docker -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=4859e97a9c7780e77972d989f0823f28" - -DOCKER_VERSION = "25.0.2-ce" -PV = "${DOCKER_VERSION}+git${SRCREV_docker}" - -CVE_PRODUCT = "docker mobyproject:moby" diff --git a/meta-lmp-base/recipes-containers/docker/docker.inc b/meta-lmp-base/recipes-containers/docker/docker.inc deleted file mode 100644 index ea22b8231c..0000000000 --- a/meta-lmp-base/recipes-containers/docker/docker.inc +++ /dev/null @@ -1,178 +0,0 @@ -DEPENDS = " \ - go-cli \ - go-pty \ - go-context \ - go-mux \ - go-patricia \ - go-logrus \ - go-fsnotify \ - go-dbus \ - go-capability \ - go-systemd \ - btrfs-tools \ - sqlite3 \ - go-distribution \ - compose-file \ - go-connections \ - notary \ - grpc-go \ - libtool-native \ - libtool \ - libseccomp \ - " - -DEPENDS:append:class-target = " lvm2" -RDEPENDS:${PN} = "util-linux util-linux-unshare iptables \ - ${@bb.utils.contains('DISTRO_FEATURES', 'aufs', 'aufs-util', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', 'cgroup-lite', d)} \ - bridge-utils \ - ca-certificates \ - " -RDEPENDS:${PN} += "virtual-containerd virtual-runc" - -RRECOMMENDS:${PN} = "kernel-module-dm-thin-pool kernel-module-nf-nat kernel-module-nf-conntrack-netlink kernel-module-xt-addrtype kernel-module-xt-masquerade" - -PROVIDES += "virtual/docker" - -# we want all the docker variant recpes to be installable via "docker" -PACKAGE_NAME = "docker" -RPROVIDES:${PN} += "docker" -RPROVIDES:${PN}-dbg += "docker-dbg" -RPROVIDES:${PN}-dev += "docker-dev" -RPROVIDES:${PN}-contrip += "docker-dev" - -inherit pkgconfig -PACKAGECONFIG ??= "docker-init" -PACKAGECONFIG[docker-init] = ",,,docker-init" -PACKAGECONFIG[transient-config] = "transient-config" - - -GO_IMPORT = "import" -S = "${WORKDIR}/git" - - -inherit systemd update-rc.d -inherit go -inherit goarch -inherit pkgconfig - -do_configure[noexec] = "1" - -# Export for possible use in Makefiles, default value comes from go.bbclass -export GO_LINKSHARED - -DOCKER_PKG="github.com/docker/docker" -# in order to exclude devicemapper and btrfs - https://github.com/docker/docker/issues/14056 -BUILD_TAGS ?= "exclude_graphdriver_btrfs exclude_graphdriver_devicemapper" - -do_compile() { - # Set GOPATH. See 'PACKAGERS.md'. Don't rely on - # docker to download its dependencies but rather - # use dependencies packaged independently. - cd ${S}/src/import - rm -rf .gopath - mkdir -p .gopath/src/"$(dirname "${DOCKER_PKG}")" - ln -sf ../../../.. .gopath/src/"${DOCKER_PKG}" - - mkdir -p .gopath/src/github.com/docker - ln -sf ${WORKDIR}/git/cli .gopath/src/github.com/docker/cli - - export GOPATH="${S}/src/import/.gopath:${S}/src/import/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go" - export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go" - - # Pass the needed cflags/ldflags so that cgo - # can find the needed headers files and libraries - export GOARCH=${TARGET_GOARCH} - export CGO_ENABLED="1" - export CGO_CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_TARGET}" - export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}" - export DOCKER_BUILDTAGS='${BUILD_TAGS} ${PACKAGECONFIG_CONFARGS}' - export GO111MODULE=off - - export DISABLE_WARN_OUTSIDE_CONTAINER=1 - - cd ${S}/src/import/ - - # this is the unsupported built structure - # that doesn't rely on an existing docker - # to build this: - VERSION="${DOCKER_VERSION}" DOCKER_GITCOMMIT="${DOCKER_COMMIT}" ./hack/make.sh dynbinary - - # build the cli - cd ${S}/src/import/.gopath/src/github.com/docker/cli - export CFLAGS="" - export LDFLAGS="" - export DOCKER_VERSION=${DOCKER_VERSION} - VERSION="${DOCKER_VERSION}" DOCKER_GITCOMMIT="${DOCKER_COMMIT}" make dynbinary -} - -do_install() { - mkdir -p ${D}/${bindir} - cp ${WORKDIR}/git/cli/build/docker ${D}/${bindir}/docker - cp ${S}/src/import/bundles/dynbinary-daemon/dockerd ${D}/${bindir}/dockerd - cp ${S}/src/import/bundles/dynbinary-daemon/docker-proxy ${D}/${bindir}/docker-proxy - - if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then - install -d ${D}${systemd_unitdir}/system - install -m 644 ${S}/src/import/contrib/init/systemd/docker.* ${D}/${systemd_unitdir}/system - # replaces one copied from above with one that uses the local registry for a mirror - install -m 644 ${S}/src/import/contrib/init/systemd/docker.service ${D}/${systemd_unitdir}/system - rm -f ${D}/${systemd_unitdir}/system/docker.service.rpm - else - install -d ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/docker.init ${D}${sysconfdir}/init.d/docker.init - fi - # TLS key that docker creates at run-time if not found is what resides here - if ${@bb.utils.contains('PACKAGECONFIG','transient-config','true','false',d)}; then - install -d ${D}${sysconfdir} - ln -s ..${localstatedir}/run/docker ${D}${sysconfdir}/docker - else - install -d ${D}${sysconfdir}/docker - fi - - mkdir -p ${D}${datadir}/docker/ - install -m 0755 ${S}/src/import/contrib/check-config.sh ${D}${datadir}/docker/ -} - - -SYSTEMD_PACKAGES = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${PN}','',d)}" -SYSTEMD_SERVICE:${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','docker.socket','',d)}" -SYSTEMD_AUTO_ENABLE:${PN} = "enable" - -# inverted logic warning. We ony want the sysvinit init to be installed if systemd -# is NOT in the distro features -INITSCRIPT_PACKAGES += "${@bb.utils.contains('DISTRO_FEATURES','systemd','', '${PN}',d)}" -INITSCRIPT_NAME:${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','', 'docker.init',d)}" -INITSCRIPT_PARAMS:${PN} = "defaults" - -inherit useradd -USERADD_PACKAGES = "${PN}" -GROUPADD_PARAM:${PN} = "-r docker" - -COMPATIBLE_HOST = "^(?!(qemu)?mips).*" - -INSANE_SKIP:${PN} += "ldflags textrel" - -FILES:${PN} += "${systemd_unitdir}/system/* ${sysconfdir}/docker" - -PACKAGES =+ "${PN}-contrib" -FILES:${PN}-contrib += "${datadir}/docker/check-config.sh" -RDEPENDS:${PN}-contrib += "bash" - -# By the docker-packaging repository and https://docs.docker.com/engine/install/centos/#installation-methods -# docker is packaged by most distros with a split between the engine and the CLI. -# -# We do the same here, by introducing the -cli package -# -# But to keep existing use cases working, we also create a RDEPENDS between the main -# docker package (the engine) and the cli, so existing "docker" package installs will -# continue to work the same way. To have separate and non-redepending packages created -# set the DOCKER_UNIFIED_PACKAGE variable to False -# -PACKAGES =+ "${PN}-cli" -FILES:${PN}-cli += "${bindir}/docker" - -# set to "False" if packages should be generated for the cli and engine, and -# NOT rdepend to get a classic one-package install -DOCKER_UNIFIED_PACKAGE ?= "True" -RDEPENDS:${PN} += "${@bb.utils.contains("DOCKER_UNIFIED_PACKAGE", "True", "${PN}-cli", "", d)}"