From 8127b39736a5ca6844214ada99b529f92b004065 Mon Sep 17 00:00:00 2001 From: will_niutao Date: Thu, 11 May 2023 21:28:33 +0800 Subject: [PATCH 01/22] feat: add gen-pkg-py-bb.sh --- gen-pkg-bb.sh | 6 +- gen-pkg-py-bb.sh | 149 +++++++++++++++++++++++++++++++++++++++++ humble/spec_to_bb.list | 2 + 3 files changed, 154 insertions(+), 3 deletions(-) create mode 100755 gen-pkg-py-bb.sh create mode 100644 humble/spec_to_bb.list diff --git a/gen-pkg-bb.sh b/gen-pkg-bb.sh index eead0b9..eb65d4c 100755 --- a/gen-pkg-bb.sh +++ b/gen-pkg-bb.sh @@ -106,14 +106,14 @@ gen_src_url() for tarball in `cd ${ROS_PACKAGE_FIX}/${pkg} && ls | grep -v "\.fix" | grep -v "\.patch"` do - echo " file://${tarball} \\" >> $bbfile + echo " file://\${OPENEULER_LOCAL_NAME}/${tarball} \\" >> $bbfile done if [ -f ${ROS_PACKAGE_FIX}/${pkg}/source.fix ] then - for patch in `grep "^Patch.*: " ${ROS_PACKAGE_FIX}/${pkg}/source.fix | cut -d':' -f2` + for patch in `grep "^Patch.*: " ${ROS_PACKAGE_FIX}/${pkg}/source.fix | awk '{print $2}'` do - echo " file://${patch} \\" >> $bbfile + echo " file://\${OPENEULER_LOCAL_NAME}/${patch} \\" >> $bbfile done fi diff --git a/gen-pkg-py-bb.sh b/gen-pkg-py-bb.sh new file mode 100755 index 0000000..daa041b --- /dev/null +++ b/gen-pkg-py-bb.sh @@ -0,0 +1,149 @@ +#!/bin/bash + +. base.sh + +GEN_ONE=$1 + +SPEC_TO_BB_LIST=${ROS_DISTRO}/spec_to_bb.list +BB_DEVTOOLS_BASE=${ROS_BB_BASE}/recipes-devtools +BB_EXTERNAL_BASE=${ROS_BB_BASE}/recipes-external +BB_TMP_BASE=${ROS_BB_BASE}/.tmp + +prepare() +{ + if [ ! -f ${SPEC_TO_BB_LIST} ] + then + error_log "Can not find ${SPEC_TO_BB_LIST}." + exit 1 + fi + + if [ "$GEN_ONE" == "" ] + then + rm -rf ${BB_DEVTOOLS_BASE} + rm -rf ${BB_EXTERNAL_BASE} + fi + + mkdir -p ${BB_DEVTOOLS_BASE}/python + mkdir -p ${BB_EXTERNAL_BASE} + mkdir -p ${BB_TMP_BASE} +} + +gen_single_line_config() +{ + spec=$1 + bbfile=$2 + prefix=$3 + config_key=$4 + + ret=`grep -i "^${prefix}" $spec | head -1` + if [ "$ret" == "" ] + then + error_log "${config_key} is null." + fi + echo "${config_key} = \"$ret\"" >> $bbfile +} +main() +{ + prepare + + info_log "Start to generate bb file." + + while read package_name package_type is_native bbfile_name spec_url source_name + do + grep -q "^#" ${package_type} && continue + [ "$GEN_ONE" != "" -a "$package_name" != "$GEN_ONE" ] && continue + + if [ "${package_name}" == "" -o "${package_type}" == "" -o "${is_native}" == "" -o "${bbfile_name}" == "" -o "${spec_url}" == "" ] + then + error_log "configuration of $package_name is incomplete." + continue + fi + + info_log "start to generate bbfile for $package_name" + + if [ "$is_native" == "yes" -a "$package_type" == "python" ] + then + bbfile=${BB_DEVTOOLS_BASE}/python/${bbfile_name}.bb + elif [ "$is_native" == "yes" -a "$package_type" == "cmake" ] + then + bbfile=${BB_DEVTOOLS_BASE}/${bbfile_name}.bb + else + bbfile=${BB_EXTERNAL_BASE}/${bbfile_name}.bb + fi + + wget --no-check-certificate -q --show-progress --progress=bar:force 2>&1 -c -P ${BB_TMP_BASE} ${spec_url} + + #the format of spec_url must be like https://gitee.com/src-openeuler/catkin_pkg/raw/master/catkin-pkg.spec + spec_name=`echo $spec_url | cut -d'/' -f8` + branch=`echo $spec_url | cut -d'/' -f7` + repo=`echo $spec_url | cut -d'/' -f5` + git_url=`echo $spec_url | awk -F'/' '${print $1"//"$2"/"$3"/"$4}'` + spec=${BB_TMP_BASE}/$spec_name + + if [ ! -f $spec ] + then + error_log "download spec error, $spec_url" + continue + fi + + echo "PN = \"${package_name}\"" >> $bbfile + + gen_single_line_config $spec $bbfile "Summary:" "DESCRIPTION" + gen_single_line_config $spec $bbfile "URL:" "HOMEPAGE" + gen_single_line_config $spec $bbfile "License:" "LICENSE" + echo "LIC_FILES_CHKSUM = \"\"" >> $bbfile + gen_single_line_config $spec $bbfile "Version:" "PV" + echo "" >> $bbfile + + if [ "$package_type" == "" ] + then + echo "inherit pypi setuptools3" >> $bbfile + echo "" >> $bbfile + echo "PYPI_PACKAGE = \"${package_name}\"" >> $bbfile + echo "" >> $bbfile + fi + + echo "OPENEULER_GIT_URL = \"${git_url}\"" >> $bbfile + echo "OPENEULER_REPO_NAME = \"${repo}\"" >> $bbfile + echo 'OPENEULER_LOCAL_NAME = "${OPENEULER_REPO_NAME}"' >> $bbfile + echo "OPENEULER_BRANCH = \"${branch}\"" >> $bbfile + echo " >> $bbfile + + echo "SRC_URI = \" \\" >> $bbfile + if [ "$source_name" == "" ] + then + src_name=`grep "Source0:" $spec | head -1 | awk '{print $2}'` + else + src_name=$source_name + fi + echo " file://${OPENEULER_LOCAL_NAME}/${src_name} \\" >> $bbfile + + for patch in `grep "^Patch.*: " $spec | awk '{print $2}'` + do + echo " file://\${OPENEULER_LOCAL_NAME}/${patch} \\" >> $bbfile + done + + echo "\"" >> $bbfile + echo "S = \"${WORKDIR}/${PN}-${PV}\"" >> $bbfile + echo "" >> $bbfile + + echo "DEPENDS += \" \\" >> $bbfile + grep "^BuildRequires:" $spec | awk '{print $2}' | sed -e 's#$#-native \\#g' >> $bbfile + echo "\"" >> $bbfile + echo "" >> $bbfile + + echo "RDEPENDS_\${PN} += \" \\" >> $bbfile + grep "^Requires:" $spec | awk '{print $2}' | sed -e 's#$#-native \\#g' >> $bbfile + echo "\"" >> $bbfile + echo "" >> $bbfile + + if [ "$is_native" == "yes" ] + then + echo "BBCLASSEXTEND = \"native nativesdk\"" >> $bbfile + fi + done < ${SPEC_TO_BB_LIST} + + info_log "Gen bb files done, you can find it in ${ROS_BB_BASE}" +} + +main $* diff --git a/humble/spec_to_bb.list b/humble/spec_to_bb.list new file mode 100644 index 0000000..03c8ebd --- /dev/null +++ b/humble/spec_to_bb.list @@ -0,0 +1,2 @@ +#package_name package_type is_native bbfile_name spec_url source_name +python3-catkin_pkg python yes python3-catkin-pkg https://gitee.com/will_niutao/catkin_pkg/raw/catkin-pkg.spec 0.5.2.tar.gz -- Gitee From ab4443cbf110d04d356aad62d3e60d6494c169bf Mon Sep 17 00:00:00 2001 From: will_niutao Date: Thu, 11 May 2023 22:26:59 +0800 Subject: [PATCH 02/22] fix py-bb error --- gen-pkg-py-bb.sh | 39 +++++++++++++++++++++++++++------------ humble/spec_to_bb.list | 4 +++- 2 files changed, 30 insertions(+), 13 deletions(-) diff --git a/gen-pkg-py-bb.sh b/gen-pkg-py-bb.sh index daa041b..2e86ab9 100755 --- a/gen-pkg-py-bb.sh +++ b/gen-pkg-py-bb.sh @@ -35,13 +35,27 @@ gen_single_line_config() prefix=$3 config_key=$4 - ret=`grep -i "^${prefix}" $spec | head -1` + ret=`grep -i "^${prefix}" $spec | head -1 | awk -F"${prefix}" '{print $2}' | awk '$1=$1'` if [ "$ret" == "" ] then error_log "${config_key} is null." fi echo "${config_key} = \"$ret\"" >> $bbfile } + +gen_license() +{ + spec=$1 + bbfile=$2 + + ret=`grep -i "^License:" $spec | head -1 | awk -F":" '{print $2}' | awk '$1=$1' | sed -e 's#and#\&#g'` + if [ "$ret" == "" ] + then + error_log "license is null." + fi + echo "LICENSE = \"$ret\"" >> $bbfile + echo "LIC_FILES_CHKSUM = \"\"" >> $bbfile +} main() { prepare @@ -50,7 +64,7 @@ main() while read package_name package_type is_native bbfile_name spec_url source_name do - grep -q "^#" ${package_type} && continue + echo "${package_name}" | grep -q "^#" && continue [ "$GEN_ONE" != "" -a "$package_name" != "$GEN_ONE" ] && continue if [ "${package_name}" == "" -o "${package_type}" == "" -o "${is_native}" == "" -o "${bbfile_name}" == "" -o "${spec_url}" == "" ] @@ -77,7 +91,7 @@ main() spec_name=`echo $spec_url | cut -d'/' -f8` branch=`echo $spec_url | cut -d'/' -f7` repo=`echo $spec_url | cut -d'/' -f5` - git_url=`echo $spec_url | awk -F'/' '${print $1"//"$2"/"$3"/"$4}'` + git_url=`echo $spec_url | awk -F'/' '{print $1"//"$2"/"$3"/"$4}'` spec=${BB_TMP_BASE}/$spec_name if [ ! -f $spec ] @@ -86,18 +100,17 @@ main() continue fi - echo "PN = \"${package_name}\"" >> $bbfile + echo "PN = \"${package_name}\"" > $bbfile gen_single_line_config $spec $bbfile "Summary:" "DESCRIPTION" gen_single_line_config $spec $bbfile "URL:" "HOMEPAGE" - gen_single_line_config $spec $bbfile "License:" "LICENSE" - echo "LIC_FILES_CHKSUM = \"\"" >> $bbfile + gen_license $spec $bbfile gen_single_line_config $spec $bbfile "Version:" "PV" echo "" >> $bbfile + echo "inherit pypi setuptools3" >> $bbfile if [ "$package_type" == "" ] then - echo "inherit pypi setuptools3" >> $bbfile echo "" >> $bbfile echo "PYPI_PACKAGE = \"${package_name}\"" >> $bbfile echo "" >> $bbfile @@ -107,7 +120,7 @@ main() echo "OPENEULER_REPO_NAME = \"${repo}\"" >> $bbfile echo 'OPENEULER_LOCAL_NAME = "${OPENEULER_REPO_NAME}"' >> $bbfile echo "OPENEULER_BRANCH = \"${branch}\"" >> $bbfile - echo " >> $bbfile + echo "" >> $bbfile echo "SRC_URI = \" \\" >> $bbfile if [ "$source_name" == "" ] @@ -116,7 +129,7 @@ main() else src_name=$source_name fi - echo " file://${OPENEULER_LOCAL_NAME}/${src_name} \\" >> $bbfile + echo " file://\${OPENEULER_LOCAL_NAME}/${src_name} \\" >> $bbfile for patch in `grep "^Patch.*: " $spec | awk '{print $2}'` do @@ -124,22 +137,24 @@ main() done echo "\"" >> $bbfile - echo "S = \"${WORKDIR}/${PN}-${PV}\"" >> $bbfile + echo 'S = "${WORKDIR}/${PN}-${PV}"' >> $bbfile echo "" >> $bbfile echo "DEPENDS += \" \\" >> $bbfile - grep "^BuildRequires:" $spec | awk '{print $2}' | sed -e 's#$#-native \\#g' >> $bbfile + grep "^BuildRequires:" $spec | awk '{print $2}' | sed -e 's#$#-native \\#g' -e 's#^# #g' >> $bbfile echo "\"" >> $bbfile echo "" >> $bbfile echo "RDEPENDS_\${PN} += \" \\" >> $bbfile - grep "^Requires:" $spec | awk '{print $2}' | sed -e 's#$#-native \\#g' >> $bbfile + grep "^Requires:" $spec | awk '{print $2}' | sed -e 's#$# \\#g' -e 's#^# #g' >> $bbfile echo "\"" >> $bbfile echo "" >> $bbfile if [ "$is_native" == "yes" ] then echo "BBCLASSEXTEND = \"native nativesdk\"" >> $bbfile + else + echo "BBCLASSEXTEND = \"native\"" >> $bbfile fi done < ${SPEC_TO_BB_LIST} diff --git a/humble/spec_to_bb.list b/humble/spec_to_bb.list index 03c8ebd..ff5956c 100644 --- a/humble/spec_to_bb.list +++ b/humble/spec_to_bb.list @@ -1,2 +1,4 @@ #package_name package_type is_native bbfile_name spec_url source_name -python3-catkin_pkg python yes python3-catkin-pkg https://gitee.com/will_niutao/catkin_pkg/raw/catkin-pkg.spec 0.5.2.tar.gz +python3-importlib-resources python yes python3-importlib-resources https://gitee.com/src-openeuler/python-importlib-resources/raw/openEuler-22.03-LTS-SP1/python-importlib-resources.spec import_resources-5.4.0.tar.gz +python3-catkin_pkg python yes python3-catkin-pkg https://gitee.com/will_niutao/catkin_pkg/raw/master/catkin-pkg.spec 0.5.2.tar.gz +python3-sphinx python no python3-sphinx https://gitee.com/src-openeuler/python-sphinx/raw/openEuler-22.03-LTS-SP1/python-sphinx.spec Sphinx-4.4.0.tar.gz -- Gitee From 80bc83191cb7b14659a99432077ad1b8c2c39f6f Mon Sep 17 00:00:00 2001 From: will_niutao Date: Sat, 13 May 2023 00:00:46 +0800 Subject: [PATCH 03/22] refactor: use spec Requires as DEPENDS, BuildRequires as RDEPENDS --- bb_fix/pkg.remap | 1 + bb_fix/python3-flake8.RDepends | 1 + .../0001-python-mccabe-fix-no-pip-error.patch | 48 +++++ bb_fix/python3-sphinx.Depends | 13 ++ bb_fix/python3-sphinx.RDepends | 6 + bb_fix/ros-workspace/ros-workspace.bbappend | 6 + gen-pkg-bb.sh | 122 ++++++++---- gen-pkg-py-bb.sh | 176 ++++++++++++++---- get-license.py | 1 + humble/spec_to_bb.list | 12 +- 10 files changed, 310 insertions(+), 76 deletions(-) create mode 100644 bb_fix/pkg.remap create mode 100644 bb_fix/python3-flake8.RDepends create mode 100644 bb_fix/python3-mccabe/files/0001-python-mccabe-fix-no-pip-error.patch create mode 100644 bb_fix/python3-sphinx.Depends create mode 100644 bb_fix/python3-sphinx.RDepends create mode 100644 bb_fix/ros-workspace/ros-workspace.bbappend diff --git a/bb_fix/pkg.remap b/bb_fix/pkg.remap new file mode 100644 index 0000000..36cfb2d --- /dev/null +++ b/bb_fix/pkg.remap @@ -0,0 +1 @@ +python3-setuptools_scm python3-setuptools-scm diff --git a/bb_fix/python3-flake8.RDepends b/bb_fix/python3-flake8.RDepends new file mode 100644 index 0000000..840b851 --- /dev/null +++ b/bb_fix/python3-flake8.RDepends @@ -0,0 +1 @@ +-python3-mccabe diff --git a/bb_fix/python3-mccabe/files/0001-python-mccabe-fix-no-pip-error.patch b/bb_fix/python3-mccabe/files/0001-python-mccabe-fix-no-pip-error.patch new file mode 100644 index 0000000..b9ac983 --- /dev/null +++ b/bb_fix/python3-mccabe/files/0001-python-mccabe-fix-no-pip-error.patch @@ -0,0 +1,48 @@ +diff -Naur mccabe-0.6.1_org/mccabe.egg-info/PKG-INFO mccabe-0.6.1/mccabe.egg-info/PKG-INFO +--- mccabe-0.6.1_org/mccabe.egg-info/PKG-INFO 2023-05-12 11:34:54.601426524 +0800 ++++ mccabe-0.6.1/mccabe.egg-info/PKG-INFO 2023-05-12 11:35:35.570675016 +0800 +@@ -19,9 +19,9 @@ + + You can install, upgrade, uninstall ``mccabe`` with these commands:: + +- $ pip install mccabe +- $ pip install --upgrade mccabe +- $ pip uninstall mccabe ++ $ pip3 install mccabe ++ $ pip3 install --upgrade mccabe ++ $ pip3 uninstall mccabe + + + Standalone script +diff -Naur mccabe-0.6.1_org/PKG-INFO mccabe-0.6.1/PKG-INFO +--- mccabe-0.6.1_org/PKG-INFO 2023-05-12 11:34:54.601426524 +0800 ++++ mccabe-0.6.1/PKG-INFO 2023-05-12 11:35:35.570675016 +0800 +@@ -19,9 +19,9 @@ + + You can install, upgrade, uninstall ``mccabe`` with these commands:: + +- $ pip install mccabe +- $ pip install --upgrade mccabe +- $ pip uninstall mccabe ++ $ pip3 install mccabe ++ $ pip3 install --upgrade mccabe ++ $ pip3 uninstall mccabe + + + Standalone script +diff -Naur mccabe-0.6.1_org/README.rst mccabe-0.6.1/README.rst +--- mccabe-0.6.1_org/README.rst 2023-05-12 11:34:54.601426524 +0800 ++++ mccabe-0.6.1/README.rst 2023-05-12 11:35:35.570675016 +0800 +@@ -11,9 +11,9 @@ + + You can install, upgrade, uninstall ``mccabe`` with these commands:: + +- $ pip install mccabe +- $ pip install --upgrade mccabe +- $ pip uninstall mccabe ++ $ pip3 install mccabe ++ $ pip3 install --upgrade mccabe ++ $ pip3 uninstall mccabe + + + Standalone script diff --git a/bb_fix/python3-sphinx.Depends b/bb_fix/python3-sphinx.Depends new file mode 100644 index 0000000..e36b3d1 --- /dev/null +++ b/bb_fix/python3-sphinx.Depends @@ -0,0 +1,13 @@ +-python3-sphinxcontrib-applehelp +-python3-sphinxcontrib-devhelp +-python3-sphinxcontrib-htmlhelp +-python3-sphinxcontrib-jsmath +-python3-sphinxcontrib-qthelp +-python3-sphinxcontrib-serializinghtml +-python3-sphinx-theme-alabaster +-python3-test +-python3-imagesize +-python3-snowballstemmer +-python3-mock +-graphviz +-dos2unix diff --git a/bb_fix/python3-sphinx.RDepends b/bb_fix/python3-sphinx.RDepends new file mode 100644 index 0000000..b300945 --- /dev/null +++ b/bb_fix/python3-sphinx.RDepends @@ -0,0 +1,6 @@ +-python-sphinx-locale +-python3-babel +-python3-snowballstemmer +-python3-imagesize +-environment(modules) +-python(Sphinx) diff --git a/bb_fix/ros-workspace/ros-workspace.bbappend b/bb_fix/ros-workspace/ros-workspace.bbappend new file mode 100644 index 0000000..f3e22ab --- /dev/null +++ b/bb_fix/ros-workspace/ros-workspace.bbappend @@ -0,0 +1,6 @@ +FILES:${PN}:prepend = " \ + ${ros_prefix}/*.py \ + ${ros_prefix}/*.sh \ + ${ros_prefix}/*.bash \ + ${ros_prefix}/*.zsh \ +" diff --git a/gen-pkg-bb.sh b/gen-pkg-bb.sh index eb65d4c..da9a04d 100755 --- a/gen-pkg-bb.sh +++ b/gen-pkg-bb.sh @@ -4,6 +4,8 @@ GEN_ONE=$1 +BB_FIX=${ROOT}/bb_fix +BB_FIX_PKG_REMAP=${BB_FIX}/pkg.remap ROS_PKG_SRC=${OUTPUT}/ros-pkg-src.list ROS_PACKAGE_FIX=${ROOT}/package_fix ROS_PKG_REMAP=${ROOT}/spec_fix/pkg.remap @@ -117,10 +119,24 @@ gen_src_url() done fi + [ ! -d ${BB_FIX}/$pkg ] && echo "\"" >> $bbfile && return + + pkg_bb_dir=`dirname "$bbfile"` + + cp ${BB_FIX}/$pkg/* ${pkg_bb_dir} + + for patch in `cd ${BB_FIX}/$pkg/files 2>/dev/null && ls *.patch` + do + echo " file://${patch} \\" >> $bbfile + done + echo "\"" >> $bbfile echo "" >> $bbfile } +# rename the ros origin dependence package name(same this ubuntu) to openEuler, +# such as in ubuntu system, the develop package name of assimp is assimp-dev, +# but in openEuler system, the name is assimp-devel. rename_requires() { require_file=$1 @@ -131,6 +147,19 @@ rename_requires() done <${ROS_PKG_REMAP} } +# rename the openEuler rpm package name to openEuler embedded package name, +# such as in openEuler Server system, the name of python package setuptools_scm is +# python3-setuptools_scm, but in openEuler embedded system, the name is +# python3-setuptools-scm(bcauses the bbfile name use _ to split package name and version). +rename_depend() +{ + require_file=$1 + + while read rpm_pkg bb_pkg + do + sed -i "s#^${rpm_pkg}\$#${bb_pkg}#g" $require_file + done <${BB_FIX_PKG_REMAP} +} spec_fix() { pkg=$1 @@ -155,55 +184,75 @@ spec_fix() grep "^\+" $spec_fix_file | sed -e "s#^\+##g" >> ${require_file} } +# fix DEPENDS and RDEPENDS +bb_fix() +{ + require_file=$1 + bb_deps_suffix=$2 + + [ ! -f ${BB_FIX}/${bbfile_name}.${bb_deps_suffix} ] && return + + for dep in `grep "^\-" ${BB_FIX}/${bbfile_name}.${bb_deps_suffix} | sed -e 's#^\-##g'` + do + sed -i "/^${dep}\$/d" $require_file + done + + for dep in `grep "^\+" ${BB_FIX}/${bbfile_name}.${bb_deps_suffix} | sed -e 's#^\+##g'` + do + echo "$dep" >> $require_file + done +} + gen_each_depend() { pkg=$1 - depend_name=$2 - deps_suffix=$3 - spec_fix_type=$4 - bbfile=$5 + bb_deps_suffix=$2 + spec_deps_suffix=$3 + bbfile=$4 - debug_log "gen ${depend_name}" + debug_log "gen ${bb_deps_suffix}" - package_xml_deps=${ROS_DEPS_BASE}/$pkg-${deps_suffix} + package_xml_deps=${ROS_DEPS_BASE}/$pkg-${spec_deps_suffix} require_file=${OUTPUT}/.tempDepends rm -f ${require_file} - [ -f ${package_xml_deps} ] && cp ${package_xml_deps} ${require_file} - spec_fix $pkg $spec_fix_type $require_file + if [ -f ${package_xml_deps} ] + then + if [ "$bb_deps_suffix" == "TDepends" ] + then + cat ${package_xml_deps} | sed -e "s#^BuildRequires: ##g" > ${require_file} + else + cat ${package_xml_deps} | sed -e "s#^${spec_deps_suffix}: ##g" > ${require_file} + fi + fi + + spec_fix $pkg $spec_deps_suffix $require_file if [ ! -f ${require_file} ] then - echo "$depend_name = \" \\" >> $bbfile - echo "\"" >> $bbfile - echo "" >> $bbfile return fi - - rename_requires $require_file - - echo "$depend_name = \" \\" >> $bbfile + sed -i 's#ros-%{ros_distro}-##g' $require_file + if [ "$pkg" != "ament-cmake-core" -a "$pkg" != "ament-package" -a "$pkg" != "ros-workspace" ] then - if [ "$depend_name" == "ROS_BUILD_DEPENDS" -o "$depend_name" == "ROS_EXEC_DEPENDS" ] - then - echo "ros-workspace" >> $require_file - fi + echo "ros-workspace" >> $require_file fi - if [ "$depend_name" == "ROS_BUILDTOOL_DEPENDS" -o "$depend_name" == "ROS_BUILDTOOL_EXPORT_DEPENDS" ] + rename_requires $require_file + rename_depend $require_file + bb_fix $require_file $bb_deps_suffix + + if [ "$bb_deps_suffix" == "Depends" ] then cat $require_file >> ${ROS_NATIVE_PKGS_TMP1} - cat $require_file | sed -e 's#$#-native \\#g' -e 's#^# #g' >> $bbfile + cat $require_file | sed -e 's#-devel$##g' -e 's#$#-native \\#g' -e 's#^# #g' >> $bbfile else - cat $require_file | sed -e 's#$# \\#g' -e 's#^# #g' >> $bbfile + cat $require_file | sed -e 's#-devel$##g' -e 's#$# \\#g' -e 's#^# #g' >> $bbfile fi - - echo "\"" >> $bbfile - echo "" >> $bbfile } gen_depends() @@ -211,19 +260,24 @@ gen_depends() pkg=$1 bbfile=$2 - gen_each_depend $pkg ROS_BUILD_DEPENDS BuildDepends BuildRequires $bbfile - gen_each_depend $pkg ROS_BUILD_EXPORT_DEPENDS BuildExportDepends BuildRequires $bbfile - gen_each_depend $pkg ROS_BUILDTOOL_DEPENDS BuildToolDepends BuildRequires $bbfile - gen_each_depend $pkg ROS_BUILDTOOL_EXPORT_DEPENDS BuildToolExportDepends BuildRequires $bbfile - gen_each_depend $pkg ROS_EXEC_DEPENDS ExecDepends Requires $bbfile - gen_each_depend $pkg ROS_TEST_DEPENDS TestDepends test-BuildRequires $bbfile + echo 'DEPENDS = "\' >> $bbfile + gen_each_depend $pkg Depends BuildRequires $bbfile + echo '"' >> $bbfile + echo "" >> $bbfile + + echo 'RDEPENDS:${PN} += "\' >> $bbfile + gen_each_depend $pkg RDepends Requires $bbfile + echo '"' >> $bbfile + echo "" >> $bbfile + + echo 'TEST_DEPENDS = "\' >> $bbfile + gen_each_depend $pkg TDepends test-BuildRequires $bbfile + echo '"' >> $bbfile - echo 'DEPENDS = "${ROS_BUILD_DEPENDS} ${ROS_BUILD_EXPORT_DEPENDS}"' >> $bbfile - echo 'DEPENDS += "${ROS_BUILDTOOL_DEPENDS} ${ROS_BUILDTOOL_EXPORT_DEPENDS}"' >> $bbfile - echo 'RDEPENDS:${PN} += "${ROS_EXEC_DEPENDS}"' >> $bbfile echo "" >> $bbfile } + gen_build_type() { pkg_dir=$1 diff --git a/gen-pkg-py-bb.sh b/gen-pkg-py-bb.sh index 2e86ab9..f3a35d0 100755 --- a/gen-pkg-py-bb.sh +++ b/gen-pkg-py-bb.sh @@ -5,6 +5,8 @@ GEN_ONE=$1 SPEC_TO_BB_LIST=${ROS_DISTRO}/spec_to_bb.list +BB_FIX=${ROOT}/bb_fix +BB_FIX_PKG_REMAP=${BB_FIX}/pkg.remap BB_DEVTOOLS_BASE=${ROS_BB_BASE}/recipes-devtools BB_EXTERNAL_BASE=${ROS_BB_BASE}/recipes-external BB_TMP_BASE=${ROS_BB_BASE}/.tmp @@ -43,31 +45,144 @@ gen_single_line_config() echo "${config_key} = \"$ret\"" >> $bbfile } +gen_src_uri() +{ + spec=$1 + bbfile=$2 + src_name=$3 + package_name=$4 + + echo "SRC_URI = \" \\" >> $bbfile + echo " file://\${OPENEULER_LOCAL_NAME}/${src_name} \\" >> $bbfile + + for patch in `grep "^Patch.*: " $spec | awk '{print $2}'` + do + echo " file://\${OPENEULER_LOCAL_NAME}/${patch} \\" >> $bbfile + done + + [ ! -d ${BB_FIX}/$package_name ] && echo "\"" >> $bbfile && return + + pkg_bb_dir=`dirname "$bbfile"` + + cp ${BB_FIX}/$package_name/* ${pkg_bb_dir}/ + + for patch in `cd ${BB_FIX}/$package_name/files 2>/dev/null && ls *.patch` + do + echo " file://${patch} \\" >> $bbfile + done + + echo "\"" >> $bbfile +} + gen_license() { spec=$1 bbfile=$2 + spec_name=$3 - ret=`grep -i "^License:" $spec | head -1 | awk -F":" '{print $2}' | awk '$1=$1' | sed -e 's#and#\&#g'` - if [ "$ret" == "" ] + grep -i "^License:" $spec | head -1 | awk -F":" '{print $2}' | awk '$1=$1' | sed -e "s# and #\n#g" > ${OUTPUT}/.tempLicense + lics="" + while read lic + do + yocto_lic=`python3 ${ROOT}/get-license.py "$lic"` + [ "$yocto_lic" == "" ] && error_log "can not get license, origin license is \"$lic\"" && exit 1 + + if [ "$lics" == "" ] + then + lics="$yocto_lic" + else + lics="$lics & $yocto_lic" + fi + done < ${OUTPUT}/.tempLicense + + if [ "$lics" == "" ] then error_log "license is null." fi - echo "LICENSE = \"$ret\"" >> $bbfile - echo "LIC_FILES_CHKSUM = \"\"" >> $bbfile + + echo "LICENSE = \"$lics\"" >> $bbfile + + #md5=`md5sum $spec | cut -d' ' -f1` + #echo "LIC_FILES_CHKSUM = \"file://../${spec_name};md5=${md5}\"" >> $bbfile + echo "LIC_FILES_CHKSUM = \"file://\${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10\"" >> $bbfile } + +rename_depend() +{ + dep=$1 + + grep -q "^$dep " ${BB_FIX_PKG_REMAP} + if [ $? -ne 0 ] + then + echo "$dep" + return + fi + + grep "^$dep " ${BB_FIX_PKG_REMAP} | cut -d' ' -f2 +} + +is_delete_depends() +{ + dep=$1 + bbfile_name=$2 + suffix=$3 + + [ ! -f ${BB_FIX}/${bbfile_name}.${suffix} ] && return 1 + + grep -q "^\-${dep}$" ${BB_FIX}/${bbfile_name}.${suffix} && return 0 + + return 1 +} + +gen_depends() +{ + spec=$1 + bbfile=$2 + bbfile_name=$3 + + echo "DEPENDS += \" \\" >> $bbfile + for dep in `grep "^BuildRequires:" $spec | awk '{print $2}' | sed -e 's#-devel##g'` + do + is_delete_depends $dep $bbfile_name Depends && continue + + dep_new=`rename_depend $dep` + echo $dep_new | sed -e 's#$#-native \\#g' -e 's#^# #g' >> $bbfile + done + echo "\"" >> $bbfile + echo "" >> $bbfile +} + +gen_rdepends() +{ + spec=$1 + bbfile=$2 + bbfile_name=$3 + + echo "RDEPENDS_\${PN} += \" \\" >> $bbfile + for dep in `grep "^Requires:" $spec | awk '{print $2}' | sed -e 's#-devel##g'` + do + is_delete_depends $dep $bbfile_name RDepends && continue + + dep_new=`rename_depend $dep` + echo $dep_new | sed -e 's#$# \\#g' -e 's#^# #g' >> $bbfile + done + + echo "\"" >> $bbfile + echo "" >> $bbfile +} + main() { prepare info_log "Start to generate bb file." - while read package_name package_type is_native bbfile_name spec_url source_name + while read package_name package_type is_native bbfile_name spec_url source_name unpack_name do echo "${package_name}" | grep -q "^#" && continue [ "$GEN_ONE" != "" -a "$package_name" != "$GEN_ONE" ] && continue - if [ "${package_name}" == "" -o "${package_type}" == "" -o "${is_native}" == "" -o "${bbfile_name}" == "" -o "${spec_url}" == "" ] + if [ "${package_name}" == "" -o "${package_type}" == "" -o "${is_native}" == "" -o "${bbfile_name}" == "" -o "${spec_url}" == "" -o "${source_name}" == "" -o "${unpack_name}" == "" ] then error_log "configuration of $package_name is incomplete." continue @@ -77,15 +192,19 @@ main() if [ "$is_native" == "yes" -a "$package_type" == "python" ] then - bbfile=${BB_DEVTOOLS_BASE}/python/${bbfile_name}.bb + bbfile_prefix=${BB_DEVTOOLS_BASE}/python elif [ "$is_native" == "yes" -a "$package_type" == "cmake" ] then - bbfile=${BB_DEVTOOLS_BASE}/${bbfile_name}.bb + bbfile_prefix=${BB_DEVTOOLS_BASE} else - bbfile=${BB_EXTERNAL_BASE}/${bbfile_name}.bb + bbfile_prefix=${BB_EXTERNAL_BASE} fi - wget --no-check-certificate -q --show-progress --progress=bar:force 2>&1 -c -P ${BB_TMP_BASE} ${spec_url} + [ -d ${BB_FIX}/$package_name ] && bbfile_prefix="$bbfile_prefix/$package_name" + + mkdir -p ${bbfile_prefix} + + bbfile=${bbfile_prefix}/${bbfile_name}.bb #the format of spec_url must be like https://gitee.com/src-openeuler/catkin_pkg/raw/master/catkin-pkg.spec spec_name=`echo $spec_url | cut -d'/' -f8` @@ -94,6 +213,8 @@ main() git_url=`echo $spec_url | awk -F'/' '{print $1"//"$2"/"$3"/"$4}'` spec=${BB_TMP_BASE}/$spec_name + [ ! -f $spec ] && wget --no-check-certificate -q --show-progress --progress=bar:force 2>&1 -c -P ${BB_TMP_BASE} ${spec_url} + if [ ! -f $spec ] then error_log "download spec error, $spec_url" @@ -104,13 +225,13 @@ main() gen_single_line_config $spec $bbfile "Summary:" "DESCRIPTION" gen_single_line_config $spec $bbfile "URL:" "HOMEPAGE" - gen_license $spec $bbfile + gen_license $spec $bbfile $spec_name gen_single_line_config $spec $bbfile "Version:" "PV" echo "" >> $bbfile - echo "inherit pypi setuptools3" >> $bbfile - if [ "$package_type" == "" ] + if [ "$package_type" == "python" ] then + echo "inherit pypi setuptools3" >> $bbfile echo "" >> $bbfile echo "PYPI_PACKAGE = \"${package_name}\"" >> $bbfile echo "" >> $bbfile @@ -122,33 +243,12 @@ main() echo "OPENEULER_BRANCH = \"${branch}\"" >> $bbfile echo "" >> $bbfile - echo "SRC_URI = \" \\" >> $bbfile - if [ "$source_name" == "" ] - then - src_name=`grep "Source0:" $spec | head -1 | awk '{print $2}'` - else - src_name=$source_name - fi - echo " file://\${OPENEULER_LOCAL_NAME}/${src_name} \\" >> $bbfile - - for patch in `grep "^Patch.*: " $spec | awk '{print $2}'` - do - echo " file://\${OPENEULER_LOCAL_NAME}/${patch} \\" >> $bbfile - done - - echo "\"" >> $bbfile - echo 'S = "${WORKDIR}/${PN}-${PV}"' >> $bbfile - echo "" >> $bbfile - - echo "DEPENDS += \" \\" >> $bbfile - grep "^BuildRequires:" $spec | awk '{print $2}' | sed -e 's#$#-native \\#g' -e 's#^# #g' >> $bbfile - echo "\"" >> $bbfile + gen_src_uri $spec $bbfile $source_name $package_name + echo "S = \"\${WORKDIR}/${unpack_name}\"" >> $bbfile echo "" >> $bbfile - echo "RDEPENDS_\${PN} += \" \\" >> $bbfile - grep "^Requires:" $spec | awk '{print $2}' | sed -e 's#$# \\#g' -e 's#^# #g' >> $bbfile - echo "\"" >> $bbfile - echo "" >> $bbfile + gen_depends $spec $bbfile $bbfile_name + gen_rdepends $spec $bbfile $bbfile_name if [ "$is_native" == "yes" ] then diff --git a/get-license.py b/get-license.py index 09a2b7c..603cfba 100644 --- a/get-license.py +++ b/get-license.py @@ -494,6 +494,7 @@ def get_license(lic): 'GNU GPL v3.0': 'GPL-3.0-only', 'GPL v3': 'GPL-3.0-only', 'GPLv3': 'GPL-3.0-only', + 'GPLv3+': 'GPL-3.0-or-later', 'ECL2.0': 'EPL-2.0', 'Eclipse Public License 2.0': 'EPL-2.0', 'Mozilla Public License Version 1.1': 'MPL-1.1', diff --git a/humble/spec_to_bb.list b/humble/spec_to_bb.list index ff5956c..a8e3b70 100644 --- a/humble/spec_to_bb.list +++ b/humble/spec_to_bb.list @@ -1,4 +1,8 @@ -#package_name package_type is_native bbfile_name spec_url source_name -python3-importlib-resources python yes python3-importlib-resources https://gitee.com/src-openeuler/python-importlib-resources/raw/openEuler-22.03-LTS-SP1/python-importlib-resources.spec import_resources-5.4.0.tar.gz -python3-catkin_pkg python yes python3-catkin-pkg https://gitee.com/will_niutao/catkin_pkg/raw/master/catkin-pkg.spec 0.5.2.tar.gz -python3-sphinx python no python3-sphinx https://gitee.com/src-openeuler/python-sphinx/raw/openEuler-22.03-LTS-SP1/python-sphinx.spec Sphinx-4.4.0.tar.gz +#package_name package_type is_native bbfile_name spec_url source_name unpack_name +python3-importlib-resources python yes python3-importlib-resources https://gitee.com/src-openeuler/python-importlib-resources/raw/openEuler-22.03-LTS-SP1/python-importlib-resources.spec importlib_resources-5.4.0.tar.gz importlib_resources-5.4.0 +python3-catkin_pkg python yes python3-catkin-pkg https://gitee.com/will_niutao/catkin_pkg/raw/master/catkin-pkg.spec 0.5.2.tar.gz catkin_pkg-0.5.2 +python3-sphinx python no python3-sphinx https://gitee.com/src-openeuler/python-sphinx/raw/openEuler-22.03-LTS-SP1/python-sphinx.spec Sphinx-4.4.0.tar.gz Sphinx-4.4.0 +python3-docutils python yes python3-docutils https://gitee.com/src-openeuler/python-docutils/raw/openEuler-22.03-LTS-SP1/python-docutils.spec docutils-0.17.1.tar.gz docutils-0.17.1 +python3-flake8 python yes python3-flake8 https://gitee.com/src-openeuler/python-flake8/raw/openEuler-22.03-LTS-SP1/python-flake8.spec flake8-3.9.2.tar.gz flake8-3.9.2 +python3-mock python yes python3-mock https://gitee.com/src-openeuler/python-mock/raw/openEuler-22.03-LTS-SP1/python-mock.spec mock-4.0.3.tar.gz mock-4.0.3 +python3-mccabe python yes python3-mccabe https://gitee.com/src-openeuler/python-mccabe/raw/openEuler-22.03-LTS-SP1/python-mccabe.spec mccabe-0.6.1.tar.gz mccabe-0.6.1 -- Gitee From 2347c9944d03cffcc67f3a3034d494a4d1fe3441 Mon Sep 17 00:00:00 2001 From: will_niutao Date: Sat, 13 May 2023 10:11:17 +0800 Subject: [PATCH 04/22] fix: can not copy patches from bb_fix Signed-off-by: will_niutao --- base.sh | 12 +++---- ...orkspace-fix-ament-package-not-found.patch | 12 +++++++ gen-pkg-bb.sh | 36 +++++++++---------- 3 files changed, 36 insertions(+), 24 deletions(-) create mode 100644 bb_fix/ros-workspace/files/ros-workspace-fix-ament-package-not-found.patch diff --git a/base.sh b/base.sh index b747284..ad256db 100755 --- a/base.sh +++ b/base.sh @@ -28,14 +28,14 @@ mkdir -p ${ROS_OUTPUT_TMP} error_log() { - echo -e "\n`date` [Error] $*" - echo -e "\n`date` [Error] $*" >>${LOG} + echo "`date` [Error] $*" + echo "`date` [Error] $*" >>${LOG} } info_log() { - echo -e "\n`date` [Info ] $*" - echo -e "\n`date` [Info ] $*" >> ${LOG} + echo "`date` [Info ] $*" + echo "`date` [Info ] $*" >> ${LOG} } debug_log() @@ -44,8 +44,8 @@ debug_log() then return fi - echo -e "\n`date` [Debug] $*" - echo -e "\n`date` [Debug] $*" >> ${LOG} + echo "`date` [Debug] $*" + echo "`date` [Debug] $*" >> ${LOG} } if [ "${ROS_DISTRO}" = "" ] diff --git a/bb_fix/ros-workspace/files/ros-workspace-fix-ament-package-not-found.patch b/bb_fix/ros-workspace/files/ros-workspace-fix-ament-package-not-found.patch new file mode 100644 index 0000000..d8def95 --- /dev/null +++ b/bb_fix/ros-workspace/files/ros-workspace-fix-ament-package-not-found.patch @@ -0,0 +1,12 @@ +diff -Naur ros-humble-ros-workspace-1.0.2_org/CMakeLists.txt ros-humble-ros-workspace-1.0.2/CMakeLists.txt +--- ros-humble-ros-workspace-1.0.2_org/CMakeLists.txt 2023-05-13 09:39:51.509756650 +0800 ++++ ros-humble-ros-workspace-1.0.2/CMakeLists.txt 2023-05-13 09:40:24.537975002 +0800 +@@ -14,7 +14,7 @@ + set(PYTHON_INSTALL_DIR "lib/python${PYTHON_MAJOR_MINOR}/site-packages") + set(SHELL_EXT "sh") + endif() +-set(AMENT_PACKAGE_DIR "${CMAKE_INSTALL_PREFIX}/${PYTHON_INSTALL_DIR}/ament_package") ++set(AMENT_PACKAGE_DIR "$ENV{STAGING_DIR_NATIVE}${CMAKE_INSTALL_PREFIX}/${PYTHON_INSTALL_DIR}/ament_package") + if(NOT EXISTS "${AMENT_PACKAGE_DIR}") + # Check for an .egg-link file and use the listed directory if it exists + get_filename_component(AMENT_PACKAGE_EGG_LINK "${AMENT_PACKAGE_DIR}" DIRECTORY) diff --git a/gen-pkg-bb.sh b/gen-pkg-bb.sh index da9a04d..33ab6c0 100755 --- a/gen-pkg-bb.sh +++ b/gen-pkg-bb.sh @@ -99,31 +99,31 @@ gen_src_url() echo "SRC_URI = \" \\" >> $bbfile echo " file://\${OPENEULER_LOCAL_NAME}/ros-\${ROS_DISTRO}-\${ROS_SPN}_\${PV}.orig.tar.gz \\" >> $bbfile - if [ ! -d ${ROS_PACKAGE_FIX}/${pkg} ] + if [ -d ${ROS_PACKAGE_FIX}/${pkg} ] then - echo "\"" >> $bbfile - echo "" >> $bbfile - return - fi - - for tarball in `cd ${ROS_PACKAGE_FIX}/${pkg} && ls | grep -v "\.fix" | grep -v "\.patch"` - do - echo " file://\${OPENEULER_LOCAL_NAME}/${tarball} \\" >> $bbfile - done - - if [ -f ${ROS_PACKAGE_FIX}/${pkg}/source.fix ] - then - for patch in `grep "^Patch.*: " ${ROS_PACKAGE_FIX}/${pkg}/source.fix | awk '{print $2}'` + for tarball in `cd ${ROS_PACKAGE_FIX}/${pkg} && ls | grep -v "\.fix" | grep -v "\.patch"` do - echo " file://\${OPENEULER_LOCAL_NAME}/${patch} \\" >> $bbfile + echo " file://\${OPENEULER_LOCAL_NAME}/${tarball} \\" >> $bbfile done + + if [ -f ${ROS_PACKAGE_FIX}/${pkg}/source.fix ] + then + for patch in `grep "^Patch.*: " ${ROS_PACKAGE_FIX}/${pkg}/source.fix | awk '{print $2}'` + do + echo " file://\${OPENEULER_LOCAL_NAME}/${patch} \\" >> $bbfile + done + fi fi - [ ! -d ${BB_FIX}/$pkg ] && echo "\"" >> $bbfile && return + if [ ! -d ${BB_FIX}/$pkg ] + then + echo "\"" >> $bbfile + echo "" >> $bbfile + return + fi pkg_bb_dir=`dirname "$bbfile"` - - cp ${BB_FIX}/$pkg/* ${pkg_bb_dir} + cp -r ${BB_FIX}/$pkg/* ${pkg_bb_dir} for patch in `cd ${BB_FIX}/$pkg/files 2>/dev/null && ls *.patch` do -- Gitee From 2c9d6f3040fd3fc74f100f4a60b95a3d496b7e2c Mon Sep 17 00:00:00 2001 From: will_niutao Date: Sat, 13 May 2023 14:25:38 +0800 Subject: [PATCH 05/22] fix: add external dependences Signed-off-by: will_niutao --- bb_fix/all.remove | 6 +++++ bb_fix/gtest.Append | 2 ++ bb_fix/pkg.remap | 2 ++ bb_fix/rcutils.Depends | 1 + bb_fix/rcutils.RDepends | 1 + ...orkspace-fix-ament-package-not-found.patch | 2 +- gen-pkg-bb.sh | 20 +++++++++----- gen-pkg-py-bb.sh | 26 ++++++++++++++----- humble/spec_to_bb.list | 14 ++++++++++ 9 files changed, 60 insertions(+), 14 deletions(-) create mode 100644 bb_fix/all.remove create mode 100644 bb_fix/gtest.Append create mode 100644 bb_fix/rcutils.Depends create mode 100644 bb_fix/rcutils.RDepends diff --git a/bb_fix/all.remove b/bb_fix/all.remove new file mode 100644 index 0000000..cb7093d --- /dev/null +++ b/bb_fix/all.remove @@ -0,0 +1,6 @@ +gcc +gcc-c++ +gdb +%{name}%{?_isa} +%{name} +libatomic diff --git a/bb_fix/gtest.Append b/bb_fix/gtest.Append new file mode 100644 index 0000000..bab6568 --- /dev/null +++ b/bb_fix/gtest.Append @@ -0,0 +1,2 @@ +PROVIDES += "gmock" +RPROVIDES:${PN} += "gmock" diff --git a/bb_fix/pkg.remap b/bb_fix/pkg.remap index 36cfb2d..b72b1b4 100644 --- a/bb_fix/pkg.remap +++ b/bb_fix/pkg.remap @@ -1 +1,3 @@ python3-setuptools_scm python3-setuptools-scm +gcc-c++ g++ +python3-PyYAML python3-pyyaml diff --git a/bb_fix/rcutils.Depends b/bb_fix/rcutils.Depends new file mode 100644 index 0000000..87580a8 --- /dev/null +++ b/bb_fix/rcutils.Depends @@ -0,0 +1 @@ +-libatomic diff --git a/bb_fix/rcutils.RDepends b/bb_fix/rcutils.RDepends new file mode 100644 index 0000000..87580a8 --- /dev/null +++ b/bb_fix/rcutils.RDepends @@ -0,0 +1 @@ +-libatomic diff --git a/bb_fix/ros-workspace/files/ros-workspace-fix-ament-package-not-found.patch b/bb_fix/ros-workspace/files/ros-workspace-fix-ament-package-not-found.patch index d8def95..ebaf6dd 100644 --- a/bb_fix/ros-workspace/files/ros-workspace-fix-ament-package-not-found.patch +++ b/bb_fix/ros-workspace/files/ros-workspace-fix-ament-package-not-found.patch @@ -6,7 +6,7 @@ diff -Naur ros-humble-ros-workspace-1.0.2_org/CMakeLists.txt ros-humble-ros-work set(SHELL_EXT "sh") endif() -set(AMENT_PACKAGE_DIR "${CMAKE_INSTALL_PREFIX}/${PYTHON_INSTALL_DIR}/ament_package") -+set(AMENT_PACKAGE_DIR "$ENV{STAGING_DIR_NATIVE}${CMAKE_INSTALL_PREFIX}/${PYTHON_INSTALL_DIR}/ament_package") ++set(AMENT_PACKAGE_DIR "$ENV{STAGING_DIR_NATIVE}/usr/${PYTHON_INSTALL_DIR}/ament_package") if(NOT EXISTS "${AMENT_PACKAGE_DIR}") # Check for an .egg-link file and use the listed directory if it exists get_filename_component(AMENT_PACKAGE_EGG_LINK "${AMENT_PACKAGE_DIR}" DIRECTORY) diff --git a/gen-pkg-bb.sh b/gen-pkg-bb.sh index 33ab6c0..a6872f0 100755 --- a/gen-pkg-bb.sh +++ b/gen-pkg-bb.sh @@ -160,6 +160,7 @@ rename_depend() sed -i "s#^${rpm_pkg}\$#${bb_pkg}#g" $require_file done <${BB_FIX_PKG_REMAP} } + spec_fix() { pkg=$1 @@ -187,22 +188,27 @@ spec_fix() # fix DEPENDS and RDEPENDS bb_fix() { - require_file=$1 - bb_deps_suffix=$2 + pkg=$1 + require_file=$2 + bb_deps_suffix=$3 - [ ! -f ${BB_FIX}/${bbfile_name}.${bb_deps_suffix} ] && return + [ ! -f ${BB_FIX}/${pkg}.${bb_deps_suffix} ] && return - for dep in `grep "^\-" ${BB_FIX}/${bbfile_name}.${bb_deps_suffix} | sed -e 's#^\-##g'` + for dep in `grep "^\-" ${BB_FIX}/${pkg}.${bb_deps_suffix} | sed -e 's#^\-##g'` do sed -i "/^${dep}\$/d" $require_file done - for dep in `grep "^\+" ${BB_FIX}/${bbfile_name}.${bb_deps_suffix} | sed -e 's#^\+##g'` + for dep in `grep "^\+" ${BB_FIX}/${pkg}.${bb_deps_suffix} | sed -e 's#^\+##g'` do echo "$dep" >> $require_file done -} + while read dep + do + sed -i "#^$dep\$#d" $require_file + done < ${BB_FIX}/all.remove +} gen_each_depend() { @@ -244,7 +250,7 @@ gen_each_depend() rename_requires $require_file rename_depend $require_file - bb_fix $require_file $bb_deps_suffix + bb_fix $pkg $require_file $bb_deps_suffix if [ "$bb_deps_suffix" == "Depends" ] then diff --git a/gen-pkg-py-bb.sh b/gen-pkg-py-bb.sh index f3a35d0..82824b9 100755 --- a/gen-pkg-py-bb.sh +++ b/gen-pkg-py-bb.sh @@ -64,7 +64,7 @@ gen_src_uri() pkg_bb_dir=`dirname "$bbfile"` - cp ${BB_FIX}/$package_name/* ${pkg_bb_dir}/ + cp -r ${BB_FIX}/$package_name/* ${pkg_bb_dir}/ for patch in `cd ${BB_FIX}/$package_name/files 2>/dev/null && ls *.patch` do @@ -111,12 +111,11 @@ rename_depend() { dep=$1 + echo "$dep" | grep -q "^python%{python3_pkgversion}" + [ $? -eq 0 ] && dep=`echo "$dep" | sed -e 's#python%{python3_pkgversion}#python3#g'` + grep -q "^$dep " ${BB_FIX_PKG_REMAP} - if [ $? -ne 0 ] - then - echo "$dep" - return - fi + [ $? -ne 0 ] && echo "$dep" && return grep "^$dep " ${BB_FIX_PKG_REMAP} | cut -d' ' -f2 } @@ -127,6 +126,8 @@ is_delete_depends() bbfile_name=$2 suffix=$3 + grep -q "^$dep$" ${BB_FIX}/all.remove && return 0 + [ ! -f ${BB_FIX}/${bbfile_name}.${suffix} ] && return 1 grep -q "^\-${dep}$" ${BB_FIX}/${bbfile_name}.${suffix} && return 0 @@ -171,6 +172,17 @@ gen_rdepends() echo "" >> $bbfile } +gen_appends() +{ + package_name=$1 + bbfile=$2 + + [ ! -f ${BB_FIX}/${package_name}.Append ] && return + + cat ${BB_FIX}/${package_name}.Append >> $bbfile + echo "" >> $bbfile +} + main() { prepare @@ -250,6 +262,8 @@ main() gen_depends $spec $bbfile $bbfile_name gen_rdepends $spec $bbfile $bbfile_name + gen_appends $package_name $bbfile + if [ "$is_native" == "yes" ] then echo "BBCLASSEXTEND = \"native nativesdk\"" >> $bbfile diff --git a/humble/spec_to_bb.list b/humble/spec_to_bb.list index a8e3b70..d334399 100644 --- a/humble/spec_to_bb.list +++ b/humble/spec_to_bb.list @@ -6,3 +6,17 @@ python3-docutils python yes python3-docutils https://gitee.com/src-openeuler/pyt python3-flake8 python yes python3-flake8 https://gitee.com/src-openeuler/python-flake8/raw/openEuler-22.03-LTS-SP1/python-flake8.spec flake8-3.9.2.tar.gz flake8-3.9.2 python3-mock python yes python3-mock https://gitee.com/src-openeuler/python-mock/raw/openEuler-22.03-LTS-SP1/python-mock.spec mock-4.0.3.tar.gz mock-4.0.3 python3-mccabe python yes python3-mccabe https://gitee.com/src-openeuler/python-mccabe/raw/openEuler-22.03-LTS-SP1/python-mccabe.spec mccabe-0.6.1.tar.gz mccabe-0.6.1 +python3-empy python yes python3-empy https://gitee.com/will_niutao/python-empy/raw/master/python-empy.spec empy-3.3.4.tar.gz empy-3.3.4 +gtest cmake yes gtest https://gitee.com/src-openeuler/gtest/raw/openEuler-22.03-LTS-SP1/gtest.spec release-1.8.1.tar.gz googletest-release-1.8.1 +python3-yaml python yes python3-yaml https://gitee.com/src-openeuler/PyYAML/raw/openEuler-22.03-LTS-SP1/PyYAML.spec PyYAML-6.0.tar.gz PyYAML-6.0 +console-bridge cmake yes console-bridge https://gitee.com/will_niutao/console_bridge/raw/master/console_bridge.spec 1.0.2.tar.gz console_bridge-1.0.2 +yaml-cpp cmake yes yaml-cpp https://gitee.com/src-openeuler/yaml-cpp/raw/openEuler-22.03-LTS-SP1/yaml-cpp.spec yaml-cpp-0.6.3.tar.gz yaml-cpp-0.6.3 +python3-lark-parser python yes python3-lark-parser https://gitee.com/src-openeuler/python-lark-parser/raw/master/python-lark-parser.spec lark-parser-0.12.0.tar.gz lark-parser-0.12.0 +python3-netifaces python yes python3-netifaces https://gitee.com/src-openeuler/python-netifaces/raw/openEuler-22.03-LTS-SP1/python-netifaces.spec netifaces-0.11.0.tar.gz netifaces-0.11.0 +pybind11 python yes pybind11 https://gitee.com/src-openeuler/pybind11/raw/openEuler-22.03-LTS-SP1/pybind11.spec v2.8.1.tar.gz pybind11-2.8.1 +tinyxml2 cmake yes tinyxml2 https://gitee.com/src-openeuler/tinyxml2/raw/openEuler-22.03-LTS-SP1/tinyxml2.spec tinyxml2-6.0.0-8c8293b.tar.gz tinyxml2-6.0.0 +python3-rosdistro python yes python3-rosdistro https://gitee.com/will_niutao/python-rosdistro/raw/master/python-rosdistro.spec 0.9.0.tar.gz rosdistro-0.9.0 +python3-rospkg python yes python3-rospkg https://gitee.com/will_niutao/python-rospkg/raw/master/python-rospkg.spec 1.5.0.tar.gz rospkg-1.5.0 +python3-catkin-sphinx python yes python3-catkin-sphinx https://gitee.com/will_niutao/python-catkin-sphinx/raw/master/python-catkin-sphinx.spec 0.3.2.tar.gz catkin-sphinx-0.3.2 +cppcheck cmake yes cppcheck https://gitee.com/src-openeuler/cppcheck/raw/openEuler-22.03-LTS-SP1/cppcheck.spec 2.6.3.tar.gz cppcheck-2.6.3 +python3-pydocstyle python yes python3-pydocstyle https://gitee.com/src-openeuler/python-pydocstyle/raw/openEuler-22.03-LTS-SP1/python-pydocstyle.spec 6.1.1.tar.gz pydocstyle-6.1.1 -- Gitee From 62afe5685a6f6d9abd4a4a38f4b5542fa2c75900 Mon Sep 17 00:00:00 2001 From: will_niutao Date: Sat, 13 May 2023 14:44:27 +0800 Subject: [PATCH 06/22] fix: fix iceoryx-hoofs error Signed-off-by: will_niutao --- bb_fix/pkg.remap | 2 ++ gen-pkg-bb.sh | 23 ++++++++++++----------- humble/spec_to_bb.list | 1 + 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/bb_fix/pkg.remap b/bb_fix/pkg.remap index b72b1b4..b141bdf 100644 --- a/bb_fix/pkg.remap +++ b/bb_fix/pkg.remap @@ -1,3 +1,5 @@ python3-setuptools_scm python3-setuptools-scm gcc-c++ g++ python3-PyYAML python3-pyyaml +libacl acl +libacl-devel acl diff --git a/gen-pkg-bb.sh b/gen-pkg-bb.sh index a6872f0..bf6181c 100755 --- a/gen-pkg-bb.sh +++ b/gen-pkg-bb.sh @@ -192,21 +192,22 @@ bb_fix() require_file=$2 bb_deps_suffix=$3 - [ ! -f ${BB_FIX}/${pkg}.${bb_deps_suffix} ] && return - - for dep in `grep "^\-" ${BB_FIX}/${pkg}.${bb_deps_suffix} | sed -e 's#^\-##g'` - do - sed -i "/^${dep}\$/d" $require_file - done + if [ -f ${BB_FIX}/${pkg}.${bb_deps_suffix} ] + then + for dep in `grep "^\-" ${BB_FIX}/${pkg}.${bb_deps_suffix} | sed -e 's#^\-##g'` + do + sed -i "/^${dep}\$/d" $require_file + done - for dep in `grep "^\+" ${BB_FIX}/${pkg}.${bb_deps_suffix} | sed -e 's#^\+##g'` - do - echo "$dep" >> $require_file - done + for dep in `grep "^\+" ${BB_FIX}/${pkg}.${bb_deps_suffix} | sed -e 's#^\+##g'` + do + echo "$dep" >> $require_file + done + fi while read dep do - sed -i "#^$dep\$#d" $require_file + sed -i "/^$dep\$/d" $require_file done < ${BB_FIX}/all.remove } diff --git a/humble/spec_to_bb.list b/humble/spec_to_bb.list index d334399..fbedeb2 100644 --- a/humble/spec_to_bb.list +++ b/humble/spec_to_bb.list @@ -20,3 +20,4 @@ python3-rospkg python yes python3-rospkg https://gitee.com/will_niutao/python-ro python3-catkin-sphinx python yes python3-catkin-sphinx https://gitee.com/will_niutao/python-catkin-sphinx/raw/master/python-catkin-sphinx.spec 0.3.2.tar.gz catkin-sphinx-0.3.2 cppcheck cmake yes cppcheck https://gitee.com/src-openeuler/cppcheck/raw/openEuler-22.03-LTS-SP1/cppcheck.spec 2.6.3.tar.gz cppcheck-2.6.3 python3-pydocstyle python yes python3-pydocstyle https://gitee.com/src-openeuler/python-pydocstyle/raw/openEuler-22.03-LTS-SP1/python-pydocstyle.spec 6.1.1.tar.gz pydocstyle-6.1.1 +#acl cmake yes acl https://gitee.com/src-openeuler/acl/raw/openEuler-22.03-LTS-SP1/acl.spec acl-2.3.1.tar.gz acl-2.3.1 -- Gitee From 50ff7bed20dbdf885a048c4c2da4e4f59f9ac80a Mon Sep 17 00:00:00 2001 From: will_niutao Date: Sat, 13 May 2023 17:54:27 +0800 Subject: [PATCH 07/22] fix: add bbappend to fix foonathan-memory-vendor build error --- .../foonathan-memory-vendor.bbappend | 7 +++++++ bb_fix/pkg.remap | 1 + humble/spec_to_bb.list | 4 ++-- 3 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 bb_fix/foonathan-memory-vendor/foonathan-memory-vendor.bbappend diff --git a/bb_fix/foonathan-memory-vendor/foonathan-memory-vendor.bbappend b/bb_fix/foonathan-memory-vendor/foonathan-memory-vendor.bbappend new file mode 100644 index 0000000..f97b6ec --- /dev/null +++ b/bb_fix/foonathan-memory-vendor/foonathan-memory-vendor.bbappend @@ -0,0 +1,7 @@ +FILES:${PN}:prepend = " \ + ${ros_prefix}/lib/foonathan_memory/* \ +" +export OPENEULER_SP_DIR +do_configure:prepend() { + cp ${OPENEULER_SP_DIR}/foonathan_memory_vendor/memory-0.7-1.tar.gz ${S} +} diff --git a/bb_fix/pkg.remap b/bb_fix/pkg.remap index b141bdf..558ad94 100644 --- a/bb_fix/pkg.remap +++ b/bb_fix/pkg.remap @@ -3,3 +3,4 @@ gcc-c++ g++ python3-PyYAML python3-pyyaml libacl acl libacl-devel acl +python3-yaml python3-pyyaml diff --git a/humble/spec_to_bb.list b/humble/spec_to_bb.list index fbedeb2..ba5974b 100644 --- a/humble/spec_to_bb.list +++ b/humble/spec_to_bb.list @@ -8,9 +8,9 @@ python3-mock python yes python3-mock https://gitee.com/src-openeuler/python-mock python3-mccabe python yes python3-mccabe https://gitee.com/src-openeuler/python-mccabe/raw/openEuler-22.03-LTS-SP1/python-mccabe.spec mccabe-0.6.1.tar.gz mccabe-0.6.1 python3-empy python yes python3-empy https://gitee.com/will_niutao/python-empy/raw/master/python-empy.spec empy-3.3.4.tar.gz empy-3.3.4 gtest cmake yes gtest https://gitee.com/src-openeuler/gtest/raw/openEuler-22.03-LTS-SP1/gtest.spec release-1.8.1.tar.gz googletest-release-1.8.1 -python3-yaml python yes python3-yaml https://gitee.com/src-openeuler/PyYAML/raw/openEuler-22.03-LTS-SP1/PyYAML.spec PyYAML-6.0.tar.gz PyYAML-6.0 +#python3-yaml python yes python3-yaml https://gitee.com/src-openeuler/PyYAML/raw/openEuler-22.03-LTS-SP1/PyYAML.spec PyYAML-6.0.tar.gz PyYAML-6.0 console-bridge cmake yes console-bridge https://gitee.com/will_niutao/console_bridge/raw/master/console_bridge.spec 1.0.2.tar.gz console_bridge-1.0.2 -yaml-cpp cmake yes yaml-cpp https://gitee.com/src-openeuler/yaml-cpp/raw/openEuler-22.03-LTS-SP1/yaml-cpp.spec yaml-cpp-0.6.3.tar.gz yaml-cpp-0.6.3 +yaml-cpp cmake yes yaml-cpp https://gitee.com/src-openeuler/yaml-cpp/raw/openEuler-22.03-LTS-SP1/yaml-cpp.spec yaml-cpp-0.6.3.tar.gz yaml-cpp-yaml-cpp-0.6.3 python3-lark-parser python yes python3-lark-parser https://gitee.com/src-openeuler/python-lark-parser/raw/master/python-lark-parser.spec lark-parser-0.12.0.tar.gz lark-parser-0.12.0 python3-netifaces python yes python3-netifaces https://gitee.com/src-openeuler/python-netifaces/raw/openEuler-22.03-LTS-SP1/python-netifaces.spec netifaces-0.11.0.tar.gz netifaces-0.11.0 pybind11 python yes pybind11 https://gitee.com/src-openeuler/pybind11/raw/openEuler-22.03-LTS-SP1/pybind11.spec v2.8.1.tar.gz pybind11-2.8.1 -- Gitee From 4593edad0fd8de0d1f4b4c6aa17402d449a67562 Mon Sep 17 00:00:00 2001 From: will_niutao Date: Sun, 14 May 2023 10:46:38 +0800 Subject: [PATCH 08/22] fix: fix the package build error which with external tarball Signed-off-by: will_niutao --- bb_fix/console-bridge/console-bridge.bbappend | 1 + .../foonathan-memory-vendor.bbappend | 1 + bb_fix/iceoryx-posh/iceoryx-posh.bbappend | 6 ++++++ .../ignition-cmake2-vendor.bbappend | 6 ++++++ .../ignition-math6-vendor.bbappend | 6 ++++++ bb_fix/libyaml-vendor/libyaml-vendor.bbappend | 6 ++++++ bb_fix/mimick-vendor/mimick-vendor.bbappend | 7 +++++++ bb_fix/qpoases-vendor/qpoases-vendor.bbappend | 6 ++++++ .../rviz-ogre-vendor/rviz-ogre-vendor.bbappend | 6 ++++++ .../uncrustify-vendor.bbappend | 6 ++++++ gen-pkg-py-bb.sh => gen-pkg-ext-bb.sh | 18 ++++++++++++++++++ humble/spec_to_bb.list | 2 +- 12 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 bb_fix/console-bridge/console-bridge.bbappend create mode 100644 bb_fix/iceoryx-posh/iceoryx-posh.bbappend create mode 100644 bb_fix/ignition-cmake2-vendor/ignition-cmake2-vendor.bbappend create mode 100644 bb_fix/ignition-math6-vendor/ignition-math6-vendor.bbappend create mode 100644 bb_fix/libyaml-vendor/libyaml-vendor.bbappend create mode 100644 bb_fix/mimick-vendor/mimick-vendor.bbappend create mode 100644 bb_fix/qpoases-vendor/qpoases-vendor.bbappend create mode 100644 bb_fix/rviz-ogre-vendor/rviz-ogre-vendor.bbappend create mode 100644 bb_fix/uncrustify-vendor/uncrustify-vendor.bbappend rename gen-pkg-py-bb.sh => gen-pkg-ext-bb.sh (94%) diff --git a/bb_fix/console-bridge/console-bridge.bbappend b/bb_fix/console-bridge/console-bridge.bbappend new file mode 100644 index 0000000..a99387c --- /dev/null +++ b/bb_fix/console-bridge/console-bridge.bbappend @@ -0,0 +1 @@ +BPN = "console_bridge" diff --git a/bb_fix/foonathan-memory-vendor/foonathan-memory-vendor.bbappend b/bb_fix/foonathan-memory-vendor/foonathan-memory-vendor.bbappend index f97b6ec..a55bfbe 100644 --- a/bb_fix/foonathan-memory-vendor/foonathan-memory-vendor.bbappend +++ b/bb_fix/foonathan-memory-vendor/foonathan-memory-vendor.bbappend @@ -1,5 +1,6 @@ FILES:${PN}:prepend = " \ ${ros_prefix}/lib/foonathan_memory/* \ + ${ros_prefix}/lib64/foonathan_memory/* \ " export OPENEULER_SP_DIR do_configure:prepend() { diff --git a/bb_fix/iceoryx-posh/iceoryx-posh.bbappend b/bb_fix/iceoryx-posh/iceoryx-posh.bbappend new file mode 100644 index 0000000..3c429ff --- /dev/null +++ b/bb_fix/iceoryx-posh/iceoryx-posh.bbappend @@ -0,0 +1,6 @@ +FILES:${PN}:prepend = " \ + ${ros_prefix}/lib/cpptoml/* \ +" +do_configure:prepend() { + cp ${OPENEULER_SP_DIR}/iceoryx/cpptoml-0.1.1.tar.gz ${S}/cmake/cpptoml +} diff --git a/bb_fix/ignition-cmake2-vendor/ignition-cmake2-vendor.bbappend b/bb_fix/ignition-cmake2-vendor/ignition-cmake2-vendor.bbappend new file mode 100644 index 0000000..d63709b --- /dev/null +++ b/bb_fix/ignition-cmake2-vendor/ignition-cmake2-vendor.bbappend @@ -0,0 +1,6 @@ +FILES:${PN}:prepend = " \ + ${ros_prefix}/lib/cpptoml/* \ +" +do_configure:prepend() { + cp ${OPENEULER_SP_DIR}/ignition_cmake2_vendor/ignition-cmake2_2.8.0.tar.gz ${S}/ +} diff --git a/bb_fix/ignition-math6-vendor/ignition-math6-vendor.bbappend b/bb_fix/ignition-math6-vendor/ignition-math6-vendor.bbappend new file mode 100644 index 0000000..b97c8f4 --- /dev/null +++ b/bb_fix/ignition-math6-vendor/ignition-math6-vendor.bbappend @@ -0,0 +1,6 @@ +FILES:${PN}:prepend = " \ + ${ros_prefix}/lib/cpptoml/* \ +" +do_configure:prepend() { + cp ${OPENEULER_SP_DIR}/ignition_math6_vendor/ignition-math6_6.9.2.tar.gz ${S}/ +} diff --git a/bb_fix/libyaml-vendor/libyaml-vendor.bbappend b/bb_fix/libyaml-vendor/libyaml-vendor.bbappend new file mode 100644 index 0000000..342df73 --- /dev/null +++ b/bb_fix/libyaml-vendor/libyaml-vendor.bbappend @@ -0,0 +1,6 @@ +FILES:${PN}:prepend = " \ + ${ros_prefix}/lib/cpptoml/* \ +" +do_configure:prepend() { + cp ${OPENEULER_SP_DIR}/libyaml_vendor/libyaml-0.2.5.tar.gz ${S}/ +} diff --git a/bb_fix/mimick-vendor/mimick-vendor.bbappend b/bb_fix/mimick-vendor/mimick-vendor.bbappend new file mode 100644 index 0000000..ebda657 --- /dev/null +++ b/bb_fix/mimick-vendor/mimick-vendor.bbappend @@ -0,0 +1,7 @@ +FILES:${PN}:prepend = " \ + ${ros_prefix}/lib/cpptoml/* \ +" +do_configure:prepend() { + cp ${OPENEULER_SP_DIR}/mimick_vendor/Mimick-de11f8377eb95f932a03707b583bf3d4ce5bd3e7.tar.gz ${S}/ + cp ${OPENEULER_SP_DIR}/mimick_vendor/0-Mimick-remove-compile-flag-o0.patch ${S}/ +} diff --git a/bb_fix/qpoases-vendor/qpoases-vendor.bbappend b/bb_fix/qpoases-vendor/qpoases-vendor.bbappend new file mode 100644 index 0000000..08139fb --- /dev/null +++ b/bb_fix/qpoases-vendor/qpoases-vendor.bbappend @@ -0,0 +1,6 @@ +FILES:${PN}:prepend = " \ + ${ros_prefix}/lib/cpptoml/* \ +" +do_configure:prepend() { + cp ${OPENEULER_SP_DIR}/qpoases_vendor/3.2.0.tar.gz ${S}/qpoases_3_2 +} diff --git a/bb_fix/rviz-ogre-vendor/rviz-ogre-vendor.bbappend b/bb_fix/rviz-ogre-vendor/rviz-ogre-vendor.bbappend new file mode 100644 index 0000000..06c6611 --- /dev/null +++ b/bb_fix/rviz-ogre-vendor/rviz-ogre-vendor.bbappend @@ -0,0 +1,6 @@ +FILES:${PN}:prepend = " \ + ${ros_prefix}/lib/cpptoml/* \ +" +do_configure:prepend() { + cp ${OPENEULER_SP_DIR}/rviz/ogre-rm-Media-1.12.1.tar.gz ${S}/ +} diff --git a/bb_fix/uncrustify-vendor/uncrustify-vendor.bbappend b/bb_fix/uncrustify-vendor/uncrustify-vendor.bbappend new file mode 100644 index 0000000..3f28285 --- /dev/null +++ b/bb_fix/uncrustify-vendor/uncrustify-vendor.bbappend @@ -0,0 +1,6 @@ +FILES:${PN}:prepend = " \ + ${ros_prefix}/lib/cpptoml/* \ +" +do_configure:prepend() { + cp ${OPENEULER_SP_DIR}/uncrustify_vendor/uncrustify-0.72.0.tar.gz ${S}/ +} diff --git a/gen-pkg-py-bb.sh b/gen-pkg-ext-bb.sh similarity index 94% rename from gen-pkg-py-bb.sh rename to gen-pkg-ext-bb.sh index 82824b9..247c4f2 100755 --- a/gen-pkg-py-bb.sh +++ b/gen-pkg-ext-bb.sh @@ -183,6 +183,19 @@ gen_appends() echo "" >> $bbfile } +gen_files() +{ + bbfile=$1 + + echo 'FILES:${PN}: += " \' >> $bbfile + echo ' ${libdir}/${BPN}/cmake/* \' >> $bbfile + echo ' ${libdir}/cmake/* \' >> $bbfile + echo ' ${prefix}/lib/${BPN}/cmake/* \' >> $bbfile + echo ' ${prefix}/lib/cmake/* \' >> $bbfile + echo '"' >> $bbfile + echo "" >> $bbfile +} + main() { prepare @@ -247,6 +260,9 @@ main() echo "" >> $bbfile echo "PYPI_PACKAGE = \"${package_name}\"" >> $bbfile echo "" >> $bbfile + else + echo "inherit cmake" >> $bbfile + echo "" >> $bbfile fi echo "OPENEULER_GIT_URL = \"${git_url}\"" >> $bbfile @@ -270,6 +286,8 @@ main() else echo "BBCLASSEXTEND = \"native\"" >> $bbfile fi + + #gen_files $bbfile done < ${SPEC_TO_BB_LIST} info_log "Gen bb files done, you can find it in ${ROS_BB_BASE}" diff --git a/humble/spec_to_bb.list b/humble/spec_to_bb.list index ba5974b..79bb84a 100644 --- a/humble/spec_to_bb.list +++ b/humble/spec_to_bb.list @@ -14,7 +14,7 @@ yaml-cpp cmake yes yaml-cpp https://gitee.com/src-openeuler/yaml-cpp/raw/openEul python3-lark-parser python yes python3-lark-parser https://gitee.com/src-openeuler/python-lark-parser/raw/master/python-lark-parser.spec lark-parser-0.12.0.tar.gz lark-parser-0.12.0 python3-netifaces python yes python3-netifaces https://gitee.com/src-openeuler/python-netifaces/raw/openEuler-22.03-LTS-SP1/python-netifaces.spec netifaces-0.11.0.tar.gz netifaces-0.11.0 pybind11 python yes pybind11 https://gitee.com/src-openeuler/pybind11/raw/openEuler-22.03-LTS-SP1/pybind11.spec v2.8.1.tar.gz pybind11-2.8.1 -tinyxml2 cmake yes tinyxml2 https://gitee.com/src-openeuler/tinyxml2/raw/openEuler-22.03-LTS-SP1/tinyxml2.spec tinyxml2-6.0.0-8c8293b.tar.gz tinyxml2-6.0.0 +tinyxml2 cmake yes tinyxml2 https://gitee.com/src-openeuler/tinyxml2/raw/openEuler-22.03-LTS-SP1/tinyxml2.spec tinyxml2-6.0.0-8c8293b.tar.gz tinyxml2-8c8293ba8969a46947606a93ff0cb5a083aab47a python3-rosdistro python yes python3-rosdistro https://gitee.com/will_niutao/python-rosdistro/raw/master/python-rosdistro.spec 0.9.0.tar.gz rosdistro-0.9.0 python3-rospkg python yes python3-rospkg https://gitee.com/will_niutao/python-rospkg/raw/master/python-rospkg.spec 1.5.0.tar.gz rospkg-1.5.0 python3-catkin-sphinx python yes python3-catkin-sphinx https://gitee.com/will_niutao/python-catkin-sphinx/raw/master/python-catkin-sphinx.spec 0.3.2.tar.gz catkin-sphinx-0.3.2 -- Gitee From f2ebc4c2dd303c333c756cb01330442a2f2fe974 Mon Sep 17 00:00:00 2001 From: will_niutao Date: Sat, 13 May 2023 15:19:52 +0800 Subject: [PATCH 09/22] refactor: move package fix configurations to bb_fix/xx --- .../{console-bridge.bbappend => fix/APPENDS} | 0 .../APPENDS} | 10 +++--- bb_fix/{gtest.Append => gtest/fix/APPENDS} | 1 - .../{iceoryx-posh.bbappend => fix/APPENDS} | 3 -- .../APPENDS} | 5 +-- .../APPENDS} | 5 +-- .../{libyaml-vendor.bbappend => fix/APPENDS} | 5 +-- .../{mimick-vendor.bbappend => fix/APPENDS} | 7 ++-- .../fix/RDEPENDS} | 0 .../fix/DEPENDS} | 0 .../fix/RDEPENDS} | 0 .../{qpoases-vendor.bbappend => fix/APPENDS} | 3 -- bb_fix/rcutils.Depends | 1 - bb_fix/rcutils.RDepends | 1 - .../{ros-workspace.bbappend => fix/APPENDS} | 0 bb_fix/rviz-ogre-vendor/fix/APPENDS | 3 ++ .../rviz-ogre-vendor.bbappend | 6 ---- .../APPENDS} | 5 +-- gen-pkg-bb.sh | 33 ++++++++++--------- gen-pkg-ext-bb.sh | 30 +++++++++-------- 20 files changed, 49 insertions(+), 69 deletions(-) rename bb_fix/console-bridge/{console-bridge.bbappend => fix/APPENDS} (100%) rename bb_fix/foonathan-memory-vendor/{foonathan-memory-vendor.bbappend => fix/APPENDS} (41%) rename bb_fix/{gtest.Append => gtest/fix/APPENDS} (57%) rename bb_fix/iceoryx-posh/{iceoryx-posh.bbappend => fix/APPENDS} (61%) rename bb_fix/ignition-cmake2-vendor/{ignition-cmake2-vendor.bbappend => fix/APPENDS} (53%) rename bb_fix/ignition-math6-vendor/{ignition-math6-vendor.bbappend => fix/APPENDS} (53%) rename bb_fix/libyaml-vendor/{libyaml-vendor.bbappend => fix/APPENDS} (58%) rename bb_fix/mimick-vendor/{mimick-vendor.bbappend => fix/APPENDS} (57%) rename bb_fix/{python3-flake8.RDepends => python3-flake8/fix/RDEPENDS} (100%) rename bb_fix/{python3-sphinx.Depends => python3-sphinx/fix/DEPENDS} (100%) rename bb_fix/{python3-sphinx.RDepends => python3-sphinx/fix/RDEPENDS} (100%) rename bb_fix/qpoases-vendor/{qpoases-vendor.bbappend => fix/APPENDS} (60%) delete mode 100644 bb_fix/rcutils.Depends delete mode 100644 bb_fix/rcutils.RDepends rename bb_fix/ros-workspace/{ros-workspace.bbappend => fix/APPENDS} (100%) create mode 100644 bb_fix/rviz-ogre-vendor/fix/APPENDS delete mode 100644 bb_fix/rviz-ogre-vendor/rviz-ogre-vendor.bbappend rename bb_fix/uncrustify-vendor/{uncrustify-vendor.bbappend => fix/APPENDS} (56%) diff --git a/bb_fix/console-bridge/console-bridge.bbappend b/bb_fix/console-bridge/fix/APPENDS similarity index 100% rename from bb_fix/console-bridge/console-bridge.bbappend rename to bb_fix/console-bridge/fix/APPENDS diff --git a/bb_fix/foonathan-memory-vendor/foonathan-memory-vendor.bbappend b/bb_fix/foonathan-memory-vendor/fix/APPENDS similarity index 41% rename from bb_fix/foonathan-memory-vendor/foonathan-memory-vendor.bbappend rename to bb_fix/foonathan-memory-vendor/fix/APPENDS index a55bfbe..8a43db2 100644 --- a/bb_fix/foonathan-memory-vendor/foonathan-memory-vendor.bbappend +++ b/bb_fix/foonathan-memory-vendor/fix/APPENDS @@ -1,8 +1,8 @@ -FILES:${PN}:prepend = " \ - ${ros_prefix}/lib/foonathan_memory/* \ - ${ros_prefix}/lib64/foonathan_memory/* \ -" -export OPENEULER_SP_DIR +#FILES:${PN}:prepend = " \ +# ${ros_prefix}/lib/foonathan_memory/* \ +# ${ros_prefix}/lib64/foonathan_memory/* \ +#" + do_configure:prepend() { cp ${OPENEULER_SP_DIR}/foonathan_memory_vendor/memory-0.7-1.tar.gz ${S} } diff --git a/bb_fix/gtest.Append b/bb_fix/gtest/fix/APPENDS similarity index 57% rename from bb_fix/gtest.Append rename to bb_fix/gtest/fix/APPENDS index bab6568..a0f8794 100644 --- a/bb_fix/gtest.Append +++ b/bb_fix/gtest/fix/APPENDS @@ -1,2 +1 @@ -PROVIDES += "gmock" RPROVIDES:${PN} += "gmock" diff --git a/bb_fix/iceoryx-posh/iceoryx-posh.bbappend b/bb_fix/iceoryx-posh/fix/APPENDS similarity index 61% rename from bb_fix/iceoryx-posh/iceoryx-posh.bbappend rename to bb_fix/iceoryx-posh/fix/APPENDS index 3c429ff..5f4c0aa 100644 --- a/bb_fix/iceoryx-posh/iceoryx-posh.bbappend +++ b/bb_fix/iceoryx-posh/fix/APPENDS @@ -1,6 +1,3 @@ -FILES:${PN}:prepend = " \ - ${ros_prefix}/lib/cpptoml/* \ -" do_configure:prepend() { cp ${OPENEULER_SP_DIR}/iceoryx/cpptoml-0.1.1.tar.gz ${S}/cmake/cpptoml } diff --git a/bb_fix/ignition-cmake2-vendor/ignition-cmake2-vendor.bbappend b/bb_fix/ignition-cmake2-vendor/fix/APPENDS similarity index 53% rename from bb_fix/ignition-cmake2-vendor/ignition-cmake2-vendor.bbappend rename to bb_fix/ignition-cmake2-vendor/fix/APPENDS index d63709b..4a00a30 100644 --- a/bb_fix/ignition-cmake2-vendor/ignition-cmake2-vendor.bbappend +++ b/bb_fix/ignition-cmake2-vendor/fix/APPENDS @@ -1,6 +1,3 @@ -FILES:${PN}:prepend = " \ - ${ros_prefix}/lib/cpptoml/* \ -" do_configure:prepend() { - cp ${OPENEULER_SP_DIR}/ignition_cmake2_vendor/ignition-cmake2_2.8.0.tar.gz ${S}/ + cp ${OPENEULER_SP_DIR}/ignition_cmake2_vendor/ignition-cmake2_2.8.0.tar.gz ${S} } diff --git a/bb_fix/ignition-math6-vendor/ignition-math6-vendor.bbappend b/bb_fix/ignition-math6-vendor/fix/APPENDS similarity index 53% rename from bb_fix/ignition-math6-vendor/ignition-math6-vendor.bbappend rename to bb_fix/ignition-math6-vendor/fix/APPENDS index b97c8f4..491f53a 100644 --- a/bb_fix/ignition-math6-vendor/ignition-math6-vendor.bbappend +++ b/bb_fix/ignition-math6-vendor/fix/APPENDS @@ -1,6 +1,3 @@ -FILES:${PN}:prepend = " \ - ${ros_prefix}/lib/cpptoml/* \ -" do_configure:prepend() { - cp ${OPENEULER_SP_DIR}/ignition_math6_vendor/ignition-math6_6.9.2.tar.gz ${S}/ + cp ${OPENEULER_SP_DIR}/ignition_math6_vendor/ignition-math6_6.9.2.tar.gz ${S} } diff --git a/bb_fix/libyaml-vendor/libyaml-vendor.bbappend b/bb_fix/libyaml-vendor/fix/APPENDS similarity index 58% rename from bb_fix/libyaml-vendor/libyaml-vendor.bbappend rename to bb_fix/libyaml-vendor/fix/APPENDS index 342df73..685b79b 100644 --- a/bb_fix/libyaml-vendor/libyaml-vendor.bbappend +++ b/bb_fix/libyaml-vendor/fix/APPENDS @@ -1,6 +1,3 @@ -FILES:${PN}:prepend = " \ - ${ros_prefix}/lib/cpptoml/* \ -" do_configure:prepend() { - cp ${OPENEULER_SP_DIR}/libyaml_vendor/libyaml-0.2.5.tar.gz ${S}/ + cp ${OPENEULER_SP_DIR}/libyaml_vendor/libyaml-0.2.5.tar.gz ${S} } diff --git a/bb_fix/mimick-vendor/mimick-vendor.bbappend b/bb_fix/mimick-vendor/fix/APPENDS similarity index 57% rename from bb_fix/mimick-vendor/mimick-vendor.bbappend rename to bb_fix/mimick-vendor/fix/APPENDS index ebda657..ff65a24 100644 --- a/bb_fix/mimick-vendor/mimick-vendor.bbappend +++ b/bb_fix/mimick-vendor/fix/APPENDS @@ -1,7 +1,4 @@ -FILES:${PN}:prepend = " \ - ${ros_prefix}/lib/cpptoml/* \ -" do_configure:prepend() { - cp ${OPENEULER_SP_DIR}/mimick_vendor/Mimick-de11f8377eb95f932a03707b583bf3d4ce5bd3e7.tar.gz ${S}/ - cp ${OPENEULER_SP_DIR}/mimick_vendor/0-Mimick-remove-compile-flag-o0.patch ${S}/ + cp ${OPENEULER_SP_DIR}/mimick_vendor/Mimick-de11f8377eb95f932a03707b583bf3d4ce5bd3e7.tar.gz ${S} + cp ${OPENEULER_SP_DIR}/mimick_vendor/0-Mimick-remove-compile-flag-o0.patch ${S} } diff --git a/bb_fix/python3-flake8.RDepends b/bb_fix/python3-flake8/fix/RDEPENDS similarity index 100% rename from bb_fix/python3-flake8.RDepends rename to bb_fix/python3-flake8/fix/RDEPENDS diff --git a/bb_fix/python3-sphinx.Depends b/bb_fix/python3-sphinx/fix/DEPENDS similarity index 100% rename from bb_fix/python3-sphinx.Depends rename to bb_fix/python3-sphinx/fix/DEPENDS diff --git a/bb_fix/python3-sphinx.RDepends b/bb_fix/python3-sphinx/fix/RDEPENDS similarity index 100% rename from bb_fix/python3-sphinx.RDepends rename to bb_fix/python3-sphinx/fix/RDEPENDS diff --git a/bb_fix/qpoases-vendor/qpoases-vendor.bbappend b/bb_fix/qpoases-vendor/fix/APPENDS similarity index 60% rename from bb_fix/qpoases-vendor/qpoases-vendor.bbappend rename to bb_fix/qpoases-vendor/fix/APPENDS index 08139fb..403cef8 100644 --- a/bb_fix/qpoases-vendor/qpoases-vendor.bbappend +++ b/bb_fix/qpoases-vendor/fix/APPENDS @@ -1,6 +1,3 @@ -FILES:${PN}:prepend = " \ - ${ros_prefix}/lib/cpptoml/* \ -" do_configure:prepend() { cp ${OPENEULER_SP_DIR}/qpoases_vendor/3.2.0.tar.gz ${S}/qpoases_3_2 } diff --git a/bb_fix/rcutils.Depends b/bb_fix/rcutils.Depends deleted file mode 100644 index 87580a8..0000000 --- a/bb_fix/rcutils.Depends +++ /dev/null @@ -1 +0,0 @@ --libatomic diff --git a/bb_fix/rcutils.RDepends b/bb_fix/rcutils.RDepends deleted file mode 100644 index 87580a8..0000000 --- a/bb_fix/rcutils.RDepends +++ /dev/null @@ -1 +0,0 @@ --libatomic diff --git a/bb_fix/ros-workspace/ros-workspace.bbappend b/bb_fix/ros-workspace/fix/APPENDS similarity index 100% rename from bb_fix/ros-workspace/ros-workspace.bbappend rename to bb_fix/ros-workspace/fix/APPENDS diff --git a/bb_fix/rviz-ogre-vendor/fix/APPENDS b/bb_fix/rviz-ogre-vendor/fix/APPENDS new file mode 100644 index 0000000..74e6e72 --- /dev/null +++ b/bb_fix/rviz-ogre-vendor/fix/APPENDS @@ -0,0 +1,3 @@ +do_configure:prepend() { + cp ${OPENEULER_SP_DIR}/rviz/ogre-rm-Media-1.12.1.tar.gz ${S} +} diff --git a/bb_fix/rviz-ogre-vendor/rviz-ogre-vendor.bbappend b/bb_fix/rviz-ogre-vendor/rviz-ogre-vendor.bbappend deleted file mode 100644 index 06c6611..0000000 --- a/bb_fix/rviz-ogre-vendor/rviz-ogre-vendor.bbappend +++ /dev/null @@ -1,6 +0,0 @@ -FILES:${PN}:prepend = " \ - ${ros_prefix}/lib/cpptoml/* \ -" -do_configure:prepend() { - cp ${OPENEULER_SP_DIR}/rviz/ogre-rm-Media-1.12.1.tar.gz ${S}/ -} diff --git a/bb_fix/uncrustify-vendor/uncrustify-vendor.bbappend b/bb_fix/uncrustify-vendor/fix/APPENDS similarity index 56% rename from bb_fix/uncrustify-vendor/uncrustify-vendor.bbappend rename to bb_fix/uncrustify-vendor/fix/APPENDS index 3f28285..896ad12 100644 --- a/bb_fix/uncrustify-vendor/uncrustify-vendor.bbappend +++ b/bb_fix/uncrustify-vendor/fix/APPENDS @@ -1,6 +1,3 @@ -FILES:${PN}:prepend = " \ - ${ros_prefix}/lib/cpptoml/* \ -" do_configure:prepend() { - cp ${OPENEULER_SP_DIR}/uncrustify_vendor/uncrustify-0.72.0.tar.gz ${S}/ + cp ${OPENEULER_SP_DIR}/uncrustify_vendor/uncrustify-0.72.0.tar.gz ${S} } diff --git a/gen-pkg-bb.sh b/gen-pkg-bb.sh index bf6181c..2dfa120 100755 --- a/gen-pkg-bb.sh +++ b/gen-pkg-bb.sh @@ -115,7 +115,8 @@ gen_src_url() fi fi - if [ ! -d ${BB_FIX}/$pkg ] + other_cfg=`ls ${BB_FIX}/$pkg 2>/dev/null | grep -v fix` + if [ "$other_cfg" == "" ] then echo "\"" >> $bbfile echo "" >> $bbfile @@ -123,7 +124,7 @@ gen_src_url() fi pkg_bb_dir=`dirname "$bbfile"` - cp -r ${BB_FIX}/$pkg/* ${pkg_bb_dir} + `cd ${BB_FIX}/$pkg && ls | grep -v fix | xargs -i cp -r {} ${pkg_bb_dir}` for patch in `cd ${BB_FIX}/$pkg/files 2>/dev/null && ls *.patch` do @@ -137,6 +138,7 @@ gen_src_url() # rename the ros origin dependence package name(same this ubuntu) to openEuler, # such as in ubuntu system, the develop package name of assimp is assimp-dev, # but in openEuler system, the name is assimp-devel. +# use spec_fix/pkg.remap rename_requires() { require_file=$1 @@ -151,6 +153,7 @@ rename_requires() # such as in openEuler Server system, the name of python package setuptools_scm is # python3-setuptools_scm, but in openEuler embedded system, the name is # python3-setuptools-scm(bcauses the bbfile name use _ to split package name and version). +# use bb_fix/pkg.remap rename_depend() { require_file=$1 @@ -190,16 +193,16 @@ bb_fix() { pkg=$1 require_file=$2 - bb_deps_suffix=$3 + fix_bb_deps=$3 - if [ -f ${BB_FIX}/${pkg}.${bb_deps_suffix} ] + if [ -f ${BB_FIX}/${pkg}/fix/${fix_bb_deps} ] then - for dep in `grep "^\-" ${BB_FIX}/${pkg}.${bb_deps_suffix} | sed -e 's#^\-##g'` + for dep in `grep "^\-" ${BB_FIX}/${pkg}/fix/${fix_bb_deps} | sed -e 's#^\-##g'` do sed -i "/^${dep}\$/d" $require_file done - for dep in `grep "^\+" ${BB_FIX}/${pkg}.${bb_deps_suffix} | sed -e 's#^\+##g'` + for dep in `grep "^\+" ${BB_FIX}/${pkg}/fix/${fix_bb_deps} | sed -e 's#^\+##g'` do echo "$dep" >> $require_file done @@ -214,11 +217,11 @@ bb_fix() gen_each_depend() { pkg=$1 - bb_deps_suffix=$2 + fix_bb_deps=$2 spec_deps_suffix=$3 bbfile=$4 - debug_log "gen ${bb_deps_suffix}" + debug_log "gen ${fix_bb_deps}" package_xml_deps=${ROS_DEPS_BASE}/$pkg-${spec_deps_suffix} require_file=${OUTPUT}/.tempDepends @@ -227,7 +230,7 @@ gen_each_depend() if [ -f ${package_xml_deps} ] then - if [ "$bb_deps_suffix" == "TDepends" ] + if [ "$fix_bb_deps" == "TDEPENDS" ] then cat ${package_xml_deps} | sed -e "s#^BuildRequires: ##g" > ${require_file} else @@ -251,9 +254,9 @@ gen_each_depend() rename_requires $require_file rename_depend $require_file - bb_fix $pkg $require_file $bb_deps_suffix + bb_fix $pkg $require_file $fix_bb_deps - if [ "$bb_deps_suffix" == "Depends" ] + if [ "$fix_bb_deps" == "DEPENDS" ] then cat $require_file >> ${ROS_NATIVE_PKGS_TMP1} cat $require_file | sed -e 's#-devel$##g' -e 's#$#-native \\#g' -e 's#^# #g' >> $bbfile @@ -268,17 +271,17 @@ gen_depends() bbfile=$2 echo 'DEPENDS = "\' >> $bbfile - gen_each_depend $pkg Depends BuildRequires $bbfile + gen_each_depend $pkg DEPENDS BuildRequires $bbfile echo '"' >> $bbfile echo "" >> $bbfile echo 'RDEPENDS:${PN} += "\' >> $bbfile - gen_each_depend $pkg RDepends Requires $bbfile + gen_each_depend $pkg RDEPENDS Requires $bbfile echo '"' >> $bbfile echo "" >> $bbfile - echo 'TEST_DEPENDS = "\' >> $bbfile - gen_each_depend $pkg TDepends test-BuildRequires $bbfile + echo 'TDEPENDS = "\' >> $bbfile + gen_each_depend $pkg TDEPENDS test-BuildRequires $bbfile echo '"' >> $bbfile echo "" >> $bbfile diff --git a/gen-pkg-ext-bb.sh b/gen-pkg-ext-bb.sh index 247c4f2..d1abc86 100755 --- a/gen-pkg-ext-bb.sh +++ b/gen-pkg-ext-bb.sh @@ -50,7 +50,7 @@ gen_src_uri() spec=$1 bbfile=$2 src_name=$3 - package_name=$4 + pkg=$4 echo "SRC_URI = \" \\" >> $bbfile echo " file://\${OPENEULER_LOCAL_NAME}/${src_name} \\" >> $bbfile @@ -60,11 +60,15 @@ gen_src_uri() echo " file://\${OPENEULER_LOCAL_NAME}/${patch} \\" >> $bbfile done - [ ! -d ${BB_FIX}/$package_name ] && echo "\"" >> $bbfile && return + other_cfg=`ls ${BB_FIX}/$pkg 2>/dev/null | grep -v fix` + if [ "$other_cfg" == "" ] + then + echo "\"" >> $bbfile + return + fi pkg_bb_dir=`dirname "$bbfile"` - - cp -r ${BB_FIX}/$package_name/* ${pkg_bb_dir}/ + `cd ${BB_FIX}/$pkg && ls | grep -v fix | xargs -i cp -r {} ${pkg_bb_dir}` for patch in `cd ${BB_FIX}/$package_name/files 2>/dev/null && ls *.patch` do @@ -123,14 +127,14 @@ rename_depend() is_delete_depends() { dep=$1 - bbfile_name=$2 - suffix=$3 + pkg=$2 + fix_bb_deps=$3 grep -q "^$dep$" ${BB_FIX}/all.remove && return 0 - [ ! -f ${BB_FIX}/${bbfile_name}.${suffix} ] && return 1 + [ ! -f ${BB_FIX}/${pkg}/fix/${fix_bb_deps} ] && return 1 - grep -q "^\-${dep}$" ${BB_FIX}/${bbfile_name}.${suffix} && return 0 + grep -q "^\-${dep}$" ${BB_FIX}/${pkg}/fix/${fix_bb_deps} && return 0 return 1 } @@ -144,7 +148,7 @@ gen_depends() echo "DEPENDS += \" \\" >> $bbfile for dep in `grep "^BuildRequires:" $spec | awk '{print $2}' | sed -e 's#-devel##g'` do - is_delete_depends $dep $bbfile_name Depends && continue + is_delete_depends $dep $bbfile_name DEPENDS && continue dep_new=`rename_depend $dep` echo $dep_new | sed -e 's#$#-native \\#g' -e 's#^# #g' >> $bbfile @@ -162,7 +166,7 @@ gen_rdepends() echo "RDEPENDS_\${PN} += \" \\" >> $bbfile for dep in `grep "^Requires:" $spec | awk '{print $2}' | sed -e 's#-devel##g'` do - is_delete_depends $dep $bbfile_name RDepends && continue + is_delete_depends $dep $bbfile_name RDEPENDS && continue dep_new=`rename_depend $dep` echo $dep_new | sed -e 's#$# \\#g' -e 's#^# #g' >> $bbfile @@ -174,12 +178,12 @@ gen_rdepends() gen_appends() { - package_name=$1 + pkg=$1 bbfile=$2 - [ ! -f ${BB_FIX}/${package_name}.Append ] && return + [ ! -f ${BB_FIX}/${pkg}/fix/APPENDS ] && return - cat ${BB_FIX}/${package_name}.Append >> $bbfile + cat ${BB_FIX}/${pkg}/fix/APPENDS >> $bbfile echo "" >> $bbfile } -- Gitee From 06fbebe709ea57a432ee8cdaebec859bf2517083 Mon Sep 17 00:00:00 2001 From: will_niutao Date: Sat, 13 May 2023 15:31:34 +0800 Subject: [PATCH 10/22] fix: gen APPENDS to bb file Signed-off-by: will_niutao --- gen-pkg-bb.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/gen-pkg-bb.sh b/gen-pkg-bb.sh index 2dfa120..a67bdf0 100755 --- a/gen-pkg-bb.sh +++ b/gen-pkg-bb.sh @@ -287,6 +287,16 @@ gen_depends() echo "" >> $bbfile } +gen_appends() +{ + pkg=$1 + bbfile=$2 + + [ ! -f ${BB_FIX}/${pkg}/fix/APPENDS ] && return + + cat ${BB_FIX}/${pkg}/fix/APPENDS >> $bbfile + echo "" >> $bbfile +} gen_build_type() { @@ -396,6 +406,7 @@ main() gen_license $pkg ${ROS_SRC_BASE}/${repo}/${pkg_dir_name} $bbfile gen_src_url $pkg $bbfile gen_depends $pkg $bbfile + gen_appends $pkg $bbfile gen_build_type ${ROS_SRC_BASE}/${repo}/${pkg_dir_name} $bbfile done < ${OUTPUT}/.repo_pkgs done -- Gitee From 91e6850727dbc72223f3843fcf49dfa3d095f9de Mon Sep 17 00:00:00 2001 From: will_niutao Date: Sat, 13 May 2023 15:47:50 +0800 Subject: [PATCH 11/22] refactor: move the bb file to package directory Signed-off-by: will_niutao --- gen-pkg-bb.sh | 4 +++- gen-pkg-ext-bb.sh | 6 ++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gen-pkg-bb.sh b/gen-pkg-bb.sh index a67bdf0..7551d0b 100755 --- a/gen-pkg-bb.sh +++ b/gen-pkg-bb.sh @@ -369,8 +369,10 @@ main() pkg_dir_name=`cd ${ROS_SRC_BASE}/${repo} && ls ros-${ROS_DISTRO}-${pkg}_*.orig.tar.gz | sed -e "s#.orig.tar.gz##g" | sed -e "s#_#-#g"` + mkdir -p ${ROS_GENERAGTED_BB_BASE}/${repo}/${pkg_dir_name} + #bbfile=${pkg}_${base_version}-${release_version}.bb - bbfile=${pkg}.bb + bbfile=${ROS_GENERAGTED_BB_BASE}/${repo}/${pkg_dir_name}/${pkg}.bb echo "# Generated by ros-porting-tools -- DO NOT EDIT" > $bbfile echo "# Copyright Huawei Technologies Co., Ltd." >> $bbfile diff --git a/gen-pkg-ext-bb.sh b/gen-pkg-ext-bb.sh index d1abc86..a29e368 100755 --- a/gen-pkg-ext-bb.sh +++ b/gen-pkg-ext-bb.sh @@ -229,11 +229,9 @@ main() bbfile_prefix=${BB_EXTERNAL_BASE} fi - [ -d ${BB_FIX}/$package_name ] && bbfile_prefix="$bbfile_prefix/$package_name" + mkdir -p ${bbfile_prefix}/${package_name} - mkdir -p ${bbfile_prefix} - - bbfile=${bbfile_prefix}/${bbfile_name}.bb + bbfile=${bbfile_prefix}/${package_name}/${bbfile_name}.bb #the format of spec_url must be like https://gitee.com/src-openeuler/catkin_pkg/raw/master/catkin-pkg.spec spec_name=`echo $spec_url | cut -d'/' -f8` -- Gitee From 7bb9682277b18ee94f826d22f5b43124cad3e7f9 Mon Sep 17 00:00:00 2001 From: will_niutao Date: Sat, 13 May 2023 15:52:07 +0800 Subject: [PATCH 12/22] fix: change the package directorty to package name Signed-off-by: will_niutao --- gen-pkg-bb.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gen-pkg-bb.sh b/gen-pkg-bb.sh index 7551d0b..63a4e40 100755 --- a/gen-pkg-bb.sh +++ b/gen-pkg-bb.sh @@ -369,10 +369,10 @@ main() pkg_dir_name=`cd ${ROS_SRC_BASE}/${repo} && ls ros-${ROS_DISTRO}-${pkg}_*.orig.tar.gz | sed -e "s#.orig.tar.gz##g" | sed -e "s#_#-#g"` - mkdir -p ${ROS_GENERAGTED_BB_BASE}/${repo}/${pkg_dir_name} + mkdir -p ${ROS_GENERAGTED_BB_BASE}/${repo}/${pkg} #bbfile=${pkg}_${base_version}-${release_version}.bb - bbfile=${ROS_GENERAGTED_BB_BASE}/${repo}/${pkg_dir_name}/${pkg}.bb + bbfile=${ROS_GENERAGTED_BB_BASE}/${repo}/${pkg}/${pkg}.bb echo "# Generated by ros-porting-tools -- DO NOT EDIT" > $bbfile echo "# Copyright Huawei Technologies Co., Ltd." >> $bbfile -- Gitee From 46a8dafdf4f9946b30d43b6e8a43d95e3c1169ca Mon Sep 17 00:00:00 2001 From: will_niutao Date: Sun, 14 May 2023 17:16:31 +0800 Subject: [PATCH 13/22] fix: fix tinyxml2 compile error in yocto Signed-off-by: will_niutao --- bb_fix/tinyxml2/fix/APPENDS | 3 +++ humble/spec_to_bb.list | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 bb_fix/tinyxml2/fix/APPENDS diff --git a/bb_fix/tinyxml2/fix/APPENDS b/bb_fix/tinyxml2/fix/APPENDS new file mode 100644 index 0000000..3e769d7 --- /dev/null +++ b/bb_fix/tinyxml2/fix/APPENDS @@ -0,0 +1,3 @@ +do_configure:prepend() { + sed -i -e 's,lib/,${CMAKE_INSTALL_LIBDIR}/,g' ${S}/CMakeLists.txt +} diff --git a/humble/spec_to_bb.list b/humble/spec_to_bb.list index 79bb84a..7965ddc 100644 --- a/humble/spec_to_bb.list +++ b/humble/spec_to_bb.list @@ -5,7 +5,7 @@ python3-sphinx python no python3-sphinx https://gitee.com/src-openeuler/python-s python3-docutils python yes python3-docutils https://gitee.com/src-openeuler/python-docutils/raw/openEuler-22.03-LTS-SP1/python-docutils.spec docutils-0.17.1.tar.gz docutils-0.17.1 python3-flake8 python yes python3-flake8 https://gitee.com/src-openeuler/python-flake8/raw/openEuler-22.03-LTS-SP1/python-flake8.spec flake8-3.9.2.tar.gz flake8-3.9.2 python3-mock python yes python3-mock https://gitee.com/src-openeuler/python-mock/raw/openEuler-22.03-LTS-SP1/python-mock.spec mock-4.0.3.tar.gz mock-4.0.3 -python3-mccabe python yes python3-mccabe https://gitee.com/src-openeuler/python-mccabe/raw/openEuler-22.03-LTS-SP1/python-mccabe.spec mccabe-0.6.1.tar.gz mccabe-0.6.1 +#python3-mccabe python yes python3-mccabe https://gitee.com/src-openeuler/python-mccabe/raw/openEuler-22.03-LTS-SP1/python-mccabe.spec mccabe-0.6.1.tar.gz mccabe-0.6.1 python3-empy python yes python3-empy https://gitee.com/will_niutao/python-empy/raw/master/python-empy.spec empy-3.3.4.tar.gz empy-3.3.4 gtest cmake yes gtest https://gitee.com/src-openeuler/gtest/raw/openEuler-22.03-LTS-SP1/gtest.spec release-1.8.1.tar.gz googletest-release-1.8.1 #python3-yaml python yes python3-yaml https://gitee.com/src-openeuler/PyYAML/raw/openEuler-22.03-LTS-SP1/PyYAML.spec PyYAML-6.0.tar.gz PyYAML-6.0 -- Gitee From 64d8c07e08aa9c2bb85a7948ff33ca47f91b58b0 Mon Sep 17 00:00:00 2001 From: will_niutao Date: Sun, 14 May 2023 18:06:02 +0800 Subject: [PATCH 14/22] fix: fix libyaml-vendor error Signed-off-by: will_niutao --- bb_fix/libyaml-vendor/fix/APPENDS | 5 +++++ bb_fix/yaml-cpp/fix/APPENDS | 1 + gen-pkg-ext-bb.sh | 2 ++ 3 files changed, 8 insertions(+) create mode 100644 bb_fix/yaml-cpp/fix/APPENDS diff --git a/bb_fix/libyaml-vendor/fix/APPENDS b/bb_fix/libyaml-vendor/fix/APPENDS index 685b79b..32fe0f7 100644 --- a/bb_fix/libyaml-vendor/fix/APPENDS +++ b/bb_fix/libyaml-vendor/fix/APPENDS @@ -1,3 +1,8 @@ do_configure:prepend() { cp ${OPENEULER_SP_DIR}/libyaml_vendor/libyaml-0.2.5.tar.gz ${S} } + +do_install:append() { + mkdir -p ${D}/${datadir}/yaml + mv ${D}/${prefix}/cmake ${D}/${datadir}/yaml +} diff --git a/bb_fix/yaml-cpp/fix/APPENDS b/bb_fix/yaml-cpp/fix/APPENDS new file mode 100644 index 0000000..f8b40f5 --- /dev/null +++ b/bb_fix/yaml-cpp/fix/APPENDS @@ -0,0 +1 @@ +EXTRA_OECMAKE += "-DYAML_CPP_BUILD_TESTS=OFF -DYAML_CPP_BUILD_TOOLS=OFF" diff --git a/gen-pkg-ext-bb.sh b/gen-pkg-ext-bb.sh index a29e368..5d8f924 100755 --- a/gen-pkg-ext-bb.sh +++ b/gen-pkg-ext-bb.sh @@ -132,6 +132,8 @@ is_delete_depends() grep -q "^$dep$" ${BB_FIX}/all.remove && return 0 + [ "$dep" == "$pkg" ] && return 0 + [ ! -f ${BB_FIX}/${pkg}/fix/${fix_bb_deps} ] && return 1 grep -q "^\-${dep}$" ${BB_FIX}/${pkg}/fix/${fix_bb_deps} && return 0 -- Gitee From 3744d86d8bea0f904fccc52dd86eedc29a72ab01 Mon Sep 17 00:00:00 2001 From: will_niutao Date: Wed, 17 May 2023 18:05:22 +0800 Subject: [PATCH 15/22] fix: fix yocto DEPENDS & RDEPENDS error Signed-off-by: will_niutao --- bb_fix/all.remove | 2 - bb_fix/ament-cmake-gtest/fix/DEPENDS | 1 + bb_fix/gmock-vendor/fix/APPENDS | 6 +++ bb_fix/gtest-vendor/fix/APPENDS | 6 +++ bb_fix/libyaml-vendor/fix/APPENDS | 10 +++-- bb_fix/python3-mock/fix/DEPENDS | 1 + bb_fix/python3-sphinx/fix/RDEPENDS | 3 ++ gen-pkg-bb.sh | 40 ++++++++++++++---- gen-pkg-ext-bb.sh | 63 +++++++++++++++++++++------- humble/spec_to_bb.list | 3 +- 10 files changed, 104 insertions(+), 31 deletions(-) create mode 100644 bb_fix/ament-cmake-gtest/fix/DEPENDS create mode 100644 bb_fix/gmock-vendor/fix/APPENDS create mode 100644 bb_fix/gtest-vendor/fix/APPENDS create mode 100644 bb_fix/python3-mock/fix/DEPENDS diff --git a/bb_fix/all.remove b/bb_fix/all.remove index cb7093d..d8d5e95 100644 --- a/bb_fix/all.remove +++ b/bb_fix/all.remove @@ -1,6 +1,4 @@ gcc gcc-c++ gdb -%{name}%{?_isa} -%{name} libatomic diff --git a/bb_fix/ament-cmake-gtest/fix/DEPENDS b/bb_fix/ament-cmake-gtest/fix/DEPENDS new file mode 100644 index 0000000..e20d810 --- /dev/null +++ b/bb_fix/ament-cmake-gtest/fix/DEPENDS @@ -0,0 +1 @@ ++gtest diff --git a/bb_fix/gmock-vendor/fix/APPENDS b/bb_fix/gmock-vendor/fix/APPENDS new file mode 100644 index 0000000..64a36fc --- /dev/null +++ b/bb_fix/gmock-vendor/fix/APPENDS @@ -0,0 +1,6 @@ +FILES:${PN}-dev += " \ + ${ros_prefix}/src \ +" +SYSROOT_DIRS_NATIVE:append = " \ + ${prefix}/src \ +" diff --git a/bb_fix/gtest-vendor/fix/APPENDS b/bb_fix/gtest-vendor/fix/APPENDS new file mode 100644 index 0000000..64a36fc --- /dev/null +++ b/bb_fix/gtest-vendor/fix/APPENDS @@ -0,0 +1,6 @@ +FILES:${PN}-dev += " \ + ${ros_prefix}/src \ +" +SYSROOT_DIRS_NATIVE:append = " \ + ${prefix}/src \ +" diff --git a/bb_fix/libyaml-vendor/fix/APPENDS b/bb_fix/libyaml-vendor/fix/APPENDS index 32fe0f7..c8a02aa 100644 --- a/bb_fix/libyaml-vendor/fix/APPENDS +++ b/bb_fix/libyaml-vendor/fix/APPENDS @@ -2,7 +2,9 @@ do_configure:prepend() { cp ${OPENEULER_SP_DIR}/libyaml_vendor/libyaml-0.2.5.tar.gz ${S} } -do_install:append() { - mkdir -p ${D}/${datadir}/yaml - mv ${D}/${prefix}/cmake ${D}/${datadir}/yaml -} + +FILES:${PN}:prepend = " \ + ${prefix}/cmake \ + ${prefix}/lib \ +" +INSANE_SKIP:${PN}-dev += "dev-elf" diff --git a/bb_fix/python3-mock/fix/DEPENDS b/bb_fix/python3-mock/fix/DEPENDS new file mode 100644 index 0000000..6e35ebd --- /dev/null +++ b/bb_fix/python3-mock/fix/DEPENDS @@ -0,0 +1 @@ +-python3-unittest2 diff --git a/bb_fix/python3-sphinx/fix/RDEPENDS b/bb_fix/python3-sphinx/fix/RDEPENDS index b300945..a5fe6d9 100644 --- a/bb_fix/python3-sphinx/fix/RDEPENDS +++ b/bb_fix/python3-sphinx/fix/RDEPENDS @@ -4,3 +4,6 @@ -python3-imagesize -environment(modules) -python(Sphinx) +-python3-sphinxcontrib-websupport +-python3-sphinx-theme-alabaster +-python3-sphinx_rtd_theme diff --git a/gen-pkg-bb.sh b/gen-pkg-bb.sh index 63a4e40..ce2166a 100755 --- a/gen-pkg-bb.sh +++ b/gen-pkg-bb.sh @@ -256,13 +256,36 @@ gen_each_depend() rename_depend $require_file bb_fix $pkg $require_file $fix_bb_deps + cat $require_file | sed -e 's#-devel$##g' | sort | uniq >${OUTPUT}/.temp${fix_bb_deps} + if [ "$fix_bb_deps" == "DEPENDS" ] then - cat $require_file >> ${ROS_NATIVE_PKGS_TMP1} - cat $require_file | sed -e 's#-devel$##g' -e 's#$#-native \\#g' -e 's#^# #g' >> $bbfile - else - cat $require_file | sed -e 's#-devel$##g' -e 's#$# \\#g' -e 's#^# #g' >> $bbfile + if [ ! -f ${OUTPUT}/.tempRDEPENDS ] + then + cat ${OUTPUT}/.temp${fix_bb_deps} | sort | uniq | sed -e 's#$# \\#g' -e 's#^# #g' >> $bbfile + cat ${OUTPUT}/.temp${fix_bb_deps} >> ${ROS_NATIVE_PKGS_TMP1} + return + fi + + rm -f ${OUTPUT}/.temp${fix_bb_deps} + + for i in `cat $require_file | sed -e 's#-devel$##g' | sort | uniq` + do + grep -q "^${i}$" ${OUTPUT}/.tempRDEPENDS + if [ $? -eq 0 ] + then + # if package in RDEPENDS, it's must a target device package. + echo "$i" >> ${OUTPUT}/.temp${fix_bb_deps} + else + echo "${i}-native" >> ${OUTPUT}/.temp${fix_bb_deps} + echo "$i" >> ${ROS_NATIVE_PKGS_TMP1} + fi + done + cat ${OUTPUT}/.tempRDEPENDS >> ${OUTPUT}/.temp${fix_bb_deps} fi + + cat ${OUTPUT}/.temp${fix_bb_deps} | sort | uniq | sed -e 's#$# \\#g' -e 's#^# #g' >> $bbfile + } gen_depends() @@ -270,13 +293,14 @@ gen_depends() pkg=$1 bbfile=$2 - echo 'DEPENDS = "\' >> $bbfile - gen_each_depend $pkg DEPENDS BuildRequires $bbfile + rm -f ${OUTPUT}/{.tempRDEPENDS,.tempDEPENDS,.tempTDEPENDS} + echo 'RDEPENDS:${PN} += "\' >> $bbfile + gen_each_depend $pkg RDEPENDS Requires $bbfile echo '"' >> $bbfile echo "" >> $bbfile - echo 'RDEPENDS:${PN} += "\' >> $bbfile - gen_each_depend $pkg RDEPENDS Requires $bbfile + echo 'DEPENDS = "\' >> $bbfile + gen_each_depend $pkg DEPENDS BuildRequires $bbfile echo '"' >> $bbfile echo "" >> $bbfile diff --git a/gen-pkg-ext-bb.sh b/gen-pkg-ext-bb.sh index 5d8f924..3df2664 100755 --- a/gen-pkg-ext-bb.sh +++ b/gen-pkg-ext-bb.sh @@ -141,39 +141,71 @@ is_delete_depends() return 1 } -gen_depends() +gen_each_depend() { spec=$1 bbfile=$2 bbfile_name=$3 + fix_bb_deps=$4 + spec_deps=$5 - echo "DEPENDS += \" \\" >> $bbfile - for dep in `grep "^BuildRequires:" $spec | awk '{print $2}' | sed -e 's#-devel##g'` + require_file=${OUTPUT}/.tempDepends + > ${require_file} + + for dep in `grep "^${spec_deps}:" $spec | awk -F":" '{print $2}' | awk -F">=" '{print $1}' | grep -v " = " | sed -e 's#-devel##g'` do - is_delete_depends $dep $bbfile_name DEPENDS && continue + is_delete_depends $dep $bbfile_name ${fix_bb_deps} && continue dep_new=`rename_depend $dep` - echo $dep_new | sed -e 's#$#-native \\#g' -e 's#^# #g' >> $bbfile + echo $dep_new >> $require_file done - echo "\"" >> $bbfile - echo "" >> $bbfile + + cat $require_file | sed -e 's# ##g' | sort | uniq >${OUTPUT}/.temp${fix_bb_deps} + + if [ "$fix_bb_deps" == "DEPENDS" ] + then + if [ ! -f ${OUTPUT}/.tempRDEPENDS ] + then + cat ${OUTPUT}/.temp${fix_bb_deps} | sort | uniq | sed -e 's#$# \\#g' -e 's#^# #g' >> $bbfile + return + fi + + rm -f ${OUTPUT}/.temp${fix_bb_deps} + #echo -------------------- + #cat $require_file + #echo ------------------- + + for i in `cat $require_file | sort | uniq` + do + grep -q "^${i}$" ${OUTPUT}/.tempRDEPENDS + if [ $? -eq 0 ] + then + # if package in RDEPENDS, it's must a target device package. + echo "$i" >> ${OUTPUT}/.temp${fix_bb_deps} + else + echo "${i}-native" >> ${OUTPUT}/.temp${fix_bb_deps} + fi + done + cat ${OUTPUT}/.tempRDEPENDS >> ${OUTPUT}/.temp${fix_bb_deps} + fi + + cat ${OUTPUT}/.temp${fix_bb_deps} | sort | uniq | sed -e 's#$# \\#g' -e 's#^# #g' >> $bbfile } -gen_rdepends() +gen_depends() { spec=$1 bbfile=$2 bbfile_name=$3 + rm -f ${OUTPUT}/{.tempRDEPENDS,.tempDEPENDS,.tempTDEPENDS} echo "RDEPENDS_\${PN} += \" \\" >> $bbfile - for dep in `grep "^Requires:" $spec | awk '{print $2}' | sed -e 's#-devel##g'` - do - is_delete_depends $dep $bbfile_name RDEPENDS && continue - - dep_new=`rename_depend $dep` - echo $dep_new | sed -e 's#$# \\#g' -e 's#^# #g' >> $bbfile - done + gen_each_depend $spec $bbfile $bbfile_name RDEPENDS Requires + echo "\"" >> $bbfile + echo "" >> $bbfile + echo "DEPENDS += \" \\" >> $bbfile + gen_each_depend $spec $bbfile $bbfile_name DEPENDS BuildRequires echo "\"" >> $bbfile echo "" >> $bbfile } @@ -280,7 +312,6 @@ main() echo "" >> $bbfile gen_depends $spec $bbfile $bbfile_name - gen_rdepends $spec $bbfile $bbfile_name gen_appends $package_name $bbfile diff --git a/humble/spec_to_bb.list b/humble/spec_to_bb.list index 7965ddc..63f25de 100644 --- a/humble/spec_to_bb.list +++ b/humble/spec_to_bb.list @@ -13,7 +13,7 @@ console-bridge cmake yes console-bridge https://gitee.com/will_niutao/console_br yaml-cpp cmake yes yaml-cpp https://gitee.com/src-openeuler/yaml-cpp/raw/openEuler-22.03-LTS-SP1/yaml-cpp.spec yaml-cpp-0.6.3.tar.gz yaml-cpp-yaml-cpp-0.6.3 python3-lark-parser python yes python3-lark-parser https://gitee.com/src-openeuler/python-lark-parser/raw/master/python-lark-parser.spec lark-parser-0.12.0.tar.gz lark-parser-0.12.0 python3-netifaces python yes python3-netifaces https://gitee.com/src-openeuler/python-netifaces/raw/openEuler-22.03-LTS-SP1/python-netifaces.spec netifaces-0.11.0.tar.gz netifaces-0.11.0 -pybind11 python yes pybind11 https://gitee.com/src-openeuler/pybind11/raw/openEuler-22.03-LTS-SP1/pybind11.spec v2.8.1.tar.gz pybind11-2.8.1 +pybind11 cmake yes pybind11 https://gitee.com/src-openeuler/pybind11/raw/openEuler-22.03-LTS-SP1/pybind11.spec v2.8.1.tar.gz pybind11-2.8.1 tinyxml2 cmake yes tinyxml2 https://gitee.com/src-openeuler/tinyxml2/raw/openEuler-22.03-LTS-SP1/tinyxml2.spec tinyxml2-6.0.0-8c8293b.tar.gz tinyxml2-8c8293ba8969a46947606a93ff0cb5a083aab47a python3-rosdistro python yes python3-rosdistro https://gitee.com/will_niutao/python-rosdistro/raw/master/python-rosdistro.spec 0.9.0.tar.gz rosdistro-0.9.0 python3-rospkg python yes python3-rospkg https://gitee.com/will_niutao/python-rospkg/raw/master/python-rospkg.spec 1.5.0.tar.gz rospkg-1.5.0 @@ -21,3 +21,4 @@ python3-catkin-sphinx python yes python3-catkin-sphinx https://gitee.com/will_ni cppcheck cmake yes cppcheck https://gitee.com/src-openeuler/cppcheck/raw/openEuler-22.03-LTS-SP1/cppcheck.spec 2.6.3.tar.gz cppcheck-2.6.3 python3-pydocstyle python yes python3-pydocstyle https://gitee.com/src-openeuler/python-pydocstyle/raw/openEuler-22.03-LTS-SP1/python-pydocstyle.spec 6.1.1.tar.gz pydocstyle-6.1.1 #acl cmake yes acl https://gitee.com/src-openeuler/acl/raw/openEuler-22.03-LTS-SP1/acl.spec acl-2.3.1.tar.gz acl-2.3.1 +eigen3 cmake yes eigen3 https://gitee.com/will_niutao/eigen/raw/master/eigen3.spec eigen-3.3.8.tar.bz2 eigen-3.3.8 -- Gitee From 4933425a52d64dadafdcd43b476b8bf4b9a62010 Mon Sep 17 00:00:00 2001 From: will_niutao Date: Mon, 22 May 2023 16:22:32 +0800 Subject: [PATCH 16/22] refactor: map all the ament-cmake/ament-lint package to build tool --- bb_fix/all.remove | 6 ++ bb_fix/ament-cmake-core/fix/DEPENDS | 4 + bb_fix/fastrtps/fix/APPENDS | 3 + bb_fix/fastrtps/fix/DEPENDS | 2 + bb_fix/foonathan-memory-vendor/fix/APPENDS | 18 ++++- bb_fix/foonathan-memory-vendor/fix/RDEPENDS | 2 + bb_fix/libyaml-vendor/fix/APPENDS | 15 +++- bb_fix/pkg.remap | 59 ++++++++++++++ bb_fix/python3-mock/fix/DEPENDS | 2 +- bb_fix/python3-pydocstyle/fix/RDEPENDS | 1 + bb_fix/python3-sphinx/fix/DEPENDS | 26 +++--- bb_fix/python3-sphinx/fix/RDEPENDS | 1 + bb_fix/rcl-yaml-param-parser/fix/APPENDS | 6 ++ bb_fix/rmw-implementation/fix/DEPENDS | 4 + bb_fix/rmw-implementation/fix/RDEPENDS | 1 + bb_fix/ros-core/fix/RDEPENDS | 16 ++++ bb_fix/ros-workspace/fix/DEPENDS | 4 + bb_fix/sros2/fix/RDEPENDS | 1 + gen-pkg-bb.sh | 26 ++++-- gen-pkg-ext-bb.sh | 89 ++++++++++++--------- 20 files changed, 219 insertions(+), 67 deletions(-) create mode 100644 bb_fix/ament-cmake-core/fix/DEPENDS create mode 100644 bb_fix/fastrtps/fix/APPENDS create mode 100644 bb_fix/fastrtps/fix/DEPENDS create mode 100644 bb_fix/foonathan-memory-vendor/fix/RDEPENDS create mode 100644 bb_fix/python3-pydocstyle/fix/RDEPENDS create mode 100644 bb_fix/rcl-yaml-param-parser/fix/APPENDS create mode 100644 bb_fix/rmw-implementation/fix/DEPENDS create mode 100644 bb_fix/rmw-implementation/fix/RDEPENDS create mode 100644 bb_fix/ros-core/fix/RDEPENDS create mode 100644 bb_fix/ros-workspace/fix/DEPENDS create mode 100644 bb_fix/sros2/fix/RDEPENDS diff --git a/bb_fix/all.remove b/bb_fix/all.remove index d8d5e95..34fa018 100644 --- a/bb_fix/all.remove +++ b/bb_fix/all.remove @@ -1,4 +1,10 @@ gcc +gcc-native +g++ +g++-native gcc-c++ +gcc-c++-native gdb +gdb-native libatomic +libatomic-native diff --git a/bb_fix/ament-cmake-core/fix/DEPENDS b/bb_fix/ament-cmake-core/fix/DEPENDS new file mode 100644 index 0000000..b5392e2 --- /dev/null +++ b/bb_fix/ament-cmake-core/fix/DEPENDS @@ -0,0 +1,4 @@ +-ament-package ++ament-package-native +-python3-catkin_pkg ++python3-catkin_pkg-native diff --git a/bb_fix/fastrtps/fix/APPENDS b/bb_fix/fastrtps/fix/APPENDS new file mode 100644 index 0000000..13d728c --- /dev/null +++ b/bb_fix/fastrtps/fix/APPENDS @@ -0,0 +1,3 @@ +FILES:${PN} += " \ + ${prefix}/tools \ +" diff --git a/bb_fix/fastrtps/fix/DEPENDS b/bb_fix/fastrtps/fix/DEPENDS new file mode 100644 index 0000000..b4f7bf6 --- /dev/null +++ b/bb_fix/fastrtps/fix/DEPENDS @@ -0,0 +1,2 @@ +-asio-native ++asio diff --git a/bb_fix/foonathan-memory-vendor/fix/APPENDS b/bb_fix/foonathan-memory-vendor/fix/APPENDS index 8a43db2..007e8b3 100644 --- a/bb_fix/foonathan-memory-vendor/fix/APPENDS +++ b/bb_fix/foonathan-memory-vendor/fix/APPENDS @@ -1,7 +1,17 @@ -#FILES:${PN}:prepend = " \ -# ${ros_prefix}/lib/foonathan_memory/* \ -# ${ros_prefix}/lib64/foonathan_memory/* \ -#" +SYSROOT_DIRS_NATIVE:append = " \ + ${prefix}/lib64 \ + ${prefix}/lib \ +" + +SYSROOT_DIRS:append = " \ + ${prefix}/bin \ +" +FILES:${PN}:append = " \ + ${prefix}/lib/foonathan_memory \ + ${prefix}/bin \ +" + +PROVIDES += "foonathan-memory" do_configure:prepend() { cp ${OPENEULER_SP_DIR}/foonathan_memory_vendor/memory-0.7-1.tar.gz ${S} diff --git a/bb_fix/foonathan-memory-vendor/fix/RDEPENDS b/bb_fix/foonathan-memory-vendor/fix/RDEPENDS new file mode 100644 index 0000000..95420e9 --- /dev/null +++ b/bb_fix/foonathan-memory-vendor/fix/RDEPENDS @@ -0,0 +1,2 @@ +-cmake-native ++cmake diff --git a/bb_fix/libyaml-vendor/fix/APPENDS b/bb_fix/libyaml-vendor/fix/APPENDS index c8a02aa..2e35e72 100644 --- a/bb_fix/libyaml-vendor/fix/APPENDS +++ b/bb_fix/libyaml-vendor/fix/APPENDS @@ -2,9 +2,16 @@ do_configure:prepend() { cp ${OPENEULER_SP_DIR}/libyaml_vendor/libyaml-0.2.5.tar.gz ${S} } +SYSROOT_DIRS:append = " \ + ${ros_prefix}/cmake \ +" -FILES:${PN}:prepend = " \ - ${prefix}/cmake \ - ${prefix}/lib \ +FILES:${PN}:append = " \ + ${ros_prefix}/lib \ +" +FILES:${PN}-dev:remove = "\ + ${ros_prefix}/lib/lib*.so \ +" +FILES:${PN}-dev:append = " \ + ${ros_prefix}/cmake \ " -INSANE_SKIP:${PN}-dev += "dev-elf" diff --git a/bb_fix/pkg.remap b/bb_fix/pkg.remap index 558ad94..4b0ac09 100644 --- a/bb_fix/pkg.remap +++ b/bb_fix/pkg.remap @@ -4,3 +4,62 @@ python3-PyYAML python3-pyyaml libacl acl libacl-devel acl python3-yaml python3-pyyaml +gmock-devel gtest +cmake cmake-native +git git-native +#change all ament_cmake to native because they are tool package +ament-cmake ament-cmake-native +ament-cmake-auto ament-cmake-auto-native +ament-cmake-core ament-cmake-core-native +ament-cmake-export-definitions ament-cmake-export-definitions-native +ament-cmake-export-dependencies ament-cmake-export-dependencies-native +ament-cmake-export-include-directories ament-cmake-export-include-directories-native +ament-cmake-export-interfaces ament-cmake-export-interfaces-native +ament-cmake-export-libraries ament-cmake-export-libraries-native +ament-cmake-export-link-flags ament-cmake-export-link-flags-native +ament-cmake-export-targets ament-cmake-export-targets-native +ament-cmake-gen-version-h ament-cmake-gen-version-h-native +ament-cmake-gmock ament-cmake-gmock-native +ament-cmake-google-benchmark ament-cmake-google-benchmark-native +ament-cmake-gtest ament-cmake-gtest-native +ament-cmake-include-directories ament-cmake-include-directories-native +ament-cmake-libraries ament-cmake-libraries-native +ament-cmake-nose ament-cmake-nose-native +ament-cmake-pytest ament-cmake-pytest-native +ament-cmake-python ament-cmake-python-native +ament-cmake-target-dependencies ament-cmake-target-dependencies-native +ament-cmake-test ament-cmake-test-native +ament-cmake-version ament-cmake-version-native +#change all ament_lint to native because they are tool package +ment-clang-format ament-clang-format-native +ament-clang-tidy ament-clang-tidy-native +ament-cmake-clang-format ament-cmake-clang-format-native +ament-cmake-clang-tidy ament-cmake-clang-tidy-native +ament-cmake-copyright ament-cmake-copyright-native +ament-cmake-cppcheck ament-cmake-cppcheck-native +ament-cmake-cpplint ament-cmake-cpplint-native +ament-cmake-flake8 ament-cmake-flake8-native +ament-cmake-lint-cmake ament-cmake-lint-cmake-native +ament-cmake-mypy ament-cmake-mypy-native +ament-cmake-pclint ament-cmake-pclint-native +ament-cmake-pep257 ament-cmake-pep257-native +ament-cmake-pycodestyle ament-cmake-pycodestyle-native +ament-cmake-pyflakes ament-cmake-pyflakes-native +ament-cmake-uncrustify ament-cmake-uncrustify-native +ament-cmake-xmllint ament-cmake-xmllint-native +ament-copyright ament-copyright-native +ament-cppcheck ament-cppcheck-native +ament-cpplint ament-cpplint-native +ament-flake8 ament-flake8-native +ament-lint ament-lint-native +ament-lint-auto ament-lint-auto-native +ament-lint-cmake ament-lint-cmake-native +ament-lint-common ament-lint-common-native +ament-mypy ament-mypy-native +ament-pclint ament-pclint-native +ament-pep257 ament-pep257-native +ament-pycodestyle ament-pycodestyle-native +ament-pyflakes ament-pyflakes-native +ament-uncrustify ament-uncrustify-native +ament-xmllint ament-xmllint-native +ament-cmake-ros ament-cmake-ros-native diff --git a/bb_fix/python3-mock/fix/DEPENDS b/bb_fix/python3-mock/fix/DEPENDS index 6e35ebd..8566cc0 100644 --- a/bb_fix/python3-mock/fix/DEPENDS +++ b/bb_fix/python3-mock/fix/DEPENDS @@ -1 +1 @@ --python3-unittest2 +-python3-unittest2-native diff --git a/bb_fix/python3-pydocstyle/fix/RDEPENDS b/bb_fix/python3-pydocstyle/fix/RDEPENDS new file mode 100644 index 0000000..c5ad32c --- /dev/null +++ b/bb_fix/python3-pydocstyle/fix/RDEPENDS @@ -0,0 +1 @@ +-python3-pydocstyle diff --git a/bb_fix/python3-sphinx/fix/DEPENDS b/bb_fix/python3-sphinx/fix/DEPENDS index e36b3d1..232411b 100644 --- a/bb_fix/python3-sphinx/fix/DEPENDS +++ b/bb_fix/python3-sphinx/fix/DEPENDS @@ -1,13 +1,13 @@ --python3-sphinxcontrib-applehelp --python3-sphinxcontrib-devhelp --python3-sphinxcontrib-htmlhelp --python3-sphinxcontrib-jsmath --python3-sphinxcontrib-qthelp --python3-sphinxcontrib-serializinghtml --python3-sphinx-theme-alabaster --python3-test --python3-imagesize --python3-snowballstemmer --python3-mock --graphviz --dos2unix +-python3-sphinxcontrib-applehelp-native +-python3-sphinxcontrib-devhelp-native +-python3-sphinxcontrib-htmlhelp-native +-python3-sphinxcontrib-jsmath-native +-python3-sphinxcontrib-qthelp-native +-python3-sphinxcontrib-serializinghtml-native +-python3-sphinx-theme-alabaster-native +-python3-test-native +-python3-imagesize-native +-python3-snowballstemmer-native +-python3-mock-native +-graphviz-native +-dos2unix-native diff --git a/bb_fix/python3-sphinx/fix/RDEPENDS b/bb_fix/python3-sphinx/fix/RDEPENDS index a5fe6d9..5851a19 100644 --- a/bb_fix/python3-sphinx/fix/RDEPENDS +++ b/bb_fix/python3-sphinx/fix/RDEPENDS @@ -7,3 +7,4 @@ -python3-sphinxcontrib-websupport -python3-sphinx-theme-alabaster -python3-sphinx_rtd_theme +-python3-requests diff --git a/bb_fix/rcl-yaml-param-parser/fix/APPENDS b/bb_fix/rcl-yaml-param-parser/fix/APPENDS new file mode 100644 index 0000000..6f0598d --- /dev/null +++ b/bb_fix/rcl-yaml-param-parser/fix/APPENDS @@ -0,0 +1,6 @@ +FILES:${PN}:append = " \ + ${ros_prefix}/lib \ +" +FILES:${PN}-dev:remove = "\ + ${ros_prefix}/lib/lib*.so \ +" diff --git a/bb_fix/rmw-implementation/fix/DEPENDS b/bb_fix/rmw-implementation/fix/DEPENDS new file mode 100644 index 0000000..161a1da --- /dev/null +++ b/bb_fix/rmw-implementation/fix/DEPENDS @@ -0,0 +1,4 @@ +-rmw-cyclonedds-cpp-native +-rmw-fastrtps-dynamic-cpp-native ++rmw-fastrtps-dynamic-cpp + diff --git a/bb_fix/rmw-implementation/fix/RDEPENDS b/bb_fix/rmw-implementation/fix/RDEPENDS new file mode 100644 index 0000000..843697f --- /dev/null +++ b/bb_fix/rmw-implementation/fix/RDEPENDS @@ -0,0 +1 @@ ++rmw-fastrtps-cpp diff --git a/bb_fix/ros-core/fix/RDEPENDS b/bb_fix/ros-core/fix/RDEPENDS new file mode 100644 index 0000000..3c3ac61 --- /dev/null +++ b/bb_fix/ros-core/fix/RDEPENDS @@ -0,0 +1,16 @@ +-ament-cmake-auto-native +-ament-cmake-gmock-native +-ament-cmake-gtest-native +-ament-cmake-native +-ament-cmake-pytest-native +-ament-cmake-ros-native +-ament-lint-auto-native +-ament-lint-common-native ++ament-cmake-auto ++ament-cmake-gmock ++ament-cmake-gtest ++ament-cmake ++ament-cmake-pytest ++ament-cmake-ros ++ament-lint-auto ++ament-lint-common diff --git a/bb_fix/ros-workspace/fix/DEPENDS b/bb_fix/ros-workspace/fix/DEPENDS new file mode 100644 index 0000000..d0a27bc --- /dev/null +++ b/bb_fix/ros-workspace/fix/DEPENDS @@ -0,0 +1,4 @@ +-ament-cmake-core ++ament-cmake-core-native +-ament-package ++ament-package-native diff --git a/bb_fix/sros2/fix/RDEPENDS b/bb_fix/sros2/fix/RDEPENDS new file mode 100644 index 0000000..8b65f19 --- /dev/null +++ b/bb_fix/sros2/fix/RDEPENDS @@ -0,0 +1 @@ +-python3-cryptography diff --git a/gen-pkg-bb.sh b/gen-pkg-bb.sh index ce2166a..d505227 100755 --- a/gen-pkg-bb.sh +++ b/gen-pkg-bb.sh @@ -143,10 +143,14 @@ rename_requires() { require_file=$1 - while read deb_pkg rpm_pkg + for dep in `cat $require_file` do - sed -i "s#^${deb_pkg}\$#${rpm_pkg}#g" $require_file - done <${ROS_PKG_REMAP} + map=`grep "^${dep} " ${ROS_PKG_REMAP}` + [ "$map" == "" ] && continue + + bb_pkg=`echo $map | cut -d' ' -f2` + sed -i "s#^${dep}\$#${bb_pkg}#g" $require_file + done } # rename the openEuler rpm package name to openEuler embedded package name, @@ -158,10 +162,14 @@ rename_depend() { require_file=$1 - while read rpm_pkg bb_pkg + for dep in `cat $require_file` do - sed -i "s#^${rpm_pkg}\$#${bb_pkg}#g" $require_file - done <${BB_FIX_PKG_REMAP} + map=`grep "^${dep} " ${BB_FIX_PKG_REMAP}` + [ "$map" == "" ] && continue + + bb_pkg=`echo $map | cut -d' ' -f2` + sed -i "s#^${dep}\$#${bb_pkg}#g" $require_file + done } spec_fix() @@ -254,7 +262,6 @@ gen_each_depend() rename_requires $require_file rename_depend $require_file - bb_fix $pkg $require_file $fix_bb_deps cat $require_file | sed -e 's#-devel$##g' | sort | uniq >${OUTPUT}/.temp${fix_bb_deps} @@ -262,6 +269,7 @@ gen_each_depend() then if [ ! -f ${OUTPUT}/.tempRDEPENDS ] then + bb_fix $pkg ${OUTPUT}/.temp${fix_bb_deps} $fix_bb_deps cat ${OUTPUT}/.temp${fix_bb_deps} | sort | uniq | sed -e 's#$# \\#g' -e 's#^# #g' >> $bbfile cat ${OUTPUT}/.temp${fix_bb_deps} >> ${ROS_NATIVE_PKGS_TMP1} return @@ -272,7 +280,7 @@ gen_each_depend() for i in `cat $require_file | sed -e 's#-devel$##g' | sort | uniq` do grep -q "^${i}$" ${OUTPUT}/.tempRDEPENDS - if [ $? -eq 0 ] + if [ $? -eq 0 -o "${i##*-}" == "native" ] then # if package in RDEPENDS, it's must a target device package. echo "$i" >> ${OUTPUT}/.temp${fix_bb_deps} @@ -284,6 +292,8 @@ gen_each_depend() cat ${OUTPUT}/.tempRDEPENDS >> ${OUTPUT}/.temp${fix_bb_deps} fi + bb_fix $pkg ${OUTPUT}/.temp${fix_bb_deps} $fix_bb_deps + cat ${OUTPUT}/.temp${fix_bb_deps} | sort | uniq | sed -e 's#$# \\#g' -e 's#^# #g' >> $bbfile } diff --git a/gen-pkg-ext-bb.sh b/gen-pkg-ext-bb.sh index 3df2664..bada24f 100755 --- a/gen-pkg-ext-bb.sh +++ b/gen-pkg-ext-bb.sh @@ -113,59 +113,71 @@ gen_license() rename_depend() { - dep=$1 + require_file=$1 - echo "$dep" | grep -q "^python%{python3_pkgversion}" - [ $? -eq 0 ] && dep=`echo "$dep" | sed -e 's#python%{python3_pkgversion}#python3#g'` + sed -i 's#python%{python3_pkgversion}#python3#g' $require_file - grep -q "^$dep " ${BB_FIX_PKG_REMAP} - [ $? -ne 0 ] && echo "$dep" && return + for dep in `cat $require_file` + do + map=`grep "^${dep} " ${BB_FIX_PKG_REMAP}` + [ "$map" == "" ] && continue - grep "^$dep " ${BB_FIX_PKG_REMAP} | cut -d' ' -f2 + bb_pkg=`echo $map | cut -d' ' -f2` + sed -i "s#^${dep}\$#${bb_pkg}#g" $require_file + done } -is_delete_depends() +# fix DEPENDS and RDEPENDS +bb_fix() { - dep=$1 - pkg=$2 + pkg=$1 + require_file=$2 fix_bb_deps=$3 - grep -q "^$dep$" ${BB_FIX}/all.remove && return 0 - - [ "$dep" == "$pkg" ] && return 0 - - [ ! -f ${BB_FIX}/${pkg}/fix/${fix_bb_deps} ] && return 1 + if [ -f ${BB_FIX}/${pkg}/fix/${fix_bb_deps} ] + then + for dep in `grep "^\-" ${BB_FIX}/${pkg}/fix/${fix_bb_deps} | sed -e 's#^\-##g'` + do + sed -i "/^${dep}\$/d" $require_file + done - grep -q "^\-${dep}$" ${BB_FIX}/${pkg}/fix/${fix_bb_deps} && return 0 + for dep in `grep "^\+" ${BB_FIX}/${pkg}/fix/${fix_bb_deps} | sed -e 's#^\+##g'` + do + echo "$dep" >> $require_file + done + fi - return 1 + while read dep + do + sed -i "/^$dep\$/d" $require_file + done < ${BB_FIX}/all.remove } - gen_each_depend() { - spec=$1 - bbfile=$2 - bbfile_name=$3 - fix_bb_deps=$4 - spec_deps=$5 + pkg=$1 + spec=$2 + bbfile=$3 + bbfile_name=$4 + fix_bb_deps=$5 + spec_deps=$6 require_file=${OUTPUT}/.tempDepends - > ${require_file} - for dep in `grep "^${spec_deps}:" $spec | awk -F":" '{print $2}' | awk -F">=" '{print $1}' | grep -v " = " | sed -e 's#-devel##g'` + >$require_file + for dep in `grep "^${spec_deps}:" $spec | awk -F":" '{print $2}' | awk -F">=" '{print $1}' | grep -v " = "` do - is_delete_depends $dep $bbfile_name ${fix_bb_deps} && continue - - dep_new=`rename_depend $dep` - echo $dep_new >> $require_file + echo $dep >>$require_file done - cat $require_file | sed -e 's# ##g' | sort | uniq >${OUTPUT}/.temp${fix_bb_deps} + rename_depend ${require_file} + + cat $require_file | sed -e 's#-devel$##g' | sort | uniq >${OUTPUT}/.temp${fix_bb_deps} if [ "$fix_bb_deps" == "DEPENDS" ] then if [ ! -f ${OUTPUT}/.tempRDEPENDS ] then + bb_fix $pkg ${OUTPUT}/.temp${fix_bb_deps} $fix_bb_deps cat ${OUTPUT}/.temp${fix_bb_deps} | sort | uniq | sed -e 's#$# \\#g' -e 's#^# #g' >> $bbfile return fi @@ -175,10 +187,10 @@ gen_each_depend() #cat $require_file #echo ------------------- - for i in `cat $require_file | sort | uniq` + for i in `cat $require_file | sed -e 's#-devel$##g' | sort | uniq` do grep -q "^${i}$" ${OUTPUT}/.tempRDEPENDS - if [ $? -eq 0 ] + if [ $? -eq 0 -o "${i##*-}" == "native" ] then # if package in RDEPENDS, it's must a target device package. echo "$i" >> ${OUTPUT}/.temp${fix_bb_deps} @@ -189,23 +201,26 @@ gen_each_depend() cat ${OUTPUT}/.tempRDEPENDS >> ${OUTPUT}/.temp${fix_bb_deps} fi + bb_fix $pkg ${OUTPUT}/.temp${fix_bb_deps} $fix_bb_deps + cat ${OUTPUT}/.temp${fix_bb_deps} | sort | uniq | sed -e 's#$# \\#g' -e 's#^# #g' >> $bbfile } gen_depends() { - spec=$1 - bbfile=$2 - bbfile_name=$3 + pkg=$1 + spec=$2 + bbfile=$3 + bbfile_name=$4 rm -f ${OUTPUT}/{.tempRDEPENDS,.tempDEPENDS,.tempTDEPENDS} echo "RDEPENDS_\${PN} += \" \\" >> $bbfile - gen_each_depend $spec $bbfile $bbfile_name RDEPENDS Requires + gen_each_depend $pkg $spec $bbfile $bbfile_name RDEPENDS Requires echo "\"" >> $bbfile echo "" >> $bbfile echo "DEPENDS += \" \\" >> $bbfile - gen_each_depend $spec $bbfile $bbfile_name DEPENDS BuildRequires + gen_each_depend $pkg $spec $bbfile $bbfile_name DEPENDS BuildRequires echo "\"" >> $bbfile echo "" >> $bbfile } @@ -311,7 +326,7 @@ main() echo "S = \"\${WORKDIR}/${unpack_name}\"" >> $bbfile echo "" >> $bbfile - gen_depends $spec $bbfile $bbfile_name + gen_depends $package_name $spec $bbfile $bbfile_name gen_appends $package_name $bbfile -- Gitee From bb85bab33d9bd890c03a4758b9ddc0148252c68b Mon Sep 17 00:00:00 2001 From: will_niutao Date: Mon, 22 May 2023 21:10:49 +0800 Subject: [PATCH 17/22] fix package error Signed-off-by: will_niutao --- bb_fix/builtin-interfaces/fix/APPENDS | 3 +++ bb_fix/fastrtps/fix/APPENDS | 3 +++ bb_fix/rclcpp/fix/APPENDS | 6 ++++++ bb_fix/rclcpp/fix/DEPENDS | 16 ++++++++++++++++ bb_fix/rclcpp/fix/RDEPENDS | 7 +++++++ bb_fix/rosidl-typesupport-cpp/fix/DEPENDS | 3 +++ 6 files changed, 38 insertions(+) create mode 100644 bb_fix/builtin-interfaces/fix/APPENDS create mode 100644 bb_fix/rclcpp/fix/APPENDS create mode 100644 bb_fix/rclcpp/fix/DEPENDS create mode 100644 bb_fix/rclcpp/fix/RDEPENDS create mode 100644 bb_fix/rosidl-typesupport-cpp/fix/DEPENDS diff --git a/bb_fix/builtin-interfaces/fix/APPENDS b/bb_fix/builtin-interfaces/fix/APPENDS new file mode 100644 index 0000000..8fcee11 --- /dev/null +++ b/bb_fix/builtin-interfaces/fix/APPENDS @@ -0,0 +1,3 @@ +do_install:append() { + rm ${D}/${prefix}/${PYTHON_SITEPACKAGES_DIR}/${ROS_BPN}/lib*_py.so +} diff --git a/bb_fix/fastrtps/fix/APPENDS b/bb_fix/fastrtps/fix/APPENDS index 13d728c..864c784 100644 --- a/bb_fix/fastrtps/fix/APPENDS +++ b/bb_fix/fastrtps/fix/APPENDS @@ -1,3 +1,6 @@ FILES:${PN} += " \ ${prefix}/tools \ " +SYSROOT_DIRS:append =" \ + ${prefix}/bin \ +" diff --git a/bb_fix/rclcpp/fix/APPENDS b/bb_fix/rclcpp/fix/APPENDS new file mode 100644 index 0000000..ad7dafd --- /dev/null +++ b/bb_fix/rclcpp/fix/APPENDS @@ -0,0 +1,6 @@ +FILES:${PN}-dev:remove = " \ + ${prefix}/lib/lib*.so \ +" +FILES:${PN}:append = " \ + ${prefix}/lib \ +" diff --git a/bb_fix/rclcpp/fix/DEPENDS b/bb_fix/rclcpp/fix/DEPENDS new file mode 100644 index 0000000..73e9fb8 --- /dev/null +++ b/bb_fix/rclcpp/fix/DEPENDS @@ -0,0 +1,16 @@ ++python3-empy-native ++rcutils-native +-ament-index-cpp-native +-builtin-interfaces-native +-rcl-interfaces-native +-rosgraph-msgs-native +-rosidl-runtime-cpp-native +-rosidl-typesupport-c-native +-rosidl-typesupport-cpp-native ++ament-index-cpp ++builtin-interfaces ++rcl-interfaces ++rosgraph-msgs ++rosidl-runtime-cpp ++rosidl-typesupport-c ++rosidl-typesupport-cpp diff --git a/bb_fix/rclcpp/fix/RDEPENDS b/bb_fix/rclcpp/fix/RDEPENDS new file mode 100644 index 0000000..105d4c4 --- /dev/null +++ b/bb_fix/rclcpp/fix/RDEPENDS @@ -0,0 +1,7 @@ +-ament-index-cpp +-builtin-interfaces +-rcl-interfaces +-rosgraph-msgs +-rosidl-runtime-cpp +-rosidl-typesupport-c +-rosidl-typesupport-cpp diff --git a/bb_fix/rosidl-typesupport-cpp/fix/DEPENDS b/bb_fix/rosidl-typesupport-cpp/fix/DEPENDS new file mode 100644 index 0000000..088a009 --- /dev/null +++ b/bb_fix/rosidl-typesupport-cpp/fix/DEPENDS @@ -0,0 +1,3 @@ +-rosidl-typesupport-introspection-cpp-native ++rosidl-typesupport-introspection-cpp ++rosidl-cmake -- Gitee From 37d4d8db26ba3ed0b8285298e2486a068d2704eb Mon Sep 17 00:00:00 2001 From: will_niutao Date: Tue, 23 May 2023 20:31:53 +0800 Subject: [PATCH 18/22] fix: fix license error --- bb_fix/cppcheck/fix/DEPENDS | 1 + bb_fix/cppcheck/fix/RDEPENDS | 1 + bb_fix/gmock-vendor/fix/APPENDS | 7 ++----- bb_fix/gtest-vendor/fix/APPENDS | 7 ++----- bb_fix/python3-pydocstyle/fix/RDEPENDS | 1 + .../files/0-rclpy-fix-python-library-error.patch | 12 ++++++++++++ bb_fix/rmw-dds-common/fix/APPENDS | 3 +++ bb_fix/std-srvs/fix/APPENDS | 3 +++ bb_fix/unique-identifier-msgs/fix/APPENDS | 3 +++ gen-pkg-bb.sh | 13 +++++++++---- 10 files changed, 37 insertions(+), 14 deletions(-) create mode 100644 bb_fix/cppcheck/fix/DEPENDS create mode 100644 bb_fix/cppcheck/fix/RDEPENDS create mode 100644 bb_fix/rclpy/files/0-rclpy-fix-python-library-error.patch create mode 100644 bb_fix/rmw-dds-common/fix/APPENDS create mode 100644 bb_fix/std-srvs/fix/APPENDS create mode 100644 bb_fix/unique-identifier-msgs/fix/APPENDS diff --git a/bb_fix/cppcheck/fix/DEPENDS b/bb_fix/cppcheck/fix/DEPENDS new file mode 100644 index 0000000..5f1841c --- /dev/null +++ b/bb_fix/cppcheck/fix/DEPENDS @@ -0,0 +1 @@ +-docbook-style-xsl-native diff --git a/bb_fix/cppcheck/fix/RDEPENDS b/bb_fix/cppcheck/fix/RDEPENDS new file mode 100644 index 0000000..45b1e70 --- /dev/null +++ b/bb_fix/cppcheck/fix/RDEPENDS @@ -0,0 +1 @@ +-python3-unversioned-command diff --git a/bb_fix/gmock-vendor/fix/APPENDS b/bb_fix/gmock-vendor/fix/APPENDS index 64a36fc..1096e32 100644 --- a/bb_fix/gmock-vendor/fix/APPENDS +++ b/bb_fix/gmock-vendor/fix/APPENDS @@ -1,6 +1,3 @@ -FILES:${PN}-dev += " \ - ${ros_prefix}/src \ -" -SYSROOT_DIRS_NATIVE:append = " \ - ${prefix}/src \ +FILES:${PN} += " \ + ${ros_prefix}/src \ " diff --git a/bb_fix/gtest-vendor/fix/APPENDS b/bb_fix/gtest-vendor/fix/APPENDS index 64a36fc..1096e32 100644 --- a/bb_fix/gtest-vendor/fix/APPENDS +++ b/bb_fix/gtest-vendor/fix/APPENDS @@ -1,6 +1,3 @@ -FILES:${PN}-dev += " \ - ${ros_prefix}/src \ -" -SYSROOT_DIRS_NATIVE:append = " \ - ${prefix}/src \ +FILES:${PN} += " \ + ${ros_prefix}/src \ " diff --git a/bb_fix/python3-pydocstyle/fix/RDEPENDS b/bb_fix/python3-pydocstyle/fix/RDEPENDS index c5ad32c..254faed 100644 --- a/bb_fix/python3-pydocstyle/fix/RDEPENDS +++ b/bb_fix/python3-pydocstyle/fix/RDEPENDS @@ -1 +1,2 @@ -python3-pydocstyle +-python3-snowballstemmer diff --git a/bb_fix/rclpy/files/0-rclpy-fix-python-library-error.patch b/bb_fix/rclpy/files/0-rclpy-fix-python-library-error.patch new file mode 100644 index 0000000..2c4867a --- /dev/null +++ b/bb_fix/rclpy/files/0-rclpy-fix-python-library-error.patch @@ -0,0 +1,12 @@ +diff -Naur ros-humble-rclpy-3.3.8_org/CMakeLists.txt ros-humble-rclpy-3.3.8/CMakeLists.txt +--- ros-humble-rclpy-3.3.8_org/CMakeLists.txt 2023-05-23 18:03:07.487640448 +0800 ++++ ros-humble-rclpy-3.3.8/CMakeLists.txt 2023-05-23 18:03:17.041705896 +0800 +@@ -116,7 +116,7 @@ + rcutils::rcutils + rosidl_runtime_c::rosidl_runtime_c + ) +-configure_build_install_location(_rclpy_pybind11) ++#configure_build_install_location(_rclpy_pybind11) + + if(NOT WIN32) + ament_environment_hooks( diff --git a/bb_fix/rmw-dds-common/fix/APPENDS b/bb_fix/rmw-dds-common/fix/APPENDS new file mode 100644 index 0000000..8fcee11 --- /dev/null +++ b/bb_fix/rmw-dds-common/fix/APPENDS @@ -0,0 +1,3 @@ +do_install:append() { + rm ${D}/${prefix}/${PYTHON_SITEPACKAGES_DIR}/${ROS_BPN}/lib*_py.so +} diff --git a/bb_fix/std-srvs/fix/APPENDS b/bb_fix/std-srvs/fix/APPENDS new file mode 100644 index 0000000..8fcee11 --- /dev/null +++ b/bb_fix/std-srvs/fix/APPENDS @@ -0,0 +1,3 @@ +do_install:append() { + rm ${D}/${prefix}/${PYTHON_SITEPACKAGES_DIR}/${ROS_BPN}/lib*_py.so +} diff --git a/bb_fix/unique-identifier-msgs/fix/APPENDS b/bb_fix/unique-identifier-msgs/fix/APPENDS new file mode 100644 index 0000000..8fcee11 --- /dev/null +++ b/bb_fix/unique-identifier-msgs/fix/APPENDS @@ -0,0 +1,3 @@ +do_install:append() { + rm ${D}/${prefix}/${PYTHON_SITEPACKAGES_DIR}/${ROS_BPN}/lib*_py.so +} diff --git a/gen-pkg-bb.sh b/gen-pkg-bb.sh index d505227..ce8d877 100755 --- a/gen-pkg-bb.sh +++ b/gen-pkg-bb.sh @@ -82,10 +82,10 @@ gen_license() fi done < ${OUTPUT}/.tempLicense - lic_org=`grep "license" ${pkg_dir}/package.xml` - lic_beginline=`grep -n "license" ${pkg_dir}/package.xml | head -1 | cut -d':' -f1` - lic_endline=`grep -n "license" ${pkg_dir}/package.xml | tail -1 | cut -d':' -f1` - lic_md5=`echo "$lic_org" | md5sum | cut -d' ' -f1` + lic_org=`grep "> $bbfile echo "LIC_FILES_CHKSUM = \"file://package.xml;beginline=${lic_beginline};endline=${lic_endline};md5=${lic_md5}\"" >> $bbfile @@ -293,6 +293,11 @@ gen_each_depend() fi bb_fix $pkg ${OUTPUT}/.temp${fix_bb_deps} $fix_bb_deps + + if [ "$fix_bb_deps" == "RDEPENDS" ] + then + sed -i "s#-native##g" ${OUTPUT}/.temp${fix_bb_deps} + fi cat ${OUTPUT}/.temp${fix_bb_deps} | sort | uniq | sed -e 's#$# \\#g' -e 's#^# #g' >> $bbfile -- Gitee From 72289d3d4136db247acf34a2adf247c65b1a467d Mon Sep 17 00:00:00 2001 From: will_niutao Date: Wed, 24 May 2023 09:02:42 +0800 Subject: [PATCH 19/22] fix: this commit can success build demo-nodes-cpp Signed-off-by: will_niutao --- bb_fix/all.remove | 1 + bb_fix/builtin-interfaces/fix/APPENDS | 3 --- bb_fix/cppcheck/fix/APPENDS | 3 +++ bb_fix/rclpy/fix/APPENDS | 4 ++++ bb_fix/rmw-dds-common/fix/APPENDS | 3 --- bb_fix/std-srvs/fix/APPENDS | 3 --- bb_fix/unique-identifier-msgs/fix/APPENDS | 3 --- gen-pkg-bb.sh | 7 +++---- gen-pkg-ext-bb.sh | 10 ++++++---- 9 files changed, 17 insertions(+), 20 deletions(-) delete mode 100644 bb_fix/builtin-interfaces/fix/APPENDS create mode 100644 bb_fix/cppcheck/fix/APPENDS create mode 100644 bb_fix/rclpy/fix/APPENDS delete mode 100644 bb_fix/rmw-dds-common/fix/APPENDS delete mode 100644 bb_fix/std-srvs/fix/APPENDS delete mode 100644 bb_fix/unique-identifier-msgs/fix/APPENDS diff --git a/bb_fix/all.remove b/bb_fix/all.remove index 34fa018..118ea2b 100644 --- a/bb_fix/all.remove +++ b/bb_fix/all.remove @@ -8,3 +8,4 @@ gdb gdb-native libatomic libatomic-native +cmake diff --git a/bb_fix/builtin-interfaces/fix/APPENDS b/bb_fix/builtin-interfaces/fix/APPENDS deleted file mode 100644 index 8fcee11..0000000 --- a/bb_fix/builtin-interfaces/fix/APPENDS +++ /dev/null @@ -1,3 +0,0 @@ -do_install:append() { - rm ${D}/${prefix}/${PYTHON_SITEPACKAGES_DIR}/${ROS_BPN}/lib*_py.so -} diff --git a/bb_fix/cppcheck/fix/APPENDS b/bb_fix/cppcheck/fix/APPENDS new file mode 100644 index 0000000..56e4d8f --- /dev/null +++ b/bb_fix/cppcheck/fix/APPENDS @@ -0,0 +1,3 @@ +FILES:${PN} += " \ + ${datadir}/Cppcheck \ +" diff --git a/bb_fix/rclpy/fix/APPENDS b/bb_fix/rclpy/fix/APPENDS new file mode 100644 index 0000000..06e848c --- /dev/null +++ b/bb_fix/rclpy/fix/APPENDS @@ -0,0 +1,4 @@ +# fix link error +do_configure:prepend() { + rm -f ${STAGING_DIR_NATIVE}/usr/lib/libpython*.so +} diff --git a/bb_fix/rmw-dds-common/fix/APPENDS b/bb_fix/rmw-dds-common/fix/APPENDS deleted file mode 100644 index 8fcee11..0000000 --- a/bb_fix/rmw-dds-common/fix/APPENDS +++ /dev/null @@ -1,3 +0,0 @@ -do_install:append() { - rm ${D}/${prefix}/${PYTHON_SITEPACKAGES_DIR}/${ROS_BPN}/lib*_py.so -} diff --git a/bb_fix/std-srvs/fix/APPENDS b/bb_fix/std-srvs/fix/APPENDS deleted file mode 100644 index 8fcee11..0000000 --- a/bb_fix/std-srvs/fix/APPENDS +++ /dev/null @@ -1,3 +0,0 @@ -do_install:append() { - rm ${D}/${prefix}/${PYTHON_SITEPACKAGES_DIR}/${ROS_BPN}/lib*_py.so -} diff --git a/bb_fix/unique-identifier-msgs/fix/APPENDS b/bb_fix/unique-identifier-msgs/fix/APPENDS deleted file mode 100644 index 8fcee11..0000000 --- a/bb_fix/unique-identifier-msgs/fix/APPENDS +++ /dev/null @@ -1,3 +0,0 @@ -do_install:append() { - rm ${D}/${prefix}/${PYTHON_SITEPACKAGES_DIR}/${ROS_BPN}/lib*_py.so -} diff --git a/gen-pkg-bb.sh b/gen-pkg-bb.sh index ce8d877..26584fd 100755 --- a/gen-pkg-bb.sh +++ b/gen-pkg-bb.sh @@ -296,11 +296,10 @@ gen_each_depend() if [ "$fix_bb_deps" == "RDEPENDS" ] then - sed -i "s#-native##g" ${OUTPUT}/.temp${fix_bb_deps} + cat ${OUTPUT}/.temp${fix_bb_deps} | sed -e 's#-native$##g' | sort | uniq | sed -e 's#$# \\#g' -e 's#^# #g' >> $bbfile + else + cat ${OUTPUT}/.temp${fix_bb_deps} | sort | uniq | sed -e 's#$# \\#g' -e 's#^# #g' >> $bbfile fi - - cat ${OUTPUT}/.temp${fix_bb_deps} | sort | uniq | sed -e 's#$# \\#g' -e 's#^# #g' >> $bbfile - } gen_depends() diff --git a/gen-pkg-ext-bb.sh b/gen-pkg-ext-bb.sh index bada24f..c343233 100755 --- a/gen-pkg-ext-bb.sh +++ b/gen-pkg-ext-bb.sh @@ -183,9 +183,6 @@ gen_each_depend() fi rm -f ${OUTPUT}/.temp${fix_bb_deps} - #echo -------------------- - #cat $require_file - #echo ------------------- for i in `cat $require_file | sed -e 's#-devel$##g' | sort | uniq` do @@ -203,7 +200,12 @@ gen_each_depend() bb_fix $pkg ${OUTPUT}/.temp${fix_bb_deps} $fix_bb_deps - cat ${OUTPUT}/.temp${fix_bb_deps} | sort | uniq | sed -e 's#$# \\#g' -e 's#^# #g' >> $bbfile + if [ "$fix_bb_deps" == "RDEPENDS" ] + then + cat ${OUTPUT}/.temp${fix_bb_deps} | sed -e 's#-native$##g' | sort | uniq | sed -e 's#$# \\#g' -e 's#^# #g' >> $bbfile + else + cat ${OUTPUT}/.temp${fix_bb_deps} | sort | uniq | sed -e 's#$# \\#g' -e 's#^# #g' >> $bbfile + fi } gen_depends() -- Gitee From 731c1806d26c054d44c8a6e069057b2641874aee Mon Sep 17 00:00:00 2001 From: will_niutao Date: Wed, 24 May 2023 10:00:49 +0800 Subject: [PATCH 20/22] fix: this commit can success build openeuler-image-ros-humble Signed-off-by: will_niutao --- bb_fix/ament-cmake-ros/fix/RDEPENDS | 4 ++++ bb_fix/rcl-yaml-param-parser/fix/RDEPENDS | 1 + bb_fix/ros-core/fix/RDEPENDS | 14 ++++++-------- create-ros-yaml-for-gitee.sh | 6 ++++++ 4 files changed, 17 insertions(+), 8 deletions(-) create mode 100644 bb_fix/ament-cmake-ros/fix/RDEPENDS create mode 100644 bb_fix/rcl-yaml-param-parser/fix/RDEPENDS diff --git a/bb_fix/ament-cmake-ros/fix/RDEPENDS b/bb_fix/ament-cmake-ros/fix/RDEPENDS new file mode 100644 index 0000000..cf13230 --- /dev/null +++ b/bb_fix/ament-cmake-ros/fix/RDEPENDS @@ -0,0 +1,4 @@ +-ament-cmake-native +-ament-cmake-gmock-native +-ament-cmake-gtest-native +-ament-cmake-pytest-native diff --git a/bb_fix/rcl-yaml-param-parser/fix/RDEPENDS b/bb_fix/rcl-yaml-param-parser/fix/RDEPENDS new file mode 100644 index 0000000..f249edf --- /dev/null +++ b/bb_fix/rcl-yaml-param-parser/fix/RDEPENDS @@ -0,0 +1 @@ +-yaml-cpp diff --git a/bb_fix/ros-core/fix/RDEPENDS b/bb_fix/ros-core/fix/RDEPENDS index 3c3ac61..1cacd8b 100644 --- a/bb_fix/ros-core/fix/RDEPENDS +++ b/bb_fix/ros-core/fix/RDEPENDS @@ -6,11 +6,9 @@ -ament-cmake-ros-native -ament-lint-auto-native -ament-lint-common-native -+ament-cmake-auto -+ament-cmake-gmock -+ament-cmake-gtest -+ament-cmake -+ament-cmake-pytest -+ament-cmake-ros -+ament-lint-auto -+ament-lint-common +-ament-index-cpp +-ament-index-python +-launch-testing-ament-cmake +-rosidl-default-generators ++rosidl-generator-cpp ++rosidl-typesupport-c diff --git a/create-ros-yaml-for-gitee.sh b/create-ros-yaml-for-gitee.sh index cbf94fa..f160270 100755 --- a/create-ros-yaml-for-gitee.sh +++ b/create-ros-yaml-for-gitee.sh @@ -39,6 +39,12 @@ main() echo "- name: ${ROS_DISTRO}" >>${ROS_SIG_BASE}/$class/$project.yaml echo " type: protected" >>${ROS_SIG_BASE}/$class/$project.yaml echo " create_from: master" >>${ROS_SIG_BASE}/$class/$project.yaml + echo "- name: Multi-Version_ros-${ROS_DISTRO}_openEuler-22.03-LTS-Next" >>${ROS_SIG_BASE}/$class/$project.yaml + echo " type: protected" >>${ROS_SIG_BASE}/$class/$project.yaml + echo " create_from: ${ROS_DISTRO}" >>${ROS_SIG_BASE}/$class/$project.yaml + echo "- name: Multi-Version_ros-${ROS_DISTRO}_openEuler-22.03-LTS-SP2" >>${ROS_SIG_BASE}/$class/$project.yaml + echo " type: protected" >>${ROS_SIG_BASE}/$class/$project.yaml + echo " create_from: Multi-Version_ros-${ROS_DISTRO}_openEuler-22.03-LTS-Next" >>${ROS_SIG_BASE}/$class/$project.yaml echo "type: public" >>${ROS_SIG_BASE}/$class/$project.yaml done < ${ROS_PROJECTS_NAME} -- Gitee From e94d1729acecc6a2c89507a1698c1d5eb38790da Mon Sep 17 00:00:00 2001 From: will_niutao Date: Wed, 24 May 2023 14:08:50 +0800 Subject: [PATCH 21/22] fix: fix rclpy runtime error --- .../files/0-rclpy-fix-python-library-error.patch | 12 ------------ bb_fix/rclpy/fix/APPENDS | 4 ++++ 2 files changed, 4 insertions(+), 12 deletions(-) delete mode 100644 bb_fix/rclpy/files/0-rclpy-fix-python-library-error.patch diff --git a/bb_fix/rclpy/files/0-rclpy-fix-python-library-error.patch b/bb_fix/rclpy/files/0-rclpy-fix-python-library-error.patch deleted file mode 100644 index 2c4867a..0000000 --- a/bb_fix/rclpy/files/0-rclpy-fix-python-library-error.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur ros-humble-rclpy-3.3.8_org/CMakeLists.txt ros-humble-rclpy-3.3.8/CMakeLists.txt ---- ros-humble-rclpy-3.3.8_org/CMakeLists.txt 2023-05-23 18:03:07.487640448 +0800 -+++ ros-humble-rclpy-3.3.8/CMakeLists.txt 2023-05-23 18:03:17.041705896 +0800 -@@ -116,7 +116,7 @@ - rcutils::rcutils - rosidl_runtime_c::rosidl_runtime_c - ) --configure_build_install_location(_rclpy_pybind11) -+#configure_build_install_location(_rclpy_pybind11) - - if(NOT WIN32) - ament_environment_hooks( diff --git a/bb_fix/rclpy/fix/APPENDS b/bb_fix/rclpy/fix/APPENDS index 06e848c..44f2013 100644 --- a/bb_fix/rclpy/fix/APPENDS +++ b/bb_fix/rclpy/fix/APPENDS @@ -2,3 +2,7 @@ do_configure:prepend() { rm -f ${STAGING_DIR_NATIVE}/usr/lib/libpython*.so } + +do_install:append() { + mv ${D}/${prefix}/${PYTHON_SITEPACKAGES_DIR}/${ROS_BPN}/_rclpy_pybind11.cpython*.so ${D}/${prefix}/${PYTHON_SITEPACKAGES_DIR}/${ROS_BPN}/_rclpy_pybind11.${PYTHON_SOABI}.so +} -- Gitee From 4120995813108e38d30f01e6f541c9eb77aa1ee1 Mon Sep 17 00:00:00 2001 From: will_niutao Date: Wed, 24 May 2023 15:44:13 +0800 Subject: [PATCH 22/22] fix: fix build error Signed-off-by: will_niutao --- bb_fix/ament-cmake-ros/fix/DEPENDS | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 bb_fix/ament-cmake-ros/fix/DEPENDS diff --git a/bb_fix/ament-cmake-ros/fix/DEPENDS b/bb_fix/ament-cmake-ros/fix/DEPENDS new file mode 100644 index 0000000..c59f51a --- /dev/null +++ b/bb_fix/ament-cmake-ros/fix/DEPENDS @@ -0,0 +1,2 @@ ++ament-cmake-gmock-native ++ament-cmake-pytest-native -- Gitee