diff --git a/boostkit-hbase-tries-index.tar.gz b/boostkit-hbase-tries-index.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..51bd104ee9e6be61612d150c4a262cb12c5b5c4d Binary files /dev/null and b/boostkit-hbase-tries-index.tar.gz differ diff --git a/boostkit-hbase.spec b/boostkit-hbase.spec new file mode 100644 index 0000000000000000000000000000000000000000..ff816feb819164f32340aee3a6e194060f06f810 --- /dev/null +++ b/boostkit-hbase.spec @@ -0,0 +1,67 @@ +%global debug_package %{nil} +%define version_hbase 1.0.1 + +Summary: Kunpeng BoostKit toolkit for Hbase +Name: boostkit-hbase +Version: 1.0.0 +Release: 1 +License: Apache License 2.0 +URL: https://www.hikunpeng.com/zh/developer/boostkit/big-data +Source0: boostkit-hbase-tries-index.tar.gz + +ExclusiveArch: aarch64 + +%description +Kunpeng BoostKit toolkit for Hbase + +%prep +tar -zxvf %{SOURCE0} -C %{_builddir}/ + +%build + +%install + + +%post +if [ -n "${HBASE_HOME}" ];then + mv ${HBASE_HOME}/lib ${HBASE_HOME}/lib-old + cp -rf %{_builddir}/lib ${HBASE_HOME}/ + cp -rf %{_builddir}/BoostKit-tries-index_%{version_hbase}.zip ${HBASE_HOME}/lib + cp -rf %{_builddir}/hbase-site-install.txt ${HBASE_HOME}/conf + cp -rf %{_builddir}/install-site.sh ${HBASE_HOME}/conf + cd ${HBASE_HOME}/lib + unzip BoostKit-tries-index_%{version_hbase}.zip + cd ${HBASE_HOME}/conf + cp hbase-site.xml hbase-site.xml-old-config + sh install-site.sh + echo "===========The original lib file of Hbase has been backed up as lib-old==========" + echo "===========The original hbase-site.xml file of Hbase has been backed up as hbase-site.xml-old-config==========" + echo "===========The hbase-tries-index command takes effect after restart==========" +else + echo "======Hbase is not installed in the environment======" + echo "======Go to yum remove boostkit-hbase.aarch64======" + echo "======Install hbase-2.2.3-first======" + echo "======Write the HBASE_HOME environment variable to /etc/profile======" + exit 1 +fi + + +%postun +if [ -n "${HBASE_HOME}" ];then + mv ${HBASE_HOME}/lib ${HBASE_HOME}/lib-tries-index-bak + mv ${HBASE_HOME}/lib-old ${HBASE_HOME}/lib + mv ${HBASE_HOME}/conf/hbase-site.xml ${HBASE_HOME}/conf/hbase-site.xml-tries-index-bak + mv ${HBASE_HOME}/conf/hbase-site.xml-old-config ${HBASE_HOME}/conf/hbase-site.xml + echo "===========The tries-index lib file of Hbase has been backed up as lib-tries-index-bak==========" + echo "===========The tries-index hbase-site.xml file of Hbase has been backed up as hbase-site.xml-tries-index-bak==========" + echo "===========After habse-tries-index is uninstalled, replace the backed lib package==========" + echo "===========After habse-tries-index is uninstalled, replace the backed hbase-site.xml configuration file==========" +fi + +%files + + + +%changelog +* Fri May 26 2023 yanghaitao - 1.0.0-1 +- init Kunpeng BoostKit tries-index package for Hbase \ No newline at end of file