gnu: http-parser: Fix build [and guix pull] on armhf-linux.
* gnu/packages/web.scm (http-parser)[source]: Add patch. * gnu/packages/patches/http-parser-fix-assertion-on-armhf.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it.master
parent
47253d4837
commit
5c30eb61d7
|
@ -1081,6 +1081,7 @@ dist_patch_DATA = \
|
||||||
%D%/packages/patches/hdf-eos5-remove-gctp.patch \
|
%D%/packages/patches/hdf-eos5-remove-gctp.patch \
|
||||||
%D%/packages/patches/hdf-eos5-fix-szip.patch \
|
%D%/packages/patches/hdf-eos5-fix-szip.patch \
|
||||||
%D%/packages/patches/hdf-eos5-fortrantests.patch \
|
%D%/packages/patches/hdf-eos5-fortrantests.patch \
|
||||||
|
%D%/packages/patches/http-parser-fix-assertion-on-armhf.patch \
|
||||||
%D%/packages/patches/hubbub-sort-entities.patch \
|
%D%/packages/patches/hubbub-sort-entities.patch \
|
||||||
%D%/packages/patches/hurd-cross.patch \
|
%D%/packages/patches/hurd-cross.patch \
|
||||||
%D%/packages/patches/hplip-remove-imageprocessor.patch \
|
%D%/packages/patches/hplip-remove-imageprocessor.patch \
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
From: Tobias Geerinckx-Rice <me@tobias.gr>
|
||||||
|
Date: Wed, 20 May 2020 19:17:13 +0200
|
||||||
|
Subject: [PATCH] gnu: http-client: Fix assertion on armhf-linux.
|
||||||
|
|
||||||
|
Copied verbatim from [0] to fix guix pull[1] on ARM systems.
|
||||||
|
|
||||||
|
[0]: https://github.com/nodejs/http-parser/pull/510
|
||||||
|
[1]: https://issues.guix.gnu.org/40604
|
||||||
|
|
||||||
|
From 0e5868aebb9eb92b078d27bb2774c2154dc167e2 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ben Noordhuis <info@bnoordhuis.nl>
|
||||||
|
Date: Thu, 30 Apr 2020 11:22:50 +0200
|
||||||
|
Subject: [PATCH] Fix sizeof(http_parser) assert
|
||||||
|
|
||||||
|
The result should be 32 on both 32 bits and 64 bits architectures
|
||||||
|
because of struct padding.
|
||||||
|
|
||||||
|
Fixes: https://github.com/nodejs/http-parser/issues/507
|
||||||
|
---
|
||||||
|
test.c | 5 ++++-
|
||||||
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/test.c b/test.c
|
||||||
|
index 7983424..f60a84f 100644
|
||||||
|
--- a/test.c
|
||||||
|
+++ b/test.c
|
||||||
|
@@ -4220,8 +4220,11 @@ main (void)
|
||||||
|
patch = version & 255;
|
||||||
|
printf("http_parser v%u.%u.%u (0x%06lx)\n", major, minor, patch, version);
|
||||||
|
|
||||||
|
+ /* Should be 32 on both 32 bits and 64 bits architectures because of
|
||||||
|
+ * struct padding, see https://github.com/nodejs/http-parser/issues/507.
|
||||||
|
+ */
|
||||||
|
printf("sizeof(http_parser) = %u\n", (unsigned int)sizeof(http_parser));
|
||||||
|
- assert(sizeof(http_parser) == 4 + 4 + 8 + 2 + 2 + 4 + sizeof(void *));
|
||||||
|
+ assert(sizeof(http_parser) == 32);
|
||||||
|
|
||||||
|
//// API
|
||||||
|
test_preserve_data();
|
|
@ -5917,24 +5917,26 @@ into your tests. It automatically starts up a HTTP server in a separate thread
|
||||||
(method git-fetch)
|
(method git-fetch)
|
||||||
(uri (git-reference (url home-page)
|
(uri (git-reference (url home-page)
|
||||||
(commit (string-append "v" version))))
|
(commit (string-append "v" version))))
|
||||||
(file-name (git-file-name name version))
|
|
||||||
(patches
|
|
||||||
;; When parsing URLs, treat an empty port (eg
|
|
||||||
;; `http://hostname:/`) as if it were unspecified. This patch is
|
|
||||||
;; applied to Fedora's http-parser and to libgit2's bundled version.
|
|
||||||
(list
|
|
||||||
(origin
|
|
||||||
(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")))))
|
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"1vda4dp75pjf5fcph73sy0ifm3xrssrmf927qd1x8g3q46z0cv6c"))))
|
"1vda4dp75pjf5fcph73sy0ifm3xrssrmf927qd1x8g3q46z0cv6c"))
|
||||||
|
(file-name (git-file-name name version))
|
||||||
|
(patches
|
||||||
|
(cons*
|
||||||
|
(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")))
|
||||||
|
;; A fix for <https://issues.guix.gnu.org/40604>.
|
||||||
|
(search-patches "http-parser-fix-assertion-on-armhf.patch")))))
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:test-target "test"
|
`(#:test-target "test"
|
||||||
|
|
Reference in New Issue