This is an automated email from the ASF dual-hosted git repository.

jlfsdtc pushed a commit to branch kylin5
in repository https://gitbox.apache.org/repos/asf/kylin.git


The following commit(s) were added to refs/heads/kylin5 by this push:
     new b46d258d89 [MINOR] update release script
b46d258d89 is described below

commit b46d258d898f9b1cac008b272a3b3f357c269b23
Author: jlf <[email protected]>
AuthorDate: Thu Aug 14 18:20:54 2025 +0800

    [MINOR] update release script
    
    1. support build with gluten in mac
    2. move download-async-profiler.sh in build/release
    3. support packaging spark into the Kylin release package
---
 .gitignore                                         |  1 +
 .../async-profiler-lib/download-async-profiler.sh  | 53 -------------------
 build/release/compress.sh                          | 20 +++++--
 build/release/download-async-profiler.sh           | 61 ++++++++++++++++++++++
 build/release/download-gluten.sh                   |  1 -
 build/release/package.sh                           |  2 -
 6 files changed, 78 insertions(+), 60 deletions(-)

diff --git a/.gitignore b/.gitignore
index 9d89616a52..c449324903 100644
--- a/.gitignore
+++ b/.gitignore
@@ -96,6 +96,7 @@ build/tpch-benchmark
 build/spark
 build/gluten
 build/libasyncProfiler*
+build/async-profiler*
 
 *.tgz
 *.tar.gz
diff --git a/build/async-profiler-lib/download-async-profiler.sh 
b/build/async-profiler-lib/download-async-profiler.sh
deleted file mode 100755
index ca87f68c82..0000000000
--- a/build/async-profiler-lib/download-async-profiler.sh
+++ /dev/null
@@ -1,53 +0,0 @@
-#
-# /*
-#  * Licensed to the Apache Software Foundation (ASF) under one
-#  * or more contributor license agreements.  See the NOTICE file
-#  * distributed with this work for additional information
-#  * regarding copyright ownership.  The ASF licenses this file
-#  * to you under the Apache License, Version 2.0 (the
-#  * "License"); you may not use this file except in compliance
-#  * with the License.  You may obtain a copy of the License at
-#  *
-#  *     http://www.apache.org/licenses/LICENSE-2.0
-#  *
-#  * Unless required by applicable law or agreed to in writing, software
-#  * distributed under the License is distributed on an "AS IS" BASIS,
-#  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#  * See the License for the specific language governing permissions and
-#  * limitations under the License.
-#  */
-#
-package_version="2.9"
-
-package_x64="async-profiler-${package_version}-linux-x64"
-package_arm64="async-profiler-${package_version}-linux-arm64"
-
-file_suffix=".tar.gz"
-package_full_x64="${package_x64}${file_suffix}"
-package_full_arm64="${package_arm64}${file_suffix}"
-
-wget 
https://github.com/jvm-profiling-tools/async-profiler/releases/download/v${package_version}/${package_full_x64}
-wget 
https://github.com/jvm-profiling-tools/async-profiler/releases/download/v${package_version}/${package_full_arm64}
-
-if [ `md5sum ${package_full_x64} | awk '{print $1}'` != 
"29127cee36b7acf069d31603b4558361" ]
-then
-    echo "md5 check failed for ${package_full_x64}"
-    exit 1
-fi
-
-if [ `md5sum ${package_full_arm64} | awk '{print $1}'` != 
"d31a70d2c176146a46dffc15948040ed" ]
-then
-    echo "md5 check failed for ${package_full_arm64}"
-    exit 1
-fi
-
-tar -zxf ${package_full_x64}
-tar -zxf ${package_full_arm64}
-
-cp ${package_x64}/build/libasyncProfiler.so libasyncProfiler-linux-x64.so
-cp ${package_arm64}/build/libasyncProfiler.so libasyncProfiler-linux-arm64.so
-
-rm -rf ${package_full_x64}
-rm -rf ${package_full_arm64}
-rm -rf ${package_x64}
-rm -rf ${package_arm64}
diff --git a/build/release/compress.sh b/build/release/compress.sh
index bc590675a7..8bd9524666 100755
--- a/build/release/compress.sh
+++ b/build/release/compress.sh
@@ -36,7 +36,7 @@ cp ../NOTICE ${package_name}/
 mkdir -p ${package_name}/lib/ext
 
 # Spark binary won't be distributed into Kylin binary due to size limit
-# cp -rf spark ${package_name}/
+cp -rf spark ${package_name}/
 cp -rf sample_project ${package_name}/
 cp -rf samples ${package_name}/
 
@@ -47,7 +47,7 @@ if [[ -d "influxdb" ]]; then
 fi
 
 ## copy async profiler native files
-bash async-profiler-lib/download-async-profiler.sh
+bash build/release/download-async-profiler.sh
 #cp -rf async-profiler-lib/libasyncProfiler-mac.so 
"${package_name}"/lib/libasyncProfiler-mac.so
 cp -rf libasyncProfiler-linux-x64.so 
"${package_name}"/lib/libasyncProfiler-linux-x64.so
 cp -rf libasyncProfiler-linux-arm64.so 
"${package_name}"/lib/libasyncProfiler-linux-arm64.so
@@ -103,11 +103,23 @@ if [[ "${WITH_GLUTEN}" = "1" ]]; then
     mv spark/libch.so ${package_name}/server/
     cp spark/jars/gluten.jar ${package_name}/lib/ext/
     if [[ "$(uname)" == "Darwin" ]]; then
-    sed -i '' '22a\
+    sed -i '' '21a\
 export LD_PRELOAD=${KYLIN_HOME}/server/libch.so
 ' ${package_name}/sbin/spark-test.sh
+    sed -i '' '21a\
+export LD_PRELOAD=${KYLIN_HOME}/server/libch.so
+' ${package_name}/sbin/bootstrap.sh
+    else
+        sed -i '21aexport LD_PRELOAD=${KYLIN_HOME}/server/libch.so' 
${package_name}/sbin/spark-test.sh
+        sed -i '21aexport LD_PRELOAD=${KYLIN_HOME}/server/libch.so' 
${package_name}/sbin/bootstrap.sh
+    fi
+else
+    if [[ "$(uname)" == "Darwin" ]]; then
+        sed -i '' '/^export LD_PRELOAD=/d' ${package_name}/sbin/spark-test.sh
+        sed -i '' '/^export LD_PRELOAD=/d' ${package_name}/sbin/bootstrap.sh
     else
-        sed -i '22aexport LD_PRELOAD=${KYLIN_HOME}/server/libch.so' 
${package_name}/sbin/spark-test.sh
+        sed -i '/^export LD_PRELOAD=/d' ${package_name}/sbin/spark-test.sh
+        sed -i '/^export LD_PRELOAD=/d' ${package_name}/sbin/bootstrap.sh
     fi
 fi
 
diff --git a/build/release/download-async-profiler.sh 
b/build/release/download-async-profiler.sh
new file mode 100755
index 0000000000..304723c08b
--- /dev/null
+++ b/build/release/download-async-profiler.sh
@@ -0,0 +1,61 @@
+#
+# /*
+#  * Licensed to the Apache Software Foundation (ASF) under one
+#  * or more contributor license agreements.  See the NOTICE file
+#  * distributed with this work for additional information
+#  * regarding copyright ownership.  The ASF licenses this file
+#  * to you under the Apache License, Version 2.0 (the
+#  * "License"); you may not use this file except in compliance
+#  * with the License.  You may obtain a copy of the License at
+#  *
+#  *     http://www.apache.org/licenses/LICENSE-2.0
+#  *
+#  * Unless required by applicable law or agreed to in writing, software
+#  * distributed under the License is distributed on an "AS IS" BASIS,
+#  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  * See the License for the specific language governing permissions and
+#  * limitations under the License.
+#  */
+#
+package_version="2.9"
+
+package_x64="async-profiler-${package_version}-linux-x64"
+package_arm64="async-profiler-${package_version}-linux-arm64"
+
+file_suffix=".tar.gz"
+package_full_x64="${package_x64}${file_suffix}"
+package_full_arm64="${package_arm64}${file_suffix}"
+
+if [ ! -f "build/${package_full_x64}" ]
+then
+    echo "No ${package_x64} binary file found."
+    wget --directory-prefix=build/ 
https://github.com/async-profiler/async-profiler/releases/download/v${package_version}/${package_full_x64}
 || { echo "Download ${package_x64} failed." && exit 1; }
+else
+    if [ `md5sum build/${package_full_x64} | awk '{print $1}'` != 
"29127cee36b7acf069d31603b4558361" ]
+    then
+        echo "${package_x64} md5 check failed."
+        rm build/${package_full_x64}
+        wget --directory-prefix=build/ 
https://github.com/async-profiler/async-profiler/releases/download/v${package_version}/${package_full_x64}
 || { echo "Download ${package_x64} failed." && exit 1; }
+    fi
+fi
+
+if [ ! -f "build/${package_full_arm64}" ]
+then
+    echo "No ${package_x64} binary file found."
+    wget --directory-prefix=build/ 
https://github.com/async-profiler/async-profiler/releases/download/v${package_version}/${package_full_arm64}
 || { echo "Download ${package_full_arm64} failed." && exit 1; }
+else
+    if [ `md5sum build/${package_full_arm64} | awk '{print $1}'` != 
"d31a70d2c176146a46dffc15948040ed" ]
+    then
+        echo "${package_x64} md5 check failed."
+        rm build/${package_full_arm64}
+        wget --directory-prefix=build/ 
https://github.com/async-profiler/async-profiler/releases/download/v${package_version}/${package_full_arm64}
 || { echo "Download ${package_full_arm64} failed." && exit 1; }
+    fi
+fi
+
+rm -rf build/async-profiler
+mkdir -p build/async-profiler
+tar -zxf build/${package_full_x64} -C build/async-profiler/
+tar -zxf build/${package_full_arm64} -C build/async-profiler/
+
+cp build/async-profiler/${package_x64}/build/libasyncProfiler.so 
build/libasyncProfiler-linux-x64.so
+cp build/async-profiler/${package_arm64}/build/libasyncProfiler.so 
build/libasyncProfiler-linux-arm64.so
diff --git a/build/release/download-gluten.sh b/build/release/download-gluten.sh
index 14523ca220..94fb328222 100755
--- a/build/release/download-gluten.sh
+++ b/build/release/download-gluten.sh
@@ -35,5 +35,4 @@ fi
 tar -zxf build/gluten-${gluten_version}-${gluten_platform}.tar.gz -C build/
 mv build/gluten-${gluten_version}-${gluten_platform} build/gluten
 cp build/gluten/libs/libch.so build/spark/
-find build/spark/jars/ -name "protobuf-java*" -delete
 cp -r build/gluten/jars/spark33/* build/spark/jars/
diff --git a/build/release/package.sh b/build/release/package.sh
index ab978b053c..3114c3b7f6 100755
--- a/build/release/package.sh
+++ b/build/release/package.sh
@@ -58,8 +58,6 @@ if [[ "${WITH_SPARK}" = "1" ]]; then
     if [[ "${WITH_GLUTEN}" = "1" ]]; then
         echo "Prepare gluten..."
         sh build/release/download-gluten.sh      || { exit 1; }
-    else
-        sed -i '/^export LD_PRELOAD=/d' build/sbin/bootstrap.sh
     fi
 else
     rm -rf build/spark

Reply via email to