Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package llvm15 for openSUSE:Factory checked 
in at 2025-03-07 16:43:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/llvm15 (Old)
 and      /work/SRC/openSUSE:Factory/.llvm15.new.19136 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "llvm15"

Fri Mar  7 16:43:36 2025 rev:17 rq:1251062 version:15.0.7

Changes:
--------
--- /work/SRC/openSUSE:Factory/llvm15/llvm15.changes    2024-11-18 
20:02:08.527470323 +0100
+++ /work/SRC/openSUSE:Factory/.llvm15.new.19136/llvm15.changes 2025-03-07 
16:47:57.799966188 +0100
@@ -1,0 +2,9 @@
+Thu Mar  6 08:08:26 UTC 2025 - Daniel Garcia <daniel.gar...@suse.com>
+
+- Add patches, to actually fix the build with Python 3.13:
+  * libcxx-use-shlex-quote.patch
+  * libcxx-remove-unused-imports.patch
+  * lldb-support-python-3.13.patch
+  * use-shlex-quote.patch
+
+-------------------------------------------------------------------

New:
----
  libcxx-remove-unused-imports.patch
  libcxx-use-shlex-quote.patch
  lldb-support-python-3.13.patch
  use-shlex-quote.patch

BETA DEBUG BEGIN:
  New:  * libcxx-use-shlex-quote.patch
  * libcxx-remove-unused-imports.patch
  * lldb-support-python-3.13.patch
  New:- Add patches, to actually fix the build with Python 3.13:
  * libcxx-use-shlex-quote.patch
  * libcxx-remove-unused-imports.patch
  New:  * libcxx-remove-unused-imports.patch
  * lldb-support-python-3.13.patch
  * use-shlex-quote.patch
  New:- Add patches, to actually fix the build with Python 3.13:
  * libcxx-use-shlex-quote.patch
  * libcxx-remove-unused-imports.patch
BETA DEBUG END:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ llvm15.spec ++++++
--- /var/tmp/diff_new_pack.k8fjCK/_old  2025-03-07 16:47:59.172024090 +0100
+++ /var/tmp/diff_new_pack.k8fjCK/_new  2025-03-07 16:47:59.176024259 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package llvm15
 #
-# Copyright (c) 2024 SUSE LLC
+# Copyright (c) 2025 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -396,6 +396,14 @@
 Patch37:        llvm-armv7-fix-vector-compare-with-zero-lowering.patch
 # PATCH-FIX-UPSTREAM: Use symbol versioning also for libclang-cpp.so.
 Patch38:        clang-shlib-symbol-versioning.patch
+# PATCH-FIX-UPSTREAM: use shlib.quote to fix Python 3.13 compatibility
+Patch39:        libcxx-use-shlex-quote.patch
+# PATCH-FIX-UPSTREAM: Adapt lldb to support Python 3.13
+Patch40:        lldb-support-python-3.13.patch
+# PATCH-FIX-UPSTREAM: Remove unused imports fix Python 3.13 compatibility
+Patch41:        libcxx-remove-unused-imports.patch
+# PATCH-FIX-OPENSUSE: Remove shlex.quote to fix Python 3.13 compatibility
+Patch42:        use-shlex-quote.patch
 BuildRequires:  binutils-devel >= 2.21.90
 BuildRequires:  cmake >= 3.13.4
 BuildRequires:  fdupes
@@ -406,6 +414,7 @@
 BuildRequires:  pkgconfig
 BuildRequires:  python-rpm-macros
 BuildRequires:  python3-base
+BuildRequires:  python3-setuptools
 BuildRequires:  pkgconfig(libedit)
 BuildRequires:  pkgconfig(zlib)
 Requires(post): update-alternatives
@@ -833,6 +842,7 @@
 %patch -P 33 -p2
 %patch -P 34 -p2
 %patch -P 37 -p1
+%patch -P 42 -p1
 
 pushd clang-%{_version}.src
 %patch -P 2 -p1
@@ -866,6 +876,7 @@
 %if %{with lldb}
 pushd lldb-%{_version}.src
 %patch -P 11 -p1
+%patch -P 40 -p1
 popd
 %endif
 
@@ -876,6 +887,8 @@
 
 pushd libcxx-%{_version}.src
 %patch -P 15 -p2
+%patch -P 39 -p1
+%patch -P 41 -p1
 rm test/libcxx/thread/thread.threads/thread.thread.this/sleep_for.pass.cpp
 rm 
test/std/localization/locale.categories/category.time/locale.time.get.byname/get_monthname.pass.cpp
 rm 
test/std/localization/locale.categories/category.time/locale.time.get.byname/get_monthname_wide.pass.cpp

++++++ libcxx-remove-unused-imports.patch ++++++
>From 017396310bb6515786eb9d9cf9fb0256de08d65b Mon Sep 17 00:00:00 2001
From: "Stephan T. Lavavej" <s...@nuwen.net>
Date: Tue, 28 Nov 2023 16:33:11 -0800
Subject: [PATCH] Remove unused Python imports.

Index: libcxx-15.0.7.src/utils/libcxx/test/format.py
===================================================================
--- libcxx-15.0.7.src.orig/utils/libcxx/test/format.py
+++ libcxx-15.0.7.src/utils/libcxx/test/format.py
@@ -9,9 +9,7 @@
 import lit
 import lit.formats
 import os
-import pipes
 import re
-import shutil
 
 def _getTempPaths(test):
     """

++++++ libcxx-use-shlex-quote.patch ++++++
>From d3ce1078186389ce39505f06c2a0100dce9187a5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgo...@gentoo.org>
Date: Mon, 27 May 2024 19:26:56 +0200
Subject: [PATCH] [libcxx] [test] Use `shlex.quote()` to fix Python 3.13
 compatibility (#93376)

Replace the use of `pipes.quote()` with `shlex.quote()` to fix
compatibility with Python 3.13. The former was always an undocumented
alias to the latter, and the `pipes` module was removed completely in
Python 3.13.

Fixes #93375
---
 libcxx/test/libcxx/lit.local.cfg | 5 +++--
 libcxx/utils/libcxx/test/dsl.py  | 4 ++--
 2 files changed, 5 insertions(+), 4 deletions(-)

Index: libcxx-15.0.7.src/test/libcxx/lit.local.cfg
===================================================================
--- libcxx-15.0.7.src.orig/test/libcxx/lit.local.cfg
+++ libcxx-15.0.7.src/test/libcxx/lit.local.cfg
@@ -1,3 +1,3 @@
 # The tests in this directory need to run Python
-import pipes, sys
-config.substitutions.append(('%{python}', pipes.quote(sys.executable)))
+import shlex, sys
+config.substitutions.append(('%{python}', shlex.quote(sys.executable)))
Index: libcxx-15.0.7.src/utils/libcxx/test/dsl.py
===================================================================
--- libcxx-15.0.7.src.orig/utils/libcxx/test/dsl.py
+++ libcxx-15.0.7.src/utils/libcxx/test/dsl.py
@@ -8,9 +8,9 @@
 
 import os
 import pickle
-import pipes
 import platform
 import re
+import shlex
 import shutil
 import tempfile
 
@@ -261,7 +261,7 @@ def hasAnyLocale(config, locales):
       }
     #endif
   """
-  return programSucceeds(config, program, args=[pipes.quote(l) for l in 
locales])
+  return programSucceeds(config, program, args=[shlex.quote(l) for l in 
locales])
 
 @_memoizeExpensiveOperation(lambda c, flags='': (c.substitutions, 
c.environment, flags))
 def compilerMacros(config, flags=''):

++++++ lldb-support-python-3.13.patch ++++++
Index: 
lldb-15.0.7.src/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
===================================================================
--- 
lldb-15.0.7.src.orig/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
+++ 
lldb-15.0.7.src/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
@@ -71,10 +71,12 @@ Expected<std::string> python::As<std::st
 }
 
 static bool python_is_finalizing() {
-#if PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION < 7
-  return _Py_Finalizing != nullptr;
-#else
+#if PY_VERSION_HEX >= 0x030d0000
+  return Py_IsFinalizing();
+#elif PY_VERSION_HEX >= 0x03070000
   return _Py_IsFinalizing();
+#else
+  return _Py_Finalizing != nullptr;
 #endif
 }
 
@@ -772,7 +774,7 @@ bool PythonCallable::Check(PyObject *py_
   return PyCallable_Check(py_obj);
 }
 
-#if PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 3
+#if PY_VERSION_HEX >= 0x03030000
 static const char get_arg_info_script[] = R"(
 from inspect import signature, Parameter, ismethod
 from collections import namedtuple
@@ -801,7 +803,7 @@ Expected<PythonCallable::ArgInfo> Python
   if (!IsValid())
     return nullDeref();
 
-#if PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 3
+#if PY_VERSION_HEX >= 0x03030000
 
   // no need to synchronize access to this global, we already have the GIL
   static PythonScript get_arg_info(get_arg_info_script);
Index: 
lldb-15.0.7.src/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
===================================================================
--- 
lldb-15.0.7.src.orig/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
+++ 
lldb-15.0.7.src/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
@@ -69,8 +69,7 @@ extern "C" PyObject *PyInit__lldb(void);
 #define LLDB_USE_PYTHON_SET_INTERRUPT 0
 #else
 // PyErr_SetInterrupt was introduced in 3.2.
-#define LLDB_USE_PYTHON_SET_INTERRUPT                                          
\
-  (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 2) || (PY_MAJOR_VERSION > 3)
+#define LLDB_USE_PYTHON_SET_INTERRUPT PY_VERSION_HEX >= 0x03020000
 #endif
 
 static ScriptInterpreterPythonImpl *GetPythonInterpreter(Debugger &debugger) {
@@ -169,24 +168,33 @@ private:
 // would always return `true` and `PyGILState_Ensure/Release` flow would be
 // executed instead of unlocking GIL with `PyEval_SaveThread`. When
 // an another thread calls `PyGILState_Ensure` it would get stuck in deadlock.
-#if (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 7) || (PY_MAJOR_VERSION > 3)
+#if PY_VERSION_HEX >= 0x03070000
     // The only case we should go further and acquire the GIL: it is unlocked.
     if (PyGILState_Check())
       return;
 #endif
 
+// `PyEval_ThreadsInitialized` was deprecated in Python 3.9 and removed in
+// Python 3.13. It has been returning `true` always since Python 3.7.
+#if PY_VERSION_HEX < 0x03090000
     if (PyEval_ThreadsInitialized()) {
+#endif
       Log *log = GetLog(LLDBLog::Script);
 
       m_was_already_initialized = true;
       m_gil_state = PyGILState_Ensure();
       LLDB_LOGV(log, "Ensured PyGILState. Previous state = {0}locked\n",
                 m_gil_state == PyGILState_UNLOCKED ? "un" : "");
+
+// `PyEval_InitThreads` was deprecated in Python 3.9 and removed in
+// Python 3.13.
+#if PY_VERSION_HEX < 0x03090000
       return;
     }
 
     // InitThreads acquires the GIL if it hasn't been called before.
     PyEval_InitThreads();
+#endif
   }
 
   PyGILState_STATE m_gil_state = PyGILState_UNLOCKED;

++++++ use-shlex-quote.patch ++++++
Index: llvm-15.0.7.src/test/Bindings/Go/lit.local.cfg
===================================================================
--- llvm-15.0.7.src.orig/test/Bindings/Go/lit.local.cfg
+++ llvm-15.0.7.src/test/Bindings/Go/lit.local.cfg
@@ -1,5 +1,4 @@
 import os
-import pipes
 import shlex
 import sys
 
@@ -56,7 +55,7 @@ def fixup_compiler_path(compiler):
     except (AttributeError, OSError):
         pass
 
-    return ' '.join([pipes.quote(arg) for arg in args])
+    return ' '.join([shlex.quote(arg) for arg in args])
 
 config.environment['CC'] = fixup_compiler_path(config.host_cc)
 config.environment['CXX'] = fixup_compiler_path(config.host_cxx)

Reply via email to