[packages/curl-impersonate] - rel 3, x32 - fix utterly stupid and outdated getrandom syscall check in boringssl

baggins baggins at pld-linux.org
Sun Jun 7 13:54:50 CEST 2026


commit 0ff577f494351da709a01c4f88bede223de10c0c
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sun Jun 7 13:53:59 2026 +0200

    - rel 3, x32 - fix utterly stupid and outdated getrandom syscall check in boringssl

 boringssl-x32.patch   | 14 ++++++++++++++
 curl-impersonate.spec |  9 +++++----
 x32.patch             | 11 +++++++++++
 3 files changed, 30 insertions(+), 4 deletions(-)
---
diff --git a/curl-impersonate.spec b/curl-impersonate.spec
index fb6f0fc..6ab006c 100644
--- a/curl-impersonate.spec
+++ b/curl-impersonate.spec
@@ -15,7 +15,7 @@ Summary:	curl that impersonates real browser TLS/HTTP fingerprints
 Summary(pl.UTF-8):	curl podszywający się pod odciski TLS/HTTP prawdziwych przeglądarek
 Name:		curl-impersonate
 Version:	1.5.6
-Release:	2
+Release:	3
 License:	MIT (curl-impersonate, curl, nghttp2/3, ngtcp2), BoringSSL
 Group:		Applications/Networking
 URL:		https://github.com/lexiforest/curl-impersonate
@@ -31,7 +31,9 @@ Source4:	https://github.com/ngtcp2/ngtcp2/releases/download/v%{ngtcp2_version}/n
 # Source4-md5:	15881f426f0236956f52b3def11eb9a9
 Source5:	https://github.com/ngtcp2/nghttp3/releases/download/v%{nghttp3_version}/nghttp3-%{nghttp3_version}.tar.bz2
 # Source5-md5:	b1fd62a123652b878efb23fb34a8d5e0
+Source6:	boringssl-x32.patch
 Patch0:		%{name}-build.patch
+Patch1:		x32.patch
 BuildRequires:	autoconf
 BuildRequires:	automake
 BuildRequires:	cmake >= 3.5
@@ -44,9 +46,6 @@ BuildRequires:	pkgconfig
 BuildRequires:	unzip
 BuildRequires:	zlib-devel
 BuildRequires:	zstd-devel
-# BoringSSL does not support the x32 ABI - it has no getrandom syscall number
-# for it and its #error aborts the build.
-ExcludeArch:	x32
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -98,10 +97,12 @@ kolidowały ze standardowym pakietem curl-devel.
 %prep
 %setup -q
 %patch -P0 -p1
+%patch -P1 -p1
 
 # Place the pinned dependency archives where upstream's Makefile expects them,
 # so the network-isolated build uses them instead of downloading.
 cp -p %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} .
+cp -p %{SOURCE6} patches/
 
 %build
 %configure
diff --git a/boringssl-x32.patch b/boringssl-x32.patch
new file mode 100644
index 0000000..de110eb
--- /dev/null
+++ b/boringssl-x32.patch
@@ -0,0 +1,14 @@
+--- boringssl-673e61fc215b178a90c0e67858bbf162c8158993/crypto/rand/getrandom_fillin.h~	2025-03-01 00:12:34.000000000 +0100
++++ boringssl-673e61fc215b178a90c0e67858bbf162c8158993/crypto/rand/getrandom_fillin.h	2026-06-07 13:39:55.581941346 +0200
+@@ -23,7 +23,11 @@
+ #include <sys/syscall.h>
+ 
+ #if defined(OPENSSL_X86_64)
++#if defined(__ILP32__)
++#define EXPECTED_NR_getrandom (__X32_SYSCALL_BIT + 318)
++#else
+ #define EXPECTED_NR_getrandom 318
++#endif
+ #elif defined(OPENSSL_X86)
+ #define EXPECTED_NR_getrandom 355
+ #elif defined(OPENSSL_AARCH64)
diff --git a/x32.patch b/x32.patch
new file mode 100644
index 0000000..6d916a3
--- /dev/null
+++ b/x32.patch
@@ -0,0 +1,11 @@
+--- curl-impersonate-1.5.6/Makefile.in~	2026-06-07 13:45:26.000000000 +0200
++++ curl-impersonate-1.5.6/Makefile.in	2026-06-07 13:47:55.373899911 +0200
+@@ -246,7 +246,7 @@
+ 		-o boringssl-$(BORING_SSL_COMMIT).zip
+ 
+ # Patch boringssl and use a dummy '.patched' file to mark it patched
+-boringssl-$(BORING_SSL_COMMIT)/.patched: $(srcdir)/patches/boringssl.patch
++boringssl-$(BORING_SSL_COMMIT)/.patched: $(srcdir)/patches/boringssl.patch $(srcdir)/patches/boringssl-x32.patch
+ 	unzip -q -o boringssl-$(BORING_SSL_COMMIT).zip
+ 	# mv boringssl boringssl-$(BORING_SSL_COMMIT)
+ 	cd boringssl-$(BORING_SSL_COMMIT)/
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/curl-impersonate.git/commitdiff/0ff577f494351da709a01c4f88bede223de10c0c



More information about the pld-cvs-commit mailing list