Skip to content

Commit 6e1d6d6

Browse files
Régis Belsontianon
Régis Belson
authored andcommitted
Add ossp-uuid so all the extensions can be built
1 parent 7f792e7 commit 6e1d6d6

File tree

5 files changed

+73
-5
lines changed

5 files changed

+73
-5
lines changed

9.2/alpine/Dockerfile

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ ENV PG_MAJOR 9.2
1717
ENV PG_VERSION 9.2.20
1818
ENV PG_SHA256 0b8abdae8400cabea5587a726003c9dd71c73c049bdae523abc35f9312dd8f26
1919

20+
ENV OSSP_UUID_VERSION 1.6.2
21+
ENV OSSP_UUID_SHA256 11a615225baa5f8bb686824423f50e4427acd3f70d394765bdff32801f0fd5b0
22+
2023
RUN set -ex \
2124
\
2225
&& apk add --no-cache --virtual .fetch-deps \
@@ -54,6 +57,22 @@ RUN set -ex \
5457
util-linux-dev \
5558
zlib-dev \
5659
\
60+
&& wget -O uuid.tar.gz "http://www.mirrorservice.org/sites/ftp.ossp.org/pkg/lib/uuid/uuid-$OSSP_UUID_VERSION.tar.gz" \
61+
&& echo "$OSSP_UUID_SHA256 *uuid.tar.gz" | sha256sum -c - \
62+
&& mkdir -p /usr/src/ossp-uuid \
63+
&& tar \
64+
--extract \
65+
--file uuid.tar.gz \
66+
--directory /usr/src/ossp-uuid \
67+
--strip-components 1 \
68+
&& rm uuid.tar.gz \
69+
&& cd /usr/src/ossp-uuid \
70+
&& ./configure \
71+
--prefix=/usr \
72+
&& make -j "$(getconf _NPROCESSORS_ONLN)"\
73+
&& make install \
74+
&& cd / \
75+
&& rm -rf /usr/src/ossp-uuid \
5776
&& cd /usr/src/postgresql \
5877
# update "DEFAULT_PGSOCKET_DIR" to "/var/run/postgresql" (matching Debian)
5978
# 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 \
6786
# --enable-nls \
6887
--enable-integer-datetimes \
6988
--enable-thread-safety \
70-
--enable-tap-tests \
7189
# skip debugging info -- we want tiny size instead
7290
# --enable-debug \
7391
--disable-rpath \
74-
--with-uuid=e2fs \
92+
--with-ossp-uuid \
7593
--with-gnu-ld \
7694
--with-pgport=5432 \
7795
--with-system-tzdata=/usr/share/zoneinfo \

9.3/alpine/Dockerfile

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ ENV PG_MAJOR 9.3
1717
ENV PG_VERSION 9.3.16
1818
ENV PG_SHA256 845f5e4ac8cf026b6a77c5a180a2fe869f51e9d06acf8d0365b05505a2c66873
1919

20+
ENV OSSP_UUID_VERSION 1.6.2
21+
ENV OSSP_UUID_SHA256 11a615225baa5f8bb686824423f50e4427acd3f70d394765bdff32801f0fd5b0
22+
2023
RUN set -ex \
2124
\
2225
&& apk add --no-cache --virtual .fetch-deps \
@@ -54,6 +57,22 @@ RUN set -ex \
5457
util-linux-dev \
5558
zlib-dev \
5659
\
60+
&& wget -O uuid.tar.gz "http://www.mirrorservice.org/sites/ftp.ossp.org/pkg/lib/uuid/uuid-$OSSP_UUID_VERSION.tar.gz" \
61+
&& echo "$OSSP_UUID_SHA256 *uuid.tar.gz" | sha256sum -c - \
62+
&& mkdir -p /usr/src/ossp-uuid \
63+
&& tar \
64+
--extract \
65+
--file uuid.tar.gz \
66+
--directory /usr/src/ossp-uuid \
67+
--strip-components 1 \
68+
&& rm uuid.tar.gz \
69+
&& cd /usr/src/ossp-uuid \
70+
&& ./configure \
71+
--prefix=/usr \
72+
&& make -j "$(getconf _NPROCESSORS_ONLN)"\
73+
&& make install \
74+
&& cd / \
75+
&& rm -rf /usr/src/ossp-uuid \
5776
&& cd /usr/src/postgresql \
5877
# update "DEFAULT_PGSOCKET_DIR" to "/var/run/postgresql" (matching Debian)
5978
# 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 \
6786
# --enable-nls \
6887
--enable-integer-datetimes \
6988
--enable-thread-safety \
70-
--enable-tap-tests \
7189
# skip debugging info -- we want tiny size instead
7290
# --enable-debug \
7391
--disable-rpath \
74-
--with-uuid=e2fs \
92+
--with-ossp-uuid \
7593
--with-gnu-ld \
7694
--with-pgport=5432 \
7795
--with-system-tzdata=/usr/share/zoneinfo \

Dockerfile-alpine.template

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ ENV PG_MAJOR %%PG_MAJOR%%
1717
ENV PG_VERSION %%PG_VERSION%%
1818
ENV PG_SHA256 %%PG_SHA256%%
1919

20+
%%OSSP_UUID_ENV_VARS%%
2021
RUN set -ex \
2122
\
2223
&& apk add --no-cache --virtual .fetch-deps \
@@ -54,6 +55,7 @@ RUN set -ex \
5455
util-linux-dev \
5556
zlib-dev \
5657
\
58+
%%INSTALL_OSSP_UUID%%
5759
&& cd /usr/src/postgresql \
5860
# update "DEFAULT_PGSOCKET_DIR" to "/var/run/postgresql" (matching Debian)
5961
# 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 \
7173
# skip debugging info -- we want tiny size instead
7274
# --enable-debug \
7375
--disable-rpath \
74-
--with-uuid=e2fs \
76+
%%UUID_CONFIG_FLAG%% \
7577
--with-gnu-ld \
7678
--with-pgport=5432 \
7779
--with-system-tzdata=/usr/share/zoneinfo \

ossp-uuid.template

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
&& wget -O uuid.tar.gz "http://www.mirrorservice.org/sites/ftp.ossp.org/pkg/lib/uuid/uuid-$OSSP_UUID_VERSION.tar.gz" \
2+
&& echo "$OSSP_UUID_SHA256 *uuid.tar.gz" | sha256sum -c - \
3+
&& mkdir -p /usr/src/ossp-uuid \
4+
&& tar \
5+
--extract \
6+
--file uuid.tar.gz \
7+
--directory /usr/src/ossp-uuid \
8+
--strip-components 1 \
9+
&& rm uuid.tar.gz \
10+
&& cd /usr/src/ossp-uuid \
11+
&& ./configure \
12+
--prefix=/usr \
13+
&& make -j "$(getconf _NPROCESSORS_ONLN)"\
14+
&& make install \
15+
&& cd / \
16+
&& rm -rf /usr/src/ossp-uuid \

update.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ versions=( "${versions[@]%/}" )
1212
packagesBase='http://apt.postgresql.org/pub/repos/apt/dists/jessie-pgdg'
1313
mainList="$(curl -fsSL "$packagesBase/main/binary-amd64/Packages.bz2" | bunzip2)"
1414

15+
uuidConfigFlag="--with-uuid=e2fs"
16+
osspUuidVersion='1.6.2'
17+
osspUuidHash='11a615225baa5f8bb686824423f50e4427acd3f70d394765bdff32801f0fd5b0'
18+
1519
travisEnv=
1620
for version in "${versions[@]}"; do
1721
versionList="$(echo "$mainList"; curl -fsSL "$packagesBase/$version/binary-amd64/Packages.bz2" | bunzip2)"
@@ -34,6 +38,16 @@ for version in "${versions[@]}"; do
3438
cp docker-entrypoint.sh "$version/$variant/"
3539
sed -i 's/gosu/su-exec/g' "$version/$variant/docker-entrypoint.sh"
3640
sed 's/%%PG_MAJOR%%/'"$version"'/g; s/%%PG_VERSION%%/'"$srcVersion"'/g; s/%%PG_SHA256%%/'"$srcSha256"'/g' Dockerfile-$variant.template > "$version/$variant/Dockerfile"
41+
if [[ $version =~ ^9.[23]$ ]]; then
42+
uuidConfigFlag='--with-ossp-uuid'
43+
sed -i 's/%%OSSP_UUID_ENV_VARS%%/ENV OSSP_UUID_VERSION '"$osspUuidVersion"'\nENV OSSP_UUID_SHA256 '"$osspUuidHash"'\n/' "$version/$variant/Dockerfile"
44+
sed -i $'/%%INSTALL_OSSP_UUID%%/ {r ossp-uuid.template\n d}' "$version/$variant/Dockerfile"
45+
sed -i '/--enable-tap-tests/d' "$version/$variant/Dockerfile"
46+
fi
47+
sed -i '/%%OSSP_UUID_ENV_VARS%%/d' "$version/$variant/Dockerfile"
48+
sed -i '/%%INSTALL_OSSP_UUID%%/d' "$version/$variant/Dockerfile"
49+
sed -i 's/%%UUID_CONFIG_FLAG%%/'"$uuidConfigFlag"'/' "$version/$variant/Dockerfile"
50+
3751
)
3852
travisEnv="\n - VERSION=$version VARIANT=$variant$travisEnv"
3953
done

0 commit comments

Comments
 (0)