Archived
1
0
Fork 0

gnu: containerd: Update to 1.4.4.

* gnu/packages/docker.scm (containerd): Update to 1.4.4.  Delete
trailing #t.
[arguments]: Set a MAKE-FLAGS binding.
[phases]{patch-paths}: Patch the reference to 'unpigz'.
{build, install}: Use the MAKE-FLAGS variable.
[inputs]: Add pigz.
* gnu/packages/patches/containerd-test-with-go1.13.patch: Delete file.
* gnu/local.mk (dist_patch_DATA): Un-register it.
This commit is contained in:
Maxim Cournoyer 2021-02-22 22:58:31 -05:00
parent 8d89d3c9bf
commit 7bf82f5ede
No known key found for this signature in database
GPG key ID: 1260E46482E63562
3 changed files with 46 additions and 62 deletions

View file

@ -912,7 +912,6 @@ dist_patch_DATA = \
%D%/packages/patches/collectd-5.11.0-noinstallvar.patch \ %D%/packages/patches/collectd-5.11.0-noinstallvar.patch \
%D%/packages/patches/combinatorial-blas-awpm.patch \ %D%/packages/patches/combinatorial-blas-awpm.patch \
%D%/packages/patches/combinatorial-blas-io-fix.patch \ %D%/packages/patches/combinatorial-blas-io-fix.patch \
%D%/packages/patches/containerd-test-with-go1.13.patch \
%D%/packages/patches/coreutils-ls.patch \ %D%/packages/patches/coreutils-ls.patch \
%D%/packages/patches/cpufrequtils-fix-aclocal.patch \ %D%/packages/patches/cpufrequtils-fix-aclocal.patch \
%D%/packages/patches/crawl-upgrade-saves.patch \ %D%/packages/patches/crawl-upgrade-saves.patch \

View file

@ -2,7 +2,7 @@
;;; Copyright © 2016 David Thompson <davet@gnu.org> ;;; Copyright © 2016 David Thompson <davet@gnu.org>
;;; Copyright © 2018 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2018 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2019, 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; Copyright © 2019, 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de> ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
;;; Copyright © 2020 Katherine Cox-Buday <cox.katherine.e@gmail.com> ;;; Copyright © 2020 Katherine Cox-Buday <cox.katherine.e@gmail.com>
;;; Copyright © 2020 Jesse Dowell <jessedowell@gmail.com> ;;; Copyright © 2020 Jesse Dowell <jessedowell@gmail.com>
@ -177,7 +177,7 @@ Python without keeping their credentials in a Docker configuration file.")
(define-public containerd (define-public containerd
(package (package
(name "containerd") (name "containerd")
(version "1.3.10") (version "1.4.4")
(source (source
(origin (origin
(method git-fetch) (method git-fetch)
@ -186,49 +186,55 @@ Python without keeping their credentials in a Docker configuration file.")
(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 "10fz7359aydbz0yb01qkrsq2diypayfal618lvvb1x0gvgkp526i")))) (base32 "0qjbfj1dw6pykxhh8zahcxlgpyjzgnrngk5vjaf34akwyan8nrxb"))))
(build-system go-build-system) (build-system go-build-system)
(arguments (arguments
`(#:import-path "github.com/containerd/containerd" (let ((make-flags (list (string-append "VERSION=" version)
#:phases "REVISION=0")))
(modify-phases %standard-phases `(#:import-path "github.com/containerd/containerd"
(add-after 'chdir 'patch-paths #:phases
(lambda* (#:key inputs import-path outputs #:allow-other-keys) (modify-phases %standard-phases
;; TODO: Patch "socat", "unpigz". (add-after 'chdir 'patch-paths
(with-directory-excursion (string-append "src/" import-path) (lambda* (#:key inputs import-path outputs #:allow-other-keys)
(substitute* "./runtime/v1/linux/runtime.go" (with-directory-excursion (string-append "src/" import-path)
(("defaultRuntime[ \t]*=.*") (substitute* "runtime/v1/linux/runtime.go"
(string-append "defaultRuntime = \"" (("defaultRuntime[ \t]*=.*")
(assoc-ref inputs "runc") (string-append "defaultRuntime = \""
"/sbin/runc\"\n")) (assoc-ref inputs "runc")
(("defaultShim[ \t]*=.*") "/sbin/runc\"\n"))
(string-append "defaultShim = \"" (("defaultShim[ \t]*=.*")
(assoc-ref outputs "out") (string-append "defaultShim = \""
"/bin/containerd-shim\"\n"))) (assoc-ref outputs "out")
(substitute* "./vendor/github.com/containerd/go-runc/runc.go" "/bin/containerd-shim\"\n")))
(("DefaultCommand[ \t]*=.*") (substitute* "vendor/github.com/containerd/go-runc/runc.go"
(string-append "DefaultCommand = \"" (("DefaultCommand[ \t]*=.*")
(assoc-ref inputs "runc") (string-append "DefaultCommand = \""
"/sbin/runc\"\n"))) (assoc-ref inputs "runc")
(substitute* "vendor/github.com/containerd/continuity/testutil/loopback/loopback_linux.go" "/sbin/runc\"\n")))
(("exec\\.Command\\(\"losetup\"") ; ) (substitute* "vendor/github.com/containerd/continuity/testutil\
(string-append "exec.Command(\"" /loopback/loopback_linux.go"
(assoc-ref inputs "util-linux") (("exec\\.Command\\(\"losetup\"")
"/sbin/losetup\""))) ;) (string-append "exec.Command(\""
#t))) (assoc-ref inputs "util-linux")
(replace 'build "/sbin/losetup\"")))
(lambda* (#:key import-path (make-flags '()) #:allow-other-keys) (substitute* "archive/compression/compression.go"
(with-directory-excursion (string-append "src/" import-path) (("exec\\.LookPath\\(\"unpigz\"\\)")
(apply invoke "make" make-flags)))) (string-append "\"" (assoc-ref inputs "pigz")
(replace 'install "/bin/unpigz\", error(nil)"))))))
(lambda* (#:key import-path outputs (make-flags '()) #:allow-other-keys) (replace 'build
(with-directory-excursion (string-append "src/" import-path) (lambda* (#:key import-path #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))) (with-directory-excursion (string-append "src/" import-path)
(apply invoke "make" (string-append "DESTDIR=" out) "install" (apply invoke "make" ',make-flags))))
make-flags)))))))) (replace 'install
(lambda* (#:key import-path outputs #:allow-other-keys)
(with-directory-excursion (string-append "src/" import-path)
(let* ((out (assoc-ref outputs "out")))
(apply invoke "make" (string-append "DESTDIR=" out) "install"
',make-flags)))))))))
(inputs (inputs
`(("btrfs-progs" ,btrfs-progs) `(("btrfs-progs" ,btrfs-progs)
("libseccomp" ,libseccomp) ("libseccomp" ,libseccomp)
("pigz" ,pigz)
("runc" ,runc) ("runc" ,runc)
("util-linux" ,util-linux))) ("util-linux" ,util-linux)))
(native-inputs (native-inputs

View file

@ -1,21 +0,0 @@
Compatibility fix for go 1.13, flag.Parse() shouldn't be called during
package initialization.
https://golang.org/doc/go1.13#testing
--- a/client_test.go 2020-02-12 14:50:28.991245371 -0500
+++ b/client_test.go 2020-02-12 15:12:37.383523980 -0500
@@ -49,7 +49,6 @@
flag.StringVar(&address, "address", defaultAddress, "The address to the containerd socket for use in the tests")
flag.BoolVar(&noDaemon, "no-daemon", false, "Do not start a dedicated daemon for the tests")
flag.BoolVar(&noCriu, "no-criu", false, "Do not run the checkpoint tests")
- flag.Parse()
}
func testContext() (context.Context, context.CancelFunc) {
@@ -59,6 +58,7 @@
}
func TestMain(m *testing.M) {
+ flag.Parse()
if testing.Short() {
os.Exit(m.Run())
}