Skip to Content.
Sympa Menu

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

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
  • Subject: [SM-Commit] GIT changes to master grimoire by Pavel Vinogradov (3b9a4ca23361b1bdc55f65d4671f87d255178dba)
  • Date: Mon, 24 Oct 2022 22:26:54 +0000

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

devel/python3/DETAILS | 8
devel/python3/HISTORY | 4
devel/python3/PREPARE | 1
devel/python3/patches-3.11/0001-Fix-build-against-LibreSSL.patch | 84
++++++++++
devel/python3/patches-3.11/disable-compileall.patch | 37 ++++
devel/python3/patches-3.11/makefile.patch | 21 ++
devel/python3/patches-3.11/obj.patch | 20 ++
7 files changed, 174 insertions(+), 1 deletion(-)

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

devel/python3: version 3.11.0 as devel

diff --git a/devel/python3/DETAILS b/devel/python3/DETAILS
index 92e12e6..f715035 100755
--- a/devel/python3/DETAILS
+++ b/devel/python3/DETAILS
@@ -1,6 +1,10 @@
SPELL=python3
case "$PYTHON3_BRANCH" in
devel| \
+ 3.11)
+ VERSION=3.11.0
+
SOURCE_HASH=sha512:314eef88ae0d68760f34d7a32f238fd2ecb27c50963baa7357c42ad8159026ec50229a0b31d83c39710a472904a06422afc082f9658a90a1dc83ccb74c08039d
+ ;;
stable| \
3.10)
VERSION=3.10.8 ;;
@@ -15,12 +19,14 @@ case "$PYTHON3_BRANCH" in
esac
SECURITY_PATCH=19
SOURCE=Python-$VERSION.tar.xz
- SOURCE2=$SOURCE.asc
SOURCE_DIRECTORY="$BUILD_DIRECTORY/Python-$VERSION"
SOURCE_URL[0]=https://www.python.org/ftp/python/$VERSION/$SOURCE
+if ! [[ "${PYTHON3_BRANCH}" =~ devel|3\.11 ]]; then
+ SOURCE2=$SOURCE.asc
SOURCE2_URL[0]=$SOURCE_URL.asc
SOURCE_GPG=python.gpg:$SOURCE2:UPSTREAM_KEY
SOURCE2_IGNORE=signature
+fi
WEB_SITE=https://www.python.org/
ENTERED=20081203
LICENSE[0]=PYTHON
diff --git a/devel/python3/HISTORY b/devel/python3/HISTORY
index c4fd266..831af44 100644
--- a/devel/python3/HISTORY
+++ b/devel/python3/HISTORY
@@ -1,3 +1,7 @@
+2022-10-24 Pavel Vinogradov <public AT sourcemage.org>
+ * DETAILS, PREPARE, patches-3.11/*: version 3.11.0 as devel, temporary
+ switched to hashsum source checking
+
2022-10-11 Pavel Vinogradov <public AT sourcemage.org>
* DETAILS: versions 3.10.8/3.9.15/3.8.15/3.7.15

diff --git a/devel/python3/PREPARE b/devel/python3/PREPARE
index 80ed04e..6f17290 100755
--- a/devel/python3/PREPARE
+++ b/devel/python3/PREPARE
@@ -2,6 +2,7 @@
prepare_select_branch \
stable \
devel \
+ 3.11 \
3.10 \
3.9 \
3.8 \
diff --git a/devel/python3/patches-3.11/0001-Fix-build-against-LibreSSL.patch
b/devel/python3/patches-3.11/0001-Fix-build-against-LibreSSL.patch
new file mode 100644
index 0000000..886919a
--- /dev/null
+++ b/devel/python3/patches-3.11/0001-Fix-build-against-LibreSSL.patch
@@ -0,0 +1,84 @@
+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.
+
+Upstream-Status: Inappropriate
+Signed-off-by: Ismael Luceno <ismael AT iodev.co.uk>
+---
+ Modules/_hashopenssl.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+--- a/Modules/_hashopenssl.c
++++ b/Modules/_hashopenssl.c
+@@ -45,11 +45,13 @@
+
+ #define MUNCH_SIZE INT_MAX
+
++#if !defined(LIBRESSL_VERSION_NUMBER)
+ #define PY_OPENSSL_HAS_SCRYPT 1
+ #define PY_OPENSSL_HAS_SHA3 1
+ #define PY_OPENSSL_HAS_SHAKE 1
+ #define PY_OPENSSL_HAS_BLAKE2 1
++#endif
+
+ #if OPENSSL_VERSION_NUMBER >= 0x30000000L
+ #define PY_EVP_MD EVP_MD
+ #define PY_EVP_MD_fetch(algorithm, properties) EVP_MD_fetch(NULL,
algorithm, properties)
+@@ -119,6 +114,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 */
+ PY_HASH_ENTRY(Py_hash_sha512_224, "SHA512_224", SN_sha512_224,
NID_sha512_224),
+ PY_HASH_ENTRY(Py_hash_sha512_256, "SHA512_256", SN_sha512_256,
NID_sha512_256),
+@@ -133,6 +129,7 @@ static const py_hashentry_t py_hashes[] = {
+ /* blake2 digest */
+ PY_HASH_ENTRY(Py_hash_blake2s, "blake2s256", SN_blake2s256,
NID_blake2s256),
+ PY_HASH_ENTRY(Py_hash_blake2b, "blake2b512", SN_blake2b512,
NID_blake2b512),
++#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)
diff --git a/devel/python3/patches-3.11/disable-compileall.patch
b/devel/python3/patches-3.11/disable-compileall.patch
new file mode 100644
index 0000000..4ef08d1
--- /dev/null
+++ b/devel/python3/patches-3.11/disable-compileall.patch
@@ -0,0 +1,37 @@
+diff --git a/Makefile.pre.in b/Makefile.pre.in
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -1456,33 +1456,6 @@
+ $(DESTDIR)$(LIBDEST)/distutils/tests ; \
+ fi
+ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+- $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
+- -j0 -d $(LIBDEST) -f \
+- -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
+- $(DESTDIR)$(LIBDEST)
+- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+- $(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py
\
+- -j0 -d $(LIBDEST) -f \
+- -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
+- $(DESTDIR)$(LIBDEST)
+- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+- $(PYTHON_FOR_BUILD) -Wi -OO
$(DESTDIR)$(LIBDEST)/compileall.py \
+- -j0 -d $(LIBDEST) -f \
+- -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
+- $(DESTDIR)$(LIBDEST)
+- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+- $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
+- -j0 -d $(LIBDEST)/site-packages -f \
+- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
+- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+- $(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py
\
+- -j0 -d $(LIBDEST)/site-packages -f \
+- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
+- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+- $(PYTHON_FOR_BUILD) -Wi -OO
$(DESTDIR)$(LIBDEST)/compileall.py \
+- -j0 -d $(LIBDEST)/site-packages -f \
+- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
+- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+ $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver
$(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
+ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+ $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver
$(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt
diff --git a/devel/python3/patches-3.11/makefile.patch
b/devel/python3/patches-3.11/makefile.patch
new file mode 100644
index 0000000..4569642
--- /dev/null
+++ b/devel/python3/patches-3.11/makefile.patch
@@ -0,0 +1,21 @@
+diff --git a/Makefile.pre.in b/Makefile.pre.in
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -961,7 +961,7 @@ regen-re: $(BUILDPYTHON)
+ $(RUNSHARED) ./$(BUILDPYTHON)
$(srcdir)/Tools/scripts/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 deepfreeze.py
+@@ -1253,7 +1253,7 @@ Programs/python.o: $(srcdir)/Programs/python.c
+ $(MAINCC) -c $(PY_CORE_CFLAGS) -o $@ $(srcdir)/Programs/python.c
+
+ Programs/_testembed.o: $(srcdir)/Programs/_testembed.c
Programs/test_frozenmain.h
+- $(MAINCC) -c $(PY_CORE_CFLAGS) -o $@ $(srcdir)/Programs/_testembed.c
++ $(CC) -c $(PY_CORE_CFLAGS) -o $@ $(srcdir)/Programs/_testembed.c
+
+ Modules/_sre/sre.o: $(srcdir)/Modules/_sre/sre.c
$(srcdir)/Modules/_sre/sre.h $(srcdir)/Modules/_sre/sre_constants.h
$(srcdir)/Modules/_sre/sre_lib.h
+
diff --git a/devel/python3/patches-3.11/obj.patch
b/devel/python3/patches-3.11/obj.patch
new file mode 100644
index 0000000..ad8c87f
--- /dev/null
+++ b/devel/python3/patches-3.11/obj.patch
@@ -0,0 +1,20 @@
+--- a/Include/object.h 2020-10-05 17:07:58.000000000 +0200
++++ b/Include/object.h 2020-10-06 12:08:17.444833331 +0200
+@@ -150,7 +150,7 @@ static inline int Py_IS_TYPE(PyObject *ob, PyTypeObject
*type) {
+ return Py_TYPE(ob) == type;
+ }
+ #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000
+-# define Py_IS_TYPE(ob, type) Py_IS_TYPE(_PyObject_CAST(ob), type)
++# define Py_IS_TYPE(ob, type) (Py_IS_TYPE(_PyObject_CAST(ob), type))
+ #endif
+
+
+@@ -772,7 +772,7 @@ PyType_HasFeature(PyTypeObject *type, unsigned long
feature)
+ return ((flags & feature) != 0);
+ }
+
+-#define PyType_FastSubclass(type, flag) PyType_HasFeature(type, flag)
++#define PyType_FastSubclass(type, flag) (PyType_HasFeature(type, flag))
+
+ static inline int PyType_Check(PyObject *op) {
+ return PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_TYPE_SUBCLASS);



  • [SM-Commit] GIT changes to master grimoire by Pavel Vinogradov (3b9a4ca23361b1bdc55f65d4671f87d255178dba), Pavel Vinogradov, 10/24/2022

Archive powered by MHonArc 2.6.24.

Top of Page