Skip to content

Commit

Permalink
Adjust locale generation
Browse files Browse the repository at this point in the history
  • Loading branch information
lloeki committed Nov 19, 2024
1 parent f9d7f2e commit 2a7baf1
Show file tree
Hide file tree
Showing 6 changed files with 72 additions and 42 deletions.
19 changes: 12 additions & 7 deletions src/engines/ruby/2.7/Dockerfile.centos
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,20 @@ SHELL

RUN yum makecache -y

# localedef has been forcefully removed by:
# rm -rf "$target"/usr/{{lib,share}/locale,{lib,lib64}/gconv,bin/localedef,sbin/build-locale-archive}
# fun: CentOS 8 has `yum list glibc-langpack-\*` but not CentOS 7 :'(
RUN yum reinstall -y glibc-common

RUN yum install -y curl gcc make

# fun: this has to be after `yum install curl gcc make`... but only on aarch64; go figure
# extra fun: table is botched, localedef not happy, swallow result and test `locale` for errors
RUN <<SHELL
localedef -v -c -i en_US -f UTF-8 en_US.UTF-8 || true
if locale 2>&1 | grep -e 'locale: Cannot set LC_.* to default locale: No such file or directory'; then exit 1; fi
SHELL

# Skip installing gem documentation
COPY <<GEMRC /usr/local/etc/gemrc
install: --no-document
Expand All @@ -50,13 +62,6 @@ ENV LANG="en_US.UTF-8"
RUBY_VERSION="2.7.8" \
RUBY_DOWNLOAD_SHA256="f22f662da504d49ce2080e446e4bea7008cee11d5ec4858fc69000d0e5b1d7fb"

# localedef has been forcefully removed by:
# rm -rf "$target"/usr/{{lib,share}/locale,{lib,lib64}/gconv,bin/localedef,sbin/build-locale-archive}
RUN <<SHELL
yum reinstall -y glibc-common
localedef -v -c -i en_US -f UTF-8 en_US.UTF-8
SHELL

# - Compile Ruby with `--disable-shared`
# - Update gem version

Expand Down
19 changes: 12 additions & 7 deletions src/engines/ruby/3.0/Dockerfile.centos
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,20 @@ SHELL

RUN yum makecache -y

# localedef has been forcefully removed by:
# rm -rf "$target"/usr/{{lib,share}/locale,{lib,lib64}/gconv,bin/localedef,sbin/build-locale-archive}
# fun: CentOS 8 has `yum list glibc-langpack-\*` but not CentOS 7 :'(
RUN yum reinstall -y glibc-common

RUN yum install -y curl gcc make

# fun: this has to be after `yum install curl gcc make`... but only on aarch64; go figure
# extra fun: table is botched, localedef not happy, swallow result and test `locale` for errors
RUN <<SHELL
localedef -v -c -i en_US -f UTF-8 en_US.UTF-8 || true
if locale 2>&1 | grep -e 'locale: Cannot set LC_.* to default locale: No such file or directory'; then exit 1; fi
SHELL

# Skip installing gem documentation
COPY <<GEMRC /usr/local/etc/gemrc
install: --no-document
Expand All @@ -50,13 +62,6 @@ ENV LANG="en_US.UTF-8"
RUBY_VERSION="3.0.6" \
RUBY_DOWNLOAD_SHA256="b5cbee93e62d85cfb2a408c49fa30a74231ae8409c2b3858e5f5ea254d7ddbd1"

# localedef has been forcefully removed by:
# rm -rf "$target"/usr/{{lib,share}/locale,{lib,lib64}/gconv,bin/localedef,sbin/build-locale-archive}
RUN <<SHELL
yum reinstall -y glibc-common
localedef -v -c -i en_US -f UTF-8 en_US.UTF-8
SHELL

# - Compile Ruby with `--disable-shared`
# - Update gem version

Expand Down
19 changes: 12 additions & 7 deletions src/engines/ruby/3.1/Dockerfile.centos
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,20 @@ SHELL

RUN yum makecache -y

# localedef has been forcefully removed by:
# rm -rf "$target"/usr/{{lib,share}/locale,{lib,lib64}/gconv,bin/localedef,sbin/build-locale-archive}
# fun: CentOS 8 has `yum list glibc-langpack-\*` but not CentOS 7 :'(
RUN yum reinstall -y glibc-common

RUN yum install -y curl gcc make

# fun: this has to be after `yum install curl gcc make`... but only on aarch64; go figure
# extra fun: table is botched, localedef not happy, swallow result and test `locale` for errors
RUN <<SHELL
localedef -v -c -i en_US -f UTF-8 en_US.UTF-8 || true
if locale 2>&1 | grep -e 'locale: Cannot set LC_.* to default locale: No such file or directory'; then exit 1; fi
SHELL

# Skip installing gem documentation
COPY <<GEMRC /usr/local/etc/gemrc
install: --no-document
Expand All @@ -50,13 +62,6 @@ ENV LANG="en_US.UTF-8"
RUBY_VERSION="3.1.4" \
RUBY_DOWNLOAD_SHA256="1b6d6010e76036c937b9671f4752f065aeca800a6c664f71f6c9a699453af94f"

# localedef has been forcefully removed by:
# rm -rf "$target"/usr/{{lib,share}/locale,{lib,lib64}/gconv,bin/localedef,sbin/build-locale-archive}
RUN <<SHELL
yum reinstall -y glibc-common
localedef -v -c -i en_US -f UTF-8 en_US.UTF-8
SHELL

# - Compile Ruby with `--disable-shared`
# - Update gem version

Expand Down
19 changes: 12 additions & 7 deletions src/engines/ruby/3.2/Dockerfile.centos
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,20 @@ SHELL

RUN yum makecache -y

# localedef has been forcefully removed by:
# rm -rf "$target"/usr/{{lib,share}/locale,{lib,lib64}/gconv,bin/localedef,sbin/build-locale-archive}
# fun: CentOS 8 has `yum list glibc-langpack-\*` but not CentOS 7 :'(
RUN yum reinstall -y glibc-common

RUN yum install -y curl gcc make

# fun: this has to be after `yum install curl gcc make`... but only on aarch64; go figure
# extra fun: table is botched, localedef not happy, swallow result and test `locale` for errors
RUN <<SHELL
localedef -v -c -i en_US -f UTF-8 en_US.UTF-8 || true
if locale 2>&1 | grep -e 'locale: Cannot set LC_.* to default locale: No such file or directory'; then exit 1; fi
SHELL

# Skip installing gem documentation
COPY <<GEMRC /usr/local/etc/gemrc
install: --no-document
Expand All @@ -50,13 +62,6 @@ ENV LANG="en_US.UTF-8"
RUBY_VERSION="3.2.2" \
RUBY_DOWNLOAD_SHA256="4b352d0f7ec384e332e3e44cdbfdcd5ff2d594af3c8296b5636c710975149e23"

# localedef has been forcefully removed by:
# rm -rf "$target"/usr/{{lib,share}/locale,{lib,lib64}/gconv,bin/localedef,sbin/build-locale-archive}
RUN <<SHELL
yum reinstall -y glibc-common
localedef -v -c -i en_US -f UTF-8 en_US.UTF-8
SHELL

# - Compile Ruby with `--disable-shared`
# - Update gem version

Expand Down
19 changes: 12 additions & 7 deletions src/engines/ruby/3.3/Dockerfile.centos
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,20 @@ SHELL

RUN yum makecache -y

# localedef has been forcefully removed by:
# rm -rf "$target"/usr/{{lib,share}/locale,{lib,lib64}/gconv,bin/localedef,sbin/build-locale-archive}
# fun: CentOS 8 has `yum list glibc-langpack-\*` but not CentOS 7 :'(
RUN yum reinstall -y glibc-common

RUN yum install -y curl gcc make

# fun: this has to be after `yum install curl gcc make`... but only on aarch64; go figure
# extra fun: table is botched, localedef not happy, swallow result and test `locale` for errors
RUN <<SHELL
localedef -v -c -i en_US -f UTF-8 en_US.UTF-8 || true
if locale 2>&1 | grep -e 'locale: Cannot set LC_.* to default locale: No such file or directory'; then exit 1; fi
SHELL

# Skip installing gem documentation
COPY <<GEMRC /usr/local/etc/gemrc
install: --no-document
Expand All @@ -50,13 +62,6 @@ ENV LANG="en_US.UTF-8"
RUBY_VERSION="3.3.6" \
RUBY_DOWNLOAD_SHA256="540975969d1af42190d26ff629bc93b1c3f4bffff4ab253e245e125085e66266"

# localedef has been forcefully removed by:
# rm -rf "$target"/usr/{{lib,share}/locale,{lib,lib64}/gconv,bin/localedef,sbin/build-locale-archive}
RUN <<SHELL
yum reinstall -y glibc-common
localedef -v -c -i en_US -f UTF-8 en_US.UTF-8
SHELL

# - Compile Ruby with `--disable-shared`
# - Update gem version

Expand Down
19 changes: 12 additions & 7 deletions src/engines/ruby/3.4/Dockerfile.centos
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,20 @@ SHELL

RUN yum makecache -y

# localedef has been forcefully removed by:
# rm -rf "$target"/usr/{{lib,share}/locale,{lib,lib64}/gconv,bin/localedef,sbin/build-locale-archive}
# fun: CentOS 8 has `yum list glibc-langpack-\*` but not CentOS 7 :'(
RUN yum reinstall -y glibc-common

RUN yum install -y curl gcc make

# fun: this has to be after `yum install curl gcc make`... but only on aarch64; go figure
# extra fun: table is botched, localedef not happy, swallow result and test `locale` for errors
RUN <<SHELL
localedef -v -c -i en_US -f UTF-8 en_US.UTF-8 || true
if locale 2>&1 | grep -e 'locale: Cannot set LC_.* to default locale: No such file or directory'; then exit 1; fi
SHELL

# Skip installing gem documentation
COPY <<GEMRC /usr/local/etc/gemrc
install: --no-document
Expand All @@ -50,13 +62,6 @@ ENV LANG="en_US.UTF-8"
RUBY_VERSION="3.4.0-preview2" \
RUBY_DOWNLOAD_SHA256="626bf4fe952323c15ec9a8999f470ec136ef91c0fc34c484646aaaa9a0b62ca7"

# localedef has been forcefully removed by:
# rm -rf "$target"/usr/{{lib,share}/locale,{lib,lib64}/gconv,bin/localedef,sbin/build-locale-archive}
RUN <<SHELL
yum reinstall -y glibc-common
localedef -v -c -i en_US -f UTF-8 en_US.UTF-8
SHELL

# - Compile Ruby with `--disable-shared`
# - Update gem version

Expand Down

0 comments on commit 2a7baf1

Please sign in to comment.