# spec for ros-humble-nebula-continental # 源自 tier4/nebula monorepo(commit 8be1ed77),仅构建其中的 nebula_continental colcon 子包 # 严格遵循 /app/.claude/skills/build-rpm/spec-rules-ros.md %define ros_distro humble %define RosPkgName nebula-continental # monorepo main 分支快照(无 tag),记录实际 commit 保证产物可追溯 %global commit 8be1ed775b02985eadafe39b00e0e4fc944114e2 Name: ros-%{ros_distro}-%{RosPkgName} Version: 1.3.1 Release: 1%{?dist} Summary: Nebula Continental ROS Wrapper # package.xml 声明 "Apache 2",规范为 SPDX 标识 License: Apache-2.0 URL: https://github.com/tier4/nebula # GitHub commit 归档:实测(tar tzf)解压根目录为 nebula-(-), # 非纯 SHA——spec-rules-ros §2 的"纯 SHA"经验对本仓不成立,以实测目录名为准 Source0: https://github.com/tier4/nebula/archive/%{commit}.tar.gz # debug 子包无意义(/opt 前缀,strip/debugedit 路径非常规),SIG 模板统一关闭 %global debug_package %{nil} # /opt 下 python 字节码编译会写标准 sitelib 路径,摘掉 brp-python-bytecompile %global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') # ROS 包不做自动依赖扫描(.so 全在 /opt/ros 下,由 ament 间接依赖模型替代) %global __provides_exclude_from ^/opt/ros/%{ros_distro}/.*$ %global __requires_exclude_from ^/opt/ros/%{ros_distro}/.*$ BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: make # 构建工具(package.xml ) # ament_cmake 形态构建工具 BuildRequires: ros-%{ros_distro}-ament-cmake # 提供 autoware_package() 宏(ros-upstream.list,SIG 未移植但 rosdistro 真实存在) BuildRequires: ros-%{ros_distro}-autoware-cmake BuildRequires: ros-%{ros_distro}-ros-environment BuildRequires: ros-%{ros_distro}-ros-testing # package.xml —— ROS humble 标准包(ros-projects.list,SIG 已移植) BuildRequires: ros-%{ros_distro}-diagnostic-msgs BuildRequires: ros-%{ros_distro}-diagnostic-updater BuildRequires: ros-%{ros_distro}-geometry-msgs BuildRequires: ros-%{ros_distro}-message-filters BuildRequires: ros-%{ros_distro}-radar-msgs BuildRequires: ros-%{ros_distro}-rclcpp BuildRequires: ros-%{ros_distro}-rclcpp-components BuildRequires: ros-%{ros_distro}-sensor-msgs BuildRequires: ros-%{ros_distro}-tf2-ros BuildRequires: ros-%{ros_distro}-visualization-msgs # package.xml —— autoware / tier4 外部包(ros-upstream.list,rosdistro 真实存在) BuildRequires: ros-%{ros_distro}-autoware-sensing-msgs BuildRequires: ros-%{ros_distro}-sync-tooling-msgs # package.xml —— nebula monorepo 兄弟子包(batch reused,COPR project / additional_repos 同源解析) # nebula_core_ros 提供 nebula_agnocast_wrapper_register_node cmake 宏 # 注:nebula_continental_hw_interfaces 不再 BuildRequire reuse 兄弟包——该包 # (ROS-humble-3 build 112448) 的 Requires 错误用了下划线 ros-humble-nebula_msgs, # 拉入 eulermaker 旧版 1.1.1-4,与 COPR 连字符 1.2.0-1 文件冲突(build 113809 # Transaction test error)。改为从 monorepo 源码同包构建,见构建阶段。 BuildRequires: ros-%{ros_distro}-continental-msgs BuildRequires: ros-%{ros_distro}-continental-srvs BuildRequires: ros-%{ros_distro}-nebula-continental-common BuildRequires: ros-%{ros_distro}-nebula-continental-decoders BuildRequires: ros-%{ros_distro}-nebula-core-common BuildRequires: ros-%{ros_distro}-nebula-core-hw-interfaces BuildRequires: ros-%{ros_distro}-nebula-core-ros BuildRequires: ros-%{ros_distro}-nebula-msgs # 系统库(package.xml yaml-cpp,openEuler 名 yaml-cpp-devel,dnf 实证存在) BuildRequires: yaml-cpp-devel # 注:agnocast_components 为条件依赖(package.xml condition="$ENABLE_AGNOCAST == 1", # CMakeLists 同样以 if("$ENV{ENABLE_AGNOCAST}") 守卫),默认未启用故不写 BuildRequires。 # 运行时 Requires(ROS 特有三件套,§6:/opt/ros 被 __requires_exclude_from 豁免,autodeps 扫不到) Requires: ros-%{ros_distro}-ros-workspace Requires: ros-%{ros_distro}-ament-cmake # package.xml 的运行时部分 Requires: ros-%{ros_distro}-autoware-sensing-msgs Requires: ros-%{ros_distro}-continental-msgs Requires: ros-%{ros_distro}-continental-srvs Requires: ros-%{ros_distro}-diagnostic-msgs Requires: ros-%{ros_distro}-diagnostic-updater Requires: ros-%{ros_distro}-geometry-msgs Requires: ros-%{ros_distro}-message-filters Requires: ros-%{ros_distro}-nebula-continental-common Requires: ros-%{ros_distro}-nebula-continental-decoders Requires: ros-%{ros_distro}-nebula-core-common Requires: ros-%{ros_distro}-nebula-core-ros Requires: ros-%{ros_distro}-nebula-msgs Requires: ros-%{ros_distro}-radar-msgs Requires: ros-%{ros_distro}-rclcpp Requires: ros-%{ros_distro}-rclcpp-components Requires: ros-%{ros_distro}-sensor-msgs Requires: ros-%{ros_distro}-sync-tooling-msgs Requires: ros-%{ros_distro}-tf2-ros Requires: ros-%{ros_distro}-visualization-msgs # 单包策略(§7):ROS 包严禁拆实体子包,用虚拟别名兼容依赖方 Provides: %{name}-devel = %{version}-%{release} Provides: %{name}-doc = %{version}-%{release} Provides: %{name}-runtime = %{version}-%{release} # hw_interfaces 从源码同包构建(见构建阶段),虚拟别名满足依赖方解析 Provides: ros-%{ros_distro}-nebula-continental-hw-interfaces = %{version}-%{release} %description Nebula Continental ROS Wrapper —— Nebula 多雷达驱动框架中面向 Continental ARS548 / SRR520 雷达的 ROS 2 封装节点,提供雷达数据解码、硬件接口与 ROS 组件 化封装(rclcpp_components)。基于 ament_cmake 构建,产物安装至 /opt/ros/%{ros_distro} 前缀。 本包源自 tier4/nebula monorepo(commit 8be1ed77),仅构建其中的 nebula_continental colcon 子包;monorepo 其余 colcon 包由各自独立 RPM 提供。 %prep # 实测(tar tzf)解压根目录为 nebula-,与 -n 指定值匹配(§2 实测纪律) # build 113815 实踩:%autosetup -n %{commit}(纯 SHA)致 %prep cd 失败,改为 nebula-%{commit} %autosetup -n nebula-%{commit} %build # ROS 基座环境(§4:setup.sh 可能不存在,用 [ -f ] 守卫) [ -f /opt/ros/%{ros_distro}/setup.sh ] && source /opt/ros/%{ros_distro}/setup.sh || true export PYTHONPATH=/opt/ros/%{ros_distro}/lib/python%{python3_version}/site-packages${PYTHONPATH:+:$PYTHONPATH} export PKG_CONFIG_PATH=/opt/ros/%{ros_distro}/lib/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH} # 1. 先构建 nebula_continental_hw_interfaces(从源码同包构建,避开 reuse 兄弟包 # ros-humble-nebula_msgs 下划线命名冲突——该兄弟包 Requires 用了 # ros-humble-nebula_msgs 下划线名,拉入 eulermaker 旧版 1.1.1-4,与 COPR # 连字符 1.2.0-1 文件冲突) cd src/nebula_continental/nebula_continental_hw_interfaces mkdir -p .obj cd .obj %cmake3 \ -DCMAKE_INSTALL_PREFIX="/opt/ros/%{ros_distro}" \ -DAMENT_PREFIX_PATH="/opt/ros/%{ros_distro}" \ -DCMAKE_PREFIX_PATH="/opt/ros/%{ros_distro}" \ -UINCLUDE_INSTALL_DIR -ULIB_INSTALL_DIR -USYSCONF_INSTALL_DIR -USHARE_INSTALL_PREFIX -ULIB_SUFFIX \ -DSETUPTOOLS_DEB_LAYOUT=OFF \ -DBUILD_TESTING=OFF \ -DTESTING=OFF \ -DCMAKE_SUPPRESS_REGENERATION=ON \ .. make %{?_smp_mflags} # 安装到 /opt/ros(非 DESTDIR),让后续 nebula_continental 的 find_package 能发现 make install # 2. 重新 source ROS 环境,纳入新装的 hw_interfaces source /opt/ros/%{ros_distro}/setup.sh || true # 3. 构建 nebula_continental(依赖上一步本地安装的 hw_interfaces) cd ../../nebula_continental mkdir -p .obj cd .obj %cmake3 \ -DCMAKE_INSTALL_PREFIX="/opt/ros/%{ros_distro}" \ -DAMENT_PREFIX_PATH="/opt/ros/%{ros_distro}" \ -DCMAKE_PREFIX_PATH="/opt/ros/%{ros_distro}" \ -UINCLUDE_INSTALL_DIR -ULIB_INSTALL_DIR -USYSCONF_INSTALL_DIR -USHARE_INSTALL_PREFIX -ULIB_SUFFIX \ -DSETUPTOOLS_DEB_LAYOUT=OFF \ -DBUILD_TESTING=OFF \ -DTESTING=OFF \ -DCMAKE_SUPPRESS_REGENERATION=ON \ .. make %{?_smp_mflags} %install # 安装 hw_interfaces 到 buildroot cd src/nebula_continental/nebula_continental_hw_interfaces/.obj make install DESTDIR=%{buildroot} # 安装 nebula_continental 到 buildroot cd ../../nebula_continental/.obj make install DESTDIR=%{buildroot} # 文件清单整树拥有(§7:单包策略,ros_distro 前缀一行收尾,对「装了没打包」类错误免疫) %files /opt/ros/%{ros_distro} %changelog * Wed Oct 21 2026 AI Importer - 1.3.1-1 - 修复 build 113815 %prep cd 失败:%autosetup -n 由 %{commit}(纯 SHA)改为 nebula-%{commit}。实测(tar tzf 下载归档)GitHub tier4/nebula 的 archive/.tar.gz 解压根目录为 nebula-(-), 非 spec-rules-ros §2 所述"纯完整 SHA"——该经验对本仓不成立,以实测目录名为准 - 修复 build 113809 事务冲突:reuse 兄弟包 ros-humble-nebula-continental-hw-interfaces (ROS-humble-3 build 112448) 的 Requires 错用下划线 ros-humble-nebula_msgs, 拉入 eulermaker 旧版 1.1.1-4 与 COPR 连字符 1.2.0-1 文件冲突 - 改为从 monorepo 源码同包构建 nebula_continental_hw_interfaces,移除对该兄弟 包的 BuildRequires/Requires,加 Provides 虚拟别名满足依赖方 - 新增 BuildRequires: ros-humble-nebula-core-hw-interfaces(hw_interfaces 的 ament 依赖,该包 Requires 干净无下划线命名问题) - 初始引入 ros-humble-nebula-continental(nebula_continental colcon 子包) - 源自 tier4/nebula monorepo,commit 8be1ed775b02985eadafe39b00e0e4fc944114e2 - ament_cmake 形态,构建至 /opt/ros/humble 前缀