剔除打包脚本中的om部分`
This commit is contained in:
@ -34,13 +34,17 @@ then
|
||||
kernel=$(cat /etc/openEuler-release | awk -F ' ' '{print $1}' | tr A-Z a-z)
|
||||
version=$(cat /etc/openEuler-release | awk -F '(' '{print $2}'| awk -F ')' '{print $1}' | tr A-Z a-z)
|
||||
elif [ -f "/etc/centos-release" ]
|
||||
then
|
||||
kernel=$(cat /etc/centos-release | awk -F ' ' '{print $1}' | tr A-Z a-z)
|
||||
version=$(cat /etc/centos-release | awk -F '(' '{print $2}'| awk -F ')' '{print $1}' | tr A-Z a-z)
|
||||
elif [ -f "/etc/euleros-release" ]
|
||||
then
|
||||
kernel=$(cat /etc/centos-release | awk -F ' ' '{print $1}' | tr A-Z a-z)
|
||||
version=$(cat /etc/centos-release | awk -F '(' '{print $2}'| awk -F ')' '{print $1}' | tr A-Z a-z)
|
||||
elif [ -f "/etc/os-release" ]
|
||||
then
|
||||
kernel=$(source /etc/os-release; echo $ID)
|
||||
version=$(source /etc/os-release; echo $VERSION_ID)
|
||||
version=$(source /etc/os-release; echo $VERSION_ID)
|
||||
else
|
||||
kernel=$(lsb_release -d | awk -F ' ' '{print $2}'| tr A-Z a-z)
|
||||
version=$(lsb_release -r | awk -F ' ' '{print $2}')
|
||||
@ -56,12 +60,16 @@ if [ X"$kernel" == X"centos" ]; then
|
||||
dist_version="CentOS"
|
||||
elif [ X"$kernel" == X"openeuler" ]; then
|
||||
dist_version="openEuler"
|
||||
elif [ X"$kernel" == X"euleros" ]; then
|
||||
dist_version="EulerOS"
|
||||
elif [ X"$kernel" == X"neokylin" ]; then
|
||||
dist_version="neokylin"
|
||||
elif [ X"$kernel" == X"kylin" ]; then
|
||||
dist_version="kylin"
|
||||
elif [ X"$kernel" == X"asianux" ]; then
|
||||
dist_version="asianux"
|
||||
else
|
||||
echo "We only support openEuler(aarch64), neokylin(aarch64), kylin(aarch64), CentOS platform."
|
||||
echo "We only support openEuler(aarch64), neokylin(aarch64), kylin(aarch64), CentOS ,Asianux platform ."
|
||||
echo "Kernel is $kernel"
|
||||
exit 1
|
||||
fi
|
||||
@ -79,7 +87,7 @@ fi
|
||||
##default install version storage path
|
||||
declare server_version='openGauss'
|
||||
declare server_name_for_package="$(echo ${server_version} | sed 's/ /-/g')" # replace blank with '-' for package name.
|
||||
declare version_number=''
|
||||
declare version_number='1.0.1'
|
||||
|
||||
#######################################################################
|
||||
##putout the version of server
|
||||
@ -112,23 +120,8 @@ else
|
||||
fi
|
||||
|
||||
SCRIPT_DIR=$(cd $(dirname $SCRIPT_PATH) && pwd)
|
||||
|
||||
package_path=$SCRIPT_DIR
|
||||
|
||||
#######################################################################
|
||||
##version 1.0.1
|
||||
#######################################################################
|
||||
function read_srv_version()
|
||||
{
|
||||
cd $SCRIPT_DIR
|
||||
version_number='1.0.1'
|
||||
echo "${server_name_for_package}-${version_number}">version.cfg
|
||||
#auto read the number from kernal globals.cpp, no need to change it here
|
||||
}
|
||||
|
||||
read_srv_version
|
||||
|
||||
|
||||
#########################################################################
|
||||
##read command line paramenters
|
||||
#######################################################################
|
||||
@ -172,22 +165,24 @@ done
|
||||
#######################################################################
|
||||
declare version_string="${server_name_for_package}-${version_number}"
|
||||
declare package_pre_name="${version_string}-${dist_version}-${PLATFORM}bit"
|
||||
declare server_package_name="${package_pre_name}.tar.gz"
|
||||
declare server_package_name_kernel_only="${package_pre_name}-kernel.tar.gz"
|
||||
declare symbol_package_name="${package_pre_name}-symbol.tar.gz"
|
||||
declare libpq_package_name="${package_pre_name}-Libpq.tar.gz"
|
||||
declare tools_package_name="${package_pre_name}-tools.tar.gz"
|
||||
declare kernel_package_name="${package_pre_name}.tar.bz2"
|
||||
declare kernel_symbol_package_name="${package_pre_name}-symbol.tar.gz"
|
||||
declare sha256_name="${package_pre_name}.sha256"
|
||||
|
||||
echo "[make single db] $(date +%y-%m-%d' '%T): script dir : ${SCRIPT_DIR}"
|
||||
ROOT_DIR=$(dirname "$SCRIPT_DIR")
|
||||
PLAT_FORM_STR=$(sh "${ROOT_DIR}/src/get_PlatForm_str.sh")
|
||||
if [ "${PLAT_FORM_STR}"x == "Failed"x ]
|
||||
then
|
||||
echo "We only support openEuler(aarch64), CentOS platform."
|
||||
echo "We only support openEuler(aarch64), EulerOS(aarch64), CentOS platform."
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
PG_REG_TEST_ROOT="${ROOT_DIR}/"
|
||||
PMK_SCHEMA="${ROOT_DIR}/script/pmk_schema.sql"
|
||||
PMK_SCHEMA_SINGLE_INST="${ROOT_DIR}/script/pmk_schema_single_inst.sql"
|
||||
declare LOG_FILE="${ROOT_DIR}/package/make_package.log"
|
||||
declare BUILD_DIR="${ROOT_DIR}/dest"
|
||||
BUILD_TOOLS_PATH="${ROOT_DIR}/binarylibs/buildtools/${PLAT_FORM_STR}"
|
||||
@ -209,25 +204,28 @@ export PATH=$BUILD_TOOLS_PATH/gcc$gcc_version/gcc/bin:$PATH
|
||||
##################################
|
||||
function read_svr_number()
|
||||
{
|
||||
global_kernal="${ROOT_DIR}/src/common/backend/utils/init/globals.cpp"
|
||||
version_name="GRAND_VERSION_NUM"
|
||||
version_num=""
|
||||
line=$(cat $global_kernal | grep ^const* | grep $version_name)
|
||||
version_num1=${line#*=}
|
||||
#remove the symbol;
|
||||
version_num=$(echo $version_num1 | tr -d ";")
|
||||
#remove the blank
|
||||
version_num=$(echo $version_num)
|
||||
cd $SCRIPT_DIR
|
||||
echo "${server_name_for_package}-${version_number}">version.cfg
|
||||
|
||||
global_kernal="${ROOT_DIR}/src/common/backend/utils/init/globals.cpp"
|
||||
version_name="GRAND_VERSION_NUM"
|
||||
version_num=""
|
||||
line=$(cat $global_kernal | grep ^const* | grep $version_name)
|
||||
version_num1=${line#*=}
|
||||
#remove the symbol;
|
||||
version_num=$(echo $version_num1 | tr -d ";")
|
||||
#remove the blank
|
||||
version_num=$(echo $version_num)
|
||||
|
||||
if echo $version_num | grep -qE '^92[0-9]+$'
|
||||
then
|
||||
# get the last three number
|
||||
latter=${version_num:2}
|
||||
echo "92.${latter}" >>${SCRIPT_DIR}/version.cfg
|
||||
else
|
||||
echo "Cannot get the version number from globals.cpp."
|
||||
exit 1
|
||||
fi
|
||||
if echo $version_num | grep -qE '^92[0-9]+$'
|
||||
then
|
||||
# get the last three number
|
||||
latter=${version_num:2}
|
||||
echo "92.${latter}" >>${SCRIPT_DIR}/version.cfg
|
||||
else
|
||||
echo "Cannot get the version number from globals.cpp."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
read_svr_number
|
||||
|
||||
@ -250,53 +248,27 @@ die()
|
||||
exit 1
|
||||
}
|
||||
|
||||
#######################################################################
|
||||
##copy all file of script directory to target directory
|
||||
#######################################################################
|
||||
function copy_script_file()
|
||||
{
|
||||
target_file=$1
|
||||
target_dir=$2
|
||||
cp -rf $target_file/script/ $target_dir/ &&
|
||||
cp -f ${BINARYLIBS_PATH}/openssl/comm/bin/openssl $target_dir/ &&
|
||||
|
||||
find $target_dir/script/ -type f -print0 | xargs -0 -n 10 -r dos2unix > /dev/null 2>&1 &&
|
||||
find $target_dir/script/gspylib/inspection/ -name d2utmp* -print0 | xargs -0 rm -rf &&
|
||||
cp -rf $target_file/script/gspylib/inspection/lib/checknetspeed/speed_test* $target_dir/script/gspylib/inspection/lib/checknetspeed/ &&
|
||||
cp -rf $target_file/script/gspylib/inspection/lib/*.png $target_dir/script/gspylib/inspection/lib/ &&
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
die "cp -r $target_file $target_dir failed "
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
#######################################################################
|
||||
##install gaussdb database contained server
|
||||
#######################################################################
|
||||
function install_gaussdb()
|
||||
{
|
||||
cd $ROOT_DIR
|
||||
copy_script_file "$script_dir/" ${BUILD_DIR}/bin/
|
||||
cp -f ${BINARYLIBS_PATH}/openssl/comm/bin/openssl ${BUILD_DIR}/bin/
|
||||
|
||||
cp ${BUILD_DIR}/bin/script/gspylib/etc/sql/pmk_schema.sql ${BUILD_DIR}/share/postgresql/
|
||||
if [ -f ${BUILD_DIR}/bin/script/gspylib/etc/sql/pmk_schema_single_inst.sql ]; then
|
||||
cp ${BUILD_DIR}/bin/script/gspylib/etc/sql/pmk_schema_single_inst.sql ${BUILD_DIR}/share/postgresql/
|
||||
cp $PMK_SCHEMA ${BUILD_DIR}/share/postgresql/
|
||||
if [ -f $PMK_SCHEMA_SINGLE_INST ]; then
|
||||
cp $PMK_SCHEMA_SINGLE_INST ${BUILD_DIR}/share/postgresql/
|
||||
fi
|
||||
|
||||
cd $ROOT_DIR
|
||||
cp -f ${script_dir}/other/transfer.py ${BUILD_DIR}/bin
|
||||
if [ $? -ne 0 ]; then
|
||||
die "cp -f ${script_dir}/script/transfer.py ${BUILD_DIR}/bin failed."
|
||||
fi
|
||||
dos2unix ${BUILD_DIR}/bin/transfer.py > /dev/null 2>&1
|
||||
|
||||
|
||||
cd $SCRIPT_DIR
|
||||
if [ "$version_mode" = "release" ]; then
|
||||
chmod +x ./separate_debug_information.sh
|
||||
./separate_debug_information.sh
|
||||
cd $SCRIPT_DIR
|
||||
mv symbols.tar.gz $symbol_package_name
|
||||
mv symbols.tar.gz $kernel_symbol_package_name
|
||||
fi
|
||||
|
||||
#insert the commitid to version.cfg as the upgrade app path specification
|
||||
@ -313,48 +285,6 @@ function install_gaussdb()
|
||||
echo "End insert commitid into version.cfg" >> "$LOG_FILE" 2>&1
|
||||
}
|
||||
|
||||
function read_script_file()
|
||||
{
|
||||
cd $SCRIPT_DIR
|
||||
if [ -e script_file ]
|
||||
then
|
||||
rm -rf script_file
|
||||
fi
|
||||
touch script_file
|
||||
for element in `ls ${BUILD_DIR}/script`
|
||||
do
|
||||
dir_or_file=${BUILD_DIR}/script"/"$element
|
||||
if [ ! -d $dir_or_file ]
|
||||
then
|
||||
echo "./script/"$(basename $dir_or_file) >> script_file
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
function copy_script_file()
|
||||
{
|
||||
target_file=$1
|
||||
target_dir=$2
|
||||
|
||||
cp -rf $target_file/script/ $target_dir/ &&
|
||||
cp -f ${BINARYLIBS_PATH}/openssl/comm/bin/openssl $target_dir/ &&
|
||||
|
||||
find $target_dir/script/ -type f -print0 | xargs -0 -n 10 -r dos2unix > /dev/null 2>&1 &&
|
||||
find $target_dir/script/gspylib/inspection/ -name d2utmp* -print0 | xargs -0 rm -rf &&
|
||||
cp -rf $target_file/script/gspylib/inspection/lib/checknetspeed/speed_test* $target_dir/script/gspylib/inspection/lib/checknetspeed/ &&
|
||||
cp -rf $target_file/script/gspylib/inspection/lib/*.png $target_dir/script/gspylib/inspection/lib/ &&
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
die "cp -r $target_file $target_dir failed "
|
||||
fi
|
||||
}
|
||||
|
||||
declare tar_name="${package_pre_name}.tar.bz2"
|
||||
declare sha256_name=''
|
||||
declare script_dir="${ROOT_DIR}/src/manager/om"
|
||||
declare root_script=''
|
||||
declare bin_script=''
|
||||
|
||||
#######################################################################
|
||||
# copy directory's files list to $2
|
||||
#######################################################################
|
||||
@ -381,147 +311,41 @@ function target_file_copy()
|
||||
do
|
||||
copy_files_list $file $2
|
||||
done
|
||||
read_script_file
|
||||
cd $SCRIPT_DIR
|
||||
sed 's/^\./\.\/bin/' script_file >binfile
|
||||
root_script=$(cat script_file)
|
||||
sed -i '/gs_backup/d' binfile
|
||||
sed -i '/gs_check/d' binfile
|
||||
sed -i '/gs_checkos/d' binfile
|
||||
sed -i '/gs_checkperf/d' binfile
|
||||
sed -i '/gs_collector/d' binfile
|
||||
sed -i '/gs_expand/d' binfile
|
||||
sed -i '/gs_install/d' binfile
|
||||
sed -i '/gs_om/d' binfile
|
||||
sed -i '/gs_postuninstall/d' binfile
|
||||
sed -i '/gs_preinstall/d' binfile
|
||||
sed -i '/gs_replace/d' binfile
|
||||
sed -i '/gs_shrink/d' binfile
|
||||
sed -i '/gs_ssh/d' binfile
|
||||
sed -i '/gs_sshexkey/d' binfile
|
||||
sed -i '/gs_uninstall/d' binfile
|
||||
sed -i '/gs_upgradectl/d' binfile
|
||||
sed -i '/gs_lcctl/d' binfile
|
||||
sed -i '/gs_wsr/d' binfile
|
||||
sed -i '/gs_gucZenith/d' binfile
|
||||
sed -i '/gs_expansion/d' binfile
|
||||
bin_script=$(cat binfile)
|
||||
rm binfile script_file
|
||||
cd $BUILD_DIR
|
||||
for file in $(echo $bin_script)
|
||||
do
|
||||
tar -cpf - $file | ( cd $2; tar -xpf - )
|
||||
done
|
||||
|
||||
# create script/gspylib/clib, put file encrypt, libcrypto.so.1.1,libssl.so.1.1
|
||||
rm -rf $BUILD_DIR/script/gspylib/clib
|
||||
mkdir -p $BUILD_DIR/script/gspylib/clib
|
||||
cp $BUILD_DIR/lib/libstdc++.so.6 $BUILD_DIR/script/gspylib/clib
|
||||
cp $BUILD_DIR/lib/libssl.so.1.1 $BUILD_DIR/script/gspylib/clib
|
||||
cp $BUILD_DIR/lib/libcrypto.so.1.1 $BUILD_DIR/script/gspylib/clib
|
||||
cp $BUILD_DIR/bin/encrypt $BUILD_DIR/script/gspylib/clib
|
||||
|
||||
# copy script dir to temp path
|
||||
cp -rf $BUILD_DIR/script/gspylib/ $2/bin/script/
|
||||
cp -rf $BUILD_DIR/script/impl/ $2/bin/script/
|
||||
cp -rf $BUILD_DIR/script/local/ $2/bin/script/
|
||||
|
||||
# clean the files which under bin/script/ is not be used
|
||||
for x in $(ls $2/bin/script/)
|
||||
do
|
||||
filename="$2/bin/script/$x"
|
||||
if [[ "$filename" = *"__init__.py" ]];then
|
||||
continue
|
||||
elif [ -d "$filename" ];then
|
||||
continue
|
||||
elif [ -f "$filename" ];then
|
||||
rm -f "$filename"
|
||||
fi
|
||||
done
|
||||
|
||||
chmod -R +x $2/bin/script/
|
||||
cp ${SCRIPT_DIR}/version.cfg ${BUILD_DIR}/temp
|
||||
if [ $? -ne 0 ]; then
|
||||
die "copy ${SCRIPT_DIR}/version.cfg to ${BUILD_DIR}/temp failed"
|
||||
fi
|
||||
|
||||
sed -i '/^process_cpu_affinity|/d' $2/bin/cluster_guc.conf
|
||||
|
||||
#generate tar file
|
||||
echo "Begin generate ${tar_name} tar file..." >> "$LOG_FILE" 2>&1
|
||||
echo "Begin generate ${kernel_package_name} tar file..." >> "$LOG_FILE" 2>&1
|
||||
cd $2
|
||||
tar -jcvpf "${tar_name}" ./* >> "$LOG_FILE" 2>&1
|
||||
tar -jcvpf "${kernel_package_name}" ./* >> "$LOG_FILE" 2>&1
|
||||
cd '-'
|
||||
mv $2/"${tar_name}" ./
|
||||
mv $2/"${kernel_package_name}" ./
|
||||
if [ $? -ne 0 ]; then
|
||||
die "generate ${tar_name} failed."
|
||||
die "generate ${kernel_package_name} failed."
|
||||
fi
|
||||
echo "End generate ${tar_name} tar file" >> "$LOG_FILE" 2>&1
|
||||
echo "End generate ${kernel_package_name} tar file" >> "$LOG_FILE" 2>&1
|
||||
|
||||
#generate sha256 file
|
||||
sha256_name="${package_pre_name}.sha256"
|
||||
echo "Begin generate ${sha256_name} sha256 file..." >> "$LOG_FILE" 2>&1
|
||||
sha256sum "${tar_name}" | awk -F" " '{print $1}' > "$sha256_name"
|
||||
sha256sum "${kernel_package_name}" | awk -F" " '{print $1}' > "$sha256_name"
|
||||
if [ $? -ne 0 ]; then
|
||||
die "generate sha256 file failed."
|
||||
fi
|
||||
echo "End generate ${sha256_name} sha256 file" >> "$LOG_FILE" 2>&1
|
||||
|
||||
###################################################
|
||||
# make server package
|
||||
###################################################
|
||||
if [ -d "${2}" ]; then
|
||||
rm -rf ${2}
|
||||
fi
|
||||
mkdir -p ${2}
|
||||
mv ${tar_name} ${sha256_name} $2
|
||||
for file in $(echo $root_script)
|
||||
do
|
||||
tar -cpf - $file | ( cd $2; tar -xpf - )
|
||||
done
|
||||
|
||||
# copy script dir to temp path
|
||||
cp -rf $BUILD_DIR/script/gspylib/ $2/script/
|
||||
cp -rf $BUILD_DIR/script/impl/ $2/script/
|
||||
cp -rf $BUILD_DIR/script/local/ $2/script/
|
||||
chmod -R +x $2/script/
|
||||
}
|
||||
|
||||
function replace_omtools_version()
|
||||
{
|
||||
gs_version=$(grep DEF_GS_VERSION ${PG_REG_TEST_ROOT}/src/include/pg_config.h | awk -F '"' '{print $2}')
|
||||
echo $gs_version | grep -e "${server_version}.*build.*compiled.*" > /dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
die "Failed to get gs_version from pg_config.h."
|
||||
fi
|
||||
|
||||
if [ -f "$1"/script/gspylib/common/VersionInfo.py ] ; then
|
||||
sed -i -e "s/COMMON_VERSION = \"Gauss200 OM VERSION\"/COMMON_VERSION = \"$(echo ${gs_version})\"/g" -e "s/__GAUSS_PRODUCT_STRING__/$server_version/g" $1/script/gspylib/common/VersionInfo.py
|
||||
if [ $? -ne 0 ]; then
|
||||
die "Failed to replace OM tools version number."
|
||||
fi
|
||||
else
|
||||
sed -i "s/COMMON_VERSION = \"Gauss200 OM VERSION\"/COMMON_VERSION = \"$(echo ${gs_version})\"/g" $1/script/gspylib/os/gsOSlib.py
|
||||
if [ $? -ne 0 ]; then
|
||||
die "Failed to replace OM tools version number."
|
||||
fi
|
||||
fi
|
||||
|
||||
grep 'CATALOG_VERSION_NO' ${PG_REG_TEST_ROOT}/src/include/catalog/catversion.h >/dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
die "Failed to get catalog_version from catversion.h."
|
||||
fi
|
||||
|
||||
catalog_version=$(grep 'CATALOG_VERSION_NO' ${PG_REG_TEST_ROOT}/src/include/catalog/catversion.h | uniq | awk -F ' ' '{print $NF}')
|
||||
if [ x"$catalog_version" == x"" ]; then
|
||||
die "Failed to get catalog_version from catversion.h."
|
||||
fi
|
||||
|
||||
sed -i "s/TABLESPACE_VERSION_DIRECTORY = .*/TABLESPACE_VERSION_DIRECTORY = \"PG_9.2_$(echo ${catalog_version})\"/g" $1/script/gspylib/common/Common.py
|
||||
if [ $? -ne 0 ]; then
|
||||
die "Failed to replacecatalog_version number."
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
function make_package_srv()
|
||||
{
|
||||
cd $SCRIPT_DIR
|
||||
copydest="./bin
|
||||
./etc
|
||||
./share
|
||||
@ -530,88 +354,11 @@ function make_package_srv()
|
||||
mkdir -p ${BUILD_DIR}
|
||||
cd ${BUILD_DIR}
|
||||
rm -rf temp
|
||||
mkdir temp
|
||||
copy_script_file "$script_dir/" ${BUILD_DIR}
|
||||
mkdir -p temp
|
||||
mkdir -p ${BUILD_DIR}/temp/etc
|
||||
target_file_copy "$copydest" ${BUILD_DIR}/temp
|
||||
cd ${BUILD_DIR}/temp
|
||||
cp ${SCRIPT_DIR}/version.cfg ${BUILD_DIR}/temp
|
||||
if [ $? -ne 0 ]; then
|
||||
die "copy ${SCRIPT_DIR}/version.cfg to ${BUILD_DIR}/temp failed"
|
||||
fi
|
||||
|
||||
replace_omtools_version ${BUILD_DIR}/temp/
|
||||
#copy inspection lib
|
||||
mkdir -p ${BUILD_DIR}/temp/script/gspylib/inspection/output/log/ &&
|
||||
mkdir -p ${BUILD_DIR}/temp/script/gspylib/inspection/output/nodes/ &&
|
||||
mkdir -p ${BUILD_DIR}/temp/script/gspylib/inspection/lib/asn1crypto/ &&
|
||||
mkdir -p ${BUILD_DIR}/temp/script/gspylib/inspection/lib/bcrypt/ &&
|
||||
mkdir -p ${BUILD_DIR}/temp/script/gspylib/inspection/lib/cffi/ &&
|
||||
mkdir -p ${BUILD_DIR}/temp/script/gspylib/inspection/lib/cryptography/ &&
|
||||
mkdir -p ${BUILD_DIR}/temp/script/gspylib/inspection/lib/idna/ &&
|
||||
mkdir -p ${BUILD_DIR}/temp/script/gspylib/inspection/lib/nacl/ &&
|
||||
mkdir -p ${BUILD_DIR}/temp/script/gspylib/inspection/lib/pyasn1/ &&
|
||||
mkdir -p ${BUILD_DIR}/temp/script/gspylib/inspection/lib/pycparser/ &&
|
||||
mkdir -p ${BUILD_DIR}/temp/script/gspylib/inspection/lib/OpenSSL/ &&
|
||||
mkdir -p ${BUILD_DIR}/temp/script/gspylib/inspection/lib/psutil/ &&
|
||||
mkdir -p ${BUILD_DIR}/temp/script/gspylib/inspection/lib/netifaces/ &&
|
||||
mkdir -p ${BUILD_DIR}/temp/script/gspylib/inspection/lib/paramiko/ &&
|
||||
|
||||
cp -rf ${BINARYLIBS_PATH}/install_tools/asn1crypto/ ${BUILD_DIR}/temp/script/gspylib/inspection/lib/
|
||||
cp -rf ${BINARYLIBS_PATH}/install_tools/bcrypt/ ${BUILD_DIR}/temp/script/gspylib/inspection/lib/
|
||||
cp -rf ${BINARYLIBS_PATH}/install_tools/cffi/ ${BUILD_DIR}/temp/script/gspylib/inspection/lib/
|
||||
cp -rf ${BINARYLIBS_PATH}/install_tools/cryptography/ ${BUILD_DIR}/temp/script/gspylib/inspection/lib/
|
||||
cp -rf ${BINARYLIBS_PATH}/install_tools/idna/ ${BUILD_DIR}/temp/script/gspylib/inspection/lib/
|
||||
cp -rf ${BINARYLIBS_PATH}/install_tools/nacl/ ${BUILD_DIR}/temp/script/gspylib/inspection/lib/
|
||||
cp -rf ${BINARYLIBS_PATH}/install_tools/pyasn1/ ${BUILD_DIR}/temp/script/gspylib/inspection/lib/
|
||||
cp -rf ${BINARYLIBS_PATH}/install_tools/pycparser/ ${BUILD_DIR}/temp/script/gspylib/inspection/lib/
|
||||
cp -rf ${BINARYLIBS_PATH}/install_tools/OpenSSL/ ${BUILD_DIR}/temp/script/gspylib/inspection/lib/
|
||||
cp -rf ${BINARYLIBS_PATH}/install_tools/ipaddress.py ${BUILD_DIR}/temp/script/gspylib/inspection/lib/
|
||||
cp -rf ${BINARYLIBS_PATH}/install_tools/six.py ${BUILD_DIR}/temp/script/gspylib/inspection/lib/
|
||||
cp -rf ${BINARYLIBS_PATH}/install_tools/_cffi_backend.py ${BUILD_DIR}/temp/script/gspylib/inspection/lib/
|
||||
cp -rf ${BINARYLIBS_PATH}/install_tools/_cffi_backend.so* ${BUILD_DIR}/temp/script/gspylib/inspection/lib/
|
||||
cp -rf ${BINARYLIBS_PATH}/install_tools/psutil/ ${BUILD_DIR}/temp/script/gspylib/inspection/lib/
|
||||
cp -rf ${BINARYLIBS_PATH}/install_tools/netifaces/ ${BUILD_DIR}/temp/script/gspylib/inspection/lib/
|
||||
cp -rf ${BINARYLIBS_PATH}/install_tools/paramiko/ ${BUILD_DIR}/temp/script/gspylib/inspection/lib/
|
||||
cp -r ${BINARYLIBS_PATH}/install_tools ./install_tools
|
||||
|
||||
mkdir -p ./lib
|
||||
|
||||
mv ./install_tools/asn1crypto ./lib
|
||||
mv ./install_tools/bcrypt ./lib
|
||||
mv ./install_tools/cffi ./lib
|
||||
mv ./install_tools/cryptography ./lib
|
||||
mv ./install_tools/idna ./lib
|
||||
mv ./install_tools/nacl ./lib
|
||||
mv ./install_tools/pyasn1 ./lib
|
||||
mv ./install_tools/pycparser ./lib
|
||||
mv ./install_tools/OpenSSL ./lib
|
||||
mv ./install_tools/ipaddress.py ./lib
|
||||
mv ./install_tools/six.py ./lib
|
||||
mv ./install_tools/_cffi_backend.py ./lib
|
||||
mv ./install_tools/_cffi_backend.so* ./lib
|
||||
mv ./install_tools/paramiko ./lib
|
||||
mv ./install_tools/psutil ./lib
|
||||
mv ./install_tools/netifaces ./lib
|
||||
|
||||
rm -r ./install_tools
|
||||
mkdir simpleInstall
|
||||
cp -r $ROOT_DIR/simpleInstall/. ./simpleInstall
|
||||
tar -zvcf "${server_package_name}" ./* >>"$LOG_FILE" 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
die "tar ${server_package_name} failed"
|
||||
fi
|
||||
mv ${server_package_name} ${package_path}
|
||||
echo "install $pkgname tools is ${server_package_name} of ${package_path} directory " >> "$LOG_FILE" 2>&1
|
||||
mv ${sha256_name} ${kernel_package_name} ${package_path}
|
||||
echo "make server(all) package success!"
|
||||
|
||||
tar -zvcf "${server_package_name_kernel_only}" ${sha256_name} ${tar_name} >>"$LOG_FILE" 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
die "tar ${server_package_name_kernel_only} failed"
|
||||
fi
|
||||
mv ${server_package_name_kernel_only} ${package_path}
|
||||
echo "the kernel package is ${server_package_name_kernel_only} of ${package_path} directory " >> "$LOG_FILE" 2>&1
|
||||
echo "make kernel package success!"
|
||||
}
|
||||
|
||||
function target_file_copy_for_non_server()
|
||||
@ -679,6 +426,62 @@ function make_package_libpq()
|
||||
echo "success!"
|
||||
}
|
||||
|
||||
function make_package_tools()
|
||||
{
|
||||
cd $SCRIPT_DIR
|
||||
dest="./lib/libpq.so
|
||||
./lib/libpq.so.5
|
||||
./lib/libpq.so.5.5
|
||||
./lib/libconfig.so
|
||||
./lib/libconfig.so.4
|
||||
./lib/libcrypto.so
|
||||
./lib/libcrypto.so.1.1
|
||||
./lib/libssl.so
|
||||
./lib/libssl.so.1.1
|
||||
./lib/libpgport_tool.so
|
||||
./lib/libpgport_tool.so.1
|
||||
./lib/libgssapi_krb5_gauss.so
|
||||
./lib/libgssapi_krb5_gauss.so.2
|
||||
./lib/libgssapi_krb5_gauss.so.2.2
|
||||
./lib/libgssrpc_gauss.so
|
||||
./lib/libgssrpc_gauss.so.4
|
||||
./lib/libgssrpc_gauss.so.4.2
|
||||
./lib/libk5crypto_gauss.so
|
||||
./lib/libk5crypto_gauss.so.3
|
||||
./lib/libk5crypto_gauss.so.3.1
|
||||
./lib/libkrb5support_gauss.so
|
||||
./lib/libkrb5support_gauss.so.0
|
||||
./lib/libkrb5support_gauss.so.0.1
|
||||
./lib/libkrb5_gauss.so
|
||||
./lib/libkrb5_gauss.so.3
|
||||
./lib/libkrb5_gauss.so.3.3
|
||||
./lib/libcom_err_gauss.so
|
||||
./lib/libcom_err_gauss.so.3
|
||||
./lib/libcom_err_gauss.so.3.0
|
||||
./bin/gs_probackup
|
||||
./bin/gsql
|
||||
./bin/gs_dump
|
||||
./bin/gs_dumpall
|
||||
./bin/gs_restore
|
||||
./bin/gs_basebackup"
|
||||
|
||||
mkdir -p ${BUILD_DIR}
|
||||
cd ${BUILD_DIR}
|
||||
rm -rf temp
|
||||
mkdir temp
|
||||
target_file_copy_for_non_server "$dest" ${BUILD_DIR}/temp
|
||||
|
||||
cd ${BUILD_DIR}/temp
|
||||
echo "packaging tools..."
|
||||
tar -zvcf "${tools_package_name}" ./* >>"$LOG_FILE" 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
die "$package_command ${tools_package_name} failed"
|
||||
fi
|
||||
mv ${tools_package_name} ${package_path}
|
||||
echo "install $pkgname tools is ${tools_package_name} of ${package_path} directory " >> "$LOG_FILE" 2>&1
|
||||
echo "success!"
|
||||
}
|
||||
|
||||
|
||||
#######################################################################
|
||||
## Check the installation package production environment
|
||||
@ -693,6 +496,7 @@ function srv_pkg_make()
|
||||
echo "Start package gaussdb."
|
||||
make_package_srv
|
||||
make_package_libpq
|
||||
make_package_tools
|
||||
echo "End package gaussdb."
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user