summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2026-09-23 06:59:07 +0000
committerCoprDistGit <infra@openeuler.org>2026-09-23 06:59:07 +0000
commitf1a00ba972866be7437692091512d0673c83f1fb (patch)
treecbd49aedf5a5b37deb586a0d8ef4c2dbb507fe3a
parentc3210c52cace7b28650a3986682ebe25ee1b50fc (diff)
automatic import of ros-humble-performance-test
-rw-r--r--.gitignore5
-rw-r--r--performance-test.spec98
-rw-r--r--sources5
3 files changed, 108 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..ff177dd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1,5 @@
+/performance_test-2.3.0.tar.gz
+/rapidjson-v1.1.0.tar.gz
+/sole-1.0.2.tar.gz
+/tabulate-v1.4.tar.gz
+/tclap-1.4.0-rc1.tar.gz
diff --git a/performance-test.spec b/performance-test.spec
new file mode 100644
index 0000000..e642e0c
--- /dev/null
+++ b/performance-test.spec
@@ -0,0 +1,98 @@
+%define ros_distro humble
+%define RosPkgName performance-test
+
+Name: ros-%{ros_distro}-%{RosPkgName}
+Version: 2.3.0
+Release: 1%{?dist}
+Summary: Tool to test performance of ROS2 and DDS data layers and communication
+License: Apache-2.0
+URL: https://gitlab.com/ApexAI/performance_test
+Source0: https://gitlab.com/ApexAI/performance_test/-/archive/2.3.0/performance_test-2.3.0.tar.gz
+# 离线构建外部依赖 tarball(替代 CMakeLists.txt 中 ExternalProject 的 git clone)
+Source1: https://github.com/mirror/tclap/archive/1.4.0-rc1.tar.gz#/tclap-1.4.0-rc1.tar.gz
+Source2: https://github.com/Tencent/rapidjson/archive/v1.1.0.tar.gz#/rapidjson-v1.1.0.tar.gz
+Source3: https://github.com/p-ranav/tabulate/archive/v1.4.tar.gz#/tabulate-v1.4.tar.gz
+Source4: https://github.com/r-lyeh-archived/sole/archive/1.0.2.tar.gz#/sole-1.0.2.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
+BuildRequires: git
+BuildRequires: ros-%{ros_distro}-ament-cmake
+BuildRequires: ros-%{ros_distro}-rclcpp
+BuildRequires: ros-%{ros_distro}-rmw-implementation
+BuildRequires: ros-%{ros_distro}-ros-environment
+BuildRequires: ros-%{ros_distro}-rosidl-default-generators
+BuildRequires: ros-%{ros_distro}-rosidl-default-runtime
+BuildRequires: ros-%{ros_distro}-ros-workspace
+
+# ROS 运行时 Requires(/opt/ros 被 __requires_exclude_from 豁免,必须手写)
+Requires: ros-%{ros_distro}-ros-workspace
+Requires: ros-%{ros_distro}-ament-cmake
+Requires: ros-%{ros_distro}-rclcpp
+Requires: ros-%{ros_distro}-rmw-implementation
+Requires: ros-%{ros_distro}-rosidl-default-runtime
+
+%description
+Tool to test performance of ROS2 and DDS data layers and communication.
+
+%prep
+%setup -q -n performance_test-%{version}
+cd performance_test
+
+# 将 ExternalProject 的 git clone 改为本地 tarball(离线构建)
+# 原始 patch (0-performance-test-change-cmake-download.patch) 的 tclap hunk
+# 因上游 GIT_REPOSITORY URL 已从 sf.net 改为 github.com/mirror 而无法应用,
+# 改用 sed 完成等效修改(4 个 ExternalProject 块统一处理)
+sed -i 's|GIT_REPOSITORY https://github.com/mirror/tclap.git|URL ${CMAKE_SOURCE_DIR}/tclap-1.4.0-rc1.tar.gz|' CMakeLists.txt
+sed -i 's|GIT_REPOSITORY https://github.com/Tencent/rapidjson.git|URL ${CMAKE_SOURCE_DIR}/rapidjson-v1.1.0.tar.gz|' CMakeLists.txt
+sed -i 's|GIT_REPOSITORY https://github.com/p-ranav/tabulate.git|URL ${CMAKE_SOURCE_DIR}/tabulate-v1.4.tar.gz|' CMakeLists.txt
+sed -i 's|GIT_REPOSITORY https://github.com/r-lyeh-archived/sole.git|URL ${CMAKE_SOURCE_DIR}/sole-1.0.2.tar.gz|' CMakeLists.txt
+sed -i '/GIT_TAG/d;/GIT_SHALLOW/d' CMakeLists.txt
+
+# 放置外部依赖 tarball 供 ExternalProject 离线提取
+cp -a %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} .
+cd ..
+
+%build
+# ROS 基座环境(无 ROS 依赖的 buildroot 可能没有 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}
+
+cd performance_test
+mkdir -p .obj && cd .obj
+cmake .. \
+ -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 \
+ -DPERFORMANCE_TEST_PLUGIN="ROS2"
+%make_build
+
+%install
+[ -f /opt/ros/%{ros_distro}/setup.sh ] && source /opt/ros/%{ros_distro}/setup.sh || true
+cd performance_test/.obj
+make install DESTDIR=%{buildroot}
+
+# 虚拟别名兼容依赖方(单包策略,严禁拆实体子包)
+Provides: %{name}-devel = %{version}-%{release}
+Provides: %{name}-doc = %{version}-%{release}
+Provides: %{name}-runtime = %{version}-%{release}
+
+%files
+/opt/ros/%{ros_distro}
+
+%changelog
+* Wed Sep 23 2026 ROS SIG <ros@openeuler.org> - 2.3.0-1
+- 初始打包
diff --git a/sources b/sources
new file mode 100644
index 0000000..a2ebbb1
--- /dev/null
+++ b/sources
@@ -0,0 +1,5 @@
+b59d43a5c5edac1b2e4f1018f6ecd2ab performance_test-2.3.0.tar.gz
+badd12c511e081fec6c89c43a7027bce rapidjson-v1.1.0.tar.gz
+8a4e09a0654474df3252172ba8a8ca99 sole-1.0.2.tar.gz
+10db675225acb499e1b844093738d731 tabulate-v1.4.tar.gz
+4a8bdf295fd50e1dbfba3e78d43e4386 tclap-1.4.0-rc1.tar.gz