From d574b59ca226c9be873a5854414b61ae3029242d Mon Sep 17 00:00:00 2001 From: chenhaoran Date: Wed, 1 Jan 2025 13:59:11 +0800 Subject: [PATCH] fix:update compiling explorer from taosx repo --- packaging/deb/makedeb.sh | 13 +++++++------ packaging/rpm/makerpm.sh | 3 ++- packaging/rpm/tdengine.spec | 12 ++++++------ 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/packaging/deb/makedeb.sh b/packaging/deb/makedeb.sh index 9d28b63a1513..93f523a13fb9 100755 --- a/packaging/deb/makedeb.sh +++ b/packaging/deb/makedeb.sh @@ -16,6 +16,7 @@ verType=$7 script_dir="$(dirname $(readlink -f $0))" top_dir="$(readlink -f ${script_dir}/../..)" pkg_dir="${top_dir}/debworkroom" +taosx_dir="$(readlink -f ${script_dir}/../../../../taosx)" #echo "curr_dir: ${curr_dir}" #echo "top_dir: ${top_dir}" @@ -81,11 +82,11 @@ fi if [ -f "${compile_dir}/test/cfg/taoskeeper.service" ]; then cp ${compile_dir}/test/cfg/taoskeeper.service ${pkg_dir}${install_home_path}/cfg || : fi -if [ -f "${compile_dir}/../../../explorer/target/taos-explorer.service" ]; then - cp ${compile_dir}/../../../explorer/target/taos-explorer.service ${pkg_dir}${install_home_path}/cfg || : +if [ -f "${taosx_dir}/explorer/server/examples/explorer.service" ]; then + cp ${taosx_dir}/explorer/server/examples/explorer.service ${pkg_dir}${install_home_path}/cfg/taos-explorer.service || : fi -if [ -f "${compile_dir}/../../../explorer/server/example/explorer.toml" ]; then - cp ${compile_dir}/../../../explorer/server/example/explorer.toml ${pkg_dir}${install_home_path}/cfg || : +if [ -f "${taosx_dir}/explorer/server/examples/explorer.toml" ]; then + cp ${taosx_dir}/explorer/server/examples/explorer.toml ${pkg_dir}${install_home_path}/cfg || : fi # cp ${taoskeeper_binary} ${pkg_dir}${install_home_path}/bin @@ -113,8 +114,8 @@ if [ -f "${compile_dir}/build/bin/taoskeeper" ]; then cp ${compile_dir}/build/bin/taoskeeper ${pkg_dir}${install_home_path}/bin ||: fi -if [ -f "${compile_dir}/../../../explorer/target/release/taos-explorer" ]; then - cp ${compile_dir}/../../../explorer/target/release/taos-explorer ${pkg_dir}${install_home_path}/bin ||: +if [ -f "${taosx_dir}/target/release/taos-explorer" ]; then + cp ${taosx_dir}/target/release/taos-explorer ${pkg_dir}${install_home_path}/bin ||: fi cp ${compile_dir}/build/bin/taos ${pkg_dir}${install_home_path}/bin diff --git a/packaging/rpm/makerpm.sh b/packaging/rpm/makerpm.sh index 091e056a79b1..97c1a7ba1df6 100755 --- a/packaging/rpm/makerpm.sh +++ b/packaging/rpm/makerpm.sh @@ -17,6 +17,7 @@ verType=$7 script_dir="$(dirname $(readlink -f $0))" top_dir="$(readlink -f ${script_dir}/../..)" pkg_dir="${top_dir}/rpmworkroom" +taosx_dir="$(readlink -f ${script_dir}/../../../../taosx)" spec_file="${script_dir}/tdengine.spec" #echo "curr_dir: ${curr_dir}" @@ -76,7 +77,7 @@ cd ${pkg_dir} ${csudo}mkdir -p BUILD BUILDROOT RPMS SOURCES SPECS SRPMS -${csudo}rpmbuild --define="_version ${tdengine_ver}" --define="_topdir ${pkg_dir}" --define="_compiledir ${compile_dir}" -bb ${spec_file} +${csudo}rpmbuild --define="_version ${tdengine_ver}" --define="_topdir ${pkg_dir}" --define="_compiledir ${compile_dir}" --define="_taosxdir ${taosx_dir}" -bb ${spec_file} # copy rpm package to output_dir, and modify package name, then clean temp dir #${csudo}cp -rf RPMS/* ${output_dir} diff --git a/packaging/rpm/tdengine.spec b/packaging/rpm/tdengine.spec index c8a627045601..bfa91b6af79e 100644 --- a/packaging/rpm/tdengine.spec +++ b/packaging/rpm/tdengine.spec @@ -76,12 +76,12 @@ if [ -f %{_compiledir}/test/cfg/taoskeeper.service ]; then cp %{_compiledir}/test/cfg/taoskeeper.service %{buildroot}%{homepath}/cfg ||: fi -if [ -f %{_compiledir}/../../../explorer/target/taos-explorer.service ]; then - cp %{_compiledir}/../../../explorer/target/taos-explorer.service %{buildroot}%{homepath}/cfg ||: +if [ -f %{_taosxdir}/explorer/server/examples/explorer.service ]; then + cp %{_taosxdir}/explorer/server/examples/explorer.service %{buildroot}%{homepath}/cfg/taos-explorer.service ||: fi -if [ -f %{_compiledir}/../../../explorer/server/examples/explorer.toml ]; then - cp %{_compiledir}/../../../explorer/server/examples/explorer.toml %{buildroot}%{homepath}/cfg ||: +if [ -f %{_taosxdir}/explorer/server/examples/explorer.toml ]; then + cp %{_taosxdir}/explorer/server/examples/explorer.toml %{buildroot}%{homepath}/cfg ||: fi #cp %{_compiledir}/../packaging/rpm/taosd %{buildroot}%{homepath}/init.d @@ -100,8 +100,8 @@ cp %{_compiledir}/../../enterprise/packaging/stop-all.sh %{buildroot}%{homepath sed -i "s/versionType=\"enterprise\"/versionType=\"community\"/g" %{buildroot}%{homepath}/bin/start-all.sh sed -i "s/versionType=\"enterprise\"/versionType=\"community\"/g" %{buildroot}%{homepath}/bin/stop-all.sh -if [ -f %{_compiledir}/../../../explorer/target/release/taos-explorer ]; then - cp %{_compiledir}/../../../explorer/target/release/taos-explorer %{buildroot}%{homepath}/bin +if [ -f %{_taosxdir}/target/release/taos-explorer ]; then + cp %{_taosxdir}/target/release/taos-explorer %{buildroot}%{homepath}/bin fi if [ -f %{_compiledir}/build/bin//taoskeeper ]; then