Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 644276 - app-emulation/docker-17.12.0: docker daemon doesn't have the version number
Summary: app-emulation/docker-17.12.0: docker daemon doesn't have the version number
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Tianon
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2018-01-12 02:44 UTC by Edward Jee
Modified: 2018-01-19 15:55 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
A suggested patch (0001-app-emulation-docker-Fix-daemon-versioning.patch,9.58 KB, patch)
2018-01-12 02:50 UTC, Edward Jee
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Edward Jee 2018-01-12 02:44:41 UTC
After docker-17.12.0 is installed, the command "dockerd --version" says the version is "dev". This should be "17.12.0-ce".

This is because the environment variable $VERSION is not defined when building the docker daemon using components/engine/hack/make.sh .

Before running "./hack/make.sh dynbinary", probably we need something like

  export VERSION=$(cat VERSION)


(before "pushd components/engine")

I tried the following change and it fixed the problem.



--- a/app-emulation/docker/docker-17.12.0-r1.ebuild
+++ b/app-emulation/docker/docker-17.12.0-r2.ebuild
@@ -203,6 +203,8 @@ src_compile() {
        export CGO_CFLAGS="-I${ROOT}/usr/include"
        export CGO_LDFLAGS="-L${ROOT}/usr/$(get_libdir)"
 
+       export VERSION=$(cat VERSION)
+
        # if we're building from a tarball, we need the GITCOMMIT value
        [ "$DOCKER_GITCOMMIT" ] && export DOCKER_GITCOMMIT
 
@@ -244,7 +246,7 @@ src_compile() {
        # build cli
        emake \
                LDFLAGS="$(usex hardened '-extldflags -fno-PIC' '')" \
-               VERSION="$(cat ../../VERSION)" \
+               VERSION="${VERSION}" \
                GITCOMMIT="${DOCKER_GITCOMMIT}" \
                DISABLE_WARN_OUTSIDE_CONTAINER=1 \
                dynbinary || die
Comment 1 Edward Jee 2018-01-12 02:50:19 UTC
Created attachment 514430 [details, diff]
A suggested patch
Comment 2 Larry the Git Cow gentoo-dev 2018-01-19 15:55:56 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=33460236f3fdcec6d990916a9dc26fe52b4bf564

commit 33460236f3fdcec6d990916a9dc26fe52b4bf564
Author:     Manuel Rüger <mrueg@gentoo.org>
AuthorDate: 2018-01-19 15:54:46 +0000
Commit:     Manuel Rüger <mrueg@gentoo.org>
CommitDate: 2018-01-19 15:55:13 +0000

    app-emulation/docker: Fix docker daemon version
    
    Thanks to Edward Jee
    
    Closes: https://bugs.gentoo.org/644276
    Package-Manager: Portage-2.3.19, Repoman-2.3.6

 app-emulation/docker/docker-17.12.0-r2.ebuild | 316 ++++++++++++++++++++++++++
 1 file changed, 316 insertions(+)