-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
testing with earlier go version #2681
Open
kaushikpuneet07
wants to merge
6
commits into
Percona-Lab:master
Choose a base branch
from
kaushikpuneet07:check-go
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
ff42d6c
testing with earlier go version
kaushikpuneet07 537940e
fix focal
kaushikpuneet07 bfefa5d
testing with latest ersion
kaushikpuneet07 02a4500
revert original
kaushikpuneet07 4667000
testing centos7
kaushikpuneet07 87bfb8c
update
kaushikpuneet07 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,9 +11,13 @@ set -o xtrace | |
|
||
if [ -f /usr/bin/yum ]; then | ||
RHEL=$(rpm --eval %rhel) | ||
if [[ $RHEL -eq 8 ]]; then | ||
if [[ $RHEL -eq 9 ]]; then | ||
sudo yum -y install python2 gnutls-devel libtool libuuid libuuid-devel perl-IPC-Cmd || true | ||
sudo yum remove -y cmake | ||
sudo yum -y install wget | ||
wget https://mirror.stream.centos.org/9-stream/AppStream/x86_64/os/Packages/gcc-c++-11.4.1-2.3.el9.x86_64.rpm | ||
wget https://mirror.stream.centos.org/9-stream/AppStream/x86_64/os/Packages/gcc-11.4.1-2.3.el9.x86_64.rpm | ||
sudo rpm -ivh gcc-c++-11.4.1-2.3.el9.x86_64.rpm gcc-11.4.1-2.3.el9.x86_64.rpm | ||
sudo wget https://github.com/Kitware/CMake/releases/download/v3.19.8/cmake-3.19.8.tar.gz | ||
sudo tar -zxf cmake-3.19.8.tar.gz | ||
cd cmake-3.19.8/ | ||
|
@@ -22,22 +26,28 @@ if [ -f /usr/bin/yum ]; then | |
sudo make install | ||
sudo ln -s /usr/local/bin/cmake /usr/bin/cmake | ||
sudo cmake --version | ||
gcc --version | ||
g++ --version | ||
fi | ||
sudo yum -y install wget | ||
if [[ $RHEL -eq 7 ]]; then | ||
sudo yum install -y centos-release-scl | ||
sudo yum install -y devtoolset-7-gcc-c++ --enablerepo='centos-sclo-rh' | ||
scl enable devtoolset-7 'gcc --version' | head -1 | ||
sudo yum -y install automake bzip2 cmake3 make gcc-c++ gcc git openssl openssl-devel gnutls gnutls-devel libtool patch libuuid libuuid-devel perl-IPC-Cmd | ||
gcc --version | ||
g++ --version | ||
which gcc | ||
which g++ | ||
if [ -f /usr/bin/cmake3 ]; then | ||
sudo mv /usr/bin/cmake /usr/bin/cmake2 | ||
sudo ln -s /usr/bin/cmake3 /usr/bin/cmake | ||
fi | ||
fi | ||
elif [ -f /usr/bin/apt ]; then | ||
DEBIAN_VERSION=$(lsb_release -sc) | ||
if [ ${DEBIAN_VERSION} = "stretch" ]; then | ||
sudo sed -i s/deb.debian.org/archive.debian.org/g /etc/apt/sources.list | ||
sudo sed -i 's|security.debian.org|archive.debian.org|g' /etc/apt/sources.list | ||
sudo sed -i '/stretch-updates/d' /etc/apt/sources.list | ||
sudo apt-get -y update | ||
if [ ${DEBIAN_VERSION} = "focal" ]; then | ||
sudo apt-get update | ||
sudo apt-get install -y uuid-dev | ||
else | ||
sudo apt-get install -y uuid-dev | ||
|
@@ -55,7 +65,7 @@ elif [ -f /usr/bin/apt ]; then | |
fi | ||
|
||
# We need to use golang version >= 1.21. Downloading golang from tarball to ensure each platform uses the same version. | ||
sudo wget https://go.dev/dl/go1.21.9.linux-amd64.tar.gz | ||
sudo wget https://go.dev/dl/go1.17.7.linux-amd64.tar.gz | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why such old golang version? there are a lot of cves in it |
||
|
||
# /usr/local is the default path included in the $PATH variable. Using any other custom installation path will not work | ||
# Example: | ||
|
@@ -64,7 +74,7 @@ sudo wget https://go.dev/dl/go1.21.9.linux-amd64.tar.gz | |
# | ||
# The above method will not work. This is because the value of $PATH is not preserved/passed on to the child scipt from the parent script | ||
# Hence using the default $PATH that is available to every new session (both parent and child script) | ||
sudo tar -C /usr/local/ -xzf go1.21.9.linux-amd64.tar.gz | ||
sudo tar -C /usr/local/ -xzf go1.17.7.linux-amd64.tar.gz | ||
sudo cp /usr/local/go/bin/go /usr/local/bin/go | ||
if [ -f /usr/bin/yum ]; then | ||
RHEL=$(rpm --eval %rhel) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why we cannot install these packages from the repo