Skip to content

[wip] docker: 17.03.2-ce -> 17.06.0-ce #27137

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 10, 2017

Conversation

vdemeester
Copy link
Member

@vdemeester vdemeester commented Jul 5, 2017

Signed-off-by: Vincent Demeester vincent@sbr.pm

Motivation for this change

Release of docker-ce happened and the repository where the release happens has changed 😅 …

It's still a WIP

  • because I'm getting an error I can't make sense of (and I don't see how to fix it)
/nix/store/bl48w7h24n6379fa200yv60n4pwynd9c-stdenv/setup: line 923: tracePhases: unbound variable
/nix/store/bl48w7h24n6379fa200yv60n4pwynd9c-stdenv/setup: line 125: showBuildStats: unbound variable
builder for ‘/nix/store/s67017nsynrhwipg9amhz1254z1245z0-docker-17.06.0-ce-rc2.drv’ failed with exit code 1
  • I need to update containerd (probably elsewhere)
Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

Sorry, something went wrong.

@vdemeester
Copy link
Member Author

/cc @offlinehacker @NeQuissimus 👼

containerdRev = "9048e5e50717ea4497b757314bad98ea3763c145";
containerdSha256 = "1r9xhvzzh7md08nqb0rbp5d1rdr7jylb3da954d0267i0kh2iksa";
docker_17_06 = dockerGen rec {
version = "17.06.0-ce-rc2";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We won't want RC2, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@NeQuissimus oh right, didn't update that yet.. was trying to figure out the errors before 😛

export VERSION="${version}"
source ./scripts/build/.variables
export CGO_ENABLED=1
go build -tags pkcs11 --ldflags "$LDFLAGS" github.com/docker/cli/cmd/docker
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am glad you did this, I hate figuring out GO things :D

@pSub pSub added the 8.has: package (update) This PR updates a package to a newer version label Jul 6, 2017
@NeQuissimus
Copy link
Member

I got it, I think :)

I don't seem to be able to post commits into here, so here is the diff you need to apply, @vdemeester

That weird error you were seeing was because components/cli/scripts/build/.variables does set -eu, which wrecks the rest of the build pretty good :)
Also, some of the files are in new locations, so I fixed up the installs.

diff --git a/pkgs/applications/virtualization/docker/default.nix b/pkgs/applications/virtualization/docker/default.nix
index 1fed24b14c..2eee6a4757 100644
--- a/pkgs/applications/virtualization/docker/default.nix
+++ b/pkgs/applications/virtualization/docker/default.nix
@@ -4,10 +4,6 @@
 , btrfs-progs, iptables, e2fsprogs, xz, utillinux, xfsprogs
 , procps
 }:
-
-# https://github.com/docker/docker/blob/master/project/PACKAGERS.md
-# https://github.com/docker/docker/blob/TAG/hack/dockerfile/binaries-commits
-
 with lib;
 
 rec {
@@ -78,25 +74,19 @@ rec {
       ++ optional (btrfs-progs == null) "exclude_graphdriver_btrfs"
       ++ optional (devicemapper == null) "exclude_graphdriver_devicemapper";
 
-    # systemd 230 no longer has libsystemd-journal as a separate entity from libsystemd
-    postPatch = ''
-      substituteInPlace ./components/engine/hack/make.sh                   --replace libsystemd-journal libsystemd
-      substituteInPlace ./components/engine/daemon/logger/journald/read.go --replace libsystemd-journal libsystemd
-    '';
-
     buildPhase = ''
       # build engine
-      patchShebangs .
       cd ./components/engine
       export AUTO_GOPATH=1
       export DOCKER_GITCOMMIT="${rev}"
       ./hack/make.sh dynbinary
       cd -
+
       # build cli
       cd ./components/cli
       # Mimic AUTO_GOPATH
       mkdir -p .gopath/src/github.com/docker/
-	    ln -sf $PWD .gopath/src/github.com/docker/cli
+      ln -sf $PWD .gopath/src/github.com/docker/cli
       export GOPATH="$PWD/.gopath:$GOPATH"
       export GITCOMMIT="${rev}"
       export VERSION="${version}"
@@ -104,7 +94,14 @@ rec {
       export CGO_ENABLED=1
       go build -tags pkcs11 --ldflags "$LDFLAGS" github.com/docker/cli/cmd/docker
       cd -
-      echo foo
+    '';
+
+    # systemd 230 no longer has libsystemd-journal as a separate entity from libsystemd
+    patchPhase = ''
+      patchShebangs .
+      substituteInPlace ./components/engine/hack/make.sh                   --replace libsystemd-journal libsystemd
+      substituteInPlace ./components/engine/daemon/logger/journald/read.go --replace libsystemd-journal libsystemd
+      substituteInPlace ./components/cli/scripts/build/.variables --replace "set -eu" ""
     '';
 
     outputs = ["out" "man"];
@@ -112,8 +109,7 @@ rec {
     extraPath = makeBinPath [ iproute iptables e2fsprogs xz xfsprogs procps utillinux ];
 
     installPhase = ''
-      echo bar
-      install -Dm755 ./components/engine/bundles/${version}/dynbinary-client/docker-${version} $out/libexec/docker/docker
+      install -Dm755 ./components/cli/docker $out/libexec/docker/docker
       install -Dm755 ./components/engine/bundles/${version}/dynbinary-daemon/dockerd-${version} $out/libexec/docker/dockerd
       makeWrapper $out/libexec/docker/docker $out/bin/docker \
         --prefix PATH : "$out/libexec/docker:$extraPath"
@@ -131,15 +127,15 @@ rec {
       install -Dm644 ./components/engine/contrib/init/systemd/docker.service $out/etc/systemd/system/docker.service
 
       # completion (cli)
-      install -Dm644 ./contrib/completion/bash/docker $out/share/bash-completion/completions/docker
-      install -Dm644 ./contrib/completion/fish/docker.fish $out/share/fish/vendor_completions.d/docker.fish
-      install -Dm644 ./contrib/completion/zsh/_docker $out/share/zsh/site-functions/_docker
+      install -Dm644 ./components/cli/contrib/completion/bash/docker $out/share/bash-completion/completions/docker
+      install -Dm644 ./components/cli/contrib/completion/fish/docker.fish $out/share/fish/vendor_completions.d/docker.fish
+      install -Dm644 ./components/cli/contrib/completion/zsh/_docker $out/share/zsh/site-functions/_docker
 
       # Include contributed man pages (cli)
-      man/md2man-all.sh -q
+      ./components/cli/man/md2man-all.sh -q
       manRoot="$man/share/man"
       mkdir -p "$manRoot"
-      for manDir in man/man?; do
+      for manDir in ./components/cli/man/man?; do
         manBase="$(basename "$manDir")" # "man1"
         for manFile in "$manDir"/*; do
           manName="$(basename "$manFile")" # "docker-build.1"
@@ -162,10 +158,12 @@ rec {
     };
   };
 
+  # https://github.com/docker/docker-ce/blob/v${version}/components/engine/hack/dockerfile/binaries-commits
+
   docker_17_06 = dockerGen rec {
-    version = "17.06.0-ce-rc2";
-    rev = "402dd4a9ea3802e45718f871b00efe52caae5108"; # git commit
-    sha256 = "05x7bzjwmnab4bnnbcqj7rrxhv16a0ys71xwskl5f7adm3ic696g";
+    version = "17.06.0-ce";
+    rev = "02c1d876176546b5f069dae758d6a7d2ead6bd48"; # git commit
+    sha256 = "0wrg4ygcq4c7f2bwa7pgc7y33idg0hijavx40588jaglz4k8sqpm";
     runcRev = "992a5be178a62e026f4069f443c6164912adbf09";
     runcSha256 = "0ylkbn5rprw5cgxazvrwj7balikpfm8vlybwdbfpwnsqk3gc6p8k";
     containerdRev = "cfb82a876ecc11b5ca0977d1733adbe58599088a";

Verified

This commit was signed with the committer’s verified signature. The key has expired.
vdemeester Vincent Demeester
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
@vdemeester vdemeester force-pushed the update-docker-1706 branch from 5f7c605 to ec57044 Compare July 10, 2017 07:58
@vdemeester
Copy link
Member Author

@NeQuissimus thanks a lot ! Updated and it is working 🌥 😎 👍. Also updated the man generation stuff.

@NeQuissimus NeQuissimus merged commit 37f59d2 into NixOS:master Jul 10, 2017
@vdemeester vdemeester deleted the update-docker-1706 branch July 10, 2017 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.has: package (update) This PR updates a package to a newer version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants