* [bug#70643] [PATCH 0/2] gnu: guile-lib: Fix tests for Guile 2.2.
@ 2024-04-29 9:03 Artyom V. Poptsov
2024-04-29 9:04 ` [bug#70643] [PATCH 1/2] gnu: guile-lib: Remove "strip" phase Artyom V. Poptsov
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Artyom V. Poptsov @ 2024-04-29 9:03 UTC (permalink / raw)
To: 70643; +Cc: Artyom V. Poptsov
This patchset fixes Guile-Lib tests with Guile 2.2.
Artyom V. Poptsov (2):
gnu: guile-lib: Remove "strip" phase.
gnu: guile-lib: Fix tests for Guile 2.2.
gnu/local.mk | 1 +
gnu/packages/guile-xyz.scm | 4 +-
.../guile-lib-fix-tests-for-guile2.2.patch | 52 +++++++++++++++++++
3 files changed, 56 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/guile-lib-fix-tests-for-guile2.2.patch
base-commit: 3bd8d238aba718bf949691d0e37fa310e2cfc12a
--
2.41.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [bug#70643] [PATCH 1/2] gnu: guile-lib: Remove "strip" phase.
2024-04-29 9:03 [bug#70643] [PATCH 0/2] gnu: guile-lib: Fix tests for Guile 2.2 Artyom V. Poptsov
@ 2024-04-29 9:04 ` Artyom V. Poptsov
2024-04-29 9:04 ` [bug#70643] [PATCH 2/2] gnu: guile-lib: Fix tests for Guile 2.2 Artyom V. Poptsov
2024-05-14 13:57 ` bug#70643: [PATCH 0/2] " Christopher Baines
2 siblings, 0 replies; 4+ messages in thread
From: Artyom V. Poptsov @ 2024-04-29 9:04 UTC (permalink / raw)
To: 70643; +Cc: Artyom V. Poptsov
* gnu/packages/guile-xyz.scm (guile-lib) [arguments]: Remove "strip" phase.
Change-Id: I6158bdb58555be4e84a2571a2a6e59eb23d39abf
---
gnu/packages/guile-xyz.scm | 1 +
1 file changed, 1 insertion(+)
diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 901c669582..d1892ddf69 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -2742,6 +2742,7 @@ (define-public guile-lib
'(#:make-flags '("GUILE_AUTO_COMPILE=0") ;placate guild warnings
#:phases
(modify-phases %standard-phases
+ (delete 'strip)
(add-before 'configure 'patch-module-dir
(lambda _
(substitute* "src/Makefile.in"
--
2.41.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [bug#70643] [PATCH 2/2] gnu: guile-lib: Fix tests for Guile 2.2.
2024-04-29 9:03 [bug#70643] [PATCH 0/2] gnu: guile-lib: Fix tests for Guile 2.2 Artyom V. Poptsov
2024-04-29 9:04 ` [bug#70643] [PATCH 1/2] gnu: guile-lib: Remove "strip" phase Artyom V. Poptsov
@ 2024-04-29 9:04 ` Artyom V. Poptsov
2024-05-14 13:57 ` bug#70643: [PATCH 0/2] " Christopher Baines
2 siblings, 0 replies; 4+ messages in thread
From: Artyom V. Poptsov @ 2024-04-29 9:04 UTC (permalink / raw)
To: 70643; +Cc: Artyom V. Poptsov
* gnu/packages/guile-xyz.scm (guile-lib) [source]: Add a patch that fixes
tests for Guile 2.2.
* gnu/packages/patches/guile-lib-fix-tests-for-guile2.2.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add
"guile-lib-fix-tests-for-guile2.2.patch".
Change-Id: Ia340e1de57c56366f0ee9271687a89fb9e41bc2d
---
gnu/local.mk | 1 +
gnu/packages/guile-xyz.scm | 3 +-
.../guile-lib-fix-tests-for-guile2.2.patch | 52 +++++++++++++++++++
3 files changed, 55 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/guile-lib-fix-tests-for-guile2.2.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index 42961e60b2..39a1b59d6e 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1418,6 +1418,7 @@ dist_patch_DATA = \
%D%/packages/patches/guile-linux-syscalls.patch \
%D%/packages/patches/guile-3.0-linux-syscalls.patch \
%D%/packages/patches/guile-ac-d-bus-fix-tests.patch \
+ %D%/packages/patches/guile-lib-fix-tests-for-guile2.2.patch \
%D%/packages/patches/guile-fibers-destroy-peer-schedulers.patch \
%D%/packages/patches/guile-fibers-epoll-instance-is-dead.patch \
%D%/packages/patches/guile-fibers-fd-finalizer-leak.patch \
diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index d1892ddf69..2da8b50a42 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -2736,7 +2736,8 @@ (define-public guile-lib
version ".tar.gz"))
(sha256
(base32
- "1nb7swbliw9vx1ivhgd2m0r0p7nlkszw6s41zcgfwb5v1kp05sb4"))))
+ "1nb7swbliw9vx1ivhgd2m0r0p7nlkszw6s41zcgfwb5v1kp05sb4"))
+ (patches (search-patches "guile-lib-fix-tests-for-guile2.2.patch"))))
(build-system gnu-build-system)
(arguments
'(#:make-flags '("GUILE_AUTO_COMPILE=0") ;placate guild warnings
diff --git a/gnu/packages/patches/guile-lib-fix-tests-for-guile2.2.patch b/gnu/packages/patches/guile-lib-fix-tests-for-guile2.2.patch
new file mode 100644
index 0000000000..051e73ed12
--- /dev/null
+++ b/gnu/packages/patches/guile-lib-fix-tests-for-guile2.2.patch
@@ -0,0 +1,52 @@
+From b1916e9a8ac8fa1bdd045d6e1d89e0f16ef7e441 Mon Sep 17 00:00:00 2001
+From: "Artyom V. Poptsov" <poptsov.artyom@gmail.com>
+Date: Mon, 29 Apr 2024 11:27:02 +0300
+Subject: [PATCH] unit-tests/logging.logger: Fix tests with Guile 2
+
+When tests are run with Guile 2 "logging.logger.scm" would always fail
+due to undefined reference to "mkstemp" that was introduced only in
+Guile 3. In Guile 2 the procedure is called "mkstemp!". Also
+"call-with-port" procedure is available only from (rnrs io ports) in
+Guile 2, while in Guile 3 this procedure is available out of box.
+This patch fixes these issues by adding an additional runtime check.
+
+* unit-tests/logging.logger.scm (call-with-temporary-file): Bugfix:
+ Check Guile major version and use "mkstemp!" when Guile 2 is used;
+ use "mkstemp" otherwise. Also for Guile 2 load "call-with-port"
+ from (rnrs io ports).
+---
+ unit-tests/logging.logger.scm | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/unit-tests/logging.logger.scm b/unit-tests/logging.logger.scm
+index c69a86d..fbf4ce7 100644
+--- a/unit-tests/logging.logger.scm
++++ b/unit-tests/logging.logger.scm
+@@ -3,6 +3,7 @@
+ ;;; Copyright (C) 2003 Richard Todd
+ ;;; Copyright (C) 2024 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+ ;;; Copyright (C) 2024 David Pirotte <david@altosw.be>
++;;; Copyright (C) 2024 Artyom V. Poptsov <poptsov.artyom@gmail.com>
+
+ ;;; This program is free software; you can redistribute it and/or modify
+ ;;; it under the terms of the GNU General Public License as published by
+@@ -28,8 +29,12 @@
+ (define* (call-with-temporary-file proc #:key (mode "w+"))
+ "Open a temporary file name and pass it to PROC, a procedure of one
+ argument. The port is automatically closed."
+- (let ((port (mkstemp "/tmp/file-XXXXXX" mode)))
+- (call-with-port port proc)))
++ (let ((file-name "/tmp/file-XXXXXX"))
++ (if (< (string->number (major-version)) 3)
++ (let ((port (mkstemp! (string-copy file-name) mode)))
++ ((@ (rnrs io ports) call-with-port) port proc))
++ (let ((port (mkstemp file-name mode)))
++ (call-with-port port proc)))))
+
+ (define-class <test-logging> (<test-case>))
+
+
+base-commit: 0e2b6b0ae5cc43c98075386bb4c69defb705f3b3
+--
+2.41.0
+
--
2.41.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* bug#70643: [PATCH 0/2] gnu: guile-lib: Fix tests for Guile 2.2.
2024-04-29 9:03 [bug#70643] [PATCH 0/2] gnu: guile-lib: Fix tests for Guile 2.2 Artyom V. Poptsov
2024-04-29 9:04 ` [bug#70643] [PATCH 1/2] gnu: guile-lib: Remove "strip" phase Artyom V. Poptsov
2024-04-29 9:04 ` [bug#70643] [PATCH 2/2] gnu: guile-lib: Fix tests for Guile 2.2 Artyom V. Poptsov
@ 2024-05-14 13:57 ` Christopher Baines
2 siblings, 0 replies; 4+ messages in thread
From: Christopher Baines @ 2024-05-14 13:57 UTC (permalink / raw)
To: Artyom V. Poptsov; +Cc: 70643-done
[-- Attachment #1: Type: text/plain, Size: 712 bytes --]
"Artyom V. Poptsov" <poptsov.artyom@gmail.com> writes:
> This patchset fixes Guile-Lib tests with Guile 2.2.
>
> Artyom V. Poptsov (2):
> gnu: guile-lib: Remove "strip" phase.
> gnu: guile-lib: Fix tests for Guile 2.2.
>
> gnu/local.mk | 1 +
> gnu/packages/guile-xyz.scm | 4 +-
> .../guile-lib-fix-tests-for-guile2.2.patch | 52 +++++++++++++++++++
> 3 files changed, 56 insertions(+), 1 deletion(-)
> create mode 100644 gnu/packages/patches/guile-lib-fix-tests-for-guile2.2.patch
>
>
> base-commit: 3bd8d238aba718bf949691d0e37fa310e2cfc12a
Thanks for the patches, I've pushed these to master as
85923f9eb423652200351a34f195b86c46ecf97b.
Chris
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 987 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-05-14 13:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-29 9:03 [bug#70643] [PATCH 0/2] gnu: guile-lib: Fix tests for Guile 2.2 Artyom V. Poptsov
2024-04-29 9:04 ` [bug#70643] [PATCH 1/2] gnu: guile-lib: Remove "strip" phase Artyom V. Poptsov
2024-04-29 9:04 ` [bug#70643] [PATCH 2/2] gnu: guile-lib: Fix tests for Guile 2.2 Artyom V. Poptsov
2024-05-14 13:57 ` bug#70643: [PATCH 0/2] " Christopher Baines
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).