zhangyifan27 commented on a change in pull request #676:
URL: https://github.com/apache/incubator-pegasus/pull/676#discussion_r581587729



##########
File path: scripts/pack_server.sh
##########
@@ -121,14 +114,26 @@ copy_file ./rdsn/thirdparty/output/lib/libk5crypto.so.3 
${pack}/bin
 copy_file ./rdsn/thirdparty/output/lib/sasl2 ${pack}/bin
 copy_file ./scripts/sendmail.sh ${pack}/bin
 copy_file ./src/server/config.ini ${pack}/bin
+copy_file ./src/server/config.min.ini ${pack}/bin
+copy_file ./config_hdfs.sh ${pack}/bin
 
-copy_file `get_stdcpp_lib $custom_gcc` ${pack}/bin
-copy_file `get_system_lib server snappy` ${pack}/bin/`get_system_libname 
server snappy`
-copy_file `get_system_lib server crypto` ${pack}/bin/`get_system_libname 
server crypto`
-copy_file `get_system_lib server ssl` ${pack}/bin/`get_system_libname server 
ssl`
-copy_file `get_system_lib server aio` ${pack}/bin/`get_system_libname server 
aio`
-copy_file `get_system_lib server zstd` ${pack}/bin/`get_system_libname server 
zstd`
-copy_file `get_system_lib server lz4` ${pack}/bin/`get_system_libname server 
lz4`
+copy_file "$(get_stdcpp_lib $custom_gcc)" "${pack}/bin"
+
+pack_system_lib() {
+    SYS_LIB_PATH=$(get_system_lib server "$1")
+    if [ -z "${SYS_LIB_PATH}" ]; then
+        echo "ERROR: library $1 is missing on your system"
+        exit 1
+    fi
+    SYS_LIB_NAME=$(get_system_libname server "$1")
+    copy_file "${SYS_LIB_PATH}" "${pack}/bin/${SYS_LIB_NAME}"

Review comment:
       why not `copy_file "${SYS_LIB_PATH}" "${pack}/bin"`?

##########
File path: scripts/pack_tools.sh
##########
@@ -114,12 +114,23 @@ copy_file ./rdsn/thirdparty/output/lib/libPoco*.so.48 
${pack}/DSN_ROOT/lib/
 copy_file ./rdsn/thirdparty/output/lib/libtcmalloc_and_profiler.so.4 
${pack}/DSN_ROOT/lib/
 copy_file ./rdsn/thirdparty/output/lib/libboost*.so.1.69.0 
${pack}/DSN_ROOT/lib/
 copy_file `get_stdcpp_lib $custom_gcc` ${pack}/DSN_ROOT/lib/
-copy_file `get_system_lib shell snappy` 
${pack}/DSN_ROOT/lib/`get_system_libname shell snappy`
-copy_file `get_system_lib shell crypto` 
${pack}/DSN_ROOT/lib/`get_system_libname shell crypto`
-copy_file `get_system_lib shell ssl` ${pack}/DSN_ROOT/lib/`get_system_libname 
shell ssl`
-copy_file `get_system_lib shell aio` ${pack}/DSN_ROOT/lib/`get_system_libname 
shell aio`
-copy_file `get_system_lib shell zstd` ${pack}/DSN_ROOT/lib/`get_system_libname 
shell zstd`
-copy_file `get_system_lib shell lz4` ${pack}/DSN_ROOT/lib/`get_system_libname 
shell lz4`
+
+pack_system_lib() {

Review comment:
       It's better to move `pack_system_lib()` to pack_common.sh .




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@pegasus.apache.org
For additional commands, e-mail: dev-h...@pegasus.apache.org

Reply via email to