Skip to content

Commit 76858f0

Browse files
authored
Merge pull request docker-library#284 from infosiftr/multiarch
Add explicit "--build" to our "./configure" invocations
2 parents 5fddf91 + 975f6a2 commit 76858f0

18 files changed

+62
-11
lines changed

9.2/alpine/Dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ RUN set -ex \
4848
&& apk add --no-cache --virtual .build-deps \
4949
bison \
5050
coreutils \
51+
dpkg-dev dpkg \
5152
flex \
5253
gcc \
5354
# krb5-dev \
@@ -79,7 +80,12 @@ RUN set -ex \
7980
&& rm uuid.tar.gz \
8081
&& ( \
8182
cd /usr/src/ossp-uuid \
83+
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
84+
# explicitly update autoconf config.guess and config.sub so they support more arches/libcs
85+
&& wget -O config.guess "http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD" \
86+
&& wget -O config.sub "http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD" \
8287
&& ./configure \
88+
--build="$gnuArch" \
8389
--prefix=/usr/local \
8490
&& make -j "$(nproc)" \
8591
&& make install \
@@ -92,9 +98,14 @@ RUN set -ex \
9298
&& awk '$1 == "#define" && $2 == "DEFAULT_PGSOCKET_DIR" && $3 == "\"/tmp\"" { $3 = "\"/var/run/postgresql\""; print; next } { print }' src/include/pg_config_manual.h > src/include/pg_config_manual.h.new \
9399
&& grep '/var/run/postgresql' src/include/pg_config_manual.h.new \
94100
&& mv src/include/pg_config_manual.h.new src/include/pg_config_manual.h \
101+
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
102+
# explicitly update autoconf config.guess and config.sub so they support more arches/libcs
103+
&& wget -O config/config.guess "http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD" \
104+
&& wget -O config/config.sub "http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD" \
95105
# configure options taken from:
96106
# https://anonscm.debian.org/cgit/pkg-postgresql/postgresql.git/tree/debian/rules?h=9.5
97107
&& ./configure \
108+
--build="$gnuArch" \
98109
# "/usr/src/postgresql/src/backend/access/common/tupconvert.c:105: undefined reference to `libintl_gettext'"
99110
# --enable-nls \
100111
--enable-integer-datetimes \

9.2/alpine/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ if [ "$1" = 'postgres' ]; then
9191
echo "host all all all $authMethod"
9292
} >> "$PGDATA/pg_hba.conf"
9393

94-
# internal start of server in order to allow set-up using psql-client
94+
# internal start of server in order to allow set-up using psql-client
9595
# does not listen on external TCP/IP and waits until start finishes
9696
PGUSER="${PGUSER:-postgres}" \
9797
pg_ctl -D "$PGDATA" \

9.2/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ if [ "$1" = 'postgres' ]; then
9191
echo "host all all all $authMethod"
9292
} >> "$PGDATA/pg_hba.conf"
9393

94-
# internal start of server in order to allow set-up using psql-client
94+
# internal start of server in order to allow set-up using psql-client
9595
# does not listen on external TCP/IP and waits until start finishes
9696
PGUSER="${PGUSER:-postgres}" \
9797
pg_ctl -D "$PGDATA" \

9.3/alpine/Dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ RUN set -ex \
4848
&& apk add --no-cache --virtual .build-deps \
4949
bison \
5050
coreutils \
51+
dpkg-dev dpkg \
5152
flex \
5253
gcc \
5354
# krb5-dev \
@@ -79,7 +80,12 @@ RUN set -ex \
7980
&& rm uuid.tar.gz \
8081
&& ( \
8182
cd /usr/src/ossp-uuid \
83+
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
84+
# explicitly update autoconf config.guess and config.sub so they support more arches/libcs
85+
&& wget -O config.guess "http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD" \
86+
&& wget -O config.sub "http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD" \
8287
&& ./configure \
88+
--build="$gnuArch" \
8389
--prefix=/usr/local \
8490
&& make -j "$(nproc)" \
8591
&& make install \
@@ -92,9 +98,14 @@ RUN set -ex \
9298
&& awk '$1 == "#define" && $2 == "DEFAULT_PGSOCKET_DIR" && $3 == "\"/tmp\"" { $3 = "\"/var/run/postgresql\""; print; next } { print }' src/include/pg_config_manual.h > src/include/pg_config_manual.h.new \
9399
&& grep '/var/run/postgresql' src/include/pg_config_manual.h.new \
94100
&& mv src/include/pg_config_manual.h.new src/include/pg_config_manual.h \
101+
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
102+
# explicitly update autoconf config.guess and config.sub so they support more arches/libcs
103+
&& wget -O config/config.guess "http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD" \
104+
&& wget -O config/config.sub "http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD" \
95105
# configure options taken from:
96106
# https://anonscm.debian.org/cgit/pkg-postgresql/postgresql.git/tree/debian/rules?h=9.5
97107
&& ./configure \
108+
--build="$gnuArch" \
98109
# "/usr/src/postgresql/src/backend/access/common/tupconvert.c:105: undefined reference to `libintl_gettext'"
99110
# --enable-nls \
100111
--enable-integer-datetimes \

9.3/alpine/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ if [ "$1" = 'postgres' ]; then
9191
echo "host all all all $authMethod"
9292
} >> "$PGDATA/pg_hba.conf"
9393

94-
# internal start of server in order to allow set-up using psql-client
94+
# internal start of server in order to allow set-up using psql-client
9595
# does not listen on external TCP/IP and waits until start finishes
9696
PGUSER="${PGUSER:-postgres}" \
9797
pg_ctl -D "$PGDATA" \

9.3/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ if [ "$1" = 'postgres' ]; then
9191
echo "host all all all $authMethod"
9292
} >> "$PGDATA/pg_hba.conf"
9393

94-
# internal start of server in order to allow set-up using psql-client
94+
# internal start of server in order to allow set-up using psql-client
9595
# does not listen on external TCP/IP and waits until start finishes
9696
PGUSER="${PGUSER:-postgres}" \
9797
pg_ctl -D "$PGDATA" \

9.4/alpine/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ RUN set -ex \
4545
&& apk add --no-cache --virtual .build-deps \
4646
bison \
4747
coreutils \
48+
dpkg-dev dpkg \
4849
flex \
4950
gcc \
5051
# krb5-dev \
@@ -69,9 +70,14 @@ RUN set -ex \
6970
&& awk '$1 == "#define" && $2 == "DEFAULT_PGSOCKET_DIR" && $3 == "\"/tmp\"" { $3 = "\"/var/run/postgresql\""; print; next } { print }' src/include/pg_config_manual.h > src/include/pg_config_manual.h.new \
7071
&& grep '/var/run/postgresql' src/include/pg_config_manual.h.new \
7172
&& mv src/include/pg_config_manual.h.new src/include/pg_config_manual.h \
73+
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
74+
# explicitly update autoconf config.guess and config.sub so they support more arches/libcs
75+
&& wget -O config/config.guess "http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD" \
76+
&& wget -O config/config.sub "http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD" \
7277
# configure options taken from:
7378
# https://anonscm.debian.org/cgit/pkg-postgresql/postgresql.git/tree/debian/rules?h=9.5
7479
&& ./configure \
80+
--build="$gnuArch" \
7581
# "/usr/src/postgresql/src/backend/access/common/tupconvert.c:105: undefined reference to `libintl_gettext'"
7682
# --enable-nls \
7783
--enable-integer-datetimes \

9.4/alpine/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ if [ "$1" = 'postgres' ]; then
9191
echo "host all all all $authMethod"
9292
} >> "$PGDATA/pg_hba.conf"
9393

94-
# internal start of server in order to allow set-up using psql-client
94+
# internal start of server in order to allow set-up using psql-client
9595
# does not listen on external TCP/IP and waits until start finishes
9696
PGUSER="${PGUSER:-postgres}" \
9797
pg_ctl -D "$PGDATA" \

9.4/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ if [ "$1" = 'postgres' ]; then
9191
echo "host all all all $authMethod"
9292
} >> "$PGDATA/pg_hba.conf"
9393

94-
# internal start of server in order to allow set-up using psql-client
94+
# internal start of server in order to allow set-up using psql-client
9595
# does not listen on external TCP/IP and waits until start finishes
9696
PGUSER="${PGUSER:-postgres}" \
9797
pg_ctl -D "$PGDATA" \

9.5/alpine/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ RUN set -ex \
4545
&& apk add --no-cache --virtual .build-deps \
4646
bison \
4747
coreutils \
48+
dpkg-dev dpkg \
4849
flex \
4950
gcc \
5051
# krb5-dev \
@@ -69,9 +70,14 @@ RUN set -ex \
6970
&& awk '$1 == "#define" && $2 == "DEFAULT_PGSOCKET_DIR" && $3 == "\"/tmp\"" { $3 = "\"/var/run/postgresql\""; print; next } { print }' src/include/pg_config_manual.h > src/include/pg_config_manual.h.new \
7071
&& grep '/var/run/postgresql' src/include/pg_config_manual.h.new \
7172
&& mv src/include/pg_config_manual.h.new src/include/pg_config_manual.h \
73+
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
74+
# explicitly update autoconf config.guess and config.sub so they support more arches/libcs
75+
&& wget -O config/config.guess "http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD" \
76+
&& wget -O config/config.sub "http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD" \
7277
# configure options taken from:
7378
# https://anonscm.debian.org/cgit/pkg-postgresql/postgresql.git/tree/debian/rules?h=9.5
7479
&& ./configure \
80+
--build="$gnuArch" \
7581
# "/usr/src/postgresql/src/backend/access/common/tupconvert.c:105: undefined reference to `libintl_gettext'"
7682
# --enable-nls \
7783
--enable-integer-datetimes \

9.5/alpine/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ if [ "$1" = 'postgres' ]; then
9191
echo "host all all all $authMethod"
9292
} >> "$PGDATA/pg_hba.conf"
9393

94-
# internal start of server in order to allow set-up using psql-client
94+
# internal start of server in order to allow set-up using psql-client
9595
# does not listen on external TCP/IP and waits until start finishes
9696
PGUSER="${PGUSER:-postgres}" \
9797
pg_ctl -D "$PGDATA" \

9.5/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ if [ "$1" = 'postgres' ]; then
9191
echo "host all all all $authMethod"
9292
} >> "$PGDATA/pg_hba.conf"
9393

94-
# internal start of server in order to allow set-up using psql-client
94+
# internal start of server in order to allow set-up using psql-client
9595
# does not listen on external TCP/IP and waits until start finishes
9696
PGUSER="${PGUSER:-postgres}" \
9797
pg_ctl -D "$PGDATA" \

9.6/alpine/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ RUN set -ex \
4545
&& apk add --no-cache --virtual .build-deps \
4646
bison \
4747
coreutils \
48+
dpkg-dev dpkg \
4849
flex \
4950
gcc \
5051
# krb5-dev \
@@ -69,9 +70,14 @@ RUN set -ex \
6970
&& awk '$1 == "#define" && $2 == "DEFAULT_PGSOCKET_DIR" && $3 == "\"/tmp\"" { $3 = "\"/var/run/postgresql\""; print; next } { print }' src/include/pg_config_manual.h > src/include/pg_config_manual.h.new \
7071
&& grep '/var/run/postgresql' src/include/pg_config_manual.h.new \
7172
&& mv src/include/pg_config_manual.h.new src/include/pg_config_manual.h \
73+
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
74+
# explicitly update autoconf config.guess and config.sub so they support more arches/libcs
75+
&& wget -O config/config.guess "http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD" \
76+
&& wget -O config/config.sub "http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD" \
7277
# configure options taken from:
7378
# https://anonscm.debian.org/cgit/pkg-postgresql/postgresql.git/tree/debian/rules?h=9.5
7479
&& ./configure \
80+
--build="$gnuArch" \
7581
# "/usr/src/postgresql/src/backend/access/common/tupconvert.c:105: undefined reference to `libintl_gettext'"
7682
# --enable-nls \
7783
--enable-integer-datetimes \

9.6/alpine/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ if [ "$1" = 'postgres' ]; then
9191
echo "host all all all $authMethod"
9292
} >> "$PGDATA/pg_hba.conf"
9393

94-
# internal start of server in order to allow set-up using psql-client
94+
# internal start of server in order to allow set-up using psql-client
9595
# does not listen on external TCP/IP and waits until start finishes
9696
PGUSER="${PGUSER:-postgres}" \
9797
pg_ctl -D "$PGDATA" \

9.6/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ if [ "$1" = 'postgres' ]; then
9191
echo "host all all all $authMethod"
9292
} >> "$PGDATA/pg_hba.conf"
9393

94-
# internal start of server in order to allow set-up using psql-client
94+
# internal start of server in order to allow set-up using psql-client
9595
# does not listen on external TCP/IP and waits until start finishes
9696
PGUSER="${PGUSER:-postgres}" \
9797
pg_ctl -D "$PGDATA" \

Dockerfile-alpine.template

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ RUN set -ex \
4646
&& apk add --no-cache --virtual .build-deps \
4747
bison \
4848
coreutils \
49+
dpkg-dev dpkg \
4950
flex \
5051
gcc \
5152
# krb5-dev \
@@ -71,9 +72,14 @@ RUN set -ex \
7172
&& awk '$1 == "#define" && $2 == "DEFAULT_PGSOCKET_DIR" && $3 == "\"/tmp\"" { $3 = "\"/var/run/postgresql\""; print; next } { print }' src/include/pg_config_manual.h > src/include/pg_config_manual.h.new \
7273
&& grep '/var/run/postgresql' src/include/pg_config_manual.h.new \
7374
&& mv src/include/pg_config_manual.h.new src/include/pg_config_manual.h \
75+
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
76+
# explicitly update autoconf config.guess and config.sub so they support more arches/libcs
77+
&& wget -O config/config.guess "http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD" \
78+
&& wget -O config/config.sub "http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD" \
7479
# configure options taken from:
7580
# https://anonscm.debian.org/cgit/pkg-postgresql/postgresql.git/tree/debian/rules?h=9.5
7681
&& ./configure \
82+
--build="$gnuArch" \
7783
# "/usr/src/postgresql/src/backend/access/common/tupconvert.c:105: undefined reference to `libintl_gettext'"
7884
# --enable-nls \
7985
--enable-integer-datetimes \

docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ if [ "$1" = 'postgres' ]; then
9191
echo "host all all all $authMethod"
9292
} >> "$PGDATA/pg_hba.conf"
9393

94-
# internal start of server in order to allow set-up using psql-client
94+
# internal start of server in order to allow set-up using psql-client
9595
# does not listen on external TCP/IP and waits until start finishes
9696
PGUSER="${PGUSER:-postgres}" \
9797
pg_ctl -D "$PGDATA" \

ossp-uuid.template

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,12 @@
1111
&& rm uuid.tar.gz \
1212
&& ( \
1313
cd /usr/src/ossp-uuid \
14+
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
15+
# explicitly update autoconf config.guess and config.sub so they support more arches/libcs
16+
&& wget -O config.guess "http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD" \
17+
&& wget -O config.sub "http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD" \
1418
&& ./configure \
19+
--build="$gnuArch" \
1520
--prefix=/usr/local \
1621
&& make -j "$(nproc)" \
1722
&& make install \

0 commit comments

Comments
 (0)