feat: Install pygit2 and m2crypto from ubuntu repositories

This commit is contained in:
Carlos Álvaro
2020-10-17 20:54:17 +02:00
parent bb3c4b4f33
commit 3db9bdfc22
3 changed files with 4 additions and 27 deletions

View File

@@ -5,6 +5,7 @@ Please refer to the SaltStack [Release Notes](https://docs.saltstack.com/en/late
**3002** **3002**
- Install `pygit2` and `m2crypto` from ubuntu repositories
- Change Docker base image to `ubuntu:focal-20200925` - Change Docker base image to `ubuntu:focal-20200925`
**3001.1** **3001.1**

View File

@@ -5,11 +5,7 @@ ARG VCS_REF
# https://github.com/saltstack/salt/releases # https://github.com/saltstack/salt/releases
ENV SALT_VERSION="3001.1" \ ENV SALT_VERSION="3001.1" \
PYTHON_VERSION="3.8" \ PYTHON_VERSION="3.8"
LIBSSH2_VERSION="1.9.0" \
LIBGIT2_VERSION="1.0.1" \
PYGIT2_VERSION="1.2.1" \
M2CRYPTO_VERSION="0.36.0"
ENV SALT_DOCKER_DIR="/etc/docker-salt" \ ENV SALT_DOCKER_DIR="/etc/docker-salt" \
SALT_ROOT_DIR="/etc/salt" \ SALT_ROOT_DIR="/etc/salt" \

View File

@@ -28,32 +28,12 @@ exec_as_salt cat >> "${SALT_HOME}/.profile" <<EOF
PATH=/usr/local/sbin:/usr/local/bin:\$PATH PATH=/usr/local/sbin:/usr/local/bin:\$PATH
EOF EOF
# Compile libssh2
echo "Building libssh2 v${LIBSSH2_VERSION} ..."
wget "https://github.com/libssh2/libssh2/archive/libssh2-${LIBSSH2_VERSION}.tar.gz"
tar xzf "libssh2-${LIBSSH2_VERSION}.tar.gz"
cd "libssh2-libssh2-${LIBSSH2_VERSION}/"
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DENABLE_ZLIB_COMPRESSION=ON .
cmake --build . --target install
# Compile libgit2
echo "Building libgit2 v${LIBGIT2_VERSION} ..."
wget "https://github.com/libgit2/libgit2/archive/v${LIBGIT2_VERSION}.tar.gz"
tar xzf "v${LIBGIT2_VERSION}.tar.gz"
cd "libgit2-${LIBGIT2_VERSION}/"
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DBUILD_CLAR=OFF -DTHREADSAFE=ON .
cmake --build . --target install
# Install python3 packages # Install python3 packages
echo "Installing python3 packages ..." echo "Installing python3 packages ..."
DEBIAN_FRONTEND=noninteractive apt-get install --yes --quiet --no-install-recommends \ DEBIAN_FRONTEND=noninteractive apt-get install --yes --quiet --no-install-recommends \
python3-mako python3-pycryptodome python3-cherrypy3 python3-git python3-u-msgpack \ python3-mako python3-pycryptodome python3-cherrypy3 python3-git python3-u-msgpack \
python3-redis python3-gnupg python3-mysqldb python3-dateutil python3-libnacl python3-openssl python3-redis python3-gnupg python3-mysqldb python3-dateutil python3-libnacl python3-openssl \
python3-pygit2 python3-m2crypto
# Install pip3 python packages
echo "Installing pip3 python packages ..."
pip3 install "pygit2==v${PYGIT2_VERSION}" \
"M2Crypto==v${M2CRYPTO_VERSION}"
# Bootstrap script options: # Bootstrap script options:
# https://docs.saltstack.com/en/latest/topics/tutorials/salt_bootstrap.html#command-line-options # https://docs.saltstack.com/en/latest/topics/tutorials/salt_bootstrap.html#command-line-options