Skip to Content.
Sympa Menu

sm-commit - [[SM-Commit] ] GIT changes to master grimoire by Pavel Vinogradov (d7ad128c8a172d9574881e44fcc392a98373b91f)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Pavel Vinogradov <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org, sm-commit AT lists.sourcemage.org
  • Subject: [[SM-Commit] ] GIT changes to master grimoire by Pavel Vinogradov (d7ad128c8a172d9574881e44fcc392a98373b91f)
  • Date: Tue, 8 Oct 2024 03:44:08 +0000

GIT changes to master grimoire by Pavel Vinogradov <public AT sourcemage.org>:

devel/python3/BUILD | 6
devel/python3/DETAILS | 4
devel/python3/HISTORY | 6
devel/python3/PREPARE | 1
devel/python3/patches-3.13/0001-Fix-build-against-LibreSSL.patch | 114
++++++++++
devel/python3/patches-3.13/disable-compileall.patch | 20 +
devel/python3/patches-3.13/makefile.patch | 12 +
7 files changed, 160 insertions(+), 3 deletions(-)

New commits:
commit d7ad128c8a172d9574881e44fcc392a98373b91f
Author: Pavel Vinogradov <public AT sourcemage.org>
Commit: Pavel Vinogradov <public AT sourcemage.org>

devel/python3: version 3.13.0

diff --git a/devel/python3/BUILD b/devel/python3/BUILD
index 613b8d0..b560422 100755
--- a/devel/python3/BUILD
+++ b/devel/python3/BUILD
@@ -1,7 +1,11 @@
OPTS="--enable-shared $PYTHON3_OPTS $OPTS" &&
OPTS="--with-ensurepip=no $OPTS" &&

-OPTS+=" --enable-optimizations" &&
+# Optimizations buildcfails for 3.13
+if [[ "${PYTHON3_BRANCH}" != "devel" &&
+ "${PYTHON3_BRANCH}" != "3.13" ]]; then
+ OPTS+=" --enable-optimizations"
+fi &&
OPTS+=" --with-lto" &&
OPTS+=" --with-computed-gotos" &&

diff --git a/devel/python3/DETAILS b/devel/python3/DETAILS
index 22e7314..b6de054 100755
--- a/devel/python3/DETAILS
+++ b/devel/python3/DETAILS
@@ -1,9 +1,11 @@
SPELL=python3
case "$PYTHON3_BRANCH" in
devel| \
+ 3.13)
+ VERSION=3.13.0 ;;
+ stable| \
3.12)
VERSION=3.12.7 ;;
- stable| \
3.11)
VERSION=3.11.10 ;;
3.10)
diff --git a/devel/python3/HISTORY b/devel/python3/HISTORY
index 4ae1b83..99733f1 100644
--- a/devel/python3/HISTORY
+++ b/devel/python3/HISTORY
@@ -1,3 +1,7 @@
+2024-10-07 Pavel Vinogradov <public AT sourcemage.org>
+ * DETAILS, PREPARE, patches-3.13/*: version 3.13.0
+ * BUILD: disabled optimizations for 3.13 branch
+
2024-10-02 Pavel Vinogradov <public AT sourcemage.org>
* DETAILS: version 3.12.7

@@ -53,7 +57,7 @@
* UP_TRIGGERS: fix for upgrades from 3.10 on

2023-10-02 Pavel Vinogradov <public AT sourcemage.org>
- * DETAILS, PREPARE, patches-3.11/*: versions 3.12.0/3.11.6
+ * DETAILS, PREPARE, patches-3.12/*: versions 3.12.0/3.11.6
* python.gpg: added new key, A821E680E5FA6305, Thomas Wouters
<thomas AT xs4all.nl>

2023-08-24 Pavel Vinogradov <public AT sourcemage.org>
diff --git a/devel/python3/PREPARE b/devel/python3/PREPARE
index c0b4023..73b342c 100755
--- a/devel/python3/PREPARE
+++ b/devel/python3/PREPARE
@@ -2,6 +2,7 @@
prepare_select_branch \
stable \
devel \
+ 3.13 \
3.12 \
3.11 \
3.10 \
diff --git a/devel/python3/patches-3.13/0001-Fix-build-against-LibreSSL.patch
b/devel/python3/patches-3.13/0001-Fix-build-against-LibreSSL.patch
new file mode 100644
index 0000000..bc139c7
--- /dev/null
+++ b/devel/python3/patches-3.13/0001-Fix-build-against-LibreSSL.patch
@@ -0,0 +1,114 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Ismael Luceno <ismael AT iodev.co.uk>
+Subject: Fix build against LibreSSL
+Date: Thu, 15 Sep 2022 22:10:54 +0200
+
+Based on patches from OpenBSD.
+
+Origin: OpenBSD
+Upstream-Status: Inappropriate
+Signed-off-by: Ismael Luceno <ismael AT sourcemage.org>
+
+---
+ Modules/_hashopenssl.c | 9 ++++++++-
+ Modules/_ssl.c | 10 +++++++++-
+ configure | 2 ++
+ 3 files changed, 19 insertions(+), 2 deletions(-)
+
+--- a/Modules/_hashopenssl.c
++++ b/Modules/_hashopenssl.c
+@@ -44,6 +44,7 @@
+
+ #define MUNCH_SIZE INT_MAX
+
++#if !defined(LIBRESSL_VERSION_NUMBER)
+ #define PY_OPENSSL_HAS_SCRYPT 1
+ #if defined(NID_sha3_224) && defined(NID_sha3_256) && defined(NID_sha3_384)
&& defined(NID_sha3_512)
+ #define PY_OPENSSL_HAS_SHA3 1
+@@ -54,6 +55,7 @@
+ #if defined(NID_blake2s256) || defined(NID_blake2b512)
+ #define PY_OPENSSL_HAS_BLAKE2 1
+ #endif
++#endif
+
+ #if OPENSSL_VERSION_NUMBER >= 0x30000000L
+ #define PY_EVP_MD EVP_MD
+@@ -147,6 +149,7 @@ static const py_hashentry_t py_hashes[] = {
+ PY_HASH_ENTRY(Py_hash_sha256, "SHA256", SN_sha256, NID_sha256),
+ PY_HASH_ENTRY(Py_hash_sha384, "SHA384", SN_sha384, NID_sha384),
+ PY_HASH_ENTRY(Py_hash_sha512, "SHA512", SN_sha512, NID_sha512),
++#if !defined(LIBRESSL_VERSION_NUMBER)
+ /* truncated sha2 */
+ #ifdef Py_hash_sha512_224
+ PY_HASH_ENTRY(Py_hash_sha512_224, "SHA512_224", SN_sha512_224,
NID_sha512_224),
+@@ -180,6 +183,7 @@ static const py_hashentry_t py_hashes[] = {
+ #endif
+ #ifdef Py_hash_blake2b
+ PY_HASH_ENTRY(Py_hash_blake2b, "blake2b512", SN_blake2b512,
NID_blake2b512),
++#endif
+ #endif
+ PY_HASH_ENTRY(NULL, NULL, NULL, 0),
+ };
+@@ -873,9 +870,12 @@ py_evp_fromname(PyObject *module, const char *digestna
+ goto exit;
+ }
+
++#if !defined(LIBRESSL_VERSION_NUMBER)
+ if ((EVP_MD_flags(digest) & EVP_MD_FLAG_XOF) == EVP_MD_FLAG_XOF) {
+ type = get_hashlib_state(module)->EVPXOFtype;
+- } else {
++ } else
++#endif
++ {
+ type = get_hashlib_state(module)->EVPtype;
+ }
+
+--- a/Modules/_ssl.c
++++ b/Modules/_ssl.c
+@@ -169,7 +169,11 @@ extern const SSL_METHOD *TLSv1_2_method(void);
+ * Based on Hynek's excellent blog post (update 2021-02-11)
+ * https://hynek.me/articles/hardening-your-web-servers-ssl-ciphers/
+ */
++ #if defined(LIBRESSL_VERSION_NUMBER) && (LIBRESSL_VERSION_NUMBER <=
0x3050300fL)
++ #define PY_SSL_DEFAULT_CIPHER_STRING
"ECDH+AESGCM:ECDH+CHACHA20:ECDH+AES:DHE+AES:!aNULL:!eNULL:!aDSS:!SHA1:!AESCCM"
++ #else
+ #define PY_SSL_DEFAULT_CIPHER_STRING
"@SECLEVEL=2:ECDH+AESGCM:ECDH+CHACHA20:ECDH+AES:DHE+AES:!aNULL:!eNULL:!aDSS:!SHA1:!AESCCM"
++ #endif
+ #ifndef PY_SSL_MIN_PROTOCOL
+ #define PY_SSL_MIN_PROTOCOL TLS1_2_VERSION
+ #endif
+@@ -3579,6 +3579,10 @@ set_num_tickets(PySSLContext *self, PyObject *arg, voi
+ PyDoc_STRVAR(PySSLContext_num_tickets_doc,
+ "Control the number of TLSv1.3 session tickets");
+ #endif /* TLS1_3_VERSION */
++
++#if defined(LIBRESSL_VERSION_NUMBER) && (LIBRESSL_VERSION_NUMBER <=
0x3050300fL)
++static inline int SSL_CTX_get_security_level(const SSL_CTX *ctx) { return
1; }
++#endif
+
+ static PyObject *
+ get_security_level(PySSLContext *self, void *c)
+@@ -4541,7 +4541,7 @@ set_sni_callback(PySSLContext *self, PyObject *arg, vo
+ return 0;
+ }
+
+-#if OPENSSL_VERSION_NUMBER < 0x30300000L
++#if OPENSSL_VERSION_NUMBER < 0x30300000L &&
!defined(LIBRESSL_VERSION_NUMBER)
+ static X509_OBJECT *x509_object_dup(const X509_OBJECT *obj)
+ {
+ int ok;
+diff --git a/configure b/configure
+index b6f90bc..c71b68a 100755
+--- a/configure
++++ b/configure
+@@ -28265,8 +28265,10 @@ main (void)
+ OBJ_nid2sn(NID_md5);
+ OBJ_nid2sn(NID_sha1);
+ OBJ_nid2sn(NID_sha3_512);
++#if !defined(LIBRESSL_VERSION_NUMBER)
+ OBJ_nid2sn(NID_blake2b512);
+ EVP_PBE_scrypt(NULL, 0, NULL, 0, 2, 8, 1, 0, NULL, 0);
++#endif
+
+ ;
+ return 0;
diff --git a/devel/python3/patches-3.13/disable-compileall.patch
b/devel/python3/patches-3.13/disable-compileall.patch
new file mode 100644
index 0000000..50881ad
--- /dev/null
+++ b/devel/python3/patches-3.13/disable-compileall.patch
@@ -0,0 +1,20 @@
+diff --git a/Makefile.pre.in b/Makefile.pre.in
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -2575,16 +2575,6 @@ libinstall: all $(srcdir)/Modules/xxmodule.c
+ echo "Applying app store compliance patch"; \
+ patch --force --reject-file
"$(abs_builddir)/app-store-compliance.rej" --strip 2 --directory
"$(DESTDIR)$(LIBDEST)" --input "$(abs_srcdir)/$(APP_STORE_COMPLIANCE_PATCH)"
|| true ; \
+ fi
+- @ # Build PYC files for the 3 optimization levels (0, 1, 2)
+- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+- $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
+- -o 0 -o 1 -o 2 $(COMPILEALL_OPTS) -d $(LIBDEST) -f \
+- -x 'bad_coding|badsyntax|site-packages' \
+- $(DESTDIR)$(LIBDEST)
+- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+- $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
+- -o 0 -o 1 -o 2 $(COMPILEALL_OPTS) -d $(LIBDEST)/site-packages
-f \
+- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
+
+ # bpo-21536: Misc/python-config.sh is generated in the build directory
+ # from $(srcdir)Misc/python-config.sh.in.
diff --git a/devel/python3/patches-3.13/makefile.patch
b/devel/python3/patches-3.13/makefile.patch
new file mode 100644
index 0000000..65091a8
--- /dev/null
+++ b/devel/python3/patches-3.13/makefile.patch
@@ -0,0 +1,12 @@
+diff --git a/Makefile.pre.in b/Makefile.pre.in
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -1432,7 +1432,7 @@ regen-re: $(BUILDPYTHON)
+ $(RUNSHARED) ./$(BUILDPYTHON)
$(srcdir)/Tools/build/generate_re_casefix.py $(srcdir)/Lib/re/_casefix.py
+
+ Programs/_testembed: Programs/_testembed.o $(LINK_PYTHON_DEPS)
+- $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@
Programs/_testembed.o $(LINK_PYTHON_OBJS) $(LIBS) $(MODLIBS) $(SYSLIBS)
++ $(CC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/_testembed.o
$(LINK_PYTHON_OBJS) $(LIBS) $(MODLIBS) $(SYSLIBS)
+
+ ############################################################################
+ # "Bootstrap Python" used to run Programs/_freeze_module.py


  • [[SM-Commit] ] GIT changes to master grimoire by Pavel Vinogradov (d7ad128c8a172d9574881e44fcc392a98373b91f), Pavel Vinogradov, 10/07/2024

Archive powered by MHonArc 2.6.24.

Top of Page