[meta-virtualization] [PATCH] docker: update to docker 1.12.5 release

Bruce Ashfield bruce.ashfield at windriver.com
Mon Dec 19 06:02:06 PST 2016


On 2016-12-19 02:58 AM, Fathi Boudra wrote:
> * update description:
>   - reword docker officially supported hosts section
>   - bump minimal required kernel from 3.8 to 3.10
> * update SRCREV to match docker 1.12.5 tag
> * set GOHOSTOS and GOOS explicitely
> * use a switch to set GOARCH based on TARGET_ARCH value. It also allows to
>   tune arm architecture and set GOARM as appropriate.
> * add zfs graphdriver exclusion to DOCKER_BUILDTAGS

Is the zfs issue something new with 1.12.5 ? Or is it just due to
a different use case ?

I'd like to avoid mixing changes that are not related to the version
bump with the patch that does the bump .. since I've had no ends of
trouble with docker breaking on corner cases. Smaller patches let
me more easily bisect issues.

I was wondering the same thing about the GOHOSTOS/GOOS

> * cosmetic:
>   - align all the DEPENDS
>   - fix indentation in do_install(): space -> tab

We could/should probably split this into the uprev and then the
smaller patches

i.e.

  - version bump
  - doc/description update
  - zfs
  - go build cleanup and arch selection
  - cosmetic

If you don't think you'll have time to get to the split, I can have
a go at it myself .. just let me know so I can make the time to do
the split.

Thanks for the update, I was slowly getting around to doing this
myself so it is nice to get the patch.

Cheers,

Bruce

>
> Signed-off-by: Fathi Boudra <fathi.boudra at linaro.org>
> ---
>  recipes-containers/docker/docker_git.bb | 57 ++++++++++++++++++++++-----------
>  1 file changed, 38 insertions(+), 19 deletions(-)
>
> diff --git a/recipes-containers/docker/docker_git.bb b/recipes-containers/docker/docker_git.bb
> index 2cff6f1..6d7145e 100644
> --- a/recipes-containers/docker/docker_git.bb
> +++ b/recipes-containers/docker/docker_git.bb
> @@ -9,16 +9,16 @@ DESCRIPTION = "Linux container runtime \
>   large-scale web deployments, database clusters, continuous deployment \
>   systems, private PaaS, service-oriented architectures, etc. \
>   . \
> - This package contains the daemon and client. Using docker.io on non-amd64 \
> - hosts is not supported at this time. Please be careful when using it \
> - on anything besides amd64. \
> + This package contains the daemon and client. Using docker.io is \
> + officially supported on x86_64 and arm (32-bit) hosts. \
> + Other architectures are considered experimental. \
>   . \
> - Also, note that kernel version 3.8 or above is required for proper \
> + 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. \
>   "
>
> -SRCREV = "34d9a8240914d30f3a8fe28c1b7d1d4e36d0657b"
> +SRCREV = "7392c3b0ce0f9d3e918a321c66668c5d1ef4f689"
>  SRC_URI = "\
>  	git://github.com/docker/docker.git;nobranch=1 \
>  	file://docker.service \
> @@ -32,10 +32,11 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=aadc30f9c14d876ded7bedc0afd2d3d7"
>
>  S = "${WORKDIR}/git"
>
> -DOCKER_VERSION = "1.12.0"
> +DOCKER_VERSION = "1.12.5"
>  PV = "${DOCKER_VERSION}+git${SRCREV}"
>
> -DEPENDS = "go-cross \
> +DEPENDS = " \
> +    go-cross \
>      go-cli \
>      go-pty \
>      go-context \
> @@ -66,14 +67,32 @@ DOCKER_PKG="github.com/docker/docker"
>  do_configure[noexec] = "1"
>
>  do_compile() {
> -	export GOARCH="${TARGET_ARCH}"
> -	# supported amd64, 386, arm arm64
> -	if [ "${TARGET_ARCH}" = "x86_64" ]; then
> -		export GOARCH="amd64"
> -	fi
> -	if [ "${TARGET_ARCH}" = "aarch64" ]; then
> -		export GOARCH="arm64"
> -	fi
> +	GOHOSTOS="linux"
> +	GOOS="linux"
> +
> +	case "${TARGET_ARCH}" in
> +		arm)
> +			GOARCH=arm
> +			case "${TUNE_PKGARCH}" in
> +				cortexa*)
> +					export GOARM=7
> +				;;
> +			esac
> +		;;
> +		aarch64)
> +			GOARCH=arm64
> +		;;
> +		i586|i686)
> +			GOARCH=386
> +		;;
> +		x86_64)
> +			GOARCH=amd64
> +		;;
> +		*)
> +			GOARCH="${TARGET_ARCH}"
> +		;;
> +	esac
> +	export GOHOSTOS GOOS GOARCH
>
>  	# Set GOPATH. See 'PACKAGERS.md'. Don't rely on
>  	# docker to download its dependencies but rather
> @@ -92,7 +111,7 @@ do_compile() {
>  	export CGO_CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
>  	export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
>  	# in order to exclude devicemapper and btrfs - https://github.com/docker/docker/issues/14056
> -	export DOCKER_BUILDTAGS='exclude_graphdriver_btrfs exclude_graphdriver_devicemapper'
> +	export DOCKER_BUILDTAGS='exclude_graphdriver_zfs exclude_graphdriver_btrfs exclude_graphdriver_devicemapper'
>
>  	# this is the unsupported built structure
>  	# that doesn't rely on an existing docker
> @@ -121,9 +140,9 @@ do_install() {
>  		install -m 644 ${S}/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 ${WORKDIR}/docker.service ${D}/${systemd_unitdir}/system
> -        else
> -            install -d ${D}${sysconfdir}/init.d
> -            install -m 0755 ${WORKDIR}/docker.init ${D}${sysconfdir}/init.d/docker.init
> +	else
> +		install -d ${D}${sysconfdir}/init.d
> +		install -m 0755 ${WORKDIR}/docker.init ${D}${sysconfdir}/init.d/docker.init
>  	fi
>
>  	mkdir -p ${D}/usr/share/docker/
>



More information about the meta-virtualization mailing list