Bug 1218125 - cmake outdated
Summary: cmake outdated
Status: NEW
Alias: None
Product: openSUSE Distribution
Classification: openSUSE
Component: Development (show other bugs)
Version: Leap 15.5
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Simon Lees
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-16 18:05 UTC by Michal Suchanek
Modified: 2024-03-12 16:10 UTC (History)
2 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michal Suchanek 2023-12-16 18:05:31 UTC
All SLE service packs have a cmake except SP5, current version in Leap is 3.20, some projects insist on more recent version like 3.23, Factory has 3.27.

Sounds like it's time to upgrade cmake again.
Comment 1 Simon Lees 2023-12-17 23:52:49 UTC
(In reply to Michal Suchanek from comment #0)
> All SLE service packs have a cmake except SP5, current version in Leap is
> 3.20, some projects insist on more recent version like 3.23, Factory has
> 3.27.
> 
> Sounds like it's time to upgrade cmake again.

Unfortunately a full cmake update would now need to go through a Formal ECO Process, to help with the chance of such a process can you point to any planned SLE or Leap maintenance updates that can't proceed due to cmake being too old.

If your mostly concerned about packages building in devel projects, branching cmake from devel:tools:building and enabling it only to build for Leap might be a simpler process.
Comment 2 Michal Suchanek 2023-12-18 11:15:31 UTC
Updating cmake in 15.6 should not need an ECO
Comment 3 Simon Lees 2023-12-18 12:24:25 UTC
(In reply to Michal Suchanek from comment #2)
> Updating cmake in 15.6 should not need an ECO

Nope that should just need a jira ticket the original bug was for 15.5
Comment 6 Christophe Marin 2024-02-22 11:32:17 UTC
https://build.opensuse.org/request/show/1138116 introduces an interesting issue when branching cmake from devel:tools:building and using it for packages building packages for Leap:

For leap, we now have:
%define pyver 311 and
Requires:       python%{pyver}-base 

so the python 3.11 interpreter will be around unconditionally.

Now consider a spec file that does:
BuildRequires:  cmake python3-pycairo

That worked before the SR mentioned above, and it didn't after the change

This is a simplified version of the CMakeLists.txt:

```
cmake_minimum_required(VERSION 3.22)
project(test)
find_package(Python3 COMPONENTS Interpreter REQUIRED)
# Check for python cairo
execute_process(COMMAND ${Python3_EXECUTABLE} -c "import cairo"
                RESULT_VARIABLE PYTHON_CAIRO_RESULT)
if (PYTHON_CAIRO_RESULT EQUAL 0)
    set(PYTHONCAIRO_FOUND 1)
endif()
```


/usr/share/cmake/Modules/FindPython/Support.cmake will create a list of python interpreters (after line 1844)

${_${_PYTHON_PREFIX}_NAMES}  is converted to "python3.13;python3.12;python3.11;python3.10;python3.9;python3.8;python3.7;python3.6;python3.5;python3.4;python3.3;python3.2;python3.1;python3.0;python3;python"


CMake finds python3.11 but logically fails to find the cairo module.
IOW, 'Requires: python%{pyver}-base' forces packagers to use 

%{?sle15_python_module_pythons}
and BuildRequires:  %{python_module xxx}


This is not an hypothetical case, we got hit by this in the KDE repo and this is the change I had to push:

https://build.opensuse.org/package/rdiff/KDE:Unstable:Frameworks/breeze-gtk?linkrev=base&rev=306

osc buildinfo confirmed where the issue came from:
"added python311-base@SUSE:SLE-15-SP4:Update/pool because of cmake-mini:python311-base"
Comment 7 Michal Suchanek 2024-02-22 11:56:55 UTC
I think that's not what it should be - the python 3.11 is only required for building the documentation.

It should be fine to have python3 as runtime requirement but needs testing.
Comment 8 Michal Suchanek 2024-02-22 12:22:10 UTC
https://build.opensuse.org/request/show/1149290