diff --git a/cmake/version.inc b/cmake/version.inc index dd9f313b2a955397eb578d6b84e35e6bcfff10f3..1de403f61ac789da3774e99a1b8ac2132dbab9cb 100755 --- a/cmake/version.inc +++ b/cmake/version.inc @@ -4,7 +4,7 @@ PROJECT(TDengine) IF (DEFINED VERNUMBER) SET(TD_VER_NUMBER ${VERNUMBER}) ELSE () - SET(TD_VER_NUMBER "2.4.0.14") + SET(TD_VER_NUMBER "2.4.0.16") ENDIF () IF (DEFINED VERCOMPATIBLE) diff --git a/packaging/clean_env.sh b/packaging/clean_env.sh index 6d070c9a0d1dfd0b34333a2b6aa2254da1b20f84..51a0fe4eb218d2f5a1aaae097bf7f94e9f168599 100755 --- a/packaging/clean_env.sh +++ b/packaging/clean_env.sh @@ -26,24 +26,9 @@ fi cd $TOOLS_DIR git checkout -- . -if [[ -e packaging/tools/install-khtools.sh ]]; then - rm -f packaging/tools/install-khtools.sh -fi -if [[ -e packaging/tools/uninstall-khtools.sh ]]; then - rm -f packaging/tools/uninstall-khtools.sh -fi -if [[ -e packaging/tools/install-prodbtools.sh ]]; then - rm -f packaging/tools/install-prodbtools.sh -fi -if [[ -e packaging/tools/uninstall-prodbtools.sh ]]; then - rm -f packaging/tools/uninstall-prodbtools.sh -fi -if [[ -e packaging/tools/install-powertools.sh ]]; then - rm -f packaging/tools/install-powertools.sh -fi -if [[ -e packaging/tools/uninstall-powertools.sh ]]; then - rm -f packaging/tools/uninstall-powertools.sh -fi + +rm -f $(find packaging/tools/ -name install-*tools.sh | grep -v taos) +rm -f $(find packaging/tools/ -name uninstall-*tools.sh | grep -v taos) rm -rf $COMMUNITY_DIR/debug/* rm -rf $COMMUNITY_DIR/release/* diff --git a/packaging/tools/install.sh b/packaging/tools/install.sh index 9c8d537ab0aa3ec88a78f96cb4f812591973a090..f07705ff442b65f1295431e59b48ef50a76cadc0 100755 --- a/packaging/tools/install.sh +++ b/packaging/tools/install.sh @@ -29,6 +29,9 @@ logDir="/var/log/taos" configDir="/etc/taos" installDir="/usr/local/taos" adapterName="taosadapter" +benchmarkName="taosBenchmark" +dumpName="taosdump" +demoName="taosdemo" data_dir=${dataDir} log_dir=${logDir} @@ -202,9 +205,9 @@ function install_bin() { [ -x ${install_main_dir}/bin/${clientName} ] && ${csudo}ln -s ${install_main_dir}/bin/${clientName} ${bin_link_dir}/${clientName} || : [ -x ${install_main_dir}/bin/${serverName} ] && ${csudo}ln -s ${install_main_dir}/bin/${serverName} ${bin_link_dir}/${serverName} || : [ -x ${install_main_dir}/bin/${adapterName} ] && ${csudo}ln -s ${install_main_dir}/bin/${adapterName} ${bin_link_dir}/${adapterName} || : - [ -x ${install_main_dir}/bin/taosBenchmark ] && ${csudo}ln -s ${install_main_dir}/bin/taosBenchmark ${bin_link_dir}/taosdemo || : - [ -x ${install_main_dir}/bin/taosBenchmark ] && ${csudo}ln -s ${install_main_dir}/bin/taosBenchmark ${bin_link_dir}/taosBenchmark || : - [ -x ${install_main_dir}/bin/taosdump ] && ${csudo}ln -s ${install_main_dir}/bin/taosdump ${bin_link_dir}/taosdump || : + [ -x ${install_main_dir}/bin/${benchmarkName} ] && ${csudo}ln -s ${install_main_dir}/bin/${benchmarkName} ${bin_link_dir}/${demoName} || : + [ -x ${install_main_dir}/bin/${benchmarkName} ] && ${csudo}ln -s ${install_main_dir}/bin/${benchmarkName} ${bin_link_dir}/${benchmarkName} || : + [ -x ${install_main_dir}/bin/${dumpName} ] && ${csudo}ln -s ${install_main_dir}/bin/${dumpName} ${bin_link_dir}/${dumpName} || : [ -x ${install_main_dir}/bin/TDinsight.sh ] && ${csudo}ln -s ${install_main_dir}/bin/TDinsight.sh ${bin_link_dir}/TDinsight.sh || : [ -x ${install_main_dir}/bin/remove.sh ] && ${csudo}ln -s ${install_main_dir}/bin/remove.sh ${bin_link_dir}/${uninstallScript} || : [ -x ${install_main_dir}/bin/set_core.sh ] && ${csudo}ln -s ${install_main_dir}/bin/set_core.sh ${bin_link_dir}/set_core || : @@ -864,7 +867,7 @@ function updateProduct() { echo -e "\033[44;32;1m${productName} client is updated successfully!${NC}" fi - rm -rf $(tar -tf ${tarName} |grep -v "^\./$") + rm -rf $(tar -tf ${tarName} | grep -v "^\./$") } function installProduct() { @@ -960,7 +963,7 @@ function installProduct() { fi touch ~/.${historyFile} - rm -rf $(tar -tf ${tarName} |grep -v "^\./$") + rm -rf $(tar -tf ${tarName} | grep -v "^\./$") } ## ==============================Main program starts from here============================ diff --git a/packaging/tools/makepkg.sh b/packaging/tools/makepkg.sh index c03f5b5e856d99e2cd6b0d8d9530830012ca8570..139749e4e64bd2f7c4983915274c8c2b879ad775 100755 --- a/packaging/tools/makepkg.sh +++ b/packaging/tools/makepkg.sh @@ -64,9 +64,11 @@ if [ "$pagMode" == "lite" ]; then taostools_bin_files="" else - wget https://github.com/taosdata/grafanaplugin/releases/latest/download/TDinsight.sh -O ${build_dir}/bin/TDinsight.sh \ - && echo "TDinsight.sh downloaded!" \ - || echo "failed to download TDinsight.sh" + + wget https://github.com/taosdata/grafanaplugin/releases/latest/download/TDinsight.sh -O ${build_dir}/bin/TDinsight.sh && + echo "TDinsight.sh downloaded!" || + echo "failed to download TDinsight.sh" + # download TDinsight caches orig_pwd=$(pwd) tdinsight_caches="" @@ -81,6 +83,7 @@ else ${build_dir}/bin/TDinsight.sh \ $tdinsight_caches" + #!!! do not change taosadapter here bin_files="${build_dir}/bin/${serverName} \ ${build_dir}/bin/${clientName} \ ${taostools_bin_files} \ @@ -115,10 +118,11 @@ mkdir -p ${install_dir} mkdir -p ${install_dir}/inc && cp ${header_files} ${install_dir}/inc mkdir -p ${install_dir}/cfg && cp ${cfg_dir}/${configFile} ${install_dir}/cfg/${configFile} +# !!! do not change the taosadapter here!!! if [ -f "${compile_dir}/test/cfg/taosadapter.toml" ]; then cp ${compile_dir}/test/cfg/taosadapter.toml ${install_dir}/cfg || : fi - +# !!! do not change the taosadapter here!!! if [ -f "${compile_dir}/test/cfg/taosadapter.service" ]; then cp ${compile_dir}/test/cfg/taosadapter.service ${install_dir}/cfg || : fi @@ -141,50 +145,52 @@ mkdir -p ${install_dir}/init.d && cp ${init_file_rpm} ${install_dir}/init.d/${se mkdir -p ${install_dir}/init.d && cp ${init_file_tarbitrator_deb} ${install_dir}/init.d/tarbitratord.deb || : mkdir -p ${install_dir}/init.d && cp ${init_file_tarbitrator_rpm} ${install_dir}/init.d/tarbitratord.rpm || : +# !!! do not change taosadaptor here if [ $adapterName != "taosadapter" ]; then + # !!! do not change taosadaptor here mv ${install_dir}/cfg/taosadapter.toml ${install_dir}/cfg/$adapterName.toml sed -i "s/path = \"\/var\/log\/taos\"/path = \"\/var\/log\/${productName}\"/g" ${install_dir}/cfg/$adapterName.toml sed -i "s/password = \"taosdata\"/password = \"${defaultPasswd}\"/g" ${install_dir}/cfg/$adapterName.toml - + # !!! do not change taosadaptor here mv ${install_dir}/cfg/taosadapter.service ${install_dir}/cfg/$adapterName.service sed -i "s/TDengine/${productName}/g" ${install_dir}/cfg/$adapterName.service sed -i "s/taosAdapter/${adapterName}/g" ${install_dir}/cfg/$adapterName.service sed -i "s/taosadapter/${adapterName}/g" ${install_dir}/cfg/$adapterName.service - + # !!! do not change taosadaptor here mv ${install_dir}/bin/taosadapter ${install_dir}/bin/${adapterName} mv ${install_dir}/bin/run_taosd_and_taosadapter.sh ${install_dir}/bin/run_${serverName}_and_${adapterName}.sh mv ${install_dir}/bin/taosd-dump-cfg.gdb ${install_dir}/bin/${serverName}-dump-cfg.gdb fi if [ -n "${taostools_bin_files}" ]; then - mkdir -p ${taostools_install_dir} || echo -e "failed to create ${taostools_install_dir}" - mkdir -p ${taostools_install_dir}/bin \ - && cp ${taostools_bin_files} ${taostools_install_dir}/bin \ - && chmod a+x ${taostools_install_dir}/bin/* || : - - if [ -f ${top_dir}/src/kit/taos-tools/packaging/tools/install-${toolsName}.sh ]; then - cp ${top_dir}/src/kit/taos-tools/packaging/tools/install-${toolsName}.sh \ - ${taostools_install_dir}/ > /dev/null \ - && chmod a+x ${taostools_install_dir}/install-${toolsName}.sh \ - || echo -e "failed to copy install-${toolsName}.sh" - else - echo -e "install-${toolsName}.sh not found" - fi + mkdir -p ${taostools_install_dir} || echo -e "failed to create ${taostools_install_dir}" + mkdir -p ${taostools_install_dir}/bin && + cp ${taostools_bin_files} ${taostools_install_dir}/bin && + chmod a+x ${taostools_install_dir}/bin/* || : + + if [ -f ${top_dir}/src/kit/taos-tools/packaging/tools/install-${toolsName}.sh ]; then + cp ${top_dir}/src/kit/taos-tools/packaging/tools/install-${toolsName}.sh \ + ${taostools_install_dir}/ >/dev/null && + chmod a+x ${taostools_install_dir}/install-${toolsName}.sh || + echo -e "failed to copy install-${toolsName}.sh" + else + echo -e "install-${toolsName}.sh not found" + fi - if [ -f ${top_dir}/src/kit/taos-tools/packaging/tools/uninstall-${toolsName}.sh ]; then - cp ${top_dir}/src/kit/taos-tools/packaging/tools/uninstall-${toolsName}.sh \ - ${taostools_install_dir}/ > /dev/null \ - && chmod a+x ${taostools_install_dir}/uninstall-${toolsName}.sh \ - || echo -e "failed to copy uninstall-${toolsName}.sh" - else - echo -e "uninstall-${toolsName}.sh not found" - fi + if [ -f ${top_dir}/src/kit/taos-tools/packaging/tools/uninstall-${toolsName}.sh ]; then + cp ${top_dir}/src/kit/taos-tools/packaging/tools/uninstall-${toolsName}.sh \ + ${taostools_install_dir}/ >/dev/null && + chmod a+x ${taostools_install_dir}/uninstall-${toolsName}.sh || + echo -e "failed to copy uninstall-${toolsName}.sh" + else + echo -e "uninstall-${toolsName}.sh not found" + fi - if [ -f ${build_dir}/lib/libavro.so.23.0.0 ]; then - mkdir -p ${taostools_install_dir}/avro/{lib,lib/pkgconfig} || echo -e "failed to create ${taostools_install_dir}/avro" - cp ${build_dir}/lib/libavro.* ${taostools_install_dir}/avro/lib - cp ${build_dir}/lib/pkgconfig/avro-c.pc ${taostools_install_dir}/avro/lib/pkgconfig - fi + if [ -f ${build_dir}/lib/libavro.so.23.0.0 ]; then + mkdir -p ${taostools_install_dir}/avro/{lib,lib/pkgconfig} || echo -e "failed to create ${taostools_install_dir}/avro" + cp ${build_dir}/lib/libavro.* ${taostools_install_dir}/avro/lib + cp ${build_dir}/lib/pkgconfig/avro-c.pc ${taostools_install_dir}/avro/lib/pkgconfig + fi fi if [ -f ${build_dir}/bin/jemalloc-config ]; then @@ -366,13 +372,13 @@ if [ "$exitcode" != "0" ]; then fi if [ -n "${taostools_bin_files}" ]; then - wget https://github.com/taosdata/grafanaplugin/releases/latest/download/TDinsight.sh -O ${taostools_install_dir}/bin/TDinsight.sh && echo "TDinsight.sh downloaded!"|| echo "failed to download TDinsight.sh" - tar -zcv -f "$(basename ${taostools_pkg_name}).tar.gz" "$(basename ${taostools_install_dir})" --remove-files || : - exitcode=$? - if [ "$exitcode" != "0" ]; then - echo "tar ${taostools_pkg_name}.tar.gz error !!!" - exit $exitcode - fi + wget https://github.com/taosdata/grafanaplugin/releases/latest/download/TDinsight.sh -O ${taostools_install_dir}/bin/TDinsight.sh && echo "TDinsight.sh downloaded!" || echo "failed to download TDinsight.sh" + tar -zcv -f "$(basename ${taostools_pkg_name}).tar.gz" "$(basename ${taostools_install_dir})" --remove-files || : + exitcode=$? + if [ "$exitcode" != "0" ]; then + echo "tar ${taostools_pkg_name}.tar.gz error !!!" + exit $exitcode + fi fi cd ${curr_dir} diff --git a/packaging/tools/remove.sh b/packaging/tools/remove.sh index fa74734a24fe6a82cb8980f79815293649cab15a..644cc0eaca302c3b1903764d2ad13160e96172dd 100755 --- a/packaging/tools/remove.sh +++ b/packaging/tools/remove.sh @@ -17,6 +17,9 @@ clientName="taos" uninstallScript="rmtaos" productName="TDengine" adapterName="taosadapter" +benchmarkName="taosBenchmark" +dumpName="taosdump" +demoName="taosdemo" #install main path install_main_dir=${installDir} @@ -71,9 +74,9 @@ function clean_bin() { ${csudo}rm -f ${bin_link_dir}/${clientName} || : ${csudo}rm -f ${bin_link_dir}/${serverName} || : ${csudo}rm -f ${bin_link_dir}/${adapterName} || : - ${csudo}rm -f ${bin_link_dir}/taosBenchmark || : - ${csudo}rm -f ${bin_link_dir}/taosdemo || : - ${csudo}rm -f ${bin_link_dir}/taosdump || : + ${csudo}rm -f ${bin_link_dir}/${benchmarkName} || : + ${csudo}rm -f ${bin_link_dir}/${demoName} || : + ${csudo}rm -f ${bin_link_dir}/${dumpName} || : ${csudo}rm -f ${bin_link_dir}/${uninstallScript} || : ${csudo}rm -f ${bin_link_dir}/tarbitrator || : ${csudo}rm -f ${bin_link_dir}/set_core || : @@ -146,7 +149,7 @@ function clean_service_on_systemd() { function clean_service_on_sysvinit() { if pidof ${serverName} &>/dev/null; then echo "${productName} ${serverName} is running, stopping it..." - ${csudo}service taosd stop || : + ${csudo}service ${serverName} stop || : fi if pidof tarbitrator &>/dev/null; then diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index e175508dce0669ab81f9996564a9bf3f8f2da9ba..093f424e2be7eb0d5b72517f25f2276d1905d913 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -1,6 +1,6 @@ name: tdengine base: core20 -version: '2.4.0.14' +version: '2.4.0.16' icon: snap/gui/t-dengine.svg summary: an open-source big data platform designed and optimized for IoT. description: |