From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id aLXuJTCE1WAAAwAAgWs5BA (envelope-from ) for ; Fri, 25 Jun 2021 09:22:24 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id X6F/ITCE1WB5PQAAbx9fmQ (envelope-from ) for ; Fri, 25 Jun 2021 07:22:24 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C0A5A198D9 for ; Fri, 25 Jun 2021 09:22:23 +0200 (CEST) Received: from localhost ([::1]:54386 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwgAQ-0006aH-QL for larch@yhetil.org; Fri, 25 Jun 2021 03:22:22 -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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: Sarah Morgensen X-ACL-Warn: , Sarah Morgensen via Guix-patches From: Sarah Morgensen via Guix-patches via X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1624605743; h=from:from:sender:sender:reply-to: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:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=TtKilRUtTgfMNtUD1Zm2duzQLdxwyp1opyLHhGLSW6k=; b=lDXRqkVIZ5d70lSac7iAtM6Parylwf6j665rwJayWc7EfIDs34Shk5JTDfJazQtXRmRS7x 78V3DEHUDxavKPqtPtPBbbhEpksZwT3OQZO49+EDu5LYRdvt+su8tZlPPhFi/xFrL1SIHx 9ZATLfuDaEmy1zNb71sWaAiFJZSIf6UPG7+aHw5zBlLWeNitr69rfd6FR2lywcWyzLgWu/ 8qduXwLl5XOUym8dzKduzfeMgJpjKWntEOfgxzOu9+jVpfQbd4LZ1uzX+FPKiYVSWqWy8m mZG4RJ2WO2Dd7TCaC2ZFPV8WRg2pt4WCU5DCEZQzKU6lqSwu6EEeXhUZ5/Jk1Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1624605743; a=rsa-sha256; cv=none; b=V8BN7vKrUh/hod0lOimStrPEV9lWmgA+AjVkTFx9K3yVKBMj6Rq2vZ8igMcAJZDIkHzryA MsdrhGRGS1JvHd0Ijpn2MZ27Q704hp8cYmXML9O9GK14ex1kqKm1kNyUKvbFt+1urmN7CM YFGKH0AvwH7hCbb79XtDTtX5A3t+5hPfTDzjynjOflV7sBIaHfZP4XVlCLzVyDWikSbhC5 joLb3vDbTETYLyCunME4qyKoJ0lGIw3fEhLNWRdgk8TBqVqJsJrFmvZzelzJ86joc+KJsa roO7RhQ7qyrlX5iUN1pt8ye3ZBWKO4Bp+HPkk8Y+eN+mDfEpnMmUDnSugA2vXw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mgsn.dev header.s=key1 header.b=gVRo0QRG; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -2.93 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mgsn.dev header.s=key1 header.b=gVRo0QRG; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: C0A5A198D9 X-Spam-Score: -2.93 X-Migadu-Scanner: scn0.migadu.com X-TUID: ++1de2DZK1ww * 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()) + } + }) + } -- 2.31.1