You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pegasus.apache.org by zh...@apache.org on 2021/03/22 09:59:46 UTC
[incubator-pegasus] branch master updated: fix(scripts): skip
packaging irrelevant libs (#700)
This is an automated email from the ASF dual-hosted git repository.
zhaoliwei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pegasus.git
The following commit(s) were added to refs/heads/master by this push:
new 83e18ae fix(scripts): skip packaging irrelevant libs (#700)
83e18ae is described below
commit 83e18ae2af6a5e87c94c6e32369467a9b30c980c
Author: Wu Tao <wu...@163.com>
AuthorDate: Mon Mar 22 04:59:40 2021 -0500
fix(scripts): skip packaging irrelevant libs (#700)
---
.github/workflows/ci-pull-request.yaml | 8 +++++++-
scripts/pack_common.sh | 14 ++++++++++++--
2 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/ci-pull-request.yaml b/.github/workflows/ci-pull-request.yaml
index 5bc0d5d..d60ab02 100644
--- a/.github/workflows/ci-pull-request.yaml
+++ b/.github/workflows/ci-pull-request.yaml
@@ -9,7 +9,7 @@ name: pull_request
on:
# run on each pull request
pull_request:
- types: [ synchronize, reopened, labeled ]
+ types: [ synchronize, opened ]
branches:
- master
- 'v[0-9]+.*' # release branch
@@ -55,6 +55,12 @@ jobs:
run: unzip /root/thirdparties-bin.zip -d ./rdsn/thirdparty
- name: Compilation
run: ./run.sh build -c --skip_thirdparty
+ -
+ name: Packaging Server
+ run: ./run.sh pack_server
+ -
+ name: Packaging Tools
+ run: ./run.sh pack_tools
- name: Unit Testing
run: |
source ./config_hdfs.sh
diff --git a/scripts/pack_common.sh b/scripts/pack_common.sh
index 48d3221..7d60397 100755
--- a/scripts/pack_common.sh
+++ b/scripts/pack_common.sh
@@ -100,12 +100,22 @@ function check_bit()
fi
}
-function pack_system_lib()
-{
+function need_system_lib() {
+ # return if system libname is not empty, if false, it means this library is not a dependency
+ libname=$(ldd ./DSN_ROOT/bin/pegasus_"$1"/pegasus_"$1" 2>/dev/null | grep "lib${2}\.so")
+ [ -n "${libname}" ]
+}
+
+function pack_system_lib() {
local package_path=$1
local package_type=$2
local lib_name=$3
+ if ! need_system_lib "${package_type}" "${lib_name}"; then
+ echo "ERROR: ${lib_name} is not a required dependency, skip packaging this lib"
+ return;
+ fi
+
SYS_LIB_PATH=$(get_system_lib "${package_type}" "${lib_name}")
if [ -z "${SYS_LIB_PATH}" ]; then
echo "ERROR: library ${lib_name} is missing on your system"
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pegasus.apache.org
For additional commands, e-mail: commits-help@pegasus.apache.org