You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by jo...@apache.org on 2023/06/15 16:23:17 UTC
[impala] 03/04: IMPALA-12179 (part 3): Remove remaining lsb_release references
This is an automated email from the ASF dual-hosted git repository.
joemcdonnell pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git
commit 6222785ef57dc23626be01e5db03c274e2413ea1
Author: Joe McDonnell <jo...@cloudera.com>
AuthorDate: Tue Jun 13 20:42:38 2023 -0700
IMPALA-12179 (part 3): Remove remaining lsb_release references
This removes a few stray lsb_release references in distcc
scripts and the install_docker.sh script. It then removes
the redhat-lsb package from the list of installed packages.
Testing:
- Ran a build on Rocky 8.5
- Ran dockerised tests on Ubuntu 20
Change-Id: I9d84e9ab8076fd8cc4727a5da118d9a747d4a005
Reviewed-on: http://gerrit.cloudera.org:8080/20071
Reviewed-by: Michael Smith <mi...@cloudera.com>
Tested-by: Joe McDonnell <jo...@cloudera.com>
---
bin/bootstrap_system.sh | 2 +-
bin/distcc/distcc_server_bootstrap.sh | 8 ++++----
bin/distcc/distcc_server_setup.sh | 12 ++++++------
bin/jenkins/install_docker.sh | 2 +-
4 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/bin/bootstrap_system.sh b/bin/bootstrap_system.sh
index 04d02e6bb..d470e9036 100755
--- a/bin/bootstrap_system.sh
+++ b/bin/bootstrap_system.sh
@@ -245,7 +245,7 @@ redhat sudo yum install -y curl gawk gcc gcc-c++ git krb5-devel krb5-server \
cyrus-sasl-gssapi cyrus-sasl-devel cyrus-sasl-plain \
postgresql postgresql-server \
wget vim-common nscd cmake fuse-devel zlib-devel \
- psmisc lsof openssh-server redhat-lsb python3-devel python3-setuptools \
+ psmisc lsof openssh-server python3-devel python3-setuptools \
net-tools langpacks-en glibc-langpack-en libxml2-devel libxslt-devel \
java-${REDHAT_JAVA_VERSION}-openjdk-src java-${REDHAT_JAVA_VERSION}-openjdk-devel
diff --git a/bin/distcc/distcc_server_bootstrap.sh b/bin/distcc/distcc_server_bootstrap.sh
index fd69a560e..187366478 100755
--- a/bin/distcc/distcc_server_bootstrap.sh
+++ b/bin/distcc/distcc_server_bootstrap.sh
@@ -33,10 +33,10 @@ if [[ "$USER" != "root" ]]; then
exit 1
fi
-LSB_ID=$(lsb_release -is)
-LSB_VERSION=$(lsb_release -rs)
-if [[ "$LSB_ID" == Ubuntu ]]; then
- if ! [[ $LSB_VERSION == 16.04 || $LSB_VERSION == 18.04 ]]; then
+OS_ID=$(source /etc/os-release && echo $ID)
+OS_VERSION=$(source /etc/os-release && echo $VERSION_ID)
+if [[ "$OS_ID" == Ubuntu ]]; then
+ if ! [[ $OS_VERSION == 16.04 || $OS_VERSION == 18.04 ]]; then
echo "This script only supports Ubuntu 16.04 and 18.04" >&2
exit 1
fi
diff --git a/bin/distcc/distcc_server_setup.sh b/bin/distcc/distcc_server_setup.sh
index 38a93dce0..8d5d7bb98 100755
--- a/bin/distcc/distcc_server_setup.sh
+++ b/bin/distcc/distcc_server_setup.sh
@@ -57,18 +57,18 @@ fi
set -x
ALLOWED_NETS=$1
-LSB_ID=$(lsb_release -is)
-LSB_VERSION=$(lsb_release -rs)
-if [[ "$LSB_ID" == Ubuntu ]]; then
- if ! [[ $LSB_VERSION == 14.04 || $LSB_VERSION == 16.04 || $LSB_VERSION == 18.04 ]]; then
+OS_ID=$(source /etc/os-release && echo "$ID")
+OS_VERSION=$(source /etc/os-release && echo "$VERSION_ID")
+if [[ "$OS_ID" == ubuntu ]]; then
+ if ! [[ $OS_VERSION == 14.04 || $OS_VERSION == 16.04 || $OS_VERSION == 18.04 ]]; then
echo "This script only supports Ubuntu 14.04, 16.04 and 18.04" >&2
exit 1
fi
LINUX_FLAVOUR=ubuntu
DISTCCD_USER=distccd
DISTCCD_SERVICE=distcc
-elif [[ "$LSB_ID" == CentOS ]]; then
- if ! [[ $LSB_VERSION == 6.* || $LSB_VERSION = 7.* ]]; then
+elif [[ "$OS_ID" == centos ]]; then
+ if ! [[ $OS_VERSION == 6.* || $OS_VERSION = 7.* ]]; then
echo "This script only supports CentOS 6 and 7" >&2
exit 1
fi
diff --git a/bin/jenkins/install_docker.sh b/bin/jenkins/install_docker.sh
index 261663822..49c4b9f6e 100755
--- a/bin/jenkins/install_docker.sh
+++ b/bin/jenkins/install_docker.sh
@@ -63,7 +63,7 @@ if [[ $DISTRIBUTION == Ubuntu ]]; then
grep '9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88'
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
- $(lsb_release -cs) stable"
+ $(source /etc/os-release && echo $UBUNTU_CODENAME) stable"
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io
sudo service docker restart