GNU bug report logs - #64449
[PATCH 0/4] Fix lua-cqueues build failure.

Previous Next

Package: guix-patches;

Reported by: Bruno Victal <mirai <at> makinata.eu>

Date: Mon, 3 Jul 2023 22:27:02 UTC

Severity: normal

Tags: patch

To reply to this bug, email your comments to 64449 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#64449; Package guix-patches. (Mon, 03 Jul 2023 22:27:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Bruno Victal <mirai <at> makinata.eu>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 03 Jul 2023 22:27:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Bruno Victal <mirai <at> makinata.eu>
To: guix-patches <at> gnu.org
Cc: Bruno Victal <mirai <at> makinata.eu>
Subject: [PATCH 0/4] Fix lua-cqueues build failure.
Date: Mon,  3 Jul 2023 23:26:04 +0100
Fixes <https://issues.guix.gnu.org/61279>.

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





Information forwarded to guix-patches <at> gnu.org:
bug#64449; Package guix-patches. (Mon, 03 Jul 2023 22:29:02 GMT) Full text and rfc822 format available.

Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Bruno Victal <mirai <at> makinata.eu>
To: guix-patches <at> gnu.org
Cc: Bruno Victal <mirai <at> makinata.eu>
Subject: [PATCH 1/4] gnu: lua-ossl: Update to 20220711.
Date: Mon,  3 Jul 2023 23:28:40 +0100
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
-- 
2.39.2





Information forwarded to guix-patches <at> gnu.org:
bug#64449; Package guix-patches. (Mon, 03 Jul 2023 22:30:02 GMT) Full text and rfc822 format available.

Message #11 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Bruno Victal <mirai <at> makinata.eu>
To: guix-patches <at> gnu.org
Cc: Bruno Victal <mirai <at> makinata.eu>
Subject: [PATCH 2/4] gnu: lua-ossl: Use G-expressions.
Date: Mon,  3 Jul 2023 23:28:41 +0100
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(-)

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 <at> gmail.com>
 ;;; Copyright © 2022 Leo Nikkilä <hello <at> lnikki.la>
 ;;; Copyright © 2023 Yovan Naumovski <yovan <at> gorski.stream>
+;;; Copyright © 2023 Bruno Victal <mirai <at> 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





Information forwarded to guix-patches <at> gnu.org:
bug#64449; Package guix-patches. (Mon, 03 Jul 2023 22:30:03 GMT) Full text and rfc822 format available.

Message #14 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Bruno Victal <mirai <at> makinata.eu>
To: guix-patches <at> gnu.org
Cc: Bruno Victal <mirai <at> makinata.eu>
Subject: [PATCH 4/4] gnu: lua-cqueues: Refactor package definition.
Date: Mon,  3 Jul 2023 23:28:43 +0100
* 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(-)

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





Information forwarded to guix-patches <at> gnu.org:
bug#64449; Package guix-patches. (Mon, 03 Jul 2023 22:38:02 GMT) Full text and rfc822 format available.

Message #17 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Bruno Victal <mirai <at> makinata.eu>
To: guix-patches <at> gnu.org
Cc: Bruno Victal <mirai <at> makinata.eu>
Subject: [PATCH 3/4] gnu: lua-cqueues: Update to 20200726.
Date: Mon,  3 Jul 2023 23:28:42 +0100
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(-)

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





Information forwarded to guix-patches <at> gnu.org:
bug#64449; Package guix-patches. (Wed, 30 Aug 2023 19:55:01 GMT) Full text and rfc822 format available.

Message #20 received at 64449 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Bruno Victal <mirai <at> makinata.eu>
Cc: 64449 <at> debbugs.gnu.org
Subject: Re: bug#64449: [PATCH 0/4] Fix lua-cqueues build failure.
Date: Wed, 30 Aug 2023 15:54:07 -0400
Hi,

Bruno Victal <mirai <at> makinata.eu> writes:

> 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




Information forwarded to guix-patches <at> gnu.org:
bug#64449; Package guix-patches. (Wed, 30 Aug 2023 19:56:02 GMT) Full text and rfc822 format available.

Message #23 received at 64449 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Bruno Victal <mirai <at> makinata.eu>
Cc: 64449 <at> debbugs.gnu.org
Subject: Re: bug#64449: [PATCH 0/4] Fix lua-cqueues build failure.
Date: Wed, 30 Aug 2023 15:55:21 -0400
Hi,

Bruno Victal <mirai <at> makinata.eu> writes:

> 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(-)

[...]

> +        #~(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




Information forwarded to guix-patches <at> gnu.org:
bug#64449; Package guix-patches. (Wed, 30 Aug 2023 19:58:02 GMT) Full text and rfc822 format available.

Message #26 received at 64449 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Bruno Victal <mirai <at> makinata.eu>
Cc: 64449 <at> debbugs.gnu.org
Subject: Re: bug#64449: [PATCH 0/4] Fix lua-cqueues build failure.
Date: Wed, 30 Aug 2023 15:57:07 -0400
Hi,

Bruno Victal <mirai <at> makinata.eu> writes:

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

LGTM.

-- 
Thanks,
Maxim




Information forwarded to guix-patches <at> gnu.org:
bug#64449; Package guix-patches. (Wed, 30 Aug 2023 19:59:01 GMT) Full text and rfc822 format available.

Message #29 received at 64449 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Bruno Victal <mirai <at> makinata.eu>
Cc: 64449 <at> debbugs.gnu.org
Subject: Re: bug#64449: [PATCH 0/4] Fix lua-cqueues build failure.
Date: Wed, 30 Aug 2023 15:57:48 -0400
Hi,

Bruno Victal <mirai <at> makinata.eu> writes:

> 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




Information forwarded to guix-patches <at> gnu.org:
bug#64449; Package guix-patches. (Thu, 31 Aug 2023 15:05:02 GMT) Full text and rfc822 format available.

Message #32 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Bruno Victal <mirai <at> makinata.eu>
To: guix-patches <at> gnu.org
Cc: Bruno Victal <mirai <at> makinata.eu>
Subject: [PATCH v2 3/4] gnu: lua-cqueues: Update to 20200726.
Date: Thu, 31 Aug 2023 16:03:41 +0100
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(-)

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





Information forwarded to guix-patches <at> gnu.org:
bug#64449; Package guix-patches. (Thu, 31 Aug 2023 15:05:02 GMT) Full text and rfc822 format available.

Message #35 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Bruno Victal <mirai <at> makinata.eu>
To: guix-patches <at> gnu.org
Cc: Bruno Victal <mirai <at> makinata.eu>
Subject: [PATCH v2 1/4] gnu: lua-ossl: Update to 20220711.
Date: Thu, 31 Aug 2023 16:03:39 +0100
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 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





Information forwarded to guix-patches <at> gnu.org:
bug#64449; Package guix-patches. (Thu, 31 Aug 2023 15:05:03 GMT) Full text and rfc822 format available.

Message #38 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Bruno Victal <mirai <at> makinata.eu>
To: guix-patches <at> gnu.org
Cc: Bruno Victal <mirai <at> makinata.eu>
Subject: [PATCH v2 4/4] gnu: lua-cqueues: Refactor package definition.
Date: Thu, 31 Aug 2023 16:03:42 +0100
* 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(-)

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





Information forwarded to guix-patches <at> gnu.org:
bug#64449; Package guix-patches. (Thu, 31 Aug 2023 15:13:02 GMT) Full text and rfc822 format available.

Message #41 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Bruno Victal <mirai <at> makinata.eu>
To: guix-patches <at> gnu.org
Cc: Bruno Victal <mirai <at> makinata.eu>
Subject: [PATCH v2 2/4] gnu: lua-ossl: Use G-expressions.
Date: Thu, 31 Aug 2023 16:03:40 +0100
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(-)

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 <at> gmail.com>
 ;;; Copyright © 2022 Leo Nikkilä <hello <at> lnikki.la>
 ;;; Copyright © 2023 Yovan Naumovski <yovan <at> gorski.stream>
+;;; Copyright © 2023 Bruno Victal <mirai <at> 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





Information forwarded to guix-patches <at> gnu.org:
bug#64449; Package guix-patches. (Mon, 09 Oct 2023 00:53:01 GMT) Full text and rfc822 format available.

Message #44 received at 64449 <at> debbugs.gnu.org (full text, mbox):

From: Bruno Victal <mirai <at> makinata.eu>
Cc: 64449 <at> debbugs.gnu.org
Subject: Re: [PATCH 0/4] Fix lua-cqueues build failure.
Date: Mon, 9 Oct 2023 01:51:48 +0100
bump

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

Cheers,
Bruno.




This bug report was last modified 208 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.