You've already forked postgres
mirror of
https://github.com/docker-library/postgres.git
synced 2025-07-28 10:42:06 +03:00
Add ossp-uuid so all the extensions can be built
This commit is contained in:
committed by
Tianon Gravi
parent
7f792e7e4d
commit
6e1d6d6825
@ -17,6 +17,9 @@ ENV PG_MAJOR 9.2
|
||||
ENV PG_VERSION 9.2.20
|
||||
ENV PG_SHA256 0b8abdae8400cabea5587a726003c9dd71c73c049bdae523abc35f9312dd8f26
|
||||
|
||||
ENV OSSP_UUID_VERSION 1.6.2
|
||||
ENV OSSP_UUID_SHA256 11a615225baa5f8bb686824423f50e4427acd3f70d394765bdff32801f0fd5b0
|
||||
|
||||
RUN set -ex \
|
||||
\
|
||||
&& apk add --no-cache --virtual .fetch-deps \
|
||||
@ -54,6 +57,22 @@ RUN set -ex \
|
||||
util-linux-dev \
|
||||
zlib-dev \
|
||||
\
|
||||
&& wget -O uuid.tar.gz "http://www.mirrorservice.org/sites/ftp.ossp.org/pkg/lib/uuid/uuid-$OSSP_UUID_VERSION.tar.gz" \
|
||||
&& echo "$OSSP_UUID_SHA256 *uuid.tar.gz" | sha256sum -c - \
|
||||
&& mkdir -p /usr/src/ossp-uuid \
|
||||
&& tar \
|
||||
--extract \
|
||||
--file uuid.tar.gz \
|
||||
--directory /usr/src/ossp-uuid \
|
||||
--strip-components 1 \
|
||||
&& rm uuid.tar.gz \
|
||||
&& cd /usr/src/ossp-uuid \
|
||||
&& ./configure \
|
||||
--prefix=/usr \
|
||||
&& make -j "$(getconf _NPROCESSORS_ONLN)"\
|
||||
&& make install \
|
||||
&& cd / \
|
||||
&& rm -rf /usr/src/ossp-uuid \
|
||||
&& cd /usr/src/postgresql \
|
||||
# update "DEFAULT_PGSOCKET_DIR" to "/var/run/postgresql" (matching Debian)
|
||||
# see https://anonscm.debian.org/git/pkg-postgresql/postgresql.git/tree/debian/patches/51-default-sockets-in-var.patch?id=8b539fcb3e093a521c095e70bdfa76887217b89f
|
||||
@ -67,11 +86,10 @@ RUN set -ex \
|
||||
# --enable-nls \
|
||||
--enable-integer-datetimes \
|
||||
--enable-thread-safety \
|
||||
--enable-tap-tests \
|
||||
# skip debugging info -- we want tiny size instead
|
||||
# --enable-debug \
|
||||
--disable-rpath \
|
||||
--with-uuid=e2fs \
|
||||
--with-ossp-uuid \
|
||||
--with-gnu-ld \
|
||||
--with-pgport=5432 \
|
||||
--with-system-tzdata=/usr/share/zoneinfo \
|
||||
|
@ -17,6 +17,9 @@ ENV PG_MAJOR 9.3
|
||||
ENV PG_VERSION 9.3.16
|
||||
ENV PG_SHA256 845f5e4ac8cf026b6a77c5a180a2fe869f51e9d06acf8d0365b05505a2c66873
|
||||
|
||||
ENV OSSP_UUID_VERSION 1.6.2
|
||||
ENV OSSP_UUID_SHA256 11a615225baa5f8bb686824423f50e4427acd3f70d394765bdff32801f0fd5b0
|
||||
|
||||
RUN set -ex \
|
||||
\
|
||||
&& apk add --no-cache --virtual .fetch-deps \
|
||||
@ -54,6 +57,22 @@ RUN set -ex \
|
||||
util-linux-dev \
|
||||
zlib-dev \
|
||||
\
|
||||
&& wget -O uuid.tar.gz "http://www.mirrorservice.org/sites/ftp.ossp.org/pkg/lib/uuid/uuid-$OSSP_UUID_VERSION.tar.gz" \
|
||||
&& echo "$OSSP_UUID_SHA256 *uuid.tar.gz" | sha256sum -c - \
|
||||
&& mkdir -p /usr/src/ossp-uuid \
|
||||
&& tar \
|
||||
--extract \
|
||||
--file uuid.tar.gz \
|
||||
--directory /usr/src/ossp-uuid \
|
||||
--strip-components 1 \
|
||||
&& rm uuid.tar.gz \
|
||||
&& cd /usr/src/ossp-uuid \
|
||||
&& ./configure \
|
||||
--prefix=/usr \
|
||||
&& make -j "$(getconf _NPROCESSORS_ONLN)"\
|
||||
&& make install \
|
||||
&& cd / \
|
||||
&& rm -rf /usr/src/ossp-uuid \
|
||||
&& cd /usr/src/postgresql \
|
||||
# update "DEFAULT_PGSOCKET_DIR" to "/var/run/postgresql" (matching Debian)
|
||||
# see https://anonscm.debian.org/git/pkg-postgresql/postgresql.git/tree/debian/patches/51-default-sockets-in-var.patch?id=8b539fcb3e093a521c095e70bdfa76887217b89f
|
||||
@ -67,11 +86,10 @@ RUN set -ex \
|
||||
# --enable-nls \
|
||||
--enable-integer-datetimes \
|
||||
--enable-thread-safety \
|
||||
--enable-tap-tests \
|
||||
# skip debugging info -- we want tiny size instead
|
||||
# --enable-debug \
|
||||
--disable-rpath \
|
||||
--with-uuid=e2fs \
|
||||
--with-ossp-uuid \
|
||||
--with-gnu-ld \
|
||||
--with-pgport=5432 \
|
||||
--with-system-tzdata=/usr/share/zoneinfo \
|
||||
|
@ -17,6 +17,7 @@ ENV PG_MAJOR %%PG_MAJOR%%
|
||||
ENV PG_VERSION %%PG_VERSION%%
|
||||
ENV PG_SHA256 %%PG_SHA256%%
|
||||
|
||||
%%OSSP_UUID_ENV_VARS%%
|
||||
RUN set -ex \
|
||||
\
|
||||
&& apk add --no-cache --virtual .fetch-deps \
|
||||
@ -54,6 +55,7 @@ RUN set -ex \
|
||||
util-linux-dev \
|
||||
zlib-dev \
|
||||
\
|
||||
%%INSTALL_OSSP_UUID%%
|
||||
&& cd /usr/src/postgresql \
|
||||
# update "DEFAULT_PGSOCKET_DIR" to "/var/run/postgresql" (matching Debian)
|
||||
# see https://anonscm.debian.org/git/pkg-postgresql/postgresql.git/tree/debian/patches/51-default-sockets-in-var.patch?id=8b539fcb3e093a521c095e70bdfa76887217b89f
|
||||
@ -71,7 +73,7 @@ RUN set -ex \
|
||||
# skip debugging info -- we want tiny size instead
|
||||
# --enable-debug \
|
||||
--disable-rpath \
|
||||
--with-uuid=e2fs \
|
||||
%%UUID_CONFIG_FLAG%% \
|
||||
--with-gnu-ld \
|
||||
--with-pgport=5432 \
|
||||
--with-system-tzdata=/usr/share/zoneinfo \
|
||||
|
16
ossp-uuid.template
Normal file
16
ossp-uuid.template
Normal file
@ -0,0 +1,16 @@
|
||||
&& wget -O uuid.tar.gz "http://www.mirrorservice.org/sites/ftp.ossp.org/pkg/lib/uuid/uuid-$OSSP_UUID_VERSION.tar.gz" \
|
||||
&& echo "$OSSP_UUID_SHA256 *uuid.tar.gz" | sha256sum -c - \
|
||||
&& mkdir -p /usr/src/ossp-uuid \
|
||||
&& tar \
|
||||
--extract \
|
||||
--file uuid.tar.gz \
|
||||
--directory /usr/src/ossp-uuid \
|
||||
--strip-components 1 \
|
||||
&& rm uuid.tar.gz \
|
||||
&& cd /usr/src/ossp-uuid \
|
||||
&& ./configure \
|
||||
--prefix=/usr \
|
||||
&& make -j "$(getconf _NPROCESSORS_ONLN)"\
|
||||
&& make install \
|
||||
&& cd / \
|
||||
&& rm -rf /usr/src/ossp-uuid \
|
14
update.sh
14
update.sh
@ -12,6 +12,10 @@ versions=( "${versions[@]%/}" )
|
||||
packagesBase='http://apt.postgresql.org/pub/repos/apt/dists/jessie-pgdg'
|
||||
mainList="$(curl -fsSL "$packagesBase/main/binary-amd64/Packages.bz2" | bunzip2)"
|
||||
|
||||
uuidConfigFlag="--with-uuid=e2fs"
|
||||
osspUuidVersion='1.6.2'
|
||||
osspUuidHash='11a615225baa5f8bb686824423f50e4427acd3f70d394765bdff32801f0fd5b0'
|
||||
|
||||
travisEnv=
|
||||
for version in "${versions[@]}"; do
|
||||
versionList="$(echo "$mainList"; curl -fsSL "$packagesBase/$version/binary-amd64/Packages.bz2" | bunzip2)"
|
||||
@ -34,6 +38,16 @@ for version in "${versions[@]}"; do
|
||||
cp docker-entrypoint.sh "$version/$variant/"
|
||||
sed -i 's/gosu/su-exec/g' "$version/$variant/docker-entrypoint.sh"
|
||||
sed 's/%%PG_MAJOR%%/'"$version"'/g; s/%%PG_VERSION%%/'"$srcVersion"'/g; s/%%PG_SHA256%%/'"$srcSha256"'/g' Dockerfile-$variant.template > "$version/$variant/Dockerfile"
|
||||
if [[ $version =~ ^9.[23]$ ]]; then
|
||||
uuidConfigFlag='--with-ossp-uuid'
|
||||
sed -i 's/%%OSSP_UUID_ENV_VARS%%/ENV OSSP_UUID_VERSION '"$osspUuidVersion"'\nENV OSSP_UUID_SHA256 '"$osspUuidHash"'\n/' "$version/$variant/Dockerfile"
|
||||
sed -i $'/%%INSTALL_OSSP_UUID%%/ {r ossp-uuid.template\n d}' "$version/$variant/Dockerfile"
|
||||
sed -i '/--enable-tap-tests/d' "$version/$variant/Dockerfile"
|
||||
fi
|
||||
sed -i '/%%OSSP_UUID_ENV_VARS%%/d' "$version/$variant/Dockerfile"
|
||||
sed -i '/%%INSTALL_OSSP_UUID%%/d' "$version/$variant/Dockerfile"
|
||||
sed -i 's/%%UUID_CONFIG_FLAG%%/'"$uuidConfigFlag"'/' "$version/$variant/Dockerfile"
|
||||
|
||||
)
|
||||
travisEnv="\n - VERSION=$version VARIANT=$variant$travisEnv"
|
||||
done
|
||||
|
Reference in New Issue
Block a user