summaryrefslogtreecommitdiff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/go-github-com-urfave-cli-fix-tests.patch28
-rw-r--r--gnu/packages/patches/go-github-com-urfave-cli-v2-fix-tests.patch37
-rw-r--r--gnu/packages/patches/mailutils-fix-uninitialized-variable.patch26
-rw-r--r--gnu/packages/patches/racket-minimal-backport-1629887.patch28
4 files changed, 93 insertions, 26 deletions
diff --git a/gnu/packages/patches/go-github-com-urfave-cli-fix-tests.patch b/gnu/packages/patches/go-github-com-urfave-cli-fix-tests.patch
new file mode 100644
index 0000000000..7408d4ec16
--- /dev/null
+++ b/gnu/packages/patches/go-github-com-urfave-cli-fix-tests.patch
@@ -0,0 +1,28 @@
+Backported from upstream PR: https://github.com/urfave/cli/pull/1299
+---
+diff --git a/app_test.go b/app_test.go
+index 33024ff..6b3aaa3 100644
+--- a/app_test.go
++++ b/app_test.go
+@@ -513,18 +513,18 @@ func TestApp_RunAsSubcommandParseFlags(t *testing.T) {
+ func TestApp_RunAsSubCommandIncorrectUsage(t *testing.T) {
+ a := App{
+ Flags: []Flag{
+- StringFlag{Name: "--foo"},
++ StringFlag{Name: "foo"},
+ },
+ Writer: bytes.NewBufferString(""),
+ }
+
+ set := flag.NewFlagSet("", flag.ContinueOnError)
+- _ = set.Parse([]string{"", "---foo"})
++ _ = set.Parse([]string{"", "-bar"})
+ c := &Context{flagSet: set}
+
+ err := a.RunAsSubcommand(c)
+
+- expect(t, err, errors.New("bad flag syntax: ---foo"))
++ expect(t, err.Error(), "flag provided but not defined: -bar")
+ }
+
+ func TestApp_CommandWithFlagBeforeTerminator(t *testing.T) {
diff --git a/gnu/packages/patches/go-github-com-urfave-cli-v2-fix-tests.patch b/gnu/packages/patches/go-github-com-urfave-cli-v2-fix-tests.patch
new file mode 100644
index 0000000000..87ccc2b655
--- /dev/null
+++ b/gnu/packages/patches/go-github-com-urfave-cli-v2-fix-tests.patch
@@ -0,0 +1,37 @@
+From upstream PR: https://github.com/urfave/cli/pull/1299
+
+From: William Wilson <william.wilson@canonical.com>
+Date: Tue, 31 Aug 2021 14:19:17 -0500
+Subject: Make test case compatible with Go 1.17
+
+As of Go 1.17, the go flag package will panic if given a syntactically invalid
+flag. This causes TestApp_RunAsSubCommandIncorrectUsage to panic and therefore
+fail. See https://golang.org/doc/go1.17#flag for more information.
+
+---
+diff --git a/app_test.go b/app_test.go
+index 7c38f6048..76e211d68 100644
+--- a/app_test.go
++++ b/app_test.go
+@@ -476,18 +476,18 @@ func TestApp_RunAsSubCommandIncorrectUsage(t *testing.T) {
+ a := App{
+ Name: "cmd",
+ Flags: []Flag{
+- &StringFlag{Name: "--foo"},
++ &StringFlag{Name: "foo"},
+ },
+ Writer: bytes.NewBufferString(""),
+ }
+
+ set := flag.NewFlagSet("", flag.ContinueOnError)
+- _ = set.Parse([]string{"", "---foo"})
++ _ = set.Parse([]string{"", "-bar"})
+ c := &Context{flagSet: set}
+
+ err := a.RunAsSubcommand(c)
+
+- expect(t, err, errors.New("bad flag syntax: ---foo"))
++ expect(t, err.Error(), "flag provided but not defined: -bar")
+ }
+
+ func TestApp_CommandWithFlagBeforeTerminator(t *testing.T) {
diff --git a/gnu/packages/patches/mailutils-fix-uninitialized-variable.patch b/gnu/packages/patches/mailutils-fix-uninitialized-variable.patch
deleted file mode 100644
index 2a1c81648b..0000000000
--- a/gnu/packages/patches/mailutils-fix-uninitialized-variable.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 5ca6382fe8adb5bc436a6d873c8b86c69d5abfd1 Mon Sep 17 00:00:00 2001
-From: Sergey Poznyakoff <gray@gnu.org>
-Date: Sun, 13 Sep 2020 14:43:46 +0300
-Subject: [PATCH] Fix uninitialized variable in readmsg
-
-* readmsg/readmsg.c (main): Initialize weedc.
----
- readmsg/readmsg.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/readmsg/readmsg.c b/readmsg/readmsg.c
-index 9f305bb9c..3a9f420db 100644
---- a/readmsg/readmsg.c
-+++ b/readmsg/readmsg.c
-@@ -466,7 +466,7 @@ main (int argc, char **argv)
- mu_mailbox_t mbox = NULL;
- struct mu_wordsplit ws;
- char **weedv;
-- int weedc;
-+ int weedc = 0;
- int unix_header = 0;
-
- /* Native Language Support */
---
-2.28.0
-
diff --git a/gnu/packages/patches/racket-minimal-backport-1629887.patch b/gnu/packages/patches/racket-minimal-backport-1629887.patch
new file mode 100644
index 0000000000..aa060ef5aa
--- /dev/null
+++ b/gnu/packages/patches/racket-minimal-backport-1629887.patch
@@ -0,0 +1,28 @@
+From fb1a6ab205fd63a46669a463931af473e2ac0c87 Mon Sep 17 00:00:00 2001
+From: Matthew Flatt <mflatt@racket-lang.org>
+Date: Sat, 21 Aug 2021 15:29:59 -0600
+Subject: [PATCH] setup/variant: recognize starter executables
+
+Related to #3969
+
+(cherry picked from commit 1629887071fe3cc8fe8af0a7aa0d3912509cb058)
+---
+ racket/collects/setup/variant.rkt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/racket/collects/setup/variant.rkt b/racket/collects/setup/variant.rkt
+index 81da6f5701..b23131e481 100644
+--- a/racket/collects/setup/variant.rkt
++++ b/racket/collects/setup/variant.rkt
+@@ -25,7 +25,7 @@
+ (and (file-exists? f)
+ (with-input-from-file f
+ (lambda ()
+- (define m (regexp-match #rx#"bINARy tYPe:..(.)"
++ (define m (regexp-match #rx#"bINARy tYPe:e?..(.)"
+ (current-input-port)))
+ (cond
+ [(not m) '3m]
+--
+2.30.2
+