From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id cIYOBTlIDGE2egEAgWs5BA (envelope-from ) for ; Thu, 05 Aug 2021 22:21:13 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id sB2WADlIDGH5GwAA1q6Kng (envelope-from ) for ; Thu, 05 Aug 2021 20:21:13 +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 88A3FEA3A for ; Thu, 5 Aug 2021 22:21:12 +0200 (CEST) Received: from localhost ([::1]:40520 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mBjrb-0008H7-Kl for larch@yhetil.org; Thu, 05 Aug 2021 16:21:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54434) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mBjrU-0008Gw-Hk for guix-patches@gnu.org; Thu, 05 Aug 2021 16:21:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36968) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mBjrS-00005K-Un for guix-patches@gnu.org; Thu, 05 Aug 2021 16:21:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mBjrS-0004CL-R4 for guix-patches@gnu.org; Thu, 05 Aug 2021 16:21:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49221] [PATCH v2 2/2] gnu: restic: Patch tests for go-1.16. Resent-From: Sarah Morgensen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 05 Aug 2021 20:21:02 +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 Cc: Efraim Flashner Received: via spool by 49221-submit@debbugs.gnu.org id=B49221.162819482116061 (code B ref 49221); Thu, 05 Aug 2021 20:21:02 +0000 Received: (at 49221) by debbugs.gnu.org; 5 Aug 2021 20:20:21 +0000 Received: from localhost ([127.0.0.1]:48513 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBjqj-0004Av-88 for submit@debbugs.gnu.org; Thu, 05 Aug 2021 16:20:21 -0400 Received: from out1.migadu.com ([91.121.223.63]:36296) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBjqh-0004Aa-Ev for 49221@debbugs.gnu.org; Thu, 05 Aug 2021 16:20:16 -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=1628194813; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jKFF6d4/2sGpjPtedccEh4tt0TNoxYU5MsNpvA/77jw=; b=Y8YkHpSc9h4k++j87IOcyc7QgviGvzyTYBVyJbOwnLstEoA3NM0b7sDSOh5YJp3I/bPNdQ WV8Ld70fMlUnFcPoGyAZvFwWzm5YLaXPd+OAM7vPga/vtfOnKb79rODjg6+c7VBFIOQQO4 cUZ7wDjmoU8KhBSmyI4pK5fpfbwmynk= From: Sarah Morgensen Date: Thu, 5 Aug 2021 13:20:07 -0700 Message-Id: <869af0902740eceb02bf4d7125d81658c5ff9692.1628192044.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" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1628194872; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=jKFF6d4/2sGpjPtedccEh4tt0TNoxYU5MsNpvA/77jw=; b=akTllyw0U6qQ2fYmZ3W71hXBWT2jSq2OB1RkiQ4jddsgZgo/vejejaW8sJtGCEjTa5OMbL 5hHxIcC8CCH4el+NI9LoRpOgvHsANHzr79CUZho2kgZArXYxCjqzv4QVXwiTkSXVEtYhm3 fbYHbvG3P6eXkmh2U35fCBjK29yHdEcSXiiXIq1JPqV3zfHJh9X83vHoC7bmu8JY2E6tpm UAfsAqWgwgncETICUx+7060GFWWRxAbd6stMwjtHaEqUQJvRfv3hmfMRkzOAqTfzkskRgL VvBcYHgobxL/uYUke/jsEIfkj046Fo6+lzJC/IMWr1HuU8+hDJwV4idd7w0tkQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1628194872; a=rsa-sha256; cv=none; b=oCRbMLV3dowM8aEP7aVwU5DP/4Vtu/YvUF13kQ6dNQOx/EFtRAbreQJXyxyEbhAd/kNlPM sLDkYPbh7m03YjC+cHqno6cdvTC7vvkh1TkAhQ7JA2Qco6ah+Zsp9xhBzrxF80nRQwZ+dx 0gif2VYnN23R0BLCne00iSUzTlPjUaZQNZOPsIfMck4KUygLm/NPcBFEhfiy+jRopARZhu SDrLv4ctdOJRi6zKtRfJoKSx4ot4lzK5PH0XLLPPaj2Mq0pYIDjGg4YjyiLMmT4E7pzZfO 4oPEsO/Pro2Weaj+8ImySQk2aXebOGNTG0c4HwUfZC+gTfHXiGCnsfN7T0BQjg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mgsn.dev header.s=key1 header.b=Y8YkHpSc; dmarc=fail reason="SPF not aligned (relaxed)" header.from=mgsn.dev (policy=none); 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: -0.32 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mgsn.dev header.s=key1 header.b=Y8YkHpSc; dmarc=fail reason="SPF not aligned (relaxed)" header.from=mgsn.dev (policy=none); 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: 88A3FEA3A X-Spam-Score: -0.32 X-Migadu-Scanner: scn0.migadu.com X-TUID: seiqDXvILa6e * 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 5b2e64a8b8..03a93caed6 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1694,6 +1694,7 @@ dist_patch_DATA = \ %D%/packages/patches/rtags-separate-rct.patch \ %D%/packages/patches/racket-minimal-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 9ec4e281d8..d8d8728a14 100644 --- a/gnu/packages/backup.scm +++ b/gnu/packages/backup.scm @@ -20,6 +20,7 @@ ;;; Copyright © 2020 Michael Rohleder ;;; Copyright © 2021 Timothy Sample ;;; Copyright © 2021 Brice Waegeneire +;;; Copyright © 2021 Sarah Morgensen ;;; ;;; This file is part of GNU Guix. ;;; @@ -928,7 +929,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