Skip to content

Commit

Permalink
Merge pull request #47 from yankeexe/verify-checksum
Browse files Browse the repository at this point in the history
Signature / MD5 hash check for MYSQL Connector
  • Loading branch information
mesaugat authored Jun 6, 2020
2 parents cdf525f + e8b45cf commit 53f6bd1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
dist: xenial
dist: bionic

language: python

python:
- "3.7"

branches:
only:
Expand Down
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,18 @@ COPY requirements.txt .
RUN \
export ACCEPT_EULA='Y' && \
export MYSQL_CONNECTOR='mysql-connector-odbc-8.0.18-linux-glibc2.12-x86-64bit' && \
export MYSQL_CONNECTOR_CHECKSUM='f2684bb246db22f2c9c440c4d905dde9' && \
apt-get update && \
apt-get install -y curl build-essential unixodbc-dev g++ apt-transport-https && \
gpg --keyserver hkp://keys.gnupg.net --recv-keys 5072E1F5 && \
#
# Install pyodbc db drivers for MSSQL, PG and MySQL
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - && \
curl https://packages.microsoft.com/config/debian/9/prod.list > /etc/apt/sources.list.d/mssql-release.list && \
curl -L -o ${MYSQL_CONNECTOR}.tar.gz https://dev.mysql.com/get/Downloads/Connector-ODBC/8.0/${MYSQL_CONNECTOR}.tar.gz && \
curl -L -o ${MYSQL_CONNECTOR}.tar.gz.asc https://downloads.mysql.com/archives/gpg/\?file\=${MYSQL_CONNECTOR}.tar.gz\&p\=10 && \
gpg --verify ${MYSQL_CONNECTOR}.tar.gz.asc && \
echo "${MYSQL_CONNECTOR_CHECKSUM} ${MYSQL_CONNECTOR}.tar.gz" | md5sum -c - && \
apt-get update && \
gunzip ${MYSQL_CONNECTOR}.tar.gz && tar xvf ${MYSQL_CONNECTOR}.tar && \
cp ${MYSQL_CONNECTOR}/bin/* /usr/local/bin && cp ${MYSQL_CONNECTOR}/lib/* /usr/local/lib && \
Expand Down

0 comments on commit 53f6bd1

Please sign in to comment.