Skip to content

Commit

Permalink
Use apt-archive.postgresql.org debs and fix dpkg dependency problems
Browse files Browse the repository at this point in the history
See also: paunin#260

http://apt-archive.postgresql.org/pub/repos/apt/pool/main is now used
instead of http://atalia.postgresql.org/morgue when referencing old
Debian packages.

URI escaping of + to %2B in apt-archive urls to ensure wget download
works as expected from apt-archive.

Fixed dpkg dependency problems for pgpool and libpgpool0 by apt-get
install-ing the following packages:
postgresql-common

Fixed dpkg dependency problems for barman by apt-get install-ing the
following packages:
python-argcomplete python-argh python-dateutil python-psycopg2 rsync

Fixed dpkg dependency problem for pgpool by ensuring libmemcached11 is
installed for pgpool 3.6 and 3.7, but pgpool 3.3 gets libmemcached10.
  • Loading branch information
Marcus Bergner committed Jul 21, 2020
1 parent 1ff4999 commit 8a018bb
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 24 deletions.
4 changes: 2 additions & 2 deletions make/barman/make.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
echo ">>> Making barman"

for VALS in "BARMAN_VERSION=2.3 BARMAN_PACKAGE_VERSION=2.3-2.pgdg90+1"\
"BARMAN_VERSION=2.4 BARMAN_PACKAGE_VERSION=2.4-1.pgdg90+1"; do
for VALS in "BARMAN_VERSION=2.3 BARMAN_PACKAGE_VERSION=2.3-2.pgdg%2B1"\
"BARMAN_VERSION=2.4 BARMAN_PACKAGE_VERSION=2.4-1.pgdg%2B1"; do
eval $VALS

for PG_CLIENT_VERSION in 9.6 10 11; do
Expand Down
10 changes: 5 additions & 5 deletions make/pgpool/make.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
echo ">>> Making pgpool"

for VALS in "PGPOOL_VERSION=3.3 PGPOOL_PACKAGE_VERSION=3.3.4-1.pgdg70+1" \
"PGPOOL_VERSION=3.6 PGPOOL_PACKAGE_VERSION=3.6.7-1.pgdg90+1" \
"PGPOOL_VERSION=3.7 PGPOOL_PACKAGE_VERSION=3.7.5-2.pgdg90+1"; do
for VALS in "PGPOOL_VERSION=3.3 PGPOOL_PACKAGE_VERSION=3.3.4-1.pgdg70%2B1" \
"PGPOOL_VERSION=3.6 PGPOOL_PACKAGE_VERSION=3.6.7-1.pgdg%2B1 LIBMEMCACHED11=1" \
"PGPOOL_VERSION=3.7 PGPOOL_PACKAGE_VERSION=3.7.5-2.pgdg%2B1 LIBMEMCACHED11=1"; do
eval $VALS

for PG_CLIENT_VERSION in 9.6 10 11; do
VALS="$VALS PG_CLIENT_VERSION=$PG_CLIENT_VERSION PG_CLIENT_LATEST=1"
TEMPLATE_VALS="$VALS PG_CLIENT_VERSION=$PG_CLIENT_VERSION PG_CLIENT_LATEST=1"

FILE_FROM="./src/includes/dockerfile/Pgpool-$PGPOOL_VERSION.part.Dockerfile"
FILE_TO="./src/Pgpool-$PGPOOL_VERSION-Postgres-$PG_CLIENT_VERSION.Dockerfile"

template $FILE_FROM $FILE_TO $VALS
template $FILE_FROM $FILE_TO $TEMPLATE_VALS
done
done
unset PGPOOL_VERSION PGPOOL_PACKAGE_VERSION VALS
14 changes: 7 additions & 7 deletions make/postgres/make.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
echo ">>> Making postgres"


for VALS in "POSTGRES_VERSION=9.5 REPMGR_VERSION=3.2 REPMGR_SYNTAX_V3=1 REPMGR_PACKAGE_VERSION=3.3.2-1.pgdg80+1" \
"POSTGRES_VERSION=9.6 REPMGR_VERSION=3.2 REPMGR_SYNTAX_V3=1 REPMGR_PACKAGE_VERSION=3.3.2-1.pgdg80+1" \
"POSTGRES_VERSION=10 REPMGR_VERSION=3.2 REPMGR_SYNTAX_V3=1 REPMGR_PACKAGE_VERSION=3.3.2-1.pgdg80+1" \
"POSTGRES_VERSION=9.5 REPMGR_VERSION=4.0 REPMGR_SYNTAX_V4=1 REPMGR_PACKAGE_VERSION=4.0.6-2.pgdg80+1" \
"POSTGRES_VERSION=9.6 REPMGR_VERSION=4.0 REPMGR_SYNTAX_V4=1 REPMGR_PACKAGE_VERSION=4.0.6-2.pgdg80+1" \
"POSTGRES_VERSION=10 REPMGR_VERSION=4.0 REPMGR_SYNTAX_V4=1 REPMGR_PACKAGE_VERSION=4.0.6-2.pgdg+1" \
"POSTGRES_VERSION=11 REPMGR_VERSION=4.0 REPMGR_SYNTAX_V4=1 REPMGR_PACKAGE_VERSION=4.0.6-2.pgdg+1"; do
for VALS in "POSTGRES_VERSION=9.5 REPMGR_VERSION=3.2 REPMGR_SYNTAX_V3=1 REPMGR_PACKAGE_VERSION=3.3.2-1.pgdg80%2B1" \
"POSTGRES_VERSION=9.6 REPMGR_VERSION=3.2 REPMGR_SYNTAX_V3=1 REPMGR_PACKAGE_VERSION=3.3.2-1.pgdg80%2B1" \
"POSTGRES_VERSION=10 REPMGR_VERSION=3.2 REPMGR_SYNTAX_V3=1 REPMGR_PACKAGE_VERSION=3.3.2-1.pgdg80%2B1" \
"POSTGRES_VERSION=9.5 REPMGR_VERSION=4.0 REPMGR_SYNTAX_V4=1 REPMGR_PACKAGE_VERSION=4.0.6-2.pgdg80%2B1" \
"POSTGRES_VERSION=9.6 REPMGR_VERSION=4.0 REPMGR_SYNTAX_V4=1 REPMGR_PACKAGE_VERSION=4.0.6-2.pgdg80%2B1" \
"POSTGRES_VERSION=10 REPMGR_VERSION=4.0 REPMGR_SYNTAX_V4=1 REPMGR_PACKAGE_VERSION=4.0.6-2.pgdg%2B1" \
"POSTGRES_VERSION=11 REPMGR_VERSION=4.0 REPMGR_SYNTAX_V4=1 REPMGR_PACKAGE_VERSION=4.0.6-2.pgdg%2B1"; do
eval $VALS
FILE_FROM="./src/includes/dockerfile/Postgres-$POSTGRES_VERSION-Repmgr-$REPMGR_VERSION.part.Dockerfile"
FILE_FROM_EXT="./src/includes/dockerfile/Postgres-extended-$POSTGRES_VERSION-Repmgr-$REPMGR_VERSION.part.Dockerfile"
Expand Down
6 changes: 3 additions & 3 deletions src/includes/dockerfile/Barman-2.3-2.4.part.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ RUN chmod -R +x /usr/local/bin/dockerfile && ln -s /usr/local/bin/dockerfile/fun
RUN wget -q https://www.postgresql.org/media/keys/ACCC4CF8.asc -O - | apt-key add - && \
sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" >> /etc/apt/sources.list.d/pgdg.list' && \
apt-get update && \
apt-get install -y libffi-dev libssl-dev openssh-server
apt-get install -y libffi-dev libssl-dev openssh-server python-argcomplete python-argh python-dateutil python-psycopg2 rsync

{{ #PG_CLIENT_LATEST }}
RUN apt-get install -y postgresql-client-{{ PG_CLIENT_VERSION }}
{{ /PG_CLIENT_LATEST }}{{ ^PG_CLIENT_LATEST }}
RUN install_deb_pkg "http://atalia.postgresql.org/morgue/p/postgresql-{{ PG_CLIENT_VERSION }}/postgresql-client-{{ PG_CLIENT_VERSION }}_{{ PG_CLIENT_PACKAGE_VERSION }}_amd64.deb"
RUN install_deb_pkg "http://apt-archive.postgresql.org/pub/repos/apt/pool/main/p/postgresql-{{ PG_CLIENT_VERSION }}/postgresql-client-{{ PG_CLIENT_VERSION }}_{{ PG_CLIENT_PACKAGE_VERSION }}_amd64.deb"
{{ /PG_CLIENT_LATEST }}

{{ #BARMAN_LATEST }}
RUN apt-get install -y barman={{ BARMAN_VERSION }}\*
{{ /BARMAN_LATEST }}{{ ^BARMAN_LATEST }}
RUN install_deb_pkg "http://atalia.postgresql.org/morgue/b/barman/barman_{{ BARMAN_PACKAGE_VERSION }}_all.deb"
RUN install_deb_pkg "http://apt-archive.postgresql.org/pub/repos/apt/pool/main/b/barman/barman_{{ BARMAN_PACKAGE_VERSION }}_all.deb"
{{ /BARMAN_LATEST }}

RUN apt-get -y install cron
Expand Down
15 changes: 10 additions & 5 deletions src/includes/dockerfile/Pgpool-3.3-3.7.part.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,23 @@ RUN wget -q https://www.postgresql.org/media/keys/ACCC4CF8.asc -O - | apt-key a
apt-get update

{{ #PG_CLIENT_LATEST }}
RUN apt-get install -y postgresql-client-{{ PG_CLIENT_VERSION }}
RUN apt-get install -y postgresql-client-{{ PG_CLIENT_VERSION }} postgresql-common
{{ /PG_CLIENT_LATEST }}{{ ^PG_CLIENT_LATEST }}
RUN install_deb_pkg "http://atalia.postgresql.org/morgue/p/postgresql-{{ PG_CLIENT_VERSION }}/postgresql-client-{{ PG_CLIENT_VERSION }}_{{ PG_CLIENT_PACKAGE_VERSION }}_amd64.deb" "postgresql-client-{{ PG_CLIENT_VERSION }}"
RUN install_deb_pkg "http://apt-archive.postgresql.org/pub/repos/apt/pool/main/p/postgresql-{{ PG_CLIENT_VERSION }}/postgresql-client-{{ PG_CLIENT_VERSION }}_{{ PG_CLIENT_PACKAGE_VERSION }}_amd64.deb" "postgresql-client-{{ PG_CLIENT_VERSION }}" postgresql-common
{{ /PG_CLIENT_LATEST }}

{{ #LIBMEMCACHED11 }}
RUN apt-get install -y libmemcached11
{{ /LIBMEMCACHED11 }}{{ ^LIBMEMCACHED11 }}
RUN install_deb_pkg "http://launchpadlibrarian.net/160156688/libmemcached10_1.0.8-1ubuntu2_amd64.deb" "libmemcached10"
{{ /LIBMEMCACHED11 }}

{{ #PGPOOL_LATEST }}
RUN apt-get install -y libpgpool0={{ PGPOOL_VERSION }}\* pgpool2={{ PGPOOL_VERSION }}\*
{{ /PGPOOL_LATEST }}{{ ^PGPOOL_LATEST }}
RUN install_deb_pkg "http://launchpadlibrarian.net/160156688/libmemcached10_1.0.8-1ubuntu2_amd64.deb" "libmemcached10"
RUN install_deb_pkg "http://security-cdn.debian.org/debian-security/pool/updates/main/o/openssl/libssl1.0.0_1.0.1t-1+deb8u12_amd64.deb" "libssl1.0.0"
RUN install_deb_pkg "http://atalia.postgresql.org/morgue/p/pgpool2/libpgpool0_{{ PGPOOL_PACKAGE_VERSION }}_amd64.deb" "libpgpool0"
RUN install_deb_pkg "http://atalia.postgresql.org/morgue/p/pgpool2/pgpool2_{{ PGPOOL_PACKAGE_VERSION }}_amd64.deb" "pgpool2"
RUN install_deb_pkg "http://apt-archive.postgresql.org/pub/repos/apt/pool/main/p/pgpool2/libpgpool0_{{ PGPOOL_PACKAGE_VERSION }}_amd64.deb" "libpgpool0"
RUN install_deb_pkg "http://apt-archive.postgresql.org/pub/repos/apt/pool/main/p/pgpool2/pgpool2_{{ PGPOOL_PACKAGE_VERSION }}_amd64.deb" "pgpool2"
{{ /PGPOOL_LATEST }}

RUN wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz && \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ RUN chmod -R +x /usr/local/bin/dockerfile && ln -s /usr/local/bin/dockerfile/fun
{{ #REPMGR_LATEST }}
RUN apt-get install -y postgresql-$PG_MAJOR-repmgr={{ REPMGR_PACKAGE_VERSION }}\*
{{ /REPMGR_LATEST }}{{ ^REPMGR_LATEST }}
RUN install_deb_pkg "http://atalia.postgresql.org/morgue/r/repmgr/repmgr-common_{{ REPMGR_PACKAGE_VERSION }}_all.deb"
RUN install_deb_pkg "http://atalia.postgresql.org/morgue/r/repmgr/postgresql-$PG_MAJOR-repmgr_{{ REPMGR_PACKAGE_VERSION }}_amd64.deb"
RUN install_deb_pkg "http://apt-archive.postgresql.org/pub/repos/apt/pool/main/r/repmgr/repmgr-common_{{ REPMGR_PACKAGE_VERSION }}_all.deb"
RUN install_deb_pkg "http://apt-archive.postgresql.org/pub/repos/apt/pool/main/r/repmgr/postgresql-$PG_MAJOR-repmgr_{{ REPMGR_PACKAGE_VERSION }}_amd64.deb"
{{ /REPMGR_LATEST }}

# Inherited variables
Expand Down

0 comments on commit 8a018bb

Please sign in to comment.