[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/03: gnu: cl-lack: Update to 0.3.0-1.35d3a8e.
From: |
guix-commits |
Subject: |
02/03: gnu: cl-lack: Update to 0.3.0-1.35d3a8e. |
Date: |
Fri, 13 Sep 2024 05:42:42 -0400 (EDT) |
glv pushed a commit to branch master
in repository guix.
commit f13599b5f75ca5fd73e83915f05f33b86cb5e377
Author: Konrad Hinsen <konrad.hinsen@fastmail.net>
AuthorDate: Thu Sep 12 16:06:15 2024 +0200
gnu: cl-lack: Update to 0.3.0-1.35d3a8e.
* gnu/packages/patches/sbcl-lack-fix-tests.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/lisp-xyz.scm (sbcl-lack): Update to 0.3.0-1.35d3a8e.
[source]: Use patch.
[native-inputs]: Add sbcl-cl-cookie, sbcl-dexador and sbcl-hunchentoot.
[inputs]: Add sbcl-alexandria, sbcl-anypool, sbcl-bordeaux-threads,
sbcl-cl-base64, sbcl-cl-isaac, sbcl-cl-redis, sbcl-dbi and
sbcl-trivial-rfc-1123.
[arguments]: Add lack-app-directory, lack-app-file,
lack-middleware-accesslog, lack-middleware-auth-basic,
lack-middleware-csrf,
lack-middleware-dbpool, lack-middleware-mount, lack-middleware-session,
lack-session-store-dbi and lack-session-store-redis to 'asd-systems'.
Enable tests.
[license]: Switch to expat.
Change-Id: I4285cf208b76d6f461735fff04293833ef163e08
Signed-off-by: Guillaume Le Vaillant <glv@posteo.net>
---
gnu/local.mk | 1 +
gnu/packages/lisp-xyz.scm | 56 ++++--
gnu/packages/patches/sbcl-lack-fix-tests.patch | 243 +++++++++++++++++++++++++
3 files changed, 282 insertions(+), 18 deletions(-)
diff --git a/gnu/local.mk b/gnu/local.mk
index e244219a3c..fcdf174099 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2126,6 +2126,7 @@ dist_patch_DATA =
\
%D%/packages/patches/sbcl-clml-fix-types.patch \
%D%/packages/patches/sbcl-eazy-gnuplot-skip-path-check.patch \
%D%/packages/patches/sbcl-fast-generic-functions-fix-sbcl-2.4.patch \
+ %D%/packages/patches/sbcl-lack-fix-tests.patch \
%D%/packages/patches/sbcl-png-fix-sbcl-compatibility.patch \
%D%/packages/patches/sbcl-s-sysdeps-bt2.patch \
%D%/packages/patches/scalapack-gcc-10-compilation.patch \
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index cf4c103da3..666bf41bbd 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -18515,41 +18515,61 @@ extensions developed by technical users.")
;; (sbcl-package->ecl-package sbcl-kons-9))
(define-public sbcl-lack
- (let ((commit "abff8efeb0c3a848e6bb0022f2b8b7fa3a1bc88b")
+ (let ((commit "35d3a8e03cab9204eec88c7dfe4d5366fc2ea922")
(revision "1"))
(package
(name "sbcl-lack")
- (version (git-version "0.1.0" revision commit))
+ (version (git-version "0.3.0" revision commit))
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/fukamachi/lack")
(commit commit)))
- (file-name (git-file-name "lack" version))
+ (file-name (git-file-name "cl-lack" version))
(sha256
- (base32 "1avh4ygcj9xcx4m17nj0wnxxaisk26w4ljs2bibzxaln24x7pi85"))))
+ (base32 "1yrhhzn8ywdjxwpaxzlnsm2lslhy45r89brn8gh5n08mdyjlp4l2"))
+ (patches (search-patches "sbcl-lack-fix-tests.patch"))))
(build-system asdf-build-system/sbcl)
(native-inputs
- (list sbcl-prove))
+ (list sbcl-cl-cookie
+ sbcl-dexador
+ sbcl-hunchentoot
+ sbcl-prove))
(inputs
- `(("circular-streams" ,sbcl-circular-streams)
- ("http-body" ,sbcl-http-body)
- ("ironclad" ,sbcl-ironclad)
- ("local-time" ,sbcl-local-time)
- ("quri" ,sbcl-quri)
- ("trivial-mimes" ,sbcl-trivial-mimes)))
+ (list sbcl-alexandria
+ sbcl-anypool
+ sbcl-bordeaux-threads
+ sbcl-circular-streams
+ sbcl-cl-base64
+ sbcl-cl-isaac
+ sbcl-cl-redis
+ sbcl-dbi
+ sbcl-http-body
+ sbcl-ironclad
+ sbcl-local-time
+ sbcl-quri
+ sbcl-trivial-mimes
+ sbcl-trivial-rfc-1123))
(arguments
'(#:asd-systems '("lack"
+ "lack-app-directory"
+ "lack-app-file"
+ "lack-component"
+ "lack-middleware-accesslog"
+ "lack-middleware-auth-basic"
+ "lack-middleware-backtrace"
+ "lack-middleware-csrf"
+ "lack-middleware-dbpool"
+ "lack-middleware-mount"
+ "lack-middleware-session"
+ "lack-middleware-static"
"lack-request"
"lack-response"
- "lack-component"
+ "lack-session-store-dbi"
+ "lack-session-store-redis"
"lack-util"
- "lack-util-writer-stream"
- "lack-middleware-backtrace"
- "lack-middleware-static")
- ;; XXX: Component :CLACK not found
- #:tests? #f))
+ "lack-util-writer-stream")))
(home-page "https://github.com/fukamachi/lack")
(synopsis "Lack, the core of Clack")
(description
@@ -18557,7 +18577,7 @@ extensions developed by technical users.")
constructed of modular components. It was originally a part of Clack, however
it's going to be rewritten as an individual project since Clack v2 with
performance and simplicity in mind.")
- (license license:llgpl))))
+ (license license:expat))))
(define-public cl-lack
(sbcl-package->cl-source-package sbcl-lack))
diff --git a/gnu/packages/patches/sbcl-lack-fix-tests.patch
b/gnu/packages/patches/sbcl-lack-fix-tests.patch
new file mode 100644
index 0000000000..c9abfb3d6f
--- /dev/null
+++ b/gnu/packages/patches/sbcl-lack-fix-tests.patch
@@ -0,0 +1,243 @@
+Remove tests that cannot be run. Some depend on clack, which in turn
+depends on lack. Others refer to systems that don't exist
+(names starting with "t-").
+
+--- a/lack-component.asd
++++ b/lack-component.asd
+@@ -2,7 +2,6 @@
+ :version "0.2.0"
+ :author "Eitaro Fukamachi"
+ :license "MIT"
+- :components ((:file "src/component"))
+- :in-order-to ((test-op (test-op "t-lack-component"))))
++ :components ((:file "src/component")))
+
+ (register-system-packages "lack-component" '(:lack.component))
+diff --git a/lack-middleware-accesslog.asd b/lack-middleware-accesslog.asd
+index c593988..21a4e70 100644
+--- a/lack-middleware-accesslog.asd
++++ b/lack-middleware-accesslog.asd
+@@ -6,7 +6,6 @@
+ "local-time")
+ :components ((:module "src"
+ :components
+- ((:file "middleware/accesslog"))))
+- :in-order-to ((test-op (test-op "t-lack-middleware-accesslog"))))
++ ((:file "middleware/accesslog")))))
+
+ (register-system-packages "lack-middleware-accesslog"
'(:lack.middleware.accesslog))
+diff --git a/lack-middleware-auth-basic.asd b/lack-middleware-auth-basic.asd
+index 9206d22..6862f33 100644
+--- a/lack-middleware-auth-basic.asd
++++ b/lack-middleware-auth-basic.asd
+@@ -6,7 +6,6 @@
+ "split-sequence")
+ :components ((:module "src"
+ :components
+- ((:file "middleware/auth/basic"))))
+- :in-order-to ((test-op (test-op "t-lack-middleware-auth-basic"))))
++ ((:file "middleware/auth/basic")))))
+
+ (register-system-packages "lack-middleware-auth-basic"
'(:lack.middleware.auth.basic))
+diff --git a/lack-middleware-backtrace.asd b/lack-middleware-backtrace.asd
+index 8df7f9f..cf73f81 100644
+--- a/lack-middleware-backtrace.asd
++++ b/lack-middleware-backtrace.asd
+@@ -3,7 +3,6 @@
+ :author "Eitaro Fukamachi"
+ :license "MIT"
+ :depends-on ("uiop")
+- :components ((:file "src/middleware/backtrace"))
+- :in-order-to ((test-op (test-op "t-lack-middleware-backtrace"))))
++ :components ((:file "src/middleware/backtrace")))
+
+ (register-system-packages "lack-middleware-backtrace"
'(:lack.middleware.backtrace))
+diff --git a/lack-middleware-csrf.asd b/lack-middleware-csrf.asd
+index 105d3bb..fcf46f7 100644
+--- a/lack-middleware-csrf.asd
++++ b/lack-middleware-csrf.asd
+@@ -6,7 +6,6 @@
+ "lack-util")
+ :components ((:module "src"
+ :components
+- ((:file "middleware/csrf"))))
+- :in-order-to ((test-op (test-op "t-lack-middleware-csrf"))))
++ ((:file "middleware/csrf")))))
+
+ (register-system-packages "lack-middleware-csrf" '(:lack.middleware.csrf))
+diff --git a/lack-middleware-session.asd b/lack-middleware-session.asd
+index 92b1568..bed4c89 100644
+--- a/lack-middleware-session.asd
++++ b/lack-middleware-session.asd
+@@ -19,7 +19,6 @@
+ :pathname "session"
+ :components
+ ((:file "state")
+- (:file "state/cookie"))))))
+- :in-order-to ((test-op (test-op "t-lack-middleware-session"))))
++ (:file "state/cookie")))))))
+
+ (register-system-packages "lack-middleware-session"
'(:lack.middleware.session))
+diff --git a/lack-middleware-static.asd b/lack-middleware-static.asd
+index a0ce627..107a386 100644
+--- a/lack-middleware-static.asd
++++ b/lack-middleware-static.asd
+@@ -7,7 +7,6 @@
+ "alexandria")
+ :components ((:module "src"
+ :components
+- ((:file "middleware/static"))))
+- :in-order-to ((test-op (test-op "t-lack-middleware-static"))))
++ ((:file "middleware/static")))))
+
+ (register-system-packages "lack-middleware-static" '(:lack.middleware.static))
+diff --git a/lack-request.asd b/lack-request.asd
+index 5efa05c..240b421 100644
+--- a/lack-request.asd
++++ b/lack-request.asd
+@@ -9,7 +9,6 @@
+ :components ((:module "src"
+ :components
+ ((:file "request" :depends-on ("media-type"))
+- (:file "media-type"))))
+- :in-order-to ((test-op (test-op "t-lack-request"))))
++ (:file "media-type")))))
+
+ (register-system-packages "lack-request" '(:lack.request))
+diff --git a/lack-session-store-dbi.asd b/lack-session-store-dbi.asd
+index 00e7d1e..825a96c 100644
+--- a/lack-session-store-dbi.asd
++++ b/lack-session-store-dbi.asd
+@@ -7,7 +7,6 @@
+ "marshal"
+ "trivial-utf-8"
+ "cl-base64")
+- :components ((:file "src/middleware/session/store/dbi"))
+- :in-order-to ((test-op (test-op "t-lack-session-store-dbi"))))
++ :components ((:file "src/middleware/session/store/dbi")))
+
+ (register-system-packages "lack-session-store-dbi" '(:lack.session.store.dbi))
+diff --git a/lack-session-store-redis.asd b/lack-session-store-redis.asd
+index 96b0504..57e4046 100644
+--- a/lack-session-store-redis.asd
++++ b/lack-session-store-redis.asd
+@@ -7,7 +7,6 @@
+ "marshal"
+ "cl-base64"
+ "trivial-utf-8")
+- :components ((:file "src/middleware/session/store/redis"))
+- :in-order-to ((test-op (test-op "t-lack-session-store-redis"))))
++ :components ((:file "src/middleware/session/store/redis")))
+
+ (register-system-packages "lack-session-store-redis"
'(:lack.session.store.redis))
+diff --git a/lack-util.asd b/lack-util.asd
+index 0391a1b..1318c04 100644
+--- a/lack-util.asd
++++ b/lack-util.asd
+@@ -5,7 +5,6 @@
+ :depends-on ((:feature (:or :windows :mswindows :win32 :cormanlisp)
"ironclad")
+ (:feature (:not (:or :windows :mswindows :win32 :cormanlisp))
"cl-isaac")
+ "bordeaux-threads")
+- :components ((:file "src/util"))
+- :in-order-to ((test-op (test-op "t-lack-util"))))
++ :components ((:file "src/util")))
+
+ (register-system-packages "lack-util" '(:lack.util))
+diff --git a/lack.asd b/lack.asd
+index e213c10..dde71cf 100644
+--- a/lack.asd
++++ b/lack.asd
+@@ -43,8 +43,6 @@
+ "lack/middleware/auth/basic"
+ "lack/session/store/redis"
+ "lack/session/store/dbi"
+- "clack"
+- "clack-test"
+ "hunchentoot"
+ "dexador"
+ "cl-cookie"
+@@ -60,7 +58,6 @@
+ :serial t
+ :components ((:file "builder")
+ (:file "util")
+- (:file "request")
+ (:file "component")
+ (:file "media-type")
+ (:module "middleware"
+diff --git a/tests/request.lisp b/tests/request.lisp
+deleted file mode 100644
+index 3fd26e0..0000000
+--- a/tests/request.lisp
++++ /dev/null
+@@ -1,71 +0,0 @@
+-(defpackage #:lack/tests/request
+- (:use #:cl
+- #:rove
+- #:lack/request
+- #:clack.test
+- #:flexi-streams)
+- (:import-from #:dexador)
+- (:import-from #:alexandria
+- #:alist-hash-table))
+-(in-package #:lack/tests/request)
+-
+-(defparameter *request*
+- (make-request `(:content-type "application/x-www-form-urlencoded;
charset=utf-8"
+- :content-length 20
+- :uri-scheme :http
+- :query-string "ediweitz=weitzedi&name=eitaro&q=C%2B%2B"
+- :raw-body
+- ,(flex:make-flexi-stream
+- (flex:make-in-memory-input-stream
+- #(110 97 109 101 61 230 183 177 231 148 186 232 139 177
229 164 170 233 131 142))
+- :external-format :utf-8)
+- :headers ,(alexandria:alist-hash-table
+- '(("referer" .
"http://github.com/fukamachi/clack")
+- ("user-agent" . "Mozilla/5.0 (Macintosh; U;
Intel Mac OS X 10_6_6; en-US)")
+- ("accept" . "text/html")
+- ("cookie" . "hoge=1;fuga=semi;colon"))
+- :test 'equal))))
+-
+-(deftest lack-request
+- (ok (typep *request* 'request))
+-
+- (ok (request-env *request*) "request-env")
+-
+- (ok (equal (request-content-type *request*)
"application/x-www-form-urlencoded; charset=utf-8")
+- "request-content-type")
+-
+- (ok (equalp (request-query-parameters *request*)
+- '(("ediweitz" . "weitzedi") ("name" . "eitaro") ("q" . "C++")))
+- "request-query-parameters")
+-
+- (ok (equalp (request-body-parameters *request*)
+- `(("name" . ,(flex:octets-to-string
+- #(230 183 177 231 148 186 232 139 177 229 164 170
233 131 142)
+- :external-format :utf-8))))
+- "request-body-parameters")
+-
+- (ok (equalp (request-cookies *request*)
+- '(("hoge" . "1") ("fuga" . "semi") ("colon")))
+- "request-cookies")
+-
+- (ok (request-accepts-p *request* "text/html"))
+-
+- (ng (request-accepts-p *request* "application/json"))
+-
+- (testing-app "make-request"
+- (lambda (env)
+- (make-request env)
+- `(200 nil (,(third (assoc "file" (request-body-parameters
(make-request env)) :test #'string=)))))
+- (multiple-value-bind (body status)
+- (dex:post (localhost)
+- :content
+- `(("file" . ,(asdf:system-relative-pathname :lack
#P"data/jellyfish.jpg"))))
+- (ok (eql status 200))
+- (ok (equal body "jellyfish.jpg")))
+-
+- (multiple-value-bind (body status)
+- (dex:post (localhost)
+- :content
+- `(("file" . ,(asdf:system-relative-pathname :lack
#P"data/jellyfish.jpg"))))
+- (ok (eql status 200))
+- (ok (equal body "jellyfish.jpg")))))