summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2026-09-22 05:49:11 +0000
committerCoprDistGit <infra@openeuler.org>2026-09-22 05:49:11 +0000
commitb621b998357e77534f3a4aca70dcaa7763f0e12f (patch)
tree569539cf86bd0299d80a88b9cde1f89ed7ec7e8a
parent84a125736ea35c8739fe0d73c10451d62e193dda (diff)
automatic import of ros-humble-mrpt-libappsopeneuler24.03_LTS_SP3
-rw-r--r--mrpt-libapps.spec73
1 files changed, 59 insertions, 14 deletions
diff --git a/mrpt-libapps.spec b/mrpt-libapps.spec
index f7ef86f..c043c5e 100644
--- a/mrpt-libapps.spec
+++ b/mrpt-libapps.spec
@@ -8,7 +8,7 @@
Name: ros-%{ros_distro}-%{RosPkgName}
Version: 2.15.20
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: Mobile Robot Programming Toolkit (MRPT) libraries (apps C++ libraries)
License: BSD
URL: https://github.com/MRPT/mrpt_ros.git
@@ -249,23 +249,45 @@ export PKG_CONFIG_PATH=/opt/ros/%{ros_distro}/lib/pkgconfig${PKG_CONFIG_PATH:+:$
# 闸门:兄弟库的 cmake config 必须可见。内层对 BUILD_mrpt-*=OFF 的库走
# find_package(mrpt-XXX),找不到只会 Warning + 静默禁用(产出空包);这里把
# 最常见的"漏列 BuildRequires"提前变成可归因失败。
-# ★ 这里的名字必须是**上游 mrpt 库名**,不是 ROS 包装包名:
+# ★ 判据一:这里的名字必须是**上游 mrpt 库名**,不是 ROS 包装包名。
# ros-humble-mrpt-libbase 装出的是 mrpt-core/-config/-io/-system/-rtti/... ——
-# 上游没有 "mrpt-base" 这个库(MRPT 1.x 才叫 base)。build 112607 就是踩在这:
-# `ls .../cmake/mrpt-base/mrpt-base-config.cmake` 对已装好的 libbase 恒为假,
-# 64 秒即在闸门误报"lib* 未装进 buildroot"(实测 rpm -qpl
-# ros-humble-mrpt-libbase-2.15.20-3.aarch64.rpm 只有 mrpt-core 等十个 config)。
-# 同理 mrpt-topography 由 libobs 包提供、mrpt-tclap 由 libtclap 包提供、
-# mrpt-hwdrivers/-comms 由 libhwdrivers、mrpt-slam/-vision 由 libslam、
-# mrpt-maps/-graphs 由 libmaps、mrpt-opengl/-img 由 libopengl、
-# mrpt-poses/-tfest/-bayes 由 libposes —— 包名与库名不同名是常态。
+# 上游没有 "mrpt-base" 这个库(MRPT 1.x 才叫 base)。build 112607 踩在这:
+# `ls .../cmake/mrpt-base/mrpt-base-config.cmake` 对已装好的 libbase 恒为假。
+# 实测定名规则(逐包 rpm -qpl 兄弟包产物):
+# mrpt-core/-config/-io/-system/-rtti/... ← ros-humble-mrpt-libbase
+# mrpt-math ← libmath;mrpt-poses/-tfest/-bayes ← libposes
+# mrpt-opengl/-img ← libopengl;mrpt-obs/-topography ← libobs
+# mrpt-maps/-graphs ← libmaps;mrpt-gui ← libgui;mrpt-slam/-vision ← libslam
+# mrpt-hwdrivers/-comms ← libhwdrivers;mrpt-tclap ← libtclap
+# 包名 ≠ 库名是这条链的常态,新增闸门条目必须用 RPM 产物实证后再写。
+# ★ 判据二:逐路径用 test -f 判定,**绝不能写成 `ls A B`**。ls 只要有一个操作数
+# 不存在就返回 2(即便另一个存在),而各库的安装位置并不统一:实测产物里
+# libbase/libmath/libposes/libopengl/libobs/libmaps/libgui/libslam/libhwdrivers
+# 装在 lib64/cmake/,而 **mrpt-tclap 在 share/cmake/**(mrpt-tclap 无编译产物,
+# 走了 GNUInstallDirs 的另一支)。build 112609 就是踩在这:十个兄弟包全部已
+# installed(COPR installed_pkgs.log 实测),可 `ls lib64/... lib/...` 因第二个
+# 操作数恒不存在而恒返回 2,闸门在 53 秒 100% 误报 —— 闸门本身必须先能证真。
+CONFIG_DIRS="lib64/cmake lib/cmake share/cmake"
+_config_missing=""
for _m in core math poses opengl obs topography maps gui slam hwdrivers tclap; do
- if ! ls /opt/ros/%{ros_distro}/lib64/cmake/mrpt-$_m/mrpt-$_m-config.cmake \
- /opt/ros/%{ros_distro}/lib/cmake/mrpt-$_m/mrpt-$_m-config.cmake >/dev/null 2>&1; then
- echo "ERROR: 未找到 mrpt-$_m 的 cmake config —— 对应 ros-%{ros_distro}-mrpt-lib* 未装进 buildroot" >&2
- exit 1
+ _hit=""
+ for _d in $CONFIG_DIRS; do
+ if [ -f "/opt/ros/%{ros_distro}/$_d/mrpt-$_m/mrpt-$_m-config.cmake" ]; then
+ _hit="/opt/ros/%{ros_distro}/$_d/mrpt-$_m/mrpt-$_m-config.cmake"
+ break
+ fi
+ done
+ if [ -z "$_hit" ]; then
+ _config_missing="$_config_missing mrpt-$_m"
fi
done
+if [ -n "$_config_missing" ]; then
+ echo "ERROR: 未找到上游 mrpt 库的 cmake config:$_config_missing —— 对应 ros-%{ros_distro}-mrpt-lib* 未装进 buildroot(BuildRequires 漏列 / 包名≠库名)" >&2
+ echo "---- buildroot 内实际的 mrpt cmake config(诊断用)----" >&2
+ find /opt/ros/%{ros_distro} -maxdepth 5 -name 'mrpt-*-config.cmake' 2>/dev/null | sort | head -40 >&2
+ exit 1
+fi
+echo "兄弟库 cmake config 全部就位(已按 lib64/lib/share 三种布局探测)"
cd mrpt_libapps
mkdir -p .obj && cd .obj
%cmake3 \
@@ -393,3 +415,26 @@ make install DESTDIR=%{buildroot}
后续再按 ROS 包名写库名。
* BuildRequires/Requires 本身无缺,未做增删;verify_spec_requires.py
仍报 "OK: 36 个依赖…全部有 provider"。
+
+* Tue Sep 22 2026 ai-importer <ai-importer@openeuler.org> - 2.15.20-4
+- %build 兄弟库 cmake config 闸门的**判据形式**缺陷修复(触发面 build_failed,
+ build 112609 在 %build 首条闸门 53 秒即失败,报文为"未找到 mrpt-core 的
+ cmake config"——core 恰好排在列表第一位):
+ * 反证:该次构建 COPR 的 installed_pkgs.log 显示十个兄弟包**全部已
+ installed**(libbase-2.15.20-3 / libmath-3 / libposes-2 / libopengl-2 /
+ libobs-2 / libgui-2 / libmaps-3 / libslam-2 / libhwdrivers-2 / libtclap-1),
+ 且逐包 rpm -qpl 兄弟包产物确认 config 文件确实存在——缺的不是包,是闸门。
+ * 根因一(判据形式):判据写成 `ls <lib64 路径> <lib 路径>`。ls 只要有一个
+ 操作数不存在就返回 2,而 /opt/ros/humble/lib/cmake/mrpt-*/ 根本不存在
+ (逐包 rpm -qpl 实测:十个兄弟包无一在 lib/ 下装 mrpt-*-config.cmake),
+ 故 `if ! ls A B` 对任何 $_m 都恒为真 → 闸门 100% 误报,与包本身无关。
+ * 根因二(安装布局):安装位置不止 lib64/cmake 一处 —— **mrpt-tclap 装在
+ share/cmake/mrpt-tclap/**(mrpt-tclap 无编译产物,GNUInstallDirs 走了
+ share 分支)。即便把 ls 改对,tclap 这一项仍会误报。
+ * 改动:改为对 lib64/cmake、lib/cmake、share/cmake 三种布局逐路径 test -f
+ 探测,全部未命中才判失败;失败时额外 dump buildroot 内实际存在的
+ mrpt-*-config.cmake,便于下一轮直接归因。
+ * 闸门列表(core math poses opengl obs topography maps gui slam hwdrivers
+ tclap)本轮逐条用兄弟包 RPM 产物做了**正例校验**:除 tclap 的 share/
+ 布局外全部命中 lib64/cmake/<名字>/<名字>-config.cmake,无幻觉条目。
+ * BuildRequires/Requires 无缺,未做增删。