Skip to content

Commit

Permalink
Upgrade to v1.5.0
Browse files Browse the repository at this point in the history
Switch from MySQL to MariaDB and upgrade the Exasol, Oracle, and
Snowflake drivers.
  • Loading branch information
theory committed Jan 8, 2025
1 parent 9e21249 commit 0db3134
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .envrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
NAME=sqitch
TITLE=Sqitch
VERSION=1.4.1
VERSION=1.5.0
IMAGE=sqitch/sqitch
DESCRIPTION="Sensible database change management"
VENDOR="The Sqitch Community"
Expand Down
10 changes: 4 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RUN mkdir -p /usr/share/man/man1 /usr/share/man/man7 \
&& tar -zxf App-Sqitch-v$VERSION.tar.gz --strip-components 1 -C src

# Install cpan and build dependencies.
ENV PERL5LIB /work/local/lib/perl5
ENV PERL5LIB=/work/local/lib/perl5
RUN curl -sL --compressed https://git.io/cpm > cpm && chmod +x cpm \
&& ./cpm install -L local --verbose --no-test --show-build-log-on-failure ExtUtils::MakeMaker List::MoreUtils::XS \
&& ./cpm install -L local --verbose --no-test --show-build-log-on-failure --with-recommends \
Expand All @@ -23,10 +23,8 @@ WORKDIR /work/src

RUN perl Build.PL --quiet --install_base /app --etcdir /etc/sqitch \
--config installman1dir= --config installsiteman1dir= --config installman3dir= --config installsiteman3dir= \
--with sqlite --with postgres --with firebird --with odbc \
--with sqlite --with postgres --with firebird --with odbc --with mysql \
&& ln -s /usr/include/ibase.h /usr/include/firebird/ \
# XXX Fix for removal of BEGIN block in v1.4.1.
&& perl -i -pe 's/BEGIN/use App::Sqitch/g' inc/Module/Build/Sqitch.pm \
&& ./Build bundle \
&& rm -rf /app/man \
&& find /app -name '*.pod' | grep -v sqitch | xargs rm -rf
Expand All @@ -35,14 +33,14 @@ RUN perl Build.PL --quiet --install_base /app --etcdir /etc/sqitch \
# Copy to the final image without all the build stuff.
FROM debian:bookworm-slim AS sqitch

# Install runtime system dependencies and remove unnecesary files.
# Install runtime system dependencies and remove unnecessary files.
RUN mkdir -p /usr/share/man/man1 /usr/share/man/man7 \
&& apt-get -qq update \
&& apt-get -qq --no-install-recommends install less libperl5.36 perl-doc nano ca-certificates \
sqlite3 \
firebird3.0-utils libfbclient2 \
libpq5 postgresql-client \
mariadb-client-core libmariadb-dev-compat libdbd-mysql-perl \
mariadb-client-core libmariadb-dev-compat \
&& apt-cache pkgnames | grep python | xargs apt-get purge -qq \
&& apt-cache pkgnames | grep libmagic | xargs apt-get purge -qq \
&& apt-get clean \
Expand Down
6 changes: 3 additions & 3 deletions exasol/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ WORKDIR /work
# Download and unpack EXAplus and the ODBC driver.
# COPY *.tar.gz ./
# https://downloads.exasol.com/clients-and-drivers
ARG version=24.1.2
ARG version=24.2.0
ADD https://x-up.s3.amazonaws.com/7.x/$version/EXAplus-$version.tar.gz \
https://x-up.s3.amazonaws.com/7.x/$version/Exasol_ODBC-$version-Linux_x86_64.tar.gz \
./
Expand All @@ -19,7 +19,7 @@ RUN tar zxf Exasol_ODBC-$version-Linux_x86_64.tar.gz \

FROM --platform=linux/amd64 sqitch/sqitch:latest

# Install runtime dependencies, remove unnecesary files, and create symlink.
# Install runtime dependencies, remove unnecessary files, and create symlink.
USER root
RUN apt-get -qq update \
&& mkdir -p /usr/share/man/man1 \
Expand All @@ -30,7 +30,7 @@ RUN apt-get -qq update \
&& mkdir -p /opt/exasol/ \
&& ln -s /opt/exaplus/exaplus /bin

# Install EXAplus and the ODDB driver & config.
# Install EXAplus and the ODDC driver & config.
COPY --from=exa-build /work/exaplus /opt/exaplus/
COPY --from=exa-build /work/odbc /opt/exasol/odbc/lib
COPY odbcinst.ini /etc/
Expand Down
2 changes: 1 addition & 1 deletion exasol/odbcinst.ini
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[Exasol]
Description = ODBC for Exasol
Driver = /opt/exasol/odbc/lib/libexaodbc.so
Driver = /opt/exasol/lib/libexaodbc.so
8 changes: 4 additions & 4 deletions oracle/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ FROM debian:bookworm-slim AS ora-build

WORKDIR /work

# Alwyays install the latest version of instantclient.
# Always install the latest version of instantclient.
# https://www.oracle.com/database/technologies/instant-client/linux-x86-64-downloads.html
# https://www.oracle.com/database/technologies/instant-client/linux-arm-aarch64-downloads.html

ENV BASEURI=https://download.oracle.com/otn_software/linux/instantclient/instantclient
ENV ORACLE_HOME /work/instantclient
ENV LD_LIBRARY_PATH /work/instantclient
ENV PERL5LIB /work/tmp/lib/perl5
ENV ORACLE_HOME=/work/instantclient
ENV LD_LIBRARY_PATH=/work/instantclient
ENV PERL5LIB=git/work/tmp/lib/perl5

RUN mkdir -p /usr/share/man/man1 /usr/share/man/man7 \
# Install dependencies, including latest platform-specific instantclient.
Expand Down
8 changes: 4 additions & 4 deletions snowflake/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ COPY conf ./
# Tell SnowSQL where to store its versions and config. Need to keep it inside
# the image so it doesn't try to load the version from $HOME, which will
# typically be mounted to point to the originating host.
ENV WORKSPACE /var/snowsql
ENV WORKSPACE=/var/snowsql

# Set locale for Python triggers.
ENV LC_ALL=C.UTF-8 LANG=C.UTF-8

# CONFIGURE the ODBC driver and SnowSQL versions to download.
# https://docs.snowflake.com/en/user-guide/snowsql-install-config
# https://docs.snowflake.com/en/release-notes/client-change-log-snowsql
# https://docs.snowflake.com/en/release-notes/clients-drivers/snowsql
# https://sfc-repo.snowflakecomputing.com/index.html
ARG ODBC_VERSION=3.4.0
ARG ODBC_VERSION=3.5.0
ARG SNOWSQL_VERSION=1.3.2

# Install prereqs.
Expand Down Expand Up @@ -63,4 +63,4 @@ RUN chmod --recursive a+rx /var/.snowsql

# The .snowsql directory is copied to /var.
USER sqitch
ENV SNOWSQL_DOWNLOAD_DIR /var/.snowsql
ENV SNOWSQL_DOWNLOAD_DIR=/var/.snowsql
4 changes: 2 additions & 2 deletions snowflake/conf/odbc.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ SF_ACCOUNT = Snowflake DSN for SF_ACCOUNT

[SF_ACCOUNT]
Description=SnowflakeDB
Driver=/usr/lib/snowflake/odbc/lib/libSnowflake.so
Driver=/opt/snowflake/lib/libSnowflake.so
Locale=en-US
SERVER=SF_ACCOUNT.snowflakecomputing.com
PORT=443
Expand All @@ -12,4 +12,4 @@ ACCOUNT=SF_ACCOUNT

# Sadly does not work: https://github.com/sqitchers/docker-sqitch/pull/16/.
[Default]
Driver=/usr/lib/snowflake/odbc/lib/libSnowflake.so
Driver=/opt/snowflake/lib/libSnowflake.so
2 changes: 1 addition & 1 deletion snowflake/conf/odbcinst.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ Snowflake=Installed
Driver=Snowflake

[Snowflake]
Driver=/usr/lib/snowflake/odbc/lib/libSnowflake.so
Driver=/opt/snowflake/lib/libSnowflake.so

0 comments on commit 0db3134

Please sign in to comment.