diff options
| author | CoprDistGit <infra@openeuler.org> | 2026-10-16 05:04:45 +0000 |
|---|---|---|
| committer | CoprDistGit <infra@openeuler.org> | 2026-10-16 05:04:45 +0000 |
| commit | 0a68e0c82dbb41c5b5fb352c193e1327a77d93f8 (patch) | |
| tree | 131df67809d265bd85870316f35c33b1fd71c1f7 | |
| parent | 70f501a3acab554947ee99864877477de6f4e7ff (diff) | |
automatic import of pclopeneuler24.03_LTS
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | CVE-2025-4638.patch | 227 | ||||
| -rw-r--r-- | pcl-1.12.0-fedora.patch | 12 | ||||
| -rw-r--r-- | pcl-1.12.0-metslib.patch | 23 | ||||
| -rw-r--r-- | pcl-1.12.1-boost.patch | 20 | ||||
| -rw-r--r-- | pcl.spec | 172 | ||||
| -rw-r--r-- | sources | 1 |
7 files changed, 456 insertions, 0 deletions
@@ -0,0 +1 @@ +/pcl-1.12.1.tar.gz diff --git a/CVE-2025-4638.patch b/CVE-2025-4638.patch new file mode 100644 index 0000000..4673cec --- /dev/null +++ b/CVE-2025-4638.patch @@ -0,0 +1,227 @@ +From 502bd2b013ce635f21632d523aa8cf2e04f7b7ac Mon Sep 17 00:00:00 2001 +From: Kai Pastor <dg0yt@darc.de> +Date: Sun, 23 Apr 2023 06:24:02 +0200 +Subject: [PATCH] Prefer system zlib over opennurbs vendored copy + +--- + CMakeLists.txt | 9 +++++++ + pcl_config.h.in | 2 ++ + surface/CMakeLists.txt | 13 +++++++++- + .../3rdparty/opennurbs/opennurbs_zlib.h | 18 +++++++++++++ + .../src/3rdparty/opennurbs/openNURBS.cmake | 23 ++-------------- + .../src/3rdparty/opennurbs/opennurbs_zlib.cpp | 8 ++++++ + surface/src/3rdparty/opennurbs/zlib.cmake | 26 +++++++++++++++++++ + 7 files changed, 77 insertions(+), 22 deletions(-) + create mode 100644 surface/src/3rdparty/opennurbs/zlib.cmake + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8990960b427..8dd786981aa 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -416,6 +416,15 @@ endif() + # Boost (required) + include("${PCL_SOURCE_DIR}/cmake/pcl_find_boost.cmake") + ++# System zlib (for nurbs on surface) ++option(WITH_SYSTEM_ZLIB "Use system zlib" TRUE) ++if(WITH_SYSTEM_ZLIB) ++ find_package(ZLIB) ++ if(ZLIB_FOUND) ++ set(HAVE_ZLIB ON) ++ endif() ++endif() ++ + ### ---[ Create the config.h file + set(pcl_config_h_in "${CMAKE_CURRENT_SOURCE_DIR}/pcl_config.h.in") + set(pcl_config_h "${CMAKE_CURRENT_BINARY_DIR}/include/pcl/pcl_config.h") +diff --git a/pcl_config.h.in b/pcl_config.h.in +index b5ef2cbf9bf..13d04c3fbfc 100644 +--- a/pcl_config.h.in ++++ b/pcl_config.h.in +@@ -52,6 +52,8 @@ + + #cmakedefine HAVE_PNG + ++#cmakedefine HAVE_ZLIB ++ + /* Precompile for a minimal set of point types instead of all. */ + #cmakedefine PCL_ONLY_CORE_POINT_TYPES + +diff --git a/surface/CMakeLists.txt b/surface/CMakeLists.txt +index c29105e6a67..e42c81d1312 100644 +--- a/surface/CMakeLists.txt ++++ b/surface/CMakeLists.txt +@@ -1,6 +1,7 @@ + set(SUBSYS_NAME surface) + set(SUBSYS_DESC "Point cloud surface library") + set(SUBSYS_DEPS common search kdtree octree) ++set(SUBSYS_EXT_DEPS "") + + set(build TRUE) + PCL_SUBSYS_OPTION(build "${SUBSYS_NAME}" "${SUBSYS_DESC}" ON) +@@ -66,6 +67,16 @@ if(BUILD_surface_on_nurbs) + + include(src/3rdparty/opennurbs/openNURBS.cmake) + include(src/on_nurbs/on_nurbs.cmake) ++ ++ if(WITH_SYSTEM_ZLIB) ++ find_package(ZLIB REQUIRED) ++ list(APPEND ON_NURBS_LIBRARIES ${ZLIB_LIBRARIES}) ++ list(APPEND SUBSYS_EXT_DEPS zlib) ++ else() ++ include(src/3rdparty/opennurbs/zlib.cmake) ++ list(APPEND OPENNURBS_INCLUDES ${ZLIB_INCLUDES}) ++ list(APPEND OPENNURBS_SOURCES ${ZLIB_SOURCES}) ++ endif() + endif() + + set(POISSON_INCLUDES +@@ -196,7 +207,7 @@ if(QHULL_FOUND) + target_link_libraries("${LIB_NAME}" QHULL::QHULL) + endif() + +-PCL_MAKE_PKGCONFIG(${LIB_NAME} COMPONENT ${SUBSYS_NAME} DESC ${SUBSYS_DESC} PCL_DEPS ${SUBSYS_DEPS}) ++PCL_MAKE_PKGCONFIG(${LIB_NAME} COMPONENT ${SUBSYS_NAME} DESC ${SUBSYS_DESC} PCL_DEPS ${SUBSYS_DEPS} EXT_DEPS ${SUBSYS_EXT_DEPS}) + + # Install include files + PCL_ADD_INCLUDES("${SUBSYS_NAME}" "${SUBSYS_NAME}" ${incs}) +diff --git a/surface/include/pcl/surface/3rdparty/opennurbs/opennurbs_zlib.h b/surface/include/pcl/surface/3rdparty/opennurbs/opennurbs_zlib.h +index 12787e1201f..7622b3a6a7d 100644 +--- a/surface/include/pcl/surface/3rdparty/opennurbs/opennurbs_zlib.h ++++ b/surface/include/pcl/surface/3rdparty/opennurbs/opennurbs_zlib.h +@@ -28,6 +28,22 @@ + // and statically link with the zlib library. All the necessary + // header files are included by opennurbs.h. + ++// PCL can use an external zlib. ++ ++#include <pcl/pcl_config.h> ++ ++#if defined(HAVE_ZLIB) ++ ++#define z_deflate deflate ++#define z_inflate inflate ++#define z_Bytef Bytef ++ ++#define zcalloc pcl_zcalloc ++#define zcfree pcl_zcfree ++ ++#include <zlib.h> ++ ++#else + + #if !defined(Z_PREFIX) + /* decorates zlib functions with a "z_" prefix to prevent symbol collision. */ +@@ -41,6 +57,8 @@ + + #include "zlib.h" + ++#endif // HAVE_ZLIB ++ + ON_BEGIN_EXTERNC + voidpf zcalloc (voidpf, unsigned, unsigned); + void zcfree (voidpf, voidpf); +diff --git a/surface/src/3rdparty/opennurbs/openNURBS.cmake b/surface/src/3rdparty/opennurbs/openNURBS.cmake +index 51ca678d018..fdcfa7e92dd 100644 +--- a/surface/src/3rdparty/opennurbs/openNURBS.cmake ++++ b/surface/src/3rdparty/opennurbs/openNURBS.cmake +@@ -102,16 +102,7 @@ set(OPENNURBS_INCLUDES + include/pcl/${SUBSYS_NAME}/3rdparty/opennurbs/opennurbs_workspace.h + include/pcl/${SUBSYS_NAME}/3rdparty/opennurbs/opennurbs_xform.h + include/pcl/${SUBSYS_NAME}/3rdparty/opennurbs/opennurbs_zlib.h +- include/pcl/${SUBSYS_NAME}/3rdparty/opennurbs/crc32.h +- include/pcl/${SUBSYS_NAME}/3rdparty/opennurbs/deflate.h +- include/pcl/${SUBSYS_NAME}/3rdparty/opennurbs/inffast.h +- include/pcl/${SUBSYS_NAME}/3rdparty/opennurbs/inffixed.h +- include/pcl/${SUBSYS_NAME}/3rdparty/opennurbs/inflate.h +- include/pcl/${SUBSYS_NAME}/3rdparty/opennurbs/inftrees.h +- include/pcl/${SUBSYS_NAME}/3rdparty/opennurbs/trees.h +- include/pcl/${SUBSYS_NAME}/3rdparty/opennurbs/zconf.h +- include/pcl/${SUBSYS_NAME}/3rdparty/opennurbs/zlib.h +- include/pcl/${SUBSYS_NAME}/3rdparty/opennurbs/zutil.h) ++) + + set(OPENNURBS_SOURCES + src/3rdparty/opennurbs/opennurbs_3dm_attributes.cpp +@@ -222,14 +213,4 @@ set(OPENNURBS_SOURCES + src/3rdparty/opennurbs/opennurbs_xform.cpp + src/3rdparty/opennurbs/opennurbs_zlib.cpp + src/3rdparty/opennurbs/opennurbs_zlib_memory.cpp +- src/3rdparty/opennurbs/adler32.c +- src/3rdparty/opennurbs/compress.c +- src/3rdparty/opennurbs/crc32.c +- src/3rdparty/opennurbs/deflate.c +- src/3rdparty/opennurbs/infback.c +- src/3rdparty/opennurbs/inffast.c +- src/3rdparty/opennurbs/inflate.c +- src/3rdparty/opennurbs/inftrees.c +- src/3rdparty/opennurbs/trees.c +- src/3rdparty/opennurbs/uncompr.c +- src/3rdparty/opennurbs/zutil.c) ++) +diff --git a/surface/src/3rdparty/opennurbs/opennurbs_zlib.cpp b/surface/src/3rdparty/opennurbs/opennurbs_zlib.cpp +index 688c803df65..03e61993177 100644 +--- a/surface/src/3rdparty/opennurbs/opennurbs_zlib.cpp ++++ b/surface/src/3rdparty/opennurbs/opennurbs_zlib.cpp +@@ -16,6 +16,8 @@ + + #include "pcl/surface/3rdparty/opennurbs/opennurbs.h" + ++#if !defined(HAVE_ZLIB) ++ + #if defined(ON_DLL_EXPORTS) + // When compiling a Windows DLL opennurbs, we + // statically link ./zlib/.../zlib....lib into +@@ -72,6 +74,8 @@ + + #endif // ON_DLL_EXPORTS + ++#endif // !HAVE_ZLIB ++ + + bool ON_BinaryArchive::WriteCompressedBuffer( + std::size_t sizeof__inbuffer, // sizeof uncompressed input data +@@ -641,7 +645,11 @@ struct ON_CompressedBufferHelper + sizeof_x_buffer = 16384 + }; + unsigned char buffer[sizeof_x_buffer]; ++#if defined(HAVE_ZLIB) ++ z_stream strm = []() { z_stream zs; zs.zalloc = pcl_zcalloc; zs.zfree = pcl_zcfree; return zs; } (); ++#else + z_stream strm; ++#endif + std::size_t m_buffer_compressed_capacity; + }; + +diff --git a/surface/src/3rdparty/opennurbs/zlib.cmake b/surface/src/3rdparty/opennurbs/zlib.cmake +new file mode 100644 +index 00000000000..d730f223975 +--- /dev/null ++++ b/surface/src/3rdparty/opennurbs/zlib.cmake +@@ -0,0 +1,26 @@ ++set(ZLIB_INCLUDES ++ include/pcl/${SUBSYS_NAME}/3rdparty/opennurbs/crc32.h ++ include/pcl/${SUBSYS_NAME}/3rdparty/opennurbs/deflate.h ++ include/pcl/${SUBSYS_NAME}/3rdparty/opennurbs/inffast.h ++ include/pcl/${SUBSYS_NAME}/3rdparty/opennurbs/inffixed.h ++ include/pcl/${SUBSYS_NAME}/3rdparty/opennurbs/inflate.h ++ include/pcl/${SUBSYS_NAME}/3rdparty/opennurbs/inftrees.h ++ include/pcl/${SUBSYS_NAME}/3rdparty/opennurbs/trees.h ++ include/pcl/${SUBSYS_NAME}/3rdparty/opennurbs/zconf.h ++ include/pcl/${SUBSYS_NAME}/3rdparty/opennurbs/zlib.h ++ include/pcl/${SUBSYS_NAME}/3rdparty/opennurbs/zutil.h ++) ++ ++set(ZLIB_SOURCES ++ src/3rdparty/opennurbs/adler32.c ++ src/3rdparty/opennurbs/compress.c ++ src/3rdparty/opennurbs/crc32.c ++ src/3rdparty/opennurbs/deflate.c ++ src/3rdparty/opennurbs/infback.c ++ src/3rdparty/opennurbs/inffast.c ++ src/3rdparty/opennurbs/inflate.c ++ src/3rdparty/opennurbs/inftrees.c ++ src/3rdparty/opennurbs/trees.c ++ src/3rdparty/opennurbs/uncompr.c ++ src/3rdparty/opennurbs/zutil.c ++) diff --git a/pcl-1.12.0-fedora.patch b/pcl-1.12.0-fedora.patch new file mode 100644 index 0000000..7433e26 --- /dev/null +++ b/pcl-1.12.0-fedora.patch @@ -0,0 +1,12 @@ +diff -up ./PCLConfig.cmake.in.fedora ./PCLConfig.cmake.in +--- ./PCLConfig.cmake.in.fedora 2020-05-29 17:48:55.884924391 -0400 ++++ ./PCLConfig.cmake.in 2020-05-29 17:50:25.211139677 -0400 +@@ -398,7 +398,7 @@ if(WIN32 AND NOT MINGW) + endif() + else() + # PCLConfig.cmake is installed to PCL_ROOT/share/pcl-x.y +- get_filename_component(PCL_ROOT "${CMAKE_CURRENT_LIST_DIR}/../.." ABSOLUTE) ++ set(PCL_ROOT "@CMAKE_INSTALL_PREFIX@") + endif() + + # check whether PCLConfig.cmake is found into a PCL installation or in a build tree diff --git a/pcl-1.12.0-metslib.patch b/pcl-1.12.0-metslib.patch new file mode 100644 index 0000000..5f95d1c --- /dev/null +++ b/pcl-1.12.0-metslib.patch @@ -0,0 +1,23 @@ +diff -up ./recognition/include/pcl/recognition/hv/hv_go.h.metslib ./recognition/include/pcl/recognition/hv/hv_go.h +--- ./recognition/include/pcl/recognition/hv/hv_go.h.metslib 2020-05-29 17:47:21.343600510 -0400 ++++ ./recognition/include/pcl/recognition/hv/hv_go.h 2020-05-29 17:48:12.185237506 -0400 +@@ -20,6 +20,6 @@ + #include <pcl/pcl_macros.h> + #include <pcl/recognition/hv/hypotheses_verification.h> +-#include <pcl/recognition/3rdparty/metslib/mets.hh> ++#include <metslib/mets.hh> + #include <pcl/features/normal_3d.h> + + #include <memory> +diff -up ./recognition/include/pcl/recognition/impl/hv/hv_go.hpp.metslib ./recognition/include/pcl/recognition/impl/hv/hv_go.hpp +--- ./recognition/include/pcl/recognition/impl/hv/hv_go.hpp.metslib 2020-05-11 04:59:26.000000000 -0400 ++++ ./recognition/include/pcl/recognition/impl/hv/hv_go.hpp 2020-05-29 17:47:21.343600510 -0400 +@@ -453,7 +453,7 @@ void pcl::GlobalHypothesesVerification<M + mets::noimprove_termination_criteria noimprove (max_iterations_); + mets::linear_cooling linear_cooling; + mets::simulated_annealing<move_manager> sa (model, best_recorder, neigh, noimprove, linear_cooling, initial_temp_, 1e-7, 2); +- sa.setApplyAndEvaluate(true); ++ //sa.setApplyAndEvaluate(true); + + { + pcl::ScopeTime t ("SA search..."); diff --git a/pcl-1.12.1-boost.patch b/pcl-1.12.1-boost.patch new file mode 100644 index 0000000..446dfd9 --- /dev/null +++ b/pcl-1.12.1-boost.patch @@ -0,0 +1,20 @@ +--- pcl-pcl-1.12.1/io/CMakeLists.txt_org 2023-05-01 07:11:10.766982288 +0800 ++++ pcl-pcl-1.12.1/io/CMakeLists.txt 2023-05-01 07:11:29.331003919 +0800 +@@ -1,7 +1,7 @@ + set(SUBSYS_NAME io) + set(SUBSYS_DESC "Point cloud IO library") + set(SUBSYS_DEPS common octree) +-set(SUBSYS_EXT_DEPS boost eigen) ++set(SUBSYS_EXT_DEPS eigen) + + set(build TRUE) + PCL_SUBSYS_OPTION(build "${SUBSYS_NAME}" "${SUBSYS_DESC}" ON) +@@ -415,7 +415,7 @@ + target_link_libraries("${LIB_NAME}" ${PCAP_LIBRARIES}) + endif() + +-set(EXT_DEPS boost eigen3) ++set(EXT_DEPS eigen3) + + if(WITH_OPENNI) + list(APPEND EXT_DEPS libopenni) diff --git a/pcl.spec b/pcl.spec new file mode 100644 index 0000000..865d559 --- /dev/null +++ b/pcl.spec @@ -0,0 +1,172 @@ +%global apiversion 1.12 +%global soversion 1.12 + +Name: pcl +Version: 1.12.1 +Release: 3 +Summary: Library for point cloud processing +License: BSD +URL: http://pointclouds.org/ + +Source0: %{name}-%{version}.tar.gz +# Look for external metslib, not upstream +Patch0: %{name}-1.12.0-metslib.patch +# Patch for PCLConfig.cmake to find pcl +Patch1: %{name}-1.12.0-fedora.patch +Patch2: %{name}-1.12.1-boost.patch + +# Fix CVE-2025-4638 / CVE-2025-4640 (opennurbs vendored zlib) +Patch8: CVE-2025-4638.patch + +# For plain building +BuildRequires: cmake, gcc-c++, boost-devel +# Documentation +#BuildRequires: doxygen, graphviz, /usr/bin/sphinx-build +BuildRequires: doxygen, graphviz + +# mandatory +#BuildRequires: eigen3-static, flann-devel, vtk-devel, gl2ps-devel, hdf5-devel, libxml2-devel, netcdf-cxx-devel, jsoncpp-devel, metslib-static, libXext-devel +BuildRequires: eigen3-static, flann-devel, gl2ps-devel, hdf5-devel, libxml2-devel, jsoncpp-devel, metslib-static, libXext-devel, flann-static +BuildRequires: texlive-latex + +# To fix Imported target "VTK::Java" includes non-existent path "/usr/lib/jvm/java/include" in its INTERFACE_INCLUDE_DIRECTORIES +%ifarch %{java_arches} +BuildRequires: java-devel +%endif + +# optional +BuildRequires: qt5-qtbase-devel, qhull-devel, libusbx-devel, gtest-devel, qt5-qtwebkit-devel +%ifarch %{ix86} x86_64 +BuildRequires: openni-devel +%endif + +%description +The Point Cloud Library (or PCL) is a large scale, open project for point +cloud processing. + +The PCL framework contains numerous state-of-the art algorithms including +filtering, feature estimation, surface reconstruction, registration, model +fitting and segmentation. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} +Requires: libusb-devel +Requires: flann-static +Requires: pkgconfig +#Requires: eigen3-devel, qhull-devel, flann-devel, vtk-devel +Requires: eigen3-devel, qhull-devel, flann-devel +%ifarch %{ix86} x86_64 +Requires: openni-devel +%endif + +%description devel +The %{name}-devel package contains libraries and header files for +developing applications that use %{name}. + + +%package tools +Summary: Point cloud tools and viewers +Requires: %{name} = %{version}-%{release} + +%description tools +This package contains tools for point cloud file processing and viewers +for point cloud files and live Kinect data. + + +%package doc +Summary: PCL API documentation +BuildArch: noarch + +%description doc +The %{name}-doc package contains API documentation for the Point Cloud +Library. + + +%prep +%setup -qn %{name}-%{name}-%{version} +%patch0 -p1 -b .metslib +%patch1 -p0 -b .fedora +%patch2 -p1 -b .boost +%patch8 -p1 -b .zlib + +# Just to make it obvious we're not using any of these +rm -fr recognition/include/pcl/recognition/3rdparty/metslib +rm -fr surface/src/3rdparty/opennurbs +rm -rf surface/include/pcl/surface/3rdparty/opennurbs + +%build +# try to reduce memory usage of compile process (can cause OOM errors +# esp. on ARM builders) +%global optflags %(echo %{optflags} | sed -e 's/-g /-g1 /' -e 's/-pipe //' -e's/-ffat-lto-objects/-fno-fat-lto-objects/') +mkdir build && cd build +%cmake \ + -DCMAKE_BUILD_TYPE=None \ + -DWITH_DOCS=ON \ + -DWITH_CUDA=OFF \ + -DWITH_VTK=OFF \ + -DWITH_TUTORIALS=ON \ + -DBUILD_apps=ON \ + -DBUILD_global_tests=OFF \ + -DOPENNI_INCLUDE_DIR:PATH=/usr/include/ni \ + -DLIB_INSTALL_DIR=%{_lib} \ +%ifarch x86_64 + -DPCL_ENABLE_SSE=ON \ +%else + -DPCL_ENABLE_SSE=OFF \ +%endif + -DPCL_PKGCONFIG_SUFFIX:STRING="" \ + -DBUILD_documentation=ON \ + -DCMAKE_SKIP_RPATH=ON \ + .. + +%make_build + +%install +cd build +%make_install + +# Just a dummy test +rm -f $RPM_BUILD_ROOT%{_bindir}/timed_trigger_test + +mkdir -p $RPM_BUILD_ROOT%{_libdir}/cmake/pcl +mv $RPM_BUILD_ROOT%{_datadir}/%{name}-*/*.cmake $RPM_BUILD_ROOT%{_libdir}/cmake/pcl/ +mv $RPM_BUILD_ROOT%{_datadir}/%{name}-*/Modules $RPM_BUILD_ROOT%{_libdir}/cmake/pcl/ + +%check +cd build +make test || true + +%ldconfig_scriptlets + + +%files +%license LICENSE.txt +%doc AUTHORS.txt +%{_libdir}/*.so.%{version} +%{_libdir}/*.so.%{soversion} +%{_datadir}/%{name}-%{apiversion} + +%files devel +%{_includedir}/* +%{_libdir}/*.so +%{_libdir}/pkgconfig/*.pc +%{_libdir}/cmake/pcl + +%files tools +%{_bindir}/pcl_* +# There are no .desktop files because the GUI tools are rather examples +# to understand a particular feature of PCL. + +%files doc +%doc %{_datadir}/doc + +%changelog +* Fri Oct 16 2026 kuyan_kubuds <kuyan@kubuds.cn> - 1.12.1-3 +- Fix CVE-2025-4638 CVE-2025-4640 + +* Mon Sep 11 2023 will_niutao <niutao2@huawei.com> - 1.12.1-2 +- delete unused build require + +* Fri Apr 28 2023 will_niutao <niutao2@huawei.com> - 1.12.1-1 +- init package for openEuler @@ -0,0 +1 @@ +eb1be79330872f9674c9850bb35023bf pcl-1.12.1.tar.gz |
