reformat linux x86 before install, attempt to fix ruby on arm64

This commit is contained in:
Jay Lee
2019-10-11 19:51:36 -04:00
parent 5f418d3f1a
commit 7991790f94
3 changed files with 76 additions and 79 deletions

View File

@@ -72,3 +72,7 @@ echo "Upgrading pip packages..."
$pip list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 $pip install -U $pip list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 $pip install -U
$pip install --upgrade -r src/requirements.txt $pip install --upgrade -r src/requirements.txt
$pip install --upgrade pyinstaller $pip install --upgrade pyinstaller
mkdir ~/.ruby
export GEM_HOME=~/.ruby
export "$PATH:~/.ruby/bin"

View File

@@ -7,13 +7,18 @@ else
export whereibelong=$(pwd) export whereibelong=$(pwd)
export dist=$(lsb_release --codename --short) export dist=$(lsb_release --codename --short)
echo "We are running on Ubuntu $dist" echo "We are running on Ubuntu $dist"
export LD_LIBRARY_PATH=~/ssl/lib:~/python/lib
SSLVER=$(~/ssl/bin/openssl version)
SSLRESULT=$?
PYVER=$(~/python/bin/python -V)
PYRESULT=$?
if [[ "$SSLRESULT" != "0" ]] || [[ "$SSLVER" != *"$BUILD_OPENSSL_VERSION"* ]] || [[ "$PYRESULT" != "0" ]] || [[ "$PYVER" != *"$PYTHON_BUILD_VERSION"* ]]; then
echo "RUNNING: apt update..." echo "RUNNING: apt update..."
sudo apt-get -qq --yes update > /dev/null sudo apt-get -qq --yes update > /dev/null
echo "RUNNING: apt dist-upgrade..." echo "RUNNING: apt dist-upgrade..."
# sudo apt-get -qq --yes dist-upgrade > /dev/null sudo apt-get -qq --yes dist-upgrade > /dev/null
echo "Installing build tools..." echo "Installing build tools..."
sudo apt-get -qq --yes install build-essential sudo apt-get -qq --yes install build-essential
echo "Installing deps for python3" echo "Installing deps for python3"
sudo cp -v /etc/apt/sources.list /tmp sudo cp -v /etc/apt/sources.list /tmp
sudo chmod a+rwx /tmp/sources.list sudo chmod a+rwx /tmp/sources.list
@@ -21,19 +26,15 @@ else
sudo cp -v /tmp/sources.list /etc/apt sudo cp -v /tmp/sources.list /etc/apt
sudo apt-get -qq --yes update > /dev/null sudo apt-get -qq --yes update > /dev/null
sudo apt-get -qq --yes build-dep python3 > /dev/null sudo apt-get -qq --yes build-dep python3 > /dev/null
mypath=$HOME mypath=$HOME
echo "My Path is $mypath" echo "My Path is $mypath"
cpucount=$(nproc --all) cpucount=$(nproc --all)
echo "This device has $cpucount CPUs for compiling..." echo "This device has $cpucount CPUs for compiling..."
cd ~/pybuild
# Compile latest OpenSSL # Compile latest OpenSSL
if [ ! -d openssl-$BUILD_OPENSSL_VERSION ]; then
wget --quiet https://www.openssl.org/source/openssl-$BUILD_OPENSSL_VERSION.tar.gz wget --quiet https://www.openssl.org/source/openssl-$BUILD_OPENSSL_VERSION.tar.gz
echo "Extracting OpenSSL..." echo "Extracting OpenSSL..."
tar xf openssl-$BUILD_OPENSSL_VERSION.tar.gz tar xf openssl-$BUILD_OPENSSL_VERSION.tar.gz
fi
cd openssl-$BUILD_OPENSSL_VERSION cd openssl-$BUILD_OPENSSL_VERSION
echo "Compiling OpenSSL $BUILD_OPENSSL_VERSION..." echo "Compiling OpenSSL $BUILD_OPENSSL_VERSION..."
./config shared --prefix=$mypath/ssl ./config shared --prefix=$mypath/ssl
@@ -41,17 +42,13 @@ else
make -j$cpucount -s make -j$cpucount -s
echo "Running make install for OpenSSL..." echo "Running make install for OpenSSL..."
make install > /dev/null make install > /dev/null
export LD_LIBRARY_PATH=~/ssl/lib
cd ~ cd ~
cd ~/pybuild
# Compile latest Python # Compile latest Python
if [ ! -d Python-$BUILD_PYTHON_VERSION ]; then
echo "Downloading Python $BUILD_PYTHON_VERSION..." echo "Downloading Python $BUILD_PYTHON_VERSION..."
curl -O https://www.python.org/ftp/python/$BUILD_PYTHON_VERSION/Python-$BUILD_PYTHON_VERSION.tar.xz curl -O https://www.python.org/ftp/python/$BUILD_PYTHON_VERSION/Python-$BUILD_PYTHON_VERSION.tar.xz
echo "Extracting Python..." echo "Extracting Python..."
tar xf Python-$BUILD_PYTHON_VERSION.tar.xz tar xf Python-$BUILD_PYTHON_VERSION.tar.xz
fi
cd Python-$BUILD_PYTHON_VERSION cd Python-$BUILD_PYTHON_VERSION
echo "Compiling Python $BUILD_PYTHON_VERSION..." echo "Compiling Python $BUILD_PYTHON_VERSION..."
safe_flags="--with-openssl=$mypath/ssl --enable-shared --prefix=$mypath/python --with-ensurepip=upgrade" safe_flags="--with-openssl=$mypath/ssl --enable-shared --prefix=$mypath/python --with-ensurepip=upgrade"
@@ -73,14 +70,12 @@ else
echo "Installing Python..." echo "Installing Python..."
make install > /dev/null make install > /dev/null
cd ~ cd ~
fi
python=~/python/bin/python3
pip=~/python/bin/pip3
$python -V
export LD_LIBRARY_PATH=~/ssl/lib:~/python/lib if [[ "$dist" == "precise" ]]; then
python=~/python/bin/python3
pip=~/python/bin/pip3
$python -V
if [[ "$dist" == "precise" ]]; then
echo "Installing deps for StaticX..." echo "Installing deps for StaticX..."
sudo apt-get install --yes scons sudo apt-get install --yes scons
if [ ! -d patchelf-$PATCHELF_VERSION ]; then if [ ! -d patchelf-$PATCHELF_VERSION ]; then
@@ -93,9 +88,8 @@ else
sudo make install sudo make install
fi fi
$pip install git+https://github.com/JonathonReinhart/staticx.git@master $pip install git+https://github.com/JonathonReinhart/staticx.git@master
fi
cd $whereibelong
fi fi
cd $whereibelong
echo "Upgrading pip packages..." echo "Upgrading pip packages..."
$pip list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 $pip install -U $pip list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 $pip install -U

View File

@@ -29,5 +29,4 @@ else
du -h gam/gam du -h gam/gam
time $gam version extended time $gam version extended
fi fi
fi fi