commit 6fec7d8
hovercats
·
2024-01-17 01:53:58 +0000 UTC
parent ded9c0a
repo: add additional packages towards tinyx. this includes libressl and python. libressl should be built by oasis' buildsystem later. but this will do for now.
40 files changed,
+657,
-1
+15,
-0
1@@ -0,0 +1,15 @@
2+#!/bin/sh -e
3+
4+./configure \
5+ --prefix=/ \
6+ --without-xmlwf \
7+ --without-examples \
8+ --without-tests \
9+ --without-docbook \
10+ --disable-shared
11+
12+make
13+make DESTDIR="$1" install
14+
15+# Remove documentation (Changelogs, etc).
16+rm -rf "${1:?}/share"
+1,
-0
1@@ -0,0 +1 @@
2+18d93b87b4e3d996de0c93b383027ace0aef25bb0f28177138953961b6e8920f7e
+1,
-0
1@@ -0,0 +1 @@
2+https://github.com/libexpat/libexpat/releases/download/R_2_5_0/expat-2.5.0.tar.bz2
+1,
-0
1@@ -0,0 +1 @@
2+2.5.0 1
+35,
-0
1@@ -0,0 +1,35 @@
2+#!/bin/sh -e
3+
4+export DESTDIR="$1"
5+
6+TMPDIR="$1/tmp"
7+
8+./configure \
9+ --prefix=/ \
10+ --sysconfdir=/etc \
11+ --mandir=/share/man \
12+ --localstatedir=/var \
13+ --without-xmlto \
14+ --disable-specs \
15+ --disable-shared
16+
17+make
18+make install
19+
20+# Some X11 packages install to /share.
21+! [ -d "$1/share/pkgconfig" ] || {
22+ mkdir -p "$1/lib"
23+ mv -f "$1/share/pkgconfig" "$1/lib"
24+}
25+
26+# We need to keep this around.
27+! [ -d "$1/share/aclocal" ] || {
28+ mkdir -p "$TMPDIR"
29+ mv -f "$1/share/aclocal" "$TMPDIR"
30+}
31+
32+# Restore kept directories.
33+! [ -d "$TMPDIR" ] || {
34+ mv -f "$TMPDIR/"* "$1/share"
35+ rm -rf "$TMPDIR"
36+}
+1,
-0
1@@ -0,0 +1 @@
2+a846a256114ec70661a45a263bad1cc7229f1bcf4b195c2cfe086449e65cdeb228
+2,
-0
1@@ -0,0 +1,2 @@
2+pkgconf make
3+xorgproto make
+1,
-0
1@@ -0,0 +1 @@
2+https://x.org/releases/individual/lib/libXau-1.0.11.tar.gz
+1,
-0
1@@ -0,0 +1 @@
2+1.0.11 1
+0,
-1
1@@ -1 +0,0 @@
2-https://x.org/releases/individual/lib/PACKAGE-VERSION.tar.gz
+10,
-0
1@@ -0,0 +1,10 @@
2+#!/bin/sh -e
3+
4+./configure \
5+ --prefix=/ \
6+ --disable-exec-static-tramp \
7+ --disable-shared \
8+ --enable-static
9+
10+make
11+make DESTDIR="$1" install
+1,
-0
1@@ -0,0 +1 @@
2+42abcee37cdbf72c9c749f5cce8dc2fea0257a6a4e4776ba310ee8bdaf6e36ed2d
+1,
-0
1@@ -0,0 +1 @@
2+https://github.com/libffi/libffi/releases/download/v3.4.4/libffi-3.4.4.tar.gz
+1,
-0
1@@ -0,0 +1 @@
2+3.4.4 1
+9,
-0
1@@ -0,0 +1,9 @@
2+#!/bin/sh -e
3+
4+./configure \
5+ --prefix=/ \
6+ --with-fontrootdir=/share/fonts/X11 \
7+ --disable-shared
8+
9+make
10+make DESTDIR="$1" install
+1,
-0
1@@ -0,0 +1 @@
2+d8fe99b80ca3d0189e565da8a7f351773646822bf7a0c46212f56227e8ee3f5fbe
+3,
-0
1@@ -0,0 +1,3 @@
2+pkgconf make
3+xorgproto make
4+zlib
+1,
-0
1@@ -0,0 +1 @@
2+https://x.org/releases/individual/lib/libfontenc-1.1.7.tar.gz
+1,
-0
1@@ -0,0 +1 @@
2+1.1.7 1
+13,
-0
1@@ -0,0 +1,13 @@
2+#!/bin/sh -e
3+
4+./configure \
5+ PROG_LDADD=-all-static \
6+ --prefix=/ \
7+ --sysconfdir=/etc \
8+ --disable-tests
9+
10+make
11+make DESTDIR="$1" install
12+
13+# Certs is provided elsewhere
14+rm -rf "$1/etc/ssl"
+1,
-0
1@@ -0,0 +1 @@
2+1b867b5c7653fcb9075b45c85ea34595493da153c5a4f1cdf258bddbb91292270c
+1,
-0
1@@ -0,0 +1 @@
2+https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-3.7.3.tar.gz
+1,
-0
1@@ -0,0 +1 @@
2+3.7.3 2
+48,
-0
1@@ -0,0 +1,48 @@
2+#!/bin/sh -e
3+
4+for p in *.patch; do
5+ patch -p1 < "$p"
6+done
7+
8+# Remove util-linux dependency among other things.
9+cat >> Modules/Setup <<EOF
10+*disabled*
11+_uuid nis ossaudiodev
12+EOF
13+
14+# Reported 20-27% performance improvements.
15+# See: "PythonNoSemanticInterpositionSpeedup"
16+export CFLAGS="$CFLAGS -fno-semantic-interposition"
17+export LDFLAGS="$LDFLAGS -fno-semantic-interposition"
18+
19+./configure \
20+ --prefix=/ \
21+ --enable-static \
22+ --with-system-expat \
23+ --with-system-ffi \
24+ --with-ensurepip=yes \
25+ --without-pymalloc \
26+ --with-builtin-hashlib-hashes="sha3,blake2,sha1,sha512,sha256,md5" \
27+ --with-ssl-default-suites="TLSv1.3:TLSv1.2+AEAD+ECDHE:TLSv1.2+AEAD+DHE" \
28+ ax_cv_c_float_words_bigendian=no
29+
30+make EXTRA_CFLAGS="$CFLAGS -DTHREAD_STACK_SIZE=0x100000"
31+make DESTDIR="$1" install
32+
33+ln -s python3 "$1/bin/python"
34+ln -s pip3 "$1/bin/pip"
35+
36+# Let's make some kind of effort to reduce the overall
37+# size of Python by removing a bunch of rarely used and
38+# otherwise useless components.
39+#
40+# This can't be done via ./configure as the build system
41+# doesn't give you this much control over the process.
42+{
43+ cd "$1/lib/python"*
44+ rm -rf test ./*/test ./*/tests
45+ rm -rf pydoc* idlelib turtle* config-*
46+
47+ cd "$1/bin"
48+ rm -f pydoc* idle*
49+}
+5,
-0
1@@ -0,0 +1,5 @@
2+47bb72ced6c29652399875b77b953ccda570f9d51ed966a27c680cd4428b9e7da1
3+585bc906f88516c85c6a7cda6fe52d4d5cb355bb79ff16bbad6dc19103d2097224
4+0af9d6cc044d43fbe3f98a316802e4a4cd6d35d3606a4c5b6d5c135da6342d316d
5+396477ecc3d3244653804674429e0013d6bc631fec52d2ef33d0d4546b681715df
6+c4b318c0f2cbcdc0da0c1ee452b78266ec10a9e0ed4a36d630a81d73853e31cb3c
+6,
-0
1@@ -0,0 +1,6 @@
2+#bzip2
3+expat
4+libffi
5+libressl
6+sqlite
7+#zlib
+403,
-0
1@@ -0,0 +1,403 @@
2+From 0d38c71b6b62373a329ebd9e1b4e3ccc37d64511 Mon Sep 17 00:00:00 2001
3+From: hovercats <hovercatswithlasereyes@protonmail.com>
4+Date: Tue, 1 Feb 2022 16:53:54 +0100
5+Subject: [PATCH] libressl patch
6+
7+---
8+ Modules/_hashopenssl.c | 4 +++
9+ Modules/_ssl.c | 58 +++++++++++++++++++++------------
10+ Modules/_ssl/debughelpers.c | 4 +++
11+ Modules/clinic/_hashopenssl.c.h | 10 +++++-
12+ Modules/clinic/_ssl.c.h | 28 ++++++++++++----
13+ 5 files changed, 77 insertions(+), 27 deletions(-)
14+
15+diff --git a/Modules/_hashopenssl.c b/Modules/_hashopenssl.c
16+index cb8460a..2c24526 100644
17+--- a/Modules/_hashopenssl.c
18++++ b/Modules/_hashopenssl.c
19+@@ -45,10 +45,12 @@
20+
21+ #define MUNCH_SIZE INT_MAX
22+
23++#ifndef LIBRESSL_VERSION_NUMBER
24+ #define PY_OPENSSL_HAS_SCRYPT 1
25+ #define PY_OPENSSL_HAS_SHA3 1
26+ #define PY_OPENSSL_HAS_SHAKE 1
27+ #define PY_OPENSSL_HAS_BLAKE2 1
28++#endif
29+
30+ #if OPENSSL_VERSION_NUMBER >= 0x30000000L
31+ #define PY_EVP_MD EVP_MD
32+@@ -1884,6 +1886,7 @@ hashlib_md_meth_names(PyObject *module)
33+ return 0;
34+ }
35+
36++#ifndef LIBRESSL_VERSION_NUMBER
37+ /*[clinic input]
38+ _hashlib.get_fips_mode -> int
39+
40+@@ -1921,6 +1924,7 @@ _hashlib_get_fips_mode_impl(PyObject *module)
41+ return result;
42+ #endif
43+ }
44++#endif
45+
46+
47+ static int
48+diff --git a/Modules/_ssl.c b/Modules/_ssl.c
49+index 6c63301..d8a70d5 100644
50+--- a/Modules/_ssl.c
51++++ b/Modules/_ssl.c
52+@@ -291,8 +291,10 @@ typedef struct {
53+ int post_handshake_auth;
54+ #endif
55+ PyObject *msg_cb;
56++#ifndef LIBRESSL_VERSION_NUMBER
57+ PyObject *keylog_filename;
58+ BIO *keylog_bio;
59++#endif
60+ /* Cached module state, also used in SSLSocket and SSLSession code. */
61+ _sslmodulestate *state;
62+ } PySSLContext;
63+@@ -1829,6 +1831,7 @@ _ssl__SSLSocket_getpeercert_impl(PySSLSocket *self, int binary_mode)
64+ return result;
65+ }
66+
67++#ifndef LIBRESSL_VERSION_NUMBER
68+ /*[clinic input]
69+ _ssl._SSLSocket.get_verified_chain
70+
71+@@ -1892,6 +1895,7 @@ _ssl__SSLSocket_get_unverified_chain_impl(PySSLSocket *self)
72+ }
73+ return retval;
74+ }
75++#endif
76+
77+ static PyObject *
78+ cipher_to_tuple(const SSL_CIPHER *cipher)
79+@@ -2298,8 +2302,7 @@ static PyObject *
80+ _ssl__SSLSocket_write_impl(PySSLSocket *self, Py_buffer *b)
81+ /*[clinic end generated code: output=aa7a6be5527358d8 input=77262d994fe5100a]*/
82+ {
83+- size_t count = 0;
84+- int retval;
85++ int len;
86+ int sockstate;
87+ _PySSLError err;
88+ int nonblocking;
89+@@ -2317,6 +2320,12 @@ _ssl__SSLSocket_write_impl(PySSLSocket *self, Py_buffer *b)
90+ Py_INCREF(sock);
91+ }
92+
93++ if (b->len > INT_MAX) {
94++ PyErr_Format(PyExc_OverflowError,
95++ "string longer than %d bytes", INT_MAX);
96++ goto error;
97++ }
98++
99+ if (sock != NULL) {
100+ /* just in case the blocking state of the socket has been changed */
101+ nonblocking = (sock->sock_timeout >= 0);
102+@@ -2346,8 +2355,8 @@ _ssl__SSLSocket_write_impl(PySSLSocket *self, Py_buffer *b)
103+
104+ do {
105+ PySSL_BEGIN_ALLOW_THREADS
106+- retval = SSL_write_ex(self->ssl, b->buf, (size_t)b->len, &count);
107+- err = _PySSL_errno(retval == 0, self->ssl, retval);
108++ len = SSL_write(self->ssl, b->buf, (int)b->len);
109++ err = _PySSL_errno(len <= 0, self->ssl, len);
110+ PySSL_END_ALLOW_THREADS
111+ self->err = err;
112+
113+@@ -2380,11 +2389,11 @@ _ssl__SSLSocket_write_impl(PySSLSocket *self, Py_buffer *b)
114+ err.ssl == SSL_ERROR_WANT_WRITE);
115+
116+ Py_XDECREF(sock);
117+- if (retval == 0)
118+- return PySSL_SetError(self, retval, __FILE__, __LINE__);
119++ if (len <= 0)
120++ return PySSL_SetError(self, len, __FILE__, __LINE__);
121+ if (PySSL_ChainExceptions(self) < 0)
122+ return NULL;
123+- return PyLong_FromSize_t(count);
124++ return PyLong_FromLong(len);
125+ error:
126+ Py_XDECREF(sock);
127+ PySSL_ChainExceptions(self);
128+@@ -2418,7 +2427,7 @@ _ssl__SSLSocket_pending_impl(PySSLSocket *self)
129+
130+ /*[clinic input]
131+ _ssl._SSLSocket.read
132+- size as len: Py_ssize_t
133++ size as len: int
134+ [
135+ buffer: Py_buffer(accept={rwbuffer})
136+ ]
137+@@ -2428,14 +2437,13 @@ Read up to size bytes from the SSL socket.
138+ [clinic start generated code]*/
139+
140+ static PyObject *
141+-_ssl__SSLSocket_read_impl(PySSLSocket *self, Py_ssize_t len,
142+- int group_right_1, Py_buffer *buffer)
143+-/*[clinic end generated code: output=49b16e6406023734 input=ec48bf622be1c4a1]*/
144++_ssl__SSLSocket_read_impl(PySSLSocket *self, int len, int group_right_1,
145++ Py_buffer *buffer)
146++/*[clinic end generated code: output=00097776cec2a0af input=ff157eb918d0905b]*/
147+ {
148+ PyObject *dest = NULL;
149+ char *mem;
150+- size_t count = 0;
151+- int retval;
152++ int count;
153+ int sockstate;
154+ _PySSLError err;
155+ int nonblocking;
156+@@ -2498,8 +2506,8 @@ _ssl__SSLSocket_read_impl(PySSLSocket *self, Py_ssize_t len,
157+
158+ do {
159+ PySSL_BEGIN_ALLOW_THREADS
160+- retval = SSL_read_ex(self->ssl, mem, (size_t)len, &count);
161+- err = _PySSL_errno(retval == 0, self->ssl, retval);
162++ count = SSL_read(self->ssl, mem, len);
163++ err = _PySSL_errno(count <= 0, self->ssl, count);
164+ PySSL_END_ALLOW_THREADS
165+ self->err = err;
166+
167+@@ -2532,8 +2540,8 @@ _ssl__SSLSocket_read_impl(PySSLSocket *self, Py_ssize_t len,
168+ } while (err.ssl == SSL_ERROR_WANT_READ ||
169+ err.ssl == SSL_ERROR_WANT_WRITE);
170+
171+- if (retval == 0) {
172+- PySSL_SetError(self, retval, __FILE__, __LINE__);
173++ if (count <= 0) {
174++ PySSL_SetError(self, count, __FILE__, __LINE__);
175+ goto error;
176+ }
177+ if (self->exc_type != NULL)
178+@@ -2546,7 +2554,7 @@ done:
179+ return dest;
180+ }
181+ else {
182+- return PyLong_FromSize_t(count);
183++ return PyLong_FromLong(count);
184+ }
185+
186+ error:
187+@@ -3062,8 +3070,10 @@ _ssl__SSLContext_impl(PyTypeObject *type, int proto_version)
188+ self->hostflags = X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS;
189+ self->protocol = proto_version;
190+ self->msg_cb = NULL;
191++#ifndef LIBRESSL_VERSION_NUMBER
192+ self->keylog_filename = NULL;
193+ self->keylog_bio = NULL;
194++#endif
195+ self->alpn_protocols = NULL;
196+ self->set_sni_cb = NULL;
197+ self->state = get_ssl_state(module);
198+@@ -3187,6 +3197,7 @@ context_clear(PySSLContext *self)
199+ {
200+ Py_CLEAR(self->set_sni_cb);
201+ Py_CLEAR(self->msg_cb);
202++#ifndef LIBRESSL_VERSION_NUMBER
203+ Py_CLEAR(self->keylog_filename);
204+ if (self->keylog_bio != NULL) {
205+ PySSL_BEGIN_ALLOW_THREADS
206+@@ -3194,6 +3205,7 @@ context_clear(PySSLContext *self)
207+ PySSL_END_ALLOW_THREADS
208+ self->keylog_bio = NULL;
209+ }
210++#endif
211+ return 0;
212+ }
213+
214+@@ -3535,7 +3547,7 @@ set_maximum_version(PySSLContext *self, PyObject *arg, void *c)
215+ return set_min_max_proto_version(self, arg, 1);
216+ }
217+
218+-#ifdef TLS1_3_VERSION
219++#if defined(TLS1_3_VERSION) && !defined(LIBRESSL_VERSION_NUMBER)
220+ static PyObject *
221+ get_num_tickets(PySSLContext *self, void *c)
222+ {
223+@@ -3568,12 +3580,14 @@ PyDoc_STRVAR(PySSLContext_num_tickets_doc,
224+ "Control the number of TLSv1.3 session tickets");
225+ #endif /* TLS1_3_VERSION */
226+
227++#ifndef LIBRESSL_VERSION_NUMBER
228+ static PyObject *
229+ get_security_level(PySSLContext *self, void *c)
230+ {
231+ return PyLong_FromLong(SSL_CTX_get_security_level(self->ctx));
232+ }
233+ PyDoc_STRVAR(PySSLContext_security_level_doc, "The current security level");
234++#endif
235+
236+ static PyObject *
237+ get_options(PySSLContext *self, void *c)
238+@@ -4603,13 +4617,15 @@ static PyGetSetDef context_getsetlist[] = {
239+ (setter) set_minimum_version, NULL},
240+ {"maximum_version", (getter) get_maximum_version,
241+ (setter) set_maximum_version, NULL},
242++#ifndef LIBRESSL_VERSION_NUMBER
243+ {"keylog_filename", (getter) _PySSLContext_get_keylog_filename,
244+ (setter) _PySSLContext_set_keylog_filename, NULL},
245++#endif
246+ {"_msg_callback", (getter) _PySSLContext_get_msg_callback,
247+ (setter) _PySSLContext_set_msg_callback, NULL},
248+ {"sni_callback", (getter) get_sni_callback,
249+ (setter) set_sni_callback, PySSLContext_sni_callback_doc},
250+-#ifdef TLS1_3_VERSION
251++#if defined(TLS1_3_VERSION) && !defined(LIBRESSL_VERSION_NUMBER)
252+ {"num_tickets", (getter) get_num_tickets,
253+ (setter) set_num_tickets, PySSLContext_num_tickets_doc},
254+ #endif
255+@@ -4628,8 +4644,10 @@ static PyGetSetDef context_getsetlist[] = {
256+ (setter) set_verify_flags, NULL},
257+ {"verify_mode", (getter) get_verify_mode,
258+ (setter) set_verify_mode, NULL},
259++#ifndef LIBRESSL_VERSION_NUMBER
260+ {"security_level", (getter) get_security_level,
261+ NULL, PySSLContext_security_level_doc},
262++#endif
263+ {NULL}, /* sentinel */
264+ };
265+
266+diff --git a/Modules/_ssl/debughelpers.c b/Modules/_ssl/debughelpers.c
267+index 03c125e..d992c5b 100644
268+--- a/Modules/_ssl/debughelpers.c
269++++ b/Modules/_ssl/debughelpers.c
270+@@ -114,6 +114,8 @@ _PySSLContext_set_msg_callback(PySSLContext *self, PyObject *arg, void *c) {
271+ return 0;
272+ }
273+
274++#ifndef LIBRESSL_VERSION_NUMBER
275++
276+ static void
277+ _PySSL_keylog_callback(const SSL *ssl, const char *line)
278+ {
279+@@ -217,3 +219,5 @@ _PySSLContext_set_keylog_filename(PySSLContext *self, PyObject *arg, void *c) {
280+ SSL_CTX_set_keylog_callback(self->ctx, _PySSL_keylog_callback);
281+ return 0;
282+ }
283++
284++#endif
285+diff --git a/Modules/clinic/_hashopenssl.c.h b/Modules/clinic/_hashopenssl.c.h
286+index de01489..c686edd 100644
287+--- a/Modules/clinic/_hashopenssl.c.h
288++++ b/Modules/clinic/_hashopenssl.c.h
289+@@ -1275,6 +1275,8 @@ _hashlib_HMAC_hexdigest(HMACobject *self, PyObject *Py_UNUSED(ignored))
290+ return _hashlib_HMAC_hexdigest_impl(self);
291+ }
292+
293++#if !defined(LIBRESSL_VERSION_NUMBER)
294++
295+ PyDoc_STRVAR(_hashlib_get_fips_mode__doc__,
296+ "get_fips_mode($module, /)\n"
297+ "--\n"
298+@@ -1310,6 +1312,8 @@ exit:
299+ return return_value;
300+ }
301+
302++#endif /* !defined(LIBRESSL_VERSION_NUMBER) */
303++
304+ PyDoc_STRVAR(_hashlib_compare_digest__doc__,
305+ "compare_digest($module, a, b, /)\n"
306+ "--\n"
307+@@ -1385,4 +1389,8 @@ exit:
308+ #ifndef _HASHLIB_SCRYPT_METHODDEF
309+ #define _HASHLIB_SCRYPT_METHODDEF
310+ #endif /* !defined(_HASHLIB_SCRYPT_METHODDEF) */
311+-/*[clinic end generated code: output=162369cb9d43f1cc input=a9049054013a1b77]*/
312++
313++#ifndef _HASHLIB_GET_FIPS_MODE_METHODDEF
314++ #define _HASHLIB_GET_FIPS_MODE_METHODDEF
315++#endif /* !defined(_HASHLIB_GET_FIPS_MODE_METHODDEF) */
316++/*[clinic end generated code: output=a110f274fb33395d input=a9049054013a1b77]*/
317+diff --git a/Modules/clinic/_ssl.c.h b/Modules/clinic/_ssl.c.h
318+index b59b129..f6bcd09 100644
319+--- a/Modules/clinic/_ssl.c.h
320++++ b/Modules/clinic/_ssl.c.h
321+@@ -88,6 +88,8 @@ exit:
322+ return return_value;
323+ }
324+
325++#if !defined(LIBRESSL_VERSION_NUMBER)
326++
327+ PyDoc_STRVAR(_ssl__SSLSocket_get_verified_chain__doc__,
328+ "get_verified_chain($self, /)\n"
329+ "--\n"
330+@@ -105,6 +107,10 @@ _ssl__SSLSocket_get_verified_chain(PySSLSocket *self, PyObject *Py_UNUSED(ignore
331+ return _ssl__SSLSocket_get_verified_chain_impl(self);
332+ }
333+
334++#endif /* !defined(LIBRESSL_VERSION_NUMBER) */
335++
336++#if !defined(LIBRESSL_VERSION_NUMBER)
337++
338+ PyDoc_STRVAR(_ssl__SSLSocket_get_unverified_chain__doc__,
339+ "get_unverified_chain($self, /)\n"
340+ "--\n"
341+@@ -122,6 +128,8 @@ _ssl__SSLSocket_get_unverified_chain(PySSLSocket *self, PyObject *Py_UNUSED(igno
342+ return _ssl__SSLSocket_get_unverified_chain_impl(self);
343+ }
344+
345++#endif /* !defined(LIBRESSL_VERSION_NUMBER) */
346++
347+ PyDoc_STRVAR(_ssl__SSLSocket_shared_ciphers__doc__,
348+ "shared_ciphers($self, /)\n"
349+ "--\n"
350+@@ -271,25 +279,25 @@ PyDoc_STRVAR(_ssl__SSLSocket_read__doc__,
351+ {"read", (PyCFunction)_ssl__SSLSocket_read, METH_VARARGS, _ssl__SSLSocket_read__doc__},
352+
353+ static PyObject *
354+-_ssl__SSLSocket_read_impl(PySSLSocket *self, Py_ssize_t len,
355+- int group_right_1, Py_buffer *buffer);
356++_ssl__SSLSocket_read_impl(PySSLSocket *self, int len, int group_right_1,
357++ Py_buffer *buffer);
358+
359+ static PyObject *
360+ _ssl__SSLSocket_read(PySSLSocket *self, PyObject *args)
361+ {
362+ PyObject *return_value = NULL;
363+- Py_ssize_t len;
364++ int len;
365+ int group_right_1 = 0;
366+ Py_buffer buffer = {NULL, NULL};
367+
368+ switch (PyTuple_GET_SIZE(args)) {
369+ case 1:
370+- if (!PyArg_ParseTuple(args, "n:read", &len)) {
371++ if (!PyArg_ParseTuple(args, "i:read", &len)) {
372+ goto exit;
373+ }
374+ break;
375+ case 2:
376+- if (!PyArg_ParseTuple(args, "nw*:read", &len, &buffer)) {
377++ if (!PyArg_ParseTuple(args, "iw*:read", &len, &buffer)) {
378+ goto exit;
379+ }
380+ group_right_1 = 1;
381+@@ -1351,6 +1359,14 @@ exit:
382+
383+ #endif /* defined(_MSC_VER) */
384+
385++#ifndef _SSL__SSLSOCKET_GET_VERIFIED_CHAIN_METHODDEF
386++ #define _SSL__SSLSOCKET_GET_VERIFIED_CHAIN_METHODDEF
387++#endif /* !defined(_SSL__SSLSOCKET_GET_VERIFIED_CHAIN_METHODDEF) */
388++
389++#ifndef _SSL__SSLSOCKET_GET_UNVERIFIED_CHAIN_METHODDEF
390++ #define _SSL__SSLSOCKET_GET_UNVERIFIED_CHAIN_METHODDEF
391++#endif /* !defined(_SSL__SSLSOCKET_GET_UNVERIFIED_CHAIN_METHODDEF) */
392++
393+ #ifndef _SSL_ENUM_CERTIFICATES_METHODDEF
394+ #define _SSL_ENUM_CERTIFICATES_METHODDEF
395+ #endif /* !defined(_SSL_ENUM_CERTIFICATES_METHODDEF) */
396+@@ -1358,4 +1374,4 @@ exit:
397+ #ifndef _SSL_ENUM_CRLS_METHODDEF
398+ #define _SSL_ENUM_CRLS_METHODDEF
399+ #endif /* !defined(_SSL_ENUM_CRLS_METHODDEF) */
400+-/*[clinic end generated code: output=5a7d7bf5cf8ee092 input=a9049054013a1b77]*/
401++/*[clinic end generated code: output=0e12e5e4ee2221b5 input=a9049054013a1b77]*/
402+--
403+2.35.1
404+
1@@ -0,0 +1,13 @@
2+diff --git a/Lib/ensurepip/__init__.py b/Lib/ensurepip/__init__.py
3+index f28ab11..6627189 100644
4+--- a/Lib/ensurepip/__init__.py
5++++ b/Lib/ensurepip/__init__.py
6+@@ -180,7 +180,7 @@ def _bootstrap(*, root=None, upgrade=False, user=False,
7+ additional_paths.append(filename)
8+
9+ # Construct the arguments to be passed to the pip command
10+- args = ["install", "--no-cache-dir", "--no-index", "--find-links", tmpdir]
11++ args = ["install", "-I", "--no-cache-dir", "--no-index", "--find-links", tmpdir]
12+ if root:
13+ args += ["--root", root]
14+ if upgrade:
1@@ -0,0 +1,16 @@
2+diff --git a/Lib/py_compile.py b/Lib/py_compile.py
3+index a81f493..e1328ed 100644
4+--- a/Lib/py_compile.py
5++++ b/Lib/py_compile.py
6+@@ -70,10 +70,7 @@ class PycInvalidationMode(enum.Enum):
7+
8+
9+ def _get_default_invalidation_mode():
10+- if os.environ.get('SOURCE_DATE_EPOCH'):
11+- return PycInvalidationMode.CHECKED_HASH
12+- else:
13+- return PycInvalidationMode.TIMESTAMP
14++ return PycInvalidationMode.CHECKED_HASH
15+
16+
17+ def compile(file, cfile=None, dfile=None, doraise=False, optimize=-1,
+5,
-0
1@@ -0,0 +1,5 @@
2+https://python.org/ftp/python/3.11.7/Python-3.11.7.tar.xz
3+https://bootstrap.pypa.io/get-pip.py
4+patches/libressl-support.patch
5+patches/python3-always-pip.patch
6+patches/python3-pyc-hash.patch
+1,
-0
1@@ -0,0 +1 @@
2+3.11.7 1
+17,
-0
1@@ -0,0 +1,17 @@
2+#!/bin/sh -e
3+
4+# Required by qt5 and possibly other software.
5+export CPPFLAGS="$CPPFLAGS -DSQLITE_ENABLE_COLUMN_METADATA"
6+
7+./configure \
8+ --prefix=/usr \
9+ --enable-threadsafe \
10+ --enable-dynamic-extensions \
11+ --enable-fts5 \
12+ --disable-shared \
13+ ac_cv_search_readline=no \
14+ CFLAGS="$CFLAGS -fPIE" \
15+ LDFLAGS="$LDFLAGS -static-pie"
16+
17+make
18+make DESTDIR="$1" install
+1,
-0
1@@ -0,0 +1 @@
2+f30d304d0752b3b791462525bdee571087cbf3fee163e8cc5f0959712b8697f23c
+1,
-0
1@@ -0,0 +1 @@
2+#zlib make
+1,
-0
1@@ -0,0 +1 @@
2+https://sqlite.org/2023/sqlite-autoconf-3440200.tar.gz
+1,
-0
1@@ -0,0 +1 @@
2+3.44.2 1
+34,
-0
1@@ -0,0 +1,34 @@
2+#!/bin/sh -e
3+
4+export DESTDIR="$1"
5+
6+TMPDIR="$1/tmp"
7+
8+./configure \
9+ --prefix=/ \
10+ --sysconfdir=/etc \
11+ --mandir=/share/man \
12+ --localstatedir=/var \
13+ --without-xmlto \
14+ --disable-specs
15+
16+make
17+make install
18+
19+# Some X11 packages install to /share.
20+! [ -d "$1/share/pkgconfig" ] || {
21+ mkdir -p "$1/lib"
22+ mv -f "$1/share/pkgconfig" "$1/lib"
23+}
24+
25+# We need to keep this around.
26+! [ -d "$1/share/aclocal" ] || {
27+ mkdir -p "$TMPDIR"
28+ mv -f "$1/share/aclocal" "$TMPDIR"
29+}
30+
31+# Restore kept directories.
32+! [ -d "$TMPDIR" ] || {
33+ mv -f "$TMPDIR/"* "$1/share"
34+ rm -rf "$TMPDIR"
35+}
+1,
-0
1@@ -0,0 +1 @@
2+cfd9960e84fba07349a897851e5e0ccd2b46bde9ba49a4d78ee78f427620c2f531
+1,
-0
1@@ -0,0 +1 @@
2+https://x.org/releases/individual/util/util-macros-1.20.0.tar.xz
+1,
-0
1@@ -0,0 +1 @@
2+1.20.0 1