summary refs log tree commit diff
path: root/gnu/packages/web.scm
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2021-03-05 22:56:40 +0000
committerChristopher Baines <mail@cbaines.net>2021-03-06 00:18:30 +0000
commita8448da0f4a090818104e64dd79f90b0e50d5e77 (patch)
tree494c58b4724f12cd9de0db9b0a7096de2b922c0f /gnu/packages/web.scm
parent4f4b749e75b38b8c08b4f67ef51c2c8740999e28 (diff)
parenta714af38d5d1046081524d859cde4cd8fd12a923 (diff)
downloadguix-a8448da0f4a090818104e64dd79f90b0e50d5e77.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/packages/web.scm')
-rw-r--r--gnu/packages/web.scm174
1 files changed, 100 insertions, 74 deletions
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index ed3bd65e82..b5cbec951a 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -48,6 +48,7 @@
 ;;; Copyright © 2020, 2021 Ryan Prior <rprior@protonmail.com>
 ;;; Copyright © 2020 Alexandru-Sergiu Marton <brown121407@posteo.ro>
 ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2021 Stefan Reichör <stefan@xsteve.at>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1479,7 +1480,7 @@ used to validate and fix HTML data.")
 (define-public esbuild
   (package
     (name "esbuild")
-    (version "0.8.43")
+    (version "0.8.51")
     (source
      (origin
        (method git-fetch)
@@ -1488,7 +1489,7 @@ used to validate and fix HTML data.")
              (commit (string-append "v" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "0ab8xpbh39nvrq1302qld692i4xy2mgynk6hjkwhlrziybj74njp"))
+        (base32 "1j4qza2chng3az1h1fh9zbhxh99q7bfrqbgppyyq5947svi8fvaz"))
        (modules '((guix build utils)))
        (snippet
         '(begin
@@ -4868,6 +4869,33 @@ little effort, and the program to do so is often shorter and simpler than
 you'd expect.")
     (license (list license:expat license:cc-by3.0))))
 
+(define-public pup
+  (let ((revision "1")
+        (commit "681d7bb639334bf485476f5872c5bdab10931f9a"))
+    (package
+      (name "pup")
+      (version (git-version "0.4.0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/ericchiang/pup")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "1hx1k0qlc1bq6gg5d4yprn4d7kvqzagg6mi5mvb39zdq6c4y17vr"))))
+      (build-system go-build-system)
+      (arguments
+       `(#:import-path "github.com/ericchiang/pup"))
+      (home-page "https://github.com/ericchiang/pup")
+      (synopsis "Parse HTML at the command line")
+      (description
+       "@command{pup} is a command line tool for processing HTML.  It reads
+from stdin, prints to stdout, and allows the user to filter parts of the page
+using CSS selectors.  Inspired by @command{jq}, @command{pup} aims to be a
+fast and flexible way of exploring HTML from the terminal.")
+      (license license:expat))))
+
 (define-public uhttpmock
   (package
     (name "uhttpmock")
@@ -5784,14 +5812,14 @@ tools like SSH (Secure Shell) to reach the outside world.")
 (define-public stunnel
   (package
   (name "stunnel")
-  (version "5.57")
+  (version "5.58")
   (source
     (origin
       (method url-fetch)
       (uri (string-append "https://www.stunnel.org/downloads/stunnel-"
                           version ".tar.gz"))
       (sha256
-       (base32 "1q8gc05fiz7w55ws0whwzb94ffjnhzfppf1mhz1hf671vmrvjnmg"))))
+       (base32 "0y9vjzjqi340vy6h321r1cskb7l6a4prr9d2ysixqzjpjv04rhfl"))))
   (build-system gnu-build-system)
   (native-inputs
    ;; For tests.
@@ -5818,6 +5846,8 @@ tools like SSH (Secure Shell) to reach the outside world.")
            (substitute* "tests/make_test"
              (("/bin/sh ")
               (string-append (which "sh") " ")))
+           ;; test requires networking
+           (delete-file "tests/recipes/055_socket_closed")
            #t)))))
   (home-page "https://www.stunnel.org")
   (synopsis "TLS proxy for clients or servers")
@@ -6133,78 +6163,74 @@ into your tests.  It automatically starts up a HTTP server in a separate thread
     (license license:expat)))
 
 (define-public http-parser
-  (package
-    (name "http-parser")
-    (version "2.9.4")
-    (home-page "https://github.com/nodejs/http-parser")
-    (source
-     (origin
-       (method git-fetch)
-       (uri (git-reference (url home-page)
-                           (commit (string-append "v" version))))
-       (sha256
-        (base32 "1vda4dp75pjf5fcph73sy0ifm3xrssrmf927qd1x8g3q46z0cv6c"))
-       (file-name (git-file-name name version))
-       (patches
-        (list
-         (origin
-           ;; Treat an empty port (e.g. `http://hostname:/`) when parsing
-           ;; URLs as if no port were specified.  This patch is applied
-           ;; to Fedora's http-parser and to libgit2's bundled version.
-           (method url-fetch)
-           (uri (string-append
-                 "https://src.fedoraproject.org/rpms/http-parser/raw/"
-                 "e89b4c4e2874c19079a5a1a2d2ccc61b551aa289/"
-                 "f/0001-url-treat-empty-port-as-default.patch"))
-           (sha256
-            (base32
-             "0pbxf2nq9pcn299k2b2ls8ldghaqln9glnp79gi57mamx4iy0f6g")))))))
-    (build-system gnu-build-system)
-    (arguments
-     `(#:test-target "test"
-       #:make-flags
-       (list (string-append "PREFIX="
-                            (assoc-ref %outputs "out"))
-             "library"
-             ,@(if (%current-target-system)
-                   '()
-                   '("CC=gcc")))
-       #:phases
-       (modify-phases %standard-phases
-         ,@(match (%current-system)
-             ("armhf-linux"
-              '((add-before 'check 'apply-assertion.patch
-                  (lambda* (#:key inputs #:allow-other-keys)
-                    (let ((patch (assoc-ref inputs "assertion.patch")))
-                      (invoke "patch" "-p1" "-i" patch)
-                      #t)))))
-             (_ '()))
-         ,@(if (%current-target-system)
-               '((replace 'configure
-                    (lambda* (#:key target #:allow-other-keys)
-                      (substitute* (find-files "." "Makefile")
-                        (("CC\\?=.*$")
-                         (string-append "CC=" target "-gcc\n"))
-                        (("AR\\?=.*$")
-                         (string-append "AR=" target "-ar\n")))
-                      #t)))
-               '((delete 'configure))))))
-    (native-inputs
-     `(,@(match (%current-system)
-           ("armhf-linux"
-            ;; A fix for <https://issues.guix.gnu.org/40604> which in turn
-            ;; breaks i686-linux builds.
-            `(("assertion.patch"
-               ,@(search-patches "http-parser-fix-assertion-on-armhf.patch"))))
-           (_ '()))))
-    (synopsis "HTTP request/response parser for C")
-    (description "This is a parser for HTTP messages written in C.  It parses
-both requests and responses.  The parser is designed to be used in
+  (let ((commit "ec8b5ee63f0e51191ea43bb0c6eac7bfbff3141d")
+        (revision "1"))
+    (package
+      (name "http-parser")
+      (version (git-version "2.9.4" revision commit))
+      (home-page "https://github.com/nodejs/http-parser")
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference (url home-page)
+                             (commit commit)))
+         (sha256
+          (base32 "0f297hrbx0kvy3qwgm9rhmbnjww6iljlcz9grsc9d4km1qj1071i"))
+         (file-name (git-file-name name version))
+         (patches
+          (append
+           (search-patches "http-parser-CVE-2020-8287.patch")
+           (list
+            (origin
+              ;; Treat an empty port (e.g. `http://hostname:/`) when parsing
+              ;; URLs as if no port were specified.  This patch is applied
+              ;; to Fedora's http-parser and to libgit2's bundled version.
+              (method url-fetch)
+              (uri (string-append
+                    "https://src.fedoraproject.org/rpms/http-parser/raw/"
+                    "e89b4c4e2874c19079a5a1a2d2ccc61b551aa289/"
+                    "f/0001-url-treat-empty-port-as-default.patch"))
+              (sha256
+               (base32
+                "0pbxf2nq9pcn299k2b2ls8ldghaqln9glnp79gi57mamx4iy0f6g"))))))
+         (modules '((guix build utils)))
+         (snippet
+          '(begin
+             ;; This assertion fails when building for i686-linux.
+             (substitute* "test.c"
+               (("assert\\(sizeof\\(http_parser\\) == 32\\);")
+                "assert(1);"))
+             #t))))
+      (build-system gnu-build-system)
+      (arguments
+       `(#:test-target "test"
+         #:make-flags
+         (list (string-append "PREFIX="
+                              (assoc-ref %outputs "out"))
+               "library"
+               ,@(if (%current-target-system)
+                     '()
+                     '("CC=gcc")))
+         #:phases
+         (modify-phases %standard-phases
+           ,@(if (%current-target-system)
+                 '((replace 'configure
+                     (lambda* (#:key target #:allow-other-keys)
+                       (substitute* (find-files "." "Makefile")
+                         (("CC\\?=.*$")
+                          (string-append "CC=" target "-gcc\n"))
+                         (("AR\\?=.*$")
+                          (string-append "AR=" target "-ar\n")))
+                       #t)))
+                 '((delete 'configure))))))
+      (synopsis "HTTP request/response parser for C")
+      (description "This is a parser for HTTP messages written in C.  It
+parses both requests and responses.  The parser is designed to be used in
 high-performance HTTP applications.  It does not make any syscalls nor
 allocations, it does not buffer data, it can be interrupted at anytime.
 Depending on your architecture, it only requires about 40 bytes of data per
 message stream (in a web server that is per connection).")
-    (license license:expat)))
+      (license license:expat))))
 
 (define-public python-httpretty
   (package
@@ -6548,14 +6574,14 @@ encoder/decoder based on the draft-12 specification for UBJSON.")
 (define-public java-tomcat
   (package
     (name "java-tomcat")
-    (version "8.5.53")
+    (version "8.5.63")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://apache/tomcat/tomcat-8/v"
                                   version "/src/apache-tomcat-" version "-src.tar.gz"))
               (sha256
                (base32
-                "15lwq3clf21hzk7mma70sffpxjqn8ww5mjq6zhmwcp4m17m22z26"))
+                "1wr6mpgbk2gs18vp8mdggiq6vifj68a875dd1fkdf7cs31q54rns"))
               (modules '((guix build utils)))
               ;; Delete bundled jars.
               (snippet