all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#49221] [PATCH 00/13] Add go-1.16 and build with gccgo
@ 2021-06-25  6:52 Sarah Morgensen via Guix-patches via
  2021-06-25  7:20 ` [bug#49221] [PATCH 01/13] gnu: go-github-com-puerkitobio-goquery: Update to 1.7.0 Sarah Morgensen via Guix-patches via
                   ` (13 more replies)
  0 siblings, 14 replies; 25+ messages in thread
From: Sarah Morgensen via Guix-patches via @ 2021-06-25  6:52 UTC (permalink / raw)
  To: 49221

Hello Guix,

This patch adds go 1.16, but does *not* make it the default for other packages
which use go (as suggested in [2]). There have been a lot of changes between
1.14 and 1.16, and while I have fixed many issues, I am sure continued testing
will uncover many more.

This patch is based on [0], which adds gccgo-10.

With this patch, go automatically bootstraps from gccgo[0][1] on platforms not
supported by go 1.4, but you can do so on any platform with:

  guix build go --with-input=go@1.4-bootstrap-20171003=gccgo@10

Additionally, to build packages with 1.16:

  guix build <package> --with-input=go@1.14=go@1.16

I would appreciate testing and feedback on the new bootstrap process,
especially from powerpc64le users, as I have only been able to test on x86-64.
(Note that it took about two hours for gccgo to build and 30 minutes for gccgo
to build go.)

Changes from 1.14:

  * Bootstrap with gccgo on platforms which do not support go 1.4 (see above)
  * Use GO_LDSO to set the interpreter rather than patching files
  * Fix typo in cgoldflags patch ("-rpath=" > "-Wl,-rpath=")
  * Fix and re-enable some cgo/gccgo tests
  * Remove references to perl (used for tests) to reduce closure size by 10%
  * Set GOCACHE so go doesn't complain that it can't access it $HOME
  * Break out tests into "check" phase so builders have more control

I have successfully built and tested most go packages on x86-64, including
restic, syncthing, chezmoi, and exercism.

However... docker does not pass tests. It should probably be updated to 20.10,
but it is a very complicated package and I do not have the skill to do so. I
attempted to backport some of the fixes, but that was also beyond my abilities.

Perhaps someone else will rise to the challenge? :)

Sarah

[0] <https://issues.guix.gnu.org/49019> [PATCH 0/1] gnu: Add gccgo-10.
[1] <https://issues.guix.gnu.org/28226> Build go with gccgo
[2] <https://issues.guix.gnu.org/45161> [PATCH] Added Go 1.16.2

Sarah Morgensen (13):
  gnu: go-github-com-puerkitobio-goquery: Update to 1.7.0.
  gnu: go-go-uber-org-atomic: Update to 1.8.0.
  gnu: go-github-com-sergi-go-diff: Update to 1.2.0.
  gnu: go-github-com-pelletier-go-toml: Update to 1.9.3.
  gnu: go-github-com-masterminds-goutils: Update to 1.1.1.
  gnu: go-github-com-magiconair-properties: Update to 1.8.5.
  gnu: go-github-com-dlclark-regexp2: Update to 1.4.0.
  gnu: earlyoom: Patch tests for go-1.16.
  gnu: go-github-com-bmatcuk-doublestar: Remove test incompatible with
    go-1.16.
  gnu: restic: Patch tests for go-1.16.
  gnu: go-gopkg-in-check-v1: Update to latest.
  gnu: go-etcd-io-bbolt: Update to 1.3.6.
  gnu: Add go-1.16.

 gnu/local.mk                                  |   4 +
 gnu/packages/backup.scm                       |   5 +-
 gnu/packages/golang.scm                       | 243 +++++++++++++++---
 gnu/packages/linux.scm                        |   4 +-
 .../earlyoom-1.6.2-disable-go-module.patch    |  17 ++
 .../patches/go-fix-script-tests.patch         |  18 ++
 ...m-bmatcuk-doublestar-1.3-remove-test.patch |  15 ++
 .../restic-0.9.6-fix-tests-for-go1.15.patch   |  51 ++++
 8 files changed, 314 insertions(+), 43 deletions(-)
 create mode 100644 gnu/packages/patches/earlyoom-1.6.2-disable-go-module.patch
 create mode 100644 gnu/packages/patches/go-fix-script-tests.patch
 create mode 100644 gnu/packages/patches/go-github-com-bmatcuk-doublestar-1.3-remove-test.patch
 create mode 100644 gnu/packages/patches/restic-0.9.6-fix-tests-for-go1.15.patch


base-commit: c7804cd97b28ef012acc20c1d861904e9592382b
prerequisite-patch-id: edb56de17ac3cce58402c83a9671b00381dfee76
-- 
2.31.1





^ permalink raw reply	[flat|nested] 25+ messages in thread

* [bug#49221] [PATCH 01/13] gnu: go-github-com-puerkitobio-goquery: Update to 1.7.0.
  2021-06-25  6:52 [bug#49221] [PATCH 00/13] Add go-1.16 and build with gccgo Sarah Morgensen via Guix-patches via
@ 2021-06-25  7:20 ` Sarah Morgensen via Guix-patches via
  2021-06-25  7:20 ` [bug#49221] [PATCH 02/13] gnu: go-go-uber-org-atomic: Update to 1.8.0 Sarah Morgensen via Guix-patches via
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 25+ messages in thread
From: Sarah Morgensen via Guix-patches via @ 2021-06-25  7:20 UTC (permalink / raw)
  To: 49221

* gnu/packages/golang.scm (go-github-com-puerkitobio-goquery): Update to 1.7.0.
---
 gnu/packages/golang.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 1d17f02cdd..c08c3cd821 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -5518,7 +5518,7 @@ the parse trees produced by the html package.")
 (define-public go-github-com-puerkitobio-goquery
   (package
     (name "go-github-com-puerkitobio-goquery")
-    (version "1.5.1")
+    (version "1.7.0")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -5527,7 +5527,7 @@ the parse trees produced by the html package.")
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "08nf88cg663slzqr51k2jxlm1krnh86nrzwbk6v41ccq5jkfm7fx"))))
+                "0gh1d99l5xc9hvwa4j40pfq3y9vfyq52mnrz6bf1kw2r2zr2gbcc"))))
     (build-system go-build-system)
     (arguments
      `(#:import-path "github.com/PuerkitoBio/goquery"))
-- 
2.31.1





^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [bug#49221] [PATCH 02/13] gnu: go-go-uber-org-atomic: Update to 1.8.0.
  2021-06-25  6:52 [bug#49221] [PATCH 00/13] Add go-1.16 and build with gccgo Sarah Morgensen via Guix-patches via
  2021-06-25  7:20 ` [bug#49221] [PATCH 01/13] gnu: go-github-com-puerkitobio-goquery: Update to 1.7.0 Sarah Morgensen via Guix-patches via
@ 2021-06-25  7:20 ` Sarah Morgensen via Guix-patches via
  2021-06-25  7:20 ` [bug#49221] [PATCH 03/13] gnu: go-github-com-sergi-go-diff: Update to 1.2.0 Sarah Morgensen via Guix-patches via
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 25+ messages in thread
From: Sarah Morgensen via Guix-patches via @ 2021-06-25  7:20 UTC (permalink / raw)
  To: 49221

* gnu/packages/golang.scm (go-go-uber-org-atomic): Update to 1.8.0.
---
 gnu/packages/golang.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index c08c3cd821..e9c8969263 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -6894,7 +6894,7 @@ programs that use traditional command lines.")
 (define-public go-go-uber-org-atomic
   (package
     (name "go-go-uber-org-atomic")
-    (version "1.7.0")
+    (version "1.8.0")
     (source
      (origin
        (method git-fetch)
@@ -6903,7 +6903,7 @@ programs that use traditional command lines.")
              (commit (string-append "v" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "0yxvb5sixh76cl9j8dpa97gznj0p8pmg2cdw0ypfwhd3ipx9wph1"))))
+        (base32 "0grswsk7nkf7zmmychf6aj6032shyag1kgs6zf7qwxyn55dym1v8"))))
     (build-system go-build-system)
     (arguments
      '(#:import-path "go.uber.org/atomic"))
-- 
2.31.1





^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [bug#49221] [PATCH 03/13] gnu: go-github-com-sergi-go-diff: Update to 1.2.0.
  2021-06-25  6:52 [bug#49221] [PATCH 00/13] Add go-1.16 and build with gccgo Sarah Morgensen via Guix-patches via
  2021-06-25  7:20 ` [bug#49221] [PATCH 01/13] gnu: go-github-com-puerkitobio-goquery: Update to 1.7.0 Sarah Morgensen via Guix-patches via
  2021-06-25  7:20 ` [bug#49221] [PATCH 02/13] gnu: go-go-uber-org-atomic: Update to 1.8.0 Sarah Morgensen via Guix-patches via
@ 2021-06-25  7:20 ` Sarah Morgensen via Guix-patches via
  2021-06-25  7:20 ` [bug#49221] [PATCH 04/13] gnu: go-github-com-pelletier-go-toml: Update to 1.9.3 Sarah Morgensen via Guix-patches via
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 25+ messages in thread
From: Sarah Morgensen via Guix-patches via @ 2021-06-25  7:20 UTC (permalink / raw)
  To: 49221

* gnu/packages/golang.scm (go-github-com-sergi-go-diff): Update to 1.2.0.
---
 gnu/packages/golang.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index e9c8969263..f4f31b2943 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -5402,7 +5402,7 @@ can be used almost directly in Go source code.")
 (define-public go-github-com-sergi-go-diff
   (package
     (name "go-github-com-sergi-go-diff")
-    (version "1.1.0")
+    (version "1.2.0")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -5411,7 +5411,7 @@ can be used almost directly in Go source code.")
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "0ir8ali2vx0j7pipmlfd6k8c973akyy2nmbjrf008fm800zcp7z2"))))
+                "0cbj8nshllq102iiav0k1s01b8gwbkzj674g71n938qqna32y2pa"))))
     (build-system go-build-system)
     (arguments
      `(#:import-path "github.com/sergi/go-diff/diffmatchpatch"
-- 
2.31.1





^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [bug#49221] [PATCH 04/13] gnu: go-github-com-pelletier-go-toml: Update to 1.9.3.
  2021-06-25  6:52 [bug#49221] [PATCH 00/13] Add go-1.16 and build with gccgo Sarah Morgensen via Guix-patches via
                   ` (2 preceding siblings ...)
  2021-06-25  7:20 ` [bug#49221] [PATCH 03/13] gnu: go-github-com-sergi-go-diff: Update to 1.2.0 Sarah Morgensen via Guix-patches via
@ 2021-06-25  7:20 ` Sarah Morgensen via Guix-patches via
  2021-06-25  7:20 ` [bug#49221] [PATCH 05/13] gnu: go-github-com-masterminds-goutils: Update to 1.1.1 Sarah Morgensen via Guix-patches via
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 25+ messages in thread
From: Sarah Morgensen via Guix-patches via @ 2021-06-25  7:20 UTC (permalink / raw)
  To: 49221

* gnu/packages/golang.scm (go-github-com-pelletier-go-toml): Update to 1.9.3.
---
 gnu/packages/golang.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index f4f31b2943..9c9543e059 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -2050,7 +2050,7 @@ application's http.Handlers.")
 (define-public go-github-com-pelletier-go-toml
   (package
     (name "go-github-com-pelletier-go-toml")
-    (version "1.8.0")
+    (version "1.9.3")
     (source
      (origin
        (method git-fetch)
@@ -2060,7 +2060,7 @@ application's http.Handlers.")
        (file-name (git-file-name name version))
        (sha256
         (base32
-         "0fxmjm85c9h43lvqz71wr93fcc63bhj82nwby80222xx8ja63g7y"))))
+         "0cqwnvlgs1wgdgjxlwv8j52f7d6syniadr51sjh2fya99m5wzvsn"))))
     (build-system go-build-system)
     (arguments
      `(#:import-path "github.com/pelletier/go-toml"))
-- 
2.31.1





^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [bug#49221] [PATCH 05/13] gnu: go-github-com-masterminds-goutils: Update to 1.1.1.
  2021-06-25  6:52 [bug#49221] [PATCH 00/13] Add go-1.16 and build with gccgo Sarah Morgensen via Guix-patches via
                   ` (3 preceding siblings ...)
  2021-06-25  7:20 ` [bug#49221] [PATCH 04/13] gnu: go-github-com-pelletier-go-toml: Update to 1.9.3 Sarah Morgensen via Guix-patches via
@ 2021-06-25  7:20 ` Sarah Morgensen via Guix-patches via
  2021-06-25  7:20 ` [bug#49221] [PATCH 06/13] gnu: go-github-com-magiconair-properties: Update to 1.8.5 Sarah Morgensen via Guix-patches via
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 25+ messages in thread
From: Sarah Morgensen via Guix-patches via @ 2021-06-25  7:20 UTC (permalink / raw)
  To: 49221

* gnu/packages/golang.scm (go-github-com-masterminds-goutils): Update to 1.1.1.
---
 gnu/packages/golang.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 9c9543e059..97caa6ac35 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -5169,7 +5169,7 @@ suffix comparison, rather than the string-based or tree-based approaches.")
 (define-public go-github-com-masterminds-goutils
   (package
     (name "go-github-com-masterminds-goutils")
-    (version "1.1.0")
+    (version "1.1.1")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -5178,7 +5178,7 @@ suffix comparison, rather than the string-based or tree-based approaches.")
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "180px47gj936qyk5bkv5mbbgiil9abdjq6kwkf7sq70vyi9mcfiq"))))
+                "09m4mbcdlv9ng3xcrmjlxi0niavby52y9nl2jhjnbx1xxpjw0jrh"))))
     (build-system go-build-system)
     (arguments
      `(#:import-path "github.com/Masterminds/goutils"))
-- 
2.31.1





^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [bug#49221] [PATCH 06/13] gnu: go-github-com-magiconair-properties: Update to 1.8.5.
  2021-06-25  6:52 [bug#49221] [PATCH 00/13] Add go-1.16 and build with gccgo Sarah Morgensen via Guix-patches via
                   ` (4 preceding siblings ...)
  2021-06-25  7:20 ` [bug#49221] [PATCH 05/13] gnu: go-github-com-masterminds-goutils: Update to 1.1.1 Sarah Morgensen via Guix-patches via
@ 2021-06-25  7:20 ` Sarah Morgensen via Guix-patches via
  2021-06-25  7:21 ` [bug#49221] [PATCH 07/13] gnu: go-github-com-dlclark-regexp2: Update to 1.4.0 Sarah Morgensen via Guix-patches via
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 25+ messages in thread
From: Sarah Morgensen via Guix-patches via @ 2021-06-25  7:20 UTC (permalink / raw)
  To: 49221

* gnu/packages/golang.scm (go-github-com-magiconair-properties): Update to 1.8.5.
---
 gnu/packages/golang.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 97caa6ac35..0760090651 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -2028,7 +2028,7 @@ application's http.Handlers.")
 (define-public go-github-com-magiconair-properties
   (package
     (name "go-github-com-magiconair-properties")
-    (version "1.8.4")
+    (version "1.8.5")
     (source
      (origin
        (method git-fetch)
@@ -2038,7 +2038,7 @@ application's http.Handlers.")
        (file-name (git-file-name name version))
        (sha256
         (base32
-         "0q7d55z0v8y55dyy8nhgdnswf5zkgj3i87irbk294nvzhx01bnxd"))))
+         "0v4agnkhc30fblbmhs0gq2bikhdnnmqmpp4phrnza68m04j5hxbn"))))
     (build-system go-build-system)
     (arguments
      `(#:import-path "github.com/magiconair/properties"))
-- 
2.31.1





^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [bug#49221] [PATCH 07/13] gnu: go-github-com-dlclark-regexp2: Update to 1.4.0.
  2021-06-25  6:52 [bug#49221] [PATCH 00/13] Add go-1.16 and build with gccgo Sarah Morgensen via Guix-patches via
                   ` (5 preceding siblings ...)
  2021-06-25  7:20 ` [bug#49221] [PATCH 06/13] gnu: go-github-com-magiconair-properties: Update to 1.8.5 Sarah Morgensen via Guix-patches via
@ 2021-06-25  7:21 ` Sarah Morgensen via Guix-patches via
  2021-06-25  7:21 ` [bug#49221] [PATCH 08/13] gnu: earlyoom: Patch tests for go-1.16 Sarah Morgensen via Guix-patches via
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 25+ messages in thread
From: Sarah Morgensen via Guix-patches via @ 2021-06-25  7:21 UTC (permalink / raw)
  To: 49221

* gnu/packages/golang.scm (go-github-com-dlclark-regexp2): Update to 1.4.0.
---
 gnu/packages/golang.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 0760090651..9d5fc36710 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -5327,7 +5327,7 @@ matching and globbing with support for \"doublestar\" patterns.")
 (define-public go-github-com-dlclark-regexp2
   (package
     (name "go-github-com-dlclark-regexp2")
-    (version "1.2.0")
+    (version "1.4.0")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -5336,7 +5336,7 @@ matching and globbing with support for \"doublestar\" patterns.")
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "011l1prsywvhhi0yc7qmpsca1cwavmawyyld5kjzi0ff9ghvj4ng"))))
+                "1irfv89b7lfkn7k3zgx610ssil6k61qs1wjj31kvqpxb3pdx4kry"))))
     (build-system go-build-system)
     (arguments
      `(#:import-path "github.com/dlclark/regexp2"))
-- 
2.31.1





^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [bug#49221] [PATCH 08/13] gnu: earlyoom: Patch tests for go-1.16.
  2021-06-25  6:52 [bug#49221] [PATCH 00/13] Add go-1.16 and build with gccgo Sarah Morgensen via Guix-patches via
                   ` (6 preceding siblings ...)
  2021-06-25  7:21 ` [bug#49221] [PATCH 07/13] gnu: go-github-com-dlclark-regexp2: Update to 1.4.0 Sarah Morgensen via Guix-patches via
@ 2021-06-25  7:21 ` Sarah Morgensen via Guix-patches via
  2021-06-25  7:21 ` [bug#49221] [PATCH 09/13] gnu: go-github-com-bmatcuk-doublestar: Remove test incompatible with go-1.16 Sarah Morgensen via Guix-patches via
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 25+ messages in thread
From: Sarah Morgensen via Guix-patches via @ 2021-06-25  7:21 UTC (permalink / raw)
  To: 49221

* gnu/packages/patches/earlyoom-1.6.2-disable-go-module.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/linux.scm (earlyoom): Use it.
---
 gnu/local.mk                                    |  1 +
 gnu/packages/linux.scm                          |  4 +++-
 .../earlyoom-1.6.2-disable-go-module.patch      | 17 +++++++++++++++++
 3 files changed, 21 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/earlyoom-1.6.2-disable-go-module.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 509970f044..9caae52306 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -968,6 +968,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/dstat-skip-devices-without-io.patch	\
   %D%/packages/patches/dune-istl-2.7-fix-non-mpi-tests.patch	\
   %D%/packages/patches/dvd+rw-tools-add-include.patch 		\
+  %D%/packages/patches/earlyoom-1.6.2-disable-go-module.patch	\
   %D%/packages/patches/ecl-16-format-directive-limit.patch	\
   %D%/packages/patches/ecl-16-ignore-stderr-write-error.patch	\
   %D%/packages/patches/ecl-16-libffi.patch			\
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 65f9057077..1f0b4cdb8e 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -53,6 +53,7 @@
 ;;; Copyright © 2020 David Dashyan <mail@davie.li>
 ;;; Copyright © 2020 pukkamustard <pukkamustard@posteo.net>
 ;;; Copyright © 2021 B. Wilson <elaexuotee@wilsonb.com>
+;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -3393,7 +3394,8 @@ from the module-init-tools project.")
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "16iyn51xlrsbshc7p5xl2338yyfzknaqc538sa7mamgccqwgyvvq"))))
+                "16iyn51xlrsbshc7p5xl2338yyfzknaqc538sa7mamgccqwgyvvq"))
+              (patches (search-patches "earlyoom-1.6.2-disable-go-module.patch"))))
     (build-system gnu-build-system)
     (arguments
      `(#:phases
diff --git a/gnu/packages/patches/earlyoom-1.6.2-disable-go-module.patch b/gnu/packages/patches/earlyoom-1.6.2-disable-go-module.patch
new file mode 100644
index 0000000000..f7ef1222ed
--- /dev/null
+++ b/gnu/packages/patches/earlyoom-1.6.2-disable-go-module.patch
@@ -0,0 +1,17 @@
+Explicitly disable Go module support for testing with Go >= 1.15
+
+diff --git a/Makefile b/Makefile
+index e072c1b..f301f00 100644
+--- a/Makefile
++++ b/Makefile
+@@ -83,8 +83,8 @@ format: earlyoom
+ 
+ test: earlyoom
+ 	cppcheck -q . || echo "skipping optional cppcheck"
+-	go test -v
++	GO111MODULE=off go test -v
+ 
+ .PHONY: bench
+ bench:
+-	go test -run=NONE -bench=.
++	GO111MODULE=off go test -run=NONE -bench=.
-- 
2.31.1





^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [bug#49221] [PATCH 09/13] gnu: go-github-com-bmatcuk-doublestar: Remove test incompatible with go-1.16.
  2021-06-25  6:52 [bug#49221] [PATCH 00/13] Add go-1.16 and build with gccgo Sarah Morgensen via Guix-patches via
                   ` (7 preceding siblings ...)
  2021-06-25  7:21 ` [bug#49221] [PATCH 08/13] gnu: earlyoom: Patch tests for go-1.16 Sarah Morgensen via Guix-patches via
@ 2021-06-25  7:21 ` Sarah Morgensen via Guix-patches via
  2021-08-05 17:17   ` [bug#49221] [PATCH 00/13] Add go-1.16 and build with gccgo Maxim Cournoyer
  2021-06-25  7:21 ` [bug#49221] [PATCH 10/13] gnu: restic: Patch tests for go-1.16 Sarah Morgensen via Guix-patches via
                   ` (4 subsequent siblings)
  13 siblings, 1 reply; 25+ messages in thread
From: Sarah Morgensen via Guix-patches via @ 2021-06-25  7:21 UTC (permalink / raw)
  To: 49221

* gnu/packages/patches/go-github-com-bmatcuk-doublestar-1.3-remove-test.patch:
New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/golang.scm (go-github-com-bmatcuk-doublestar): Use it.
---
 gnu/local.mk                                      |  1 +
 gnu/packages/golang.scm                           |  5 ++++-
 ...b-com-bmatcuk-doublestar-1.3-remove-test.patch | 15 +++++++++++++++
 3 files changed, 20 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/go-github-com-bmatcuk-doublestar-1.3-remove-test.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 9caae52306..a176772ece 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1172,6 +1172,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/gobject-introspection-cc.patch		\
   %D%/packages/patches/gobject-introspection-girepository.patch	\
   %D%/packages/patches/go-skip-gc-test.patch			\
+  %D%/packages/patches/go-github-com-bmatcuk-doublestar-1.3-remove-test.patch	\
   %D%/packages/patches/gpm-glibc-2.26.patch			\
   %D%/packages/patches/gpodder-disable-updater.patch		\
   %D%/packages/patches/gpsbabel-fix-i686-test.patch		\
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 9d5fc36710..3170e11925 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -5314,7 +5314,10 @@ template functions.")
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "0bk5bixl6rqa8znxghyp6zndbccx9kdyrymjahgyp6qsrp7rk144"))))
+                "0bk5bixl6rqa8znxghyp6zndbccx9kdyrymjahgyp6qsrp7rk144"))
+              (patches
+               (search-patches
+                "go-github-com-bmatcuk-doublestar-1.3-remove-test.patch"))))
     (build-system go-build-system)
     (arguments
      `(#:import-path "github.com/bmatcuk/doublestar"))
diff --git a/gnu/packages/patches/go-github-com-bmatcuk-doublestar-1.3-remove-test.patch b/gnu/packages/patches/go-github-com-bmatcuk-doublestar-1.3-remove-test.patch
new file mode 100644
index 0000000000..2c64575914
--- /dev/null
+++ b/gnu/packages/patches/go-github-com-bmatcuk-doublestar-1.3-remove-test.patch
@@ -0,0 +1,15 @@
+Remove test which fails with Go >= 1.15 due to API changes.
+This patch should no longer be necessary with doublestar v4+
+
+diff --git a/doublestar_test.go b/doublestar_test.go
+index b21d20ad4b..f510c3d06b 100644
+--- a/doublestar_test.go
++++ b/doublestar_test.go
+@@ -80,7 +80,6 @@ var matchTests = []MatchTest{
+ 	{"[", "a", false, ErrBadPattern, true},
+ 	{"[^", "a", false, ErrBadPattern, true},
+ 	{"[^bc", "a", false, ErrBadPattern, true},
+-	{"a[", "a", false, nil, false},
+ 	{"a[", "ab", false, ErrBadPattern, true},
+ 	{"*x", "xxx", true, nil, true},
+ 	{"[abc]", "b", true, nil, true},
-- 
2.31.1





^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [bug#49221] [PATCH 10/13] gnu: restic: Patch tests for go-1.16.
  2021-06-25  6:52 [bug#49221] [PATCH 00/13] Add go-1.16 and build with gccgo Sarah Morgensen via Guix-patches via
                   ` (8 preceding siblings ...)
  2021-06-25  7:21 ` [bug#49221] [PATCH 09/13] gnu: go-github-com-bmatcuk-doublestar: Remove test incompatible with go-1.16 Sarah Morgensen via Guix-patches via
@ 2021-06-25  7:21 ` Sarah Morgensen via Guix-patches via
  2021-08-05 17:20   ` [bug#49221] [PATCH 00/13] Add go-1.16 and build with gccgo Maxim Cournoyer
  2021-06-25  7:21 ` [bug#49221] [PATCH 11/13] gnu: go-gopkg-in-check-v1: Update to latest Sarah Morgensen via Guix-patches via
                   ` (3 subsequent siblings)
  13 siblings, 1 reply; 25+ messages in thread
From: Sarah Morgensen via Guix-patches via @ 2021-06-25  7:21 UTC (permalink / raw)
  To: 49221

* 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 <sirmacik@wioo.waw.pl>
 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
 ;;; Copyright © 2021 Timothy Sample <samplet@ngyro.com>
+;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
 ;;;
 ;;; 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 <alexander@bumpern.de>
+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





^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [bug#49221] [PATCH 11/13] gnu: go-gopkg-in-check-v1: Update to latest.
  2021-06-25  6:52 [bug#49221] [PATCH 00/13] Add go-1.16 and build with gccgo Sarah Morgensen via Guix-patches via
                   ` (9 preceding siblings ...)
  2021-06-25  7:21 ` [bug#49221] [PATCH 10/13] gnu: restic: Patch tests for go-1.16 Sarah Morgensen via Guix-patches via
@ 2021-06-25  7:21 ` Sarah Morgensen via Guix-patches via
  2021-06-25  7:21 ` [bug#49221] [PATCH 12/13] gnu: go-etcd-io-bbolt: Update to 1.3.6 Sarah Morgensen via Guix-patches via
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 25+ messages in thread
From: Sarah Morgensen via Guix-patches via @ 2021-06-25  7:21 UTC (permalink / raw)
  To: 49221

* gnu/packages/golang.scm (go-gopkg-in-check-v1): Update to latest, fix
license.
---
 gnu/packages/golang.scm | 46 ++++++++++++++++++++---------------------
 1 file changed, 22 insertions(+), 24 deletions(-)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 3170e11925..369bfc271c 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -2339,30 +2339,28 @@ which satisfies the cron expression.")
                      license:asl2.0)))))
 
 (define-public go-gopkg-in-check-v1
-  (let ((commit "788fd78401277ebd861206a03c884797c6ec5541")
-        (revision "1"))
-    (package
-      (name "go-gopkg-in-check-v1")
-      (version (git-version "1.0.0" revision commit))
-      (source
-       (origin
-         (method git-fetch)
-         (uri (git-reference
-               (url "https://github.com/go-check/check")
-               (commit commit)))
-         (file-name (git-file-name name version))
-         (sha256
-          (base32
-           "0v3bim0j375z81zrpr5qv42knqs0y2qv2vkjiqi5axvb78slki1a"))))
-      (build-system go-build-system)
-      (arguments
-       '(#:import-path "gopkg.in/check.v1"))
-      (propagated-inputs
-       `(("go-github-com-kr-pretty" ,go-github-com-kr-pretty)))
-      (home-page "https://gopkg.in/check.v1")
-      (synopsis "Test framework for the Go language")
-      (description "This package provides a test library for the Go language.")
-      (license license:asl2.0))))
+  (package
+    (name "go-gopkg-in-check-v1")
+    (version "1.0.0-20201130134442-10cb98267c6c")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/go-check/check")
+             (commit (go-version->git-ref version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "1jwxndf8rsyx0fgrp47d99rp55yzssmryb92jfj3yf7zd8rjjljn"))))
+    (build-system go-build-system)
+    (arguments
+     '(#:import-path "gopkg.in/check.v1"))
+    (propagated-inputs
+     `(("go-github-com-kr-pretty" ,go-github-com-kr-pretty)))
+    (home-page "https://gopkg.in/check.v1")
+    (synopsis "Test framework for the Go language")
+    (description "This package provides a test library for the Go language.")
+    (license license:bsd-2)))
 
 (define-public go-gopkg-in-ini-v1
   (package
-- 
2.31.1





^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [bug#49221] [PATCH 12/13] gnu: go-etcd-io-bbolt: Update to 1.3.6.
  2021-06-25  6:52 [bug#49221] [PATCH 00/13] Add go-1.16 and build with gccgo Sarah Morgensen via Guix-patches via
                   ` (10 preceding siblings ...)
  2021-06-25  7:21 ` [bug#49221] [PATCH 11/13] gnu: go-gopkg-in-check-v1: Update to latest Sarah Morgensen via Guix-patches via
@ 2021-06-25  7:21 ` Sarah Morgensen via Guix-patches via
  2021-06-25  7:21 ` [bug#49221] [PATCH 13/13] gnu: Add go-1.16 Sarah Morgensen via Guix-patches via
  2021-06-28 19:22 ` [bug#49221] [PATCH 00/13] Add go-1.16 and build with gccgo Efraim Flashner
  13 siblings, 0 replies; 25+ messages in thread
From: Sarah Morgensen via Guix-patches via @ 2021-06-25  7:21 UTC (permalink / raw)
  To: 49221

* gnu/packages/golang.scm (go-etcd-io-bbolt): Update to 1.3.6.
---
 gnu/packages/golang.scm | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 369bfc271c..ae32e9f546 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -6302,7 +6302,7 @@ deleting secrets from the system keyring.")
 (define-public go-etcd-io-bbolt
   (package
     (name "go-etcd-io-bbolt")
-    (version "1.3.5")
+    (version "1.3.6")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -6311,10 +6311,12 @@ deleting secrets from the system keyring.")
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "1h64gipvcg7060byv5wjlf524kqwj12p3v08kfh4ygv46vpm8p2r"))))
+                "0pj5245d417za41j6p09fmkbv05797vykr1bi9a6rnwddh1dbs8d"))))
     (build-system go-build-system)
     (arguments
      `(#:import-path "go.etcd.io/bbolt"))
+    (propagated-inputs
+     `(("go-golang-org-x-sys" ,go-golang-org-x-sys)))
     (home-page "https://pkg.go.dev/go.etcd.io/bbolt/")
     (synopsis "Low-level key/value store in Go")
     (description "This package implements a low-level key/value store in Go.")
-- 
2.31.1





^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [bug#49221] [PATCH 13/13] gnu: Add go-1.16.
  2021-06-25  6:52 [bug#49221] [PATCH 00/13] Add go-1.16 and build with gccgo Sarah Morgensen via Guix-patches via
                   ` (11 preceding siblings ...)
  2021-06-25  7:21 ` [bug#49221] [PATCH 12/13] gnu: go-etcd-io-bbolt: Update to 1.3.6 Sarah Morgensen via Guix-patches via
@ 2021-06-25  7:21 ` Sarah Morgensen via Guix-patches via
  2021-06-28 19:22 ` [bug#49221] [PATCH 00/13] Add go-1.16 and build with gccgo Efraim Flashner
  13 siblings, 0 replies; 25+ messages in thread
From: Sarah Morgensen via Guix-patches via @ 2021-06-25  7:21 UTC (permalink / raw)
  To: 49221

Add go@1.16 as a non-default go. Changes from 1.14: Use now-supported GO_LDSO
configuration option for setting the interpreter. Bootstrap with gccgo on
platforms which do not support go-1.4. Fix and re-enable cmd/go script tests.
Fix typo in cgoldflags patch. Break out tests into "check" phase. Remove
references to perl to reduce closure size by ~10%. Set GOCACHE so go doesn't
attempt to access $HOME.

* gnu/packages/patches/go-fix-script-tests.patch: New file.
* local.mk (dist_patch_DATA): Register it.
* gnu/packages/golang.scm (go-1.16): New variable. Use the patch.
---
 gnu/local.mk                                  |   1 +
 gnu/packages/golang.scm                       | 158 ++++++++++++++++++
 .../patches/go-fix-script-tests.patch         |  18 ++
 3 files changed, 177 insertions(+)
 create mode 100644 gnu/packages/patches/go-fix-script-tests.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 24f2d9d013..59df29a72e 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1171,6 +1171,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/gobject-introspection-absolute-shlib-path.patch \
   %D%/packages/patches/gobject-introspection-cc.patch		\
   %D%/packages/patches/gobject-introspection-girepository.patch	\
+  %D%/packages/patches/go-fix-script-tests.patch			\
   %D%/packages/patches/go-skip-gc-test.patch			\
   %D%/packages/patches/go-github-com-bmatcuk-doublestar-1.3-remove-test.patch	\
   %D%/packages/patches/gpm-glibc-2.26.patch			\
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index ae32e9f546..c169d573b4 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -45,6 +45,7 @@
 (define-module (gnu packages golang)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix utils)
+  #:use-module ((guix build utils) #:select (alist-replace))
   #:use-module (guix download)
   #:use-module (guix git-download)
   #:use-module (guix packages)
@@ -54,6 +55,7 @@
   #:use-module (gnu packages)
   #:use-module (gnu packages admin)
   #:use-module (gnu packages base)
+  #:use-module ((gnu packages bootstrap) #:select (glibc-dynamic-linker))
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages lua)
@@ -441,6 +443,162 @@ in the style of communicating sequential processes (@dfn{CSP}).")
        ,@(package-native-inputs go-1.4)))
     (supported-systems %supported-systems)))
 
+(define-public go-1.16
+  (package
+    (inherit go-1.14)
+    (name "go")
+    (version "1.16.5")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/golang/go")
+             (commit (string-append "go" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "19a93p217h5xi2sgh34qzv24pkd4df0sw4fc5z6k47lspjp3vx2l"))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments go-1.14)
+       ((#:tests? _) #t)
+       ((#:phases phases)
+        `(modify-phases ,phases
+           (add-after 'unpack 'remove-unused-sourcecode-generators
+             (lambda _
+               ;; Prevent perl from inclusion in closure through unused files
+               (for-each delete-file (find-files "src" "\\.pl$"))))
+           (replace 'prebuild
+             (lambda* (#:key inputs outputs #:allow-other-keys)
+               (let* ((gcclib (string-append (assoc-ref inputs "gcc:lib") "/lib"))
+                      (net-base (assoc-ref inputs "net-base"))
+                      (tzdata-path
+                       (string-append (assoc-ref inputs "tzdata") "/share/zoneinfo")))
+
+                 ;; Having the patch in the 'patches' field of <origin> breaks
+                 ;; the 'TestServeContent' test due to the fact that
+                 ;; timestamps are reset.  Thus, apply it from here.
+                 (invoke "patch" "-p2" "--force" "-i"
+                         (assoc-ref inputs "go-skip-gc-test.patch"))
+                 (invoke "patch" "-p2" "--force" "-i"
+                         (assoc-ref inputs "go-fix-script-tests.patch"))
+
+                 (for-each make-file-writable (find-files "."))
+
+                 (substitute* "os/os_test.go"
+                   (("/usr/bin") (getcwd))
+                   (("/bin/sh") (which "sh")))
+
+                 (substitute* "cmd/go/testdata/script/cgo_path_space.txt"
+                   (("/bin/sh") (which "sh")))
+
+                 ;; Add libgcc to runpath
+                 (substitute* "cmd/link/internal/ld/lib.go"
+                   (("!rpath.set") "true"))
+                 (substitute* "cmd/go/internal/work/gccgo.go"
+                   (("cgoldflags := \\[\\]string\\{\\}")
+                    (string-append "cgoldflags := []string{"
+                                   "\"-Wl,-rpath=" gcclib "\""
+                                   "}"))
+                   (("\"-lgcc_s\", ")
+                    (string-append
+                     "\"-Wl,-rpath=" gcclib "\", \"-lgcc_s\", ")))
+                 (substitute* "cmd/go/internal/work/gc.go"
+                   (("ldflags = setextld\\(ldflags, compiler\\)")
+                    (string-append
+                     "ldflags = setextld(ldflags, compiler)\n"
+                     "ldflags = append(ldflags, \"-r\")\n"
+                     "ldflags = append(ldflags, \"" gcclib "\")\n")))
+
+                 ;; Disable failing tests: these tests attempt to access
+                 ;; commands or network resources which are neither available
+                 ;; nor necessary for the build to succeed.
+                 (for-each
+                  (match-lambda
+                    ((file regex)
+                     (substitute* file
+                       ((regex all before test_name)
+                        (string-append before "Disabled" test_name)))))
+                  '(("net/net_test.go" "(.+)(TestShutdownUnix.+)")
+                    ("net/dial_test.go" "(.+)(TestDialTimeout.+)")
+                    ("net/cgo_unix_test.go" "(.+)(TestCgoLookupPort.+)")
+                    ("net/cgo_unix_test.go" "(.+)(TestCgoLookupPortWithCancel.+)")
+                    ;; 127.0.0.1 doesn't exist
+                    ("net/cgo_unix_test.go" "(.+)(TestCgoLookupPTR.+)")
+                    ;; 127.0.0.1 doesn't exist
+                    ("net/cgo_unix_test.go" "(.+)(TestCgoLookupPTRWithCancel.+)")
+                    ;; /etc/services doesn't exist
+                    ("net/parse_test.go" "(.+)(TestReadLine.+)")
+                    ("os/os_test.go" "(.+)(TestHostname.+)")
+                    ;; The user's directory doesn't exist
+                    ("os/os_test.go" "(.+)(TestUserHomeDir.+)")
+                    ("time/format_test.go" "(.+)(TestParseInSydney.+)")
+                    ("time/format_test.go" "(.+)(TestParseInLocation.+)")
+                    ("os/exec/exec_test.go" "(.+)(TestEcho.+)")
+                    ("os/exec/exec_test.go" "(.+)(TestCommandRelativeName.+)")
+                    ("os/exec/exec_test.go" "(.+)(TestCatStdin.+)")
+                    ("os/exec/exec_test.go" "(.+)(TestCatGoodAndBadFile.+)")
+                    ("os/exec/exec_test.go" "(.+)(TestExitStatus.+)")
+                    ("os/exec/exec_test.go" "(.+)(TestPipes.+)")
+                    ("os/exec/exec_test.go" "(.+)(TestStdinClose.+)")
+                    ("os/exec/exec_test.go" "(.+)(TestIgnorePipeErrorOnSuccess.+)")
+                    ("syscall/syscall_unix_test.go" "(.+)(TestPassFD\\(.+)")
+                    ("os/exec/exec_test.go" "(.+)(TestExtraFiles/areturn.+)")
+                    ("cmd/go/go_test.go" "(.+)(TestCoverageWithCgo.+)")
+                    ("cmd/go/go_test.go" "(.+)(TestTwoPkgConfigs.+)")
+                    ("os/exec/exec_test.go" "(.+)(TestOutputStderrCapture.+)")
+                    ("os/exec/exec_test.go" "(.+)(TestExtraFiles.+)")
+                    ("os/exec/exec_test.go" "(.+)(TestExtraFilesRace.+)")
+                    ("net/lookup_test.go" "(.+)(TestLookupPort.+)")
+                    ("syscall/exec_linux_test.go"
+                     "(.+)(TestCloneNEWUSERAndRemapNoRootDisableSetgroups.+)")))
+
+                 ;; These tests fail on aarch64-linux
+                 (substitute* "cmd/dist/test.go"
+                   (("t.registerHostTest\\(\"testsanitizers/msan.*") ""))
+
+                 ;; fix shebang for testar script
+                 ;; note the target script is generated at build time.
+                 (substitute* "../misc/cgo/testcarchive/carchive_test.go"
+                   (("#!/usr/bin/env") (string-append "#!" (which "env"))))
+
+                 (substitute* "net/lookup_unix.go"
+                   (("/etc/protocols") (string-append net-base "/etc/protocols")))
+                 (substitute* "net/port_unix.go"
+                   (("/etc/services") (string-append net-base "/etc/services")))
+                 (substitute* "time/zoneinfo_unix.go"
+                   (("/usr/share/zoneinfo/") tzdata-path)))))
+           (replace 'build
+             (lambda* (#:key inputs outputs #:allow-other-keys)
+               ;; FIXME: Some of the .a files are not bit-reproducible.
+               ;; (Is this still true?)
+               (let* ((output (assoc-ref outputs "out"))
+                      (loader (string-append (assoc-ref inputs "libc")
+                                             ,(glibc-dynamic-linker))))
+                 (setenv "CC" (which "gcc"))
+                 (setenv "GO_LDSO" loader)
+                 (setenv "GOOS" "linux")
+                 (setenv "GOROOT" (dirname (getcwd)))
+                 (setenv "GOROOT_FINAL" output)
+                 (setenv "GOCACHE" "/tmp/go-cache")
+                 (invoke "sh" "make.bash" "--no-banner"))))
+           (replace 'check
+             (lambda* (#:key target (tests? (not target)) (parallel-tests? #t)
+                       #:allow-other-keys)
+               (let* ((njobs (if parallel-tests? (parallel-job-count) 1)))
+                 (when tests?
+                   (setenv "GOMAXPROCS" (number->string njobs))
+                   (invoke "sh" "run.bash" "--no-rebuild")))))
+           (add-before 'install 'unpatch-perl-shebangs
+             (lambda _
+               ;; Rewrite references to perl input in test scripts
+               (substitute* "net/http/cgi/testdata/test.cgi"
+                 (("^#!.*") "#!/usr/bin/env perl\n"))))))))
+    (native-inputs
+     `(("go-fix-script-tests.patch" ,(search-patch "go-fix-script-tests.patch"))
+       ,@(if (not (member (%current-system) (package-supported-systems go-1.4)))
+             (alist-replace "go" `(,gccgo-10) (package-native-inputs go-1.14))
+             (package-native-inputs go-1.14))))))
+
 (define-public go go-1.14)
 
 (define-public go-github-com-alsm-ioprogress
diff --git a/gnu/packages/patches/go-fix-script-tests.patch b/gnu/packages/patches/go-fix-script-tests.patch
new file mode 100644
index 0000000000..b29e83fef0
--- /dev/null
+++ b/gnu/packages/patches/go-fix-script-tests.patch
@@ -0,0 +1,18 @@
+Make library/header paths visible to cmd/go script tests, which is necessary for
+cgo/gccgo tests to work correctly
+
+diff --git a/src/cmd/go/script_test.go b/src/cmd/go/script_test.go
+index dfaa40548e..9d0f0e9bcd 100644
+--- a/src/cmd/go/script_test.go
++++ b/src/cmd/go/script_test.go
+@@ -100,6 +100,10 @@ const (
+ var extraEnvKeys = []string{
+ 	"SYSTEMROOT",         // must be preserved on Windows to find DLLs; golang.org/issue/25210
+ 	"WINDIR",             // must be preserved on Windows to be able to run PowerShell command; golang.org/issue/30711
++	"CPATH",
++	"C_INCLUDE_PATH",
++	"CPLUS_INCLUDE_PATH",
++	"LIBRARY_PATH",
+ 	"LD_LIBRARY_PATH",    // must be preserved on Unix systems to find shared libraries
+ 	"CC",                 // don't lose user settings when invoking cgo
+ 	"GO_TESTING_GOTOOLS", // for gccgo testing
-- 
2.31.1





^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [bug#49221] [PATCH 00/13] Add go-1.16 and build with gccgo
  2021-06-25  6:52 [bug#49221] [PATCH 00/13] Add go-1.16 and build with gccgo Sarah Morgensen via Guix-patches via
                   ` (12 preceding siblings ...)
  2021-06-25  7:21 ` [bug#49221] [PATCH 13/13] gnu: Add go-1.16 Sarah Morgensen via Guix-patches via
@ 2021-06-28 19:22 ` Efraim Flashner
  2021-07-01  3:24   ` Sarah Morgensen via Guix-patches via
  2021-07-25  2:17   ` Sarah Morgensen
  13 siblings, 2 replies; 25+ messages in thread
From: Efraim Flashner @ 2021-06-28 19:22 UTC (permalink / raw)
  To: Sarah Morgensen; +Cc: 49221

[-- Attachment #1: Type: text/plain, Size: 4815 bytes --]

On Thu, Jun 24, 2021 at 11:52:55PM -0700, Sarah Morgensen via Guix-patches via wrote:
> Hello Guix,
> 
> This patch adds go 1.16, but does *not* make it the default for other packages
> which use go (as suggested in [2]). There have been a lot of changes between
> 1.14 and 1.16, and while I have fixed many issues, I am sure continued testing
> will uncover many more.
> 
> This patch is based on [0], which adds gccgo-10.

I've applied the patch, so it should now be available in the main repo :)

> With this patch, go automatically bootstraps from gccgo[0][1] on platforms not
> supported by go 1.4, but you can do so on any platform with:
> 
>   guix build go --with-input=go@1.4-bootstrap-20171003=gccgo@10
> 
> Additionally, to build packages with 1.16:
> 
>   guix build <package> --with-input=go@1.14=go@1.16
> 
> I would appreciate testing and feedback on the new bootstrap process,
> especially from powerpc64le users, as I have only been able to test on x86-64.
> (Note that it took about two hours for gccgo to build and 30 minutes for gccgo
> to build go.)

I was able to build go@1.16 as-is and with the conditional switched, so
it used gccgo to bootstrap go@1.16. Additionally on my x86_64 machine
using emulation I was able to build go@1.16 for powerpc64le. On the
powerpc64le box I have access to I was able to build gccgo and I'm still
building out to go@1.16.

> Changes from 1.14:
> 
>   * Bootstrap with gccgo on platforms which do not support go 1.4 (see above)
>   * Use GO_LDSO to set the interpreter rather than patching files
>   * Fix typo in cgoldflags patch ("-rpath=" > "-Wl,-rpath=")
>   * Fix and re-enable some cgo/gccgo tests
>   * Remove references to perl (used for tests) to reduce closure size by 10%
>   * Set GOCACHE so go doesn't complain that it can't access it $HOME
>   * Break out tests into "check" phase so builders have more control
> 
> I have successfully built and tested most go packages on x86-64, including
> restic, syncthing, chezmoi, and exercism.
> 
> However... docker does not pass tests. It should probably be updated to 20.10,
> but it is a very complicated package and I do not have the skill to do so. I
> attempted to backport some of the fixes, but that was also beyond my abilities.
> 
> Perhaps someone else will rise to the challenge? :)

My only concern about the patches is that I've been burned before about
pushing updates to go packages, where some seem to have insufficient
testing and then they'll build and fail. So in the meantime I've pushed
the go@1.16 patch.

> Sarah
> 
> [0] <https://issues.guix.gnu.org/49019> [PATCH 0/1] gnu: Add gccgo-10.
> [1] <https://issues.guix.gnu.org/28226> Build go with gccgo
> [2] <https://issues.guix.gnu.org/45161> [PATCH] Added Go 1.16.2
> 
> Sarah Morgensen (13):
>   gnu: go-github-com-puerkitobio-goquery: Update to 1.7.0.
>   gnu: go-go-uber-org-atomic: Update to 1.8.0.
>   gnu: go-github-com-sergi-go-diff: Update to 1.2.0.
>   gnu: go-github-com-pelletier-go-toml: Update to 1.9.3.
>   gnu: go-github-com-masterminds-goutils: Update to 1.1.1.
>   gnu: go-github-com-magiconair-properties: Update to 1.8.5.
>   gnu: go-github-com-dlclark-regexp2: Update to 1.4.0.
>   gnu: earlyoom: Patch tests for go-1.16.
>   gnu: go-github-com-bmatcuk-doublestar: Remove test incompatible with
>     go-1.16.
>   gnu: restic: Patch tests for go-1.16.
>   gnu: go-gopkg-in-check-v1: Update to latest.
>   gnu: go-etcd-io-bbolt: Update to 1.3.6.
>   gnu: Add go-1.16.
> 
>  gnu/local.mk                                  |   4 +
>  gnu/packages/backup.scm                       |   5 +-
>  gnu/packages/golang.scm                       | 243 +++++++++++++++---
>  gnu/packages/linux.scm                        |   4 +-
>  .../earlyoom-1.6.2-disable-go-module.patch    |  17 ++
>  .../patches/go-fix-script-tests.patch         |  18 ++
>  ...m-bmatcuk-doublestar-1.3-remove-test.patch |  15 ++
>  .../restic-0.9.6-fix-tests-for-go1.15.patch   |  51 ++++
>  8 files changed, 314 insertions(+), 43 deletions(-)
>  create mode 100644 gnu/packages/patches/earlyoom-1.6.2-disable-go-module.patch
>  create mode 100644 gnu/packages/patches/go-fix-script-tests.patch
>  create mode 100644 gnu/packages/patches/go-github-com-bmatcuk-doublestar-1.3-remove-test.patch
>  create mode 100644 gnu/packages/patches/restic-0.9.6-fix-tests-for-go1.15.patch
> 
> 
> base-commit: c7804cd97b28ef012acc20c1d861904e9592382b
> prerequisite-patch-id: edb56de17ac3cce58402c83a9671b00381dfee76
> -- 
> 2.31.1
> 
> 
> 
> 

-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [bug#49221] [PATCH 00/13] Add go-1.16 and build with gccgo
  2021-06-28 19:22 ` [bug#49221] [PATCH 00/13] Add go-1.16 and build with gccgo Efraim Flashner
@ 2021-07-01  3:24   ` Sarah Morgensen via Guix-patches via
  2021-07-25  2:17   ` Sarah Morgensen
  1 sibling, 0 replies; 25+ messages in thread
From: Sarah Morgensen via Guix-patches via @ 2021-07-01  3:24 UTC (permalink / raw)
  To: Efraim Flashner; +Cc: 49221

Hello,

Thanks for the push!

Efraim Flashner <efraim@flashner.co.il> writes:

> On Thu, Jun 24, 2021 at 11:52:55PM -0700, Sarah Morgensen via Guix-patches via wrote:
> 
>> I would appreciate testing and feedback on the new bootstrap process,
>> especially from powerpc64le users, as I have only been able to test on x86-64.
>> (Note that it took about two hours for gccgo to build and 30 minutes for gccgo
>> to build go.)
>
> I was able to build go@1.16 as-is and with the conditional switched, so
> it used gccgo to bootstrap go@1.16. Additionally on my x86_64 machine
> using emulation I was able to build go@1.16 for powerpc64le. On the
> powerpc64le box I have access to I was able to build gccgo and I'm still
> building out to go@1.16.

Excellent! Thanks for testing. Fingers crossed :)

> My only concern about the patches is that I've been burned before about
> pushing updates to go packages, where some seem to have insufficient
> testing and then they'll build and fail. So in the meantime I've pushed
> the go@1.16 patch.

Fair enough. We'll have to wait & see if any issues surface. On that
note, I've found the tests in etcd-io-bbolt and go-gopkg-in-check-v1 to
be performance-based, and they would sometimes fail on my VM. Updating
them did help, but did not completely eliminate the issue.

--
Sarah




^ permalink raw reply	[flat|nested] 25+ messages in thread

* [bug#49221] [PATCH 00/13] Add go-1.16 and build with gccgo
  2021-06-28 19:22 ` [bug#49221] [PATCH 00/13] Add go-1.16 and build with gccgo Efraim Flashner
  2021-07-01  3:24   ` Sarah Morgensen via Guix-patches via
@ 2021-07-25  2:17   ` Sarah Morgensen
  2021-08-05 14:03     ` Efraim Flashner
  1 sibling, 1 reply; 25+ messages in thread
From: Sarah Morgensen @ 2021-07-25  2:17 UTC (permalink / raw)
  To: Efraim Flashner; +Cc: 49221

Hi Efraim,

Just following up on this.

Efraim Flashner <efraim@flashner.co.il> writes:

> On Thu, Jun 24, 2021 at 11:52:55PM -0700, Sarah Morgensen via Guix-patches via wrote:
>> Hello Guix,
>> 
>> This patch adds go 1.16, but does *not* make it the default for other packages
>> which use go (as suggested in [2]). There have been a lot of changes between
>> 1.14 and 1.16, and while I have fixed many issues, I am sure continued testing
>> will uncover many more.
>> 
>> This patch is based on [0], which adds gccgo-10.
>
> I've applied the patch, so it should now be available in the main repo :)

Should the following related issues be closed now?

[0] <https://issues.guix.gnu.org/28226> Build go with gccgo
[1] <https://issues.guix.gnu.org/46380> gnu: gccgo: Add version 10.
[2] <https://issues.guix.gnu.org/47434> Added Go 1.16.2
[3] <https://issues.guix.gnu.org/45161> Update go?

[...]

> My only concern about the patches is that I've been burned before about
> pushing updates to go packages, where some seem to have insufficient
> testing and then they'll build and fail. So in the meantime I've pushed
> the go@1.16 patch.

Is there something specific to be done to sufficiently test them?  I'm
not sure what else to do other than manually testing dependents.

Thanks,
Sarah





^ permalink raw reply	[flat|nested] 25+ messages in thread

* [bug#49221] [PATCH 00/13] Add go-1.16 and build with gccgo
  2021-07-25  2:17   ` Sarah Morgensen
@ 2021-08-05 14:03     ` Efraim Flashner
  2021-08-05 20:20       ` [bug#49221] [PATCH v2 1/2] gnu: go-github-com-bmatcuk-doublestar: Remove test incompatible with go-1.16 Sarah Morgensen
  2021-08-05 20:20       ` [bug#49221] [PATCH v2 2/2] gnu: restic: Patch tests for go-1.16 Sarah Morgensen
  0 siblings, 2 replies; 25+ messages in thread
From: Efraim Flashner @ 2021-08-05 14:03 UTC (permalink / raw)
  To: Sarah Morgensen; +Cc: 49221

[-- Attachment #1: Type: text/plain, Size: 1968 bytes --]

On Sat, Jul 24, 2021 at 07:17:28PM -0700, Sarah Morgensen wrote:
> Hi Efraim,
> 
> Just following up on this.

Sorry for taking so long to get back to you.

> Efraim Flashner <efraim@flashner.co.il> writes:
> 
> > On Thu, Jun 24, 2021 at 11:52:55PM -0700, Sarah Morgensen via Guix-patches via wrote:
> >> Hello Guix,
> >> 
> >> This patch adds go 1.16, but does *not* make it the default for other packages
> >> which use go (as suggested in [2]). There have been a lot of changes between
> >> 1.14 and 1.16, and while I have fixed many issues, I am sure continued testing
> >> will uncover many more.
> >> 
> >> This patch is based on [0], which adds gccgo-10.
> >
> > I've applied the patch, so it should now be available in the main repo :)
> 
> Should the following related issues be closed now?
> 
> [0] <https://issues.guix.gnu.org/28226> Build go with gccgo
> [1] <https://issues.guix.gnu.org/46380> gnu: gccgo: Add version 10.
> [2] <https://issues.guix.gnu.org/47434> Added Go 1.16.2
> [3] <https://issues.guix.gnu.org/45161> Update go?

Looks like they should be safe to close.

> > My only concern about the patches is that I've been burned before about
> > pushing updates to go packages, where some seem to have insufficient
> > testing and then they'll build and fail. So in the meantime I've pushed
> > the go@1.16 patch.
> 
> Is there something specific to be done to sufficiently test them?  I'm
> not sure what else to do other than manually testing dependents.

I thought more about it and I went ahead and applied most of them. I
wasn't able to apply the go-github-com-bmatcuk-doublestar one or the
restic patch. Can you resend those?

> Thanks,
> Sarah

Thank you for doing all the work.

-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [bug#49221] [PATCH 00/13] Add go-1.16 and build with gccgo
  2021-06-25  7:21 ` [bug#49221] [PATCH 09/13] gnu: go-github-com-bmatcuk-doublestar: Remove test incompatible with go-1.16 Sarah Morgensen via Guix-patches via
@ 2021-08-05 17:17   ` Maxim Cournoyer
  2021-08-05 20:23     ` Sarah Morgensen
  0 siblings, 1 reply; 25+ messages in thread
From: Maxim Cournoyer @ 2021-08-05 17:17 UTC (permalink / raw)
  To: Sarah Morgensen; +Cc: 49221

Hello,

Sarah Morgensen <iskarian@mgsn.dev> writes:

> * gnu/packages/patches/go-github-com-bmatcuk-doublestar-1.3-remove-test.patch:
> New file.
> * gnu/local.mk (dist_patch_DATA): Register it.
> * gnu/packages/golang.scm (go-github-com-bmatcuk-doublestar): Use it.
> ---
>  gnu/local.mk                                      |  1 +
>  gnu/packages/golang.scm                           |  5 ++++-
>  ...b-com-bmatcuk-doublestar-1.3-remove-test.patch | 15 +++++++++++++++
>  3 files changed, 20 insertions(+), 1 deletion(-)
>  create mode 100644 gnu/packages/patches/go-github-com-bmatcuk-doublestar-1.3-remove-test.patch
>
> diff --git a/gnu/local.mk b/gnu/local.mk
> index 9caae52306..a176772ece 100644
> --- a/gnu/local.mk
> +++ b/gnu/local.mk
> @@ -1172,6 +1172,7 @@ dist_patch_DATA =						\
>    %D%/packages/patches/gobject-introspection-cc.patch		\
>    %D%/packages/patches/gobject-introspection-girepository.patch	\
>    %D%/packages/patches/go-skip-gc-test.patch			\
> +  %D%/packages/patches/go-github-com-bmatcuk-doublestar-1.3-remove-test.patch	\
>    %D%/packages/patches/gpm-glibc-2.26.patch			\
>    %D%/packages/patches/gpodder-disable-updater.patch		\
>    %D%/packages/patches/gpsbabel-fix-i686-test.patch		\
> diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
> index 9d5fc36710..3170e11925 100644
> --- a/gnu/packages/golang.scm
> +++ b/gnu/packages/golang.scm
> @@ -5314,7 +5314,10 @@ template functions.")
>                (file-name (git-file-name name version))
>                (sha256
>                 (base32
> -                "0bk5bixl6rqa8znxghyp6zndbccx9kdyrymjahgyp6qsrp7rk144"))))
> +                "0bk5bixl6rqa8znxghyp6zndbccx9kdyrymjahgyp6qsrp7rk144"))
> +              (patches
> +               (search-patches
> +                "go-github-com-bmatcuk-doublestar-1.3-remove-test.patch"))))
>      (build-system go-build-system)
>      (arguments
>       `(#:import-path "github.com/bmatcuk/doublestar"))
> diff --git a/gnu/packages/patches/go-github-com-bmatcuk-doublestar-1.3-remove-test.patch b/gnu/packages/patches/go-github-com-bmatcuk-doublestar-1.3-remove-test.patch
> new file mode 100644
> index 0000000000..2c64575914
> --- /dev/null
> +++ b/gnu/packages/patches/go-github-com-bmatcuk-doublestar-1.3-remove-test.patch
> @@ -0,0 +1,15 @@
> +Remove test which fails with Go >= 1.15 due to API changes.
> +This patch should no longer be necessary with doublestar v4+
> +
> +diff --git a/doublestar_test.go b/doublestar_test.go
> +index b21d20ad4b..f510c3d06b 100644
> +--- a/doublestar_test.go
> ++++ b/doublestar_test.go
> +@@ -80,7 +80,6 @@ var matchTests = []MatchTest{
> + 	{"[", "a", false, ErrBadPattern, true},
> + 	{"[^", "a", false, ErrBadPattern, true},
> + 	{"[^bc", "a", false, ErrBadPattern, true},
> +-	{"a[", "a", false, nil, false},
> + 	{"a[", "ab", false, ErrBadPattern, true},
> + 	{"*x", "xxx", true, nil, true},
> + 	{"[abc]", "b", true, nil, true},

This should be reported upstream, if the test is still not working with
the latest release (v4.0.2).

Thanks,

Maxim




^ permalink raw reply	[flat|nested] 25+ messages in thread

* [bug#49221] [PATCH 00/13] Add go-1.16 and build with gccgo
  2021-06-25  7:21 ` [bug#49221] [PATCH 10/13] gnu: restic: Patch tests for go-1.16 Sarah Morgensen via Guix-patches via
@ 2021-08-05 17:20   ` Maxim Cournoyer
  2021-08-05 20:24     ` Sarah Morgensen
  0 siblings, 1 reply; 25+ messages in thread
From: Maxim Cournoyer @ 2021-08-05 17:20 UTC (permalink / raw)
  To: Sarah Morgensen; +Cc: 49221

Hello,

Sarah Morgensen <iskarian@mgsn.dev> writes:

[...]

> +From 97950ab81a18de06b95384da6d8646fef87c9d97 Mon Sep 17 00:00:00 2001
> +From: Alexander Neumann <alexander@bumpern.de>
> +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())
> + 			}
> + 		})
> + 	}

I'm guessing this may also be not be necessary if we were to
successfully update restic to v0.12.1.  Do you think that would be
difficult to try?

Thanks,

Maxim




^ permalink raw reply	[flat|nested] 25+ messages in thread

* [bug#49221] [PATCH v2 1/2] gnu: go-github-com-bmatcuk-doublestar: Remove test incompatible with go-1.16.
  2021-08-05 14:03     ` Efraim Flashner
@ 2021-08-05 20:20       ` Sarah Morgensen
  2021-08-05 20:20       ` [bug#49221] [PATCH v2 2/2] gnu: restic: Patch tests for go-1.16 Sarah Morgensen
  1 sibling, 0 replies; 25+ messages in thread
From: Sarah Morgensen @ 2021-08-05 20:20 UTC (permalink / raw)
  To: 49221; +Cc: Efraim Flashner

* gnu/packages/patches/go-github-com-bmatcuk-doublestar-1.3-remove-test.patch:
New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/golang.scm (go-github-com-bmatcuk-doublestar): Use it.
---
 gnu/local.mk                                      |  1 +
 gnu/packages/golang.scm                           |  5 ++++-
 ...b-com-bmatcuk-doublestar-1.3-remove-test.patch | 15 +++++++++++++++
 3 files changed, 20 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/go-github-com-bmatcuk-doublestar-1.3-remove-test.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 61ac39618a..5b2e64a8b8 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1183,6 +1183,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/gobject-introspection-girepository.patch	\
   %D%/packages/patches/go-fix-script-tests.patch			\
   %D%/packages/patches/go-skip-gc-test.patch			\
+  %D%/packages/patches/go-github-com-bmatcuk-doublestar-1.3-remove-test.patch	\
   %D%/packages/patches/gpm-glibc-2.26.patch			\
   %D%/packages/patches/gpodder-disable-updater.patch		\
   %D%/packages/patches/gpsbabel-fix-i686-test.patch		\
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 89020648f0..cf72aa6e20 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -6480,7 +6480,10 @@ template functions.")
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "0bk5bixl6rqa8znxghyp6zndbccx9kdyrymjahgyp6qsrp7rk144"))))
+                "0bk5bixl6rqa8znxghyp6zndbccx9kdyrymjahgyp6qsrp7rk144"))
+              (patches
+               (search-patches
+                "go-github-com-bmatcuk-doublestar-1.3-remove-test.patch"))))
     (build-system go-build-system)
     (arguments
      `(#:import-path "github.com/bmatcuk/doublestar"))
diff --git a/gnu/packages/patches/go-github-com-bmatcuk-doublestar-1.3-remove-test.patch b/gnu/packages/patches/go-github-com-bmatcuk-doublestar-1.3-remove-test.patch
new file mode 100644
index 0000000000..2c64575914
--- /dev/null
+++ b/gnu/packages/patches/go-github-com-bmatcuk-doublestar-1.3-remove-test.patch
@@ -0,0 +1,15 @@
+Remove test which fails with Go >= 1.15 due to API changes.
+This patch should no longer be necessary with doublestar v4+
+
+diff --git a/doublestar_test.go b/doublestar_test.go
+index b21d20ad4b..f510c3d06b 100644
+--- a/doublestar_test.go
++++ b/doublestar_test.go
+@@ -80,7 +80,6 @@ var matchTests = []MatchTest{
+ 	{"[", "a", false, ErrBadPattern, true},
+ 	{"[^", "a", false, ErrBadPattern, true},
+ 	{"[^bc", "a", false, ErrBadPattern, true},
+-	{"a[", "a", false, nil, false},
+ 	{"a[", "ab", false, ErrBadPattern, true},
+ 	{"*x", "xxx", true, nil, true},
+ 	{"[abc]", "b", true, nil, true},

base-commit: fd3f1e809234c3e675d2eb8bc17774b0d4a94b0c
-- 
2.31.1





^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [bug#49221] [PATCH v2 2/2] gnu: restic: Patch tests for go-1.16.
  2021-08-05 14:03     ` Efraim Flashner
  2021-08-05 20:20       ` [bug#49221] [PATCH v2 1/2] gnu: go-github-com-bmatcuk-doublestar: Remove test incompatible with go-1.16 Sarah Morgensen
@ 2021-08-05 20:20       ` Sarah Morgensen
  1 sibling, 0 replies; 25+ messages in thread
From: Sarah Morgensen @ 2021-08-05 20:20 UTC (permalink / raw)
  To: 49221; +Cc: Efraim Flashner

* 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 <mike@rohleder.de>
 ;;; Copyright © 2021 Timothy Sample <samplet@ngyro.com>
 ;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re>
+;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
 ;;;
 ;;; 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 <alexander@bumpern.de>
+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





^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [bug#49221] [PATCH 00/13] Add go-1.16 and build with gccgo
  2021-08-05 17:17   ` [bug#49221] [PATCH 00/13] Add go-1.16 and build with gccgo Maxim Cournoyer
@ 2021-08-05 20:23     ` Sarah Morgensen
  0 siblings, 0 replies; 25+ messages in thread
From: Sarah Morgensen @ 2021-08-05 20:23 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: 49221

Hi Maxim,

Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:

> Hello,
>
> Sarah Morgensen <iskarian@mgsn.dev> writes:
>
>> * gnu/packages/patches/go-github-com-bmatcuk-doublestar-1.3-remove-test.patch:
>> New file.
>> * gnu/local.mk (dist_patch_DATA): Register it.
>> * gnu/packages/golang.scm (go-github-com-bmatcuk-doublestar): Use it.
>> ---
>>  gnu/local.mk                                      |  1 +
>>  gnu/packages/golang.scm                           |  5 ++++-
>>  ...b-com-bmatcuk-doublestar-1.3-remove-test.patch | 15 +++++++++++++++
>>  3 files changed, 20 insertions(+), 1 deletion(-)
>>  create mode 100644 gnu/packages/patches/go-github-com-bmatcuk-doublestar-1.3-remove-test.patch
>>
>> diff --git a/gnu/local.mk b/gnu/local.mk
>> index 9caae52306..a176772ece 100644
>> --- a/gnu/local.mk
>> +++ b/gnu/local.mk
>> @@ -1172,6 +1172,7 @@ dist_patch_DATA =						\
>>    %D%/packages/patches/gobject-introspection-cc.patch		\
>>    %D%/packages/patches/gobject-introspection-girepository.patch	\
>>    %D%/packages/patches/go-skip-gc-test.patch			\
>> +  %D%/packages/patches/go-github-com-bmatcuk-doublestar-1.3-remove-test.patch	\
>>    %D%/packages/patches/gpm-glibc-2.26.patch			\
>>    %D%/packages/patches/gpodder-disable-updater.patch		\
>>    %D%/packages/patches/gpsbabel-fix-i686-test.patch		\
>> diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
>> index 9d5fc36710..3170e11925 100644
>> --- a/gnu/packages/golang.scm
>> +++ b/gnu/packages/golang.scm
>> @@ -5314,7 +5314,10 @@ template functions.")
>>                (file-name (git-file-name name version))
>>                (sha256
>>                 (base32
>> -                "0bk5bixl6rqa8znxghyp6zndbccx9kdyrymjahgyp6qsrp7rk144"))))
>> +                "0bk5bixl6rqa8znxghyp6zndbccx9kdyrymjahgyp6qsrp7rk144"))
>> +              (patches
>> +               (search-patches
>> +                "go-github-com-bmatcuk-doublestar-1.3-remove-test.patch"))))
>>      (build-system go-build-system)
>>      (arguments
>>       `(#:import-path "github.com/bmatcuk/doublestar"))
>> diff --git a/gnu/packages/patches/go-github-com-bmatcuk-doublestar-1.3-remove-test.patch b/gnu/packages/patches/go-github-com-bmatcuk-doublestar-1.3-remove-test.patch
>> new file mode 100644
>> index 0000000000..2c64575914
>> --- /dev/null
>> +++ b/gnu/packages/patches/go-github-com-bmatcuk-doublestar-1.3-remove-test.patch
>> @@ -0,0 +1,15 @@
>> +Remove test which fails with Go >= 1.15 due to API changes.
>> +This patch should no longer be necessary with doublestar v4+
>> +
>> +diff --git a/doublestar_test.go b/doublestar_test.go
>> +index b21d20ad4b..f510c3d06b 100644
>> +--- a/doublestar_test.go
>> ++++ b/doublestar_test.go
>> +@@ -80,7 +80,6 @@ var matchTests = []MatchTest{
>> + 	{"[", "a", false, ErrBadPattern, true},
>> + 	{"[^", "a", false, ErrBadPattern, true},
>> + 	{"[^bc", "a", false, ErrBadPattern, true},
>> +-	{"a[", "a", false, nil, false},
>> + 	{"a[", "ab", false, ErrBadPattern, true},
>> + 	{"*x", "xxx", true, nil, true},
>> + 	{"[abc]", "b", true, nil, true},
>
> This should be reported upstream, if the test is still not working with
> the latest release (v4.0.2).

It is fixed in v2 or v3, but those are backwards-incompatible
upgrades, so I backported this patch.

>
> Thanks,
>
> Maxim

--
Sarah




^ permalink raw reply	[flat|nested] 25+ messages in thread

* [bug#49221] [PATCH 00/13] Add go-1.16 and build with gccgo
  2021-08-05 17:20   ` [bug#49221] [PATCH 00/13] Add go-1.16 and build with gccgo Maxim Cournoyer
@ 2021-08-05 20:24     ` Sarah Morgensen
  2021-08-06  2:59       ` bug#49221: " Maxim Cournoyer
  0 siblings, 1 reply; 25+ messages in thread
From: Sarah Morgensen @ 2021-08-05 20:24 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: 49221

Hi Maxim,

Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:

> Hello,
>
> Sarah Morgensen <iskarian@mgsn.dev> writes:
>
> [...]
>
>> +From 97950ab81a18de06b95384da6d8646fef87c9d97 Mon Sep 17 00:00:00 2001
>> +From: Alexander Neumann <alexander@bumpern.de>
>> +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())
>> + 			}
>> + 		})
>> + 	}
>
> I'm guessing this may also be not be necessary if we were to
> successfully update restic to v0.12.1.  Do you think that would be
> difficult to try?

You are correct. This should eventually be done, but between v0.9.6 and
v0.10, restic unvendored all its dependencies, so it would require
packaging any missing dependencies.

>
> Thanks,
>
> Maxim

--
Sarah




^ permalink raw reply	[flat|nested] 25+ messages in thread

* bug#49221: [PATCH 00/13] Add go-1.16 and build with gccgo
  2021-08-05 20:24     ` Sarah Morgensen
@ 2021-08-06  2:59       ` Maxim Cournoyer
  0 siblings, 0 replies; 25+ messages in thread
From: Maxim Cournoyer @ 2021-08-06  2:59 UTC (permalink / raw)
  To: Sarah Morgensen; +Cc: 49221-done

Hello Sarah,

Sarah Morgensen <iskarian@mgsn.dev> writes:

[...]

>> I'm guessing this may also be not be necessary if we were to
>> successfully update restic to v0.12.1.  Do you think that would be
>> difficult to try?
>
> You are correct. This should eventually be done, but between v0.9.6 and
> v0.10, restic unvendored all its dependencies, so it would require
> packaging any missing dependencies.

I see!  Thanks for the explanation.  I've now merged both remaining
patches from this tracker as commits 733ca63bcd and 1273548f4f, with the
first one modified to do the patching as a phase (the patch file name
was too long -- caught by guix lint).

Thank you!

Closing.

Maxim




^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2021-08-06  3:01 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-25  6:52 [bug#49221] [PATCH 00/13] Add go-1.16 and build with gccgo Sarah Morgensen via Guix-patches via
2021-06-25  7:20 ` [bug#49221] [PATCH 01/13] gnu: go-github-com-puerkitobio-goquery: Update to 1.7.0 Sarah Morgensen via Guix-patches via
2021-06-25  7:20 ` [bug#49221] [PATCH 02/13] gnu: go-go-uber-org-atomic: Update to 1.8.0 Sarah Morgensen via Guix-patches via
2021-06-25  7:20 ` [bug#49221] [PATCH 03/13] gnu: go-github-com-sergi-go-diff: Update to 1.2.0 Sarah Morgensen via Guix-patches via
2021-06-25  7:20 ` [bug#49221] [PATCH 04/13] gnu: go-github-com-pelletier-go-toml: Update to 1.9.3 Sarah Morgensen via Guix-patches via
2021-06-25  7:20 ` [bug#49221] [PATCH 05/13] gnu: go-github-com-masterminds-goutils: Update to 1.1.1 Sarah Morgensen via Guix-patches via
2021-06-25  7:20 ` [bug#49221] [PATCH 06/13] gnu: go-github-com-magiconair-properties: Update to 1.8.5 Sarah Morgensen via Guix-patches via
2021-06-25  7:21 ` [bug#49221] [PATCH 07/13] gnu: go-github-com-dlclark-regexp2: Update to 1.4.0 Sarah Morgensen via Guix-patches via
2021-06-25  7:21 ` [bug#49221] [PATCH 08/13] gnu: earlyoom: Patch tests for go-1.16 Sarah Morgensen via Guix-patches via
2021-06-25  7:21 ` [bug#49221] [PATCH 09/13] gnu: go-github-com-bmatcuk-doublestar: Remove test incompatible with go-1.16 Sarah Morgensen via Guix-patches via
2021-08-05 17:17   ` [bug#49221] [PATCH 00/13] Add go-1.16 and build with gccgo Maxim Cournoyer
2021-08-05 20:23     ` Sarah Morgensen
2021-06-25  7:21 ` [bug#49221] [PATCH 10/13] gnu: restic: Patch tests for go-1.16 Sarah Morgensen via Guix-patches via
2021-08-05 17:20   ` [bug#49221] [PATCH 00/13] Add go-1.16 and build with gccgo Maxim Cournoyer
2021-08-05 20:24     ` Sarah Morgensen
2021-08-06  2:59       ` bug#49221: " Maxim Cournoyer
2021-06-25  7:21 ` [bug#49221] [PATCH 11/13] gnu: go-gopkg-in-check-v1: Update to latest Sarah Morgensen via Guix-patches via
2021-06-25  7:21 ` [bug#49221] [PATCH 12/13] gnu: go-etcd-io-bbolt: Update to 1.3.6 Sarah Morgensen via Guix-patches via
2021-06-25  7:21 ` [bug#49221] [PATCH 13/13] gnu: Add go-1.16 Sarah Morgensen via Guix-patches via
2021-06-28 19:22 ` [bug#49221] [PATCH 00/13] Add go-1.16 and build with gccgo Efraim Flashner
2021-07-01  3:24   ` Sarah Morgensen via Guix-patches via
2021-07-25  2:17   ` Sarah Morgensen
2021-08-05 14:03     ` Efraim Flashner
2021-08-05 20:20       ` [bug#49221] [PATCH v2 1/2] gnu: go-github-com-bmatcuk-doublestar: Remove test incompatible with go-1.16 Sarah Morgensen
2021-08-05 20:20       ` [bug#49221] [PATCH v2 2/2] gnu: restic: Patch tests for go-1.16 Sarah Morgensen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.