Created
June 24, 2020 14:57
-
-
Save szepeviktor/3518118500d0cd3b9bdc82878129ce80 to your computer and use it in GitHub Desktop.
Install S3QL on Python 3.7 (installed by pyenv)
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
#!/bin/bash | |
# | |
# Install S3QL on Debian stretch | |
# | |
# DEBIAN-VERSION :stretch | |
# PYTHON-VERSION :3.7.7 | |
# FUSE3-VERSION :3.4.1 | |
# S3QL-VERSION :3.4.1 | |
# Install Python3 with pyenv | |
cat pyenv-install.sh | |
# Remove old s3ql | |
apt-get purge fuse s3ql python3-llfuse python3-apsw python3-defusedxml python3-dugong python3-crypto | |
# Install fuse3 dependencies | |
apt-get install libselinux1-dev | |
# Backport fuse3 | |
## dget -x http://deb.debian.org/debian/pool/main/f/fuse3/fuse3_3.4.1-1+deb10u1.dsc | |
wget https://example.com/fuse3.tar | |
tar -xf fuse3.tar | |
# Install fuse3 libfuse3-3 libfuse3-dev | |
dpkg -i fuse3*.deb libfuse3-3*.deb libfuse3-dev*.deb | |
# Install apsw and s3ql dependencies | |
apt-get install pkg-config procps psmisc libsqlite3-dev | |
# Install matching apsw version | |
PYENV_ROOT=/opt/pyenv PYENV_VERSION=3.7.7 /opt/pyenv/versions/3.7.7/bin/pip3 install \ | |
"https://github.com/rogerbinns/apsw/releases/download/3.16.2-r1/apsw-3.16.2-r1.zip" | |
# jessie | |
#PYENV_ROOT=/opt/pyenv PYENV_VERSION=3.7.7 /opt/pyenv/versions/3.7.7/bin/pip3 install \ | |
# "https://github.com/rogerbinns/apsw/releases/download/3.8.7.1-r1/apsw-3.8.7.1-r1.zip" | |
# Install s3ql | |
# https://github.com/s3ql/s3ql/releases | |
PYENV_ROOT=/opt/pyenv PYENV_VERSION=3.7.7 /opt/pyenv/versions/3.7.7/bin/pip3 install \ | |
'pyfuse3 >= 1.0, < 2.0' | |
PYENV_ROOT=/opt/pyenv PYENV_VERSION=3.7.7 /opt/pyenv/versions/3.7.7/bin/pip3 install \ | |
"https://github.com/s3ql/s3ql/releases/download/release-3.4.1/s3ql-3.4.1.tar.bz2" | |
# Create links | |
Make_link() | |
{ | |
local bin="$1" | |
local bin_path="/usr/bin/${bin}" | |
echo "Creating link ${bin_path} ..." | |
echo "#!/bin/bash" >"${bin_path}" | |
echo "PYENV_ROOT=/opt/pyenv PYENV_VERSION=3.7.7 exec /opt/pyenv/versions/3.7.7/bin/${bin} \"\$@\"" \ | |
>>"${bin_path}" | |
chmod +x "${bin_path}" | |
} | |
for bin in /opt/pyenv/versions/3.7.7/bin/*s3ql*; do Make_link "${bin##*/}"; done | |
# Check S3QL | |
s3qlctrl --version |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment