mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: docker: Update to 20.10.17.
* gnu/packages/docker.scm (%docker-version): Update to 20.10.17. (docker-libnetwork)[source]: Update commit according to vendor.conf. Reset revision to 1. Simplify snippet. (docker)[origin]: Remove docker-fix-tests.patch. [arguments]: Adapt 'patch-paths phase, substitute "ip6tables" and buildkit-qemu. Remove trailing #t. [native-inputs]: Replace go-1.14 by go. (docker-cli)[source]: Update hash. [arguments]: Set GO_LINKMODE to "dynamic". Remove trailing #t. [phases]{check}: Replace 'if' with 'when'. * gnu/packages/networking.scm (go-sctp): Update commit according to docker-libnetwork's vendor.conf. * gnu/packages/patches/docker-fix-tests.patch: Delete. * gnu/local.mk (dist_patch_DATA): Remove patch. Co-authored-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
This commit is contained in:
parent
6c1dac4f06
commit
185ae9b410
4 changed files with 43 additions and 88 deletions
|
@ -1004,7 +1004,6 @@ dist_patch_DATA = \
|
||||||
%D%/packages/patches/docbook-xsl-support-old-url.patch \
|
%D%/packages/patches/docbook-xsl-support-old-url.patch \
|
||||||
%D%/packages/patches/doc++-include-directives.patch \
|
%D%/packages/patches/doc++-include-directives.patch \
|
||||||
%D%/packages/patches/doc++-segfault-fix.patch \
|
%D%/packages/patches/doc++-segfault-fix.patch \
|
||||||
%D%/packages/patches/docker-fix-tests.patch \
|
|
||||||
%D%/packages/patches/dovecot-trees-support-dovecot-2.3.patch \
|
%D%/packages/patches/dovecot-trees-support-dovecot-2.3.patch \
|
||||||
%D%/packages/patches/dstat-fix-crash-when-specifying-delay.patch \
|
%D%/packages/patches/dstat-fix-crash-when-specifying-delay.patch \
|
||||||
%D%/packages/patches/dstat-skip-devices-without-io.patch \
|
%D%/packages/patches/dstat-skip-devices-without-io.patch \
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
|
|
||||||
;; Note - when changing Docker versions it is important to update the versions
|
;; Note - when changing Docker versions it is important to update the versions
|
||||||
;; of several associated packages (docker-libnetwork and go-sctp).
|
;; of several associated packages (docker-libnetwork and go-sctp).
|
||||||
(define %docker-version "19.03.15")
|
(define %docker-version "20.10.17")
|
||||||
|
|
||||||
(define-public python-docker
|
(define-public python-docker
|
||||||
(package
|
(package
|
||||||
|
@ -252,11 +252,10 @@ network attachments.")
|
||||||
;;; anyway, as it needs many dependencies that aren't being satisfied.
|
;;; anyway, as it needs many dependencies that aren't being satisfied.
|
||||||
(define docker-libnetwork
|
(define docker-libnetwork
|
||||||
;; There are no recent release for libnetwork, so choose the last commit of
|
;; There are no recent release for libnetwork, so choose the last commit of
|
||||||
;; the branch that Docker uses, as can be seen in the Docker source file
|
;; the branch that Docker uses, as can be seen in the 'vendor.conf' Docker
|
||||||
;; 'hack/dockerfile/install/proxy.installer'. NOTE - It is important that
|
;; source file. NOTE - It is important that this version is kept in sync
|
||||||
;; this version is kept in sync with the version of Docker being used.
|
;; with the version of Docker being used.
|
||||||
;; This commit is the "bump_19.03" branch, as mentioned in Docker's vendor.conf.
|
(let ((commit "f6ccccb1c082a432c2a5814aaedaca56af33d9ea")
|
||||||
(let ((commit "55e924b8a84231a065879156c0de95aefc5f5435")
|
|
||||||
(version (version-major+minor %docker-version))
|
(version (version-major+minor %docker-version))
|
||||||
(revision "1"))
|
(revision "1"))
|
||||||
(package
|
(package
|
||||||
|
@ -271,12 +270,10 @@ network attachments.")
|
||||||
(file-name (git-file-name name version))
|
(file-name (git-file-name name version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"19syb3scwiykn44gqfaqrgqv8a0df4ps0ykf3za9xkjc5cyi99mp"))
|
"0nxpr0h0smv4n641g41vxibr5r85ixfcvs9cp3c4fc7zvrhjc49s"))
|
||||||
;; Delete bundled ("vendored") free software source code.
|
;; Delete bundled ("vendored") free software source code.
|
||||||
(modules '((guix build utils)))
|
(modules '((guix build utils)))
|
||||||
(snippet '(begin
|
(snippet '(delete-file-recursively "vendor"))))
|
||||||
(delete-file-recursively "vendor")
|
|
||||||
#t))))
|
|
||||||
(build-system go-build-system)
|
(build-system go-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:import-path "github.com/moby/libnetwork/"))
|
`(#:import-path "github.com/moby/libnetwork/"))
|
||||||
|
@ -324,9 +321,7 @@ built-in registry server of Docker.")
|
||||||
(commit (string-append "v" version))))
|
(commit (string-append "v" version))))
|
||||||
(file-name (git-file-name name version))
|
(file-name (git-file-name name version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32 "0419iha9zmwlhzhnbfxlsa13vgd04yifnsr8qqnj2ks5dxrcajl8"))
|
(base32 "0hn7fg717rggwk6dbicrwa7aglqp7dp0jp5rvn6p9gfcnrp2w97d"))))
|
||||||
(patches
|
|
||||||
(search-patches "docker-fix-tests.patch"))))
|
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:modules
|
`(#:modules
|
||||||
|
@ -369,9 +364,10 @@ built-in registry server of Docker.")
|
||||||
(("DefaultRuntimeBinary = .*")
|
(("DefaultRuntimeBinary = .*")
|
||||||
(string-append "DefaultRuntimeBinary = \""
|
(string-append "DefaultRuntimeBinary = \""
|
||||||
(assoc-ref inputs "runc")
|
(assoc-ref inputs "runc")
|
||||||
"/sbin/runc\"\n"))
|
"/sbin/runc\"\n")))
|
||||||
(("DefaultRuntimeName = .*")
|
(substitute* "daemon/runtime_unix.go"
|
||||||
(string-append "DefaultRuntimeName = \""
|
(("defaultRuntimeName = .*")
|
||||||
|
(string-append "defaultRuntimeName = \""
|
||||||
(assoc-ref inputs "runc")
|
(assoc-ref inputs "runc")
|
||||||
"/sbin/runc\"\n")))
|
"/sbin/runc\"\n")))
|
||||||
(substitute* "daemon/config/config.go"
|
(substitute* "daemon/config/config.go"
|
||||||
|
@ -400,16 +396,6 @@ built-in registry server of Docker.")
|
||||||
(substitute* "pkg/archive/archive.go"
|
(substitute* "pkg/archive/archive.go"
|
||||||
(("string\\{\"xz")
|
(("string\\{\"xz")
|
||||||
(string-append "string{\"" (assoc-ref inputs "xz") "/bin/xz")))
|
(string-append "string{\"" (assoc-ref inputs "xz") "/bin/xz")))
|
||||||
;; TODO: Remove when Docker proper uses v1.14.x to build
|
|
||||||
(substitute* "registry/resumable/resumablerequestreader_test.go"
|
|
||||||
(("I%27m%20not%20an%20url" all)
|
|
||||||
(string-append "\"" all "\"")))
|
|
||||||
;; TODO: Remove when Docker proper uses v1.14.x to build
|
|
||||||
(substitute* "vendor/gotest.tools/x/subtest/context.go"
|
|
||||||
(("func \\(tc \\*testcase\\) Cleanup\\(" all)
|
|
||||||
(string-append all "func()"))
|
|
||||||
(("tc\\.Cleanup\\(" all)
|
|
||||||
(string-append all "nil")))
|
|
||||||
|
|
||||||
(let ((source-files (filter (lambda (name)
|
(let ((source-files (filter (lambda (name)
|
||||||
(not (string-contains name "test")))
|
(not (string-contains name "test")))
|
||||||
|
@ -446,6 +432,7 @@ built-in registry server of Docker.")
|
||||||
("blkid" "util-linux" "sbin/blkid")
|
("blkid" "util-linux" "sbin/blkid")
|
||||||
("unpigz" "pigz" "bin/unpigz")
|
("unpigz" "pigz" "bin/unpigz")
|
||||||
("iptables" "iptables" "sbin/iptables")
|
("iptables" "iptables" "sbin/iptables")
|
||||||
|
("ip6tables" "iptables" "sbin/ip6tables")
|
||||||
("iptables-legacy" "iptables" "sbin/iptables")
|
("iptables-legacy" "iptables" "sbin/iptables")
|
||||||
("ip" "iproute2" "sbin/ip"))
|
("ip" "iproute2" "sbin/ip"))
|
||||||
|
|
||||||
|
@ -494,10 +481,13 @@ built-in registry server of Docker.")
|
||||||
"exec.Command")
|
"exec.Command")
|
||||||
;; Search for ZFS in PATH.
|
;; Search for ZFS in PATH.
|
||||||
(("\\<LookPath\\(\"zfs\"\\)") "LooxPath(\"zfs\")")
|
(("\\<LookPath\\(\"zfs\"\\)") "LooxPath(\"zfs\")")
|
||||||
|
;; Do not fail when buildkit-qemu-<target> isn't found.
|
||||||
|
;; FIXME: We might need to package buildkit and docker's
|
||||||
|
;; buildx plugin, to support qemu-based docker containers.
|
||||||
|
(("\\<LookPath\\(\"buildkit-qemu-\"") "LooxPath(\"buildkit-qemu-\"")
|
||||||
;; Fail on other unsubstituted LookPaths.
|
;; Fail on other unsubstituted LookPaths.
|
||||||
(("\\<LookPath\\(\"") "Guix_doesnt_want_LookPath\\(\"")
|
(("\\<LookPath\\(\"") "Guix_doesnt_want_LookPath\\(\"")
|
||||||
(("\\<LooxPath") "LookPath")))
|
(("\\<LooxPath") "LookPath")))))
|
||||||
#t))
|
|
||||||
(add-after 'patch-paths 'delete-failing-tests
|
(add-after 'patch-paths 'delete-failing-tests
|
||||||
(lambda _
|
(lambda _
|
||||||
;; Needs internet access.
|
;; Needs internet access.
|
||||||
|
@ -522,8 +512,7 @@ built-in registry server of Docker.")
|
||||||
;; This file uses /var.
|
;; This file uses /var.
|
||||||
(delete-file "daemon/oci_linux_test.go")
|
(delete-file "daemon/oci_linux_test.go")
|
||||||
;; Signal tests fail in bizarre ways
|
;; Signal tests fail in bizarre ways
|
||||||
(delete-file "pkg/signal/signal_linux_test.go")
|
(delete-file "pkg/signal/signal_linux_test.go")))
|
||||||
#t))
|
|
||||||
(replace 'configure
|
(replace 'configure
|
||||||
(lambda _
|
(lambda _
|
||||||
(setenv "DOCKER_BUILDTAGS" "seccomp")
|
(setenv "DOCKER_BUILDTAGS" "seccomp")
|
||||||
|
@ -536,8 +525,7 @@ built-in registry server of Docker.")
|
||||||
;; information, and the DWARF symbol table.
|
;; information, and the DWARF symbol table.
|
||||||
(setenv "LDFLAGS" "-s -w")
|
(setenv "LDFLAGS" "-s -w")
|
||||||
;; Make build faster
|
;; Make build faster
|
||||||
(setenv "GOCACHE" "/tmp")
|
(setenv "GOCACHE" "/tmp")))
|
||||||
#t))
|
|
||||||
(add-before 'build 'setup-go-environment
|
(add-before 'build 'setup-go-environment
|
||||||
(assoc-ref go:%standard-phases 'setup-go-environment))
|
(assoc-ref go:%standard-phases 'setup-go-environment))
|
||||||
(replace 'build
|
(replace 'build
|
||||||
|
@ -559,8 +547,7 @@ built-in registry server of Docker.")
|
||||||
"/.gopath/src/github.com/docker/docker"))
|
"/.gopath/src/github.com/docker/docker"))
|
||||||
(with-directory-excursion ".gopath/src/github.com/docker/docker"
|
(with-directory-excursion ".gopath/src/github.com/docker/docker"
|
||||||
(invoke "hack/test/unit"))
|
(invoke "hack/test/unit"))
|
||||||
(setenv "PWD" #f)
|
(setenv "PWD" #f)))
|
||||||
#t))
|
|
||||||
(replace 'install
|
(replace 'install
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
(let* ((out (assoc-ref outputs "out"))
|
||||||
|
@ -568,8 +555,7 @@ built-in registry server of Docker.")
|
||||||
(install-file "bundles/dynbinary-daemon/dockerd" out-bin)
|
(install-file "bundles/dynbinary-daemon/dockerd" out-bin)
|
||||||
(install-file (string-append "bundles/dynbinary-daemon/dockerd-"
|
(install-file (string-append "bundles/dynbinary-daemon/dockerd-"
|
||||||
(getenv "VERSION"))
|
(getenv "VERSION"))
|
||||||
out-bin)
|
out-bin))))
|
||||||
#t)))
|
|
||||||
(add-after 'install 'remove-go-references
|
(add-after 'install 'remove-go-references
|
||||||
(assoc-ref go:%standard-phases 'remove-go-references)))))
|
(assoc-ref go:%standard-phases 'remove-go-references)))))
|
||||||
(inputs
|
(inputs
|
||||||
|
@ -594,7 +580,7 @@ built-in registry server of Docker.")
|
||||||
("xz" ,xz)))
|
("xz" ,xz)))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
(list eudev ; TODO: Should be propagated by lvm2 (.pc -> .pc)
|
(list eudev ; TODO: Should be propagated by lvm2 (.pc -> .pc)
|
||||||
go-1.14 gotestsum pkg-config))
|
go gotestsum pkg-config))
|
||||||
(synopsis "Docker container component library, and daemon")
|
(synopsis "Docker container component library, and daemon")
|
||||||
(description "This package provides a framework to assemble specialized
|
(description "This package provides a framework to assemble specialized
|
||||||
container systems. It includes components for orchestration, image
|
container systems. It includes components for orchestration, image
|
||||||
|
@ -609,13 +595,13 @@ provisioning etc.")
|
||||||
(version %docker-version)
|
(version %docker-version)
|
||||||
(source
|
(source
|
||||||
(origin
|
(origin
|
||||||
(method git-fetch)
|
(method git-fetch)
|
||||||
(uri (git-reference
|
(uri (git-reference
|
||||||
(url "https://github.com/docker/cli")
|
(url "https://github.com/docker/cli")
|
||||||
(commit (string-append "v" version))))
|
(commit (string-append "v" version))))
|
||||||
(file-name (git-file-name name version))
|
(file-name (git-file-name name version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32 "1asapjj8brvbkd5irgdq82fx1ihrc14qaq30jxvjwflfm5yb7lv0"))))
|
(base32 "0ksicj4iqvgp9jabd4xmhkf3vax6dwn4f5dsr73bdqj4mf3ahav0"))))
|
||||||
(build-system go-build-system)
|
(build-system go-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:import-path "github.com/docker/cli"
|
`(#:import-path "github.com/docker/cli"
|
||||||
|
@ -635,21 +621,20 @@ provisioning etc.")
|
||||||
;; Make build reproducible.
|
;; Make build reproducible.
|
||||||
(setenv "BUILDTIME" "1970-01-01 00:00:01.000000000+00:00")
|
(setenv "BUILDTIME" "1970-01-01 00:00:01.000000000+00:00")
|
||||||
(symlink "src/github.com/docker/cli/scripts" "./scripts")
|
(symlink "src/github.com/docker/cli/scripts" "./scripts")
|
||||||
(symlink "src/github.com/docker/cli/docker.Makefile" "./docker.Makefile")
|
(symlink "src/github.com/docker/cli/docker.Makefile" "./docker.Makefile")))
|
||||||
#t))
|
|
||||||
(replace 'build
|
(replace 'build
|
||||||
(lambda _
|
(lambda _
|
||||||
(invoke "./scripts/build/dynbinary")))
|
(setenv "GO_LINKMODE" "dynamic")
|
||||||
|
(invoke "./scripts/build/binary")))
|
||||||
(replace 'check
|
(replace 'check
|
||||||
(lambda* (#:key make-flags tests? #:allow-other-keys)
|
(lambda* (#:key make-flags tests? #:allow-other-keys)
|
||||||
(setenv "PATH" (string-append (getcwd) "/build:" (getenv "PATH")))
|
(setenv "PATH" (string-append (getcwd) "/build:" (getenv "PATH")))
|
||||||
(if tests?
|
(when tests?
|
||||||
;; Use the newly-built docker client for the tests.
|
;; Use the newly-built docker client for the tests.
|
||||||
(with-directory-excursion "src/github.com/docker/cli"
|
(with-directory-excursion "src/github.com/docker/cli"
|
||||||
;; TODO: Run test-e2e as well?
|
;; TODO: Run test-e2e as well?
|
||||||
(apply invoke "make" "-f" "docker.Makefile" "test-unit"
|
(apply invoke "make" "-f" "docker.Makefile" "test-unit"
|
||||||
(or make-flags '())))
|
(or make-flags '()))))))
|
||||||
#t)))
|
|
||||||
(replace 'install
|
(replace 'install
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
(let* ((out (assoc-ref outputs "out"))
|
||||||
|
@ -662,8 +647,7 @@ provisioning etc.")
|
||||||
(string-append etc "/fish/completions"))
|
(string-append etc "/fish/completions"))
|
||||||
(install-file "zsh/_docker"
|
(install-file "zsh/_docker"
|
||||||
(string-append etc "/zsh/site-functions")))
|
(string-append etc "/zsh/site-functions")))
|
||||||
(install-file "build/docker" out-bin)
|
(install-file "build/docker" out-bin)))))))
|
||||||
#t))))))
|
|
||||||
(native-inputs
|
(native-inputs
|
||||||
(list go libltdl pkg-config))
|
(list go libltdl pkg-config))
|
||||||
(synopsis "Command line interface to Docker")
|
(synopsis "Command line interface to Docker")
|
||||||
|
|
|
@ -1778,8 +1778,8 @@ handling network namespaces in Go.")
|
||||||
(define-public go-sctp
|
(define-public go-sctp
|
||||||
;; docker-libnetwork-cmd-proxy requires this exact commit.
|
;; docker-libnetwork-cmd-proxy requires this exact commit.
|
||||||
;; This commit is mentioned in docker-libnetwork-cmd-proxy's vendor.conf.
|
;; This commit is mentioned in docker-libnetwork-cmd-proxy's vendor.conf.
|
||||||
(let ((commit "6e2cb1366111dcf547c13531e3a263a067715847")
|
(let ((commit "f2269e66cdee387bd321445d5d300893449805be")
|
||||||
(revision "2"))
|
(revision "3"))
|
||||||
(package
|
(package
|
||||||
(name "go-sctp")
|
(name "go-sctp")
|
||||||
(version (git-version "0.0.0" revision commit))
|
(version (git-version "0.0.0" revision commit))
|
||||||
|
@ -1791,7 +1791,7 @@ handling network namespaces in Go.")
|
||||||
(file-name (git-file-name name version))
|
(file-name (git-file-name name version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"1ba90fmpdwxa1ba4hrsjhi3gfy3pwmz7x8amw1p5dc9p5a7nnqrb"))))
|
"04463rnn9y9psp11ac5di6wrwxlhymw5h9hfhhhnxqwla90ikp0g"))))
|
||||||
(build-system go-build-system)
|
(build-system go-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:tests? #f ; Test suite is flakey.
|
`(#:tests? #f ; Test suite is flakey.
|
||||||
|
|
|
@ -1,28 +0,0 @@
|
||||||
Author: Danny Milosavljevic <dannym@scratchpost.org>
|
|
||||||
The socket name ended up too long inside the container.
|
|
||||||
Use a shorter one.
|
|
||||||
--- a/pkg/authorization/authz_unix_test.go 2019-01-10 01:55:02.997985947 +0100
|
|
||||||
+++ b/pkg/authorization/authz_unix_test.go 2019-01-10 02:03:21.177439757 +0100
|
|
||||||
@@ -24,7 +24,7 @@
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
|
||||||
- pluginAddress = "authz-test-plugin.sock"
|
|
||||||
+ pluginAddress = "/tmp/authz-test-plugin.sock"
|
|
||||||
)
|
|
||||||
|
|
||||||
func TestAuthZRequestPluginError(t *testing.T) {
|
|
||||||
@@ -263,12 +263,7 @@
|
|
||||||
|
|
||||||
// createTestPlugin creates a new sample authorization plugin
|
|
||||||
func createTestPlugin(t *testing.T) *authorizationPlugin {
|
|
||||||
- pwd, err := os.Getwd()
|
|
||||||
- if err != nil {
|
|
||||||
- t.Fatal(err)
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- client, err := plugins.NewClient("unix:///"+path.Join(pwd, pluginAddress), &tlsconfig.Options{InsecureSkipVerify: true})
|
|
||||||
+ client, err := plugins.NewClient("unix:///"+path.Join("/", pluginAddress), &tlsconfig.Options{InsecureSkipVerify: true})
|
|
||||||
if err != nil {
|
|
||||||
t.Fatalf("Failed to create client %v", err)
|
|
||||||
}
|
|
Loading…
Add table
Add a link
Reference in a new issue