[PATCH 0/4] Fix lua-cqueues build failure.

  • Open
  • quality assurance status badge
Details
2 participants
  • Maxim Cournoyer
  • Bruno Victal
Owner
unassigned
Submitted by
Bruno Victal
Severity
normal
B
B
Bruno Victal wrote on 4 Jul 2023 00:26
(address . guix-patches@gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
cover.1688422815.git.mirai@makinata.eu

Bruno Victal (4):
gnu: lua-ossl: Update to 20220711.
gnu: lua-ossl: Use G-expressions.
gnu: lua-cqueues: Update to 20200726.
gnu: lua-cqueues: Refactor package definition.

gnu/packages/lua.scm | 242 ++++++++++++++++++++-----------------------
1 file changed, 111 insertions(+), 131 deletions(-)


base-commit: cf7e0267adfc3cb83e477c2aebb61060c3c0cfd6
--
2.39.2
B
B
Bruno Victal wrote on 4 Jul 2023 00:28
[PATCH 1/4] gnu: lua-ossl: Update to 20220711.
(address . guix-patches@gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
929a9821646da834563938ccd5aa52cf68efede0.1688423261.git.mirai@makinata.eu
The homepage seems frozen in time whilst the issue tracker at
https://github.com/wahern/luaossl has been receiving new releases.

* gnu/packages/lua.scm (make-lua-ossl): Update to 20220711. Switch upstream
URL.
---
gnu/packages/lua.scm | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)

Toggle diff (30 lines)
diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
index 63a4bd5455..67df8dc31e 100644
--- a/gnu/packages/lua.scm
+++ b/gnu/packages/lua.scm
@@ -370,14 +370,16 @@ (define-public lua5.2-filesystem
(define (make-lua-ossl name lua)
(package
(name name)
- (version "20170903")
+ (version "20220711")
(source (origin
- (method url-fetch)
- (uri (string-append "https://25thandclement.com/~william/"
- "projects/releases/luaossl-" version ".tgz"))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/wahern/luaossl")
+ (commit (string-append "rel-" version))))
+ (file-name (git-file-name name version))
(sha256
(base32
- "10392bvd0lzyibipblgiss09zlqh3a5zgqg1b9lgbybpqb9cv2k3"))))
+ "1a9pgmc6fbhgh1m9ksz9fq057yzz46npqgakcsy9vngg47xacfdb"))))
(build-system gnu-build-system)
(arguments
`(#:make-flags

base-commit: cf7e0267adfc3cb83e477c2aebb61060c3c0cfd6
--
2.39.2
B
B
Bruno Victal wrote on 4 Jul 2023 00:28
[PATCH 2/4] gnu: lua-ossl: Use G-expressions.
(address . guix-patches@gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
5b2cf0e69a8a546b3d4dfc65a043a04c81d1a190.1688423261.git.mirai@makinata.eu
Dropped obsolete flag due to https://github.com/wahern/luaossl/pull/61.

* gnu/packages/lua.scm (make-lua-ossl): Use G-Expressions.
[arguments]<make-flags>: Drop obsolete flag.
---
gnu/packages/lua.scm | 99 ++++++++++++++++++++++++--------------------
1 file changed, 55 insertions(+), 44 deletions(-)

Toggle diff (123 lines)
diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
index 67df8dc31e..2214790751 100644
--- a/gnu/packages/lua.scm
+++ b/gnu/packages/lua.scm
@@ -19,6 +19,7 @@
;;; Copyright © 2022 Luis Henrique Gomes Higino <luishenriquegh2701@gmail.com>
;;; Copyright © 2022 Leo Nikkilä <hello@lnikki.la>
;;; Copyright © 2023 Yovan Naumovski <yovan@gorski.stream>
+;;; Copyright © 2023 Bruno Victal <mirai@makinata.eu>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -368,54 +369,64 @@ (define-public lua5.2-filesystem
(make-lua-filesystem "lua5.2-filesystem" lua-5.2))
(define (make-lua-ossl name lua)
- (package
- (name name)
- (version "20220711")
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/wahern/luaossl")
- (commit (string-append "rel-" version))))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "1a9pgmc6fbhgh1m9ksz9fq057yzz46npqgakcsy9vngg47xacfdb"))))
- (build-system gnu-build-system)
- (arguments
- `(#:make-flags
- (let ((out (assoc-ref %outputs "out"))
- (lua-api-version ,(version-major+minor (package-version lua))))
- (list ,(string-append "CC=" (cc-for-target))
- "CFLAGS='-D HAVE_SYS_SYSCTL_H=0'" ; sys/sysctl.h is deprecated
- (string-append "prefix=" out)
- (string-append "LUA_APIS=" lua-api-version)))
- #:phases
- (modify-phases %standard-phases
- (delete 'configure)
- (delete 'check)
- (add-after 'install 'check
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out"))
- (lua-version ,(version-major+minor (package-version lua))))
- (setenv "LUA_CPATH"
- (string-append out "/lib/lua/" lua-version "/?.so;;"))
- (setenv "LUA_PATH"
- (string-append out "/share/lua/" lua-version "/?.lua;;"))
- (with-directory-excursion "regress"
- (for-each (lambda (f)
- (invoke "lua" f))
- (find-files "." "^[0-9].*\\.lua$"))))
- #t)))))
- (inputs
- (list lua openssl))
- (home-page "https://25thandclement.com/~william/projects/luaossl.html")
- (synopsis "OpenSSL bindings for Lua")
- (description "The luaossl extension module for Lua provides comprehensive,
+ (let ((lua-api-version (version-major+minor (package-version lua))))
+ (package
+ (name name)
+ (version "20220711")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/wahern/luaossl")
+ (commit (string-append "rel-" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1a9pgmc6fbhgh1m9ksz9fq057yzz46npqgakcsy9vngg47xacfdb"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list
+ #:make-flags
+ #~(list #$(string-append "CC=" (cc-for-target))
+ #$(string-append "LUA_APIS=" lua-api-version)
+ (string-append "prefix=" #$output))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'remove-luajit-test
+ (lambda _
+ ;; This test is only meaningful for luajit.
+ ;; <https://lua-users.org/lists/lua-l/2021-01/msg00324.html>
+ (unless (string-prefix? "luajit" #$(package-name lua))
+ (delete-file "regress/104-interposition-discarded.lua"))))
+ (add-after 'unpack 'remove-cqueues-test
+ (lambda _
+ ;; XXX: This test depends on cqueues and cqueues has a test
+ ;; that depends on lua-ossl.
+ (delete-file "regress/148-custom-extensions.lua")))
+ (delete 'configure)
+ (delete 'check) ; place 'check after 'install
+ (add-after 'install 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (setenv "LUA_CPATH"
+ (string-append #$output "/lib/lua/"
+ #$lua-api-version "/?.so;;"))
+ (setenv "LUA_PATH"
+ (string-append #$output "/share/lua/"
+ #$lua-api-version "/?.lua;;"))
+ (with-directory-excursion "regress"
+ (for-each (lambda (f)
+ (invoke "lua" f))
+ (find-files "." "^[0-9].*\\.lua$")))))))))
+ (inputs
+ (list lua openssl))
+ (home-page "https://25thandclement.com/~william/projects/luaossl.html")
+ (synopsis "OpenSSL bindings for Lua")
+ (description "The luaossl extension module for Lua provides comprehensive,
low-level bindings to the OpenSSL library, including support for certificate and
key management, key generation, signature verification, and deep bindings to the
distinguished name, alternative name, and X.509v3 extension interfaces. It also
binds OpenSSL's bignum, message digest, HMAC, cipher, and CSPRNG interfaces.")
- (license license:expat)))
+ (license license:expat))))
(define-public lua-ossl
(make-lua-ossl "lua-ossl" lua))
--
2.39.2
B
B
Bruno Victal wrote on 4 Jul 2023 00:28
[PATCH 4/4] gnu: lua-cqueues: Refactor package definition.
(address . guix-patches@gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
6481d9abe50694624c0f63d3abf8f4348deac449.1688423261.git.mirai@makinata.eu
* gnu/packages/lua.scm (make-lua-cqueues): Use G-Expressions.
Drop obsolete phases.
---
gnu/packages/lua.scm | 149 ++++++++++++++++---------------------------
1 file changed, 56 insertions(+), 93 deletions(-)

Toggle diff (171 lines)
diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
index c061959c2f..0fe14a3b5e 100644
--- a/gnu/packages/lua.scm
+++ b/gnu/packages/lua.scm
@@ -485,108 +485,71 @@ (define-public lua5.2-sec
(make-lua-sec "lua5.2-sec" lua-5.2))
(define (make-lua-cqueues name lua lua-ossl)
- (package
- (name name)
- (version "20200726")
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/wahern/cqueues")
- (commit (string-append "rel-" version))))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "17gwqndlga6gnishgs6wk8cvgwzanddr42yikkg2xd4nanhcg8z9"))))
- (build-system gnu-build-system)
- (arguments
- `(#:modules ((guix build gnu-build-system)
- (guix build utils)
- (ice-9 string-fun))
- #:make-flags
- (let ((out (assoc-ref %outputs "out"))
- (lua-api-version ,(version-major+minor (package-version lua))))
- (list ,(string-append "CC=" (cc-for-target))
- (string-append "LUA_APIS=" lua-api-version)))
- #:phases
- (modify-phases %standard-phases
- (delete 'configure)
- (delete 'check)
- (replace 'install
- (lambda* (#:key make-flags outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
- (apply invoke "make" "install"
- (append make-flags
- (list (string-append "DESTDIR=" out)
- "prefix="))))))
- (add-after 'install 'check
- (lambda* (#:key inputs outputs make-flags #:allow-other-keys)
- (let*
- ((lua-version ,(version-major+minor (package-version lua)))
- (env-suffix (if (equal? lua-version "5.1")
- ""
- (string-append
- "_"
- (string-replace-substring lua-version "." "_"))))
-
- (lua-ossl (assoc-ref inputs "lua-ossl"))
- (out (assoc-ref outputs "out"))
-
- (lua-cpath (lambda (p)
- (string-append p "/lib/lua/" lua-version "/?.so")))
- (lua-path (lambda (p)
- (string-append p "/share/lua/" lua-version "/?.lua"))))
- ;; The test suite sets Lua-version-specific search-path variables
- ;; when available so we must do the same, as these take
- ;; precedence over the generic "LUA_CPATH" and "LUA_PATH"
- (setenv (string-append "LUA_CPATH" env-suffix)
- (string-append
- (string-join (map lua-cpath (list out lua-ossl)) ";")
- ";;"))
- (setenv (string-append "LUA_PATH" env-suffix)
- (string-append
- (string-join (map lua-path (list out lua-ossl)) ";")
- ";;"))
-
- ;; Skip regression tests we expect to fail
- (with-directory-excursion "regress"
- (for-each (lambda (f)
- (rename-file f (string-append f ".skip")))
- (append
- ;; Regression tests that require network
- ;; connectivity
+ (let ((lua-api-version (version-major+minor (package-version lua))))
+ (package
+ (name name)
+ (version "20200726")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/wahern/cqueues")
+ (commit (string-append "rel-" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "17gwqndlga6gnishgs6wk8cvgwzanddr42yikkg2xd4nanhcg8z9"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list
+ #:make-flags
+ #~(list #$(string-append "CC=" (cc-for-target))
+ #$(string-append "LUA_APIS=" lua-api-version)
+ (string-append "prefix=" #$output))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'remove-luajit-tests
+ (lambda _
+ ;; Regression tests that require LuaJIT.
+ (unless (string-prefix? "luajit" #$(package-name lua))
+ (with-directory-excursion "regress"
+ (for-each delete-file
+ '("44-resolvers-gc.lua"
+ "51-join-defunct-thread.lua"
+ "73-starttls-buffering.lua"
+ "87-alpn-disappears.lua"))))))
+ (add-after 'unpack 'remove-networking-tests
+ (lambda _
+ ;; Regression tests that require network connectivity.
+ (with-directory-excursion "regress"
+ (for-each delete-file
'("22-client-dtls.lua"
"30-starttls-completion.lua"
"62-noname.lua"
- "153-dns-resolvers.lua")
-
- ;; Regression tests that require LuaJIT
- '("44-resolvers-gc.lua"
- "51-join-defunct-thread.lua"
- "73-starttls-buffering.lua"
- "87-alpn-disappears.lua")
-
- ;; Regression tests that require Lua 5.3
- (if (not (equal? lua-version "5.3"))
- '("152-thread-integer-passing.lua")
- '()))))
-
- (apply invoke "make" "check" make-flags)))))))
- (native-inputs
- (list m4))
- (inputs
- (list lua openssl))
- (propagated-inputs
- (list lua-ossl))
- (home-page "https://25thandclement.com/~william/projects/cqueues.html")
- (synopsis "Event loop for Lua using continuation queues")
- (description "The cqueues extension module for Lua implements an event loop
+ "153-dns-resolvers.lua")))))
+ (add-after 'unpack 'remove-lua5.3-test
+ (lambda _
+ ;; Regression tests that require Lua 5.3 or higher.
+ (unless #$(version>=? lua-api-version "5.3")
+ (delete-file "regress/152-thread-integer-passing.lua"))))
+ (delete 'configure))))
+ (native-inputs
+ (list m4))
+ (inputs
+ (list lua openssl))
+ (propagated-inputs
+ (list lua-ossl))
+ (home-page "https://25thandclement.com/~william/projects/cqueues.html")
+ (synopsis "Event loop for Lua using continuation queues")
+ (description "The cqueues extension module for Lua implements an event loop
that operates through the yielding and resumption of coroutines. It is designed
to be non-intrusive, composable, and embeddable within existing applications.")
- (license license:expat)))
+ (license license:expat))))
(define-public lua-cqueues
(make-lua-cqueues "lua-cqueues" lua lua-ossl))
+;; Note: cqueues principally targets Lua 5.2 and above.
+;; <https://25thandclement.com/~william/projects/cqueues.pdf>
(define-public lua5.1-cqueues
(make-lua-cqueues "lua5.1-cqueues" lua-5.1 lua5.1-ossl))
--
2.39.2
B
B
Bruno Victal wrote on 4 Jul 2023 00:28
[PATCH 3/4] gnu: lua-cqueues: Update to 20200726.
(address . guix-patches@gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
034fd7be85869c9ce24c01a318e2f4873199bb21.1688423261.git.mirai@makinata.eu
The releases list in the homepage is outdated.

* gnu/packages/lua.scm (make-lua-cqueues): Update to 20200726. Switch upstream
URL.
---
gnu/packages/lua.scm | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)

Toggle diff (39 lines)
diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
index 2214790751..c061959c2f 100644
--- a/gnu/packages/lua.scm
+++ b/gnu/packages/lua.scm
@@ -487,14 +487,16 @@ (define-public lua5.2-sec
(define (make-lua-cqueues name lua lua-ossl)
(package
(name name)
- (version "20171014")
+ (version "20200726")
(source (origin
- (method url-fetch)
- (uri (string-append "https://25thandclement.com/~william/"
- "projects/releases/cqueues-" version ".tgz"))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/wahern/cqueues")
+ (commit (string-append "rel-" version))))
+ (file-name (git-file-name name version))
(sha256
(base32
- "1dabhpn6r0hlln8vx9hxm34pfcm46qzgpb2apmziwg5z51fi4ksb"))))
+ "17gwqndlga6gnishgs6wk8cvgwzanddr42yikkg2xd4nanhcg8z9"))))
(build-system gnu-build-system)
(arguments
`(#:modules ((guix build gnu-build-system)
@@ -559,7 +561,9 @@ (define (make-lua-cqueues name lua lua-ossl)
;; Regression tests that require LuaJIT
'("44-resolvers-gc.lua"
- "51-join-defunct-thread.lua")
+ "51-join-defunct-thread.lua"
+ "73-starttls-buffering.lua"
+ "87-alpn-disappears.lua")
;; Regression tests that require Lua 5.3
(if (not (equal? lua-version "5.3"))
--
2.39.2
M
M
Maxim Cournoyer wrote on 30 Aug 2023 21:54
Re: bug#64449: [PATCH 0/4] Fix lua-cqueues build failure.
(name . Bruno Victal)(address . mirai@makinata.eu)(address . 64449@debbugs.gnu.org)
871qfk71cw.fsf_-_@gmail.com
Hi,

Bruno Victal <mirai@makinata.eu> writes:

Toggle quote (38 lines)
> The homepage seems frozen in time whilst the issue tracker at
> <https://github.com/wahern/luaossl> has been receiving new releases.
>
> * gnu/packages/lua.scm (make-lua-ossl): Update to 20220711. Switch upstream
> URL.
> ---
> gnu/packages/lua.scm | 12 +++++++-----
> 1 file changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
> index 63a4bd5455..67df8dc31e 100644
> --- a/gnu/packages/lua.scm
> +++ b/gnu/packages/lua.scm
> @@ -370,14 +370,16 @@ (define-public lua5.2-filesystem
> (define (make-lua-ossl name lua)
> (package
> (name name)
> - (version "20170903")
> + (version "20220711")
> (source (origin
> - (method url-fetch)
> - (uri (string-append "https://25thandclement.com/~william/"
> - "projects/releases/luaossl-" version ".tgz"))
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/wahern/luaossl")
> + (commit (string-append "rel-" version))))
> + (file-name (git-file-name name version))
> (sha256
> (base32
> - "10392bvd0lzyibipblgiss09zlqh3a5zgqg1b9lgbybpqb9cv2k3"))))
> + "1a9pgmc6fbhgh1m9ksz9fq057yzz46npqgakcsy9vngg47xacfdb"))))
> (build-system gnu-build-system)
> (arguments
> `(#:make-flags
>
> base-commit: cf7e0267adfc3cb83e477c2aebb61060c3c0cfd6

LGTM.

--
Thanks,
Maxim
M
M
Maxim Cournoyer wrote on 30 Aug 2023 21:55
(name . Bruno Victal)(address . mirai@makinata.eu)(address . 64449@debbugs.gnu.org)
87wmxc5mqe.fsf_-_@gmail.com
Hi,

Bruno Victal <mirai@makinata.eu> writes:

Toggle quote (8 lines)
> Dropped obsolete flag due to https://github.com/wahern/luaossl/pull/61.
>
> * gnu/packages/lua.scm (make-lua-ossl): Use G-Expressions.
> [arguments]<make-flags>: Drop obsolete flag.
> ---
> gnu/packages/lua.scm | 99 ++++++++++++++++++++++++--------------------
> 1 file changed, 55 insertions(+), 44 deletions(-)

[...]

Toggle quote (13 lines)
> + #~(modify-phases %standard-phases
> + (add-after 'unpack 'remove-luajit-test
> + (lambda _
> + ;; This test is only meaningful for luajit.
> + ;; <https://lua-users.org/lists/lua-l/2021-01/msg00324.html>
> + (unless (string-prefix? "luajit" #$(package-name lua))
> + (delete-file "regress/104-interposition-discarded.lua"))))
> + (add-after 'unpack 'remove-cqueues-test
> + (lambda _
> + ;; XXX: This test depends on cqueues and cqueues has a test
> + ;; that depends on lua-ossl.
> + (delete-file "regress/148-custom-extensions.lua")))

The above new phases are missing from the GNU ChangeLog message.

--
Thanks,
Maxim
M
M
Maxim Cournoyer wrote on 30 Aug 2023 21:57
(name . Bruno Victal)(address . mirai@makinata.eu)(address . 64449@debbugs.gnu.org)
87sf805mng.fsf_-_@gmail.com
Hi,

Bruno Victal <mirai@makinata.eu> writes:

Toggle quote (3 lines)
> * gnu/packages/lua.scm (make-lua-cqueues): Use G-Expressions.
> Drop obsolete phases.

LGTM.

--
Thanks,
Maxim
M
M
Maxim Cournoyer wrote on 30 Aug 2023 21:57
(name . Bruno Victal)(address . mirai@makinata.eu)(address . 64449@debbugs.gnu.org)
87o7io5mmb.fsf_-_@gmail.com
Hi,

Bruno Victal <mirai@makinata.eu> writes:

Toggle quote (5 lines)
> The releases list in the homepage is outdated.
>
> * gnu/packages/lua.scm (make-lua-cqueues): Update to 20200726. Switch upstream
> URL.

You forgot to mention the new disabled tests added.

--
Thanks,
Maxim
B
B
Bruno Victal wrote on 31 Aug 2023 17:03
[PATCH v2 3/4] gnu: lua-cqueues: Update to 20200726.
(address . guix-patches@gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
bb2873b01e9fe92d9fba009d7a8afad9a9b2d470.1693494137.git.mirai@makinata.eu
The releases list in the homepage is outdated.

* gnu/packages/lua.scm (make-lua-cqueues): Update to 20200726. Switch upstream
URL.
[arguments]<#:phases>: Exclude LuaJIT tests for regular Lua based builds.
---
gnu/packages/lua.scm | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)

Toggle diff (39 lines)
diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
index 8726b7a8db..e68cbc69e8 100644
--- a/gnu/packages/lua.scm
+++ b/gnu/packages/lua.scm
@@ -487,14 +487,16 @@ (define-public lua5.2-sec
(define (make-lua-cqueues name lua lua-ossl)
(package
(name name)
- (version "20171014")
+ (version "20200726")
(source (origin
- (method url-fetch)
- (uri (string-append "https://25thandclement.com/~william/"
- "projects/releases/cqueues-" version ".tgz"))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/wahern/cqueues")
+ (commit (string-append "rel-" version))))
+ (file-name (git-file-name name version))
(sha256
(base32
- "1dabhpn6r0hlln8vx9hxm34pfcm46qzgpb2apmziwg5z51fi4ksb"))))
+ "17gwqndlga6gnishgs6wk8cvgwzanddr42yikkg2xd4nanhcg8z9"))))
(build-system gnu-build-system)
(arguments
`(#:modules ((guix build gnu-build-system)
@@ -559,7 +561,9 @@ (define (make-lua-cqueues name lua lua-ossl)
;; Regression tests that require LuaJIT
'("44-resolvers-gc.lua"
- "51-join-defunct-thread.lua")
+ "51-join-defunct-thread.lua"
+ "73-starttls-buffering.lua"
+ "87-alpn-disappears.lua")
;; Regression tests that require Lua 5.3
(if (not (equal? lua-version "5.3"))
--
2.40.1
B
B
Bruno Victal wrote on 31 Aug 2023 17:03
[PATCH v2 1/4] gnu: lua-ossl: Update to 20220711.
(address . guix-patches@gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
3b400f0f2539bb7a41a0d7cc0435f27a19056bd7.1693494137.git.mirai@makinata.eu
The homepage seems frozen in time whilst the issue tracker at
https://github.com/wahern/luaossl has been receiving new releases.

* gnu/packages/lua.scm (make-lua-ossl): Update to 20220711. Switch upstream
URL.
---
gnu/packages/lua.scm | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)

Toggle diff (30 lines)
diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
index 405f8511cb..f98999efc0 100644
--- a/gnu/packages/lua.scm
+++ b/gnu/packages/lua.scm
@@ -370,14 +370,16 @@ (define-public lua5.2-filesystem
(define (make-lua-ossl name lua)
(package
(name name)
- (version "20170903")
+ (version "20220711")
(source (origin
- (method url-fetch)
- (uri (string-append "https://25thandclement.com/~william/"
- "projects/releases/luaossl-" version ".tgz"))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/wahern/luaossl")
+ (commit (string-append "rel-" version))))
+ (file-name (git-file-name name version))
(sha256
(base32
- "10392bvd0lzyibipblgiss09zlqh3a5zgqg1b9lgbybpqb9cv2k3"))))
+ "1a9pgmc6fbhgh1m9ksz9fq057yzz46npqgakcsy9vngg47xacfdb"))))
(build-system gnu-build-system)
(arguments
`(#:make-flags

base-commit: b51e45d3aaa8a85d39a8a4c3d18e8b57254aeaf2
--
2.40.1
B
B
Bruno Victal wrote on 31 Aug 2023 17:03
[PATCH v2 4/4] gnu: lua-cqueues: Refactor package definition.
(address . guix-patches@gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
65bbd5893a2056ffc56bb1558a8625a23583e2a9.1693494137.git.mirai@makinata.eu
* gnu/packages/lua.scm (make-lua-cqueues): Use G-Expressions.
Drop obsolete phases.
---
gnu/packages/lua.scm | 149 ++++++++++++++++---------------------------
1 file changed, 56 insertions(+), 93 deletions(-)

Toggle diff (171 lines)
diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
index e68cbc69e8..f0db08fd4f 100644
--- a/gnu/packages/lua.scm
+++ b/gnu/packages/lua.scm
@@ -485,108 +485,71 @@ (define-public lua5.2-sec
(make-lua-sec "lua5.2-sec" lua-5.2))
(define (make-lua-cqueues name lua lua-ossl)
- (package
- (name name)
- (version "20200726")
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/wahern/cqueues")
- (commit (string-append "rel-" version))))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "17gwqndlga6gnishgs6wk8cvgwzanddr42yikkg2xd4nanhcg8z9"))))
- (build-system gnu-build-system)
- (arguments
- `(#:modules ((guix build gnu-build-system)
- (guix build utils)
- (ice-9 string-fun))
- #:make-flags
- (let ((out (assoc-ref %outputs "out"))
- (lua-api-version ,(version-major+minor (package-version lua))))
- (list ,(string-append "CC=" (cc-for-target))
- (string-append "LUA_APIS=" lua-api-version)))
- #:phases
- (modify-phases %standard-phases
- (delete 'configure)
- (delete 'check)
- (replace 'install
- (lambda* (#:key make-flags outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
- (apply invoke "make" "install"
- (append make-flags
- (list (string-append "DESTDIR=" out)
- "prefix="))))))
- (add-after 'install 'check
- (lambda* (#:key inputs outputs make-flags #:allow-other-keys)
- (let*
- ((lua-version ,(version-major+minor (package-version lua)))
- (env-suffix (if (equal? lua-version "5.1")
- ""
- (string-append
- "_"
- (string-replace-substring lua-version "." "_"))))
-
- (lua-ossl (assoc-ref inputs "lua-ossl"))
- (out (assoc-ref outputs "out"))
-
- (lua-cpath (lambda (p)
- (string-append p "/lib/lua/" lua-version "/?.so")))
- (lua-path (lambda (p)
- (string-append p "/share/lua/" lua-version "/?.lua"))))
- ;; The test suite sets Lua-version-specific search-path variables
- ;; when available so we must do the same, as these take
- ;; precedence over the generic "LUA_CPATH" and "LUA_PATH"
- (setenv (string-append "LUA_CPATH" env-suffix)
- (string-append
- (string-join (map lua-cpath (list out lua-ossl)) ";")
- ";;"))
- (setenv (string-append "LUA_PATH" env-suffix)
- (string-append
- (string-join (map lua-path (list out lua-ossl)) ";")
- ";;"))
-
- ;; Skip regression tests we expect to fail
- (with-directory-excursion "regress"
- (for-each (lambda (f)
- (rename-file f (string-append f ".skip")))
- (append
- ;; Regression tests that require network
- ;; connectivity
+ (let ((lua-api-version (version-major+minor (package-version lua))))
+ (package
+ (name name)
+ (version "20200726")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/wahern/cqueues")
+ (commit (string-append "rel-" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "17gwqndlga6gnishgs6wk8cvgwzanddr42yikkg2xd4nanhcg8z9"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list
+ #:make-flags
+ #~(list #$(string-append "CC=" (cc-for-target))
+ #$(string-append "LUA_APIS=" lua-api-version)
+ (string-append "prefix=" #$output))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'remove-luajit-tests
+ (lambda _
+ ;; Regression tests that require LuaJIT.
+ (unless (string-prefix? "luajit" #$(package-name lua))
+ (with-directory-excursion "regress"
+ (for-each delete-file
+ '("44-resolvers-gc.lua"
+ "51-join-defunct-thread.lua"
+ "73-starttls-buffering.lua"
+ "87-alpn-disappears.lua"))))))
+ (add-after 'unpack 'remove-networking-tests
+ (lambda _
+ ;; Regression tests that require network connectivity.
+ (with-directory-excursion "regress"
+ (for-each delete-file
'("22-client-dtls.lua"
"30-starttls-completion.lua"
"62-noname.lua"
- "153-dns-resolvers.lua")
-
- ;; Regression tests that require LuaJIT
- '("44-resolvers-gc.lua"
- "51-join-defunct-thread.lua"
- "73-starttls-buffering.lua"
- "87-alpn-disappears.lua")
-
- ;; Regression tests that require Lua 5.3
- (if (not (equal? lua-version "5.3"))
- '("152-thread-integer-passing.lua")
- '()))))
-
- (apply invoke "make" "check" make-flags)))))))
- (native-inputs
- (list m4))
- (inputs
- (list lua openssl))
- (propagated-inputs
- (list lua-ossl))
- (home-page "https://25thandclement.com/~william/projects/cqueues.html")
- (synopsis "Event loop for Lua using continuation queues")
- (description "The cqueues extension module for Lua implements an event loop
+ "153-dns-resolvers.lua")))))
+ (add-after 'unpack 'remove-lua5.3-test
+ (lambda _
+ ;; Regression tests that require Lua 5.3 or higher.
+ (unless #$(version>=? lua-api-version "5.3")
+ (delete-file "regress/152-thread-integer-passing.lua"))))
+ (delete 'configure))))
+ (native-inputs
+ (list m4))
+ (inputs
+ (list lua openssl))
+ (propagated-inputs
+ (list lua-ossl))
+ (home-page "https://25thandclement.com/~william/projects/cqueues.html")
+ (synopsis "Event loop for Lua using continuation queues")
+ (description "The cqueues extension module for Lua implements an event loop
that operates through the yielding and resumption of coroutines. It is designed
to be non-intrusive, composable, and embeddable within existing applications.")
- (license license:expat)))
+ (license license:expat))))
(define-public lua-cqueues
(make-lua-cqueues "lua-cqueues" lua lua-ossl))
+;; Note: cqueues principally targets Lua 5.2 and above.
+;; <https://25thandclement.com/~william/projects/cqueues.pdf>
(define-public lua5.1-cqueues
(make-lua-cqueues "lua5.1-cqueues" lua-5.1 lua5.1-ossl))
--
2.40.1
B
B
Bruno Victal wrote on 31 Aug 2023 17:03
[PATCH v2 2/4] gnu: lua-ossl: Use G-expressions.
(address . guix-patches@gnu.org)(name . Bruno Victal)(address . mirai@makinata.eu)
da165140212215746cb48733e7b85f486ff4ca3a.1693494137.git.mirai@makinata.eu
Dropped obsolete flag due to https://github.com/wahern/luaossl/pull/61.

* gnu/packages/lua.scm (make-lua-ossl): Use G-Expressions.
[arguments]<#:make-flags>: Drop obsolete flag.
<#:phases>: Add 'remove-luajit-test and 'remove-cqueues-test.
---
gnu/packages/lua.scm | 99 ++++++++++++++++++++++++--------------------
1 file changed, 55 insertions(+), 44 deletions(-)

Toggle diff (123 lines)
diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
index f98999efc0..8726b7a8db 100644
--- a/gnu/packages/lua.scm
+++ b/gnu/packages/lua.scm
@@ -19,6 +19,7 @@
;;; Copyright © 2022 Luis Henrique Gomes Higino <luishenriquegh2701@gmail.com>
;;; Copyright © 2022 Leo Nikkilä <hello@lnikki.la>
;;; Copyright © 2023 Yovan Naumovski <yovan@gorski.stream>
+;;; Copyright © 2023 Bruno Victal <mirai@makinata.eu>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -368,54 +369,64 @@ (define-public lua5.2-filesystem
(make-lua-filesystem "lua5.2-filesystem" lua-5.2))
(define (make-lua-ossl name lua)
- (package
- (name name)
- (version "20220711")
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/wahern/luaossl")
- (commit (string-append "rel-" version))))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "1a9pgmc6fbhgh1m9ksz9fq057yzz46npqgakcsy9vngg47xacfdb"))))
- (build-system gnu-build-system)
- (arguments
- `(#:make-flags
- (let ((out (assoc-ref %outputs "out"))
- (lua-api-version ,(version-major+minor (package-version lua))))
- (list ,(string-append "CC=" (cc-for-target))
- "CFLAGS='-D HAVE_SYS_SYSCTL_H=0'" ; sys/sysctl.h is deprecated
- (string-append "prefix=" out)
- (string-append "LUA_APIS=" lua-api-version)))
- #:phases
- (modify-phases %standard-phases
- (delete 'configure)
- (delete 'check)
- (add-after 'install 'check
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out"))
- (lua-version ,(version-major+minor (package-version lua))))
- (setenv "LUA_CPATH"
- (string-append out "/lib/lua/" lua-version "/?.so;;"))
- (setenv "LUA_PATH"
- (string-append out "/share/lua/" lua-version "/?.lua;;"))
- (with-directory-excursion "regress"
- (for-each (lambda (f)
- (invoke "lua" f))
- (find-files "." "^[0-9].*\\.lua$"))))
- #t)))))
- (inputs
- (list lua openssl))
- (home-page "https://25thandclement.com/~william/projects/luaossl.html")
- (synopsis "OpenSSL bindings for Lua")
- (description "The luaossl extension module for Lua provides comprehensive,
+ (let ((lua-api-version (version-major+minor (package-version lua))))
+ (package
+ (name name)
+ (version "20220711")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/wahern/luaossl")
+ (commit (string-append "rel-" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1a9pgmc6fbhgh1m9ksz9fq057yzz46npqgakcsy9vngg47xacfdb"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list
+ #:make-flags
+ #~(list #$(string-append "CC=" (cc-for-target))
+ #$(string-append "LUA_APIS=" lua-api-version)
+ (string-append "prefix=" #$output))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'remove-luajit-test
+ (lambda _
+ ;; This test is only meaningful for luajit.
+ ;; <https://lua-users.org/lists/lua-l/2021-01/msg00324.html>
+ (unless (string-prefix? "luajit" #$(package-name lua))
+ (delete-file "regress/104-interposition-discarded.lua"))))
+ (add-after 'unpack 'remove-cqueues-test
+ (lambda _
+ ;; XXX: This test depends on cqueues and cqueues has a test
+ ;; that depends on lua-ossl.
+ (delete-file "regress/148-custom-extensions.lua")))
+ (delete 'configure)
+ (delete 'check) ; place 'check after 'install
+ (add-after 'install 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (setenv "LUA_CPATH"
+ (string-append #$output "/lib/lua/"
+ #$lua-api-version "/?.so;;"))
+ (setenv "LUA_PATH"
+ (string-append #$output "/share/lua/"
+ #$lua-api-version "/?.lua;;"))
+ (with-directory-excursion "regress"
+ (for-each (lambda (f)
+ (invoke "lua" f))
+ (find-files "." "^[0-9].*\\.lua$")))))))))
+ (inputs
+ (list lua openssl))
+ (home-page "https://25thandclement.com/~william/projects/luaossl.html")
+ (synopsis "OpenSSL bindings for Lua")
+ (description "The luaossl extension module for Lua provides comprehensive,
low-level bindings to the OpenSSL library, including support for certificate and
key management, key generation, signature verification, and deep bindings to the
distinguished name, alternative name, and X.509v3 extension interfaces. It also
binds OpenSSL's bignum, message digest, HMAC, cipher, and CSPRNG interfaces.")
- (license license:expat)))
+ (license license:expat))))
(define-public lua-ossl
(make-lua-ossl "lua-ossl" lua))
--
2.40.1
B
B
Bruno Victal wrote on 9 Oct 2023 02:51
Re: [PATCH 0/4] Fix lua-cqueues build failure.
(address . 64449@debbugs.gnu.org)
d3993068-3ec1-45d9-810e-88428309d018@makinata.eu
bump

--
Furthermore, I consider that nonfree software must be eradicated.

Cheers,
Bruno.
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 64449@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 64449
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch