diff --git a/0201-Bump-cmake-version-required-for-cmake-4.patch b/0201-Bump-cmake-version-required-for-cmake-4.patch new file mode 100644 index 0000000000000000000000000000000000000000..532db0bb2dd4ad396f932ebc20c429bf2c7bc378 --- /dev/null +++ b/0201-Bump-cmake-version-required-for-cmake-4.patch @@ -0,0 +1,144 @@ +From d0519735f07544fde274f859f42e669d53346dcb Mon Sep 17 00:00:00 2001 +From: Funda Wang +Date: Fri, 29 Aug 2025 09:41:49 +0800 +Subject: [PATCH 1/2] bump cmake version requires for cmake 4 + +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ac794f375..6f8ff4c46 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,4 +1,4 @@ +-cmake_minimum_required (VERSION 2.8) ++cmake_minimum_required (VERSION 2.8...4.0) + project (isulad) + + include(cmake/helper.cmake) +-- +Gitee + + +From 4c5233dec8689fc3b42dbec1c99dd2aa787e7925 Mon Sep 17 00:00:00 2001 +From: Funda Wang +Date: Fri, 29 Aug 2025 10:27:20 +0800 +Subject: [PATCH 2/2] use standard CMAKE_INSTALL_LIBDIR from GNUInstallDirs + rather than unreliable external variables for library installation + +--- + CMakeLists.txt | 11 ++++------- + isulad.pc.in | 12 ++++++------ + src/CMakeLists.txt | 4 ++-- + src/daemon/modules/image/CMakeLists.txt | 2 +- + src/utils/http/CMakeLists.txt | 2 +- + 5 files changed, 14 insertions(+), 17 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6f8ff4c46..dd367bc19 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,6 +1,8 @@ + cmake_minimum_required (VERSION 2.8...4.0) + project (isulad) + ++include(GNUInstallDirs) ++ + include(cmake/helper.cmake) + + include(cmake/options.cmake) +@@ -28,12 +30,6 @@ if (NOT ISULAD_STATE_PATH) + add_definitions(-DISULAD_STATE_PATH="/var/run/isulad") + endif() + +-if (LIB_INSTALL_DIR) +- set(LIB_INSTALL_DIR_DEFAULT ${LIB_INSTALL_DIR}) +-else() +- set(LIB_INSTALL_DIR_DEFAULT "lib") +-endif() +- + # check depends library and headers + message("---------------Check libraries and headers-----------------------") + include(cmake/checker.cmake) +@@ -49,6 +45,7 @@ configure_file( + configure_file( + "${CMAKE_CURRENT_SOURCE_DIR}/isulad.pc.in" + "${CMAKE_BINARY_DIR}/conf/isulad.pc" ++ @ONLY + ) + + # parse .proto files +@@ -92,7 +89,7 @@ ENDIF(ENABLE_FUZZ AND (NOT ENABLE_UT)) + + # install all files + install(FILES ${CMAKE_BINARY_DIR}/conf/isulad.pc +- DESTINATION ${LIB_INSTALL_DIR_DEFAULT}/pkgconfig PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ GROUP_WRITE) ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ GROUP_WRITE) + if (EANBLE_IMAGE_LIBARAY) + install(FILES src/daemon/modules/api/image_api.h + DESTINATION include/isulad) +diff --git a/isulad.pc.in b/isulad.pc.in +index 016e406d2..2560ca2c8 100644 +--- a/isulad.pc.in ++++ b/isulad.pc.in +@@ -1,12 +1,12 @@ + prefix=@CMAKE_INSTALL_PREFIX@ +-libdir=@CMAKE_INSTALL_PREFIX@/lib +-localstatedir=@CMAKE_INSTALL_PREFIX@/var +-includedir=@CMAKE_INSTALL_PREFIX@/include ++libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@ ++localstatedir=@CMAKE_INSTALL_FULL_LOCALSTATEDIR@ ++includedir=${prefix}/include + + Name: libisula_client + Description: light-weighted container client library + Version: @ISULAD_VERSION@ +-URL: iSulad +-Libs: -L@CMAKE_INSTALL_PREFIX@/lib -lisula_client +-Cflags: -I@CMAKE_INSTALL_PREFIX@/include ++URL: https://gitee.com/openeuler/iSulad ++Libs: -L${libdir} -lisula_client ++Cflags: -I${includedir} + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 6aab3f69e..42d061929 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -221,9 +221,9 @@ endif() + + # ------ install binary -------- + install(TARGETS libisulad_tools +- ${INSTALL_TYPE} DESTINATION ${LIB_INSTALL_DIR_DEFAULT} PERMISSIONS OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) ++ ${INSTALL_TYPE} DESTINATION ${CMAKE_INSTALL_LIBDIR} PERMISSIONS OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) + install(TARGETS libisula_client +- ${INSTALL_TYPE} DESTINATION ${LIB_INSTALL_DIR_DEFAULT} PERMISSIONS OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) ++ ${INSTALL_TYPE} DESTINATION ${CMAKE_INSTALL_LIBDIR} PERMISSIONS OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) + install(TARGETS isula + RUNTIME DESTINATION bin PERMISSIONS OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) + install(TARGETS isulad-shim +diff --git a/src/daemon/modules/image/CMakeLists.txt b/src/daemon/modules/image/CMakeLists.txt +index 6d31a1eaf..e85deb267 100644 +--- a/src/daemon/modules/image/CMakeLists.txt ++++ b/src/daemon/modules/image/CMakeLists.txt +@@ -150,6 +150,6 @@ endif() + target_compile_definitions(${LIB_ISULAD_IMG} PRIVATE LIB_ISULAD_IMG_SO) + + install(TARGETS ${LIB_ISULAD_IMG} +- ${INSTALL_TYPE} DESTINATION ${LIB_INSTALL_DIR_DEFAULT} PERMISSIONS OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE) ++ ${INSTALL_TYPE} DESTINATION ${CMAKE_INSTALL_LIBDIR} PERMISSIONS OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE) + + endif() # EANBLE_IMAGE_LIBARAY +diff --git a/src/utils/http/CMakeLists.txt b/src/utils/http/CMakeLists.txt +index 23d92cdcd..02ab60815 100644 +--- a/src/utils/http/CMakeLists.txt ++++ b/src/utils/http/CMakeLists.txt +@@ -29,4 +29,4 @@ if (ISULAD_GCOV) + endif() + + install(TARGETS libhttpclient +- ${INSTALL_TYPE} DESTINATION ${LIB_INSTALL_DIR_DEFAULT} PERMISSIONS OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) ++ ${INSTALL_TYPE} DESTINATION ${CMAKE_INSTALL_LIBDIR} PERMISSIONS OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) +-- +Gitee + diff --git a/iSulad.spec b/iSulad.spec index c3bdf56b2def10459271e94c290f481004df3000..09af459a7a7896ddcebe3135a0f5790a0f6738d8 100644 --- a/iSulad.spec +++ b/iSulad.spec @@ -1,5 +1,5 @@ %global _version 2.1.5 -%global _release 21 +%global _release 22 %global is_systemd 1 %global enable_criv1 1 %global enable_cdi 1 @@ -221,6 +221,7 @@ Patch0197: 0197-coco-support-confidential-containers.patch Patch0198: 0198-isolate-isula-search-ut-in-registry_images_ut.patch Patch0199: 0199-move-sandbox-network_ready-from-metadata-to-state-fo.patch Patch0200: 0200-clean-sandbox-when-create-failed-to-be-consisent-wit.patch +Patch0201: 0201-Bump-cmake-version-required-for-cmake-4.patch %ifarch x86_64 aarch64 Provides: libhttpclient.so()(64bit) @@ -231,7 +232,7 @@ Provides: libisulad_tools.so()(64bit) %if 0%{?is_systemd} # Systemd 230 and up no longer have libsystemd-journal BuildRequires: pkgconfig(systemd) -Requires: systemd-units +%{?systemd_requires} %else Requires(post): chkconfig Requires(preun): chkconfig @@ -427,10 +428,6 @@ fi %endif fi -if ! getent group isula > /dev/null; then - groupadd --system isula -fi - %preun %if 0%{?is_systemd} %systemd_preun isulad @@ -451,37 +448,36 @@ fi %endif %files -%attr(0600,root,root) %{_sysconfdir}/sysmonitor/process/isulad-monit -%attr(0550,root,root) %{_sysconfdir}/default/isulad/isulad-check.sh %defattr(0640,root,root,0750) -%{_sysconfdir}/isulad -%{_sysconfdir}/isulad/* -%{_sysconfdir}/default/* -%defattr(-,root,root,-) +%dir %{_sysconfdir}/default/ +%dir %{_sysconfdir}/default/isulad +%attr(0550,root,root) %{_sysconfdir}/default/isulad/isulad-check.sh +%{_sysconfdir}/default/isulad/*.json +%dir %{_sysconfdir}/default/isulad/hooks +%{_sysconfdir}/default/isulad/hooks/* +%dir %{_sysconfdir}/isulad +%attr(0640,root,root) %config(noreplace,missingok) %{_sysconfdir}/isulad/*.json +%attr(0640,root,root) %config(noreplace,missingok) %{_sysconfdir}/sysconfig/iSulad +%attr(0600,root,root) %{_sysconfdir}/sysmonitor/process/isulad-monit %if 0%{?is_systemd} -%{_unitdir}/isulad.service -%attr(0640,root,root) %{_unitdir}/isulad.service +%attr(0640,root,root) %config(noreplace,missingok) %{_unitdir}/isulad.service %else -%{_initddir}/isulad.init -%attr(0640,root,root) %{_initddir}/isulad.init +%attr(0640,root,root) %config(noreplace,missingok) %{_initddir}/isulad.init %endif -%attr(0755,root,root) %{_libdir}/pkgconfig -%attr(0640,root,root) %{_libdir}/pkgconfig/isulad.pc %defattr(0755,root,root,0755) %{_bindir}/* -%{_libdir}/* -%attr(0640,root,root) %{_sysconfdir}/sysconfig/iSulad -%attr(0640,root,root) %{_sysconfdir}/isulad/daemon.json - -%config(noreplace,missingok) %{_sysconfdir}/sysconfig/iSulad -%config(noreplace,missingok) %{_sysconfdir}/isulad/daemon.json -%if 0%{?is_systemd} -%config(noreplace,missingok) %{_unitdir}/isulad.service -%else -%config(noreplace,missingok) %{_initddir}/isulad.init -%endif +%{_libdir}/*.so +%defattr(-,root,root,-) +%{_libdir}/pkgconfig/isulad.pc %changelog +* Sat Aug 23 2025 Funda Wang - 2.1.5-22 +- Type:enhancement +- CVE:NA +- SUG:NA +- DESC: fix build with cmake 4 +- DESC: cleanup file list + * Tue Mar 18 2025 dongyuzhen - 2.1.5-21 - Type:enhancement - CVE:NA