Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing slim fixes to ubi, ubi-minimal, clefos #561

Merged
merged 8 commits into from
May 19, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions config/hotspot.config
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ OS_Family: linux
Directory: 8/jdk/tumbleweed

Build: releases nightly
Type: full
Type: full slim
Architectures: aarch64 x86_64 ppc64le s390x
OS_Family: linux
Directory: 8/jdk/ubi-minimal
Expand Down Expand Up @@ -280,7 +280,7 @@ OS_Family: linux
Directory: 11/jdk/tumbleweed

Build: releases nightly
Type: full
Type: full slim
Architectures: aarch64 x86_64 ppc64le s390x
OS_Family: linux
Directory: 11/jdk/ubi-minimal
Expand Down Expand Up @@ -474,7 +474,7 @@ OS_Family: linux
Directory: 15/jdk/ubi

Build: releases nightly
Type: full
Type: full slim
Architectures: aarch64 x86_64 ppc64le s390x
OS_Family: linux
Directory: 15/jdk/ubi-minimal
Expand Down Expand Up @@ -692,7 +692,7 @@ OS_Family: linux
Directory: 16/jdk/ubi

Build: releases nightly
Type: full
Type: full slim
Architectures: aarch64 x86_64 ppc64le s390x
OS_Family: linux
Directory: 16/jdk/ubi-minimal
Expand Down
8 changes: 4 additions & 4 deletions config/openj9.config
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ OS_Family: linux
Directory: 8/jdk/tumbleweed

Build: releases nightly
Type: full
Type: full slim
Architectures: x86_64 ppc64le s390x
OS_Family: linux
Directory: 8/jdk/ubi-minimal
Expand Down Expand Up @@ -284,7 +284,7 @@ Directory: 11/jdk/tumbleweed
Build: releases nightly
Type: full
Architectures: x86_64 ppc64le s390x
OS_Family: linux
OS_Family: linux slim
Directory: 11/jdk/ubi-minimal

Build: releases nightly
Expand Down Expand Up @@ -478,7 +478,7 @@ Directory: 15/jdk/ubi
Build: releases nightly
Type: full
Architectures: x86_64 ppc64le s390x
OS_Family: linux
OS_Family: linux slim
Directory: 15/jdk/ubi-minimal

Build: releases nightly
Expand Down Expand Up @@ -696,7 +696,7 @@ Directory: 16/jdk/ubi
Build: releases nightly
Type: full
Architectures: x86_64 ppc64le s390x
OS_Family: linux
OS_Family: linux slim
Directory: 16/jdk/ubi-minimal

Build: releases nightly
Expand Down
22 changes: 19 additions & 3 deletions dockerfile_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ EOI
# Select the ubi OS packages.
print_ubi_pkg() {
cat >> "$1" <<'EOI'
RUN dnf install -y tzdata openssl curl ca-certificates fontconfig glibc-langpack-en gzip tar \
RUN dnf install -y tzdata openssl curl ca-certificates fontconfig glibc-langpack-en gzip tar binutils \
srbala marked this conversation as resolved.
Show resolved Hide resolved
&& dnf update -y; dnf clean all
EOI
}
Expand All @@ -270,15 +270,15 @@ EOI
# Select the ubi OS packages.
print_ubi-minimal_pkg() {
cat >> "$1" <<'EOI'
RUN microdnf install -y tzdata openssl curl ca-certificates fontconfig glibc-langpack-en gzip tar \
RUN microdnf install -y tzdata openssl curl ca-certificates fontconfig glibc-langpack-en gzip tar binutils \
&& microdnf update -y; microdnf clean all
EOI
}

# Select the CentOS packages.
print_centos_pkg() {
cat >> "$1" <<'EOI'
RUN yum install -y tzdata openssl curl ca-certificates fontconfig gzip tar \
RUN yum install -y tzdata openssl curl ca-certificates fontconfig gzip tar binutils \
&& yum update -y; yum clean all
EOI
}
Expand Down Expand Up @@ -476,6 +476,16 @@ print_alpine_slim_package() {
EOI
}

# Call the script to create the slim package for Ubi
# Using binutils package installed at startup for the "strip" command
# Same function used for ubi-minimal, centos and clefos
print_ubi_slim_package() {
cat >> "$1" <<-EOI
export PATH="${jhome}/bin:\$PATH"; \\
/usr/local/bin/slim-java.sh ${jhome}; \\
EOI
}

# Print the main RUN command that installs Java on ubuntu.
print_ubuntu_java_install() {
local pkg=$2
Expand Down Expand Up @@ -651,6 +661,9 @@ RUN set -eux; \\
case "\${ARCH}" in \\
EOI
print_java_install_pre "${file}" "${pkg}" "${bld}" "${btype}" "${osfamily}" "${os}"
if [ "${btype}" == "slim" ]; then
print_ubi_slim_package "$1"
srbala marked this conversation as resolved.
Show resolved Hide resolved
fi
print_java_install_post "$1"
}

Expand All @@ -673,6 +686,9 @@ RUN set -eux; \\
case "\${ARCH}" in \\
EOI
print_java_install_pre "${file}" "${pkg}" "${bld}" "${btype}" "${osfamily}" "${os}"
if [ "${btype}" == "slim" ]; then
print_ubi_slim_package "$1"
srbala marked this conversation as resolved.
Show resolved Hide resolved
fi
print_java_install_post "$1"
}

Expand Down