From 6e27b429221131c8c21984be02a8075a206cb7d2 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Sat, 26 May 2018 13:50:49 -0700 Subject: [PATCH 1/3] Fix PostgreSQL build errors --- Dockerfile.custom | 4 +--- scripts/install-postgresql | 3 ++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Dockerfile.custom b/Dockerfile.custom index e3331a9..0e341dc 100644 --- a/Dockerfile.custom +++ b/Dockerfile.custom @@ -38,10 +38,8 @@ ARG GOLANG_DOWNLOAD_SHA256 RUN if [ -n "$INSTALL_GOLANG_VERSION" ] ; then /scripts/install-golang "${INSTALL_GOLANG_VERSION}" "${GOLANG_DOWNLOAD_SHA256}" && go version; fi # Postgres -# Codedebt: currently this will only install the default version of postgres, -# not the stipulated version ARG POSTGRES_VERSION -RUN if [ -n "$POSTGRES_VERSION" ] ; then /scripts/install-postgresql; fi +RUN if [ -n "$POSTGRES_VERSION" ] ; then /scripts/install-postgresql $POSTGRES_VERSION; fi # Ansible ARG ANSIBLE_VERSION diff --git a/scripts/install-postgresql b/scripts/install-postgresql index 826edad..939715c 100755 --- a/scripts/install-postgresql +++ b/scripts/install-postgresql @@ -2,10 +2,11 @@ set -xeuo pipefail IFS=$'\n\t' +POSTGRES_VERSION=${1:-9.6} export DEBIAN_FRONTEND=noninteractive curl -sS -L https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - -echo "deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main" | tee /etc/apt/sources.list.d/postgresql.list +echo "deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg ${POSTGRES_VERSION}" | tee /etc/apt/sources.list.d/postgresql.list apt-get update apt-get install -y postgresql-client From c11e549cab69c2a3e1b0ae7471bb714ae1049a90 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Sat, 26 May 2018 13:56:15 -0700 Subject: [PATCH 2/3] Add gnupg2 as an essential dependency for apt-key --- scripts/install-essentials | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install-essentials b/scripts/install-essentials index b7bbf0a..15ea18a 100755 --- a/scripts/install-essentials +++ b/scripts/install-essentials @@ -14,7 +14,7 @@ apt-get install -y \ libxslt-dev libcurl4-openssl-dev libicu-dev \ logrotate python-docutils pkg-config cmake nodejs \ libkrb5-dev postgresql-client mysql-client unzip \ - libre2-dev gettext \ + libre2-dev gettext gnupg2 \ apt-get clean -yqq From baeb1cc4da57cb8b17211ce254c30ed3cded7da5 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Sat, 26 May 2018 13:57:58 -0700 Subject: [PATCH 3/3] Install gnupg2 dependency only for www-gitlab-com --- scripts/install-essentials | 2 +- scripts/install-www-gitlab-com | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install-essentials b/scripts/install-essentials index 15ea18a..b7bbf0a 100755 --- a/scripts/install-essentials +++ b/scripts/install-essentials @@ -14,7 +14,7 @@ apt-get install -y \ libxslt-dev libcurl4-openssl-dev libicu-dev \ logrotate python-docutils pkg-config cmake nodejs \ libkrb5-dev postgresql-client mysql-client unzip \ - libre2-dev gettext gnupg2 \ + libre2-dev gettext \ apt-get clean -yqq diff --git a/scripts/install-www-gitlab-com b/scripts/install-www-gitlab-com index cea7788..7662d55 100755 --- a/scripts/install-www-gitlab-com +++ b/scripts/install-www-gitlab-com @@ -9,7 +9,7 @@ apt-get update apt-get install -yq --no-install-recommends \ make gcc g++ locales \ git-core pandoc texlive-latex-recommended texlive-xetex \ - texlive-fonts-recommended lmodern ed file curl + texlive-fonts-recommended lmodern ed file curl gnupg2 apt-get autoremove -yq