IMPALA-10262: RPM/DEB Packaging Support

This patch bases on a previous patch contributed by Shant Hovsepian:
https://gerrit.cloudera.org/c/16612/

It adds a new option, -package, to buildall.sh for building a package
for the current OS type (e.g. CentOS/Ubuntu). You can also use
"make/ninja package" to build the package. Scripts for launching the
services and the required configuration files are also added.

Tests:
 - Built on Ubuntu 18.04/20.04 and CentOS 7 using
   ./buildall.sh -noclean -skiptests -release -package
 - Deployed the RPM package on a CDP cluster. Verifed the scripts.
 - Deployed the DEB package on a docker container. Verified the scripts.

Change-Id: I64419fd400fe8d233dac016b6306157fe9461d82
Reviewed-on: http://gerrit.cloudera.org:8080/18939
Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
This commit is contained in:
stiga-huang
2022-09-05 13:13:11 +08:00
committed by Impala Public Jenkins
parent a281d8eb8e
commit 8d0ab2b684
23 changed files with 579 additions and 7 deletions

View File

@@ -69,6 +69,7 @@ BUILD_ASAN=0
BUILD_FE_ONLY=0
BUILD_TESTS=1
GEN_CMAKE_ONLY=0
GEN_PACKAGE=0
BUILD_RELEASE_AND_DEBUG=0
BUILD_TIDY=0
BUILD_UBSAN=0
@@ -204,6 +205,9 @@ do
-cmake_only)
GEN_CMAKE_ONLY=1
;;
-package)
GEN_PACKAGE=1
;;
-help|*)
echo "buildall.sh - Builds Impala and runs all tests."
echo "[-noclean] : Omits cleaning all packages before building. Will not kill"\
@@ -258,6 +262,7 @@ do
echo "[-fe_only] : Build just the frontend"
echo "[-ninja] : Use ninja instead of make"
echo "[-cmake_only] : Generate makefiles only, instead of doing a full build"
echo "[-package] : Generate a package for deployment."
echo "-----------------------------------------------------------------------------
Examples of common tasks:
@@ -537,6 +542,9 @@ generate_cmake_files() {
echo "CACHELINESIZE_AARCH64:$CACHELINESIZE_AARCH64"
CMAKE_ARGS+=(-DCACHELINESIZE_AARCH64=$CACHELINESIZE_AARCH64)
fi
if [[ "$GEN_PACKAGE" -eq 1 ]]; then
CMAKE_ARGS+=(-DBUILD_PACKAGES=ON)
fi
cmake . ${CMAKE_ARGS[@]}
}
@@ -660,6 +668,10 @@ else
build_all_components $CMAKE_BUILD_TYPE 1
fi
if [[ "$GEN_PACKAGE" -eq 1 ]]; then
${MAKE_CMD} -j${IMPALA_BUILD_THREADS:-4} package
fi
if [[ $NEED_MINICLUSTER -eq 1 ]]; then
reconfigure_test_cluster
fi