[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet-scheme] 161/324: guix: Patch 'guile' to fix some bugs.
From: |
gnunet |
Subject: |
[gnunet-scheme] 161/324: guix: Patch 'guile' to fix some bugs. |
Date: |
Tue, 21 Sep 2021 13:23:21 +0200 |
This is an automated email from the git hooks/post-receive script.
maxime-devos pushed a commit to branch master
in repository gnunet-scheme.
commit 7a09b03c7c6b9739a76a549a784cc25ffdbb70d5
Author: Maxime Devos <maximedevos@telenet.be>
AuthorDate: Tue Jul 20 13:33:39 2021 +0200
guix: Patch 'guile' to fix some bugs.
These patches are not yet merged upstream.
* guix.scm (guile-3.0/fixed): New variable.
* 0001-Fix-non-revealed-port-is-closed-ports.test.patch: New patch.
* 0001-Fix-non-revealed-port-is-closed-ports.test.patch: New patch.
* 0001-ice-9-read-Parse-properly.patch: Likewise.
* guix.scm (scheme-gnunet): Use fixed guile.
* README.org: Note "guix.scm" has a fixed Guile.
---
...ix-non-revealed-port-is-closed-ports.test.patch | 35 +++++++++++++
0001-ice-9-read-Parse-properly.patch | 59 ++++++++++++++++++++++
README.org | 3 ++
guix.scm | 14 ++++-
4 files changed, 109 insertions(+), 2 deletions(-)
diff --git a/0001-Fix-non-revealed-port-is-closed-ports.test.patch
b/0001-Fix-non-revealed-port-is-closed-ports.test.patch
new file mode 100644
index 0000000..0a1798e
--- /dev/null
+++ b/0001-Fix-non-revealed-port-is-closed-ports.test.patch
@@ -0,0 +1,35 @@
+From ac8dc55ebbd43306eb54989f096a6814dadda974 Mon Sep 17 00:00:00 2001
+From: Rob Browning <rlb@defaultvalue.org>
+Date: Sat, 19 Sep 2020 14:09:04 -0500
+Subject: [PATCH] Fix "non-revealed port is closed" ports.test
+
+Don't close the test port's file descriptor because the port still has a
+reference to it, and could still close it at any time when finally
+garbage collected. This did soemetimes break subsequent tests.
+
+Bug: https://debbugs.gnu.org/43521
+---
+ test-suite/tests/ports.test | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/test-suite/tests/ports.test b/test-suite/tests/ports.test
+index 31fb2b0a8..9dca62df8 100644
+--- a/test-suite/tests/ports.test
++++ b/test-suite/tests/ports.test
+@@ -623,9 +623,10 @@
+ (seek fdes 0 SEEK_CUR)
+
+ ;; If we get here, it might be because PORT was not GC'd, we
+- ;; don't know (and we can't use a guardian because it would keep
+- ;; PORT alive.)
+- (close-fdes fdes)
++ ;; don't know, and we can't use a guardian because it would keep
++ ;; PORT alive, and we can't close the descriptor because
++ ;; subseuqent opens may re-use it, and then if this port is
++ ;; garbage collected, it'll close the descriptor unexpectedly.
+ (throw 'unresolved))
+ (lambda args
+ (system-error-errno args)))))
+--
+2.32.0
+
diff --git a/0001-ice-9-read-Parse-properly.patch
b/0001-ice-9-read-Parse-properly.patch
new file mode 100644
index 0000000..2ff1c7d
--- /dev/null
+++ b/0001-ice-9-read-Parse-properly.patch
@@ -0,0 +1,59 @@
+From 40b0b29c05d521cd8901988fa2bc71547f917f48 Mon Sep 17 00:00:00 2001
+From: Maxime Devos <maximedevos@telenet.be>
+Date: Sun, 18 Jul 2021 19:59:32 +0200
+Subject: [PATCH] ice-9/read: Parse #{}}# properly.
+
+This is a regression since Guile 3.0.2 and breaks compilation
+of a Guile library.
+
+* module/ice-9/read.scm
+ (%read)[read-parenthesized]: When SAW-BRACE? is #t but CH isn't
+ #\#, don't eat CH.
+* test-suite/tests/reader.test
+ ("#{}#): Add four test cases.
+---
+ module/ice-9/read.scm | 7 +++++--
+ test-suite/tests/reader.test | 5 +++++
+ 2 files changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/module/ice-9/read.scm b/module/ice-9/read.scm
+index ac407739f..283933064 100644
+--- a/module/ice-9/read.scm
++++ b/module/ice-9/read.scm
+@@ -556,12 +556,15 @@
+ (string->symbol
+ (list->string
+ (let lp ((saw-brace? #f))
+- (let ((ch (next-not-eof)))
++ (let lp/inner ((ch (next-not-eof))
++ (saw-brace? saw-brace?))
+ (cond
+ (saw-brace?
+ (if (eqv? ch #\#)
+ '()
+- (cons #\} (lp #f))))
++ ;; Don't eat CH, see
++ ;; <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=49623>.
++ (cons #\} (lp/inner ch #f))))
+ ((eqv? ch #\})
+ (lp #t))
+ ((eqv? ch #\\)
+diff --git a/test-suite/tests/reader.test b/test-suite/tests/reader.test
+index 1481a0a5d..ad7c6d575 100644
+--- a/test-suite/tests/reader.test
++++ b/test-suite/tests/reader.test
+@@ -536,6 +536,11 @@
+
+ (with-test-prefix "#{}#"
+ (pass-if (equal? (read-string "#{}#") '#{}#))
++ ;; See <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=49623>
++ (pass-if (equal? (read-string "#{}}#") (string->symbol "}")))
++ (pass-if (equal? (read-string "#{}}}#") (string->symbol "}}")))
++ (pass-if (equal? (read-string "#{{}}#") (string->symbol "{}")))
++ (pass-if (equal? (read-string "#{{}b}#") (string->symbol "{}b")))
+ (pass-if (not (equal? (read-string "(a #{.}# b)") '(a . b))))
+ (pass-if (equal? (read-string "#{a}#") 'a))
+ (pass-if (equal? (read-string "#{a b}#") '#{a b}#))
+--
+2.32.0
+
diff --git a/README.org b/README.org
index 181e9ef..1b00ed3 100644
--- a/README.org
+++ b/README.org
@@ -27,6 +27,9 @@
version of Guile (e.g. Guile 3.0.2 is known to work)
or apply the patch from
[[https://debbugs.gnu.org/cgi/bugreport.cgi?bug=49623][bug #49623]].
+ "guix.scm" has a variable guile-3.0/fixed with the required
+ patches applied.
+
* things that work
TODO: test suite for download & publish.
TODO (elsewhere): GNUnet service definitions for Guix in container
diff --git a/guix.scm b/guix.scm
index c9291cf..4cdff7f 100644
--- a/guix.scm
+++ b/guix.scm
@@ -26,6 +26,7 @@
(gnu packages gettext)
(gnu packages pkg-config)
(guix packages)
+ (guix gexp)
(guix download)
(guix build-system gnu)
((guix licenses) #:prefix license:))
@@ -57,6 +58,15 @@ with specifications for its inputs) and test it by
generating many
random inputs and seeing if it holds.")
(license license:gpl3+)))
+(define guile-3.0/fixed
+ (package
+ (inherit guile-3.0-latest)
+ (source
+ (origin
+ (inherit (package-source guile-3.0-latest))
+ (patches (list (local-file
"0001-Fix-non-revealed-port-is-closed-ports.test.patch")
+ (local-file "0001-ice-9-read-Parse-properly.patch")))))))
+
(define-public scheme-gnunet
(package
(name "scheme-gnunet")
@@ -67,7 +77,7 @@ random inputs and seeing if it holds.")
("guile-bytestructures" ,guile-bytestructures)
("guile-fibers" ,guile-fibers)
("guile-json" ,guile-json-4)))
- (native-inputs `(("guile" ,guile-3.0)
+ (native-inputs `(("guile" ,guile-3.0/fixed)
("automake" ,automake)
;; Only used for testing.
("guile-quickcheck" ,guile-quickcheck)
@@ -75,7 +85,7 @@ random inputs and seeing if it holds.")
("gettext" ,gettext-minimal)
("pkg-config" ,pkg-config)
("autoconf" ,autoconf-wrapper)))
- (inputs `(("guile" ,guile-3.0)))
+ (inputs `(("guile" ,guile-3.0/fixed)))
(synopsis "partial Scheme port of GNUnet")
(license license:agpl3+)
(description #f)
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [gnunet-scheme] 143/324: tests: Extract conservative-gc? in a library., (continued)
- [gnunet-scheme] 143/324: tests: Extract conservative-gc? in a library., gnunet, 2021/09/21
- [gnunet-scheme] 150/324: Merge branch 'master' into proper-mq, gnunet, 2021/09/21
- [gnunet-scheme] 148/324: utils: tokeniser: Split message streams into individual messages., gnunet, 2021/09/21
- [gnunet-scheme] 149/324: mq: Delete unused and obsolete message-io module., gnunet, 2021/09/21
- [gnunet-scheme] 155/324: enum: Fix compilation error on Guile 3.0.7., gnunet, 2021/09/21
- [gnunet-scheme] 160/324: enum: symbol->value: Return #f if the symbol doesn't exist., gnunet, 2021/09/21
- [gnunet-scheme] 159/324: Makefile.am: Correct file name of test., gnunet, 2021/09/21
- [gnunet-scheme] 154/324: mq: Implement 'inject-error!'., gnunet, 2021/09/21
- [gnunet-scheme] 156/324: mq-impl/stream: Implement on top of ports., gnunet, 2021/09/21
- [gnunet-scheme] 162/324: Merge branch 'proper-mq', gnunet, 2021/09/21
- [gnunet-scheme] 161/324: guix: Patch 'guile' to fix some bugs.,
gnunet <=
- [gnunet-scheme] 152/324: utils: tokeniser: Implement 'add-from-port!'., gnunet, 2021/09/21
- [gnunet-scheme] 157/324: README.org: Note Guile 3.0.7 cannot be used for compilation., gnunet, 2021/09/21
- [gnunet-scheme] 151/324: utils: tokeniser: Some extra documentation., gnunet, 2021/09/21
- [gnunet-scheme] 153/324: concurrency: repeated-conditions: New module., gnunet, 2021/09/21
- [gnunet-scheme] 158/324: mq-impl/stream: Add modules and tests to 'Makefile.am'., gnunet, 2021/09/21
- [gnunet-scheme] 167/324: README: Graduate 'Message queues' to :test:good:, gnunet, 2021/09/21
- [gnunet-scheme] 146/324: mq: envelope: Allow testing whether an envelope is cancelled., gnunet, 2021/09/21
- [gnunet-scheme] 173/324: netstruct/procedural: Support IEEE doubles., gnunet, 2021/09/21
- [gnunet-scheme] 164/324: repeated-condition: Make less fragile to SRFI-88., gnunet, 2021/09/21
- [gnunet-scheme] 170/324: bv-slice: Support IEEE doubles., gnunet, 2021/09/21