mirror of
https://github.com/apache/impala.git
synced 2025-12-19 18:12:08 -05:00
IMPALA-12252: Support distcc server on Ubuntu 20.04
This patch updates our scripts to support our distcc server to be executed on Ubuntu 20.04. One issue to overcome was because of a security fix in distcc. Newer versions only allow compiler programs to be executed if they have a symlink under /usr/lib/distcc. Testing: * tested manually Change-Id: I3cb4dbb210ec22195450dd1a0cb64e00a4559c19 Reviewed-on: http://gerrit.cloudera.org:8080/20137 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:
committed by
Impala Public Jenkins
parent
0c7f15e8b0
commit
5fe088f952
@@ -36,8 +36,8 @@ fi
|
|||||||
OS_ID=$(source /etc/os-release && echo $ID)
|
OS_ID=$(source /etc/os-release && echo $ID)
|
||||||
OS_VERSION=$(source /etc/os-release && echo $VERSION_ID)
|
OS_VERSION=$(source /etc/os-release && echo $VERSION_ID)
|
||||||
if [[ "$OS_ID" == Ubuntu ]]; then
|
if [[ "$OS_ID" == Ubuntu ]]; then
|
||||||
if ! [[ $OS_VERSION == 16.04 || $OS_VERSION == 18.04 ]]; then
|
if ! [[ $OS_VERSION == 16.04 || $OS_VERSION == 18.04 || $OS_VERSION == 20.04 ]]; then
|
||||||
echo "This script only supports Ubuntu 16.04 and 18.04" >&2
|
echo "This script only supports Ubuntu 16.04, 18.04, and 20.04" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@@ -72,4 +72,9 @@ sudo -u distccd -H bash <<"EOF"
|
|||||||
DOWNLOAD_CDH_COMPONENTS=false ./bin/bootstrap_toolchain.py
|
DOWNLOAD_CDH_COMPONENTS=false ./bin/bootstrap_toolchain.py
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
# To resolve CVE-2004-2687, newer distcc versions only allow programs to be executed
|
||||||
|
# if they have a symlink under '/usr/lib/distcc'.
|
||||||
|
# https://github.com/distcc/distcc/commit/dfb45b528746bf89c030fccac307ebcf7c988512
|
||||||
|
sudo ln -s $(which ccache) /usr/lib/distcc/ccache
|
||||||
|
|
||||||
(cd impala && ./bin/distcc/distcc_server_setup.sh "$@")
|
(cd impala && ./bin/distcc/distcc_server_setup.sh "$@")
|
||||||
|
|||||||
@@ -60,8 +60,9 @@ ALLOWED_NETS=$1
|
|||||||
OS_ID=$(source /etc/os-release && echo "$ID")
|
OS_ID=$(source /etc/os-release && echo "$ID")
|
||||||
OS_VERSION=$(source /etc/os-release && echo "$VERSION_ID")
|
OS_VERSION=$(source /etc/os-release && echo "$VERSION_ID")
|
||||||
if [[ "$OS_ID" == ubuntu ]]; then
|
if [[ "$OS_ID" == ubuntu ]]; then
|
||||||
if ! [[ $OS_VERSION == 14.04 || $OS_VERSION == 16.04 || $OS_VERSION == 18.04 ]]; then
|
if ! [[ $OS_VERSION == 14.04 || $OS_VERSION == 16.04 || $OS_VERSION == 18.04 || \
|
||||||
echo "This script only supports Ubuntu 14.04, 16.04 and 18.04" >&2
|
$OS_VERSION == 20.04 ]]; then
|
||||||
|
echo "This script only supports Ubuntu 14.04, 16.04, 18.04, and 20.04" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
LINUX_FLAVOUR=ubuntu
|
LINUX_FLAVOUR=ubuntu
|
||||||
@@ -125,3 +126,9 @@ service ${DISTCCD_SERVICE} restart
|
|||||||
|
|
||||||
echo "Symlinking /opt/Impala-Toolchain to default toolchain location"
|
echo "Symlinking /opt/Impala-Toolchain to default toolchain location"
|
||||||
ln -f -s -T "${IMPALA_HOME}/toolchain" /opt/Impala-Toolchain
|
ln -f -s -T "${IMPALA_HOME}/toolchain" /opt/Impala-Toolchain
|
||||||
|
|
||||||
|
# To resolve CVE-2004-2687, newer distcc versions only allow programs to be executed
|
||||||
|
# if they have a symlink under '/usr/lib/distcc'.
|
||||||
|
# https://github.com/distcc/distcc/commit/dfb45b528746bf89c030fccac307ebcf7c988512
|
||||||
|
echo "Creating symlink for ccache:"
|
||||||
|
ln -s $(which ccache) /usr/lib/distcc/ccache
|
||||||
|
|||||||
Reference in New Issue
Block a user