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 4 commits
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
40 changes: 40 additions & 0 deletions dockerfile_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,36 @@ print_alpine_slim_package() {
EOI
}

# Call the script to create the slim package for Ubi
print_ubi_slim_package() {
cat >> "$1" <<-EOI
export PATH="${jhome}/bin:\$PATH"; \\
dnf install -y binutils; \\
/usr/local/bin/slim-java.sh ${jhome}; \\
dnf remove -y binutils; \\
dnf clean all; \\
EOI
}

# Call the script to create the slim package for Ubi
print_ubi-minimal_slim_package() {
cat >> "$1" <<-EOI
export PATH="${jhome}/bin:\$PATH"; \\
microdnf install -y binutils; \\
/usr/local/bin/slim-java.sh ${jhome}; \\
microdnf remove -y binutils; \\
microdnf clean all; \\
EOI
}

# Call the script to create the slim package for Ubi
print_centos_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 +681,13 @@ RUN set -eux; \\
case "\${ARCH}" in \\
EOI
print_java_install_pre "${file}" "${pkg}" "${bld}" "${btype}" "${osfamily}" "${os}"
if [ "${btype}" == "slim" ]; then
if [ ${os} == "ubi" ]; then
print_ubi_slim_package "$1"
elif [ ${os} == "ubi-minimal" ]; then
print_ubi-minimal_slim_package "$1"
fi
fi
print_java_install_post "$1"
}

Expand All @@ -673,6 +710,9 @@ RUN set -eux; \\
case "\${ARCH}" in \\
EOI
print_java_install_pre "${file}" "${pkg}" "${bld}" "${btype}" "${osfamily}" "${os}"
if [ "${btype}" == "slim" ]; then
print_centos_slim_package "$1"
fi
print_java_install_post "$1"
}

Expand Down