From 0afdff9faefb7bec445e963dd6ce46b4fd90db27 Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Sat, 21 Jun 2025 05:38:04 +0200 Subject: [PATCH] Add root-tree-ntuple and root-tree-ntuple-utils dependensies to root-core (listed in root-config --libs) Rename root-fonts package to root-font-files Add optional test dependency python3-pandas now available in EPEL 10 Add dependency jupyter-notebook to root-jupyroot for EPEL 10.1 and later Fix Python 3.14 refcount issues in tests --- root-Fix-test-for-32-bit-architectures.patch | 24 +++--- root-Ignore-warnings-from-uring-IO.patch | 30 ++++---- ...ference-refcount-values-for-Python-3.patch | 66 ++++++++++++++++ ...erence-refcount-values-for-Python-3x.patch | 44 +++++++++++ root.spec | 77 +++++++++++-------- 5 files changed, 181 insertions(+), 60 deletions(-) create mode 100644 root-Python-Update-reference-refcount-values-for-Python-3.patch create mode 100644 root-Python-Update-reference-refcount-values-for-Python-3x.patch diff --git a/root-Fix-test-for-32-bit-architectures.patch b/root-Fix-test-for-32-bit-architectures.patch index 5da0477..879e3df 100644 --- a/root-Fix-test-for-32-bit-architectures.patch +++ b/root-Fix-test-for-32-bit-architectures.patch @@ -1,6 +1,6 @@ -From 9efe32d0f0e89624d7cf5efeca9cf151d9d0b220 Mon Sep 17 00:00:00 2001 +From 8f08aac1c5d356352d2bd24b05dcdd092d3ca864 Mon Sep 17 00:00:00 2001 From: Mattias Ellert -Date: Tue, 3 Jun 2025 19:57:31 +0200 +Date: Thu, 19 Jun 2025 13:28:24 +0200 Subject: [PATCH] Fix test for 32 bit architectures [ RUN ] TypeReflectionTest.GetSizeOfType @@ -20,33 +20,35 @@ Expected equality of these values: Which is: 16 [ FAILED ] ScopeReflectionTest.SizeOf (26 ms) --- - .../CppInterOp/unittests/CppInterOp/ScopeReflectionTest.cpp | 2 +- - .../CppInterOp/unittests/CppInterOp/TypeReflectionTest.cpp | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) + .../CppInterOp/unittests/CppInterOp/ScopeReflectionTest.cpp | 3 ++- + .../CppInterOp/unittests/CppInterOp/TypeReflectionTest.cpp | 3 ++- + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/interpreter/CppInterOp/unittests/CppInterOp/ScopeReflectionTest.cpp b/interpreter/CppInterOp/unittests/CppInterOp/ScopeReflectionTest.cpp -index 0b39080859..14122c6498 100644 +index 0b39080859..d490d0833c 100644 --- a/interpreter/CppInterOp/unittests/CppInterOp/ScopeReflectionTest.cpp +++ b/interpreter/CppInterOp/unittests/CppInterOp/ScopeReflectionTest.cpp -@@ -158,7 +158,7 @@ TEST(ScopeReflectionTest, SizeOf) { +@@ -158,7 +158,8 @@ TEST(ScopeReflectionTest, SizeOf) { EXPECT_EQ(Cpp::SizeOf(Decls[4]), (size_t)0); EXPECT_EQ(Cpp::SizeOf(Decls[5]), (size_t)1); EXPECT_EQ(Cpp::SizeOf(Decls[6]), (size_t)4); - EXPECT_EQ(Cpp::SizeOf(Decls[7]), (size_t)16); -+ EXPECT_EQ(Cpp::SizeOf(Decls[7]), (size_t) (sizeof(size_t) == 4 ? 12 : 16)); ++ struct B {short a; double b;}; ++ EXPECT_EQ(Cpp::SizeOf(Decls[7]), sizeof(B)); } diff --git a/interpreter/CppInterOp/unittests/CppInterOp/TypeReflectionTest.cpp b/interpreter/CppInterOp/unittests/CppInterOp/TypeReflectionTest.cpp -index a3e482596d..8f7bc01ebe 100644 +index a3e482596d..28cc32f166 100644 --- a/interpreter/CppInterOp/unittests/CppInterOp/TypeReflectionTest.cpp +++ b/interpreter/CppInterOp/unittests/CppInterOp/TypeReflectionTest.cpp -@@ -77,7 +77,7 @@ TEST(TypeReflectionTest, GetSizeOfType) { +@@ -77,7 +77,8 @@ TEST(TypeReflectionTest, GetSizeOfType) { EXPECT_EQ(Cpp::GetSizeOfType(Cpp::GetVariableType(Decls[1])), 1); EXPECT_EQ(Cpp::GetSizeOfType(Cpp::GetVariableType(Decls[2])), 4); EXPECT_EQ(Cpp::GetSizeOfType(Cpp::GetVariableType(Decls[3])), 8); - EXPECT_EQ(Cpp::GetSizeOfType(Cpp::GetVariableType(Decls[4])), 16); -+ EXPECT_EQ(Cpp::GetSizeOfType(Cpp::GetVariableType(Decls[4])), sizeof(size_t) == 4 ? 12 : 16); ++ struct B {int a; double b;}; ++ EXPECT_EQ(Cpp::GetSizeOfType(Cpp::GetVariableType(Decls[4])), sizeof(B)); EXPECT_EQ(Cpp::GetSizeOfType(Cpp::GetTypeFromScope(Decls[5])), 0); EXPECT_EQ(Cpp::GetSizeOfType(Cpp::GetVariableType(Decls[6])), sizeof(intptr_t)); diff --git a/root-Ignore-warnings-from-uring-IO.patch b/root-Ignore-warnings-from-uring-IO.patch index 6183dff..2208534 100644 --- a/root-Ignore-warnings-from-uring-IO.patch +++ b/root-Ignore-warnings-from-uring-IO.patch @@ -1,6 +1,6 @@ -From 1c0b441b9e23ac6a0b7b239a9e06b5caa263cf60 Mon Sep 17 00:00:00 2001 +From f4ac6bf20278c19c88cf98f6062ecfad86b87378 Mon Sep 17 00:00:00 2001 From: Mattias Ellert -Date: Sat, 7 Jun 2025 16:57:52 +0200 +Date: Thu, 19 Jun 2025 14:02:31 +0200 Subject: [PATCH] Ignore warnings from uring IO Tests randomly fail because the uring memory is exhausted. @@ -31,29 +31,27 @@ Received unexpected diagnostic of severity 2000 at 'RRawFileUnix' reading 'io_ur Suppress those using ROOT/TestSupport.hxx [ FAILED ] RNTupleDSTest.ChainMT (1004 ms) --- - core/testsupport/src/TestSupport.cxx | 14 ++++++++++++++ - 1 file changed, 14 insertions(+) + core/testsupport/src/TestSupport.cxx | 12 ++++++++++++ + 1 file changed, 12 insertions(+) diff --git a/core/testsupport/src/TestSupport.cxx b/core/testsupport/src/TestSupport.cxx -index 9889a432f4..c7ee440746 100644 +index 9889a432f4..4c3395ef16 100644 --- a/core/testsupport/src/TestSupport.cxx +++ b/core/testsupport/src/TestSupport.cxx -@@ -76,6 +76,20 @@ static struct ForbidDiagnostics { +@@ -76,6 +76,18 @@ static struct ForbidDiagnostics { return; } -+ if (level == kWarning -+ && strcmp(location, "RIoUring") == 0 -+ && strcmp(msg, "io_uring is unexpectedly not available because:\nFailed to allocate memory for the smallest possible io_uring instance. 'memlock' memory has been exhausted for this user") == 0) { -+ std::cerr << "Warning in " << location << " " << msg << std::endl; -+ return; ++ if (level == kWarning && strcmp(location, "RIoUring") == 0 && ++ strstr(msg, "io_uring is unexpectedly not available because:") != nullptr) { ++ std::cerr << "Warning in " << location << " " << msg << std::endl; ++ return; + } + -+ if (level == kWarning -+ && strcmp(location, "RRawFileUnix") == 0 -+ && strcmp(msg, "io_uring setup failed, falling back to blocking I/O in ReadV") == 0) { -+ std::cerr << "Warning in " << location << " " << msg << std::endl; -+ return; ++ if (level == kWarning && strcmp(location, "RRawFileUnix") == 0 && ++ strcmp(msg, "io_uring setup failed, falling back to blocking I/O in ReadV") == 0) { ++ std::cerr << "Warning in " << location << " " << msg << std::endl; ++ return; + } + FAIL() << "Received unexpected diagnostic of severity " diff --git a/root-Python-Update-reference-refcount-values-for-Python-3.patch b/root-Python-Update-reference-refcount-values-for-Python-3.patch new file mode 100644 index 0000000..fd341ee --- /dev/null +++ b/root-Python-Update-reference-refcount-values-for-Python-3.patch @@ -0,0 +1,66 @@ +From f26668d48bfc75e9c176f7981e51ddc3b5ed7895 Mon Sep 17 00:00:00 2001 +From: Jonas Rembser +Date: Wed, 11 Jun 2025 14:15:07 +0200 +Subject: [PATCH] [Python] Update reference refcount values for Python 3.14 + compatibility + +Closes: #18988. +--- + .../pyroot/pythonizations/test/rdataframe_makenumpy.py | 9 ++++++++- + bindings/pyroot/pythonizations/test/rvec_asrvec.py | 10 +++++++--- + 2 files changed, 15 insertions(+), 4 deletions(-) + +diff --git a/bindings/pyroot/pythonizations/test/rdataframe_makenumpy.py b/bindings/pyroot/pythonizations/test/rdataframe_makenumpy.py +index 072148aeb6..c7da723523 100644 +--- a/bindings/pyroot/pythonizations/test/rdataframe_makenumpy.py ++++ b/bindings/pyroot/pythonizations/test/rdataframe_makenumpy.py +@@ -75,10 +75,17 @@ class DataFrameFromNumpy(unittest.TestCase): + def test_refcount(self): + """ + Check refcounts of associated PyObjects ++ ++ In case of Python <=3.14, we expect a refcount of 2 for the data dict, ++ because the call to sys.getrefcount creates a second reference by ++ itself. Starting from Python 3.14, we expect a refcount of 1 because ++ there were changes to the interpreter to avoid some unnecessary ref ++ counts. See also: ++ https://docs.python.org/3.14/whatsnew/3.14.html#whatsnew314-refcount + """ + data = {"x": np.array([1, 2, 3], dtype="float32")} + gc.collect() +- self.assertEqual(sys.getrefcount(data), 2) ++ self.assertEqual(sys.getrefcount(data), 1 + int(sys.version_info < (3, 14))) + self.assertEqual(sys.getrefcount(data["x"]), 2) + + df = ROOT.RDF.FromNumpy(data) +diff --git a/bindings/pyroot/pythonizations/test/rvec_asrvec.py b/bindings/pyroot/pythonizations/test/rvec_asrvec.py +index 5e6c820705..9d3a294bf1 100644 +--- a/bindings/pyroot/pythonizations/test/rvec_asrvec.py ++++ b/bindings/pyroot/pythonizations/test/rvec_asrvec.py +@@ -123,8 +123,12 @@ class AsRVec(unittest.TestCase): + """ + Test reference count of returned RVec + +- We expect a refcount of 2 for the RVec because the call to sys.getrefcount +- creates a second reference by itself. ++ In case of Python <=3.14, we expect a refcount of 2 for the RVec ++ because the call to sys.getrefcount creates a second reference by ++ itself. Starting from Python 3.14, we expect a refcount of 1 because ++ there were changes to the interpreter to avoid some unnecessary ref ++ counts. See also: ++ https://docs.python.org/3.14/whatsnew/3.14.html#whatsnew314-refcount + We attach the adopted pyobject to the RVec and increase the refcount of the + numpy array. After deletion of the rvec, the refcount of the numpy array + is decreased. +@@ -132,7 +136,7 @@ class AsRVec(unittest.TestCase): + np_obj = np.array([1, 2]) + rvec = ROOT.VecOps.AsRVec(np_obj) + gc.collect() +- self.assertEqual(sys.getrefcount(rvec), 2) ++ self.assertEqual(sys.getrefcount(rvec), 1 + int(sys.version_info < (3, 14))) + self.assertEqual(sys.getrefcount(np_obj), 3) + del rvec + gc.collect() +-- +2.49.0 + diff --git a/root-Python-Update-reference-refcount-values-for-Python-3x.patch b/root-Python-Update-reference-refcount-values-for-Python-3x.patch new file mode 100644 index 0000000..ecb27dc --- /dev/null +++ b/root-Python-Update-reference-refcount-values-for-Python-3x.patch @@ -0,0 +1,44 @@ +From 530d925f9832fe5fd1469ebf145f85227cfce1d4 Mon Sep 17 00:00:00 2001 +From: Mattias Ellert +Date: Fri, 20 Jun 2025 07:21:05 +0200 +Subject: [PATCH] [Python] Update reference refcount values for Python 3.14 + compatibility + +--- + bindings/pyroot/pythonizations/test/rdataframe_makenumpy.py | 2 +- + bindings/pyroot/pythonizations/test/rvec_asrvec.py | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/bindings/pyroot/pythonizations/test/rdataframe_makenumpy.py b/bindings/pyroot/pythonizations/test/rdataframe_makenumpy.py +index c7da723523..fc0f88155a 100644 +--- a/bindings/pyroot/pythonizations/test/rdataframe_makenumpy.py ++++ b/bindings/pyroot/pythonizations/test/rdataframe_makenumpy.py +@@ -90,7 +90,7 @@ class DataFrameFromNumpy(unittest.TestCase): + + df = ROOT.RDF.FromNumpy(data) + gc.collect() +- self.assertEqual(sys.getrefcount(df), 2) ++ self.assertEqual(sys.getrefcount(df), 1 + int(sys.version_info < (3, 14))) + + self.assertEqual(sys.getrefcount(data["x"]), 3) + +diff --git a/bindings/pyroot/pythonizations/test/rvec_asrvec.py b/bindings/pyroot/pythonizations/test/rvec_asrvec.py +index 9d3a294bf1..f489da826e 100644 +--- a/bindings/pyroot/pythonizations/test/rvec_asrvec.py ++++ b/bindings/pyroot/pythonizations/test/rvec_asrvec.py +@@ -137,10 +137,10 @@ class AsRVec(unittest.TestCase): + rvec = ROOT.VecOps.AsRVec(np_obj) + gc.collect() + self.assertEqual(sys.getrefcount(rvec), 1 + int(sys.version_info < (3, 14))) +- self.assertEqual(sys.getrefcount(np_obj), 3) ++ self.assertEqual(sys.getrefcount(np_obj), 2 + int(sys.version_info < (3, 14))) + del rvec + gc.collect() +- self.assertEqual(sys.getrefcount(np_obj), 2) ++ self.assertEqual(sys.getrefcount(np_obj), 1 + int(sys.version_info < (3, 14))) + + + if __name__ == "__main__": +-- +2.49.0 + diff --git a/root.spec b/root.spec index c999668..5ef8c6a 100644 --- a/root.spec +++ b/root.spec @@ -10,7 +10,7 @@ %global bundlejson 0 -%if %{?fedora}%{!?fedora:0} +%if %{?fedora}%{!?fedora:0} || %{?rhel}%{!?rhel:0} >= 10 %ifarch %{ix86} %{arm} %global pandas 0 %else @@ -39,7 +39,7 @@ Name: root Version: 6.36.00 %global libversion %(cut -d. -f 1-2 <<< %{version}) -Release: 1%{?dist} +Release: 2%{?dist} Summary: Numerical data analysis framework License: LGPL-2.1-or-later @@ -96,6 +96,11 @@ Patch9: %{name}-Use-size_t-for-offset.patch Patch10: %{name}-Fix-test-for-32-bit-architectures.patch # Remove extra 0 in release number Patch11: %{name}-Update-release-number.patch +# https://github.com/root-project/root/issues/18988 +# https://github.com/root-project/root/pull/19014 +# https://github.com/root-project/root/pull/19107 +Patch12: %{name}-Python-Update-reference-refcount-values-for-Python-3.patch +Patch13: %{name}-Python-Update-reference-refcount-values-for-Python-3x.patch BuildRequires: gcc-c++ BuildRequires: gcc-gfortran @@ -248,14 +253,17 @@ Requires: %{name}-core = %{version}-%{release} %description icons This package contains icons used by the ROOT GUI. -%package fonts +%package font-files Summary: ROOT font collection BuildArch: noarch # STIX version 0.9 only License: OFL-1.1 Requires: %{name}-core = %{version}-%{release} +# Package renamed +Provides: %{name}-fonts = %{version}-%{release} +Obsoletes: %{name}-fonts < 6.36.00-2 -%description fonts +%description font-files This package contains fonts used by ROOT that are not available in Fedora. In particular it contains STIX version 0.9 that is used by TMathText. @@ -270,7 +278,7 @@ This package contains the tutorial scripts and test suite for ROOT. %package core Summary: ROOT core libraries License: LGPL-2.1-or-later AND LGPL-2.0-or-later AND ISC AND MIT AND NCSA -Requires: %{name}-fonts = %{version}-%{release} +Requires: %{name}-font-files = %{version}-%{release} Requires: %{name}-icons = %{version}-%{release} # Dynamic dependencies Requires: %{name}-cling%{?_isa} = %{version}-%{release} @@ -294,6 +302,10 @@ Requires: %{name}-tree%{?_isa} = %{version}-%{release} %if %{dataframe} Requires: %{name}-tree-dataframe%{?_isa} = %{version}-%{release} %endif +Requires: %{name}-tree-ntuple%{?_isa} = %{version}-%{release} +%if %{root7} +Requires: %{name}-tree-ntuple-utils%{?_isa} = %{version}-%{release} +%endif Requires: %{name}-tree-player%{?_isa} = %{version}-%{release} Requires: %{name}-vecops%{?_isa} = %{version}-%{release} # To resolve dependency in installed ROOTConfig.cmake @@ -417,8 +429,8 @@ Requires: %{name}-core = %{version}-%{release} # notebook package was merged with JupyROOT package Provides: %{name}-notebook = %{version}-%{release} Obsoletes: %{name}-notebook < 6.32.00 -Requires: js-jsroot >= 7.8 -%if %{?fedora}%{!?fedora:0} +Requires: js-jsroot >= 7.9 +%if %{?fedora}%{!?fedora:0} || ( %{?rhel}%{!?rhel:0} >= 10 && "%{?dist}" != ".el10_0" ) # jupyter-notebook not available in RHEL/EPEL # some functionality missing Requires: jupyter-notebook @@ -1143,7 +1155,7 @@ access to http based storage such as webdav and S3. Summary: HTTP server extension for ROOT Requires: %{name}-core%{?_isa} = %{version}-%{release} Requires: %{name}-io%{?_isa} = %{version}-%{release} -Requires: js-jsroot >= 7.8 +Requires: js-jsroot >= 7.9 # Library split (net-httpsniff from net-http) Obsoletes: %{name}-net-http < 6.14.00 @@ -1672,9 +1684,7 @@ Requires: %{name}-hist%{?_isa} = %{version}-%{release} Requires: %{name}-io%{?_isa} = %{version}-%{release} Requires: %{name}-mathcore%{?_isa} = %{version}-%{release} Requires: %{name}-tree%{?_isa} = %{version}-%{release} -%if %{root7} Requires: %{name}-tree-ntuple%{?_isa} = %{version}-%{release} -%endif Requires: %{name}-tree-player%{?_isa} = %{version}-%{release} Requires: %{name}-vecops%{?_isa} = %{version}-%{release} # Library split (tree-dataframe and vecops from tree-player) @@ -1826,6 +1836,14 @@ Requires: %{name}-io%{?_isa} = %{version}-%{release} %description geom-webviewer This package contains a library for viewing geometries in a web GUI. +%package tree-ntuple +Summary: The new ROOT n-tuple class +Requires: %{name}-core%{?_isa} = %{version}-%{release} +Requires: %{name}-io%{?_isa} = %{version}-%{release} + +%description tree-ntuple +This package contains the new ROOT n-tuple class (RNTuple). + %if %{root7} %package graf-gpadv7 Summary: Canvas and pad library for ROOT (ROOT 7) @@ -1913,14 +1931,6 @@ Requires: %{name}-mathcore%{?_isa} = %{version}-%{release} This package contains a library to show a pop-up dialog when fitting various kinds of data. -%package tree-ntuple -Summary: Ntuple (ROOT 7) -Requires: %{name}-core%{?_isa} = %{version}-%{release} -Requires: %{name}-io%{?_isa} = %{version}-%{release} - -%description tree-ntuple -This package contains an ntuple extension for ROOT 7. - %package tree-ntuple-utils Summary: Ntuple utility library (ROOT 7) Requires: %{name}-core%{?_isa} = %{version}-%{release} @@ -1948,6 +1958,8 @@ This package contains utility functions for ntuples. %patch -P9 -p1 %patch -P10 -p1 %patch -P11 -p1 +%patch -P12 -p1 +%patch -P13 -p1 # Remove bundled sources in order to be sure they are not used # * afterimage @@ -2663,15 +2675,6 @@ excluded="${excluded}|\ gtest-tree-tree-testTTreeRegressions" %endif -%if %{?fedora}%{!?fedora:0} >= 43 -# Failures due to reference counting changes in Python 3.14 -# - https://github.com/root-project/root/issues/18988 -# - https://docs.python.org/3.14/whatsnew/3.14.html -excluded="${excluded}|\ -pyunittests-bindings-pyroot-pythonizations-pyroot-pyz-rdataframe-makenumpy|\ -pyunittests-bindings-pyroot-pythonizations-pyroot-pyz-rvec-asrvec" -%endif - # Filter out parts of tests that require remote network access # RNTuple.StdAtomic fails on ix86 (different alignment 64 bit (non)atomic) # InterpreterTest.Evaluate fails on s390x @@ -2784,7 +2787,7 @@ fi %files icons %{_datadir}/%{name}/icons -%files fonts +%files font-files %{_datadir}/%{name}/fonts %files tutorial @@ -3536,6 +3539,11 @@ fi %{_libdir}/%{name}/libROOTGeomViewer_rdict.pcm %{_datadir}/%{name}/plugins/TVirtualGeoPainter/P020_RGeoPainter.C +%files tree-ntuple -f includelist-tree-ntuple +%{_libdir}/%{name}/libROOTNTuple.* +%{_libdir}/%{name}/libROOTNTuple_rdict.pcm +%dir %{_includedir}/%{name}/ROOT/libdaos_mock + %if %{root7} %files graf-gpadv7 -f includelist-graf2d-gpadv7 %{_libdir}/%{name}/libROOTGpadv7.* @@ -3566,17 +3574,20 @@ fi %{_libdir}/%{name}/libROOTFitPanelv7.* %{_libdir}/%{name}/libROOTFitPanelv7_rdict.pcm -%files tree-ntuple -f includelist-tree-ntuple -%{_libdir}/%{name}/libROOTNTuple.* -%{_libdir}/%{name}/libROOTNTuple_rdict.pcm -%dir %{_includedir}/%{name}/ROOT/libdaos_mock - %files tree-ntuple-utils -f includelist-tree-ntupleutil %{_libdir}/%{name}/libROOTNTupleUtil.* %{_libdir}/%{name}/libROOTNTupleUtil_rdict.pcm %endif %changelog +* Sat Jun 21 2025 Mattias Ellert - 6.36.00-2 +- Add root-tree-ntuple and root-tree-ntuple-utils dependensies to root-core + (listed in root-config --libs) +- Rename root-fonts package to root-font-files +- Add optional test dependency python3-pandas now available in EPEL 10 +- Add dependency jupyter-notebook to root-jupyroot for EPEL 10.1 and later +- Fix Python 3.14 refcount issues in tests + * Sat Jun 07 2025 Mattias Ellert - 6.36.00-1 - Update to 6.36.00 - Enable the R interface for EPEL 10.1