From patchwork Fri Jun 25 07:21:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sarah Morgensen X-Patchwork-Id: 30697 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 AA9C127BC81; Fri, 25 Jun 2021 08:22:23 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,SPF_HELO_PASS,T_DKIM_INVALID,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 ESMTPS id 9B29527BC78 for ; Fri, 25 Jun 2021 08:22:22 +0100 (BST) Received: from localhost ([::1]:54386 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwgAP-0006aH-LQ for patchwork@mira.cbaines.net; Fri, 25 Jun 2021 03:22:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33330) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwgAA-00064d-5J for guix-patches@gnu.org; Fri, 25 Jun 2021 03:22:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33203) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lwgA9-0005sw-Tp for guix-patches@gnu.org; Fri, 25 Jun 2021 03:22:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lwgA9-0005Cr-R5 for guix-patches@gnu.org; Fri, 25 Jun 2021 03:22:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49221] [PATCH 10/13] gnu: restic: Patch tests for go-1.16. Resent-From: Sarah Morgensen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 25 Jun 2021 07:22:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49221 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49221@debbugs.gnu.org Received: via spool by 49221-submit@debbugs.gnu.org id=B49221.162460570119897 (code B ref 49221); Fri, 25 Jun 2021 07:22:05 +0000 Received: (at 49221) by debbugs.gnu.org; 25 Jun 2021 07:21:41 +0000 Received: from localhost ([127.0.0.1]:44734 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lwg9k-0005Ap-9w for submit@debbugs.gnu.org; Fri, 25 Jun 2021 03:21:41 -0400 Received: from out0.migadu.com ([94.23.1.103]:54546) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lwg9X-00059a-H5 for 49221@debbugs.gnu.org; Fri, 25 Jun 2021 03:21:28 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1; t=1624605686; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TtKilRUtTgfMNtUD1Zm2duzQLdxwyp1opyLHhGLSW6k=; b=gVRo0QRGbma3E7mdEN9l6Ec6DgP29GIVvp9MpVZNIU2gGARwRMrcfNSQmy/2r5MYCSnPup Je4I42AeWfxC3N4psTD/1PgTdb4g0kqbG16U1AkwDKClNT2V/PsNwA2avwqaJ7L/MOxEA3 YzjxJf1ixf2KAhl0fDoF7MFhvYm5j8M= Date: Fri, 25 Jun 2021 00:21:03 -0700 Message-Id: <8faa83d9d24cbd87afd8a93613dbf872aaf45573.1624602942.git.iskarian@mgsn.dev> In-Reply-To: References: MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: iskarian@mgsn.dev X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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" Reply-to: Sarah Morgensen X-ACL-Warn: , Sarah Morgensen via Guix-patches X-Patchwork-Original-From: Sarah Morgensen via Guix-patches via From: Sarah Morgensen X-getmail-retrieved-from-mailbox: Patches * gnu/packages/patches/restic-0.9.6-fix-tests-for-go1.15.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/backup.scm (restic): Use it. --- gnu/local.mk | 1 + gnu/packages/backup.scm | 5 +- .../restic-0.9.6-fix-tests-for-go1.15.patch | 51 +++++++++++++++++++ 3 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/restic-0.9.6-fix-tests-for-go1.15.patch diff --git a/gnu/local.mk b/gnu/local.mk index a176772ece..24f2d9d013 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1674,6 +1674,7 @@ dist_patch_DATA = \ %D%/packages/patches/rtags-separate-rct.patch \ %D%/packages/patches/racket-sh-via-rktio.patch \ %D%/packages/patches/remake-impure-dirs.patch \ + %D%/packages/patches/restic-0.9.6-fix-tests-for-go1.15.patch \ %D%/packages/patches/retroarch-LIBRETRO_DIRECTORY.patch \ %D%/packages/patches/rnp-add-version.cmake.patch \ %D%/packages/patches/rnp-disable-ruby-rnp-tests.patch \ diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm index d425243848..67dc4b2cc9 100644 --- a/gnu/packages/backup.scm +++ b/gnu/packages/backup.scm @@ -19,6 +19,7 @@ ;;; Copyright © 2020 Marcin Karpezo ;;; Copyright © 2020 Michael Rohleder ;;; Copyright © 2021 Timothy Sample +;;; Copyright © 2021 Sarah Morgensen ;;; ;;; This file is part of GNU Guix. ;;; @@ -876,7 +877,9 @@ is like a time machine for your data. ") (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "1zmh42aah32ah8w5n6ilz9bci0y2xrf8p7qshy3yf1lzm5gnbj0w")))) + "1zmh42aah32ah8w5n6ilz9bci0y2xrf8p7qshy3yf1lzm5gnbj0w")) + (patches + (search-patches "restic-0.9.6-fix-tests-for-go1.15.patch")))) (build-system go-build-system) (arguments `(#:import-path "github.com/restic/restic" diff --git a/gnu/packages/patches/restic-0.9.6-fix-tests-for-go1.15.patch b/gnu/packages/patches/restic-0.9.6-fix-tests-for-go1.15.patch new file mode 100644 index 0000000000..cc510c1cfe --- /dev/null +++ b/gnu/packages/patches/restic-0.9.6-fix-tests-for-go1.15.patch @@ -0,0 +1,51 @@ +This cherry-picked patch fixes tests for Go >= 1.15. Restic v0.10 (which +includes this patch) requires go module support from the Go build system. +Original patch follows. + +--- +From 97950ab81a18de06b95384da6d8646fef87c9d97 Mon Sep 17 00:00:00 2001 +From: Alexander Neumann +Date: Sat, 12 Sep 2020 17:36:44 +0200 +Subject: [PATCH] options: Fix test for Go >= 1.15 + +--- + internal/options/options_test.go | 12 +++++++++--- + 1 file changed, 9 insertions(+), 3 deletions(-) + +diff --git a/internal/options/options_test.go b/internal/options/options_test.go +index de94fc90a1..8d268992a3 100644 +--- a/internal/options/options_test.go ++++ b/internal/options/options_test.go +@@ -3,6 +3,7 @@ package options + import ( + "fmt" + "reflect" ++ "regexp" + "testing" + "time" + ) +@@ -199,7 +200,7 @@ var invalidSetTests = []struct { + "timeout": "2134", + }, + "ns", +- `time: missing unit in duration 2134`, ++ `time: missing unit in duration "?2134"?`, + }, + } + +@@ -212,8 +213,13 @@ func TestOptionsApplyInvalid(t *testing.T) { + t.Fatalf("expected error %v not found", test.err) + } + +- if err.Error() != test.err { +- t.Fatalf("expected error %q, got %q", test.err, err.Error()) ++ matched, err := regexp.MatchString(test.err, err.Error()) ++ if err != nil { ++ t.Fatal(err) ++ } ++ ++ if !matched { ++ t.Fatalf("expected error to match %q, got %q", test.err, err.Error()) + } + }) + }