From 3d0968b53eb775c78d7ccc484052af95fdbbe77f Mon Sep 17 00:00:00 2001 From: Mark Vainomaa Date: Sun, 6 Jun 2021 14:24:26 +0300 Subject: [PATCH 1/5] docker: 20.10.6 -> 20.10.7 (cherry picked from commit ff2c16095d559ed0a89a972ed93faeb3f8e24749) --- pkgs/applications/virtualization/docker/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/virtualization/docker/default.nix b/pkgs/applications/virtualization/docker/default.nix index bec51af81ac..e746d17f55f 100644 --- a/pkgs/applications/virtualization/docker/default.nix +++ b/pkgs/applications/virtualization/docker/default.nix @@ -220,14 +220,14 @@ rec { # Get revisions from # https://github.com/moby/moby/tree/${version}/hack/dockerfile/install/* docker_20_10 = callPackage dockerGen rec { - version = "20.10.6"; + version = "20.10.7"; rev = "v${version}"; - sha256 = "15kknb26vyzjgqmn8r81a1sy1i5br6bvngqd5xljihppnxvp2gvl"; + sha256 = "1r854jrjph4v1n5lr82z0cl0241ycili4qr3qh3k3bmqx790cds3"; moby-src = fetchFromGitHub { owner = "moby"; repo = "moby"; rev = "v${version}"; - sha256 = "1l4ra9bsvydaxd2fy7dgxp7ynpp0mrlwvcdhxiafw596559ab6qk"; + sha256 = "0xhn11kgcbzda4z9j0rflvq0nfivizh3jrzhanwn5vnghafy4zqw"; }; runcRev = "b9ee9c6314599f1b4a7f497e1f1f856fe433d3b7"; # v1.0.0-rc95 runcSha256 = "18sbvmlvb6kird4w3rqsfrjdj7n25firabvdxsl0rxjfy9r1g2xb"; From 405f6e41f88b7ee757b1a25fdc3c5f40a5b2b023 Mon Sep 17 00:00:00 2001 From: Mark Vainomaa Date: Sun, 6 Jun 2021 14:32:42 +0300 Subject: [PATCH 2/5] docker: improve readability, drop unneeded substitutes (cherry picked from commit 1553e742f522da7cc4cf7e9d79c0dc53d8da86b4) --- .../virtualization/docker/default.nix | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/pkgs/applications/virtualization/docker/default.nix b/pkgs/applications/virtualization/docker/default.nix index e746d17f55f..4328267d577 100644 --- a/pkgs/applications/virtualization/docker/default.nix +++ b/pkgs/applications/virtualization/docker/default.nix @@ -75,6 +75,10 @@ rec { extraPath = optionals (stdenv.isLinux) (makeBinPath [ iproute2 iptables e2fsprogs xz xfsprogs procps util-linux git ]); + postPatch = '' + patchShebangs . + ''; + buildPhase = '' export GOCACHE="$TMPDIR/go-cache" # build engine @@ -86,11 +90,6 @@ rec { cd - ''; - postPatch = '' - patchShebangs . - substituteInPlace ./hack/make.sh --replace libsystemd-journal libsystemd - ''; - installPhase = '' cd ./go/src/${goPackagePath} install -Dm755 ./bundles/dynbinary-daemon/dockerd $out/libexec/docker/dockerd @@ -142,6 +141,14 @@ rec { sqlite lvm2 btrfs-progs systemd libseccomp ] ++ optionals (buildxSupport) [ docker-buildx ]; + postPatch = '' + patchShebangs . + substituteInPlace ./scripts/build/.variables --replace "set -eu" "" + '' + optionalString buildxSupport '' + substituteInPlace ./cli-plugins/manager/manager_unix.go --replace /usr/libexec/docker/cli-plugins \ + ${lib.strings.makeSearchPathOutput "bin" "libexec/docker/cli-plugins" [docker-buildx]} + ''; + # Keep eyes on BUILDTIME format - https://github.com/docker/cli/blob/${version}/scripts/build/.variables buildPhase = '' export GOCACHE="$TMPDIR/go-cache" @@ -160,14 +167,6 @@ rec { cd - ''; - postPatch = '' - patchShebangs . - substituteInPlace ./scripts/build/.variables --replace "set -eu" "" - '' + optionalString buildxSupport '' - substituteInPlace ./cli-plugins/manager/manager_unix.go --replace /usr/libexec/docker/cli-plugins \ - ${lib.strings.makeSearchPathOutput "bin" "libexec/docker/cli-plugins" [docker-buildx]} - ''; - outputs = ["out" "man"]; installPhase = '' From 66b051a57633f83ab500512f5593e6a2d8239edf Mon Sep 17 00:00:00 2001 From: Mark Vainomaa Date: Sun, 6 Jun 2021 14:35:36 +0300 Subject: [PATCH 3/5] docker: enable buildx support by default (cherry picked from commit 2c7bdb05dee8d8e5e9b3bd763554618c27b50a24) --- pkgs/applications/virtualization/docker/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/virtualization/docker/default.nix b/pkgs/applications/virtualization/docker/default.nix index 4328267d577..ac8e5437733 100644 --- a/pkgs/applications/virtualization/docker/default.nix +++ b/pkgs/applications/virtualization/docker/default.nix @@ -8,7 +8,7 @@ rec { , moby-src , runcRev, runcSha256 , containerdRev, containerdSha256 - , tiniRev, tiniSha256, buildxSupport ? false + , tiniRev, tiniSha256, buildxSupport ? true # package dependencies , stdenv, fetchFromGitHub, buildGoPackage , makeWrapper, installShellFiles, pkg-config From 867a90866ed6c6ccd2f74a3552d4cbaf41e6e8d2 Mon Sep 17 00:00:00 2001 From: Mark Vainomaa Date: Tue, 15 Jun 2021 13:12:02 +0300 Subject: [PATCH 4/5] docker: narrow patchShebangs (cherry picked from commit fc38adafeaae8c83997b8dcf7671da3db8bb277f) --- pkgs/applications/virtualization/docker/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/virtualization/docker/default.nix b/pkgs/applications/virtualization/docker/default.nix index ac8e5437733..ab1ebc9c04f 100644 --- a/pkgs/applications/virtualization/docker/default.nix +++ b/pkgs/applications/virtualization/docker/default.nix @@ -76,7 +76,7 @@ rec { extraPath = optionals (stdenv.isLinux) (makeBinPath [ iproute2 iptables e2fsprogs xz xfsprogs procps util-linux git ]); postPatch = '' - patchShebangs . + patchShebangs hack/make.sh hack/make/ ''; buildPhase = '' @@ -142,7 +142,7 @@ rec { ] ++ optionals (buildxSupport) [ docker-buildx ]; postPatch = '' - patchShebangs . + patchShebangs man scripts/build/ substituteInPlace ./scripts/build/.variables --replace "set -eu" "" '' + optionalString buildxSupport '' substituteInPlace ./cli-plugins/manager/manager_unix.go --replace /usr/libexec/docker/cli-plugins \ From ae97d0fb4dc163d7e3ff79c255a2368b36e99c26 Mon Sep 17 00:00:00 2001 From: Mark Vainomaa Date: Mon, 12 Jul 2021 19:33:03 +0300 Subject: [PATCH 5/5] docker: add @mikroskeem to maintainers (cherry picked from commit e2b28504ab046141e2405bebc08f5e8dfacda986) --- pkgs/applications/virtualization/docker/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/virtualization/docker/default.nix b/pkgs/applications/virtualization/docker/default.nix index ab1ebc9c04f..bcced9a6055 100644 --- a/pkgs/applications/virtualization/docker/default.nix +++ b/pkgs/applications/virtualization/docker/default.nix @@ -208,7 +208,7 @@ rec { homepage = "https://www.docker.com/"; description = "An open source project to pack, ship and run any application as a lightweight container"; license = licenses.asl20; - maintainers = with maintainers; [ offline tailhook vdemeester periklis ]; + maintainers = with maintainers; [ offline tailhook vdemeester periklis mikroskeem ]; platforms = with platforms; linux ++ darwin; };