Skip to content

Commit bb81256

Browse files
committed
Symlink the versioned binary to unversioned default.
The binaries in demodularized rubies were suffixed with the MAJOR.MINOR versioning. In these containers, provide the unversioned commands via a symlink.
1 parent d4daaf6 commit bb81256

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

4.0/Dockerfile.c10s

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,13 @@ RUN INSTALL_PKGS=" \
4646
ruby4.0 -v | grep -qe "^ruby $RUBY_VERSION\." && echo "Found VERSION $RUBY_VERSION" && \
4747
rpm -V ${INSTALL_PKGS}
4848

49+
# Symlink the binaries. Ruby now provides suffixed binaries in /usr/bin.
50+
# Provide the non-suffixed version in the container.
51+
RUN rpm -ql ruby4.0 ruby4.0-devel | \
52+
grep '/usr/bin' | \
53+
xargs --max-args=1 basename -s ${RUBY_VERSION} | \
54+
xargs -I{} ln -s "/usr/bin/{}${RUBY_VERSION}" "/usr/bin/{}"
55+
4956
# Copy the S2I scripts from the specific language image to $STI_SCRIPTS_PATH
5057
COPY ./s2i/bin/ $STI_SCRIPTS_PATH
5158

4.0/Dockerfile.rhel10

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,13 @@ RUN INSTALL_PKGS=" \
4545
ruby4.0 -v | grep -qe "^ruby $RUBY_VERSION\." && echo "Found VERSION $RUBY_VERSION" && \
4646
rpm -V ${INSTALL_PKGS}
4747

48+
# Symlink the binaries. Ruby now provides suffixed binaries in /usr/bin.
49+
# Provide the non-suffixed version in the container.
50+
RUN rpm -ql ruby4.0 ruby4.0-devel | \
51+
grep '/usr/bin' | \
52+
xargs --max-args=1 basename -s ${RUBY_VERSION} | \
53+
xargs -I{} ln -s "/usr/bin/{}${RUBY_VERSION}" "/usr/bin/{}"
54+
4855
# Copy the S2I scripts from the specific language image to $STI_SCRIPTS_PATH
4956
COPY ./s2i/bin/ $STI_SCRIPTS_PATH
5057

0 commit comments

Comments
 (0)