From patchwork Wed Feb 12 20:33:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jack Hill X-Patchwork-Id: 20234 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id C234727BBE4; Wed, 12 Feb 2020 20:35:21 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 34F4E27BBEA for ; Wed, 12 Feb 2020 20:35:21 +0000 (GMT) Received: from localhost ([::1]:43052 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j1yjA-00031P-O1 for patchwork@mira.cbaines.net; Wed, 12 Feb 2020 15:35:20 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42151) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j1yiu-0002m4-N0 for guix-patches@gnu.org; Wed, 12 Feb 2020 15:35:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j1yis-0005jh-FC for guix-patches@gnu.org; Wed, 12 Feb 2020 15:35:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:53137) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j1yis-0005jc-CC for guix-patches@gnu.org; Wed, 12 Feb 2020 15:35:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j1yis-00027X-8X for guix-patches@gnu.org; Wed, 12 Feb 2020 15:35:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#39581] [PATCH] gnu: containerd: Fix test failure with Go 1.13 Resent-From: Jack Hill Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 12 Feb 2020 20:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 39581 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 39581@debbugs.gnu.org Cc: Jack Hill X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15815396448082 (code B ref -1); Wed, 12 Feb 2020 20:35:02 +0000 Received: (at submit) by debbugs.gnu.org; 12 Feb 2020 20:34:04 +0000 Received: from localhost ([127.0.0.1]:59110 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j1yhv-00026I-Ps for submit@debbugs.gnu.org; Wed, 12 Feb 2020 15:34:04 -0500 Received: from lists.gnu.org ([209.51.188.17]:37957) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j1yhr-00025s-W8 for submit@debbugs.gnu.org; Wed, 12 Feb 2020 15:34:02 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42014) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j1yhq-00023m-Ml for guix-patches@gnu.org; Wed, 12 Feb 2020 15:33:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j1yhn-00056n-3M for guix-patches@gnu.org; Wed, 12 Feb 2020 15:33:58 -0500 Received: from minsky.hcoop.net ([104.248.1.95]:34146) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j1yhn-00056c-06 for guix-patches@gnu.org; Wed, 12 Feb 2020 15:33:55 -0500 Received: from lib-its13.lib.duke.edu ([152.3.118.151] helo=localhost.localdomain) by minsky.hcoop.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1j1yhl-00076S-5M; Wed, 12 Feb 2020 15:33:53 -0500 From: Jack Hill Date: Wed, 12 Feb 2020 15:33:43 -0500 Message-Id: <20200212203343.2327-1-jackhill@jackhill.us> X-Mailer: git-send-email 2.25.0 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/docker.scm (containerd)[source]: Add patch. * gnu/packages/patches/containerd-test-with-go1.13.patch: New file. * gnu/local.mk (dist_patch_DATA): Add patch. --- gnu/local.mk | 1 + gnu/packages/docker.scm | 4 +++- .../patches/containerd-test-with-go1.13.patch | 21 +++++++++++++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/containerd-test-with-go1.13.patch diff --git a/gnu/local.mk b/gnu/local.mk index 3f8fa2ed7b..0efb53f416 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -794,6 +794,7 @@ dist_patch_DATA = \ %D%/packages/patches/coda-use-system-libs.patch \ %D%/packages/patches/combinatorial-blas-awpm.patch \ %D%/packages/patches/combinatorial-blas-io-fix.patch \ + %D%/packages/patches/containerd-test-with-go1.13.patch \ %D%/packages/patches/cpufrequtils-fix-aclocal.patch \ %D%/packages/patches/crawl-upgrade-saves.patch \ %D%/packages/patches/crda-optional-gcrypt.patch \ diff --git a/gnu/packages/docker.scm b/gnu/packages/docker.scm index 1f832a25e5..cc353fd11f 100644 --- a/gnu/packages/docker.scm +++ b/gnu/packages/docker.scm @@ -183,7 +183,9 @@ Python without keeping their credentials in a Docker configuration file.") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "0npbzixf3c0jvzm159vygvkydrr8h36c9sq50yv0mdinrys2bvg0")))) + (base32 "0npbzixf3c0jvzm159vygvkydrr8h36c9sq50yv0mdinrys2bvg0")) + (patches + (search-patches "containerd-test-with-go1.13.patch")))) (build-system go-build-system) (arguments `(#:import-path "github.com/containerd/containerd" diff --git a/gnu/packages/patches/containerd-test-with-go1.13.patch b/gnu/packages/patches/containerd-test-with-go1.13.patch new file mode 100644 index 0000000000..964adee9e6 --- /dev/null +++ b/gnu/packages/patches/containerd-test-with-go1.13.patch @@ -0,0 +1,21 @@ +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()) + }