Skip to content

Commit 53a8b99

Browse files
authored
Add option for configure locales (#33)
1 parent 2663f79 commit 53a8b99

3 files changed

Lines changed: 15 additions & 11 deletions

File tree

build_automation/gpdb/scripts/configure-gpdb.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,11 @@ if [ "${ENABLE_PROFILING:-false}" = "true" ]; then
130130
CONFIGURE_PROFILING_OPTS="--enable-profiling"
131131
fi
132132

133+
CONFIGURE_MDBLOCALES_OPTS="--without-mdblocales"
134+
if [ "${ENABLE_MDBLOCALES:-false}" = "true" ]; then
135+
CONFIGURE_MDBLOCALES_OPTS=""
136+
fi
137+
133138
# Configure build
134139
log_section "Configure"
135140
execute_cmd ./configure --with-perl --with-python --with-libxml --enable-mapreduce --with-gssapi \
@@ -147,7 +152,7 @@ execute_cmd ./configure --with-perl --with-python --with-libxml --enable-mapredu
147152
--enable-ic-proxy \
148153
--with-system-tzdata=/usr/share/zoneinfo \
149154
--enable-orafce \
150-
--without-mdblocales \
155+
${CONFIGURE_MDBLOCALES_OPTS} \
151156
--with-zstd ${CONFIGURE_EXTRA_OPTS:-""}
152157

153158
log_section_end "Configure"

images/docker/gpdb/build/jammy/Dockerfile

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ ENV YEZZEY_REF=${yezzeyRef:-v1.8_opengpdb}
1414
# Argument for configuring the timezone
1515
ARG TIMEZONE_VAR="Europe/London"
1616

17-
1817
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
1918
ENV DEBIAN_FRONTEND=noninteractive
2019

@@ -96,7 +95,6 @@ RUN apt-get update -o Acquire::AllowInsecureRepositories=true && apt-get install
9695
locales \
9796
postgresql-client
9897

99-
10098
RUN pip2 install psutil pyyaml
10199

102100
RUN apt-get install -y locales \
@@ -126,16 +124,15 @@ RUN echo ${TIMEZONE_VAR} > /etc/timezone && \
126124
chmod 777 /tmp/init_system.sh && \
127125
groupadd gpadmin && \
128126
useradd -rm -d /home/gpadmin -s /bin/bash -g root -G sudo -u 1001 gpadmin && \
129-
echo 'gpadmin ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers && \
127+
echo 'gpadmin ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/90-gpadmin && \
128+
chmod 0440 /etc/sudoers.d/90-gpadmin && \
130129
locale-gen "en_US.UTF-8" && \
131130
update-locale LC_ALL="en_US.UTF-8"
132131

133-
USER gpadmin
134-
ENV USER=gpadmin
135-
WORKDIR /home/gpadmin
136-
137132
RUN sudo DEBIAN_FRONTEND=noninteractive apt install -y libhyperic-sigar-java libaprutil1-dev libuv1-dev
138133

134+
RUN chmod +x /tmp/init_system.sh
135+
139136
# --------------------------------------------------------------------
140137
# Set the Default User and Command
141138
# --------------------------------------------------------------------
@@ -145,5 +142,7 @@ RUN sudo DEBIAN_FRONTEND=noninteractive apt install -y libhyperic-sigar-java lib
145142
# for testing and functional verification.
146143
# --------------------------------------------------------------------
147144
USER gpadmin
145+
ENV USER=gpadmin
146+
WORKDIR /home/gpadmin
148147

149-
CMD ["bash","-c","/tmp/init_system.sh"]
148+
CMD ["bash","-c","/tmp/init_system.sh"]

images/docker/gpdb/build/jammy/configs/init_system.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ else
149149
fi
150150

151151
cat <<-EOF
152-
Welcome to the Greebplum Test Environment!
152+
Welcome to the open-gpdb Build Environment!
153153
154154
Greenplum version ... : $GPDB_VERSION
155155
Container OS ........ : $NAME $VERSION
@@ -169,4 +169,4 @@ EOF
169169
# Finally, the script starts an interactive bash shell to keep the
170170
# container running and allow the user to interact with the environment.
171171
# --------------------------------------------------------------------
172-
/bin/bash
172+
/bin/bash

0 commit comments

Comments
 (0)